summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-07-22 21:08:02 +0000
committerjulian <julian@FreeBSD.org>1999-07-22 21:08:02 +0000
commitd6cfcc207d41347862910613388f13d548fe2396 (patch)
tree7d260a2e42eac04875e8b44992e6b2326d3fb63d /sys
parent23f357e1c436a22ba9f0db6b9d4c63ccd5e7a8c2 (diff)
downloadFreeBSD-src-d6cfcc207d41347862910613388f13d548fe2396.zip
FreeBSD-src-d6cfcc207d41347862910613388f13d548fe2396.tar.gz
Revert out part of the last patch that can be done better elsewhere.
The complexity added isn't worth it.
Diffstat (limited to 'sys')
-rw-r--r--sys/pci/ide_pci.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c
index 6114b4f..d71bfcc 100644
--- a/sys/pci/ide_pci.c
+++ b/sys/pci/ide_pci.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ide_pci.c,v 1.37 1999/07/21 02:28:35 peter Exp $
+ * $Id: ide_pci.c,v 1.38 1999/07/22 19:45:33 julian Exp $
*/
#include "wd.h"
@@ -189,16 +189,12 @@ extern struct isa_driver wdcdriver;
/*
* PRD_ALLOC_SIZE should be something that will not be allocated across a 64k
* boundary.
- * DMA_PG_SZ is the size of the chunks that each DMA scatter gather element
- * represents. In some systems there can be reasons to make this smaller than
- * a pagesize (usually due to broken hardware).
* PRD_MAX_SEGS is defined to be the maximum number of segments required for
* a transfer on an IDE drive, for an xfer that is linear in virtual memory.
* PRD_BUF_SIZE is the size of the buffer needed for a PRD table.
*/
#define PRD_ALLOC_SIZE PAGE_SIZE
-#define DMA_PG_SZ PAGE_SIZE
-#define PRD_MAX_SEGS ((256 * 512 / DMA_PG_SZ) + 1)
+#define PRD_MAX_SEGS ((256 * 512 / PAGE_SIZE) + 1)
#define PRD_BUF_SIZE PRD_MAX_SEGS * 8
static void *prdbuf = 0;
@@ -1835,7 +1831,7 @@ ide_pci_dmasetup(void *xcp, char *vaddr, u_long vcount, int dir)
/* Generate first PRD entry, which may be non-aligned. */
- firstpage = DMA_PG_SZ - ((uintptr_t)vaddr & (DMA_PG_SZ - 1));
+ firstpage = PAGE_SIZE - ((uintptr_t)vaddr & PAGE_MASK);
prd_base = vtophys(vaddr);
prd_count = MIN(count, firstpage);
@@ -1851,7 +1847,7 @@ ide_pci_dmasetup(void *xcp, char *vaddr, u_long vcount, int dir)
*/
while (count) {
nbase = vtophys(vaddr);
- ncount = MIN(count, DMA_PG_SZ);
+ ncount = MIN(count, PAGE_SIZE);
nend = nbase + ncount;
prd[i].prd_base = prd_base;
OpenPOWER on IntegriCloud