From patchwork Wed Jul 13 05:59:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9226819 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 7F7CA6088F for ; Wed, 13 Jul 2016 06:02:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 703C02787D for ; Wed, 13 Jul 2016 06:02:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 651F027C38; Wed, 13 Jul 2016 06:02:14 +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 2F6C32787D for ; Wed, 13 Jul 2016 06:02:14 +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 1bNDDh-0002EU-7e; Wed, 13 Jul 2016 06:00:29 +0000 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNDDe-0001sT-5m for linux-arm-kernel@lists.infradead.org; Wed, 13 Jul 2016 06:00:27 +0000 Received: by mail-pa0-x243.google.com with SMTP id q2so2396367pap.0 for ; Tue, 12 Jul 2016 23:00:05 -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=YB/TMcMgBTsAeFdwbLPmVLzbyj8KKkUrYh0Dtli0CbYjXn+AqSPJXy50+JUOJCntQM iyLyEjhOQML/3eEQY/+yqbftGRafz2Pdlm2rTYpPI7xIQTfh93ZMYigWiGaGr526ERc8 g458R6yZ5YbauOPI5bmGHIAcEjssfEX15PpGFX85WKmZGJ9Wniytmw909Ra4AyW4ujFp yr9Hjk1POc/H8lgGNHVwn0M6LadDpTpxBbZNnPO4EHzdwQ00R/2QoTOktj+9j96Wt40s T8ZqbkSzphEoWEX7qjqK1nEjTGBBP21z0D47VYAbKgidMNgYt2S22cha7YMYmiQHkanR p9Yw== 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=OusgT4djipTMn0n5s4zz7rgtvobJXD7oN3zskWchOgIPRyatGlIQ/5Fq28fg+hUFBm mpCWjGSfF3XJDGUTPCOoRJrFXKTFo8kc/2lE7htIgf4bSbsWsj4j6oDzhmLW1RaPgu80 c72vCVh0g6Xb80eMW865RF41Q31ZSe1L9PQyvkh7fw0thkPj9mtzCjiAwb/zgwxurWiK i65jjToyjcG42KT7fLVTl6U2oIY7JBt232uTHAR3Ynw4hP/NFa6oyUpT9Te5WCuegBdV YKA/IbYPr/OlDnEzkIjVS61RaN7NxVLoThpRBd1utDSroPfLISCiA7M7dMm29lgy4+mz BoKQ== X-Gm-Message-State: ALyK8tJ/kItJsFGnlrlz6sPrKjj/7Pabx4bxvrNY/g97ljkJdvRVg26KFKUBhLAjm1+0UA== X-Received: by 10.66.104.34 with SMTP id gb2mr10685079pab.12.1468389605173; Tue, 12 Jul 2016 23:00:05 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id su7sm1634700pab.44.2016.07.12.23.00.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jul 2016 23:00:04 -0700 (PDT) From: sunil.kovvuri@gmail.com To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 02/15] net: thunderx: Add VNIC's PCI devid on future chips Date: Wed, 13 Jul 2016 11:29:26 +0530 Message-Id: <1468389579-482-3-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468389579-482-1-git-send-email-sunil.kovvuri@gmail.com> References: <1468389579-482-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160712_230026_282050_EBD2EB22 X-CRM114-Status: GOOD ( 11.52 ) 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 */ };