All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Linux-usb-users] Genesys Logic and Kernel 2.4
       [not found] <20040709054435.GA31159@torres.ka0.zugschlus.de>
@ 2004-07-10 20:27 ` Hisaaki Shibata
  2004-07-11 14:07   ` Alan Stern
  2004-09-22 20:15   ` Genesys and IEEE 1394 (was: Re: Genesys Logic and Kernel 2.4) Florian Weimer
  0 siblings, 2 replies; 4+ messages in thread
From: Hisaaki Shibata @ 2004-07-10 20:27 UTC (permalink / raw)
  To: stern; +Cc: linux-usb-users, linux-kernel

Hi Alan,

I have just subscribed Linux-usb-users tonight.

I found your message
> Re: [Linux-usb-users] Genesys Logic and Kernel 2.4
on the web.

> > I have a USB-IDE-Enclosure using the buggy Genesys chipset. My system
> > has a 2.4 kernel and I cannot update soon for various reasons.

I maybe have almost the same enclosure using Genesys chip.

> I backported the 2.6 patch to 2.4.27, but I haven't tried compiling it so 
> there might be an error or two lurking.  Please try it out and tell us 
> if it works.

I tried following patch with a little change.

> --- 2.4.27/drivers/usb/storage/transport.c	Fri Jul  9 10:56:27 2004
> +++ 2.4.27-gl/drivers/usb/storage/transport.c	Fri Jul  9 11:51:14 2004
> @@ -1170,6 +1170,12 @@
>  
>  	/* if the command transfered well, then we go to the data stage */
>  	if (result == 0) {
> +
> +		/* Genesys Logic interface chips need a 100us delay between
> +		 * the command phase and the data phase */
> +		if (us->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
> +			udelay(100);
> +
>  		/* send/receive data payload, if there is any */
>  		if (bcb->DataTransferLength) {
>  			usb_stor_transfer(srb, us);
> --- 2.4.27/drivers/usb/storage/usb.c	Fri Jul  9 11:44:53 2004
> +++ 2.4.27-gl/drivers/usb/storage/usb.c	Fri Jul  9 11:49:44 2004
> @@ -996,6 +996,15 @@
>  		 */
>  		(struct us_data *)ss->htmplt.proc_dir = ss; 
>  
> +		/* According to the technical support people at Genesys Logic,
> +		 * devices using their chips have problems transferring more
> +		 * than 32 KB at a time.  In practice people have found that
> +		 * 64 KB works okay and that's what Windows does.  But we'll
> +		 * be conservative.
> +		 */
> +		if (ss->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
> +			ss->htmplt->max_sectors = 64;

+			ss->htmplt.max_sectors = 64;

> +
>  		/* Just before we start our control thread, initialize
>  		 * the device if it needs initialization */
>  		if (unusual_dev && unusual_dev->initFunction)
> --- 2.4.27/drivers/usb/storage/usb.h	Fri Jul  9 10:56:03 2004
> +++ 2.4.27-gl/drivers/usb/storage/usb.h	Fri Jul  9 11:45:49 2004
> @@ -193,4 +193,7 @@
>  /* Function to fill an inquiry response. See usb.c for details */
>  extern void fill_inquiry_response(struct us_data *us,
>  	unsigned char *data, unsigned int data_len);
> +
> +/* Vendor ID list for devices that require special handling */
> +#define USB_VENDOR_ID_GENESYS		0x05e3	/* Genesys Logic */
>  #endif

Before I patched the kernel, I met many errors and hangups
with big files writing into the enclosure.

After with your patch, It works fine for me.

My kernel is linux-2.4.27-rc3 with video4linux2 patch.
HDD in the enclosure is HGST Deskstar 7K250.

Just a report.

Best Regards,
Hisaaki Shibata

-- 
 WWWWW  shibata@luky.org
 |O-O|  SHIBATA,Hisaaki @ Fukuoka-shi, JAPAN
0( ^ )0 http://his.luky.org/
   ~    http://hoop.euqset.org/        IRC: #luky

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-usb-users] Genesys Logic and Kernel 2.4
  2004-07-10 20:27 ` [Linux-usb-users] Genesys Logic and Kernel 2.4 Hisaaki Shibata
@ 2004-07-11 14:07   ` Alan Stern
  2004-09-22 20:15   ` Genesys and IEEE 1394 (was: Re: Genesys Logic and Kernel 2.4) Florian Weimer
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Stern @ 2004-07-11 14:07 UTC (permalink / raw)
  To: Hisaaki Shibata; +Cc: linux-usb-users, linux-kernel

