|
@@ -3188,13 +3188,28 @@ static int octeon_device_init(struct octeon_device *oct)
|
|
|
if (octeon_setup_interrupt(oct))
|
|
|
return 1;
|
|
|
|
|
|
+ atomic_set(&oct->status, OCT_DEV_INTR_SET_DONE);
|
|
|
+
|
|
|
+ /* ***************************************************************
|
|
|
+ * The interrupts need to be enabled for the PF<-->VF handshake.
|
|
|
+ * They are [re]-enabled after the PF<-->VF handshake so that the
|
|
|
+ * correct OQ tick value is used (i.e. the value retrieved from
|
|
|
+ * the PF as part of the handshake).
|
|
|
+ */
|
|
|
+
|
|
|
+ /* Enable Octeon device interrupts */
|
|
|
+ oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR);
|
|
|
+
|
|
|
if (cn23xx_octeon_pfvf_handshake(oct))
|
|
|
return 1;
|
|
|
|
|
|
+ /* Here we [re]-enable the interrupts so that the correct OQ tick value
|
|
|
+ * is used (i.e. the value that was retrieved during the handshake)
|
|
|
+ */
|
|
|
+
|
|
|
/* Enable Octeon device interrupts */
|
|
|
oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR);
|
|
|
-
|
|
|
- atomic_set(&oct->status, OCT_DEV_INTR_SET_DONE);
|
|
|
+ /* *************************************************************** */
|
|
|
|
|
|
/* Enable the input and output queues for this Octeon device */
|
|
|
if (oct->fn_list.enable_io_queues(oct)) {
|