aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/pci/hpt366.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index edb267c78af..faf77fd2e4e 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/hpt366.c Version 1.23 Dec 7, 2007 2 * linux/drivers/ide/pci/hpt366.c Version 1.24 Dec 8, 2007
3 * 3 *
4 * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> 4 * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
5 * Portions Copyright (C) 2001 Sun Microsystems, Inc. 5 * Portions Copyright (C) 2001 Sun Microsystems, Inc.
@@ -725,20 +725,9 @@ static void hpt37x_set_mode(ide_drive_t *drive, const u8 speed)
725 pci_write_config_dword(dev, itr_addr, new_itr); 725 pci_write_config_dword(dev, itr_addr, new_itr);
726} 726}
727 727
728static void hpt3xx_set_mode(ide_drive_t *drive, const u8 speed)
729{
730 ide_hwif_t *hwif = HWIF(drive);
731 struct hpt_info *info = pci_get_drvdata(hwif->pci_dev);
732
733 if (info->chip_type >= HPT370)
734 hpt37x_set_mode(drive, speed);
735 else /* hpt368: hpt_minimum_revision(dev, 2) */
736 hpt36x_set_mode(drive, speed);
737}
738
739static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio) 728static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
740{ 729{
741 hpt3xx_set_mode(drive, XFER_PIO_0 + pio); 730 HWIF(drive)->set_dma_mode(drive, XFER_PIO_0 + pio);
742} 731}
743 732
744static int hpt3xx_quirkproc(ide_drive_t *drive) 733static int hpt3xx_quirkproc(ide_drive_t *drive)
@@ -1315,7 +1304,11 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
1315 hwif->select_data = hwif->channel ? 0x54 : 0x50; 1304 hwif->select_data = hwif->channel ? 0x54 : 0x50;
1316 1305
1317 hwif->set_pio_mode = &hpt3xx_set_pio_mode; 1306 hwif->set_pio_mode = &hpt3xx_set_pio_mode;
1318 hwif->set_dma_mode = &hpt3xx_set_mode; 1307 if (chip_type >= HPT370)
1308 hwif->set_dma_mode = &hpt37x_set_mode;
1309 else
1310 hwif->set_dma_mode = &hpt36x_set_mode;
1311
1319 hwif->quirkproc = &hpt3xx_quirkproc; 1312 hwif->quirkproc = &hpt3xx_quirkproc;
1320 hwif->intrproc = &hpt3xx_intrproc; 1313 hwif->intrproc = &hpt3xx_intrproc;
1321 hwif->maskproc = &hpt3xx_maskproc; 1314 hwif->maskproc = &hpt3xx_maskproc;