Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp620557lqi; Thu, 7 Mar 2024 07:04:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVtD6wjDz6Br4OELFKg+2SAR1C4g0U3kMQMR410Llwnvrc0J4rQp5vvB8BPMFSlQMlQOEnSDfOSqLd5wgLGOe1S6IBzfc9fj50uXfpn1A== X-Google-Smtp-Source: AGHT+IFLt3uG43bDz4XeEINe1GG9pBBFUmx7De4LqYNIhDch3/OOjuAzS0lDkGthrrZ4QVG2LJ+n X-Received: by 2002:aca:1718:0:b0:3c1:c8be:7678 with SMTP id j24-20020aca1718000000b003c1c8be7678mr8235235oii.18.1709823874039; Thu, 07 Mar 2024 07:04:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709823874; cv=pass; d=google.com; s=arc-20160816; b=XFvnANaW23c4ALaBDrVy770v7qEkez8jQ5o2LkgAcP24PskzcdHYO+17XEw1TCP7wF bQv1OkoONZZMejdu3zMR/1+FNvWGBlBWyek+fZPj5nO+RoHPvOaWu/2RD4oibtV3OpLt tDcc2W2xOfMAxz+E3Vm2u3YUJmlp1PKqSkvTGpnMRZvKyNx02KV8mgOjk65oYIQYC58u slrbQsvcp7PxcJ6Y91MXAg2HQqaxSBoH3gN8LHRse5ckd0CiMKCkIkmaw05IZT2HwDeB v/P2kOZfjoD2WYM9m7IwNJqMfmM/v2yYuA+yWVn+uz3oecOgZbqHdhmjmuy1pVp5tt6T JTCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=KIk1du4pHCXSqXMFodBfcBDhm0Cr4cLrqXMscpRsEQg=; fh=O49BYXCQawrplrO39lU52JdiVDCGjuDXxrPVahCsJiY=; b=XV+CzWwEhMCCK489rCSlZ4LvDHFY2mFU4JpIi5RI4xyAZuEny01mAx7A4uqp3qS9Tg LQqTO0m0sVVYs6alq/niJZRZKqCLBfQkc85z98DCMnLulRPhytnCWijV8ZuzKfDg9476 0025C3TxQRe+6D35cmtLxEmzgTnnkk24oULvMddU7ajuKUoss/yjFTd/iDYPgGGECVSL tkDVtrUSKJaUK3Hym9QnkoTdUMf84T46CIQqMgRQehEOu+rQrVrtTMwkaH9kGpoU0MHQ zTvO5C+OFGqFMC8JswmHCqw9GrwDkBJIE4UAPsiXjfnKGUk76m21+ZHIUK0N0jWpeIpj 7Odw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=r0tuvbzY; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=IMAiRVXx; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-95794-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k11-20020ab0538b000000b007da5e82f854si2521285uaa.54.2024.03.07.07.04.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 07:04:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95794-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=r0tuvbzY; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=IMAiRVXx; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-95794-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AA8381C24B5F for ; Thu, 7 Mar 2024 15:04:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20FF612EBC8; Thu, 7 Mar 2024 15:03:22 +0000 (UTC) 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 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 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-kernel@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