diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_fc.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 49a7a90501b6..c22c47868550 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Fibre Channel related functions for the zfcp device driver. | 4 | * Fibre Channel related functions for the zfcp device driver. |
5 | * | 5 | * |
6 | * Copyright IBM Corporation 2008 | 6 | * Copyright IBM Corporation 2008, 2009 |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define KMSG_COMPONENT "zfcp" | 9 | #define KMSG_COMPONENT "zfcp" |
@@ -376,10 +376,14 @@ static void zfcp_fc_adisc_handler(unsigned long data) | |||
376 | port->wwnn = ls_adisc->wwnn; | 376 | port->wwnn = ls_adisc->wwnn; |
377 | 377 | ||
378 | if ((port->wwpn != ls_adisc->wwpn) || | 378 | if ((port->wwpn != ls_adisc->wwpn) || |
379 | !(atomic_read(&port->status) & ZFCP_STATUS_COMMON_OPEN)) | 379 | !(atomic_read(&port->status) & ZFCP_STATUS_COMMON_OPEN)) { |
380 | zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, | 380 | zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, |
381 | "fcadh_2", NULL); | 381 | "fcadh_2", NULL); |
382 | goto out; | ||
383 | } | ||
382 | 384 | ||
385 | /* port is good, unblock rport without going through erp */ | ||
386 | zfcp_scsi_schedule_rport_register(port); | ||
383 | out: | 387 | out: |
384 | zfcp_port_put(port); | 388 | zfcp_port_put(port); |
385 | kfree(adisc); | 389 | kfree(adisc); |
@@ -423,14 +427,23 @@ void zfcp_fc_link_test_work(struct work_struct *work) | |||
423 | container_of(work, struct zfcp_port, test_link_work); | 427 | container_of(work, struct zfcp_port, test_link_work); |
424 | int retval; | 428 | int retval; |
425 | 429 | ||
430 | if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_UNBLOCKED)) { | ||
431 | zfcp_port_put(port); | ||
432 | return; /* port erp is running and will update rport status */ | ||
433 | } | ||
434 | |||
435 | zfcp_port_get(port); | ||
436 | port->rport_task = RPORT_DEL; | ||
437 | zfcp_scsi_rport_work(&port->rport_work); | ||
438 | |||
426 | retval = zfcp_fc_adisc(port); | 439 | retval = zfcp_fc_adisc(port); |
427 | if (retval == 0) | 440 | if (retval == 0) |
428 | return; | 441 | return; |
429 | 442 | ||
430 | /* send of ADISC was not possible */ | 443 | /* send of ADISC was not possible */ |
444 | zfcp_erp_port_forced_reopen(port, 0, "fcltwk1", NULL); | ||
445 | |||
431 | zfcp_port_put(port); | 446 | zfcp_port_put(port); |
432 | if (retval != -EBUSY) | ||
433 | zfcp_erp_port_forced_reopen(port, 0, "fcltwk1", NULL); | ||
434 | } | 447 | } |
435 | 448 | ||
436 | /** | 449 | /** |