aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt366.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
commit4db90a145292327b95b03f6dcd3352327235cc36 (patch)
treec48ba5fc31e27d6fbdb8883151bdf237e7eb1920 /drivers/ide/pci/hpt366.c
parent428c6440ef933a3d9df5adfeb2cbb3ea7ebb6a68 (diff)
ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate(). * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old, serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode methods in host drivers that don't (IDE core code guarantees that ->set_dma_mode will be called only for modes which are present in SWDMA/MWDMA/UDMA masks). While at it: * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in hpt34x/hpt366/pdc202xx_old/serverworks host driver. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r--drivers/ide/pci/hpt366.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 24d645751e0f..3777fb8c8043 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1461,6 +1461,11 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
1461 return 0; 1461 return 0;
1462} 1462}
1463 1463
1464#define IDE_HFLAGS_HPT3XX \
1465 (IDE_HFLAG_NO_ATAPI_DMA | \
1466 IDE_HFLAG_ABUSE_SET_DMA_MODE | \
1467 IDE_HFLAG_OFF_BOARD)
1468
1464static const struct ide_port_info hpt366_chipsets[] __devinitdata = { 1469static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1465 { /* 0 */ 1470 { /* 0 */
1466 .name = "HPT36x", 1471 .name = "HPT36x",
@@ -1475,9 +1480,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1475 */ 1480 */
1476 .enablebits = {{0x50,0x10,0x10}, {0x54,0x04,0x04}}, 1481 .enablebits = {{0x50,0x10,0x10}, {0x54,0x04,0x04}},
1477 .extra = 240, 1482 .extra = 240,
1478 .host_flags = IDE_HFLAG_SINGLE | 1483 .host_flags = IDE_HFLAGS_HPT3XX | IDE_HFLAG_SINGLE,
1479 IDE_HFLAG_NO_ATAPI_DMA |
1480 IDE_HFLAG_OFF_BOARD,
1481 .pio_mask = ATA_PIO4, 1484 .pio_mask = ATA_PIO4,
1482 .mwdma_mask = ATA_MWDMA2, 1485 .mwdma_mask = ATA_MWDMA2,
1483 },{ /* 1 */ 1486 },{ /* 1 */
@@ -1487,7 +1490,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1487 .init_dma = init_dma_hpt366, 1490 .init_dma = init_dma_hpt366,
1488 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1491 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1489 .extra = 240, 1492 .extra = 240,
1490 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, 1493 .host_flags = IDE_HFLAGS_HPT3XX,
1491 .pio_mask = ATA_PIO4, 1494 .pio_mask = ATA_PIO4,
1492 .mwdma_mask = ATA_MWDMA2, 1495 .mwdma_mask = ATA_MWDMA2,
1493 },{ /* 2 */ 1496 },{ /* 2 */
@@ -1497,7 +1500,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1497 .init_dma = init_dma_hpt366, 1500 .init_dma = init_dma_hpt366,
1498 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1501 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1499 .extra = 240, 1502 .extra = 240,
1500 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, 1503 .host_flags = IDE_HFLAGS_HPT3XX,
1501 .pio_mask = ATA_PIO4, 1504 .pio_mask = ATA_PIO4,
1502 .mwdma_mask = ATA_MWDMA2, 1505 .mwdma_mask = ATA_MWDMA2,
1503 },{ /* 3 */ 1506 },{ /* 3 */
@@ -1507,7 +1510,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1507 .init_dma = init_dma_hpt366, 1510 .init_dma = init_dma_hpt366,
1508 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1511 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1509 .extra = 240, 1512 .extra = 240,
1510 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, 1513 .host_flags = IDE_HFLAGS_HPT3XX,
1511 .pio_mask = ATA_PIO4, 1514 .pio_mask = ATA_PIO4,
1512 .mwdma_mask = ATA_MWDMA2, 1515 .mwdma_mask = ATA_MWDMA2,
1513 },{ /* 4 */ 1516 },{ /* 4 */
@@ -1518,7 +1521,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1518 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1521 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1519 .udma_mask = ATA_UDMA5, 1522 .udma_mask = ATA_UDMA5,
1520 .extra = 240, 1523 .extra = 240,
1521 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, 1524 .host_flags = IDE_HFLAGS_HPT3XX,
1522 .pio_mask = ATA_PIO4, 1525 .pio_mask = ATA_PIO4,
1523 .mwdma_mask = ATA_MWDMA2, 1526 .mwdma_mask = ATA_MWDMA2,
1524 },{ /* 5 */ 1527 },{ /* 5 */
@@ -1528,7 +1531,7 @@ static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
1528 .init_dma = init_dma_hpt366, 1531 .init_dma = init_dma_hpt366,
1529 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}}, 1532 .enablebits = {{0x50,0x04,0x04}, {0x54,0x04,0x04}},
1530 .extra = 240, 1533 .extra = 240,
1531 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, 1534 .host_flags = IDE_HFLAGS_HPT3XX,
1532 .pio_mask = ATA_PIO4, 1535 .pio_mask = ATA_PIO4,
1533 .mwdma_mask = ATA_MWDMA2, 1536 .mwdma_mask = ATA_MWDMA2,
1534 } 1537 }