Skip to contentSkip to conversation

usb-storage fails to detect all luns after 2.4.19

DISCUSSION Oliver Graf 1 participant 2 messages Feb 20, 2003 – Feb 26, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi!

I've already mentioned this some time ago.

The problem: a multi device usb card reader is correctly detected with its four subdevices with kernel 2.4.19(-acX). But any patch after this fails to detect the subdevices.

Verbose output with 2.4.19-ac4 shows:
usb-storage: GetMaxLUN command result is 1, data is 3

2.4.21-pre4 gives:
usb-storage: GetMaxLUN command result is -32, data is 128
usb-storage: clearing endpoint halt for pipe 0x80000880

I tried to find the parts that changed between the version, but it seems not to be rooted in usb-storage.

The call to usb_control_msg seems to timeout with the newer kernel (just a wild guess!).

Finally I did a desparate modification: I return 3 from usb_stor_Bulk_max_lun just before the endpoint is cleared. This got my card reader up and running again, but it's very very dirty und certainly breaks other usb storage devices (I don't own).

Anyone out there who knows the usb stuff better?

Regards,
Oliver.

#1 lore raw

Hi!

Quoted 11 lines · Oliver Graf

The problem: a multi device usb card reader is correctly detected with its four subdevices with kernel 2.4.19(-acX). But any patch after this fails to detect the subdevices.

Verbose output with 2.4.19-ac4 shows:
usb-storage: GetMaxLUN command result is 1, data is 3

2.4.21-pre4 gives:
usb-storage: GetMaxLUN command result is -32, data is 128
usb-storage: clearing endpoint halt for pipe 0x80000880

Quoted 5 lines

I tried to find the parts that changed between the version, but it seems not to be rooted in usb-storage.

The call to usb_control_msg seems to timeout with the newer kernel (just a wild guess!).

It is a timeout:
usb-storage: New GUID 04831307fffe9ffffffffe97 usb-uhci.c: interrupt, status 2, frame# 1765 usb_control/bulk_msg: timeout
usb-storage: GetMaxLUN command result is -110, data is 128

Quoted 4 lines

Finally I did a desparate modification: I return 3 from usb_stor_Bulk_max_lun just before the endpoint is cleared. This got my card reader up and running again, but it's very very dirty und certainly breaks other usb storage devices (I don't own).

A patch which defines a new unusual_dev is appended. But it's still dirty, cause it sets max_lun to 3 for this device. It should be seen as a workaround not as something that should go into the kernel.

If someone more elaborate needs more debug output to find the real problem, feel free to contact me.

Regards,
Oliver.

drivers/usb/storage/transport.h renamed from drivers/usb/storage/transport.h.orig +2 -0
@@ -75,6 +75,8 @@
 #define US_PR_JUMPSHOT  0xf3            /* Lexar Jumpshot */
 #endif
 
+#define US_PR_TEV6IN1   0xf4
+
 /*
  * Bulk only data structures
  */
drivers/usb/storage/unusual_devs.h renamed from drivers/usb/storage/unusual_devs.h.orig +6 -0
@@ -90,6 +90,12 @@
 		"Nex II Digital",
 		US_SC_SCSI, US_PR_BULK, NULL, US_FL_START_STOP),
 
+/* Hack for the Tevion Card Reader 6in1 by Oliver Graf <[email protected]> */
+UNUSUAL_DEV(  0x0483, 0x1307, 0x0000, 0x9999,
+		"Tevion",
+		"Card Reader 6in1",
+		US_SC_SCSI, US_PR_TEV6IN1, NULL, 0),
+
 /* Reported by Paul Stewart <[email protected]>
  * This entry is needed because the device reports Sub=ff */
 UNUSUAL_DEV(  0x04a4, 0x0004, 0x0001, 0x0001,
drivers/usb/storage/usb.c renamed from drivers/usb/storage/usb.c.orig +7 -0
@@ -849,6 +849,13 @@
 			ss->max_lun = usb_stor_Bulk_max_lun(ss);
 			break;
 
+		case US_PR_TEV6IN1:
+			ss->transport_name = "Bulk";
+			ss->transport = usb_stor_Bulk_transport;
+			ss->transport_reset = usb_stor_Bulk_reset;
+			ss->max_lun = 3;
+			break;
+
 #ifdef CONFIG_USB_STORAGE_HP8200e
 		case US_PR_SCM_ATAPI:
 			ss->transport_name = "SCM/ATAPI";