Fix for powering off a HP DJ950C during printing. As stated by Ian:
When the printer is turned off the pipe write will cause and error, which causes lpd to close the device and reopen it to clear the error. After a short while the device will disappear from the bus but lpd will have opened the ulpt0 port by then. ulpt_status will check for status without checking the sc->dying flag and panic the kernel when the device finally disappears from the bus. Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
This commit is contained in:
parent
44b5247d95
commit
1d8068f94a
@ -427,6 +427,11 @@ ulptopen(dev, flag, mode, p)
|
||||
sc->sc_state = 0;
|
||||
return (error);
|
||||
}
|
||||
|
||||
if (sc->sc_dying) {
|
||||
sc->sc_state = 0;
|
||||
return (ENXIO);
|
||||
}
|
||||
}
|
||||
|
||||
err = usbd_open_pipe(sc->sc_iface, sc->sc_bulk, 0, &sc->sc_bulkpipe);
|
||||
|
Loading…
Reference in New Issue
Block a user