Re: [PATCH] scsi/sd: fix suspend with USB-connected Android phone (one line)

From: Oliver Neukum
Date: Sat May 14 2011 - 15:10:11 EST


Am Donnerstag, 12. Mai 2011, 22:36:03 schrieb James Bottomley:

> Instinct tells me the correct set of fixes is to add a sync cache from
> release (so we automatically sync on last close, which is usually when
> an ordered remove happens), keep the one on shutdown, just in case the
> system goes down with stuff still mounted and print a nasty message on
> suspend for a write back device that's been removed.
>
> I also think we shouldn't abort the suspend if the disk doesn't respond
> correctly to start/stop ... the power is going to be disconnected
> anyway, so it's no issue if the disk spins for a second or so longer.
>
> The problem this is going to cause is double sync on shutdown (once when
> final unmount closes the device and once on shutdown) ... do people
> agree that's a price worth paying?
>
> Something like this?

Hi,

it seems to me that the error codes should really be evaluated a bit better.
How about this?

Regards
Oliver