@@ -432,7 +432,7 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req,
432
432
433
433
qla_init_base_qpair (vha , req , rsp );
434
434
435
- if (ql2xmqsupport && ha -> max_qpairs ) {
435
+ if (( ql2xmqsupport || ql2xnvmeenable ) && ha -> max_qpairs ) {
436
436
ha -> queue_pair_map = kcalloc (ha -> max_qpairs , sizeof (struct qla_qpair * ),
437
437
GFP_KERNEL );
438
438
if (!ha -> queue_pair_map ) {
@@ -1975,7 +1975,8 @@ qla2x00_iospace_config(struct qla_hw_data *ha)
1975
1975
/* Determine queue resources */
1976
1976
ha -> max_req_queues = ha -> max_rsp_queues = 1 ;
1977
1977
ha -> msix_count = QLA_BASE_VECTORS ;
1978
- if (!ql2xmqsupport || (!IS_QLA25XX (ha ) && !IS_QLA81XX (ha )))
1978
+ if (!ql2xmqsupport || !ql2xnvmeenable ||
1979
+ (!IS_QLA25XX (ha ) && !IS_QLA81XX (ha )))
1979
1980
goto mqiobase_exit ;
1980
1981
1981
1982
ha -> mqiobase = ioremap (pci_resource_start (ha -> pdev , 3 ),
@@ -2072,7 +2073,7 @@ qla83xx_iospace_config(struct qla_hw_data *ha)
2072
2073
* By default, driver uses at least two msix vectors
2073
2074
* (default & rspq)
2074
2075
*/
2075
- if (ql2xmqsupport ) {
2076
+ if (ql2xmqsupport || ql2xnvmeenable ) {
2076
2077
/* MB interrupt uses 1 vector */
2077
2078
ha -> max_req_queues = ha -> msix_count - 1 ;
2078
2079
@@ -3088,9 +3089,17 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
3088
3089
3089
3090
ql_dbg (ql_dbg_init , base_vha , 0x0192 ,
3090
3091
"blk/scsi-mq enabled, HW queues = %d.\n" , host -> nr_hw_queues );
3091
- } else
3092
- ql_dbg (ql_dbg_init , base_vha , 0x0193 ,
3093
- "blk/scsi-mq disabled.\n" );
3092
+ } else {
3093
+ if (ql2xnvmeenable ) {
3094
+ host -> nr_hw_queues = ha -> max_qpairs ;
3095
+ ql_dbg (ql_dbg_init , base_vha , 0x0194 ,
3096
+ "FC-NVMe support is enabled, HW queues=%d\n" ,
3097
+ host -> nr_hw_queues );
3098
+ } else {
3099
+ ql_dbg (ql_dbg_init , base_vha , 0x0193 ,
3100
+ "blk/scsi-mq disabled.\n" );
3101
+ }
3102
+ }
3094
3103
3095
3104
qlt_probe_one_stage1 (base_vha , ha );
3096
3105
@@ -6301,7 +6310,7 @@ qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
6301
6310
switch (state ) {
6302
6311
case pci_channel_io_normal :
6303
6312
ha -> flags .eeh_busy = 0 ;
6304
- if (ql2xmqsupport ) {
6313
+ if (ql2xmqsupport || ql2xnvmeenable ) {
6305
6314
set_bit (QPAIR_ONLINE_CHECK_NEEDED , & vha -> dpc_flags );
6306
6315
qla2xxx_wake_dpc (vha );
6307
6316
}
@@ -6318,15 +6327,15 @@ qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
6318
6327
pci_disable_device (pdev );
6319
6328
/* Return back all IOs */
6320
6329
qla2x00_abort_all_cmds (vha , DID_RESET << 16 );
6321
- if (ql2xmqsupport ) {
6330
+ if (ql2xmqsupport || ql2xnvmeenable ) {
6322
6331
set_bit (QPAIR_ONLINE_CHECK_NEEDED , & vha -> dpc_flags );
6323
6332
qla2xxx_wake_dpc (vha );
6324
6333
}
6325
6334
return PCI_ERS_RESULT_NEED_RESET ;
6326
6335
case pci_channel_io_perm_failure :
6327
6336
ha -> flags .pci_channel_io_perm_failure = 1 ;
6328
6337
qla2x00_abort_all_cmds (vha , DID_NO_CONNECT << 16 );
6329
- if (ql2xmqsupport ) {
6338
+ if (ql2xmqsupport || ql2xnvmeenable ) {
6330
6339
set_bit (QPAIR_ONLINE_CHECK_NEEDED , & vha -> dpc_flags );
6331
6340
qla2xxx_wake_dpc (vha );
6332
6341
}
0 commit comments