* [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
@ 2002-01-07 20:17 Rene Engelhard
2002-01-08 12:21 ` Peter Wächtler
2002-01-10 18:20 ` root
0 siblings, 2 replies; 8+ messages in thread
From: Rene Engelhard @ 2002-01-07 20:17 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
Hi Greg, hi Kernel-Hackers,
a long time ago I bought the Adapter mentioned above and got it
working.
Now, 6 months after that I bought it, my testing is over and I got the
result: The device is working by changing the usb-storage sources; this
has not affected any other thing. All my devices (3 of USB) runs perfectly.
So I send you this patch.
It's against 2.5.2-pre9 and the patch from Alan with the comment that
you need SCSI Support is applied in my tree, so this is needed before
applying this patch (but I saw you did it Greg, you can do this)
Because of testing this patch 6 months, I do not consider to say that
this patch is experimental, so I did not write $CONFIG_EXPERIMENTAL at
the end of the dep_mbool statement.
I have attached it to this mail.
Rene
[-- Attachment #2: Patch for USB-IDE bridge from ScanLogic --]
[-- Type: text/plain, Size: 2987 bytes --]
diff -urN linux/Documentation/Configure.help linux.new/Documentation/Configure.help
--- linux/Documentation/Configure.help Mon Jan 7 19:29:56 2002
+++ linux.new/Documentation/Configure.help Mon Jan 7 19:20:24 2002
@@ -13492,6 +13492,16 @@
Support for the Freecom USB to IDE/ATAPI adaptor.
Freecom has a web page at <http://www.freecom.de/>.
+ScanLogic USB-ATAPI Bridge support
+CONFIG_USB_STORAGE_SCANLOGIC
+ Support for the ScanLogic USB to IDE/ATAPI adapter.
+ For german people: This is the adapter shipped from ATELCO.
+ For details, see
+ http://plichta.cs.uni-dortmund.de/~rene/linux/kernel/patches/scanlogic/
+ and http://www.qbik.ch/usb/devices/showdev.php?id=491
+
+ Say Y here if you have this device, otherwise say N.
+
Microtech CompactFlash/SmartMedia reader
CONFIG_USB_STORAGE_DPCM
Say Y here to support the Microtech ZiO! CompactFlash/SmartMedia
diff -urN linux/drivers/usb/Config.in linux.new/drivers/usb/Config.in
--- linux/drivers/usb/Config.in Mon Jan 7 21:05:10 2002
+++ linux.new/drivers/usb/Config.in Mon Jan 7 20:40:32 2002
@@ -38,6 +38,7 @@
else
dep_tristate ' USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
dep_mbool ' USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE
+ dep_mbool ' ScanLogic USB/ATAPI bridge' CONFIG_USB_STORAGE_SCANLOGIC $CONFIG_USB_STORAGE
dep_mbool ' Datafab MDCFE-B Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
dep_mbool ' Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM $CONFIG_USB_STORAGE
dep_mbool ' ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE
diff -urN linux/drivers/usb/storage/transport.c linux.new/drivers/usb/storage/transport.c
--- linux/drivers/usb/storage/transport.c Mon Jan 7 19:29:58 2002
+++ linux.new/drivers/usb/storage/transport.c Mon Jan 7 20:39:30 2002
@@ -1157,7 +1157,12 @@
le32_to_cpu(bcs.Signature), bcs.Tag,
bcs.Residue, bcs.Status);
if (bcs.Signature != cpu_to_le32(US_BULK_CS_SIGN) ||
+#ifndef CONFIG_USB_STORAGE_SCANLOGIC
+ /* This device has a bug how it communicates via USB,
+ * if the following line is not included, the the device
+ * runs */
bcs.Tag != bcb.Tag ||
+#endif
bcs.Status > US_BULK_STAT_PHASE || partial != 13) {
US_DEBUGP("Bulk logical error\n");
return USB_STOR_TRANSPORT_ERROR;
diff -urN linux/drivers/usb/storage/unusual_devs.h linux.new/drivers/usb/storage/unusual_devs.h
--- linux/drivers/usb/storage/unusual_devs.h Mon Jan 7 19:29:58 2002
+++ linux.new/drivers/usb/storage/unusual_devs.h Mon Jan 7 21:11:19 2002
@@ -37,6 +37,13 @@
* then by ProductID.
*/
+#ifdef CONFIG_USB_STORAGE_SCANLOGIC
+UNUSUAL_DEV( 0x04ce, 0x0002, 0x0000, 0x0200,
+ "ScanLogic Corp.",
+ "USB to IDE",
+ US_SC_8020, US_PR_BULK, NULL, 0),
+
+#endif
UNUSUAL_DEV( 0x03ee, 0x0000, 0x0000, 0x0245,
"Mitsumi",
"CD-R/RW Drive",
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
@ 2002-01-07 20:47 Leif Sawyer
2002-01-07 21:16 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Leif Sawyer @ 2002-01-07 20:47 UTC (permalink / raw)
To: Rene Engelhard, Greg KH; +Cc: linux-kernel, linux-usb-devel
Rene,
I think that while this patch may work for you, it's not the right way
to go about it.
Instead of changing the source for all devices that use transport.c,
you should create a flag (see usb.h), say US_FL_SLIDE_BUG, and set
it within the definition in unusual_devs.h
Then the logic in transport.c can check for that flag and work around
the bug as needed -- as not all storage devices will require that
workaround.
I'm in the process of recompiling my 2.5.2-pre9 kernel with the above
workaround to see if it solves my issues as well. Unfortunately, my
device is at home, and I'm at work. I'll post later tonight or tomorrow
morning my results.
Greg? Your opinions on the right way to work this?
> -----Original Message-----
> From: Rene Engelhard [mailto:mail@rene-engelhard.de]
> Sent: Monday, January 07, 2002 11:18 AM
> To: Greg KH
> Cc: linux-kernel@vger.kernel.org
> Subject: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
>
>
> Hi Greg, hi Kernel-Hackers,
>
> a long time ago I bought the Adapter mentioned above and got it
> working.
>
> Now, 6 months after that I bought it, my testing is over and I got the
> result: The device is working by changing the usb-storage
> sources; this
> has not affected any other thing. All my devices (3 of USB)
> runs perfectly.
>
> So I send you this patch.
>
> It's against 2.5.2-pre9 and the patch from Alan with the comment that
> you need SCSI Support is applied in my tree, so this is needed before
> applying this patch (but I saw you did it Greg, you can do this)
>
> Because of testing this patch 6 months, I do not consider to say that
> this patch is experimental, so I did not write $CONFIG_EXPERIMENTAL at
> the end of the dep_mbool statement.
>
> I have attached it to this mail.
>
> Rene
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
2002-01-07 20:47 [PATCH] Getting ScanLogic USB-ATAPI Adapter to work Leif Sawyer
@ 2002-01-07 21:16 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2002-01-07 21:16 UTC (permalink / raw)
To: Leif Sawyer; +Cc: Rene Engelhard, linux-kernel, linux-usb-devel
On Mon, Jan 07, 2002 at 11:47:46AM -0900, Leif Sawyer wrote:
>
> Greg? Your opinions on the right way to work this?
Actually Matt is the right one to solicit opinions on this issue, as
he's the maintainer for this chunk of code and will have to live with
the patch :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
2002-01-07 20:17 Rene Engelhard
@ 2002-01-08 12:21 ` Peter Wächtler
2002-01-08 16:58 ` Rene Engelhard
2002-01-10 18:20 ` root
1 sibling, 1 reply; 8+ messages in thread
From: Peter Wächtler @ 2002-01-08 12:21 UTC (permalink / raw)
To: Rene Engelhard; +Cc: Greg KH, linux-kernel
Rene Engelhard schrieb:
>
> Hi Greg, hi Kernel-Hackers,
>
> a long time ago I bought the Adapter mentioned above and got it
> working.
>
> Now, 6 months after that I bought it, my testing is over and I got the
> result: The device is working by changing the usb-storage sources; this
> has not affected any other thing. All my devices (3 of USB) runs perfectly.
>
> So I send you this patch.
>
> It's against 2.5.2-pre9 and the patch from Alan with the comment that
> you need SCSI Support is applied in my tree, so this is needed before
> applying this patch (but I saw you did it Greg, you can do this)
>
> Because of testing this patch 6 months, I do not consider to say that
> this patch is experimental, so I did not write $CONFIG_EXPERIMENTAL at
> the end of the dep_mbool statement.
>
I sent a patch to unusual_devs.h but didn't get any response yet.
I need to set "CONFIG_SCSI_MULTI_LUN=y" and use the second device for
CompactFlash.
No other needed change here:
UNUSUAL_DEV( 0x04ce, 0x0002, 0x0074, 0x0074,
"ScanLogic",
"SL11R-IDE",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY),
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
2002-01-08 12:21 ` Peter Wächtler
@ 2002-01-08 16:58 ` Rene Engelhard
0 siblings, 0 replies; 8+ messages in thread
From: Rene Engelhard @ 2002-01-08 16:58 UTC (permalink / raw)
To: Peter Wächtler; +Cc: Greg KH, linux-kernel
Peter Wächtler wrote:
>
> I sent a patch to unusual_devs.h but didn't get any response yet.
> I need to set "CONFIG_SCSI_MULTI_LUN=y" and use the second device for
> CompactFlash.
> No other needed change here:
>
>
> UNUSUAL_DEV( 0x04ce, 0x0002, 0x0074, 0x0074,
> "ScanLogic",
> "SL11R-IDE",
> US_SC_SCSI, US_PR_BULK, NULL,
> US_FL_FIX_INQUIRY),
Yes, I saw it in the unusual_devs.h in 2.5.2-pre8 and above but it
does not help to get my mentioned device working.
My patch does.
Rene
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
2002-01-07 20:17 Rene Engelhard
2002-01-08 12:21 ` Peter Wächtler
@ 2002-01-10 18:20 ` root
2002-01-10 19:08 ` Leif Sawyer
1 sibling, 1 reply; 8+ messages in thread
From: root @ 2002-01-10 18:20 UTC (permalink / raw)
To: Rene Engelhard; +Cc: Greg KH, linux-kernel
Rene Engelhard wrote:
> Hi Greg, hi Kernel-Hackers,
>
> a long time ago I bought the Adapter mentioned above and got it
> working.
>
> Now, 6 months after that I bought it, my testing is over and I got the
> result: The device is working by changing the usb-storage sources; this
> has not affected any other thing. All my devices (3 of USB) runs perfectly.
I sent a fool-proof patch to the MAINTAINER 6 (nine!) months before and
discussed this on usb-devel. The MAINTAINER has chosen to reject
this patch (for private discussions whith the manufacturer about standards
comliance) and leave users alone ! Although I proposed to him to disable
all QUIRKS and Worksarounds for buggy hardware in his tree and see if the
system still is running he stayed stubborn. As UNUSUAL_DEVS is quite
large he is inconsequent for no apparent reason.
P.S. Please use this patch:
- Don't bloat Config.in with with unnecessary decisions, just fix the bugger
automatically.
- Be non-intrusive to other devices.
Gunther
--- linux-2.4.6-ac1-orig/drivers/usb/storage/transport.c Wed Apr 18
20:49:12 2001
+++ linux/drivers/usb/storage/transport.c Sat Jul 21 12:18:32 2001
@@ -1180,7 +1180,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_QUIRKS_TAG)) ||
bcs.Status > US_BULK_STAT_PHASE || partial != 13) {
US_DEBUGP("Bulk logical error\n");
return USB_STOR_TRANSPORT_ERROR;
--- linux-2.4.6-ac1-orig/drivers/usb/storage/usb.h Sun Jul 8 19:53:50
2001
+++ linux/drivers/usb/storage/usb.h Sat Jul 21 12:05:15 2001
@@ -100,6 +100,8 @@
#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_QUIRKS_TAG 0x00000080 /* the buggy device doesn't echo the
tag
+ in the status response !*/
#define USB_STOR_STRING_LEN 32
--- linux-2.4.6-ac1-orig/drivers/usb/storage/unusual_devs.h Sun Jul 8
19:53:50 2001
+++ linux/drivers/usb/storage/unusual_devs.h Sat Jul 21 12:06:55 2001
@@ -59,6 +59,12 @@
"FinePix 1400Zoom",
US_SC_8070, US_PR_CBI, NULL, US_FL_FIX_INQUIRY),
+// Firmware 2.60 needs US_FL_QUIRKS_TAG here ! Bugger device.
+UNUSUAL_DEV( 0x04ce, 0x0002, 0x0000, 0x9999,
+ "Scanlogic",
+ "SL11R USBIDE",
+ US_SC_SCSI, US_PR_BULK, NULL, US_FL_QUIRKS_TAG),
+
UNUSUAL_DEV( 0x04e6, 0x0001, 0x0200, 0x0200,
"Matshita",
"LS-120",
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
@ 2002-01-10 19:08 ` Leif Sawyer
2002-01-10 19:16 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Leif Sawyer @ 2002-01-10 19:08 UTC (permalink / raw)
To: Gunther Mayer, Rene Engelhard; +Cc: Greg KH, linux-kernel
gunther.mayer.@.gmx.net writes:
> Rene Engelhard wrote:
>
> > a long time ago I bought the Adapter mentioned above and got it
> > working.
> >
> I sent a fool-proof patch to the MAINTAINER 6 (nine!) months
> before and discussed this on usb-devel. The MAINTAINER has chosen
> to reject this patch (for private discussions whith the manufacturer
> about standards comliance) and leave users alone ! Although I proposed
> to him to disable all QUIRKS and Worksarounds for buggy hardware in his
> tree and see if the system still is running he stayed stubborn. As
> UNUSUAL_DEVS is quite large he is inconsequent for no apparent reason.
>
> P.S. Please use this patch:
> - Don't bloat Config.in with with unnecessary decisions, just
> fix the bugger automatically.
> - Be non-intrusive to other devices.
>
> Gunther
Gunther --
Your patch is out of date. But yesterday I posted practically the
same patch for the workaround using the current kernel defines. This patch
was tested across multiple platforms and devices and shown to work.
(caveat -- one cdrw is still having issues, but that is orthagonal to the
patch)
Also, the unusual_devs.h device definition will not work. See my
patch for the multiple devices and their different requirements.
Your patch would break nearly everybody's equipment.
do not apply gunther's patch, please.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Getting ScanLogic USB-ATAPI Adapter to work
2002-01-10 19:08 ` Leif Sawyer
@ 2002-01-10 19:16 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2002-01-10 19:16 UTC (permalink / raw)
To: Leif Sawyer; +Cc: Gunther Mayer, Rene Engelhard, linux-kernel
On Thu, Jan 10, 2002 at 10:08:21AM -0900, Leif Sawyer wrote:
>
> do not apply gunther's patch, please.
I'm not applying any patch, unless Matt (the usb-storage maintainer)
says it is ok to do so :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-01-10 19:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-07 20:47 [PATCH] Getting ScanLogic USB-ATAPI Adapter to work Leif Sawyer
2002-01-07 21:16 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2002-01-07 20:17 Rene Engelhard
2002-01-08 12:21 ` Peter Wächtler
2002-01-08 16:58 ` Rene Engelhard
2002-01-10 18:20 ` root
2002-01-10 19:08 ` Leif Sawyer
2002-01-10 19:16 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox