Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3547715pxj; Mon, 24 May 2021 09:07:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8IpmkLBaepK3/u205JUh7ZkD8qFUjSc70nqoFSFhvklnKnEcUxtFRlu2LShlxsXa8GydM X-Received: by 2002:a05:6e02:ce:: with SMTP id r14mr16281009ilq.27.1621872432502; Mon, 24 May 2021 09:07:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872432; cv=none; d=google.com; s=arc-20160816; b=yT7LLCr5zNnhn9R09MaKLHL28gInzY+ESdx62cW5SwXWPemXQpO8Zz3ptG+8wEthze XhI6mM8PzjhWeppb1pdVyn+MDCocEyx1pwXmLgkDIcYz43nJReS99I+gTfBK3Ub+Yh12 nPidR9LHbvXnXLH9tyxpCmIIhxraoTtulBcXTPkcjNKeOLe+N1bqUHGw8jKxagUvoueB cvUvpWI35FdPLNh4y8wRXr2/T0zPVe8KY19mL/SIkpv1RhxhE8hHBBVIx4p6yg7CJpxf Cl5HaG1cl532zLmBBFF2yAq48pfxK27qcQQ9J7h/yc1kK3t6VeZ3M1x7HuYSdLTNdfRW FGlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ikopjm0La4bQLyWnJ62Z7CYbRGExIdunyWDElvV88Ts=; b=WRmr9N+4nZGVJeGhVfFSiRqq7+hrO/PudLeNfzmApTjtTmrukyZCpSAU+5yFt4Ez1N VQ2nHNYIDArl7ibUiRySTKtqT+sXkcRbPlsWQ74OazNAjQpf9DmgRrMPV0ILG3YjK+7g xepdCkCzEDHVFOH7z6mngDKZHCEmqLGTRt6gGyFI5yQsVxy6/DzyqWnaV+hGsO0Z3s4v 5rV+CHCSyWYT1cdKnB8rttc7C9v2mZPpcUIADP0+B736Pdl5HMsG5JTPUv5QcdazEgXR gEkU5vDgKMHmesuCu9X4CN0iM6xubHS3FlHl/I3u4yBWkoWk30+qoKkwFFex3jtgkfSF dcxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cr4gKWld; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j3si14689393jak.80.2021.05.24.09.06.59; Mon, 24 May 2021 09:07:12 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cr4gKWld; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236131AbhEXQGW (ORCPT + 99 others); Mon, 24 May 2021 12:06:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:41116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235410AbhEXP7c (ORCPT ); Mon, 24 May 2021 11:59:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 57D7B61970; Mon, 24 May 2021 15:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621871126; bh=aRb4XaPNPNvtNBOkWN0o6Tw4BKet47X0970O94xh08A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cr4gKWldyAlcA/RJPud0S9My+jr8AT0r4xm8x0AjNs+gDquDT8eUCFAurJgrMg73Z L3cZndLu38Mru9Cr03LKNpG04HoBgGiB4PGrDZslcwssDU9Gb0VDlScRahasCFHQKI HZmRKi5eWW+DgI7rFGy6dXcCvk1cFG5mtagvBbKI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Hewitt , Neil Armstrong , Martin Blumenstingl , Ulf Hansson Subject: [PATCH 5.12 085/127] mmc: meson-gx: make replace WARN_ONCE with dev_warn_once about scatterlist offset alignment Date: Mon, 24 May 2021 17:26:42 +0200 Message-Id: <20210524152337.735569038@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152334.857620285@linuxfoundation.org> References: <20210524152334.857620285@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Neil Armstrong commit cabb1bb60e88ccaaa122ba01862403cd44e8e8f8 upstream. Some drivers like ath10k can sometimg give an sg buffer with an offset whose alignment is not compatible with the Amlogic DMA descriptor engine requirements. Simply replace with dev_warn_once() to inform user this should be fixed to avoid degraded performance. This should be ultimately fixed in ath10k, but since it's only a performance issue the warning should be removed. Fixes: 79ed05e329c3 ("mmc: meson-gx: add support for descriptor chain mode") Cc: stable@vger.kernel.org Reported-by: Christian Hewitt Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210426175559.3110575-1-narmstrong@baylibre.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/meson-gx-mmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -258,7 +258,9 @@ static void meson_mmc_get_transfer_mode( for_each_sg(data->sg, sg, data->sg_len, i) { /* check for 8 byte alignment */ if (sg->offset % 8) { - WARN_ONCE(1, "unaligned scatterlist buffer\n"); + dev_warn_once(mmc_dev(mmc), + "unaligned sg offset %u, disabling descriptor DMA for transfer\n", + sg->offset); return; } }