diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ata/pata_pcmcia.c | 4 | ||||
| -rw-r--r-- | drivers/ide/ide-cs.c | 4 | ||||
| -rw-r--r-- | drivers/input/joydev.c | 18 | ||||
| -rw-r--r-- | drivers/input/misc/ati_remote.c | 14 | ||||
| -rw-r--r-- | drivers/input/mouse/alps.c | 1 | ||||
| -rw-r--r-- | drivers/input/mouse/elantech.c | 84 | ||||
| -rw-r--r-- | drivers/input/mouse/psmouse-base.c | 18 | ||||
| -rw-r--r-- | drivers/input/mouse/psmouse.h | 1 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.c | 35 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.h | 4 | ||||
| -rw-r--r-- | drivers/input/touchscreen/eeti_ts.c | 56 | ||||
| -rw-r--r-- | drivers/mtd/internal.h | 0 | ||||
| -rw-r--r-- | drivers/mtd/mtdbdi.c | 0 | ||||
| -rw-r--r-- | drivers/net/arm/ep93xx_eth.c | 10 | ||||
| -rw-r--r-- | drivers/net/e1000e/netdev.c | 3 | ||||
| -rw-r--r-- | drivers/net/fec.c | 2 | ||||
| -rw-r--r-- | drivers/net/phy/Kconfig | 5 | ||||
| -rw-r--r-- | drivers/net/phy/Makefile | 1 | ||||
| -rw-r--r-- | drivers/net/phy/micrel.c | 104 | ||||
| -rw-r--r-- | drivers/net/ppp_generic.c | 34 | ||||
| -rw-r--r-- | drivers/net/r8169.c | 22 | ||||
| -rw-r--r-- | drivers/net/sb1250-mac.c | 67 | ||||
| -rw-r--r-- | drivers/net/usb/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/net/usb/dm9601.c | 2 | ||||
| -rw-r--r-- | drivers/net/usb/sierra_net.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/p54/p54pci.c | 2 |
26 files changed, 379 insertions, 116 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 4164dd244dd0..d94b8f0bd743 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
| @@ -424,7 +424,7 @@ static struct pcmcia_device_id pcmcia_devices[] = { | |||
| 424 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), | 424 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), |
| 425 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), | 425 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), |
| 426 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), | 426 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), |
| 427 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17), | 427 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb), |
| 428 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), | 428 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), |
| 429 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), | 429 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), |
| 430 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), | 430 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), |
| @@ -446,7 +446,7 @@ static struct pcmcia_device_id pcmcia_devices[] = { | |||
| 446 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), | 446 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), |
| 447 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), | 447 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), |
| 448 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), | 448 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), |
| 449 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d), | 449 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133), |
| 450 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), | 450 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), |
| 451 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), | 451 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), |
| 452 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), | 452 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), |
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index defce2877eef..b85450865ff0 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
| @@ -409,7 +409,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
| 409 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), | 409 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), |
| 410 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), | 410 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), |
| 411 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), | 411 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), |
| 412 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17), | 412 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb), |
| 413 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), | 413 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), |
| 414 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), | 414 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), |
| 415 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), | 415 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), |
| @@ -431,7 +431,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
| 431 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), | 431 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), |
| 432 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), | 432 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), |
| 433 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), | 433 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), |
| 434 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d), | 434 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133), |
| 435 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), | 435 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), |
| 436 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), | 436 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), |
| 437 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), | 437 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index c52bec4d0530..423e0e6031ab 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
| @@ -929,6 +929,24 @@ static const struct input_device_id joydev_ids[] = { | |||
| 929 | .evbit = { BIT_MASK(EV_ABS) }, | 929 | .evbit = { BIT_MASK(EV_ABS) }, |
| 930 | .absbit = { BIT_MASK(ABS_THROTTLE) }, | 930 | .absbit = { BIT_MASK(ABS_THROTTLE) }, |
| 931 | }, | 931 | }, |
| 932 | { | ||
| 933 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | ||
| 934 | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
| 935 | .evbit = { BIT_MASK(EV_KEY) }, | ||
| 936 | .keybit = {[BIT_WORD(BTN_JOYSTICK)] = BIT_MASK(BTN_JOYSTICK) }, | ||
| 937 | }, | ||
| 938 | { | ||
| 939 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | ||
| 940 | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
| 941 | .evbit = { BIT_MASK(EV_KEY) }, | ||
| 942 | .keybit = { [BIT_WORD(BTN_GAMEPAD)] = BIT_MASK(BTN_GAMEPAD) }, | ||
| 943 | }, | ||
| 944 | { | ||
| 945 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | ||
| 946 | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
| 947 | .evbit = { BIT_MASK(EV_KEY) }, | ||
| 948 | .keybit = { [BIT_WORD(BTN_TRIGGER_HAPPY)] = BIT_MASK(BTN_TRIGGER_HAPPY) }, | ||
| 949 | }, | ||
| 932 | { } /* Terminating entry */ | 950 | { } /* Terminating entry */ |
| 933 | }; | 951 | }; |
| 934 | 952 | ||
diff --git a/drivers/input/misc/ati_remote.c b/drivers/input/misc/ati_remote.c index 614b65d78fe9..e8bbc619f6df 100644 --- a/drivers/input/misc/ati_remote.c +++ b/drivers/input/misc/ati_remote.c | |||
| @@ -98,10 +98,12 @@ | |||
| 98 | * Module and Version Information, Module Parameters | 98 | * Module and Version Information, Module Parameters |
| 99 | */ | 99 | */ |
| 100 | 100 | ||
| 101 | #define ATI_REMOTE_VENDOR_ID 0x0bc7 | 101 | #define ATI_REMOTE_VENDOR_ID 0x0bc7 |
| 102 | #define ATI_REMOTE_PRODUCT_ID 0x004 | 102 | #define LOLA_REMOTE_PRODUCT_ID 0x0002 |
| 103 | #define LOLA_REMOTE_PRODUCT_ID 0x002 | 103 | #define LOLA2_REMOTE_PRODUCT_ID 0x0003 |
| 104 | #define MEDION_REMOTE_PRODUCT_ID 0x006 | 104 | #define ATI_REMOTE_PRODUCT_ID 0x0004 |
| 105 | #define NVIDIA_REMOTE_PRODUCT_ID 0x0005 | ||
| 106 | #define MEDION_REMOTE_PRODUCT_ID 0x0006 | ||
| 105 | 107 | ||
| 106 | #define DRIVER_VERSION "2.2.1" | 108 | #define DRIVER_VERSION "2.2.1" |
| 107 | #define DRIVER_AUTHOR "Torrey Hoffman <thoffman@arnor.net>" | 109 | #define DRIVER_AUTHOR "Torrey Hoffman <thoffman@arnor.net>" |
| @@ -142,8 +144,10 @@ MODULE_PARM_DESC(repeat_delay, "Delay before sending repeats, default = 500 msec | |||
| 142 | #define err(format, arg...) printk(KERN_ERR format , ## arg) | 144 | #define err(format, arg...) printk(KERN_ERR format , ## arg) |
| 143 | 145 | ||
| 144 | static struct usb_device_id ati_remote_table[] = { | 146 | static struct usb_device_id ati_remote_table[] = { |
| 145 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, ATI_REMOTE_PRODUCT_ID) }, | ||
| 146 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) }, | 147 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) }, |
| 148 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA2_REMOTE_PRODUCT_ID) }, | ||
| 149 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, ATI_REMOTE_PRODUCT_ID) }, | ||
| 150 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, NVIDIA_REMOTE_PRODUCT_ID) }, | ||
| 147 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, MEDION_REMOTE_PRODUCT_ID) }, | 151 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, MEDION_REMOTE_PRODUCT_ID) }, |
| 148 | {} /* Terminating entry */ | 152 | {} /* Terminating entry */ |
| 149 | }; | 153 | }; |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 0d22cb9ce42e..99d58764ef03 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
| @@ -64,7 +64,6 @@ static const struct alps_model_info alps_model_data[] = { | |||
| 64 | { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, | 64 | { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, |
| 65 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, | 65 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, |
| 66 | { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ | 66 | { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ |
| 67 | { { 0x73, 0x02, 0x64 }, 0xf8, 0xf8, 0 }, /* HP Pavilion dm3 */ | ||
| 68 | { { 0x52, 0x01, 0x14 }, 0xff, 0xff, | 67 | { { 0x52, 0x01, 0x14 }, 0xff, 0xff, |
| 69 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ | 68 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ |
| 70 | }; | 69 | }; |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index a138b5da79f9..0520c2e19927 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
| @@ -25,6 +25,10 @@ | |||
| 25 | printk(KERN_DEBUG format, ##arg); \ | 25 | printk(KERN_DEBUG format, ##arg); \ |
| 26 | } while (0) | 26 | } while (0) |
| 27 | 27 | ||
| 28 | static bool force_elantech; | ||
| 29 | module_param_named(force_elantech, force_elantech, bool, 0644); | ||
| 30 | MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default)."); | ||
| 31 | |||
| 28 | /* | 32 | /* |
| 29 | * Send a Synaptics style sliced query command | 33 | * Send a Synaptics style sliced query command |
| 30 | */ | 34 | */ |
| @@ -182,13 +186,17 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) | |||
| 182 | static int old_fingers; | 186 | static int old_fingers; |
| 183 | 187 | ||
| 184 | if (etd->fw_version_maj == 0x01) { | 188 | if (etd->fw_version_maj == 0x01) { |
| 185 | /* byte 0: D U p1 p2 1 p3 R L | 189 | /* |
| 186 | byte 1: f 0 th tw x9 x8 y9 y8 */ | 190 | * byte 0: D U p1 p2 1 p3 R L |
| 191 | * byte 1: f 0 th tw x9 x8 y9 y8 | ||
| 192 | */ | ||
| 187 | fingers = ((packet[1] & 0x80) >> 7) + | 193 | fingers = ((packet[1] & 0x80) >> 7) + |
| 188 | ((packet[1] & 0x30) >> 4); | 194 | ((packet[1] & 0x30) >> 4); |
| 189 | } else { | 195 | } else { |
| 190 | /* byte 0: n1 n0 p2 p1 1 p3 R L | 196 | /* |
| 191 | byte 1: 0 0 0 0 x9 x8 y9 y8 */ | 197 | * byte 0: n1 n0 p2 p1 1 p3 R L |
| 198 | * byte 1: 0 0 0 0 x9 x8 y9 y8 | ||
| 199 | */ | ||
| 192 | fingers = (packet[0] & 0xc0) >> 6; | 200 | fingers = (packet[0] & 0xc0) >> 6; |
| 193 | } | 201 | } |
| 194 | 202 | ||
| @@ -202,13 +210,15 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) | |||
| 202 | 210 | ||
| 203 | input_report_key(dev, BTN_TOUCH, fingers != 0); | 211 | input_report_key(dev, BTN_TOUCH, fingers != 0); |
| 204 | 212 | ||
| 205 | /* byte 2: x7 x6 x5 x4 x3 x2 x1 x0 | 213 | /* |
| 206 | byte 3: y7 y6 y5 y4 y3 y2 y1 y0 */ | 214 | * byte 2: x7 x6 x5 x4 x3 x2 x1 x0 |
| 215 | * byte 3: y7 y6 y5 y4 y3 y2 y1 y0 | ||
| 216 | */ | ||
| 207 | if (fingers) { | 217 | if (fingers) { |
| 208 | input_report_abs(dev, ABS_X, | 218 | input_report_abs(dev, ABS_X, |
| 209 | ((packet[1] & 0x0c) << 6) | packet[2]); | 219 | ((packet[1] & 0x0c) << 6) | packet[2]); |
| 210 | input_report_abs(dev, ABS_Y, ETP_YMAX_V1 - | 220 | input_report_abs(dev, ABS_Y, |
| 211 | (((packet[1] & 0x03) << 8) | packet[3])); | 221 | ETP_YMAX_V1 - (((packet[1] & 0x03) << 8) | packet[3])); |
| 212 | } | 222 | } |
| 213 | 223 | ||
| 214 | input_report_key(dev, BTN_TOOL_FINGER, fingers == 1); | 224 | input_report_key(dev, BTN_TOOL_FINGER, fingers == 1); |
| @@ -247,34 +257,47 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse) | |||
| 247 | 257 | ||
| 248 | switch (fingers) { | 258 | switch (fingers) { |
| 249 | case 1: | 259 | case 1: |
| 250 | /* byte 1: x15 x14 x13 x12 x11 x10 x9 x8 | 260 | /* |
| 251 | byte 2: x7 x6 x5 x4 x4 x2 x1 x0 */ | 261 | * byte 1: . . . . . x10 x9 x8 |
| 252 | input_report_abs(dev, ABS_X, (packet[1] << 8) | packet[2]); | 262 | * byte 2: x7 x6 x5 x4 x4 x2 x1 x0 |
| 253 | /* byte 4: y15 y14 y13 y12 y11 y10 y8 y8 | 263 | */ |
| 254 | byte 5: y7 y6 y5 y4 y3 y2 y1 y0 */ | 264 | input_report_abs(dev, ABS_X, |
| 255 | input_report_abs(dev, ABS_Y, ETP_YMAX_V2 - | 265 | ((packet[1] & 0x07) << 8) | packet[2]); |
| 256 | ((packet[4] << 8) | packet[5])); | 266 | /* |
| 267 | * byte 4: . . . . . . y9 y8 | ||
| 268 | * byte 5: y7 y6 y5 y4 y3 y2 y1 y0 | ||
| 269 | */ | ||
| 270 | input_report_abs(dev, ABS_Y, | ||
| 271 | ETP_YMAX_V2 - (((packet[4] & 0x03) << 8) | packet[5])); | ||
| 257 | break; | 272 | break; |
| 258 | 273 | ||
| 259 | case 2: | 274 | case 2: |
| 260 | /* The coordinate of each finger is reported separately with | 275 | /* |
| 261 | a lower resolution for two finger touches */ | 276 | * The coordinate of each finger is reported separately |
| 262 | /* byte 0: . . ay8 ax8 . . . . | 277 | * with a lower resolution for two finger touches: |
| 263 | byte 1: ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 */ | 278 | * byte 0: . . ay8 ax8 . . . . |
| 279 | * byte 1: ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 | ||
| 280 | */ | ||
| 264 | x1 = ((packet[0] & 0x10) << 4) | packet[1]; | 281 | x1 = ((packet[0] & 0x10) << 4) | packet[1]; |
| 265 | /* byte 2: ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0 */ | 282 | /* byte 2: ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0 */ |
| 266 | y1 = ETP_2FT_YMAX - (((packet[0] & 0x20) << 3) | packet[2]); | 283 | y1 = ETP_2FT_YMAX - (((packet[0] & 0x20) << 3) | packet[2]); |
| 267 | /* byte 3: . . by8 bx8 . . . . | 284 | /* |
| 268 | byte 4: bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 */ | 285 | * byte 3: . . by8 bx8 . . . . |
| 286 | * byte 4: bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 | ||
| 287 | */ | ||
| 269 | x2 = ((packet[3] & 0x10) << 4) | packet[4]; | 288 | x2 = ((packet[3] & 0x10) << 4) | packet[4]; |
| 270 | /* byte 5: by7 by8 by5 by4 by3 by2 by1 by0 */ | 289 | /* byte 5: by7 by8 by5 by4 by3 by2 by1 by0 */ |
| 271 | y2 = ETP_2FT_YMAX - (((packet[3] & 0x20) << 3) | packet[5]); | 290 | y2 = ETP_2FT_YMAX - (((packet[3] & 0x20) << 3) | packet[5]); |
| 272 | /* For compatibility with the X Synaptics driver scale up one | 291 | /* |
| 273 | coordinate and report as ordinary mouse movent */ | 292 | * For compatibility with the X Synaptics driver scale up |
| 293 | * one coordinate and report as ordinary mouse movent | ||
| 294 | */ | ||
| 274 | input_report_abs(dev, ABS_X, x1 << 2); | 295 | input_report_abs(dev, ABS_X, x1 << 2); |
| 275 | input_report_abs(dev, ABS_Y, y1 << 2); | 296 | input_report_abs(dev, ABS_Y, y1 << 2); |
| 276 | /* For compatibility with the proprietary X Elantech driver | 297 | /* |
| 277 | report both coordinates as hat coordinates */ | 298 | * For compatibility with the proprietary X Elantech driver |
| 299 | * report both coordinates as hat coordinates | ||
| 300 | */ | ||
| 278 | input_report_abs(dev, ABS_HAT0X, x1); | 301 | input_report_abs(dev, ABS_HAT0X, x1); |
| 279 | input_report_abs(dev, ABS_HAT0Y, y1); | 302 | input_report_abs(dev, ABS_HAT0Y, y1); |
| 280 | input_report_abs(dev, ABS_HAT1X, x2); | 303 | input_report_abs(dev, ABS_HAT1X, x2); |
| @@ -596,8 +619,12 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties) | |||
| 596 | param[0], param[1], param[2]); | 619 | param[0], param[1], param[2]); |
| 597 | 620 | ||
| 598 | if (param[0] == 0 || param[1] != 0) { | 621 | if (param[0] == 0 || param[1] != 0) { |
| 599 | pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); | 622 | if (!force_elantech) { |
| 600 | return -1; | 623 | pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); |
| 624 | return -1; | ||
| 625 | } | ||
| 626 | |||
| 627 | pr_debug("elantech.c: Probably not a real Elantech touchpad. Enabling anyway due to force_elantech.\n"); | ||
| 601 | } | 628 | } |
| 602 | 629 | ||
| 603 | if (set_properties) { | 630 | if (set_properties) { |
| @@ -666,7 +693,8 @@ int elantech_init(struct psmouse *psmouse) | |||
| 666 | * Assume every version greater than this is new EeePC style | 693 | * Assume every version greater than this is new EeePC style |
| 667 | * hardware with 6 byte packets | 694 | * hardware with 6 byte packets |
| 668 | */ | 695 | */ |
| 669 | if (etd->fw_version_maj >= 0x02 && etd->fw_version_min >= 0x30) { | 696 | if ((etd->fw_version_maj == 0x02 && etd->fw_version_min >= 0x30) || |
| 697 | etd->fw_version_maj > 0x02) { | ||
| 670 | etd->hw_version = 2; | 698 | etd->hw_version = 2; |
| 671 | /* For now show extra debug information */ | 699 | /* For now show extra debug information */ |
| 672 | etd->debug = 1; | 700 | etd->debug = 1; |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index d8c0c8d6992c..cbc807264940 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
| @@ -110,6 +110,7 @@ static struct workqueue_struct *kpsmoused_wq; | |||
| 110 | struct psmouse_protocol { | 110 | struct psmouse_protocol { |
| 111 | enum psmouse_type type; | 111 | enum psmouse_type type; |
| 112 | bool maxproto; | 112 | bool maxproto; |
| 113 | bool ignore_parity; /* Protocol should ignore parity errors from KBC */ | ||
| 113 | const char *name; | 114 | const char *name; |
| 114 | const char *alias; | 115 | const char *alias; |
| 115 | int (*detect)(struct psmouse *, bool); | 116 | int (*detect)(struct psmouse *, bool); |
| @@ -288,7 +289,9 @@ static irqreturn_t psmouse_interrupt(struct serio *serio, | |||
| 288 | if (psmouse->state == PSMOUSE_IGNORE) | 289 | if (psmouse->state == PSMOUSE_IGNORE) |
| 289 | goto out; | 290 | goto out; |
| 290 | 291 | ||
| 291 | if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) { | 292 | if (unlikely((flags & SERIO_TIMEOUT) || |
| 293 | ((flags & SERIO_PARITY) && !psmouse->ignore_parity))) { | ||
| 294 | |||
| 292 | if (psmouse->state == PSMOUSE_ACTIVATED) | 295 | if (psmouse->state == PSMOUSE_ACTIVATED) |
| 293 | printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n", | 296 | printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n", |
| 294 | flags & SERIO_TIMEOUT ? " timeout" : "", | 297 | flags & SERIO_TIMEOUT ? " timeout" : "", |
| @@ -759,6 +762,7 @@ static const struct psmouse_protocol psmouse_protocols[] = { | |||
| 759 | .name = "PS/2", | 762 | .name = "PS/2", |
| 760 | .alias = "bare", | 763 | .alias = "bare", |
| 761 | .maxproto = true, | 764 | .maxproto = true, |
| 765 | .ignore_parity = true, | ||
| 762 | .detect = ps2bare_detect, | 766 | .detect = ps2bare_detect, |
| 763 | }, | 767 | }, |
| 764 | #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP | 768 | #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP |
| @@ -786,6 +790,7 @@ static const struct psmouse_protocol psmouse_protocols[] = { | |||
| 786 | .name = "ImPS/2", | 790 | .name = "ImPS/2", |
| 787 | .alias = "imps", | 791 | .alias = "imps", |
| 788 | .maxproto = true, | 792 | .maxproto = true, |
| 793 | .ignore_parity = true, | ||
| 789 | .detect = intellimouse_detect, | 794 | .detect = intellimouse_detect, |
| 790 | }, | 795 | }, |
| 791 | { | 796 | { |
| @@ -793,6 +798,7 @@ static const struct psmouse_protocol psmouse_protocols[] = { | |||
| 793 | .name = "ImExPS/2", | 798 | .name = "ImExPS/2", |
| 794 | .alias = "exps", | 799 | .alias = "exps", |
| 795 | .maxproto = true, | 800 | .maxproto = true, |
| 801 | .ignore_parity = true, | ||
| 796 | .detect = im_explorer_detect, | 802 | .detect = im_explorer_detect, |
| 797 | }, | 803 | }, |
| 798 | #ifdef CONFIG_MOUSE_PS2_SYNAPTICS | 804 | #ifdef CONFIG_MOUSE_PS2_SYNAPTICS |
| @@ -1222,6 +1228,7 @@ static void psmouse_disconnect(struct serio *serio) | |||
| 1222 | static int psmouse_switch_protocol(struct psmouse *psmouse, | 1228 | static int psmouse_switch_protocol(struct psmouse *psmouse, |
| 1223 | const struct psmouse_protocol *proto) | 1229 | const struct psmouse_protocol *proto) |
| 1224 | { | 1230 | { |
| 1231 | const struct psmouse_protocol *selected_proto; | ||
| 1225 | struct input_dev *input_dev = psmouse->dev; | 1232 | struct input_dev *input_dev = psmouse->dev; |
| 1226 | 1233 | ||
| 1227 | input_dev->dev.parent = &psmouse->ps2dev.serio->dev; | 1234 | input_dev->dev.parent = &psmouse->ps2dev.serio->dev; |
| @@ -1245,9 +1252,14 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, | |||
| 1245 | return -1; | 1252 | return -1; |
| 1246 | 1253 | ||
| 1247 | psmouse->type = proto->type; | 1254 | psmouse->type = proto->type; |
| 1248 | } else | 1255 | selected_proto = proto; |
| 1256 | } else { | ||
| 1249 | psmouse->type = psmouse_extensions(psmouse, | 1257 | psmouse->type = psmouse_extensions(psmouse, |
| 1250 | psmouse_max_proto, true); | 1258 | psmouse_max_proto, true); |
| 1259 | selected_proto = psmouse_protocol_by_type(psmouse->type); | ||
| 1260 | } | ||
| 1261 | |||
| 1262 | psmouse->ignore_parity = selected_proto->ignore_parity; | ||
| 1251 | 1263 | ||
| 1252 | /* | 1264 | /* |
| 1253 | * If mouse's packet size is 3 there is no point in polling the | 1265 | * If mouse's packet size is 3 there is no point in polling the |
| @@ -1267,7 +1279,7 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, | |||
| 1267 | psmouse->resync_time = 0; | 1279 | psmouse->resync_time = 0; |
| 1268 | 1280 | ||
| 1269 | snprintf(psmouse->devname, sizeof(psmouse->devname), "%s %s %s", | 1281 | snprintf(psmouse->devname, sizeof(psmouse->devname), "%s %s %s", |
| 1270 | psmouse_protocol_by_type(psmouse->type)->name, psmouse->vendor, psmouse->name); | 1282 | selected_proto->name, psmouse->vendor, psmouse->name); |
| 1271 | 1283 | ||
| 1272 | input_dev->name = psmouse->devname; | 1284 | input_dev->name = psmouse->devname; |
| 1273 | input_dev->phys = psmouse->phys; | 1285 | input_dev->phys = psmouse->phys; |
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index e053bdd137ff..593e910bfc7a 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h | |||
| @@ -47,6 +47,7 @@ struct psmouse { | |||
| 47 | unsigned char pktcnt; | 47 | unsigned char pktcnt; |
| 48 | unsigned char pktsize; | 48 | unsigned char pktsize; |
| 49 | unsigned char type; | 49 | unsigned char type; |
| 50 | bool ignore_parity; | ||
| 50 | bool acks_disable_command; | 51 | bool acks_disable_command; |
| 51 | unsigned int model; | 52 | unsigned int model; |
| 52 | unsigned long last; | 53 | unsigned long last; |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 026df6010161..ebd7a99efeae 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
| @@ -137,7 +137,8 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
| 137 | if (synaptics_send_cmd(psmouse, SYN_QUE_CAPABILITIES, cap)) | 137 | if (synaptics_send_cmd(psmouse, SYN_QUE_CAPABILITIES, cap)) |
| 138 | return -1; | 138 | return -1; |
| 139 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | 139 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; |
| 140 | priv->ext_cap = 0; | 140 | priv->ext_cap = priv->ext_cap_0c = 0; |
| 141 | |||
| 141 | if (!SYN_CAP_VALID(priv->capabilities)) | 142 | if (!SYN_CAP_VALID(priv->capabilities)) |
| 142 | return -1; | 143 | return -1; |
| 143 | 144 | ||
| @@ -150,7 +151,7 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
| 150 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 1) { | 151 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 1) { |
| 151 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB, cap)) { | 152 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB, cap)) { |
| 152 | printk(KERN_ERR "Synaptics claims to have extended capabilities," | 153 | printk(KERN_ERR "Synaptics claims to have extended capabilities," |
| 153 | " but I'm not able to read them."); | 154 | " but I'm not able to read them.\n"); |
| 154 | } else { | 155 | } else { |
| 155 | priv->ext_cap = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | 156 | priv->ext_cap = (cap[0] << 16) | (cap[1] << 8) | cap[2]; |
| 156 | 157 | ||
| @@ -162,6 +163,16 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
| 162 | priv->ext_cap &= 0xff0fff; | 163 | priv->ext_cap &= 0xff0fff; |
| 163 | } | 164 | } |
| 164 | } | 165 | } |
| 166 | |||
| 167 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 4) { | ||
| 168 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB_0C, cap)) { | ||
| 169 | printk(KERN_ERR "Synaptics claims to have extended capability 0x0c," | ||
| 170 | " but I'm not able to read it.\n"); | ||
| 171 | } else { | ||
| 172 | priv->ext_cap_0c = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 165 | return 0; | 176 | return 0; |
| 166 | } | 177 | } |
| 167 | 178 | ||
| @@ -348,7 +359,15 @@ static void synaptics_parse_hw_state(unsigned char buf[], struct synaptics_data | |||
| 348 | hw->left = (buf[0] & 0x01) ? 1 : 0; | 359 | hw->left = (buf[0] & 0x01) ? 1 : 0; |
| 349 | hw->right = (buf[0] & 0x02) ? 1 : 0; | 360 | hw->right = (buf[0] & 0x02) ? 1 : 0; |
| 350 | 361 | ||
| 351 | if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) { | 362 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { |
| 363 | /* | ||
| 364 | * Clickpad's button is transmitted as middle button, | ||
| 365 | * however, since it is primary button, we will report | ||
| 366 | * it as BTN_LEFT. | ||
| 367 | */ | ||
| 368 | hw->left = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; | ||
| 369 | |||
| 370 | } else if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) { | ||
| 352 | hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; | 371 | hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; |
| 353 | if (hw->w == 2) | 372 | if (hw->w == 2) |
| 354 | hw->scroll = (signed char)(buf[1]); | 373 | hw->scroll = (signed char)(buf[1]); |
| @@ -593,6 +612,12 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv) | |||
| 593 | 612 | ||
| 594 | dev->absres[ABS_X] = priv->x_res; | 613 | dev->absres[ABS_X] = priv->x_res; |
| 595 | dev->absres[ABS_Y] = priv->y_res; | 614 | dev->absres[ABS_Y] = priv->y_res; |
| 615 | |||
| 616 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { | ||
| 617 | /* Clickpads report only left button */ | ||
| 618 | __clear_bit(BTN_RIGHT, dev->keybit); | ||
| 619 | __clear_bit(BTN_MIDDLE, dev->keybit); | ||
| 620 | } | ||
| 596 | } | 621 | } |
| 597 | 622 | ||
| 598 | static void synaptics_disconnect(struct psmouse *psmouse) | 623 | static void synaptics_disconnect(struct psmouse *psmouse) |
| @@ -697,10 +722,10 @@ int synaptics_init(struct psmouse *psmouse) | |||
| 697 | 722 | ||
| 698 | priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; | 723 | priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; |
| 699 | 724 | ||
| 700 | printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx\n", | 725 | printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx/%#lx\n", |
| 701 | SYN_ID_MODEL(priv->identity), | 726 | SYN_ID_MODEL(priv->identity), |
| 702 | SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), | 727 | SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), |
| 703 | priv->model_id, priv->capabilities, priv->ext_cap); | 728 | priv->model_id, priv->capabilities, priv->ext_cap, priv->ext_cap_0c); |
| 704 | 729 | ||
| 705 | set_input_params(psmouse->dev, priv); | 730 | set_input_params(psmouse->dev, priv); |
| 706 | 731 | ||
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index f0f40a331dc8..ae37c5d162a4 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #define SYN_QUE_SERIAL_NUMBER_SUFFIX 0x07 | 18 | #define SYN_QUE_SERIAL_NUMBER_SUFFIX 0x07 |
| 19 | #define SYN_QUE_RESOLUTION 0x08 | 19 | #define SYN_QUE_RESOLUTION 0x08 |
| 20 | #define SYN_QUE_EXT_CAPAB 0x09 | 20 | #define SYN_QUE_EXT_CAPAB 0x09 |
| 21 | #define SYN_QUE_EXT_CAPAB_0C 0x0c | ||
| 21 | 22 | ||
| 22 | /* synatics modes */ | 23 | /* synatics modes */ |
| 23 | #define SYN_BIT_ABSOLUTE_MODE (1 << 7) | 24 | #define SYN_BIT_ABSOLUTE_MODE (1 << 7) |
| @@ -48,6 +49,8 @@ | |||
| 48 | #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) | 49 | #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) |
| 49 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) | 50 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) |
| 50 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) | 51 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) |
| 52 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) | ||
| 53 | #define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100100) | ||
| 51 | 54 | ||
| 52 | /* synaptics modes query bits */ | 55 | /* synaptics modes query bits */ |
| 53 | #define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) | 56 | #define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) |
| @@ -96,6 +99,7 @@ struct synaptics_data { | |||
| 96 | unsigned long int model_id; /* Model-ID */ | 99 | unsigned long int model_id; /* Model-ID */ |
| 97 | unsigned long int capabilities; /* Capabilities */ | 100 | unsigned long int capabilities; /* Capabilities */ |
| 98 | unsigned long int ext_cap; /* Extended Capabilities */ | 101 | unsigned long int ext_cap; /* Extended Capabilities */ |
| 102 | unsigned long int ext_cap_0c; /* Ext Caps from 0x0c query */ | ||
| 99 | unsigned long int identity; /* Identification */ | 103 | unsigned long int identity; /* Identification */ |
| 100 | int x_res; /* X resolution in units/mm */ | 104 | int x_res; /* X resolution in units/mm */ |
| 101 | int y_res; /* Y resolution in units/mm */ | 105 | int y_res; /* Y resolution in units/mm */ |
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 204b8a1a601c..75f8b73010fa 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c | |||
| @@ -124,14 +124,25 @@ static irqreturn_t eeti_ts_isr(int irq, void *dev_id) | |||
| 124 | return IRQ_HANDLED; | 124 | return IRQ_HANDLED; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | static int eeti_ts_open(struct input_dev *dev) | 127 | static void eeti_ts_start(struct eeti_ts_priv *priv) |
| 128 | { | 128 | { |
| 129 | struct eeti_ts_priv *priv = input_get_drvdata(dev); | ||
| 130 | |||
| 131 | enable_irq(priv->irq); | 129 | enable_irq(priv->irq); |
| 132 | 130 | ||
| 133 | /* Read the events once to arm the IRQ */ | 131 | /* Read the events once to arm the IRQ */ |
| 134 | eeti_ts_read(&priv->work); | 132 | eeti_ts_read(&priv->work); |
| 133 | } | ||
| 134 | |||
| 135 | static void eeti_ts_stop(struct eeti_ts_priv *priv) | ||
| 136 | { | ||
| 137 | disable_irq(priv->irq); | ||
| 138 | cancel_work_sync(&priv->work); | ||
| 139 | } | ||
| 140 | |||
| 141 | static int eeti_ts_open(struct input_dev *dev) | ||
| 142 | { | ||
| 143 | struct eeti_ts_priv *priv = input_get_drvdata(dev); | ||
| 144 | |||
| 145 | eeti_ts_start(priv); | ||
| 135 | 146 | ||
| 136 | return 0; | 147 | return 0; |
| 137 | } | 148 | } |
| @@ -140,8 +151,7 @@ static void eeti_ts_close(struct input_dev *dev) | |||
| 140 | { | 151 | { |
| 141 | struct eeti_ts_priv *priv = input_get_drvdata(dev); | 152 | struct eeti_ts_priv *priv = input_get_drvdata(dev); |
| 142 | 153 | ||
| 143 | disable_irq(priv->irq); | 154 | eeti_ts_stop(priv); |
| 144 | cancel_work_sync(&priv->work); | ||
| 145 | } | 155 | } |
| 146 | 156 | ||
| 147 | static int __devinit eeti_ts_probe(struct i2c_client *client, | 157 | static int __devinit eeti_ts_probe(struct i2c_client *client, |
| @@ -153,10 +163,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, | |||
| 153 | unsigned int irq_flags; | 163 | unsigned int irq_flags; |
| 154 | int err = -ENOMEM; | 164 | int err = -ENOMEM; |
| 155 | 165 | ||
| 156 | /* In contrast to what's described in the datasheet, there seems | 166 | /* |
| 167 | * In contrast to what's described in the datasheet, there seems | ||
| 157 | * to be no way of probing the presence of that device using I2C | 168 | * to be no way of probing the presence of that device using I2C |
| 158 | * commands. So we need to blindly believe it is there, and wait | 169 | * commands. So we need to blindly believe it is there, and wait |
| 159 | * for interrupts to occur. */ | 170 | * for interrupts to occur. |
| 171 | */ | ||
| 160 | 172 | ||
| 161 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 173 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
| 162 | if (!priv) { | 174 | if (!priv) { |
| @@ -212,9 +224,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, | |||
| 212 | goto err2; | 224 | goto err2; |
| 213 | } | 225 | } |
| 214 | 226 | ||
| 215 | /* Disable the irq for now. It will be enabled once the input device | 227 | /* |
| 216 | * is opened. */ | 228 | * Disable the device for now. It will be enabled once the |
| 217 | disable_irq(priv->irq); | 229 | * input device is opened. |
| 230 | */ | ||
| 231 | eeti_ts_stop(priv); | ||
| 218 | 232 | ||
| 219 | device_init_wakeup(&client->dev, 0); | 233 | device_init_wakeup(&client->dev, 0); |
| 220 | return 0; | 234 | return 0; |
| @@ -235,6 +249,12 @@ static int __devexit eeti_ts_remove(struct i2c_client *client) | |||
| 235 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); | 249 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); |
| 236 | 250 | ||
| 237 | free_irq(priv->irq, priv); | 251 | free_irq(priv->irq, priv); |
| 252 | /* | ||
| 253 | * eeti_ts_stop() leaves IRQ disabled. We need to re-enable it | ||
| 254 | * so that device still works if we reload the driver. | ||
| 255 | */ | ||
| 256 | enable_irq(priv->irq); | ||
| 257 | |||
| 238 | input_unregister_device(priv->input); | 258 | input_unregister_device(priv->input); |
| 239 | i2c_set_clientdata(client, NULL); | 259 | i2c_set_clientdata(client, NULL); |
| 240 | kfree(priv); | 260 | kfree(priv); |
| @@ -246,6 +266,14 @@ static int __devexit eeti_ts_remove(struct i2c_client *client) | |||
| 246 | static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) | 266 | static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) |
| 247 | { | 267 | { |
| 248 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); | 268 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); |
| 269 | struct input_dev *input_dev = priv->input; | ||
| 270 | |||
| 271 | mutex_lock(&input_dev->mutex); | ||
| 272 | |||
| 273 | if (input_dev->users) | ||
| 274 | eeti_ts_stop(priv); | ||
| 275 | |||
| 276 | mutex_unlock(&input_dev->mutex); | ||
| 249 | 277 | ||
| 250 | if (device_may_wakeup(&client->dev)) | 278 | if (device_may_wakeup(&client->dev)) |
| 251 | enable_irq_wake(priv->irq); | 279 | enable_irq_wake(priv->irq); |
| @@ -256,10 +284,18 @@ static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) | |||
| 256 | static int eeti_ts_resume(struct i2c_client *client) | 284 | static int eeti_ts_resume(struct i2c_client *client) |
| 257 | { | 285 | { |
| 258 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); | 286 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); |
| 287 | struct input_dev *input_dev = priv->input; | ||
| 259 | 288 | ||
| 260 | if (device_may_wakeup(&client->dev)) | 289 | if (device_may_wakeup(&client->dev)) |
| 261 | disable_irq_wake(priv->irq); | 290 | disable_irq_wake(priv->irq); |
| 262 | 291 | ||
| 292 | mutex_lock(&input_dev->mutex); | ||
| 293 | |||
| 294 | if (input_dev->users) | ||
| 295 | eeti_ts_start(priv); | ||
| 296 | |||
| 297 | mutex_unlock(&input_dev->mutex); | ||
| 298 | |||
| 263 | return 0; | 299 | return 0; |
| 264 | } | 300 | } |
| 265 | #else | 301 | #else |
diff --git a/drivers/mtd/internal.h b/drivers/mtd/internal.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/drivers/mtd/internal.h +++ /dev/null | |||
diff --git a/drivers/mtd/mtdbdi.c b/drivers/mtd/mtdbdi.c deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/drivers/mtd/mtdbdi.c +++ /dev/null | |||
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 6995169d285a..cd17d09f385c 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
| @@ -311,11 +311,6 @@ err: | |||
| 311 | processed++; | 311 | processed++; |
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | if (processed) { | ||
| 315 | wrw(ep, REG_RXDENQ, processed); | ||
| 316 | wrw(ep, REG_RXSTSENQ, processed); | ||
| 317 | } | ||
| 318 | |||
| 319 | return processed; | 314 | return processed; |
| 320 | } | 315 | } |
| 321 | 316 | ||
| @@ -350,6 +345,11 @@ poll_some_more: | |||
| 350 | goto poll_some_more; | 345 | goto poll_some_more; |
| 351 | } | 346 | } |
| 352 | 347 | ||
| 348 | if (rx) { | ||
| 349 | wrw(ep, REG_RXDENQ, rx); | ||
| 350 | wrw(ep, REG_RXSTSENQ, rx); | ||
| 351 | } | ||
| 352 | |||
| 353 | return rx; | 353 | return rx; |
| 354 | } | 354 | } |
| 355 | 355 | ||
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index fb8fc7d1b50d..dbf81788bb40 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
| @@ -4633,6 +4633,9 @@ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state) | |||
| 4633 | reg16 &= ~state; | 4633 | reg16 &= ~state; |
| 4634 | pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); | 4634 | pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); |
| 4635 | 4635 | ||
| 4636 | if (!pdev->bus->self) | ||
| 4637 | return; | ||
| 4638 | |||
| 4636 | pos = pci_pcie_cap(pdev->bus->self); | 4639 | pos = pci_pcie_cap(pdev->bus->self); |
| 4637 | pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, ®16); | 4640 | pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, ®16); |
| 4638 | reg16 &= ~state; | 4641 | reg16 &= ~state; |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 9f98c1c4a344..9b4e8f797a7a 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
| @@ -1653,7 +1653,7 @@ fec_set_mac_address(struct net_device *dev, void *p) | |||
| 1653 | (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24), | 1653 | (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24), |
| 1654 | fep->hwp + FEC_ADDR_LOW); | 1654 | fep->hwp + FEC_ADDR_LOW); |
| 1655 | writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24), | 1655 | writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24), |
| 1656 | fep + FEC_ADDR_HIGH); | 1656 | fep->hwp + FEC_ADDR_HIGH); |
| 1657 | return 0; | 1657 | return 0; |
| 1658 | } | 1658 | } |
| 1659 | 1659 | ||
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index fc5938ba3d78..a527e37728cd 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig | |||
| @@ -88,6 +88,11 @@ config LSI_ET1011C_PHY | |||
| 88 | ---help--- | 88 | ---help--- |
| 89 | Supports the LSI ET1011C PHY. | 89 | Supports the LSI ET1011C PHY. |
| 90 | 90 | ||
| 91 | config MICREL_PHY | ||
| 92 | tristate "Driver for Micrel PHYs" | ||
| 93 | ---help--- | ||
| 94 | Supports the KSZ9021, VSC8201, KS8001 PHYs. | ||
| 95 | |||
| 91 | config FIXED_PHY | 96 | config FIXED_PHY |
| 92 | bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" | 97 | bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" |
| 93 | depends on PHYLIB=y | 98 | depends on PHYLIB=y |
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile index 1342585af381..13bebab65d02 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile | |||
| @@ -20,4 +20,5 @@ obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o | |||
| 20 | obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o | 20 | obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o |
| 21 | obj-$(CONFIG_NATIONAL_PHY) += national.o | 21 | obj-$(CONFIG_NATIONAL_PHY) += national.o |
| 22 | obj-$(CONFIG_STE10XP) += ste10Xp.o | 22 | obj-$(CONFIG_STE10XP) += ste10Xp.o |
| 23 | obj-$(CONFIG_MICREL_PHY) += micrel.o | ||
| 23 | obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o | 24 | obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o |
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c new file mode 100644 index 000000000000..0cd80e4d71d9 --- /dev/null +++ b/drivers/net/phy/micrel.c | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | /* | ||
| 2 | * drivers/net/phy/micrel.c | ||
| 3 | * | ||
| 4 | * Driver for Micrel PHYs | ||
| 5 | * | ||
| 6 | * Author: David J. Choi | ||
| 7 | * | ||
| 8 | * Copyright (c) 2010 Micrel, Inc. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify it | ||
| 11 | * under the terms of the GNU General Public License as published by the | ||
| 12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 13 | * option) any later version. | ||
| 14 | * | ||
| 15 | * Support : ksz9021 , vsc8201, ks8001 | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <linux/kernel.h> | ||
| 19 | #include <linux/module.h> | ||
| 20 | #include <linux/phy.h> | ||
| 21 | |||
| 22 | #define PHY_ID_KSZ9021 0x00221611 | ||
| 23 | #define PHY_ID_VSC8201 0x000FC413 | ||
| 24 | #define PHY_ID_KS8001 0x0022161A | ||
| 25 | |||
| 26 | |||
| 27 | static int kszphy_config_init(struct phy_device *phydev) | ||
| 28 | { | ||
| 29 | return 0; | ||
| 30 | } | ||
| 31 | |||
| 32 | |||
| 33 | static struct phy_driver ks8001_driver = { | ||
| 34 | .phy_id = PHY_ID_KS8001, | ||
| 35 | .phy_id_mask = 0x00fffff0, | ||
| 36 | .features = PHY_BASIC_FEATURES, | ||
| 37 | .flags = PHY_POLL, | ||
| 38 | .config_init = kszphy_config_init, | ||
| 39 | .config_aneg = genphy_config_aneg, | ||
| 40 | .read_status = genphy_read_status, | ||
| 41 | .driver = { .owner = THIS_MODULE,}, | ||
| 42 | }; | ||
| 43 | |||
| 44 | static struct phy_driver vsc8201_driver = { | ||
| 45 | .phy_id = PHY_ID_VSC8201, | ||
| 46 | .name = "Micrel VSC8201", | ||
| 47 | .phy_id_mask = 0x00fffff0, | ||
| 48 | .features = PHY_BASIC_FEATURES, | ||
| 49 | .flags = PHY_POLL, | ||
| 50 | .config_init = kszphy_config_init, | ||
| 51 | .config_aneg = genphy_config_aneg, | ||
| 52 | .read_status = genphy_read_status, | ||
| 53 | .driver = { .owner = THIS_MODULE,}, | ||
| 54 | }; | ||
| 55 | |||
| 56 | static struct phy_driver ksz9021_driver = { | ||
| 57 | .phy_id = PHY_ID_KSZ9021, | ||
| 58 | .phy_id_mask = 0x000fff10, | ||
| 59 | .name = "Micrel KSZ9021 Gigabit PHY", | ||
| 60 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause, | ||
| 61 | .flags = PHY_POLL, | ||
| 62 | .config_init = kszphy_config_init, | ||
| 63 | .config_aneg = genphy_config_aneg, | ||
| 64 | .read_status = genphy_read_status, | ||
| 65 | .driver = { .owner = THIS_MODULE, }, | ||
| 66 | }; | ||
| 67 | |||
| 68 | static int __init ksphy_init(void) | ||
| 69 | { | ||
| 70 | int ret; | ||
| 71 | |||
| 72 | ret = phy_driver_register(&ks8001_driver); | ||
| 73 | if (ret) | ||
| 74 | goto err1; | ||
| 75 | ret = phy_driver_register(&vsc8201_driver); | ||
| 76 | if (ret) | ||
| 77 | goto err2; | ||
| 78 | |||
| 79 | ret = phy_driver_register(&ksz9021_driver); | ||
| 80 | if (ret) | ||
| 81 | goto err3; | ||
| 82 | return 0; | ||
| 83 | |||
| 84 | err3: | ||
| 85 | phy_driver_unregister(&vsc8201_driver); | ||
| 86 | err2: | ||
| 87 | phy_driver_unregister(&ks8001_driver); | ||
| 88 | err1: | ||
| 89 | return ret; | ||
| 90 | } | ||
| 91 | |||
| 92 | static void __exit ksphy_exit(void) | ||
| 93 | { | ||
| 94 | phy_driver_unregister(&ks8001_driver); | ||
| 95 | phy_driver_unregister(&vsc8201_driver); | ||
| 96 | phy_driver_unregister(&ksz9021_driver); | ||
| 97 | } | ||
| 98 | |||
| 99 | module_init(ksphy_init); | ||
| 100 | module_exit(ksphy_exit); | ||
| 101 | |||
| 102 | MODULE_DESCRIPTION("Micrel PHY driver"); | ||
| 103 | MODULE_AUTHOR("David J. Choi"); | ||
| 104 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 6e281bc825e5..8518a2e58e53 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
| @@ -405,6 +405,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf, | |||
| 405 | DECLARE_WAITQUEUE(wait, current); | 405 | DECLARE_WAITQUEUE(wait, current); |
| 406 | ssize_t ret; | 406 | ssize_t ret; |
| 407 | struct sk_buff *skb = NULL; | 407 | struct sk_buff *skb = NULL; |
| 408 | struct iovec iov; | ||
| 408 | 409 | ||
| 409 | ret = count; | 410 | ret = count; |
| 410 | 411 | ||
| @@ -448,7 +449,9 @@ static ssize_t ppp_read(struct file *file, char __user *buf, | |||
| 448 | if (skb->len > count) | 449 | if (skb->len > count) |
| 449 | goto outf; | 450 | goto outf; |
| 450 | ret = -EFAULT; | 451 | ret = -EFAULT; |
| 451 | if (copy_to_user(buf, skb->data, skb->len)) | 452 | iov.iov_base = buf; |
| 453 | iov.iov_len = count; | ||
| 454 | if (skb_copy_datagram_iovec(skb, 0, &iov, skb->len)) | ||
| 452 | goto outf; | 455 | goto outf; |
| 453 | ret = skb->len; | 456 | ret = skb->len; |
| 454 | 457 | ||
| @@ -1567,13 +1570,22 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb) | |||
| 1567 | struct channel *pch = chan->ppp; | 1570 | struct channel *pch = chan->ppp; |
| 1568 | int proto; | 1571 | int proto; |
| 1569 | 1572 | ||
| 1570 | if (!pch || skb->len == 0) { | 1573 | if (!pch) { |
| 1571 | kfree_skb(skb); | 1574 | kfree_skb(skb); |
| 1572 | return; | 1575 | return; |
| 1573 | } | 1576 | } |
| 1574 | 1577 | ||
| 1575 | proto = PPP_PROTO(skb); | ||
| 1576 | read_lock_bh(&pch->upl); | 1578 | read_lock_bh(&pch->upl); |
| 1579 | if (!pskb_may_pull(skb, 2)) { | ||
| 1580 | kfree_skb(skb); | ||
| 1581 | if (pch->ppp) { | ||
| 1582 | ++pch->ppp->dev->stats.rx_length_errors; | ||
| 1583 | ppp_receive_error(pch->ppp); | ||
| 1584 | } | ||
| 1585 | goto done; | ||
| 1586 | } | ||
| 1587 | |||
| 1588 | proto = PPP_PROTO(skb); | ||
| 1577 | if (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) { | 1589 | if (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) { |
| 1578 | /* put it on the channel queue */ | 1590 | /* put it on the channel queue */ |
| 1579 | skb_queue_tail(&pch->file.rq, skb); | 1591 | skb_queue_tail(&pch->file.rq, skb); |
| @@ -1585,6 +1597,8 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb) | |||
| 1585 | } else { | 1597 | } else { |
| 1586 | ppp_do_recv(pch->ppp, skb, pch); | 1598 | ppp_do_recv(pch->ppp, skb, pch); |
| 1587 | } | 1599 | } |
| 1600 | |||
| 1601 | done: | ||
| 1588 | read_unlock_bh(&pch->upl); | 1602 | read_unlock_bh(&pch->upl); |
| 1589 | } | 1603 | } |
| 1590 | 1604 | ||
| @@ -1617,7 +1631,8 @@ ppp_input_error(struct ppp_channel *chan, int code) | |||
| 1617 | static void | 1631 | static void |
| 1618 | ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | 1632 | ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) |
| 1619 | { | 1633 | { |
| 1620 | if (pskb_may_pull(skb, 2)) { | 1634 | /* note: a 0-length skb is used as an error indication */ |
| 1635 | if (skb->len > 0) { | ||
| 1621 | #ifdef CONFIG_PPP_MULTILINK | 1636 | #ifdef CONFIG_PPP_MULTILINK |
| 1622 | /* XXX do channel-level decompression here */ | 1637 | /* XXX do channel-level decompression here */ |
| 1623 | if (PPP_PROTO(skb) == PPP_MP) | 1638 | if (PPP_PROTO(skb) == PPP_MP) |
| @@ -1625,15 +1640,10 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | |||
| 1625 | else | 1640 | else |
| 1626 | #endif /* CONFIG_PPP_MULTILINK */ | 1641 | #endif /* CONFIG_PPP_MULTILINK */ |
| 1627 | ppp_receive_nonmp_frame(ppp, skb); | 1642 | ppp_receive_nonmp_frame(ppp, skb); |
| 1628 | return; | 1643 | } else { |
| 1644 | kfree_skb(skb); | ||
| 1645 | ppp_receive_error(ppp); | ||
| 1629 | } | 1646 | } |
| 1630 | |||
| 1631 | if (skb->len > 0) | ||
| 1632 | /* note: a 0-length skb is used as an error indication */ | ||
| 1633 | ++ppp->dev->stats.rx_length_errors; | ||
| 1634 | |||
| 1635 | kfree_skb(skb); | ||
| 1636 | ppp_receive_error(ppp); | ||
| 1637 | } | 1647 | } |
| 1638 | 1648 | ||
| 1639 | static void | 1649 | static void |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 4748c21eb72e..dd8106ff35aa 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
| @@ -1042,14 +1042,14 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, | |||
| 1042 | } | 1042 | } |
| 1043 | 1043 | ||
| 1044 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, | 1044 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, |
| 1045 | struct sk_buff *skb) | 1045 | struct sk_buff *skb, int polling) |
| 1046 | { | 1046 | { |
| 1047 | u32 opts2 = le32_to_cpu(desc->opts2); | 1047 | u32 opts2 = le32_to_cpu(desc->opts2); |
| 1048 | struct vlan_group *vlgrp = tp->vlgrp; | 1048 | struct vlan_group *vlgrp = tp->vlgrp; |
| 1049 | int ret; | 1049 | int ret; |
| 1050 | 1050 | ||
| 1051 | if (vlgrp && (opts2 & RxVlanTag)) { | 1051 | if (vlgrp && (opts2 & RxVlanTag)) { |
| 1052 | vlan_hwaccel_receive_skb(skb, vlgrp, swab16(opts2 & 0xffff)); | 1052 | __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling); |
| 1053 | ret = 0; | 1053 | ret = 0; |
| 1054 | } else | 1054 | } else |
| 1055 | ret = -1; | 1055 | ret = -1; |
| @@ -1066,7 +1066,7 @@ static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, | |||
| 1066 | } | 1066 | } |
| 1067 | 1067 | ||
| 1068 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, | 1068 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, |
| 1069 | struct sk_buff *skb) | 1069 | struct sk_buff *skb, int polling) |
| 1070 | { | 1070 | { |
| 1071 | return -1; | 1071 | return -1; |
| 1072 | } | 1072 | } |
| @@ -4445,12 +4445,20 @@ out: | |||
| 4445 | return done; | 4445 | return done; |
| 4446 | } | 4446 | } |
| 4447 | 4447 | ||
| 4448 | /* | ||
| 4449 | * Warning : rtl8169_rx_interrupt() might be called : | ||
| 4450 | * 1) from NAPI (softirq) context | ||
| 4451 | * (polling = 1 : we should call netif_receive_skb()) | ||
| 4452 | * 2) from process context (rtl8169_reset_task()) | ||
| 4453 | * (polling = 0 : we must call netif_rx() instead) | ||
| 4454 | */ | ||
| 4448 | static int rtl8169_rx_interrupt(struct net_device *dev, | 4455 | static int rtl8169_rx_interrupt(struct net_device *dev, |
| 4449 | struct rtl8169_private *tp, | 4456 | struct rtl8169_private *tp, |
| 4450 | void __iomem *ioaddr, u32 budget) | 4457 | void __iomem *ioaddr, u32 budget) |
| 4451 | { | 4458 | { |
| 4452 | unsigned int cur_rx, rx_left; | 4459 | unsigned int cur_rx, rx_left; |
| 4453 | unsigned int delta, count; | 4460 | unsigned int delta, count; |
| 4461 | int polling = (budget != ~(u32)0) ? 1 : 0; | ||
| 4454 | 4462 | ||
| 4455 | cur_rx = tp->cur_rx; | 4463 | cur_rx = tp->cur_rx; |
| 4456 | rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; | 4464 | rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; |
| @@ -4512,8 +4520,12 @@ static int rtl8169_rx_interrupt(struct net_device *dev, | |||
| 4512 | skb_put(skb, pkt_size); | 4520 | skb_put(skb, pkt_size); |
| 4513 | skb->protocol = eth_type_trans(skb, dev); | 4521 | skb->protocol = eth_type_trans(skb, dev); |
| 4514 | 4522 | ||
| 4515 | if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0) | 4523 | if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) { |
| 4516 | netif_receive_skb(skb); | 4524 | if (likely(polling)) |
| 4525 | netif_receive_skb(skb); | ||
| 4526 | else | ||
| 4527 | netif_rx(skb); | ||
| 4528 | } | ||
| 4517 | 4529 | ||
| 4518 | dev->stats.rx_bytes += pkt_size; | 4530 | dev->stats.rx_bytes += pkt_size; |
| 4519 | dev->stats.rx_packets++; | 4531 | dev->stats.rx_packets++; |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 9944e5d662c0..04efc0c1bda9 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
| @@ -2353,17 +2353,36 @@ static int sbmac_init(struct platform_device *pldev, long long base) | |||
| 2353 | 2353 | ||
| 2354 | sc->mii_bus = mdiobus_alloc(); | 2354 | sc->mii_bus = mdiobus_alloc(); |
| 2355 | if (sc->mii_bus == NULL) { | 2355 | if (sc->mii_bus == NULL) { |
| 2356 | sbmac_uninitctx(sc); | 2356 | err = -ENOMEM; |
| 2357 | return -ENOMEM; | 2357 | goto uninit_ctx; |
| 2358 | } | 2358 | } |
| 2359 | 2359 | ||
| 2360 | sc->mii_bus->name = sbmac_mdio_string; | ||
| 2361 | snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx); | ||
| 2362 | sc->mii_bus->priv = sc; | ||
| 2363 | sc->mii_bus->read = sbmac_mii_read; | ||
| 2364 | sc->mii_bus->write = sbmac_mii_write; | ||
| 2365 | sc->mii_bus->irq = sc->phy_irq; | ||
| 2366 | for (i = 0; i < PHY_MAX_ADDR; ++i) | ||
| 2367 | sc->mii_bus->irq[i] = SBMAC_PHY_INT; | ||
| 2368 | |||
| 2369 | sc->mii_bus->parent = &pldev->dev; | ||
| 2370 | /* | ||
| 2371 | * Probe PHY address | ||
| 2372 | */ | ||
| 2373 | err = mdiobus_register(sc->mii_bus); | ||
| 2374 | if (err) { | ||
| 2375 | printk(KERN_ERR "%s: unable to register MDIO bus\n", | ||
| 2376 | dev->name); | ||
| 2377 | goto free_mdio; | ||
| 2378 | } | ||
| 2379 | dev_set_drvdata(&pldev->dev, sc->mii_bus); | ||
| 2380 | |||
| 2360 | err = register_netdev(dev); | 2381 | err = register_netdev(dev); |
| 2361 | if (err) { | 2382 | if (err) { |
| 2362 | printk(KERN_ERR "%s.%d: unable to register netdev\n", | 2383 | printk(KERN_ERR "%s.%d: unable to register netdev\n", |
| 2363 | sbmac_string, idx); | 2384 | sbmac_string, idx); |
| 2364 | mdiobus_free(sc->mii_bus); | 2385 | goto unreg_mdio; |
| 2365 | sbmac_uninitctx(sc); | ||
| 2366 | return err; | ||
| 2367 | } | 2386 | } |
| 2368 | 2387 | ||
| 2369 | pr_info("%s.%d: registered as %s\n", sbmac_string, idx, dev->name); | 2388 | pr_info("%s.%d: registered as %s\n", sbmac_string, idx, dev->name); |
| @@ -2379,19 +2398,15 @@ static int sbmac_init(struct platform_device *pldev, long long base) | |||
| 2379 | pr_info("%s: SiByte Ethernet at 0x%08Lx, address: %pM\n", | 2398 | pr_info("%s: SiByte Ethernet at 0x%08Lx, address: %pM\n", |
| 2380 | dev->name, base, eaddr); | 2399 | dev->name, base, eaddr); |
| 2381 | 2400 | ||
| 2382 | sc->mii_bus->name = sbmac_mdio_string; | ||
| 2383 | snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx); | ||
| 2384 | sc->mii_bus->priv = sc; | ||
| 2385 | sc->mii_bus->read = sbmac_mii_read; | ||
| 2386 | sc->mii_bus->write = sbmac_mii_write; | ||
| 2387 | sc->mii_bus->irq = sc->phy_irq; | ||
| 2388 | for (i = 0; i < PHY_MAX_ADDR; ++i) | ||
| 2389 | sc->mii_bus->irq[i] = SBMAC_PHY_INT; | ||
| 2390 | |||
| 2391 | sc->mii_bus->parent = &pldev->dev; | ||
| 2392 | dev_set_drvdata(&pldev->dev, sc->mii_bus); | ||
| 2393 | |||
| 2394 | return 0; | 2401 | return 0; |
| 2402 | unreg_mdio: | ||
| 2403 | mdiobus_unregister(sc->mii_bus); | ||
| 2404 | dev_set_drvdata(&pldev->dev, NULL); | ||
| 2405 | free_mdio: | ||
| 2406 | mdiobus_free(sc->mii_bus); | ||
| 2407 | uninit_ctx: | ||
| 2408 | sbmac_uninitctx(sc); | ||
| 2409 | return err; | ||
| 2395 | } | 2410 | } |
| 2396 | 2411 | ||
| 2397 | 2412 | ||
| @@ -2417,16 +2432,6 @@ static int sbmac_open(struct net_device *dev) | |||
| 2417 | goto out_err; | 2432 | goto out_err; |
| 2418 | } | 2433 | } |
| 2419 | 2434 | ||
| 2420 | /* | ||
| 2421 | * Probe PHY address | ||
| 2422 | */ | ||
| 2423 | err = mdiobus_register(sc->mii_bus); | ||
| 2424 | if (err) { | ||
| 2425 | printk(KERN_ERR "%s: unable to register MDIO bus\n", | ||
| 2426 | dev->name); | ||
| 2427 | goto out_unirq; | ||
| 2428 | } | ||
| 2429 | |||
| 2430 | sc->sbm_speed = sbmac_speed_none; | 2435 | sc->sbm_speed = sbmac_speed_none; |
| 2431 | sc->sbm_duplex = sbmac_duplex_none; | 2436 | sc->sbm_duplex = sbmac_duplex_none; |
| 2432 | sc->sbm_fc = sbmac_fc_none; | 2437 | sc->sbm_fc = sbmac_fc_none; |
| @@ -2457,11 +2462,7 @@ static int sbmac_open(struct net_device *dev) | |||
| 2457 | return 0; | 2462 | return 0; |
| 2458 | 2463 | ||
| 2459 | out_unregister: | 2464 | out_unregister: |
| 2460 | mdiobus_unregister(sc->mii_bus); | ||
| 2461 | |||
| 2462 | out_unirq: | ||
| 2463 | free_irq(dev->irq, dev); | 2465 | free_irq(dev->irq, dev); |
| 2464 | |||
| 2465 | out_err: | 2466 | out_err: |
| 2466 | return err; | 2467 | return err; |
| 2467 | } | 2468 | } |
| @@ -2650,9 +2651,6 @@ static int sbmac_close(struct net_device *dev) | |||
| 2650 | 2651 | ||
| 2651 | phy_disconnect(sc->phy_dev); | 2652 | phy_disconnect(sc->phy_dev); |
| 2652 | sc->phy_dev = NULL; | 2653 | sc->phy_dev = NULL; |
| 2653 | |||
| 2654 | mdiobus_unregister(sc->mii_bus); | ||
| 2655 | |||
| 2656 | free_irq(dev->irq, dev); | 2654 | free_irq(dev->irq, dev); |
| 2657 | 2655 | ||
| 2658 | sbdma_emptyring(&(sc->sbm_txdma)); | 2656 | sbdma_emptyring(&(sc->sbm_txdma)); |
| @@ -2760,6 +2758,7 @@ static int __exit sbmac_remove(struct platform_device *pldev) | |||
| 2760 | 2758 | ||
| 2761 | unregister_netdev(dev); | 2759 | unregister_netdev(dev); |
| 2762 | sbmac_uninitctx(sc); | 2760 | sbmac_uninitctx(sc); |
| 2761 | mdiobus_unregister(sc->mii_bus); | ||
| 2763 | mdiobus_free(sc->mii_bus); | 2762 | mdiobus_free(sc->mii_bus); |
| 2764 | iounmap(sc->sbm_base); | 2763 | iounmap(sc->sbm_base); |
| 2765 | free_netdev(dev); | 2764 | free_netdev(dev); |
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 5d58abc224f4..d7b7018a1de1 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
| @@ -400,7 +400,6 @@ config USB_IPHETH | |||
| 400 | config USB_SIERRA_NET | 400 | config USB_SIERRA_NET |
| 401 | tristate "USB-to-WWAN Driver for Sierra Wireless modems" | 401 | tristate "USB-to-WWAN Driver for Sierra Wireless modems" |
| 402 | depends on USB_USBNET | 402 | depends on USB_USBNET |
| 403 | default y | ||
| 404 | help | 403 | help |
| 405 | Choose this option if you have a Sierra Wireless USB-to-WWAN device. | 404 | Choose this option if you have a Sierra Wireless USB-to-WWAN device. |
| 406 | 405 | ||
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 04b281002a76..5dfed9297b22 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
| @@ -240,7 +240,7 @@ static int dm_write_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 valu | |||
| 240 | goto out; | 240 | goto out; |
| 241 | 241 | ||
| 242 | dm_write_reg(dev, DM_SHARED_ADDR, phy ? (reg | 0x40) : reg); | 242 | dm_write_reg(dev, DM_SHARED_ADDR, phy ? (reg | 0x40) : reg); |
| 243 | dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1c : 0x14); | 243 | dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1a : 0x12); |
| 244 | 244 | ||
| 245 | for (i = 0; i < DM_TIMEOUT; i++) { | 245 | for (i = 0; i < DM_TIMEOUT; i++) { |
| 246 | u8 tmp; | 246 | u8 tmp; |
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c index a44f9e0ea098..f1942d69a0d5 100644 --- a/drivers/net/usb/sierra_net.c +++ b/drivers/net/usb/sierra_net.c | |||
| @@ -789,6 +789,9 @@ static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 789 | /* prepare sync message from template */ | 789 | /* prepare sync message from template */ |
| 790 | memcpy(priv->sync_msg, sync_tmplate, sizeof(priv->sync_msg)); | 790 | memcpy(priv->sync_msg, sync_tmplate, sizeof(priv->sync_msg)); |
| 791 | 791 | ||
| 792 | /* initiate the sync sequence */ | ||
| 793 | sierra_net_dosync(dev); | ||
| 794 | |||
| 792 | return 0; | 795 | return 0; |
| 793 | } | 796 | } |
| 794 | 797 | ||
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index 269fda362836..c24067f1a0cb 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
| @@ -246,7 +246,7 @@ static void p54p_check_tx_ring(struct ieee80211_hw *dev, u32 *index, | |||
| 246 | u32 idx, i; | 246 | u32 idx, i; |
| 247 | 247 | ||
| 248 | i = (*index) % ring_limit; | 248 | i = (*index) % ring_limit; |
| 249 | (*index) = idx = le32_to_cpu(ring_control->device_idx[1]); | 249 | (*index) = idx = le32_to_cpu(ring_control->device_idx[ring_index]); |
| 250 | idx %= ring_limit; | 250 | idx %= ring_limit; |
| 251 | 251 | ||
| 252 | while (i != idx) { | 252 | while (i != idx) { |
