Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/15471/?format=api
http://patches.dpdk.org/api/patches/15471/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1472312902-16963-7-git-send-email-xiao.w.wang@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1472312902-16963-7-git-send-email-xiao.w.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1472312902-16963-7-git-send-email-xiao.w.wang@intel.com", "date": "2016-08-27T15:47:49", "name": "[dpdk-dev,06/39] net/ixgbe/base: introduce new ops init functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b0a012fbb1e406e371fb6dadaff269506935e97e", "submitter": { "id": 281, "url": "http://patches.dpdk.org/api/people/281/?format=api", "name": "Xiao Wang", "email": "xiao.w.wang@intel.com" }, "delegate": { "id": 10, "url": "http://patches.dpdk.org/api/users/10/?format=api", "username": "bruce", "first_name": "Bruce", "last_name": "Richardson", "email": "bruce.richardson@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1472312902-16963-7-git-send-email-xiao.w.wang@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/15471/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/15471/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C20955953;\n\tSat, 27 Aug 2016 17:48:55 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 20ED5590E\n\tfor <dev@dpdk.org>; Sat, 27 Aug 2016 17:48:47 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP; 27 Aug 2016 08:48:47 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 27 Aug 2016 08:48:46 -0700", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id u7RFmi7K007508;\n\tSat, 27 Aug 2016 23:48:44 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid u7RFmgg7017040; Sat, 27 Aug 2016 23:48:44 +0800", "(from xiaowan1@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u7RFmgsJ017036; \n\tSat, 27 Aug 2016 23:48:42 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos; i=\"5.28,587,1464678000\"; d=\"scan'208\";\n\ta=\"1032087807\"", "From": "Xiao Wang <xiao.w.wang@intel.com>", "To": "wenzhuo.lu@intel.com", "Cc": "dev@dpdk.org, Xiao Wang <xiao.w.wang@intel.com>", "Date": "Sat, 27 Aug 2016 23:47:49 +0800", "Message-Id": "<1472312902-16963-7-git-send-email-xiao.w.wang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1472312902-16963-1-git-send-email-xiao.w.wang@intel.com>", "References": "<1472312902-16963-1-git-send-email-xiao.w.wang@intel.com>", "Subject": "[dpdk-dev] [PATCH 06/39] net/ixgbe/base: introduce new ops init\n\tfunctions", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch introduces new init_ops functions for X550EM_a and X550EM_x.\nThis makes it easier to assign function pointers with specific\ndependencies (like media type) for each MAC.\n\nSigned-off-by: Xiao Wang <xiao.w.wang@intel.com>\n---\n drivers/net/ixgbe/base/ixgbe_api.c | 4 +-\n drivers/net/ixgbe/base/ixgbe_api.h | 2 +\n drivers/net/ixgbe/base/ixgbe_x550.c | 83 ++++++++++++++++++++++++++-----------\n 3 files changed, 64 insertions(+), 25 deletions(-)", "diff": "diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c\nindex 5b721af..094ee52 100644\n--- a/drivers/net/ixgbe/base/ixgbe_api.c\n+++ b/drivers/net/ixgbe/base/ixgbe_api.c\n@@ -106,8 +106,10 @@ s32 ixgbe_init_shared_code(struct ixgbe_hw *hw)\n \t\tstatus = ixgbe_init_ops_X550(hw);\n \t\tbreak;\n \tcase ixgbe_mac_X550EM_x:\n+\t\tstatus = ixgbe_init_ops_X550EM_x(hw);\n+\t\tbreak;\n \tcase ixgbe_mac_X550EM_a:\n-\t\tstatus = ixgbe_init_ops_X550EM(hw);\n+\t\tstatus = ixgbe_init_ops_X550EM_a(hw);\n \t\tbreak;\n \tcase ixgbe_mac_82599_vf:\n \tcase ixgbe_mac_X540_vf:\ndiff --git a/drivers/net/ixgbe/base/ixgbe_api.h b/drivers/net/ixgbe/base/ixgbe_api.h\nindex 3aad1da..24c4ae8 100644\n--- a/drivers/net/ixgbe/base/ixgbe_api.h\n+++ b/drivers/net/ixgbe/base/ixgbe_api.h\n@@ -45,6 +45,8 @@ extern s32 ixgbe_init_ops_82599(struct ixgbe_hw *hw);\n extern s32 ixgbe_init_ops_X540(struct ixgbe_hw *hw);\n extern s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw);\n extern s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw);\n+extern s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw);\n+extern s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw);\n extern s32 ixgbe_init_ops_vf(struct ixgbe_hw *hw);\n \n s32 ixgbe_set_mac_type(struct ixgbe_hw *hw);\ndiff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c\nindex 5c09bfe..db12339 100644\n--- a/drivers/net/ixgbe/base/ixgbe_x550.c\n+++ b/drivers/net/ixgbe/base/ixgbe_x550.c\n@@ -604,7 +604,6 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)\n \tstruct ixgbe_mac_info *mac = &hw->mac;\n \tstruct ixgbe_eeprom_info *eeprom = &hw->eeprom;\n \tstruct ixgbe_phy_info *phy = &hw->phy;\n-\tstruct ixgbe_link_info *link = &hw->link;\n \ts32 ret_val;\n \n \tDEBUGFUNC(\"ixgbe_init_ops_X550EM\");\n@@ -640,25 +639,6 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)\n \thw->bus.type = ixgbe_bus_type_internal;\n \tmac->ops.get_bus_info = ixgbe_get_bus_info_X550em;\n \n-\tif (hw->mac.type == ixgbe_mac_X550EM_x) {\n-\t\tmac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550;\n-\t\tmac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550;\n-\t\tmac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550em;\n-\t\tmac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550em;\n-\t\tlink->ops.read_link = ixgbe_read_i2c_combined_generic;\n-\t\tlink->ops.read_link_unlocked =\n-\t\t\t\tixgbe_read_i2c_combined_generic_unlocked;\n-\t\tlink->ops.write_link = ixgbe_write_i2c_combined_generic;\n-\t\tlink->ops.write_link_unlocked =\n-\t\t\t\tixgbe_write_i2c_combined_generic_unlocked;\n-\t\tlink->addr = IXGBE_CS4227;\n-\t}\n-\tif (hw->mac.type == ixgbe_mac_X550EM_a) {\n-\t\tmac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550;\n-\t\tmac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550;\n-\t\tmac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a;\n-\t\tmac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a;\n-\t}\n \n \tmac->ops.get_media_type = ixgbe_get_media_type_X550em;\n \tmac->ops.setup_sfp = ixgbe_setup_sfp_modules_X550em;\n@@ -669,10 +649,6 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)\n \n \tif (mac->ops.get_media_type(hw) == ixgbe_media_type_copper)\n \t\tmac->ops.setup_fc = ixgbe_setup_fc_generic;\n-\telse if (hw->mac.type == ixgbe_mac_X550EM_a) {\n-\t\tmac->ops.setup_fc = ixgbe_setup_fc_x550a;\n-\t\tmac->ops.fc_autoneg = ixgbe_fc_autoneg_x550a;\n-\t}\n \telse\n \t\tmac->ops.setup_fc = ixgbe_setup_fc_X550em;\n \n@@ -706,6 +682,65 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)\n }\n \n /**\n+* ixgbe_init_ops_X550EM_a - Inits func ptrs and MAC type\n+* @hw: pointer to hardware structure\n+*\n+* Initialize the function pointers and for MAC type X550EM_a.\n+* Does not touch the hardware.\n+**/\n+s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw)\n+{\n+\tstruct ixgbe_mac_info *mac = &hw->mac;\n+\ts32 ret_val;\n+\n+\tDEBUGFUNC(\"ixgbe_init_ops_X550EM_a\");\n+\n+\t/* Start with generic X550EM init */\n+\tret_val = ixgbe_init_ops_X550EM(hw);\n+\n+\tmac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550;\n+\tmac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550;\n+\tmac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a;\n+\tmac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a;\n+\tmac->ops.setup_fc = ixgbe_setup_fc_x550a;\n+\tmac->ops.fc_autoneg = ixgbe_fc_autoneg_x550a;\n+\n+\treturn ret_val;\n+}\n+\n+/**\n+* ixgbe_init_ops_X550EM_x - Inits func ptrs and MAC type\n+* @hw: pointer to hardware structure\n+*\n+* Initialize the function pointers and for MAC type X550EM_x.\n+* Does not touch the hardware.\n+**/\n+s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw)\n+{\n+\tstruct ixgbe_mac_info *mac = &hw->mac;\n+\tstruct ixgbe_link_info *link = &hw->link;\n+\ts32 ret_val;\n+\n+\tDEBUGFUNC(\"ixgbe_init_ops_X550EM_x\");\n+\n+\t/* Start with generic X550EM init */\n+\tret_val = ixgbe_init_ops_X550EM(hw);\n+\n+\tmac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550;\n+\tmac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550;\n+\tmac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550em;\n+\tmac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550em;\n+\tlink->ops.read_link = ixgbe_read_i2c_combined_generic;\n+\tlink->ops.read_link_unlocked = ixgbe_read_i2c_combined_generic_unlocked;\n+\tlink->ops.write_link = ixgbe_write_i2c_combined_generic;\n+\tlink->ops.write_link_unlocked =\n+\t\t\t\t ixgbe_write_i2c_combined_generic_unlocked;\n+\tlink->addr = IXGBE_CS4227;\n+\n+\treturn ret_val;\n+}\n+\n+/**\n * ixgbe_dmac_config_X550\n * @hw: pointer to hardware structure\n *\n", "prefixes": [ "dpdk-dev", "06/39" ] }{ "id": 15471, "url": "