From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: Ejected Nook (usb mass storage) prevents suspend Date: Fri, 02 Aug 2013 16:11:05 +0200 Message-ID: <1375452665.2138.17.camel@linux-fkkt.site> References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alan Stern Cc: Andy Lutomirski , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux PM List , Linux SCSI List , hare-l3A5Bk7waGM@public.gmane.org List-Id: linux-scsi@vger.kernel.org On Fri, 2013-08-02 at 09:54 -0400, Alan Stern wrote: > On Fri, 2 Aug 2013, Oliver Neukum wrote: > > > On Thu, 2013-08-01 at 11:53 -0400, Alan Stern wrote: > > > On Thu, 1 Aug 2013, Oliver Neukum wrote: > > > > > > > On Wed, 2013-07-31 at 11:13 -0400, Alan Stern wrote: > > > > > > > > > More importantly, if we already know that the medium is not present or > > > > > has been changed since it was last used, then there's no reason to call > > > > > sd_sync_cache() at all. > > > > > > > > Like this? > > > > > > Yes, I like this a lot better, except I would put the test for > > > !sdkp->media_present in sd_suspend_common() -- no need to print the > > > > But your observation that it makes no sense while no medium is present > > is valid whatever be the reason for wanting to flush. > > So do the test in both places. Code duplication for what reasons? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html