From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 29 15:10:02 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC2041065729 for ; Thu, 29 Jan 2009 15:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C59528FC1D for ; Thu, 29 Jan 2009 15:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TFA24n077722 for ; Thu, 29 Jan 2009 15:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n0TFA23f077721; Thu, 29 Jan 2009 15:10:02 GMT (envelope-from gnats) Resent-Date: Thu, 29 Jan 2009 15:10:02 GMT Resent-Message-Id: <200901291510.n0TFA23f077721@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rudolf Cejka Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B297106566B; Thu, 29 Jan 2009 15:05:47 +0000 (UTC) (envelope-from cejkar@fit.vutbr.cz) Received: from kazi.fit.vutbr.cz (kazi6.fit.vutbr.cz [IPv6:2001:718:802:808::93e5:80c]) by mx1.freebsd.org (Postfix) with ESMTP id DFBFA8FC19; Thu, 29 Jan 2009 15:05:46 +0000 (UTC) (envelope-from cejkar@fit.vutbr.cz) Received: from kazi.fit.vutbr.cz (localhost [127.0.0.1]) by kazi.fit.vutbr.cz (envelope-from cejkar@fit.vutbr.cz) (8.14.3/8.14.3) with ESMTP id n0TF5iZ6059285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Jan 2009 16:05:44 +0100 (CET) Received: (from cejkar@localhost) by kazi.fit.vutbr.cz (8.14.3/8.13.1/Submit) id n0TF5iXw059284; Thu, 29 Jan 2009 16:05:44 +0100 (CET) (envelope-from cejkar) Message-Id: <200901291505.n0TF5iXw059284@kazi.fit.vutbr.cz> Date: Thu, 29 Jan 2009 16:05:44 +0100 (CET) From: Rudolf Cejka To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: imp@FreeBSD.org Subject: kern/131123: X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rudolf Cejka List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 15:10:05 -0000 >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: