History

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley: "This is a set of six fixes. Two are instant crash/null deref types (storvsc and isci). The two qla2xxx are initialisation problems that cause MSI-X failures and card misdetection, the isci erroneous macro is actually illegal C that's causing a miscompile with certain gcc versions and the be2iscsi bad if expression is a static checker fix" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: [SCSI] storvsc: NULL pointer dereference fix [SCSI] qla2xxx: Poll during initialization for ISP25xx and ISP83xx [SCSI] isci: correct erroneous for_each_isci_host macro [SCSI] isci: fix reset timeout handling [SCSI] be2iscsi: fix bad if expression [SCSI] qla2xxx: Fix multiqueue MSI-X registration.

Linus Torvalds committed 12 years ago

Commit 3b4df682 parents a4ecdf8 b12bb607 files · +38 −30Browse files

Unified · Split

7 files
  1. drivers/scsi/be2iscsi/be_main.c +1 −1
  2. drivers/scsi/isci/host.h +2 −3
  3. drivers/scsi/isci/port_config.c +0 −7
  4. drivers/scsi/isci/task.c +1 −1
  5. drivers/scsi/qla2xxx/qla_def.h +1 −2
  6. drivers/scsi/qla2xxx/qla_isr.c +30 −16
  7. drivers/scsi/storvsc_drv.c +3 −0
