]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 bad_head
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 May 2010 15:05:29 +0000 (08:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 May 2010 15:05:29 +0000 (08:05 -0700)
* 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

drivers/ide/cmd640.c
drivers/ide/ide_platform.c
drivers/ide/pdc202xx_old.c
include/linux/ide.h

index d2b8b272bc27810a5dcfa4571e0eeb789ffd0e88..cb10201a15ede79e7ec474a1dcd2ae709254d5ae 100644 (file)
@@ -633,12 +633,10 @@ static void __init cmd640_init_dev(ide_drive_t *drive)
 
 static int cmd640_test_irq(ide_hwif_t *hwif)
 {
-       struct pci_dev *dev     = to_pci_dev(hwif->dev);
        int irq_reg             = hwif->channel ? ARTTIM23 : CFR;
-       u8  irq_stat, irq_mask  = hwif->channel ? ARTTIM23_IDE23INTR :
+       u8  irq_mask            = hwif->channel ? ARTTIM23_IDE23INTR :
                                                  CFR_IDE01INTR;
-
-       pci_read_config_byte(dev, irq_reg, &irq_stat);
+       u8  irq_stat            = get_cmd640_reg(irq_reg);
 
        return (irq_stat & irq_mask) ? 1 : 0;
 }
index 42965b3e30b9bb270f74be175e1b35190de714bc..542603b394e4a59997ca82940598b3a64f8edfd9 100644 (file)
@@ -95,6 +95,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
        plat_ide_setup_ports(&hw, base, alt_base, pdata, res_irq->start);
        hw.dev = &pdev->dev;
 
+       d.irq_flags = res_irq->flags;
        if (mmio)
                d.host_flags |= IDE_HFLAG_MMIO;
 
index c5f3841af360da3d8d62a4fc10bb10b7160f21e0..3a35ec6193d25241312cdd03595a53cdf2999a49 100644 (file)
@@ -93,13 +93,13 @@ static int pdc202xx_test_irq(ide_hwif_t *hwif)
                 * bit 7: error, bit 6: interrupting,
                 * bit 5: FIFO full, bit 4: FIFO empty
                 */
-               return ((sc1d & 0x50) == 0x50) ? 1 : 0;
+               return (sc1d & 0x40) ? 1 : 0;
        } else  {
                /*
                 * bit 3: error, bit 2: interrupting,
                 * bit 1: FIFO full, bit 0: FIFO empty
                 */
-               return ((sc1d & 0x05) == 0x05) ? 1 : 0;
+               return (sc1d & 0x04) ? 1 : 0;
        }
 }
 
@@ -241,6 +241,7 @@ static const struct ide_port_ops pdc20246_port_ops = {
 static const struct ide_port_ops pdc2026x_port_ops = {
        .set_pio_mode           = pdc202xx_set_pio_mode,
        .set_dma_mode           = pdc202xx_set_mode,
+       .test_irq               = pdc202xx_test_irq,
        .cable_detect           = pdc2026x_cable_detect,
 };
 
index b6d448048ae251af4c3b7f29bd62801b1c43de07..7b02aa5ce9b4d30c803840376182797e15f9c3dc 100644 (file)
@@ -516,8 +516,8 @@ struct ide_drive_s {
         u8     current_speed;  /* current transfer rate set */
        u8      desired_speed;  /* desired transfer rate set */
        u8      pio_mode;       /* for ->set_pio_mode _only_ */
-       u8      dma_mode;       /* for ->dma_pio_mode _only_ */
-        u8     dn;             /* now wide spread use */
+       u8      dma_mode;       /* for ->set_dma_mode _only_ */
+       u8      dn;             /* now wide spread use */
        u8      acoustic;       /* acoustic management */
        u8      media;          /* disk, cdrom, tape, floppy, ... */
        u8      ready_stat;     /* min status value for drive ready */