Date: Thu, 5 Jun 2008 06:57:06 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 142928 for review Message-ID: <200806050657.m556v6TU052416@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142928 Change 142928 by hselasky@hselasky_laptop001 on 2008/06/05 06:56:47 USB Device Side Mode: Only Device Mode has clear stall. Add check for USB mode in clear stall callback. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#18 edit .. //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#13 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#18 (text+ko) ==== @@ -1414,6 +1414,11 @@ mtx_assert(&(udev->bus->mtx), MA_OWNED); + /* check mode */ + if (udev->flags.usb_mode != USB_MODE_DEVICE) { + /* not supported */ + return; + } /* get softc */ sc = AT9100_DCI_BUS2SC(udev->bus); ==== //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#13 (text+ko) ==== @@ -1347,11 +1347,18 @@ DPRINTFN(4, "pipe=%p\n", pipe); - /* reset pipe state */ + /* check mode */ + if (udev->flags.usb_mode != USB_MODE_DEVICE) { + /* not supported */ + return; + } + /* get softc */ + sc = USS820_DCI_BUS2SC(udev->bus); - sc = USS820_DCI_BUS2SC(udev->bus); + /* get endpoint descriptor */ ed = pipe->edesc; + /* reset endpoint */ uss820_dci_clear_stall_sub(sc, (ed->bEndpointAddress & UE_ADDR), (ed->bmAttributes & UE_XFERTYPE),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806050657.m556v6TU052416>