From patchwork Thu Mar 17 11:19:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Gautier X-Patchwork-Id: 12783898 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B7F9C433EF for ; Thu, 17 Mar 2022 11:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=eVdk+FRbTrpalVvCAfa6X3eDaSoO5p2ELMD7ryLXnZ0=; b=tlSqGc3xs0tnIB 8HkPNoQRhiRXoKa89Dd1O5c6zHmc50upJTSKtvXSieVrbCXnWOReE/aWseEH015+QAVINhJ4AtiYE ljcbjWhF7JI52oDItd49Md7wLEhtHOZM/qYNpeLxAJf1hjoCAl/y2afGYDBlM5ZB4iE9mLlBmE1rQ qlqhcHD14Z+tavcpZyak+lEXIyIo6XXWcKFEQAoZ1zTfk6kmwFJGcsux/L0wSE92clbWiWz650jZy Q5RSwg9Vw8XQEe/uLvWnSl1pzvu7IMlcWt4tVPdSXzkxA84N44Bov9oIFypUFeTB3aBP59sTOgf+d cUU6aWwlnD/eWMa84vdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUoAg-00Fo8M-UE; Thu, 17 Mar 2022 11:19:59 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUoAc-00Fo74-LI for linux-arm-kernel@lists.infradead.org; Thu, 17 Mar 2022 11:19:56 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22H8N5g4001889; Thu, 17 Mar 2022 12:19:51 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=selector1; bh=8BsR+v0AbEC0TwAw4dn0LePtwjxQWbrnUyIKeBq/B8g=; b=b+Vhuf+CIguDYlpbzIvSQ1h4/T1VWrwTDSt8/TraPpLcbbMI5ZgEgMvgewR8Cd1+Mu03 bXdAHza+3Iky0ajocwRuYIJAFDrIZQVMPE7TLb/gsemEuaSxVSQlo1E5Wfx2+hsEOk8G oTgw8/4hZ578r/g671pOq9/nicWrawnLr16+N89rvht6+vfToxTNXaV/cWF6t75t389Z Zi1aQagscLBdJePTedREgC7un67mlK3oQfuuSW1ZT+DGKWF9pohq9JsB2FcNsGt8I80i 8GIf6cx1qrrjtr0koN8hHja2rlCRiN4K+vIZ41RW0c5OK6lpjRlVLPOd4zqoUQR73xD8 dw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3ethxu9cfn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 12:19:51 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A4EE310002A; Thu, 17 Mar 2022 12:19:50 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 9D0B2217B69; Thu, 17 Mar 2022 12:19:50 +0100 (CET) Received: from localhost (10.75.127.44) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Thu, 17 Mar 2022 12:19:50 +0100 From: Yann Gautier To: Ulf Hansson CC: Christophe Kerello , Ludovic Barre , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , Linus Walleij , , , , , Yann Gautier Subject: [PATCH 0/2] mmc: mmci: stm32: manage unaligned DMA req for SDIO Date: Thu, 17 Mar 2022 12:19:42 +0100 Message-ID: <20220317111944.116148-1-yann.gautier@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-17_04,2022-03-15_01,2022-02-23_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220317_041955_537055_19C80012 X-CRM114-Status: GOOD ( 12.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The first patch corrects an issue when parsing the sg list to check DMA constraints. The second patch manages those DMA alignment by copying from or to a bounce buffer, the way it is done in meson-gx-mmc. Yann Gautier (2): mmc: mmci: stm32: correctly check all elements of sg list mmc: mmci: stm32: use a buffer for unaligned DMA requests drivers/mmc/host/mmci_stm32_sdmmc.c | 86 ++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 20 deletions(-)