Page MenuHomeFreeBSD

D28043.diff
No OneTemporary

D28043.diff

diff --git a/sys/dev/pms/freebsd/driver/ini/src/agdef.h b/sys/dev/pms/freebsd/driver/ini/src/agdef.h
--- a/sys/dev/pms/freebsd/driver/ini/src/agdef.h
+++ b/sys/dev/pms/freebsd/driver/ini/src/agdef.h
@@ -62,7 +62,7 @@
#define AGTIAPI_MAX_DEVICE_7H 256 /*Max devices per channel in 7H */
#define AGTIAPI_MAX_DEVICE_8H 512 /*Max devices per channel in 8H*/
#define AGTIAPI_MAX_CAM_Q_DEPTH 1024
-#define AGTIAPI_NSEGS (maxphys / PAGE_SIZE)
+#define AGTIAPI_NSEGS (btoc(maxphys) + 1)
/*
** Adapter specific defines
*/
diff --git a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
--- a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
+++ b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
@@ -1833,7 +1833,8 @@
cpi->hba_eng_cnt = 0;
cpi->max_target = maxTargets - 1;
cpi->max_lun = AGTIAPI_MAX_LUN;
- cpi->maxio = 1024 *1024; /* Max supported I/O size, in bytes. */
+ /* Max supported I/O size, in bytes. */
+ cpi->maxio = ulmin(1024 * 1024, maxphys);
cpi->initiator_id = 255;
strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
strlcpy(cpi->hba_vid, "PMC", HBA_IDLEN);

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 16, 4:59 PM (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15827470
Default Alt Text
D28043.diff (1 KB)

Event Timeline