diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 03:08:27 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 03:08:27 -0400 |
commit | e19553427c2e8fdb04fdd98e407164bb59a840ba (patch) | |
tree | 5332234b2dad07c03c27e4608afb16f297f41e61 /drivers/scsi/bnx2i/bnx2i_iscsi.c | |
parent | 35f6cd4a06432034665a1499ca4b022437423aac (diff) | |
parent | 83515bc7df812555e20cda48614674e2f346f9f5 (diff) |
Merge branch 'sh/stable-updates'
Conflicts:
arch/sh/kernel/dwarf.c
drivers/dma/shdma.c
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/scsi/bnx2i/bnx2i_iscsi.c')
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_iscsi.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index cb71dc984797..fa68ab34b998 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) | 12 | * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | ||
15 | #include <scsi/scsi_tcq.h> | 16 | #include <scsi/scsi_tcq.h> |
16 | #include <scsi/libiscsi.h> | 17 | #include <scsi/libiscsi.h> |
17 | #include "bnx2i.h" | 18 | #include "bnx2i.h" |
@@ -819,6 +820,11 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic) | |||
819 | 820 | ||
820 | spin_lock_init(&hba->lock); | 821 | spin_lock_init(&hba->lock); |
821 | mutex_init(&hba->net_dev_lock); | 822 | mutex_init(&hba->net_dev_lock); |
823 | init_waitqueue_head(&hba->eh_wait); | ||
824 | if (test_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type)) | ||
825 | hba->hba_shutdown_tmo = 240 * HZ; | ||
826 | else /* 5706/5708/5709 */ | ||
827 | hba->hba_shutdown_tmo = 30 * HZ; | ||
822 | 828 | ||
823 | if (iscsi_host_add(shost, &hba->pcidev->dev)) | 829 | if (iscsi_host_add(shost, &hba->pcidev->dev)) |
824 | goto free_dump_mem; | 830 | goto free_dump_mem; |
@@ -1657,8 +1663,8 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost, | |||
1657 | */ | 1663 | */ |
1658 | hba = bnx2i_check_route(dst_addr); | 1664 | hba = bnx2i_check_route(dst_addr); |
1659 | 1665 | ||
1660 | if (!hba) { | 1666 | if (!hba || test_bit(ADAPTER_STATE_GOING_DOWN, &hba->adapter_state)) { |
1661 | rc = -ENOMEM; | 1667 | rc = -EINVAL; |
1662 | goto check_busy; | 1668 | goto check_busy; |
1663 | } | 1669 | } |
1664 | 1670 | ||
@@ -1803,7 +1809,7 @@ static int bnx2i_ep_poll(struct iscsi_endpoint *ep, int timeout_ms) | |||
1803 | (bnx2i_ep->state == | 1809 | (bnx2i_ep->state == |
1804 | EP_STATE_CONNECT_COMPL)), | 1810 | EP_STATE_CONNECT_COMPL)), |
1805 | msecs_to_jiffies(timeout_ms)); | 1811 | msecs_to_jiffies(timeout_ms)); |
1806 | if (!rc || (bnx2i_ep->state == EP_STATE_OFLD_FAILED)) | 1812 | if (bnx2i_ep->state == EP_STATE_OFLD_FAILED) |
1807 | rc = -1; | 1813 | rc = -1; |
1808 | 1814 | ||
1809 | if (rc > 0) | 1815 | if (rc > 0) |
@@ -1956,6 +1962,8 @@ return_bnx2i_ep: | |||
1956 | 1962 | ||
1957 | if (!hba->ofld_conns_active) | 1963 | if (!hba->ofld_conns_active) |
1958 | bnx2i_unreg_dev_all(); | 1964 | bnx2i_unreg_dev_all(); |
1965 | |||
1966 | wake_up_interruptible(&hba->eh_wait); | ||
1959 | } | 1967 | } |
1960 | 1968 | ||
1961 | 1969 | ||