From fb035beb038a276736135b0d72867c1672307de9 Mon Sep 17 00:00:00 2001 From: marius Date: Sun, 17 Jun 2012 11:16:17 +0000 Subject: [PATCH] MFC: r237107 - As a baind-aid, disable ATAPI DMA when using ATA_CAM for these controllers as well as it causes the kernel to hang during boot. Reported and tested by: Kevin Oberman - Use NULL instead of 0 for a pointer. git-svn-id: svn://svn.freebsd.org/base/stable/8@237192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/ata/chipsets/ata-ite.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/chipsets/ata-ite.c b/sys/dev/ata/chipsets/ata-ite.c index 808b21d4d..0d0ce45d6 100644 --- a/sys/dev/ata/chipsets/ata-ite.c +++ b/sys/dev/ata/chipsets/ata-ite.c @@ -105,10 +105,10 @@ ata_ite_chipinit(device_t dev) ctlr->setmode = ata_ite_821x_setmode; /* No timing restrictions initally. */ - ctlr->chipset_data = (void *)0; + ctlr->chipset_data = NULL; } ctlr->ch_attach = ata_ite_ch_attach; - return 0; + return (0); } static int @@ -119,6 +119,9 @@ ata_ite_ch_attach(device_t dev) error = ata_pci_ch_attach(dev); ch->flags |= ATA_CHECKS_CABLE; +#ifdef ATA_CAM + ch->flags |= ATA_NO_ATAPI_DMA; +#endif return (error); } -- 2.45.0