From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751605AbdFAKPH (ORCPT ); Thu, 1 Jun 2017 06:15:07 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:6933 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbdFAKPG (ORCPT ); Thu, 1 Jun 2017 06:15:06 -0400 Subject: Re: [PATCH v3 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR To: Christoph Hellwig References: <1496241195-217678-1-git-send-email-john.garry@huawei.com> <1496241195-217678-14-git-send-email-john.garry@huawei.com> <20170601054106.GA4743@infradead.org> CC: , , , , , , , Xiang Chen From: John Garry Message-ID: <0a1e06ff-eae4-5ec4-5b9d-c6e29d50b5f1@huawei.com> Date: Thu, 1 Jun 2017 11:10:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20170601054106.GA4743@infradead.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.181.155] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.592FE826.00E9,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: f8c55d2d34ebdc071789d7bcf41b94e2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/06/2017 06:41, Christoph Hellwig wrote: >> > +static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba) >> > +{ >> > + struct device *dev = hisi_hba->dev; >> > + struct pci_dev *pdev = hisi_hba->pci_dev; >> > + int vectors, i, irq, rc; >> > + int max_msi = HISI_SAS_MSI_COUNT_V3_HW; >> > + int msi_vectors[HISI_SAS_MSI_COUNT_V3_HW]; >> > + >> > + if (pdev->msi_enabled) >> > + pci_disable_msi(pdev); > How could MSIs be enabled at init time? Even if so you should use > pci_free_irq_vectors. Right, I don't think it could, so this can be removed. > >> > + for (i = 0; i < vectors; i++) >> > + msi_vectors[i] = pdev->irq + i; > You should not need this array, just use pci_irq_vectors(). > That should be ok. > . > Thanks, John From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Garry Subject: Re: [PATCH v3 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR Date: Thu, 1 Jun 2017 11:10:27 +0100 Message-ID: <0a1e06ff-eae4-5ec4-5b9d-c6e29d50b5f1@huawei.com> References: <1496241195-217678-1-git-send-email-john.garry@huawei.com> <1496241195-217678-14-git-send-email-john.garry@huawei.com> <20170601054106.GA4743@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170601054106.GA4743@infradead.org> Sender: linux-kernel-owner@vger.kernel.org To: Christoph Hellwig Cc: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, john.garry2@mail.dcu.ie, linuxarm@huawei.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, Xiang Chen List-Id: linux-scsi@vger.kernel.org On 01/06/2017 06:41, Christoph Hellwig wrote: >> > +static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba) >> > +{ >> > + struct device *dev = hisi_hba->dev; >> > + struct pci_dev *pdev = hisi_hba->pci_dev; >> > + int vectors, i, irq, rc; >> > + int max_msi = HISI_SAS_MSI_COUNT_V3_HW; >> > + int msi_vectors[HISI_SAS_MSI_COUNT_V3_HW]; >> > + >> > + if (pdev->msi_enabled) >> > + pci_disable_msi(pdev); > How could MSIs be enabled at init time? Even if so you should use > pci_free_irq_vectors. Right, I don't think it could, so this can be removed. > >> > + for (i = 0; i < vectors; i++) >> > + msi_vectors[i] = pdev->irq + i; > You should not need this array, just use pci_irq_vectors(). > That should be ok. > . > Thanks, John