diff options
author | ken <ken@FreeBSD.org> | 1998-12-16 21:00:06 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 1998-12-16 21:00:06 +0000 |
commit | 36eb372526931ac48870431cac357b42fb8efe26 (patch) | |
tree | b83122039129b7aa6f85b13e3f9675a6233721c5 | |
parent | 32cca8fd9bd8be8a9eb347f5b89d01ebb87c0052 (diff) | |
download | FreeBSD-src-36eb372526931ac48870431cac357b42fb8efe26.zip FreeBSD-src-36eb372526931ac48870431cac357b42fb8efe26.tar.gz |
At Justin's request, limit the size of buffers that can be mapped into
and out of kernel address space (via the pass(4) and xpt(4) peripheral
drivers) to 64K (DFLTPHYS). Some controllers, like the Adaptec 1542,
don't support more than 64K transactions.
We plan on eventually having the capability of limiting this size based
on min(MAXPHYS, controller max), but since that capability isn't here yet,
limit things to the lowest common denominator.
-rw-r--r-- | sys/cam/cam_periph.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 1a707601..a5062dd 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -549,12 +549,12 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) * boundary. */ if ((lengths[i] + - (((vm_offset_t)(*data_ptrs[i])) & PAGE_MASK)) > MAXPHYS){ + (((vm_offset_t)(*data_ptrs[i])) & PAGE_MASK)) > DFLTPHYS){ printf("cam_periph_mapmem: attempt to map %u bytes, " - "which is greater than MAXPHYS(%d)\n", + "which is greater than DFLTPHYS(%d)\n", lengths[i] + (((vm_offset_t)(*data_ptrs[i])) & PAGE_MASK), - MAXPHYS); + DFLTPHYS); return(E2BIG); } @@ -607,7 +607,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) /* put our pointer in the data slot */ mapinfo->bp[i]->b_data = *data_ptrs[i]; - /* set the transfer length, we know it's < MAXPHYS */ + /* set the transfer length, we know it's < DFLTPHYS */ mapinfo->bp[i]->b_bufsize = lengths[i]; /* set the flags */ |