Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754658AbbERSZK (ORCPT ); Mon, 18 May 2015 14:25:10 -0400 Received: from mail-bl2on0072.outbound.protection.outlook.com ([65.55.169.72]:20683 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752057AbbERSZH (ORCPT ); Mon, 18 May 2015 14:25:07 -0400 X-Greylist: delayed 2007 seconds by postgrey-1.27 at vger.kernel.org; Mon, 18 May 2015 14:25:06 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@caviumnetworks.com; Message-ID: <555A269F.4050907@caviumnetworks.com> Date: Mon, 18 May 2015 10:51:27 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Bjorn Helgaas , David Miller CC: Aleksey Makarov , netdev , "linux-kernel@vger.kernel.org" , David Daney , "linux-pci@vger.kernel.org" , Greg Kroah-Hartman Subject: Re: [PATCH net-next v3 1/2] pci: Add Cavium PCI vendor id References: <20150516.171444.245757401088795324.davem@davemloft.net> <20150518.124152.558065488359768601.davem@davemloft.net> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: BN1PR07CA0040.namprd07.prod.outlook.com (10.255.193.15) To BY1PR0701MB1721.namprd07.prod.outlook.com (25.162.111.140) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1721; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BY1PR0701MB1721;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1721; X-Forefront-PRVS: 058043A388 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(54534003)(377454003)(24454002)(479174004)(199003)(51704005)(189002)(47776003)(65956001)(65806001)(66066001)(93886004)(87266999)(4001350100001)(19580405001)(4001540100001)(80316001)(64706001)(65816999)(50986999)(5001860100001)(54356999)(5001960100002)(5001830100001)(76176999)(189998001)(97736004)(81156007)(2950100001)(122386002)(36756003)(40100003)(68736005)(77156002)(69596002)(62966003)(50466002)(19580395003)(92566002)(83506001)(46102003)(87976001)(33656002)(42186005)(101416001)(5001770100001)(59896002)(106356001)(23676002)(105586002)(53416004)(64126003)(3076002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1721;H:dl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2015 17:51:33.5262 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3003 Lines: 78 On 05/18/2015 10:26 AM, Bjorn Helgaas wrote: > On Mon, May 18, 2015 at 11:41 AM, David Miller wrote: >> From: Bjorn Helgaas >> Date: Mon, 18 May 2015 11:35:20 -0500 >> >>> [+cc Greg] >>> >>> On Sat, May 16, 2015 at 4:14 PM, David Miller wrote: >>>> From: Bjorn Helgaas >>>> Date: Sat, 16 May 2015 09:49:40 -0500 >>>> >>>>> Hi Aleksey, >>>>> >>>>> On Fri, May 15, 2015 at 10:36 PM, Aleksey Makarov >>>>> wrote: >>>>>> Signed-off-by: Aleksey Makarov >>>>>> --- >>>>>> include/linux/pci_ids.h | 2 ++ >>>>>> 1 file changed, 2 insertions(+) >>>>>> >>>>>> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h >>>>>> index e63c02a..3633cc6 100644 >>>>>> --- a/include/linux/pci_ids.h >>>>>> +++ b/include/linux/pci_ids.h >>>>>> @@ -2327,6 +2327,8 @@ >>>>>> #define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea >>>>>> #define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb >>>>>> >>>>>> +#define PCI_VENDOR_ID_CAVIUM 0x177d >>>>> >>>>> Please read the note at the top of include/linux/pci_ids.h. If this >>>>> definition is used in two or more drivers, mention that in the >>>>> changelog. Otherwise, just use the bare hex value or a private >>>>> #define in your driver. >>>> >>>> It is referenced from two foo.c files in the same driver. >>>> >>>> I don't know what policy we want for situations like that. >>> >>> The current policy (1d4a433fc4e9 ("PCI: Document pci_ids.h addition >>> policy.")) predates me and I don't know the whole rationale. I can >>> see that it might reduce backporting pain for distros. >>> >>> If two foo.c files in the same driver share the PCI ID, they likely >>> share other things as well, so there's likely a shared .h file where a >>> private PCI_VENDOR_ID_CAVIUM could go. >>> >>> But this is a vendor ID (not a device ID), and it seems likely that >>> there will be other devices from Cavium, so maybe it would make sense >>> to apply the policy to device IDs, and go ahead and add vendor IDs to >>> pci_ids.h. >> >> That makes sense to me, and therefore this change is probably fine as-is. > > OK. I assume you'll take the whole series, so: > > Acked-by: Bjorn Helgaas > Thanks guys, Just for the record, the Cavium ThunderX network controller driver (that is part 2/2 of the series), is just the first user of the PCI_VENDOR_ID_CAVIUM. We have in the pipeline drivers/patches for USB (xHCI), SATA (AHCI), GPIO, I2C, MMC, and maybe others that will also be using this #define. I also agree with the concept that the vendor ID has more if a place in pci_ids.h than device IDs (which usually can go in the driver itself). David Daney -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/