Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 07:52:20 +0200 (CEST)
From:      Alexander Pohoyda <alexander.pohoyda@gmx.net>
To:        Josef Karthauser <joe@FreeBSD.org>
Cc:        freebsd-hardware@FreeBSD.org
Subject:   Re: USB 2.0 Hub, patch for BSD stack {-3.7}
Message-ID:  <200307210552.h6L5qK28000530@oak.pohoyda.family>
In-Reply-To: <20030714174759.GA728@genius.tao.org.uk> (message from Josef Karthauser on Mon, 14 Jul 2003 18:47:59 %2B0100)
References:  <20030714174759.GA728@genius.tao.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
> > A new Cytronix 4-port USB 2.0 Hub (Cypress CY7C65640 chip) didn't
> > work in both FreeBSD 4.8-STABLE and 5.0-CURRENT.
> > 
> > I have managed to fix this with a following patch:
> > --- uhub.c.orig Fri Jul  4 20:17:50 2003
> > +++ uhub.c      Fri Jul  4 21:57:31 2003
> > @@ -185,7 +185,7 @@
> >         /* Get hub descriptor. */
> >         req.bmRequestType = UT_READ_CLASS_DEVICE;
> >         req.bRequest = UR_GET_DESCRIPTOR;
> > -       USETW(req.wValue, 0);
> > +       USETW2(req.wValue, (dev->address > 1 ? UDESC_HUB : 0), 0);
> >         USETW(req.wIndex, 0);
> >         USETW(req.wLength, USB_HUB_DESCRIPTOR_SIZE);
> >         DPRINTFN(1,("usb_init_hub: getting hub descriptor\n"));
> > 
> > Hub is working now.

> I've committed this to -current, and will MFC to -stable in a week or
> so.

Thank you.
This patch, however, does not seem to be generic enough. It may even
not work on other systems at all.
I would really like to hear some explanation.

Here are two minor patches.


-- 
Alexander Pohoyda
<alexander.pohoyda@gmx.net>


[-- Attachment #2 --]

--- usbdevs.h.orig	Wed Jul  2 21:20:39 2003
+++ usbdevs.h	Wed Jul  2 21:25:06 2003
@@ -544,6 +544,7 @@
 #define	USB_PRODUCT_CYPRESS_MOUSE	0x0001		/* mouse */
 #define	USB_PRODUCT_CYPRESS_THERMO	0x0002		/* thermometer */
 #define	USB_PRODUCT_CYPRESS_FMRADIO	0x1002		/* FM Radio */
+#define	USB_PRODUCT_CYPRESS_SLIM_HUB	0x6560		/* Slim Hub, 4 ports */
 
 /* Daisy Technology products */
 #define	USB_PRODUCT_DAISY_DMC	0x6901		/* USB MultiMedia Reader */


[-- Attachment #3 --]

--- usbdevs_data.h.orig	Wed Jul  2 21:25:37 2003
+++ usbdevs_data.h	Wed Jul  2 21:26:48 2003
@@ -640,6 +640,12 @@
 	    "FM Radio",
 	},
 	{
+	    USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_SLIM_HUB,
+	    0,
+	    "Cypress Semiconductor",
+	    "Slim Hub",
+	},
+	{
 	    USB_VENDOR_DAISY, USB_PRODUCT_DAISY_DMC,
 	    0,
 	    "Daisy Technology",

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307210552.h6L5qK28000530>