git: bc6d368bb8a3 - stable/12 - pms: handle maximum size IO with any alignment
Alexander Motin
mav at FreeBSD.org
Wed Apr 14 00:47:15 UTC 2021
The branch stable/12 has been updated by mav:
URL: https://cgit.FreeBSD.org/src/commit/?id=bc6d368bb8a359c557af200a93f2862f0571d6ea
commit bc6d368bb8a359c557af200a93f2862f0571d6ea
Author: Ryan Libby <rlibby at FreeBSD.org>
AuthorDate: 2021-01-20 21:59:49 +0000
Commit: Alexander Motin <mav at FreeBSD.org>
CommitDate: 2021-04-14 00:46:19 +0000
pms: handle maximum size IO with any alignment
Define the maximum numbers of segments to allow for non-page alignment
at the beginning and end of a maxphys size transfer. Also set
ccb_pathinq.maxio consistent with maxphys.
Reviewed by: imp
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28043
(cherry picked from commit e54a1d5751805714bf6ea5e2e99887388110f9f0)
---
sys/dev/pms/freebsd/driver/ini/src/agdef.h | 2 +-
sys/dev/pms/freebsd/driver/ini/src/agtiapi.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys/dev/pms/freebsd/driver/ini/src/agdef.h b/sys/dev/pms/freebsd/driver/ini/src/agdef.h
index a07d97357fd3..fea7563c8b04 100644
--- a/sys/dev/pms/freebsd/driver/ini/src/agdef.h
+++ b/sys/dev/pms/freebsd/driver/ini/src/agdef.h
@@ -62,7 +62,7 @@ EW 09-17-2004 1.0.0 Constant definitions
#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
index ef7dc19c05ce..8a6865bbccc9 100644
--- a/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
+++ b/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c
@@ -1833,7 +1833,8 @@ static void agtiapi_cam_action( struct cam_sim *sim, union ccb * ccb )
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);
More information about the dev-commits-src-branches
mailing list