Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754774Ab1FCO5d (ORCPT ); Fri, 3 Jun 2011 10:57:33 -0400 Received: from g1t0027.austin.hp.com ([15.216.28.34]:20484 "EHLO g1t0027.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754696Ab1FCO5a (ORCPT ); Fri, 3 Jun 2011 10:57:30 -0400 Subject: [PATCH 1/2] hpsa: fix dma unmap error in hpsa_passthru_ioctl To: james.bottomley@hansenpartnership.com From: "Stephen M. Cameron" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, smcameron@yahoo.com, thenzl@redhat.com, akpm@linux-foundation.org, mikem@beardog.cce.hp.com Date: Fri, 03 Jun 2011 09:57:29 -0500 Message-ID: <20110603145729.17254.19665.stgit@beardog.cce.hp.com> In-Reply-To: <20110603145639.17254.54228.stgit@beardog.cce.hp.com> References: <20110603145639.17254.54228.stgit@beardog.cce.hp.com> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 991 Lines: 27 From: Stephen M. Cameron Signed-off-by: Stephen M. Cameron --- drivers/scsi/hpsa.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index c6c0434..a75122d 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2580,7 +2580,8 @@ static int hpsa_passthru_ioctl(struct ctlr_info *h, void __user *argp) c->SG[0].Ext = 0; /* we are not chaining*/ } hpsa_scsi_do_simple_cmd_core(h, c); - hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL); + if (iocommand.buf_size > 0) + hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL); check_ioctl_unit_attention(h, c); /* Copy the error information out */ -- 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/