Date: Sun, 30 Sep 2007 15:42:29 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 127023 for review Message-ID: <200709301542.l8UFgTPV005232@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127023 Change 127023 by hselasky@hselasky_laptop001 on 2007/09/30 15:42:01 Store "use_polling" flag on the stack so that we don't access anything in the "xfer" structure in case the USB transfer should be cancelled. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ehci.c#40 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ehci.c#40 (text+ko) ==== @@ -3326,6 +3326,7 @@ u_int16_t value; u_int16_t index; u_int8_t l; + uint8_t use_polling; mtx_assert(&sc->sc_bus.mtx, MA_OWNED); @@ -3344,6 +3345,8 @@ value = UGETW(std->req.wValue); index = UGETW(std->req.wIndex); + use_polling = xfer->flags.use_polling; + DPRINTFN(2,("type=0x%02x request=0x%02x wLen=0x%04x " "wValue=0x%04x wIndex=0x%04x\n", std->req.bmRequestType, std->req.bRequest, @@ -3634,7 +3637,7 @@ v &= ~ (EHCI_PS_PE | EHCI_PS_PR); EOWRITE4(sc, port, v | EHCI_PS_PR); - if (xfer->flags.use_polling) { + if (use_polling) { /* polling */ DELAY(USB_PORT_ROOT_RESET_DELAY * 1000); } else { @@ -3647,7 +3650,7 @@ /* Terminate reset sequence. */ EOWRITE4(sc, port, v); - if (xfer->flags.use_polling) { + if (use_polling) { /* polling */ DELAY(EHCI_PORT_RESET_COMPLETE * 1000); } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709301542.l8UFgTPV005232>
