Module Name: src
Committed By: christos
Date: Sat Aug 7 20:43:46 UTC 2010
Modified Files:
src/sys/dev/usb: u3g.c
Log Message:
Fix for another 3g modem used by Cosmote in Greece. This is a ZTE MF636(?)
modem that requires ejecting the fake umass disk that contains the drivers
like the novatel one. Perhaps I should rename the novatel routine
usbd_scsi_eject() or something.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/u3g.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/u3g.c
diff -u src/sys/dev/usb/u3g.c:1.15 src/sys/dev/usb/u3g.c:1.16
--- src/sys/dev/usb/u3g.c:1.15 Sat Jun 19 18:41:32 2010
+++ src/sys/dev/usb/u3g.c Sat Aug 7 16:43:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: u3g.c,v 1.15 2010/06/19 22:41:32 kardel Exp $ */
+/* $NetBSD: u3g.c,v 1.16 2010/08/07 20:43:46 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.15 2010/06/19 22:41:32 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.16 2010/08/07 20:43:46 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -446,7 +446,8 @@
/*
* Huawei changes product when it is configured as a modem.
*/
- if (uaa->vendor == USB_VENDOR_HUAWEI) {
+ switch (uaa->vendor) {
+ case USB_VENDOR_HUAWEI:
if (uaa->product == USB_PRODUCT_HUAWEI_K3765)
return UMATCH_NONE;
@@ -459,9 +460,9 @@
return u3g_huawei_reinit(uaa->device);
break;
}
- }
+ break;
- if (uaa->vendor == USB_VENDOR_NOVATEL2) {
+ case USB_VENDOR_NOVATEL2:
switch (uaa->product){
case USB_PRODUCT_NOVATEL2_MC950D_DRIVER:
case USB_PRODUCT_NOVATEL2_U760_DRIVER:
@@ -470,11 +471,21 @@
default:
break;
}
- }
+ break;
+
+ case USB_VENDOR_SIERRA:
+ if (uaa->product == USB_PRODUCT_SIERRA_INSTALLER)
+ return u3g_sierra_reinit(uaa->device);
+ break;
- if (uaa->vendor == USB_VENDOR_SIERRA &&
- uaa->product == USB_PRODUCT_SIERRA_INSTALLER)
- return u3g_sierra_reinit(uaa->device);
+ case USB_VENDOR_QUALCOMMINC:
+ if (uaa->product == USB_PRODUCT_QUALCOMMINC_ZTE_STOR)
+ return u3g_novatel_reinit(uaa->device);
+ break;
+
+ default:
+ break;
+ }
return UMATCH_NONE;
}