summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-06 06:43:57 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-06 06:43:57 +0000
commit2701f226c88466e4d58b2cc606a998a8a7d061eb (patch)
treee0461c10f38eb218fb67ce03ed38c25e51fc356e /sys/dev/pci
parent52a49a93d801d1408f92edf2d261c26a89920a41 (diff)
Apply a SG segment size limit and remove the length check.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ahci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 4ae441b6098..004ac69835d 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.70 2007/03/06 05:59:21 pascoe Exp $ */
+/* $OpenBSD: ahci.c,v 1.71 2007/03/06 06:43:56 pascoe Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -815,7 +815,7 @@ nomem:
ccb = &ap->ap_ccbs[i];
if (bus_dmamap_create(sc->sc_dmat, MAXPHYS, AHCI_MAX_PRDT,
- MAXPHYS, 0, 0, &ccb->ccb_dmamap) != 0) {
+ (4 * 1024 * 1024), 0, 0, &ccb->ccb_dmamap) != 0) {
printf("%s: unable to create dmamap for port %d "
"ccb %d\n", DEVNAME(sc), port, i);
goto freeport;
@@ -1210,10 +1210,6 @@ ahci_load_prdt(struct ahci_ccb *ccb)
PORTNAME(ap), dmap->dm_segs[i].ds_len);
return (1);
}
- if (dmap->dm_segs[i].ds_len > 0x1fffff) {
- printf("%s: requested DMA length %d is too long\n",
- PORTNAME(ap), dmap->dm_segs[i].ds_len);
- }
#endif
prd->flags = htole32(dmap->dm_segs[i].ds_len - 1);
}