SCSI misc on 20260212

Usual driver updates (qla2xxx, mpi3mr, mpt3sas, ufs) plus assorted
 cleanups and fixes.  The biggest core change is the massive code
 motion in the sd driver to remove forward declarations and the most
 significant change is to enumify the queuecommand return.
 
 Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 
 iLgEABMIAGAWIQTnYEDbdso9F2cI+arnQslM7pishQUCaY4ljBsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMSwyLDImHGphbWVzLmJvdHRvbWxleUBoYW5zZW5wYXJ0bmVy
 c2hpcC5jb20ACgkQ50LJTO6YrIWFlwEAr9nc1ntxH4UNPgFCVjKyAOa5IE+p5o5C
 2lwQIufcihEBAORvI9KO6AoEK6v9TmMKZXoyVsDRFe79fQE5NwCjfAA3
 =My8f
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "Usual driver updates (qla2xxx, mpi3mr, mpt3sas, ufs) plus assorted
  cleanups and fixes.

  The biggest core change is the massive code motion in the sd driver to
  remove forward declarations and the most significant change is to
  enumify the queuecommand return"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (78 commits)
  scsi: csiostor: Fix dereference of null pointer rn
  scsi: buslogic: Reduce stack usage
  scsi: ufs: host: mediatek: Require CONFIG_PM
  scsi: ufs: mediatek: Fix page faults in ufs_mtk_clk_scale() trace event
  scsi: smartpqi: Fix memory leak in pqi_report_phys_luns()
  scsi: mpi3mr: Make driver probing asynchronous
  scsi: ufs: core: Flush exception handling work when RPM level is zero
  scsi: efct: Use IRQF_ONESHOT and default primary handler
  scsi: ufs: core: Use a host-wide tagset in SDB mode
  scsi: qla2xxx: target: Add WQ_PERCPU to alloc_workqueue() users
  scsi: qla2xxx: Add WQ_PERCPU to alloc_workqueue() users
  scsi: qla4xxx: Add WQ_PERCPU to alloc_workqueue() users
  scsi: mpi3mr: Driver version update to 8.17.0.3.50
  scsi: mpi3mr: Fixed the W=1 compilation warning
  scsi: mpi3mr: Record and report controller firmware faults
  scsi: mpi3mr: Update MPI Headers to revision 39
  scsi: mpi3mr: Use negotiated link rate from DevicePage0
  scsi: mpi3mr: Avoid redundant diag-fault resets
  scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context
  scsi: mpi3mr: Add module parameter to control threaded IRQ polling
  ...
This commit is contained in:
Linus Torvalds 2026-02-12 15:43:02 -08:00
commit d4a379a52c
176 changed files with 3616 additions and 767 deletions

View file

@ -0,0 +1,56 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/ufs/qcom,sa8255p-ufshc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm SA8255P UFS Host Controller
maintainers:
- Ram Kumar Dwivedi <ram.dwivedi@oss.qualcomm.com>
properties:
compatible:
const: qcom,sa8255p-ufshc
reg:
maxItems: 1
interrupts:
maxItems: 1
iommus:
maxItems: 1
dma-coherent: true
power-domains:
maxItems: 1
required:
- compatible
- reg
- interrupts
- power-domains
- iommus
- dma-coherent
allOf:
- $ref: ufs-common.yaml
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
ufshc@1d84000 {
compatible = "qcom,sa8255p-ufshc";
reg = <0x01d84000 0x3000>;
interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
lanes-per-direction = <2>;
iommus = <&apps_smmu 0x100 0x0>;
power-domains = <&scmi3_pd 0>;
dma-coherent;
};

View file

@ -903,7 +903,8 @@ Details::
*
* Defined in: LLD
**/
int queuecommand(struct Scsi_Host *shost, struct scsi_cmnd * scp)
enum scsi_qc_status queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scp)
/**

View file

@ -27063,7 +27063,7 @@ M: Manivannan Sadhasivam <mani@kernel.org>
L: linux-arm-msm@vger.kernel.org
L: linux-scsi@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
F: Documentation/devicetree/bindings/ufs/qcom*
F: drivers/ufs/host/ufs-qcom*
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER RENESAS HOOKS

View file

@ -4309,7 +4309,8 @@ static inline ata_xlat_func_t ata_get_xlat_func(struct ata_device *dev, u8 cmd)
return NULL;
}
int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev)
enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
struct ata_device *dev)
{
struct ata_port *ap = dev->link->ap;
u8 scsi_op = scmd->cmnd[0];
@ -4383,12 +4384,13 @@ int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev)
* Return value from __ata_scsi_queuecmd() if @cmd can be queued,
* 0 otherwise.
*/
int ata_scsi_queuecmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
enum scsi_qc_status ata_scsi_queuecmd(struct Scsi_Host *shost,
struct scsi_cmnd *cmd)
{
struct ata_port *ap;
struct ata_device *dev;
struct scsi_device *scsidev = cmd->device;
int rc = 0;
enum scsi_qc_status rc = 0;
unsigned long irq_flags;
ap = ata_shost_to_port(shost);

View file

@ -164,7 +164,8 @@ extern int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
void ata_scsi_sdev_config(struct scsi_device *sdev);
int ata_scsi_dev_config(struct scsi_device *sdev, struct queue_limits *lim,
struct ata_device *dev);
int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, struct ata_device *dev);
enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
struct ata_device *dev);
/* libata-eh.c */
extern unsigned int ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);

View file

@ -165,6 +165,12 @@ static int transport_add_class_device(struct attribute_container *cont,
goto err_del;
}
if (tcont->encryption) {
error = sysfs_create_group(&classdev->kobj, tcont->encryption);
if (error)
goto err_del;
}
return 0;
err_del:
@ -240,6 +246,8 @@ static int transport_remove_classdev(struct attribute_container *cont,
if (tclass->remove != anon_transport_dummy_function) {
if (tcont->statistics)
sysfs_remove_group(&classdev->kobj, tcont->statistics);
if (tcont->encryption)
sysfs_remove_group(&classdev->kobj, tcont->encryption);
attribute_container_class_device_del(classdev);
}

View file

@ -1440,13 +1440,14 @@ static int sbp2_map_scatterlist(struct sbp2_command_orb *orb,
/* SCSI stack integration */
static int sbp2_scsi_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *cmd)
static enum scsi_qc_status sbp2_scsi_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *cmd)
{
struct sbp2_logical_unit *lu = cmd->device->hostdata;
struct fw_device *device = target_parent_device(lu->tgt);
enum scsi_qc_status retval = SCSI_MLQUEUE_HOST_BUSY;
struct sbp2_command_orb *orb;
int generation, retval = SCSI_MLQUEUE_HOST_BUSY;
int generation;
orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
if (orb == NULL)

View file

@ -2149,7 +2149,8 @@ static void srp_handle_qp_err(struct ib_cq *cq, struct ib_wc *wc,
target->qp_in_error = true;
}
static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd)
static enum scsi_qc_status srp_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmnd)
{
struct request *rq = scsi_cmd_to_rq(scmnd);
struct srp_target_port *target = host_to_target(shost);

View file

@ -97,7 +97,8 @@ static u8 mptfcInternalCtx = MPT_MAX_PROTOCOL_DRIVERS;
static int mptfc_target_alloc(struct scsi_target *starget);
static int mptfc_sdev_init(struct scsi_device *sdev);
static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt);
static enum scsi_qc_status mptfc_qcmd(struct Scsi_Host *shost,
struct scsi_cmnd *SCpnt);
static void mptfc_target_destroy(struct scsi_target *starget);
static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout);
static void mptfc_remove(struct pci_dev *pdev);
@ -676,8 +677,8 @@ mptfc_sdev_init(struct scsi_device *sdev)
return 0;
}
static int
mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
static enum scsi_qc_status mptfc_qcmd(struct Scsi_Host *shost,
struct scsi_cmnd *SCpnt)
{
struct mptfc_rport_info *ri;
struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device));

View file

@ -1920,8 +1920,8 @@ mptsas_sdev_init(struct scsi_device *sdev)
return 0;
}
static int
mptsas_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
static enum scsi_qc_status mptsas_qcmd(struct Scsi_Host *shost,
struct scsi_cmnd *SCpnt)
{
MPT_SCSI_HOST *hd;
MPT_ADAPTER *ioc;

View file

@ -1309,8 +1309,7 @@ int mptscsih_show_info(struct seq_file *m, struct Scsi_Host *host)
*
* Returns 0. (rtn value discarded by linux scsi mid-layer)
*/
int
mptscsih_qcmd(struct scsi_cmnd *SCpnt)
enum scsi_qc_status mptscsih_qcmd(struct scsi_cmnd *SCpnt)
{
MPT_SCSI_HOST *hd;
MPT_FRAME_HDR *mf;

View file

@ -113,7 +113,7 @@ extern int mptscsih_resume(struct pci_dev *pdev);
#endif
extern int mptscsih_show_info(struct seq_file *, struct Scsi_Host *);
extern const char * mptscsih_info(struct Scsi_Host *SChost);
extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt);
extern enum scsi_qc_status mptscsih_qcmd(struct scsi_cmnd *SCpnt);
extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel,
u8 id, u64 lun, int ctx2abort, ulong timeout);
extern void mptscsih_sdev_destroy(struct scsi_device *device);

View file

@ -774,8 +774,8 @@ static int mptspi_sdev_configure(struct scsi_device *sdev,
return 0;
}
static int
mptspi_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt)
static enum scsi_qc_status mptspi_qcmd(struct Scsi_Host *shost,
struct scsi_cmnd *SCpnt)
{
struct _MPT_SCSI_HOST *hd = shost_priv(shost);
VirtDevice *vdevice = SCpnt->device->hostdata;

View file

@ -63,8 +63,8 @@ static void zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result)
scsi_done(scpnt);
}
static
int zfcp_scsi_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scpnt)
static enum scsi_qc_status zfcp_scsi_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scpnt)
{
struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scpnt->device);
struct fc_rport *rport = starget_to_rport(scsi_target(scpnt->device));

View file

@ -1746,7 +1746,7 @@ out:
} /* End twa_scsi_eh_reset() */
/* This is the main scsi queue function to handle scsi opcodes */
static int twa_scsi_queue_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status twa_scsi_queue_lck(struct scsi_cmnd *SCpnt)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
int request_id, retval;

View file

