diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 21:49:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 21:49:04 -0400 |
commit | 1a0b6abaea78f73d9bc0a2f6df2d9e4c917cade1 (patch) | |
tree | faae6f0b72b00a0a4d44cadc607e576e1954a5bc /drivers/scsi/bnx2i | |
parent | 3e75c6de1ac33fe3500f44573d9212dc82c99f59 (diff) | |
parent | b2bff6ceb61a9a21294f04057d30c9bb4910a88f (diff) |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull first round of SCSI updates from James Bottomley:
"This patch consists of the usual driver updates (megaraid_sas,
scsi_debug, qla2xxx, qla4xxx, lpfc, bnx2fc, be2iscsi, hpsa, ipr) plus
an assortment of minor fixes and the first precursors of SCSI-MQ (the
code path simplifications) and the bug fix for the USB oops on remove
(which involves an infrastructure change, so is sent via the main tree
with a delayed backport after a cycle in which it is shown to
introduce no new bugs)"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (196 commits)
[SCSI] sd: Quiesce mode sense error messages
[SCSI] add support for per-host cmd pools
[SCSI] simplify command allocation and freeing a bit
[SCSI] megaraid: simplify internal command handling
[SCSI] ses: Use vpd information from scsi_device
[SCSI] Add EVPD page 0x83 and 0x80 to sysfs
[SCSI] Return VPD page length in scsi_vpd_inquiry()
[SCSI] scsi_sysfs: Implement 'is_visible' callback
[SCSI] hpsa: update driver version to 3.4.4-1
[SCSI] hpsa: fix bad endif placement in RAID 5 mapper code
[SCSI] qla2xxx: Fix build errors related to invalid print fields on some architectures.
[SCSI] bfa: Replace large udelay() with mdelay()
[SCSI] vmw_pvscsi: Some improvements in pvscsi driver.
[SCSI] vmw_pvscsi: Add support for I/O requests coalescing.
[SCSI] vmw_pvscsi: Fix pvscsi_abort() function.
[SCSI] remove deprecated IRQF_DISABLED from SCSI
[SCSI] bfa: Updating Maintainers email ids
[SCSI] ipr: Add new CCIN definition for Grand Canyon support
[SCSI] ipr: Format HCAM overlay ID 0x21
[SCSI] ipr: Use pci_enable_msi_range() and pci_enable_msix_range()
...
Diffstat (limited to 'drivers/scsi/bnx2i')
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_hwi.c | 46 | ||||
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_iscsi.c | 8 |
2 files changed, 27 insertions, 27 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index b87a1933f880..b5ffd280a1ae 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c | |||
@@ -1361,7 +1361,7 @@ int bnx2i_process_scsi_cmd_resp(struct iscsi_session *session, | |||
1361 | u32 datalen = 0; | 1361 | u32 datalen = 0; |
1362 | 1362 | ||
1363 | resp_cqe = (struct bnx2i_cmd_response *)cqe; | 1363 | resp_cqe = (struct bnx2i_cmd_response *)cqe; |
1364 | spin_lock_bh(&session->lock); | 1364 | spin_lock_bh(&session->back_lock); |
1365 | task = iscsi_itt_to_task(conn, | 1365 | task = iscsi_itt_to_task(conn, |
1366 | resp_cqe->itt & ISCSI_CMD_RESPONSE_INDEX); | 1366 | resp_cqe->itt & ISCSI_CMD_RESPONSE_INDEX); |
1367 | if (!task) | 1367 | if (!task) |
@@ -1432,7 +1432,7 @@ done: | |||
1432 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, | 1432 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, |
1433 | conn->data, datalen); | 1433 | conn->data, datalen); |
1434 | fail: | 1434 | fail: |
1435 | spin_unlock_bh(&session->lock); | 1435 | spin_unlock_bh(&session->back_lock); |
1436 | return 0; | 1436 | return 0; |
1437 | } | 1437 | } |
1438 | 1438 | ||
@@ -1457,7 +1457,7 @@ static int bnx2i_process_login_resp(struct iscsi_session *session, | |||
1457 | int pad_len; | 1457 | int pad_len; |
1458 | 1458 | ||
1459 | login = (struct bnx2i_login_response *) cqe; | 1459 | login = (struct bnx2i_login_response *) cqe; |
1460 | spin_lock(&session->lock); | 1460 | spin_lock(&session->back_lock); |
1461 | task = iscsi_itt_to_task(conn, | 1461 | task = iscsi_itt_to_task(conn, |
1462 | login->itt & ISCSI_LOGIN_RESPONSE_INDEX); | 1462 | login->itt & ISCSI_LOGIN_RESPONSE_INDEX); |
1463 | if (!task) | 1463 | if (!task) |
@@ -1500,7 +1500,7 @@ static int bnx2i_process_login_resp(struct iscsi_session *session, | |||
1500 | bnx2i_conn->gen_pdu.resp_buf, | 1500 | bnx2i_conn->gen_pdu.resp_buf, |
1501 | bnx2i_conn->gen_pdu.resp_wr_ptr - bnx2i_conn->gen_pdu.resp_buf); | 1501 | bnx2i_conn->gen_pdu.resp_wr_ptr - bnx2i_conn->gen_pdu.resp_buf); |
1502 | done: | 1502 | done: |
1503 | spin_unlock(&session->lock); | 1503 | spin_unlock(&session->back_lock); |
1504 | return 0; | 1504 | return 0; |
1505 | } | 1505 | } |
1506 | 1506 | ||
@@ -1525,7 +1525,7 @@ static int bnx2i_process_text_resp(struct iscsi_session *session, | |||
1525 | int pad_len; | 1525 | int pad_len; |
1526 | 1526 | ||
1527 | text = (struct bnx2i_text_response *) cqe; | 1527 | text = (struct bnx2i_text_response *) cqe; |
1528 | spin_lock(&session->lock); | 1528 | spin_lock(&session->back_lock); |
1529 | task = iscsi_itt_to_task(conn, text->itt & ISCSI_LOGIN_RESPONSE_INDEX); | 1529 | task = iscsi_itt_to_task(conn, text->itt & ISCSI_LOGIN_RESPONSE_INDEX); |
1530 | if (!task) | 1530 | if (!task) |
1531 | goto done; | 1531 | goto done; |
@@ -1561,7 +1561,7 @@ static int bnx2i_process_text_resp(struct iscsi_session *session, | |||
1561 | bnx2i_conn->gen_pdu.resp_wr_ptr - | 1561 | bnx2i_conn->gen_pdu.resp_wr_ptr - |
1562 | bnx2i_conn->gen_pdu.resp_buf); | 1562 | bnx2i_conn->gen_pdu.resp_buf); |
1563 | done: | 1563 | done: |
1564 | spin_unlock(&session->lock); | 1564 | spin_unlock(&session->back_lock); |
1565 | return 0; | 1565 | return 0; |
1566 | } | 1566 | } |
1567 | 1567 | ||
@@ -1584,7 +1584,7 @@ static int bnx2i_process_tmf_resp(struct iscsi_session *session, | |||
1584 | struct iscsi_tm_rsp *resp_hdr; | 1584 | struct iscsi_tm_rsp *resp_hdr; |
1585 | 1585 | ||
1586 | tmf_cqe = (struct bnx2i_tmf_response *)cqe; | 1586 | tmf_cqe = (struct bnx2i_tmf_response *)cqe; |
1587 | spin_lock(&session->lock); | 1587 | spin_lock(&session->back_lock); |
1588 | task = iscsi_itt_to_task(conn, | 1588 | task = iscsi_itt_to_task(conn, |
1589 | tmf_cqe->itt & ISCSI_TMF_RESPONSE_INDEX); | 1589 | tmf_cqe->itt & ISCSI_TMF_RESPONSE_INDEX); |
1590 | if (!task) | 1590 | if (!task) |
@@ -1600,7 +1600,7 @@ static int bnx2i_process_tmf_resp(struct iscsi_session *session, | |||
1600 | 1600 | ||
1601 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr, NULL, 0); | 1601 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr, NULL, 0); |
1602 | done: | 1602 | done: |
1603 | spin_unlock(&session->lock); | 1603 | spin_unlock(&session->back_lock); |
1604 | return 0; | 1604 | return 0; |
1605 | } | 1605 | } |
1606 | 1606 | ||
@@ -1623,7 +1623,7 @@ static int bnx2i_process_logout_resp(struct iscsi_session *session, | |||
1623 | struct iscsi_logout_rsp *resp_hdr; | 1623 | struct iscsi_logout_rsp *resp_hdr; |
1624 | 1624 | ||
1625 | logout = (struct bnx2i_logout_response *) cqe; | 1625 | logout = (struct bnx2i_logout_response *) cqe; |
1626 | spin_lock(&session->lock); | 1626 | spin_lock(&session->back_lock); |
1627 | task = iscsi_itt_to_task(conn, | 1627 | task = iscsi_itt_to_task(conn, |
1628 | logout->itt & ISCSI_LOGOUT_RESPONSE_INDEX); | 1628 | logout->itt & ISCSI_LOGOUT_RESPONSE_INDEX); |
1629 | if (!task) | 1629 | if (!task) |
@@ -1647,7 +1647,7 @@ static int bnx2i_process_logout_resp(struct iscsi_session *session, | |||
1647 | 1647 | ||
1648 | bnx2i_conn->ep->state = EP_STATE_LOGOUT_RESP_RCVD; | 1648 | bnx2i_conn->ep->state = EP_STATE_LOGOUT_RESP_RCVD; |
1649 | done: | 1649 | done: |
1650 | spin_unlock(&session->lock); | 1650 | spin_unlock(&session->back_lock); |
1651 | return 0; | 1651 | return 0; |
1652 | } | 1652 | } |
1653 | 1653 | ||
@@ -1668,12 +1668,12 @@ static void bnx2i_process_nopin_local_cmpl(struct iscsi_session *session, | |||
1668 | struct iscsi_task *task; | 1668 | struct iscsi_task *task; |
1669 | 1669 | ||
1670 | nop_in = (struct bnx2i_nop_in_msg *)cqe; | 1670 | nop_in = (struct bnx2i_nop_in_msg *)cqe; |
1671 | spin_lock(&session->lock); | 1671 | spin_lock(&session->back_lock); |
1672 | task = iscsi_itt_to_task(conn, | 1672 | task = iscsi_itt_to_task(conn, |
1673 | nop_in->itt & ISCSI_NOP_IN_MSG_INDEX); | 1673 | nop_in->itt & ISCSI_NOP_IN_MSG_INDEX); |
1674 | if (task) | 1674 | if (task) |
1675 | __iscsi_put_task(task); | 1675 | __iscsi_put_task(task); |
1676 | spin_unlock(&session->lock); | 1676 | spin_unlock(&session->back_lock); |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | /** | 1679 | /** |
@@ -1712,7 +1712,7 @@ static int bnx2i_process_nopin_mesg(struct iscsi_session *session, | |||
1712 | 1712 | ||
1713 | nop_in = (struct bnx2i_nop_in_msg *)cqe; | 1713 | nop_in = (struct bnx2i_nop_in_msg *)cqe; |
1714 | 1714 | ||
1715 | spin_lock(&session->lock); | 1715 | spin_lock(&session->back_lock); |
1716 | hdr = (struct iscsi_nopin *)&bnx2i_conn->gen_pdu.resp_hdr; | 1716 | hdr = (struct iscsi_nopin *)&bnx2i_conn->gen_pdu.resp_hdr; |
1717 | memset(hdr, 0, sizeof(struct iscsi_hdr)); | 1717 | memset(hdr, 0, sizeof(struct iscsi_hdr)); |
1718 | hdr->opcode = nop_in->op_code; | 1718 | hdr->opcode = nop_in->op_code; |
@@ -1738,7 +1738,7 @@ static int bnx2i_process_nopin_mesg(struct iscsi_session *session, | |||
1738 | } | 1738 | } |
1739 | done: | 1739 | done: |
1740 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, NULL, 0); | 1740 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, NULL, 0); |
1741 | spin_unlock(&session->lock); | 1741 | spin_unlock(&session->back_lock); |
1742 | 1742 | ||
1743 | return tgt_async_nop; | 1743 | return tgt_async_nop; |
1744 | } | 1744 | } |
@@ -1771,7 +1771,7 @@ static void bnx2i_process_async_mesg(struct iscsi_session *session, | |||
1771 | return; | 1771 | return; |
1772 | } | 1772 | } |
1773 | 1773 | ||
1774 | spin_lock(&session->lock); | 1774 | spin_lock(&session->back_lock); |
1775 | resp_hdr = (struct iscsi_async *) &bnx2i_conn->gen_pdu.resp_hdr; | 1775 | resp_hdr = (struct iscsi_async *) &bnx2i_conn->gen_pdu.resp_hdr; |
1776 | memset(resp_hdr, 0, sizeof(struct iscsi_hdr)); | 1776 | memset(resp_hdr, 0, sizeof(struct iscsi_hdr)); |
1777 | resp_hdr->opcode = async_cqe->op_code; | 1777 | resp_hdr->opcode = async_cqe->op_code; |
@@ -1790,7 +1790,7 @@ static void bnx2i_process_async_mesg(struct iscsi_session *session, | |||
1790 | 1790 | ||
1791 | __iscsi_complete_pdu(bnx2i_conn->cls_conn->dd_data, | 1791 | __iscsi_complete_pdu(bnx2i_conn->cls_conn->dd_data, |
1792 | (struct iscsi_hdr *)resp_hdr, NULL, 0); | 1792 | (struct iscsi_hdr *)resp_hdr, NULL, 0); |
1793 | spin_unlock(&session->lock); | 1793 | spin_unlock(&session->back_lock); |
1794 | } | 1794 | } |
1795 | 1795 | ||
1796 | 1796 | ||
@@ -1817,7 +1817,7 @@ static void bnx2i_process_reject_mesg(struct iscsi_session *session, | |||
1817 | } else | 1817 | } else |
1818 | bnx2i_unsol_pdu_adjust_rq(bnx2i_conn); | 1818 | bnx2i_unsol_pdu_adjust_rq(bnx2i_conn); |
1819 | 1819 | ||
1820 | spin_lock(&session->lock); | 1820 | spin_lock(&session->back_lock); |
1821 | hdr = (struct iscsi_reject *) &bnx2i_conn->gen_pdu.resp_hdr; | 1821 | hdr = (struct iscsi_reject *) &bnx2i_conn->gen_pdu.resp_hdr; |
1822 | memset(hdr, 0, sizeof(struct iscsi_hdr)); | 1822 | memset(hdr, 0, sizeof(struct iscsi_hdr)); |
1823 | hdr->opcode = reject->op_code; | 1823 | hdr->opcode = reject->op_code; |
@@ -1828,7 +1828,7 @@ static void bnx2i_process_reject_mesg(struct iscsi_session *session, | |||
1828 | hdr->ffffffff = cpu_to_be32(RESERVED_ITT); | 1828 | hdr->ffffffff = cpu_to_be32(RESERVED_ITT); |
1829 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, conn->data, | 1829 | __iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, conn->data, |
1830 | reject->data_length); | 1830 | reject->data_length); |
1831 | spin_unlock(&session->lock); | 1831 | spin_unlock(&session->back_lock); |
1832 | } | 1832 | } |
1833 | 1833 | ||
1834 | /** | 1834 | /** |
@@ -1848,13 +1848,13 @@ static void bnx2i_process_cmd_cleanup_resp(struct iscsi_session *session, | |||
1848 | struct iscsi_task *task; | 1848 | struct iscsi_task *task; |
1849 | 1849 | ||
1850 | cmd_clean_rsp = (struct bnx2i_cleanup_response *)cqe; | 1850 | cmd_clean_rsp = (struct bnx2i_cleanup_response *)cqe; |
1851 | spin_lock(&session->lock); | 1851 | spin_lock(&session->back_lock); |
1852 | task = iscsi_itt_to_task(conn, | 1852 | task = iscsi_itt_to_task(conn, |
1853 | cmd_clean_rsp->itt & ISCSI_CLEANUP_RESPONSE_INDEX); | 1853 | cmd_clean_rsp->itt & ISCSI_CLEANUP_RESPONSE_INDEX); |
1854 | if (!task) | 1854 | if (!task) |
1855 | printk(KERN_ALERT "bnx2i: cmd clean ITT %x not active\n", | 1855 | printk(KERN_ALERT "bnx2i: cmd clean ITT %x not active\n", |
1856 | cmd_clean_rsp->itt & ISCSI_CLEANUP_RESPONSE_INDEX); | 1856 | cmd_clean_rsp->itt & ISCSI_CLEANUP_RESPONSE_INDEX); |
1857 | spin_unlock(&session->lock); | 1857 | spin_unlock(&session->back_lock); |
1858 | complete(&bnx2i_conn->cmd_cleanup_cmpl); | 1858 | complete(&bnx2i_conn->cmd_cleanup_cmpl); |
1859 | } | 1859 | } |
1860 | 1860 | ||
@@ -1921,11 +1921,11 @@ static int bnx2i_queue_scsi_cmd_resp(struct iscsi_session *session, | |||
1921 | int rc = 0; | 1921 | int rc = 0; |
1922 | int cpu; | 1922 | int cpu; |
1923 | 1923 | ||
1924 | spin_lock(&session->lock); | 1924 | spin_lock(&session->back_lock); |
1925 | task = iscsi_itt_to_task(bnx2i_conn->cls_conn->dd_data, | 1925 | task = iscsi_itt_to_task(bnx2i_conn->cls_conn->dd_data, |
1926 | cqe->itt & ISCSI_CMD_RESPONSE_INDEX); | 1926 | cqe->itt & ISCSI_CMD_RESPONSE_INDEX); |
1927 | if (!task || !task->sc) { | 1927 | if (!task || !task->sc) { |
1928 | spin_unlock(&session->lock); | 1928 | spin_unlock(&session->back_lock); |
1929 | return -EINVAL; | 1929 | return -EINVAL; |
1930 | } | 1930 | } |
1931 | sc = task->sc; | 1931 | sc = task->sc; |
@@ -1935,7 +1935,7 @@ static int bnx2i_queue_scsi_cmd_resp(struct iscsi_session *session, | |||
1935 | else | 1935 | else |
1936 | cpu = sc->request->cpu; | 1936 | cpu = sc->request->cpu; |
1937 | 1937 | ||
1938 | spin_unlock(&session->lock); | 1938 | spin_unlock(&session->back_lock); |
1939 | 1939 | ||
1940 | p = &per_cpu(bnx2i_percpu, cpu); | 1940 | p = &per_cpu(bnx2i_percpu, cpu); |
1941 | spin_lock(&p->p_work_lock); | 1941 | spin_lock(&p->p_work_lock); |
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index c8b0aff5bbd4..166543f7ef55 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c | |||
@@ -1170,10 +1170,10 @@ static void bnx2i_cleanup_task(struct iscsi_task *task) | |||
1170 | if (task->state == ISCSI_TASK_ABRT_TMF) { | 1170 | if (task->state == ISCSI_TASK_ABRT_TMF) { |
1171 | bnx2i_send_cmd_cleanup_req(hba, task->dd_data); | 1171 | bnx2i_send_cmd_cleanup_req(hba, task->dd_data); |
1172 | 1172 | ||
1173 | spin_unlock_bh(&conn->session->lock); | 1173 | spin_unlock_bh(&conn->session->back_lock); |
1174 | wait_for_completion_timeout(&bnx2i_conn->cmd_cleanup_cmpl, | 1174 | wait_for_completion_timeout(&bnx2i_conn->cmd_cleanup_cmpl, |
1175 | msecs_to_jiffies(ISCSI_CMD_CLEANUP_TIMEOUT)); | 1175 | msecs_to_jiffies(ISCSI_CMD_CLEANUP_TIMEOUT)); |
1176 | spin_lock_bh(&conn->session->lock); | 1176 | spin_lock_bh(&conn->session->back_lock); |
1177 | } | 1177 | } |
1178 | bnx2i_iscsi_unmap_sg_list(task->dd_data); | 1178 | bnx2i_iscsi_unmap_sg_list(task->dd_data); |
1179 | } | 1179 | } |
@@ -2060,7 +2060,7 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep) | |||
2060 | goto out; | 2060 | goto out; |
2061 | 2061 | ||
2062 | if (session) { | 2062 | if (session) { |
2063 | spin_lock_bh(&session->lock); | 2063 | spin_lock_bh(&session->frwd_lock); |
2064 | if (bnx2i_ep->state != EP_STATE_TCP_FIN_RCVD) { | 2064 | if (bnx2i_ep->state != EP_STATE_TCP_FIN_RCVD) { |
2065 | if (session->state == ISCSI_STATE_LOGGING_OUT) { | 2065 | if (session->state == ISCSI_STATE_LOGGING_OUT) { |
2066 | if (bnx2i_ep->state == EP_STATE_LOGOUT_SENT) { | 2066 | if (bnx2i_ep->state == EP_STATE_LOGOUT_SENT) { |
@@ -2076,7 +2076,7 @@ int bnx2i_hw_ep_disconnect(struct bnx2i_endpoint *bnx2i_ep) | |||
2076 | } else | 2076 | } else |
2077 | close = 1; | 2077 | close = 1; |
2078 | 2078 | ||
2079 | spin_unlock_bh(&session->lock); | 2079 | spin_unlock_bh(&session->frwd_lock); |
2080 | } | 2080 | } |
2081 | 2081 | ||
2082 | bnx2i_ep->state = EP_STATE_DISCONN_START; | 2082 | bnx2i_ep->state = EP_STATE_DISCONN_START; |