Skip to contentSkip to conversation

small myri10ge fix for 2.6.20

PATCH In review Brice Goglin 2 participants 5 messages Dec 4, 2006 – Dec 5, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover small myri10ge fix for 2.6.20

Hi Jeff,

The following patch is a small fix for myri10ge, please apply it for 2.6.20.

I don't send any other fix/update since they highly depend on the physical page skb conversion that I sent a couple times in the past without getting any answer.

Thanks,
Brice

#1 lore raw

PATCH 1/1 myri10ge: write as 2 32-byte blocks in myri10ge_submit_8rx

In the myri10ge_submit_8rx() routine, write the 64 byte request block as 2 32-byte blocks so that it is handled by the hardware pio write handler if write-combining is enabled.

---
 drivers/net/myri10ge/myri10ge.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/myri10ge/myri10ge.c +3 -1
Index: linux-2.6.19/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -790,7 +790,9 @@
 
 	low = src->addr_low;
 	src->addr_low = DMA_32BIT_MASK;
-	myri10ge_pio_copy(dst, src, 8 * sizeof(*src));
+	myri10ge_pio_copy(dst, src, 4 * sizeof(*src));
+	mb();
+	myri10ge_pio_copy(dst + 4, src + 4, 4 * sizeof(*src));
 	mb();
 	src->addr_low = low;
 	__raw_writel(low, &dst->addr_low);
#2 lore raw

Re: [PATCH 1/1] myri10ge: write as 2 32-byte blocks in myri10ge_submit_8rx

Quoted 8 lines · Brice Goglin

In the myri10ge_submit_8rx() routine, write the 64 byte request block as 2 32-byte blocks so that it is handled by the hardware pio write handler if write-combining is enabled.

---
 drivers/net/myri10ge/myri10ge.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

ACK, can you resend due to patch collision in #upstream?

Jeff

#3 lore raw

Re: [PATCH 1/1] myri10ge: write as 2 32-byte blocks in myri10ge_submit_8rx

Quoted 11 lines · Jeff Garzik
Quoted 8 lines · Brice Goglin

In the myri10ge_submit_8rx() routine, write the 64 byte request block as 2 32-byte blocks so that it is handled by the hardware pio write handler if write-combining is enabled.

---
 drivers/net/myri10ge/myri10ge.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

ACK, can you resend due to patch collision in #upstream?

Ok, I wasn't aware of the annotation fixes from Al Viro. Maybe I should add a MAINTAINER entry so that I could get CC'ed more often when changes are done in myri10ge ?

Anyway, I will resent an updated patch as a reply to this mail soon.

Brice

#4 lore raw

PATCH 1/1 myri10ge: write as 2 32-byte blocks in myri10ge_submit_8rx

In the myri10ge_submit_8rx() routine, write the 64 byte request block as 2 32-byte blocks so that it is handled by the hardware pio write handler if write-combining is enabled.

---
 drivers/net/myri10ge/myri10ge.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/myri10ge/myri10ge.c +3 -1
Index: netdev-2.6/drivers/net/myri10ge/myri10ge.c
===================================================================
@@ -795,7 +795,9 @@
 
 	low = src->addr_low;
 	src->addr_low = htonl(DMA_32BIT_MASK);
-	myri10ge_pio_copy(dst, src, 8 * sizeof(*src));
+	myri10ge_pio_copy(dst, src, 4 * sizeof(*src));
+	mb();
+	myri10ge_pio_copy(dst + 4, src + 4, 4 * sizeof(*src));
 	mb();
 	src->addr_low = low;
 	put_be32(low, &dst->addr_low);