Matt,
by applying this patch your would save many _users_ of this device from big trouble !

Linux usually has a good track to include workarounds for buggy hard- & firmware
for the benefit of it's users. Even the usb subsystem has quite some quirkses,
which would not be necessary if vendors sold perfect and standard conforming products.

But this is not so; if we can support the product with a workaround (sometimes printk'ing the fact)
there is no reason to force return the product or force users to update; more so if the update is not easily
available as on this case.

The patch does not harm other usb devices, so it is _not_ at all fundamentally dangerous.
It just switches off a specific check for a certain device. Note this is not even dangerous
for this device, as a systematic data corruption would show equally as other errors.

So it would be nice ro reconsider your attitude on this problem or explain what would
be needed to accept that patch.

Gunther

P.S.
As you might see, this problem persists since 16 months now, I just looked up my fix
-rw-r--r-- 1 root root 1644 Jul 21 2001 gmdiff//gmdiff-246ac1-usbide-scanlogic_quirks_tag
The fixes come up here regularly and always look very similar.

P.P.S.
This device shows a serious bug in the usb storage or scsi code !
The error handling is very broken as the kernel does not return with IO error,
but hangs the processes in D state.


Matthew Dharm wrote:

The update is there, somewhere. Contact Cypress directly if you need it.

The patch will probably not go in. I've commented on this before -- the
patch is fundamentally dangerous. Tho, this version was the best I had
ever seen.

Matt

On Sun, Oct 27, 2002 at 01:11:29PM +0100, Christian Mahr wrote:

Dear Matthe, dear all


again on the "Argosy HF530" Hard disk enclosure.
I did not find any firmware update for thies device neither at "argosy" not at cypress which
seem to have bought scanlogic.
What I found was a old patch from Peter Waechtler and Rene Engelhard which I adapted to
2.4.20-pre11.

The main thing is that the "bcs->Tag" does not appear to be correct in the communication.
If you ignore the variable for this specific device, everything works fine.

Is there somebody out who can qualify this patch to be integrated into the main development
stream?

Yours
Christian


------------------ patch for Argosy HD 530 -----------------------

--- ./drivers/usb/storage/usb.h.org Sat Oct 26 15:00:20 2002
+++ ./drivers/usb/storage/usb.h Sat Oct 26 15:01:35 2002
@@ -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_SL_IDE_BUG 0x00000100 /* Scanlogic usb-ide workaround */

#define USB_STOR_STRING_LEN 32

--- ./drivers/usb/storage/usb.c.org Fri Oct 25 00:14:24 2002
+++ ./drivers/usb/storage/usb.c Fri Oct 25 00:14:49 2002
@@ -468,7 +468,12 @@
US_DEBUGP("scsi cmd done, result=0x%x\n",
us->srb->result);
set_current_state(TASK_INTERRUPTIBLE);
- us->srb->scsi_done(us->srb);
+/*05-Apr-02 cm*/
+ if (us->srb->scsi_done)
+ us->srb->scsi_done(us->srb);
+ US_DEBUGP("scsi_done() called\n");
+ if (us->srb->result == DID_ERROR << 16) /* scsi_abort may wait here */
+ complete(&(us->notify));
} else {
US_DEBUGP("scsi command aborted\n");
set_current_state(TASK_INTERRUPTIBLE);
--- ./drivers/usb/storage/unusual_devs.h.org Fri Oct 25 00:41:13 2002
+++ ./drivers/usb/storage/unusual_devs.h Sat Oct 26 17:46:42 2002
@@ -111,6 +111,17 @@
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY),

