Message ID | 4FA80B46.5070405@gmail.com |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
Your patch doesn't apply to the net-next tree which is what you should be basing all of your networking patches on: [davem@bql net-next]$ git am --signoff pch_gbe-Adding-read-memory-barriers.patch Applying: pch_gbe: Adding read memory barriers error: patch failed: drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:1222 error: drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c: patch does not apply Patch failed at 0001 pch_gbe: Adding read memory barriers When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Stop rushing things and take your time learning the process. Otherwise you're going to make more work for maintainers and they end up grumpy as a result, which you don't want. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 48406ca..7746ca3 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -1222,6 +1222,8 @@ static irqreturn_t pch_gbe_intr(int irq, void *data) } } + smp_rmb(); /* prevent any other reads before*/ + /* When request status is Receive interruption */ if ((int_st & (PCH_GBE_INT_RX_DMA_CMPLT | PCH_GBE_INT_TX_CMPLT)) || (adapter->rx_stop_flag == true)) { @@ -1390,6 +1392,9 @@ pch_gbe_clean_tx(struct pch_gbe_adapter *adapter, i = tx_ring->next_to_clean; tx_desc = PCH_GBE_TX_DESC(*tx_ring, i); + + rmb(); /* prevent any other reads before*/ + pr_debug("gbec_status:0x%04x dma_status:0x%04x\n", tx_desc->gbec_status, tx_desc->dma_status); @@ -1490,6 +1495,9 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter, while (*work_done < work_to_do) { /* Check Rx descriptor status */ rx_desc = PCH_GBE_RX_DESC(*rx_ring, i); + + rmb(); /* prevent any other reads before*/ + if (rx_desc->gbec_status == DSC_INIT16) break; cleaned = true;