Re: [patch] floppy: suspend/resume fix

Ingo Molnar
2006-11-15T18:54:22Z

* Russell King <rmk+lkml@arm.linux.org.uk> wrote:

> On Sun, Nov 12, 2006 at 11:40:28PM +0100, Mikael Pettersson wrote:
> > The bug occurs regardless of whether I leave the floppy disc in the drive
> > during suspend or not. 2.6.19-rc5 (vanilla and with Ingo's suspend/resume
> > hooks) fails the following use case as well:
> >
> > 1. boot
> > 2. insert floppy disc
> > 3. tar tvf /dev/fd0 (works)
> > 4. manually eject floppy disc
> > 5. suspend, later resume
> > 6. insert floppy disc
> > 7. tar tvf /dev/fd0 (fails with I/O errors)
> > 8. tar tvf /dev/fd0 (works)
> >
> > Like Ingo said, something happens to the HW during suspend and we
> > need to figure out how to reinitialise the HW and the driver so that
> > things work immediately after resume.
>
> Now this is interesting - I know there's been a long standing bug with
> kernels on my Thinkpad which behave in a similar way to your
> description above. Basically whenever I change the disk in the drive
> I tend to need _two_ goes to do anything with it - the first mostly
> always fails with IO errors.

yeah. But somehow the pre-lockdep-change driver gets this right - purely
by virtue of unregistering the IRQ line and the DMA channel - neither of
which should have any material effect on behavior ... [and when i
restored this in suspend/resume it didnt fix the bug] Weird.

Ingo