@ -1453,11 +1453,13 @@ out:
} /* End twl_scsi_eh_reset() */
/* This is the main scsi queue function to handle scsi opcodes */
static int twl_scsi_queue_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status twl_scsi_queue_lck(struct scsi_cmnd *SCpnt)
{
TW_Device_Extension *tw_dev =
(TW_Device_Extension *)SCpnt->device->host->hostdata;
void (*done)(struct scsi_cmnd *) = scsi_done;
int request_id, retval;
TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;
enum scsi_qc_status retval;
int request_id;
/* If we are resetting due to timed out ioctl, report as busy */
if (test_bit(TW_IN_RESET, &tw_dev->flags)) {

View file

@ -1920,7 +1920,7 @@ static int tw_scsiop_test_unit_ready_complete(TW_Device_Extension *tw_dev, int r
} /* End tw_scsiop_test_unit_ready_complete() */
/* This is the main scsi queue function to handle scsi opcodes */
static int tw_scsi_queue_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status tw_scsi_queue_lck(struct scsi_cmnd *SCpnt)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
unsigned char *command = SCpnt->cmnd;

View file

@ -152,8 +152,8 @@ MODULE_LICENSE("GPL");
/* This is the script */
#include "53c700_d.h"
STATIC int NCR_700_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *);
STATIC enum scsi_qc_status NCR_700_queuecommand(struct Scsi_Host *h,
struct scsi_cmnd *);
STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt);
STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt);
STATIC void NCR_700_chip_setup(struct Scsi_Host *host);
@ -1751,7 +1751,7 @@ NCR_700_intr(int irq, void *dev_id)
return IRQ_RETVAL(handled);
}
static int NCR_700_queuecommand_lck(struct scsi_cmnd *SCp)
static enum scsi_qc_status NCR_700_queuecommand_lck(struct scsi_cmnd *SCp)
{
struct NCR_700_Host_Parameters *hostdata =
(struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];

View file

@ -920,7 +920,8 @@ static int __init blogic_init_fp_probeinfo(struct blogic_adapter *adapter)
a particular probe order.
*/
static void __init blogic_init_probeinfo_list(struct blogic_adapter *adapter)
static noinline_for_stack void __init
blogic_init_probeinfo_list(struct blogic_adapter *adapter)
{
/*
If a PCI BIOS is present, interrogate it for MultiMaster and
@ -1690,7 +1691,8 @@ common:
blogic_reportconfig reports the configuration of Host Adapter.
*/
static bool __init blogic_reportconfig(struct blogic_adapter *adapter)
static noinline_for_stack bool __init
blogic_reportconfig(struct blogic_adapter *adapter)
{
unsigned short alltgt_mask = (1 << adapter->maxdev) - 1;
unsigned short sync_ok, fast_ok;
@ -2877,7 +2879,7 @@ static int blogic_hostreset(struct scsi_cmnd *SCpnt)
Outgoing Mailbox for execution by the associated Host Adapter.
*/
static int blogic_qcmd_lck(struct scsi_cmnd *command)
static enum scsi_qc_status blogic_qcmd_lck(struct scsi_cmnd *command)
{
void (*comp_cb)(struct scsi_cmnd *) = scsi_done;
struct blogic_adapter *adapter =

View file

@ -1272,7 +1272,8 @@ static inline void blogic_incszbucket(unsigned int *cmdsz_buckets,
*/
static const char *blogic_drvr_info(struct Scsi_Host *);
static int blogic_qcmd(struct Scsi_Host *h, struct scsi_cmnd *);
static enum scsi_qc_status blogic_qcmd(struct Scsi_Host *h,
struct scsi_cmnd *command);
static int blogic_diskparam(struct scsi_device *, struct gendisk *, sector_t, int *);
static int blogic_sdev_configure(struct scsi_device *,
struct queue_limits *lim);

View file

@ -555,8 +555,8 @@ static void complete_cmd(struct Scsi_Host *instance,
* main coroutine is not running, it is restarted.
*/
static int NCR5380_queue_command(struct Scsi_Host *instance,
struct scsi_cmnd *cmd)
static enum scsi_qc_status NCR5380_queue_command(struct Scsi_Host *instance,
struct scsi_cmnd *cmd)
{
struct NCR5380_hostdata *hostdata = shost_priv(instance);
struct NCR5380_cmd *ncmd = NCR5380_to_ncmd(cmd);

View file

@ -909,7 +909,7 @@ static int inia100_build_scb(struct orc_host * host, struct orc_scb * scb, struc
* block, build the host specific scb structures and if there is room
* queue the command down to the controller
*/
static int inia100_queue_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status inia100_queue_lck(struct scsi_cmnd *cmd)
{
struct orc_scb *scb;
struct orc_host *host; /* Point to Host adapter control block */

View file

@ -237,8 +237,8 @@ static struct aac_driver_ident aac_drivers[] = {
* TODO: unify with aac_scsi_cmd().
*/
static int aac_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *cmd)
static enum scsi_qc_status aac_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *cmd)
{
aac_priv(cmd)->owner = AAC_OWNER_LOWLEVEL;

View file

@ -8462,10 +8462,11 @@ static int asc_execute_scsi_cmnd(struct scsi_cmnd *scp)
* This function always returns 0. Command return status is saved
* in the 'scp' result field.
*/
static int advansys_queuecommand_lck(struct scsi_cmnd *scp)
static enum scsi_qc_status advansys_queuecommand_lck(struct scsi_cmnd *scp)
{
struct Scsi_Host *shost = scp->device->host;
int asc_res, result = 0;
enum scsi_qc_status result = 0;
int asc_res;
ASC_STATS(shost, queuecommand);

View file

@ -924,7 +924,7 @@ static int setup_expected_interrupts(struct Scsi_Host *shpnt)
/*
* Queue a command and setup interrupts for a free bus.
*/
static int aha152x_internal_queue(struct scsi_cmnd *SCpnt,
static enum scsi_qc_status aha152x_internal_queue(struct scsi_cmnd *SCpnt,
struct completion *complete, int phase)
{
struct aha152x_cmd_priv *acp = aha152x_priv(SCpnt);
@ -939,13 +939,13 @@ static int aha152x_internal_queue(struct scsi_cmnd *SCpnt,
if (acp->phase & (resetting | check_condition)) {
if (!SCpnt->host_scribble || SCSEM(SCpnt) || SCNEXT(SCpnt)) {
scmd_printk(KERN_ERR, SCpnt, "cannot reuse command\n");
return FAILED;
return SCSI_MLQUEUE_HOST_BUSY;
}
} else {
SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
if(!SCpnt->host_scribble) {
scmd_printk(KERN_ERR, SCpnt, "allocation failed\n");
return FAILED;
return SCSI_MLQUEUE_HOST_BUSY;
}
}
@ -995,7 +995,7 @@ static int aha152x_internal_queue(struct scsi_cmnd *SCpnt,
* queue a command
*
*/
static int aha152x_queue_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status aha152x_queue_lck(struct scsi_cmnd *SCpnt)
{
return aha152x_internal_queue(SCpnt, NULL, 0);
}

View file

@ -411,7 +411,8 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
}
}
static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
static enum scsi_qc_status aha1542_queuecommand(struct Scsi_Host *sh,
struct scsi_cmnd *cmd)
{
struct aha1542_cmd *acmd = scsi_cmd_priv(cmd);
struct aha1542_hostdata *aha1542 = shost_priv(sh);

View file

@ -319,7 +319,7 @@ static irqreturn_t aha1740_intr_handle(int irq, void *dev_id)
return IRQ_RETVAL(handled);
}
static int aha1740_queuecommand_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status aha1740_queuecommand_lck(struct scsi_cmnd *SCpnt)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
unchar direction;

View file

@ -359,7 +359,7 @@ static void ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd);
static u_int ahd_linux_user_tagdepth(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo);
static void ahd_linux_device_queue_depth(struct scsi_device *);
static int ahd_linux_run_command(struct ahd_softc*,
static enum scsi_qc_status ahd_linux_run_command(struct ahd_softc*,
struct ahd_linux_device *,
struct scsi_cmnd *);
static void ahd_linux_setup_tag_info_global(char *p);
@ -577,11 +577,11 @@ ahd_linux_info(struct Scsi_Host *host)
/*
* Queue an SCB to the controller.
*/
static int ahd_linux_queue_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status ahd_linux_queue_lck(struct scsi_cmnd *cmd)
{
struct ahd_softc *ahd;
struct ahd_linux_device *dev = scsi_transport_device_data(cmd->device);
int rtn = SCSI_MLQUEUE_HOST_BUSY;
struct ahd_linux_device *dev = scsi_transport_device_data(cmd->device);
enum scsi_qc_status rtn = SCSI_MLQUEUE_HOST_BUSY;
struct ahd_softc *ahd;
ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
@ -1535,7 +1535,7 @@ ahd_linux_device_queue_depth(struct scsi_device *sdev)
}
}
static int
static enum scsi_qc_status
ahd_linux_run_command(struct ahd_softc *ahd, struct ahd_linux_device *dev,
struct scsi_cmnd *cmd)
{

View file

@ -519,11 +519,11 @@ ahc_linux_info(struct Scsi_Host *host)
/*
* Queue an SCB to the controller.
*/
static int ahc_linux_queue_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status ahc_linux_queue_lck(struct scsi_cmnd *cmd)
{
struct ahc_softc *ahc;
struct ahc_linux_device *dev = scsi_transport_device_data(cmd->device);
int rtn = SCSI_MLQUEUE_HOST_BUSY;
enum scsi_qc_status rtn = SCSI_MLQUEUE_HOST_BUSY;
unsigned long flags;
ahc = *(struct ahc_softc **)cmd->device->host->hostdata;

View file

@ -113,7 +113,8 @@ static int arcmsr_abort(struct scsi_cmnd *);
static int arcmsr_bus_reset(struct scsi_cmnd *);
static int arcmsr_bios_param(struct scsi_device *sdev,
struct gendisk *disk, sector_t capacity, int *info);
static int arcmsr_queue_command(struct Scsi_Host *h, struct scsi_cmnd *cmd);
static enum scsi_qc_status arcmsr_queue_command(struct Scsi_Host *h,
struct scsi_cmnd *cmd);
static int arcmsr_probe(struct pci_dev *pdev,
const struct pci_device_id *id);
static int __maybe_unused arcmsr_suspend(struct device *dev);
@ -3312,7 +3313,7 @@ static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb,
}
}
static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status arcmsr_queue_command_lck(struct scsi_cmnd *cmd)
{
struct Scsi_Host *host = cmd->device->host;
struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata;

View file

@ -2408,7 +2408,7 @@ acornscsi_intr(int irq, void *dev_id)
* Params : cmd - SCSI command
* Returns : 0, or < 0 on error.
*/
static int acornscsi_queuecmd_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status acornscsi_queuecmd_lck(struct scsi_cmnd *SCpnt)
{
struct scsi_pointer *scsi_pointer = arm_scsi_pointer(SCpnt);
void (*done)(struct scsi_cmnd *) = scsi_done;

View file

@ -2202,11 +2202,12 @@ no_command:
* Returns: 0 on success, else error.
* Notes: io_request_lock is held, interrupts are disabled.
*/
static int fas216_queue_command_internal(struct scsi_cmnd *SCpnt,
void (*done)(struct scsi_cmnd *))
static enum scsi_qc_status
fas216_queue_command_internal(struct scsi_cmnd *SCpnt,
void (*done)(struct scsi_cmnd *))
{
FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata;
int result;
enum scsi_qc_status result;
fas216_checkmagic(info);
@ -2243,7 +2244,7 @@ static int fas216_queue_command_internal(struct scsi_cmnd *SCpnt,
return result;
}
static int fas216_queue_command_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status fas216_queue_command_lck(struct scsi_cmnd *SCpnt)
{
return fas216_queue_command_internal(SCpnt, scsi_done);
}
@ -2273,7 +2274,7 @@ static void fas216_internal_done(struct scsi_cmnd *SCpnt)
* Returns: scsi result code.
* Notes: io_request_lock is held, interrupts are disabled.
*/
static int fas216_noqueue_command_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status fas216_noqueue_command_lck(struct scsi_cmnd *SCpnt)
{
FAS216_Info *info = (FAS216_Info *)SCpnt->device->host->hostdata;

View file

@ -338,21 +338,24 @@ extern int fas216_init (struct Scsi_Host *instance);
*/
extern int fas216_add (struct Scsi_Host *instance, struct device *dev);
/* Function: int fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt)
/* Function: enum scsi_qc_status fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt)
* Purpose : queue a command for adapter to process.
* Params : h - host adapter
* : SCpnt - Command to queue
* Returns : 0 - success, else error
*/
extern int fas216_queue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt);
extern enum scsi_qc_status fas216_queue_command(struct Scsi_Host *h,
struct scsi_cmnd *SCpnt);
/* Function: int fas216_noqueue_command(struct Scsi_Host *h, struct scsi_cmnd *SCpnt)
/* Function: enum scsi_qc_status fas216_noqueue_command(struct Scsi_Host *h,
* struct scsi_cmnd *SCpnt)
* Purpose : queue a command for adapter to process, and process it to completion.
* Params : h - host adapter
* : SCpnt - Command to queue
* Returns : 0 - success, else error
*/
extern int fas216_noqueue_command(struct Scsi_Host *, struct scsi_cmnd *);
extern enum scsi_qc_status fas216_noqueue_command(struct Scsi_Host *h,
struct scsi_cmnd *SCpnt);
/* Function: irqreturn_t fas216_intr (FAS216_Info *info)
* Purpose : handle interrupts from the interface to progress a command

View file

@ -617,7 +617,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
*
* Queue a command to the ATP queue. Called with the host lock held.
*/
static int atp870u_queuecommand_lck(struct scsi_cmnd *req_p)
static enum scsi_qc_status atp870u_queuecommand_lck(struct scsi_cmnd *req_p)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
unsigned char c;

View file

@ -24,7 +24,8 @@ DEFINE_IDR(bfad_im_port_index);
struct scsi_transport_template *bfad_im_scsi_transport_template;
struct scsi_transport_template *bfad_im_scsi_vport_transport_template;
static void bfad_im_itnim_work_handler(struct work_struct *work);
static int bfad_im_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *cmnd);
static enum scsi_qc_status bfad_im_queuecommand(struct Scsi_Host *h,
struct scsi_cmnd *cmnd);
static int bfad_im_sdev_init(struct scsi_device *sdev);
static void bfad_im_fc_rport_add(struct bfad_im_port_s *im_port,
struct bfad_itnim_s *itnim);
@ -1199,7 +1200,7 @@ bfad_im_itnim_work_handler(struct work_struct *work)
/*
* Scsi_Host template entry, queue a SCSI command to the BFAD.
*/
static int bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd)
static enum scsi_qc_status bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
struct bfad_im_port_s *im_port =

View file

@ -498,7 +498,8 @@ static inline struct bnx2fc_priv *bnx2fc_priv(struct scsi_cmnd *cmd)
struct bnx2fc_cmd *bnx2fc_cmd_alloc(struct bnx2fc_rport *tgt);
struct bnx2fc_cmd *bnx2fc_elstm_alloc(struct bnx2fc_rport *tgt, int type);
void bnx2fc_cmd_release(struct kref *ref);
int bnx2fc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd);
enum scsi_qc_status bnx2fc_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *sc_cmd);
int bnx2fc_send_fw_fcoe_init_msg(struct bnx2fc_hba *hba);
int bnx2fc_send_fw_fcoe_destroy_msg(struct bnx2fc_hba *hba);
int bnx2fc_send_session_ofld_req(struct fcoe_port *port,

View file

@ -1836,8 +1836,8 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,
*
* This is the IO strategy routine, called by SCSI-ML
**/
int bnx2fc_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *sc_cmd)
enum scsi_qc_status bnx2fc_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *sc_cmd)
{
struct fc_lport *lport = shost_priv(host);
struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));

View file

@ -894,9 +894,9 @@ static long ch_ioctl(struct file *file,
/* ------------------------------------------------------------------------ */
static int ch_probe(struct device *dev)
static int ch_probe(struct scsi_device *sd)
{
struct scsi_device *sd = to_scsi_device(dev);
struct device *dev = &sd->sdev_gendev;
struct device *class_dev;
int ret;
scsi_changer *ch;
@ -967,8 +967,9 @@ free_ch:
return ret;
}
static int ch_remove(struct device *dev)
static void ch_remove(struct scsi_device *sd)
{
struct device *dev = &sd->sdev_gendev;
scsi_changer *ch = dev_get_drvdata(dev);
spin_lock(&ch_index_lock);
@ -979,15 +980,14 @@ static int ch_remove(struct device *dev)
device_destroy(&ch_sysfs_class, MKDEV(SCSI_CHANGER_MAJOR, ch->minor));
scsi_device_put(ch->device);
kref_put(&ch->ref, ch_destroy);
return 0;
}
static struct scsi_driver ch_template = {
.gendrv = {
.probe = ch_probe,
.remove = ch_remove,
.gendrv = {
.name = "ch",
.owner = THIS_MODULE,
.probe = ch_probe,
.remove = ch_remove,
},
};
@ -1014,7 +1014,7 @@ static int __init init_ch_module(void)
SCSI_CHANGER_MAJOR);
goto fail1;
}
rc = scsi_register_driver(&ch_template.gendrv);
rc = scsi_register_driver(&ch_template);
if (rc < 0)
goto fail2;
return 0;
@ -1028,7 +1028,7 @@ static int __init init_ch_module(void)
static void __exit exit_ch_module(void)
{
scsi_unregister_driver(&ch_template.gendrv);
scsi_unregister_driver(&ch_template);
unregister_chrdev(SCSI_CHANGER_MAJOR, "ch");
class_unregister(&ch_sysfs_class);
idr_destroy(&ch_index_idr);

View file

@ -1775,8 +1775,8 @@ csio_scsi_cbfn(struct csio_hw *hw, struct csio_ioreq *req)
* - Kicks off the SCSI state machine for this IO.
* - Returns busy status on error.
*/
static int
csio_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmnd)
static enum scsi_qc_status csio_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *cmnd)
{
struct csio_lnode *ln = shost_priv(host);
struct csio_hw *hw = csio_lnode_to_hw(ln);
@ -2074,7 +2074,7 @@ csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd)
struct csio_scsi_level_data sld;
if (!rn)
goto fail;
goto fail_ret;
csio_dbg(hw, "Request to reset LUN:%llu (ssni:0x%x tgtid:%d)\n",
cmnd->device->lun, rn->flowid, rn->scsi_id);
@ -2220,6 +2220,7 @@ fail_ret_ioreq:
csio_put_scsi_ioreq_lock(hw, scsim, ioreq);
fail:
CSIO_INC_STATS(rn, n_lun_rst_fail);
fail_ret:
return FAILED;
}

View file

@ -873,7 +873,7 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
* and is expected to be held on return.
*
*/
static int dc395x_queue_command_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status dc395x_queue_command_lck(struct scsi_cmnd *cmd)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
struct DeviceCtlBlk *dcb;

View file

@ -968,7 +968,8 @@ int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg);
int esas2r_ioctl(struct scsi_device *dev, unsigned int cmd, void __user *arg);
u8 handle_hba_ioctl(struct esas2r_adapter *a,
struct atto_ioctl *ioctl_hba);
int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd);
enum scsi_qc_status esas2r_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *cmd);
int esas2r_show_info(struct seq_file *m, struct Scsi_Host *sh);
long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg);

View file

@ -818,7 +818,8 @@ static u32 get_physaddr_from_sgc(struct esas2r_sg_context *sgc, u64 *addr)
return len;
}
int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
enum scsi_qc_status esas2r_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *cmd)
{
struct esas2r_adapter *a =
(struct esas2r_adapter *)cmd->device->host->hostdata;

View file

@ -952,7 +952,7 @@ static void esp_event_queue_full(struct esp *esp, struct esp_cmd_entry *ent)
scsi_track_queue_full(dev, lp->num_tagged - 1);
}
static int esp_queuecommand_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status esp_queuecommand_lck(struct scsi_cmnd *cmd)
{
struct scsi_device *dev = cmd->device;
struct esp *esp = shost_priv(dev->host);

View file

@ -402,7 +402,8 @@ static irqreturn_t fdomain_irq(int irq, void *dev_id)
return IRQ_HANDLED;
}
static int fdomain_queue(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
static enum scsi_qc_status fdomain_queue(struct Scsi_Host *sh,
struct scsi_cmnd *cmd)
{
struct scsi_pointer *scsi_pointer = fdomain_scsi_pointer(cmd);
struct fdomain *fd = shost_priv(cmd->device->host);

View file

@ -503,7 +503,8 @@ void fnic_free_rq_buf(struct vnic_rq *rq, struct vnic_rq_buf *buf);
void fnic_flush_tx(struct work_struct *work);
void fnic_update_mac_locked(struct fnic *, u8 *new);
int fnic_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
enum scsi_qc_status fnic_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *sc);
int fnic_abort_cmd(struct scsi_cmnd *);
int fnic_device_reset(struct scsi_cmnd *);
int fnic_eh_host_reset_handler(struct scsi_cmnd *sc);

View file

@ -454,7 +454,8 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic,
return 0;
}
int fnic_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc)
enum scsi_qc_status fnic_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *sc)
{
struct request *const rq = scsi_cmd_to_rq(sc);
uint32_t mqtag = 0;

View file

@ -626,9 +626,8 @@ int scsi_host_busy(struct Scsi_Host *shost)
{
int cnt = 0;
if (shost->tag_set.ops)
blk_mq_tagset_busy_iter(&shost->tag_set,
scsi_host_check_in_flight, &cnt);
blk_mq_tagset_busy_iter(&shost->tag_set,
scsi_host_check_in_flight, &cnt);
return cnt;
}
EXPORT_SYMBOL(scsi_host_busy);

View file

@ -276,7 +276,8 @@ static void hpsa_free_cmd_pool(struct ctlr_info *h);
#define VPD_PAGE (1 << 8)
#define HPSA_SIMPLE_ERROR_BITS 0x03
static int hpsa_scsi_queue_command(struct Scsi_Host *h, struct scsi_cmnd *cmd);
static enum scsi_qc_status hpsa_scsi_queue_command(struct Scsi_Host *h,
struct scsi_cmnd *cmd);
static void hpsa_scan_start(struct Scsi_Host *);
static int hpsa_scan_finished(struct Scsi_Host *sh,
unsigned long elapsed_time);
@ -5667,7 +5668,8 @@ static void hpsa_command_resubmit_worker(struct work_struct *work)
}
/* Running in struct Scsi_Host->host_lock less mode */
static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
static enum scsi_qc_status hpsa_scsi_queue_command(struct Scsi_Host *sh,
struct scsi_cmnd *cmd)
{
struct ctlr_info *h;
struct hpsa_scsi_dev_t *dev;

View file

@ -993,7 +993,7 @@ static int hptiop_reset_comm_mvfrey(struct hptiop_hba *hba)
return 0;
}
static int hptiop_queuecommand_lck(struct scsi_cmnd *scp)
static enum scsi_qc_status hptiop_queuecommand_lck(struct scsi_cmnd *scp)
{
struct Scsi_Host *host = scp->device->host;
struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata;

View file

@ -1960,7 +1960,8 @@ static struct ibmvfc_cmd *ibmvfc_init_vfc_cmd(struct ibmvfc_event *evt, struct s
* Returns:
* 0 on success / other on failure
**/
static int ibmvfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
static enum scsi_qc_status ibmvfc_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *cmnd)
{
struct ibmvfc_host *vhost = shost_priv(shost);
struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));

