ChangeSet 1.1843.4.28, 2004/08/25 10:47:42-07:00, [EMAIL PROTECTED]

[PATCH] USB: Use 8-byte hub status URB buffer

This patch changes the size of the buffer allocated for each hub's status
URB from 3 bytes to 8.  The purpose is to avoid "babble" errors with
certain buggy hubs.  Although I only know of one type of device which does
this, the patch does solve its problem and it adds no overhead for anyone
else since kmalloc doesn't dole out memory in chunks smaller than 8 bytes
(32 actually, on a PC).

This is a small thing, but it doesn't hurt and it will make life easier
for a few people.

Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/core/hub.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
--- a/drivers/usb/core/hub.h    2004-08-26 16:41:08 -07:00
+++ b/drivers/usb/core/hub.h    2004-08-26 16:41:08 -07:00
@@ -190,8 +190,8 @@
        struct usb_device       *hdev;
        struct urb              *urb;           /* for interrupt polling pipe */
 
-       /* buffer for urb ... 1 bit each for hub and children, rounded up */
-       char                    (*buffer)[(USB_MAXCHILDREN + 1 + 7) / 8];
+       /* buffer for urb ... with extra space in case of babble */
+       char                    (*buffer)[8];
        dma_addr_t              buffer_dma;     /* DMA address for buffer */
        union {
                struct usb_hub_status   hub;



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to