diff options
34 files changed, 248 insertions, 105 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 86a2ffccef25..20885a38237a 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -717,9 +717,11 @@ static void unregister_cpu_online(unsigned int cpu) | |||
717 | 717 | ||
718 | BUG_ON(!c->hotpluggable); | 718 | BUG_ON(!c->hotpluggable); |
719 | 719 | ||
720 | #ifdef CONFIG_PPC64 | ||
720 | if (!firmware_has_feature(FW_FEATURE_ISERIES) && | 721 | if (!firmware_has_feature(FW_FEATURE_ISERIES) && |
721 | cpu_has_feature(CPU_FTR_SMT)) | 722 | cpu_has_feature(CPU_FTR_SMT)) |
722 | sysdev_remove_file(s, &attr_smt_snooze_delay); | 723 | sysdev_remove_file(s, &attr_smt_snooze_delay); |
724 | #endif | ||
723 | 725 | ||
724 | /* PMC stuff */ | 726 | /* PMC stuff */ |
725 | switch (cur_cpu_spec->pmc_type) { | 727 | switch (cur_cpu_spec->pmc_type) { |
diff --git a/arch/sparc64/kernel/pci_fire.c b/arch/sparc64/kernel/pci_fire.c index fcbbac66e141..9462b68f4894 100644 --- a/arch/sparc64/kernel/pci_fire.c +++ b/arch/sparc64/kernel/pci_fire.c | |||
@@ -455,7 +455,7 @@ static int __init pci_fire_pbm_init(struct pci_pbm_info *pbm, | |||
455 | return 0; | 455 | return 0; |
456 | } | 456 | } |
457 | 457 | ||
458 | static int __init fire_probe(struct of_device *op, | 458 | static int __devinit fire_probe(struct of_device *op, |
459 | const struct of_device_id *match) | 459 | const struct of_device_id *match) |
460 | { | 460 | { |
461 | struct device_node *dp = op->node; | 461 | struct device_node *dp = op->node; |
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 56605adbb5b3..dfb3ec892987 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c | |||
@@ -493,7 +493,7 @@ static void __init psycho_pbm_init(struct pci_pbm_info *pbm, | |||
493 | psycho_scan_bus(pbm, &op->dev); | 493 | psycho_scan_bus(pbm, &op->dev); |
494 | } | 494 | } |
495 | 495 | ||
496 | static struct pci_pbm_info * __init psycho_find_sibling(u32 upa_portid) | 496 | static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid) |
497 | { | 497 | { |
498 | struct pci_pbm_info *pbm; | 498 | struct pci_pbm_info *pbm; |
499 | 499 | ||
@@ -506,7 +506,7 @@ static struct pci_pbm_info * __init psycho_find_sibling(u32 upa_portid) | |||
506 | 506 | ||
507 | #define PSYCHO_CONFIGSPACE 0x001000000UL | 507 | #define PSYCHO_CONFIGSPACE 0x001000000UL |
508 | 508 | ||
509 | static int __init psycho_probe(struct of_device *op, | 509 | static int __devinit psycho_probe(struct of_device *op, |
510 | const struct of_device_id *match) | 510 | const struct of_device_id *match) |
511 | { | 511 | { |
512 | const struct linux_prom64_registers *pr_regs; | 512 | const struct linux_prom64_registers *pr_regs; |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 4b27b0e10ce7..34a1fded3941 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -929,7 +929,7 @@ static int __init pci_sun4v_pbm_init(struct pci_pbm_info *pbm, | |||
929 | return 0; | 929 | return 0; |
930 | } | 930 | } |
931 | 931 | ||
932 | static int __init pci_sun4v_probe(struct of_device *op, | 932 | static int __devinit pci_sun4v_probe(struct of_device *op, |
933 | const struct of_device_id *match) | 933 | const struct of_device_id *match) |
934 | { | 934 | { |
935 | const struct linux_prom64_registers *regs; | 935 | const struct linux_prom64_registers *regs; |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 59f472143f08..1412a8d1e58d 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1795,12 +1795,15 @@ retry_open: | |||
1795 | } | 1795 | } |
1796 | #endif | 1796 | #endif |
1797 | if (device == MKDEV(TTYAUX_MAJOR, 1)) { | 1797 | if (device == MKDEV(TTYAUX_MAJOR, 1)) { |
1798 | driver = tty_driver_kref_get(console_device(&index)); | 1798 | struct tty_driver *console_driver = console_device(&index); |
1799 | if (driver) { | 1799 | if (console_driver) { |
1800 | /* Don't let /dev/console block */ | 1800 | driver = tty_driver_kref_get(console_driver); |
1801 | filp->f_flags |= O_NONBLOCK; | 1801 | if (driver) { |
1802 | noctty = 1; | 1802 | /* Don't let /dev/console block */ |
1803 | goto got_driver; | 1803 | filp->f_flags |= O_NONBLOCK; |
1804 | noctty = 1; | ||
1805 | goto got_driver; | ||
1806 | } | ||
1804 | } | 1807 | } |
1805 | mutex_unlock(&tty_mutex); | 1808 | mutex_unlock(&tty_mutex); |
1806 | return -ENODEV; | 1809 | return -ENODEV; |
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 97df6dac3a82..e54403ee59e7 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -372,6 +372,11 @@ static const struct { | |||
372 | }, | 372 | }, |
373 | /* iPod mini */ { | 373 | /* iPod mini */ { |
374 | .firmware_revision = 0x0a2700, | 374 | .firmware_revision = 0x0a2700, |
375 | .model = 0x000022, | ||
376 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, | ||
377 | }, | ||
378 | /* iPod mini */ { | ||
379 | .firmware_revision = 0x0a2700, | ||
375 | .model = 0x000023, | 380 | .model = 0x000023, |
376 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, | 381 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, |
377 | }, | 382 | }, |
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 9b97795e45ad..aa28aed0e46c 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c | |||
@@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = { | |||
400 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS), | 400 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS), |
401 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 401 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
402 | APPLE_RDESC_JIS }, | 402 | APPLE_RDESC_JIS }, |
403 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI), | 403 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI), |
404 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | 404 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
405 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO), | 405 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO), |
406 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 406 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
407 | APPLE_ISO_KEYBOARD }, | 407 | APPLE_ISO_KEYBOARD }, |
408 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS), | 408 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS), |
409 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | 409 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
410 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), | 410 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), |
411 | .driver_data = APPLE_HAS_FN }, | 411 | .driver_data = APPLE_HAS_FN }, |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 147ec591a806..40df3e1b4bd1 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1241,9 +1241,9 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1241 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) }, | 1241 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) }, |
1242 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) }, | 1242 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) }, |
1243 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) }, | 1243 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) }, |
1244 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) }, | 1244 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) }, |
1245 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) }, | 1245 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) }, |
1246 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) }, | 1246 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) }, |
1247 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) }, | 1247 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) }, |
1248 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) }, | 1248 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) }, |
1249 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) }, | 1249 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) }, |
@@ -1266,6 +1266,9 @@ static const struct hid_device_id hid_blacklist[] = { | |||
1266 | { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) }, | 1266 | { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) }, |
1267 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, | 1267 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, |
1268 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) }, | 1268 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) }, |
1269 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, | ||
1270 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, | ||
1271 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, | ||
1269 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, | 1272 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, |
1270 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, | 1273 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, |
1271 | { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, | 1274 | { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, |
@@ -1420,7 +1423,6 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
1420 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, | 1423 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, |
1421 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, | 1424 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, |
1422 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, | 1425 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, |
1423 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, | ||
1424 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, | 1426 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, |
1425 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, | 1427 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, |
1426 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, | 1428 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, |
@@ -1436,7 +1438,6 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
1436 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2) }, | 1438 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2) }, |
1437 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN) }, | 1439 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN) }, |
1438 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER) }, | 1440 | { HID_USB_DEVICE(USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER) }, |
1439 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, | ||
1440 | { HID_USB_DEVICE(USB_VENDOR_ID_GRETAGMACBETH, USB_DEVICE_ID_GRETAGMACBETH_HUEY) }, | 1441 | { HID_USB_DEVICE(USB_VENDOR_ID_GRETAGMACBETH, USB_DEVICE_ID_GRETAGMACBETH_HUEY) }, |
1441 | { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE) }, | 1442 | { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE) }, |
1442 | { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB) }, | 1443 | { HID_USB_DEVICE(USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB) }, |
@@ -1576,9 +1577,6 @@ static const struct hid_device_id hid_mouse_ignore_list[] = { | |||
1576 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, | 1577 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, |
1577 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, | 1578 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, |
1578 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, | 1579 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, |
1579 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, | ||
1580 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, | ||
1581 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, | ||
1582 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, | 1580 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, |
1583 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, | 1581 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, |
1584 | { } | 1582 | { } |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index d70075dd3d81..39289699c32f 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -163,6 +163,7 @@ | |||
163 | 163 | ||
164 | #define USB_VENDOR_ID_GAMERON 0x0810 | 164 | #define USB_VENDOR_ID_GAMERON 0x0810 |
165 | #define USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR 0x0001 | 165 | #define USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR 0x0001 |
166 | #define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002 | ||
166 | 167 | ||
167 | #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc | 168 | #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc |
168 | 169 | ||
diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c index acd815586182..46941f979b9d 100644 --- a/drivers/hid/hid-pl.c +++ b/drivers/hid/hid-pl.c | |||
@@ -178,6 +178,8 @@ err: | |||
178 | static const struct hid_device_id pl_devices[] = { | 178 | static const struct hid_device_id pl_devices[] = { |
179 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR), | 179 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR), |
180 | .driver_data = 1 }, /* Twin USB Joystick */ | 180 | .driver_data = 1 }, /* Twin USB Joystick */ |
181 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR), | ||
182 | .driver_data = 1 }, /* Twin USB Joystick */ | ||
181 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003), }, /* GreenAsia Inc. USB Joystick */ | 183 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003), }, /* GreenAsia Inc. USB Joystick */ |
182 | { } | 184 | { } |
183 | }; | 185 | }; |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index d746bf8284dd..606369ea24ca 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -796,7 +796,6 @@ static int usbhid_start(struct hid_device *hid) | |||
796 | if (insize > HID_MAX_BUFFER_SIZE) | 796 | if (insize > HID_MAX_BUFFER_SIZE) |
797 | insize = HID_MAX_BUFFER_SIZE; | 797 | insize = HID_MAX_BUFFER_SIZE; |
798 | 798 | ||
799 | mutex_lock(&usbhid->setup); | ||
800 | if (hid_alloc_buffers(dev, hid)) { | 799 | if (hid_alloc_buffers(dev, hid)) { |
801 | ret = -ENOMEM; | 800 | ret = -ENOMEM; |
802 | goto fail; | 801 | goto fail; |
@@ -876,7 +875,6 @@ static int usbhid_start(struct hid_device *hid) | |||
876 | hid_dump_device(hid); | 875 | hid_dump_device(hid); |
877 | 876 | ||
878 | set_bit(HID_STARTED, &usbhid->iofl); | 877 | set_bit(HID_STARTED, &usbhid->iofl); |
879 | mutex_unlock(&usbhid->setup); | ||
880 | 878 | ||
881 | return 0; | 879 | return 0; |
882 | 880 | ||
@@ -888,7 +886,6 @@ fail: | |||
888 | usbhid->urbout = NULL; | 886 | usbhid->urbout = NULL; |
889 | usbhid->urbctrl = NULL; | 887 | usbhid->urbctrl = NULL; |
890 | hid_free_buffers(dev, hid); | 888 | hid_free_buffers(dev, hid); |
891 | mutex_unlock(&usbhid->setup); | ||
892 | return ret; | 889 | return ret; |
893 | } | 890 | } |
894 | 891 | ||
@@ -899,7 +896,6 @@ static void usbhid_stop(struct hid_device *hid) | |||
899 | if (WARN_ON(!usbhid)) | 896 | if (WARN_ON(!usbhid)) |
900 | return; | 897 | return; |
901 | 898 | ||
902 | mutex_lock(&usbhid->setup); | ||
903 | clear_bit(HID_STARTED, &usbhid->iofl); | 899 | clear_bit(HID_STARTED, &usbhid->iofl); |
904 | spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ | 900 | spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ |
905 | set_bit(HID_DISCONNECTED, &usbhid->iofl); | 901 | set_bit(HID_DISCONNECTED, &usbhid->iofl); |
@@ -928,7 +924,6 @@ static void usbhid_stop(struct hid_device *hid) | |||
928 | usbhid->urbout = NULL; | 924 | usbhid->urbout = NULL; |
929 | 925 | ||
930 | hid_free_buffers(hid_to_usb_dev(hid), hid); | 926 | hid_free_buffers(hid_to_usb_dev(hid), hid); |
931 | mutex_unlock(&usbhid->setup); | ||
932 | } | 927 | } |
933 | 928 | ||
934 | static struct hid_ll_driver usb_hid_driver = { | 929 | static struct hid_ll_driver usb_hid_driver = { |
@@ -1016,7 +1011,6 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1016 | 1011 | ||
1017 | hid->driver_data = usbhid; | 1012 | hid->driver_data = usbhid; |
1018 | usbhid->hid = hid; | 1013 | usbhid->hid = hid; |
1019 | mutex_init(&usbhid->setup); /* needed on suspend/resume */ | ||
1020 | 1014 | ||
1021 | ret = hid_add_device(hid); | 1015 | ret = hid_add_device(hid); |
1022 | if (ret) { | 1016 | if (ret) { |
@@ -1051,18 +1045,14 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message) | |||
1051 | struct hid_device *hid = usb_get_intfdata (intf); | 1045 | struct hid_device *hid = usb_get_intfdata (intf); |
1052 | struct usbhid_device *usbhid = hid->driver_data; | 1046 | struct usbhid_device *usbhid = hid->driver_data; |
1053 | 1047 | ||
1054 | mutex_lock(&usbhid->setup); | 1048 | if (!test_bit(HID_STARTED, &usbhid->iofl)) |
1055 | if (!test_bit(HID_STARTED, &usbhid->iofl)) { | ||
1056 | mutex_unlock(&usbhid->setup); | ||
1057 | return 0; | 1049 | return 0; |
1058 | } | ||
1059 | 1050 | ||
1060 | spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ | 1051 | spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ |
1061 | set_bit(HID_SUSPENDED, &usbhid->iofl); | 1052 | set_bit(HID_SUSPENDED, &usbhid->iofl); |
1062 | spin_unlock_irq(&usbhid->inlock); | 1053 | spin_unlock_irq(&usbhid->inlock); |
1063 | del_timer_sync(&usbhid->io_retry); | 1054 | del_timer_sync(&usbhid->io_retry); |
1064 | usb_kill_urb(usbhid->urbin); | 1055 | usb_kill_urb(usbhid->urbin); |
1065 | mutex_unlock(&usbhid->setup); | ||
1066 | dev_dbg(&intf->dev, "suspend\n"); | 1056 | dev_dbg(&intf->dev, "suspend\n"); |
1067 | return 0; | 1057 | return 0; |
1068 | } | 1058 | } |
@@ -1073,16 +1063,12 @@ static int hid_resume(struct usb_interface *intf) | |||
1073 | struct usbhid_device *usbhid = hid->driver_data; | 1063 | struct usbhid_device *usbhid = hid->driver_data; |
1074 | int status; | 1064 | int status; |
1075 | 1065 | ||
1076 | mutex_lock(&usbhid->setup); | 1066 | if (!test_bit(HID_STARTED, &usbhid->iofl)) |
1077 | if (!test_bit(HID_STARTED, &usbhid->iofl)) { | ||
1078 | mutex_unlock(&usbhid->setup); | ||
1079 | return 0; | 1067 | return 0; |
1080 | } | ||
1081 | 1068 | ||
1082 | clear_bit(HID_SUSPENDED, &usbhid->iofl); | 1069 | clear_bit(HID_SUSPENDED, &usbhid->iofl); |
1083 | usbhid->retry_delay = 0; | 1070 | usbhid->retry_delay = 0; |
1084 | status = hid_start_in(hid); | 1071 | status = hid_start_in(hid); |
1085 | mutex_unlock(&usbhid->setup); | ||
1086 | dev_dbg(&intf->dev, "resume status %d\n", status); | 1072 | dev_dbg(&intf->dev, "resume status %d\n", status); |
1087 | return status; | 1073 | return status; |
1088 | } | 1074 | } |
diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h index 55973ff54008..332abcdf9956 100644 --- a/drivers/hid/usbhid/usbhid.h +++ b/drivers/hid/usbhid/usbhid.h | |||
@@ -74,7 +74,6 @@ struct usbhid_device { | |||
74 | dma_addr_t outbuf_dma; /* Output buffer dma */ | 74 | dma_addr_t outbuf_dma; /* Output buffer dma */ |
75 | spinlock_t outlock; /* Output fifo spinlock */ | 75 | spinlock_t outlock; /* Output fifo spinlock */ |
76 | 76 | ||
77 | struct mutex setup; | ||
78 | unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */ | 77 | unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */ |
79 | struct timer_list io_retry; /* Retry timer */ | 78 | struct timer_list io_retry; /* Retry timer */ |
80 | unsigned long stop_retry; /* Time to give up, in jiffies */ | 79 | unsigned long stop_retry; /* Time to give up, in jiffies */ |
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c index 918ffc4fc8ac..272543a42a43 100644 --- a/drivers/ieee1394/highlevel.c +++ b/drivers/ieee1394/highlevel.c | |||
@@ -46,10 +46,6 @@ static DEFINE_RWLOCK(hl_irqs_lock); | |||
46 | 46 | ||
47 | static DEFINE_RWLOCK(addr_space_lock); | 47 | static DEFINE_RWLOCK(addr_space_lock); |
48 | 48 | ||
49 | /* addr_space list will have zero and max already included as bounds */ | ||
50 | static struct hpsb_address_ops dummy_ops = { NULL, NULL, NULL, NULL }; | ||
51 | static struct hpsb_address_serve dummy_zero_addr, dummy_max_addr; | ||
52 | |||
53 | 49 | ||
54 | static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, | 50 | static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, |
55 | struct hpsb_host *host) | 51 | struct hpsb_host *host) |
@@ -481,20 +477,23 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, | |||
481 | return retval; | 477 | return retval; |
482 | } | 478 | } |
483 | 479 | ||
480 | static struct hpsb_address_ops dummy_ops; | ||
481 | |||
482 | /* dummy address spaces as lower and upper bounds of the host's a.s. list */ | ||
484 | static void init_hpsb_highlevel(struct hpsb_host *host) | 483 | static void init_hpsb_highlevel(struct hpsb_host *host) |
485 | { | 484 | { |
486 | INIT_LIST_HEAD(&dummy_zero_addr.host_list); | 485 | INIT_LIST_HEAD(&host->dummy_zero_addr.host_list); |
487 | INIT_LIST_HEAD(&dummy_zero_addr.hl_list); | 486 | INIT_LIST_HEAD(&host->dummy_zero_addr.hl_list); |
488 | INIT_LIST_HEAD(&dummy_max_addr.host_list); | 487 | INIT_LIST_HEAD(&host->dummy_max_addr.host_list); |
489 | INIT_LIST_HEAD(&dummy_max_addr.hl_list); | 488 | INIT_LIST_HEAD(&host->dummy_max_addr.hl_list); |
490 | 489 | ||
491 | dummy_zero_addr.op = dummy_max_addr.op = &dummy_ops; | 490 | host->dummy_zero_addr.op = host->dummy_max_addr.op = &dummy_ops; |
492 | 491 | ||
493 | dummy_zero_addr.start = dummy_zero_addr.end = 0; | 492 | host->dummy_zero_addr.start = host->dummy_zero_addr.end = 0; |
494 | dummy_max_addr.start = dummy_max_addr.end = ((u64) 1) << 48; | 493 | host->dummy_max_addr.start = host->dummy_max_addr.end = ((u64) 1) << 48; |
495 | 494 | ||
496 | list_add_tail(&dummy_zero_addr.host_list, &host->addr_space); | 495 | list_add_tail(&host->dummy_zero_addr.host_list, &host->addr_space); |
497 | list_add_tail(&dummy_max_addr.host_list, &host->addr_space); | 496 | list_add_tail(&host->dummy_max_addr.host_list, &host->addr_space); |
498 | } | 497 | } |
499 | 498 | ||
500 | void highlevel_add_host(struct hpsb_host *host) | 499 | void highlevel_add_host(struct hpsb_host *host) |
diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index e4e8aeb4d778..dd229950acca 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h | |||
@@ -13,6 +13,7 @@ struct module; | |||
13 | 13 | ||
14 | #include "ieee1394_types.h" | 14 | #include "ieee1394_types.h" |
15 | #include "csr.h" | 15 | #include "csr.h" |
16 | #include "highlevel.h" | ||
16 | 17 | ||
17 | struct hpsb_packet; | 18 | struct hpsb_packet; |
18 | struct hpsb_iso; | 19 | struct hpsb_iso; |
@@ -72,6 +73,9 @@ struct hpsb_host { | |||
72 | struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES]; | 73 | struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES]; |
73 | 74 | ||
74 | struct csr_control csr; | 75 | struct csr_control csr; |
76 | |||
77 | struct hpsb_address_serve dummy_zero_addr; | ||
78 | struct hpsb_address_serve dummy_max_addr; | ||
75 | }; | 79 | }; |
76 | 80 | ||
77 | enum devctl_cmd { | 81 | enum devctl_cmd { |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index c52f6e6e8af2..a373c18cf7b8 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -402,6 +402,11 @@ static const struct { | |||
402 | }, | 402 | }, |
403 | /* iPod mini */ { | 403 | /* iPod mini */ { |
404 | .firmware_revision = 0x0a2700, | 404 | .firmware_revision = 0x0a2700, |
405 | .model_id = 0x000022, | ||
406 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, | ||
407 | }, | ||
408 | /* iPod mini */ { | ||
409 | .firmware_revision = 0x0a2700, | ||
405 | .model_id = 0x000023, | 410 | .model_id = 0x000023, |
406 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, | 411 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, |
407 | }, | 412 | }, |
@@ -890,12 +895,13 @@ static void sbp2_host_reset(struct hpsb_host *host) | |||
890 | return; | 895 | return; |
891 | 896 | ||
892 | read_lock_irqsave(&sbp2_hi_logical_units_lock, flags); | 897 | read_lock_irqsave(&sbp2_hi_logical_units_lock, flags); |
898 | |||
893 | list_for_each_entry(lu, &hi->logical_units, lu_list) | 899 | list_for_each_entry(lu, &hi->logical_units, lu_list) |
894 | if (likely(atomic_read(&lu->state) != | 900 | if (atomic_cmpxchg(&lu->state, |
895 | SBP2LU_STATE_IN_SHUTDOWN)) { | 901 | SBP2LU_STATE_RUNNING, SBP2LU_STATE_IN_RESET) |
896 | atomic_set(&lu->state, SBP2LU_STATE_IN_RESET); | 902 | == SBP2LU_STATE_RUNNING) |
897 | scsi_block_requests(lu->shost); | 903 | scsi_block_requests(lu->shost); |
898 | } | 904 | |
899 | read_unlock_irqrestore(&sbp2_hi_logical_units_lock, flags); | 905 | read_unlock_irqrestore(&sbp2_hi_logical_units_lock, flags); |
900 | } | 906 | } |
901 | 907 | ||
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 4df887af66a5..7fc35cf0cddf 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h | |||
@@ -163,7 +163,8 @@ struct ehca_mod_qp_parm { | |||
163 | /* struct for tracking if cqes have been reported to the application */ | 163 | /* struct for tracking if cqes have been reported to the application */ |
164 | struct ehca_qmap_entry { | 164 | struct ehca_qmap_entry { |
165 | u16 app_wr_id; | 165 | u16 app_wr_id; |
166 | u16 reported; | 166 | u8 reported; |
167 | u8 cqe_req; | ||
167 | }; | 168 | }; |
168 | 169 | ||
169 | struct ehca_queue_map { | 170 | struct ehca_queue_map { |
@@ -171,6 +172,7 @@ struct ehca_queue_map { | |||
171 | unsigned int entries; | 172 | unsigned int entries; |
172 | unsigned int tail; | 173 | unsigned int tail; |
173 | unsigned int left_to_poll; | 174 | unsigned int left_to_poll; |
175 | unsigned int next_wqe_idx; /* Idx to first wqe to be flushed */ | ||
174 | }; | 176 | }; |
175 | 177 | ||
176 | struct ehca_qp { | 178 | struct ehca_qp { |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index bb02a86aa526..bec7e0249358 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -994,8 +994,7 @@ static int ehca_mem_notifier(struct notifier_block *nb, | |||
994 | if (printk_timed_ratelimit(&ehca_dmem_warn_time, | 994 | if (printk_timed_ratelimit(&ehca_dmem_warn_time, |
995 | 30 * 1000)) | 995 | 30 * 1000)) |
996 | ehca_gen_err("DMEM operations are not allowed" | 996 | ehca_gen_err("DMEM operations are not allowed" |
997 | "as long as an ehca adapter is" | 997 | "in conjunction with eHCA"); |
998 | "attached to the LPAR"); | ||
999 | return NOTIFY_BAD; | 998 | return NOTIFY_BAD; |
1000 | } | 999 | } |
1001 | } | 1000 | } |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 9e05ee2db39b..cadbf0cdd910 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -435,9 +435,13 @@ static void reset_queue_map(struct ehca_queue_map *qmap) | |||
435 | { | 435 | { |
436 | int i; | 436 | int i; |
437 | 437 | ||
438 | qmap->tail = 0; | 438 | qmap->tail = qmap->entries - 1; |
439 | for (i = 0; i < qmap->entries; i++) | 439 | qmap->left_to_poll = 0; |
440 | qmap->next_wqe_idx = 0; | ||
441 | for (i = 0; i < qmap->entries; i++) { | ||
440 | qmap->map[i].reported = 1; | 442 | qmap->map[i].reported = 1; |
443 | qmap->map[i].cqe_req = 0; | ||
444 | } | ||
441 | } | 445 | } |
442 | 446 | ||
443 | /* | 447 | /* |
@@ -1121,6 +1125,7 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue, | |||
1121 | void *wqe_v; | 1125 | void *wqe_v; |
1122 | u64 q_ofs; | 1126 | u64 q_ofs; |
1123 | u32 wqe_idx; | 1127 | u32 wqe_idx; |
1128 | unsigned int tail_idx; | ||
1124 | 1129 | ||
1125 | /* convert real to abs address */ | 1130 | /* convert real to abs address */ |
1126 | wqe_p = wqe_p & (~(1UL << 63)); | 1131 | wqe_p = wqe_p & (~(1UL << 63)); |
@@ -1133,12 +1138,17 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue, | |||
1133 | return -EFAULT; | 1138 | return -EFAULT; |
1134 | } | 1139 | } |
1135 | 1140 | ||
1141 | tail_idx = (qmap->tail + 1) % qmap->entries; | ||
1136 | wqe_idx = q_ofs / ipz_queue->qe_size; | 1142 | wqe_idx = q_ofs / ipz_queue->qe_size; |
1137 | if (wqe_idx < qmap->tail) | ||
1138 | qmap->left_to_poll = (qmap->entries - qmap->tail) + wqe_idx; | ||
1139 | else | ||
1140 | qmap->left_to_poll = wqe_idx - qmap->tail; | ||
1141 | 1143 | ||
1144 | /* check all processed wqes, whether a cqe is requested or not */ | ||
1145 | while (tail_idx != wqe_idx) { | ||
1146 | if (qmap->map[tail_idx].cqe_req) | ||
1147 | qmap->left_to_poll++; | ||
1148 | tail_idx = (tail_idx + 1) % qmap->entries; | ||
1149 | } | ||
1150 | /* save index in queue, where we have to start flushing */ | ||
1151 | qmap->next_wqe_idx = wqe_idx; | ||
1142 | return 0; | 1152 | return 0; |
1143 | } | 1153 | } |
1144 | 1154 | ||
@@ -1185,10 +1195,14 @@ static int check_for_left_cqes(struct ehca_qp *my_qp, struct ehca_shca *shca) | |||
1185 | } else { | 1195 | } else { |
1186 | spin_lock_irqsave(&my_qp->send_cq->spinlock, flags); | 1196 | spin_lock_irqsave(&my_qp->send_cq->spinlock, flags); |
1187 | my_qp->sq_map.left_to_poll = 0; | 1197 | my_qp->sq_map.left_to_poll = 0; |
1198 | my_qp->sq_map.next_wqe_idx = (my_qp->sq_map.tail + 1) % | ||
1199 | my_qp->sq_map.entries; | ||
1188 | spin_unlock_irqrestore(&my_qp->send_cq->spinlock, flags); | 1200 | spin_unlock_irqrestore(&my_qp->send_cq->spinlock, flags); |
1189 | 1201 | ||
1190 | spin_lock_irqsave(&my_qp->recv_cq->spinlock, flags); | 1202 | spin_lock_irqsave(&my_qp->recv_cq->spinlock, flags); |
1191 | my_qp->rq_map.left_to_poll = 0; | 1203 | my_qp->rq_map.left_to_poll = 0; |
1204 | my_qp->rq_map.next_wqe_idx = (my_qp->rq_map.tail + 1) % | ||
1205 | my_qp->rq_map.entries; | ||
1192 | spin_unlock_irqrestore(&my_qp->recv_cq->spinlock, flags); | 1206 | spin_unlock_irqrestore(&my_qp->recv_cq->spinlock, flags); |
1193 | } | 1207 | } |
1194 | 1208 | ||
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c index 64928079eafa..00a648f4316c 100644 --- a/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/drivers/infiniband/hw/ehca/ehca_reqs.c | |||
@@ -179,6 +179,7 @@ static inline int ehca_write_swqe(struct ehca_qp *qp, | |||
179 | 179 | ||
180 | qmap_entry->app_wr_id = get_app_wr_id(send_wr->wr_id); | 180 | qmap_entry->app_wr_id = get_app_wr_id(send_wr->wr_id); |
181 | qmap_entry->reported = 0; | 181 | qmap_entry->reported = 0; |
182 | qmap_entry->cqe_req = 0; | ||
182 | 183 | ||
183 | switch (send_wr->opcode) { | 184 | switch (send_wr->opcode) { |
184 | case IB_WR_SEND: | 185 | case IB_WR_SEND: |
@@ -203,8 +204,10 @@ static inline int ehca_write_swqe(struct ehca_qp *qp, | |||
203 | 204 | ||
204 | if ((send_wr->send_flags & IB_SEND_SIGNALED || | 205 | if ((send_wr->send_flags & IB_SEND_SIGNALED || |
205 | qp->init_attr.sq_sig_type == IB_SIGNAL_ALL_WR) | 206 | qp->init_attr.sq_sig_type == IB_SIGNAL_ALL_WR) |
206 | && !hidden) | 207 | && !hidden) { |
207 | wqe_p->wr_flag |= WQE_WRFLAG_REQ_SIGNAL_COM; | 208 | wqe_p->wr_flag |= WQE_WRFLAG_REQ_SIGNAL_COM; |
209 | qmap_entry->cqe_req = 1; | ||
210 | } | ||
208 | 211 | ||
209 | if (send_wr->opcode == IB_WR_SEND_WITH_IMM || | 212 | if (send_wr->opcode == IB_WR_SEND_WITH_IMM || |
210 | send_wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) { | 213 | send_wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) { |
@@ -569,6 +572,7 @@ static int internal_post_recv(struct ehca_qp *my_qp, | |||
569 | qmap_entry = &my_qp->rq_map.map[rq_map_idx]; | 572 | qmap_entry = &my_qp->rq_map.map[rq_map_idx]; |
570 | qmap_entry->app_wr_id = get_app_wr_id(cur_recv_wr->wr_id); | 573 | qmap_entry->app_wr_id = get_app_wr_id(cur_recv_wr->wr_id); |
571 | qmap_entry->reported = 0; | 574 | qmap_entry->reported = 0; |
575 | qmap_entry->cqe_req = 1; | ||
572 | 576 | ||
573 | wqe_cnt++; | 577 | wqe_cnt++; |
574 | } /* eof for cur_recv_wr */ | 578 | } /* eof for cur_recv_wr */ |
@@ -706,27 +710,34 @@ repoll: | |||
706 | goto repoll; | 710 | goto repoll; |
707 | wc->qp = &my_qp->ib_qp; | 711 | wc->qp = &my_qp->ib_qp; |
708 | 712 | ||
713 | qmap_tail_idx = get_app_wr_id(cqe->work_request_id); | ||
714 | if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT)) | ||
715 | /* We got a send completion. */ | ||
716 | qmap = &my_qp->sq_map; | ||
717 | else | ||
718 | /* We got a receive completion. */ | ||
719 | qmap = &my_qp->rq_map; | ||
720 | |||
721 | /* advance the tail pointer */ | ||
722 | qmap->tail = qmap_tail_idx; | ||
723 | |||
709 | if (is_error) { | 724 | if (is_error) { |
710 | /* | 725 | /* |
711 | * set left_to_poll to 0 because in error state, we will not | 726 | * set left_to_poll to 0 because in error state, we will not |
712 | * get any additional CQEs | 727 | * get any additional CQEs |
713 | */ | 728 | */ |
714 | ehca_add_to_err_list(my_qp, 1); | 729 | my_qp->sq_map.next_wqe_idx = (my_qp->sq_map.tail + 1) % |
730 | my_qp->sq_map.entries; | ||
715 | my_qp->sq_map.left_to_poll = 0; | 731 | my_qp->sq_map.left_to_poll = 0; |
732 | ehca_add_to_err_list(my_qp, 1); | ||
716 | 733 | ||
734 | my_qp->rq_map.next_wqe_idx = (my_qp->rq_map.tail + 1) % | ||
735 | my_qp->rq_map.entries; | ||
736 | my_qp->rq_map.left_to_poll = 0; | ||
717 | if (HAS_RQ(my_qp)) | 737 | if (HAS_RQ(my_qp)) |
718 | ehca_add_to_err_list(my_qp, 0); | 738 | ehca_add_to_err_list(my_qp, 0); |
719 | my_qp->rq_map.left_to_poll = 0; | ||
720 | } | 739 | } |
721 | 740 | ||
722 | qmap_tail_idx = get_app_wr_id(cqe->work_request_id); | ||
723 | if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT)) | ||
724 | /* We got a send completion. */ | ||
725 | qmap = &my_qp->sq_map; | ||
726 | else | ||
727 | /* We got a receive completion. */ | ||
728 | qmap = &my_qp->rq_map; | ||
729 | |||
730 | qmap_entry = &qmap->map[qmap_tail_idx]; | 741 | qmap_entry = &qmap->map[qmap_tail_idx]; |
731 | if (qmap_entry->reported) { | 742 | if (qmap_entry->reported) { |
732 | ehca_warn(cq->device, "Double cqe on qp_num=%#x", | 743 | ehca_warn(cq->device, "Double cqe on qp_num=%#x", |
@@ -738,10 +749,6 @@ repoll: | |||
738 | wc->wr_id = replace_wr_id(cqe->work_request_id, qmap_entry->app_wr_id); | 749 | wc->wr_id = replace_wr_id(cqe->work_request_id, qmap_entry->app_wr_id); |
739 | qmap_entry->reported = 1; | 750 | qmap_entry->reported = 1; |
740 | 751 | ||
741 | /* this is a proper completion, we need to advance the tail pointer */ | ||
742 | if (++qmap->tail == qmap->entries) | ||
743 | qmap->tail = 0; | ||
744 | |||
745 | /* if left_to_poll is decremented to 0, add the QP to the error list */ | 752 | /* if left_to_poll is decremented to 0, add the QP to the error list */ |
746 | if (qmap->left_to_poll > 0) { | 753 | if (qmap->left_to_poll > 0) { |
747 | qmap->left_to_poll--; | 754 | qmap->left_to_poll--; |
@@ -805,13 +812,14 @@ static int generate_flush_cqes(struct ehca_qp *my_qp, struct ib_cq *cq, | |||
805 | else | 812 | else |
806 | qmap = &my_qp->rq_map; | 813 | qmap = &my_qp->rq_map; |
807 | 814 | ||
808 | qmap_entry = &qmap->map[qmap->tail]; | 815 | qmap_entry = &qmap->map[qmap->next_wqe_idx]; |
809 | 816 | ||
810 | while ((nr < num_entries) && (qmap_entry->reported == 0)) { | 817 | while ((nr < num_entries) && (qmap_entry->reported == 0)) { |
811 | /* generate flush CQE */ | 818 | /* generate flush CQE */ |
819 | |||
812 | memset(wc, 0, sizeof(*wc)); | 820 | memset(wc, 0, sizeof(*wc)); |
813 | 821 | ||
814 | offset = qmap->tail * ipz_queue->qe_size; | 822 | offset = qmap->next_wqe_idx * ipz_queue->qe_size; |
815 | wqe = (struct ehca_wqe *)ipz_qeit_calc(ipz_queue, offset); | 823 | wqe = (struct ehca_wqe *)ipz_qeit_calc(ipz_queue, offset); |
816 | if (!wqe) { | 824 | if (!wqe) { |
817 | ehca_err(cq->device, "Invalid wqe offset=%#lx on " | 825 | ehca_err(cq->device, "Invalid wqe offset=%#lx on " |
@@ -850,11 +858,12 @@ static int generate_flush_cqes(struct ehca_qp *my_qp, struct ib_cq *cq, | |||
850 | 858 | ||
851 | wc->qp = &my_qp->ib_qp; | 859 | wc->qp = &my_qp->ib_qp; |
852 | 860 | ||
853 | /* mark as reported and advance tail pointer */ | 861 | /* mark as reported and advance next_wqe pointer */ |
854 | qmap_entry->reported = 1; | 862 | qmap_entry->reported = 1; |
855 | if (++qmap->tail == qmap->entries) | 863 | qmap->next_wqe_idx++; |
856 | qmap->tail = 0; | 864 | if (qmap->next_wqe_idx == qmap->entries) |
857 | qmap_entry = &qmap->map[qmap->tail]; | 865 | qmap->next_wqe_idx = 0; |
866 | qmap_entry = &qmap->map[qmap->next_wqe_idx]; | ||
858 | 867 | ||
859 | wc++; nr++; | 868 | wc++; nr++; |
860 | } | 869 | } |
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index d0866a3636e2..18308494a195 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c | |||
@@ -343,6 +343,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) | |||
343 | { | 343 | { |
344 | struct mlx4_ib_dev *dev = to_mdev(ibcq->device); | 344 | struct mlx4_ib_dev *dev = to_mdev(ibcq->device); |
345 | struct mlx4_ib_cq *cq = to_mcq(ibcq); | 345 | struct mlx4_ib_cq *cq = to_mcq(ibcq); |
346 | struct mlx4_mtt mtt; | ||
346 | int outst_cqe; | 347 | int outst_cqe; |
347 | int err; | 348 | int err; |
348 | 349 | ||
@@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) | |||
376 | goto out; | 377 | goto out; |
377 | } | 378 | } |
378 | 379 | ||
380 | mtt = cq->buf.mtt; | ||
381 | |||
379 | err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt); | 382 | err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt); |
380 | if (err) | 383 | if (err) |
381 | goto err_buf; | 384 | goto err_buf; |
382 | 385 | ||
386 | mlx4_mtt_cleanup(dev->dev, &mtt); | ||
383 | if (ibcq->uobject) { | 387 | if (ibcq->uobject) { |
384 | cq->buf = cq->resize_buf->buf; | 388 | cq->buf = cq->resize_buf->buf; |
385 | cq->ibcq.cqe = cq->resize_buf->cqe; | 389 | cq->ibcq.cqe = cq->resize_buf->cqe; |
@@ -406,6 +410,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) | |||
406 | goto out; | 410 | goto out; |
407 | 411 | ||
408 | err_buf: | 412 | err_buf: |
413 | mlx4_mtt_cleanup(dev->dev, &cq->resize_buf->buf.mtt); | ||
409 | if (!ibcq->uobject) | 414 | if (!ibcq->uobject) |
410 | mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf, | 415 | mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf, |
411 | cq->resize_buf->cqe); | 416 | cq->resize_buf->cqe); |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 468921b8f4b6..90a0281d15ea 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -753,6 +753,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
753 | struct mlx4_priv *priv = mlx4_priv(dev); | 753 | struct mlx4_priv *priv = mlx4_priv(dev); |
754 | int err; | 754 | int err; |
755 | int port; | 755 | int port; |
756 | __be32 ib_port_default_caps; | ||
756 | 757 | ||
757 | err = mlx4_init_uar_table(dev); | 758 | err = mlx4_init_uar_table(dev); |
758 | if (err) { | 759 | if (err) { |
@@ -852,6 +853,13 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
852 | } | 853 | } |
853 | 854 | ||
854 | for (port = 1; port <= dev->caps.num_ports; port++) { | 855 | for (port = 1; port <= dev->caps.num_ports; port++) { |
856 | ib_port_default_caps = 0; | ||
857 | err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); | ||
858 | if (err) | ||
859 | mlx4_warn(dev, "failed to get port %d default " | ||
860 | "ib capabilities (%d). Continuing with " | ||
861 | "caps = 0\n", port, err); | ||
862 | dev->caps.ib_port_def_cap[port] = ib_port_default_caps; | ||
855 | err = mlx4_SET_PORT(dev, port); | 863 | err = mlx4_SET_PORT(dev, port); |
856 | if (err) { | 864 | if (err) { |
857 | mlx4_err(dev, "Failed to set port %d, aborting\n", | 865 | mlx4_err(dev, "Failed to set port %d, aborting\n", |
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index 56a2e213fe62..34c909deaff3 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h | |||
@@ -385,5 +385,6 @@ void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table); | |||
385 | void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table); | 385 | void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table); |
386 | 386 | ||
387 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port); | 387 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port); |
388 | int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps); | ||
388 | 389 | ||
389 | #endif /* MLX4_H */ | 390 | #endif /* MLX4_H */ |
diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c index e2fdab42c4ce..0a057e5dc63b 100644 --- a/drivers/net/mlx4/port.c +++ b/drivers/net/mlx4/port.c | |||
@@ -258,6 +258,42 @@ out: | |||
258 | } | 258 | } |
259 | EXPORT_SYMBOL_GPL(mlx4_unregister_vlan); | 259 | EXPORT_SYMBOL_GPL(mlx4_unregister_vlan); |
260 | 260 | ||
261 | int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps) | ||
262 | { | ||
263 | struct mlx4_cmd_mailbox *inmailbox, *outmailbox; | ||
264 | u8 *inbuf, *outbuf; | ||
265 | int err; | ||
266 | |||
267 | inmailbox = mlx4_alloc_cmd_mailbox(dev); | ||
268 | if (IS_ERR(inmailbox)) | ||
269 | return PTR_ERR(inmailbox); | ||
270 | |||
271 | outmailbox = mlx4_alloc_cmd_mailbox(dev); | ||
272 | if (IS_ERR(outmailbox)) { | ||
273 | mlx4_free_cmd_mailbox(dev, inmailbox); | ||
274 | return PTR_ERR(outmailbox); | ||
275 | } | ||
276 | |||
277 | inbuf = inmailbox->buf; | ||
278 | outbuf = outmailbox->buf; | ||
279 | memset(inbuf, 0, 256); | ||
280 | memset(outbuf, 0, 256); | ||
281 | inbuf[0] = 1; | ||
282 | inbuf[1] = 1; | ||
283 | inbuf[2] = 1; | ||
284 | inbuf[3] = 1; | ||
285 | *(__be16 *) (&inbuf[16]) = cpu_to_be16(0x0015); | ||
286 | *(__be32 *) (&inbuf[20]) = cpu_to_be32(port); | ||
287 | |||
288 | err = mlx4_cmd_box(dev, inmailbox->dma, outmailbox->dma, port, 3, | ||
289 | MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C); | ||
290 | if (!err) | ||
291 | *caps = *(__be32 *) (outbuf + 84); | ||
292 | mlx4_free_cmd_mailbox(dev, inmailbox); | ||
293 | mlx4_free_cmd_mailbox(dev, outmailbox); | ||
294 | return err; | ||
295 | } | ||
296 | |||
261 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) | 297 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) |
262 | { | 298 | { |
263 | struct mlx4_cmd_mailbox *mailbox; | 299 | struct mlx4_cmd_mailbox *mailbox; |
@@ -273,7 +309,8 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) | |||
273 | ((u8 *) mailbox->buf)[3] = 6; | 309 | ((u8 *) mailbox->buf)[3] = 6; |
274 | ((__be16 *) mailbox->buf)[4] = cpu_to_be16(1 << 15); | 310 | ((__be16 *) mailbox->buf)[4] = cpu_to_be16(1 << 15); |
275 | ((__be16 *) mailbox->buf)[6] = cpu_to_be16(1 << 15); | 311 | ((__be16 *) mailbox->buf)[6] = cpu_to_be16(1 << 15); |
276 | } | 312 | } else |
313 | ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port]; | ||
277 | err = mlx4_cmd(dev, mailbox->dma, port, is_eth, MLX4_CMD_SET_PORT, | 314 | err = mlx4_cmd(dev, mailbox->dma, port, is_eth, MLX4_CMD_SET_PORT, |
278 | MLX4_CMD_TIME_CLASS_B); | 315 | MLX4_CMD_TIME_CLASS_B); |
279 | 316 | ||
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 054f5dd58931..f08e169ba1b5 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
@@ -361,7 +361,7 @@ fail: | |||
361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); | 361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); |
362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); | 362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); |
363 | 363 | ||
364 | static int __init bbc_i2c_probe(struct of_device *op, | 364 | static int __devinit bbc_i2c_probe(struct of_device *op, |
365 | const struct of_device_id *match) | 365 | const struct of_device_id *match) |
366 | { | 366 | { |
367 | struct bbc_i2c_bus *bp; | 367 | struct bbc_i2c_bus *bp; |
@@ -386,7 +386,7 @@ static int __init bbc_i2c_probe(struct of_device *op, | |||
386 | return err; | 386 | return err; |
387 | } | 387 | } |
388 | 388 | ||
389 | static int __exit bbc_i2c_remove(struct of_device *op) | 389 | static int __devexit bbc_i2c_remove(struct of_device *op) |
390 | { | 390 | { |
391 | struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); | 391 | struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); |
392 | 392 | ||
@@ -417,7 +417,7 @@ static struct of_platform_driver bbc_i2c_driver = { | |||
417 | .name = "bbc_i2c", | 417 | .name = "bbc_i2c", |
418 | .match_table = bbc_i2c_match, | 418 | .match_table = bbc_i2c_match, |
419 | .probe = bbc_i2c_probe, | 419 | .probe = bbc_i2c_probe, |
420 | .remove = __exit_p(bbc_i2c_remove), | 420 | .remove = __devexit_p(bbc_i2c_remove), |
421 | }; | 421 | }; |
422 | 422 | ||
423 | static int __init bbc_i2c_init(void) | 423 | static int __init bbc_i2c_init(void) |
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index 1fe8b44787b3..b3408ff39fba 100644 --- a/drivers/usb/gadget/fsl_qe_udc.c +++ b/drivers/usb/gadget/fsl_qe_udc.c | |||
@@ -2363,6 +2363,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | |||
2363 | nuke(loop_ep, -ESHUTDOWN); | 2363 | nuke(loop_ep, -ESHUTDOWN); |
2364 | spin_unlock_irqrestore(&udc_controller->lock, flags); | 2364 | spin_unlock_irqrestore(&udc_controller->lock, flags); |
2365 | 2365 | ||
2366 | /* report disconnect; the controller is already quiesced */ | ||
2367 | driver->disconnect(&udc_controller->gadget); | ||
2368 | |||
2366 | /* unbind gadget and unhook driver. */ | 2369 | /* unbind gadget and unhook driver. */ |
2367 | driver->unbind(&udc_controller->gadget); | 2370 | driver->unbind(&udc_controller->gadget); |
2368 | udc_controller->gadget.dev.driver = NULL; | 2371 | udc_controller->gadget.dev.driver = NULL; |
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 091bb55c9aa7..f3c6703cffda 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c | |||
@@ -1836,6 +1836,9 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | |||
1836 | nuke(loop_ep, -ESHUTDOWN); | 1836 | nuke(loop_ep, -ESHUTDOWN); |
1837 | spin_unlock_irqrestore(&udc_controller->lock, flags); | 1837 | spin_unlock_irqrestore(&udc_controller->lock, flags); |
1838 | 1838 | ||
1839 | /* report disconnect; the controller is already quiesced */ | ||
1840 | driver->disconnect(&udc_controller->gadget); | ||
1841 | |||
1839 | /* unbind gadget and unhook driver. */ | 1842 | /* unbind gadget and unhook driver. */ |
1840 | driver->unbind(&udc_controller->gadget); | 1843 | driver->unbind(&udc_controller->gadget); |
1841 | udc_controller->gadget.dev.driver = NULL; | 1844 | udc_controller->gadget.dev.driver = NULL; |
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 9d0ea573aef6..36864f958444 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -169,18 +169,21 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
169 | } | 169 | } |
170 | break; | 170 | break; |
171 | case PCI_VENDOR_ID_ATI: | 171 | case PCI_VENDOR_ID_ATI: |
172 | /* SB700 old version has a bug in EHCI controller, | 172 | /* SB600 and old version of SB700 have a bug in EHCI controller, |
173 | * which causes usb devices lose response in some cases. | 173 | * which causes usb devices lose response in some cases. |
174 | */ | 174 | */ |
175 | if (pdev->device == 0x4396) { | 175 | if ((pdev->device == 0x4386) || (pdev->device == 0x4396)) { |
176 | p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, | 176 | p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, |
177 | PCI_DEVICE_ID_ATI_SBX00_SMBUS, | 177 | PCI_DEVICE_ID_ATI_SBX00_SMBUS, |
178 | NULL); | 178 | NULL); |
179 | if (!p_smbus) | 179 | if (!p_smbus) |
180 | break; | 180 | break; |
181 | rev = p_smbus->revision; | 181 | rev = p_smbus->revision; |
182 | if ((rev == 0x3a) || (rev == 0x3b)) { | 182 | if ((pdev->device == 0x4386) || (rev == 0x3a) |
183 | || (rev == 0x3b)) { | ||
183 | u8 tmp; | 184 | u8 tmp; |
185 | ehci_info(ehci, "applying AMD SB600/SB700 USB " | ||
186 | "freeze workaround\n"); | ||
184 | pci_read_config_byte(pdev, 0x53, &tmp); | 187 | pci_read_config_byte(pdev, 0x53, &tmp); |
185 | pci_write_config_byte(pdev, 0x53, tmp | (1<<3)); | 188 | pci_write_config_byte(pdev, 0x53, tmp | (1<<3)); |
186 | } | 189 | } |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index b11798d17ae5..c7d4b5a06bdb 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -183,16 +183,14 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) | |||
183 | * the async ring; just the I/O watchdog. Note that if a | 183 | * the async ring; just the I/O watchdog. Note that if a |
184 | * SHRINK were pending, OFF would never be requested. | 184 | * SHRINK were pending, OFF would never be requested. |
185 | */ | 185 | */ |
186 | enum ehci_timer_action oldactions = ehci->actions; | 186 | if (timer_pending(&ehci->watchdog) |
187 | && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) | ||
188 | & ehci->actions)) | ||
189 | return; | ||
187 | 190 | ||
188 | if (!test_and_set_bit (action, &ehci->actions)) { | 191 | if (!test_and_set_bit (action, &ehci->actions)) { |
189 | unsigned long t; | 192 | unsigned long t; |
190 | 193 | ||
191 | if (timer_pending(&ehci->watchdog) | ||
192 | && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) | ||
193 | & oldactions)) | ||
194 | return; | ||
195 | |||
196 | switch (action) { | 194 | switch (action) { |
197 | case TIMER_IO_WATCHDOG: | 195 | case TIMER_IO_WATCHDOG: |
198 | t = EHCI_IO_JIFFIES; | 196 | t = EHCI_IO_JIFFIES; |
@@ -208,7 +206,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) | |||
208 | t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1; | 206 | t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1; |
209 | break; | 207 | break; |
210 | } | 208 | } |
211 | mod_timer(&ehci->watchdog, round_jiffies(t + jiffies)); | 209 | mod_timer(&ehci->watchdog, t + jiffies); |
212 | } | 210 | } |
213 | } | 211 | } |
214 | 212 | ||
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 5b20de130e08..5b95009d2fbb 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c | |||
@@ -135,6 +135,7 @@ static int usb_console_setup(struct console *co, char *options) | |||
135 | err("no more memory"); | 135 | err("no more memory"); |
136 | goto reset_open_count; | 136 | goto reset_open_count; |
137 | } | 137 | } |
138 | kref_init(&tty->kref); | ||
138 | termios = kzalloc(sizeof(*termios), GFP_KERNEL); | 139 | termios = kzalloc(sizeof(*termios), GFP_KERNEL); |
139 | if (!termios) { | 140 | if (!termios) { |
140 | retval = -ENOMEM; | 141 | retval = -ENOMEM; |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 6fa1ec441b61..809697b3c7fc 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -224,6 +224,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po | |||
224 | #define ONDA_VENDOR_ID 0x19d2 | 224 | #define ONDA_VENDOR_ID 0x19d2 |
225 | #define ONDA_PRODUCT_MSA501HS 0x0001 | 225 | #define ONDA_PRODUCT_MSA501HS 0x0001 |
226 | #define ONDA_PRODUCT_ET502HS 0x0002 | 226 | #define ONDA_PRODUCT_ET502HS 0x0002 |
227 | #define ONDA_PRODUCT_MT503HS 0x0200 | ||
227 | 228 | ||
228 | #define BANDRICH_VENDOR_ID 0x1A8D | 229 | #define BANDRICH_VENDOR_ID 0x1A8D |
229 | #define BANDRICH_PRODUCT_C100_1 0x1002 | 230 | #define BANDRICH_PRODUCT_C100_1 0x1002 |
@@ -413,6 +414,40 @@ static struct usb_device_id option_ids[] = { | |||
413 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, | 414 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, |
414 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, | 415 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, |
415 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, | 416 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, |
417 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0003) }, | ||
418 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0004) }, | ||
419 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0005) }, | ||
420 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0006) }, | ||
421 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0007) }, | ||
422 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0008) }, | ||
423 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0009) }, | ||
424 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000a) }, | ||
425 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000b) }, | ||
426 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000c) }, | ||
427 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000d) }, | ||
428 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000e) }, | ||
429 | { USB_DEVICE(ONDA_VENDOR_ID, 0x000f) }, | ||
430 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0010) }, | ||
431 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0011) }, | ||
432 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0012) }, | ||
433 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0013) }, | ||
434 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0014) }, | ||
435 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0015) }, | ||
436 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0016) }, | ||
437 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0017) }, | ||
438 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0018) }, | ||
439 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0019) }, | ||
440 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0020) }, | ||
441 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0021) }, | ||
442 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0022) }, | ||
443 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0023) }, | ||
444 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0024) }, | ||
445 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0025) }, | ||
446 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0026) }, | ||
447 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0027) }, | ||
448 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0028) }, | ||
449 | { USB_DEVICE(ONDA_VENDOR_ID, 0x0029) }, | ||
450 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MT503HS) }, | ||
416 | { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, | 451 | { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, |
417 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, | 452 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, |
418 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, | 453 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 6da9a7a962a8..e61f2bfc64ad 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -318,6 +318,18 @@ UNUSUAL_DEV( 0x045a, 0x5210, 0x0101, 0x0101, | |||
318 | US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0), | 318 | US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0), |
319 | #endif | 319 | #endif |
320 | 320 | ||
321 | /* Reported by Tamas Kerecsen <kerecsen@bigfoot.com> | ||
322 | * Obviously the PROM has not been customized by the VAR; | ||
323 | * the Vendor and Product string descriptors are: | ||
324 | * Generic Mass Storage (PROTOTYPE--Remember to change idVendor) | ||
325 | * Generic Manufacturer (PROTOTYPE--Remember to change idVendor) | ||
326 | */ | ||
327 | UNUSUAL_DEV( 0x045e, 0xffff, 0x0000, 0x0000, | ||
328 | "Mitac", | ||
329 | "GPS", | ||
330 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
331 | US_FL_MAX_SECTORS_64 ), | ||
332 | |||
321 | /* | 333 | /* |
322 | * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.) | 334 | * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.) |
323 | * Reported by Pete Zaitcev <zaitcev@redhat.com> | 335 | * Reported by Pete Zaitcev <zaitcev@redhat.com> |
@@ -377,6 +389,13 @@ UNUSUAL_DEV( 0x04b0, 0x0401, 0x0200, 0x0200, | |||
377 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 389 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
378 | US_FL_FIX_CAPACITY), | 390 | US_FL_FIX_CAPACITY), |
379 | 391 | ||
392 | /* Reported by Tobias Kunze Briseno <t-linux@fictive.com> */ | ||
393 | UNUSUAL_DEV( 0x04b0, 0x0403, 0x0200, 0x0200, | ||
394 | "NIKON", | ||
395 | "NIKON DSC D2H", | ||
396 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
397 | US_FL_FIX_CAPACITY), | ||
398 | |||
380 | /* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */ | 399 | /* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */ |
381 | UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100, | 400 | UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100, |
382 | "NIKON", | 401 | "NIKON", |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index bd9977b89490..371086fd946f 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -179,6 +179,7 @@ struct mlx4_caps { | |||
179 | int num_ports; | 179 | int num_ports; |
180 | int vl_cap[MLX4_MAX_PORTS + 1]; | 180 | int vl_cap[MLX4_MAX_PORTS + 1]; |
181 | int ib_mtu_cap[MLX4_MAX_PORTS + 1]; | 181 | int ib_mtu_cap[MLX4_MAX_PORTS + 1]; |
182 | __be32 ib_port_def_cap[MLX4_MAX_PORTS + 1]; | ||
182 | u64 def_mac[MLX4_MAX_PORTS + 1]; | 183 | u64 def_mac[MLX4_MAX_PORTS + 1]; |
183 | int eth_mtu_cap[MLX4_MAX_PORTS + 1]; | 184 | int eth_mtu_cap[MLX4_MAX_PORTS + 1]; |
184 | int gid_table_len[MLX4_MAX_PORTS + 1]; | 185 | int gid_table_len[MLX4_MAX_PORTS + 1]; |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 7ea1440b53db..62e7f62fb559 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1248,6 +1248,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
1248 | list_add(&page->lru, &l_inactive); | 1248 | list_add(&page->lru, &l_inactive); |
1249 | } | 1249 | } |
1250 | 1250 | ||
1251 | spin_lock_irq(&zone->lru_lock); | ||
1251 | /* | 1252 | /* |
1252 | * Count referenced pages from currently used mappings as | 1253 | * Count referenced pages from currently used mappings as |
1253 | * rotated, even though they are moved to the inactive list. | 1254 | * rotated, even though they are moved to the inactive list. |
@@ -1263,7 +1264,6 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
1263 | 1264 | ||
1264 | pgmoved = 0; | 1265 | pgmoved = 0; |
1265 | lru = LRU_BASE + file * LRU_FILE; | 1266 | lru = LRU_BASE + file * LRU_FILE; |
1266 | spin_lock_irq(&zone->lru_lock); | ||
1267 | while (!list_empty(&l_inactive)) { | 1267 | while (!list_empty(&l_inactive)) { |
1268 | page = lru_to_page(&l_inactive); | 1268 | page = lru_to_page(&l_inactive); |
1269 | prefetchw_prev_lru_page(page, &l_inactive, flags); | 1269 | prefetchw_prev_lru_page(page, &l_inactive, flags); |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 6c427bbac326..d44bf98e965e 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -1856,7 +1856,7 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card, | |||
1856 | return 0; | 1856 | return 0; |
1857 | } | 1857 | } |
1858 | 1858 | ||
1859 | static int __init cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1859 | static int __devinit cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match) |
1860 | { | 1860 | { |
1861 | struct resource *rp = &op->resource[0]; | 1861 | struct resource *rp = &op->resource[0]; |
1862 | struct snd_card *card; | 1862 | struct snd_card *card; |
@@ -2048,7 +2048,7 @@ static int __init snd_cs4231_ebus_create(struct snd_card *card, | |||
2048 | return 0; | 2048 | return 0; |
2049 | } | 2049 | } |
2050 | 2050 | ||
2051 | static int __init cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match) | 2051 | static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match) |
2052 | { | 2052 | { |
2053 | struct snd_card *card; | 2053 | struct snd_card *card; |
2054 | int err; | 2054 | int err; |
@@ -2072,7 +2072,7 @@ static int __init cs4231_ebus_probe(struct of_device *op, const struct of_device | |||
2072 | } | 2072 | } |
2073 | #endif | 2073 | #endif |
2074 | 2074 | ||
2075 | static int __init cs4231_probe(struct of_device *op, const struct of_device_id *match) | 2075 | static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) |
2076 | { | 2076 | { |
2077 | #ifdef EBUS_SUPPORT | 2077 | #ifdef EBUS_SUPPORT |
2078 | if (!strcmp(op->node->parent->name, "ebus")) | 2078 | if (!strcmp(op->node->parent->name, "ebus")) |
@@ -2086,7 +2086,7 @@ static int __init cs4231_probe(struct of_device *op, const struct of_device_id * | |||
2086 | return -ENODEV; | 2086 | return -ENODEV; |
2087 | } | 2087 | } |
2088 | 2088 | ||
2089 | static int __exit cs4231_remove(struct of_device *op) | 2089 | static int __devexit cs4231_remove(struct of_device *op) |
2090 | { | 2090 | { |
2091 | struct snd_cs4231 *chip = dev_get_drvdata(&op->dev); | 2091 | struct snd_cs4231 *chip = dev_get_drvdata(&op->dev); |
2092 | 2092 | ||
@@ -2112,7 +2112,7 @@ static struct of_platform_driver cs4231_driver = { | |||
2112 | .name = "audio", | 2112 | .name = "audio", |
2113 | .match_table = cs4231_match, | 2113 | .match_table = cs4231_match, |
2114 | .probe = cs4231_probe, | 2114 | .probe = cs4231_probe, |
2115 | .remove = __exit_p(cs4231_remove), | 2115 | .remove = __devexit_p(cs4231_remove), |
2116 | }; | 2116 | }; |
2117 | 2117 | ||
2118 | static int __init cs4231_init(void) | 2118 | static int __init cs4231_init(void) |