+/* reported by Christian Mahr <[EMAIL PROTECTED]>
+ * works on "Argosy HD530" harddisk enclosure.
+ */
+UNUSUAL_DEV( 0x04ce, 0x0002, 0x0260, 0x0260,
+ "USB to IDE",
+ "USB to IDE",
+ US_SC_SCSI, US_PR_BULK, NULL,
+ US_FL_FIX_INQUIRY | US_FL_SL_IDE_BUG),
+
+
+
/* Reported by Kriston Fincher <[EMAIL PROTECTED]>
* Patch submitted by Sean Millichamp <[EMAIL PROTECTED]>
* This is to support the Panasonic PalmCam PV-SD4090
--- ./drivers/usb/storage/transport.c.org Sat Oct 26 15:04:28 2002
+++ ./drivers/usb/storage/transport.c Sat Oct 26 15:08:51 2002
@@ -1234,7 +1234,7 @@
le32_to_cpu(bcs->Signature), bcs->Tag,
bcs->Residue, bcs->Status);
if (bcs->Signature != cpu_to_le32(US_BULK_CS_SIGN) ||
- bcs->Tag != bcb->Tag ||
+ ( (bcs->Tag != bcb->Tag) && (!(us->flags & US_FL_SL_IDE_BUG)) ) ||
bcs->Status > US_BULK_STAT_PHASE || partial != 13) {
US_DEBUGP("Bulk logical error\n");
ret = USB_STOR_TRANSPORT_ERROR;



-------------------

Matthew Dharm schrieb:


You need the firmware update which (I'm told) is located on the ScanLogic
web site.

Matt

On Thu, Oct 24, 2002 at 11:53:08PM +0200, Christian Mahr wrote:

Hi David, Hi all,


I applied the patch usb-ehci-2.4.20-pre11.patch recommend by david to 2.4.20-pre11, but not
with much luck:

I connect a "Argosy HD530 disc enclosure" with a standard 2.5 inch drive. Host is NEC-type
After connecting the drive I observe 2 process to be in "D" and "DW" state:

2412 ? S 0:00 /bin/bash /etc/hotplug/usb.agent
2413 ? S 0:00 logger -t /etc/hotplug/usb.agent[2402]
2430 ? D 0:00 /sbin/modprobe -vs usb-storage
2431 ? SW 0:00 [usb-storage-0]
2432 ? DW 0:00 [scsi_eh_1]

The drive does not show up in /proc/scsi/scsi:

Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: Model: Rev:
Type: <NULL> ANSI SCSI revision: ffffffff

and "usbview" becomes stuck. Only rebooting does resolve the issue.

The /var/log/messages is at the bottom:

One strange observation:

The drive has the code 04CE/0002 and shows as "USB to IDE"/"USB to IDE" whereas the file
unusual_dev.h tells:
UNUSUAL_DEV( 0x04ce, 0x0002, 0x0074, 0x0074,
"ScanLogic",
"SL11R-IDE",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY),

this sounds strange to me...

Any hints what I can try?

Regards
Christian

------------------/var/log/messages----------------------------------
Oct 24 23:34:41 Mahrmaid syslogd 1.4.1: restart.
Oct 24 23:35:31 Mahrmaid kernel: hub.c: port 1, portstatus 100, change 0, 12 Mb/s
Oct 24 23:35:31 Mahrmaid kernel: ehci-hub.c: GetStatus port 2 status 001803 POWER sig=j
CSC CONNECT
Oct 24 23:35:31 Mahrmaid kernel: hub.c: port 2, portstatus 501, change 1, 480 Mb/s
Oct 24 23:35:31 Mahrmaid kernel: hub.c: port 2 connection change
Oct 24 23:35:31 Mahrmaid kernel: hub.c: port 2, portstatus 501, change 1, 480 Mb/s
Oct 24 23:35:31 Mahrmaid kernel: klogd 1.4.1, -------
-- state change ----------
Oct 24 23:35:31 Mahrmaid kernel: Inspecting /boot/System.map
Oct 24 23:35:32 Mahrmaid kernel: Symbol table has incorrect version number.
Oct 24 23:35:32 Mahrmaid kernel: Cannot find map file.
Oct 24 23:35:32 Mahrmaid kernel: Loaded 1131 symbols from 56 modules.
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 2, portstatus 501, change 0, 480 Mb/s
Oct 24 23:35:32 Mahrmaid last message repeated 3 times
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 2, portstatus 511, change 0, 480 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 2 of hub 1 not reset yet, waiting 10ms
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 2, portstatus 511, change 0, 480 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 2 of hub 1 not reset yet, waiting 10ms
Oct 24 23:35:32 Mahrmaid kernel: ehci-hub.c: 00:12.2 port 2 full speed, give to companion,
0x1801
Oct 24 23:35:32 Mahrmaid kernel: ehci-hub.c: GetStatus port 2 status 003801 POWER OWNER
sig=j CONNECT
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 2, portstatus 0, change 10, 12 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: ehci-hcd.c: 00:12.2: free_config devnum 0
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 3, portstatus 100, change 0, 12 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 4, portstatus 100, change 0, 12 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 5, portstatus 100, change 0, 12 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 1, portstatus 101, change 1, 12 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 1 connection change
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 1, portstatus 101, change 1, 12 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 1, portstatus 101, change 0, 12 Mb/s
Oct 24 23:35:32 Mahrmaid last message repeated 3 times
Oct 24 23:35:32 Mahrmaid kernel: hub.c: port 1, portstatus 103, change 10, 12 Mb/s
Oct 24 23:35:32 Mahrmaid kernel: hub.c: new USB device 00:12.1-1, assigned address 2
Oct 24 23:35:32 Mahrmaid kernel: usb.c: kmalloc IF c48d59c0, numif 1
Oct 24 23:35:32 Mahrmaid kernel: usb.c: new device strings: Mfr=1, Product=1,
SerialNumber=0
Oct 24 23:35:32 Mahrmaid kernel: usb.c: USB device number 2 default language ID 0x409
Oct 24 23:35:32 Mahrmaid kernel: Manufacturer: USB to IDE
Oct 24 23:35:32 Mahrmaid kernel: Product: USB to IDE
Oct 24 23:35:32 Mahrmaid kernel: usb.c: unhandled interfaces on device
Oct 24 23:35:32 Mahrmaid kernel: usb.c: USB device 2 (vend/prod 0x4ce/0x2) is not claimed
by any active driver.
Oct 24 23:35:32 Mahrmaid kernel: Length = 18
Oct 24 23:35:32 Mahrmaid kernel: DescriptorType = 01
Oct 24 23:35:32 Mahrmaid kernel: USB version = 1.10
Oct 24 23:35:32 Mahrmaid kernel: Vendor:Product = 04ce:0002
Oct 24 23:35:32 Mahrmaid kernel: MaxPacketSize0 = 8
Oct 24 23:35:32 Mahrmaid kernel: NumConfigurations = 1
Oct 24 23:35:32 Mahrmaid kernel: Device version = 2.60
Oct 24 23:35:32 Mahrmaid kernel: Device Class:SubClass:Protocol = 00:00:00
Oct 24 23:35:32 Mahrmaid kernel: Per-interface classes
Oct 24 23:35:32 Mahrmaid kernel: Configuration:
Oct 24 23:35:32 Mahrmaid kernel: bLength = 9
Oct 24 23:35:32 Mahrmaid kernel: bDescriptorType = 02
Oct 24 23:35:32 Mahrmaid kernel: wTotalLength = 0020
Oct 24 23:35:32 Mahrmaid kernel: bNumInterfaces = 01
Oct 24 23:35:32 Mahrmaid kernel: bConfigurationValue = 01
Oct 24 23:35:32 Mahrmaid kernel: iConfiguration = 00
Oct 24 23:35:32 Mahrmaid kernel: bmAttributes = 40
Oct 24 23:35:32 Mahrmaid kernel: MaxPower = 0mA
Oct 24 23:35:32 Mahrmaid kernel:
Oct 24 23:35:32 Mahrmaid kernel: Interface: 0
Oct 24 23:35:32 Mahrmaid kernel: Alternate Setting: 0
Oct 24 23:35:32 Mahrmaid kernel: bLength = 9
Oct 24 23:35:32 Mahrmaid kernel: bDescriptorType = 04
Oct 24 23:35:32 Mahrmaid kernel: bInterfaceNumber = 00
Oct 24 23:35:32 Mahrmaid kernel: bAlternateSetting = 00
Oct 24 23:35:32 Mahrmaid kernel: bNumEndpoints = 02
Oct 24 23:35:32 Mahrmaid kernel: bInterface Class:SubClass:Protocol = 08:06:50
Oct 24 23:35:32 Mahrmaid kernel: iInterface = 00
Oct 24 23:35:32 Mahrmaid kernel: Endpoint:
Oct 24 23:35:32 Mahrmaid kernel: bLength = 7
Oct 24 23:35:32 Mahrmaid kernel: bDescriptorType = 05
Oct 24 23:35:32 Mahrmaid kernel: bEndpointAddress = 02 (out)
Oct 24 23:35:33 Mahrmaid kernel: bmAttributes = 02 (Bulk)
Oct 24 23:35:33 Mahrmaid kernel: wMaxPacketSize = 0040
Oct 24 23:35:33 Mahrmaid kernel: bInterval = 00
Oct 24 23:35:33 Mahrmaid kernel: Endpoint:
Oct 24 23:35:33 Mahrmaid kernel: bLength = 7
Oct 24 23:35:33 Mahrmaid kernel: bDescriptorType = 05
Oct 24 23:35:33 Mahrmaid kernel: bEndpointAddress = 81 (in)
Oct 24 23:35:33 Mahrmaid kernel: bmAttributes = 02 (Bulk)
Oct 24 23:35:33 Mahrmaid kernel: wMaxPacketSize = 0040
Oct 24 23:35:33 Mahrmaid kernel: bInterval = 00
Oct 24 23:35:33 Mahrmaid kernel: usb.c: kusbd: /sbin/hotplug add 2
Oct 24 23:35:33 Mahrmaid kernel: hub.c: port 2, portstatus 100, change 0, 12 Mb/s
Oct 24 23:35:33 Mahrmaid kernel: Initializing USB Mass Storage driver...
Oct 24 23:35:33 Mahrmaid kernel: usb.c: registered new driver usb-storage
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: act_altsettting is 0
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: id_index calculated to be: 89
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Array length appears to be: 91
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: USB Mass Storage device detected
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Endpoints: In: 0xc55c2734 Out: 0xc55c2720
Int: 0x00000000 (Period 0)
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: New GUID 04ce00020000000000000000
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: GetMaxLUN command result is 1, data is 0
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Transport: Bulk
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Protocol: Transparent SCSI
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: *** thread sleeping.
Oct 24 23:35:33 Mahrmaid kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: queuecommand() called
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: *** thread awakened.
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Command INQUIRY (6 bytes)
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: 12 00 00 00 ff 00 00 00 28 08 00 00
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Bulk command S 0x43425355 T 0x6a Trg 0 LUN 0
L 255 F 128 CL 6
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Bulk command transfer result=0
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: usb_stor_transfer_partial(): xfer 255 bytes
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: usb_stor_bulk_msg() returned 0 xferred
255/255
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: usb_stor_transfer_partial(): transfer
complete
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Bulk data transfer result 0x0
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Attempting to get CSW...
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Bulk status result = 0
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Bulk status Sig 0x53425355 T 0xff0158 R 0
Stat 0x0
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Bulk logical error
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: -- transport indicates error, resetting
Oct 24 23:35:33 Mahrmaid kernel: usb-storage: Bulk reset requested
Oct 24 23:35:39 Mahrmaid kernel: usb-storage: command_abort() called
Oct 24 23:35:39 Mahrmaid kernel: usb-storage: usb_stor_clear_halt: result=0
Oct 24 23:35:39 Mahrmaid kernel: usb-storage: usb_stor_clear_halt: result=0
Oct 24 23:35:39 Mahrmaid kernel: usb-storage: Bulk soft reset completed
Oct 24 23:35:39 Mahrmaid kernel: usb-storage: scsi cmd done, result=0x70000
Oct 24 23:35:39 Mahrmaid kernel: usb-storage: *** thread sleeping.






David Brownell schrieb:


Sorry I forgot to name

kernel 2.4.19-pre11

and the USB port:

"NEC corporation USB 2.0"

In that case upgrade your kernel and try this patch:

http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.4/usb-ehci-2.4.20-pre11.patch

It might very well solve your problem.

- Dave

-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

--
Christian Mahr (privat) [EMAIL PROTECTED]












-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver

Da. Am thinkink of carbonated borscht for lonk nights of coding.
-- Pitr
User Friendly, 7/24/1998

------------------------------------------------------------------------
Part 1.2Type: application/pgp-signature

--
Christian Mahr (privat) [EMAIL PROTECTED]







-------------------------------------------------------
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

Reply via email to