Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/687296/?format=api
{ "id": 687296, "url": "http://patchwork.ozlabs.org/api/patches/687296/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1477504167-10910-1-git-send-email-tushar.n.dave@oracle.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": "<1477504167-10910-1-git-send-email-tushar.n.dave@oracle.com>", "list_archive_url": null, "date": "2016-10-26T17:49:27", "name": "i40e: fix panic on SPARC while changing num of desc", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "29081f80fd0dbe1f7cb545b8a1ecbe7727619768", "submitter": { "id": 68023, "url": "http://patchwork.ozlabs.org/api/people/68023/?format=api", "name": "Tushar Dave", "email": "tushar.n.dave@oracle.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/1477504167-10910-1-git-send-email-tushar.n.dave@oracle.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/687296/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/687296/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\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 3t3yG30bnzz9t0v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 27 Oct 2016 04:49:47 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 62C0D85A6E;\n\tWed, 26 Oct 2016 17:49:45 +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 lha_1Jg4S-yo; Wed, 26 Oct 2016 17:49:44 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id A119E85A60;\n\tWed, 26 Oct 2016 17:49:44 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id A53611C2A00\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Oct 2016 17:49:43 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 943699566F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Oct 2016 17:49:43 +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 wGeMVr1j+VI4 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Oct 2016 17:49:42 +0000 (UTC)", "from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id BEFCB94B98\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 26 Oct 2016 17:49:42 +0000 (UTC)", "from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])\n\tby aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with\n\tESMTP id u9QHndV9018727\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Wed, 26 Oct 2016 17:49:40 GMT", "from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])\n\tby userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id u9QHndJB019891\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Wed, 26 Oct 2016 17:49:39 GMT", "from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13])\n\tby userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id\n\tu9QHncfm029528; Wed, 26 Oct 2016 17:49:39 GMT", "from tndave-linux.us.oracle.com (/10.159.153.175)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Wed, 26 Oct 2016 10:49:38 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "Tushar Dave <tushar.n.dave@oracle.com>", "To": "jeffrey.t.kirsher@intel.com, intel-wired-lan@lists.osuosl.org,\n\tnetdev@vger.kernel.org, jesse.brandeburg@intel.com", "Date": "Wed, 26 Oct 2016 10:49:27 -0700", "Message-Id": "<1477504167-10910-1-git-send-email-tushar.n.dave@oracle.com>", "X-Mailer": "git-send-email 1.9.1", "X-Source-IP": "userv0022.oracle.com [156.151.31.74]", "Subject": "[Intel-wired-lan] [PATCH] i40e: fix panic on SPARC while changing\n\tnum of desc", "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": "On SPARC, writel() should not be used to write directly to memory\naddress but only to memory mapped I/O address otherwise it causes\ndata access exception.\n\nCommit 147e81ec75689 (\"i40e: Test memory before ethtool alloc\nsucceeds\") introduced a code that uses memory address to fake the HW\ntail address and attempt to write to that address using writel()\ncauses kernel panic on SPARC. The issue is reproduced while changing\nnumber of descriptors using ethtool.\n\nThis change resolves the panic by using HW read-only memory mapped\nI/O register to fake HW tail address instead memory address.\n\ne.g.\n> ethtool -G eth2 tx 2048 rx 2048\ni40e 0000:03:00.2 eth2: Changing Tx descriptor count from 512 to 2048.\ni40e 0000:03:00.2 eth2: Changing Rx descriptor count from 512 to 2048\nsun4v_data_access_exception: ADDR[fff8001f9734a000] CTX[0000]\nTYPE[0004], going.\n \\|/ ____ \\|/\n \"@'/ .. \\`@\"\n /_| \\__/ |_\\\n \\__U_/\nethtool(3273): Dax [#1]\nCPU: 9 PID: 3273 Comm: ethtool Tainted: G E\n4.8.0-linux-net_temp+ #7\ntask: fff8001f96d7a660 task.stack: fff8001f97348000\nTSTATE: 0000009911001601 TPC: 00000000103189e4 TNPC: 00000000103189e8 Y:\n00000000 Tainted: G E\nTPC: <i40e_alloc_rx_buffers+0x124/0x260 [i40e]>\ng0: fff8001f4eb64000 g1: 00000000000007ff g2: fff8001f9734b92c g3:\n00203e0000000000\ng4: fff8001f96d7a660 g5: fff8001fa6704000 g6: fff8001f97348000 g7:\n0000000000000001\no0: 0006000046706928 o1: 00000000db3e2000 o2: fff8001f00000000 o3:\n0000000000002000\no4: 0000000000002000 o5: 0000000000000001 sp: fff8001f9734afc1 ret_pc:\n0000000010318a64\nRPC: <i40e_alloc_rx_buffers+0x1a4/0x260 [i40e]>\nl0: fff8001f4e8bffe0 l1: fff8001f4e8cffe0 l2: 00000000000007ff l3:\n00000000ff000000\nl4: 0000000000ff0000 l5: 000000000000ff00 l6: 0000000000cda6a8 l7:\n0000000000e822f0\ni0: fff8001f96380000 i1: 0000000000000000 i2: 00203edb00000000 i3:\n0006000046706928\ni4: 0000000002086320 i5: 0000000000e82370 i6: fff8001f9734b071 i7:\n00000000103062d4\nI7: <i40e_set_ringparam+0x3b4/0x540 [i40e]>\nCall Trace:\n [00000000103062d4] i40e_set_ringparam+0x3b4/0x540 [i40e]\n [000000000094e2f8] dev_ethtool+0x898/0xbe0\n [0000000000965570] dev_ioctl+0x250/0x300\n [0000000000923800] sock_do_ioctl+0x40/0x60\n [000000000092427c] sock_ioctl+0x7c/0x280\n [00000000005ef040] vfs_ioctl+0x20/0x60\n [00000000005ef5d4] do_vfs_ioctl+0x194/0x4c0\n [00000000005ef974] SyS_ioctl+0x74/0xa0\n [0000000000406214] linux_sparc_syscall+0x34/0x44\nDisabling lock debugging due to kernel taint\nCaller[00000000103062d4]: i40e_set_ringparam+0x3b4/0x540 [i40e]\nCaller[000000000094e2f8]: dev_ethtool+0x898/0xbe0\nCaller[0000000000965570]: dev_ioctl+0x250/0x300\nCaller[0000000000923800]: sock_do_ioctl+0x40/0x60\nCaller[000000000092427c]: sock_ioctl+0x7c/0x280\nCaller[00000000005ef040]: vfs_ioctl+0x20/0x60\nCaller[00000000005ef5d4]: do_vfs_ioctl+0x194/0x4c0\nCaller[00000000005ef974]: SyS_ioctl+0x74/0xa0\nCaller[0000000000406214]: linux_sparc_syscall+0x34/0x44\nCaller[0000000000107154]: 0x107154\nInstruction DUMP: e43620c8\n e436204a c45e2038\n<c2a083a0> 82102000\n 81cfe008 90086001\n 82102000 81cfe008\n\nKernel panic - not syncing: Fatal exception\n\nSigned-off-by: Tushar Dave <tushar.n.dave@oracle.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex 92bc884..23f4eee 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -1219,6 +1219,7 @@ static int i40e_set_ringparam(struct net_device *netdev,\n {\n \tstruct i40e_ring *tx_rings = NULL, *rx_rings = NULL;\n \tstruct i40e_netdev_priv *np = netdev_priv(netdev);\n+\tstruct i40e_hw *hw = &np->vsi->back->hw;\n \tstruct i40e_vsi *vsi = np->vsi;\n \tstruct i40e_pf *pf = vsi->back;\n \tu32 new_rx_count, new_tx_count;\n@@ -1311,10 +1312,6 @@ static int i40e_set_ringparam(struct net_device *netdev,\n \t\t}\n \n \t\tfor (i = 0; i < vsi->num_queue_pairs; i++) {\n-\t\t\t/* this is to allow wr32 to have something to write to\n-\t\t\t * during early allocation of Rx buffers\n-\t\t\t */\n-\t\t\tu32 __iomem faketail = 0;\n \t\t\tstruct i40e_ring *ring;\n \t\t\tu16 unused;\n \n@@ -1326,7 +1323,10 @@ static int i40e_set_ringparam(struct net_device *netdev,\n \t\t\t */\n \t\t\trx_rings[i].desc = NULL;\n \t\t\trx_rings[i].rx_bi = NULL;\n-\t\t\trx_rings[i].tail = (u8 __iomem *)&faketail;\n+\t\t\t/* this is to allow wr32 to have something to write to\n+\t\t\t * during early allocation of Rx buffers\n+\t\t\t */\n+\t\t\trx_rings[i].tail = hw->hw_addr + I40E_PRTGEN_STATUS;\n \t\t\terr = i40e_setup_rx_descriptors(&rx_rings[i]);\n \t\t\tif (err)\n \t\t\t\tgoto rx_unwind;\n", "prefixes": [] }