summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-02-27 09:42:57 +0000
committersos <sos@FreeBSD.org>2003-02-27 09:42:57 +0000
commitc7b1aa5bcbc0176fc00976fb71d7dd070245c795 (patch)
tree01cf3e53660647f198b1d15255626c9f7b0306aa /sys/dev
parentb286653bd0ce6589caf93382598d3219b8ae84fc (diff)
downloadFreeBSD-src-c7b1aa5bcbc0176fc00976fb71d7dd070245c795.zip
FreeBSD-src-c7b1aa5bcbc0176fc00976fb71d7dd070245c795.tar.gz
Only use function 1 not 0 on cypress chips.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-chipset.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index 673ac55..f7024f1 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,
OpenPOWER on IntegriCloud