Page MenuHomeFreeBSD

D7043.id18050.diff
No OneTemporary

D7043.id18050.diff

Index: sys/dev/mps/mps_sas.c
===================================================================
--- sys/dev/mps/mps_sas.c
+++ sys/dev/mps/mps_sas.c
@@ -928,6 +928,8 @@
case XPT_PATH_INQ:
{
struct ccb_pathinq *cpi = &ccb->cpi;
+ struct mps_softc *sc = sassc->sc;
+ uint8_t sges_per_frame;
cpi->version_num = 1;
cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16;
@@ -951,12 +953,16 @@
cpi->transport_version = 0;
cpi->protocol = PROTO_SCSI;
cpi->protocol_version = SCSI_REV_SPC;
-#if __FreeBSD_version >= 800001
+
/*
- * XXX KDM where does this number come from?
- */
- cpi->maxio = 256 * 1024;
-#endif
+ * Max IO Size is Page Size * the following:
+ * ((SGEs per frame - 1 for chain element) *
+ * Max Chain Depth) + 1 for no chain needed in last frame
+ */
+ sges_per_frame = ((sc->facts->IOCRequestFrameSize * 4) /
+ sizeof(MPI2_SGE_SIMPLE64)) - 1;
+ cpi->maxio = (sges_per_frame * sc->facts->MaxChainDepth + 1);
+ cpi->maxio *= PAGE_SIZE;
mpssas_set_ccbstatus(ccb, CAM_REQ_CMP);
break;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 2, 4:53 AM (9 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30704732
Default Alt Text
D7043.id18050.diff (1 KB)

Event Timeline