[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: x86, microcode: Conversion from sysdev class caused regression
    + Dave.

    On Wed, Apr 11, 2012 at 07:06:21PM +0200, Kay Sievers wrote:
    > > The reason for the error is that subsys_interface_register() doesn't
    > > handle the return value of sif->add_dev (and there's also no unwinding
    > > of the interface registration). Instead subsys_interface_register
    > > always returns 0.
    > Which is the intended behaviour of 'subsystem interfaces' from the
    > driver-core perspective. It should not matter if one of a bunch of
    > devices do not 'like' this 'interface'. It is the same model as a
    > 'driver', we do not cancel the link-in of a driver if one device does
    > not like the driver.

    But you're not looking at the return value of sif->add_dev which looks
    strange to me. Let me put it this way: why do you have return values to
    ->add_dev's interface then if you're not going to look at them?

    A warning that one of the dev_add's failed could probably make sense


    > I think a quick return in the microcode driver, for a device which has
    > no active interface state is the best solution here.

    Actually, it is even easier: the code clumsily does:

    if (err)

    so we go and create sysfs group, THEN check whether this CPU is
    supported and if not, remove the group again which is a bunch of crap if
    you ask me. The right way to go should be:

    if (err)

    and then there's no need to do all that sysfs group dancing. Andreas,
    let me know if you wanna do it, or I should take care of it.



    Advanced Micro Devices GmbH
    Einsteinring 24, 85609 Dornach
    GM: Alberto Bozzo
    Reg: Dornach, Landkreis Muenchen
    HRB Nr. 43632 WEEE Registernr: 129 19551

     \ /
      Last update: 2012-04-11 22:07    [W:0.043 / U:0.120 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site