From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian King Subject: Re: [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI Date: Wed, 02 Oct 2013 14:31:25 -0500 Message-ID: <524C748D.8080803@linux.vnet.ibm.com> References: <2d4272136269f3cb3b1a5ac53b12aa45c7ea65c0.1380703263.git.agordeev@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2d4272136269f3cb3b1a5ac53b12aa45c7ea65c0.1380703263.git.agordeev@redhat.com> Sender: linux-scsi-owner@vger.kernel.org To: Alexander Gordeev Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, "VMware, Inc." , linux-nvme@lists.infradead.org, linux-ide@vger.kernel.org, stable@vger.kernel.org, linux-s390@vger.kernel.org, Andy King , linux-scsi@vger.kernel.org, linux-rdma@vger.kernel.org, x86@kernel.org, linux-pci@vger.kernel.org, iss_storagedev@hp.com, linux-driver@qlogic.com, Tejun Heo , Bjorn Helgaas , Dan Williams , Jon Mason , Ingo Molnar , Solarflare linux maintainers , netdev@vger.kernel.org, Ralf Baechle , e1000-devel@lists.sourceforge.net, Martin Schwidefsky , linux390@de.ibm.com, linuxppc-dev@lists.ozlabs.org, Wendy Xiong List-Id: linux-ide@vger.kernel.org On 10/02/2013 05:48 AM, Alexander Gordeev wrote: > Signed-off-by: Alexander Gordeev > --- > drivers/scsi/ipr.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c > index fb57e21..762a93e 100644 > --- a/drivers/scsi/ipr.c > +++ b/drivers/scsi/ipr.c > @@ -9527,7 +9527,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev, > ipr_number_of_msix = IPR_MAX_MSIX_VECTORS; > } > > - if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI && > + if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSIX && > ipr_enable_msix(ioa_cfg) == 0) > ioa_cfg->intr_flag = IPR_USE_MSIX; > else if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI && > Nack. ioa_cfg->ipr_chip->intr_type gets initialized from the ipr_chip table at the top of the driver which never sets intr_type to IPR_USE_MSIX, so this will break MSI-X support for ipr. We indicate at the chip level only whether we want to force LSI or whether we want to enable MSI / MSI-X and then try enabling MSI-X and fall back to MSI if MSI-X is not available or does not work. We then set intr_flag to indicate what we are actually using on the specific adapter. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center From mboxrd@z Thu Jan 1 00:00:00 1970 From: brking@linux.vnet.ibm.com (Brian King) Date: Wed, 02 Oct 2013 14:31:25 -0500 Subject: [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI In-Reply-To: <2d4272136269f3cb3b1a5ac53b12aa45c7ea65c0.1380703263.git.agordeev@redhat.com> References: <2d4272136269f3cb3b1a5ac53b12aa45c7ea65c0.1380703263.git.agordeev@redhat.com> Message-ID: <524C748D.8080803@linux.vnet.ibm.com> On 10/02/2013 05:48 AM, Alexander Gordeev wrote: > Signed-off-by: Alexander Gordeev > --- > drivers/scsi/ipr.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c > index fb57e21..762a93e 100644 > --- a/drivers/scsi/ipr.c > +++ b/drivers/scsi/ipr.c > @@ -9527,7 +9527,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev, > ipr_number_of_msix = IPR_MAX_MSIX_VECTORS; > } > > - if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI && > + if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSIX && > ipr_enable_msix(ioa_cfg) == 0) > ioa_cfg->intr_flag = IPR_USE_MSIX; > else if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI && > Nack. ioa_cfg->ipr_chip->intr_type gets initialized from the ipr_chip table at the top of the driver which never sets intr_type to IPR_USE_MSIX, so this will break MSI-X support for ipr. We indicate at the chip level only whether we want to force LSI or whether we want to enable MSI / MSI-X and then try enabling MSI-X and fall back to MSI if MSI-X is not available or does not work. We then set intr_flag to indicate what we are actually using on the specific adapter. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e39.co.us.ibm.com (e39.co.us.ibm.com [32.97.110.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e39.co.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 3538D2C008F for ; Thu, 3 Oct 2013 05:31:48 +1000 (EST) Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 Oct 2013 13:31:46 -0600 Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 5C7E8C9005E for ; Wed, 2 Oct 2013 15:31:39 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp23032.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r92JVdPo59506778 for ; Wed, 2 Oct 2013 19:31:39 GMT Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r92JVa1n025858 for ; Wed, 2 Oct 2013 16:31:39 -0300 Message-ID: <524C748D.8080803@linux.vnet.ibm.com> Date: Wed, 02 Oct 2013 14:31:25 -0500 From: Brian King MIME-Version: 1.0 To: Alexander Gordeev Subject: Re: [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI References: <2d4272136269f3cb3b1a5ac53b12aa45c7ea65c0.1380703263.git.agordeev@redhat.com> In-Reply-To: <2d4272136269f3cb3b1a5ac53b12aa45c7ea65c0.1380703263.git.agordeev@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Cc: linux-mips@linux-mips.org, "VMware, Inc." , linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-ide@vger.kernel.org, stable@vger.kernel.org, Martin Schwidefsky , linux-s390@vger.kernel.org, Andy King , linux-scsi@vger.kernel.org, linux-rdma@vger.kernel.org, x86@kernel.org, Ingo Molnar , iss_storagedev@hp.com, Tejun Heo , Bjorn Helgaas , Dan Williams , Jon Mason , Solarflare linux maintainers , Wendy Xiong , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ralf Baechle , e1000-devel@lists.sourceforge.net, linux-driver@qlogic.com, linux390@de.ibm.com, linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 10/02/2013 05:48 AM, Alexander Gordeev wrote: > Signed-off-by: Alexander Gordeev > --- > drivers/scsi/ipr.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c > index fb57e21..762a93e 100644 > --- a/drivers/scsi/ipr.c > +++ b/drivers/scsi/ipr.c > @@ -9527,7 +9527,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev, > ipr_number_of_msix = IPR_MAX_MSIX_VECTORS; > } > > - if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI && > + if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSIX && > ipr_enable_msix(ioa_cfg) == 0) > ioa_cfg->intr_flag = IPR_USE_MSIX; > else if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI && > Nack. ioa_cfg->ipr_chip->intr_type gets initialized from the ipr_chip table at the top of the driver which never sets intr_type to IPR_USE_MSIX, so this will break MSI-X support for ipr. We indicate at the chip level only whether we want to force LSI or whether we want to enable MSI / MSI-X and then try enabling MSI-X and fall back to MSI if MSI-X is not available or does not work. We then set intr_flag to indicate what we are actually using on the specific adapter. Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center