Page MenuHomeFreeBSD

D17976.id50423.diff
No OneTemporary

D17976.id50423.diff

Index: head/sys/x86/x86/msi.c
===================================================================
--- head/sys/x86/x86/msi.c
+++ head/sys/x86/x86/msi.c
@@ -409,7 +409,7 @@
/* Do we need to create some new sources? */
if (cnt < count) {
/* If we would exceed the max, give up. */
- if (i + (count - cnt) >= first_msi_irq + NUM_MSI_INTS) {
+ if (i + (count - cnt) > first_msi_irq + NUM_MSI_INTS) {
mtx_unlock(&msi_lock);
free(mirqs, M_MSI);
return (ENXIO);
@@ -647,13 +647,14 @@
break;
}
+ /* Are all IRQs in use? */
+ if (i == first_msi_irq + NUM_MSI_INTS) {
+ mtx_unlock(&msi_lock);
+ return (ENXIO);
+ }
+
/* Do we need to create a new source? */
if (msi == NULL) {
- /* If we would exceed the max, give up. */
- if (i + 1 >= first_msi_irq + NUM_MSI_INTS) {
- mtx_unlock(&msi_lock);
- return (ENXIO);
- }
mtx_unlock(&msi_lock);
/* Create a new source. */

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 9, 9:12 PM (54 m, 42 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38612154
Default Alt Text
D17976.id50423.diff (906 B)

Event Timeline