MFC r274249, r274484, r275583:
Avoid panic in ofwbus caused by not released resource list entry Fix typo in ARM GIC device_printf() Fix buffer overflow in Marvell PCI/PCIe driver
This commit is contained in:
parent
0c377e52af
commit
a17d85346e
@ -273,7 +273,7 @@ arm_gic_attach(device_t dev)
|
||||
arm_config_irq = gic_config_irq;
|
||||
|
||||
icciidr = gic_c_read_4(GICC_IIDR);
|
||||
device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x sc->nirqs %u\n",
|
||||
device_printf(dev,"pn 0x%x, arch 0x%x, rev 0x%x, implementer 0x%x irqs %u\n",
|
||||
icciidr>>20, (icciidr>>16) & 0xF, (icciidr>>12) & 0xf,
|
||||
(icciidr & 0xfff), sc->nirqs);
|
||||
|
||||
|
@ -1171,7 +1171,7 @@ mv_pcib_alloc_msi(device_t dev, device_t child, int count,
|
||||
|
||||
for (i = start; i < start + count; i++) {
|
||||
setbit(&sc->sc_msi_bitmap, i);
|
||||
irqs[i] = MSI_IRQ + i;
|
||||
*irqs++ = MSI_IRQ + i;
|
||||
}
|
||||
debugf("%s: start: %x count: %x\n", __func__, start, count);
|
||||
|
||||
|
@ -399,11 +399,17 @@ ofwbus_adjust_resource(device_t bus, device_t child __unused, int type,
|
||||
}
|
||||
|
||||
static int
|
||||
ofwbus_release_resource(device_t bus __unused, device_t child, int type,
|
||||
ofwbus_release_resource(device_t bus, device_t child, int type,
|
||||
int rid, struct resource *r)
|
||||
{
|
||||
struct resource_list_entry *rle;
|
||||
int error;
|
||||
|
||||
/* Clean resource list entry */
|
||||
rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), type, rid);
|
||||
if (rle != NULL)
|
||||
rle->res = NULL;
|
||||
|
||||
if ((rman_get_flags(r) & RF_ACTIVE) != 0) {
|
||||
error = bus_deactivate_resource(child, type, rid, r);
|
||||
if (error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user