View file

@ -868,9 +868,10 @@ static void ibmvscsi_timeout(struct timer_list *t)
* Returns the value returned from ibmvscsi_send_crq(). (Zero for success)
* Note that this routine assumes that host_lock is held for synchronization
*/
static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
struct ibmvscsi_host_data *hostdata,
unsigned long timeout)
static enum scsi_qc_status
ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
struct ibmvscsi_host_data *hostdata,
unsigned long timeout)
{
__be64 *crq_as_u64 = (__be64 *)&evt_struct->crq;
int request_status = 0;
@ -1040,7 +1041,7 @@ static inline u16 lun_from_dev(struct scsi_device *dev)
* @cmnd: struct scsi_cmnd to be executed
* @done: Callback function to be called when cmd is completed
*/
static int ibmvscsi_queuecommand_lck(struct scsi_cmnd *cmnd)
static enum scsi_qc_status ibmvscsi_queuecommand_lck(struct scsi_cmnd *cmnd)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
struct srp_cmd *srp_cmd;

View file

@ -925,7 +925,7 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *const cmd)
return 0;
}
static int imm_queuecommand_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status imm_queuecommand_lck(struct scsi_cmnd *cmd)
{
imm_struct *dev = imm_dev(cmd->device->host);

View file

@ -2606,7 +2606,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c
* zero if successful or indicate a host busy condition if not (which
* will cause the mid layer to call us again later with the command)
*/
static int i91u_queuecommand_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status i91u_queuecommand_lck(struct scsi_cmnd *cmd)
{
struct initio_host *host = (struct initio_host *) cmd->device->host->hostdata;
struct scsi_ctrl_blk *cmnd;

View file

@ -6242,8 +6242,8 @@ static void ipr_scsi_done(struct ipr_cmnd *ipr_cmd)
* SCSI_MLQUEUE_DEVICE_BUSY if device is busy
* SCSI_MLQUEUE_HOST_BUSY if host is busy
**/
static int ipr_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scsi_cmd)
static enum scsi_qc_status ipr_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scsi_cmd)
{
struct ipr_ioa_cfg *ioa_cfg;
struct ipr_resource_entry *res;

View file

@ -231,7 +231,7 @@ module_param(ips, charp, 0);
*/
static int ips_eh_abort(struct scsi_cmnd *);
static int ips_eh_reset(struct scsi_cmnd *);
static int ips_queue(struct Scsi_Host *, struct scsi_cmnd *);
static enum scsi_qc_status ips_queue(struct Scsi_Host *, struct scsi_cmnd *);
static const char *ips_info(struct Scsi_Host *);
static irqreturn_t do_ipsintr(int, void *);
static int ips_hainit(ips_ha_t *);
@ -1018,7 +1018,7 @@ static int ips_eh_reset(struct scsi_cmnd *SC)
/* Linux obtains io_request_lock before calling this function */
/* */
/****************************************************************************/
static int ips_queue_lck(struct scsi_cmnd *SC)
static enum scsi_qc_status ips_queue_lck(struct scsi_cmnd *SC)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
ips_ha_t *ha;

View file

@ -1854,7 +1854,8 @@ static inline int fc_fcp_lport_queue_ready(struct fc_lport *lport)
*
* This is the i/o strategy routine, called by the SCSI layer.
*/
int fc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc_cmd)
enum scsi_qc_status fc_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *sc_cmd)
{
struct fc_lport *lport = shost_priv(shost);
struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));

View file

