Commit 7e125f7b9cbfce4101191b8076d606c517a73066

Authored by Linus Torvalds

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

Showing 4 changed files Side-by-side Diff

drivers/ide/cmd640.c
... ... @@ -633,12 +633,10 @@
633 633  
634 634 static int cmd640_test_irq(ide_hwif_t *hwif)
635 635 {
636   - struct pci_dev *dev = to_pci_dev(hwif->dev);
637 636 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 :
639 638 CFR_IDE01INTR;
640   -
641   - pci_read_config_byte(dev, irq_reg, &irq_stat);
  639 + u8 irq_stat = get_cmd640_reg(irq_reg);
642 640  
643 641 return (irq_stat & irq_mask) ? 1 : 0;
644 642 }
drivers/ide/ide_platform.c
... ... @@ -95,6 +95,7 @@
95 95 plat_ide_setup_ports(&hw, base, alt_base, pdata, res_irq->start);
96 96 hw.dev = &pdev->dev;
97 97  
  98 + d.irq_flags = res_irq->flags;
98 99 if (mmio)
99 100 d.host_flags |= IDE_HFLAG_MMIO;
100 101  
drivers/ide/pdc202xx_old.c
... ... @@ -93,13 +93,13 @@
93 93 * bit 7: error, bit 6: interrupting,
94 94 * bit 5: FIFO full, bit 4: FIFO empty
95 95 */
96   - return ((sc1d & 0x50) == 0x50) ? 1 : 0;
  96 + return (sc1d & 0x40) ? 1 : 0;
97 97 } else {
98 98 /*
99 99 * bit 3: error, bit 2: interrupting,
100 100 * bit 1: FIFO full, bit 0: FIFO empty
101 101 */
102   - return ((sc1d & 0x05) == 0x05) ? 1 : 0;
  102 + return (sc1d & 0x04) ? 1 : 0;
103 103 }
104 104 }
105 105  
... ... @@ -241,6 +241,7 @@
241 241 static const struct ide_port_ops pdc2026x_port_ops = {
242 242 .set_pio_mode = pdc202xx_set_pio_mode,
243 243 .set_dma_mode = pdc202xx_set_mode,
  244 + .test_irq = pdc202xx_test_irq,
244 245 .cable_detect = pdc2026x_cable_detect,
245 246 };
246 247  
... ... @@ -516,8 +516,8 @@
516 516 u8 current_speed; /* current transfer rate set */
517 517 u8 desired_speed; /* desired transfer rate set */
518 518 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 */
521 521 u8 acoustic; /* acoustic management */
522 522 u8 media; /* disk, cdrom, tape, floppy, ... */
523 523 u8 ready_stat; /* min status value for drive ready */