diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-sff.c | 28 | ||||
-rw-r--r-- | drivers/ata/pata_via.c | 4 | ||||
-rw-r--r-- | drivers/ata/sata_nv.c | 14 |
3 files changed, 32 insertions, 14 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 0b299b0f8172..714cb046b594 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -773,18 +773,32 @@ unsigned int ata_sff_data_xfer32(struct ata_device *dev, unsigned char *buf, | |||
773 | else | 773 | else |
774 | iowrite32_rep(data_addr, buf, words); | 774 | iowrite32_rep(data_addr, buf, words); |
775 | 775 | ||
776 | /* Transfer trailing bytes, if any */ | ||
776 | if (unlikely(slop)) { | 777 | if (unlikely(slop)) { |
777 | __le32 pad; | 778 | unsigned char pad[4]; |
779 | |||
780 | /* Point buf to the tail of buffer */ | ||
781 | buf += buflen - slop; | ||
782 | |||
783 | /* | ||
784 | * Use io*_rep() accessors here as well to avoid pointlessly | ||
785 | * swapping bytes to and fro on the big endian machines... | ||
786 | */ | ||
778 | if (rw == READ) { | 787 | if (rw == READ) { |
779 | pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr)); | 788 | if (slop < 3) |
780 | memcpy(buf + buflen - slop, &pad, slop); | 789 | ioread16_rep(data_addr, pad, 1); |
790 | else | ||
791 | ioread32_rep(data_addr, pad, 1); | ||
792 | memcpy(buf, pad, slop); | ||
781 | } else { | 793 | } else { |
782 | memcpy(&pad, buf + buflen - slop, slop); | 794 | memcpy(pad, buf, slop); |
783 | iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr); | 795 | if (slop < 3) |
796 | iowrite16_rep(data_addr, pad, 1); | ||
797 | else | ||
798 | iowrite32_rep(data_addr, pad, 1); | ||
784 | } | 799 | } |
785 | words++; | ||
786 | } | 800 | } |
787 | return words << 2; | 801 | return (buflen + 1) & ~1; |
788 | } | 802 | } |
789 | EXPORT_SYMBOL_GPL(ata_sff_data_xfer32); | 803 | EXPORT_SYMBOL_GPL(ata_sff_data_xfer32); |
790 | 804 | ||
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 79a6c9a0b721..ba556d3e6963 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -110,7 +110,8 @@ static const struct via_isa_bridge { | |||
110 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 110 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
111 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 111 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
112 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, | 112 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, |
113 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES}, | 113 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, |
114 | { "vt6415", PCI_DEVICE_ID_VIA_6415, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, | ||
114 | { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 115 | { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
115 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 116 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
116 | { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 117 | { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
@@ -593,6 +594,7 @@ static int via_reinit_one(struct pci_dev *pdev) | |||
593 | #endif | 594 | #endif |
594 | 595 | ||
595 | static const struct pci_device_id via[] = { | 596 | static const struct pci_device_id via[] = { |
597 | { PCI_VDEVICE(VIA, 0x0415), }, | ||
596 | { PCI_VDEVICE(VIA, 0x0571), }, | 598 | { PCI_VDEVICE(VIA, 0x0571), }, |
597 | { PCI_VDEVICE(VIA, 0x0581), }, | 599 | { PCI_VDEVICE(VIA, 0x0581), }, |
598 | { PCI_VDEVICE(VIA, 0x1571), }, | 600 | { PCI_VDEVICE(VIA, 0x1571), }, |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 444af0415ca1..55a8eed3f3a3 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -421,19 +421,21 @@ static struct ata_port_operations nv_generic_ops = { | |||
421 | .hardreset = ATA_OP_NULL, | 421 | .hardreset = ATA_OP_NULL, |
422 | }; | 422 | }; |
423 | 423 | ||
424 | /* OSDL bz3352 reports that nf2/3 controllers can't determine device | 424 | /* nf2 is ripe with hardreset related problems. |
425 | * signature reliably. Also, the following thread reports detection | 425 | * |
426 | * failure on cold boot with the standard debouncing timing. | 426 | * kernel bz#3352 reports nf2/3 controllers can't determine device |
427 | * signature reliably. The following thread reports detection failure | ||
428 | * on cold boot with the standard debouncing timing. | ||
427 | * | 429 | * |
428 | * http://thread.gmane.org/gmane.linux.ide/34098 | 430 | * http://thread.gmane.org/gmane.linux.ide/34098 |
429 | * | 431 | * |
430 | * Debounce with hotplug timing and request follow-up SRST. | 432 | * And bz#12176 reports that hardreset simply doesn't work on nf2. |
433 | * Give up on it and just don't do hardreset. | ||
431 | */ | 434 | */ |
432 | static struct ata_port_operations nv_nf2_ops = { | 435 | static struct ata_port_operations nv_nf2_ops = { |
433 | .inherits = &nv_common_ops, | 436 | .inherits = &nv_generic_ops, |
434 | .freeze = nv_nf2_freeze, | 437 | .freeze = nv_nf2_freeze, |
435 | .thaw = nv_nf2_thaw, | 438 | .thaw = nv_nf2_thaw, |
436 | .hardreset = nv_noclassify_hardreset, | ||
437 | }; | 439 | }; |
438 | 440 | ||
439 | /* For initial probing after boot and hot plugging, hardreset mostly | 441 | /* For initial probing after boot and hot plugging, hardreset mostly |