scsi: qla2xxx: Add abort command handling for 29xx series

Extend the abort-IOCB code path to support the 29xx extended
abort_entry_24xx_ext structure alongside the existing abort_entry_24xx.

The two layouts overlay byte-for-byte through req_que_no (offsets 0-17):
entry_status (offset 3), the nport_handle/comp_status union (offset 8),
and options (offset 10) sit at identical positions in both.  After that
they diverge: the 24xx variant carries reserved_1[30], port_id[3], and a
u8 vp_index at offsets 48-51, while the ext variant places a __le16
vp_index at offset 18 and drops port_id.  The drv / fw unions live at
offset 56 in the 24xx layout but offset 24 in ext.

Leverage this overlap by using a single struct abort_entry_24xx * view
for the common header writes (entry_type, count, handle, nport_handle,
handle_to_abort, req_que_no) and completion-status reads (entry_status,
comp_status), branching on IS_QLA29XX() only where the layouts genuinely
diverge:

  - port_id (24xx-only) and vp_index width on the issue path
    (qla24xx_abort_iocb in qla_iocb.c, qla24xx_abort_command in
    qla_mbx.c);

  - drv / fw union access in qla_nvme_abort_set_option /
    qla_nvme_abort_process_comp_status (qla_nvme.c);

  - completion comp_status read in qla24xx_abort_iocb_entry (qla_isr.c)
    is stride-agnostic -- no IS_QLA29XX dispatch needed.

Function signatures in qla_nvme_abort_set_option(),
qla_nvme_abort_process_comp_status(), qla24xx_abort_iocb(), and
qla24xx_abort_iocb_entry() are widened to accept void * so both struct
variants can be passed through.  memset() uses qla_req_entry_size(ha) to
match the ring-slot size.  Response status checking now reads
comp_status instead of nport_handle.  A BUILD_BUG_ON verifies
abort_entry_24xx_ext is 128 bytes.

Signed-off-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260723050413.3897522-34-njavali@marvell.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
Nilesh Javali 2026-07-23 10:33:50 +05:30 • committed by Martin K. Petersen (Oracle)
commit b4126180f7
6 changed files with 120 additions and 52 deletions