Received: by 10.192.165.148 with SMTP id m20csp1082683imm; Thu, 10 May 2018 05:28:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqht3SxKivw20umD8tMGq4V8mn4ZzISIHchJu8QVsujs2ID4AtZBgz+cLgdhdGp0t4gWbSG X-Received: by 2002:a17:902:bb83:: with SMTP id m3-v6mr1231466pls.236.1525955309154; Thu, 10 May 2018 05:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525955309; cv=none; d=google.com; s=arc-20160816; b=U4RXOsrTTThzv2hEuPA6VcIHQWahseKJfockU/SP0DDPD8kFqMIb8bf1/jVTU1oXyS lgDT/UJh1zmwohz/Ji+THghOENXCqSZNe8Gyazu/t4Ko7A6QOeDgYlK+KiytSMo0LLkw q7spn+MAwruUXJ/iUjgFj9ECyrlQorMHg1WSLv+3itCbXnXdXEFbf+wqo8vDbSWXynat 4kYULooNrgYvKN8rXhpHh9SrZjHgxaPdkOoyoAl/e9szws5hVOmStFHuYgjJGCdGZPBC BDAGhZYtD6ScarSJpW+t0LQGRmk9vByRLmztkrmviKERB0a/sg3z0OMmkjnxxdJ5hgCM tvIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=47hfvFqbEt6W9tlfnS7q84hygNDIuf2epruH2r35XOQ=; b=BsBqO9ZMGod2dJcAiItZxgz4ADtA1uemYlPWbRSdTiqKyrfiKRY3GS+b7LTWPnw+br M9hPiLJxcUL0IBrtC9xug+eVTPgZbhlqaLvuJBRof1t/GhchRjDSrSLpTvtwFikuSklk SREAKBKRQN9Ayb2HMzUkSx5vr/dK6+/xLyuvLNdUw3tJ9reX+krnlKT3yrd6CXCbbF3p Y91OMYyyik7AC7vMAqovC5MkRjvrm9vGU50+x9BD8nL/jW7qk9xjM/4yCk5r1JSpsK+B dQ86oOSHOW8hdbq+8nP11LkdsYA8T4wbOXqUHZihgSDJBy99lu/1C+JsaG7aYPQsddix oJDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=veCwgJbm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12-v6si797782plg.180.2018.05.10.05.28.15; Thu, 10 May 2018 05:28:29 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=veCwgJbm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757356AbeEJM14 (ORCPT + 99 others); Thu, 10 May 2018 08:27:56 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:44549 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757277AbeEJM1y (ORCPT ); Thu, 10 May 2018 08:27:54 -0400 Received: by mail-wr0-f174.google.com with SMTP id y15-v6so1822721wrg.11 for ; Thu, 10 May 2018 05:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=47hfvFqbEt6W9tlfnS7q84hygNDIuf2epruH2r35XOQ=; b=veCwgJbm/F6CkiFELL5DiRZf5F1AT3OQTy+sdkKAdrSrkEGocsB8wxOZi2sAFwnl4T bBl4TpN69XeWnsYYSOjKDaHJPriQLhzdflEZJOVpEJeey83bygu853dvqB8WTGq19Gf6 ruP8n8aDGHcd2laCIvdIdpPGhJqwDjzQ2bKy1offR3kuoKlNoo0UfvapriyKi905rBZt w9afIge4jtXCTdK30mzWvK3x1OK8/RzS6RISaKc5mp+cv5w12XTUWrcuJR5Duzy+u4Wn eRpz4ez1cp2hXzx5Qr+Rv1lTZj9bf2FdSFKNzzYo7QHb6emW13ywqus/FqeGo9VGVfJG HDtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=47hfvFqbEt6W9tlfnS7q84hygNDIuf2epruH2r35XOQ=; b=TLO9MbONNMHKhPxq9z9mwZxNEzSkvLsD6r9EOACX+UpxdeRtxQUEsWLv75BcHBR9gZ p+IoxzqsKmH8of4IKxMWcOYBFS2R0vO1XHzezNAcp9eCZsc8PJBQbQLF13okYq307lSk zt/oYBUNL7atVx+eefllitcqP06CpmZuy/xHMpllZEzewoEX2/LIgCc6uWvfdrgNCoFX pS7us2k9XGzdGJmyxbGZO3MZMaBSVWhu5h+6t+vLubL67pLQbBgUzQBqlpkIvwvVna1S OB1cRDhodViBpGOufmXEckRmQYoaWJoQBbYo+kfqy+iBCZZyA61uPUVsHDLv37G3taHh 5x5g== X-Gm-Message-State: ALKqPwcR0Mbu+puaFIem8sPt3pm8jU1xFKi9f8OjQcG7EV29hAvckx3e W6SbGRhQrKOR6MsBclUi3NS+pW+9 X-Received: by 2002:adf:8212:: with SMTP id 18-v6mr1163147wrb.144.1525955272458; Thu, 10 May 2018 05:27:52 -0700 (PDT) Received: from [192.168.1.4] (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id g78-v6sm1233696wmc.27.2018.05.10.05.27.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 May 2018 05:27:51 -0700 (PDT) Subject: Re: [PATCH/RFC] mtd: spi-nor: honour max_message_size for spi-nor writes. To: NeilBrown , Boris Brezillon Cc: David Woodhouse , Brian Norris , Richard Weinberger , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org References: <87efj1kw9u.fsf@notabene.neil.brown.name> <20180509160240.23ef11f2@bbrezillon> <87vabwa2gm.fsf@notabene.neil.brown.name> <87mux7afkv.fsf@notabene.neil.brown.name> From: Marek Vasut Message-ID: <1bb32a4e-55cf-f5f2-60f5-2213f31d54ac@gmail.com> Date: Thu, 10 May 2018 14:27:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <87mux7afkv.fsf@notabene.neil.brown.name> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/10/2018 01:57 PM, NeilBrown wrote: > On Thu, May 10 2018, Marek Vasut wrote: > >> On 05/10/2018 12:28 AM, NeilBrown wrote: >>> On Wed, May 09 2018, Boris Brezillon wrote: >>> >>>> On Fri, 27 Apr 2018 16:18:05 +1000 >>>> NeilBrown wrote: >>>> >>>>> Hi, >>>>> I've labeled this an RFC because I'm really not sure about removing the >>>>> error path from spi_nor_write() -- maybe that really matters. But on >>>>> my hardware, performing multiple small spi writes to the flash seems >>>>> to work. >>>>> >>>>> The spi driver is drivers/staging/mt7621-spi. Possibly this needs to >>>>> use DMA instead of a FIFO (assuming the hardware can) - or maybe >>>>> drivers/spi/spi-mt65xx.c can be made to work on this hardware, though >>>>> that is for an ARM SOC and mt7621 is a MIPS SOC. >>>>> >>>>> I note that openwrt has similar patches: >>>>> target/linux/generic/pending-4.14/450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch >>>>> >>>>> They also change the spi driver to do a short write, rather >>>>> than change m25p80 to request a short write. >>>>> >>>>> Is there something horribly wrong with this? >>>> >>>> Marek, any opinion on this patch? >>>> >>> >>> Hi, >>> thanks for following up. >>> I have since found that I don't need this patch, though maybe others >>> still do(??). >>> My hardware can only send 36 bytes and receive 32 in a single >>> transaction. However I can run a sequence of transactions >>> to process a whole message no matter how large that message is. As >>> long as I keep chip-select asserted, all the slave device sees is that >>> the clock period isn't quite constant, and the slave shouldn't care >>> much about that. >>> When reading from flash, I found that handling large messages with >>> multiple hardware transactions was 50% faster than breaking the >>> read down into lots of 32 byte messages. >>> >>> So, I won't object if this patch is forgotten. Thanks for >>> your time anyway. >> >> Nice, which hardware is that ? > > Mediatek MT7621 SOC (particularly in the gnubee.org NAS platform). On nice, a mips, good to see someone still cares about mips :) -- Best regards, Marek Vasut