@ -1747,7 +1747,8 @@ enum {
FAILURE_SESSION_NOT_READY,
};
int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
enum scsi_qc_status iscsi_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *sc)
{
struct iscsi_cls_session *cls_session;
struct iscsi_host *ihost;

View file

@ -158,7 +158,8 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
return task;
}
int sas_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
enum scsi_qc_status sas_queuecommand(struct Scsi_Host *host,
struct scsi_cmnd *cmd)
{
struct sas_internal *i = to_sas_internal(host->transportt);
struct domain_device *dev = cmd_to_domain_dev(cmd);

View file

@ -6979,6 +6979,42 @@ lpfc_reset_stats(struct Scsi_Host *shost)
return;
}
/**
* lpfc_get_enc_info - Return encryption information about the session for
* a given remote port.
* @rport: ptr to fc_rport from scsi transport fc
*
* Given an rport object, iterate through the fc_nodes list to find node
* corresponding with rport. Pass the encryption information from the node to
* rport's encryption attribute for reporting to upper layers. Information is
* passed through nlp_enc_info struct which contains encryption status.
*
* Returns:
* - Address of rport's fc_encryption_info struct
* - NULL when not found
**/
static struct fc_encryption_info *
lpfc_get_enc_info(struct fc_rport *rport)
{
struct Scsi_Host *shost = rport_to_shost(rport);
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
struct fc_encryption_info *ef = NULL;
struct lpfc_nodelist *ndlp, *next_ndlp;
unsigned long iflags;
spin_lock_irqsave(&vport->fc_nodes_list_lock, iflags);
list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
if (ndlp->rport && ndlp->rport == rport) {
ef = &rport->enc_info;
ef->status = ndlp->nlp_enc_info.status;
break;
}
}
spin_unlock_irqrestore(&vport->fc_nodes_list_lock, iflags);
return ef;
}
/*
* The LPFC driver treats linkdown handling as target loss events so there
* are no sysfs handlers for link_down_tmo.
@ -7196,6 +7232,8 @@ struct fc_function_template lpfc_transport_functions = {
.get_fc_host_stats = lpfc_get_stats,
.reset_fc_host_stats = lpfc_reset_stats,
.get_fc_rport_enc_info = lpfc_get_enc_info,
.dd_fcrport_size = sizeof(struct lpfc_rport_data),
.show_rport_maxframe_size = 1,
.show_rport_supported_classes = 1,
@ -7265,6 +7303,8 @@ struct fc_function_template lpfc_vport_transport_functions = {
.get_fc_host_stats = lpfc_get_stats,
.reset_fc_host_stats = lpfc_reset_stats,
.get_fc_rport_enc_info = lpfc_get_enc_info,
.dd_fcrport_size = sizeof(struct lpfc_rport_data),
.show_rport_maxframe_size = 1,
.show_rport_supported_classes = 1,

View file

@ -872,6 +872,13 @@ lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char *buf, int size)
ndlp->nlp_rpi);
len += scnprintf(buf+len, size-len, "flag:x%08lx ",
ndlp->nlp_flag);
if (ndlp->nlp_enc_info.status) {
len += scnprintf(buf + len,
size - len, "ENCRYPTED");
len += scnprintf(buf + len, size - len,
ndlp->nlp_enc_info.level
? "(CNSA2.0) " : "(CNSA1.0) ");
}
if (!ndlp->nlp_type)
len += scnprintf(buf+len, size-len, "UNKNOWN_TYPE ");
if (ndlp->nlp_type & NLP_FC_NODE)

View file

@ -77,6 +77,11 @@ struct lpfc_node_rrqs {
unsigned long xri_bitmap[XRI_BITMAP_ULONGS];
};
struct lpfc_enc_info {
u8 status; /* encryption status for session */
u8 level; /* CNSA encryption level */
};
enum lpfc_fc4_xpt_flags {
NLP_XPT_REGD = 0x1,
SCSI_XPT_REGD = 0x2,
@ -138,6 +143,8 @@ struct lpfc_nodelist {
uint8_t vmid_support; /* destination VMID support */
#define NLP_NVME_NSLER 0x1 /* NVME NSLER device */
struct lpfc_enc_info nlp_enc_info; /* Encryption information struct */
struct timer_list nlp_delayfunc; /* Used for delayed ELS cmds */
struct lpfc_hba *phba;
struct fc_rport *rport; /* scsi_transport_fc port structure */

View file

@ -2014,6 +2014,58 @@ lpfc_cmpl_els_rrq(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
lpfc_nlp_put(ndlp);
return;
}
/**
* lpfc_check_encryption - Reports an ndlp's encryption information
* @phba: pointer to lpfc hba data structure.
* @ndlp: pointer to a node-list data structure.
* @cmdiocb: pointer to lpfc command iocbq data structure.
* @rspiocb: pointer to lpfc response iocbq data structure.
*
* This routine is called in the completion callback function for issuing
* or receiving a Port Login (PLOGI) command. In a PLOGI completion, if FEDIF
* is supported, encryption information will be provided in completion status
* data. If @phba supports FEDIF, a log message containing encryption
* information will be logged. Encryption status is also saved for encryption
* reporting with upper layer through the rport encryption attribute.
**/
static void
lpfc_check_encryption(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
struct lpfc_iocbq *cmdiocb, struct lpfc_iocbq *rspiocb)
{
struct lpfc_vport *vport = cmdiocb->vport;
u32 did = ndlp->nlp_DID;
struct lpfc_enc_info *nlp_enc_info = &ndlp->nlp_enc_info;
char enc_status[FC_RPORT_ENCRYPTION_STATUS_MAX_LEN] = {0};
char enc_level[8] = "N/A";
u8 encryption;
if (phba->sli4_hba.encryption_support &&
((did & Fabric_DID_MASK) != Fabric_DID_MASK)) {
encryption = bf_get(lpfc_wcqe_c_enc,
&rspiocb->wcqe_cmpl);
nlp_enc_info->status = encryption;
strscpy(enc_status, encryption ? "Encrypted" : "Unencrypted",
sizeof(enc_status));
if (encryption) {
nlp_enc_info->level = bf_get(lpfc_wcqe_c_enc_lvl,
&rspiocb->wcqe_cmpl);
strscpy(enc_level, nlp_enc_info->level ? "CNSA2.0" :
"CNSA1.0",
sizeof(enc_level));
}
lpfc_printf_vlog(vport, KERN_INFO, LOG_ENCRYPTION,
"0924 DID:x%06x %s Session "
"Established, Encryption Level:%s "
"rpi:x%x\n",
ndlp->nlp_DID, enc_status, enc_level,
ndlp->nlp_rpi);
}
}
/**
* lpfc_cmpl_els_plogi - Completion callback function for plogi
* @phba: pointer to lpfc hba data structure.
@ -2153,6 +2205,8 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
goto out;
ndlp = lpfc_plogi_confirm_nport(phba, prsp->virt, ndlp);
lpfc_check_encryption(phba, ndlp, cmdiocb, rspiocb);
sp = (struct serv_parm *)((u8 *)prsp->virt +
sizeof(u32));
@ -5407,6 +5461,9 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
goto out;
}
if (!ulp_status && test_bit(NLP_RCV_PLOGI, &ndlp->nlp_flag))
lpfc_check_encryption(phba, ndlp, cmdiocb, rspiocb);
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP,
"ELS rsp cmpl: status:x%x/x%x did:x%x",
ulp_status, ulp_word4, did);

View file

@ -5340,6 +5340,7 @@ out:
clear_bit(NLP_NPR_ADISC, &ndlp->nlp_flag);
if (acc_plogi)
clear_bit(NLP_LOGO_ACC, &ndlp->nlp_flag);
memset(&ndlp->nlp_enc_info, 0, sizeof(ndlp->nlp_enc_info));
return 1;
}
clear_bit(NLP_LOGO_ACC, &ndlp->nlp_flag);

View file

@ -437,6 +437,12 @@ struct lpfc_wcqe_complete {
#define lpfc_wcqe_c_cmf_bw_MASK 0x0FFFFFFF
#define lpfc_wcqe_c_cmf_bw_WORD total_data_placed
uint32_t parameter;
#define lpfc_wcqe_c_enc_SHIFT 31
#define lpfc_wcqe_c_enc_MASK 0x00000001
#define lpfc_wcqe_c_enc_WORD parameter
#define lpfc_wcqe_c_enc_lvl_SHIFT 30
#define lpfc_wcqe_c_enc_lvl_MASK 0x00000001
#define lpfc_wcqe_c_enc_lvl_WORD parameter
#define lpfc_wcqe_c_bg_edir_SHIFT 5
#define lpfc_wcqe_c_bg_edir_MASK 0x00000001
#define lpfc_wcqe_c_bg_edir_WORD parameter
@ -2942,7 +2948,10 @@ struct lpfc_mbx_read_config {
#define lpfc_mbx_rd_conf_topology_SHIFT 24
#define lpfc_mbx_rd_conf_topology_MASK 0x000000FF
#define lpfc_mbx_rd_conf_topology_WORD word2
uint32_t rsvd_3;
uint32_t word3;
#define lpfc_mbx_rd_conf_fedif_SHIFT 6
#define lpfc_mbx_rd_conf_fedif_MASK 0x00000001
#define lpfc_mbx_rd_conf_fedif_WORD word3
uint32_t word4;
#define lpfc_mbx_rd_conf_e_d_tov_SHIFT 0
#define lpfc_mbx_rd_conf_e_d_tov_MASK 0x0000FFFF

View file

@ -9999,6 +9999,11 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
(phba->sli4_hba.max_cfg_param.max_vpi - 1) : 0;
phba->max_vports = phba->max_vpi;
if (bf_get(lpfc_mbx_rd_conf_fedif, rd_config))
phba->sli4_hba.encryption_support = true;
else
phba->sli4_hba.encryption_support = false;
/* Next decide on FPIN or Signal E2E CGN support
* For congestion alarms and warnings valid combination are:
* 1. FPIN alarms / FPIN warnings

View file

@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
* Fibre Channel Host Bus Adapters. *
* Copyright (C) 2017-2023 Broadcom. All Rights Reserved. The term *
* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
* Broadcom refers to Broadcom Inc. and/or its subsidiaries. *
* Copyright (C) 2004-2009 Emulex. All rights reserved. *
* EMULEX and SLI are trademarks of Emulex. *
@ -47,6 +47,7 @@
#define LOG_RSVD1 0x01000000 /* Reserved */
#define LOG_RSVD2 0x02000000 /* Reserved */
#define LOG_CGN_MGMT 0x04000000 /* Congestion Mgmt events */
#define LOG_ENCRYPTION 0x40000000 /* EDIF Encryption events. */
#define LOG_TRACE_EVENT 0x80000000 /* Dmp the DBG log on this err */
#define LOG_ALL_MSG 0x7fffffff /* LOG all messages */

View file

@ -5233,8 +5233,8 @@ static char *lpfc_is_command_vm_io(struct scsi_cmnd *cmd)
* 0 - Success
* SCSI_MLQUEUE_HOST_BUSY - Block all devices served by this host temporarily.
**/
static int
lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
static enum scsi_qc_status lpfc_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *cmnd)
{
struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
struct lpfc_hba *phba = vport->phba;
@ -6743,8 +6743,8 @@ lpfc_disable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn,
return false;
}
static int
lpfc_no_command(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
static enum scsi_qc_status lpfc_no_command(struct Scsi_Host *shost,
struct scsi_cmnd *cmnd)
{
return SCSI_MLQUEUE_HOST_BUSY;
}

View file

@ -20432,62 +20432,36 @@ lpfc_check_next_fcf_pri_level(struct lpfc_hba *phba)
uint16_t
lpfc_sli4_fcf_rr_next_index_get(struct lpfc_hba *phba)
{
uint16_t next_fcf_index;
uint16_t next;
initial_priority:
/* Search start from next bit of currently registered FCF index */
next_fcf_index = phba->fcf.current_rec.fcf_indx;
do {
for_each_set_bit_wrap(next, phba->fcf.fcf_rr_bmask,
LPFC_SLI4_FCF_TBL_INDX_MAX, phba->fcf.current_rec.fcf_indx) {
if (next == phba->fcf.current_rec.fcf_indx)
continue;
next_priority:
/* Determine the next fcf index to check */
next_fcf_index = (next_fcf_index + 1) % LPFC_SLI4_FCF_TBL_INDX_MAX;
next_fcf_index = find_next_bit(phba->fcf.fcf_rr_bmask,
LPFC_SLI4_FCF_TBL_INDX_MAX,
next_fcf_index);
if (!(phba->fcf.fcf_pri[next].fcf_rec.flag & LPFC_FCF_FLOGI_FAILED)) {
lpfc_printf_log(phba, KERN_INFO, LOG_FIP,
"2845 Get next roundrobin failover FCF (x%x)\n", next);
return next;
}
/* Wrap around condition on phba->fcf.fcf_rr_bmask */
if (next_fcf_index >= LPFC_SLI4_FCF_TBL_INDX_MAX) {
/*
* If we have wrapped then we need to clear the bits that
* have been tested so that we can detect when we should
* change the priority level.
*/
next_fcf_index = find_first_bit(phba->fcf.fcf_rr_bmask,
LPFC_SLI4_FCF_TBL_INDX_MAX);
}
if (list_is_singular(&phba->fcf.fcf_pri_list))
return LPFC_FCOE_FCF_NEXT_NONE;
}
/* Check roundrobin failover list empty condition */
if (next_fcf_index >= LPFC_SLI4_FCF_TBL_INDX_MAX ||
next_fcf_index == phba->fcf.current_rec.fcf_indx) {
/*
* If next fcf index is not found check if there are lower
* Priority level fcf's in the fcf_priority list.
* Set up the rr_bmask with all of the avaiable fcf bits
* at that level and continue the selection process.
*/
if (lpfc_check_next_fcf_pri_level(phba))
goto initial_priority;
lpfc_printf_log(phba, KERN_WARNING, LOG_FIP,
"2844 No roundrobin failover FCF available\n");
} while (lpfc_check_next_fcf_pri_level(phba));
return LPFC_FCOE_FCF_NEXT_NONE;
}
lpfc_printf_log(phba, KERN_WARNING, LOG_FIP,
"2844 No roundrobin failover FCF available\n");
if (next_fcf_index < LPFC_SLI4_FCF_TBL_INDX_MAX &&
phba->fcf.fcf_pri[next_fcf_index].fcf_rec.flag &
LPFC_FCF_FLOGI_FAILED) {
if (list_is_singular(&phba->fcf.fcf_pri_list))
return LPFC_FCOE_FCF_NEXT_NONE;
goto next_priority;
}
lpfc_printf_log(phba, KERN_INFO, LOG_FIP,
"2845 Get next roundrobin failover FCF (x%x)\n",
next_fcf_index);
return next_fcf_index;
return LPFC_FCOE_FCF_NEXT_NONE;
}
/**

View file

@ -888,6 +888,10 @@ struct lpfc_sli4_hba {
#define LPFC_FP_EQ_MAX_INTR_SEC 10000
uint32_t intr_enable;
/* Indicates whether SLI Port supports FEDIF */
bool encryption_support;
struct lpfc_bmbx bmbx;
struct lpfc_max_cfg_param max_cfg_param;
uint16_t extents_in_use; /* must allocate resource extents. */

View file

@ -20,7 +20,7 @@
* included with this package. *
*******************************************************************/
#define LPFC_DRIVER_VERSION "14.4.0.12"
#define LPFC_DRIVER_VERSION "14.4.0.13"
#define LPFC_DRIVER_NAME "lpfc"
/* Used for SLI 2/3 */

View file

@ -66,7 +66,7 @@ static irqreturn_t do_mac53c94_interrupt(int, void *);
static void cmd_done(struct fsc_state *, int result);
static void set_dma_cmds(struct fsc_state *, struct scsi_cmnd *);
static int mac53c94_queue_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status mac53c94_queue_lck(struct scsi_cmnd *cmd)
{
struct fsc_state *state;

View file

@ -372,11 +372,11 @@ mega_runpendq(adapter_t *adapter)
*
* The command queuing entry point for the mid-layer.
*/
static int megaraid_queue_lck(struct scsi_cmnd *scmd)
static enum scsi_qc_status megaraid_queue_lck(struct scsi_cmnd *scmd)
{
adapter_t *adapter;
scb_t *scb;
int busy=0;
enum scsi_qc_status busy = 0;
unsigned long flags;
adapter = (adapter_t *)scmd->device->host->hostdata;
@ -518,7 +518,8 @@ mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel)
* boot settings.
*/
static scb_t *
mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd,
enum scsi_qc_status *busy)
{
mega_passthru *pthru;
scb_t *scb;
@ -640,7 +641,7 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
}
if(!(scb = mega_allocate_scb(adapter, cmd))) {
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
@ -688,7 +689,7 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
/* Allocate a SCB and initialize passthru */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
pthru = scb->pthru;
@ -730,7 +731,7 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
/* Allocate a SCB and initialize mailbox */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
mbox = (mbox_t *)scb->raw_mbox;
@ -870,7 +871,7 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
/* Allocate a SCB and initialize mailbox */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
@ -898,7 +899,7 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
else {
/* Allocate a SCB and initialize passthru */
if(!(scb = mega_allocate_scb(adapter, cmd))) {
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}

View file

@ -962,8 +962,10 @@ static int mega_query_adapter(adapter_t *);
static int issue_scb(adapter_t *, scb_t *);
static int mega_setup_mailbox(adapter_t *);
static int megaraid_queue (struct Scsi_Host *, struct scsi_cmnd *);
static scb_t * mega_build_cmd(adapter_t *, struct scsi_cmnd *, int *);
static enum scsi_qc_status megaraid_queue(struct Scsi_Host *,
struct scsi_cmnd *);
static scb_t *mega_build_cmd(adapter_t *, struct scsi_cmnd *,
enum scsi_qc_status *);
static void __mega_runpendq(adapter_t *);
static int issue_scb_block(adapter_t *, u_char *);

View file

@ -109,8 +109,10 @@ static int megaraid_mbox_fire_sync_cmd(adapter_t *);
static void megaraid_mbox_display_scb(adapter_t *, scb_t *);
static void megaraid_mbox_setup_device_map(adapter_t *);
static int megaraid_queue_command(struct Scsi_Host *, struct scsi_cmnd *);
static scb_t *megaraid_mbox_build_cmd(adapter_t *, struct scsi_cmnd *, int *);
static enum scsi_qc_status megaraid_queue_command(struct Scsi_Host *,
struct scsi_cmnd *);
static scb_t *megaraid_mbox_build_cmd(adapter_t *, struct scsi_cmnd *,
enum scsi_qc_status *);
static void megaraid_mbox_runpendq(adapter_t *, scb_t *);
static void megaraid_mbox_prepare_pthru(adapter_t *, scb_t *,
struct scsi_cmnd *);
@ -1434,12 +1436,12 @@ mbox_post_cmd(adapter_t *adapter, scb_t *scb)
*
* Queue entry point for mailbox based controllers.
*/
static int megaraid_queue_command_lck(struct scsi_cmnd *scp)
static enum scsi_qc_status megaraid_queue_command_lck(struct scsi_cmnd *scp)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
adapter_t *adapter;
scb_t *scb;
int if_busy;
enum scsi_qc_status if_busy;
adapter = SCP2ADAPTER(scp);
scp->result = 0;
@ -1477,7 +1479,8 @@ static DEF_SCSI_QCMD(megaraid_queue_command)
* firmware. We also complete certain commands without sending them to firmware.
*/
static scb_t *
megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp,
enum scsi_qc_status *busy)
{
mraid_device_t *rdev = ADAP2RAIDDEV(adapter);
int channel;
@ -1516,7 +1519,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
if (!(scb = megaraid_alloc_scb(adapter, scp))) {
scp->result = (DID_ERROR << 16);
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
@ -1599,7 +1602,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
/* Allocate a SCB and initialize passthru */
if (!(scb = megaraid_alloc_scb(adapter, scp))) {
scp->result = (DID_ERROR << 16);
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
@ -1644,7 +1647,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
*/
if (!(scb = megaraid_alloc_scb(adapter, scp))) {
scp->result = (DID_ERROR << 16);
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
ccb = (mbox_ccb_t *)scb->ccb;
@ -1740,7 +1743,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
*/
if (!(scb = megaraid_alloc_scb(adapter, scp))) {
scp->result = (DID_ERROR << 16);
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}
@ -1808,7 +1811,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy)
// Allocate a SCB and initialize passthru
if (!(scb = megaraid_alloc_scb(adapter, scp))) {
scp->result = (DID_ERROR << 16);
*busy = 1;
*busy = SCSI_MLQUEUE_HOST_BUSY;
return NULL;
}

View file

@ -1781,8 +1781,8 @@ out_return_cmd:
* @shost: adapter SCSI host
* @scmd: SCSI command to be queued
*/
static int
megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
static enum scsi_qc_status megasas_queue_command(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{
struct megasas_instance *instance;
struct MR_PRIV_DEVICE *mr_device_priv_data;

View file

@ -1625,7 +1625,7 @@ static void cmd_complete(struct mesh_state *ms)
* Called by midlayer with host locked to queue a new
* request
*/
static int mesh_queue_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status mesh_queue_lck(struct scsi_cmnd *cmd)
{
struct mesh_state *ms;

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2017-2023 Broadcom Inc. All rights reserved.
* Copyright 2017-2026 Broadcom Inc. All rights reserved.
*/
#ifndef MPI30_CNFG_H
#define MPI30_CNFG_H 1
@ -1037,6 +1037,7 @@ struct mpi3_io_unit_page5 {
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SATA_SSD_SHIFT (2)
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_SSD_MASK (0x0003)
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_SSD_SHIFT (0)
#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_HDD_SPINDOWN_ENABLE (0x8000)
#define MPI3_IOUNIT5_FLAGS_SATAPUIS_MASK (0x0c)
#define MPI3_IOUNIT5_FLAGS_SATAPUIS_NOT_SUPPORTED (0x00)
#define MPI3_IOUNIT5_FLAGS_SATAPUIS_OS_CONTROLLED (0x04)
@ -1074,7 +1075,8 @@ struct mpi3_io_unit_page8 {
u8 current_key_encryption_algo;
u8 key_digest_hash_algo;
union mpi3_version_union current_svn;
__le32 reserved14;
__le16 pending_svn_time;
__le16 reserved16;
__le32 current_key[128];
union mpi3_iounit8_digest digest[MPI3_IOUNIT8_DIGEST_MAX];
};
@ -1406,6 +1408,7 @@ struct mpi3_driver_page1 {
};
#define MPI3_DRIVER1_PAGEVERSION (0x00)
#define MPI3_DRIVER1_FLAGS_DEVICE_SHUTDOWN_ON_UNLOAD_DISABLE (0x0001)
#ifndef MPI3_DRIVER2_TRIGGER_MAX
#define MPI3_DRIVER2_TRIGGER_MAX (1)
#endif
@ -1561,7 +1564,9 @@ struct mpi3_security1_key_record {
u8 consumer;
__le16 key_data_size;
__le32 additional_key_data;
__le32 reserved08[2];
u8 library_version;
u8 reserved09[3];
__le32 reserved0c;
union mpi3_security1_key_data key_data;
};
@ -1614,6 +1619,85 @@ struct mpi3_security_page2 {
u8 reserved9d[3];
struct mpi3_security2_trusted_root trusted_root[MPI3_SECURITY2_TRUSTED_ROOT_MAX];
};
struct mpi3_security_page3 {
struct mpi3_config_page_header header;
__le16 key_data_length;
__le16 reserved0a;
u8 key_number;
u8 reserved0d[3];
union mpi3_security_mac mac;
union mpi3_security_nonce nonce;
__le32 reserved90[12];
u8 flags;
u8 consumer;
__le16 key_data_size;
__le32 additional_key_data;
u8 library_version;
u8 reserved_c9[3];
__le32 reserved_cc;
u8 key_data[];
};
#define MPI3_SECURITY3_PAGEVERSION (0x00)
#define MPI3_SECURITY3_FLAGS_TYPE_MASK (0x0f)
#define MPI3_SECURITY3_FLAGS_TYPE_SHIFT (0)
#define MPI3_SECURITY3_FLAGS_TYPE_NOT_VALID (0)
#define MPI3_SECURITY3_FLAGS_TYPE_MLDSA_PRIVATE (1)
#define MPI3_SECURITY3_FLAGS_TYPE_MLDSA_PUBLIC (2)
struct mpi3_security_page10 {
struct mpi3_config_page_header header;
__le32 reserved08[2];
union mpi3_security_mac mac;
union mpi3_security_nonce nonce;
__le64 current_token_nonce;
__le64 previous_token_nonce;
__le32 reserved_a0[8];
u8 diagnostic_auth_id[64];
};
#define MPI3_SECURITY10_PAGEVERSION (0x00)
struct mpi3_security_page11 {
struct mpi3_config_page_header header;
u8 flags;
u8 reserved09[3];
__le32 reserved0c;
__le32 diagnostic_token_length;
__le32 reserved14[3];
u8 diagnostic_token[];
};
#define MPI3_SECURITY11_PAGEVERSION (0x00)
#define MPI3_SECURITY11_FLAGS_TOKEN_ENABLED (0x01)
struct mpi3_security12_diag_feature {
__le32 feature_identifier;
u8 feature_size;
u8 feature_type;
__le16 reserved06;
u8 status;
u8 section;
__le16 reserved0a;
__le32 reserved0c;
u8 feature_data[64];
};
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_MASK (0x03)
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_SHIFT (0)
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_UNKNOWN (0x00)
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_DISABLED (0x01)
#define MPI3_SECURITY12_DIAG_FEATURE_STATUS_ENABLED (0x02)
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_PROTECTED (0x00)
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_UNPROTECTED (0x01)
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_PAYLOAD (0x02)
#define MPI3_SECURITY12_DIAG_FEATURE_SECTION_SIGNATURE (0x03)
struct mpi3_security_page12 {
struct mpi3_config_page_header header;
__le32 reserved08[2];
u8 num_diag_features;
u8 reserved11[3];
__le32 reserved14[3];
struct mpi3_security12_diag_feature diag_feature[];
};
#define MPI3_SECURITY2_PAGEVERSION (0x00)
struct mpi3_sas_io_unit0_phy_data {
u8 io_unit_port;
@ -2314,6 +2398,8 @@ struct mpi3_device0_sas_sata_format {
u8 attached_phy_identifier;
u8 max_port_connections;
u8 zone_group;
u8 reserved10[3];
u8 negotiated_link_rate;
};
#define MPI3_DEVICE0_SASSATA_FLAGS_WRITE_SAME_UNMAP_NCQ (0x0400)

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2018-2023 Broadcom Inc. All rights reserved.
* Copyright 2018-2026 Broadcom Inc. All rights reserved.
*/
#ifndef MPI30_IMAGE_H
#define MPI30_IMAGE_H 1
@ -135,7 +135,7 @@ struct mpi3_ci_manifest_mpi {
__le32 package_version_string_offset;
__le32 package_build_date_string_offset;
__le32 package_build_time_string_offset;
__le32 reserved4c;
__le32 diag_authorization_key_offset;
__le32 diag_authorization_identifier[16];
struct mpi3_ci_manifest_mpi_comp_image_ref component_image_ref[MPI3_CI_MANIFEST_MPI_MAX];
};
@ -148,16 +148,112 @@ struct mpi3_ci_manifest_mpi {
#define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_GCA (0x50)
#define MPI3_CI_MANIFEST_MPI_RELEASE_LEVEL_POINT (0x60)
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTHORIZATION (0x01)
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_MASK (0x06)
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_SHIFT (1)
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_IDENTIFIER (0x00)
#define MPI3_CI_MANIFEST_MPI_FLAGS_DIAG_AUTH_ANCHOR_KEY_OFFSET (0x02)
#define MPI3_CI_MANIFEST_MPI_SUBSYSTEMID_IGNORED (0xffff)
#define MPI3_CI_MANIFEST_MPI_PKG_VER_STR_OFF_UNSPECIFIED (0x00000000)
#define MPI3_CI_MANIFEST_MPI_PKG_BUILD_DATE_STR_OFF_UNSPECIFIED (0x00000000)
#define MPI3_CI_MANIFEST_MPI_PKG_BUILD_TIME_STR_OFF_UNSPECIFIED (0x00000000)
struct mpi3_sb_manifest_ci_digest {
__le32 signature1;
__le32 reserved04[2];
u8 hash_algorithm;
u8 reserved09[3];
struct mpi3_comp_image_version component_image_version;
__le32 component_image_version_string_offset;
__le32 digest[16];
};
struct mpi3_sb_manifest_ci_ref_element {
u8 num_ci_digests;
u8 reserved01[3];
struct mpi3_sb_manifest_ci_digest ci_digest[];
};
struct mpi3_sb_manifest_embedded_key_element {
__le32 reserved00[3];
u8 key_algorithm;
u8 flags;
__le16 public_key_size;
__le32 start_tag;
__le32 public_key[];
};
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_MASK (0x03)
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_STRT (0x00)
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_FLAGS_KEYINDEX_K2GO (0x01)
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_STARTTAG_STRT (0x54525453)
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_STARTTAG_K2GO (0x4f47324b)
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_ENDTAG_STOP (0x504f5453)
#define MPI3_SB_MANIFEST_EMBEDDED_KEY_ENDTAG_K2ST (0x5453324b)
struct mpi3_sb_manifest_diag_key_element {
__le32 reserved00[3];
u8 key_algorithm;
u8 flags;
__le16 public_key_size;
__le32 public_key[];
};
#define MPI3_SB_MANIFEST_DIAG_KEY_FLAGS_KEYINDEX_MASK (0x03)
#define MPI3_SB_MANIFEST_DIAG_KEY_FLAGS_KEYSELECT_FW_KEY (0x04)
union mpi3_sb_manifest_element_data {
struct mpi3_sb_manifest_ci_ref_element ci_ref;
struct mpi3_sb_manifest_embedded_key_element embed_key;
struct mpi3_sb_manifest_diag_key_element diag_key;
__le32 dword;
};
struct mpi3_sb_manifest_element {
u8 manifest_element_form;
u8 reserved01[3];
union mpi3_sb_manifest_element_data form_specific[];
};
#define MPI3_SB_MANIFEST_ELEMENT_FORM_CI_REFS (0x01)
#define MPI3_SB_MANIFEST_ELEMENT_FORM_EMBED_KEY (0x02)
#define MPI3_SB_MANIFEST_ELEMENT_FORM_DIAG_KEY (0x03)
struct mpi3_sb_manifest_mpi {
u8 manifest_type;
u8 reserved01[3];
__le32 reserved04[3];
u8 reserved10;
u8 release_level;
__le16 reserved12;
__le16 reserved14;
__le16 flags;
__le32 reserved18[2];
__le16 vendor_id;
__le16 device_id;
__le16 subsystem_vendor_id;
__le16 subsystem_id;
__le32 reserved28[2];
union mpi3_version_union package_security_version;
__le32 reserved34;
struct mpi3_comp_image_version package_version;
__le32 package_version_string_offset;
__le32 package_build_date_string_offset;
__le32 package_build_time_string_offset;
__le32 component_image_references_offset;
__le32 embedded_key0offset;
__le32 embedded_key1offset;
__le32 diag_authorization_key_offset;
__le32 reserved5c[9];
struct mpi3_sb_manifest_element manifest_elements[];
};
union mpi3_ci_manifest {
struct mpi3_ci_manifest_mpi mpi;
struct mpi3_sb_manifest_mpi sb_mpi;
__le32 dword[1];
};
#define MPI3_CI_MANIFEST_TYPE_MPI (0x00)
#define MPI3_SB_MANIFEST_APU_IMMEDIATE_DEFER_APU_ENABLE (0x01)
#define MPI3_CI_MANIFEST_TYPE_MPI (0x00)
#define MPI3_CI_MANIFEST_TYPE_SB (0x01)
struct mpi3_extended_image_header {
u8 image_type;
u8 reserved01[3];

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
*/
#ifndef MPI30_INIT_H
#define MPI30_INIT_H 1

View file

@ -662,6 +662,7 @@ struct mpi3_event_data_diag_buffer_status_change {
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_RELEASED (0x01)
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_PAUSED (0x02)
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_RESUMED (0x03)
#define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_CLEARED (0x04)
#define MPI3_PEL_LOCALE_FLAGS_NON_BLOCKING_BOOT_EVENT (0x0200)
#define MPI3_PEL_LOCALE_FLAGS_BLOCKING_BOOT_EVENT (0x0100)
#define MPI3_PEL_LOCALE_FLAGS_PCIE (0x0080)

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
*
*/
#ifndef MPI30_PCI_H

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
*/
#ifndef MPI30_SAS_H
#define MPI30_SAS_H 1

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2016-2024 Broadcom Inc. All rights reserved.
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
*/
#ifndef MPI30_TOOL_H
#define MPI30_TOOL_H 1
@ -8,6 +8,10 @@
#define MPI3_DIAG_BUFFER_TYPE_TRACE (0x01)
#define MPI3_DIAG_BUFFER_TYPE_FW (0x02)
#define MPI3_DIAG_BUFFER_ACTION_RELEASE (0x01)
#define MPI3_DIAG_BUFFER_ACTION_PAUSE (0x02)
#define MPI3_DIAG_BUFFER_ACTION_RESUME (0x03)
#define MPI3_DIAG_BUFFER_ACTION_CLEAR (0x04)
#define MPI3_DIAG_BUFFER_POST_MSGFLAGS_SEGMENTED (0x01)
struct mpi3_diag_buffer_post_request {

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright 2016-2023 Broadcom Inc. All rights reserved.
* Copyright 2016-2026 Broadcom Inc. All rights reserved.
*/
#ifndef MPI30_TRANSPORT_H
#define MPI30_TRANSPORT_H 1
@ -18,7 +18,7 @@ union mpi3_version_union {
#define MPI3_VERSION_MAJOR (3)
#define MPI3_VERSION_MINOR (0)
#define MPI3_VERSION_UNIT (37)
#define MPI3_VERSION_UNIT (39)
#define MPI3_VERSION_DEV (0)
#define MPI3_DEVHANDLE_INVALID (0xffff)
struct mpi3_sysif_oper_queue_indexes {

View file

@ -56,8 +56,8 @@ extern struct list_head mrioc_list;
extern int prot_mask;
extern atomic64_t event_counter;
#define MPI3MR_DRIVER_VERSION "8.15.0.5.51"
#define MPI3MR_DRIVER_RELDATE "18-November-2025"
#define MPI3MR_DRIVER_VERSION "8.17.0.3.50"
#define MPI3MR_DRIVER_RELDATE "09-January-2026"
#define MPI3MR_DRIVER_NAME "mpi3mr"
#define MPI3MR_DRIVER_LICENSE "GPL"
@ -643,6 +643,7 @@ struct mpi3mr_enclosure_node {
* @dev_info: Device information bits
* @phy_id: Phy identifier provided in device page 0
* @attached_phy_id: Attached phy identifier provided in device page 0
* @negotiated_link_rate: Negotiated link rate from device page 0
* @sas_transport_attached: Is this device exposed to transport
* @pend_sas_rphy_add: Flag to check device is in process of add
* @hba_port: HBA port entry
@ -654,6 +655,7 @@ struct tgt_dev_sas_sata {
u16 dev_info;
u8 phy_id;
u8 attached_phy_id;
u8 negotiated_link_rate;
u8 sas_transport_attached;
u8 pend_sas_rphy_add;
struct mpi3mr_hba_port *hba_port;
@ -1076,7 +1078,6 @@ struct scmd_priv {
* @fwevt_worker_thread: Firmware event worker thread
* @fwevt_lock: Firmware event lock
* @fwevt_list: Firmware event list
* @watchdog_work_q_name: Fault watchdog worker thread name
* @watchdog_work_q: Fault watchdog worker thread
* @watchdog_work: Fault watchdog work
* @watchdog_lock: Fault watchdog lock
@ -1135,6 +1136,10 @@ struct scmd_priv {
* @default_qcount: Total Default queues
* @active_poll_qcount: Currently active poll queue count
* @requested_poll_qcount: User requested poll queue count
* @fault_during_init: Indicates a firmware fault occurred during initialization
* @saved_fault_code: Firmware fault code captured at the time of failure
* @saved_fault_info: Additional firmware-provided fault information
* @fwfault_counter: Count of firmware faults detected by the driver
* @bsg_dev: BSG device structure
* @bsg_queue: Request queue for BSG device
* @stop_bsgs: Stop BSG request flag
@ -1265,7 +1270,6 @@ struct mpi3mr_ioc {
spinlock_t fwevt_lock;
struct list_head fwevt_list;
char watchdog_work_q_name[50];
struct workqueue_struct *watchdog_work_q;
struct delayed_work watchdog_work;
spinlock_t watchdog_lock;
@ -1338,6 +1342,10 @@ struct mpi3mr_ioc {
u16 default_qcount;
u16 active_poll_qcount;
u16 requested_poll_qcount;
u8 fault_during_init;
u32 saved_fault_code;
u32 saved_fault_info[3];
u64 fwfault_counter;
struct device bsg_dev;
struct request_queue *bsg_queue;
@ -1508,7 +1516,7 @@ void mpi3mr_pel_get_seqnum_complete(struct mpi3mr_ioc *mrioc,
struct mpi3mr_drv_cmd *drv_cmd);
int mpi3mr_pel_get_seqnum_post(struct mpi3mr_ioc *mrioc,
struct mpi3mr_drv_cmd *drv_cmd);
void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,
u16 event_data_size);
struct mpi3mr_enclosure_node *mpi3mr_enclosure_find_by_handle(
struct mpi3mr_ioc *mrioc, u16 handle);

View file

@ -2920,7 +2920,7 @@ out:
}
/**
* mpi3mr_app_save_logdata - Save Log Data events
* mpi3mr_app_save_logdata_th - Save Log Data events
* @mrioc: Adapter instance reference
* @event_data: event data associated with log data event
* @event_data_size: event data size to copy
@ -2932,7 +2932,7 @@ out:
*
* Return:Nothing
*/
void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,
u16 event_data_size)
{
u32 index = mrioc->logdata_buf_idx, sz;
@ -3255,6 +3255,29 @@ adp_state_show(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR_RO(adp_state);
/**
* fwfault_count_show() - SysFS callback to show firmware fault count
* @dev: class device
* @attr: Device attribute
* @buf: Buffer to copy data into
*
* Displays the total number of firmware faults detected by the driver
* since the controller was initialized.
*
* Return: Number of bytes written to @buf
*/
static ssize_t
fwfault_count_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct Scsi_Host *shost = class_to_shost(dev);
struct mpi3mr_ioc *mrioc = shost_priv(shost);
return snprintf(buf, PAGE_SIZE, "%llu\n", mrioc->fwfault_counter);
}
static DEVICE_ATTR_RO(fwfault_count);
static struct attribute *mpi3mr_host_attrs[] = {
&dev_attr_version_fw.attr,
&dev_attr_fw_queue_depth.attr,
@ -3263,6 +3286,7 @@ static struct attribute *mpi3mr_host_attrs[] = {
&dev_attr_reply_qfull_count.attr,
&dev_attr_logging_level.attr,
&dev_attr_adp_state.attr,
&dev_attr_fwfault_count.attr,
NULL,
};

View file

@ -21,6 +21,10 @@ static int mpi3mr_check_op_admin_proc(struct mpi3mr_ioc *mrioc);
static int poll_queues;
module_param(poll_queues, int, 0444);
MODULE_PARM_DESC(poll_queues, "Number of queues for io_uring poll mode. (Range 1 - 126)");
static bool threaded_isr_poll = true;
module_param(threaded_isr_poll, bool, 0444);
MODULE_PARM_DESC(threaded_isr_poll,
"Enablement of IRQ polling thread (default=true)");
#if defined(writeq) && defined(CONFIG_64BIT)
static inline void mpi3mr_writeq(__u64 b, void __iomem *addr,
@ -595,7 +599,8 @@ int mpi3mr_process_op_reply_q(struct mpi3mr_ioc *mrioc,
* Exit completion loop to avoid CPU lockup
* Ensure remaining completion happens from threaded ISR.
*/
if (num_op_reply > mrioc->max_host_ios) {
if ((num_op_reply > mrioc->max_host_ios) &&
(threaded_isr_poll == true)) {
op_reply_q->enable_irq_poll = true;
break;
}
@ -692,7 +697,7 @@ static irqreturn_t mpi3mr_isr(int irq, void *privdata)
* If more IOs are expected, schedule IRQ polling thread.
* Otherwise exit from ISR.
*/
if (!intr_info->op_reply_q)
if ((threaded_isr_poll == false) || !intr_info->op_reply_q)
return ret;
if (!intr_info->op_reply_q->enable_irq_poll ||
@ -771,8 +776,8 @@ static inline int mpi3mr_request_irq(struct mpi3mr_ioc *mrioc, u16 index)
intr_info->msix_index = index;
intr_info->op_reply_q = NULL;
snprintf(intr_info->name, MPI3MR_NAME_LENGTH, "%s%d-msix%d",
mrioc->driver_name, mrioc->id, index);
scnprintf(intr_info->name, MPI3MR_NAME_LENGTH,
"%.32s%d-msix%u", mrioc->driver_name, mrioc->id, index);
#ifndef CONFIG_PREEMPT_RT
retval = request_threaded_irq(pci_irq_vector(pdev, index), mpi3mr_isr,
@ -1103,6 +1108,31 @@ void mpi3mr_print_fault_info(struct mpi3mr_ioc *mrioc)
}
}
/**
* mpi3mr_save_fault_info - Save fault information
* @mrioc: Adapter instance reference
*
* Save the controller fault information if there is a
* controller fault.
*
* Return: Nothing.
*/
static void mpi3mr_save_fault_info(struct mpi3mr_ioc *mrioc)
{
u32 ioc_status, i;
ioc_status = readl(&mrioc->sysif_regs->ioc_status);
if (ioc_status & MPI3_SYSIF_IOC_STATUS_FAULT) {
mrioc->saved_fault_code = readl(&mrioc->sysif_regs->fault) &
MPI3_SYSIF_FAULT_CODE_MASK;
for (i = 0; i < 3; i++) {
mrioc->saved_fault_info[i] =
readl(&mrioc->sysif_regs->fault_info[i]);
}
}
}
/**
* mpi3mr_get_iocstate - Get IOC State
* @mrioc: Adapter instance reference
@ -1244,6 +1274,60 @@ out_failed:
mpi3mr_free_ioctl_dma_memory(mrioc);
}
/**
* mpi3mr_fault_uevent_emit - Emit uevent for any controller
* fault
* @mrioc: Pointer to the mpi3mr_ioc structure for the controller instance
*
* This function is invoked when the controller undergoes any
* type of fault.
*/
static void mpi3mr_fault_uevent_emit(struct mpi3mr_ioc *mrioc)
{
struct kobj_uevent_env *env;
int ret;
env = kzalloc(sizeof(*env), GFP_KERNEL);
if (!env)
return;
ret = add_uevent_var(env, "DRIVER=%s", mrioc->driver_name);
if (ret)
goto out_free;
ret = add_uevent_var(env, "IOC_ID=%u", mrioc->id);
if (ret)
goto out_free;
ret = add_uevent_var(env, "FAULT_CODE=0x%08x",
mrioc->saved_fault_code);
if (ret)
goto out_free;
ret = add_uevent_var(env, "FAULT_INFO0=0x%08x",
mrioc->saved_fault_info[0]);
if (ret)
goto out_free;
ret = add_uevent_var(env, "FAULT_INFO1=0x%08x",
mrioc->saved_fault_info[1]);
if (ret)
goto out_free;
ret = add_uevent_var(env, "FAULT_INFO2=0x%08x",
mrioc->saved_fault_info[2]);
if (ret)
goto out_free;
kobject_uevent_env(&mrioc->shost->shost_gendev.kobj,
KOBJ_CHANGE, env->envp);
out_free:
kfree(env);
}
/**
* mpi3mr_clear_reset_history - clear reset history
* @mrioc: Adapter instance reference
@ -1475,6 +1559,10 @@ retry_bring_ioc_ready:
if (ioc_state == MRIOC_STATE_FAULT) {
timeout = MPI3_SYSIF_DIAG_SAVE_TIMEOUT * 10;
mpi3mr_print_fault_info(mrioc);
mpi3mr_save_fault_info(mrioc);
mrioc->fault_during_init = 1;
mrioc->fwfault_counter++;
do {
host_diagnostic =
readl(&mrioc->sysif_regs->host_diagnostic);
@ -1701,7 +1789,9 @@ static int mpi3mr_issue_reset(struct mpi3mr_ioc *mrioc, u16 reset_type,
scratch_pad0 = ((MPI3MR_RESET_REASON_OSTYPE_LINUX <<
MPI3MR_RESET_REASON_OSTYPE_SHIFT) | (mrioc->facts.ioc_num <<
MPI3MR_RESET_REASON_IOCNUM_SHIFT) | reset_reason);
writel(reset_reason, &mrioc->sysif_regs->scratchpad[0]);
writel(scratch_pad0, &mrioc->sysif_regs->scratchpad[0]);
if (reset_type == MPI3_SYSIF_HOST_DIAG_RESET_ACTION_DIAG_FAULT)
mpi3mr_set_diagsave(mrioc);
writel(host_diagnostic | reset_type,
&mrioc->sysif_regs->host_diagnostic);
switch (reset_type) {
@ -2570,6 +2660,9 @@ void mpi3mr_check_rh_fault_ioc(struct mpi3mr_ioc *mrioc, u32 reason_code)
mpi3mr_set_trigger_data_in_all_hdb(mrioc,
MPI3MR_HDB_TRIGGER_TYPE_FAULT, &trigger_data, 0);
mpi3mr_print_fault_info(mrioc);
mpi3mr_save_fault_info(mrioc);
mrioc->fault_during_init = 1;
mrioc->fwfault_counter++;
return;
}
@ -2587,6 +2680,10 @@ void mpi3mr_check_rh_fault_ioc(struct mpi3mr_ioc *mrioc, u32 reason_code)
break;
msleep(100);
} while (--timeout);
mpi3mr_save_fault_info(mrioc);
mrioc->fault_during_init = 1;
mrioc->fwfault_counter++;
}
/**
@ -2763,6 +2860,11 @@ static void mpi3mr_watchdog_work(struct work_struct *work)
union mpi3mr_trigger_data trigger_data;
u16 reset_reason = MPI3MR_RESET_FROM_FAULT_WATCH;
if (mrioc->fault_during_init) {
mpi3mr_fault_uevent_emit(mrioc);
mrioc->fault_during_init = 0;
}
if (mrioc->reset_in_progress || mrioc->pci_err_recovery)
return;
@ -2835,6 +2937,10 @@ static void mpi3mr_watchdog_work(struct work_struct *work)
goto schedule_work;
}
mpi3mr_save_fault_info(mrioc);
mpi3mr_fault_uevent_emit(mrioc);
mrioc->fwfault_counter++;
switch (trigger_data.fault) {
case MPI3_SYSIF_FAULT_CODE_COMPLETE_RESET_NEEDED:
case MPI3_SYSIF_FAULT_CODE_POWER_CYCLE_REQUIRED:
@ -2878,11 +2984,8 @@ void mpi3mr_start_watchdog(struct mpi3mr_ioc *mrioc)
return;
INIT_DELAYED_WORK(&mrioc->watchdog_work, mpi3mr_watchdog_work);
snprintf(mrioc->watchdog_work_q_name,
sizeof(mrioc->watchdog_work_q_name), "watchdog_%s%d", mrioc->name,
mrioc->id);
mrioc->watchdog_work_q = alloc_ordered_workqueue(
"%s", WQ_MEM_RECLAIM, mrioc->watchdog_work_q_name);
"watchdog_%s%d", WQ_MEM_RECLAIM, mrioc->name, mrioc->id);
if (!mrioc->watchdog_work_q) {
ioc_err(mrioc, "%s: failed (line=%d)\n", __func__, __LINE__);
return;
@ -5401,6 +5504,7 @@ int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc,
{
int retval = 0, i;
unsigned long flags;
enum mpi3mr_iocstate ioc_state;
u32 host_diagnostic, timeout = MPI3_SYSIF_DIAG_SAVE_TIMEOUT * 10;
union mpi3mr_trigger_data trigger_data;
@ -5459,7 +5563,6 @@ int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc,
mrioc->io_admin_reset_sync = 1;
if (snapdump) {
mpi3mr_set_diagsave(mrioc);
retval = mpi3mr_issue_reset(mrioc,
MPI3_SYSIF_HOST_DIAG_RESET_ACTION_DIAG_FAULT, reset_reason);
if (!retval) {
@ -5473,6 +5576,10 @@ int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc,
break;
msleep(100);
} while (--timeout);
mpi3mr_save_fault_info(mrioc);
mpi3mr_fault_uevent_emit(mrioc);
mrioc->fwfault_counter++;
mpi3mr_set_trigger_data_in_all_hdb(mrioc,
MPI3MR_HDB_TRIGGER_TYPE_FAULT, &trigger_data, 0);
}
@ -5561,8 +5668,13 @@ out:
if (mrioc->pel_enabled)
atomic64_inc(&event_counter);
} else {
mpi3mr_issue_reset(mrioc,
MPI3_SYSIF_HOST_DIAG_RESET_ACTION_DIAG_FAULT, reset_reason);
dprint_reset(mrioc,
"soft_reset_handler failed, marking controller as unrecoverable\n");
ioc_state = mpi3mr_get_iocstate(mrioc);
if (ioc_state != MRIOC_STATE_FAULT)
mpi3mr_issue_reset(mrioc,
MPI3_SYSIF_HOST_DIAG_RESET_ACTION_DIAG_FAULT, reset_reason);
mrioc->device_refresh_on = 0;
mrioc->unrecoverable = 1;
mrioc->reset_in_progress = 0;

View file

@ -1138,6 +1138,89 @@ static void mpi3mr_refresh_tgtdevs(struct mpi3mr_ioc *mrioc)
}
}
/**
* mpi3mr_debug_dump_devpg0 - Dump device page0
* @mrioc: Adapter instance reference
* @dev_pg0: Device page 0.
*
* Prints pertinent details of the device page 0.
*
* Return: Nothing.
*/
static void
mpi3mr_debug_dump_devpg0(struct mpi3mr_ioc *mrioc, struct mpi3_device_page0 *dev_pg0)
{
ioc_info(mrioc,
"device_pg0: handle(0x%04x), perst_id(%d), wwid(0x%016llx), encl_handle(0x%04x), slot(%d)\n",
le16_to_cpu(dev_pg0->dev_handle),
le16_to_cpu(dev_pg0->persistent_id),
le64_to_cpu(dev_pg0->wwid), le16_to_cpu(dev_pg0->enclosure_handle),
le16_to_cpu(dev_pg0->slot));
ioc_info(mrioc, "device_pg0: access_status(0x%02x), flags(0x%04x), device_form(0x%02x), queue_depth(%d)\n",
dev_pg0->access_status, le16_to_cpu(dev_pg0->flags),
dev_pg0->device_form, le16_to_cpu(dev_pg0->queue_depth));
ioc_info(mrioc, "device_pg0: parent_handle(0x%04x), iounit_port(%d)\n",
le16_to_cpu(dev_pg0->parent_dev_handle), dev_pg0->io_unit_port);
switch (dev_pg0->device_form) {
case MPI3_DEVICE_DEVFORM_SAS_SATA:
{
struct mpi3_device0_sas_sata_format *sasinf =
&dev_pg0->device_specific.sas_sata_format;
ioc_info(mrioc,
"device_pg0: sas_sata: sas_address(0x%016llx),flags(0x%04x),\n"
"device_info(0x%04x), phy_num(%d), attached_phy_id(%d),negotiated_link_rate(0x%02x)\n",
le64_to_cpu(sasinf->sas_address),
le16_to_cpu(sasinf->flags),
le16_to_cpu(sasinf->device_info), sasinf->phy_num,
sasinf->attached_phy_identifier, sasinf->negotiated_link_rate);
break;
}
case MPI3_DEVICE_DEVFORM_PCIE:
{
struct mpi3_device0_pcie_format *pcieinf =
&dev_pg0->device_specific.pcie_format;
ioc_info(mrioc,
"device_pg0: pcie: port_num(%d), device_info(0x%04x), mdts(%d), page_sz(0x%02x)\n",
pcieinf->port_num, le16_to_cpu(pcieinf->device_info),
le32_to_cpu(pcieinf->maximum_data_transfer_size),
pcieinf->page_size);
ioc_info(mrioc,
"device_pg0: pcie: abort_timeout(%d), reset_timeout(%d) capabilities (0x%08x)\n",
pcieinf->nvme_abort_to, pcieinf->controller_reset_to,
le32_to_cpu(pcieinf->capabilities));
break;
}
case MPI3_DEVICE_DEVFORM_VD:
{
struct mpi3_device0_vd_format *vdinf =
&dev_pg0->device_specific.vd_format;
ioc_info(mrioc,
"device_pg0: vd: state(0x%02x), raid_level(%d), flags(0x%04x),\n"
"device_info(0x%04x) abort_timeout(%d), reset_timeout(%d)\n",
vdinf->vd_state, vdinf->raid_level,
le16_to_cpu(vdinf->flags),
le16_to_cpu(vdinf->device_info),
vdinf->vd_abort_to, vdinf->vd_reset_to);
ioc_info(mrioc,
"device_pg0: vd: tg_id(%d), high(%dMiB), low(%dMiB), qd_reduction_factor(%d)\n",
vdinf->io_throttle_group,
le16_to_cpu(vdinf->io_throttle_group_high),
le16_to_cpu(vdinf->io_throttle_group_low),
((le16_to_cpu(vdinf->flags) &
MPI3_DEVICE0_VD_FLAGS_IO_THROTTLE_GROUP_QD_MASK) >> 12));
break;
}
default:
break;
}
}
/**
* mpi3mr_update_tgtdev - DevStatusChange evt bottomhalf
* @mrioc: Adapter instance reference
@ -1159,6 +1242,10 @@ static void mpi3mr_update_tgtdev(struct mpi3mr_ioc *mrioc,
struct mpi3mr_enclosure_node *enclosure_dev = NULL;
u8 prot_mask = 0;
if (mrioc->logging_level &
(MPI3_DEBUG_EVENT | MPI3_DEBUG_EVENT_WORK_TASK))
mpi3mr_debug_dump_devpg0(mrioc, dev_pg0);
tgtdev->perst_id = le16_to_cpu(dev_pg0->persistent_id);
tgtdev->dev_handle = le16_to_cpu(dev_pg0->dev_handle);
tgtdev->dev_type = dev_pg0->device_form;
@ -1237,6 +1324,8 @@ static void mpi3mr_update_tgtdev(struct mpi3mr_ioc *mrioc,
tgtdev->dev_spec.sas_sata_inf.phy_id = sasinf->phy_num;
tgtdev->dev_spec.sas_sata_inf.attached_phy_id =
sasinf->attached_phy_identifier;
tgtdev->dev_spec.sas_sata_inf.negotiated_link_rate =
sasinf->negotiated_link_rate;
if ((dev_info & MPI3_SAS_DEVICE_INFO_DEVICE_TYPE_MASK) !=
MPI3_SAS_DEVICE_INFO_DEVICE_TYPE_END_DEVICE)
tgtdev->is_hidden = 1;
@ -1962,7 +2051,7 @@ static void mpi3mr_pcietopochg_evt_bh(struct mpi3mr_ioc *mrioc,
static void mpi3mr_logdata_evt_bh(struct mpi3mr_ioc *mrioc,
struct mpi3mr_fwevt *fwevt)
{
mpi3mr_app_save_logdata(mrioc, fwevt->event_data,
mpi3mr_app_save_logdata_th(mrioc, fwevt->event_data,
fwevt->event_data_size);
}
@ -3058,6 +3147,11 @@ void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,
}
case MPI3_EVENT_DEVICE_INFO_CHANGED:
case MPI3_EVENT_LOG_DATA:
sz = event_reply->event_data_length * 4;
mpi3mr_app_save_logdata_th(mrioc,
(char *)event_reply->event_data, sz);
break;
case MPI3_EVENT_ENCL_DEVICE_STATUS_CHANGE:
case MPI3_EVENT_ENCL_DEVICE_ADDED:
{
@ -5029,8 +5123,8 @@ inline bool mpi3mr_allow_scmd_to_fw(struct scsi_cmnd *scmd)
* SCSI_MLQUEUE_DEVICE_BUSY when the device is busy.
* SCSI_MLQUEUE_HOST_BUSY when the host queue is full.
*/
static int mpi3mr_qcmd(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
static enum scsi_qc_status mpi3mr_qcmd(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{
struct mpi3mr_ioc *mrioc = shost_priv(shost);
struct mpi3mr_stgt_priv_data *stgt_priv_data;
@ -5381,8 +5475,10 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (retval < 0)
goto id_alloc_failed;
mrioc->id = (u8)retval;
sprintf(mrioc->driver_name, "%s", MPI3MR_DRIVER_NAME);
sprintf(mrioc->name, "%s%d", mrioc->driver_name, mrioc->id);
strscpy(mrioc->driver_name, MPI3MR_DRIVER_NAME,
sizeof(mrioc->driver_name));
scnprintf(mrioc->name, sizeof(mrioc->name),
"%s%u", mrioc->driver_name, mrioc->id);
INIT_LIST_HEAD(&mrioc->list);
spin_lock(&mrioc_list_lock);
list_add_tail(&mrioc->list, &mrioc_list);
@ -5983,7 +6079,10 @@ static struct pci_driver mpi3mr_pci_driver = {
.remove = mpi3mr_remove,
.shutdown = mpi3mr_shutdown,
.err_handler = &mpi3mr_err_handler,
.driver.pm = &mpi3mr_pm_ops,
.driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.pm = &mpi3mr_pm_ops,
},
};
static ssize_t event_counter_show(struct device_driver *dd, char *buf)

View file

@ -2284,11 +2284,11 @@ void mpi3mr_expander_remove(struct mpi3mr_ioc *mrioc, u64 sas_address,
* @mrioc: Adapter instance reference
* @tgtdev: Target device
*
* This function identifies whether the target device is
* attached directly or through expander and issues sas phy
* page0 or expander phy page1 and gets the link rate, if there
* is any failure in reading the pages then this returns link
* rate of 1.5.
* This function first tries to use the link rate from DevicePage0
* (populated by firmware during device discovery). If the cached
* value is not available or invalid, it falls back to reading from
* sas phy page0 or expander phy page1.
*
*
* Return: logical link rate.
*/
@ -2301,6 +2301,14 @@ static u8 mpi3mr_get_sas_negotiated_logical_linkrate(struct mpi3mr_ioc *mrioc,
u32 phynum_handle;
u16 ioc_status;
/* First, try to use link rate from DevicePage0 (populated by firmware) */
if (tgtdev->dev_spec.sas_sata_inf.negotiated_link_rate >=
MPI3_SAS_NEG_LINK_RATE_1_5) {
link_rate = tgtdev->dev_spec.sas_sata_inf.negotiated_link_rate;
goto out;
}
/* Fallback to reading from phy pages if DevicePage0 value not available */
phy_number = tgtdev->dev_spec.sas_sata_inf.phy_id;
if (!(tgtdev->devpg0_flag & MPI3_DEVICE0_FLAGS_ATT_METHOD_DIR_ATTACHED)) {
phynum_handle = ((phy_number<<MPI3_SAS_EXPAND_PGAD_PHYNUM_SHIFT)
@ -2318,9 +2326,7 @@ static u8 mpi3mr_get_sas_negotiated_logical_linkrate(struct mpi3mr_ioc *mrioc,
__FILE__, __LINE__, __func__);
goto out;
}
link_rate = (expander_pg1.negotiated_link_rate &
MPI3_SAS_NEG_LINK_RATE_LOGICAL_MASK) >>
MPI3_SAS_NEG_LINK_RATE_LOGICAL_SHIFT;
link_rate = expander_pg1.negotiated_link_rate;
goto out;
}
if (mpi3mr_cfg_get_sas_phy_pg0(mrioc, &ioc_status, &phy_pg0,
@ -2335,11 +2341,11 @@ static u8 mpi3mr_get_sas_negotiated_logical_linkrate(struct mpi3mr_ioc *mrioc,
__FILE__, __LINE__, __func__);
goto out;
}
link_rate = (phy_pg0.negotiated_link_rate &
MPI3_SAS_NEG_LINK_RATE_LOGICAL_MASK) >>
MPI3_SAS_NEG_LINK_RATE_LOGICAL_SHIFT;
link_rate = phy_pg0.negotiated_link_rate;
out:
return link_rate;
return ((link_rate & MPI3_SAS_NEG_LINK_RATE_LOGICAL_MASK) >>
MPI3_SAS_NEG_LINK_RATE_LOGICAL_SHIFT);
}
/**

View file

@ -843,11 +843,8 @@ mpt3sas_base_start_watchdog(struct MPT3SAS_ADAPTER *ioc)
/* initialize fault polling */
INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work);
snprintf(ioc->fault_reset_work_q_name,
sizeof(ioc->fault_reset_work_q_name), "poll_%s%d_status",
ioc->driver_name, ioc->id);
ioc->fault_reset_work_q = alloc_ordered_workqueue(
"%s", WQ_MEM_RECLAIM, ioc->fault_reset_work_q_name);
"poll_%s%d_status", WQ_MEM_RECLAIM, ioc->driver_name, ioc->id);
if (!ioc->fault_reset_work_q) {
ioc_err(ioc, "%s: failed (line=%d)\n", __func__, __LINE__);
return;
@ -1564,6 +1561,8 @@ _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid)
int i;
u16 ctl_smid = ioc->scsiio_depth - INTERNAL_SCSIIO_CMDS_COUNT + 1;
u8 cb_idx = 0xFF;
u16 discovery_smid =
ioc->shost->can_queue + INTERNAL_SCSIIO_FOR_DISCOVERY;
if (smid < ioc->hi_priority_smid) {
struct scsiio_tracker *st;
@ -1572,8 +1571,10 @@ _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid)
st = _get_st_from_smid(ioc, smid);
if (st)
cb_idx = st->cb_idx;
} else if (smid == ctl_smid)
} else if (smid < discovery_smid)
cb_idx = ioc->ctl_cb_idx;
else
cb_idx = ioc->scsih_cb_idx;
} else if (smid < ioc->internal_smid) {
i = smid - ioc->hi_priority_smid;
cb_idx = ioc->hpr_lookup[i].cb_idx;
@ -3174,7 +3175,7 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index)
if (index >= ioc->iopoll_q_start_index) {
qid = index - ioc->iopoll_q_start_index;
snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-mq-poll%d",
scnprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-mq-poll%d",
ioc->driver_name, ioc->id, qid);
reply_q->is_iouring_poll_q = 1;
ioc->io_uring_poll_queues[qid].reply_q = reply_q;
@ -3183,10 +3184,10 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index)
if (ioc->msix_enable)
snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d",
scnprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d",
ioc->driver_name, ioc->id, index);
else
snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d",
scnprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d",
ioc->driver_name, ioc->id);
r = request_irq(pci_irq_vector(pdev, index), _base_interrupt,
IRQF_SHARED, reply_q->name, reply_q);

View file

@ -147,6 +147,7 @@
#define INTERNAL_CMDS_COUNT 10 /* reserved cmds */
/* reserved for issuing internally framed scsi io cmds */
#define INTERNAL_SCSIIO_CMDS_COUNT 3
#define INTERNAL_SCSIIO_FOR_DISCOVERY 2
#define MPI3_HIM_MASK 0xFFFFFFFF /* mask every bit*/
@ -480,6 +481,7 @@ struct MPT3SAS_DEVICE {
u32 flags;
u8 configured_lun;
u8 block;
u8 deleted;
u8 tlr_snoop_check;
u8 ignore_delay_remove;
/* Iopriority Command Handling */
@ -577,7 +579,9 @@ struct _sas_device {
u8 chassis_slot;
u8 is_chassis_slot_valid;
u8 connector_name[5];
u8 ssd_device;
struct kref refcount;
u8 port_type;
struct hba_port *port;
struct sas_rphy *rphy;
@ -1159,9 +1163,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc);
* @mask_interrupts: ignore interrupt
* @pci_access_mutex: Mutex to synchronize ioctl, sysfs show path and
* pci resource handling
* @fault_reset_work_q_name: fw fault work queue
* @fault_reset_work_q: ""
* @fault_reset_work: ""
* @fault_reset_work_q: fw fault workqueue
* @fault_reset_work: fw fault work
* @firmware_event_thread: fw event work queue
* @fw_event_lock:
* @fw_event_list: list of fw events
@ -1345,7 +1348,6 @@ struct MPT3SAS_ADAPTER {
u8 mask_interrupts;
/* fw fault handler */
char fault_reset_work_q_name[20];
struct workqueue_struct *fault_reset_work_q;
struct delayed_work fault_reset_work;

File diff suppressed because it is too large Load diff

View file

@ -2077,8 +2077,8 @@ error:
* @shost: Scsi host to queue command on
* @scmd: SCSI command to be queued
*/
static int mvumi_queue_command(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
static enum scsi_qc_status mvumi_queue_command(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{
struct mvumi_cmd *cmd;
struct mvumi_hba *mhba;

View file

@ -1260,8 +1260,8 @@ static int myrb_host_reset(struct scsi_cmnd *scmd)
return SUCCESS;
}
static int myrb_pthru_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
static enum scsi_qc_status myrb_pthru_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{
struct request *rq = scsi_cmd_to_rq(scmd);
struct myrb_hba *cb = shost_priv(shost);
@ -1416,8 +1416,8 @@ static void myrb_read_capacity(struct myrb_hba *cb, struct scsi_cmnd *scmd,
scsi_sg_copy_from_buffer(scmd, data, 8);
}
static int myrb_ldev_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
static enum scsi_qc_status myrb_ldev_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{
struct myrb_hba *cb = shost_priv(shost);
struct myrb_cmdblk *cmd_blk = scsi_cmd_priv(scmd);
@ -1603,8 +1603,8 @@ submit:
return 0;
}
static int myrb_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
static enum scsi_qc_status myrb_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{
struct scsi_device *sdev = scmd->device;

View file

@ -1581,8 +1581,8 @@ static void myrs_mode_sense(struct myrs_hba *cs, struct scsi_cmnd *scmd,
scsi_sg_copy_from_buffer(scmd, modes, mode_len);
}
static int myrs_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
static enum scsi_qc_status myrs_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *scmd)
{
struct request *rq = scsi_cmd_to_rq(scmd);
struct myrs_hba *cs = shost_priv(shost);

View file

@ -7852,7 +7852,7 @@ static int ncr53c8xx_sdev_configure(struct scsi_device *device,
return 0;
}
static int ncr53c8xx_queue_command_lck(struct scsi_cmnd *cmd)
static enum scsi_qc_status ncr53c8xx_queue_command_lck(struct scsi_cmnd *cmd)
{
struct ncr_cmd_priv *cmd_priv = scsi_cmd_priv(cmd);
void (*done)(struct scsi_cmnd *) = scsi_done;

View file

@ -185,7 +185,8 @@ static void __exit exit_nsp32 (void);
static int nsp32_show_info (struct seq_file *, struct Scsi_Host *);
static int nsp32_detect (struct pci_dev *pdev);
static int nsp32_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
static enum scsi_qc_status nsp32_queuecommand(struct Scsi_Host *,
struct scsi_cmnd *);
static const char *nsp32_info (struct Scsi_Host *);
static int nsp32_release (struct Scsi_Host *);
@ -905,7 +906,7 @@ static int nsp32_setup_sg_table(struct scsi_cmnd *SCpnt)
return TRUE;
}
static int nsp32_queuecommand_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status nsp32_queuecommand_lck(struct scsi_cmnd *SCpnt)
{
void (*done)(struct scsi_cmnd *) = scsi_done;
nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;

View file

@ -186,7 +186,7 @@ static void nsp_scsi_done(struct scsi_cmnd *SCpnt)
scsi_done(SCpnt);
}
static int nsp_queuecommand_lck(struct scsi_cmnd *const SCpnt)
static enum scsi_qc_status nsp_queuecommand_lck(struct scsi_cmnd *const SCpnt)
{
struct scsi_pointer *scsi_pointer = nsp_priv(SCpnt);
#ifdef NSP_DEBUG

View file

@ -294,7 +294,8 @@ static struct Scsi_Host *nsp_detect (struct scsi_host_template *sht);
static const char *nsp_info (struct Scsi_Host *shpnt);
static int nsp_show_info (struct seq_file *m,
struct Scsi_Host *host);
static int nsp_queuecommand(struct Scsi_Host *h, struct scsi_cmnd *SCpnt);
static enum scsi_qc_status nsp_queuecommand(struct Scsi_Host *h,
struct scsi_cmnd *SCpnt);
/* Error handler */
/*static int nsp_eh_abort (struct scsi_cmnd *SCpnt);*/

View file

@ -544,7 +544,7 @@ SYM53C500_info(struct Scsi_Host *SChost)
return (info_msg);
}
static int SYM53C500_queue_lck(struct scsi_cmnd *SCpnt)
static enum scsi_qc_status SYM53C500_queue_lck(struct scsi_cmnd *SCpnt)
{
struct sym53c500_cmd_priv *scp = scsi_cmd_priv(SCpnt);
int i;

Some files were not shown because too many files have changed in this diff Show more