diff options
| author | Ian Dowse <iedowse@FreeBSD.org> | 2003-06-15 11:55:50 +0000 |
|---|---|---|
| committer | Ian Dowse <iedowse@FreeBSD.org> | 2003-06-15 11:55:50 +0000 |
| commit | 688514ced04e30107f674749ab53af2d05e033e1 (patch) | |
| tree | 1bd5ac72b491629269713a7cde877884b6dc1375 | |
| parent | 4f1b45777010689efb3d409764da3719dab250d7 (diff) | |
Notes
| -rw-r--r-- | sys/dev/usb/ulpt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 71f6326fde67..c8df70dc8a54 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -528,8 +528,14 @@ ulptopen(dev_t dev, int flag, int mode, usb_proc_ptr p) error = 0; sc->sc_refcnt++; - if ((flags & ULPT_NOPRIME) == 0) + if ((flags & ULPT_NOPRIME) == 0) { ulpt_reset(sc); + if (sc->sc_dying) { + error = ENXIO; + sc->sc_state = 0; + goto done; + } + } for (spin = 0; (ulpt_status(sc) & LPS_SELECT) == 0; spin += STEP) { DPRINTF(("ulpt_open: waiting a while\n")); |
