On Fri, 27 Jul 2007, Jean-Claude Repetto wrote:

> > You can do it yourself pretty easily.  In drivers/scsi/sd.c, find the 
> > sd_spinup_disk() routine and comment out the call to 
> > media_not_present() near its start.  You also have to comment out the 
> > check of sdkp->device->no_start_on_add.
> > 
> > Alan Stern
> > 
> 
> This is the result with the patched driver :

> Jul 27 23:36:30 corborant usb-storage: -- Result from auto-sense is 0
> Jul 27 23:36:30 corborant usb-storage: -- code: 0x70, key: 0x2, ASC: 
> 0x3a, ASCQ: 0x0
> Jul 27 23:36:30 corborant usb-storage: (Unknown Key): (unknown ASC/ASCQ)
> Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x2
> Jul 27 23:36:30 corborant usb-storage: *** thread sleeping.
> Jul 27 23:36:30 corborant sd 3:0:0:0: [sdb] Attached SCSI removable disk
> Jul 27 23:36:30 corborant sd 3:0:0:0: Attached scsi generic sg1 type 0

No change.  :-(

I'm not sure what's going on.  You might want to experiment around a 
little.  Try adding some printk() statements at various places 
throughout the sd_spinup_disk() routine so you can trace the flow of 
control.

The TEST_UNIT_READY and auto-REQUEST_SENSE parts of the usb-storage
debugging log correspond to where the routine calls scsi_execute_req()
near the start, with cmnd[0] set to TEST_UNIT_READY.  You want to reach
the part where it calls scsi_execute_req() with cmnd[0] set to
START_STOP, about halfway down.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to