diff -r 6f16c908bb5d sys/dev/disk/nata/ata-pci.c --- a/sys/dev/disk/nata/ata-pci.c Mon Oct 29 13:02:41 2007 +0000 +++ b/sys/dev/disk/nata/ata-pci.c Sat Dec 08 20:32:18 2007 +0000 @@ -194,7 +194,6 @@ ata_pci_attach(device_t dev) else ctlr->channels = 1; ctlr->allocate = ata_pci_allocate; - ctlr->dmainit = ata_pci_dmainit; ctlr->dev = dev; /* if needed try to enable busmastering */ @@ -210,6 +209,8 @@ ata_pci_attach(device_t dev) ctlr->r_rid1 = ATA_BMADDR_RID; ctlr->r_res1 = bus_alloc_resource_any(dev, ctlr->r_type1, &ctlr->r_rid1, RF_ACTIVE); + /* Only set a dma init function if the device actually supports it. */ + ctlr->dmainit = ata_pci_dmainit; } if (ctlr->chipinit(dev))