summaryrefslogtreecommitdiffstats
path: root/sys/alpha/pci/cia_pci.c
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2000-12-01 15:27:48 +0000
committergallatin <gallatin@FreeBSD.org>2000-12-01 15:27:48 +0000
commitf3693740f3994723ae463b65c2ca1ba2bd1f063c (patch)
treeb64996992392b03927ef23bbc7f9eb5e698a61f2 /sys/alpha/pci/cia_pci.c
parent700fece2f363b189cbf2531a212f9895b1394808 (diff)
downloadFreeBSD-src-f3693740f3994723ae463b65c2ca1ba2bd1f063c.zip
FreeBSD-src-f3693740f3994723ae463b65c2ca1ba2bd1f063c.tar.gz
Convert the pcib_{read,write}_config args from signed to unsigned,
like the args to the config space accessors these functions replaced. This reduces the likelyhood of overflow when the args are used in macros on the alpha. This prevents memory management faults when probing the pci bus on sables, multias and nonames. Approved by: dfr Tested by: Bernd Walter <ticso@cicely8.cicely.de>
Diffstat (limited to 'sys/alpha/pci/cia_pci.c')
-rw-r--r--sys/alpha/pci/cia_pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/alpha/pci/cia_pci.c b/sys/alpha/pci/cia_pci.c
index 1ccb618..aa09f41 100644
--- a/sys/alpha/pci/cia_pci.c
+++ b/sys/alpha/pci/cia_pci.c
@@ -298,7 +298,7 @@ cia_check_abort(void)
} while (0)
static u_int32_t
-cia_pcib_swiz_read_config(int b, int s, int f, int reg, int width)
+cia_pcib_swiz_read_config(u_int b, u_int s, u_int f, u_int reg, int width)
{
switch (width) {
case 1:
@@ -314,7 +314,7 @@ cia_pcib_swiz_read_config(int b, int s, int f, int reg, int width)
}
static void
-cia_pcib_swiz_write_config(int b, int s, int f, int reg,
+cia_pcib_swiz_write_config(u_int b, u_int s, u_int f, u_int reg,
u_int32_t val, int width)
{
switch (width) {
@@ -330,7 +330,7 @@ cia_pcib_swiz_write_config(int b, int s, int f, int reg,
}
static u_int32_t
-cia_pcib_bwx_read_config(int b, int s, int f, int reg, int width)
+cia_pcib_bwx_read_config(u_int b, u_int s, u_int f, u_int reg, int width)
{
switch (width) {
case 1:
@@ -346,8 +346,8 @@ cia_pcib_bwx_read_config(int b, int s, int f, int reg, int width)
}
static void
-cia_pcib_bwx_write_config(int b, int s, int f, int reg,
- u_int32_t val, int width)
+cia_pcib_bwx_write_config(u_int b, u_int s, u_int f, u_int reg,
+ u_int32_t val, u_int width)
{
switch (width) {
case 1:
OpenPOWER on IntegriCloud