summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-16 01:06:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-16 01:06:26 -0400
commit72f02ba66bd83b54054da20eae550123de84da6f (patch)
tree96a8360400e040aa2e38e7352594dbbc485461db /drivers/scsi/qedi
parentdb06f826ec12bf0701ea7fc0a3c0aa00b84417c8 (diff)
parent51372570ac3c919b036e760f4ca449e81cf8e995 (diff)
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "This is mostly updates to the usual drivers: mpt3sas, lpfc, qla2xxx, hisi_sas, smartpqi, megaraid_sas, arcmsr. In addition, with the continuing absence of Nic we have target updates for tcmu and target core (all with reviews and acks). The biggest observable change is going to be that we're (again) trying to switch to mulitqueue as the default (a user can still override the setting on the kernel command line). Other major core stuff is the removal of the remaining Microchannel drivers, an update of the internal timers and some reworks of completion and result handling" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (203 commits) scsi: core: use blk_mq_run_hw_queues in scsi_kick_queue scsi: ufs: remove unnecessary query(DM) UPIU trace scsi: qla2xxx: Fix issue reported by static checker for qla2x00_els_dcmd2_sp_done() scsi: aacraid: Spelling fix in comment scsi: mpt3sas: Fix calltrace observed while running IO & reset scsi: aic94xx: fix an error code in aic94xx_init() scsi: st: remove redundant pointer STbuffer scsi: qla2xxx: Update driver version to 10.00.00.08-k scsi: qla2xxx: Migrate NVME N2N handling into state machine scsi: qla2xxx: Save frame payload size from ICB scsi: qla2xxx: Fix stalled relogin scsi: qla2xxx: Fix race between switch cmd completion and timeout scsi: qla2xxx: Fix Management Server NPort handle reservation logic scsi: qla2xxx: Flush mailbox commands on chip reset scsi: qla2xxx: Fix unintended Logout scsi: qla2xxx: Fix session state stuck in Get Port DB scsi: qla2xxx: Fix redundant fc_rport registration scsi: qla2xxx: Silent erroneous message scsi: qla2xxx: Prevent sysfs access when chip is down scsi: qla2xxx: Add longer window for chip reset ...
Diffstat (limited to 'drivers/scsi/qedi')
-rw-r--r--drivers/scsi/qedi/qedi_fw_api.c30
-rw-r--r--drivers/scsi/qedi/qedi_main.c2
2 files changed, 17 insertions, 15 deletions
diff --git a/drivers/scsi/qedi/qedi_fw_api.c b/drivers/scsi/qedi/qedi_fw_api.c
index a269da1a6c75..387dc87e4d22 100644
--- a/drivers/scsi/qedi/qedi_fw_api.c
+++ b/drivers/scsi/qedi/qedi_fw_api.c
@@ -126,22 +126,24 @@ static void init_sqe(struct iscsi_task_params *task_params,
126 sgl_task_params, 126 sgl_task_params,
127 dif_task_params); 127 dif_task_params);
128 128
129 if (scsi_is_slow_sgl(sgl_task_params->num_sges, 129 if (scsi_is_slow_sgl(sgl_task_params->num_sges,
130 sgl_task_params->small_mid_sge)) 130 sgl_task_params->small_mid_sge))
131 num_sges = ISCSI_WQE_NUM_SGES_SLOWIO; 131 num_sges = ISCSI_WQE_NUM_SGES_SLOWIO;
132 else 132 else
133 num_sges = min(sgl_task_params->num_sges, 133 num_sges = min(sgl_task_params->num_sges,
134 (u16)SCSI_NUM_SGES_SLOW_SGL_THR); 134 (u16)SCSI_NUM_SGES_SLOW_SGL_THR);
135 } 135 }
136 136
137 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES, num_sges); 137 SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES,
138 SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CONT_LEN, 138 num_sges);
139 buf_size); 139 SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CONT_LEN,
140 buf_size);
140 141
141 if (GET_FIELD(pdu_header->hdr_second_dword, 142 if (GET_FIELD(pdu_header->hdr_second_dword,
142 ISCSI_CMD_HDR_TOTAL_AHS_LEN)) 143 ISCSI_CMD_HDR_TOTAL_AHS_LEN))
143 SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CDB_SIZE, 144 SET_FIELD(task_params->sqe->contlen_cdbsize,
144 cmd_params->extended_cdb_sge.sge_len); 145 ISCSI_WQE_CDB_SIZE,
146 cmd_params->extended_cdb_sge.sge_len);
145 } 147 }
146 break; 148 break;
147 case ISCSI_TASK_TYPE_INITIATOR_READ: 149 case ISCSI_TASK_TYPE_INITIATOR_READ:
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index cff83b9457f7..aa96bccb5a96 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -524,7 +524,7 @@ static int qedi_init_id_tbl(struct qedi_portid_tbl *id_tbl, u16 size,
524 id_tbl->max = size; 524 id_tbl->max = size;
525 id_tbl->next = next; 525 id_tbl->next = next;
526 spin_lock_init(&id_tbl->lock); 526 spin_lock_init(&id_tbl->lock);
527 id_tbl->table = kcalloc(DIV_ROUND_UP(size, 32), 4, GFP_KERNEL); 527 id_tbl->table = kcalloc(BITS_TO_LONGS(size), sizeof(long), GFP_KERNEL);
528 if (!id_tbl->table) 528 if (!id_tbl->table)
529 return -ENOMEM; 529 return -ENOMEM;
530 530