lkml.org 
[lkml]   [2009]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Fix floppy hibernation
    On Wed, 3 Jun 2009 08:13:26 +0200 Ondrej Zary <linux@rainbow-software.org> wrote:

    > > > +static int floppy_resume(struct platform_device *dev)
    > > > +{
    > > > + int fdc;
    > > > +
    > > > + for (fdc = 0; fdc < N_FDC; fdc++)
    > > > + if (FDCS->address != -1)
    > > > + user_reset_fdc(-1, FD_RESET_ALWAYS, 0);
    > > > +
    > > > + return 0;
    > > > +}
    > >
    > > The patch changes the driver so that it calls user_reset_fdc() for each
    > > device at resume-time.
    > >
    > > Why? What effect does this have on the hardware and why does it fix
    > > things?
    >
    > I don't know at all, it's complete guesswork. The first thing I tested was
    > rmmod floppy && modprobe floppy after resume - it worked. Narrowing the
    > initialization code down resulted in this patch.

    lol, OK. I added this to the changelog:

    This fix resets the floppy controller on resume. It was
    experimentally determined to bring the controller back to life - we
    don't really know why it works.

    floppy_init() does the same thing at boot/modprobe time.

    Let's see how it goes... If someone reports breakage then we can
    always change the driver so that activation of your new code requires a
    module parameter.


    \
     
     \ /
      Last update: 2009-06-03 08:29    [W:0.022 / U:30.168 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site