Received: by 10.223.176.46 with SMTP id f43csp529905wra; Fri, 26 Jan 2018 02:51:25 -0800 (PST) X-Google-Smtp-Source: AH8x2257UOjukltpWUEbiYpwmJrCpcFJb6mJLUDzgEUaFUlA7Wgi+EZsdDtZwlDsUIJGxDzwiM4f X-Received: by 2002:a17:902:1683:: with SMTP id h3-v6mr12889939plh.433.1516963885209; Fri, 26 Jan 2018 02:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516963885; cv=none; d=google.com; s=arc-20160816; b=JLUSOI83im6tvf79mTqNEJ1g2VRik0J1U6lLsyObynFiqnGKQKrt/b3nAIXZdTpisL LvG6/2le/VagxcjlWReCi9uM1diZZFHApCTUhxus/Tm5W0q3iZPUJrP4ywsYgkZaQw/x 8DAVQby0GXzqciFIZEa3ZYWpHF9Q5s/04s4c0jhh/l+ykIeymKkTNiaLBN3m13WGQGBU wmLGhe0MIdy2rrRBcfoMe+iuBKpbcZkw0NdAvt5zwILX6s1kWe+E0wFS+JDb1YKX5pwX O3CsTXkj5fktMS0tVXmc1DHapjibMx97N+fHwAk3ZLfF3rB7nfeo+FsGj+yWdTTcAhg/ QZZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=KWqukFvCfH0Pg7ez+slS2+ehyUla/+M6uXPOAHdGWoI=; b=AU76W9TucnABqRzfsLy3vddzHT+fCYnVUCB9gSy4H7Sn78OLmGYGqHRYlVCDY7kcIw XC3pHdt2Fj/9pdkAwUNwCyEImZDO0su9oLhjJYfECs9ff/nbFtZuiUlwQhsq+oBRcvGh tPOTY90XKaKgBnbFKDimPajcuSNxAp8zoQFCerjYDd5oTSE7wEMaqIEBnNaSfh/Pn33N 45Kbj2T69NtGrkoxhhvxRqPGI9HfwxZV4wIcXUC1MFeZsgVwqwNCL25otY1Am2QhVnw7 vLR9AvGubE6mLj1f8k46LV1gKEM87VEsr7eX2I3h1lRrHzBrHjo82nSzrPeGVGXOg5Vq AToQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=5Q3RbMyX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i134si2868870pgc.127.2018.01.26.02.51.10; Fri, 26 Jan 2018 02:51:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=5Q3RbMyX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753212AbeAZKuq (ORCPT + 99 others); Fri, 26 Jan 2018 05:50:46 -0500 Received: from mail-dm3nam03on0043.outbound.protection.outlook.com ([104.47.41.43]:10368 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752090AbeAZKun (ORCPT ); Fri, 26 Jan 2018 05:50:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KWqukFvCfH0Pg7ez+slS2+ehyUla/+M6uXPOAHdGWoI=; b=5Q3RbMyXyl63Y28pgf+SAIOKM/Ii5t9NT5FLD2nZQbI+enbsq6oiz8bRS4EUFzttkMewr/KUCb77PqLsGUlXh9xPVtVMLbYRnhuXnpB1ZLtsc+RPahnq3IK3ORPKpQZiZL2BDgD+Z2p0XUz2VlKNJY7ebUZn/FLgOCvvmlDK3Hw= Received: from MWHPR0201CA0015.namprd02.prod.outlook.com (10.167.160.156) by MWHPR02MB3390.namprd02.prod.outlook.com (10.164.187.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Fri, 26 Jan 2018 10:50:39 +0000 Received: from BL2NAM02FT024.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::202) by MWHPR0201CA0015.outlook.office365.com (2603:10b6:301:74::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.444.14 via Frontend Transport; Fri, 26 Jan 2018 10:50:39 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; atmel.com; dkim=none (message not signed) header.d=none;atmel.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT024.mail.protection.outlook.com (10.152.77.62) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.444.13 via Frontend Transport; Fri, 26 Jan 2018 10:50:38 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:44061 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1ef1ag-0006Ji-CD; Fri, 26 Jan 2018 02:50:38 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1ef1ag-0005wH-9K; Fri, 26 Jan 2018 02:50:38 -0800 Received: from [172.23.37.92] (helo=xhdharinik40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1ef1ad-0005to-Pj; Fri, 26 Jan 2018 02:50:36 -0800 From: Harini Katakam To: , , CC: , , , , Harini Katakam , Michal Simek Subject: [PATCH v2] net: macb: Handle HRESP error Date: Fri, 26 Jan 2018 16:12:11 +0530 Message-ID: <1516963331-22594-1-git-send-email-harinik@xilinx.com> X-Mailer: git-send-email 2.7.4 X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(396003)(376002)(39380400002)(39840400004)(346002)(2980300002)(438002)(199004)(189003)(50226002)(8746002)(8936002)(81166006)(9786002)(63266004)(5890100001)(8676002)(81156014)(478600001)(47776003)(107886003)(39060400002)(4326008)(36756003)(2906002)(59450400001)(26005)(77096007)(186003)(305945005)(356003)(6666003)(5660300001)(336011)(48376002)(110136005)(54906003)(106466001)(106002)(7696005)(51416003)(2201001)(50466002)(316002)(36386004)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR02MB3390;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT024;1:rbpkb9IhTHjTPYR/RU9LJxwBLIHGZHjvg7usMLscDEk323zG9RjGJgFlct4Rk79F5uQUx8JU2CR27d3DX34CFlXaaoXJUY+eGfxmH3NKNbvcJ03ja8DFhmJpJ2N+DIHy MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46f35a3f-0d1d-4660-4f69-08d564aaa366 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060);SRVR:MWHPR02MB3390; X-Microsoft-Exchange-Diagnostics: 1;MWHPR02MB3390;3:QshXpIwmneKbyDBNg5O/WMOpc9zA8EXLbn/OVhLmLiQ0nBpCJ5N9uNbNYG1lIA0m/mlw3k03PE22lJv3N7nVimF/+m37HIKiJj03U1NiAKkmqteI5t4ZcgmkkBtEueM/Pw6OkXEguhRe7mOcrj1DHoNzFh6UxQLaEXj//4V+0Iz6Sm8POX9xX4gFerUvphCLn2MVgKbwPFrlVkWrpkAEXCyjnPWbL7x2zBiCJEOo+A/lsvwl1rL2AQyACFdSMmirCeQbziBG4Zqi+fMgnr3/XfqCblQmCMKTEvjjEhDwxLIFyC00ez2H7cQTQ+Pn5SSFtEWZaVZlRNkv0PohQEEsH93ATePlC6zRJyojtqBQ3Lw=;25:T3WfsV3MEXhbdw3zS2/328/V+QpuycrIHs+FO9yVpWeYmdl3YjOvQXbOT6TWk3RFNhA1UaKXcJhDqviKup8nQ8cBH8+nF0Ne1aMJ3rqQ3UwBj1ZSwRSEeI0mKcASXb0ccV0AdKIOzWDw/Ztk0mlkreXcfQTeaCeoaDjKAPeb7eqOo/cLzRbSpx3i0iBHbcZF8sR+oV1ay9LT0JEzfNs6+PJFyfE512i6xRNpDUwlOGjHtikfh7LD9yoEmMotlXuKsrFlDN4ryQdtB2u8PggUP0oYUfdTlXRlq60EJZDgn5O37Y8QnpPccHRRXPDpPy0ydb/9Pjt0xt6QPW6x0xM6yg== X-MS-TrafficTypeDiagnostic: MWHPR02MB3390: X-Microsoft-Exchange-Diagnostics: 1;MWHPR02MB3390;31:u2S2gcuQVX9Hs2rbJGVpAMq5ClEl3HYfesAJRTTYWwS6AGOcPIF/ixPxahqBG1bLvi/BWQ+ElEJefLhOTJjcciZdY4TH8UCwwHyJKb0gbR6aMVae2koqZodcEYX9OdcPcE2iKXTF//nWqC99PUpTGChHav6Y81c0ZP17JoSSqE42pY/ySHKI3Dz2GcOyKktAQP15vPm4y/q15Dw6Wb0HQFavN2krEvEgrRut4mO+F+s=;20:UypbfVuA5a7m9EysIjf7x3+Wi2KV6cbZOwFrMaRKYyVT8oFgqNg7kDe+pO+cO2WXxa1vhDe+ft8NiizkMheK0VeFkoVs99S9E8/zA3RjNdxejpQQIvtep2nmz5zX7DJSoPu6XLXjINsWJEnQdAdhm13CK0CRdxXOg3B9fCABrsjOg/pZAnjRUm0Q0MRADL8elzIP/XIVyrgv8A2FAWr9TX1ofTJkoeCPhtptJUfixRfblKieggzW4hfaroUkXO+sfmdWUOyfmt0UEd26egc/S2/oNqhdOrU07LAqssxxle2hHg15XDWBEzTpz8T4vfos7vXadhe0x9bDUcYd3O5p5qixatlXHprQcqfS4kfw5bHDDQMOrCz1+9rA0gqdeoCfxNLrRalMhhBOzYaQ0hSybhkTwJ+gIp2988DPfAtAQIj0N6JgOl0FqILb8Sxi5ryfTJ+zuzd6sMgDdl312oRZyHm0ldIfSzZSH1gt1LAK0xtrYCEwK4loXi7wW4EGmzUl Content-Transfer-Encoding: quoted-printable X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93004095)(3231070)(2400081)(944501161)(6055026)(6041288)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MWHPR02MB3390;BCL:0;PCL:0;RULEID:;SRVR:MWHPR02MB3390; X-Microsoft-Exchange-Diagnostics: 1;MWHPR02MB3390;4:JXqB/+iKRw+CVxsGBdNOioGjeTmtonpv9faK37x7N6VekphOA4xgXOfHZ4bZTigIrZpktOf2eVjn12AzLspYFgL+IWxWVVRHpzjn8P4jYHmZWr5x9T7Q6IVhxziWd2lLCv7lsB37KIVad2+pSHIZ8ZOXUHnKNyQ1ftr5epatwBvygp+WdMq/ygYydzMVNu1n0wnZU9lTQH6Jaq+eTJbljCbUX0IZD2UH+t4ALbdawaMJcsJWBlYyEYEmYUFBsgnNJPoyUKE0bdTH+khdNVIJkU6BkztC7TBJi2n7uaTmlIDgPgW0FUogZAKBWTPPlcmp X-Forefront-PRVS: 05641FD966 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;MWHPR02MB3390;23:FLvTBCYdupx03uDkVvCyi+ZU2eRQryZILdlDWTFvt?= =?us-ascii?Q?odrdYkfwJGk15/HwKDplYeZqUi4oDlYurV7yzQizRFd9FQ9VNgC7DM/iknRN?= =?us-ascii?Q?TmzRiXkN6tv1RwRrkd3IAdfSdFpnp71APIiZLdvcKdT60YoJN2BMusob4TE4?= =?us-ascii?Q?WLuKTZooer0PWslYutT/F9Feg0/YqOWOpj2YtE3qQSiiyHdQ+2FjfXqxTZRp?= =?us-ascii?Q?eXWMrBAoK0ej+on3lNbXVOjB+APg7PZi8vtsxzBlXqSImfGL41ybFHeZdBgs?= =?us-ascii?Q?ghcvyaAMcYDc9+zGh0L25EdAqeCIi6XZy5AvezI3Dafb5JdcF6Lmaj6c/jUn?= =?us-ascii?Q?N3EdgFDSy0OLT8fB0HMWy+ktMdxXtc4y9nomBIjQ4q4gtWZYjE6YbLleCXzF?= =?us-ascii?Q?1fyztmeM42Pdksba1HM+yi9xsPh6tKjnCDEN6GoIxXJSqVhLlbA7a3M8jhHW?= =?us-ascii?Q?qk444JezXXdZ1lS25vZwNy9cyVbmg9U6MmBfb2UZtHCpVHV5nshvITCOGEtm?= =?us-ascii?Q?5dv8hsL92R4HCJ56K9aX0arSu0YgL3sBeXKkQpiyCHa8hSidZhJlHgPoY9iG?= =?us-ascii?Q?UqAX5+0QEdgPbDmGzK+FqK8+6koio8QZH7vDkKmriA4oZYWRdVuNcAChnD3A?= =?us-ascii?Q?/t2aNASdT99d5wyqE+rkrBEyERCKTWRv7+gWQk+n86cP4exh5yT40kI1Nee2?= =?us-ascii?Q?vfiX4NTEfbxAzxqvk8IKAfCDr7LtIP4AEnJnZoWEQumyz16GfSPTNLWI1Dlc?= =?us-ascii?Q?P2xO11yKKtDpMOYMl4XGpuCUSl8zWQ7ALN7EaTxh2mA6PrUrfsZSuHHLl2ws?= =?us-ascii?Q?DoqmLehfnawA9hUs7/3o6FGPOpeCJe5eTIVy7hIOgU+N+aswoQJdgIa5BoqQ?= =?us-ascii?Q?Pe7sZQXkJ5X/SeJme1K/BCIdC/+ndpeHazq5tMNFfdPV6ssskuVHVsjcbZ7U?= =?us-ascii?Q?FwwSAyzxrbGzxRf+p/5NLRxlZ5DQzhmURDilhQLzPBs5Xc1Byvp3y4Hx0iPq?= =?us-ascii?Q?bxCjI+/Z9aPH5XP3x1kFb/zn/RF8Vk8DCK9SifqlOGRyRgtYQlWZWz+EEswN?= =?us-ascii?Q?rQaJ/1jz5obtT6yVRRkAOIory5PWzeknbNzF8sbIHMV1xRbgw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;MWHPR02MB3390;6:bA1u8kdxc5REowckOb/P58HlwG3D61QyVw2CFd6g5MUeX9XnBmoZNHEGi1be7CjXtkK6qqZcR/2gOyb0AzUi6m5GAvgK0h8Hx96wtXxoExFwXRCJBx3VWXhlM3DN7weSk0bXcEVIixCC6NEr8HqZSJ3HdM0T56u3XBeIemlxFDiYZhOASC+A9/iJTxNdoZGtCs3LmAJEknwX9/1Hh4GjUXtnZkZkyKi8YZg6VE0rxBgFXcfpiXJGiXryNRO6XdA7CzoNBBwffxwCIUR+XJmDgjElSR70A+/ZYi3b/ft7jL+n1Atu71CL0wPaWQvnki1rrkHUHXFAmbqF0bafVVVLcxwCDW5pOkD7Pgwp9xSfSNE=;5:hmAybaBXvAgJPZNFkwnDaPPpC7Q4i5/eyytPtgt1kwULp1iu6AXZRjrg9lMtJw8sDDyUIOGVoEjdClPsL75OVQGJNzilmO9YqqGh/cXMH3DvRptxkBrrGqOdZ8fJ7qKOd2Qt73lYJYc3LiXsF049SVy0MuMKZniNJus+BaakC+U=;24:rxmWFmjyu2YTpUY4StJfB0DzgRcX52qm48CbHaCm3EEyfWruPWsc5vNJHnJFmDZuEXXzkQmbEfyCjQM+Pv1xXz2NHacf7SALifcqJLOrWhw=;7:A+p59yLd4bVbkTM829Ah7ZNB2q6JmWzKqZOaPgBKl7hCvRpHYgHlraoHFO5FKSojNBdQABzAhA7mUKd78WYp6xbiAkC7KkF12gFu0NvLg8NUgxG/fNOfPXRVx2HuTEHVbelKkKJV0+whRn8AUE5CyrqWhIIMF0Rg8cS50eh6kx/Ix3cNt1Mnr6/1VfAwHDrcBRfuOTOyUVcTts8v4x1piXBvPjyt56Et3/hji6FZMfvgJHkxxkFkilXLhWu/4a/B SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 10:50:38.8902 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46f35a3f-0d1d-4660-4f69-08d564aaa366 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB3390 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harini Katakam Handle HRESP error by doing a SW reset of RX and TX and re-initializing the descriptors, RX and TX queue pointers. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek --- v2: Rebased on top of latest net-next and reinitialized all rx queues. drivers/net/ethernet/cadence/macb.h | 3 ++ drivers/net/ethernet/cadence/macb_main.c | 59 ++++++++++++++++++++++++++++= +--- 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cad= ence/macb.h index c50c5ec..8665982 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -13,6 +13,7 @@ #include #include #include +#include #if defined(CONFIG_ARCH_DMA_ADDR_T_64BIT) || defined(CONFIG_MACB_USE_HWSTA= MP) #define MACB_EXT_DESC @@ -1200,6 +1201,8 @@ struct macb { struct ethtool_rx_fs_list rx_fs_list; spinlock_t rx_fs_lock; unsigned int max_tuples; + + struct tasklet_struct hresp_err_tasklet; }; #ifdef CONFIG_MACB_USE_HWSTAMP diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/etherne= t/cadence/macb_main.c index 234667e..e84afcf 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -1258,6 +1258,57 @@ static int macb_poll(struct napi_struct *napi, int b= udget) return work_done; } +static void macb_hresp_error_task(unsigned long data) +{ + struct macb *bp =3D (struct macb *)data; + struct net_device *dev =3D bp->dev; + struct macb_queue *queue =3D bp->queues; + unsigned int q; + u32 ctrl; + + for (q =3D 0, queue =3D bp->queues; q < bp->num_queues; ++q, ++queu= e) { + queue_writel(queue, IDR, MACB_RX_INT_FLAGS | + MACB_TX_INT_FLAGS | + MACB_BIT(HRESP)); + } + ctrl =3D macb_readl(bp, NCR); + ctrl &=3D ~(MACB_BIT(RE) | MACB_BIT(TE)); + macb_writel(bp, NCR, ctrl); + + netif_tx_stop_all_queues(dev); + netif_carrier_off(dev); + + bp->macbgem_ops.mog_init_rings(bp); + + /* Initialize TX and RX buffers */ + for (q =3D 0, queue =3D bp->queues; q < bp->num_queues; ++q, ++queu= e) { + queue_writel(queue, RBQP, lower_32_bits(queue->rx_ring_dma)= ); +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT + if (bp->hw_dma_cap & HW_DMA_CAP_64B) + queue_writel(queue, RBQPH, + upper_32_bits(queue->rx_ring_dma)); +#endif + queue_writel(queue, TBQP, lower_32_bits(queue->tx_ring_dma)= ); +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT + if (bp->hw_dma_cap & HW_DMA_CAP_64B) + queue_writel(queue, TBQPH, + upper_32_bits(queue->tx_ring_dma)); +#endif + + /* Enable interrupts */ + queue_writel(queue, IER, + MACB_RX_INT_FLAGS | + MACB_TX_INT_FLAGS | + MACB_BIT(HRESP)); + } + + ctrl |=3D MACB_BIT(RE) | MACB_BIT(TE); + macb_writel(bp, NCR, ctrl); + + netif_carrier_on(dev); + netif_tx_start_all_queues(dev); +} + static irqreturn_t macb_interrupt(int irq, void *dev_id) { struct macb_queue *queue =3D dev_id; @@ -1347,10 +1398,7 @@ static irqreturn_t macb_interrupt(int irq, void *dev= _id) } if (status & MACB_BIT(HRESP)) { - /* TODO: Reset the hardware, and maybe move the - * netdev_err to a lower-priority context as well - * (work queue?) - */ + tasklet_schedule(&bp->hresp_err_tasklet); netdev_err(dev, "DMA bus error: HRESP not OK\n"); if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) @@ -3937,6 +3985,9 @@ static int macb_probe(struct platform_device *pdev) goto err_out_unregister_mdio; } + tasklet_init(&bp->hresp_err_tasklet, macb_hresp_error_task, + (unsigned long)bp); + phy_attached_info(phydev); netdev_info(dev, "Cadence %s rev 0x%08x at 0x%08lx irq %d (%pM)\n", -- 2.7.4 This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.