From 2148ffafdb0b94e382b6457ab062673cfd41b7ad Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Mon, 19 Oct 2026 16:46:13 +0300 Subject: [PATCH] qla2x00t-32gbit: Use 64-bit max LUNs when supported The Linux 3.10 backport selected uint unconditionally for ql2xmaxlun, limiting the module parameter to 32 bits even on current kernels. Select uint only when param_check_ullong is absent from the kernel's module parameter API. Otherwise retain the upstream uint64_t/ullong type. Use the same feature check for the extern declaration so all driver translation units agree, including vendor kernels with this API backported. The default value and existing 16-bit limit for older HBAs are unchanged. --- qla2x00t-32gbit/qla_gbl.h | 2 +- qla2x00t-32gbit/qla_os.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qla2x00t-32gbit/qla_gbl.h b/qla2x00t-32gbit/qla_gbl.h index ccd6497e6..d6f4faad3 100644 --- a/qla2x00t-32gbit/qla_gbl.h +++ b/qla2x00t-32gbit/qla_gbl.h @@ -176,7 +176,7 @@ extern int ql2xgffidenable; extern int ql2xenabledif; extern int ql2xenablehba_err_chk; extern int ql2xdontresethba; -#if 1 +#ifndef param_check_ullong extern uint ql2xmaxlun; #else extern uint64_t ql2xmaxlun; diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index fd81b9e11..4d7d2a33c 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -243,7 +243,8 @@ MODULE_PARM_DESC(ql2xdontresethba, " 0 (Default) -- Reset on failure.\n" " 1 -- Do not reset on failure.\n"); -#if 1 +/* Older kernels may lack the ullong module parameter type. */ +#ifndef param_check_ullong uint ql2xmaxlun = MAX_LUNS; module_param(ql2xmaxlun, uint, S_IRUGO); #else