USB 2.0 Hub, patch for BSD stack {-3.7}
Alexander Pohoyda
alexander.pohoyda at gmx.net
Sun Jul 20 22:52:40 PDT 2003
> > 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 at gmx.net>
-------------- next part --------------
--- 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 */
-------------- next part --------------
--- 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",
More information about the freebsd-hardware
mailing list