>From [EMAIL PROTECTED] Thu Feb 5 06:52:18 2004 >OK, I finally was able to recompile my kernel with usb and usb-storage >debugging on. For reference, here is the output of the cdrecord >command. There is a blank DVD-R in the drive. It is actually a Plextor >PX-708UF drive hooked up through USB2.0. (I'm using Red Hat Linux 9, >kernel 2.4.20-20.9-athlon, Asus A7V333 mobo, Athlon XP 2100+ CPU.)
Let me first write a short summary: - The Firmware in the Plextor drive is obviously buggy. I did send a bug report to Plextor and hope to get a new firmware soon. - The Linux driver subsystem implements a severe Bug! See below.... - Cdrecord fails because it completely follows the SCSI MMC standard - growisofs works because it uses a simplified method to retrieve information (it seems that it depends on fixed data size). >================== >[EMAIL PROTECTED] magliery]# cdrecord-ProDVD.sh -atip dev=0,0,0 >Cdrecord-ProDVD-Clone 2.01a24 (i686-pc-linux-gnu) Copyright (C) >1995-2004 Jörg Schilling >Unlocked features: ProDVD Clone >Limited features: >This copy of cdrecord is licensed for: >private/research/educational_non-commercial_use >scsidev: '0,0,0' >scsibus: 0 target: 0 lun: 0 >Linux sg driver version: 3.1.24 >Using libscg version 'schily-0.8'. >Device type : Removable CD-ROM >Version : 2 >Response Format: 1 >Vendor_info : 'PLEXTOR ' >Identifikation : 'DVDR PX-708A ' >Revision : '1.04' >Device seems to be: Generic mmc2 DVD-R/DVD-RW. >Using generic SCSI-3/mmc-3 DVD+R driver (mmc_dvdplusr). >Driver flags : DVD MMC-3 SWABAUDIO BURNFREE >Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R >cdrecord-ProDVD: Input/output error. read disk info: scsi sendcmd: no error >CDB: 51 00 00 00 00 00 00 00 24 00 >status: 0x2 (CHECK CONDITION) >Sense Bytes: 70 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 >Sense Key: 0x0 No Additional Sense, Segment 0 >Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0 >Sense flags: Blk 0 (not valid) >cmd finished after 0.002s timeout 240s >cdrecord-ProDVD: Cannot get disk type. >======================= >Below is the output of the kernel messages from that time. What shall I >do from here? Would you like me to email you the rest of the kernel log >from startup? (Incidentally, I had to enable a kernel log file in >syslog.conf, since the dmesg buffer was exceeded so quickly.) Unfortuneatly your log is hard to read because it wraps lines..... What you see, is that some instance in the Linux kernel completely misshandles this transfer: - The drive seems to return only 34 bytes although it did advertise to return 36. The correct behavior for Linux would be to set sg_io.resid = 2; and _not_ to return any error. - The Linux kernel issues a REQUEST SENSE command ---> this is the first severe bug. It is completely wrong to issue a REQUEST SENSE in case of a DMA Size error. - together with other bugs in the Linux SCSI subsystem, this finally is the main reason why cdrecord fails. - there are already soo many bugs in the Linux SCSI subsystem where libscg needs to implements workareounds for, so it is now impossible to add a new workarounf for this Bug. The workaround for our current bug would contradict a work around for another bug :-( *********************** Conclusion: The bug is definitely inside the Linux kernel, most likely in the USB mass storage interface. The only possible fix is to change the Linux kernel in a way that REQUEST SENSE is _not_ called in case is a DMA size error. *********************** >Feb 5 01:35:56 reganlinux kernel: usb-storage: *** thread sleeping. >Feb 5 01:35:56 reganlinux kernel: usb-storage: queuecommand() called >Feb 5 01:35:56 reganlinux kernel: usb-storage: *** thread awakened. >Feb 5 01:35:56 reganlinux kernel: usb-storage: Command READ DISC >INFORMATION (10 bytes) >Feb 5 01:35:56 reganlinux kernel: usb-storage: 51 00 00 00 00 00 00 00 >24 00 00 00 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk command S >0x43425355 T 0xac Trg 0 LUN 0 L 36 F 128 CL 12 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk command transfer >result=0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: >usb_stor_transfer_partial(): xfer 36 bytes >Feb 5 01:35:56 reganlinux kernel: usb-storage: usb_stor_bulk_msg() >returned 0 xferred 34/36 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk data transfer >result 0x1 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Attempting to get CSW... >Feb 5 01:35:56 reganlinux kernel: usb-storage: clearing endpoint halt >for pipe 0xc0008280 >Feb 5 01:35:56 reganlinux kernel: usb-storage: usb_stor_clear_halt: >result=0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Attempting to get CSW >(2nd try)... >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk status result = 0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk status Sig >0x53425355 T 0xac R 2 Stat 0x0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: -- unexpectedly short >transfer >Feb 5 01:35:56 reganlinux kernel: usb-storage: Issuing auto-REQUEST_SENSE >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk command S >0x43425355 T 0xac Trg 0 LUN 0 L 18 F 128 CL 12 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk command transfer >result=0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: >usb_stor_transfer_partial(): xfer 18 bytes >Feb 5 01:35:56 reganlinux kernel: usb-storage: usb_stor_bulk_msg() >returned 0 xferred 18/18 >Feb 5 01:35:56 reganlinux kernel: usb-storage: >usb_stor_transfer_partial(): transfer complete >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk data transfer >result 0x0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Attempting to get CSW... >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk status result = 0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: Bulk status Sig >0x53425355 T 0xac R 0 Stat 0x0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: -- Result from >auto-sense is 0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: -- code: 0x70, key: 0x0, >ASC: 0x0, ASCQ: 0x0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: No Sense: no additional >sense information >Feb 5 01:35:56 reganlinux kernel: usb-storage: scsi cmd done, result=0x0 >Feb 5 01:35:56 reganlinux kernel: usb-storage: *** thread sleeping. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED] (uni) If you don't have iso-8859-1 [EMAIL PROTECTED] (work) chars I am J"org Schilling URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel