Author: hselasky
Date: Tue Nov  1 08:24:01 2011
New Revision: 226984
URL: http://svn.freebsd.org/changeset/base/226984

Log:
  MFC r226903, r225777, r226221 and r226534:
  Add some new USB device IDs and some USB device quirks.
  Improve the USB mass storage auto quirk detection.
  
  PR:           usb/161798, usb/160911

Modified:
  stable/8/etc/devd/usb.conf
  stable/8/sys/dev/usb/quirk/usb_quirk.c
  stable/8/sys/dev/usb/usb_device.c
  stable/8/sys/dev/usb/usb_msctest.c
  stable/8/sys/dev/usb/usbdevs
  stable/8/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/etc/devd/usb.conf
==============================================================================
--- stable/8/etc/devd/usb.conf  Tue Nov  1 04:21:57 2011        (r226983)
+++ stable/8/etc/devd/usb.conf  Tue Nov  1 08:24:01 2011        (r226984)
@@ -565,6 +565,14 @@ nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
        match "vendor" "0x04e8";
+       match "product" "0x2018";
+       action "kldload if_run";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
+       match "vendor" "0x04e8";
        match "product" "(0x5f00|0x5f01|0x5f02|0x5f03|0x5f04)";
        action "kldload uipaq";
 };
@@ -741,7 +749,7 @@ nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
        match "vendor" "0x050d";
-       match "product" "(0x8053|0x805c|0x815c|0x825a)";
+       match "product" "(0x8053|0x805c|0x815c|0x825a|0x825b)";
        action "kldload if_run";
 };
 
@@ -1877,7 +1885,23 @@ nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
        match "vendor" "0x0af0";
-       match "product" 
"(0x5000|0x6000|0x6050|0x6100|0x6150|0x6200|0x6250|0x6300|0x6350|0x6500|0x6501|0x6600|0x6601|0x6701|0x6721|0x6741|0x6761|0x6800|0x6901)";
+       match "product" 
"(0x5000|0x6000|0x6050|0x6100|0x6150|0x6200|0x6250|0x6300|0x6350|0x6500|0x6501|0x6600|0x6601|0x6701)";
+       action "kldload u3g";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
+       match "vendor" "0x0af0";
+       match "product" "0x6711";
+       action "kldload uhso";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
+       match "vendor" "0x0af0";
+       match "product" "(0x6721|0x6741|0x6761|0x6800|0x6901)";
        action "kldload u3g";
 };
 
@@ -2069,7 +2093,7 @@ nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
        match "vendor" "0x0b95";
-       match "product" "(0x1720|0x1780|0x7720|0x772a)";
+       match "product" "(0x1720|0x1780|0x7720|0x772a|0x772b)";
        action "kldload if_axe";
 };
 
@@ -2500,6 +2524,14 @@ nomatch 32 {
 nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
+       match "vendor" "0x0f3d";
+       match "product" "0x68a3";
+       action "kldload usie";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
        match "vendor" "0x0f4e";
        match "product" "0x0200";
        action "kldload uipaq";
@@ -2789,13 +2821,37 @@ nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
        match "vendor" "0x1199";
-       match "product" 
"(0x0220|0x0224|0x0fff|0x6802|0x6803|0x6804|0x6805|0x6808|0x6809|0x6812|0x6813|0x6815|0x6816|0x6820|0x6821|0x6822|0x6832|0x6833|0x6834|0x6835|0x6838|0x6839|0x683a|0x683b|0x683c|0x683d|0x683e|0x6850|0x6851|0x6852|0x6853|0x6855|0x6856|0x6859|0x685a|0x6880|0x6890|0x6891|0x6892|0x6893|0x68a3)";
+       match "product" "(0x0220|0x0224|0x0fff)";
+       action "kldload u3g";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
+       match "vendor" "0x1199";
+       match "product" "0x0fff";
+       action "kldload usie";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
+       match "vendor" "0x1199";
+       match "product" 
"(0x6802|0x6803|0x6804|0x6805|0x6808|0x6809|0x6812|0x6813|0x6815|0x6816|0x6820|0x6821|0x6822|0x6832|0x6833|0x6834|0x6835|0x6838|0x6839|0x683a|0x683b|0x683c|0x683d|0x683e|0x6850|0x6851|0x6852|0x6853|0x6855|0x6856|0x6859|0x685a|0x6880|0x6890|0x6891|0x6892|0x6893|0x68a3)";
        action "kldload u3g";
 };
 
 nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
+       match "vendor" "0x1199";
+       match "product" "0x68a3";
+       action "kldload usie";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
        match "vendor" "0x11ad";
        match "product" "0x0701";
        action "kldload uplcom";
@@ -2869,7 +2925,7 @@ nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
        match "vendor" "0x12d1";
-       match "product" 
"(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1465|0x14ac|0x1520)";
+       match "product" 
"(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1465|0x14ac|0x1520|0x1c05|0x1c0b)";
        action "kldload u3g";
 };
 
