Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  cy82c693: fix PCI device selection
  icside: DMA support fix
  IDE: Don't powerdown Compaq Triflex IDE device on suspend
  piix: ICH7 MWDMA1 errata
  • Loading branch information
torvalds committed Nov 19, 2011
2 parents e27fc7e + 0ab3d8b commit ddddefa
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
6 changes: 3 additions & 3 deletions drivers/ide/cy82c693.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1998-2000 Andreas S. Krebs ([email protected]), Maintainer
* Copyright (C) 1998-2002 Andre Hedrick <[email protected]>, Integrator
* Copyright (C) 2007-2010 Bartlomiej Zolnierkiewicz
* Copyright (C) 2007-2011 Bartlomiej Zolnierkiewicz
*
* CYPRESS CY82C693 chipset IDE controller
*
Expand Down Expand Up @@ -90,7 +90,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
u8 time_16, time_8;

/* select primary or secondary channel */
if (hwif->index > 0) { /* drive is on the secondary channel */
if (drive->dn > 1) { /* drive is on the secondary channel */
dev = pci_get_slot(dev->bus, dev->devfn+1);
if (!dev) {
printk(KERN_ERR "%s: tune_drive: "
Expand Down Expand Up @@ -141,7 +141,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
pci_write_config_byte(dev, CY82_IDE_SLAVE_IOW, time_16);
pci_write_config_byte(dev, CY82_IDE_SLAVE_8BIT, time_8);
}
if (hwif->index > 0)
if (drive->dn > 1)
pci_dev_put(dev);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) {
d.init_dma = icside_dma_init;
d.port_ops = &icside_v6_port_ops;
} else
d.dma_ops = NULL;
}

ret = ide_host_register(host, &d, hws);
if (ret)
Expand Down
18 changes: 10 additions & 8 deletions drivers/ide/piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static const struct ide_port_ops ich_port_ops = {
.udma_mask = udma, \
}

#define DECLARE_ICH_DEV(udma) \
#define DECLARE_ICH_DEV(mwdma, udma) \
{ \
.name = DRV_NAME, \
.init_chipset = init_chipset_ich, \
Expand All @@ -340,7 +340,7 @@ static const struct ide_port_ops ich_port_ops = {
.port_ops = &ich_port_ops, \
.pio_mask = ATA_PIO4, \
.swdma_mask = ATA_SWDMA2_ONLY, \
.mwdma_mask = ATA_MWDMA12_ONLY, \
.mwdma_mask = mwdma, \
.udma_mask = udma, \
}

Expand All @@ -362,13 +362,15 @@ static const struct ide_port_info piix_pci_info[] __devinitdata = {
/* 2: PIIX4 */
DECLARE_PIIX_DEV(ATA_UDMA2),
/* 3: ICH0 */
DECLARE_ICH_DEV(ATA_UDMA2),
DECLARE_ICH_DEV(ATA_MWDMA12_ONLY, ATA_UDMA2),
/* 4: ICH */
DECLARE_ICH_DEV(ATA_UDMA4),
DECLARE_ICH_DEV(ATA_MWDMA12_ONLY, ATA_UDMA4),
/* 5: PIIX4 */
DECLARE_PIIX_DEV(ATA_UDMA4),
/* 6: ICH[2-7]/ICH[2-3]M/C-ICH/ICH5-SATA/ESB2/ICH8M */
DECLARE_ICH_DEV(ATA_UDMA5),
/* 6: ICH[2-6]/ICH[2-3]M/C-ICH/ICH5-SATA/ESB2/ICH8M */
DECLARE_ICH_DEV(ATA_MWDMA12_ONLY, ATA_UDMA5),
/* 7: ICH7/7-R, no MWDMA1 */
DECLARE_ICH_DEV(ATA_MWDMA2_ONLY, ATA_UDMA5),
};

/**
Expand Down Expand Up @@ -438,9 +440,9 @@ static const struct pci_device_id piix_pci_tbl[] = {
#endif
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB_2), 6 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH6_19), 6 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH7_21), 6 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH7_21), 7 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82801DB_1), 6 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB2_18), 6 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ESB2_18), 7 },
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICH8_6), 6 },
{ 0, },
};
Expand Down
16 changes: 15 additions & 1 deletion drivers/ide/triflex.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,26 @@ static const struct pci_device_id triflex_pci_tbl[] = {
};
MODULE_DEVICE_TABLE(pci, triflex_pci_tbl);

#ifdef CONFIG_PM
static int triflex_ide_pci_suspend(struct pci_dev *dev, pm_message_t state)
{
/*
* We must not disable or powerdown the device.
* APM bios refuses to suspend if IDE is not accessible.
*/
pci_save_state(dev);
return 0;
}
#else
#define triflex_ide_pci_suspend NULL
#endif

static struct pci_driver triflex_pci_driver = {
.name = "TRIFLEX_IDE",
.id_table = triflex_pci_tbl,
.probe = triflex_init_one,
.remove = ide_pci_remove,
.suspend = ide_pci_suspend,
.suspend = triflex_ide_pci_suspend,
.resume = ide_pci_resume,
};

Expand Down

0 comments on commit ddddefa

Please sign in to comment.