aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-core.c1
-rw-r--r--drivers/ata/pata_it821x.c4
-rw-r--r--drivers/ata/pata_via.c14
-rw-r--r--drivers/ide/pci/via82cxxx.c1
-rw-r--r--include/linux/pci_ids.h1
5 files changed, 18 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index a3ee087223de..c43de9a710db 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6035,6 +6035,7 @@ void ata_dev_init(struct ata_device *dev)
6035 */ 6035 */
6036 spin_lock_irqsave(ap->lock, flags); 6036 spin_lock_irqsave(ap->lock, flags);
6037 dev->flags &= ~ATA_DFLAG_INIT_MASK; 6037 dev->flags &= ~ATA_DFLAG_INIT_MASK;
6038 dev->horkage = 0;
6038 spin_unlock_irqrestore(ap->lock, flags); 6039 spin_unlock_irqrestore(ap->lock, flags);
6039 6040
6040 memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0, 6041 memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0,
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index ed637ae33ece..5d8b91e70ecd 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -533,6 +533,10 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc)
533 struct ata_port *ap = qc->ap; 533 struct ata_port *ap = qc->ap;
534 struct it821x_dev *itdev = ap->private_data; 534 struct it821x_dev *itdev = ap->private_data;
535 535
536 /* Only use dma for transfers to/from the media. */
537 if (qc->nbytes < 2048)
538 return -EOPNOTSUPP;
539
536 /* No ATAPI DMA in smart mode */ 540 /* No ATAPI DMA in smart mode */
537 if (itdev->smart) 541 if (itdev->smart)
538 return -EOPNOTSUPP; 542 return -EOPNOTSUPP;
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index ea18e33f50ef..636c4f1a0b24 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -97,6 +97,7 @@ static const struct via_isa_bridge {
97 u8 rev_max; 97 u8 rev_max;
98 u16 flags; 98 u16 flags;
99} via_isa_bridges[] = { 99} via_isa_bridges[] = {
100 { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
100 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 101 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
101 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 102 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
102 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 103 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
@@ -243,7 +244,6 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
243 int ut; 244 int ut;
244 int offset = 3 - (2*ap->port_no) - adev->devno; 245 int offset = 3 - (2*ap->port_no) - adev->devno;
245 246
246
247 /* Calculate the timing values we require */ 247 /* Calculate the timing values we require */
248 ata_timing_compute(adev, mode, &t, T, UT); 248 ata_timing_compute(adev, mode, &t, T, UT);
249 249
@@ -290,9 +290,17 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo
290 ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07; 290 ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07;
291 break; 291 break;
292 } 292 }
293
293 /* Set UDMA unless device is not UDMA capable */ 294 /* Set UDMA unless device is not UDMA capable */
294 if (udma_type) 295 if (udma_type) {
295 pci_write_config_byte(pdev, 0x50 + offset, ut); 296 u8 cable80_status;
297
298 /* Get 80-wire cable detection bit */
299 pci_read_config_byte(pdev, 0x50 + offset, &cable80_status);
300 cable80_status &= 0x10;
301
302 pci_write_config_byte(pdev, 0x50 + offset, ut | cable80_status);
303 }
296} 304}
297 305
298static void via_set_piomode(struct ata_port *ap, struct ata_device *adev) 306static void via_set_piomode(struct ata_port *ap, struct ata_device *adev)
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 581316f9581d..8c539381d622 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -74,6 +74,7 @@ static struct via_isa_bridge {
74 u8 udma_mask; 74 u8 udma_mask;
75 u8 flags; 75 u8 flags;
76} via_isa_bridges[] = { 76} via_isa_bridges[] = {
77 { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
77 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 78 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
78 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 79 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
79 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, 80 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST },
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 17168f3cc73f..d41747b9fd15 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1343,6 +1343,7 @@
1343#define PCI_DEVICE_ID_VIA_8231_4 0x8235 1343#define PCI_DEVICE_ID_VIA_8231_4 0x8235
1344#define PCI_DEVICE_ID_VIA_8365_1 0x8305 1344#define PCI_DEVICE_ID_VIA_8365_1 0x8305
1345#define PCI_DEVICE_ID_VIA_CX700 0x8324 1345#define PCI_DEVICE_ID_VIA_CX700 0x8324
1346#define PCI_DEVICE_ID_VIA_VX800 0x8353
1346#define PCI_DEVICE_ID_VIA_8371_1 0x8391 1347#define PCI_DEVICE_ID_VIA_8371_1 0x8391
1347#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 1348#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
1348#define PCI_DEVICE_ID_VIA_838X_1 0xB188 1349#define PCI_DEVICE_ID_VIA_838X_1 0xB188