Thread (6 messages) 6 messages, 4 authors, 2005-07-31

Re: [PATCH] forcedeth: Additional ethtool support

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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help