diff options
author | Andreas Herrmann <aherrman@de.ibm.com> | 2005-09-13 15:49:52 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-09-19 14:02:21 -0400 |
commit | 810f1e3ea5cc0a812816af97020a27c73441f8e9 (patch) | |
tree | 7f98b35f5dcf950d3835adde0a4854be141887ab /drivers/s390/scsi | |
parent | 77eb1699c76177af2f3d65c8ae7934cf304e0254 (diff) |
[SCSI] zfcp: shorten eh_bus_reset and eh_host_reset handlers
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 3b5d48c61534..eeb5152854ed 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -587,50 +587,38 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) | |||
587 | return retval; | 587 | return retval; |
588 | } | 588 | } |
589 | 589 | ||
590 | /* | 590 | /** |
591 | * function: zfcp_scsi_eh_bus_reset_handler | 591 | * zfcp_scsi_eh_bus_reset_handler - reset bus (reopen adapter) |
592 | * | ||
593 | * purpose: | ||
594 | * | ||
595 | * returns: | ||
596 | */ | 592 | */ |
597 | int | 593 | int |
598 | zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt) | 594 | zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt) |
599 | { | 595 | { |
600 | int retval = 0; | 596 | struct zfcp_unit *unit = (struct zfcp_unit*) scpnt->device->hostdata; |
601 | struct zfcp_unit *unit; | 597 | struct zfcp_adapter *adapter = unit->port->adapter; |
602 | 598 | ||
603 | unit = (struct zfcp_unit *) scpnt->device->hostdata; | ||
604 | ZFCP_LOG_NORMAL("bus reset because of problems with " | 599 | ZFCP_LOG_NORMAL("bus reset because of problems with " |
605 | "unit 0x%016Lx\n", unit->fcp_lun); | 600 | "unit 0x%016Lx\n", unit->fcp_lun); |
606 | zfcp_erp_adapter_reopen(unit->port->adapter, 0); | 601 | zfcp_erp_adapter_reopen(adapter, 0); |
607 | zfcp_erp_wait(unit->port->adapter); | 602 | zfcp_erp_wait(adapter); |
608 | retval = SUCCESS; | ||
609 | 603 | ||
610 | return retval; | 604 | return SUCCESS; |
611 | } | 605 | } |
612 | 606 | ||
613 | /* | 607 | /** |
614 | * function: zfcp_scsi_eh_host_reset_handler | 608 | * zfcp_scsi_eh_host_reset_handler - reset host (reopen adapter) |
615 | * | ||
616 | * purpose: | ||
617 | * | ||
618 | * returns: | ||
619 | */ | 609 | */ |
620 | int | 610 | int |
621 | zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) | 611 | zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) |
622 | { | 612 | { |
623 | int retval = 0; | 613 | struct zfcp_unit *unit = (struct zfcp_unit*) scpnt->device->hostdata; |
624 | struct zfcp_unit *unit; | 614 | struct zfcp_adapter *adapter = unit->port->adapter; |
625 | 615 | ||
626 | unit = (struct zfcp_unit *) scpnt->device->hostdata; | ||
627 | ZFCP_LOG_NORMAL("host reset because of problems with " | 616 | ZFCP_LOG_NORMAL("host reset because of problems with " |
628 | "unit 0x%016Lx\n", unit->fcp_lun); | 617 | "unit 0x%016Lx\n", unit->fcp_lun); |
629 | zfcp_erp_adapter_reopen(unit->port->adapter, 0); | 618 | zfcp_erp_adapter_reopen(adapter, 0); |
630 | zfcp_erp_wait(unit->port->adapter); | 619 | zfcp_erp_wait(adapter); |
631 | retval = SUCCESS; | ||
632 | 620 | ||
633 | return retval; | 621 | return SUCCESS; |
634 | } | 622 | } |
635 | 623 | ||
636 | /* | 624 | /* |