{"id":808568,"url":"http://patchwork.ozlabs.org/api/1.0/patches/808568/?format=json","project":{"id":3,"url":"http://patchwork.ozlabs.org/api/1.0/projects/3/?format=json","name":"Linux MTD development","link_name":"linux-mtd","list_id":"linux-mtd.lists.infradead.org","list_email":"linux-mtd@lists.infradead.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<1504252841-2445-4-git-send-email-bmeng.cn@gmail.com>","date":"2017-09-01T08:00:34","name":"[03/10] spi-nor: intel-spi: Fix broken software sequencing codes","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"f945b57ce2151cd8bf24bef970b8bbc86d0658a1","submitter":{"id":64981,"url":"http://patchwork.ozlabs.org/api/1.0/people/64981/?format=json","name":"Bin Meng","email":"bmeng.cn@gmail.com"},"delegate":{"id":63396,"url":"http://patchwork.ozlabs.org/api/1.0/users/63396/?format=json","username":"cpitchen","first_name":"Cyrille","last_name":"Pitchen","email":"cyrille.pitchen@atmel.com"},"mbox":"http://patchwork.ozlabs.org/project/linux-mtd/patch/1504252841-2445-4-git-send-email-bmeng.cn@gmail.com/mbox/","series":[{"id":969,"url":"http://patchwork.ozlabs.org/api/1.0/series/969/?format=json","date":"2017-09-01T08:00:33","name":"spi-nor: intel-spi: Various fixes and enhancements","version":1,"mbox":"http://patchwork.ozlabs.org/series/969/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808568/checks/","tags":{},"headers":{"Return-Path":"<linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"QOO4kWho\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"cyx//bEk\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkBSl0FwRz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 17:58:31 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dngqR-0002qh-3y; Fri, 01 Sep 2017 07:58:27 +0000","from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dngoo-0001X8-7O\n\tfor linux-mtd@lists.infradead.org; Fri, 01 Sep 2017 07:56:47 +0000","by mail-io0-x243.google.com with SMTP id f99so2172716ioi.0\n\tfor <linux-mtd@lists.infradead.org>;\n\tFri, 01 Sep 2017 00:56:25 -0700 (PDT)","from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com.\n\t[147.11.156.139]) by smtp.gmail.com with ESMTPSA id\n\td187sm853502iod.7.2017.09.01.00.56.23\n\t(version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 01 Sep 2017 00:56:24 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References:\n\tIn-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=Goq6SBRWW42aeI9E5fzAuxXahOQbVcaTUQKnGIeUWuM=;\n\tb=QOO4kWhovey0zVHXM9YEnplo7H\n\tRUPpWgHDt+HhyNAu3FBssrhFtRwJHP5+KTbRxknDKqERpkq3v2yuQw7x4j3Kr+oed+QInGwEu2Dgn\n\t1XgsADbv+jdciqpuJcQBslxq7XBM6i5AGbPl/lqUy4VfB3VyFUdWOsPpCUd9TL9mElerGEgdQFkt9\n\t9qCh6PYhO2GUGaLdKKi2ipQA4MILAFhteR8CkN1v0nakn4ZuUjy9a9dpRaBs+jg7CFQQzylZfGFmN\n\tZehifLY26CSH+/lOZe++hUGITg8pJ/5kj8jnJQ0Yg8AiMvZj4v7CwpXH7KRK8f/qIOLkQV62pKxfE\n\tccBylmQg==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=P+p3c4R9nkna4zhoHfxr38SL4+WmxchxI9T/AEu8YyU=;\n\tb=cyx//bEkQT0IlmXOaQsonKRP+xCo32Mr/KKT9aNMO7aPKpQpD4knNsk2VHw0J9cAOV\n\t4SZ8W5Gsx/fphGVfTG9Y9YiRDKykIEKzbnKNV4QtUMFDLRA3xKIucJmi8uiF4sJ7h37Z\n\tBBw4tnjLVzlEaYGJEgX7PA7qJ5Jn/gIwBtXstz5sElxgjTdaKnYSMN+cIuQg56XVp/P4\n\tmL0feGRiLpmXzMF0ltzjESBj6C0sXpj/YgqCz4MITzE6JA7kZWxhg0sIyx9Pihz9ZLaT\n\thU4IBkkDhD+R0R1Eb1bJwT9rDO0fTTZP3RXd8PPUIsXHqxfwIufwCIMMACkXVEf9p368\n\tq7YQ=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=P+p3c4R9nkna4zhoHfxr38SL4+WmxchxI9T/AEu8YyU=;\n\tb=mBtj6nzyyZ0v9HmFhKUJXfdHNAGItybW4qPS/ylv3KAWDd5tXsjJfOGvrBb+TbiGfW\n\t/eohkzLTATbDOffrg1efmH5IaPYb9Hkon/9/lFvY4aOEoqqyh2qlFnC2SFnj7xWnipbi\n\tl31B4p/v/+5VDUi9JT3tJHpbQTp3DDMwxLRoC06vEv61gD9jtqsL5+c38Ug9Njj32CHI\n\ti80m3c9nfvEMhdxx3FEOif+WsZic8jEyqKBkeupJJ9aFU3VftpLXf+LC66aH9L4/tj/8\n\tcdeBh8Yh3Vqr6jeL1i4PfHEMAqsXrQ7pPte4xhb9ceE82kL2upybuGf3p2982wM+lJHZ\n\tjkkQ==","X-Gm-Message-State":"AHPjjUjIm4kTKp+Z4j3jSP3cECUzGyBUGOwcOrka7y7P+gpLIzQrh9q4\n\txjQiefR1Pcw5qg==","X-Google-Smtp-Source":"ADKCNb61iODuGPhQx5ieWP4TM64VK4a4uleWbSaMXpyDN8MwGKSK5DZR31ggK1CU9JeGA7rNxbK46w==","X-Received":"by 10.107.9.73 with SMTP id j70mr715365ioi.305.1504252585195;\n\tFri, 01 Sep 2017 00:56:25 -0700 (PDT)","From":"Bin Meng <bmeng.cn@gmail.com>","To":"Mika Westerberg <mika.westerberg@linux.intel.com>,\n\tCyrille Pitchen <cyrille.pitchen@wedev4u.fr>,\n\tMarek Vasut <marek.vasut@gmail.com>,\n\tBoris Brezillon <boris.brezillon@free-electrons.com>,\n\tBrian Norris <computersforpeace@gmail.com>,\n\tRichard Weinberger <richard@nod.at>,\n\tDavid Woodhouse <dwmw2@infradead.org>, \n\tlinux-mtd <linux-mtd@lists.infradead.org>,\n\tlinux-kernel <linux-kernel@vger.kernel.org>","Subject":"[PATCH 03/10] spi-nor: intel-spi: Fix broken software sequencing\n\tcodes","Date":"Fri,  1 Sep 2017 01:00:34 -0700","Message-Id":"<1504252841-2445-4-git-send-email-bmeng.cn@gmail.com>","X-Mailer":"git-send-email 1.7.9.5","In-Reply-To":"<1504252841-2445-1-git-send-email-bmeng.cn@gmail.com>","References":"<1504252841-2445-1-git-send-email-bmeng.cn@gmail.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170901_005646_385115_5EAEE220 ","X-CRM114-Status":"GOOD (  11.34  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:243 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (bmeng.cn[at]gmail.com)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-mtd@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-mtd/>","List-Post":"<mailto:linux-mtd@lists.infradead.org>","List-Help":"<mailto:linux-mtd-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n\t<mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>","Cc":"Stefan Roese <sr@denx.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>","Errors-To":"linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"There are two bugs in current intel_spi_sw_cycle():\n\n- The 'data byte count' field should be the number of bytes\n  transferred minus 1\n- SSFSTS_CTL is the offset from ispi->sregs, not ispi->base\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\n---\n\n drivers/mtd/spi-nor/intel-spi.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/drivers/mtd/spi-nor/intel-spi.c b/drivers/mtd/spi-nor/intel-spi.c\nindex 07626ca..263c6ab 100644\n--- a/drivers/mtd/spi-nor/intel-spi.c\n+++ b/drivers/mtd/spi-nor/intel-spi.c\n@@ -426,7 +426,7 @@ static int intel_spi_sw_cycle(struct intel_spi *ispi, u8 opcode, int len)\n \tif (ret < 0)\n \t\treturn ret;\n \n-\tval = (len << SSFSTS_CTL_DBC_SHIFT) | SSFSTS_CTL_DS;\n+\tval = ((len - 1) << SSFSTS_CTL_DBC_SHIFT) | SSFSTS_CTL_DS;\n \tval |= ret << SSFSTS_CTL_COP_SHIFT;\n \tval |= SSFSTS_CTL_FCERR | SSFSTS_CTL_FDONE;\n \tval |= SSFSTS_CTL_SCGO;\n@@ -436,7 +436,7 @@ static int intel_spi_sw_cycle(struct intel_spi *ispi, u8 opcode, int len)\n \tif (ret)\n \t\treturn ret;\n \n-\tstatus = readl(ispi->base + SSFSTS_CTL);\n+\tstatus = readl(ispi->sregs + SSFSTS_CTL);\n \tif (status & SSFSTS_CTL_FCERR)\n \t\treturn -EIO;\n \telse if (status & SSFSTS_CTL_AEL)\n","prefixes":["03/10"]}