Skip to content

Commit

Permalink
[SCSI] zfcp: shorten eh_bus_reset and eh_host_reset handlers
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Andreas Herrmann authored and James Bottomley committed Sep 19, 2005
1 parent 77eb169 commit 810f1e3
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,50 +587,38 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags)
return retval;
}

/*
* function: zfcp_scsi_eh_bus_reset_handler
*
* purpose:
*
* returns:
/**
* zfcp_scsi_eh_bus_reset_handler - reset bus (reopen adapter)
*/
int
zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt)
{
int retval = 0;
struct zfcp_unit *unit;
struct zfcp_unit *unit = (struct zfcp_unit*) scpnt->device->hostdata;
struct zfcp_adapter *adapter = unit->port->adapter;

unit = (struct zfcp_unit *) scpnt->device->hostdata;
ZFCP_LOG_NORMAL("bus reset because of problems with "
"unit 0x%016Lx\n", unit->fcp_lun);
zfcp_erp_adapter_reopen(unit->port->adapter, 0);
zfcp_erp_wait(unit->port->adapter);
retval = SUCCESS;
zfcp_erp_adapter_reopen(adapter, 0);
zfcp_erp_wait(adapter);

return retval;
return SUCCESS;
}

/*
* function: zfcp_scsi_eh_host_reset_handler
*
* purpose:
*
* returns:
/**
* zfcp_scsi_eh_host_reset_handler - reset host (reopen adapter)
*/
int
zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
{
int retval = 0;
struct zfcp_unit *unit;
struct zfcp_unit *unit = (struct zfcp_unit*) scpnt->device->hostdata;
struct zfcp_adapter *adapter = unit->port->adapter;

unit = (struct zfcp_unit *) scpnt->device->hostdata;
ZFCP_LOG_NORMAL("host reset because of problems with "
"unit 0x%016Lx\n", unit->fcp_lun);
zfcp_erp_adapter_reopen(unit->port->adapter, 0);
zfcp_erp_wait(unit->port->adapter);
retval = SUCCESS;
zfcp_erp_adapter_reopen(adapter, 0);
zfcp_erp_wait(adapter);

return retval;
return SUCCESS;
}

/*
Expand Down

0 comments on commit 810f1e3

Please sign in to comment.