diff options
| author | 2001-10-04 22:55:56 +0000 | |
|---|---|---|
| committer | 2001-10-04 22:55:56 +0000 | |
| commit | b2ba272df00534eb358aa9cb397bd7ea094f202f (patch) | |
| tree | aebee2847448a43a558976021dcb701a2697ec27 /sys/dev/usb/ulpt.c | |
| parent | More accurate help. (diff) | |
| download | wireguard-openbsd-b2ba272df00534eb358aa9cb397bd7ea094f202f.tar.xz wireguard-openbsd-b2ba272df00534eb358aa9cb397bd7ea094f202f.zip | |
Match a IEEE 1284.4 protocol. We do not support this protocol directly,
but USB_ATTACH will switch printer to bidirectional protocol.
Read status from printer. From NetBSD.
This forces newest usb printers works.
Tested by drahn@ (Epson 740) and me (HP LaserJet 2200).
Ok aaron@
Diffstat (limited to 'sys/dev/usb/ulpt.c')
| -rw-r--r-- | sys/dev/usb/ulpt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 3769a2a2e29..8f166c9cded 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ulpt.c,v 1.7 2001/05/03 02:20:34 aaron Exp $ */ +/* $OpenBSD: ulpt.c,v 1.8 2001/10/04 22:55:56 gluk Exp $ */ /* $NetBSD: ulpt.c,v 1.42 2001/04/16 00:18:06 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */ @@ -40,7 +40,7 @@ */ /* - * Printer Class spec: http://www.usb.org/developers/data/devclass/usbprint109.PDF + * Printer Class spec: http://www.usb.org/developers/data/devclass/usbprint11.pdf */ #include <sys/param.h> @@ -180,8 +180,9 @@ USB_MATCH(ulpt) if (id != NULL && id->bInterfaceClass == UICLASS_PRINTER && id->bInterfaceSubClass == UISUBCLASS_PRINTER && - (id->bInterfaceProtocol == UIPROTO_PRINTER_UNI || - id->bInterfaceProtocol == UIPROTO_PRINTER_BI)) + ((id->bInterfaceProtocol == UIPROTO_PRINTER_UNI) || + (id->bInterfaceProtocol == UIPROTO_PRINTER_BI) || + (id->bInterfaceProtocol == UIPROTO_PRINTER_IEEE_1284_4))) return (UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO); return (UMATCH_NONE); } @@ -413,6 +414,7 @@ ulpt_status(struct ulpt_softc *sc) usbd_status err; u_char status; + req.bmRequestType = UT_READ_CLASS_INTERFACE; req.bRequest = UR_GET_PORT_STATUS; USETW(req.wValue, 0); USETW(req.wIndex, sc->sc_ifaceno); |
