From patchwork Mon Jul 11 10:01:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9223133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5720360760 for ; Mon, 11 Jul 2016 10:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46F50209CC for ; Mon, 11 Jul 2016 10:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BA602793D; Mon, 11 Jul 2016 10:04:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EC07D209CC for ; Mon, 11 Jul 2016 10:04:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bMY37-00033z-Od; Mon, 11 Jul 2016 10:02:49 +0000 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bMY2z-0002xM-Om for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2016 10:02:42 +0000 Received: by mail-pa0-x241.google.com with SMTP id dx3so12581419pab.2 for ; Mon, 11 Jul 2016 03:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pmFxuMHO+FDyvWa8TOCiIUPa47yw90TIw5SDJ+AuBL0=; b=DpQJCYnmKn7zJHI9bYmXGqD8ZNamD8ZE90aS+3FWa5xRtIhKOo4+90WEPebnroSpU2 PxVyNx0B0Neu33vWKuUDPUpZweQYiRPiEQFbWnuij9Mkc16xChW0d1OXON/K1k7gLpbj zaxYnFLCld50Av1kcCp3nAkCiZdmaPbj8DQaeWWWlaJp24c1JqGBo+rbZA1RR4gqIL8G 7qf+aUz6wUyhGUpdXcuXtH+gXvcXwz7Lm2u2siYQznZYHMFbKLFuCm/RC7UQ5bctQaQb RU6+EtVJXYJK6+lT3F2S3KCxb/j3hNuDkE/gPGi5cj43oufI6/uKzOp2RxGIAmpCSQiV MAqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pmFxuMHO+FDyvWa8TOCiIUPa47yw90TIw5SDJ+AuBL0=; b=cxLJFUhjfQoo3o9GlePjxztc5c7X73CLl0BcfleW1p0ImWeq52ckAQawxL3RO/IsLy k4k0Fa+3lYOI9N6R09N8dnPYCCCVCjGTUja5PJ1F7Xi1P9LvZpo9jJdGMJTGGfV7FSKM C6OwiWi3PAT+gG3ijXqiyNrEINGha+7T3dHOhZpWaK5ySC/r8POinDF8Yo59l0L6NqbT Y1SHDBdrVeFRWoe19U+vkQsDlQAuIP4AH9MbnKyuWEAnlVyYBaF4bm5yanw0UUnaTikp 2uFDllEiH67EBblTgi2dTlk8HmG4LK5Eq6TzJHHfIuidZ+VuI/jzSv92AlC69dL9xGys 38wQ== X-Gm-Message-State: ALyK8tK9XQcOJP1MeHjj2eWT0CbDWdqhHNjT4Fz67jWrZBtqxlmZr1nDex52Ks8Q55s6DA== X-Received: by 10.66.21.132 with SMTP id v4mr33390001pae.54.1468231340905; Mon, 11 Jul 2016 03:02:20 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id 15sm3602884pfz.36.2016.07.11.03.02.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jul 2016 03:02:20 -0700 (PDT) From: sunil.kovvuri@gmail.com To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 02/15] net: thunderx: Add VNIC's PCI devid on future chips Date: Mon, 11 Jul 2016 15:31:44 +0530 Message-Id: <1468231317-24023-3-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468231317-24023-1-git-send-email-sunil.kovvuri@gmail.com> References: <1468231317-24023-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160711_030241_884907_C1B1FA00 X-CRM114-Status: GOOD ( 10.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sunil Goutham MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sunil Goutham This patch adds PCI device IDs of VNIC on newer chips and also registers VF driver with them. Device id remains same for all versions of chips but subsystem device id changes. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h | 10 +++++++++- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h index 66b499b..6b0b240 100644 --- a/drivers/net/ethernet/cavium/thunder/nic.h +++ b/drivers/net/ethernet/cavium/thunder/nic.h @@ -21,7 +21,15 @@ #define PCI_DEVICE_ID_THUNDER_BGX 0xA026 /* Subsystem device IDs */ -#define PCI_SUBSYS_DEVID_88XX_NIC_PF 0xA11E +#define PCI_SUBSYS_DEVID_88XX_NIC_PF 0xA11E +#define PCI_SUBSYS_DEVID_81XX_NIC_PF 0xA21E +#define PCI_SUBSYS_DEVID_83XX_NIC_PF 0xA31E + +#define PCI_SUBSYS_DEVID_88XX_PASS1_NIC_VF 0xA11E +#define PCI_SUBSYS_DEVID_88XX_NIC_VF 0xA134 +#define PCI_SUBSYS_DEVID_81XX_NIC_VF 0xA234 +#define PCI_SUBSYS_DEVID_83XX_NIC_VF 0xA334 + /* PCI BAR nos */ #define PCI_CFG_REG_BAR_NUM 0 diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index a19e73f..0c10635 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -29,10 +29,20 @@ static const struct pci_device_id nicvf_id_table[] = { { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_THUNDER_NIC_VF, - PCI_VENDOR_ID_CAVIUM, 0xA134) }, + PCI_VENDOR_ID_CAVIUM, + PCI_SUBSYS_DEVID_88XX_NIC_VF) }, { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_THUNDER_PASS1_NIC_VF, - PCI_VENDOR_ID_CAVIUM, 0xA11E) }, + PCI_VENDOR_ID_CAVIUM, + PCI_SUBSYS_DEVID_88XX_PASS1_NIC_VF) }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, + PCI_DEVICE_ID_THUNDER_NIC_VF, + PCI_VENDOR_ID_CAVIUM, + PCI_SUBSYS_DEVID_81XX_NIC_VF) }, + { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, + PCI_DEVICE_ID_THUNDER_NIC_VF, + PCI_VENDOR_ID_CAVIUM, + PCI_SUBSYS_DEVID_83XX_NIC_VF) }, { 0, } /* end of table */ };