Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53597
b: refs/heads/master
c: e51e252
h: refs/heads/master
i:
  53595: c058f02
v: v3
  • Loading branch information
Sergei Shtylyov authored and Bartlomiej Zolnierkiewicz committed May 5, 2007
1 parent 96db219 commit 5ab2142
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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: 60e7a82f1acb76af05d81e93ca0f65fdd52c23c2
refs/heads/master: e51e2528d589c13f0e51dfa671c310021d003e21
24 changes: 12 additions & 12 deletions trunk/drivers/ide/pci/cmd64x.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* linux/drivers/ide/pci/cmd64x.c Version 1.43 Mar 10, 2007
* linux/drivers/ide/pci/cmd64x.c Version 1.44 Mar 12, 2007
*
* cmd64x.c: Enable interrupts at initialization time on Ultra/PCI machines.
* Due to massive hardware bugs, UltraDMA is only supported
Expand Down Expand Up @@ -36,7 +36,7 @@
* CMD64x specific registers definition.
*/
#define CFR 0x50
#define CFR_INTR_CH0 0x02
#define CFR_INTR_CH0 0x04
#define CNTRL 0x51
#define CNTRL_DIS_RA0 0x40
#define CNTRL_DIS_RA1 0x80
Expand Down Expand Up @@ -488,19 +488,19 @@ static int cmd64x_ide_dma_end (ide_drive_t *drive)

static int cmd64x_ide_dma_test_irq (ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
struct pci_dev *dev = hwif->pci_dev;
u8 dma_alt_stat = 0, mask = (hwif->channel) ? MRDMODE_INTR_CH1 :
MRDMODE_INTR_CH0;
u8 dma_stat = inb(hwif->dma_status);
ide_hwif_t *hwif = HWIF(drive);
struct pci_dev *dev = hwif->pci_dev;
u8 irq_reg = hwif->channel ? ARTTIM23 : CFR;
u8 irq_stat = 0, mask = hwif->channel ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
u8 dma_stat = inb(hwif->dma_status);

(void) pci_read_config_byte(dev, irq_reg, &irq_stat);

(void) pci_read_config_byte(dev, MRDMODE, &dma_alt_stat);
#ifdef DEBUG
printk("%s: dma_stat: 0x%02x dma_alt_stat: "
"0x%02x mask: 0x%02x\n", drive->name,
dma_stat, dma_alt_stat, mask);
printk("%s: dma_stat: 0x%02x irq_stat: 0x%02x mask: 0x%02x\n",
drive->name, dma_stat, irq_stat, mask);
#endif
if (!(dma_alt_stat & mask))
if (!(irq_stat & mask))
return 0;

/* return 1 if INTR asserted */
Expand Down

0 comments on commit 5ab2142

Please sign in to comment.