Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/887907/?format=api
{ "id": 887907, "url": "http://patchwork.ozlabs.org/api/patches/887907/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180319215644.31978-1-jeffrey.t.kirsher@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180319215644.31978-1-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2018-03-19T21:56:30", "name": "[v3,01/15] ice: Add basic driver framework for Intel(R) E800 Series", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5d531d64e10eba76e6896a38d1e8e50e165d28f5", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180319215644.31978-1-jeffrey.t.kirsher@intel.com/mbox/", "series": [ { "id": 34702, "url": "http://patchwork.ozlabs.org/api/series/34702/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=34702", "date": "2018-03-19T21:56:30", "name": "[v3,01/15] ice: Add basic driver framework for Intel(R) E800 Series", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/34702/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/887907/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/887907/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=intel.com" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 404qdZ0tF0z9sVl\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 20 Mar 2018 08:56:15 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id EBE04261E5;\n\tMon, 19 Mar 2018 21:56:13 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id guhdJFI2JVRx; Mon, 19 Mar 2018 21:56:11 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id A0AFE26021;\n\tMon, 19 Mar 2018 21:56:11 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id DE7B01C2272\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 19 Mar 2018 21:56:09 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DA02C8915C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 19 Mar 2018 21:56:09 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id dwFym21Dh3YR for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 19 Mar 2018 21:56:08 +0000 (UTC)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 0EBF788E86\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 19 Mar 2018 21:56:07 +0000 (UTC)", "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Mar 2018 14:56:07 -0700", "from jtkirshe-nuc.jf.intel.com ([134.134.177.59])\n\tby orsmga008.jf.intel.com with ESMTP; 19 Mar 2018 14:56:07 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.48,332,1517904000\"; d=\"scan'208\";a=\"26667078\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 19 Mar 2018 14:56:30 -0700", "Message-Id": "<20180319215644.31978-1-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.14.3", "Subject": "[Intel-wired-lan] [PATCH v3 01/15] ice: Add basic driver framework\n\tfor Intel(R) E800 Series", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n\nThis patch adds a basic driver framework for the Intel(R) E800 Ethernet\nSeries of network devices. There is no functionality right now other than\nthe ability to load.\n\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n Documentation/networking/ice.txt | 39 +++++++\n MAINTAINERS | 1 +\n drivers/net/ethernet/intel/Kconfig | 14 +++\n drivers/net/ethernet/intel/Makefile | 1 +\n drivers/net/ethernet/intel/ice/Makefile | 27 +++++\n drivers/net/ethernet/intel/ice/ice.h | 48 ++++++++\n drivers/net/ethernet/intel/ice/ice_devids.h | 33 ++++++\n drivers/net/ethernet/intel/ice/ice_main.c | 172 ++++++++++++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_type.h | 42 +++++++\n 9 files changed, 377 insertions(+)\n create mode 100644 Documentation/networking/ice.txt\n create mode 100644 drivers/net/ethernet/intel/ice/Makefile\n create mode 100644 drivers/net/ethernet/intel/ice/ice.h\n create mode 100644 drivers/net/ethernet/intel/ice/ice_devids.h\n create mode 100644 drivers/net/ethernet/intel/ice/ice_main.c\n create mode 100644 drivers/net/ethernet/intel/ice/ice_type.h", "diff": "diff --git a/Documentation/networking/ice.txt b/Documentation/networking/ice.txt\nnew file mode 100644\nindex 000000000000..6261c46378e1\n--- /dev/null\n+++ b/Documentation/networking/ice.txt\n@@ -0,0 +1,39 @@\n+Intel(R) Ethernet Connection E800 Series Linux Driver\n+===================================================================\n+\n+Intel ice Linux driver.\n+Copyright(c) 2018 Intel Corporation.\n+\n+Contents\n+========\n+- Enabling the driver\n+- Support\n+\n+The driver in this release supports Intel's E800 Series of products. For\n+more information, visit Intel's support page at http://support.intel.com.\n+\n+Enabling the driver\n+===================\n+\n+The driver is enabled via the standard kernel configuration system,\n+using the make command:\n+\n+ Make oldconfig/silentoldconfig/menuconfig/etc.\n+\n+The driver is located in the menu structure at:\n+\n+\t-> Device Drivers\n+\t -> Network device support (NETDEVICES [=y])\n+\t -> Ethernet driver support\n+\t -> Intel devices\n+\t -> Intel(R) Ethernet Connection E800 Series Support\n+\n+Support\n+=======\n+\n+For general information, go to the Intel support website at:\n+\n+ http://support.intel.com\n+\n+If an issue is identified with the released source code, please email\n+the maintainer listed in the MAINTAINERS file.\ndiff --git a/MAINTAINERS b/MAINTAINERS\nindex 214c9bca232a..79f9c33904bc 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -7063,6 +7063,7 @@ F:\tDocumentation/networking/ixgbe.txt\n F:\tDocumentation/networking/ixgbevf.txt\n F:\tDocumentation/networking/i40e.txt\n F:\tDocumentation/networking/i40evf.txt\n+F:\tDocumentation/networking/ice.txt\n F:\tdrivers/net/ethernet/intel/\n F:\tdrivers/net/ethernet/intel/*/\n F:\tinclude/linux/avf/virtchnl.h\ndiff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig\nindex 1feb54b6d92e..14d287bed33c 100644\n--- a/drivers/net/ethernet/intel/Kconfig\n+++ b/drivers/net/ethernet/intel/Kconfig\n@@ -251,6 +251,20 @@ config I40EVF\n \t will be called i40evf. MSI-X interrupt support is required\n \t for this driver to work correctly.\n \n+config ICE\n+\ttristate \"Intel(R) Ethernet Connection E800 Series Support\"\n+\tdefault n\n+\tdepends on PCI_MSI\n+\t---help---\n+\t This driver supports Intel(R) Ethernet Connection E800 Series of\n+\t devices. For more information on how to identify your adapter, go\n+\t to the Adapter & Driver ID Guide that can be located at:\n+\n+\t <http://support.intel.com>\n+\n+\t To compile this driver as a module, choose M here. The module\n+\t will be called ice.\n+\n config FM10K\n \ttristate \"Intel(R) FM10000 Ethernet Switch Host Interface Support\"\n \tdefault n\ndiff --git a/drivers/net/ethernet/intel/Makefile b/drivers/net/ethernet/intel/Makefile\nindex 90af7757a885..807a4f8c7e4e 100644\n--- a/drivers/net/ethernet/intel/Makefile\n+++ b/drivers/net/ethernet/intel/Makefile\n@@ -14,3 +14,4 @@ obj-$(CONFIG_I40E) += i40e/\n obj-$(CONFIG_IXGB) += ixgb/\n obj-$(CONFIG_I40EVF) += i40evf/\n obj-$(CONFIG_FM10K) += fm10k/\n+obj-$(CONFIG_ICE) += ice/\ndiff --git a/drivers/net/ethernet/intel/ice/Makefile b/drivers/net/ethernet/intel/ice/Makefile\nnew file mode 100644\nindex 000000000000..2a177ea21b74\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/Makefile\n@@ -0,0 +1,27 @@\n+# SPDX-License-Identifier: GPL-2.0-only\n+################################################################################\n+#\n+# Intel(R) Ethernet Connection E800 Series Linux Driver\n+# Copyright (c) 2018, Intel Corporation.\n+#\n+# This program is free software; you can redistribute it and/or modify it\n+# under the terms and conditions of the GNU General Public License,\n+# version 2, as published by the Free Software Foundation.\n+#\n+# This program is distributed in the hope it will be useful, but WITHOUT\n+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n+# more details.\n+#\n+# The full GNU General Public License is included in this distribution in\n+# the file called \"COPYING\".\n+#\n+################################################################################\n+\n+#\n+# Makefile for the Intel(R) Ethernet Connection E800 Series Linux Driver\n+#\n+\n+obj-$(CONFIG_ICE) += ice.o\n+\n+ice-y := ice_main.o\ndiff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nnew file mode 100644\nindex 000000000000..d781027330cc\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -0,0 +1,48 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/* Intel(R) Ethernet Connection E800 Series Linux Driver\n+ * Copyright (c) 2018, Intel Corporation.\n+ *\n+ * This program is free software; you can redistribute it and/or modify it\n+ * under the terms and conditions of the GNU General Public License,\n+ * version 2, as published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n+ * more details.\n+ *\n+ * The full GNU General Public License is included in this distribution in\n+ * the file called \"COPYING\".\n+ */\n+\n+#ifndef _ICE_H_\n+#define _ICE_H_\n+\n+#include <linux/types.h>\n+#include <linux/errno.h>\n+#include <linux/kernel.h>\n+#include <linux/module.h>\n+#include <linux/netdevice.h>\n+#include <linux/compiler.h>\n+#include <linux/pci.h>\n+#include <linux/aer.h>\n+#include <linux/bitmap.h>\n+#include \"ice_devids.h\"\n+#include \"ice_type.h\"\n+\n+#define ICE_BAR0\t\t0\n+\n+#define ICE_DFLT_NETIF_M (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK)\n+\n+enum ice_state {\n+\t__ICE_DOWN,\n+\t__ICE_STATE_NBITS\t\t/* must be last */\n+};\n+\n+struct ice_pf {\n+\tstruct pci_dev *pdev;\n+\tDECLARE_BITMAP(state, __ICE_STATE_NBITS);\n+\tu32 msg_enable;\n+\tstruct ice_hw hw;\n+};\n+#endif /* _ICE_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_devids.h b/drivers/net/ethernet/intel/ice/ice_devids.h\nnew file mode 100644\nindex 000000000000..d6bfee547b88\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_devids.h\n@@ -0,0 +1,33 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/* Intel(R) Ethernet Connection E800 Series Linux Driver\n+ * Copyright (c) 2018, Intel Corporation.\n+ *\n+ * This program is free software; you can redistribute it and/or modify it\n+ * under the terms and conditions of the GNU General Public License,\n+ * version 2, as published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n+ * more details.\n+ *\n+ * The full GNU General Public License is included in this distribution in\n+ * the file called \"COPYING\".\n+ */\n+\n+#ifndef _ICE_DEVIDS_H_\n+#define _ICE_DEVIDS_H_\n+\n+/* Device IDs */\n+/* Intel(R) Ethernet Controller C810 for backplane */\n+#define ICE_DEV_ID_C810_BACKPLANE\t0x1591\n+/* Intel(R) Ethernet Controller C810 for QSFP */\n+#define ICE_DEV_ID_C810_QSFP\t\t0x1592\n+/* Intel(R) Ethernet Controller C810 for SFP */\n+#define ICE_DEV_ID_C810_SFP\t\t0x1593\n+/* Intel(R) Ethernet Controller C810/X557-AT 10GBASE-T */\n+#define ICE_DEV_ID_C810_10G_BASE_T\t0x1594\n+/* Intel(R) Ethernet Controller C810 1GbE */\n+#define ICE_DEV_ID_C810_SGMII\t\t0x1595\n+\n+#endif /* _ICE_DEVIDS_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nnew file mode 100644\nindex 000000000000..0631812aef2b\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -0,0 +1,172 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+/* Intel(R) Ethernet Connection E800 Series Linux Driver\n+ * Copyright (c) 2018, Intel Corporation.\n+ *\n+ * This program is free software; you can redistribute it and/or modify it\n+ * under the terms and conditions of the GNU General Public License,\n+ * version 2, as published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n+ * more details.\n+ *\n+ * The full GNU General Public License is included in this distribution in\n+ * the file called \"COPYING\".\n+ */\n+\n+/* Intel(R) Ethernet Connection E800 Series Linux Driver */\n+\n+#define pr_fmt(fmt) KBUILD_MODNAME \": \" fmt\n+\n+#include \"ice.h\"\n+\n+#define DRV_VERSION\t\"ice-0.0.1-k\"\n+#define DRV_SUMMARY\t\"Intel(R) Ethernet Connection E800 Series Linux Driver\"\n+static const char ice_drv_ver[] = DRV_VERSION;\n+static const char ice_driver_string[] = DRV_SUMMARY;\n+static const char ice_copyright[] = \"Copyright (c) 2018, Intel Corporation.\";\n+\n+MODULE_AUTHOR(\"Intel Corporation, <linux.nics@intel.com>\");\n+MODULE_DESCRIPTION(DRV_SUMMARY);\n+MODULE_LICENSE(\"GPL\");\n+MODULE_VERSION(DRV_VERSION);\n+\n+static int debug = -1;\n+module_param(debug, int, 0644);\n+MODULE_PARM_DESC(debug, \"netif message level (0=none,...,0x7FFF=all)\");\n+\n+/**\n+ * ice_probe - Device initialization routine\n+ * @pdev: PCI device information struct\n+ * @ent: entry in ice_pci_tbl\n+ *\n+ * Returns 0 on success, negative on failure\n+ */\n+static int ice_probe(struct pci_dev *pdev,\n+\t\t const struct pci_device_id __always_unused *ent)\n+{\n+\tstruct ice_pf *pf;\n+\tstruct ice_hw *hw;\n+\tint err;\n+\n+\t/* this driver uses devres, see Documentation/driver-model/devres.txt */\n+\terr = pcim_enable_device(pdev);\n+\tif (err)\n+\t\treturn err;\n+\n+\terr = pcim_iomap_regions(pdev, BIT(ICE_BAR0), pci_name(pdev));\n+\tif (err) {\n+\t\tdev_err(&pdev->dev, \"I/O map error %d\\n\", err);\n+\t\treturn err;\n+\t}\n+\n+\tpf = devm_kzalloc(&pdev->dev, sizeof(*pf), GFP_KERNEL);\n+\tif (!pf)\n+\t\treturn -ENOMEM;\n+\n+\t/* set up for high or low dma */\n+\terr = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));\n+\tif (err)\n+\t\terr = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));\n+\tif (err) {\n+\t\tdev_err(&pdev->dev, \"DMA configuration failed: 0x%x\\n\", err);\n+\t\treturn err;\n+\t}\n+\n+\tpci_enable_pcie_error_reporting(pdev);\n+\tpci_set_master(pdev);\n+\n+\tpf->pdev = pdev;\n+\tpci_set_drvdata(pdev, pf);\n+\tset_bit(__ICE_DOWN, pf->state);\n+\n+\thw = &pf->hw;\n+\thw->hw_addr = pcim_iomap_table(pdev)[ICE_BAR0];\n+\thw->back = pf;\n+\thw->vendor_id = pdev->vendor;\n+\thw->device_id = pdev->device;\n+\tpci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id);\n+\thw->subsystem_vendor_id = pdev->subsystem_vendor;\n+\thw->subsystem_device_id = pdev->subsystem_device;\n+\thw->bus.device = PCI_SLOT(pdev->devfn);\n+\thw->bus.func = PCI_FUNC(pdev->devfn);\n+\tpf->msg_enable = netif_msg_init(debug, ICE_DFLT_NETIF_M);\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * ice_remove - Device removal routine\n+ * @pdev: PCI device information struct\n+ */\n+static void ice_remove(struct pci_dev *pdev)\n+{\n+\tstruct ice_pf *pf = pci_get_drvdata(pdev);\n+\n+\tif (!pf)\n+\t\treturn;\n+\n+\tset_bit(__ICE_DOWN, pf->state);\n+\tpci_disable_pcie_error_reporting(pdev);\n+}\n+\n+/* ice_pci_tbl - PCI Device ID Table\n+ *\n+ * Wildcard entries (PCI_ANY_ID) should come last\n+ * Last entry must be all 0s\n+ *\n+ * { Vendor ID, Device ID, SubVendor ID, SubDevice ID,\n+ * Class, Class Mask, private data (not used) }\n+ */\n+static const struct pci_device_id ice_pci_tbl[] = {\n+\t{ PCI_VDEVICE(INTEL, ICE_DEV_ID_C810_BACKPLANE), 0 },\n+\t{ PCI_VDEVICE(INTEL, ICE_DEV_ID_C810_QSFP), 0 },\n+\t{ PCI_VDEVICE(INTEL, ICE_DEV_ID_C810_SFP), 0 },\n+\t{ PCI_VDEVICE(INTEL, ICE_DEV_ID_C810_10G_BASE_T), 0 },\n+\t{ PCI_VDEVICE(INTEL, ICE_DEV_ID_C810_SGMII), 0 },\n+\t/* required last entry */\n+\t{ 0, }\n+};\n+MODULE_DEVICE_TABLE(pci, ice_pci_tbl);\n+\n+static struct pci_driver ice_driver = {\n+\t.name = KBUILD_MODNAME,\n+\t.id_table = ice_pci_tbl,\n+\t.probe = ice_probe,\n+\t.remove = ice_remove,\n+};\n+\n+/**\n+ * ice_module_init - Driver registration routine\n+ *\n+ * ice_module_init is the first routine called when the driver is\n+ * loaded. All it does is register with the PCI subsystem.\n+ */\n+static int __init ice_module_init(void)\n+{\n+\tint status;\n+\n+\tpr_info(\"%s - version %s\\n\", ice_driver_string, ice_drv_ver);\n+\tpr_info(\"%s\\n\", ice_copyright);\n+\n+\tstatus = pci_register_driver(&ice_driver);\n+\tif (status)\n+\t\tpr_err(\"failed to register pci driver, err %d\\n\", status);\n+\n+\treturn status;\n+}\n+module_init(ice_module_init);\n+\n+/**\n+ * ice_module_exit - Driver exit cleanup routine\n+ *\n+ * ice_module_exit is called just before the driver is removed\n+ * from memory.\n+ */\n+static void __exit ice_module_exit(void)\n+{\n+\tpci_unregister_driver(&ice_driver);\n+\tpr_info(\"module unloaded\\n\");\n+}\n+module_exit(ice_module_exit);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h\nnew file mode 100644\nindex 000000000000..ad01e5f73d2c\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_type.h\n@@ -0,0 +1,42 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/* Intel(R) Ethernet Connection E800 Series Linux Driver\n+ * Copyright (c) 2018, Intel Corporation.\n+ *\n+ * This program is free software; you can redistribute it and/or modify it\n+ * under the terms and conditions of the GNU General Public License,\n+ * version 2, as published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n+ * more details.\n+ *\n+ * The full GNU General Public License is included in this distribution in\n+ * the file called \"COPYING\".\n+ */\n+\n+#ifndef _ICE_TYPE_H_\n+#define _ICE_TYPE_H_\n+\n+/* Bus parameters */\n+struct ice_bus_info {\n+\tu16 device;\n+\tu8 func;\n+};\n+\n+/* Port hardware description */\n+struct ice_hw {\n+\tu8 __iomem *hw_addr;\n+\tvoid *back;\n+\n+\t/* pci info */\n+\tu16 device_id;\n+\tu16 vendor_id;\n+\tu16 subsystem_device_id;\n+\tu16 subsystem_vendor_id;\n+\tu8 revision_id;\n+\n+\tstruct ice_bus_info bus;\n+};\n+\n+#endif /* _ICE_TYPE_H_ */\n", "prefixes": [ "v3", "01/15" ] }