On Fri, Dec 07, 2007 at 10:36:58AM +0100, [EMAIL PROTECTED]@mgedv.net wrote:

> but when loading the ucom/ubsa stuff before umass, the device will
> not be recognised as /dev/cdX and show up as a communication device
> (ucom).

What the card needs (as seen in the linux code) is the correct
"poking" (aka: sending the right init stuff), to make it show the serial
ports. I've not looked at this on FreeBSD, just on OpenBSD. On OpenBSD
I hooked it up to the umsm(4) driver, (since that is the most simple
USB-serial driver we've got) and added the poking. It works, I can dial.
However, sometimes the device starts resetting itself, instead of dialing,
so what I have is not yet perfect ;)

felix

changes to OpenBSD umsm(4) driver:

Index: sys/dev/usb/umsm.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umsm.c,v
retrieving revision 1.16
diff -u -r1.16 umsm.c
--- sys/dev/usb/umsm.c  19 Jun 2007 23:59:27 -0000      1.16
+++ sys/dev/usb/umsm.c  8 Sep 2007 19:50:44 -0000
@@ -58,6 +58,7 @@
        { USB_VENDOR_AIRPRIME,  USB_PRODUCT_AIRPRIME_PC5220 },
        { USB_VENDOR_DELL,      USB_PRODUCT_DELL_W5500 },
        { USB_VENDOR_KYOCERA2,  USB_PRODUCT_KYOCERA2_KPC650 },
+       { USB_VENDOR_HUAWEI,    USB_PRODUCT_HUAWEI_E220 },
        { USB_VENDOR_NOVATEL,   USB_PRODUCT_NOVATEL_EXPRESSCARD },
        { USB_VENDOR_NOVATEL,   USB_PRODUCT_NOVATEL_MERLINV620 },
        { USB_VENDOR_NOVATEL,   USB_PRODUCT_NOVATEL_S720 },
@@ -123,6 +124,25 @@
        devinfop = usbd_devinfo_alloc(uaa->device, 0);
        printf("\n%s: %s\n", sc->sc_dev.dv_xname, devinfop);
        usbd_devinfo_free(devinfop);
+
+       if(uaa->product == USB_PRODUCT_HUAWEI_E220) {
+               usb_device_request_t req;
+               usbd_status err;
+
+               req.bmRequestType = UT_WRITE_DEVICE;
+               req.bRequest = UR_SET_FEATURE;
+               USETW(req.wValue, 1);
+               USETW(req.wIndex, 0);
+               USETW(req.wLength, 0);
+               err = usbd_do_request(sc->sc_udev, &req, 0);
+
+               if (err) {
+                       printf("%s: failed to initialize device ",
+                                       sc->sc_dev.dv_xname);
+                       sc->sc_dying = 1;
+                       return;
+               }
+       }
 
        if (usbd_set_config_index(sc->sc_udev, UMSM_CONFIG_NO, 1) != 0) {
                printf("%s: could not set configuration no\n",
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to