diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2010-03-27 10:40:01 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2010-03-27 10:40:01 +0000 |
commit | d7a6c424c8aedb7d7bbf6db741a4b921a9f24dc2 (patch) | |
tree | 391d0f8cca7db156bf0b4f7f6cd6f201d5e5323a /sys/dev | |
parent | 9080a4187c2d8aca4a023f5539562e6e048d0cfb (diff) |
add mode switch code for Huawei K3765; much help from & ok jsg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/umsm.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/usb/umsm.c b/sys/dev/usb/umsm.c index 1d6068a7c73..0063da643fe 100644 --- a/sys/dev/usb/umsm.c +++ b/sys/dev/usb/umsm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umsm.c,v 1.58 2010/02/22 23:36:42 mpf Exp $ */ +/* $OpenBSD: umsm.c,v 1.59 2010/03/27 10:40:00 otto Exp $ */ /* * Copyright (c) 2008 Yojiro UO <yuo@nui.org> @@ -112,7 +112,9 @@ struct umsm_type { #define DEV_UMASS2 0x0020 #define DEV_UMASS3 0x0040 #define DEV_UMASS4 0x0080 -#define DEV_UMASS (DEV_UMASS1 | DEV_UMASS2 | DEV_UMASS3 | DEV_UMASS4) +#define DEV_UMASS5 0x0100 +#define DEV_UMASS (DEV_UMASS1 | DEV_UMASS2 | DEV_UMASS3 | DEV_UMASS4 | \ + DEV_UMASS5) }; static const struct umsm_type umsm_devs[] = { @@ -131,6 +133,8 @@ static const struct umsm_type umsm_devs[] = { {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E510 }, DEV_HUAWEI}, {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E618 }, DEV_HUAWEI}, {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_Mobile }, DEV_HUAWEI}, + {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_K3765_INIT }, DEV_UMASS5}, + {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_K3765 }, 0}, {{ USB_VENDOR_HYUNDAI, USB_PRODUCT_HYUNDAI_UM175 }, 0}, @@ -256,7 +260,7 @@ umsm_match(struct device *parent, void *match, void *aux) * Some high-speed modems require special care. */ if (flag & DEV_HUAWEI) { - if (uaa->ifaceno != 2) + if (uaa->ifaceno != 2) return UMATCH_VENDOR_IFACESUBCLASS; else return UMATCH_NONE; @@ -669,6 +673,11 @@ umsm_umass_changemode(struct umsm_softc *sc) cbw.CBWCDB[1] = 0x00; /* target LUN: 0 */ cbw.CBWCDB[4] = UMASS_CMDPARAM_EJECT; break; + case DEV_UMASS5: + cbw.bCBWFlags = CBWFLAGS_OUT; + cbw.CBWCDB[0] = 0x11; + cbw.CBWCDB[1] = 0x06; + break; default: DPRINTF(("%s: unknown device type.\n", sc->sc_dev.dv_xname)); break; |