git: 88162f7abd61 - main - ulpt(4): Add support for Epson TM-U220B.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 02 Apr 2022 00:29:38 UTC
The branch main has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=88162f7abd61206c98432f2c0de869a59be13854
commit 88162f7abd61206c98432f2c0de869a59be13854
Author: Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-04-02 00:27:48 +0000
Commit: Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-04-02 00:29:05 +0000
ulpt(4): Add support for Epson TM-U220B.
Submitted by: Archimedes Gaviola <archimedes.gaviola@gmail.com>
MFC after: 1 week
Sponsored by: NVIDIA Networking
---
sys/dev/usb/serial/ulpt.c | 13 +++++++++++--
sys/dev/usb/usbdevs | 1 +
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/sys/dev/usb/serial/ulpt.c b/sys/dev/usb/serial/ulpt.c
index c566da924374..935dc992c6c2 100644
--- a/sys/dev/usb/serial/ulpt.c
+++ b/sys/dev/usb/serial/ulpt.c
@@ -499,6 +499,13 @@ static const STRUCT_USB_HOST_ID ulpt_devs[] = {
{USB_IFACE_CLASS(UICLASS_PRINTER),
USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER),
USB_IFACE_PROTOCOL(UIPROTO_PRINTER_1284)},
+
+ /* Epson printer */
+ {USB_VENDOR(USB_VENDOR_EPSON),
+ USB_PRODUCT(USB_PRODUCT_EPSON_TMU220B),
+ USB_IFACE_CLASS(UICLASS_VENDOR),
+ USB_IFACE_SUBCLASS(UISUBCLASS_VENDOR),
+ USB_IFACE_PROTOCOL(UIPROTO_PRINTER_BI)},
};
static int
@@ -555,8 +562,10 @@ ulpt_attach(device_t dev)
break;
} else {
alt_index++;
- if ((id->bInterfaceClass == UICLASS_PRINTER) &&
- (id->bInterfaceSubClass == UISUBCLASS_PRINTER) &&
+ if ((id->bInterfaceClass == UICLASS_PRINTER ||
+ id->bInterfaceClass == UICLASS_VENDOR) &&
+ (id->bInterfaceSubClass == UISUBCLASS_PRINTER ||
+ id->bInterfaceSubClass == UISUBCLASS_VENDOR) &&
(id->bInterfaceProtocol == UIPROTO_PRINTER_BI)) {
goto found;
}
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 3b7ea2b9c1b4..6faaca058b96 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -1941,6 +1941,7 @@ product EPSON 1270 0x0120 Perfection 1270 scanner
product EPSON 2480 0x0121 Perfection 2480 scanner
product EPSON 3590 0x0122 Perfection 3590 scanner
product EPSON 4990 0x012a Perfection 4990 Photo scanner
+product EPSON TMU220B 0x0202 TM-U220B
product EPSON CRESSI_EDY 0x0521 Cressi Edy diving computer
product EPSON N2ITION3 0x0522 Zeagle N2iTion3 diving computer
product EPSON STYLUS_875DC 0x0601 Stylus Photo 875DC Card Reader