Re: [PATCH] forcedeth: Additional ethtool support
From: Manfred Spraul <hidden>
Date: 2005-07-10 18:17:58
Attachments
- patch-forcedeth-037-ethtool [text/plain] 9291 bytes · preview
From: Manfred Spraul <hidden>
Date: 2005-07-10 18:17:58
Francois Romieu wrote:
quoted
+ int i; + + regs->version = FORCEDETH_REGS_VER; + spin_lock_irq(&np->lock); + for (i=0;i<FORCEDETH_REGS_SIZE/sizeof(u32);i++) + rbuf[i] = readl(base + i*sizeof(u32));memcpy_fromio ?
Not for a nic without complete documentation: What if an arch uses
64-bit reads to read two registers at the same time? Not all nics like
that, for example IIRC natsemi explicitely mandates 32-bit reads.
x86-64 doesn't, it uses 32-bit reads, but I don't like the idea of using
memcpy to read registers.
I agree with your other remarks, updated patch attached.
--
Manfred