From patchwork Fri Jul 15 12:58:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Kovvuri X-Patchwork-Id: 9231989 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 ABBBC60865 for ; Fri, 15 Jul 2016 13:01:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B29627F86 for ; Fri, 15 Jul 2016 13:01:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FE8F2832D; Fri, 15 Jul 2016 13:01:25 +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=-2.7 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,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 F125327F86 for ; Fri, 15 Jul 2016 13:01:23 +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 1bO2iT-0008KH-N8; Fri, 15 Jul 2016 12:59:41 +0000 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bO2i6-00082w-Ig for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2016 12:59:20 +0000 Received: by mail-pa0-x244.google.com with SMTP id hh10so6082069pac.1 for ; Fri, 15 Jul 2016 05:58:58 -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=IhnyI3eIVMxLV+YuLzJQJ0152JYVANfYcDyGiEun7tvO+FEbGIIf+LVcIgE/PPbyou 2Hoj55eb7yB4evdOI5PnQUVRCfZeiWHaXILgsQDPfkH+rhe8p4k6bOnQ4ocVcGugqE/t JcoYjpMDhMMYZj83cMQpDD9F+1BNY3AM0uVDTOcB8vRrQqoVMafEatENXwaTaiYq4mYV BUiknOYS8TxmF83YVAdfaJmPhskGpsmBtp/O0V7JdSzIzCC7uHswgqJ9ijnj0D++Wmos BjuRvUSqb1Ki5xdogzvPcqQPqHPVjQtr344RY/YYbvcCDv0iWlQg/oxz8ejOVYhb0aLL ZNkw== 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=ijdwQRLiWaDQnoR8VqU9FCFvX1yeT+V8rZ+8MPYaukZojCapTY6oW0KD9lhQ/gtvpy D2vyvzfTRYj+iSEFfX16RZseyfxRhtqdlFUD6qZw9cPSfMESIdg6yhypxCzWydJvHVq4 etWLsD3aphp8IigMaDQl8IKHnIdu9icQF2dGz8sALNBrhfWx88kaegBFx2ubvgaoPtdB tNc9x5Ojgg299CU43QeT6QaMSIlifA7uAJ/XK7MMRc1lVWSE0swcqwiBFBAj7zjh/YxP 2jhoecTw2O2wzT734GvJ7a/tQ8ZZ3pUKdJHY6EXMY2jNQH8I2/Diw75gnchqQrh2Zifz 9YCQ== X-Gm-Message-State: ALyK8tKdl3BzlJDjNSFuTlqkl3yn8pt/ofdqRVq8ZFk3TeYwL0Gf1fPE+4ZwSnY4Ly3reA== X-Received: by 10.66.219.105 with SMTP id pn9mr31285360pac.25.1468587537640; Fri, 15 Jul 2016 05:58:57 -0700 (PDT) Received: from machine421.in.caveonetworks.com ([14.140.2.178]) by smtp.googlemail.com with ESMTPSA id t80sm5365880pfj.38.2016.07.15.05.58.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 05:58:56 -0700 (PDT) From: sunil.kovvuri@gmail.com To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 02/15] net: thunderx: Add VNIC's PCI devid on future chips Date: Fri, 15 Jul 2016 18:28:07 +0530 Message-Id: <1468587500-32103-3-git-send-email-sunil.kovvuri@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468587500-32103-1-git-send-email-sunil.kovvuri@gmail.com> References: <1468587500-32103-1-git-send-email-sunil.kovvuri@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160715_055918_840868_AD33438B X-CRM114-Status: GOOD ( 10.98 ) 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 */ };