Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/854372/?format=api
{ "id": 854372, "url": "http://patchwork.ozlabs.org/api/patches/854372/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1514853198-14008-1-git-send-email-daniel.hua@ni.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": "<1514853198-14008-1-git-send-email-daniel.hua@ni.com>", "list_archive_url": null, "date": "2018-01-02T00:33:18", "name": "igb: Clear TXSTMP when ptp_tx_work() is timeout", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "272450519559bfb7c71897e5c2ef131536f17e70", "submitter": { "id": 73092, "url": "http://patchwork.ozlabs.org/api/people/73092/?format=api", "name": "Daniel Hua", "email": "daniel.hua@ni.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/1514853198-14008-1-git-send-email-daniel.hua@ni.com/mbox/", "series": [ { "id": 20843, "url": "http://patchwork.ozlabs.org/api/series/20843/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=20843", "date": "2018-01-02T00:33:18", "name": "igb: Clear TXSTMP when ptp_tx_work() is timeout", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/20843/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/854372/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/854372/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.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 3z9Zn45CHhz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 2 Jan 2018 11:33:59 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 434FB879A8;\n\tTue, 2 Jan 2018 00:33:57 +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 7IeB5eTT+V1f; Tue, 2 Jan 2018 00:33:55 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 5BBF087944;\n\tTue, 2 Jan 2018 00:33:55 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4339D1CF001\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 2 Jan 2018 00:33:54 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 3D4518762F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 2 Jan 2018 00:33:54 +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 lpHIziiT9U2U for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 2 Jan 2018 00:33:53 +0000 (UTC)", "from mx0b-00010702.pphosted.com (mx0a-00010702.pphosted.com\n\t[148.163.156.75])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 873C18760F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 2 Jan 2018 00:33:53 +0000 (UTC)", "from pps.filterd (m0098781.ppops.net [127.0.0.1])\n\tby mx0a-00010702.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tw020Vxuh013170\n\tfor <intel-wired-lan@lists.osuosl.org>; Mon, 1 Jan 2018 18:33:53 -0600", "from ni.com (skprod2.natinst.com [130.164.80.23])\n\tby mx0a-00010702.pphosted.com with ESMTP id 2f67q2c03k-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NOT) for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 01 Jan 2018 18:33:52 -0600", "from us-aus-exhub2.ni.corp.natinst.com\n\t(us-aus-exhub2.ni.corp.natinst.com [130.164.68.32])\n\tby us-aus-skprod2.natinst.com (8.16.0.21/8.16.0.21) with ESMTPS id\n\tw020Xqnb004913\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n\tfor <intel-wired-lan@lists.osuosl.org>; Mon, 1 Jan 2018 18:33:52 -0600", "from us-aus-exhub2.ni.corp.natinst.com (130.164.68.32) by\n\tus-aus-exhub2.ni.corp.natinst.com (130.164.68.32) with Microsoft SMTP\n\tServer (TLS) id 15.0.1156.6; Mon, 1 Jan 2018 18:33:51 -0600", "from ni.com (130.164.49.7) by us-aus-exhub2.ni.corp.natinst.com\n\t(130.164.68.32) with Microsoft SMTP Server id 15.0.1156.6 via\n\tFrontend Transport; Mon, 1 Jan 2018 18:33:50 -0600" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "From": "Daniel Hua <daniel.hua@ni.com>", "To": "<intel-wired-lan@lists.osuosl.org>", "Date": "Tue, 2 Jan 2018 08:33:18 +0800", "Message-ID": "<1514853198-14008-1-git-send-email-daniel.hua@ni.com>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<CAKgT0Ud8-6bf07niVk+bBk1SCPm1Bvd28NFhWoHAbA2Dh_Bfrw@mail.gmail.com>", "References": "<CAKgT0Ud8-6bf07niVk+bBk1SCPm1Bvd28NFhWoHAbA2Dh_Bfrw@mail.gmail.com>", "MIME-Version": "1.0", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2018-01-01_17:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=inbound_policy_notspam policy=inbound_policy\n\tscore=30\n\tpriorityscore=1501 malwarescore=0 suspectscore=4 phishscore=0\n\tbulkscore=0\n\tspamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0\n\timpostorscore=0\n\tmlxlogscore=999 adultscore=0 classifier=spam adjust=30 reason=mlx\n\tscancount=1 engine=8.0.1-1711220000 definitions=main-1801020006", "Subject": "[Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is\n\ttimeout", "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>", "Cc": "Daniel Hua <daniel.hua@ni.com>", "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": "Problem description:\nAfter ethernet cable connect and disconnect for several iterations on a\ndevice with i210, tx timestamp will stop being put into the socket.\n\nSteps to reproduce:\n1. Setup a device with i210 and wire it to a 802.1AS capable switch (\nExtreme Networks Summit x440 is used in our case)\n2. Have the gptp daemon running on the device and make sure it is synced \nwith the switch\n3. Have the switch disable and enable the port, wait for the device gets\nresynced with the switch\n4. Iterates step 3 until the device is not albe to get resynced\n5. Review the log in dmesg and you will see warning message \"igb : clearing\nTx timestamp hang\"\n\nRoot cause:\nIf ptp_tx_work() gets scheduled just before the port gets disabled, a LINK\nDOWN event will be processed before ptp_tx_work(), which may cause timeout\nin ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's TXTT bit (Transmit\ntimestamp valid bit) is not cleared, causing no new timestamp loaded to\nTXSTMP register. Consequently therefore, no new interrupt is triggerred by\nTSICR.TXTS bit and no more Tx timestamp send to the socket.\n\nSigned-off-by: Daniel Hua <daniel.hua@ni.com>\n---\n drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c\nindex 841c2a0..0746b19 100644\n--- a/drivers/net/ethernet/intel/igb/igb_ptp.c\n+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c\n@@ -643,6 +643,10 @@ static void igb_ptp_tx_work(struct work_struct *work)\n \t\tadapter->ptp_tx_skb = NULL;\n \t\tclear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);\n \t\tadapter->tx_hwtstamp_timeouts++;\n+\t\t/* Clear the tx valid bit in TSYNCTXCTL register to enable\n+\t\t * interrupt\n+\t\t */\n+\t\trd32(E1000_TXSTMPH);\n \t\tdev_warn(&adapter->pdev->dev, \"clearing Tx timestamp hang\\n\");\n \t\treturn;\n \t}\n@@ -717,6 +721,7 @@ void igb_ptp_rx_hang(struct igb_adapter *adapter)\n */\n void igb_ptp_tx_hang(struct igb_adapter *adapter)\n {\n+\tstruct e1000_hw *hw = &adapter->hw;\n \tbool timeout = time_is_before_jiffies(adapter->ptp_tx_start +\n \t\t\t\t\t IGB_PTP_TX_TIMEOUT);\n \n@@ -736,6 +741,10 @@ void igb_ptp_tx_hang(struct igb_adapter *adapter)\n \t\tadapter->ptp_tx_skb = NULL;\n \t\tclear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);\n \t\tadapter->tx_hwtstamp_timeouts++;\n+\t\t/* Clear the tx valid bit in TSYNCTXCTL register to enable\n+\t\t * interrupt\n+\t\t */\n+\t\trd32(E1000_TXSTMPH);\n \t\tdev_warn(&adapter->pdev->dev, \"clearing Tx timestamp hang\\n\");\n \t}\n }\n", "prefixes": [] }