From owner-freebsd-hardware@FreeBSD.ORG Sun Jul 20 22:52:40 2003 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3057F37B405 for ; Sun, 20 Jul 2003 22:52:40 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 8C8B643FA3 for ; Sun, 20 Jul 2003 22:52:38 -0700 (PDT) (envelope-from alexander.pohoyda@gmx.net) Received: (qmail 31348 invoked by uid 65534); 21 Jul 2003 05:52:37 -0000 Received: from p508BF3D1.dip.t-dialin.net (EHLO oak.pohoyda.family) (80.139.243.209) by mail.gmx.net (mp006) with SMTP; 21 Jul 2003 07:52:37 +0200 Received: from oak.pohoyda.family (oak.pohoyda.family [127.0.0.1]) by oak.pohoyda.family (8.12.9/8.12.6) with ESMTP id h6L5qNKg000533; Mon, 21 Jul 2003 07:52:24 +0200 (CEST) (envelope-from apog@oak.pohoyda.family) Received: (from apog@localhost) by oak.pohoyda.family (8.12.9/8.12.9/Submit) id h6L5qK28000530; Mon, 21 Jul 2003 07:52:20 +0200 (CEST) Date: Mon, 21 Jul 2003 07:52:20 +0200 (CEST) Message-Id: <200307210552.h6L5qK28000530@oak.pohoyda.family> From: Alexander Pohoyda To: Josef Karthauser In-reply-to: <20030714174759.GA728@genius.tao.org.uk> (message from Josef Karthauser on Mon, 14 Jul 2003 18:47:59 +0100) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2003-07-21T07:50:40+0200_=_d45e3272" References: <20030714174759.GA728@genius.tao.org.uk> cc: usb-bsd@eleetbsd.org cc: freebsd-hardware@FreeBSD.org Subject: Re: USB 2.0 Hub, patch for BSD stack {-3.7} X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 05:52:40 -0000 > This is a multipart message in MIME format. --2003-07-21T07:50:40+0200_=_d45e3272 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > > 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 --2003-07-21T07:50:40+0200_=_d45e3272 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="usr.src.sys.dev.usb.usbdevs.h.diff" Content-Description: usr.src.sys.dev.usb.usbdevs.h.diff --- 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 */ --2003-07-21T07:50:40+0200_=_d45e3272 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="usr.src.sys.dev.usb.usbdevs_data.h.diff" Content-Description: usr.src.sys.dev.usb.usbdevs_data.h.diff --- 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", --2003-07-21T07:50:40+0200_=_d45e3272--