lkml.org 
[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] lpc32xx: Added ethernet driver: smp_wmb()
On 03/05/2012 11:45 PM, Ben Hutchings wrote:
>> + /* Clear and enable interrupts */
>> + writel(0xFFFF, LPC_ENET_INTCLEAR(pldat->net_base));
>> + lpc_eth_enable_int(pldat->net_base);
>> +
>> + /* Get the next TX buffer output index */
>> + pldat->num_used_tx_buffs = 0;
>> + pldat->last_tx_idx =
>> + readl(LPC_ENET_TXCONSUMEINDEX(pldat->net_base));
>
> Doesn't this need to be done *before* enabling interrupts? Also, I
> think you need an smp_wmb() so that the interrupt handler is guaranteed
> to see all these writes.

Do you mean _one_ smp_wmb() directly after lpc_eth_enable_int() (which
I'm moving behind the above code?

Note that there is no SMP in LPCs and NXP is not planning to build one
AFAIK. However, I'm fine with including smp_wmb() anyway for completeness.

Thanks in advance,

Roland


\
 
 \ /
  Last update: 2012-03-06 11:47    [W:0.074 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site