* [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround [not found] <20080327085353.6ac04886@zod.rchland.ibm.com> @ 2008-03-27 14:40 ` Valentine Barshak 2008-03-29 2:18 ` Jeff Garzik 2008-03-27 14:42 ` [PATCH 2/2] ibm_newemac: PowerPC 440EP/440GR " Valentine Barshak 2008-03-27 14:43 ` [PATCH] ibm_newemac: emac_tx_csum typo fix Valentine Barshak 2 siblings, 1 reply; 11+ messages in thread From: Valentine Barshak @ 2008-03-27 14:40 UTC (permalink / raw) To: linuxppc-dev; +Cc: benh, jwboyer, jeff, netdev The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error) if there's no link. Because of that it fails to find PHY chip. The older ibm_emac driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch does the same for "ibm,emac-440gx" compatible chips. The workaround forces clock on -all- EMACs, so we select clock under global emac_phy_map_lock. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> --- drivers/net/ibm_newemac/core.c | 16 +++++++++++++++- drivers/net/ibm_newemac/core.h | 8 ++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff -pruN linux-2.6.orig/drivers/net/ibm_newemac/core.c linux-2.6/drivers/net/ibm_newemac/core.c --- linux-2.6.orig/drivers/net/ibm_newemac/core.c 2008-02-22 19:56:26.000000000 +0300 +++ linux-2.6/drivers/net/ibm_newemac/core.c 2008-02-22 20:38:47.000000000 +0300 @@ -43,6 +43,8 @@ #include <asm/io.h> #include <asm/dma.h> #include <asm/uaccess.h> +#include <asm/dcr.h> +#include <asm/dcr-regs.h> #include "core.h" @@ -2323,6 +2325,10 @@ static int __devinit emac_init_phy(struc dev->phy.mdio_read = emac_mdio_read; dev->phy.mdio_write = emac_mdio_write; + /* Enable internal clock source */ + if (emac_has_feature(dev, EMAC_FTR_440GX_PHY_CLK_FIX)) + dcri_clrset(SDR0, SDR0_MFR, 0, SDR0_MFR_ECS); + /* Configure EMAC with defaults so we can at least use MDIO * This is needed mostly for 440GX */ @@ -2355,6 +2361,11 @@ static int __devinit emac_init_phy(struc if (!emac_mii_phy_probe(&dev->phy, i)) break; } + + /* Enable external clock source */ + if (emac_has_feature(dev, EMAC_FTR_440GX_PHY_CLK_FIX)) + dcri_clrset(SDR0, SDR0_MFR, SDR0_MFR_ECS, 0); + mutex_unlock(&emac_phy_map_lock); if (i == 0x20) { printk(KERN_WARNING "%s: can't find PHY!\n", np->full_name); @@ -2480,8 +2491,11 @@ static int __devinit emac_init_config(st } /* Check EMAC version */ - if (of_device_is_compatible(np, "ibm,emac4")) + if (of_device_is_compatible(np, "ibm,emac4")) { dev->features |= EMAC_FTR_EMAC4; + if (of_device_is_compatible(np, "ibm,emac-440gx")) + dev->features |= EMAC_FTR_440GX_PHY_CLK_FIX; + } /* Fixup some feature bits based on the device tree */ if (of_get_property(np, "has-inverted-stacr-oc", NULL)) diff -pruN linux-2.6.orig/drivers/net/ibm_newemac/core.h linux-2.6/drivers/net/ibm_newemac/core.h --- linux-2.6.orig/drivers/net/ibm_newemac/core.h 2008-02-21 16:45:36.000000000 +0300 +++ linux-2.6/drivers/net/ibm_newemac/core.h 2008-02-22 19:57:44.000000000 +0300 @@ -301,6 +301,10 @@ struct emac_instance { * Set if we have new type STACR with STAOPC */ #define EMAC_FTR_HAS_NEW_STACR 0x00000040 +/* + * Set if we need phy clock workaround for 440gx + */ +#define EMAC_FTR_440GX_PHY_CLK_FIX 0x00000080 /* Right now, we don't quite handle the always/possible masks on the @@ -312,8 +316,8 @@ enum { EMAC_FTRS_POSSIBLE = #ifdef CONFIG_IBM_NEW_EMAC_EMAC4 - EMAC_FTR_EMAC4 | EMAC_FTR_HAS_NEW_STACR | - EMAC_FTR_STACR_OC_INVERT | + EMAC_FTR_EMAC4 | EMAC_FTR_HAS_NEW_STACR | + EMAC_FTR_STACR_OC_INVERT | EMAC_FTR_440GX_PHY_CLK_FIX | #endif #ifdef CONFIG_IBM_NEW_EMAC_TAH EMAC_FTR_HAS_TAH | ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround 2008-03-27 14:40 ` [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround Valentine Barshak @ 2008-03-29 2:18 ` Jeff Garzik 2008-03-29 3:28 ` Benjamin Herrenschmidt ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Jeff Garzik @ 2008-03-29 2:18 UTC (permalink / raw) To: Valentine Barshak; +Cc: linuxppc-dev, benh, jwboyer, netdev Valentine Barshak wrote: > The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error) > if there's no link. Because of that it fails to find PHY chip. The older ibm_emac > driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, > which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch > does the same for "ibm,emac-440gx" compatible chips. The workaround forces > clock on -all- EMACs, so we select clock under global emac_phy_map_lock. > > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> > --- > drivers/net/ibm_newemac/core.c | 16 +++++++++++++++- > drivers/net/ibm_newemac/core.h | 8 ++++++-- > 2 files changed, 21 insertions(+), 3 deletions(-) is this for 2.6.25-rc? ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround 2008-03-29 2:18 ` Jeff Garzik @ 2008-03-29 3:28 ` Benjamin Herrenschmidt 2008-03-29 3:30 ` Josh Boyer 2008-04-11 14:24 ` Josh Boyer 2 siblings, 0 replies; 11+ messages in thread From: Benjamin Herrenschmidt @ 2008-03-29 3:28 UTC (permalink / raw) To: Jeff Garzik; +Cc: linuxppc-dev, netdev On Fri, 2008-03-28 at 22:18 -0400, Jeff Garzik wrote: > Valentine Barshak wrote: > > The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error) > > if there's no link. Because of that it fails to find PHY chip. The older ibm_emac > > driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, > > which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch > > does the same for "ibm,emac-440gx" compatible chips. The workaround forces > > clock on -all- EMACs, so we select clock under global emac_phy_map_lock. > > > > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> > > --- > > drivers/net/ibm_newemac/core.c | 16 +++++++++++++++- > > drivers/net/ibm_newemac/core.h | 8 ++++++-- > > 2 files changed, 21 insertions(+), 3 deletions(-) > > is this for 2.6.25-rc? Nah, too late imho. Ben. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround 2008-03-29 2:18 ` Jeff Garzik 2008-03-29 3:28 ` Benjamin Herrenschmidt @ 2008-03-29 3:30 ` Josh Boyer 2008-04-11 14:24 ` Josh Boyer 2 siblings, 0 replies; 11+ messages in thread From: Josh Boyer @ 2008-03-29 3:30 UTC (permalink / raw) To: Jeff Garzik; +Cc: Valentine Barshak, linuxppc-dev, benh, netdev On Fri, 28 Mar 2008 22:18:25 -0400 Jeff Garzik <jeff@garzik.org> wrote: > Valentine Barshak wrote: > > The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error) > > if there's no link. Because of that it fails to find PHY chip. The older ibm_emac > > driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, > > which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch > > does the same for "ibm,emac-440gx" compatible chips. The workaround forces > > clock on -all- EMACs, so we select clock under global emac_phy_map_lock. > > > > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> > > --- > > drivers/net/ibm_newemac/core.c | 16 +++++++++++++++- > > drivers/net/ibm_newemac/core.h | 8 ++++++-- > > 2 files changed, 21 insertions(+), 3 deletions(-) > > is this for 2.6.25-rc? No. This, and patch 2/2, are for 2.6.26 and depend on a patch in my tree. These are the two Ben asked about going through the powerpc tree but naturally we wanted an Ack from you first. thx, josh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround 2008-03-29 2:18 ` Jeff Garzik 2008-03-29 3:28 ` Benjamin Herrenschmidt 2008-03-29 3:30 ` Josh Boyer @ 2008-04-11 14:24 ` Josh Boyer 2008-04-12 20:28 ` Jeff Garzik 2 siblings, 1 reply; 11+ messages in thread From: Josh Boyer @ 2008-04-11 14:24 UTC (permalink / raw) To: Jeff Garzik; +Cc: Valentine Barshak, linuxppc-dev, benh, netdev On Fri, 28 Mar 2008 22:18:25 -0400 Jeff Garzik <jeff@garzik.org> wrote: > Valentine Barshak wrote: > > The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error) > > if there's no link. Because of that it fails to find PHY chip. The older ibm_emac > > driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, > > which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch > > does the same for "ibm,emac-440gx" compatible chips. The workaround forces > > clock on -all- EMACs, so we select clock under global emac_phy_map_lock. > > > > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> > > --- > > drivers/net/ibm_newemac/core.c | 16 +++++++++++++++- > > drivers/net/ibm_newemac/core.h | 8 ++++++-- > > 2 files changed, 21 insertions(+), 3 deletions(-) > > is this for 2.6.25-rc? Jeff, can I get an ack from you on this patch, and patch 2 in this set? They depend on a patch in my tree and I'd like to include them in my next push to Paul for 2.6.26. josh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround 2008-04-11 14:24 ` Josh Boyer @ 2008-04-12 20:28 ` Jeff Garzik 2008-04-12 20:47 ` Josh Boyer 0 siblings, 1 reply; 11+ messages in thread From: Jeff Garzik @ 2008-04-12 20:28 UTC (permalink / raw) To: Josh Boyer; +Cc: Valentine Barshak, linuxppc-dev, benh, netdev Josh Boyer wrote: > On Fri, 28 Mar 2008 22:18:25 -0400 > Jeff Garzik <jeff@garzik.org> wrote: > >> Valentine Barshak wrote: >>> The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error) >>> if there's no link. Because of that it fails to find PHY chip. The older ibm_emac >>> driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, >>> which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch >>> does the same for "ibm,emac-440gx" compatible chips. The workaround forces >>> clock on -all- EMACs, so we select clock under global emac_phy_map_lock. >>> >>> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> >>> --- >>> drivers/net/ibm_newemac/core.c | 16 +++++++++++++++- >>> drivers/net/ibm_newemac/core.h | 8 ++++++-- >>> 2 files changed, 21 insertions(+), 3 deletions(-) >> is this for 2.6.25-rc? > > Jeff, can I get an ack from you on this patch, and patch 2 in this > set? They depend on a patch in my tree and I'd like to include them in > my next push to Paul for 2.6.26. ACK I had queried the status of these patches, and didn't receive any reply initially from my query... ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround 2008-04-12 20:28 ` Jeff Garzik @ 2008-04-12 20:47 ` Josh Boyer 2008-04-12 21:13 ` Jeff Garzik 0 siblings, 1 reply; 11+ messages in thread From: Josh Boyer @ 2008-04-12 20:47 UTC (permalink / raw) To: Jeff Garzik; +Cc: linuxppc-dev, netdev On Sat, 2008-04-12 at 16:28 -0400, Jeff Garzik wrote: > Josh Boyer wrote: > > On Fri, 28 Mar 2008 22:18:25 -0400 > > Jeff Garzik <jeff@garzik.org> wrote: > > > >> Valentine Barshak wrote: > >>> The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error) > >>> if there's no link. Because of that it fails to find PHY chip. The older ibm_emac > >>> driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, > >>> which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch > >>> does the same for "ibm,emac-440gx" compatible chips. The workaround forces > >>> clock on -all- EMACs, so we select clock under global emac_phy_map_lock. > >>> > >>> Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> > >>> --- > >>> drivers/net/ibm_newemac/core.c | 16 +++++++++++++++- > >>> drivers/net/ibm_newemac/core.h | 8 ++++++-- > >>> 2 files changed, 21 insertions(+), 3 deletions(-) > >> is this for 2.6.25-rc? > > > > Jeff, can I get an ack from you on this patch, and patch 2 in this > > set? They depend on a patch in my tree and I'd like to include them in > > my next push to Paul for 2.6.26. > > ACK Many thanks. > I had queried the status of these patches, and didn't receive any reply > initially from my query... Erm... you did. http://ozlabs.org/pipermail/linuxppc-dev/2008-March/053737.html No worries though. I lose email all the time. josh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround 2008-04-12 20:47 ` Josh Boyer @ 2008-04-12 21:13 ` Jeff Garzik 0 siblings, 0 replies; 11+ messages in thread From: Jeff Garzik @ 2008-04-12 21:13 UTC (permalink / raw) To: jwboyer; +Cc: linuxppc-dev, netdev Josh Boyer wrote: > On Sat, 2008-04-12 at 16:28 -0400, Jeff Garzik wrote: >> I had queried the status of these patches, and didn't receive any reply >> initially from my query... > > Erm... you did. > > http://ozlabs.org/pipermail/linuxppc-dev/2008-March/053737.html > > No worries though. I lose email all the time. Whoops, sorry about that! Jeff ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/2] ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround [not found] <20080327085353.6ac04886@zod.rchland.ibm.com> 2008-03-27 14:40 ` [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround Valentine Barshak @ 2008-03-27 14:42 ` Valentine Barshak 2008-03-27 14:43 ` [PATCH] ibm_newemac: emac_tx_csum typo fix Valentine Barshak 2 siblings, 0 replies; 11+ messages in thread From: Valentine Barshak @ 2008-03-27 14:42 UTC (permalink / raw) To: linuxppc-dev; +Cc: benh, jwboyer, jeff, netdev This patch adds ibm_newemac PHY clock workaround for 440EP/440GR EMAC attached to a PHY which doesn't generate RX clock if there is no link. The code is based on the previous ibm_emac driver stuff. The 440EP/440GR allows controlling each EMAC clock separately as opposed to global clock selection for 440GX. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> --- drivers/net/ibm_newemac/core.c | 34 ++++++++++++++++++++++++++++++++-- drivers/net/ibm_newemac/core.h | 6 +++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff -pruN linux-2.6.orig/drivers/net/ibm_newemac/core.c linux-2.6/drivers/net/ibm_newemac/core.c --- linux-2.6.orig/drivers/net/ibm_newemac/core.c 2008-02-26 16:32:33.000000000 +0300 +++ linux-2.6/drivers/net/ibm_newemac/core.c 2008-02-26 16:37:52.000000000 +0300 @@ -129,10 +129,29 @@ static struct device_node *emac_boot_lis static inline void emac_report_timeout_error(struct emac_instance *dev, const char *error) { - if (net_ratelimit()) + if (emac_has_feature(dev, EMAC_FTR_440GX_PHY_CLK_FIX | + EMAC_FTR_440EP_PHY_CLK_FIX)) + DBG(dev, "%s" NL, error); + else if (net_ratelimit()) printk(KERN_ERR "%s: %s\n", dev->ndev->name, error); } +/* EMAC PHY clock workaround: + * 440EP/440GR has more sane SDR0_MFR register implementation than 440GX, + * which allows controlling each EMAC clock + */ +static inline void emac_rx_clk_tx(struct emac_instance *dev) +{ + if (emac_has_feature(dev, EMAC_FTR_440EP_PHY_CLK_FIX)) + dcri_clrset(SDR0, SDR0_MFR, 0, SDR0_MFR_ECS >> dev->cell_index); +} + +static inline void emac_rx_clk_default(struct emac_instance *dev) +{ + if (emac_has_feature(dev, EMAC_FTR_440EP_PHY_CLK_FIX)) + dcri_clrset(SDR0, SDR0_MFR, SDR0_MFR_ECS >> dev->cell_index, 0); +} + /* PHY polling intervals */ #define PHY_POLL_LINK_ON HZ #define PHY_POLL_LINK_OFF (HZ / 5) @@ -1089,9 +1112,11 @@ static int emac_open(struct net_device * int link_poll_interval; if (dev->phy.def->ops->poll_link(&dev->phy)) { dev->phy.def->ops->read_link(&dev->phy); + emac_rx_clk_default(dev); netif_carrier_on(dev->ndev); link_poll_interval = PHY_POLL_LINK_ON; } else { + emac_rx_clk_tx(dev); netif_carrier_off(dev->ndev); link_poll_interval = PHY_POLL_LINK_OFF; } @@ -1169,6 +1194,7 @@ static void emac_link_timer(struct work_ if (dev->phy.def->ops->poll_link(&dev->phy)) { if (!netif_carrier_ok(dev->ndev)) { + emac_rx_clk_default(dev); /* Get new link parameters */ dev->phy.def->ops->read_link(&dev->phy); @@ -1181,6 +1207,7 @@ static void emac_link_timer(struct work_ link_poll_interval = PHY_POLL_LINK_ON; } else { if (netif_carrier_ok(dev->ndev)) { + emac_rx_clk_tx(dev); netif_carrier_off(dev->ndev); netif_tx_disable(dev->ndev); emac_reinitialize(dev); @@ -2325,9 +2352,12 @@ static int __devinit emac_init_phy(struc dev->phy.mdio_read = emac_mdio_read; dev->phy.mdio_write = emac_mdio_write; - /* Enable internal clock source */ + /* EMAC PHY clock workaround */ if (emac_has_feature(dev, EMAC_FTR_440GX_PHY_CLK_FIX)) + /* Enable internal clock source */ dcri_clrset(SDR0, SDR0_MFR, 0, SDR0_MFR_ECS); + else + emac_rx_clk_tx(dev); /* Configure EMAC with defaults so we can at least use MDIO * This is needed mostly for 440GX @@ -2495,6 +2525,10 @@ static int __devinit emac_init_config(st dev->features |= EMAC_FTR_EMAC4; if (of_device_is_compatible(np, "ibm,emac-440gx")) dev->features |= EMAC_FTR_440GX_PHY_CLK_FIX; + } else { + if (of_device_is_compatible(np, "ibm,emac-440ep") || + of_device_is_compatible(np, "ibm,emac-440gr")) + dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; } /* Fixup some feature bits based on the device tree */ diff -pruN linux-2.6.orig/drivers/net/ibm_newemac/core.h linux-2.6/drivers/net/ibm_newemac/core.h --- linux-2.6.orig/drivers/net/ibm_newemac/core.h 2008-02-26 16:32:33.000000000 +0300 +++ linux-2.6/drivers/net/ibm_newemac/core.h 2008-02-26 16:37:52.000000000 +0300 @@ -305,6 +305,10 @@ struct emac_instance { * Set if we need phy clock workaround for 440gx */ #define EMAC_FTR_440GX_PHY_CLK_FIX 0x00000080 +/* + * Set if we need phy clock workaround for 440ep or 440gr + */ +#define EMAC_FTR_440EP_PHY_CLK_FIX 0x00000100 /* Right now, we don't quite handle the always/possible masks on the @@ -328,7 +332,7 @@ enum { #ifdef CONFIG_IBM_NEW_EMAC_RGMII EMAC_FTR_HAS_RGMII | #endif - 0, + EMAC_FTR_440EP_PHY_CLK_FIX, }; static inline int emac_has_feature(struct emac_instance *dev, ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] ibm_newemac: emac_tx_csum typo fix [not found] <20080327085353.6ac04886@zod.rchland.ibm.com> 2008-03-27 14:40 ` [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround Valentine Barshak 2008-03-27 14:42 ` [PATCH 2/2] ibm_newemac: PowerPC 440EP/440GR " Valentine Barshak @ 2008-03-27 14:43 ` Valentine Barshak 2008-03-29 1:54 ` Jeff Garzik 2 siblings, 1 reply; 11+ messages in thread From: Valentine Barshak @ 2008-03-27 14:43 UTC (permalink / raw) To: linuxppc-dev; +Cc: jeff, netdev Move the "&& skb->ip_summed == CHECKSUM_PARTIAL" part out of emac_has_feature parameters. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> --- drivers/net/ibm_newemac/core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -pruN linux-2.6.orig/drivers/net/ibm_newemac/core.c linux-2.6/drivers/net/ibm_newemac/core.c --- linux-2.6.orig/drivers/net/ibm_newemac/core.c 2008-02-21 16:45:36.000000000 +0300 +++ linux-2.6/drivers/net/ibm_newemac/core.c 2008-02-22 19:55:29.000000000 +0300 @@ -1235,8 +1235,8 @@ static int emac_close(struct net_device static inline u16 emac_tx_csum(struct emac_instance *dev, struct sk_buff *skb) { - if (emac_has_feature(dev, EMAC_FTR_HAS_TAH && - skb->ip_summed == CHECKSUM_PARTIAL)) { + if (emac_has_feature(dev, EMAC_FTR_HAS_TAH) && + (skb->ip_summed == CHECKSUM_PARTIAL)) { ++dev->stats.tx_packets_csum; return EMAC_TX_CTRL_TAH_CSUM; } ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ibm_newemac: emac_tx_csum typo fix 2008-03-27 14:43 ` [PATCH] ibm_newemac: emac_tx_csum typo fix Valentine Barshak @ 2008-03-29 1:54 ` Jeff Garzik 0 siblings, 0 replies; 11+ messages in thread From: Jeff Garzik @ 2008-03-29 1:54 UTC (permalink / raw) To: Valentine Barshak; +Cc: linuxppc-dev, netdev Valentine Barshak wrote: > Move the "&& skb->ip_summed == CHECKSUM_PARTIAL" part out of > emac_has_feature parameters. > > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> > --- > drivers/net/ibm_newemac/core.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff -pruN linux-2.6.orig/drivers/net/ibm_newemac/core.c linux-2.6/drivers/net/ibm_newemac/core.c > --- linux-2.6.orig/drivers/net/ibm_newemac/core.c 2008-02-21 16:45:36.000000000 +0300 > +++ linux-2.6/drivers/net/ibm_newemac/core.c 2008-02-22 19:55:29.000000000 +0300 > @@ -1235,8 +1235,8 @@ static int emac_close(struct net_device > static inline u16 emac_tx_csum(struct emac_instance *dev, > struct sk_buff *skb) > { > - if (emac_has_feature(dev, EMAC_FTR_HAS_TAH && > - skb->ip_summed == CHECKSUM_PARTIAL)) { > + if (emac_has_feature(dev, EMAC_FTR_HAS_TAH) && > + (skb->ip_summed == CHECKSUM_PARTIAL)) { > ++dev->stats.tx_packets_csum; > return EMAC_TX_CTRL_TAH_CSUM; applied ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-04-12 21:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080327085353.6ac04886@zod.rchland.ibm.com>
2008-03-27 14:40 ` [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround Valentine Barshak
2008-03-29 2:18 ` Jeff Garzik
2008-03-29 3:28 ` Benjamin Herrenschmidt
2008-03-29 3:30 ` Josh Boyer
2008-04-11 14:24 ` Josh Boyer
2008-04-12 20:28 ` Jeff Garzik
2008-04-12 20:47 ` Josh Boyer
2008-04-12 21:13 ` Jeff Garzik
2008-03-27 14:42 ` [PATCH 2/2] ibm_newemac: PowerPC 440EP/440GR " Valentine Barshak
2008-03-27 14:43 ` [PATCH] ibm_newemac: emac_tx_csum typo fix Valentine Barshak
2008-03-29 1:54 ` Jeff Garzik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).