diff options
Diffstat (limited to 'sys/cam/cam_periph.c')
-rw-r--r-- | sys/cam/cam_periph.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 14f3beb3c03d..d17253fbb5e0 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -658,10 +658,19 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) numbufs = 2; break; case XPT_GDEV_ADVINFO: + if (ccb->cgdai.bufsiz == 0) + return (0); + data_ptrs[0] = (uint8_t **)&ccb->cgdai.buf; lengths[0] = ccb->cgdai.bufsiz; dirs[0] = CAM_DIR_IN; numbufs = 1; + + /* + * This request will not go to the hardware, no reason + * to be so strict. vmapbuf() is able to map up to MAXPHYS. + */ + maxmap = MAXPHYS; break; default: return(EINVAL); |