Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp168106ybg; Tue, 28 Jul 2020 02:55:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXpPKQqCce0Ew9belAhOk1edIGzp2iJ0zk4n03vtNXI6frnc9r1qcXuVaOOzTP9HCux88j X-Received: by 2002:a17:906:60c6:: with SMTP id f6mr23446415ejk.265.1595930103501; Tue, 28 Jul 2020 02:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595930103; cv=none; d=google.com; s=arc-20160816; b=IMtC7jUINz6pHvoIjWUEDHbrboY7Xt53sQ2UuYt7EhYIxIg9NyXL02/GXz2dD5WYgW 9im92VPNol4O2fmbiRXTPkaPtgvXvzSIa24TDgEXV2C8bcvKTANC40P6D1Ubxqpz+QFt 1dQqA1NCrkyHp8Xmkc2ivv0mOc23hmBeG2PYisqeNGwEJWQZ2qh+E5CsEvvH6o8YGoZ+ 4G8qxqVjw1hwAt4qodipyf1fBVC2D2BsDBuaP+6fVgGu43jNbKr7kphTjIsTo8PWmhTN GZyYbE2txzXUs5B0EsV5aXm37/FKOLQMzhLtet6h1faEGd4jcXcOntb3jPkgMCHBWtcM Q4nQ== 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:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=OyNK0wpkJ4jmVvaY5JGX39FzV76CxD++iVhCFoCKucc=; b=mZ9+UUlaxD4FsT/cJWQUIAh2rsCBeMZKyz3Yx7SKz0dswNmA7cN4kikPM8JjXfO10N eeLV5PrHnnsaUL5erBMOVryCZEyKrrquus7jPrcwaQBsjfBr6QJczVYSsJCAwUg/yQ7L JswVPNdK6utsy3xkp6AdZaycptXiKfL3O1barhSnNfK6lHRWOX8kXJEMNE++JcgAFWfa OFu9qp6KrXQYSYaZYagux1RqxcIKK+8LoeX/vDLIfwAfzyBrB90DITKLngGv5BQH9fbO LCC3RmGF/PJS7Qkrk84cgQNnDiCEB4+FBD3vvCku9Hd4/sKDvGUyJYjk3+dXWWSeXxVm ojHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si7882715ejd.737.2020.07.28.02.54.40; Tue, 28 Jul 2020 02:55:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728417AbgG1JwK convert rfc822-to-8bit (ORCPT + 99 others); Tue, 28 Jul 2020 05:52:10 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:44857 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728277AbgG1JwJ (ORCPT ); Tue, 28 Jul 2020 05:52:09 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-99-v648WAFYPa2DlrrGj_LO-w-1; Tue, 28 Jul 2020 10:52:05 +0100 X-MC-Unique: v648WAFYPa2DlrrGj_LO-w-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 28 Jul 2020 10:52:05 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Tue, 28 Jul 2020 10:52:05 +0100 From: David Laight To: 'Christian Eggers' , Arnd Bergmann , "Greg Kroah-Hartman" CC: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: RE: [PATCH] eeprom: at25: set minimum read/write access stride to 1 Thread-Topic: [PATCH] eeprom: at25: set minimum read/write access stride to 1 Thread-Index: AQHWZMG/Rp7Dl/S8M02sb706WA/KmqkcvErQ Date: Tue, 28 Jul 2020 09:52:05 +0000 Message-ID: References: <20200728092959.24600-1-ceggers@arri.de> In-Reply-To: <20200728092959.24600-1-ceggers@arri.de> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Eggers > Sent: 28 July 2020 10:30 > > SPI eeproms are addressed by byte. They also support multi-byte writes - possibly with alignment restrictions. So forcing 4-byte writes (at aligned addresses) would typically speed up writes by a factor of 4 over byte writes. So does this fix a problem? If so what. So setting the 'stride' to 4 may be a compromise. Looking at some code that writes the EPCQ for Altera FPGA (which I think is just SPI) it does aligned 256 byte writes. The long writes (and the 4-bit physical interface) are needed to get the write times down to a sensible value. David > > Signed-off-by: Christian Eggers > Cc: stable@vger.kernel.org > --- > drivers/misc/eeprom/at25.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c > index 0e7c8dc01195..4e57eb145fcc 100644 > --- a/drivers/misc/eeprom/at25.c > +++ b/drivers/misc/eeprom/at25.c > @@ -358,7 +358,7 @@ static int at25_probe(struct spi_device *spi) > at25->nvmem_config.reg_read = at25_ee_read; > at25->nvmem_config.reg_write = at25_ee_write; > at25->nvmem_config.priv = at25; > - at25->nvmem_config.stride = 4; > + at25->nvmem_config.stride = 1; > at25->nvmem_config.word_size = 1; > at25->nvmem_config.size = chip.byte_len; > > -- > Christian Eggers > Embedded software developer > > Arnold & Richter Cine Technik GmbH & Co. Betriebs KG > Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918 > Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH > Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477 > Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)