Date: Wed, 20 Jan 2021 22:00:39 GMT From: Ryan Libby <rlibby@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e54a1d575180 - main - pms: handle maximum size IO with any alignment Message-ID: <202101202200.10KM0dDU088097@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=e54a1d5751805714bf6ea5e2e99887388110f9f0 commit e54a1d5751805714bf6ea5e2e99887388110f9f0 Author: Ryan Libby <rlibby@FreeBSD.org> AuthorDate: 2021-01-20 21:59:49 +0000 Commit: Ryan Libby <rlibby@FreeBSD.org> CommitDate: 2021-01-20 21:59:49 +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 --- 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 cabcafc1819c..4c2ba2867f5f 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 7738e1216907..69f488c4199b 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101202200.10KM0dDU088097>