From patchwork Fri May 6 22:15:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Lemon X-Patchwork-Id: 12841674 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC891C433FE for ; Fri, 6 May 2022 22:15:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444711AbiEFWT3 (ORCPT ); Fri, 6 May 2022 18:19:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444702AbiEFWTV (ORCPT ); Fri, 6 May 2022 18:19:21 -0400 Received: from smtp8.emailarray.com (smtp8.emailarray.com [65.39.216.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE2AE0C4 for ; Fri, 6 May 2022 15:15:36 -0700 (PDT) Received: (qmail 32052 invoked by uid 89); 6 May 2022 22:15:35 -0000 Received: from unknown (HELO localhost) (amxlbW9uQGZsdWdzdmFtcC5jb21AMTc0LjIxLjE0NC4yOQ==) (POLARISLOCAL) by smtp8.emailarray.com with SMTP; 6 May 2022 22:15:35 -0000 From: Jonathan Lemon To: netdev@vger.kernel.org Cc: richardcochran@gmail.com, kernel-team@fb.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com Subject: [PATCH net-next v2 02/10] ptp: ocp: add Celestica timecard PCI ids Date: Fri, 6 May 2022 15:15:23 -0700 Message-Id: <20220506221531.1308-3-jonathan.lemon@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220506221531.1308-1-jonathan.lemon@gmail.com> References: <20220506221531.1308-1-jonathan.lemon@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vadim Fedorenko Celestica is producing card with their own vendor id and device id. Add these ids to driver to support this card. Signed-off-by: Vadim Fedorenko Signed-off-by: Jonathan Lemon --- drivers/ptp/ptp_ocp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index 9bd83ee8b93f..b02822316e96 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -28,6 +28,14 @@ #define PCI_DEVICE_ID_FACEBOOK_TIMECARD 0x0400 #endif +#ifndef PCI_VENDOR_ID_CELESTICA +#define PCI_VENDOR_ID_CELESTICA 0x18d4 +#endif + +#ifndef PCI_DEVICE_ID_CELESTICA_TIMECARD +#define PCI_DEVICE_ID_CELESTICA_TIMECARD 0x1008 +#endif + static struct class timecard_class = { .owner = THIS_MODULE, .name = "timecard", @@ -634,7 +642,8 @@ static struct ocp_resource ocp_fb_resource[] = { static const struct pci_device_id ptp_ocp_pcidev_id[] = { { PCI_DEVICE_DATA(FACEBOOK, TIMECARD, &ocp_fb_resource) }, - { 0 } + { PCI_DEVICE_DATA(CELESTICA, TIMECARD, &ocp_fb_resource) }, + { } }; MODULE_DEVICE_TABLE(pci, ptp_ocp_pcidev_id);