diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-08-02 17:36:28 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-08-02 17:36:28 -0400 |
commit | f2d40cd92c5604a868b22c44a7858206ae4fcf35 (patch) | |
tree | 40f3e49465ede8982f6b95b7ba51b9a9ebf22ff6 /drivers | |
parent | 3ca135e16a393e5c5cf6490ce751e43c59011dde (diff) | |
parent | 7a883eaf62f4b943ebec738ce3b0796c67ef5d32 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/ata_piix.c | 74 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 1 | ||||
-rw-r--r-- | drivers/ata/libata-sff.c | 4 | ||||
-rw-r--r-- | drivers/ata/pata_cmd64x.c | 8 | ||||
-rw-r--r-- | drivers/ata/pata_sis.c | 20 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 5 | ||||
-rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 138 | ||||
-rw-r--r-- | drivers/ide/arm/icside.c | 3 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 4 | ||||
-rw-r--r-- | drivers/ide/pci/cs5520.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/cs5535.c | 42 | ||||
-rw-r--r-- | drivers/ide/pci/it8213.c | 33 | ||||
-rw-r--r-- | drivers/ide/pci/jmicron.c | 21 | ||||
-rw-r--r-- | drivers/ide/pci/piix.c | 17 | ||||
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 61 | ||||
-rw-r--r-- | drivers/ide/pci/sis5513.c | 1 | ||||
-rw-r--r-- | drivers/ide/pci/slc90e66.c | 15 | ||||
-rw-r--r-- | drivers/pci/pci-driver.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.c | 7 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 10 |
22 files changed, 288 insertions, 184 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index ad070861bb53..a78832ea81fa 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -890,37 +890,46 @@ static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
890 | } | 890 | } |
891 | 891 | ||
892 | #ifdef CONFIG_PM | 892 | #ifdef CONFIG_PM |
893 | static struct dmi_system_id piix_broken_suspend_dmi_table[] = { | 893 | static int piix_broken_suspend(void) |
894 | { | 894 | { |
895 | .ident = "TECRA M5", | 895 | static struct dmi_system_id sysids[] = { |
896 | .matches = { | 896 | { |
897 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 897 | .ident = "TECRA M5", |
898 | DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"), | 898 | .matches = { |
899 | }, | 899 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
900 | }, | 900 | DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"), |
901 | { | 901 | }, |
902 | .ident = "Satellite U200", | ||
903 | .matches = { | ||
904 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
905 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U200"), | ||
906 | }, | 902 | }, |
907 | }, | 903 | { |
908 | { | 904 | .ident = "Satellite U205", |
909 | .ident = "Satellite U205", | 905 | .matches = { |
910 | .matches = { | 906 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
911 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 907 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"), |
912 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"), | 908 | }, |
913 | }, | 909 | }, |
914 | }, | 910 | { |
915 | { | 911 | .ident = "Portege M500", |
916 | .ident = "Portege M500", | 912 | .matches = { |
917 | .matches = { | 913 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
918 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 914 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"), |
919 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"), | 915 | }, |
920 | }, | 916 | }, |
921 | }, | 917 | { } |
922 | { } | 918 | }; |
923 | }; | 919 | static const char *oemstrs[] = { |
920 | "Tecra M3,", | ||
921 | }; | ||
922 | int i; | ||
923 | |||
924 | if (dmi_check_system(sysids)) | ||
925 | return 1; | ||
926 | |||
927 | for (i = 0; i < ARRAY_SIZE(oemstrs); i++) | ||
928 | if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL)) | ||
929 | return 1; | ||
930 | |||
931 | return 0; | ||
932 | } | ||
924 | 933 | ||
925 | static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | 934 | static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) |
926 | { | 935 | { |
@@ -937,8 +946,7 @@ static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) | |||
937 | * cycles and power trying to do something to the sleeping | 946 | * cycles and power trying to do something to the sleeping |
938 | * beauty. | 947 | * beauty. |
939 | */ | 948 | */ |
940 | if (dmi_check_system(piix_broken_suspend_dmi_table) && | 949 | if (piix_broken_suspend() && mesg.event == PM_EVENT_SUSPEND) { |
941 | mesg.event == PM_EVENT_SUSPEND) { | ||
942 | pci_save_state(pdev); | 950 | pci_save_state(pdev); |
943 | 951 | ||
944 | /* mark its power state as "unknown", since we don't | 952 | /* mark its power state as "unknown", since we don't |
@@ -973,10 +981,10 @@ static int piix_pci_device_resume(struct pci_dev *pdev) | |||
973 | pci_restore_state(pdev); | 981 | pci_restore_state(pdev); |
974 | 982 | ||
975 | /* PCI device wasn't disabled during suspend. Use | 983 | /* PCI device wasn't disabled during suspend. Use |
976 | * __pci_reenable_device() to avoid affecting the | 984 | * pci_reenable_device() to avoid affecting the enable |
977 | * enable count. | 985 | * count. |
978 | */ | 986 | */ |
979 | rc = __pci_reenable_device(pdev); | 987 | rc = pci_reenable_device(pdev); |
980 | if (rc) | 988 | if (rc) |
981 | dev_printk(KERN_ERR, &pdev->dev, "failed to enable " | 989 | dev_printk(KERN_ERR, &pdev->dev, "failed to enable " |
982 | "device after resume (%d)\n", rc); | 990 | "device after resume (%d)\n", rc); |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 6001aae0b884..60e78bef469f 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -3788,6 +3788,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
3788 | { "WDC WD740ADFD-00NLR1", NULL, ATA_HORKAGE_NONCQ, }, | 3788 | { "WDC WD740ADFD-00NLR1", NULL, ATA_HORKAGE_NONCQ, }, |
3789 | { "FUJITSU MHV2080BH", "00840028", ATA_HORKAGE_NONCQ, }, | 3789 | { "FUJITSU MHV2080BH", "00840028", ATA_HORKAGE_NONCQ, }, |
3790 | { "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, }, | 3790 | { "ST9160821AS", "3.CLF", ATA_HORKAGE_NONCQ, }, |
3791 | { "SAMSUNG HD401LJ", "ZZ100-15", ATA_HORKAGE_NONCQ, }, | ||
3791 | 3792 | ||
3792 | /* Devices with NCQ limits */ | 3793 | /* Devices with NCQ limits */ |
3793 | 3794 | ||
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 6c289c7b1322..1cce2198baaf 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -573,6 +573,10 @@ int ata_pci_init_bmdma(struct ata_host *host) | |||
573 | struct pci_dev *pdev = to_pci_dev(gdev); | 573 | struct pci_dev *pdev = to_pci_dev(gdev); |
574 | int i, rc; | 574 | int i, rc; |
575 | 575 | ||
576 | /* No BAR4 allocation: No DMA */ | ||
577 | if (pci_resource_start(pdev, 4) == 0) | ||
578 | return 0; | ||
579 | |||
576 | /* TODO: If we get no DMA mask we should fall back to PIO */ | 580 | /* TODO: If we get no DMA mask we should fall back to PIO */ |
577 | rc = pci_set_dma_mask(pdev, ATA_DMA_MASK); | 581 | rc = pci_set_dma_mask(pdev, ATA_DMA_MASK); |
578 | if (rc) | 582 | if (rc) |
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index dc443e7dc37c..e34b632487d7 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/libata.h> | 31 | #include <linux/libata.h> |
32 | 32 | ||
33 | #define DRV_NAME "pata_cmd64x" | 33 | #define DRV_NAME "pata_cmd64x" |
34 | #define DRV_VERSION "0.2.3" | 34 | #define DRV_VERSION "0.2.4" |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * CMD64x specific registers definition. | 37 | * CMD64x specific registers definition. |
@@ -397,7 +397,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
397 | .flags = ATA_FLAG_SLAVE_POSS, | 397 | .flags = ATA_FLAG_SLAVE_POSS, |
398 | .pio_mask = 0x1f, | 398 | .pio_mask = 0x1f, |
399 | .mwdma_mask = 0x07, | 399 | .mwdma_mask = 0x07, |
400 | .udma_mask = ATA_UDMA1, | 400 | .udma_mask = ATA_UDMA2, |
401 | .port_ops = &cmd64x_port_ops | 401 | .port_ops = &cmd64x_port_ops |
402 | }, | 402 | }, |
403 | { /* CMD 646 rev 1 */ | 403 | { /* CMD 646 rev 1 */ |
@@ -412,7 +412,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
412 | .flags = ATA_FLAG_SLAVE_POSS, | 412 | .flags = ATA_FLAG_SLAVE_POSS, |
413 | .pio_mask = 0x1f, | 413 | .pio_mask = 0x1f, |
414 | .mwdma_mask = 0x07, | 414 | .mwdma_mask = 0x07, |
415 | .udma_mask = ATA_UDMA2, | 415 | .udma_mask = ATA_UDMA4, |
416 | .port_ops = &cmd648_port_ops | 416 | .port_ops = &cmd648_port_ops |
417 | }, | 417 | }, |
418 | { /* CMD 649 */ | 418 | { /* CMD 649 */ |
@@ -420,7 +420,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
420 | .flags = ATA_FLAG_SLAVE_POSS, | 420 | .flags = ATA_FLAG_SLAVE_POSS, |
421 | .pio_mask = 0x1f, | 421 | .pio_mask = 0x1f, |
422 | .mwdma_mask = 0x07, | 422 | .mwdma_mask = 0x07, |
423 | .udma_mask = ATA_UDMA3, | 423 | .udma_mask = ATA_UDMA5, |
424 | .port_ops = &cmd648_port_ops | 424 | .port_ops = &cmd648_port_ops |
425 | } | 425 | } |
426 | }; | 426 | }; |
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 9a829a7cbc60..66bd0e83ac07 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * pata_sis.c - SiS ATA driver | 2 | * pata_sis.c - SiS ATA driver |
3 | * | 3 | * |
4 | * (C) 2005 Red Hat <alan@redhat.com> | 4 | * (C) 2005 Red Hat <alan@redhat.com> |
5 | * (C) 2007 Bartlomiej Zolnierkiewicz | ||
5 | * | 6 | * |
6 | * Based upon linux/drivers/ide/pci/sis5513.c | 7 | * Based upon linux/drivers/ide/pci/sis5513.c |
7 | * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> | 8 | * Copyright (C) 1999-2000 Andre Hedrick <andre@linux-ide.org> |
@@ -35,7 +36,7 @@ | |||
35 | #include "sis.h" | 36 | #include "sis.h" |
36 | 37 | ||
37 | #define DRV_NAME "pata_sis" | 38 | #define DRV_NAME "pata_sis" |
38 | #define DRV_VERSION "0.5.1" | 39 | #define DRV_VERSION "0.5.2" |
39 | 40 | ||
40 | struct sis_chipset { | 41 | struct sis_chipset { |
41 | u16 device; /* PCI host ID */ | 42 | u16 device; /* PCI host ID */ |
@@ -237,7 +238,7 @@ static void sis_old_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
237 | } | 238 | } |
238 | 239 | ||
239 | /** | 240 | /** |
240 | * sis_100_set_pioode - Initialize host controller PATA PIO timings | 241 | * sis_100_set_piomode - Initialize host controller PATA PIO timings |
241 | * @ap: Port whose timings we are configuring | 242 | * @ap: Port whose timings we are configuring |
242 | * @adev: Device we are configuring for. | 243 | * @adev: Device we are configuring for. |
243 | * | 244 | * |
@@ -262,7 +263,7 @@ static void sis_100_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
262 | } | 263 | } |
263 | 264 | ||
264 | /** | 265 | /** |
265 | * sis_133_set_pioode - Initialize host controller PATA PIO timings | 266 | * sis_133_set_piomode - Initialize host controller PATA PIO timings |
266 | * @ap: Port whose timings we are configuring | 267 | * @ap: Port whose timings we are configuring |
267 | * @adev: Device we are configuring for. | 268 | * @adev: Device we are configuring for. |
268 | * | 269 | * |
@@ -334,7 +335,7 @@ static void sis_old_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
334 | int drive_pci = sis_old_port_base(adev); | 335 | int drive_pci = sis_old_port_base(adev); |
335 | u16 timing; | 336 | u16 timing; |
336 | 337 | ||
337 | const u16 mwdma_bits[] = { 0x707, 0x202, 0x202 }; | 338 | const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 }; |
338 | const u16 udma_bits[] = { 0xE000, 0xC000, 0xA000 }; | 339 | const u16 udma_bits[] = { 0xE000, 0xC000, 0xA000 }; |
339 | 340 | ||
340 | pci_read_config_word(pdev, drive_pci, &timing); | 341 | pci_read_config_word(pdev, drive_pci, &timing); |
@@ -342,15 +343,15 @@ static void sis_old_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
342 | if (adev->dma_mode < XFER_UDMA_0) { | 343 | if (adev->dma_mode < XFER_UDMA_0) { |
343 | /* bits 3-0 hold recovery timing bits 8-10 active timing and | 344 | /* bits 3-0 hold recovery timing bits 8-10 active timing and |
344 | the higer bits are dependant on the device */ | 345 | the higer bits are dependant on the device */ |
345 | timing &= ~ 0x870F; | 346 | timing &= ~0x870F; |
346 | timing |= mwdma_bits[speed]; | 347 | timing |= mwdma_bits[speed]; |
347 | pci_write_config_word(pdev, drive_pci, timing); | ||
348 | } else { | 348 | } else { |
349 | /* Bit 15 is UDMA on/off, bit 13-14 are cycle time */ | 349 | /* Bit 15 is UDMA on/off, bit 13-14 are cycle time */ |
350 | speed = adev->dma_mode - XFER_UDMA_0; | 350 | speed = adev->dma_mode - XFER_UDMA_0; |
351 | timing &= ~0x6000; | 351 | timing &= ~0x6000; |
352 | timing |= udma_bits[speed]; | 352 | timing |= udma_bits[speed]; |
353 | } | 353 | } |
354 | pci_write_config_word(pdev, drive_pci, timing); | ||
354 | } | 355 | } |
355 | 356 | ||
356 | /** | 357 | /** |
@@ -373,7 +374,7 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
373 | int drive_pci = sis_old_port_base(adev); | 374 | int drive_pci = sis_old_port_base(adev); |
374 | u16 timing; | 375 | u16 timing; |
375 | 376 | ||
376 | const u16 mwdma_bits[] = { 0x707, 0x202, 0x202 }; | 377 | const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 }; |
377 | const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000}; | 378 | const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000}; |
378 | 379 | ||
379 | pci_read_config_word(pdev, drive_pci, &timing); | 380 | pci_read_config_word(pdev, drive_pci, &timing); |
@@ -432,8 +433,7 @@ static void sis_100_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
432 | * @adev: Device to program | 433 | * @adev: Device to program |
433 | * | 434 | * |
434 | * Set UDMA/MWDMA mode for device, in host controller PCI config space. | 435 | * Set UDMA/MWDMA mode for device, in host controller PCI config space. |
435 | * Handles early SiS 961 bridges. Supports MWDMA as well unlike | 436 | * Handles early SiS 961 bridges. |
436 | * the old ide/pci driver. | ||
437 | * | 437 | * |
438 | * LOCKING: | 438 | * LOCKING: |
439 | * None (inherited from caller). | 439 | * None (inherited from caller). |
@@ -467,8 +467,6 @@ static void sis_133_early_set_dmamode (struct ata_port *ap, struct ata_device *a | |||
467 | * @adev: Device to program | 467 | * @adev: Device to program |
468 | * | 468 | * |
469 | * Set UDMA/MWDMA mode for device, in host controller PCI config space. | 469 | * Set UDMA/MWDMA mode for device, in host controller PCI config space. |
470 | * Handles early SiS 961 bridges. Supports MWDMA as well unlike | ||
471 | * the old ide/pci driver. | ||
472 | * | 470 | * |
473 | * LOCKING: | 471 | * LOCKING: |
474 | * None (inherited from caller). | 472 | * None (inherited from caller). |
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index b2baeaeba9be..0a1f2b52a12f 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -743,7 +743,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) | |||
743 | hid->quirks = quirks; | 743 | hid->quirks = quirks; |
744 | 744 | ||
745 | if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL))) | 745 | if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL))) |
746 | goto fail; | 746 | goto fail_no_usbhid; |
747 | 747 | ||
748 | hid->driver_data = usbhid; | 748 | hid->driver_data = usbhid; |
749 | usbhid->hid = hid; | 749 | usbhid->hid = hid; |
@@ -878,6 +878,8 @@ fail: | |||
878 | usb_free_urb(usbhid->urbout); | 878 | usb_free_urb(usbhid->urbout); |
879 | usb_free_urb(usbhid->urbctrl); | 879 | usb_free_urb(usbhid->urbctrl); |
880 | hid_free_buffers(dev, hid); | 880 | hid_free_buffers(dev, hid); |
881 | kfree(usbhid); | ||
882 | fail_no_usbhid: | ||
881 | hid_free_device(hid); | 883 | hid_free_device(hid); |
882 | 884 | ||
883 | return NULL; | 885 | return NULL; |
@@ -913,6 +915,7 @@ static void hid_disconnect(struct usb_interface *intf) | |||
913 | usb_free_urb(usbhid->urbout); | 915 | usb_free_urb(usbhid->urbout); |
914 | 916 | ||
915 | hid_free_buffers(hid_to_usb_dev(hid), hid); | 917 | hid_free_buffers(hid_to_usb_dev(hid), hid); |
918 | kfree(usbhid); | ||
916 | hid_free_device(hid); | 919 | hid_free_device(hid); |
917 | } | 920 | } |
918 | 921 | ||
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 775b9f3b8ce3..6b21a214f419 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -61,7 +61,9 @@ | |||
61 | #define USB_DEVICE_ID_APPLE_GEYSER4_JIS 0x021c | 61 | #define USB_DEVICE_ID_APPLE_GEYSER4_JIS 0x021c |
62 | #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a | 62 | #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a |
63 | #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b | 63 | #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b |
64 | #define USB_DEVICE_ID_APPLE_IR 0x8240 | 64 | |
65 | #define USB_VENDOR_ID_ASUS 0x0b05 | ||
66 | #define USB_DEVICE_ID_ASUS_LCM 0x1726 | ||
65 | 67 | ||
66 | #define USB_VENDOR_ID_ATEN 0x0557 | 68 | #define USB_VENDOR_ID_ATEN 0x0557 |
67 | #define USB_DEVICE_ID_ATEN_UC100KM 0x2004 | 69 | #define USB_DEVICE_ID_ATEN_UC100KM 0x2004 |
@@ -198,6 +200,70 @@ | |||
198 | 200 | ||
199 | #define USB_VENDOR_ID_LOGITECH 0x046d | 201 | #define USB_VENDOR_ID_LOGITECH 0x046d |
200 | #define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101 | 202 | #define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101 |
203 | #define USB_DEVICE_ID_LOGITECH_HARMONY 0xc110 | ||
204 | #define USB_DEVICE_ID_LOGITECH_HARMONY_2 0xc111 | ||
205 | #define USB_DEVICE_ID_LOGITECH_HARMONY_3 0xc112 | ||
206 | #define USB_DEVICE_ID_LOGITECH_HARMONY_4 0xc113 | ||
207 | #define USB_DEVICE_ID_LOGITECH_HARMONY_5 0xc114 | ||
208 | #define USB_DEVICE_ID_LOGITECH_HARMONY_6 0xc115 | ||
209 | #define USB_DEVICE_ID_LOGITECH_HARMONY_7 0xc116 | ||
210 | #define USB_DEVICE_ID_LOGITECH_HARMONY_8 0xc117 | ||
211 | #define USB_DEVICE_ID_LOGITECH_HARMONY_9 0xc118 | ||
212 | #define USB_DEVICE_ID_LOGITECH_HARMONY_10 0xc119 | ||
213 | #define USB_DEVICE_ID_LOGITECH_HARMONY_11 0xc11a | ||
214 | #define USB_DEVICE_ID_LOGITECH_HARMONY_12 0xc11b | ||
215 | #define USB_DEVICE_ID_LOGITECH_HARMONY_13 0xc11c | ||
216 | #define USB_DEVICE_ID_LOGITECH_HARMONY_14 0xc11d | ||
217 | #define USB_DEVICE_ID_LOGITECH_HARMONY_15 0xc11e | ||
218 | #define USB_DEVICE_ID_LOGITECH_HARMONY_16 0xc11f | ||
219 | #define USB_DEVICE_ID_LOGITECH_HARMONY_17 0xc120 | ||
220 | #define USB_DEVICE_ID_LOGITECH_HARMONY_18 0xc121 | ||
221 | #define USB_DEVICE_ID_LOGITECH_HARMONY_19 0xc122 | ||
222 | #define USB_DEVICE_ID_LOGITECH_HARMONY_20 0xc123 | ||
223 | #define USB_DEVICE_ID_LOGITECH_HARMONY_21 0xc124 | ||
224 | #define USB_DEVICE_ID_LOGITECH_HARMONY_22 0xc125 | ||
225 | #define USB_DEVICE_ID_LOGITECH_HARMONY_23 0xc126 | ||
226 | #define USB_DEVICE_ID_LOGITECH_HARMONY_24 0xc127 | ||
227 | #define USB_DEVICE_ID_LOGITECH_HARMONY_25 0xc128 | ||
228 | #define USB_DEVICE_ID_LOGITECH_HARMONY_26 0xc129 | ||
229 | #define USB_DEVICE_ID_LOGITECH_HARMONY_27 0xc12a | ||
230 | #define USB_DEVICE_ID_LOGITECH_HARMONY_28 0xc12b | ||
231 | #define USB_DEVICE_ID_LOGITECH_HARMONY_29 0xc12c | ||
232 | #define USB_DEVICE_ID_LOGITECH_HARMONY_30 0xc12d | ||
233 | #define USB_DEVICE_ID_LOGITECH_HARMONY_31 0xc12e | ||
234 | #define USB_DEVICE_ID_LOGITECH_HARMONY_32 0xc12f | ||
235 | #define USB_DEVICE_ID_LOGITECH_HARMONY_33 0xc130 | ||
236 | #define USB_DEVICE_ID_LOGITECH_HARMONY_34 0xc131 | ||
237 | #define USB_DEVICE_ID_LOGITECH_HARMONY_35 0xc132 | ||
238 | #define USB_DEVICE_ID_LOGITECH_HARMONY_36 0xc133 | ||
239 | #define USB_DEVICE_ID_LOGITECH_HARMONY_37 0xc134 | ||
240 | #define USB_DEVICE_ID_LOGITECH_HARMONY_38 0xc135 | ||
241 | #define USB_DEVICE_ID_LOGITECH_HARMONY_39 0xc136 | ||
242 | #define USB_DEVICE_ID_LOGITECH_HARMONY_40 0xc137 | ||
243 | #define USB_DEVICE_ID_LOGITECH_HARMONY_41 0xc138 | ||
244 | #define USB_DEVICE_ID_LOGITECH_HARMONY_42 0xc139 | ||
245 | #define USB_DEVICE_ID_LOGITECH_HARMONY_43 0xc13a | ||
246 | #define USB_DEVICE_ID_LOGITECH_HARMONY_44 0xc13b | ||
247 | #define USB_DEVICE_ID_LOGITECH_HARMONY_45 0xc13c | ||
248 | #define USB_DEVICE_ID_LOGITECH_HARMONY_46 0xc13d | ||
249 | #define USB_DEVICE_ID_LOGITECH_HARMONY_47 0xc13e | ||
250 | #define USB_DEVICE_ID_LOGITECH_HARMONY_48 0xc13f | ||
251 | #define USB_DEVICE_ID_LOGITECH_HARMONY_49 0xc140 | ||
252 | #define USB_DEVICE_ID_LOGITECH_HARMONY_50 0xc141 | ||
253 | #define USB_DEVICE_ID_LOGITECH_HARMONY_51 0xc142 | ||
254 | #define USB_DEVICE_ID_LOGITECH_HARMONY_52 0xc143 | ||
255 | #define USB_DEVICE_ID_LOGITECH_HARMONY_53 0xc144 | ||
256 | #define USB_DEVICE_ID_LOGITECH_HARMONY_54 0xc145 | ||
257 | #define USB_DEVICE_ID_LOGITECH_HARMONY_55 0xc146 | ||
258 | #define USB_DEVICE_ID_LOGITECH_HARMONY_56 0xc147 | ||
259 | #define USB_DEVICE_ID_LOGITECH_HARMONY_57 0xc148 | ||
260 | #define USB_DEVICE_ID_LOGITECH_HARMONY_58 0xc149 | ||
261 | #define USB_DEVICE_ID_LOGITECH_HARMONY_59 0xc14a | ||
262 | #define USB_DEVICE_ID_LOGITECH_HARMONY_60 0xc14b | ||
263 | #define USB_DEVICE_ID_LOGITECH_HARMONY_61 0xc14c | ||
264 | #define USB_DEVICE_ID_LOGITECH_HARMONY_62 0xc14d | ||
265 | #define USB_DEVICE_ID_LOGITECH_HARMONY_63 0xc14e | ||
266 | #define USB_DEVICE_ID_LOGITECH_HARMONY_64 0xc14f | ||
201 | #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 | 267 | #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 |
202 | #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 | 268 | #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 |
203 | #define USB_DEVICE_ID_S510_RECEIVER 0xc50c | 269 | #define USB_DEVICE_ID_S510_RECEIVER 0xc50c |
@@ -221,6 +287,9 @@ | |||
221 | #define USB_DEVICE_ID_NCR_FIRST 0x0300 | 287 | #define USB_DEVICE_ID_NCR_FIRST 0x0300 |
222 | #define USB_DEVICE_ID_NCR_LAST 0x03ff | 288 | #define USB_DEVICE_ID_NCR_LAST 0x03ff |
223 | 289 | ||
290 | #define USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR 0x0400 | ||
291 | #define USB_DEVICE_ID_N_S_HARMONY 0xc359 | ||
292 | |||
224 | #define USB_VENDOR_ID_NEC 0x073e | 293 | #define USB_VENDOR_ID_NEC 0x073e |
225 | #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 | 294 | #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301 |
226 | 295 | ||
@@ -315,7 +384,7 @@ static const struct hid_blacklist { | |||
315 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE }, | 384 | { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE }, |
316 | { USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1, HID_QUIRK_IGNORE }, | 385 | { USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1, HID_QUIRK_IGNORE }, |
317 | { USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE }, | 386 | { USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE }, |
318 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE }, | 387 | { USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM, HID_QUIRK_IGNORE}, |
319 | { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE }, | 388 | { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE }, |
320 | { USB_VENDOR_ID_CIDC, 0x0103, HID_QUIRK_IGNORE }, | 389 | { USB_VENDOR_ID_CIDC, 0x0103, HID_QUIRK_IGNORE }, |
321 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE }, | 390 | { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE }, |
@@ -463,6 +532,71 @@ static const struct hid_blacklist { | |||
463 | 532 | ||
464 | { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS }, | 533 | { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS }, |
465 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS }, | 534 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS }, |
535 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY, HID_QUIRK_IGNORE }, | ||
536 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_2, HID_QUIRK_IGNORE }, | ||
537 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_3, HID_QUIRK_IGNORE }, | ||
538 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_4, HID_QUIRK_IGNORE }, | ||
539 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_5, HID_QUIRK_IGNORE }, | ||
540 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_6, HID_QUIRK_IGNORE }, | ||
541 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_7, HID_QUIRK_IGNORE }, | ||
542 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_8, HID_QUIRK_IGNORE }, | ||
543 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_9, HID_QUIRK_IGNORE }, | ||
544 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_10, HID_QUIRK_IGNORE }, | ||
545 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_11, HID_QUIRK_IGNORE }, | ||
546 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_12, HID_QUIRK_IGNORE }, | ||
547 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_13, HID_QUIRK_IGNORE }, | ||
548 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_14, HID_QUIRK_IGNORE }, | ||
549 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_15, HID_QUIRK_IGNORE }, | ||
550 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_16, HID_QUIRK_IGNORE }, | ||
551 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_17, HID_QUIRK_IGNORE }, | ||
552 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_18, HID_QUIRK_IGNORE }, | ||
553 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_19, HID_QUIRK_IGNORE }, | ||
554 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_20, HID_QUIRK_IGNORE }, | ||
555 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_21, HID_QUIRK_IGNORE }, | ||
556 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_22, HID_QUIRK_IGNORE }, | ||
557 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_23, HID_QUIRK_IGNORE }, | ||
558 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_24, HID_QUIRK_IGNORE }, | ||
559 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_25, HID_QUIRK_IGNORE }, | ||
560 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_26, HID_QUIRK_IGNORE }, | ||
561 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_27, HID_QUIRK_IGNORE }, | ||
562 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_28, HID_QUIRK_IGNORE }, | ||
563 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_29, HID_QUIRK_IGNORE }, | ||
564 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_30, HID_QUIRK_IGNORE }, | ||
565 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_31, HID_QUIRK_IGNORE }, | ||
566 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_32, HID_QUIRK_IGNORE }, | ||
567 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_33, HID_QUIRK_IGNORE }, | ||
568 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_34, HID_QUIRK_IGNORE }, | ||
569 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_35, HID_QUIRK_IGNORE }, | ||
570 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_36, HID_QUIRK_IGNORE }, | ||
571 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_37, HID_QUIRK_IGNORE }, | ||
572 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_38, HID_QUIRK_IGNORE }, | ||
573 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_39, HID_QUIRK_IGNORE }, | ||
574 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_40, HID_QUIRK_IGNORE }, | ||
575 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_41, HID_QUIRK_IGNORE }, | ||
576 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_42, HID_QUIRK_IGNORE }, | ||
577 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_43, HID_QUIRK_IGNORE }, | ||
578 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_44, HID_QUIRK_IGNORE }, | ||
579 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_45, HID_QUIRK_IGNORE }, | ||
580 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_46, HID_QUIRK_IGNORE }, | ||
581 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_47, HID_QUIRK_IGNORE }, | ||
582 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_48, HID_QUIRK_IGNORE }, | ||
583 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_49, HID_QUIRK_IGNORE }, | ||
584 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_50, HID_QUIRK_IGNORE }, | ||
585 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_51, HID_QUIRK_IGNORE }, | ||
586 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_52, HID_QUIRK_IGNORE }, | ||
587 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_53, HID_QUIRK_IGNORE }, | ||
588 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_54, HID_QUIRK_IGNORE }, | ||
589 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_55, HID_QUIRK_IGNORE }, | ||
590 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_56, HID_QUIRK_IGNORE }, | ||
591 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_57, HID_QUIRK_IGNORE }, | ||
592 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_58, HID_QUIRK_IGNORE }, | ||
593 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_59, HID_QUIRK_IGNORE }, | ||
594 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_60, HID_QUIRK_IGNORE }, | ||
595 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_61, HID_QUIRK_IGNORE }, | ||
596 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_62, HID_QUIRK_IGNORE }, | ||
597 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_63, HID_QUIRK_IGNORE }, | ||
598 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_64, HID_QUIRK_IGNORE }, | ||
599 | { USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR, USB_DEVICE_ID_N_S_HARMONY, HID_QUIRK_IGNORE }, | ||
466 | 600 | ||
467 | { 0, 0 } | 601 | { 0, 0 } |
468 | }; | 602 | }; |
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index c89b5f4b2d04..8a9b98fcb66d 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -693,13 +693,12 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
693 | if (ret) | 693 | if (ret) |
694 | goto out; | 694 | goto out; |
695 | 695 | ||
696 | state = kmalloc(sizeof(struct icside_state), GFP_KERNEL); | 696 | state = kzalloc(sizeof(struct icside_state), GFP_KERNEL); |
697 | if (!state) { | 697 | if (!state) { |
698 | ret = -ENOMEM; | 698 | ret = -ENOMEM; |
699 | goto release; | 699 | goto release; |
700 | } | 700 | } |
701 | 701 | ||
702 | memset(state, 0, sizeof(state)); | ||
703 | state->type = ICS_TYPE_NOTYPE; | 702 | state->type = ICS_TYPE_NOTYPE; |
704 | state->dev = &ec->dev; | 703 | state->dev = &ec->dev; |
705 | 704 | ||
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index e82bfa5e0ab8..1fa57947bca0 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -640,7 +640,7 @@ typedef enum { | |||
640 | } idetape_chrdev_direction_t; | 640 | } idetape_chrdev_direction_t; |
641 | 641 | ||
642 | struct idetape_bh { | 642 | struct idetape_bh { |
643 | unsigned short b_size; | 643 | u32 b_size; |
644 | atomic_t b_count; | 644 | atomic_t b_count; |
645 | struct idetape_bh *b_reqnext; | 645 | struct idetape_bh *b_reqnext; |
646 | char *b_data; | 646 | char *b_data; |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 5511c86733dc..025689de50e9 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -593,7 +593,7 @@ static struct dmi_system_id cable_dmi_table[] = { | |||
593 | .ident = "HP Pavilion N5430", | 593 | .ident = "HP Pavilion N5430", |
594 | .matches = { | 594 | .matches = { |
595 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), | 595 | DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), |
596 | DMI_MATCH(DMI_BOARD_NAME, "OmniBook N32N-736"), | 596 | DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"), |
597 | }, | 597 | }, |
598 | }, | 598 | }, |
599 | { } | 599 | { } |
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 19633c5aba15..0e3b5de26e69 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -475,11 +475,11 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const cha | |||
475 | switch (rev) { | 475 | switch (rev) { |
476 | case 0x07: | 476 | case 0x07: |
477 | case 0x05: | 477 | case 0x05: |
478 | printk("%s: UltraDMA capable", name); | 478 | printk("%s: UltraDMA capable\n", name); |
479 | break; | 479 | break; |
480 | case 0x03: | 480 | case 0x03: |
481 | default: | 481 | default: |
482 | printk("%s: MultiWord DMA force limited", name); | 482 | printk("%s: MultiWord DMA force limited\n", name); |
483 | break; | 483 | break; |
484 | case 0x01: | 484 | case 0x01: |
485 | printk("%s: MultiWord DMA limited, " | 485 | printk("%s: MultiWord DMA limited, " |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index bccedf9b8b28..b89e81656875 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -133,7 +133,7 @@ static void cs5520_tune_drive(ide_drive_t *drive, u8 pio) | |||
133 | static int cs5520_config_drive_xfer_rate(ide_drive_t *drive) | 133 | static int cs5520_config_drive_xfer_rate(ide_drive_t *drive) |
134 | { | 134 | { |
135 | /* Tune the drive for PIO modes up to PIO 4 */ | 135 | /* Tune the drive for PIO modes up to PIO 4 */ |
136 | cs5520_tune_drive(drive, 4); | 136 | cs5520_tune_drive(drive, 255); |
137 | 137 | ||
138 | /* Then tell the core to use DMA operations */ | 138 | /* Then tell the core to use DMA operations */ |
139 | return 0; | 139 | return 0; |
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index ce44e38390aa..082ca7da2cbc 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * linux/drivers/ide/pci/cs5535.c | 2 | * linux/drivers/ide/pci/cs5535.c |
3 | * | 3 | * |
4 | * Copyright (C) 2004-2005 Advanced Micro Devices, Inc. | 4 | * Copyright (C) 2004-2005 Advanced Micro Devices, Inc. |
5 | * Copyright (C) 2007 Bartlomiej Zolnierkiewicz | ||
5 | * | 6 | * |
6 | * History: | 7 | * History: |
7 | * 09/20/2005 - Jaya Kumar <jayakumar.ide@gmail.com> | 8 | * 09/20/2005 - Jaya Kumar <jayakumar.ide@gmail.com> |
@@ -83,14 +84,17 @@ static void cs5535_set_speed(ide_drive_t *drive, u8 speed) | |||
83 | 84 | ||
84 | /* Set the PIO timings */ | 85 | /* Set the PIO timings */ |
85 | if ((speed & XFER_MODE) == XFER_PIO) { | 86 | if ((speed & XFER_MODE) == XFER_PIO) { |
86 | u8 pioa; | 87 | ide_drive_t *pair = &drive->hwif->drives[drive->dn ^ 1]; |
87 | u8 piob; | 88 | u8 cmd, pioa; |
88 | u8 cmd; | ||
89 | 89 | ||
90 | pioa = speed - XFER_PIO_0; | 90 | cmd = pioa = speed - XFER_PIO_0; |
91 | piob = ide_get_best_pio_mode(&(drive->hwif->drives[!unit]), | 91 | |
92 | 255, 4); | 92 | if (pair->present) { |
93 | cmd = pioa < piob ? pioa : piob; | 93 | u8 piob = ide_get_best_pio_mode(pair, 255, 4); |
94 | |||
95 | if (piob < cmd) | ||
96 | cmd = piob; | ||
97 | } | ||
94 | 98 | ||
95 | /* Write the speed of the current drive */ | 99 | /* Write the speed of the current drive */ |
96 | reg = (cs5535_pio_cmd_timings[cmd] << 16) | | 100 | reg = (cs5535_pio_cmd_timings[cmd] << 16) | |
@@ -116,7 +120,7 @@ static void cs5535_set_speed(ide_drive_t *drive, u8 speed) | |||
116 | 120 | ||
117 | reg &= 0x80000000UL; /* Preserve the PIO format bit */ | 121 | reg &= 0x80000000UL; /* Preserve the PIO format bit */ |
118 | 122 | ||
119 | if (speed >= XFER_UDMA_0 && speed <= XFER_UDMA_7) | 123 | if (speed >= XFER_UDMA_0 && speed <= XFER_UDMA_4) |
120 | reg |= cs5535_udma_timings[speed - XFER_UDMA_0]; | 124 | reg |= cs5535_udma_timings[speed - XFER_UDMA_0]; |
121 | else if (speed >= XFER_MW_DMA_0 && speed <= XFER_MW_DMA_2) | 125 | else if (speed >= XFER_MW_DMA_0 && speed <= XFER_MW_DMA_2) |
122 | reg |= cs5535_mwdma_timings[speed - XFER_MW_DMA_0]; | 126 | reg |= cs5535_mwdma_timings[speed - XFER_MW_DMA_0]; |
@@ -151,32 +155,22 @@ static int cs5535_set_drive(ide_drive_t *drive, u8 speed) | |||
151 | * | 155 | * |
152 | * A callback from the upper layers for PIO-only tuning. | 156 | * A callback from the upper layers for PIO-only tuning. |
153 | */ | 157 | */ |
154 | static void cs5535_tuneproc(ide_drive_t *drive, u8 xferspeed) | 158 | static void cs5535_tuneproc(ide_drive_t *drive, u8 pio) |
155 | { | 159 | { |
156 | u8 modes[] = { XFER_PIO_0, XFER_PIO_1, XFER_PIO_2, XFER_PIO_3, | 160 | pio = ide_get_best_pio_mode(drive, pio, 4); |
157 | XFER_PIO_4 }; | 161 | ide_config_drive_speed(drive, XFER_PIO_0 + pio); |
158 | 162 | cs5535_set_speed(drive, XFER_PIO_0 + pio); | |
159 | /* cs5535 max pio is pio 4, best_pio will check the blacklist. | ||
160 | i think we don't need to rate_filter the incoming xferspeed | ||
161 | since we know we're only going to choose pio */ | ||
162 | xferspeed = ide_get_best_pio_mode(drive, xferspeed, 4); | ||
163 | ide_config_drive_speed(drive, modes[xferspeed]); | ||
164 | cs5535_set_speed(drive, xferspeed); | ||
165 | } | 163 | } |
166 | 164 | ||
167 | static int cs5535_dma_check(ide_drive_t *drive) | 165 | static int cs5535_dma_check(ide_drive_t *drive) |
168 | { | 166 | { |
169 | u8 speed; | ||
170 | |||
171 | drive->init_speed = 0; | 167 | drive->init_speed = 0; |
172 | 168 | ||
173 | if (ide_tune_dma(drive)) | 169 | if (ide_tune_dma(drive)) |
174 | return 0; | 170 | return 0; |
175 | 171 | ||
176 | if (ide_use_fast_pio(drive)) { | 172 | if (ide_use_fast_pio(drive)) |
177 | speed = ide_get_best_pio_mode(drive, 255, 4); | 173 | cs5535_tuneproc(drive, 255); |
178 | cs5535_set_drive(drive, speed); | ||
179 | } | ||
180 | 174 | ||
181 | return -1; | 175 | return -1; |
182 | } | 176 | } |
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c index 95dbed7e6022..70b3245dbf62 100644 --- a/drivers/ide/pci/it8213.c +++ b/drivers/ide/pci/it8213.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * it8213_dma_2_pio - return the PIO mode matching DMA | 21 | * it8213_dma_2_pio - return the PIO mode matching DMA |
22 | * @xfer_rate: transfer speed | 22 | * @xfer_rate: transfer speed |
23 | * | 23 | * |
24 | * Returns the nearest equivalent PIO timing for the PIO or DMA | 24 | * Returns the nearest equivalent PIO timing for the DMA |
25 | * mode requested by the controller. | 25 | * mode requested by the controller. |
26 | */ | 26 | */ |
27 | 27 | ||
@@ -35,34 +35,28 @@ static u8 it8213_dma_2_pio (u8 xfer_rate) { | |||
35 | case XFER_UDMA_1: | 35 | case XFER_UDMA_1: |
36 | case XFER_UDMA_0: | 36 | case XFER_UDMA_0: |
37 | case XFER_MW_DMA_2: | 37 | case XFER_MW_DMA_2: |
38 | case XFER_PIO_4: | ||
39 | return 4; | 38 | return 4; |
40 | case XFER_MW_DMA_1: | 39 | case XFER_MW_DMA_1: |
41 | case XFER_PIO_3: | ||
42 | return 3; | 40 | return 3; |
43 | case XFER_SW_DMA_2: | 41 | case XFER_SW_DMA_2: |
44 | case XFER_PIO_2: | ||
45 | return 2; | 42 | return 2; |
46 | case XFER_MW_DMA_0: | 43 | case XFER_MW_DMA_0: |
47 | case XFER_SW_DMA_1: | 44 | case XFER_SW_DMA_1: |
48 | case XFER_SW_DMA_0: | 45 | case XFER_SW_DMA_0: |
49 | case XFER_PIO_1: | ||
50 | case XFER_PIO_0: | ||
51 | case XFER_PIO_SLOW: | ||
52 | default: | 46 | default: |
53 | return 0; | 47 | return 0; |
54 | } | 48 | } |
55 | } | 49 | } |
56 | 50 | ||
57 | /* | 51 | /* |
58 | * it8213_tuneproc - tune a drive | 52 | * it8213_tune_pio - tune a drive |
59 | * @drive: drive to tune | 53 | * @drive: drive to tune |
60 | * @pio: desired PIO mode | 54 | * @pio: desired PIO mode |
61 | * | 55 | * |
62 | * Set the interface PIO mode. | 56 | * Set the interface PIO mode. |
63 | */ | 57 | */ |
64 | 58 | ||
65 | static void it8213_tuneproc (ide_drive_t *drive, u8 pio) | 59 | static void it8213_tune_pio(ide_drive_t *drive, const u8 pio) |
66 | { | 60 | { |
67 | ide_hwif_t *hwif = HWIF(drive); | 61 | ide_hwif_t *hwif = HWIF(drive); |
68 | struct pci_dev *dev = hwif->pci_dev; | 62 | struct pci_dev *dev = hwif->pci_dev; |
@@ -82,8 +76,6 @@ static void it8213_tuneproc (ide_drive_t *drive, u8 pio) | |||
82 | { 2, 1 }, | 76 | { 2, 1 }, |
83 | { 2, 3 }, }; | 77 | { 2, 3 }, }; |
84 | 78 | ||
85 | pio = ide_get_best_pio_mode(drive, pio, 4); | ||
86 | |||
87 | spin_lock_irqsave(&tune_lock, flags); | 79 | spin_lock_irqsave(&tune_lock, flags); |
88 | pci_read_config_word(dev, master_port, &master_data); | 80 | pci_read_config_word(dev, master_port, &master_data); |
89 | 81 | ||
@@ -113,6 +105,13 @@ static void it8213_tuneproc (ide_drive_t *drive, u8 pio) | |||
113 | spin_unlock_irqrestore(&tune_lock, flags); | 105 | spin_unlock_irqrestore(&tune_lock, flags); |
114 | } | 106 | } |
115 | 107 | ||
108 | static void it8213_tuneproc(ide_drive_t *drive, u8 pio) | ||
109 | { | ||
110 | pio = ide_get_best_pio_mode(drive, pio, 4); | ||
111 | it8213_tune_pio(drive, pio); | ||
112 | ide_config_drive_speed(drive, XFER_PIO_0 + pio); | ||
113 | } | ||
114 | |||
116 | /** | 115 | /** |
117 | * it8213_tune_chipset - set controller timings | 116 | * it8213_tune_chipset - set controller timings |
118 | * @drive: Drive to set up | 117 | * @drive: Drive to set up |
@@ -193,7 +192,12 @@ static int it8213_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
193 | if (reg55 & w_flag) | 192 | if (reg55 & w_flag) |
194 | pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag); | 193 | pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag); |
195 | } | 194 | } |
196 | it8213_tuneproc(drive, it8213_dma_2_pio(speed)); | 195 | |
196 | if (speed > XFER_PIO_4) | ||
197 | it8213_tune_pio(drive, it8213_dma_2_pio(speed)); | ||
198 | else | ||
199 | it8213_tune_pio(drive, speed - XFER_PIO_0); | ||
200 | |||
197 | return ide_config_drive_speed(drive, speed); | 201 | return ide_config_drive_speed(drive, speed); |
198 | } | 202 | } |
199 | 203 | ||
@@ -209,13 +213,10 @@ static int it8213_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
209 | 213 | ||
210 | static int it8213_config_drive_for_dma (ide_drive_t *drive) | 214 | static int it8213_config_drive_for_dma (ide_drive_t *drive) |
211 | { | 215 | { |
212 | u8 pio; | ||
213 | |||
214 | if (ide_tune_dma(drive)) | 216 | if (ide_tune_dma(drive)) |
215 | return 0; | 217 | return 0; |
216 | 218 | ||
217 | pio = ide_get_best_pio_mode(drive, 255, 4); | 219 | it8213_tuneproc(drive, 255); |
218 | it8213_tune_chipset(drive, XFER_PIO_0 + pio); | ||
219 | 220 | ||
220 | return -1; | 221 | return -1; |
221 | } | 222 | } |
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index d7ce9dd8de16..65a0ff352b98 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -83,23 +83,10 @@ static u8 __devinit ata66_jmicron(ide_hwif_t *hwif) | |||
83 | return ATA_CBL_PATA80; | 83 | return ATA_CBL_PATA80; |
84 | } | 84 | } |
85 | 85 | ||
86 | static void jmicron_tuneproc (ide_drive_t *drive, byte mode_wanted) | 86 | static void jmicron_tuneproc(ide_drive_t *drive, u8 pio) |
87 | { | 87 | { |
88 | return; | 88 | pio = ide_get_best_pio_mode(drive, pio, 5); |
89 | } | 89 | ide_config_drive_speed(drive, XFER_PIO_0 + pio); |
90 | |||
91 | /** | ||
92 | * config_jmicron_chipset_for_pio - set drive timings | ||
93 | * @drive: drive to tune | ||
94 | * @speed we want | ||
95 | * | ||
96 | */ | ||
97 | |||
98 | static void config_jmicron_chipset_for_pio (ide_drive_t *drive, byte set_speed) | ||
99 | { | ||
100 | u8 speed = XFER_PIO_0 + ide_get_best_pio_mode(drive, 255, 5); | ||
101 | if (set_speed) | ||
102 | (void) ide_config_drive_speed(drive, speed); | ||
103 | } | 90 | } |
104 | 91 | ||
105 | /** | 92 | /** |
@@ -132,7 +119,7 @@ static int jmicron_config_drive_for_dma (ide_drive_t *drive) | |||
132 | if (ide_tune_dma(drive)) | 119 | if (ide_tune_dma(drive)) |
133 | return 0; | 120 | return 0; |
134 | 121 | ||
135 | config_jmicron_chipset_for_pio(drive, 1); | 122 | jmicron_tuneproc(drive, 255); |
136 | 123 | ||
137 | return -1; | 124 | return -1; |
138 | } | 125 | } |
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 4f69cd067e5e..5cfa9378bbb8 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/piix.c Version 0.50 Jun 10, 2007 | 2 | * linux/drivers/ide/pci/piix.c Version 0.51 Jul 6, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer | 4 | * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer |
5 | * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> | 5 | * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> |
@@ -109,7 +109,7 @@ static int no_piix_dma; | |||
109 | * piix_dma_2_pio - return the PIO mode matching DMA | 109 | * piix_dma_2_pio - return the PIO mode matching DMA |
110 | * @xfer_rate: transfer speed | 110 | * @xfer_rate: transfer speed |
111 | * | 111 | * |
112 | * Returns the nearest equivalent PIO timing for the PIO or DMA | 112 | * Returns the nearest equivalent PIO timing for the DMA |
113 | * mode requested by the controller. | 113 | * mode requested by the controller. |
114 | */ | 114 | */ |
115 | 115 | ||
@@ -123,20 +123,14 @@ static u8 piix_dma_2_pio (u8 xfer_rate) { | |||
123 | case XFER_UDMA_1: | 123 | case XFER_UDMA_1: |
124 | case XFER_UDMA_0: | 124 | case XFER_UDMA_0: |
125 | case XFER_MW_DMA_2: | 125 | case XFER_MW_DMA_2: |
126 | case XFER_PIO_4: | ||
127 | return 4; | 126 | return 4; |
128 | case XFER_MW_DMA_1: | 127 | case XFER_MW_DMA_1: |
129 | case XFER_PIO_3: | ||
130 | return 3; | 128 | return 3; |
131 | case XFER_SW_DMA_2: | 129 | case XFER_SW_DMA_2: |
132 | case XFER_PIO_2: | ||
133 | return 2; | 130 | return 2; |
134 | case XFER_MW_DMA_0: | 131 | case XFER_MW_DMA_0: |
135 | case XFER_SW_DMA_1: | 132 | case XFER_SW_DMA_1: |
136 | case XFER_SW_DMA_0: | 133 | case XFER_SW_DMA_0: |
137 | case XFER_PIO_1: | ||
138 | case XFER_PIO_0: | ||
139 | case XFER_PIO_SLOW: | ||
140 | default: | 134 | default: |
141 | return 0; | 135 | return 0; |
142 | } | 136 | } |
@@ -269,6 +263,7 @@ static int piix_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
269 | case XFER_PIO_4: | 263 | case XFER_PIO_4: |
270 | case XFER_PIO_3: | 264 | case XFER_PIO_3: |
271 | case XFER_PIO_2: | 265 | case XFER_PIO_2: |
266 | case XFER_PIO_1: | ||
272 | case XFER_PIO_0: break; | 267 | case XFER_PIO_0: break; |
273 | default: return -1; | 268 | default: return -1; |
274 | } | 269 | } |
@@ -299,7 +294,11 @@ static int piix_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
299 | pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag); | 294 | pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag); |
300 | } | 295 | } |
301 | 296 | ||
302 | piix_tune_pio(drive, piix_dma_2_pio(speed)); | 297 | if (speed > XFER_PIO_4) |
298 | piix_tune_pio(drive, piix_dma_2_pio(speed)); | ||
299 | else | ||
300 | piix_tune_pio(drive, speed - XFER_PIO_0); | ||
301 | |||
303 | return ide_config_drive_speed(drive, speed); | 302 | return ide_config_drive_speed(drive, speed); |
304 | } | 303 | } |
305 | 304 | ||
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index bf19ddfa6cda..eeb0a6d434aa 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -190,7 +190,7 @@ scc_ide_outsl(unsigned long port, void *addr, u32 count) | |||
190 | } | 190 | } |
191 | 191 | ||
192 | /** | 192 | /** |
193 | * scc_tuneproc - tune a drive PIO mode | 193 | * scc_tune_pio - tune a drive PIO mode |
194 | * @drive: drive to tune | 194 | * @drive: drive to tune |
195 | * @mode_wanted: the target operating mode | 195 | * @mode_wanted: the target operating mode |
196 | * | 196 | * |
@@ -198,7 +198,7 @@ scc_ide_outsl(unsigned long port, void *addr, u32 count) | |||
198 | * controller. | 198 | * controller. |
199 | */ | 199 | */ |
200 | 200 | ||
201 | static void scc_tuneproc(ide_drive_t *drive, byte mode_wanted) | 201 | static void scc_tune_pio(ide_drive_t *drive, const u8 pio) |
202 | { | 202 | { |
203 | ide_hwif_t *hwif = HWIF(drive); | 203 | ide_hwif_t *hwif = HWIF(drive); |
204 | struct scc_ports *ports = ide_get_hwifdata(hwif); | 204 | struct scc_ports *ports = ide_get_hwifdata(hwif); |
@@ -207,41 +207,25 @@ static void scc_tuneproc(ide_drive_t *drive, byte mode_wanted) | |||
207 | unsigned long piosht_port = ctl_base + 0x000; | 207 | unsigned long piosht_port = ctl_base + 0x000; |
208 | unsigned long pioct_port = ctl_base + 0x004; | 208 | unsigned long pioct_port = ctl_base + 0x004; |
209 | unsigned long reg; | 209 | unsigned long reg; |
210 | unsigned char speed = XFER_PIO_0; | ||
211 | int offset; | 210 | int offset; |
212 | 211 | ||
213 | mode_wanted = ide_get_best_pio_mode(drive, mode_wanted, 4); | ||
214 | switch (mode_wanted) { | ||
215 | case 4: | ||
216 | speed = XFER_PIO_4; | ||
217 | break; | ||
218 | case 3: | ||
219 | speed = XFER_PIO_3; | ||
220 | break; | ||
221 | case 2: | ||
222 | speed = XFER_PIO_2; | ||
223 | break; | ||
224 | case 1: | ||
225 | speed = XFER_PIO_1; | ||
226 | break; | ||
227 | case 0: | ||
228 | default: | ||
229 | speed = XFER_PIO_0; | ||
230 | break; | ||
231 | } | ||
232 | |||
233 | reg = in_be32((void __iomem *)cckctrl_port); | 212 | reg = in_be32((void __iomem *)cckctrl_port); |
234 | if (reg & CCKCTRL_ATACLKOEN) { | 213 | if (reg & CCKCTRL_ATACLKOEN) { |
235 | offset = 1; /* 133MHz */ | 214 | offset = 1; /* 133MHz */ |
236 | } else { | 215 | } else { |
237 | offset = 0; /* 100MHz */ | 216 | offset = 0; /* 100MHz */ |
238 | } | 217 | } |
239 | reg = JCHSTtbl[offset][mode_wanted] << 16 | JCHHTtbl[offset][mode_wanted]; | 218 | reg = JCHSTtbl[offset][pio] << 16 | JCHHTtbl[offset][pio]; |
240 | out_be32((void __iomem *)piosht_port, reg); | 219 | out_be32((void __iomem *)piosht_port, reg); |
241 | reg = JCHCTtbl[offset][mode_wanted]; | 220 | reg = JCHCTtbl[offset][pio]; |
242 | out_be32((void __iomem *)pioct_port, reg); | 221 | out_be32((void __iomem *)pioct_port, reg); |
222 | } | ||
243 | 223 | ||
244 | ide_config_drive_speed(drive, speed); | 224 | static void scc_tuneproc(ide_drive_t *drive, u8 pio) |
225 | { | ||
226 | pio = ide_get_best_pio_mode(drive, pio, 4); | ||
227 | scc_tune_pio(drive, pio); | ||
228 | ide_config_drive_speed(drive, XFER_PIO_0 + pio); | ||
245 | } | 229 | } |
246 | 230 | ||
247 | /** | 231 | /** |
@@ -280,26 +264,21 @@ static int scc_tune_chipset(ide_drive_t *drive, byte xferspeed) | |||
280 | 264 | ||
281 | switch (speed) { | 265 | switch (speed) { |
282 | case XFER_UDMA_6: | 266 | case XFER_UDMA_6: |
283 | idx = 6; | ||
284 | break; | ||
285 | case XFER_UDMA_5: | 267 | case XFER_UDMA_5: |
286 | idx = 5; | ||
287 | break; | ||
288 | case XFER_UDMA_4: | 268 | case XFER_UDMA_4: |
289 | idx = 4; | ||
290 | break; | ||
291 | case XFER_UDMA_3: | 269 | case XFER_UDMA_3: |
292 | idx = 3; | ||
293 | break; | ||
294 | case XFER_UDMA_2: | 270 | case XFER_UDMA_2: |
295 | idx = 2; | ||
296 | break; | ||
297 | case XFER_UDMA_1: | 271 | case XFER_UDMA_1: |
298 | idx = 1; | ||
299 | break; | ||
300 | case XFER_UDMA_0: | 272 | case XFER_UDMA_0: |
301 | idx = 0; | 273 | idx = speed - XFER_UDMA_0; |
302 | break; | 274 | break; |
275 | case XFER_PIO_4: | ||
276 | case XFER_PIO_3: | ||
277 | case XFER_PIO_2: | ||
278 | case XFER_PIO_1: | ||
279 | case XFER_PIO_0: | ||
280 | scc_tune_pio(drive, speed - XFER_PIO_0); | ||
281 | return ide_config_drive_speed(drive, speed); | ||
303 | default: | 282 | default: |
304 | return 1; | 283 | return 1; |
305 | } | 284 | } |
@@ -329,7 +308,7 @@ static int scc_tune_chipset(ide_drive_t *drive, byte xferspeed) | |||
329 | * required. | 308 | * required. |
330 | * If the drive isn't suitable for DMA or we hit other problems | 309 | * If the drive isn't suitable for DMA or we hit other problems |
331 | * then we will drop down to PIO and set up PIO appropriately. | 310 | * then we will drop down to PIO and set up PIO appropriately. |
332 | * (return 1) | 311 | * (return -1) |
333 | */ | 312 | */ |
334 | 313 | ||
335 | static int scc_config_drive_for_dma(ide_drive_t *drive) | 314 | static int scc_config_drive_for_dma(ide_drive_t *drive) |
@@ -338,7 +317,7 @@ static int scc_config_drive_for_dma(ide_drive_t *drive) | |||
338 | return 0; | 317 | return 0; |
339 | 318 | ||
340 | if (ide_use_fast_pio(drive)) | 319 | if (ide_use_fast_pio(drive)) |
341 | scc_tuneproc(drive, 4); | 320 | scc_tuneproc(drive, 255); |
342 | 321 | ||
343 | return -1; | 322 | return -1; |
344 | } | 323 | } |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 63fbb79e8178..26f24802d3e8 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -801,6 +801,7 @@ struct sis_laptop { | |||
801 | static const struct sis_laptop sis_laptop[] = { | 801 | static const struct sis_laptop sis_laptop[] = { |
802 | /* devid, subvendor, subdev */ | 802 | /* devid, subvendor, subdev */ |
803 | { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ | 803 | { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ |
804 | { 0x5513, 0x1734, 0x105f }, /* FSC Amilo A1630 */ | ||
804 | /* end marker */ | 805 | /* end marker */ |
805 | { 0, } | 806 | { 0, } |
806 | }; | 807 | }; |
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 8e655f2db5cb..628b0664f576 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/slc90e66.c Version 0.14 February 8, 2007 | 2 | * linux/drivers/ide/pci/slc90e66.c Version 0.15 Jul 6, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> | 5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> |
@@ -29,20 +29,14 @@ static u8 slc90e66_dma_2_pio (u8 xfer_rate) { | |||
29 | case XFER_UDMA_1: | 29 | case XFER_UDMA_1: |
30 | case XFER_UDMA_0: | 30 | case XFER_UDMA_0: |
31 | case XFER_MW_DMA_2: | 31 | case XFER_MW_DMA_2: |
32 | case XFER_PIO_4: | ||
33 | return 4; | 32 | return 4; |
34 | case XFER_MW_DMA_1: | 33 | case XFER_MW_DMA_1: |
35 | case XFER_PIO_3: | ||
36 | return 3; | 34 | return 3; |
37 | case XFER_SW_DMA_2: | 35 | case XFER_SW_DMA_2: |
38 | case XFER_PIO_2: | ||
39 | return 2; | 36 | return 2; |
40 | case XFER_MW_DMA_0: | 37 | case XFER_MW_DMA_0: |
41 | case XFER_SW_DMA_1: | 38 | case XFER_SW_DMA_1: |
42 | case XFER_SW_DMA_0: | 39 | case XFER_SW_DMA_0: |
43 | case XFER_PIO_1: | ||
44 | case XFER_PIO_0: | ||
45 | case XFER_PIO_SLOW: | ||
46 | default: | 40 | default: |
47 | return 0; | 41 | return 0; |
48 | } | 42 | } |
@@ -136,6 +130,7 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
136 | case XFER_PIO_4: | 130 | case XFER_PIO_4: |
137 | case XFER_PIO_3: | 131 | case XFER_PIO_3: |
138 | case XFER_PIO_2: | 132 | case XFER_PIO_2: |
133 | case XFER_PIO_1: | ||
139 | case XFER_PIO_0: break; | 134 | case XFER_PIO_0: break; |
140 | default: return -1; | 135 | default: return -1; |
141 | } | 136 | } |
@@ -156,7 +151,11 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
156 | pci_write_config_word(dev, 0x4a, reg4a & ~a_speed); | 151 | pci_write_config_word(dev, 0x4a, reg4a & ~a_speed); |
157 | } | 152 | } |
158 | 153 | ||
159 | slc90e66_tune_pio(drive, slc90e66_dma_2_pio(speed)); | 154 | if (speed > XFER_PIO_4) |
155 | slc90e66_tune_pio(drive, slc90e66_dma_2_pio(speed)); | ||
156 | else | ||
157 | slc90e66_tune_pio(drive, speed - XFER_PIO_0); | ||
158 | |||
160 | return ide_config_drive_speed(drive, speed); | 159 | return ide_config_drive_speed(drive, speed); |
161 | } | 160 | } |
162 | 161 | ||
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 8e58ea3d95c0..004bc2487270 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -310,7 +310,7 @@ static int pci_default_resume(struct pci_dev *pci_dev) | |||
310 | /* restore the PCI config space */ | 310 | /* restore the PCI config space */ |
311 | pci_restore_state(pci_dev); | 311 | pci_restore_state(pci_dev); |
312 | /* if the device was enabled before suspend, reenable */ | 312 | /* if the device was enabled before suspend, reenable */ |
313 | retval = __pci_reenable_device(pci_dev); | 313 | retval = pci_reenable_device(pci_dev); |
314 | /* if the device was busmaster before the suspend, make it busmaster again */ | 314 | /* if the device was busmaster before the suspend, make it busmaster again */ |
315 | if (pci_dev->is_busmaster) | 315 | if (pci_dev->is_busmaster) |
316 | pci_set_master(pci_dev); | 316 | pci_set_master(pci_dev); |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 1ee9cd9c86e2..37c00f6fd801 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -695,14 +695,13 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars) | |||
695 | } | 695 | } |
696 | 696 | ||
697 | /** | 697 | /** |
698 | * __pci_reenable_device - Resume abandoned device | 698 | * pci_reenable_device - Resume abandoned device |
699 | * @dev: PCI device to be resumed | 699 | * @dev: PCI device to be resumed |
700 | * | 700 | * |
701 | * Note this function is a backend of pci_default_resume and is not supposed | 701 | * Note this function is a backend of pci_default_resume and is not supposed |
702 | * to be called by normal code, write proper resume handler and use it instead. | 702 | * to be called by normal code, write proper resume handler and use it instead. |
703 | */ | 703 | */ |
704 | int | 704 | int pci_reenable_device(struct pci_dev *dev) |
705 | __pci_reenable_device(struct pci_dev *dev) | ||
706 | { | 705 | { |
707 | if (atomic_read(&dev->enable_cnt)) | 706 | if (atomic_read(&dev->enable_cnt)) |
708 | return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1); | 707 | return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1); |
@@ -1604,7 +1603,7 @@ early_param("pci", pci_setup); | |||
1604 | device_initcall(pci_init); | 1603 | device_initcall(pci_init); |
1605 | 1604 | ||
1606 | EXPORT_SYMBOL_GPL(pci_restore_bars); | 1605 | EXPORT_SYMBOL_GPL(pci_restore_bars); |
1607 | EXPORT_SYMBOL(__pci_reenable_device); | 1606 | EXPORT_SYMBOL(pci_reenable_device); |
1608 | EXPORT_SYMBOL(pci_enable_device_bars); | 1607 | EXPORT_SYMBOL(pci_enable_device_bars); |
1609 | EXPORT_SYMBOL(pci_enable_device); | 1608 | EXPORT_SYMBOL(pci_enable_device); |
1610 | EXPORT_SYMBOL(pcim_enable_device); | 1609 | EXPORT_SYMBOL(pcim_enable_device); |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index bb90df8bdce4..1cc01acc2808 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -328,17 +328,15 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co | |||
328 | u8 *buf; | 328 | u8 *buf; |
329 | 329 | ||
330 | /* stuff a sense request in front of our current request */ | 330 | /* stuff a sense request in front of our current request */ |
331 | pc = kmalloc (sizeof (idescsi_pc_t), GFP_ATOMIC); | 331 | pc = kzalloc(sizeof(idescsi_pc_t), GFP_ATOMIC); |
332 | rq = kmalloc (sizeof (struct request), GFP_ATOMIC); | 332 | rq = kmalloc(sizeof(struct request), GFP_ATOMIC); |
333 | buf = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC); | 333 | buf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_ATOMIC); |
334 | if (pc == NULL || rq == NULL || buf == NULL) { | 334 | if (!pc || !rq || !buf) { |
335 | kfree(buf); | 335 | kfree(buf); |
336 | kfree(rq); | 336 | kfree(rq); |
337 | kfree(pc); | 337 | kfree(pc); |
338 | return -ENOMEM; | 338 | return -ENOMEM; |
339 | } | 339 | } |
340 | memset (pc, 0, sizeof (idescsi_pc_t)); | ||
341 | memset (buf, 0, SCSI_SENSE_BUFFERSIZE); | ||
342 | ide_init_drive_cmd(rq); | 340 | ide_init_drive_cmd(rq); |
343 | rq->special = (char *) pc; | 341 | rq->special = (char *) pc; |
344 | pc->rq = rq; | 342 | pc->rq = rq; |