On Sun, 11 Jul 2004, Hisaaki Shibata wrote:

> Hi Alan,
> 
> I have just subscribed Linux-usb-users tonight.
> 
> I found your message
> > Re: [Linux-usb-users] Genesys Logic and Kernel 2.4
> on the web.
> 
> > > I have a USB-IDE-Enclosure using the buggy Genesys chipset. My system
> > > has a 2.4 kernel and I cannot update soon for various reasons.
> 
> I maybe have almost the same enclosure using Genesys chip.
> 
> > I backported the 2.6 patch to 2.4.27, but I haven't tried compiling it so 
> > there might be an error or two lurking.  Please try it out and tell us 
> > if it works.
> 
> I tried following patch with a little change.

...

> Before I patched the kernel, I met many errors and hangups
> with big files writing into the enclosure.
> 
> After with your patch, It works fine for me.
> 
> My kernel is linux-2.4.27-rc3 with video4linux2 patch.
> HDD in the enclosure is HGST Deskstar 7K250.
> 
> Just a report.
> 
> Best Regards,
> Hisaaki Shibata

Thanks for testing, and thanks for the correction.  I'll submit the 
corrected patch for inclusion in 2.4.

Alan Stern


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Genesys and IEEE 1394 (was: Re: Genesys Logic and Kernel 2.4)
  2004-07-10 20:27 ` [Linux-usb-users] Genesys Logic and Kernel 2.4 Hisaaki Shibata
  2004-07-11 14:07   ` Alan Stern
@ 2004-09-22 20:15   ` Florian Weimer
  2004-09-22 20:51     ` Alan Stern
  1 sibling, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2004-09-22 20:15 UTC (permalink / raw)
  To: Hisaaki Shibata; +Cc: stern, linux-usb-users, linux-kernel

* Hisaaki Shibata:

>> +		/* According to the technical support people at Genesys Logic,
>> +		 * devices using their chips have problems transferring more
>> +		 * than 32 KB at a time.  In practice people have found that
>> +		 * 64 KB works okay and that's what Windows does.  But we'll
>> +		 * be conservative.
>> +		 */
>> +		if (ss->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
>> +			ss->htmplt->max_sectors = 64;
>
> +			ss->htmplt.max_sectors = 64;
>
>> +

Christoph Biedl discovered that it's likely that a a similar
workaround is needed in the IEEE 1394 code:

http://sourceforge.net/mailarchive/forum.php?thread_id=5128811&forum_id=5389

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Genesys and IEEE 1394 (was: Re: Genesys Logic and Kernel 2.4)
  2004-09-22 20:15   ` Genesys and IEEE 1394 (was: Re: Genesys Logic and Kernel 2.4) Florian Weimer
@ 2004-09-22 20:51     ` Alan Stern
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Stern @ 2004-09-22 20:51 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Hisaaki Shibata, USB users list, Kernel development list

On Wed, 22 Sep 2004, Florian Weimer wrote:

> * Hisaaki Shibata:
> 
> >> +		/* According to the technical support people at Genesys Logic,
> >> +		 * devices using their chips have problems transferring more
> >> +		 * than 32 KB at a time.  In practice people have found that
> >> +		 * 64 KB works okay and that's what Windows does.  But we'll
> >> +		 * be conservative.
> >> +		 */
> >> +		if (ss->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
> >> +			ss->htmplt->max_sectors = 64;
> >
> > +			ss->htmplt.max_sectors = 64;
> >
> >> +
> 
> Christoph Biedl discovered that it's likely that a a similar
> workaround is needed in the IEEE 1394 code:
> 
> http://sourceforge.net/mailarchive/forum.php?thread_id=5128811&forum_id=5389

That change was not the important one.  The important part of the patch 
was this:

+               /* Genesys Logic interface chips need a 100us delay between
+                * the command phase and the data phase */
+               if (us->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS)
+                       udelay(100);

This is what affects the timing problem, by adding a 100-microsecond 
delay.

Alan Stern


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-22 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040709054435.GA31159@torres.ka0.zugschlus.de>
2004-07-10 20:27 ` [Linux-usb-users] Genesys Logic and Kernel 2.4 Hisaaki Shibata
2004-07-11 14:07   ` Alan Stern
2004-09-22 20:15   ` Genesys and IEEE 1394 (was: Re: Genesys Logic and Kernel 2.4) Florian Weimer
2004-09-22 20:51     ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.