@@ -2972,6 +3028,14 @@ nomatch 32 {
 nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
+       match "vendor" "0x13b1";
+       match "product" "0x002f";
+       action "kldload if_run";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
        match "vendor" "0x13d2";
        match "product" "0x0400";
        action "kldload if_kue";
@@ -3669,7 +3733,7 @@ nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
        match "vendor" "0x1c9e";
-       match "product" "(0x6061|0x9603|0xf000)";
+       match "product" "(0x6061|0x9603|0x9605|0xf000)";
        action "kldload u3g";
 };
 
@@ -4263,5 +4327,5 @@ nomatch 32 {
        action "kldload umass";
 };
 
-# 1634 USB entries processed
+# 1645 USB entries processed
 

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.c      Tue Nov  1 04:21:57 2011        
(r226983)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.c      Tue Nov  1 08:24:01 2011        
(r226984)
@@ -457,6 +457,14 @@ static struct usb_quirk_entry usb_quirks
        USB_QUIRK(ROLAND, SD80, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
        USB_QUIRK(ROLAND, UA700, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS),
        USB_QUIRK(MEDELI, DD305, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI, 
UQ_MATCH_VENDOR_ONLY),
+
+       /*
+        * Quirks for manufacturers which USB devices does not respond
+        * after issuing non-supported commands:
+        */
+       USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, 
UQ_MATCH_VENDOR_ONLY),
+       USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, 
UQ_MATCH_VENDOR_ONLY),
+       USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, 
UQ_MATCH_VENDOR_ONLY),
 };
 #undef USB_QUIRK_VP
 #undef USB_QUIRK

