Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_intr.c
Show First 20 Lines • Show All 1,435 Lines • ▼ Show 20 Lines | intr_map_msi(device_t pci, device_t child, intptr_t xref, int irq, | ||||
pic = pic_lookup(NULL, xref, FLAG_MSI); | pic = pic_lookup(NULL, xref, FLAG_MSI); | ||||
if (pic == NULL) | if (pic == NULL) | ||||
return (ESRCH); | return (ESRCH); | ||||
KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, | KASSERT((pic->pic_flags & FLAG_TYPE_MASK) == FLAG_MSI, | ||||
("%s: Found a non-MSI controller: %s", __func__, | ("%s: Found a non-MSI controller: %s", __func__, | ||||
device_get_name(pic->pic_dev))); | device_get_name(pic->pic_dev))); | ||||
if (irq >= 0) { | |||||
isrc = intr_map_get_isrc(irq); | isrc = intr_map_get_isrc(irq); | ||||
if (isrc == NULL) | if (isrc == NULL) | ||||
return (EINVAL); | return (EINVAL); | ||||
} else | |||||
isrc = NULL; | |||||
err = MSI_MAP_MSI(pic->pic_dev, child, isrc, addr, data); | err = MSI_MAP_MSI(pic->pic_dev, child, isrc, addr, data); | ||||
return (err); | return (err); | ||||
} | } | ||||
void dosoftints(void); | void dosoftints(void); | ||||
void | void | ||||
dosoftints(void) | dosoftints(void) | ||||
▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines |