]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/ata/sata_dwc_460ex.c
ata: sata_dwc_460ex: skip dma setup for non-dma commands
authorMans Rullgard <mans@mansr.com>
Tue, 26 Apr 2016 09:03:08 +0000 (12:03 +0300)
committerTejun Heo <tj@kernel.org>
Tue, 10 May 2016 16:29:18 +0000 (12:29 -0400)
commitae4c3485fa861af51336e066e1ba42b92af03627
tree4b060815783d2c9d9a4492cf2413c9cd9304738a
parente1c1bee34f077baf88f78b24d08c0ba1ba506abd
ata: sata_dwc_460ex: skip dma setup for non-dma commands

Calling dmaengine_prep_slave_sg() for non-dma ATA commands is
unnecessary at best and could be harmful if the dma driver reacts
badly to this.  It also causes this driver to print a bogus error
message in these cases.

This patch changes sata_dwc_qc_issue() to only do the dma setup
for dma commands and also reports an error to libata if if fails.

Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/sata_dwc_460ex.c