Modified: stable/8/sys/dev/usb/usb_device.c
==============================================================================
--- stable/8/sys/dev/usb/usb_device.c   Tue Nov  1 04:21:57 2011        
(r226983)
+++ stable/8/sys/dev/usb/usb_device.c   Tue Nov  1 08:24:01 2011        
(r226984)
@@ -1851,7 +1851,8 @@ repeat_set_config:
                }
        }
        if (set_config_failed == 0 && config_index == 0 &&
-           usb_test_quirk(&uaa, UQ_MSC_NO_SYNC_CACHE) == 0) {
+           usb_test_quirk(&uaa, UQ_MSC_NO_SYNC_CACHE) == 0 &&
+           usb_test_quirk(&uaa, UQ_MSC_NO_GETMAXLUN) == 0) {
 
                /*
                 * Try to figure out if there are any MSC quirks we

Modified: stable/8/sys/dev/usb/usb_msctest.c
==============================================================================
--- stable/8/sys/dev/usb/usb_msctest.c  Tue Nov  1 04:21:57 2011        
(r226983)
+++ stable/8/sys/dev/usb/usb_msctest.c  Tue Nov  1 08:24:01 2011        
(r226984)
@@ -604,6 +604,29 @@ usb_iface_is_cdrom(struct usb_device *ud
        return (is_cdrom);
 }
 
+static uint8_t
+usb_msc_get_max_lun(struct usb_device *udev, uint8_t iface_index)
+{
+       struct usb_device_request req;
+       usb_error_t err;
+       uint8_t buf = 0;
+
+
+       /* The Get Max Lun command is a class-specific request. */
+       req.bmRequestType = UT_READ_CLASS_INTERFACE;
+       req.bRequest = 0xFE;            /* GET_MAX_LUN */
+       USETW(req.wValue, 0);
+       req.wIndex[0] = iface_index;
+       req.wIndex[1] = 0;
+       USETW(req.wLength, 1);
+
+       err = usbd_do_request(udev, NULL, &req, &buf);
+       if (err)
+               buf = 0;
+
+       return (buf);
+}
+
 usb_error_t
 usb_msc_auto_quirk(struct usb_device *udev, uint8_t iface_index)
 {
@@ -623,6 +646,11 @@ usb_msc_auto_quirk(struct usb_device *ud
         */
        usb_pause_mtx(NULL, hz);
 
+       if (usb_msc_get_max_lun(udev, iface_index) == 0) {
+               DPRINTF("Device has only got one LUN.\n");
+               usbd_add_dynamic_quirk(udev, UQ_MSC_NO_GETMAXLUN);
+       }
+
        is_no_direct = 1;
        for (timeout = 4; timeout; timeout--) {
                err = bbb_command_start(sc, DIR_IN, 0, sc->buffer,

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs        Tue Nov  1 04:21:57 2011        
(r226983)
+++ stable/8/sys/dev/usb/usbdevs        Tue Nov  1 08:24:01 2011        
(r226984)
@@ -606,6 +606,7 @@ vendor BALTECH              0x13ad  Baltech
 vendor CISCOLINKSYS    0x13b1  Cisco-Linksys
 vendor SHARK           0x13d2  Shark
 vendor AZUREWAVE       0x13d3  AsureWave
+vendor INITIO          0x13fd  Initio Corporation
 vendor EMTEC           0x13fe  Emtec
 vendor NOVATEL         0x1410  Novatel Wireless
 vendor MERLIN          0x1416  Merlin
@@ -1142,6 +1143,7 @@ product BELKIN RT2870_1           0x8053  RT2870
 product BELKIN RT2870_2                0x805c  RT2870
 product BELKIN F5D8053V3       0x815c  F5D8053 v3
 product BELKIN F5D8055         0x825a  F5D8055
+product BELKIN F5D8055V2       0x825b  F5D8055 v2
 product BELKIN F5D9050V3       0x905b  F5D9050 ver 3 Wireless Adapter
 product BELKIN2 F5U002         0x0002  F5U002 Parallel printer
 product BELKIN F6D4050V1       0x935a  F6D4050 v1
@@ -1225,8 +1227,9 @@ product CISCOLINKSYS HU200TS      0x001a  HU20
 product CISCOLINKSYS WUSB54GC  0x0020  WUSB54GC
 product CISCOLINKSYS WUSB54GR  0x0023  WUSB54GR
 product CISCOLINKSYS WUSBF54G  0x0024  WUSBF54G
-product        CISCOLINKSYS2 RT3070    0x4001  RT3070
-product        CISCOLINKSYS3 RT3070    0x0101  RT3070
+product CISCOLINKSYS AE1000    0x002f  AE1000
+product CISCOLINKSYS2 RT3070   0x4001  RT3070
+product CISCOLINKSYS3 RT3070   0x0101  RT3070
 
 /* Clipsal products */
 product CLIPSAL 5500PCU                0x0303  5500PCU C-Bus
@@ -1567,6 +1570,7 @@ product EXTENDED XTNDACCESS       0x0100  XTNDA
 product FALCOM TWIST           0x0001  USB GSM/GPRS Modem
 
 /* FEIYA products */
+product FEIYA DUMMY            0x0000  Dummy product
 product FEIYA 5IN1             0x1132  5-in-1 Card Reader
 product FEIYA AC110            0x6300  AC-110 Card Reader
 
@@ -1884,6 +1888,10 @@ product IBM USBCDROMDRIVE        0x4427  USB CD-
 /* Imagination Technologies products */
 product IMAGINATION DBX1       0x2107  DBX1 DSP core
 
+/* Initio Corporation products */
+product INITIO DUMMY           0x0000  Dummy product
+product INITIO INIC_1610P      0x1e40  USB to SATA Bridge
+
 /* Inside Out Networks products */
 product INSIDEOUT EDGEPORT4    0x0001  EdgePort/4 serial ports
 
@@ -2774,6 +2782,7 @@ product RATOC REXUSB60F           0xb020  USB seri
 
 /* ReakTek products */
 /* Green House and CompUSA OEM this part */
+product REALTEK DUMMY          0x0000  Dummy product
 product REALTEK USB20CRW       0x0158  USB20CRW Card Reader
 product REALTEK USBKR100       0x8150  USBKR100 USB Ethernet
 product REALTEK RTL8187                0x8187  RTL8187 Wireless Adapter
@@ -2827,6 +2836,7 @@ product SAGEM XG760A              0x004a  XG-760A
 product SAGEM XG76NA           0x0062  XG-76NA
 
 /* Samsung products */
+product SAMSUNG WIS09ABGN      0x2018  WIS09ABGN Wireless LAN adapter
 product SAMSUNG ML6060         0x3008  ML-6060 laser printer
 product SAMSUNG YP_U2          0x5050  YP-U2 MP3 Player
 product SAMSUNG YP_U4          0x5092  YP-U4 MP3 Player

Modified: stable/8/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/8/sys/dev/usb/wlan/if_run.c  Tue Nov  1 04:21:57 2011        
(r226983)
+++ stable/8/sys/dev/usb/wlan/if_run.c  Tue Nov  1 08:24:01 2011        
(r226984)
@@ -144,9 +144,11 @@ static const STRUCT_USB_HOST_ID run_devs
     RUN_DEV(AZUREWAVE,         RT3070_3),
     RUN_DEV(BELKIN,            F5D8053V3),
     RUN_DEV(BELKIN,            F5D8055),
+    RUN_DEV(BELKIN,            F5D8055V2),
     RUN_DEV(BELKIN,            F6D4050V1),
     RUN_DEV(BELKIN,            RT2870_1),
     RUN_DEV(BELKIN,            RT2870_2),
+    RUN_DEV(CISCOLINKSYS,      AE1000),
     RUN_DEV(CISCOLINKSYS2,     RT3070),
     RUN_DEV(CISCOLINKSYS3,     RT3070),
     RUN_DEV(CONCEPTRONIC2,     RT2870_1),
@@ -247,6 +249,7 @@ static const STRUCT_USB_HOST_ID run_devs
     RUN_DEV(RALINK,            RT3370),
     RUN_DEV(RALINK,            RT3572),
     RUN_DEV(RALINK,            RT8070),
+    RUN_DEV(SAMSUNG,           WIS09ABGN),
     RUN_DEV(SAMSUNG2,          RT2870_1),
     RUN_DEV(SENAO,             RT2870_1),
     RUN_DEV(SENAO,             RT2870_2),
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to