Skip to content

Commit

Permalink
e1000e: cleanup strict checkpatch MEMORY_BARRIER checks
Browse files Browse the repository at this point in the history
Add comments to memory barriers per strict checkpatch.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Bruce Allan authored and Jeff Kirsher committed Aug 31, 2012
1 parent efc38d2 commit bc76329
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/net/ethernet/intel/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3746,6 +3746,10 @@ static irqreturn_t e1000_intr_msi_test(int irq, void *data)
e_dbg("icr is %08X\n", icr);
if (icr & E1000_ICR_RXSEQ) {
adapter->flags &= ~FLAG_MSI_TEST_FAILED;
/*
* Force memory writes to complete before acknowledging the
* interrupt is handled.
*/
wmb();
}

Expand Down Expand Up @@ -3787,6 +3791,10 @@ static int e1000_test_msi_interrupt(struct e1000_adapter *adapter)
goto msi_test_failed;
}

/*
* Force memory writes to complete before enabling and firing an
* interrupt.
*/
wmb();

e1000_irq_enable(adapter);
Expand All @@ -3798,7 +3806,7 @@ static int e1000_test_msi_interrupt(struct e1000_adapter *adapter)

e1000_irq_disable(adapter);

rmb();
rmb(); /* read flags after interrupt has been fired */

if (adapter->flags & FLAG_MSI_TEST_FAILED) {
adapter->int_mode = E1000E_INT_MODE_LEGACY;
Expand Down

0 comments on commit bc76329

Please sign in to comment.