Author: n_hibma Date: Sun Apr 25 19:22:06 2010 New Revision: 207201 URL: http://svn.freebsd.org/changeset/base/207201
Log: Remove the call to usbd_reset_device() as this panics the kernel on devices with many serial ports (the device is reset for each port that reports IOERROR). Remove statements that should have been removed when rewriting the if statement. Modified: stable/7/sys/dev/usb/ucom.c Modified: stable/7/sys/dev/usb/ucom.c ============================================================================== --- stable/7/sys/dev/usb/ucom.c Sun Apr 25 19:21:19 2010 (r207200) +++ stable/7/sys/dev/usb/ucom.c Sun Apr 25 19:22:06 2010 (r207201) @@ -689,11 +689,7 @@ ucomwritecb(usbd_xfer_handle xfer, usbd_ printf("%s: ucomwritecb: STALLED; clearing.\n", device_get_nameunit(sc->sc_dev)); usbd_clear_endpoint_stall_async(sc->sc_bulkout_pipe); - } else if (status == USBD_IOERROR) { - printf("%s: ucomwritecb: IOERROR; resetting device.\n", - device_get_nameunit(sc->sc_dev)); - usbd_reset_device(sc->sc_udev); - } else if (status != USBD_CANCELLED) { + } else { printf("%s: ucomwritecb: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(status)); @@ -775,19 +771,13 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_p printf("%s: ucomreadcb: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(status)); sc->sc_state |= UCS_RXSTOP; - if (status == USBD_STALLED) - usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe); - else if (status == USBD_IOERROR) - usbd_reset_device(sc->sc_udev); if (status == USBD_STALLED) { printf("%s: ucomreadcb: STALLED; clearing.\n", device_get_nameunit(sc->sc_dev)); usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe); - } else if (status == USBD_IOERROR) { - printf("%s: ucomreadcb: IOERROR; resetting device.\n", - device_get_nameunit(sc->sc_dev)); - usbd_reset_device(sc->sc_udev); - } else if (status != USBD_CANCELLED) { + } else if (status == USBD_CANCELLED) { + /* noop */ + } else { printf("%s: ucomreadcb: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(status)); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"