mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
qla2x00t-32gbit: Rework scsi-mq detection code
Kernel versions v3.13..v3.16 have block-mq but no scsi-mq. Fix the build for these kernel versions by modifying the scsi-mq detection code. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8114 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -28,6 +28,13 @@
|
||||
|
||||
#include "qla_target.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || \
|
||||
defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 7
|
||||
#define HAVE_SCSI_MQ 1
|
||||
#else
|
||||
#define HAVE_SCSI_MQ 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Driver version
|
||||
*/
|
||||
@@ -936,7 +943,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
||||
goto qc24_fail_command;
|
||||
}
|
||||
|
||||
#ifdef BLK_MQ_H
|
||||
#if HAVE_SCSI_MQ
|
||||
if (ha->mqenable) {
|
||||
uint32_t tag;
|
||||
uint16_t hwq;
|
||||
@@ -3252,7 +3259,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
goto probe_failed;
|
||||
}
|
||||
|
||||
#ifdef BLK_MQ_H
|
||||
#if HAVE_SCSI_MQ
|
||||
if (ha->mqenable) {
|
||||
/* number of hardware queues supported by blk/scsi-mq*/
|
||||
host->nr_hw_queues = ha->max_qpairs;
|
||||
|
||||
Reference in New Issue
Block a user