From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88B34C433E2 for ; Sat, 16 May 2020 14:06:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74A2F20735 for ; Sat, 16 May 2020 14:06:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726521AbgEPOGe (ORCPT ); Sat, 16 May 2020 10:06:34 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:40236 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbgEPOGd (ORCPT ); Sat, 16 May 2020 10:06:33 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id B8B9C8030809; Sat, 16 May 2020 14:06:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kzvn8ktOIz_p; Sat, 16 May 2020 17:06:28 +0300 (MSK) Date: Sat, 16 May 2020 17:06:27 +0300 From: Serge Semin To: Andy Shevchenko CC: Serge Semin , Mark Brown , Georgy Vlasov , Ramil Zaripov , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Allison Randal , Gareth Williams , Rob Herring , , , Jarkko Nikula , Thomas Gleixner , Wan Ahmad Zainie , , Subject: Re: [PATCH v2 05/19] spi: dw: Enable interrupts in accordance with DMA xfer mode Message-ID: <20200516140627.zwigqoz335lhkxns@mobilestation> References: <20200508132943.9826-1-Sergey.Semin@baikalelectronics.ru> <20200515104758.6934-1-Sergey.Semin@baikalelectronics.ru> <20200515104758.6934-6-Sergey.Semin@baikalelectronics.ru> <20200515122700.GY185537@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200515122700.GY185537@smile.fi.intel.com> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 03:27:00PM +0300, Andy Shevchenko wrote: > On Fri, May 15, 2020 at 01:47:44PM +0300, Serge Semin wrote: > > It's pointless to track the Tx overrun interrupts if Rx-only SPI > > transfer is issued. Similarly there is no need in handling the Rx > > overrun/underrun interrupts if Tx-only SPI transfer is executed. > > So lets unmask the interrupts only if corresponding SPI > > transactions are implied. > > My comments below. > > > Co-developed-by: Georgy Vlasov > > Signed-off-by: Georgy Vlasov > > Signed-off-by: Serge Semin > > Cc: Ramil Zaripov > > Cc: Alexey Malahov > > Cc: Thomas Bogendoerfer > > Cc: Paul Burton > > Cc: Ralf Baechle > > Cc: Arnd Bergmann > > Cc: Allison Randal > > Cc: Andy Shevchenko > > Cc: Gareth Williams > > Cc: Rob Herring > > Cc: linux-mips@vger.kernel.org > > Cc: devicetree@vger.kernel.org > > I think you really need to revisit Cc list in all patches (DT people hardly > interested in this one, though ones where properties are being used might be > point of interest). > > ... > > > /* Set the interrupt mask */ > > - spi_umask_intr(dws, SPI_INT_TXOI | SPI_INT_RXUI | SPI_INT_RXOI); > > + spi_umask_intr(dws, imr); > > Can we rather do like this > > /* Set the interrupt mask */ > if (xfer->tx_buf) > imr |= SPI_INT_TXOI; > if (xfer->rx_buf) > imr |= SPI_INT_RXUI | SPI_INT_RXOI; > spi_umask_intr(dws, imr); > > ? > > (First block sets DMA, second one IRQ) I'd rather leave it as is. -Sergey > > -- > With Best Regards, > Andy Shevchenko > >