Don't pass u_int32_t pointers to BUS_READ_IVAR since it tends to make
alphas panic.
This commit is contained in:
parent
54ac5b9b76
commit
7e864cbf08
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55092
@ -1082,7 +1082,7 @@ static int
|
||||
sbsbc_probe(device_t dev)
|
||||
{
|
||||
char buf[64];
|
||||
u_int32_t func, ver, r, f;
|
||||
uintptr_t func, ver, r, f;
|
||||
|
||||
/* The parent device has already been probed. */
|
||||
r = BUS_READ_IVAR(device_get_parent(dev), dev, 0, &func);
|
||||
@ -1092,7 +1092,7 @@ sbsbc_probe(device_t dev)
|
||||
r = BUS_READ_IVAR(device_get_parent(dev), dev, 1, &ver);
|
||||
f = (ver & 0xffff0000) >> 16;
|
||||
ver &= 0x0000ffff;
|
||||
snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", ver >> 8, ver & 0xff,
|
||||
snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", (int) ver >> 8, (int) ver & 0xff,
|
||||
(f & BD_F_ESS)? " (ESS mode)" : "",
|
||||
(f & BD_F_SB16X)? " (ViBRA16X)" : "");
|
||||
device_set_desc_copy(dev, buf);
|
||||
@ -1104,7 +1104,7 @@ static int
|
||||
sbsbc_attach(device_t dev)
|
||||
{
|
||||
struct sb_info *sb;
|
||||
u_int32_t ver;
|
||||
uintptr_t ver;
|
||||
|
||||
sb = (struct sb_info *)malloc(sizeof *sb, M_DEVBUF, M_NOWAIT);
|
||||
if (!sb) return ENXIO;
|
||||
|
@ -1082,7 +1082,7 @@ static int
|
||||
sbsbc_probe(device_t dev)
|
||||
{
|
||||
char buf[64];
|
||||
u_int32_t func, ver, r, f;
|
||||
uintptr_t func, ver, r, f;
|
||||
|
||||
/* The parent device has already been probed. */
|
||||
r = BUS_READ_IVAR(device_get_parent(dev), dev, 0, &func);
|
||||
@ -1092,7 +1092,7 @@ sbsbc_probe(device_t dev)
|
||||
r = BUS_READ_IVAR(device_get_parent(dev), dev, 1, &ver);
|
||||
f = (ver & 0xffff0000) >> 16;
|
||||
ver &= 0x0000ffff;
|
||||
snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", ver >> 8, ver & 0xff,
|
||||
snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", (int) ver >> 8, (int) ver & 0xff,
|
||||
(f & BD_F_ESS)? " (ESS mode)" : "",
|
||||
(f & BD_F_SB16X)? " (ViBRA16X)" : "");
|
||||
device_set_desc_copy(dev, buf);
|
||||
@ -1104,7 +1104,7 @@ static int
|
||||
sbsbc_attach(device_t dev)
|
||||
{
|
||||
struct sb_info *sb;
|
||||
u_int32_t ver;
|
||||
uintptr_t ver;
|
||||
|
||||
sb = (struct sb_info *)malloc(sizeof *sb, M_DEVBUF, M_NOWAIT);
|
||||
if (!sb) return ENXIO;
|
||||
|
@ -1082,7 +1082,7 @@ static int
|
||||
sbsbc_probe(device_t dev)
|
||||
{
|
||||
char buf[64];
|
||||
u_int32_t func, ver, r, f;
|
||||
uintptr_t func, ver, r, f;
|
||||
|
||||
/* The parent device has already been probed. */
|
||||
r = BUS_READ_IVAR(device_get_parent(dev), dev, 0, &func);
|
||||
@ -1092,7 +1092,7 @@ sbsbc_probe(device_t dev)
|
||||
r = BUS_READ_IVAR(device_get_parent(dev), dev, 1, &ver);
|
||||
f = (ver & 0xffff0000) >> 16;
|
||||
ver &= 0x0000ffff;
|
||||
snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", ver >> 8, ver & 0xff,
|
||||
snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", (int) ver >> 8, (int) ver & 0xff,
|
||||
(f & BD_F_ESS)? " (ESS mode)" : "",
|
||||
(f & BD_F_SB16X)? " (ViBRA16X)" : "");
|
||||
device_set_desc_copy(dev, buf);
|
||||
@ -1104,7 +1104,7 @@ static int
|
||||
sbsbc_attach(device_t dev)
|
||||
{
|
||||
struct sb_info *sb;
|
||||
u_int32_t ver;
|
||||
uintptr_t ver;
|
||||
|
||||
sb = (struct sb_info *)malloc(sizeof *sb, M_DEVBUF, M_NOWAIT);
|
||||
if (!sb) return ENXIO;
|
||||
|
Loading…
Reference in New Issue
Block a user