Re: Buffer I/O error after s2ram with usb storage

2014-08-29 Thread Matthieu CASTET
Le Wed, 27 Aug 2014 10:54:53 -0400, Alan Stern a écrit : > On Wed, 27 Aug 2014, Matthieu CASTET wrote: > > > Ping > > > > I have got also a problem with a usb sdcard reader (without power cut > > during suspend) > > > > > The usb storage driver call scsi_report_bus_reset after device reset, >

Re: Buffer I/O error after s2ram with usb storage

2014-08-27 Thread Alan Stern
On Wed, 27 Aug 2014, Douglas Gilbert wrote: > The unit attention doesn't look like a problem, it > looks correct. If the system is unable to detect > removable media being changed while the system is > suspended, then > > If the media has a unique identifier, then this unit > attention at wa

Re: Buffer I/O error after s2ram with usb storage

2014-08-27 Thread Alan Stern
On Wed, 27 Aug 2014, Matthieu CASTET wrote: > Ping > > I have got also a problem with a usb sdcard reader (without power cut > during suspend) > > > The usb storage driver call scsi_report_bus_reset after device reset, > > > but because of commit dfcf7775 <4>, we don't ignore unit attention if >

Re: Buffer I/O error after s2ram with usb storage

2014-08-27 Thread Douglas Gilbert
On 14-08-27 04:40 AM, Matthieu CASTET wrote: Ping I have got also a problem with a usb sdcard reader (without power cut during suspend) [ 1073.606668] PM: Entering mem sleep [ 1073.606742] Suspending console(s) (use no_console_suspend to debug) [ 1073.607146] sd 1:0:0:0: [sda] Synchronizing SCS

Re: Buffer I/O error after s2ram with usb storage

2014-08-27 Thread Matthieu CASTET
Ping I have got also a problem with a usb sdcard reader (without power cut during suspend) [ 1073.606668] PM: Entering mem sleep [ 1073.606742] Suspending console(s) (use no_console_suspend to debug) [ 1073.607146] sd 1:0:0:0: [sda] Synchronizing SCSI cache [ 1073.639076] sd 1:0:0:0: [sda] Stoppi

Re: Buffer I/O error after s2ram with usb storage persistance

2014-04-22 Thread Alan Stern
On Tue, 22 Apr 2014, Matthieu CASTET wrote: > Yes, but we can ignore the first "Not-ready to ready change" event > after resume. > > In fact after reset, we call usb_stor_reset_resume that do a > scsi_report_bus_reset. > This will set the flag expecting_cc_ua in scsi layer and the scsi layer > wi

Re: Buffer I/O error after s2ram with usb storage persistance

2014-04-22 Thread Matthieu CASTET
Le Fri, 18 Apr 2014 14:29:46 -0400, Alan Stern a écrit : > On Fri, 18 Apr 2014, Matthieu CASTET wrote: > > > "echo mem > /sys/power/state; cat /dev/sdx > /dev/null" works. > > I guess this works because the initial open of /dev/sdx swallows the > media-changed notification. Ok > > > > The d

Re: Buffer I/O error after s2ram with usb storage persistance

2014-04-18 Thread Steve Cotton
On Fri, Apr 18, 2014 at 17:55 +0200, Matthieu CASTET wrote: > Le Fri, 18 Apr 2014 10:42:14 -0400, > Alan Stern a écrit : > > > > Since the SCSI layer thinks the media was changed, it has no choice but > > to fail the read request. > ok. > > I suppose the scsi layer can't ignore "Not-ready to re

Re: Buffer I/O error after s2ram with usb storage persistance

2014-04-18 Thread Alan Stern
On Fri, 18 Apr 2014, Matthieu CASTET wrote: > > > while playing with suspend to ram I found a strange behavior with usb > > > persistence. > > > > > > This can be easily reproduce by doing : > > > - plug a usb key > > > - start to read the usb key : "cat /dev/sdx > /dev/null" > > > - go to suspen

Re: Buffer I/O error after s2ram with usb storage persistance

2014-04-18 Thread Matthieu CASTET
Hi Alan, thanks for your answers. Le Fri, 18 Apr 2014 10:42:14 -0400, Alan Stern a écrit : > On Fri, 18 Apr 2014, Matthieu CASTET wrote: > > > Hi, > > > > while playing with suspend to ram I found a strange behavior with usb > > persistence. > > > > This can be easily reproduce by doing : >

Re: Buffer I/O error after s2ram with usb storage persistance

2014-04-18 Thread Alan Stern
On Fri, 18 Apr 2014, Matthieu CASTET wrote: > Hi, > > while playing with suspend to ram I found a strange behavior with usb > persistence. > > This can be easily reproduce by doing : > - plug a usb key > - start to read the usb key : "cat /dev/sdx > /dev/null" > - go to suspend : "echo mem > /sy

Buffer I/O error after s2ram with usb storage persistance

2014-04-18 Thread Matthieu CASTET
Hi, while playing with suspend to ram I found a strange behavior with usb persistence. This can be easily reproduce by doing : - plug a usb key - start to read the usb key : "cat /dev/sdx > /dev/null" - go to suspend : "echo mem > /sys/power/state" - while in suspend, unplug and replug the usb ke