aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/hpt366.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r--drivers/ide/pci/hpt366.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index ca0acb50bc61..a7909e9c720e 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -3,7 +3,7 @@
3 * Portions Copyright (C) 2001 Sun Microsystems, Inc. 3 * Portions Copyright (C) 2001 Sun Microsystems, Inc.
4 * Portions Copyright (C) 2003 Red Hat Inc 4 * Portions Copyright (C) 2003 Red Hat Inc
5 * Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz 5 * Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz
6 * Portions Copyright (C) 2005-2007 MontaVista Software, Inc. 6 * Portions Copyright (C) 2005-2008 MontaVista Software, Inc.
7 * 7 *
8 * Thanks to HighPoint Technologies for their assistance, and hardware. 8 * Thanks to HighPoint Technologies for their assistance, and hardware.
9 * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his 9 * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
@@ -748,26 +748,24 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
748 struct pci_dev *dev = to_pci_dev(hwif->dev); 748 struct pci_dev *dev = to_pci_dev(hwif->dev);
749 struct hpt_info *info = hpt3xx_get_info(hwif->dev); 749 struct hpt_info *info = hpt3xx_get_info(hwif->dev);
750 750
751 if (drive->quirk_list) { 751 if (drive->quirk_list == 0)
752 if (info->chip_type >= HPT370) { 752 return;
753 u8 scr1 = 0; 753
754 754 if (info->chip_type >= HPT370) {
755 pci_read_config_byte(dev, 0x5a, &scr1); 755 u8 scr1 = 0;
756 if (((scr1 & 0x10) >> 4) != mask) { 756
757 if (mask) 757 pci_read_config_byte(dev, 0x5a, &scr1);
758 scr1 |= 0x10; 758 if (((scr1 & 0x10) >> 4) != mask) {
759 else
760 scr1 &= ~0x10;
761 pci_write_config_byte(dev, 0x5a, scr1);
762 }
763 } else {
764 if (mask) 759 if (mask)
765 disable_irq(hwif->irq); 760 scr1 |= 0x10;
766 else 761 else
767 enable_irq (hwif->irq); 762 scr1 &= ~0x10;
763 pci_write_config_byte(dev, 0x5a, scr1);
768 } 764 }
769 } else 765 } else if (mask)
770 outb(ATA_DEVCTL_OBS | (mask ? 2 : 0), hwif->io_ports.ctl_addr); 766 disable_irq(hwif->irq);
767 else
768 enable_irq(hwif->irq);
771} 769}
772 770
773/* 771/*