On 10-4-23 下午7:37, Samuel Thibault wrote:
> Da Zheng, le Fri 23 Apr 2010 14:51:22 +0800, a écrit :
>> They are not just one or two variables. They are an array of structure
>> variables. Should I define all fields of the structure with volatile 
>> qualifier?
> 
> You can qualify the whole structure
> 
>> It's strange. The Linux driver doesn't do so but it definitely works in the
>> Linux kernel.
> 
> It does (or should do): such pointers have the __io qualifier.
I checked the code of e1000 again. The data for MMIO is qualified by __iomem,
but the data in the transmission or receiving queues (which are accessed by DMA)
doesn't have __iomem or any similar qualifiers. I guess the data in the
transmission queue is very unlikely to be in registers when the driver accesses 
it.

Zheng Da


Reply via email to