aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 11:05:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 11:05:29 -0400
commit7e125f7b9cbfce4101191b8076d606c517a73066 (patch)
treeded140947b146cc7177519cd23cf81912de32687
parent064e297c324fff9b62226aae5dc468ebb272433c (diff)
parenta9ddabc52ce3757a4331d6c1e8bf4065333cc51b (diff)
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
-rw-r--r--drivers/ide/cmd640.c6
-rw-r--r--drivers/ide/ide_platform.c1
-rw-r--r--drivers/ide/pdc202xx_old.c5
-rw-r--r--include/linux/ide.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c
index d2b8b272bc27..cb10201a15ed 100644
--- a/drivers/ide/cmd640.c
+++ b/drivers/ide/cmd640.c
@@ -633,12 +633,10 @@ static void __init cmd640_init_dev(ide_drive_t *drive)
633 633
634static int cmd640_test_irq(ide_hwif_t *hwif) 634static int cmd640_test_irq(ide_hwif_t *hwif)
635{ 635{
636 struct pci_dev *dev = to_pci_dev(hwif->dev);
637 int irq_reg = hwif->channel ? ARTTIM23 : CFR; 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 CFR_IDE01INTR; 638 CFR_IDE01INTR;
640 639 u8 irq_stat = get_cmd640_reg(irq_reg);
641 pci_read_config_byte(dev, irq_reg, &irq_stat);
642 640
643 return (irq_stat & irq_mask) ? 1 : 0; 641 return (irq_stat & irq_mask) ? 1 : 0;
644} 642}
diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c
index 42965b3e30b9..542603b394e4 100644
--- a/drivers/ide/ide_platform.c
+++ b/drivers/ide/ide_platform.c
@@ -95,6 +95,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
95 plat_ide_setup_ports(&hw, base, alt_base, pdata, res_irq->start); 95 plat_ide_setup_ports(&hw, base, alt_base, pdata, res_irq->start);
96 hw.dev = &pdev->dev; 96 hw.dev = &pdev->dev;
97 97
98 d.irq_flags = res_irq->flags;
98 if (mmio) 99 if (mmio)
99 d.host_flags |= IDE_HFLAG_MMIO; 100 d.host_flags |= IDE_HFLAG_MMIO;
100 101
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
index c5f3841af360..3a35ec6193d2 100644
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -93,13 +93,13 @@ static int pdc202xx_test_irq(ide_hwif_t *hwif)
93 * bit 7: error, bit 6: interrupting, 93 * bit 7: error, bit 6: interrupting,
94 * bit 5: FIFO full, bit 4: FIFO empty 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 } else { 97 } else {
98 /* 98 /*
99 * bit 3: error, bit 2: interrupting, 99 * bit 3: error, bit 2: interrupting,
100 * bit 1: FIFO full, bit 0: FIFO empty 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 @@ static const struct ide_port_ops pdc20246_port_ops = {
241static const struct ide_port_ops pdc2026x_port_ops = { 241static const struct ide_port_ops pdc2026x_port_ops = {
242 .set_pio_mode = pdc202xx_set_pio_mode, 242 .set_pio_mode = pdc202xx_set_pio_mode,
243 .set_dma_mode = pdc202xx_set_mode, 243 .set_dma_mode = pdc202xx_set_mode,
244 .test_irq = pdc202xx_test_irq,
244 .cable_detect = pdc2026x_cable_detect, 245 .cable_detect = pdc2026x_cable_detect,
245}; 246};
246 247
diff --git a/include/linux/ide.h b/include/linux/ide.h
index b6d448048ae2..7b02aa5ce9b4 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -516,8 +516,8 @@ struct ide_drive_s {
516 u8 current_speed; /* current transfer rate set */ 516 u8 current_speed; /* current transfer rate set */
517 u8 desired_speed; /* desired transfer rate set */ 517 u8 desired_speed; /* desired transfer rate set */
518 u8 pio_mode; /* for ->set_pio_mode _only_ */ 518 u8 pio_mode; /* for ->set_pio_mode _only_ */
519 u8 dma_mode; /* for ->dma_pio_mode _only_ */ 519 u8 dma_mode; /* for ->set_dma_mode _only_ */
520 u8 dn; /* now wide spread use */ 520 u8 dn; /* now wide spread use */
521 u8 acoustic; /* acoustic management */ 521 u8 acoustic; /* acoustic management */
522 u8 media; /* disk, cdrom, tape, floppy, ... */ 522 u8 media; /* disk, cdrom, tape, floppy, ... */
523 u8 ready_stat; /* min status value for drive ready */ 523 u8 ready_stat; /* min status value for drive ready */