diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2023-10-13 20:25:20 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-10-13 20:25:20 +0200 |
commit | 9f4c887fe64e27413509979b5be3fb2630d813ba (patch) | |
tree | 03cc7acf5c670b192709d0c987736fbc048dbe06 /drivers/scsi/qedf/qedf_main.c | |
parent | scsi: ibmvfc: Use 'unsigned int' for single-bit bitfields in 'struct ibmvfc_h... (diff) | |
parent | scsi: mpi3mr: Split off bus_reset function from host_reset (diff) | |
download | linux-9f4c887fe64e27413509979b5be3fb2630d813ba.tar.xz linux-9f4c887fe64e27413509979b5be3fb2630d813ba.zip |
Merge patch series "scsi: EH rework prep patches, part 1"
Hannes Reinecke <hare@suse.de> says:
Hi all,
(taking up an old thread:) here's the first batch of patches for my EH
rework. It modifies the reset callbacks for SCSI drivers such that
the final conversion to drop the 'struct scsi_cmnd' argument and use
the entity in question (host, bus, target, device) as the argument to
the SCSI EH callbacks becomes possible. The first part covers drivers
which just requires minor tweaks.
Link: https://lore.kernel.org/r/20231002154328.43718-1-hare@suse.de
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf/qedf_main.c')
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 91f3f1d7098e..a58353b7b4e8 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -774,7 +774,7 @@ static int qedf_eh_abort(struct scsi_cmnd *sc_cmd) goto drop_rdata_kref; } - rc = fc_block_scsi_eh(sc_cmd); + rc = fc_block_rport(rport); if (rc) goto drop_rdata_kref; @@ -858,18 +858,19 @@ out: static int qedf_eh_target_reset(struct scsi_cmnd *sc_cmd) { - QEDF_ERR(NULL, "%d:0:%d:%lld: TARGET RESET Issued...", - sc_cmd->device->host->host_no, sc_cmd->device->id, - sc_cmd->device->lun); - return qedf_initiate_tmf(sc_cmd, FCP_TMF_TGT_RESET); + struct scsi_target *starget = scsi_target(sc_cmd->device); + struct fc_rport *rport = starget_to_rport(starget); + + QEDF_ERR(NULL, "TARGET RESET Issued..."); + return qedf_initiate_tmf(rport, 0, FCP_TMF_TGT_RESET); } static int qedf_eh_device_reset(struct scsi_cmnd *sc_cmd) { - QEDF_ERR(NULL, "%d:0:%d:%lld: LUN RESET Issued... ", - sc_cmd->device->host->host_no, sc_cmd->device->id, - sc_cmd->device->lun); - return qedf_initiate_tmf(sc_cmd, FCP_TMF_LUN_RESET); + struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device)); + + QEDF_ERR(NULL, "LUN RESET Issued...\n"); + return qedf_initiate_tmf(rport, sc_cmd->device->lun, FCP_TMF_LUN_RESET); } bool qedf_wait_for_upload(struct qedf_ctx *qedf) |