Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136053575
D6507.id16727.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6507.id16727.diff
View Options
Index: head/sys/dev/sfxge/common/ef10_ev.c
===================================================================
--- head/sys/dev/sfxge/common/ef10_ev.c
+++ head/sys/dev/sfxge/common/ef10_ev.c
@@ -275,6 +275,11 @@
/* Set up the event queue */
irq = index; /* INIT_EVQ expects function-relative vector number */
+
+ /*
+ * Interrupts may be raised for events immediately after the queue is
+ * created. See bug58606.
+ */
if ((rc = efx_mcdi_init_evq(enp, index, esmp, n, irq)) != 0)
goto fail3;
Index: head/sys/dev/sfxge/common/efx_ev.c
===================================================================
--- head/sys/dev/sfxge/common/efx_ev.c
+++ head/sys/dev/sfxge/common/efx_ev.c
@@ -251,16 +251,27 @@
eep->ee_mask = n - 1;
eep->ee_esmp = esmp;
- if ((rc = eevop->eevo_qcreate(enp, index, esmp, n, id, eep)) != 0)
- goto fail2;
-
+ /*
+ * Set outputs before the queue is created because interrupts may be
+ * raised for events immediately after the queue is created, before the
+ * function call below returns. See bug58606.
+ *
+ * The eepp pointer passed in by the client must therefore point to data
+ * shared with the client's event processing context.
+ */
enp->en_ev_qcount++;
*eepp = eep;
+ if ((rc = eevop->eevo_qcreate(enp, index, esmp, n, id, eep)) != 0)
+ goto fail2;
+
return (0);
fail2:
EFSYS_PROBE(fail2);
+
+ *eepp = NULL;
+ enp->en_ev_qcount--;
EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_evq_t), eep);
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 16, 10:30 AM (15 h, 11 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25364679
Default Alt Text
D6507.id16727.diff (1 KB)
Attached To
Mode
D6507: sfxge(4): be ready to receive events immediately after event queues are created
Attached
Detach File
Event Timeline
Log In to Comment