Index: sys/dev/aacraid/aacraid.c =================================================================== --- sys/dev/aacraid/aacraid.c +++ sys/dev/aacraid/aacraid.c @@ -579,7 +579,7 @@ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - sc->aac_max_sectors << 9, /* maxsize */ + AAC_MAXIO_SIZE(sc), /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ @@ -1807,7 +1807,7 @@ } ip->MaxIoCommands = sc->aac_max_fibs; - ip->MaxIoSize = sc->aac_max_sectors << 9; + ip->MaxIoSize = AAC_MAXIO_SIZE(sc); ip->MaxFibSize = sc->aac_max_fib_size; aac_adapter_init_tole(ip); Index: sys/dev/aacraid/aacraid_cam.c =================================================================== --- sys/dev/aacraid/aacraid_cam.c +++ sys/dev/aacraid/aacraid_cam.c @@ -1011,7 +1011,7 @@ cpi->max_lun = 7; /* Per the controller spec */ cpi->initiator_id = camsc->inf->InitiatorBusId; cpi->bus_id = camsc->inf->BusNumber; - cpi->maxio = sc->aac_max_sectors << 9; + cpi->maxio = AAC_MAXIO_SIZE(sc); /* * Resetting via the passthrough or parallel bus scan @@ -1205,6 +1205,12 @@ command = ccb->csio.cdb_io.cdb_bytes[0]; if (command == INQUIRY) { + /* Ignore Data Overrun errors on INQUIRY */ + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_DATA_RUN_ERR) + ccb->ccb_h.status = (ccb->ccb_h.status & + ~CAM_STATUS_MASK) | CAM_REQ_CMP; + if (ccb->ccb_h.status == CAM_REQ_CMP) { device = ccb->csio.data_ptr[0] & 0x1f; /* Index: sys/dev/aacraid/aacraid_var.h =================================================================== --- sys/dev/aacraid/aacraid_var.h +++ sys/dev/aacraid/aacraid_var.h @@ -470,6 +470,13 @@ u_int32_t FwDebugBufferSize; /* FW Debug Buffer size */ }; +/* + * Max. I/O size in bytes. + * Reserve one page for the DMA subsystem, that may need it when the + * I/O buffer is not page aligned. + */ +#define AAC_MAXIO_SIZE(sc) (((sc)->aac_max_sectors << 9) - PAGE_SIZE) + /* * Event callback mechanism for the driver */