From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752154AbcFNJjE (ORCPT ); Tue, 14 Jun 2016 05:39:04 -0400 Received: from mga11.intel.com ([192.55.52.93]:39128 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750AbcFNJjA (ORCPT ); Tue, 14 Jun 2016 05:39:00 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,470,1459839600"; d="scan'208";a="718764049" Message-ID: <1465897220.30123.26.camel@linux.intel.com> Subject: Re: [RFC RESEND] serial: 8250: fix regression in 8250 uart driver From: Andy Shevchenko To: Dinh Nguyen Cc: heikki.krogerus@linux.intel.com, peter@hurleysoftware.com, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Date: Tue, 14 Jun 2016 12:40:20 +0300 In-Reply-To: <575F7325.3030907@kernel.org> References: <575F7325.3030907@kernel.org> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-06-13 at 21:59 -0500, Dinh Nguyen wrote: > Apologies, but my original email bounced for Andy and Heikki, > resending. > ---- I suppose this one, i.e. commit dd4e91d538b3 ("dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC"), solves the issue. > > Hi Andy, > > I saw that you have discovered that commit ec5a11a91eec ("serial: > 8250: > Validate dmaengine rx chan meets requirements") introduced a > regression > in the 8250 uart driver. For SoCFPGA platform, I am seeing this error: > > [    5.541751] ttyS0 - failed to request DMA > > Reverting the commit ec5a11a91eec removes the error. > > I saw that you started the discussion, but I didn't see that a patch > was > included[1]. > > The following patch seems to fix the error, but I'm not sure if it's > the > same fix that you had in mind. > > Thanks, > Dinh > > [1] http://marc.info/?l=linux-serial&m=146254187602862&w=2 > > ---------------8<------------ > diff --git a/drivers/tty/serial/8250/8250_dma.c > b/drivers/tty/serial/8250/8250_dma.c > index 7f33d1c..847a203 100644 > --- a/drivers/tty/serial/8250/8250_dma.c > +++ b/drivers/tty/serial/8250/8250_dma.c > @@ -176,7 +176,7 @@ int serial8250_request_dma(struct uart_8250_port > *p) >         ret = dma_get_slave_caps(dma->rxchan, &caps); >         if (ret) >                 goto release_rx; > -       if (!caps.cmd_pause || !caps.cmd_terminate || > +       if ((!caps.cmd_pause || !caps.cmd_terminate) && >             caps.residue_granularity == > DMA_RESIDUE_GRANULARITY_DESCRIPTOR) { >                 ret = -EINVAL; >                 goto release_rx; -- Andy Shevchenko Intel Finland Oy