Hello, I'm sorry for my late response.
Matthew Dharm wrote: > Are you saying that the device will not function properly if sent a max_lun > query? Yes, On Panasonic KXL-840(KME CD-ROM11) and KXL-RW11(CDRRW02), GetMaxLUN command return result is -32 and usb_stor_clear_halt: results=-32 And, "Bulk command transfer error" and "Bulk soft reset faild" repeats itself eternally. Currently, in the code of usb-storage, even if we set US_FL_SINGLE_LUN at unusual_devs.h. usb_stor_Bulk_max_lun() will be called definitely. This patch does not call usb_stor_Bulk_max_lun() and will set mux_lun to "0". This is DEBUG out with GetMaxLUN. usb.c: registered new driver usb-storage usb-storage: act_altsettting is 0 usb-storage: id_index calculated to be: 79 usb-storage: Array length appears to be: 100 usb-storage: Vendor: MATSHITA usb-storage: Product: KME CD-ROM11 usb-storage: USB Mass Storage device detected usb-storage: Endpoints: In: 0xc1822ba0 Out: 0xc1822bb4 Int: 0x00000000 (Period 0) usb-storage: New GUID 04da0d010000000000000008 usb-storage: GetMaxLUN command result is -32, data is 128 <------- GetMaxLUN usb-storage: clearing endpoint halt for pipe 0x80000380 usb-storage: Transport: Bulk usb-storage: Protocol: 8020i usb-storage: *** thread sleeping. scsi0 : SCSI emulation for USB Mass Storage devices usb-storage: queuecommand() called usb-storage: *** thread awakened. usb-storage: Command INQUIRY (6 bytes) usb-storage: 12 00 00 00 ff 00 1d c0 18 4c ef c1 usb-storage: Bulk command S 0x43425355 T 0x11 Trg 0 LUN 0 L 255 F 128 CL 12 usb-storage: Bulk command transfer result=0 usb-storage: usb_stor_transfer_partial(): xfer 255 bytes usb-storage: usb_stor_bulk_msg() returned 0 xferred 42/255 usb-storage: Bulk data transfer result 0x1 usb-storage: Attempting to get CSW... usb-storage: clearing endpoint halt for pipe 0xc0008380 usb-storage: usb_stor_clear_halt: result=-32 <-------- usb_stor_clear_halt usb-storage: Attempting to get CSW (2nd try)... usb-storage: clearing halt for pipe 0xc0008380 usb-storage: usb_stor_clear_halt: result=-32 usb-storage: -- transport indicates error, resetting usb-storage: Bulk reset requested usb-storage: Bulk soft reset failed -32 <----- Bulk soft reset faile usb-storage: scsi cmd done, result=0x70000 usb-storage: *** thread sleeping. usb-storage: queuecommand() called usb-storage: *** thread awakened. usb-storage: Command INQUIRY (6 bytes) usb-storage: 12 00 00 00 ff 00 1d c0 18 4c ef c1 usb-storage: Bulk command S 0x43425355 T 0x12 Trg 0 LUN 0 L 255 F 128 CL 12 usb-storage: command_abort() called usb-storage: Bulk command transfer result=-104 <------ Bulk command transfer usb-storage: -- transport indicates error, resetting usb-storage: Bulk reset requested usb-storage: Bulk soft reset failed -32 <----- Bulk soft reset faile usb-storage: scsi cmd done, result=0x70000 usb-storage: *** thread sleeping. This is DEBUG out without GetMaxLUN. usb-storage: act_altsettting is 0 usb-storage: id_index calculated to be: 79 usb-storage: Array length appears to be: 100 usb-storage: Vendor: MATSHITA usb-storage: Product: KME CD-ROM11 usb-storage: USB Mass Storage device detected usb-storage: Endpoints: In: 0xc1822ba0 Out: 0xc1822bb4 Int: 0x00000000 (Period 0) usb-storage: New GUID 04da0d010000000000000008 usb-storage: Transport: Bulk usb-storage: Protocol: 8020i usb-storage: *** thread sleeping. scsi0 : SCSI emulation for USB Mass Storage devices usb-storage: queuecommand() called usb-storage: *** thread awakened. usb-storage: Command INQUIRY (6 bytes) usb-storage: 12 00 00 00 ff 00 1d c0 18 4c ef c1 usb-storage: Bulk command S 0x43425355 T 0x9 Trg 0 LUN 0 L 255 F 128 CL 12 usb-storage: Bulk command transfer result=0 usb-storage: usb_stor_transfer_partial(): xfer 255 bytes usb-storage: usb_stor_bulk_msg() returned 0 xferred 42/255 usb-storage: Bulk data transfer result 0x1 usb-storage: Attempting to get CSW... usb-storage: clearing endpoint halt for pipe 0xc0008380 usb-storage: usb_stor_clear_halt: result=0 usb-storage: Attempting to get CSW (2nd try)... usb-storage: Bulk status result = 0 usb-storage: Bulk status Sig 0x53425355 T 0x9 R 213 Stat 0x0 usb-storage: Fixing INQUIRY data to show SCSI rev 2 usb-storage: scsi cmd done, result=0x0 usb-storage: *** thread sleeping. Vendor: MATSHITA Model: KME CD-ROM11 Rev: 1.03 Type: CD-ROM ANSI SCSI revision: 02 usb-storage: queuecommand() called And, read and write completely work, (write for KXL-RW11 only). In Japan, many IHV use these CDROMs for very compact laptops as purity product. E.X. Panasonic / Hitachi / Fuhitsu / Casio / Toshiba.... -- GO! > > Matt > > On Sun, Mar 02, 2003 at 03:46:27AM +0900, Go Taniguchi wrote: > >>Hi, >> >>This is status and patch of Panasonic compact USB CDROMs on 2.4.21pre4. >>* KXL-840(CD-ROM11): usb_stor_Bulk_max_lun() is danger, need US_FL_SINGLE_LUN >>* KXL-RW11(CDRRW02): usb_stor_Bulk_max_lun() is danger, need US_FL_SINGLE_LUN >>* KXL-RW20(CDRRW03): original IClass is 0xFF, use US_PR_CB and need init reset >>* KXL-RW21(CDRRW06): original IClass is 0xFF, use US_PR_CB and need init reset >>* KXL-RW31(CDRRW05): work fine with current code >>* KXL-RW32(CDRRW09): work fine with current code >> >>-- GO! > > >>diff -urN linux/drivers/usb/storage.orig/unusual_devs.h >>linux/drivers/usb/storage/unusual_devs.h >>--- linux/drivers/usb/storage.orig/unusual_devs.h 2003-02-07 10:16:07.000000000 >>+0900 >>+++ linux/drivers/usb/storage/unusual_devs.h 2003-02-09 11:28:46.000000000 +0900 >>@@ -579,3 +579,31 @@ >> US_SC_SCSI, US_PR_SDDR55, NULL, >> US_FL_SINGLE_LUN), >> #endif >>+ >>+/* >>+ * Panasonic/OEMs compact USB CDROMs status >>+ * KXL-840(CD-ROM11): usb_stor_Bulk_max_lun() is danger, need US_FL_SINGLE_LUN >>+ * KXL-RW11(CDRRW02): usb_stor_Bulk_max_lun() is danger, need US_FL_SINGLE_LUN >>+ * KXL-RW20(CDRRW03): original IClass is 0xFF, use US_PR_CB and need init reset >>+ * KXL-RW21(CDRRW06): original IClass is 0xFF, use US_PR_CB and need init reset >>+ * KXL-RW31(CDRRW05): work fine with current code >>+ * KXL-RW32(CDRRW09): work fine with current code >>+ * Checked: Sun Feb 9 JST 2003 Go Taniguchi <[EMAIL PROTECTED]> >>+ */ >>+UNUSUAL_DEV( 0x04da, 0x0d01, 0x0000, 0xffff, >>+ "MATSHITA", >>+ "CD-ROM11", >>+ US_SC_8020, US_PR_BULK, NULL, US_FL_SINGLE_LUN), >>+UNUSUAL_DEV( 0x04da, 0x0d02, 0x0000, 0xffff, >>+ "MATSHITA", >>+ "CDRRW02", >>+ US_SC_8020, US_PR_BULK, NULL, US_FL_SINGLE_LUN), >>+UNUSUAL_DEV( 0x04da, 0x0d03, 0x0000, 0xffff, >>+ "MATSHITA", >>+ "CDRRW03", >>+ US_SC_8020, US_PR_CB, NULL, US_FL_INIT_RESET), >>+UNUSUAL_DEV( 0x04da, 0x0d06, 0x0000, 0xffff, >>+ "MATSHITA", >>+ "CDRRW06", >>+ US_SC_8020, US_PR_CB, NULL, US_FL_INIT_RESET), >>+ >>diff -urN linux/drivers/usb/storage.orig/usb.c linux/drivers/usb/storage/usb.c >>--- linux/drivers/usb/storage.orig/usb.c 2002-11-29 08:53:15.000000000 +0900 >>+++ linux/drivers/usb/storage/usb.c 2003-02-09 11:31:21.000000000 +0900 >>@@ -846,7 +846,8 @@ >> ss->transport_name = "Bulk"; >> ss->transport = usb_stor_Bulk_transport; >> ss->transport_reset = usb_stor_Bulk_reset; >>- ss->max_lun = usb_stor_Bulk_max_lun(ss); >>+ if (!(ss->flags & US_FL_SINGLE_LUN)) >>+ ss->max_lun = usb_stor_Bulk_max_lun(ss); >> break; >> >> #ifdef CONFIG_USB_STORAGE_HP8200e >>@@ -1025,6 +1026,11 @@ >> >> /* now register - our detect function will be called */ >> ss->htmplt.module = THIS_MODULE; >>+ >>+ /* some device need reset process */ >>+ if (ss->flags & US_FL_INIT_RESET) >>+ ss->transport_reset(ss); >>+ >> scsi_register_module(MODULE_SCSI_HA, &(ss->htmplt)); >> >> /* lock access to the data structures */ >>diff -urN linux/drivers/usb/storage.orig/usb.h linux/drivers/usb/storage/usb.h >>--- linux/drivers/usb/storage.orig/usb.h 2003-02-07 10:16:07.000000000 +0900 >>+++ linux/drivers/usb/storage/usb.h 2003-02-09 11:29:08.000000000 +0900 >>@@ -101,6 +101,7 @@ >> #define US_FL_IGNORE_SER 0x00000010 /* Ignore the serial number given */ >> #define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */ >> #define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs fixing */ >>+#define US_FL_INIT_RESET 0x00000080 /* reset process when initialize */ >> >> #define USB_STOR_STRING_LEN 32 >> > > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
