get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/513712/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 513712,
    "url": "http://patchwork.ozlabs.org/api/patches/513712/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20150902235420.7649.34614.stgit@htfujina-fc.jf.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": "<20150902235420.7649.34614.stgit@htfujina-fc.jf.intel.com>",
    "list_archive_url": null,
    "date": "2015-09-02T23:54:20",
    "name": "igb: add 88E1543 initialization code",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b6acf438918d8bf20ef0cc22ee8a862649669c37",
    "submitter": {
        "id": 29211,
        "url": "http://patchwork.ozlabs.org/api/people/29211/?format=api",
        "name": "Fujinaka, Todd",
        "email": "todd.fujinaka@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/20150902235420.7649.34614.stgit@htfujina-fc.jf.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/513712/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/513712/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "Received": [
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 50EE214029E\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  3 Sep 2015 09:55:18 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 155F7A2F97;\n\tWed,  2 Sep 2015 23:55:17 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id uVnPRf9C6PN5; Wed,  2 Sep 2015 23:55:16 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 564E4A2F79;\n\tWed,  2 Sep 2015 23:55:16 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 768BA1C1EC4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed,  2 Sep 2015 23:55:14 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 4E35B33317\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed,  2 Sep 2015 23:55: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 emttoBcIB3OQ for <intel-wired-lan@lists.osuosl.org>;\n\tWed,  2 Sep 2015 23:55:13 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3A02D32CDA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed,  2 Sep 2015 23:55:13 +0000 (UTC)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga103.jf.intel.com with ESMTP; 02 Sep 2015 16:55:12 -0700",
            "from htfujina-fc.jf.intel.com ([134.134.145.128])\n\tby fmsmga001.fm.intel.com with ESMTP; 02 Sep 2015 16:55:12 -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-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,457,1437462000\"; d=\"scan'208\";a=\"781552202\"",
        "From": "Todd Fujinaka <todd.fujinaka@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 02 Sep 2015 16:54:20 -0700",
        "Message-ID": "<20150902235420.7649.34614.stgit@htfujina-fc.jf.intel.com>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH] igb: add 88E1543 initialization code",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "Initialize the 88E1543 PHY.\n\nSigned-off-by: Todd Fujinaka <todd.fujinaka@intel.com>\n---\n drivers/net/ethernet/intel/igb/e1000_82575.c   |    7 ++\n drivers/net/ethernet/intel/igb/e1000_defines.h |    1 \n drivers/net/ethernet/intel/igb/e1000_phy.c     |   94 ++++++++++++++++++++++++\n drivers/net/ethernet/intel/igb/e1000_phy.h     |    1 \n 4 files changed, 103 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c\nindex cb7b78c..c1e8667 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_82575.c\n+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c\n@@ -272,6 +272,11 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)\n \t\t\tif (ret_val)\n \t\t\t\tgoto out;\n \t\t}\n+\t\tif (phy->id == M88E1543_E_PHY_ID) {\n+\t\t\tret_val = igb_initialize_M88E1543_phy(hw);\n+\t\t\tif (ret_val)\n+\t\t\t\tgoto out;\n+\t\t}\n \t\tbreak;\n \tcase IGP03E1000_E_PHY_ID:\n \t\tphy->type = e1000_phy_igp_3;\n@@ -928,6 +933,8 @@ static s32 igb_phy_hw_reset_sgmii_82575(struct e1000_hw *hw)\n \n \tif (phy->id == M88E1512_E_PHY_ID)\n \t\tret_val = igb_initialize_M88E1512_phy(hw);\n+\tif (phy->id == M88E1543_E_PHY_ID)\n+\t\tret_val = igb_initialize_M88E1543_phy(hw);\n out:\n \treturn ret_val;\n }\ndiff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h\nindex b15d90e..68de4eb 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_defines.h\n+++ b/drivers/net/ethernet/intel/igb/e1000_defines.h\n@@ -991,6 +991,7 @@\n #define E1000_M88E1543_PAGE_ADDR\t0x16       /* Page Offset Register */\n #define E1000_M88E1543_EEE_CTRL_1\t0x0\n #define E1000_M88E1543_EEE_CTRL_1_MS\t0x0001     /* EEE Master/Slave */\n+#define E1000_M88E1543_FIBER_CTRL\t0x0\n #define E1000_EEE_ADV_DEV_I354\t\t7\n #define E1000_EEE_ADV_ADDR_I354\t\t60\n #define E1000_EEE_ADV_100_SUPPORTED\t(1 << 1)   /* 100BaseTx EEE Supported */\ndiff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c\nindex 23ec28f..c0df40f 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_phy.c\n+++ b/drivers/net/ethernet/intel/igb/e1000_phy.c\n@@ -2278,6 +2278,100 @@ out:\n }\n \n /**\n+ *  igb_initialize_M88E1543_phy - Initialize M88E1512 PHY\n+ *  @hw: pointer to the HW structure\n+ *\n+ *  Initialize Marvell 1543 to work correctly with Avoton.\n+ **/\n+s32 igb_initialize_M88E1543_phy(struct e1000_hw *hw)\n+{\n+\tstruct e1000_phy_info *phy = &hw->phy;\n+\ts32 ret_val = 0;\n+\n+\t/* Switch to PHY page 0xFF. */\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FF);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x214B);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2144);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x0C28);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2146);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xB233);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x214D);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xDC0C);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2159);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\t/* Switch to PHY page 0xFB. */\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FB);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_3, 0x0C0D);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\t/* Switch to PHY page 0x12. */\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x12);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\t/* Change mode to SGMII-to-Copper */\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1512_MODE, 0x8001);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\t/* Switch to PHY page 1. */\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x1);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\t/* Change mode to 1000BASE-X/SGMII and autoneg enable */\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1543_FIBER_CTRL, 0x9140);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\t/* Return the PHY to page 0. */\n+\tret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0);\n+\tif (ret_val)\n+\t\tgoto out;\n+\n+\tret_val = igb_phy_sw_reset(hw);\n+\tif (ret_val) {\n+\t\thw_dbg(\"Error committing the PHY changes\\n\");\n+\t\treturn ret_val;\n+\t}\n+\n+\t/* msec_delay(1000); */\n+\tusleep_range(1000, 2000);\n+out:\n+\treturn ret_val;\n+}\n+\n+/**\n  * igb_power_up_phy_copper - Restore copper link in case of PHY power down\n  * @hw: pointer to the HW structure\n  *\ndiff --git a/drivers/net/ethernet/intel/igb/e1000_phy.h b/drivers/net/ethernet/intel/igb/e1000_phy.h\nindex 24d55ed..aa1ae61 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_phy.h\n+++ b/drivers/net/ethernet/intel/igb/e1000_phy.h\n@@ -62,6 +62,7 @@ void igb_power_up_phy_copper(struct e1000_hw *hw);\n void igb_power_down_phy_copper(struct e1000_hw *hw);\n s32  igb_phy_init_script_igp3(struct e1000_hw *hw);\n s32  igb_initialize_M88E1512_phy(struct e1000_hw *hw);\n+s32  igb_initialize_M88E1543_phy(struct e1000_hw *hw);\n s32  igb_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data);\n s32  igb_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data);\n s32  igb_read_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 *data);\n",
    "prefixes": []
}