drivers/scsi/be2iscsi/be_main.c+1−1
@@ -325,7 +325,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc) · 324 unmodified lines
325325 if (!abrt_task->sc || abrt_task->state == ISCSI_TASK_FREE)
326326 continue;
327327
328− if (abrt_task->sc->device->lun != abrt_task->sc->device->lun)
328+ if (sc->device->lun != abrt_task->sc->device->lun)
329329 continue;
330330
331331 /* Invalidate WRB Posted for this Task */
drivers/scsi/isci/host.h+2−3
@@ -311,9 +311,8 @@ static inline struct Scsi_Host *to_shost(struct isci_host *ihost) · 310 unmodified lines
311311 }
312312
313313 #define for_each_isci_host(id, ihost, pdev) \
314− for (id = 0, ihost = to_pci_info(pdev)->hosts[id]; \
315− id < ARRAY_SIZE(to_pci_info(pdev)->hosts) && ihost; \
316− ihost = to_pci_info(pdev)->hosts[++id])
314+ for (id = 0; id < SCI_MAX_CONTROLLERS && \
315+ (ihost = to_pci_info(pdev)->hosts[id]); id++)
317316
318317 static inline void wait_for_start(struct isci_host *ihost)
319318 {
drivers/scsi/isci/port_config.c+0−7
@@ -615,13 +615,6 @@ static void sci_apc_agent_link_up(struct isci_host *ihost, · 614 unmodified lines
615615 SCIC_SDS_APC_WAIT_LINK_UP_NOTIFICATION);
616616 } else {
617617 /* the phy is already the part of the port */
618− u32 port_state = iport->sm.current_state_id;
619−
620− /* if the PORT'S state is resetting then the link up is from
621− * port hard reset in this case, we need to tell the port
622− * that link up is recieved
623− */
624− BUG_ON(port_state != SCI_PORT_RESETTING);
625618 port_agent->phy_ready_mask |= 1 << phy_index;
626619 sci_port_link_up(iport, iphy);
627620 }
drivers/scsi/isci/task.c+1−1
@@ -801,7 +801,7 @@ int isci_task_I_T_nexus_reset(struct domain_device *dev) · 800 unmodified lines
801801 /* XXX: need to cleanup any ireqs targeting this
802802 * domain_device
803803 */
804− ret = TMF_RESP_FUNC_COMPLETE;
804+ ret = -ENODEV;
805805 goto out;
806806 }
807807
drivers/scsi/qla2xxx/qla_def.h+1−2
@@ -2996,8 +2996,7 @@ struct qla_hw_data { · 2995 unmodified lines
29962996 IS_QLA82XX(ha) || IS_QLA83XX(ha) || \
29972997 IS_QLA8044(ha))
29982998 #define IS_MSIX_NACK_CAPABLE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))
2999−#define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha) || \
3000− IS_QLA83XX(ha)) && (ha)->flags.msix_enabled)
2999+#define IS_NOPOLLING_TYPE(ha) (IS_QLA81XX(ha) && (ha)->flags.msix_enabled)
30013000 #define IS_FAC_REQUIRED(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))
30023001 #define IS_NOCACHE_VPD_TYPE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))
30033002 #define IS_ALOGIO_CAPABLE(ha) (IS_QLA23XX(ha) || IS_FWI2_CAPABLE(ha))
drivers/scsi/qla2xxx/qla_isr.c+30−16
@@ -2880,6 +2880,7 @@ static int · 2879 unmodified lines
28802880 qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
28812881 {
28822882 #define MIN_MSIX_COUNT 2
2883+#define ATIO_VECTOR 2
28832884 int i, ret;
28842885 struct msix_entry *entries;
28852886 struct qla_msix_entry *qentry;
@@ -2936,34 +2937,47 @@ msix_failed: · 50 unmodified lines
29362937 }
29372938
29382939 /* Enable MSI-X vectors for the base queue */
2939− for (i = 0; i < ha->msix_count; i++) {
2940+ for (i = 0; i < 2; i++) {
29402941 qentry = &ha->msix_entries[i];
2941− if (QLA_TGT_MODE_ENABLED() && IS_ATIO_MSIX_CAPABLE(ha)) {
2942− ret = request_irq(qentry->vector,
2943− qla83xx_msix_entries[i].handler,
2944− 0, qla83xx_msix_entries[i].name, rsp);
2945− } else if (IS_P3P_TYPE(ha)) {
2942+ if (IS_P3P_TYPE(ha))
29462943 ret = request_irq(qentry->vector,
29472944 qla82xx_msix_entries[i].handler,
29482945 0, qla82xx_msix_entries[i].name, rsp);
2949− } else {
2946+ else
29502947 ret = request_irq(qentry->vector,
29512948 msix_entries[i].handler,
29522949 0, msix_entries[i].name, rsp);
2953− }
2954− if (ret) {
2955− ql_log(ql_log_fatal, vha, 0x00cb,
2956− "MSI-X: unable to register handler -- %x/%d.\n",
2957− qentry->vector, ret);
2958− qla24xx_disable_msix(ha);
2959− ha->mqenable = 0;
2960− goto msix_out;
2961− }
2950+ if (ret)
2951+ goto msix_register_fail;
29622952 qentry->have_irq = 1;
29632953 qentry->rsp = rsp;
29642954 rsp->msix = qentry;
29652955 }
29662956
2957+ /*
2958+ * If target mode is enable, also request the vector for the ATIO
2959+ * queue.
2960+ */
2961+ if (QLA_TGT_MODE_ENABLED() && IS_ATIO_MSIX_CAPABLE(ha)) {
2962+ qentry = &ha->msix_entries[ATIO_VECTOR];
2963+ ret = request_irq(qentry->vector,
2964+ qla83xx_msix_entries[ATIO_VECTOR].handler,
2965+ 0, qla83xx_msix_entries[ATIO_VECTOR].name, rsp);
2966+ qentry->have_irq = 1;
2967+ qentry->rsp = rsp;
2968+ rsp->msix = qentry;
2969+ }
2970+
2971+msix_register_fail:
2972+ if (ret) {
2973+ ql_log(ql_log_fatal, vha, 0x00cb,
2974+ "MSI-X: unable to register handler -- %x/%d.\n",
2975+ qentry->vector, ret);
2976+ qla24xx_disable_msix(ha);
2977+ ha->mqenable = 0;
2978+ goto msix_out;
2979+ }
2980+
29672981 /* Enable MSI-X vector for response queue update for queue 0 */
29682982 if (IS_QLA83XX(ha)) {
29692983 if (ha->msixbase && ha->mqiobase &&
drivers/scsi/storvsc_drv.c+3−0
@@ -1419,6 +1419,9 @@ static void storvsc_device_destroy(struct scsi_device *sdevice) · 1418 unmodified lines
14191419 {
14201420 struct stor_mem_pools *memp = sdevice->hostdata;
14211421
1422+ if (!memp)
1423+ return;
1424+
14221425 mempool_destroy(memp->request_mempool);
14231426 kmem_cache_destroy(memp->request_pool);
14241427 kfree(memp);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t