aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index 54978c1de159..28c6693688d8 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -1901,6 +1901,7 @@ static int bnx2i_queue_scsi_cmd_resp(struct iscsi_session *session,
1901 struct iscsi_task *task; 1901 struct iscsi_task *task;
1902 struct scsi_cmnd *sc; 1902 struct scsi_cmnd *sc;
1903 int rc = 0; 1903 int rc = 0;
1904 int cpu;
1904 1905
1905 spin_lock(&session->lock); 1906 spin_lock(&session->lock);
1906 task = iscsi_itt_to_task(bnx2i_conn->cls_conn->dd_data, 1907 task = iscsi_itt_to_task(bnx2i_conn->cls_conn->dd_data,
@@ -1912,7 +1913,12 @@ static int bnx2i_queue_scsi_cmd_resp(struct iscsi_session *session,
1912 sc = task->sc; 1913 sc = task->sc;
1913 spin_unlock(&session->lock); 1914 spin_unlock(&session->lock);
1914 1915
1915 p = &per_cpu(bnx2i_percpu, sc->request->cpu); 1916 if (!blk_rq_cpu_valid(sc->request))
1917 cpu = smp_processor_id();
1918 else
1919 cpu = sc->request->cpu;
1920
1921 p = &per_cpu(bnx2i_percpu, cpu);
1916 spin_lock(&p->p_work_lock); 1922 spin_lock(&p->p_work_lock);
1917 if (unlikely(!p->iothread)) { 1923 if (unlikely(!p->iothread)) {
1918 rc = -EINVAL; 1924 rc = -EINVAL;