Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116326
b: refs/heads/master
c: ea2ac5a
h: refs/heads/master
v: v3
  • Loading branch information
Sergei Shtylyov authored and Bartlomiej Zolnierkiewicz committed Oct 17, 2008
1 parent 89b4030 commit 33f83df
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5403bff8a4018240f012fd4c7afa24c2e75b469
refs/heads/master: ea2ac5a3b7d33ff9f41ddcee2a92c95b5a32f4e2
34 changes: 16 additions & 18 deletions trunk/drivers/ide/pci/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc
* Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz
* Portions Copyright (C) 2005-2007 MontaVista Software, Inc.
* Portions Copyright (C) 2005-2008 MontaVista Software, Inc.
*
* Thanks to HighPoint Technologies for their assistance, and hardware.
* Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his
Expand Down Expand Up @@ -748,26 +748,24 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
struct pci_dev *dev = to_pci_dev(hwif->dev);
struct hpt_info *info = hpt3xx_get_info(hwif->dev);

if (drive->quirk_list) {
if (info->chip_type >= HPT370) {
u8 scr1 = 0;

pci_read_config_byte(dev, 0x5a, &scr1);
if (((scr1 & 0x10) >> 4) != mask) {
if (mask)
scr1 |= 0x10;
else
scr1 &= ~0x10;
pci_write_config_byte(dev, 0x5a, scr1);
}
} else {
if (drive->quirk_list == 0)
return;

if (info->chip_type >= HPT370) {
u8 scr1 = 0;

pci_read_config_byte(dev, 0x5a, &scr1);
if (((scr1 & 0x10) >> 4) != mask) {
if (mask)
disable_irq(hwif->irq);
scr1 |= 0x10;
else
enable_irq (hwif->irq);
scr1 &= ~0x10;
pci_write_config_byte(dev, 0x5a, scr1);
}
} else
outb(ATA_DEVCTL_OBS | (mask ? 2 : 0), hwif->io_ports.ctl_addr);
} else if (mask)
disable_irq(hwif->irq);
else
enable_irq(hwif->irq);
}

/*
Expand Down

0 comments on commit 33f83df

Please sign in to comment.