From patchwork Thu Feb 22 19:13:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Beier X-Patchwork-Id: 876808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fJM4ucU+"; 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 3znPDM5CRfz9sW5 for ; Fri, 23 Feb 2018 06:14:27 +1100 (AEDT) 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:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Js3QHldv7omfkbVao3Ojk9Yr3CwhGrGhkAIEWiY7bgU=; b=fJM4ucU+YiluwB xN8XWLPeluiFCuyMwL8JrlMOcPsYmdE/knBceJIOLusbn643sX5ajSDwtkrTQyp6QLRZiB842j2EH B/7NmbCDiyfFb/z1Ll531AFuccooN+ii2aL1AKb3G2MwGUgrQCWPdDRdvZmWCcO6zDlfMZWjK78VK SS5bMCKiUlvSIMehW1dYVMucvHhFQ+e5MiIzdWOVNop+0lCxkZbVm9ILrfcn6vHHR3Gps+sjwOuGE aDi8z/hcLYqKf5nBw3mUkLPM+Kq/dNikGgbWl4OZ83t2ohuvRzS7lLUB5NNHsBF1uKLxkQDiUgX4T 7bUjBoWP0qp/6PWYdgJQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eowJt-0003dx-1t; Thu, 22 Feb 2018 19:14:17 +0000 Received: from mail-wm0-f66.google.com ([74.125.82.66]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eowJd-0003S9-3q for lede-dev@lists.infradead.org; Thu, 22 Feb 2018 19:14:08 +0000 Received: by mail-wm0-f66.google.com with SMTP id t3so403155wmc.2 for ; Thu, 22 Feb 2018 11:13:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nLolaP2WBN25WXlh6MIepQpWz+UYI1006IJGevOWYbI=; b=GjsWrtLMQci6TIDUqgvVUQEnmmiR533YG2mOhygN3KIKcU3ff/cW8owltjeL4LbdlB 4KaIFmWPOr3byUtyXCuZwmG0aiC5nx2em1Rx7zbeua0zUELfdiGQ8A5CpjpeAZuHHcih vjgw+CcKUIece19AjjQ/uZrWG763L9yj/AOy/Oxt8HveFujvCJXgHiwbIf+NNUhPcLht ndFfYZk+gaH2zQrFpldJy8HeGX/UT0yDeegPdjsxPv8NRYuK6WA+mKl5F+Lsw+DCmcoZ afCls2Z6eAiTGIJaWr+jW/HkWKsCu4PF2lHUS4oFuZh8YAdvC++dLDSrF/7QRnCD6ci1 UMlQ== X-Gm-Message-State: APf1xPDa1ekXLzVNIQ6tIgkNoelLqWUBZvcJU++TdsvjEIdhvSlxeCIE eZIohT8f8TPVaAdH3RXzDnQZQQ== X-Google-Smtp-Source: AH8x2254XibWP+ihtcNOm9KcJMcZytlMTfDTEsBiPtvfLvPZdJfMgZSxsdy6llcHZKJa10SXvVUPDQ== X-Received: by 10.80.149.236 with SMTP id x41mr10672018eda.64.1519326829116; Thu, 22 Feb 2018 11:13:49 -0800 (PST) Received: from denkpad ([178.19.214.170]) by smtp.gmail.com with ESMTPSA id z8sm678288edi.11.2018.02.22.11.13.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2018 11:13:48 -0800 (PST) Received: from bk by denkpad with local (Exim 4.89) (envelope-from ) id 1eowJO-0002PN-9a; Thu, 22 Feb 2018 20:13:46 +0100 From: Christian Beier To: lede-dev@lists.infradead.org Date: Thu, 22 Feb 2018 20:13:23 +0100 Message-Id: <20180222191323.9101-2-dontmind@freeshell.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180222191323.9101-1-dontmind@freeshell.org> References: <20180220144634.5c7f6ef3@silberschrank> <20180222191323.9101-1-dontmind@freeshell.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180222_111401_261820_BD1D51AD X-CRM114-Status: GOOD ( 13.58 ) X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.66 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.66 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (christian.cb.beier[at]googlemail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different Subject: [LEDE-DEV] [PATCH] ar71xx: fix flash fast read for flash chips > 16 MB X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Beier MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Christian Beier SPI fast flash read only is supported on devices using 3-byte-addressing. As chips bigger than 16MB use 4-byte-addressing, reading fails with -EOPNOTSUPP. This commit sets the fast flash read callback spi->master->spi_flash_read to NULL for chips that use 4-byte-addressing. Fixes https://bugs.openwrt.org/index.php?do=details&task_id=1376. Signed-off-by: Christian Beier --- ...-m25p80-disable-fast-flash-read-for-4b-addressing.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.9/415-mtd-m25p80-disable-fast-flash-read-for-4b-addressing.patch diff --git a/target/linux/ar71xx/patches-4.9/415-mtd-m25p80-disable-fast-flash-read-for-4b-addressing.patch b/target/linux/ar71xx/patches-4.9/415-mtd-m25p80-disable-fast-flash-read-for-4b-addressing.patch new file mode 100644 index 0000000000..048f50cbcd --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/415-mtd-m25p80-disable-fast-flash-read-for-4b-addressing.patch @@ -0,0 +1,14 @@ +diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c +index 1343e5d..1e89067 100644 +--- a/drivers/mtd/devices/m25p80.c ++++ b/drivers/mtd/devices/m25p80.c +@@ -245,6 +245,9 @@ static int m25p_probe(struct spi_device *spi) + if (ret) + return ret; + ++ if (nor->addr_width > 3) ++ spi->master->spi_flash_read = NULL; ++ + return mtd_device_parse_register(&nor->mtd, + data ? data->part_probes : NULL, + &ppdata,