Date: Fri, 5 Nov 2010 21:17:55 +0000 (UTC) From: Nick Hibma <n_hibma@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214852 - in head/sys/dev/usb: . serial Message-ID: <201011052117.oA5LHtnH009548@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: n_hibma Date: Fri Nov 5 21:17:55 2010 New Revision: 214852 URL: http://svn.freebsd.org/changeset/base/214852 Log: Bugfix: In rev 213509 Alexander committed a duplicate ID for ZTE STOR based devices (QUALCOMMINC 0x2000). He made it use SCSI eject instead of ZTE STOR eject. This prevented my ZTE MF626 dongle from switching. - Apply both eject methods for ZTE STOR based devices. Works on my as well as mav's device. - Remove the duplicate. - Sort the usbdevs entries for Qualcomm so this won't happen again. - Add bootverbose message displaying the fact that we are ejecting (and how). Reviewed by: mav MFC after: 2 weeks Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Nov 5 21:13:16 2010 (r214851) +++ head/sys/dev/usb/serial/u3g.c Fri Nov 5 21:17:55 2010 (r214852) @@ -411,7 +411,6 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0078, 0), U3G_DEV(QUALCOMMINC, E0082, 0), U3G_DEV(QUALCOMMINC, E0086, 0), - U3G_DEV(QUALCOMMINC, E2000, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), @@ -655,6 +654,12 @@ u3g_test_autoinst(void *arg, struct usb_ if (usbd_lookup_id_by_uaa(u3g_devs, sizeof(u3g_devs), uaa)) return; /* no device match */ + if (bootverbose) { + printf("Ejecting 0x%04x:0x%04x using method %ld\n", + uaa->info.idVendor, uaa->info.idProduct, + USB_GET_DRIVER_INFO(uaa)); + } + switch (USB_GET_DRIVER_INFO(uaa)) { case U3GINIT_HUAWEI: error = u3g_huawei_init(udev); @@ -669,7 +674,8 @@ u3g_test_autoinst(void *arg, struct usb_ error = usb_msc_eject(udev, 0, MSC_EJECT_REZERO); break; case U3GINIT_ZTESTOR: - error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); + error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); + error |= usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); break; case U3GINIT_CMOTECH: error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH); Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Nov 5 21:13:16 2010 (r214851) +++ head/sys/dev/usb/usbdevs Fri Nov 5 21:17:55 2010 (r214852) @@ -2612,15 +2612,11 @@ product QISDA H20_2 0x4519 3G modem /* Qualcomm products */ product QUALCOMM CDMA_MSM 0x6000 CDMA Technologies MSM phone +product QUALCOMM2 MF330 0x6613 MF330 product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 AC8700 0x6000 AC8700 -product QUALCOMM2 MF330 0x6613 MF330 product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem -product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage -product QUALCOMMINC AC8710 0xfff1 3G modem -product QUALCOMMINC AC2726 0xfff5 3G modem -product QUALCOMMINC AC8700 0xfffe CDMA 1xEVDO USB modem product QUALCOMMINC E0002 0x0002 3G modem product QUALCOMMINC E0003 0x0003 3G modem product QUALCOMMINC E0004 0x0004 3G modem @@ -2686,9 +2682,12 @@ product QUALCOMMINC E0076 0x0076 3G mode product QUALCOMMINC E0078 0x0078 3G modem product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem -product QUALCOMMINC E2000 0x2000 3G modem +product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem +product QUALCOMMINC AC8710 0xfff1 3G modem +product QUALCOMMINC AC2726 0xfff5 3G modem +product QUALCOMMINC AC8700 0xfffe CDMA 1xEVDO USB modem /* Quanta products */ product QUANTA RW6815_1 0x00ce HP iPAQ rw6815
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011052117.oA5LHtnH009548>