Skip to content

Commit 7e125f7

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: cmd640: fix kernel oops in test_irq() method pdc202xx_old: ignore "FIFO empty" bit in test_irq() method pdc202xx_old: wire test_irq() method for PDC2026x IDE: pass IRQ flags to the IDE core ide: fix comment typo in ide.h
2 parents 064e297 + a9ddabc commit 7e125f7

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

drivers/ide/cmd640.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,10 @@ static void __init cmd640_init_dev(ide_drive_t *drive)
633633

634634
static int cmd640_test_irq(ide_hwif_t *hwif)
635635
{
636-
struct pci_dev *dev = to_pci_dev(hwif->dev);
637636
int irq_reg = hwif->channel ? ARTTIM23 : CFR;
638-
u8 irq_stat, irq_mask = hwif->channel ? ARTTIM23_IDE23INTR :
637+
u8 irq_mask = hwif->channel ? ARTTIM23_IDE23INTR :
639638
CFR_IDE01INTR;
640-
641-
pci_read_config_byte(dev, irq_reg, &irq_stat);
639+
u8 irq_stat = get_cmd640_reg(irq_reg);
642640

643641
return (irq_stat & irq_mask) ? 1 : 0;
644642
}

drivers/ide/ide_platform.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
9595
plat_ide_setup_ports(&hw, base, alt_base, pdata, res_irq->start);
9696
hw.dev = &pdev->dev;
9797

98+
d.irq_flags = res_irq->flags;
9899
if (mmio)
99100
d.host_flags |= IDE_HFLAG_MMIO;
100101

drivers/ide/pdc202xx_old.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ static int pdc202xx_test_irq(ide_hwif_t *hwif)
9393
* bit 7: error, bit 6: interrupting,
9494
* bit 5: FIFO full, bit 4: FIFO empty
9595
*/
96-
return ((sc1d & 0x50) == 0x50) ? 1 : 0;
96+
return (sc1d & 0x40) ? 1 : 0;
9797
} else {
9898
/*
9999
* bit 3: error, bit 2: interrupting,
100100
* bit 1: FIFO full, bit 0: FIFO empty
101101
*/
102-
return ((sc1d & 0x05) == 0x05) ? 1 : 0;
102+
return (sc1d & 0x04) ? 1 : 0;
103103
}
104104
}
105105

@@ -241,6 +241,7 @@ static const struct ide_port_ops pdc20246_port_ops = {
241241
static const struct ide_port_ops pdc2026x_port_ops = {
242242
.set_pio_mode = pdc202xx_set_pio_mode,
243243
.set_dma_mode = pdc202xx_set_mode,
244+
.test_irq = pdc202xx_test_irq,
244245
.cable_detect = pdc2026x_cable_detect,
245246
};
246247

include/linux/ide.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,8 @@ struct ide_drive_s {
516516
u8 current_speed; /* current transfer rate set */
517517
u8 desired_speed; /* desired transfer rate set */
518518
u8 pio_mode; /* for ->set_pio_mode _only_ */
519-
u8 dma_mode; /* for ->dma_pio_mode _only_ */
520-
u8 dn; /* now wide spread use */
519+
u8 dma_mode; /* for ->set_dma_mode _only_ */
520+
u8 dn; /* now wide spread use */
521521
u8 acoustic; /* acoustic management */
522522
u8 media; /* disk, cdrom, tape, floppy, ... */
523523
u8 ready_stat; /* min status value for drive ready */

0 commit comments

Comments
 (0)