Skip to contentSkip to conversation

aacraid: add an iounmap call to aac_src_ioremap

PATCH In review Tomas Henzl 2 participants 2 messages Mar 29, 2012 – Apr 13, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aacraid: add an iounmap call to aac_src_ioremap

The patch 116046127d1a3bad2853d02781ad9fee33f05e5a [SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllers removed an iounmap call from aac_src_ioremap. Before that, the iounmap has been called twice with the same value (dev->base and dev->regs.src.bar0) and the iounmap complained about it (iounmap: bad address ...).

The proper solution is a change the paremeter from bar0 to bar1. Fix this by adding a an iounmap(dev->regs.src.bar1) call.

drivers/scsi/aacraid/src.c +2 -0
index 2bee515..7628206 100644
@@ -424,6 +424,8 @@ static int aac_src_deliver_message(struct fib *fib)
 static int aac_src_ioremap(struct aac_dev *dev, u32 size)
 {
 	if (!size) {
+		iounmap(dev->regs.src.bar1);
+		dev->regs.src.bar1 = NULL;
 		iounmap(dev->regs.src.bar0);
 		dev->base = dev->regs.src.bar0 = NULL;
 		return 0;
Acked-by on v1 1/1
#1 lore raw

Thanks,
Achim

-----Original Message-----
From: Tomas Henzl [mailto:[email protected]]
Sent: Donnerstag, 29. März 2012 17:24
To: '[email protected]'
Cc: Achim Leubner; Mahesh Rajashekhara; [email protected]
Subject: [PATCH] aacraid: add an iounmap call to aac_src_ioremap

The patch 116046127d1a3bad2853d02781ad9fee33f05e5a [SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllers removed an iounmap call from aac_src_ioremap. Before that, the iounmap has been called twice with the same value (dev->base and dev->regs.src.bar0) and the iounmap complained about it (iounmap: bad address ...).

The proper solution is a change the paremeter from bar0 to bar1. Fix this by adding a an iounmap(dev->regs.src.bar1) call.

drivers/scsi/aacraid/src.c +2 -0
index 2bee515..7628206 100644
@@ -424,6 +424,8 @@ static int aac_src_deliver_message(struct fib *fib)
 static int aac_src_ioremap(struct aac_dev *dev, u32 size)
 {
 	if (!size) {
+		iounmap(dev->regs.src.bar1);
+		dev->regs.src.bar1 = NULL;
 		iounmap(dev->regs.src.bar0);
 		dev->base = dev->regs.src.bar0 = NULL;
 		return 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html