On Wed, Jan 16, 2002 at 12:45:12PM -0800, Ben Fennema wrote:
On Thu, Jan 17, 2002 at 03:15:48AM +1100, Drew Parsons wrote:
I can see the BLANK and READ TRACK INFORMATION commands, apparently successful, but it appears to be timing out while running the FORMAT_UNIT command in the usb subsystem.
Well, I've seen FORMAT_UNIT's on a full CDRW take over an hour, so 10 minutes is definitely not enough time =)
Theoretically, a timeout is passed to the command.. I'd check to see if USB ever looks at the timeout..
Ben
The relevant piece of coding, corresponding to the log message: Jan 17 03:03:22 strider kernel: usb-storage: Waited not busy for 10 minutes= , timing out. comes from linux/drivers/usb/storage/shuttle_usbat.c, in function int usbat_wait_not_busy(struct us_data *us, int minutes). The minutes argument provides the "10" in the 10 minute timeout. The comments there say /* Synchronizing cache on a CDR could take a heck of a long time, * but probably not more than 10 minutes or so. On the other hand, * doing a full blank on a CDRW at speed 1 will take about 75 * minutes! */ The function has a loop, pausing between iterations with wait_ms(1000), which checks usbat_read(). The result of usbat_read() may indicates a good or bad access, but if it says neither, the timeout is eventually reached. The value of 10 (minutes) appears to be defined (hardcoded) while processing (srb->sc_data_direction == SCSI_DATA_WRITE) in hp8200e_transport(). Elsewhere in shuttle_usbat.c, a value of 1 (or 0) is used. It's also conditionally defined in hp8200e_transport() while processing any command: // Write the 12-byte command header. // If the command is BLANK then set the timer for 75 minutes. // Otherwise set it for 10 minutes. // NOTE: THE 8200 DOCUMENTATION STATES THAT BLANKING A CDRW // AT SPEED 4 IS UNRELIABLE!!! if ( (result = usbat_write_block(us, USBAT_ATA, 0x10, srb->cmnd, 12, 0, srb->cmnd[0]==GPCMD_BLANK ? 75 : 10)) != USB_STOR_TRANSPORT_GOOD) { return result; } My gut feeling is this is the source of the "10 minutes" that I'm timing out on. Would it therefore make sense to test for FORMAT_UNIT alongside the current test for GPCMD_BLANK, making the timeout 75 minutes for FORMAT_UNIT ? Does anyone have any other deep wisdom or insight to tell about this? Thanks, Drew -- PGP public key available at http://people.debian.org/~dparsons/drewskey.txt Fingerprint: A110 EAE1 D7D2 8076 5FE0 EC0A B6CE 7041 6412 4E4A