Re: [PATCH 1/2] qla2xxx: fix MSI-X vector affinity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/11/17, 8:55 AM, "Christoph Hellwig" <hch@xxxxxx> wrote:


>The first two or three vectors in qla2xxx adapter are global and
>not associated with a specific queue.  They should not have IRQ
>affinity assigned.
>
>Signed-off-by: Christoph Hellwig <hch@xxxxxx>
>---
> drivers/scsi/qla2xxx/qla_def.h |  2 +-
> drivers/scsi/qla2xxx/qla_isr.c | 15 +++++++++++----
> 2 files changed, 12 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
>index ef699b6..e5e0301 100644
>--- a/drivers/scsi/qla2xxx/qla_def.h
>+++ b/drivers/scsi/qla2xxx/qla_def.h
>@@ -2732,7 +2732,7 @@ struct isp_operations {
> #define QLA_MSIX_FW_MODE(m)	(((m) & (BIT_7|BIT_8|BIT_9)) >> 7)
> #define QLA_MSIX_FW_MODE_1(m)	(QLA_MSIX_FW_MODE(m) == 1)
> 
>-#define QLA_MSIX_DEFAULT		0x00
>+#define QLA_BASE_VECTORS	2 /* default + RSP */
> #define QLA_MSIX_RSP_Q			0x01
> #define QLA_ATIO_VECTOR		0x02
> #define QLA_MSIX_QPAIR_MULTIQ_RSP_Q	0x03
>diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
>index b9c113e..5f389a3 100644
>--- a/drivers/scsi/qla2xxx/qla_isr.c
>+++ b/drivers/scsi/qla2xxx/qla_isr.c
>@@ -3018,13 +3018,20 @@ static const struct qla_init_msix_entry qla82xx_msix_entries[] = {
> static int
> qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
> {
>-#define MIN_MSIX_COUNT	2
> 	int i, ret;
> 	struct qla_msix_entry *qentry;
> 	scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
>+	struct irq_affinity desc = {
>+		.pre_vectors = QLA_BASE_VECTORS,
>+	};
>+
>+	if (QLA_TGT_MODE_ENABLED() && IS_ATIO_MSIX_CAPABLE(ha))
>+		desc.pre_vectors++;
>+
>+	ret = pci_alloc_irq_vectors_affinity(ha->pdev, QLA_BASE_VECTORS,
>+			ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
>+			&desc);
> 
>-	ret = pci_alloc_irq_vectors(ha->pdev, MIN_MSIX_COUNT, ha->msix_count,
>-				    PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
> 	if (ret < 0) {
> 		ql_log(ql_log_fatal, vha, 0x00c7,
> 		    "MSI-X: Failed to enable support, "
>@@ -3075,7 +3082,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
> 	}
> 
> 	/* Enable MSI-X vectors for the base queue */
>-	for (i = 0; i < (QLA_MSIX_RSP_Q + 1); i++) {
>+	for (i = 0; i < QLA_BASE_VECTORS; i++) {
> 		qentry = &ha->msix_entries[i];
> 		qentry->handle = rsp;
> 		rsp->msix = qentry;
>-- 
>2.1.4
>

Thanks for cleanup. Looks Good.

Acked-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>
>
��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux