diff mbox

pcnet_cs: add odd location support for write_asic function

Message ID 20090711090213.94a771d3.ken_kawasaki@spring.nifty.jp
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Ken Kawasaki July 11, 2009, 12:02 a.m. UTC
Currently, no one passes odd location to the write_asic function.
But this patch add odd location support for future usage of this
feature.


Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>

---

--
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

Comments

David Miller July 11, 2009, 3:26 a.m. UTC | #1
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Date: Sat, 11 Jul 2009 09:02:13 +0900

> Currently, no one passes odd location to the write_asic function.
> But this patch add odd location support for future usage of this
> feature.
> 
> 
> Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>

"Who" in the future will use this feature and why do they
need it?

Ideally, you should submit this patch at the same time as
the other patch which adds a need for it.
--
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
Ken Kawasaki July 11, 2009, 10:15 p.m. UTC | #2
On Fri, 10 Jul 2009 20:26:09 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> 
> > Currently, no one passes odd location to the write_asic function.
> > But this patch add odd location support for future usage of this
> > feature.
> > 
> > 
> > Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
> 
> "Who" in the future will use this feature and why do they
> need it?
> 
> Ideally, you should submit this patch at the same time as
> the other patch which adds a need for it.

OK.
Thanks.


--
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 mbox

Patch

--- linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c.orig	2009-06-27 10:15:47.000000000 +0900
+++ linux-2.6.31-rc1/drivers/net/pcmcia/pcnet_cs.c	2009-07-04 10:32:44.000000000 +0900
@@ -886,9 +886,10 @@  static void write_asic(unsigned int ioad
 		outb_p(EE_ASIC|EE_CS|EE_DI|dataval, ee_addr);
 	}
 	// sync
-	outb(EE_ASIC|EE_CS, ee_addr);
-	outb(EE_ASIC|EE_CS|EE_CK, ee_addr);
-	outb(EE_ASIC|EE_CS, ee_addr);
+	dataval = (location & 1) ? EE_DO : 0;
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval|EE_CK, ee_addr);
+	outb(EE_ASIC|EE_CS|dataval, ee_addr);
 
 	for (i = 15; i >= 0; i--) {
 		dataval = (asic_data & (1 << i)) ? EE_ADOT : 0;