Set one command aside as a TMF command, and use this command to
send the TMF. This avoids having to rely on the passed-in scsi
command when resetting the device.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/csiostor/csio_hw.h | 2 ++
drivers/scsi/csiostor/csio_init.c | 2
As we now have moved the error handler functions to not rely on
a scsi command we can drop the out-of-band scsi command allocation
from scsi_ioctl_reset().
Signed-off-by: Hannes Reinecke
---
drivers/scsi/scsi_error.c | 124 +++---
1 file
When sending a device reset we should not take a reference to the
scsi command.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aic7xxx/aic7xxx_osm.c | 102 -
1 file changed, 54 insertions(+), 48 deletions(-)
diff --git
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aic7xxx/aic79xx_osm.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c
b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 0797c2f..66f9450 100644
---
When sending a TMF we're only concerned with the rport and the LUN ID,
so use struct fc_rport as argument for qedf_initiate_tmf().
Signed-off-by: Hannes Reinecke
---
drivers/scsi/qedf/qedf.h | 5 +++--
drivers/scsi/qedf/qedf_io.c | 48
From: Hannes Reinecke
Reduce the queue depth by 1, and use this command as a dedicated
reset command send_tmf().
Signed-off-by: Hannes Reinecke
---
drivers/scsi/cxlflash/common.h | 3 ++-
drivers/scsi/cxlflash/main.c | 23 ---
2 files
Device and target reset will be using different calling sequences,
so there's not point in trying to combine both.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/qla2xxx/qla_os.c | 106 --
1 file changed, 71 insertions(+), 35 deletions(-)
For device reset we shouldn't rely on the scsi command, so allow
scsifront_action_handler() to be called with a NULL command argument.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/xen-scsifront.c | 20 +---
1 file changed, 13 insertions(+), 7 deletions(-)
diff
Use a dedicated command to send a device reset instead of relying
on using the command which triggered the device failure.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/snic/snic_scsi.c | 52 ---
1 file changed, 24 insertions(+), 28
The bus reset should not depend on any command, but rather only
use the SCSI Host and the channel/bus number as argument.
Signed-off-by: Hannes Reinecke
---
Documentation/scsi/scsi_eh.txt | 2 +-
Documentation/scsi/scsi_mid_low_api.txt | 5 ++--
Instead of passing in a scsi device we should be using the rport;
we already have the target and lun id as parameters, so there's
no need to pass the scsi device, too.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc_scsi.c | 12 ++--
1 file changed, 6
From: Hannes Reinecke
For target reset we need a device to send the target reset to,
so open-code the loop in target reset to send the target reset TMF
to the correct device.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/ibmvscsi/ibmvfc.c | 39
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aic7xxx/aic7xxx_osm.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c
b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index 5f9d2ae..72f3007 100644
---
When calling bus_reset we have potentially several ports to be
reset, so this patch open-codes the existing mptfc_block_error_handler()
to wait for all ports attached to this bus.
Signed-off-by: Hannes Reinecke
---
drivers/message/fusion/mptfc.c | 17 ++---
1 file
When sending a device reset we should not take a reference to the
scsi command.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aic7xxx/aic79xx_osm.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c
When a LUN or target reset is issued we should not rely on a scsi
command to be present; this isn't very reliable and is going away
with the next patch anyway.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/bnx2fc/bnx2fc.h | 1 +
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 14
Add scsi device as argument to scsifront_do_request() so that it
will be possible to call it with a NULL command pointer.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/xen-scsifront.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff
Use the scsi device as argument to orc_device_reset() instead
of relying on the passed in scsi command.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/a100u2w.c | 43 +++
1 file changed, 11 insertions(+), 32 deletions(-)
diff --git
The bfa driver hijacks the scsi command to signal the TMF status,
which will no longer work if the TMF handler will be converted.
So rework TMF handling to not use a scsi command but rather add
new TMF fields to the per-device structure.
Signed-off-by: Hannes Reinecke
---
The target reset function should only depend on the scsi target,
not the scsi command.
Signed-off-by: Hannes Reinecke
---
drivers/message/fusion/mptsas.c | 10 +-
drivers/message/fusion/mptscsih.c | 27 +++--
drivers/message/fusion/mptscsih.h
Use a dedicated command to send a device reset instead of relying
on using the command which triggered the device failure.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/fnic/fnic_main.c | 2 ++
drivers/scsi/fnic/fnic_scsi.c | 78 +--
2
When generating debugging messages the code should not rely on
a scsi command to be present.
Signed-off-by: Hannes Reinecke
---
drivers/s390/scsi/zfcp_dbf.c | 28 ++--
drivers/s390/scsi/zfcp_dbf.h | 10 +++---
drivers/s390/scsi/zfcp_ext.h | 4 ++--
From: Hannes Reinecke
The LLDD needs a command to send the reset with, so look at the
list of outstanding commands to get one.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aha152x.c | 24 ++--
1 file changed, 14 insertions(+), 10
Instead of passing the a function we can as well return a status
and call the function directly afterwards.
Signed-off-by: Hannes Reinecke
---
drivers/message/fusion/mptfc.c | 83 +++---
1 file changed, 54 insertions(+), 29 deletions(-)
diff
zfcp_task_mgmt_function() is only used for lun and device reset,
so it should be using the scsi device as an argument, not the
scsi command.
Signed-off-by: Hannes Reinecke
---
drivers/s390/scsi/zfcp_ext.h | 2 +-
drivers/s390/scsi/zfcp_fc.h | 9 +
fc_block_scsi_eh() works on a remote port, so we should be using
that as an argument, and not the scsi command.
Signed-off-by: Hannes Reinecke
---
drivers/s390/scsi/zfcp_scsi.c | 6 --
drivers/scsi/bnx2fc/bnx2fc_io.c | 4 ++--
drivers/scsi/csiostor/csio_scsi.c | 4
There's not much in common between host reset and all other error
handlers, so use a separate function here.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/qla1280.c | 40 +---
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git
Split off the combined abort and device reset handling into
distinct functions.
And the current device reset handler really is a target reset,
so rename it.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/sym53c8xx_2/sym_glue.c | 82 +
1 file
Issuing a host reset should not rely on any commands.
So use Scsi_Host as argument for eh_host_reset_handler.
Signed-off-by: Hannes Reinecke
---
Documentation/scsi/scsi_eh.txt | 2 +-
Documentation/scsi/scsi_mid_low_api.txt | 4 +--
iscsi_eh_target_reset() and iscsi_eh_session_reset() only depend
on the cls_session, so use that as an argument.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/be2iscsi/be_main.c | 10 +-
drivers/scsi/libiscsi.c | 21 +
include/scsi/libiscsi.h
We only need the rport structure for lpfc_chk_tgt_mapped().
Signed-off-by: Hannes Reinecke
---
drivers/scsi/lpfc/lpfc_scsi.c | 24 ++--
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c
The code for aborting an outstanding command is a copy of the
functionality from command abort. As we already have called this
function once we reach host reset there's no point in trying to
do so again.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/ips.c | 17 -
Hi all,
finally here's the patchset to revamp the SCSI EH callback arguments
which I promised to do (some years ago ...).
The overall idea is to match the scope of the eh_XXX callbacks with
the appropriate argument, eg eh_device_reset_handler() should have a
scsi device as argument etc.
Relying
From: Hannes Reinecke
mptscsih_dev_reset() is _not_ a device reset, but rather a
target reset. Nevertheless it's being used for either purpose.
This patch is adding a correct implementation for
mptscsih_dev_reset(), and renames the original function
to mptscsih_target_reset.
When calling a host reset we shouldn't rely on the command triggering
the reset, so allow megaraid_abort_and_reset() to be called with a
NULL scb.
And drop the pointless 'bus_reset' and 'target_reset' handlers, which
just call the same function as host_reset.
Signed-off-by: Hannes Reinecke
Rather than re-using the failed command the snic driver should
reserve one command for TMFs.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/snic/snic.h | 3 ++-
drivers/scsi/snic/snic_main.c | 3 +++
drivers/scsi/snic/snic_scsi.c | 51
The current handler does both, bus reset and host reset.
So split them off into two distinct functions.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/sym53c8xx_2/sym_glue.c | 107 ++--
1 file changed, 66 insertions(+), 41 deletions(-)
diff --git
Split off reset FIB generation into separate functions.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/linit.c | 83 ++--
1 file changed, 50 insertions(+), 33 deletions(-)
diff --git a/drivers/scsi/aacraid/linit.c
The reset code requires a device to be selected, but we shouldn't
rely on the command to provide a device for us. So select the first
device on the bus when sending down a bus reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/pmcraid.c | 46
When issuing a bus reset we should complete all commands, not
just the command triggering the reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/linit.c | 34 --
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git
aac_hba_send() will return FAILED for any non-SCSI command requests,
failing any TMFs. This patch updates the check to allow TMFs.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/commsup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
When sending a reset fib we shouldn't rely on the scsi command,
but rather set the TMF status in the map_info->reset_state variable.
That allows us to send a TMF independent on a scsi command.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/linit.c | 96
Split off device, target, and bus reset functionality into
individual functions.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/linit.c | 141 +++
1 file changed, 102 insertions(+), 39 deletions(-)
diff --git
To correctly identify which fib has a scsi command callback this
patch implements a flag FIB_CONTEXT_FLAG_SCSI_CMD.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/aacraid.h | 1 +
drivers/scsi/aacraid/commsup.c | 1 +
2 files changed, 2 insertions(+)
diff --git
Split off the host reset parts of aac_eh_reset() into a separate
host reset function.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/aacraid/linit.c | 33 ++---
1 file changed, 22 insertions(+), 11 deletions(-)
diff --git
When we're resetting the host any remote port states will
be reset anyway, so it's pointless to wait for dev_loss_tmo
during host reset.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/message/fusion/mptfc.c | 10 +-
1 file changed,
bus_reset and host_reset are the same functions, so drop bus_reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/ppa.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index f6ad579..7be5823 100644
--- a/drivers/scsi/ppa.c
+++
From: Hannes Reinecke
bus reset is essentially identical to host reset, and will always
return SUCCESS, thus disabling the use of host reset.
So drop bus reset in favour of host reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/nsp32.c | 22
lpfc_bus_reset_handler() is really just a loop calling
lpfc_target_reset_handler() over all targets, which is what
the error handler will be doing anyway.
And lpfc_no_handler() will return FAILED, just like SCSI EH
does if no handler is present.
So drop both.
Signed-off-by: Hannes Reinecke
The bus reset function is really a host reset, so move it to
eh_host_reset_handler.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/scsi/arm/acornscsi.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git
Just displaying some different information; drop it.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/eata.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index 227dd2c..6501c33 100644
---
There's no need to keep the private data for a device in a separate
list; better to store it in ->hostdata and do away with the additional
list.
Signed-off-by: Hannes Reinecke
Cc: David Kershner
---
drivers/staging/unisys/visorhba/visorhba_main.c | 123
The bus reset function is just a wrapper calling host reset
under the host lock. So move taking of the host lock into
the host reset function and drop bus reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/a2091.c | 17 -
drivers/scsi/a3000.c | 17
qedf has a host reset handler, but as the bus reset handler is
a stub always returning SUCCESS the host reset is never invoked.
So drop the bus reset handler.
Signed-off-by: Hannes Reinecke
Cc: Chad Dupuis
---
drivers/scsi/qedf/qedf_main.c | 11
Never used anywhere.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/scsi/bnx2fc/bnx2fc.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h
index 7e007e1..901a316 100644
---
megaraid_mbox only has one reset function, and that is a host reset.
So drop the duplicate bus reset and device reset functions.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/megaraid/megaraid_mbox.c | 2 --
1 file changed, 2 deletions(-)
diff --git
When calling host reset we're resetting all ports anyway, so
there is no point in waiting for the ports to become unblocked.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/scsi/libfc/fc_fcp.c | 2 --
1 file changed, 2 deletions(-)
diff
Hi all,
finally here's the patchset to revamp the SCSI EH callback arguments
which I promised to do (some years ago ...).
The overall idea is to match the scope of the eh_XXX callbacks with
the appropriate argument, eg eh_device_reset_handler() should have a
scsi device as argument etc.
Relying
The bus reset handler really is a host reset, so move it to
eh_bus_reset_handler.
Signed-off-by: Hannes Reinecke
Acked-by: Finn Thain
---
drivers/scsi/NCR5380.c | 4 ++--
drivers/scsi/arm/cumana_1.c | 2 +-
drivers/scsi/arm/oak.c | 2 +-
bus reset always returns SUCCESS, meaning host reset was never
tested. At the same time the only difference to the HBA is a
missing call to NCR_700_chip_reset().
So add the missing call to bus reset, drop host reset, and move
bus reset to host reset.
Signed-off-by: Hannes Reinecke
When we're resetting the host any remote port states will
be reset anyway, so it's pointless to wait for dev_loss_tmo
during host reset.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/scsi/ibmvscsi/ibmvfc.c | 6 +-
1 file changed, 1
From: Hannes Reinecke
The bus reset handler is really a host reset.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/scsi/pcmcia/qlogic_stub.c | 4 ++--
drivers/scsi/qlogicfas.c | 2 +-
drivers/scsi/qlogicfas408.c
The bus_reset handler is really a device reset, so move it
to eh_device_reset_handler().
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/usb/storage/uas.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
command abort already returns FAILED, which will then be escalated
to a host reset. So no need to call host_reset directly.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/scsi/fnic/fnic_scsi.c | 4
1 file changed, 4 deletions(-)
diff
host_reset and bus_reset is the same function, so drop bus reset.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/imm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 9164ce12..87c9419 100644
--- a/drivers/scsi/imm.c
+++
Function is a stub, so can as well be dropped.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/staging/rts5208/rtsx.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/drivers/staging/rts5208/rtsx.c
The bus reset function really is a host reset, so move it to
eh_host_reset_handler().
Signed-off-by: Hannes Reinecke
---
drivers/scsi/fdomain.c | 6 +++---
drivers/scsi/fdomain.h | 2 +-
drivers/scsi/pcmcia/fdomain_stub.c | 2 +-
3 files changed, 5
The bus reset handler is just calling target reset on all targets,
which is exactly what SCSI EH will be doing anyway.
So move the bus reset function to target reset and drop the loop.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
The bus reset handler is calling I_T Nexus reset, which logically
is a target reset as it need to specify both the initiator and
the target.
So move it to target reset.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
From: Hannes Reinecke
The bus reset function is a subset of host reset, but will always
return SUCCESS. But as the host reset also invokes a reset for
all ports there is a possibility that the bus reset will not be
able to fully reset the HBA, leading to a blocked system.
So drop
The Highpoint driver only has one reset function, and that is
a host reset. So stop pretending we're doing anything else.
Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
---
drivers/scsi/hptiop.c | 11 ---
1 file changed, 4 insertions(+), 7
The function returns '0' if successful; with the original comment
the function doesn't have a way to indicate success ...
Signed-off-by: Hannes Reinecke
Reviewed-by: Bart van Assche
---
drivers/scsi/scsi_lib.c | 2 +-
1 file changed, 1 insertion(+), 1
On Tue, Jun 27, 2017 at 02:55:58PM -0400, Ewan Milne wrote:
> From: "Ewan D. Milne"
>
> The addition of the STARGET_REMOVE state had the side effect of
> introducing a race condition that can cause a crash.
>
> scsi_target_reap_ref_release() checks the starget->state to
> see
If the user request handler completed the request with a CHECK CONDITION
status, tcmu_handle_completion() copies the command entry sense data
into the session request structure sense data. However, the sense data
length indicated by the field scsi_sense_length is not set and equal to
0, resulting
On completion of a request sent to the target backstore device,
pscsi_req_done() calls target_complete_cmd() which in turn will execute
pscsi_transport_complete(). In case of a failed request, this last
function will copy the target request sense data to the initiator side
request sense data.
This series introduce zoned block device support for the pscsi backstore and
also fixes several problems with sense data handling for failed requests.
The first patch is only a cleanup, so not really necessary but nice to have I
think.
Patch 2 and 3 introduce support for host managed zoned block
TYPE_ZBC host managed zoned block devices are also block devices
despite the non-standard device type (14h). Handle them similarly to
regular TYPE_DISK devices.
Signed-off-by: Damien Le Moal
---
drivers/target/target_core_pscsi.c | 17 +++--
1 file changed, 11
Add WRITE_VERIFY_32 definition to scsi prototypes and use this macro
definition isntead of the hard coded value. Same for the already defined
WRITE_VERIFY_16 command code.
Signed-off-by: Damien Le Moal
---
drivers/target/target_core_device.c | 4 ++--
For a target device without a transport->transport_complete method
defined (e.g. target_core_user), target_complete_cmd() will always
result in a failed command completion being processed through target
failure completion work even when the command failure comes from the
target processing and has
101 - 179 of 179 matches
Mail list logo