From: David Daney <ddaney.cavm@gmail.com>
To: Jack Wang <jinpu.wang@profitbricks.com>,
lindar_liu@usish.com,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
pmchba@pmcs.com, linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
Subject: [PATCH] pm80xx: Remove bogus address masking in pm8001_ioremap()
Date: Wed, 13 Apr 2016 14:26:56 -0700 [thread overview]
Message-ID: <1460582816-12703-1-git-send-email-ddaney.cavm@gmail.com> (raw)
From: David Daney <david.daney@cavium.com>
It is unclear what the original intent of the masking was, but it is
clearly incorrect to truncate a physical address before calling
ioremap(). On systems where there are valid physical address bits
above bit-31 (arm64 for example) the result is an eventual OOPs when
initializing the driver.
Remove the bogus code to fix it.
Signed-off-by: David Daney <david.daney@cavium.com>
---
drivers/scsi/pm8001/pm8001_init.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 062ab34..6bd7bf4 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -418,8 +418,6 @@ static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha)
if (pci_resource_flags(pdev, bar) & IORESOURCE_MEM) {
pm8001_ha->io_mem[logicalBar].membase =
pci_resource_start(pdev, bar);
- pm8001_ha->io_mem[logicalBar].membase &=
- (u32)PCI_BASE_ADDRESS_MEM_MASK;
pm8001_ha->io_mem[logicalBar].memsize =
pci_resource_len(pdev, bar);
pm8001_ha->io_mem[logicalBar].memvirtaddr =
--
1.8.3.1
next reply other threads:[~2016-04-13 21:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 21:26 David Daney [this message]
2016-04-14 12:22 ` [PATCH] pm80xx: Remove bogus address masking in pm8001_ioremap() Jinpu Wang
2016-04-15 2:38 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460582816-12703-1-git-send-email-ddaney.cavm@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=david.daney@cavium.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=jinpu.wang@profitbricks.com \
--cc=lindar_liu@usish.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=pmchba@pmcs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).