From: Adam Kropelin <akropel1@rochester.rr.com>
To: kristen.c.accardi@intel.com
Cc: pcihpd-discuss@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH] shpchp: Use dword accessors for PCI_ROM_ADDRESS
Date: Tue, 13 Sep 2005 19:17:58 -0400 [thread overview]
Message-ID: <20050913191758.D10911@mail.kroptech.com> (raw)
In-Reply-To: <20050913182550.A10911@mail.kroptech.com>
PCI_ROM_ADDRESS is a 32 bit register and as such should be accessed
using pci_bus_{read,write}_config_dword(). A recent audit of drivers/
turned up several cases of byte- and word-sized accesses. The harmful
ones were fixed by Linus directly. This patches up one of the remaining
harmless-but-still-wrong cases caught in the dragnet.
Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>
--- linux-2.6.14-rc1.orig/drivers/pci/hotplug/shpchp_ctrl.c 2005-08-29 09:04:07.000000000 -0400
+++ linux-2.6.14-rc1/drivers/pci/hotplug/shpchp_ctrl.c 2005-09-13 11:50:34.000000000 -0400
@@ -2824,8 +2824,7 @@
}
#endif
/* Disable ROM base Address */
- temp_word = 0x00L;
- rc = pci_bus_write_config_word (pci_bus, devfn, PCI_ROM_ADDRESS, temp_word);
+ rc = pci_bus_write_config_dword (pci_bus, devfn, PCI_ROM_ADDRESS, 0x00);
/* Set HP parameters (Cache Line Size, Latency Timer) */
rc = shpchprm_set_hpp(ctrl, func, PCI_HEADER_TYPE_NORMAL);
next prev parent reply other threads:[~2005-09-13 22:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-12 23:59 2.6.13.1 locks machine after some time, 2.6.12.5 work fine Norbert Kiesel
2005-09-13 3:00 ` Linus Torvalds
2005-09-13 3:38 ` Norbert Kiesel
2005-09-13 14:25 ` Linus Torvalds
2005-09-13 14:57 ` Linus Torvalds
2005-09-13 16:02 ` Adam Kropelin
2005-09-13 15:55 ` Linus Torvalds
2005-09-13 20:22 ` David S. Miller
2005-09-13 22:25 ` Adam Kropelin
2005-09-13 23:11 ` [PATCH] ibmphp: Use dword accessors for PCI_ROM_ADDRESS Adam Kropelin
2005-09-13 23:15 ` [PATCH] pciehp: " Adam Kropelin
2005-09-13 23:17 ` Adam Kropelin [this message]
2005-09-13 23:20 ` [PATCH] qla2xxx: " Adam Kropelin
2005-09-13 16:27 ` 2.6.13.1 locks machine after some time, 2.6.12.5 work fine Norbert Kiesel
2005-09-13 17:09 ` Norbert Kiesel
2005-09-13 17:23 ` Linus Torvalds
2005-09-13 21:23 ` Norbert Kiesel
2005-09-13 22:24 ` Chris Wright
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=20050913191758.D10911@mail.kroptech.com \
--to=akropel1@rochester.rr.com \
--cc=kristen.c.accardi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcihpd-discuss@lists.sourceforge.net \
/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