aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c30
4 files changed, 4 insertions, 40 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 2ff4342ae362..a9ceb39751a1 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1547,6 +1547,10 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
1547 *((fc_port_t **)rport->dd_data) = NULL; 1547 *((fc_port_t **)rport->dd_data) = NULL;
1548 spin_unlock_irq(host->host_lock); 1548 spin_unlock_irq(host->host_lock);
1549 1549
1550 /* Now that the rport has been deleted, set the fcport state to
1551 FCS_DEVICE_DEAD */
1552 atomic_set(&fcport->state, FCS_DEVICE_DEAD);
1553
1550 if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags)) 1554 if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags))
1551 return; 1555 return;
1552 1556
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index e1d3ad40a946..3a22effced5f 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -1700,9 +1700,7 @@ typedef struct fc_port {
1700 atomic_t state; 1700 atomic_t state;
1701 uint32_t flags; 1701 uint32_t flags;
1702 1702
1703 int port_login_retry_count;
1704 int login_retry; 1703 int login_retry;
1705 atomic_t port_down_timer;
1706 1704
1707 struct fc_rport *rport, *drport; 1705 struct fc_rport *rport, *drport;
1708 u32 supported_classes; 1706 u32 supported_classes;
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index c8d0b121560d..8c486609244c 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2916,20 +2916,12 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
2916void 2916void
2917qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) 2917qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
2918{ 2918{
2919 struct qla_hw_data *ha = vha->hw;
2920
2921 fcport->vha = vha; 2919 fcport->vha = vha;
2922 fcport->login_retry = 0; 2920 fcport->login_retry = 0;
2923 fcport->port_login_retry_count = ha->port_down_retry_count *
2924 PORT_RETRY_TIME;
2925 atomic_set(&fcport->port_down_timer, ha->port_down_retry_count *
2926 PORT_RETRY_TIME);
2927 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); 2921 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
2928 2922
2929 qla2x00_iidma_fcport(vha, fcport); 2923 qla2x00_iidma_fcport(vha, fcport);
2930
2931 atomic_set(&fcport->state, FCS_ONLINE); 2924 atomic_set(&fcport->state, FCS_ONLINE);
2932
2933 qla2x00_reg_remote_port(vha, fcport); 2925 qla2x00_reg_remote_port(vha, fcport);
2934} 2926}
2935 2927
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 800ea9269752..efbb8e7ba568 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -3547,11 +3547,9 @@ void
3547qla2x00_timer(scsi_qla_host_t *vha) 3547qla2x00_timer(scsi_qla_host_t *vha)
3548{ 3548{
3549 unsigned long cpu_flags = 0; 3549 unsigned long cpu_flags = 0;
3550 fc_port_t *fcport;
3551 int start_dpc = 0; 3550 int start_dpc = 0;
3552 int index; 3551 int index;
3553 srb_t *sp; 3552 srb_t *sp;
3554 int t;
3555 uint16_t w; 3553 uint16_t w;
3556 struct qla_hw_data *ha = vha->hw; 3554 struct qla_hw_data *ha = vha->hw;
3557 struct req_que *req; 3555 struct req_que *req;
@@ -3567,34 +3565,6 @@ qla2x00_timer(scsi_qla_host_t *vha)
3567 /* Hardware read to raise pending EEH errors during mailbox waits. */ 3565 /* Hardware read to raise pending EEH errors during mailbox waits. */
3568 if (!pci_channel_offline(ha->pdev)) 3566 if (!pci_channel_offline(ha->pdev))
3569 pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w); 3567 pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w);
3570 /*
3571 * Ports - Port down timer.
3572 *
3573 * Whenever, a port is in the LOST state we start decrementing its port
3574 * down timer every second until it reaches zero. Once it reaches zero
3575 * the port it marked DEAD.
3576 */
3577 t = 0;
3578 list_for_each_entry(fcport, &vha->vp_fcports, list) {
3579 if (fcport->port_type != FCT_TARGET)
3580 continue;
3581
3582 if (atomic_read(&fcport->state) == FCS_DEVICE_LOST) {
3583
3584 if (atomic_read(&fcport->port_down_timer) == 0)
3585 continue;
3586
3587 if (atomic_dec_and_test(&fcport->port_down_timer) != 0)
3588 atomic_set(&fcport->state, FCS_DEVICE_DEAD);
3589
3590 DEBUG(printk("scsi(%ld): fcport-%d - port retry count: "
3591 "%d remaining\n",
3592 vha->host_no,
3593 t, atomic_read(&fcport->port_down_timer)));
3594 }
3595 t++;
3596 } /* End of for fcport */
3597
3598 3568
3599 /* Loop down handler. */ 3569 /* Loop down handler. */
3600 if (atomic_read(&vha->loop_down_timer) > 0 && 3570 if (atomic_read(&vha->loop_down_timer) > 0 &&