Alan Stern a écrit : > On Fri, 27 Jul 2007, Jean-Claude Repetto wrote: > >>> I wonder if a START_UNIT would help.... I've heard through the grapevine >>> that a common OS reponse to "Not ready" is START_UNIT. >>> >>> Matt >>> >> How can I test that ? Could you send me a patch against the kernel >> 2.6.22 driver ? > > 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:01 corborant Initializing USB Mass Storage driver... Jul 27 23:36:01 corborant usbcore: registered new interface driver usb-storage Jul 27 23:36:01 corborant USB Mass Storage support registered. Jul 27 23:36:24 corborant usb 1-2: new full speed USB device using uhci_hcd and address 3 Jul 27 23:36:25 corborant usb 1-2: configuration #1 chosen from 1 choice Jul 27 23:36:25 corborant usb-storage: USB Mass Storage device detected Jul 27 23:36:25 corborant usb-storage: -- associate_dev Jul 27 23:36:25 corborant usb-storage: Vendor: 0x1390, Product: 0x0001, Revision: 0x0001 Jul 27 23:36:25 corborant usb-storage: Interface Subclass: 0x06, Protocol: 0x50 Jul 27 23:36:25 corborant usb-storage: Transport: Bulk Jul 27 23:36:25 corborant usb-storage: Protocol: Transparent SCSI Jul 27 23:36:25 corborant scsi3 : SCSI emulation for USB Mass Storage devices Jul 27 23:36:25 corborant usb-storage: *** thread sleeping. Jul 27 23:36:25 corborant usb-storage: device found at 3 Jul 27 23:36:25 corborant usb-storage: waiting for device to settle before scanning Jul 27 23:36:30 corborant usb-storage: usb_stor_control_msg: rq=fe rqtype=a1 value=0000 index=00 len=1 Jul 27 23:36:30 corborant usb-storage: GetMaxLUN command result is 1, data is 0 Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Command INQUIRY (6 bytes) Jul 27 23:36:30 corborant usb-storage: 12 00 00 00 24 00 Jul 27 23:36:30 corborant usb-storage: Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6 Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 31/31 Jul 27 23:36:30 corborant usb-storage: -- transfer complete Jul 27 23:36:30 corborant usb-storage: Bulk command transfer result=0 Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_sglist: xfer 36 bytes, 1 entries Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 36/36 Jul 27 23:36:30 corborant usb-storage: -- transfer complete Jul 27 23:36:30 corborant usb-storage: Bulk data transfer result 0x0 Jul 27 23:36:30 corborant usb-storage: Attempting to get CSW... Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 13/13 Jul 27 23:36:30 corborant usb-storage: -- transfer complete Jul 27 23:36:30 corborant usb-storage: Bulk status result = 0 Jul 27 23:36:30 corborant usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0 Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x0 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant scsi 3:0:0:0: Direct-Access TomTom ONE PQ: 0 ANSI: 2 Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Command TEST_UNIT_READY (6 bytes) Jul 27 23:36:30 corborant usb-storage: 00 00 00 00 00 00 Jul 27 23:36:30 corborant usb-storage: Bulk Command S 0x43425355 T 0x2 L 0 F 0 Trg 0 LUN 0 CL 6 Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 31/31 Jul 27 23:36:30 corborant usb-storage: -- transfer complete Jul 27 23:36:30 corborant usb-storage: Bulk command transfer result=0 Jul 27 23:36:30 corborant usb-storage: Attempting to get CSW... Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 13/13 Jul 27 23:36:30 corborant usb-storage: -- transfer complete Jul 27 23:36:30 corborant usb-storage: Bulk status result = 0 Jul 27 23:36:30 corborant usb-storage: Bulk Status S 0x53425355 T 0x2 R 0 Stat 0x1 Jul 27 23:36:30 corborant usb-storage: -- transport indicates command failure Jul 27 23:36:30 corborant usb-storage: Issuing auto-REQUEST_SENSE Jul 27 23:36:30 corborant usb-storage: Bulk Command S 0x43425355 T 0x3 L 18 F 128 Trg 0 LUN 0 CL 6 Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 31/31 Jul 27 23:36:30 corborant usb-storage: -- transfer complete Jul 27 23:36:30 corborant usb-storage: Bulk command transfer result=0 Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 14/18 Jul 27 23:36:30 corborant usb-storage: -- short transfer Jul 27 23:36:30 corborant usb-storage: Bulk data transfer result 0x1 Jul 27 23:36:30 corborant usb-storage: Attempting to get CSW... Jul 27 23:36:30 corborant usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes Jul 27 23:36:30 corborant usb-storage: Status code 0; transferred 13/13 Jul 27 23:36:30 corborant usb-storage: -- transfer complete Jul 27 23:36:30 corborant usb-storage: Bulk status result = 0 Jul 27 23:36:30 corborant usb-storage: Bulk Status S 0x53425355 T 0x3 R 4 Stat 0x0 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 Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Bad target number (1:0) Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x40000 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Bad target number (2:0) Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x40000 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Bad target number (3:0) Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x40000 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Bad target number (4:0) Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x40000 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Bad target number (5:0) Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x40000 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Bad target number (6:0) Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x40000 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant usb-storage: queuecommand called Jul 27 23:36:30 corborant usb-storage: *** thread awakened. Jul 27 23:36:30 corborant usb-storage: Bad target number (7:0) Jul 27 23:36:30 corborant usb-storage: scsi cmd done, result=0x40000 Jul 27 23:36:30 corborant usb-storage: *** thread sleeping. Jul 27 23:36:30 corborant usb-storage: device scan complete Regards, Jean-Claude ------------------------------------------------------------------------- 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