Received: by 10.223.185.116 with SMTP id b49csp3953884wrg; Tue, 6 Mar 2018 07:36:04 -0800 (PST) X-Google-Smtp-Source: AG47ELtqKrY0r9X5tJOLzIjqlv8cbDCGkXuCwqVu7a+xmoV8J26Ro1mWFXRDkZPwjq1DKBLrpe5F X-Received: by 10.98.149.138 with SMTP id c10mr19451013pfk.143.1520350564657; Tue, 06 Mar 2018 07:36:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520350564; cv=none; d=google.com; s=arc-20160816; b=L9umh+QhlMHkBp3ptP6Dlt6n7/9lr8PzffvQLH0GB4C4n0O3aVjanFueLYRfEVq5PK 01e9WhDtOO+Ks7O3XrKQuzq8gllu4OLNknLXL9jHoLtHW9CyMW0U4ZEPk7pKs0tGTzfA vgY4YtOASbdNVWGReOtG/9mknKcEvERqV4/Nj27mxPqp+ul1qZS3yAfg1N/PEedlCBpu 0KxF7jKMo6V+aLTqQbDx9S5Cq/a9tBZKdvQpFetqfSEOhGul/bKBj5fJZeO+3sFEgjC5 rOA6Eo5Dya6iX0v75WVTBS4LF2+YsbrWcEcMxBwckUZMbXCDM8UJ7BBiCtG6hNqq93T3 SJyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=c5zStcZ+cmjaLQoclDvKqlQ2rBmclvvOHZhxthM/jvQ=; b=cqTEWnG6L4d03VeU5UFmuv0w3zbW+msmhCv9dYrELdWcbYID6biQN3GFDTwZBpRnCn pUUhGTpnSmySDCWqGNX4b5PEdW4Y0yiuFs7aRerk7RtXv2uLSnxrkZ3TxLN3RHYVuCAd UOHCgbDNjWEl0qmIwdxq93b780fLnRUG5v/PXqdEUXke+fHNSCIFI82U9zBuZ4COvXTw YGyORqMYy9EtdZ7y6QTPe3M2dlH0XjBFG61wLyT4O92weTKzXNTzoQdZCmt5T8Vk6Vqe HHnBeJKtoVxYSoebePo16wrp3HPY2mxZkq+4kDfJuJeI3duukP+XyQHpyUX7h4+h2UJr VLlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hIHYLt+3; 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 e2si9932222pgr.242.2018.03.06.07.35.49; Tue, 06 Mar 2018 07:36:04 -0800 (PST) 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=hIHYLt+3; 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 S932533AbeCFPd5 (ORCPT + 99 others); Tue, 6 Mar 2018 10:33:57 -0500 Received: from mail-vk0-f50.google.com ([209.85.213.50]:36153 "EHLO mail-vk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753559AbeCFPdz (ORCPT ); Tue, 6 Mar 2018 10:33:55 -0500 Received: by mail-vk0-f50.google.com with SMTP id q7so12594910vkh.3; Tue, 06 Mar 2018 07:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=c5zStcZ+cmjaLQoclDvKqlQ2rBmclvvOHZhxthM/jvQ=; b=hIHYLt+3SFUBNYoSInfFHOm16N5H32kaluewtP8sYjVH7N9VblNyEN6aRN3E3gLxNC utX5zqw8VP0hiWfVKdZgxpzY6FaXc0pbocZ+mx75zOeXONuQiBPB1K/ZBh+8o8rXqQto Fafn1sIzroC9WEsOsCFjSfFcR3At7RQ1u6iqitqeUB12svE1GOdSvx6AEP3oidOVninc OojWrLSenvPlzZ/LKL9HvrGQ8Jo1s8+EyixBkHYK6a+R6wKc94AlwOsrZOJMuRDtrMrK N24V7QOZfhdyskYE09XUnprWoAjRjkQKK+xYoWnNSq5YLWxaOSQxVGT8HUqmLYg0qiNL LDFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=c5zStcZ+cmjaLQoclDvKqlQ2rBmclvvOHZhxthM/jvQ=; b=teYTC+jcm490heXwEUZEUQgukl6hOFD+2tiHtYZjWw4wSIyb4Mr1c4vYBBFrSglB0A lIvCdWjtStr4nwKGz/KBEOxHDPxnEFwcthRqZOvpE3J7ZMtK6LzdYRvhaIiV2Hxetw7a G280g1khxT9Q/1xPCaTwCmQutqhMOrPtO+XzhWVhHcMWDXegNPJIjiTvOgvBcOzc4U13 IxuhXbHJhUrh7uJ6S9G4y1A2HXYco4QyvejEC1IKqT82M0VqbpINGwB7nUgO5ZHGc9H4 WtFUyvXs5Ty/GozhQlBgNgWNzm4WT0p13JM7YzEG1hEdB+dAj4oHajM+Frm1k7SPUeOi s31A== X-Gm-Message-State: APf1xPDWUA6fHZKA0Lwm1d171j20C4Yxv46sE4bNK9ZMnUefFAPCt25k 840CohGJgArKNhuDiLWTEpdLQgjzHUN8lj21sCk= X-Received: by 10.31.86.69 with SMTP id k66mr12559410vkb.127.1520350434786; Tue, 06 Mar 2018 07:33:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.81.166 with HTTP; Tue, 6 Mar 2018 07:33:34 -0800 (PST) In-Reply-To: <20180306142012.GB13586@sirena.org.uk> References: <20180303222716.26640-1-alexander.levin@microsoft.com> <20180303222716.26640-2-alexander.levin@microsoft.com> <20180305102310.GC8588@sirena.org.uk> <20180305200744.afw64js6wnmyfqrb@sasha-lappy> <20180305203533.GP8588@sirena.org.uk> <20180306142012.GB13586@sirena.org.uk> From: Jonas Gorski Date: Tue, 6 Mar 2018 16:33:34 +0100 Message-ID: Subject: Re: [PATCH AUTOSEL for 4.9 002/219] spi/bcm63xx: make spi subsystem aware of message size limits To: Mark Brown Cc: Sasha Levin , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6 March 2018 at 15:20, Mark Brown wrote: > On Tue, Mar 06, 2018 at 02:42:43PM +0100, Jonas Gorski wrote: >> On 5 March 2018 at 21:35, Mark Brown wrote: > >> > It's exposing more capability information but it's in the "how did this >> > ever work without the fix" range, and I'd worry that this might cause us >> > to do something like start exercising handling code in client drivers >> > that had never been tested. Not that I can immediately see any client >> > drivers in mainline that actually pay attention... :/ > >> I would assume that most spi client drivers use short messages, so >> they aren't affected unless the max message size is really short. >> m25p80 on the other hand will do arbitrarily large transfers/reads, so >> there it was supported first. > > There's a bunch of SPI drivers that do firmware downloads which I'd > expect to be affected, the limit the device has is tiny so it's > relatively easy to bump into it. It's very rare for devices to be so > limited so unfortunately client drivers don't generally check though. Well, at least for bcm63xx it's very rare to have something other than a flash chip, a (broadcom) ethernet switch management interface, or a SLIC/SLAC attached to the SPI controller. And AFAICT of these three only the flash chip uses large SPI transfers. Furthermore, unless you have a development board, you won't be able to attach anything different to it. So the chance to bump into the limits with other drivers is rather low. I would assume that this is true for most systems with a limited SPI controller. I would hope that most board designers are sensible enough to not add devices that won't work ;-) Regards Jonas