get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1004612,
    "url": "http://patchwork.ozlabs.org/api/patches/1004612/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20181128160749.14040-1-mlichvar@redhat.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": "<20181128160749.14040-1-mlichvar@redhat.com>",
    "list_archive_url": null,
    "date": "2018-11-28T16:07:49",
    "name": "i40e: extend PTP gettime function to read system clock",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0d2058d8a8f950f9757deb3d243a999b76251af6",
    "submitter": {
        "id": 17040,
        "url": "http://patchwork.ozlabs.org/api/people/17040/?format=api",
        "name": "Miroslav Lichvar",
        "email": "mlichvar@redhat.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/20181128160749.14040-1-mlichvar@redhat.com/mbox/",
    "series": [
        {
            "id": 78563,
            "url": "http://patchwork.ozlabs.org/api/series/78563/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=78563",
            "date": "2018-11-28T16:07:49",
            "name": "i40e: extend PTP gettime function to read system clock",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/78563/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1004612/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1004612/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=redhat.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 434ltR16vcz9s3Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 29 Nov 2018 03:07:58 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 43F4788097;\n\tWed, 28 Nov 2018 16:07:57 +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 Zxb-JuaMEC7z; Wed, 28 Nov 2018 16:07:56 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 39FEC87EAF;\n\tWed, 28 Nov 2018 16:07:56 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9961A1C2E26\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Nov 2018 16:07:54 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 9475D87BF1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Nov 2018 16:07:54 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id f-xNSS+6sKdZ for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Nov 2018 16:07:53 +0000 (UTC)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 9B09987BE8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Nov 2018 16:07:53 +0000 (UTC)",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id E0CE330A818F;\n\tWed, 28 Nov 2018 16:07:52 +0000 (UTC)",
            "from holly.tpb.lab.eng.brq.redhat.com\n\t(holly.tpb.lab.eng.brq.redhat.com [10.43.134.11])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 2F439690FA;\n\tWed, 28 Nov 2018 16:07:49 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": [
            "domain auto-whitelisted by SQLgrey-1.7.6",
            "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.44]); Wed, 28 Nov 2018 16:07:53 +0000 (UTC)"
        ],
        "From": "Miroslav Lichvar <mlichvar@redhat.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed, 28 Nov 2018 17:07:49 +0100",
        "Message-Id": "<20181128160749.14040-1-mlichvar@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "Subject": "[Intel-wired-lan] [PATCH] i40e: extend PTP gettime function to read\n\tsystem clock",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "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>",
        "Cc": "Richard Cochran <richardcochran@gmail.com>",
        "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 adds support for the PTP_SYS_OFFSET_EXTENDED ioctl.\n\nCc: Richard Cochran <richardcochran@gmail.com>\nCc: Jacob Keller <jacob.e.keller@intel.com>\nSigned-off-by: Miroslav Lichvar <mlichvar@redhat.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_ptp.c | 18 ++++++++++++------\n 1 file changed, 12 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c\nindex e6fc0aff8c99..5fb4353c742b 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c\n@@ -28,19 +28,23 @@\n  * i40e_ptp_read - Read the PHC time from the device\n  * @pf: Board private structure\n  * @ts: timespec structure to hold the current time value\n+ * @sts: structure to hold the system time before and after reading the PHC\n  *\n  * This function reads the PRTTSYN_TIME registers and stores them in a\n  * timespec. However, since the registers are 64 bits of nanoseconds, we must\n  * convert the result to a timespec before we can return.\n  **/\n-static void i40e_ptp_read(struct i40e_pf *pf, struct timespec64 *ts)\n+static void i40e_ptp_read(struct i40e_pf *pf, struct timespec64 *ts,\n+\t\t\t  struct ptp_system_timestamp *sts)\n {\n \tstruct i40e_hw *hw = &pf->hw;\n \tu32 hi, lo;\n \tu64 ns;\n \n \t/* The timer latches on the lowest register read. */\n+\tptp_read_system_prets(sts);\n \tlo = rd32(hw, I40E_PRTTSYN_TIME_L);\n+\tptp_read_system_postts(sts);\n \thi = rd32(hw, I40E_PRTTSYN_TIME_H);\n \n \tns = (((u64)hi) << 32) | lo;\n@@ -146,7 +150,7 @@ static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)\n \n \tmutex_lock(&pf->tmreg_lock);\n \n-\ti40e_ptp_read(pf, &now);\n+\ti40e_ptp_read(pf, &now, NULL);\n \ttimespec64_add_ns(&now, delta);\n \ti40e_ptp_write(pf, (const struct timespec64 *)&now);\n \n@@ -156,19 +160,21 @@ static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)\n }\n \n /**\n- * i40e_ptp_gettime - Get the time of the PHC\n+ * i40e_ptp_gettimex - Get the time of the PHC\n  * @ptp: The PTP clock structure\n  * @ts: timespec structure to hold the current time value\n+ * @sts: structure to hold the system time before and after reading the PHC\n  *\n  * Read the device clock and return the correct value on ns, after converting it\n  * into a timespec struct.\n  **/\n-static int i40e_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)\n+static int i40e_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,\n+\t\t\t     struct ptp_system_timestamp *sts)\n {\n \tstruct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);\n \n \tmutex_lock(&pf->tmreg_lock);\n-\ti40e_ptp_read(pf, ts);\n+\ti40e_ptp_read(pf, ts, sts);\n \tmutex_unlock(&pf->tmreg_lock);\n \n \treturn 0;\n@@ -702,7 +708,7 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)\n \tpf->ptp_caps.pps = 0;\n \tpf->ptp_caps.adjfreq = i40e_ptp_adjfreq;\n \tpf->ptp_caps.adjtime = i40e_ptp_adjtime;\n-\tpf->ptp_caps.gettime64 = i40e_ptp_gettime;\n+\tpf->ptp_caps.gettimex64 = i40e_ptp_gettimex;\n \tpf->ptp_caps.settime64 = i40e_ptp_settime;\n \tpf->ptp_caps.enable = i40e_ptp_feature_enable;\n \n",
    "prefixes": []
}