From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wflow7-smtp.messagingengine.com (wflow7-smtp.messagingengine.com [64.147.123.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1635F12F365; Thu, 7 Mar 2024 15:03:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709823800; cv=none; b=dQx0pGF9Xysa1vhUHDwuWIjkJT9eVeMK6REWA1z3zITFZJ5NuSmRqR9jwbeMdB381uYcZugSxU5GX1bMVYcMMRq3Dm2U5heh3ElVB2qwau2x3Mg0luCIHJ1qvGG3kxx6lyPyzbiaZLcggFBbc/QepKOBdRuFdSwrSgPYZd6tF4I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709823800; c=relaxed/simple; bh=zrHvih0CRLls3gfTaqe/nco2QOUS/ZrmpGJoEnrrwuI=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=uVP4BEtUOuoGCmsCe/iEgqI0/YQftIVcS2h1MX+sJU2JbP9tuckBhkz4Ez/r1bVsbMBR3+csgzB+Lag/GUoNsnTMxvsiIJ9DfXApbOKwI++mpcfxkvrjfk5flIRqydrQs5LQTv3xFK5/Pi1HiURL8NLWrSWcKTX5z+khjyfhoGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=r0tuvbzY; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IMAiRVXx; arc=none smtp.client-ip=64.147.123.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="r0tuvbzY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IMAiRVXx" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailflow.west.internal (Postfix) with ESMTP id 403272CC00B9; Thu, 7 Mar 2024 10:03:16 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 07 Mar 2024 10:03:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1709823795; x=1709830995; bh=KIk1du4pHCXSqXMFodBfcBDhm0Cr4cLrqXMscpRsEQg=; b= r0tuvbzYDU2G/VrHHuosGqT9d0Rw3cKHv6Dja3Jxrfr92jUcWA6aBzINFkHmqsc+ W0VPxtTJ8B0vC2EEnOjj10f95OpjzDadOL+ys33iJqrTg8dt6h6A0ioD1vUy9eMA rQDiBqRQkSnBZPzAryAgcIPLujfFbbQTaz+hhiYXup1yh83mGte/M+WqrDS75stp 2tn2S7bWM4dirwvRqVwurmSpM4mKZ4dA3+y3UwmilVoT8OJZAYdcOgKoABGNvuCQ DseDxJwnKVLzq1eXCX1Zfa1nGfeI+Bygh/lkjPFh+98io7m1+xeCFmZxMh1uq1gJ QEGpyLuNpu6sMRWsDUXowA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709823795; x= 1709830995; bh=KIk1du4pHCXSqXMFodBfcBDhm0Cr4cLrqXMscpRsEQg=; b=I MAiRVXx8U8UQHv+vZM3R4xLoWsqTcVM3UY8wf4FghptGdmRky7R7aKeDRrkxCmlU 6PHp7EG14pk2yboSB2QBFOlfKYC7DTi8Gj7hhiqnGmzXgANPCaSGRKEJwpQqQo+G LU5ovHcTsYMe40U3G3h6/XsSKGY9V3rhFgzfEc6G+5QW+c+K/QXyacm+LdwWffUS 5KwOiWwOSyWsjja1bb+V07UAuBGmHNSHvCmIlgAKOQ/oIk2V8o7FIkKBBjCB/NQ0 2e7ZOdnJ2lulDwQaf9JwqnKNK3OAkH9n6agTMm0DE+GI//rCz1e+A9cMc6rKX2uC QH9+Y3ks/2AkJoHdUqC7g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieefgdejudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id F1F00B6008D; Thu, 7 Mar 2024 10:03:13 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-251-g8332da0bf6-fm-20240305.001-g8332da0b Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: References: Date: Thu, 07 Mar 2024 16:02:22 +0100 From: "Arnd Bergmann" To: "Sam Protsenko" Cc: "Naresh Kamboju" , linux-block , lkft-triage@lists.linaro.org, "open list" , "Jens Axboe" , "Christoph Hellwig" , "Christian Brauner" , "Ulf Hansson" , "Dan Carpenter" , "Anders Roxell" , "jh80.chung" , "linux-mmc @ vger . kernel . org" , "Oleksij Rempel" , "Manuel Lauss" , "Neil Armstrong" , "Jerome Brunet" , yann.gautier@foss.st.com, ludovic.barre@st.com, =?UTF-8?Q?David_Lanzend=C3=B6rfer?= , "Chen-Yu Tsai" Subject: Re: WinLink E850-96: WARNING: at block/blk-settings.c:204 blk_validate_limits Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Mar 1, 2024, at 22:18, Sam Protsenko wrote: > On Fri, Mar 1, 2024 at 2:51=E2=80=AFPM Sam Protsenko wrote: >> On Thu, Feb 29, 2024 at 8:56=E2=80=AFAM Arnd Bergmann = wrote: > > Sorry, just noticed I commented on the wrong line. Here is the change = I made: > > - mmc->max_seg_size =3D 0x1000; > + mmc->max_seg_size =3D PAGE_SIZE; I went over all MMC drivers to see what else sets a max_seg_size smaller than a page and found these: drivers/mmc/host/alcor.c: mmc->max_seg_size =3D AU6601_MAX_DMA_BLO= CK_SIZE; // 0x1000 drivers/mmc/host/au1xmmc.c: mmc->max_seg_size =3D AU1100_MMC= _DESCRIPTOR_SIZE; // 64K-1 drivers/mmc/host/dw_mmc.c: mmc->max_seg_size =3D 0x1000; drivers/mmc/host/meson-gx-mmc.c: mmc->max_seg_size =3D mmc->max_r= eq_size; // 1536 bytes drivers/mmc/host/mmci_stm32_sdmmc.c: host->mmc->max_seg_size = =3D host->variant->stm32_idmabsize_mask; // GENMASK(12, 5), drivers/mmc/host/sunxi-mmc.c: mmc->max_seg_size =3D (1 << host->= cfg->idma_des_size_bits); // 1 << 13, only on arm32 drivers/mmc/host/wmt-sdmmc.c: .max_seg_size =3D 65024,=20 I've tried to add the maintainers to Cc here, these likely all need attention to work with large page sizes, in case of meson-gx-mmc it even seems like the limit is less than a 4KB page, so it will stop working entirely. There are also a couple of drivers that look like they have an off-by-one error and pass a segment size of one less than a power-off-two number, e.g.: drivers/mmc/host/davinci_mmc.c: mmc->max_seg_size =3D MAX_CCNT * r= w_threshold; // (64k-1) * 32 drivers/mmc/host/atmel-mci.c: mmc->max_seg_size =3D mmc->max_b= lk_size * mmc->max_segs; // 4095*256 I think some of these are intentional, while others are probably bugs. Arnd