From patchwork Sat Jul 14 15:21:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 943955 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TRJ4oRZa"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="h126eIAr"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41SYMF3F4tz9s2M for ; Sun, 15 Jul 2018 01:22:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=bt9wBiCaKmFHYA9j0IL9gieixIG2lCMl8OJMw1mAx7c=; b=TRJ4oRZa/YH9trFqtbkSCSBq0q dXxaHjRlB5RiOmfX0j+ETTz8xCx6itsFySDzXQZxBFUxwRqdt8tprQTtoLX1uZ5iqonfALh5NbWnx zyuenFpwOY5al3kgPHWwN5iBX4joe8YcSQ+FIXKTs/mwMK6Jwn/jZQF+y0iZfqeRAO0eWjjyrjBTN ISt8wx79QYxi4qi+7PI2DXNJkcaYEdmUqkc89I+ZvvQsgYb9iUu2xKm5O18pUVQSN5+Sk/oaonizB 0iGz1YKTdlfa0lFkZfORYLuuHmfAOYpIadmbNWdJTffPjeYsY4OCjj9eaXEeTdfV/CF1KJ3rM+Z0v XsZWU3Qg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1feMNO-0003Jh-6B; Sat, 14 Jul 2018 15:22:26 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1feMNH-000321-L0 for openwrt-devel@lists.openwrt.org; Sat, 14 Jul 2018 15:22:22 +0000 Received: by mail-wm0-x241.google.com with SMTP id n17-v6so11894877wmh.2 for ; Sat, 14 Jul 2018 08:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=vvFK9kpJUqw6SfwDYB2yycj552A0bGhxfVg2z+TEC4s=; b=h126eIArtWwA2H/3SWRh5BKIZZnpc0dbzQ4dMnCDkCvKkhflAIeXUzy10xXK8NYrSC JZRNyunfgPLcnVknYKxxwcy6oVa2XhESzGbUm5IJknBBkYoo0nlUKJPBcb/oJkqFWGqh f2BmpY/w2oMcX0YUXKKEE7LoUasCrwGmV7KZYWwDwSHpQXeWUysxu/55QoWoMm3Ax6Eu UGkbBdufF9lWWZjJjUaafjmgUuOqTpHR49XPyFbgAfTfAw9IMuB24dx6gwZ5van4XGP1 8XdAPdGvE1lt2HtIQ/n0hHFItQ/FTuWkaQjtFVHpAnqnY2eMHyTdf4opQQy2M7Bew8oB fvfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=vvFK9kpJUqw6SfwDYB2yycj552A0bGhxfVg2z+TEC4s=; b=HLFFmbmRgbeQL2sEU45wM4Z7jGaO7vywDValZqUMwXMaPQhi630LlyzVLafTE1VX3p N3IJAk4HQVMfKT1sl1BNU5tkqrTTbDY8RFYsO234YB6Ri3FyVXVrGdFqlnaWjO1XsJFY C0w0Pzxq+7RNxuvvl7sfob+Sf+nBCB3lw9yKWgd0jxNbXg9PD98J+DMcpSzxZR9MO8Ha moIUwrt30pgtu+RHvKSPttdOdU0gAST3/c0wCSPJ1s1cuUREXKkZyrGxBF8vKUGCdp6F IWTuX+1QhhN8qFgbq3vHrj3kLElZrTGnk85ZF7vPZsqTmnXQSveRA8nNes/KaUO9Zyjv f4NQ== X-Gm-Message-State: AOUpUlFGxbSYPQpNKrM5mU2IwpeQXIDCi/7pzrHNHd5d98X7tKqjBY1C ZhvsFQWf64jJ8XXHgLYp6wLClBTX X-Google-Smtp-Source: AAOMgpcN3/TAkF8knTjC6oqITO1eBryLjPg0QkE0m+6chs5n5710ly6tHy1Gy/1O4YDuZ2ZUu+DUjA== X-Received: by 2002:a1c:90cf:: with SMTP id s198-v6mr6447370wmd.5.1531581727702; Sat, 14 Jul 2018 08:22:07 -0700 (PDT) Received: from debian64.daheim (p200300D5FBDBBDFC0000000000000CA6.dip0.t-ipconnect.de. [2003:d5:fbdb:bdfc::ca6]) by smtp.gmail.com with ESMTPSA id d7-v6sm8859191wro.92.2018.07.14.08.22.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 14 Jul 2018 08:22:07 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.91) (envelope-from ) id 1feMMu-0000E6-Jj for openwrt-devel@lists.openwrt.org; Sat, 14 Jul 2018 17:21:56 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Date: Sat, 14 Jul 2018 17:21:56 +0200 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180714_082219_884064_408E5B43 X-CRM114-Status: GOOD ( 13.42 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (chunkeey[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 2/2] apm821xx: attempt to fix sata access freezes X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The original vendor's driver programmed the dma controller's AHB HPROT values to enable bufferable, privileged mode. This along with the "same priorty for both channels" could very well fix the freezes that have been reported on the forum by @ticerex and @takimata. Signed-off-by: Christian Lamparter --- Awaiting confirmation from the original reporters. But if this turns out to fix the issue, I'll do a separate patch for 18.06 and lede-17.01. --- ...-dw-dma-hprot-fix-and-equal-priortiy.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch diff --git a/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch b/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch new file mode 100644 index 0000000000..c6e4331aa9 --- /dev/null +++ b/target/linux/apm821xx/patches-4.14/302-dw-dma-hprot-fix-and-equal-priortiy.patch @@ -0,0 +1,25 @@ +--- a/drivers/dma/dw/core.c ++++ b/drivers/dma/dw/core.c +@@ -167,6 +167,8 @@ static void dwc_initialize_chan_dw(struc + cfghi |= DWC_CFGH_DST_PER(dwc->dws.dst_id); + cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id); + ++ cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */ ++ + /* Set polarity of handshake interface */ + cfglo |= hs_polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0; + +@@ -1293,11 +1295,8 @@ int dw_dma_probe(struct dw_dma_chip *chi + else + list_add(&dwc->chan.device_node, &dw->dma.channels); + +- /* 7 is highest priority & 0 is lowest. */ +- if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING) +- dwc->priority = pdata->nr_channels - i - 1; +- else +- dwc->priority = i; ++ /* set all channels to the same priority */ ++ dwc->priority = pdata->nr_channels - 1; + + dwc->ch_regs = &__dw_regs(dw)->CHAN[i]; + spin_lock_init(&dwc->lock);