kern/131123:

Rudolf Cejka cejkar at fit.vutbr.cz
Thu Jan 29 07:10:05 PST 2009


>Number:         131123
>Category:       kern
>Synopsis:       
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 29 15:10:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Rudolf Cejka
>Release:        FreeBSD 7.1-STABLE i386
>Organization:
FIT, Brno University of Technology, Czech Republic
>Environment:
	FreeBSD 7.x and above

>Description:
	There has been removed UQ_ASSUME_CM_OVER_DATA usb quirk in
	usb_quirks.c 1.60, usb_quirks.h 1.24 and umodem.c 1.68.
	However, it is still needed, atleast for Siemens GSM module ES75
	(PRs usb/95805 and partially usb/119227). The worse I'm afraid,
	that it is really not the only device, which needs this quirk.
	So please commit the following patch, and revise decisions about
	removing other occurences of UQ_ASSUME_CM_OVER_DATA quirk. I have		found PRs bin/42574, kern/71043, misc/61341, usb/72732, usb/74849,
	usb/74880, usb/81191, usb/95805, usb/97512, usb/97948, usb/106462,
	usb/109838, usb/116561, and usb/119227.

>How-To-Repeat:
	Plug in Siemens GSM module ES75 into USB / FreeBSD 7.1-STABLE.
	It periodically connects/disconnects every 10 seconds and simply
	does not work.

>Fix:

--- sys/dev/usb/usb_quirks.h.orig	2009-01-29 14:18:33.000000000 +0100
+++ sys/dev/usb/usb_quirks.h	2009-01-29 14:19:48.000000000 +0100
@@ -51,6 +51,7 @@
 #define UQ_POWER_CLAIM	0x00000200 /* hub lies about power status */
 #define UQ_AU_NO_FRAC	0x00000400 /* don't adjust for fractional samples */
 #define UQ_AU_INP_ASYNC	0x00000800 /* input is async despite claim of adaptive */
+#define UQ_ASSUME_CM_OVER_DATA 0x1000 /* modem device breaks on cm over data */
 #define UQ_BROKEN_BIDIR	0x00002000 /* printer has broken bidir mode */
 #define UQ_OPEN_CLEARSTALL 0x04000 /* device needs clear endpoint stall */
 #define UQ_HID_IGNORE	0x00008000 /* device should be ignored by hid class */
--- sys/dev/usb/usb_quirks.c.orig	2009-01-29 14:18:36.000000000 +0100
+++ sys/dev/usb/usb_quirks.c	2009-01-29 14:26:45.000000000 +0100
@@ -75,6 +75,8 @@
  { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE,
    						    0x100, { UQ_AU_INP_ASYNC }},
  { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS }},
+ { USB_VENDOR_SIEMENS2, USB_PRODUCT_SIEMENS2_ES75,
+   ANY, { UQ_ASSUME_CM_OVER_DATA }},
  /* XXX These should have a revision number, but I don't know what they are. */
  { USB_VENDOR_HP, USB_PRODUCT_HP_895C,		    ANY,   { UQ_BROKEN_BIDIR }},
  { USB_VENDOR_HP, USB_PRODUCT_HP_880C,		    ANY,   { UQ_BROKEN_BIDIR }},
--- sys/dev/usb/umodem.c.orig	2009-01-29 13:40:19.000000000 +0100
+++ sys/dev/usb/umodem.c	2009-01-29 15:03:00.000000000 +0100
@@ -360,11 +360,16 @@
 		goto bad;
 	}
 
-	if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
-		if (sc->sc_acm_cap & USB_CDC_ACM_HAS_FEATURE)
-			umodem_set_comm_feature(sc, UCDC_ABSTRACT_STATE,
-			    UCDC_DATA_MULTIPLEXED);
+	if (usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_ASSUME_CM_OVER_DATA) {
+		DPRINTF(("Quirk says to assume CM over data\n"));
 		sc->sc_cm_over_data = 1;
+	} else {
+		if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
+			if (sc->sc_acm_cap & USB_CDC_ACM_HAS_FEATURE)
+				umodem_set_comm_feature(sc, UCDC_ABSTRACT_STATE,
+				    UCDC_DATA_MULTIPLEXED);
+			sc->sc_cm_over_data = 1;
+		}
 	}
 
 	/*
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list