Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933331AbbLSQ5B (ORCPT ); Sat, 19 Dec 2015 11:57:01 -0500 Received: from mail-yk0-f170.google.com ([209.85.160.170]:34634 "EHLO mail-yk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932463AbbLSQ46 convert rfc822-to-8bit (ORCPT ); Sat, 19 Dec 2015 11:56:58 -0500 MIME-Version: 1.0 In-Reply-To: References: <1450221935-6034-1-git-send-email-mans@mansr.com> <5672F77F.4010306@candw.ms> <567302E8.5050303@candw.ms> <5673061A.4070700@candw.ms> <56732C04.9040100@candw.ms> <5673F277.2050607@candw.ms> <1450441395.30729.203.camel@linux.intel.com> <5674271B.9090308@candw.ms> <56745BA4.1090607@candw.ms> <56748D85.4060108@candw.ms> <567541EE.9010308@candw.ms> Date: Sat, 19 Dec 2015 18:56:57 +0200 Message-ID: Subject: Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel From: Andy Shevchenko To: =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= Cc: Julian Margetson , Andy Shevchenko , Tejun Heo , linux-ide@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1545 Lines: 44 On Sat, Dec 19, 2015 at 5:40 PM, Måns Rullgård wrote: > OK, I've found something. The dma setup errors are benign, caused by > the driver calling dmaengine_prep_slave_sg() even for non-dma > operations. I suppose the following is a quick fix to avoid preparing descriptor for non-DMA operations (not tested anyhow) a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -1041,6 +1041,9 @@ static void sata_dwc_qc_prep_by_tag(struct ata_queued_cmd *qc, u8 tag) __func__, ap->port_no, get_dma_dir_descript(qc->dma_dir), qc->n_elem); + if (!is_slave_direction(qc->dma_dir)) + return; + desc = dma_dwc_xfer_setup(qc); if (!desc) { dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns NULL\n", > The real error is the lock recursion that's reported > later. I wasn't seeing it since I was running a UP non-preempt kernel. > With lock debugging enabled, I get the same error. This patch should > fix it. > - spin_lock_irqsave(&ap->host->lock, flags); > hsdevp->cmd_issued[tag] = cmd_issued; > - spin_unlock_irqrestore(&ap->host->lock, flags); > + This will create a second empty line, though I don't care it is so minor. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/