get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 460270,
    "url": "http://patchwork.ozlabs.org/api/patches/460270/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1428707018-6405-2-git-send-email-jtoppins@cumulusnetworks.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": "<1428707018-6405-2-git-send-email-jtoppins@cumulusnetworks.com>",
    "list_archive_url": null,
    "date": "2015-04-10T23:03:37",
    "name": "[v1,net-next,2/3] igb: move initialization of link properties before igb_sw_init",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "75633021b39ff2bb91f218bcf20ae4e3564053b7",
    "submitter": {
        "id": 64552,
        "url": "http://patchwork.ozlabs.org/api/people/64552/?format=api",
        "name": "Jonathan Toppins",
        "email": "jtoppins@cumulusnetworks.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/1428707018-6405-2-git-send-email-jtoppins@cumulusnetworks.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/460270/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/460270/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 hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 887D61401AF\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 11 Apr 2015 09:25:39 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A971B89FFB;\n\tFri, 10 Apr 2015 23:25:38 +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 WHFo5LA+4lI7; Fri, 10 Apr 2015 23:25:35 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8D11B89CA3;\n\tFri, 10 Apr 2015 23:25:35 +0000 (UTC)",
            "from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 108E91C1E95\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Apr 2015 23:11:53 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 0B84D8A307\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Apr 2015 23:11:53 +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 7RpSh3frfIdZ for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Apr 2015 23:11:51 +0000 (UTC)",
            "from mail-pd0-f172.google.com (mail-pd0-f172.google.com\n\t[209.85.192.172])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id BEEE88A205\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Apr 2015 23:11:51 +0000 (UTC)",
            "by pddn5 with SMTP id n5so36820943pdd.2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 10 Apr 2015 16:11:51 -0700 (PDT)",
            "from monster-01.cumulusnetworks.com ([216.129.126.126])\n\tby mx.google.com with ESMTPSA id ul8sm99132pab.36.2015.04.10.16.03.46\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 10 Apr 2015 16:03:47 -0700 (PDT)"
        ],
        "Authentication-Results": "ozlabs.org; dkim=fail\n\treason=\"verification failed; unprotected key\"\n\theader.d=cumulusnetworks.com header.i=@cumulusnetworks.com\n\theader.b=VOtfCujc; dkim-adsp=none (unprotected policy);\n\tdkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=cumulusnetworks.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=wYBvTEWj/AA8BQtzv3m5rJO0JWT/I1ln4WVn9RsTfiY=;\n\tb=VOtfCujcuEVeo5yWOlt8L9x62iZp73GzIZohWeefOsMbZm1cd72CtoZGpZT9Dmrrrz\n\tubCUoBtTODh3sgS+H3HOSB/zODSc6KYpMq2e0PTl8C+ALkGda0UhFo/PTp/D2e39uJxj\n\tPXb/gYeXBxDqPJfZ0z0Q1+TXIAKn5vzRwMaRE=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=wYBvTEWj/AA8BQtzv3m5rJO0JWT/I1ln4WVn9RsTfiY=;\n\tb=TqtY98pdHY8jObpyGZp8xJl+/8Ue4j7R/qVp+HR1cMTcN5Wrzu46e8GS21I05iDYuW\n\tCRe8FWgPWBwJjGzfjJ1OeV0t6JtBprS7qcNMzVHxJRykD3wKcCPW8EKY0HdWjdFyi9J3\n\tMhC4J/nH+EBgCM7S3azL/g+oF0pK5aCRLlcMoIO7zzBOn6MbQSRdroK1nXhP2AlTQZnI\n\teza8IP7GCkmOX7PtJGPePJ4h7JfGOPe6KdmOtUyVHaRnON/9GjqqgihBQ7XDYg/WOJ0e\n\t4wrhS3qgeoBgCbNCKvhq2Lk69tZBTz50jvgG32Ts8CZ4plmmpI27Rp05vncNYfTjVHRb\n\tNamw==",
        "X-Gm-Message-State": "ALoCoQnk4sr2H2V23/YXfCPTHk2Hi8MMChU6S6gK+lSgBMGiThYt+kiA/Rovk/+IzYpEkoNak2Dt",
        "X-Received": "by 10.70.90.233 with SMTP id bz9mr6447072pdb.47.1428707027558;\n\tFri, 10 Apr 2015 16:03:47 -0700 (PDT)",
        "From": "Jonathan Toppins <jtoppins@cumulusnetworks.com>",
        "To": "jeffrey.t.kirsher@intel.com",
        "Date": "Fri, 10 Apr 2015 16:03:37 -0700",
        "Message-Id": "<1428707018-6405-2-git-send-email-jtoppins@cumulusnetworks.com>",
        "X-Mailer": "git-send-email 1.7.10.4",
        "In-Reply-To": "<1428707018-6405-1-git-send-email-jtoppins@cumulusnetworks.com>",
        "References": "<1428707018-6405-1-git-send-email-jtoppins@cumulusnetworks.com>",
        "X-Mailman-Approved-At": "Fri, 10 Apr 2015 23:25:35 +0000",
        "Cc": "shm@cumulusnetworks.com, gospo@cumulusnetworks.com,\n\tintel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org",
        "Subject": "[Intel-wired-lan] [PATCH v1 net-next 2/3] igb: move initialization\n\tof link properties before igb_sw_init",
        "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>",
        "MIME-Version": "1.0",
        "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": "This is required otherwise the driver may experience a NULL ptr\ndereference if CONFIG_PCI_IOV is set to yes.\n\nSince the code can follow the flow on init (driver insmod):\n\thw->mac.autoneg = false; (this is not set it is its default)\n\tigb_probe()\n\t+- igb_sw_init()\n\t    +- igb_probe_vfs()\n\t        +- igb_pci_enable_sriov()\n\t            +- igb_sriov_reinit()\n\t               +- igb_reset()\n\t                  trimmed path is the same see call path for\n\t                  igb_reset below\n\t+- hw->mac.autoneg = true;\n\t+- igb_reset()\n\n\t/* igb_reset() call chain */\n\tigb_reset()\n\t+- hw->mac.ops.init_hw() == igb_init_hw_82575\n\t   +- igb_setup_link()\n\t      +- hw->mac.ops.setup_physical_interface() ==\n\t           igb_setup_copper_link_82575()\n\t         +- igb_setup_copper_link()\n\t            +- possible NULL dereference\n\nPseudo code from igb_setup_copper_link():\n\tif (hw->mac.autoneg) {\n\t    /* setup link */\n\t} else {\n\t    hw->phy.ops.force_speed_duplex(hw);  // <-- NULL deref here\n\t}\n\nSince the way the current code is designed the driver will call\nigb_setup_copper_link twice if SRIOV is configured to be enabled. The\ncall will occur once with autoneg == false and the second\ntime autoneg == true. Since the decision to call the function pointer\n(hw->phy.ops.force_speed_duplex) is predicated on autoneg being set\ncorrectly move the setting of these parameters to as early as possible\nin the probe function.\n\nSigned-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com>\n---\n drivers/net/ethernet/intel/igb/igb_main.c |   16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex bb467bb..720b785 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -2328,6 +2328,14 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tif (err)\n \t\tgoto err_sw_init;\n \n+\t/* Initialize link properties that are user-changeable */\n+\tadapter->fc_autoneg = true;\n+\thw->mac.autoneg = true;\n+\thw->phy.autoneg_advertised = 0x2f;\n+\n+\thw->fc.requested_mode = e1000_fc_default;\n+\thw->fc.current_mode = e1000_fc_default;\n+\n \t/* setup the private structure */\n \terr = igb_sw_init(adapter);\n \tif (err)\n@@ -2449,14 +2457,6 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tINIT_WORK(&adapter->reset_task, igb_reset_task);\n \tINIT_WORK(&adapter->watchdog_task, igb_watchdog_task);\n \n-\t/* Initialize link properties that are user-changeable */\n-\tadapter->fc_autoneg = true;\n-\thw->mac.autoneg = true;\n-\thw->phy.autoneg_advertised = 0x2f;\n-\n-\thw->fc.requested_mode = e1000_fc_default;\n-\thw->fc.current_mode = e1000_fc_default;\n-\n \tigb_validate_mdi_setting(hw);\n \n \t/* By default, support wake on port A */\n",
    "prefixes": [
        "v1",
        "net-next",
        "2/3"
    ]
}