aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorStephen M. Cameron <StephenM.Cameron>2011-01-06 15:47:53 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-01-24 12:29:05 -0500
commitd896f3f3d129f1e2fbb4e3824242bc0dc2fb1a07 (patch)
tree19b215837e8eceaed5e4b6c6b934608b05f7849d /drivers/scsi
parentb03a7771c81a0d5f026250c8cd4091d9ee767fdc (diff)
[SCSI] hpsa: fixup DMA address before freeing.
Some low bits might have been set by the driver, causing a message like this to come out: [ 13.288062] ------------[ cut here ]------------ [ 13.293211] WARNING: at lib/dma-debug.c:803 check_unmap+0x1a1/0x654() [ 13.300387] Hardware name: ProLiant DL180 G6 [ 13.305335] hpsa 0000:06:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000007f81e001] [size=640 bytes] Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/hpsa.c2
-rw-r--r--drivers/scsi/hpsa_cmd.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index e4b5f3cda82e..e2089a3b5061 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2267,7 +2267,7 @@ static void cmd_special_free(struct ctlr_info *h, struct CommandList *c)
2267 pci_free_consistent(h->pdev, sizeof(*c->err_info), 2267 pci_free_consistent(h->pdev, sizeof(*c->err_info),
2268 c->err_info, (dma_addr_t) temp64.val); 2268 c->err_info, (dma_addr_t) temp64.val);
2269 pci_free_consistent(h->pdev, sizeof(*c), 2269 pci_free_consistent(h->pdev, sizeof(*c),
2270 c, (dma_addr_t) c->busaddr); 2270 c, (dma_addr_t) (c->busaddr & DIRECT_LOOKUP_MASK));
2271} 2271}
2272 2272
2273#ifdef CONFIG_COMPAT 2273#ifdef CONFIG_COMPAT
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h
index f5c4c3cc0530..7910c1411156 100644
--- a/drivers/scsi/hpsa_cmd.h
+++ b/drivers/scsi/hpsa_cmd.h
@@ -265,6 +265,7 @@ struct ErrorInfo {
265 265
266#define DIRECT_LOOKUP_SHIFT 5 266#define DIRECT_LOOKUP_SHIFT 5
267#define DIRECT_LOOKUP_BIT 0x10 267#define DIRECT_LOOKUP_BIT 0x10
268#define DIRECT_LOOKUP_MASK (~((1 << DIRECT_LOOKUP_SHIFT) - 1))
268 269
269#define HPSA_ERROR_BIT 0x02 270#define HPSA_ERROR_BIT 0x02
270struct ctlr_info; /* defined in hpsa.h */ 271struct ctlr_info; /* defined in hpsa.h */