diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-05 18:42:02 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-05 18:42:02 +0300 |
commit | fe91c4725aeed35023ba4f7a1e1adfebb6878c23 (patch) | |
tree | 7f0e5cbbbe3a1e24d3e3b66ae290625d48ec4b2f /drivers/scsi/qedf | |
parent | 5af06603c4090617be216a9185193a7be3ca60af (diff) | |
parent | 83c3a7beaef7fd261c190b69f6be6337f251bf16 (diff) | |
download | linux-fe91c4725aeed35023ba4f7a1e1adfebb6878c23.tar.xz |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley:
"This consists of the usual driver updates (ufs, smartpqi, lpfc,
target, megaraid_sas, hisi_sas, qla2xxx) and minor updates and bug
fixes.
Notable core changes are the removal of scsi->tag which caused some
churn in obsolete drivers and a sweep through all drivers to call
scsi_done() directly instead of scsi->done() which removes a pointer
indirection from the hot path and a move to register core sysfs files
earlier, which means they're available to KOBJ_ADD processing, which
necessitates switching all drivers to using attribute groups"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (279 commits)
scsi: lpfc: Update lpfc version to 14.0.0.3
scsi: lpfc: Allow fabric node recovery if recovery is in progress before devloss
scsi: lpfc: Fix link down processing to address NULL pointer dereference
scsi: lpfc: Allow PLOGI retry if previous PLOGI was aborted
scsi: lpfc: Fix use-after-free in lpfc_unreg_rpi() routine
scsi: lpfc: Correct sysfs reporting of loop support after SFP status change
scsi: lpfc: Wait for successful restart of SLI3 adapter during host sg_reset
scsi: lpfc: Revert LOG_TRACE_EVENT back to LOG_INIT prior to driver_resource_setup()
scsi: ufs: ufshcd-pltfrm: Fix memory leak due to probe defer
scsi: ufs: mediatek: Avoid sched_clock() misuse
scsi: mpt3sas: Make mpt3sas_dev_attrs static
scsi: scsi_transport_sas: Add 22.5 Gbps link rate definitions
scsi: target: core: Stop using bdevname()
scsi: aha1542: Use memcpy_{from,to}_bvec()
scsi: sr: Add error handling support for add_disk()
scsi: sd: Add error handling support for add_disk()
scsi: target: Perform ALUA group changes in one step
scsi: target: Replace lun_tg_pt_gp_lock with rcu in I/O path
scsi: target: Fix alua_tg_pt_gps_count tracking
scsi: target: Fix ordered tag handling
...
Diffstat (limited to 'drivers/scsi/qedf')
-rw-r--r-- | drivers/scsi/qedf/qedf.h | 2 | ||||
-rw-r--r-- | drivers/scsi/qedf/qedf_attr.c | 15 | ||||
-rw-r--r-- | drivers/scsi/qedf/qedf_io.c | 19 | ||||
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 2 |
4 files changed, 20 insertions, 18 deletions
diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h index 631a15969d21..ca987451b17e 100644 --- a/drivers/scsi/qedf/qedf.h +++ b/drivers/scsi/qedf/qedf.h @@ -498,7 +498,7 @@ extern void qedf_process_abts_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, extern struct qedf_ioreq *qedf_alloc_cmd(struct qedf_rport *fcport, u8 cmd_type); -extern struct device_attribute *qedf_host_attrs[]; +extern const struct attribute_group *qedf_host_groups[]; extern void qedf_cmd_timer_set(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, unsigned int timer_msec); extern int qedf_init_mp_req(struct qedf_ioreq *io_req); diff --git a/drivers/scsi/qedf/qedf_attr.c b/drivers/scsi/qedf/qedf_attr.c index 461c0c9180c4..fdc66d294813 100644 --- a/drivers/scsi/qedf/qedf_attr.c +++ b/drivers/scsi/qedf/qedf_attr.c @@ -60,12 +60,21 @@ static ssize_t fka_period_show(struct device *dev, static DEVICE_ATTR_RO(fcoe_mac); static DEVICE_ATTR_RO(fka_period); -struct device_attribute *qedf_host_attrs[] = { - &dev_attr_fcoe_mac, - &dev_attr_fka_period, +static struct attribute *qedf_host_attrs[] = { + &dev_attr_fcoe_mac.attr, + &dev_attr_fka_period.attr, NULL, }; +static const struct attribute_group qedf_host_attr_group = { + .attrs = qedf_host_attrs +}; + +const struct attribute_group *qedf_host_groups[] = { + &qedf_host_attr_group, + NULL +}; + extern const struct qed_fcoe_ops *qed_ops; void qedf_capture_grc_dump(struct qedf_ctx *qedf) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index b649f835d436..99a56ca1fb16 100644 --- a/drivers/scsi/qedf/qedf_io.c +++ b/drivers/scsi/qedf/qedf_io.c @@ -947,7 +947,7 @@ qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd) "Number of SG elements %d exceeds what hardware limitation of %d.\n", num_sgs, QEDF_MAX_BDS_PER_CMD); sc_cmd->result = DID_ERROR; - sc_cmd->scsi_done(sc_cmd); + scsi_done(sc_cmd); return 0; } @@ -957,7 +957,7 @@ qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd) "Returning DNC as unloading or stop io, flags 0x%lx.\n", qedf->flags); sc_cmd->result = DID_NO_CONNECT << 16; - sc_cmd->scsi_done(sc_cmd); + scsi_done(sc_cmd); return 0; } @@ -966,7 +966,7 @@ qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd) "Completing sc_cmd=%p DID_NO_CONNECT as MSI-X is not enabled.\n", sc_cmd); sc_cmd->result = DID_NO_CONNECT << 16; - sc_cmd->scsi_done(sc_cmd); + scsi_done(sc_cmd); return 0; } @@ -976,7 +976,7 @@ qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd) "fc_remote_port_chkready failed=0x%x for port_id=0x%06x.\n", rval, rport->port_id); sc_cmd->result = rval; - sc_cmd->scsi_done(sc_cmd); + scsi_done(sc_cmd); return 0; } @@ -1313,7 +1313,7 @@ out: io_req->sc_cmd = NULL; sc_cmd->SCp.ptr = NULL; - sc_cmd->scsi_done(sc_cmd); + scsi_done(sc_cmd); kref_put(&io_req->refcount, qedf_release_cmd); } @@ -1386,13 +1386,6 @@ void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, goto bad_scsi_ptr; } - if (!sc_cmd->scsi_done) { - QEDF_ERR(&qedf->dbg_ctx, - "sc_cmd->scsi_done for sc_cmd %p is NULL.\n", - sc_cmd); - goto bad_scsi_ptr; - } - qedf_unmap_sg_list(qedf, io_req); sc_cmd->result = result << 16; @@ -1417,7 +1410,7 @@ void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, io_req->sc_cmd = NULL; sc_cmd->SCp.ptr = NULL; - sc_cmd->scsi_done(sc_cmd); + scsi_done(sc_cmd); kref_put(&io_req->refcount, qedf_release_cmd); return; diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 0da32fd3302e..1bf7a22d4948 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -986,7 +986,7 @@ static struct scsi_host_template qedf_host_template = { .cmd_per_lun = 32, .max_sectors = 0xffff, .queuecommand = qedf_queuecommand, - .shost_attrs = qedf_host_attrs, + .shost_groups = qedf_host_groups, .eh_abort_handler = qedf_eh_abort, .eh_device_reset_handler = qedf_eh_device_reset, /* lun reset */ .eh_target_reset_handler = qedf_eh_target_reset, /* target reset */ |