From: Jesse Barnes <jbarnes@sgi.com>
To: Linux Kernel list <linux-kernel@vger.kernel.org>, jonsmirl@gmail.com
Subject: pci_map_rom bug?
Date: Wed, 16 Feb 2005 16:00:47 -0800 [thread overview]
Message-ID: <200502161600.48252.jbarnes@sgi.com> (raw)
Jon, it looks like the loop at the bottom of pci_map_rom is busted?
do {
void __iomem *pds;
/* Standard PCI ROMs start out with these bytes 55 AA */
if (readb(image) != 0x55)
break;
if (readb(image + 1) != 0xAA)
break;
/* get the PCI data structure and check its signature */
pds = image + readw(image + 24);
if (readb(pds) != 'P')
break;
if (readb(pds + 1) != 'C')
break;
if (readb(pds + 2) != 'I')
break;
if (readb(pds + 3) != 'R')
break;
last_image = readb(pds + 21) & 0x80;
/* this length is reliable */
image += readw(pds + 16) * 512;
} while (!last_image);
It looks like it's trying to verify all the ROMs on a given PCI device rather
than just the one we just ioremap'd above. Should this check just be inline
and the loop deleted? In that case, all of the breaks would turn into return
NULLs (though the code should probably be refactored to make that a little
clearer) along with an iounmap?
Thanks,
Jesse
next reply other threads:[~2005-02-17 0:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-17 0:00 Jesse Barnes [this message]
2005-02-17 16:29 ` pci_map_rom bug? Jon Smirl
2005-02-17 17:14 ` Jesse Barnes
2005-02-17 17:32 ` Jon Smirl
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=200502161600.48252.jbarnes@sgi.com \
--to=jbarnes@sgi.com \
--cc=jonsmirl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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