Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/957963/?format=api
{ "id": 957963, "url": "http://patchwork.ozlabs.org/api/patches/957963/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1534345336-5425-1-git-send-email-sasha.neftin@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": "<1534345336-5425-1-git-send-email-sasha.neftin@intel.com>", "list_archive_url": null, "date": "2018-08-15T15:02:16", "name": "[v5,01/11] igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c5eb11f9222dc8dfaa59e537734c8d4ec9d00aa8", "submitter": { "id": 69860, "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api", "name": "Sasha Neftin", "email": "sasha.neftin@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/1534345336-5425-1-git-send-email-sasha.neftin@intel.com/mbox/", "series": [ { "id": 60923, "url": "http://patchwork.ozlabs.org/api/series/60923/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=60923", "date": "2018-08-15T15:02:19", "name": "[v5,01/11] igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support.", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/60923/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/957963/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/957963/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.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 41rCQG2Wmgz9s4V\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 16 Aug 2018 01:03:18 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E3387879F9;\n\tWed, 15 Aug 2018 15:03:16 +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 h3wYyrjY5dbb; Wed, 15 Aug 2018 15:03:15 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A835D878E9;\n\tWed, 15 Aug 2018 15:03:15 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id C94DA1CF09F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 15 Aug 2018 15:03:14 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id C734F24721\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 15 Aug 2018 15:03:14 +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 M52f1X4dEwk8 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 15 Aug 2018 15:03:14 +0000 (UTC)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby silver.osuosl.org (Postfix) with ESMTPS id F1D5B214FE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 15 Aug 2018 15:03:13 +0000 (UTC)", "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 Aug 2018 08:03:13 -0700", "from ccdlinuxdev08.iil.intel.com ([143.185.161.150])\n\tby orsmga006.jf.intel.com with ESMTP; 15 Aug 2018 08:02:17 -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.53,243,1531810800\"; d=\"scan'208\";a=\"66392929\"", "From": "Sasha Neftin <sasha.neftin@intel.com>", "To": "sasha.neftin@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Wed, 15 Aug 2018 18:02:16 +0300", "Message-Id": "<1534345336-5425-1-git-send-email-sasha.neftin@intel.com>", "X-Mailer": "git-send-email 1.8.3.1", "Subject": "[Intel-wired-lan] [PATCH v5 01/11] igc: Add skeletal frame for\n\tIntel(R) 2.5G Ethernet Controller support.", "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": "This patch adds the beginning framework onto which I am going to add\nthe igc driver which supports the Intel(R) I225-LM/I225-V 2.5G\nEthernet Controller.\n\nSasha Neftin (v2):\nupdate module author, copyright and licence header\ncosmetic changes\n\nSasha Neftin (v3):\nremove unused header files\n\nSasha Neftin (v4):\nupdate brand name\nfix syntax by input from community\nreplace e1000_ prefix with igc_ prefix\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/net/ethernet/intel/Kconfig | 16 ++++\n drivers/net/ethernet/intel/Makefile | 1 +\n drivers/net/ethernet/intel/igc/Makefile | 10 ++\n drivers/net/ethernet/intel/igc/igc.h | 29 ++++++\n drivers/net/ethernet/intel/igc/igc_hw.h | 10 ++\n drivers/net/ethernet/intel/igc/igc_main.c | 146 ++++++++++++++++++++++++++++++\n 6 files changed, 212 insertions(+)\n create mode 100644 drivers/net/ethernet/intel/igc/Makefile\n create mode 100644 drivers/net/ethernet/intel/igc/igc.h\n create mode 100644 drivers/net/ethernet/intel/igc/igc_hw.h\n create mode 100644 drivers/net/ethernet/intel/igc/igc_main.c", "diff": "diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig\nindex 1ab613e..fcb6763 100644\n--- a/drivers/net/ethernet/intel/Kconfig\n+++ b/drivers/net/ethernet/intel/Kconfig\n@@ -280,4 +280,20 @@ config FM10K\n \t To compile this driver as a module, choose M here. The module\n \t will be called fm10k. MSI-X interrupt support is required\n \n+config IGC\n+\ttristate \"Intel(R) Ethernet Controller I225-LM/I225-V support\"\n+\tdefault n\n+\tdepends on PCI\n+\t---help---\n+\t This driver supports Intel(R) Ethernet Controller I225-LM/I225-V\n+\t family of adapters.\n+\n+\t 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 igc.\n+\n endif # NET_VENDOR_INTEL\ndiff --git a/drivers/net/ethernet/intel/Makefile b/drivers/net/ethernet/intel/Makefile\nindex 807a4f8..18f4aac 100644\n--- a/drivers/net/ethernet/intel/Makefile\n+++ b/drivers/net/ethernet/intel/Makefile\n@@ -7,6 +7,7 @@ obj-$(CONFIG_E100) += e100.o\n obj-$(CONFIG_E1000) += e1000/\n obj-$(CONFIG_E1000E) += e1000e/\n obj-$(CONFIG_IGB) += igb/\n+obj-$(CONFIG_IGC) += igc/\n obj-$(CONFIG_IGBVF) += igbvf/\n obj-$(CONFIG_IXGBE) += ixgbe/\n obj-$(CONFIG_IXGBEVF) += ixgbevf/\ndiff --git a/drivers/net/ethernet/intel/igc/Makefile b/drivers/net/ethernet/intel/igc/Makefile\nnew file mode 100644\nindex 0000000..3d13b01\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/igc/Makefile\n@@ -0,0 +1,10 @@\n+# SPDX-License-Identifier: GPL-2.0\n+# Copyright (c) 2018 Intel Corporation\n+\n+#\n+# Intel(R) I225-LM/I225-V 2.5G Ethernet Controller\n+#\n+\n+obj-$(CONFIG_IGC) += igc.o\n+\n+igc-objs := igc_main.o\ndiff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h\nnew file mode 100644\nindex 0000000..afe595c\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/igc/igc.h\n@@ -0,0 +1,29 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/* Copyright (c) 2018 Intel Corporation */\n+\n+#ifndef _IGC_H_\n+#define _IGC_H_\n+\n+#include <linux/kobject.h>\n+\n+#include <linux/pci.h>\n+#include <linux/netdevice.h>\n+#include <linux/vmalloc.h>\n+\n+#include <linux/ethtool.h>\n+\n+#include <linux/sctp.h>\n+\n+#define IGC_ERR(args...) pr_err(\"igc: \" args)\n+\n+#define PFX \"igc: \"\n+\n+#include <linux/timecounter.h>\n+#include <linux/net_tstamp.h>\n+#include <linux/ptp_clock_kernel.h>\n+\n+/* main */\n+extern char igc_driver_name[];\n+extern char igc_driver_version[];\n+\n+#endif /* _IGC_H_ */\ndiff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h\nnew file mode 100644\nindex 0000000..aa68b45\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/igc/igc_hw.h\n@@ -0,0 +1,10 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/* Copyright (c) 2018 Intel Corporation */\n+\n+#ifndef _IGC_HW_H_\n+#define _IGC_HW_H_\n+\n+#define IGC_DEV_ID_I225_LM\t\t\t0x15F2\n+#define IGC_DEV_ID_I225_V\t\t\t0x15F3\n+\n+#endif /* _IGC_HW_H_ */\ndiff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nnew file mode 100644\nindex 0000000..c926dab\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -0,0 +1,146 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/* Copyright (c) 2018 Intel Corporation */\n+\n+#include <linux/module.h>\n+#include <linux/types.h>\n+\n+#include \"igc.h\"\n+#include \"igc_hw.h\"\n+\n+#define DRV_VERSION\t\"0.0.1-k\"\n+#define DRV_SUMMARY\t\"Intel(R) 2.5G Ethernet Linux Driver\"\n+\n+char igc_driver_name[] = \"igc\";\n+char igc_driver_version[] = DRV_VERSION;\n+static const char igc_driver_string[] = DRV_SUMMARY;\n+static const char igc_copyright[] =\n+\t\"Copyright(c) 2018 Intel Corporation.\";\n+\n+static const struct pci_device_id igc_pci_tbl[] = {\n+\t{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_LM) },\n+\t{ PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_V) },\n+\t/* required last entry */\n+\t{0, }\n+};\n+\n+MODULE_DEVICE_TABLE(pci, igc_pci_tbl);\n+\n+/**\n+ * igc_probe - Device Initialization Routine\n+ * @pdev: PCI device information struct\n+ * @ent: entry in igc_pci_tbl\n+ *\n+ * Returns 0 on success, negative on failure\n+ *\n+ * igc_probe initializes an adapter identified by a pci_dev structure.\n+ * The OS initialization, configuring the adapter private structure,\n+ * and a hardware reset occur.\n+ **/\n+static int igc_probe(struct pci_dev *pdev,\n+\t\t const struct pci_device_id *ent)\n+{\n+\tint err, pci_using_dac;\n+\n+\terr = pci_enable_device_mem(pdev);\n+\tif (err)\n+\t\treturn err;\n+\n+\tpci_using_dac = 0;\n+\terr = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));\n+\tif (!err) {\n+\t\terr = dma_set_coherent_mask(&pdev->dev,\n+\t\t\t\t\t DMA_BIT_MASK(64));\n+\t\tif (!err)\n+\t\t\tpci_using_dac = 1;\n+\t} else {\n+\t\terr = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));\n+\t\tif (err) {\n+\t\t\terr = dma_set_coherent_mask(&pdev->dev,\n+\t\t\t\t\t\t DMA_BIT_MASK(32));\n+\t\t\tif (err) {\n+\t\t\t\tIGC_ERR(\"Wrong DMA configuration, aborting\\n\");\n+\t\t\t\tgoto err_dma;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\terr = pci_request_selected_regions(pdev,\n+\t\t\t\t\t pci_select_bars(pdev,\n+\t\t\t\t\t\t\t IORESOURCE_MEM),\n+\t\t\t\t\t igc_driver_name);\n+\tif (err)\n+\t\tgoto err_pci_reg;\n+\n+\tpci_set_master(pdev);\n+\tpci_save_state(pdev);\n+\treturn 0;\n+\n+err_pci_reg:\n+err_dma:\n+\tpci_disable_device(pdev);\n+\treturn err;\n+}\n+\n+/**\n+ * igc_remove - Device Removal Routine\n+ * @pdev: PCI device information struct\n+ *\n+ * igc_remove is called by the PCI subsystem to alert the driver\n+ * that it should release a PCI device. This could be caused by a\n+ * Hot-Plug event, or because the driver is going to be removed from\n+ * memory.\n+ **/\n+static void igc_remove(struct pci_dev *pdev)\n+{\n+\tpci_release_selected_regions(pdev,\n+\t\t\t\t pci_select_bars(pdev, IORESOURCE_MEM));\n+\n+\tpci_disable_device(pdev);\n+}\n+\n+static struct pci_driver igc_driver = {\n+\t.name = igc_driver_name,\n+\t.id_table = igc_pci_tbl,\n+\t.probe = igc_probe,\n+\t.remove = igc_remove,\n+};\n+\n+/**\n+ * igc_init_module - Driver Registration Routine\n+ *\n+ * igc_init_module 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 igc_init_module(void)\n+{\n+\tint ret;\n+\n+\tpr_info(\"%s - version %s\\n\",\n+\t\tigc_driver_string, igc_driver_version);\n+\n+\tpr_info(\"%s\\n\", igc_copyright);\n+\n+\tret = pci_register_driver(&igc_driver);\n+\treturn ret;\n+}\n+\n+module_init(igc_init_module);\n+\n+/**\n+ * igc_exit_module - Driver Exit Cleanup Routine\n+ *\n+ * igc_exit_module is called just before the driver is removed\n+ * from memory.\n+ **/\n+static void __exit igc_exit_module(void)\n+{\n+\tpci_unregister_driver(&igc_driver);\n+}\n+\n+module_exit(igc_exit_module);\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+/* igc_main.c */\n", "prefixes": [ "v5", "01/11" ] }