diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-08-30 05:06:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-08-30 05:06:22 +0000 |
commit | c3711327f7cac78c09b462663217a5753c6fe665 (patch) | |
tree | 75d4de0f9b6464746a4836bea1fdeb04cf845bd2 | |
parent | 53dfa470d95285ab8967c2f6d33600c15df5f526 (diff) |
handle new pearl-style devices (which now attach their SD cards as a umass),
or ancient ancient usb/serial devices (which come up as false usb devices
when turned off); thanks to kitella for giving me a variety pack of old units
-rw-r--r-- | sys/dev/usb/uberry.c | 16 | ||||
-rw-r--r-- | sys/dev/usb/usbdevs | 4 |
2 files changed, 13 insertions, 7 deletions
diff --git a/sys/dev/usb/uberry.c b/sys/dev/usb/uberry.c index 90829d7c88d..11b13acbc5e 100644 --- a/sys/dev/usb/uberry.c +++ b/sys/dev/usb/uberry.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uberry.c,v 1.12 2007/08/24 01:16:36 deraadt Exp $ */ +/* $OpenBSD: uberry.c,v 1.13 2007/08/30 05:06:21 deraadt Exp $ */ /*- * Copyright (c) 2006 Theo de Raadt <deraadt@openbsd.org> @@ -47,9 +47,12 @@ struct uberry_softc { #define UBERRY_INTERFACE_NO 0 #define UBERRY_CONFIG_NO 1 +/* + * Do not match on the following device, because it is type umass + * { USB_VENDOR_RIM, USB_PRODUCT_RIM_PEARL_DUAL }, + */ struct usb_devno const uberry_devices[] = { { USB_VENDOR_RIM, USB_PRODUCT_RIM_BLACKBERRY }, - { USB_VENDOR_RIM, USB_PRODUCT_RIM_PEARL_DUAL }, { USB_VENDOR_RIM, USB_PRODUCT_RIM_PEARL } }; @@ -103,8 +106,12 @@ uberry_attach(struct device *parent, struct device *self, void *aux) /* Enable configuration, to keep it connected... */ if (usbd_set_config_no(sc->sc_udev, UBERRY_CONFIG_NO, 1) != 0) { - printf("%s: could not set configuration no\n", - sc->sc_dev.dv_xname); + /* + * Really ancient (ie. 7250) devices when off will + * only charge at 100mA when turned off. + */ + printf("%s: Charging at %dmA\n", sc->sc_dev.dv_xname, + sc->sc_udev->power); return; } @@ -152,7 +159,6 @@ uberry_detach(struct device *self, int flags) usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev); - return 0; } diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 4e89218091c..5506a1d9c8d 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,4 +1,4 @@ -$OpenBSD: usbdevs,v 1.288 2007/08/28 09:44:17 henning Exp $ +$OpenBSD: usbdevs,v 1.289 2007/08/30 05:06:21 deraadt Exp $ /* $NetBSD: usbdevs,v 1.322 2003/05/10 17:47:14 hamajima Exp $ */ /* @@ -1942,7 +1942,7 @@ product REALTEK RTL8187 0x8187 RTL8187 /* Research In Motion products */ product RIM BLACKBERRY 0x0001 Blackberry -product RIM PEARL_DUAL 0x0004 Blackberry pearl dual +product RIM PEARL_DUAL 0x0004 RIM Mass Storage Device product RIM PEARL 0x0006 Blackberry pearl /* Roland products */ |