From c7b1aa5bcbc0176fc00976fb71d7dd070245c795 Mon Sep 17 00:00:00 2001 From: sos Date: Thu, 27 Feb 2003 09:42:57 +0000 Subject: [PATCH] Only use function 1 not 0 on cypress chips. --- sys/dev/ata/ata-chipset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index 673ac55d322f..f7024f101fa5 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -535,7 +535,7 @@ ata_cypress_ident(device_t dev) * doesn't work with the crappy ATA interrupt setup on the alpha. */ if (pci_get_devid(dev) == ATA_CYPRESS_82C693 && - pci_get_function(dev) == 0 && + pci_get_function(dev) == 1 && pci_get_subclass(dev) == PCIS_STORAGE_IDE) { device_set_desc(dev, "Cypress 82C693 ATA controller"); ctlr->chipinit = ata_cypress_chipinit; @@ -562,6 +562,8 @@ ata_cypress_setmode(struct ata_device *atadev, int mode) device_t parent = device_get_parent(atadev->channel->dev); int error; + mode = ata_limit_mode(atadev, mode, ATA_WDMA2); + /* XXX missing WDMA0+1 + PIO modes */ if (mode == ATA_WDMA2) { error = ata_command(atadev, ATA_C_SETFEATURES, 0, mode,