From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, John Garry <john.g.garry@oracle.com>,
Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH v2 0/5] Change the return type of the .queuecommand() callback
Date: Thu, 15 Jan 2026 13:03:36 -0800 [thread overview]
Message-ID: <20260115210357.2501991-1-bvanassche@acm.org> (raw)
Hi Martin,
Most but not all .queuecommand() implementations return a SCSI_MLQUEUE_*
constant. This affects code readability: in order to understand what happens
if a .queuecommand() function returns a value that is not a SCSI_MLQUEUE_*
constant, one has to read the scsi_dispatch_cmd() implementation and check
how other values are handled. Hence this patch series that changes the
return type of the .queuecommand() callback and also of the implementations of
this callback.
Please consider this patch series for the next merge window.
Thanks,
Bart.
Changes compared to v1:
* Included conversions for the SCSI drivers that use the DEF_SCSI_QCMD() macro.
* enum scsi_qc_status is now used in the DEF_SCSI_QCMD() implementation.
* Declarations have been ordered from longest to shortest if a declaration is
modified.
* The whitespace in front of "(* queuecommand)(struct Scsi_Host *," has been
removed.
* The patch description of patch 4/4 has been improved by mentioning that (at
the time of this writing) only clang supports -Wimplicit-enum-enum-cast.
* Patches have been included that convert the aha152x, megaraid and
megaraid_sas drivers.
Bart Van Assche (5):
scsi: aha152x: Return SCSI_MLQUEUE_HOST_BUSY instead of 0x2003
scsi: megaraid: Return SCSI_MLQUEUE_HOST_BUSY instead of 1
scsi: megaraid_sas: Return SCSI_MLQUEUE_HOST_BUSY instead of 1
qla2xxx: Declare qla2xxx_mqueuecommand() static
scsi: Change the return type of the .queuecommand() callback
Documentation/scsi/scsi_mid_low_api.rst | 3 ++-
drivers/ata/libata-scsi.c | 8 +++++---
drivers/ata/libata.h | 3 ++-
drivers/firewire/sbp2.c | 7 ++++---
drivers/infiniband/ulp/srp/ib_srp.c | 3 ++-
drivers/message/fusion/mptfc.c | 7 ++++---
drivers/message/fusion/mptsas.c | 4 ++--
drivers/message/fusion/mptscsih.c | 3 +--
drivers/message/fusion/mptscsih.h | 2 +-
drivers/message/fusion/mptspi.c | 4 ++--
drivers/s390/scsi/zfcp_scsi.c | 4 ++--
drivers/scsi/3w-9xxx.c | 2 +-
drivers/scsi/3w-sas.c | 8 +++++---
drivers/scsi/3w-xxxx.c | 2 +-
drivers/scsi/53c700.c | 6 +++---
drivers/scsi/BusLogic.c | 2 +-
drivers/scsi/BusLogic.h | 2 +-
drivers/scsi/NCR5380.c | 4 ++--
drivers/scsi/a100u2w.c | 2 +-
drivers/scsi/aacraid/linit.c | 4 ++--
drivers/scsi/advansys.c | 5 +++--
drivers/scsi/aha152x.c | 8 ++++----
drivers/scsi/aha1542.c | 3 ++-
drivers/scsi/aha1740.c | 2 +-
drivers/scsi/aic7xxx/aic79xx_osm.c | 12 ++++++------
drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ++--
drivers/scsi/arcmsr/arcmsr_hba.c | 5 +++--
drivers/scsi/arm/acornscsi.c | 2 +-
drivers/scsi/arm/fas216.c | 8 ++++----
drivers/scsi/arm/fas216.h | 11 +++++++----
drivers/scsi/atp870u.c | 2 +-
drivers/scsi/bfa/bfad_im.c | 5 +++--
drivers/scsi/bnx2fc/bnx2fc.h | 3 ++-
drivers/scsi/bnx2fc/bnx2fc_io.c | 4 ++--
drivers/scsi/csiostor/csio_scsi.c | 4 ++--
drivers/scsi/dc395x.c | 2 +-
drivers/scsi/esas2r/esas2r.h | 3 ++-
drivers/scsi/esas2r/esas2r_main.c | 3 ++-
drivers/scsi/esp_scsi.c | 2 +-
drivers/scsi/fdomain.c | 3 ++-
drivers/scsi/fnic/fnic.h | 3 ++-
drivers/scsi/fnic/fnic_scsi.c | 3 ++-
drivers/scsi/hpsa.c | 6 ++++--
drivers/scsi/hptiop.c | 2 +-
drivers/scsi/ibmvscsi/ibmvfc.c | 3 ++-
drivers/scsi/ibmvscsi/ibmvscsi.c | 9 +++++----
drivers/scsi/imm.c | 2 +-
drivers/scsi/initio.c | 2 +-
drivers/scsi/ipr.c | 4 ++--
drivers/scsi/ips.c | 4 ++--
drivers/scsi/libfc/fc_fcp.c | 3 ++-
drivers/scsi/libiscsi.c | 3 ++-
drivers/scsi/libsas/sas_scsi_host.c | 3 ++-
drivers/scsi/lpfc/lpfc_scsi.c | 8 ++++----
drivers/scsi/mac53c94.c | 2 +-
drivers/scsi/megaraid.c | 17 +++++++++--------
drivers/scsi/megaraid.h | 6 ++++--
drivers/scsi/megaraid/megaraid_mbox.c | 22 ++++++++++++----------
drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++--
drivers/scsi/mesh.c | 2 +-
drivers/scsi/mpi3mr/mpi3mr_os.c | 4 ++--
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++--
drivers/scsi/mvumi.c | 4 ++--
drivers/scsi/myrb.c | 12 ++++++------
drivers/scsi/myrs.c | 4 ++--
drivers/scsi/ncr53c8xx.c | 2 +-
drivers/scsi/nsp32.c | 5 +++--
drivers/scsi/pcmcia/nsp_cs.c | 2 +-
drivers/scsi/pcmcia/nsp_cs.h | 3 ++-
drivers/scsi/pcmcia/sym53c500_cs.c | 2 +-
drivers/scsi/pmcraid.c | 4 ++--
drivers/scsi/ppa.c | 2 +-
drivers/scsi/ps3rom.c | 2 +-
drivers/scsi/qedf/qedf.h | 4 ++--
drivers/scsi/qedf/qedf_io.c | 4 ++--
drivers/scsi/qla1280.c | 16 ++++++++--------
drivers/scsi/qla2xxx/qla_os.c | 13 +++++++------
drivers/scsi/qla4xxx/ql4_os.c | 6 ++++--
drivers/scsi/qlogicfas408.c | 2 +-
drivers/scsi/qlogicfas408.h | 3 ++-
drivers/scsi/qlogicpti.c | 2 +-
drivers/scsi/scsi_debug.c | 9 +++++----
drivers/scsi/smartpqi/smartpqi_init.c | 3 ++-
drivers/scsi/snic/snic.h | 3 ++-
drivers/scsi/snic/snic_scsi.c | 4 ++--
drivers/scsi/stex.c | 2 +-
drivers/scsi/storvsc_drv.c | 3 ++-
drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +-
drivers/scsi/virtio_scsi.c | 4 ++--
drivers/scsi/vmw_pvscsi.c | 2 +-
drivers/scsi/wd33c93.c | 2 +-
drivers/scsi/wd33c93.h | 3 ++-
drivers/scsi/wd719x.c | 3 ++-
drivers/scsi/xen-scsifront.c | 4 ++--
drivers/target/loopback/tcm_loop.c | 3 ++-
drivers/ufs/core/ufshcd.c | 7 ++++---
drivers/usb/image/microtek.c | 6 +++---
drivers/usb/storage/scsiglue.c | 2 +-
drivers/usb/storage/uas.c | 2 +-
include/linux/libata.h | 3 ++-
include/scsi/libfc.h | 3 ++-
include/scsi/libiscsi.h | 3 ++-
include/scsi/libsas.h | 3 ++-
include/scsi/scsi_host.h | 12 ++++++++----
104 files changed, 261 insertions(+), 206 deletions(-)
next reply other threads:[~2026-01-15 21:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 21:03 Bart Van Assche [this message]
2026-01-15 21:03 ` [PATCH v2 1/5] scsi: aha152x: Return SCSI_MLQUEUE_HOST_BUSY instead of 0x2003 Bart Van Assche
2026-01-16 11:38 ` John Garry
2026-01-15 21:03 ` [PATCH v2 2/5] scsi: megaraid: Return SCSI_MLQUEUE_HOST_BUSY instead of 1 Bart Van Assche
2026-01-16 11:39 ` John Garry
2026-01-16 16:52 ` Bart Van Assche
2026-01-20 18:20 ` John Garry
2026-01-15 21:03 ` [PATCH v2 3/5] scsi: megaraid_sas: " Bart Van Assche
2026-01-15 21:03 ` [PATCH v2 4/5] qla2xxx: Declare qla2xxx_mqueuecommand() static Bart Van Assche
2026-01-16 11:40 ` John Garry
2026-01-15 21:03 ` [PATCH v2 5/5] scsi: Change the return type of the .queuecommand() callback Bart Van Assche
2026-01-17 4:32 ` [PATCH v2 0/5] " Martin K. Petersen
2026-01-20 18:00 ` Bart Van Assche
2026-01-24 2:53 ` Martin K. Petersen
2026-02-04 3:52 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260115210357.2501991-1-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=john.g.garry@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox