(added Cc: LSML)

Kristian Høgsberg wrote:
> Also, implement the .eh_host_reset_handler callback instead of
> .eh_abort_handler since that's what we're actually doing.

You reset the target port (or specifically, the fetch agent acting on
that target port).  But the .eh_host_reset_handler is to "ask [the] host
adapter to reset itself".  Or in the words of scsi_mid_low_api.txt:
   eh_abort_handler - abort given command
   eh_bus_reset_handler - issue SCSI bus reset
   eh_device_reset_handler - issue SCSI device reset
   eh_host_reset_handler - reset host (host bus adapter)

The closest concept to "host bus adpaters" in SBP-2 are initiator ports,
and there is no notion of resetting an SBP-2 initiator port.

But theoretic semantics aside:  Check drivers/scsi/scsi_error.c for what
comes after one or another hostt->eh_ handler was called.  Do you want
the subsequent call to scsi_report_bus_reset()?  Probably not.  But
perhaps you want what comes after hostt->eh_device_reset_handler was called.

> Signed-off-by: Kristian Høgsberg <[EMAIL PROTECTED]>
> ---
>  drivers/firewire/fw-sbp2.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
> index a752523..c768834 100644
> --- a/drivers/firewire/fw-sbp2.c
> +++ b/drivers/firewire/fw-sbp2.c
> @@ -1068,12 +1068,13 @@ static int sbp2_scsi_slave_configure(struct 
> scsi_device *sdev)
>   * Called by scsi stack when something has really gone wrong.  Usually
>   * called when a command has timed-out for some reason.
>   */
> -static int sbp2_scsi_abort(struct scsi_cmnd *cmd)
> +static int sbp2_scsi_host_reset_handler(struct scsi_cmnd *cmd)
>  {
> -     struct fw_unit *unit = (struct fw_unit *)cmd->device->host->hostdata[0];
> +     struct fw_unit *unit =
> +             (struct fw_unit *) cmd->device->host->hostdata[0];
>  
>       fw_notify("sbp2_scsi_abort\n");
> -
> +     sbp2_agent_reset(unit);
>       sbp2_cancel_orbs(unit);
>  
>       return SUCCESS;
> @@ -1086,7 +1087,7 @@ static struct scsi_host_template scsi_driver_template = 
> {
>       .queuecommand           = sbp2_scsi_queuecommand,
>       .slave_alloc            = sbp2_scsi_slave_alloc,
>       .slave_configure        = sbp2_scsi_slave_configure,
> -     .eh_abort_handler       = sbp2_scsi_abort,
> +     .eh_host_reset_handler  = sbp2_scsi_host_reset_handler,
>       .this_id                = -1,
>       .sg_tablesize           = SG_ALL,
>       .use_clustering         = ENABLE_CLUSTERING,


-- 
Stefan Richter
-=====-=-=== -=-- -=-==
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to