[EMAIL PROTECTED] said:
> Hi all,
>       sins I upgraded from 2.4.7 to 2.4.16 my self constructed USB device
> is very slow (~ 25% of the old speed) handled by the kernel. I also
> tested this with 2.4.18 and found no difference.
>       My computers are (a) a laptop with some Intel chipset (usb-uhci) and
> (b) a desktop with some VIA chipsed (usb-ohci). The module i wrote to
> communicate with the device is attached in the archive and does
> basicly only translate IOCTLs into usb_control_msg() calls. My usb
> device does only communicate using the default pipe. The included test
> program (measure_update.c, sorry comments only in German) does only
> read and write 512 bytes from my device and counts the time. The speed
> was only limited by the device. With the 2.4.7 kernel I had about 60
> transfers per second. With 2.4.16 and 2.4.18 this has dropped down to
> 14. 

I saw a performance problem with my Minolta Elite II scanner (never tried it 
on earlier kernels - just 2.4.18 and 19).  Tracked the performance problem 
down to something timing out when the command length was 6.  Once I padded it 
to 10 the performance increased drastically.  Turns out there was some timer 
that would "wait" for 5 seconds before proceeding - so everything would work, 
it would just take a long time.  Never have found the root cause, but attached 
is my kludge.  Would be interested if a similar patch fixes your problem.  
This is against 2.4.18 drivers/usb/hpusbscsi.c  you should be able to modify 
for your module.  The delay showed itself taking 5 seconds in a select
statement when I did an strace (strace -t -T).

bonzo@bonzopad:/usr/src/linux$ cat otto.patch
--- a/drivers/usb/hpusbscsi.c   Sat May 11 22:19:42 2002
+++ b/drivers/usb/hpusbscsi.c   Sat May 11 23:19:57 2002
@@ -309,16 +309,32 @@
        hpusbscsi->state = HP_STATE_BEGINNING;
        TRACE_STATE;
 
+/*FIXME: For some reason the Minolta Elite II has a 5 second delay when the 
+srb->cmd_len=6
+ * so we will pad it to 10 for now and set the length to 10 */
+
+// Begin cmd_len kludge   
+       if (srb->cmd_len < MINURBCMDLEN) {
+              int i;
+
+              for (i = srb->cmd_len; i < MINURBCMDLEN; i++) // Pad the cmnd
+               {
+                  srb->cmnd[i] = '\0';
+               }
+       }
+   
+
        /* We prepare the urb for writing out the scsi command */
        FILL_BULK_URB(
                &hpusbscsi->dataurb,
                hpusbscsi->dev,
                usb_sndbulkpipe(hpusbscsi->dev,hpusbscsi->ep_out),
                srb->cmnd,
-               srb->cmd_len,
+               (((int)srb->cmd_len) < MINURBCMDLEN ? MINURBCMDLEN:  
+((int)srb->cmd_len)), // set length
                usb_callback,
                hpusbscsi
        );
+// End cmd_len kludge
+
        hpusbscsi->scallback = callback;
        hpusbscsi->srb = srb;
 
--- a/drivers/usb/hpusbscsi.h   Sat May 11 23:03:30 2002
+++ b/drivers/usb/hpusbscsi.h   Sat May 11 23:03:45 2002
@@ -92,3 +92,6 @@
 #define HP_STATE_ERROR             3  /* error has been reported */
 #define HP_STATE_WAIT                 4  /* waiting for status transfer */
 #define HP_STATE_PREMATURE              5 /* status prematurely reported */
+
+/* FIXME: Workaround for Minolta Elite II when cmd_length=6 */
+#define  MINURBCMDLEN   10

[EMAIL PROTECTED] said:
> Hi all,
>       sins I upgraded from 2.4.7 to 2.4.16 my self constructed USB device
> is very slow (~ 25% of the old speed) handled by the kernel. I also
> tested this with 2.4.18 and found no difference.
>       My computers are (a) a laptop with some Intel chipset (usb-uhci) and
> (b) a desktop with some VIA chipsed (usb-ohci). The module i wrote to
> communicate with the device is attached in the archive and does
> basicly only translate IOCTLs into usb_control_msg() calls. My usb
> device does only communicate using the default pipe. The included test
> program (measure_update.c, sorry comments only in German) does only
> read and write 512 bytes from my device and counts the time. The speed
> was only limited by the device. With the 2.4.7 kernel I had about 60
> transfers per second. With 2.4.16 and 2.4.18 this has dropped down to
> 14. 


-----
Timothy Jedlicka, [EMAIL PROTECTED], 1-630-713-4436, AOL-IM=bonzowork
Network Entomologist, Lucent Technologies, Testers For Hire


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

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

Reply via email to