aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS14
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_els.c2
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_io.c19
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c15
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c18
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c7
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c2
-rw-r--r--drivers/scsi/scsi_error.c20
8 files changed, 60 insertions, 37 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 60b1163dba28..8ab367ff5cde 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2744,6 +2744,13 @@ W: http://www.chelsio.com
2744S: Supported 2744S: Supported
2745F: drivers/net/ethernet/chelsio/cxgb3/ 2745F: drivers/net/ethernet/chelsio/cxgb3/
2746 2746
2747CXGB3 ISCSI DRIVER (CXGB3I)
2748M: Karen Xie <kxie@chelsio.com>
2749L: linux-scsi@vger.kernel.org
2750W: http://www.chelsio.com
2751S: Supported
2752F: drivers/scsi/cxgbi/cxgb3i
2753
2747CXGB3 IWARP RNIC DRIVER (IW_CXGB3) 2754CXGB3 IWARP RNIC DRIVER (IW_CXGB3)
2748M: Steve Wise <swise@chelsio.com> 2755M: Steve Wise <swise@chelsio.com>
2749L: linux-rdma@vger.kernel.org 2756L: linux-rdma@vger.kernel.org
@@ -2758,6 +2765,13 @@ W: http://www.chelsio.com
2758S: Supported 2765S: Supported
2759F: drivers/net/ethernet/chelsio/cxgb4/ 2766F: drivers/net/ethernet/chelsio/cxgb4/
2760 2767
2768CXGB4 ISCSI DRIVER (CXGB4I)
2769M: Karen Xie <kxie@chelsio.com>
2770L: linux-scsi@vger.kernel.org
2771W: http://www.chelsio.com
2772S: Supported
2773F: drivers/scsi/cxgbi/cxgb4i
2774
2761CXGB4 IWARP RNIC DRIVER (IW_CXGB4) 2775CXGB4 IWARP RNIC DRIVER (IW_CXGB4)
2762M: Steve Wise <swise@chelsio.com> 2776M: Steve Wise <swise@chelsio.com>
2763L: linux-rdma@vger.kernel.org 2777L: linux-rdma@vger.kernel.org
diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c
index ca75c7ca2559..ef355c13ccc4 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_els.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_els.c
@@ -480,9 +480,7 @@ void bnx2fc_rec_compl(struct bnx2fc_els_cb_arg *cb_arg)
480 bnx2fc_initiate_cleanup(orig_io_req); 480 bnx2fc_initiate_cleanup(orig_io_req);
481 /* Post a new IO req with the same sc_cmd */ 481 /* Post a new IO req with the same sc_cmd */
482 BNX2FC_IO_DBG(rec_req, "Post IO request again\n"); 482 BNX2FC_IO_DBG(rec_req, "Post IO request again\n");
483 spin_unlock_bh(&tgt->tgt_lock);
484 rc = bnx2fc_post_io_req(tgt, new_io_req); 483 rc = bnx2fc_post_io_req(tgt, new_io_req);
485 spin_lock_bh(&tgt->tgt_lock);
486 if (!rc) 484 if (!rc)
487 goto free_frame; 485 goto free_frame;
488 BNX2FC_IO_DBG(rec_req, "REC: io post err\n"); 486 BNX2FC_IO_DBG(rec_req, "REC: io post err\n");
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 0679782d9d15..5b99844ef6bf 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1894,18 +1894,24 @@ int bnx2fc_queuecommand(struct Scsi_Host *host,
1894 goto exit_qcmd; 1894 goto exit_qcmd;
1895 } 1895 }
1896 } 1896 }
1897
1898 spin_lock_bh(&tgt->tgt_lock);
1899
1897 io_req = bnx2fc_cmd_alloc(tgt); 1900 io_req = bnx2fc_cmd_alloc(tgt);
1898 if (!io_req) { 1901 if (!io_req) {
1899 rc = SCSI_MLQUEUE_HOST_BUSY; 1902 rc = SCSI_MLQUEUE_HOST_BUSY;
1900 goto exit_qcmd; 1903 goto exit_qcmd_tgtlock;
1901 } 1904 }
1902 io_req->sc_cmd = sc_cmd; 1905 io_req->sc_cmd = sc_cmd;
1903 1906
1904 if (bnx2fc_post_io_req(tgt, io_req)) { 1907 if (bnx2fc_post_io_req(tgt, io_req)) {
1905 printk(KERN_ERR PFX "Unable to post io_req\n"); 1908 printk(KERN_ERR PFX "Unable to post io_req\n");
1906 rc = SCSI_MLQUEUE_HOST_BUSY; 1909 rc = SCSI_MLQUEUE_HOST_BUSY;
1907 goto exit_qcmd; 1910 goto exit_qcmd_tgtlock;
1908 } 1911 }
1912
1913exit_qcmd_tgtlock:
1914 spin_unlock_bh(&tgt->tgt_lock);
1909exit_qcmd: 1915exit_qcmd:
1910 return rc; 1916 return rc;
1911} 1917}
@@ -2020,6 +2026,8 @@ int bnx2fc_post_io_req(struct bnx2fc_rport *tgt,
2020 int task_idx, index; 2026 int task_idx, index;
2021 u16 xid; 2027 u16 xid;
2022 2028
2029 /* bnx2fc_post_io_req() is called with the tgt_lock held */
2030
2023 /* Initialize rest of io_req fields */ 2031 /* Initialize rest of io_req fields */
2024 io_req->cmd_type = BNX2FC_SCSI_CMD; 2032 io_req->cmd_type = BNX2FC_SCSI_CMD;
2025 io_req->port = port; 2033 io_req->port = port;
@@ -2047,9 +2055,7 @@ int bnx2fc_post_io_req(struct bnx2fc_rport *tgt,
2047 /* Build buffer descriptor list for firmware from sg list */ 2055 /* Build buffer descriptor list for firmware from sg list */
2048 if (bnx2fc_build_bd_list_from_sg(io_req)) { 2056 if (bnx2fc_build_bd_list_from_sg(io_req)) {
2049 printk(KERN_ERR PFX "BD list creation failed\n"); 2057 printk(KERN_ERR PFX "BD list creation failed\n");
2050 spin_lock_bh(&tgt->tgt_lock);
2051 kref_put(&io_req->refcount, bnx2fc_cmd_release); 2058 kref_put(&io_req->refcount, bnx2fc_cmd_release);
2052 spin_unlock_bh(&tgt->tgt_lock);
2053 return -EAGAIN; 2059 return -EAGAIN;
2054 } 2060 }
2055 2061
@@ -2061,19 +2067,15 @@ int bnx2fc_post_io_req(struct bnx2fc_rport *tgt,
2061 task = &(task_page[index]); 2067 task = &(task_page[index]);
2062 bnx2fc_init_task(io_req, task); 2068 bnx2fc_init_task(io_req, task);
2063 2069
2064 spin_lock_bh(&tgt->tgt_lock);
2065
2066 if (tgt->flush_in_prog) { 2070 if (tgt->flush_in_prog) {
2067 printk(KERN_ERR PFX "Flush in progress..Host Busy\n"); 2071 printk(KERN_ERR PFX "Flush in progress..Host Busy\n");
2068 kref_put(&io_req->refcount, bnx2fc_cmd_release); 2072 kref_put(&io_req->refcount, bnx2fc_cmd_release);
2069 spin_unlock_bh(&tgt->tgt_lock);
2070 return -EAGAIN; 2073 return -EAGAIN;
2071 } 2074 }
2072 2075
2073 if (!test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) { 2076 if (!test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) {
2074 printk(KERN_ERR PFX "Session not ready...post_io\n"); 2077 printk(KERN_ERR PFX "Session not ready...post_io\n");
2075 kref_put(&io_req->refcount, bnx2fc_cmd_release); 2078 kref_put(&io_req->refcount, bnx2fc_cmd_release);
2076 spin_unlock_bh(&tgt->tgt_lock);
2077 return -EAGAIN; 2079 return -EAGAIN;
2078 } 2080 }
2079 2081
@@ -2091,6 +2093,5 @@ int bnx2fc_post_io_req(struct bnx2fc_rport *tgt,
2091 2093
2092 /* Ring doorbell */ 2094 /* Ring doorbell */
2093 bnx2fc_ring_doorbell(tgt); 2095 bnx2fc_ring_doorbell(tgt);
2094 spin_unlock_bh(&tgt->tgt_lock);
2095 return 0; 2096 return 0;
2096} 2097}
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 3e0a0d315f72..81bb3bd7909d 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -936,20 +936,23 @@ static void do_abort_req_rss(struct cxgbi_device *cdev, struct sk_buff *skb)
936 cxgbi_sock_get(csk); 936 cxgbi_sock_get(csk);
937 spin_lock_bh(&csk->lock); 937 spin_lock_bh(&csk->lock);
938 938
939 if (!cxgbi_sock_flag(csk, CTPF_ABORT_REQ_RCVD)) { 939 cxgbi_sock_clear_flag(csk, CTPF_ABORT_REQ_RCVD);
940 cxgbi_sock_set_flag(csk, CTPF_ABORT_REQ_RCVD); 940
941 cxgbi_sock_set_state(csk, CTP_ABORTING); 941 if (!cxgbi_sock_flag(csk, CTPF_TX_DATA_SENT)) {
942 goto done; 942 send_tx_flowc_wr(csk);
943 cxgbi_sock_set_flag(csk, CTPF_TX_DATA_SENT);
943 } 944 }
944 945
945 cxgbi_sock_clear_flag(csk, CTPF_ABORT_REQ_RCVD); 946 cxgbi_sock_set_flag(csk, CTPF_ABORT_REQ_RCVD);
947 cxgbi_sock_set_state(csk, CTP_ABORTING);
948
946 send_abort_rpl(csk, rst_status); 949 send_abort_rpl(csk, rst_status);
947 950
948 if (!cxgbi_sock_flag(csk, CTPF_ABORT_RPL_PENDING)) { 951 if (!cxgbi_sock_flag(csk, CTPF_ABORT_RPL_PENDING)) {
949 csk->err = abort_status_to_errno(csk, req->status, &rst_status); 952 csk->err = abort_status_to_errno(csk, req->status, &rst_status);
950 cxgbi_sock_closed(csk); 953 cxgbi_sock_closed(csk);
951 } 954 }
952done: 955
953 spin_unlock_bh(&csk->lock); 956 spin_unlock_bh(&csk->lock);
954 cxgbi_sock_put(csk); 957 cxgbi_sock_put(csk);
955rel_skb: 958rel_skb:
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 674d498b46ab..13d869a92248 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -905,18 +905,16 @@ void cxgbi_sock_rcv_abort_rpl(struct cxgbi_sock *csk)
905{ 905{
906 cxgbi_sock_get(csk); 906 cxgbi_sock_get(csk);
907 spin_lock_bh(&csk->lock); 907 spin_lock_bh(&csk->lock);
908
909 cxgbi_sock_set_flag(csk, CTPF_ABORT_RPL_RCVD);
908 if (cxgbi_sock_flag(csk, CTPF_ABORT_RPL_PENDING)) { 910 if (cxgbi_sock_flag(csk, CTPF_ABORT_RPL_PENDING)) {
909 if (!cxgbi_sock_flag(csk, CTPF_ABORT_RPL_RCVD)) 911 cxgbi_sock_clear_flag(csk, CTPF_ABORT_RPL_PENDING);
910 cxgbi_sock_set_flag(csk, CTPF_ABORT_RPL_RCVD); 912 if (cxgbi_sock_flag(csk, CTPF_ABORT_REQ_RCVD))
911 else { 913 pr_err("csk 0x%p,%u,0x%lx,%u,ABT_RPL_RSS.\n",
912 cxgbi_sock_clear_flag(csk, CTPF_ABORT_RPL_RCVD); 914 csk, csk->state, csk->flags, csk->tid);
913 cxgbi_sock_clear_flag(csk, CTPF_ABORT_RPL_PENDING); 915 cxgbi_sock_closed(csk);
914 if (cxgbi_sock_flag(csk, CTPF_ABORT_REQ_RCVD))
915 pr_err("csk 0x%p,%u,0x%lx,%u,ABT_RPL_RSS.\n",
916 csk, csk->state, csk->flags, csk->tid);
917 cxgbi_sock_closed(csk);
918 }
919 } 916 }
917
920 spin_unlock_bh(&csk->lock); 918 spin_unlock_bh(&csk->lock);
921 cxgbi_sock_put(csk); 919 cxgbi_sock_put(csk);
922} 920}
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index e99507ed0e3c..fd78bdc53528 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -474,6 +474,13 @@ static int alua_check_sense(struct scsi_device *sdev,
474 * LUN Not Ready -- Offline 474 * LUN Not Ready -- Offline
475 */ 475 */
476 return SUCCESS; 476 return SUCCESS;
477 if (sdev->allow_restart &&
478 sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x02)
479 /*
480 * if the device is not started, we need to wake
481 * the error handler to start the motor
482 */
483 return FAILED;
477 break; 484 break;
478 case UNIT_ATTENTION: 485 case UNIT_ATTENTION:
479 if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00) 486 if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index f6a69a3b1b3f..5640ad1c8214 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4453,7 +4453,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
4453 instance->msixentry[i].entry = i; 4453 instance->msixentry[i].entry = i;
4454 i = pci_enable_msix_range(instance->pdev, instance->msixentry, 4454 i = pci_enable_msix_range(instance->pdev, instance->msixentry,
4455 1, instance->msix_vectors); 4455 1, instance->msix_vectors);
4456 if (i) 4456 if (i > 0)
4457 instance->msix_vectors = i; 4457 instance->msix_vectors = i;
4458 else 4458 else
4459 instance->msix_vectors = 0; 4459 instance->msix_vectors = 0;
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 9a6f8468225f..bc5ff6ff9c79 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -459,14 +459,6 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
459 if (! scsi_command_normalize_sense(scmd, &sshdr)) 459 if (! scsi_command_normalize_sense(scmd, &sshdr))
460 return FAILED; /* no valid sense data */ 460 return FAILED; /* no valid sense data */
461 461
462 if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done)
463 /*
464 * nasty: for mid-layer issued TURs, we need to return the
465 * actual sense data without any recovery attempt. For eh
466 * issued ones, we need to try to recover and interpret
467 */
468 return SUCCESS;
469
470 scsi_report_sense(sdev, &sshdr); 462 scsi_report_sense(sdev, &sshdr);
471 463
472 if (scsi_sense_is_deferred(&sshdr)) 464 if (scsi_sense_is_deferred(&sshdr))
@@ -482,6 +474,14 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
482 /* handler does not care. Drop down to default handling */ 474 /* handler does not care. Drop down to default handling */
483 } 475 }
484 476
477 if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done)
478 /*
479 * nasty: for mid-layer issued TURs, we need to return the
480 * actual sense data without any recovery attempt. For eh
481 * issued ones, we need to try to recover and interpret
482 */
483 return SUCCESS;
484
485 /* 485 /*
486 * Previous logic looked for FILEMARK, EOM or ILI which are 486 * Previous logic looked for FILEMARK, EOM or ILI which are
487 * mainly associated with tapes and returned SUCCESS. 487 * mainly associated with tapes and returned SUCCESS.
@@ -2001,8 +2001,10 @@ static void scsi_restart_operations(struct Scsi_Host *shost)
2001 * is no point trying to lock the door of an off-line device. 2001 * is no point trying to lock the door of an off-line device.
2002 */ 2002 */
2003 shost_for_each_device(sdev, shost) { 2003 shost_for_each_device(sdev, shost) {
2004 if (scsi_device_online(sdev) && sdev->locked) 2004 if (scsi_device_online(sdev) && sdev->was_reset && sdev->locked) {
2005 scsi_eh_lock_door(sdev); 2005 scsi_eh_lock_door(sdev);
2006 sdev->was_reset = 0;
2007 }
2006 } 2008 }
2007 2009
2008 /* 2010 /*