From 19dbe46d28bcbdc6000be8930d2d8a631f7c1ecd Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 3 Sep 2009 12:37:17 +0000 Subject: [PATCH] ATI SB600 can't handle 256 sectors transfers with FPDMA (NCQ). MFC after: 3 days --- sys/dev/ahci/ahci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 189ab121e12..9264ee0593a 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -1942,6 +1942,9 @@ ahciaction(struct cam_sim *sim, union ccb *ccb) cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; + /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ + if (pci_get_devid(device_get_parent(dev)) == 0x43801002) + cpi->maxio = min(cpi->maxio, 255 * 512); cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break;