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
This commit is contained in:
@@ -633,12 +633,10 @@ static void __init cmd640_init_dev(ide_drive_t *drive)
|
|||||||
|
|
||||||
static int cmd640_test_irq(ide_hwif_t *hwif)
|
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;
|
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;
|
CFR_IDE01INTR;
|
||||||
|
u8 irq_stat = get_cmd640_reg(irq_reg);
|
||||||
pci_read_config_byte(dev, irq_reg, &irq_stat);
|
|
||||||
|
|
||||||
return (irq_stat & irq_mask) ? 1 : 0;
|
return (irq_stat & irq_mask) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
plat_ide_setup_ports(&hw, base, alt_base, pdata, res_irq->start);
|
||||||
hw.dev = &pdev->dev;
|
hw.dev = &pdev->dev;
|
||||||
|
|
||||||
|
d.irq_flags = res_irq->flags;
|
||||||
if (mmio)
|
if (mmio)
|
||||||
d.host_flags |= IDE_HFLAG_MMIO;
|
d.host_flags |= IDE_HFLAG_MMIO;
|
||||||
|
|
||||||
|
@@ -93,13 +93,13 @@ static int pdc202xx_test_irq(ide_hwif_t *hwif)
|
|||||||
* bit 7: error, bit 6: interrupting,
|
* bit 7: error, bit 6: interrupting,
|
||||||
* bit 5: FIFO full, bit 4: FIFO empty
|
* bit 5: FIFO full, bit 4: FIFO empty
|
||||||
*/
|
*/
|
||||||
return ((sc1d & 0x50) == 0x50) ? 1 : 0;
|
return (sc1d & 0x40) ? 1 : 0;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* bit 3: error, bit 2: interrupting,
|
* bit 3: error, bit 2: interrupting,
|
||||||
* bit 1: FIFO full, bit 0: FIFO empty
|
* 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 = {
|
static const struct ide_port_ops pdc2026x_port_ops = {
|
||||||
.set_pio_mode = pdc202xx_set_pio_mode,
|
.set_pio_mode = pdc202xx_set_pio_mode,
|
||||||
.set_dma_mode = pdc202xx_set_mode,
|
.set_dma_mode = pdc202xx_set_mode,
|
||||||
|
.test_irq = pdc202xx_test_irq,
|
||||||
.cable_detect = pdc2026x_cable_detect,
|
.cable_detect = pdc2026x_cable_detect,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -516,8 +516,8 @@ struct ide_drive_s {
|
|||||||
u8 current_speed; /* current transfer rate set */
|
u8 current_speed; /* current transfer rate set */
|
||||||
u8 desired_speed; /* desired transfer rate set */
|
u8 desired_speed; /* desired transfer rate set */
|
||||||
u8 pio_mode; /* for ->set_pio_mode _only_ */
|
u8 pio_mode; /* for ->set_pio_mode _only_ */
|
||||||
u8 dma_mode; /* for ->dma_pio_mode _only_ */
|
u8 dma_mode; /* for ->set_dma_mode _only_ */
|
||||||
u8 dn; /* now wide spread use */
|
u8 dn; /* now wide spread use */
|
||||||
u8 acoustic; /* acoustic management */
|
u8 acoustic; /* acoustic management */
|
||||||
u8 media; /* disk, cdrom, tape, floppy, ... */
|
u8 media; /* disk, cdrom, tape, floppy, ... */
|
||||||
u8 ready_stat; /* min status value for drive ready */
|
u8 ready_stat; /* min status value for drive ready */
|
||||||
|
Reference in New Issue
Block a user