[PATCH 05/33] scsi: qla2xxx: Clarify MPI optrom address/length units
Nilesh Javali <[email protected]> Thu, 30 Jul 2026 21:28:10 +0530
| Newsgroups | org.kernel.vger.linux-scsi |
|---|---|
| Message-ID | <[email protected]> |
The kdoc for qla29xx_mpi_optrom_data() described @offset as an "Offset into the device memory", which reads like a byte address and invites confusion with the per-chunk word-granular address advance in the transfer loop. MBC_LOAD_DUMP_MPI_RAM is word-addressed: @offset is an MPI RAM address in 32-bit words, and @length is a byte count that is converted internally to a word count. Document this to reflect the existing behavior. No functional change. Reported-by: Sashiko <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> --- drivers/scsi/qla2xxx/qla_sup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 2e5fde403442..56ef2b4c7c26 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -560,8 +560,9 @@ static void set_chunk_mpi_bits(uint16_t *options, int count, int total) * @vha: Pointer to SCSI QLogic host structure. * @opts: Options for the operation. * @buf: Buffer to read from/write to. - * @offset: Offset into the device memory. - * @length: Length of data, in bytes. + * @offset: MPI RAM address, in 32-bit words (MBC_LOAD_DUMP_MPI_RAM is + * word-addressed; not a byte offset). + * @length: Length of data, in bytes (converted internally to a word count). * @op: Operation, either QLA29XX_MPI_OP_DUMP or QLA29XX_MPI_OP_LOAD. * * Returns: -- 2.47.3