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
325 if (!abrt_task->sc || abrt_task->state == ISCSI_TASK_FREE)325 if (!abrt_task->sc || abrt_task->state == ISCSI_TASK_FREE)
326 continue;326 continue;
327 327
328 if (abrt_task->sc->device->lun != abrt_task->sc->device->lun)328 if (sc->device->lun != abrt_task->sc->device->lun)
329 continue;329 continue;
330 330
331 /* Invalidate WRB Posted for this Task */331 /* 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
311}311}
312 312
313#define for_each_isci_host(id, ihost, pdev) \313#define for_each_isci_host(id, ihost, pdev) \
314 for (id = 0, ihost = to_pci_info(pdev)->hosts[id]; \314 for (id = 0; id < SCI_MAX_CONTROLLERS && \
315 id < ARRAY_SIZE(to_pci_info(pdev)->hosts) && ihost; \315 (ihost = to_pci_info(pdev)->hosts[id]); id++)
316 ihost = to_pci_info(pdev)->hosts[++id])
317 316
318static inline void wait_for_start(struct isci_host *ihost)317static inline void wait_for_start(struct isci_host *ihost)
319{318{
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
615 SCIC_SDS_APC_WAIT_LINK_UP_NOTIFICATION);615 SCIC_SDS_APC_WAIT_LINK_UP_NOTIFICATION);
616 } else {616 } else {
617 /* the phy is already the part of the port */617 /* 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);
625 port_agent->phy_ready_mask |= 1 << phy_index;618 port_agent->phy_ready_mask |= 1 << phy_index;
626 sci_port_link_up(iport, iphy);619 sci_port_link_up(iport, iphy);
627 }620 }
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
801 /* XXX: need to cleanup any ireqs targeting this801 /* XXX: need to cleanup any ireqs targeting this
802 * domain_device802 * domain_device
803 */803 */
804 ret = TMF_RESP_FUNC_COMPLETE;804 ret = -ENODEV;
805 goto out;805 goto out;
806 }806 }
807 807
drivers/scsi/qla2xxx/qla_def.h+1−2
@@ -2996,8 +2996,7 @@ struct qla_hw_data { · 2995 unmodified lines
2996 IS_QLA82XX(ha) || IS_QLA83XX(ha) || \2996 IS_QLA82XX(ha) || IS_QLA83XX(ha) || \
2997 IS_QLA8044(ha))2997 IS_QLA8044(ha))
2998#define IS_MSIX_NACK_CAPABLE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))2998#define IS_MSIX_NACK_CAPABLE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))
2999#define IS_NOPOLLING_TYPE(ha) ((IS_QLA25XX(ha) || IS_QLA81XX(ha) || \2999#define IS_NOPOLLING_TYPE(ha) (IS_QLA81XX(ha) && (ha)->flags.msix_enabled)
3000 IS_QLA83XX(ha)) && (ha)->flags.msix_enabled)
3001#define IS_FAC_REQUIRED(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))3000#define IS_FAC_REQUIRED(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))
3002#define IS_NOCACHE_VPD_TYPE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))3001#define IS_NOCACHE_VPD_TYPE(ha) (IS_QLA81XX(ha) || IS_QLA83XX(ha))
3003#define IS_ALOGIO_CAPABLE(ha) (IS_QLA23XX(ha) || IS_FWI2_CAPABLE(ha))3002#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
2880qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)2880qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
2881{2881{
2882#define MIN_MSIX_COUNT 22882#define MIN_MSIX_COUNT 2
2883#define ATIO_VECTOR 2
2883 int i, ret;2884 int i, ret;
2884 struct msix_entry *entries;2885 struct msix_entry *entries;
2885 struct qla_msix_entry *qentry;2886 struct qla_msix_entry *qentry;
@@ -2936,34 +2937,47 @@ msix_failed: · 50 unmodified lines
2936 }2937 }
2937 2938
2938 /* Enable MSI-X vectors for the base queue */2939 /* Enable MSI-X vectors for the base queue */
2939 for (i = 0; i < ha->msix_count; i++) {2940 for (i = 0; i < 2; i++) {
2940 qentry = &ha->msix_entries[i];2941 qentry = &ha->msix_entries[i];
2941 if (QLA_TGT_MODE_ENABLED() && IS_ATIO_MSIX_CAPABLE(ha)) {2942 if (IS_P3P_TYPE(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)) {
2946 ret = request_irq(qentry->vector,2943 ret = request_irq(qentry->vector,
2947 qla82xx_msix_entries[i].handler,2944 qla82xx_msix_entries[i].handler,
2948 0, qla82xx_msix_entries[i].name, rsp);2945 0, qla82xx_msix_entries[i].name, rsp);
2949 } else {2946 else
2950 ret = request_irq(qentry->vector,2947 ret = request_irq(qentry->vector,
2951 msix_entries[i].handler,2948 msix_entries[i].handler,
2952 0, msix_entries[i].name, rsp);2949 0, msix_entries[i].name, rsp);
2953 }2950 if (ret)
2954 if (ret) {2951 goto msix_register_fail;
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 }
2962 qentry->have_irq = 1;2952 qentry->have_irq = 1;
2963 qentry->rsp = rsp;2953 qentry->rsp = rsp;
2964 rsp->msix = qentry;2954 rsp->msix = qentry;
2965 }2955 }
2966 2956
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
2971msix_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
2967 /* Enable MSI-X vector for response queue update for queue 0 */2981 /* Enable MSI-X vector for response queue update for queue 0 */
2968 if (IS_QLA83XX(ha)) {2982 if (IS_QLA83XX(ha)) {
2969 if (ha->msixbase && ha->mqiobase &&2983 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
1419{1419{
1420 struct stor_mem_pools *memp = sdevice->hostdata;1420 struct stor_mem_pools *memp = sdevice->hostdata;
1421 1421
1422 if (!memp)
1423 return;
1424
1422 mempool_destroy(memp->request_mempool);1425 mempool_destroy(memp->request_mempool);
1423 kmem_cache_destroy(memp->request_pool);1426 kmem_cache_destroy(memp->request_pool);
1424 kfree(memp);1427 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