Re: b53 tags on bpi-r1 (bcm53125)
Hi Florian, Am 04.01.2018 um 05:49 schrieb Florian Fainelli: On 12/29/2017 07:22 PM, Florian Fainelli wrote: Le 12/29/17 à 13:56, Florian Fainelli a écrit : Le 12/29/17 à 12:21, Florian Fainelli a écrit : Hi Jochen, Le 12/18/17 à 02:44, Jochen Friedrich a écrit : Hi Florian, unfortunately, this doesn't make any difference. Just out of curiosity, BPI-R1 has pull-down resistors on LED6 and 7 (MII_MODE0/1). However, the public available 53125U sheet doesn't document these pins: LED[6] IMP_MODE[0] Pull-up Active low (since IMP Mode is not used) LED[7] IMP_MODE[1] Pull-up Active low (since IMP Mode is not used) Is this MII mode maybe incompatible with Broadcom tags? AFAICT, it should not, this is largely independent from enabling Broadcom tags. I have now reproduced this on my BPI-R1 as well and am looking at what might be going wrong. OK, so I have been able to find out what was going on. On BCM53125 and earlier switches, we need to do a couple of things for Broadcom tags to be usable: - turn on managed mode (SM_SW_FWD_MODE) - configure Port 8 for IMP mode (B53_GLOBAL_CONFIG, setting bit GC_FRM_MGMT_PORT_MII) After doing that, I can now see the correct outgoing packets on my host, however, the replies don't seem to be delivered to the per-port DSA network devices, and I suspect it's because of stmmac, so I am investigating this now. So stmmac was indeed part of the problem. I had to clear the GMAC_CONTROL_ACS bit in GMAC_CORE_INIT in order to allow stmmac to properly receive packets, otherwise, packets were truncated to 8 bytes on reception which I assume is because the Broadcom tags may look like some sort of weird LLC/SNAP packet which was confusing the hardware. This is all working correctly now after a bunch of changes that I will submit in the next few days. Preliminary patches available here: https://github.com/ffainelli/linux/commits/stmmac-fixes Thank you very much for your patience! Turning on managed mode has some other effects, like how multicast traffic needs to be handled and how to resolve ARL misses, which means that the changes are too invasive for the upcoming release since we would be essentially adding multicast support through a number of code paths (including core DSA). I will submit a simple change for now which does not turn on Broadcom tags on switches that require managed mode (5395, 97, 98, 53125 and friends) and target enabling Broadcom tags for these models for net-next. Thanks Thanks. That's the best approach for now :-)
Re: b53 tags on bpi-r1 (bcm53125)
Hi Florian, unfortunately, this doesn't make any difference. Just out of curiosity, BPI-R1 has pull-down resistors on LED6 and 7 (MII_MODE0/1). However, the public available 53125U sheet doesn't document these pins: LED[6] IMP_MODE[0] Pull-up Active low (since IMP Mode is not used) LED[7] IMP_MODE[1] Pull-up Active low (since IMP Mode is not used) Is this MII mode maybe incompatible with Broadcom tags? Thanks, Jochen Am 15.12.2017 um 02:55 schrieb Florian Fainelli: Hi Jochen, On 11/23/2017 11:14 AM, Jochen Friedrich wrote: Hi Florian, With Broadcom tags (or any type of switch tagging protocol), eth0 becomes a conduit interface and no longer a "normal" network device for applications/socket to use. This means that if you were obtaining an IP address through a DHCP client using e.g: dhclient eth0, this now needs to be replaced using dhclient lan1 for instance. Yes, that's what I would expect. If you use the per-port network devices, do you actually see Broadcom tags coming out of these interfaces, or is it just when you use eth0 like what you used before that you see that happening? For outgoing Packet, I see the tags on eth0, that's expected, but also an a laptop connected to any of the external ports (no matter which one, wan or lan1-4). Incoming packets are seen on eth0 untagged and don't get forwarded to the corresponding child Interface.> So it seems the switch operates in dumb forwarding mode. Humm, what if you comment that part from b53_set_forwarding: b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt); mgmt |= B53_MII_DUMB_FWDG_EN; b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt); does this help? I also tried a pull down on LED Port 0 (mii_dumb_fwdg_en), but the switch still remains in dumb mode. However, I would have to double check I picked the correct pin, the Bpi-r1 schematics is not completely error free :-(. Thanks, Jochen
Re: b53 tags on bpi-r1 (bcm53125)
Hi Florian, With Broadcom tags (or any type of switch tagging protocol), eth0 becomes a conduit interface and no longer a "normal" network device for applications/socket to use. This means that if you were obtaining an IP address through a DHCP client using e.g: dhclient eth0, this now needs to be replaced using dhclient lan1 for instance. Yes, that's what I would expect. If you use the per-port network devices, do you actually see Broadcom tags coming out of these interfaces, or is it just when you use eth0 like what you used before that you see that happening? For outgoing Packet, I see the tags on eth0, that's expected, but also an a laptop connected to any of the external ports (no matter which one, wan or lan1-4). Incoming packets are seen on eth0 untagged and don't get forwarded to the corresponding child Interface. So it seems the switch operates in dumb forwarding mode. I also tried a pull down on LED Port 0 (mii_dumb_fwdg_en), but the switch still remains in dumb mode. However, I would have to double check I picked the correct pin, the Bpi-r1 schematics is not completely error free :-(. Thanks, Jochen
Re: b53 tags on bpi-r1 (bcm53125)
Hi Florian, OK, because this is a 53125S, it should support Broadcom tags correctly, not clear yet what is happening. Just to make sure, you are using arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts as the DTS for this platform, right? Yes, that's the DTS I'm using. If so, can you provide the ethtool -k eth0 output and/or see if disabling HW VLAN tag support for eth0 helps in any way? It looks like gmac doesn't have HW VLAN support. Thanks, Jochen
Re: b53 tags on bpi-r1 (bcm53125)
Hallo Florian, - what is the value of page 02, register 3 during b53_switch_detect()? A managed switch should have this set to 0x3, whereas I would expect an unmanaged switch to be 0x0 The register has the value 3. Thanks, Jochen
b53 tags on bpi-r1 (bcm53125)
Hi Florian, i just tested the latest DSA patches for b53 on a bpi-r1 device (net: dsa: b53: Turn on Broadcom tags). Unfortunately, the bcm53125 does not seem to handle the broadcom tags on CPU port although tuned on b53_brcm_hdr_setup(). The tag is still visible on a device connected to one of the switch ports. I wonder if there is something else necessary to make the chip handle the tags or if the chip doesn't support broadcom tags after all. The documentation at https://sourceforge.net/p/ohvesw/svn/12/tree/document/bcm/53125U-DS02-R.pdf doesn't document register 3 in the management page, at all... Thanks, Jochen
Re: [PATCH] [NET]: Remove PowerPC code from fec.c
Hi Frans, > Jochen Friedrich wrote: >> +++ b/drivers/net/fec.c >> @@ -23,6 +23,9 @@ >> * >> * Bug fixes and cleanup by Philippe De Muyter ([EMAIL PROTECTED]) >> * Copyright (c) 2004-2006 Macq Electronique SA. >> + * >> + * This driver is now only used on ColdFire processors. Remove conditional >> + * Powerpc code. >> */ > > This comment makes sense for a changelog, but IMO it makes no sense at all > to add it to the file. I just added it to clarify this code is now only used on m68knommu (Coldfire). The comments on top are mailny about MPC860T CPUs (PowerPC), however the driver is no longer used for these CPUs. Maybe the wording should be changed to: This driver is now only used on ColdFire (m68knommu) processors. Conditional PowerPC code has been removed. Thanks, Jochen -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH for-2.6.25] [POWERPC] Rename commproc to cpm1 and cpm2_common.c to cpm2.c
Rename commproc.[ch] to cpm1.[ch] to be more consistent with cpm2. Also rename cpm2_common.c to cpm2.c as suggested by Scott Wood. Adjust the includes accordingly. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- arch/powerpc/platforms/8xx/ep88xc.c |1 + arch/powerpc/platforms/8xx/mpc86xads_setup.c |2 +- arch/powerpc/platforms/8xx/mpc885ads_setup.c |2 +- arch/powerpc/sysdev/Makefile |4 ++-- arch/powerpc/sysdev/{commproc.c => cpm1.c}|4 ++-- arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} |3 +-- arch/powerpc/sysdev/micropatch.c |2 +- arch/ppc/8260_io/enet.c |2 +- arch/ppc/8xx_io/commproc.c|2 +- arch/ppc/8xx_io/enet.c|6 +++--- arch/ppc/8xx_io/fec.c |2 +- arch/ppc/8xx_io/micropatch.c |2 +- arch/ppc/boot/simple/iic.c|2 +- arch/ppc/boot/simple/m8xx_tty.c |2 +- arch/ppc/kernel/ppc_ksyms.c |2 +- arch/ppc/platforms/mpc866ads_setup.c |2 +- arch/ppc/platforms/mpc885ads_setup.c |2 +- arch/ppc/syslib/mpc8xx_devices.c |2 +- arch/ppc/xmon/start_8xx.c |2 +- drivers/net/fec_8xx/fec_8xx-netta.c |2 +- drivers/net/fec_8xx/fec_main.c|2 +- drivers/net/fec_8xx/fec_mii.c |2 +- drivers/net/fs_enet/fs_enet.h |2 +- drivers/net/fs_enet/mac-fec.c |2 +- drivers/net/fs_enet/mac-scc.c |2 +- drivers/serial/cpm_uart/cpm_uart_cpm1.h |2 +- include/asm-powerpc/{commproc.h => cpm1.h}|8 include/asm-ppc/{commproc.h => cpm1.h}|8 28 files changed, 38 insertions(+), 38 deletions(-) rename arch/powerpc/sysdev/{commproc.c => cpm1.c} (99%) rename arch/powerpc/sysdev/{cpm2_common.c => cpm2.c} (99%) rename include/asm-powerpc/{commproc.h => cpm1.h} (99%) rename include/asm-ppc/{commproc.h => cpm1.h} (99%) diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c index 4897eda..a8dffa0 100644 --- a/arch/powerpc/platforms/8xx/ep88xc.c +++ b/arch/powerpc/platforms/8xx/ep88xc.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "mpc8xx.h" diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c index c0dda53..c028a5b 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c index 3be115e..6e7ded0 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c +++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index f17e7b8..928d75b 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -36,8 +36,8 @@ endif # Temporary hack until we have migrated to asm-powerpc ifeq ($(ARCH),powerpc) obj-$(CONFIG_CPM) += cpm_common.o -obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o +obj-$(CONFIG_CPM2) += cpm2.o cpm2_pic.o obj-$(CONFIG_PPC_DCR) += dcr.o -obj-$(CONFIG_8xx) += mpc8xx_pic.o commproc.o +obj-$(CONFIG_8xx) += mpc8xx_pic.o cpm1.o obj-$(CONFIG_UCODE_PATCH) += micropatch.o endif diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/cpm1.c similarity index 99% rename from arch/powerpc/sysdev/commproc.c rename to arch/powerpc/sysdev/cpm1.c index ef82587..df8bd2b 100644 --- a/arch/powerpc/sysdev/commproc.c +++ b/arch/powerpc/sysdev/cpm1.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -290,7 +290,7 @@ cpm_setbrg(uint brg, uint rate) out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN); else out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) | -CPM_BRG_EN | CPM_BRG_DIV16); + CPM_BRG_EN | CPM_BRG_DIV16); } #ifndef CONFIG_PPC_CPM_NEW_BINDING diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2.c similarity index 99% rename from arch/powerpc/sysdev/cpm2_common.c rename to arch/powerpc/sysdev/cpm2.c index f7188e2..7be7112 100644 --- a/arch/powerpc/sysdev/cpm2_common.c +++ b/arch/powerpc/sysdev/cpm2.c @@ -153,8 +153,7 @@ cpm2_fastbrg(uint brg, uint rate, int div16) if (brg < 4) { bp = cpm2_map_size(im_brgc1, 16); - } - else { + }
[PATCH] [NET]: Remove PowerPC code from fec.c
fec.c is only used on M68k Coldfire CPUs. Remove leftover PowerPC code from this driver. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- drivers/net/fec.c | 136 +--- 1 files changed, 3 insertions(+), 133 deletions(-) diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 0fbf1bb..0499cbb 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -23,6 +23,9 @@ * * Bug fixes and cleanup by Philippe De Muyter ([EMAIL PROTECTED]) * Copyright (c) 2004-2006 Macq Electronique SA. + * + * This driver is now only used on ColdFire processors. Remove conditional + * Powerpc code. */ #include @@ -49,17 +52,9 @@ #include #include -#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \ -defined(CONFIG_M5272) || defined(CONFIG_M528x) || \ -defined(CONFIG_M520x) || defined(CONFIG_M532x) #include #include #include "fec.h" -#else -#include -#include -#include "commproc.h" -#endif #if defined(CONFIG_FEC2) #defineFEC_MAX_PORTS 2 @@ -1223,14 +1218,9 @@ static phy_info_t const * const phy_info[] = { /* - */ #if !defined(CONFIG_M532x) -#ifdef CONFIG_RPXCLASSIC -static void -mii_link_interrupt(void *dev_id); -#else static irqreturn_t mii_link_interrupt(int irq, void * dev_id); #endif -#endif #if defined(CONFIG_M5272) /* @@ -1800,121 +1790,6 @@ static void __inline__ fec_uncache(unsigned long addr) /* - */ -#else - -/* - * Code specific to the MPC860T setup. - */ -static void __inline__ fec_request_intrs(struct net_device *dev) -{ - volatile immap_t *immap; - - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */ - - if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0) - panic("Could not allocate FEC IRQ!"); - -#ifdef CONFIG_RPXCLASSIC - /* Make Port C, bit 15 an input that causes interrupts. - */ - immap->im_ioport.iop_pcpar &= ~0x0001; - immap->im_ioport.iop_pcdir &= ~0x0001; - immap->im_ioport.iop_pcso &= ~0x0001; - immap->im_ioport.iop_pcint |= 0x0001; - cpm_install_handler(CPMVEC_PIO_PC15, mii_link_interrupt, dev); - - /* Make LEDS reflect Link status. - */ - *((uint *) RPX_CSR_ADDR) &= ~BCSR2_FETHLEDMODE; -#endif -#ifdef CONFIG_FADS - if (request_8xxirq(SIU_IRQ2, mii_link_interrupt, 0, "mii", dev) != 0) - panic("Could not allocate MII IRQ!"); -#endif -} - -static void __inline__ fec_get_mac(struct net_device *dev) -{ - bd_t *bd; - - bd = (bd_t *)__res; - memcpy(dev->dev_addr, bd->bi_enetaddr, ETH_ALEN); - -#ifdef CONFIG_RPXCLASSIC - /* The Embedded Planet boards have only one MAC address in -* the EEPROM, but can have two Ethernet ports. For the -* FEC port, we create another address by setting one of -* the address bits above something that would have (up to -* now) been allocated. -*/ - dev->dev_adrd[3] |= 0x80; -#endif -} - -static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) -{ - extern uint _get_IMMR(void); - volatile immap_t *immap; - volatile fec_t *fecp; - - fecp = fep->hwp; - immap = (immap_t *)IMAP_ADDR; /* pointer to internal registers */ - - /* Configure all of port D for MII. - */ - immap->im_ioport.iop_pdpar = 0x1fff; - - /* Bits moved from Rev. D onward. - */ - if ((_get_IMMR() & 0x) < 0x0501) - immap->im_ioport.iop_pddir = 0x1c58;/* Pre rev. D */ - else - immap->im_ioport.iop_pddir = 0x1fff;/* Rev. D and later */ - - /* Set MII speed to 2.5 MHz - */ - fecp->fec_mii_speed = fep->phy_speed = - ((bd->bi_busfreq * 100) / 250) & 0x7e; -} - -static void __inline__ fec_enable_phy_intr(void) -{ - volatile fec_t *fecp; - - fecp = fep->hwp; - - /* Enable MII command finished interrupt - */ - fecp->fec_ivec = (FEC_INTERRUPT/2) << 29; -} - -static void __inline__ fec_disable_phy_intr(void) -{ -} - -static void __inline__ fec_phy_ack_intr(void) -{ -} - -static void __inline__ fec_localhw_setup(void) -{ - volatile fec_t *fecp; - - fecp = fep->hwp; - fecp->fec_r_hash = PKT_MAXBUF_SIZE; - /* Enable big endian and don't care about SDMA FC. - */ - fecp->fec_fun_code = 0x7800; -} - -static void __inline__ fec_uncache(unsigned long addr) -{ - pte_t *pte; - pte = va_to_pte(mem_addr); - pte_val(*pte) |= _PAGE_NO_CACHE; - flush_tlb_page(init_mm.mmap, mem_addr); -} - #endif /* --
[PATCH] [POWERPC] Add fixed-phy support for fs_enet
This patch adds support to use the fixed-link property of an ethernet node to fs_enet for the CONFIG_PPC_CPM_NEW_BINDING case. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> Acked-by: Jeff Garzik <[EMAIL PROTECTED]> Acked-by: Vitali Bordug <[EMAIL PROTECTED]> --- drivers/net/fs_enet/fs_enet-main.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index f2a4d39..8220c70 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -1174,8 +1174,15 @@ static int __devinit find_phy(struct device_node *np, struct device_node *phynode, *mdionode; struct resource res; int ret = 0, len; + const u32 *data; + + data = of_get_property(np, "fixed-link", NULL); + if (data) { + snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); + return 0; + } - const u32 *data = of_get_property(np, "phy-handle", &len); + data = of_get_property(np, "phy-handle", &len); if (!data || len != 4) return -EINVAL; -- 1.5.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH/RFC] [POWERPC] Add fixed-phy support for fs_enet
Hi Jeff, > ACK, pass this through paulus? Yes, that's fine for me. Thanks, Jochen -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH/RFC] [POWERPC] Add fixed-phy support for fs_enet
This patch adds support to use the fixed-link property of an ethernet node to fs_enet for the CONFIG_PPC_CPM_NEW_BINDING case. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- drivers/net/fs_enet/fs_enet-main.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index f2a4d39..8220c70 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -1174,8 +1174,15 @@ static int __devinit find_phy(struct device_node *np, struct device_node *phynode, *mdionode; struct resource res; int ret = 0, len; + const u32 *data; + + data = of_get_property(np, "fixed-link", NULL); + if (data) { + snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); + return 0; + } - const u32 *data = of_get_property(np, "phy-handle", &len); + data = of_get_property(np, "phy-handle", &len); if (!data || len != 4) return -EINVAL; -- 1.5.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHY layer functionality
Hi Vitaly, With that patch fixed.c now fully emulates MDIO bus, thus no need to duplicate PHY layer functionality. That, in turn, drastically simplifies the code, and drops down line count. As an additional bonus, now there is no need to register MDIO bus for each PHY, all emulated PHYs placed on the platform fixed MDIO bus. There is also no more need to pre-allocate PHYs via .config option, this is all now handled dynamically. p.s. Don't even try to understand patch content! Better: apply patch and look into resulting drivers/net/phy/fixed.c. If i understand your code correctly, you seem to rely on the fact that fixed_phy_add() is called before the fixed MDIO bus is scanned for devices. How is this supposed to work for modules or for the PPC_CPM_NEW_BINDING mode where the device tree is no longer scanned during fs_soc initialization but during device initialization? I tried to add fixed-phy support to fs_enet, but the fixed phy is not found this way. --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1174,8 +1175,24 @@ static int __devinit find_phy(struct device_node *np, struct device_node *phynode, *mdionode; struct resource res; int ret = 0, len; + const u32 *data; + struct fixed_phy_status status = {}; + + data = of_get_property(np, "fixed-link", NULL); + if (data) { + status.link = 1; + status.duplex = data[1]; + status.speed = data[2]; + + ret = fixed_phy_add(PHY_POLL, data[0], &status); + if (ret) + return ret; + + snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); + return 0; + } - const u32 *data = of_get_property(np, "phy-handle", &len); + data = of_get_property(np, "phy-handle", &len); if (!data || len != 4) return -EINVAL; Thanks, Jochen -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] powerpc: Fix fs_enet module build
Hi David, > This is truly ugly and creates an unnecessarily hard to > maintain and complex driver. > > Please find a way to fix this for real, so that the > PPC_CPM_NEW_BINDING ifdef is not necessary at all and > things get built modular or not naturally as we handle > things for other cases like this. I know it's ugly, however, module building is completely broken right now and I just want to provide a quick and ugly fix until both that ppc->powerpc transition and the new binding transition are over. Noone wants to touch the old stuff any more as it's a pita and it's already scheduled for removal in a couple of months. Thanks, Jochen - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] powerpc: Fix fs_enet module build
If fs_enet is build as module, on PPC_CPM_NEW_BINDING platforms mii-fec/mii-bitbang should be build as module, as well. On other platforms, mii-fec/mii-bitbang must be included into the main module. Otherwise some symbols remain undefined. Additionally, fs_enet uses libphy, so add a select PHYLIB. Building modules, stage 2. MODPOST 5 modules ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- This patch replaces powerpc-fs_enet-select-phylib-as-the-driver-needs-it.patch from -mm. drivers/net/fs_enet/Kconfig | 11 ++- drivers/net/fs_enet/Makefile | 15 --- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig index 2765e49..562ea68 100644 --- a/drivers/net/fs_enet/Kconfig +++ b/drivers/net/fs_enet/Kconfig @@ -2,6 +2,7 @@ config FS_ENET tristate "Freescale Ethernet Driver" depends on CPM1 || CPM2 select MII + select PHYLIB config FS_ENET_HAS_SCC bool "Chip has an SCC usable for ethernet" @@ -11,11 +12,19 @@ config FS_ENET_HAS_SCC config FS_ENET_HAS_FCC bool "Chip has an FCC usable for ethernet" depends on FS_ENET && CPM2 - select MDIO_BITBANG default y config FS_ENET_HAS_FEC bool "Chip has an FEC usable for ethernet" depends on FS_ENET && CPM1 + select FS_ENET_MDIO_FEC default y +config FS_ENET_MDIO_FEC + tristate "MDIO driver for FEC" + depends on FS_ENET && CPM1 + +config FS_ENET_MDIO_FCC + tristate "MDIO driver for FCC" + depends on FS_ENET && CPM2 + select MDIO_BITBANG diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile index 02d4dc1..1ffbe07 100644 --- a/drivers/net/fs_enet/Makefile +++ b/drivers/net/fs_enet/Makefile @@ -4,7 +4,16 @@ obj-$(CONFIG_FS_ENET) += fs_enet.o -obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o -obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o +fs_enet-$(CONFIG_FS_ENET_HAS_SCC) += mac-scc.o +fs_enet-$(CONFIG_FS_ENET_HAS_FEC) += mac-fec.o +fs_enet-$(CONFIG_FS_ENET_HAS_FCC) += mac-fcc.o -fs_enet-objs := fs_enet-main.o +ifeq ($(CONFIG_PPC_CPM_NEW_BINDING),y) +obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o +obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o +else +fs_enet-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o +fs_enet-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o +endif + +fs_enet-objs := fs_enet-main.o $(fs_enet-m) -- 1.5.3.5 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [POWERPC] Fix fs_enet module build
If fs_enet is build as module, mii-fec/mii-bitbang should be build as module, as well. Otherwise some symbols remain undefined. Building modules, stage 2. MODPOST 5 modules ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24 drivers/net/fs_enet/Makefile | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile index 02d4dc1..2f7563a 100644 --- a/drivers/net/fs_enet/Makefile +++ b/drivers/net/fs_enet/Makefile @@ -4,7 +4,15 @@ obj-$(CONFIG_FS_ENET) += fs_enet.o -obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o -obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o +fs_enet-$(CONFIG_8xx) += mac-fec.o mac-scc.o +fs_enet-$(CONFIG_CPM2) += mac-fcc.o + +ifeq ($(CONFIG_8xx),y) +obj-$(CONFIG_FS_ENET) += mii-fec.o +endif + +ifeq ($(CONFIG_CPM2),y) +obj-$(CONFIG_FS_ENET) += mii-bitbang.o +endif fs_enet-objs := fs_enet-main.o -- 1.5.3.4 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [POWERPC] Fix typo #ifdef -> #ifndef
fpi->cp_command should be overwritten only if CONFIG_PPC_CPM_NEW_BINDING is NOT set. Otherwise it is already set from the device tree. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24 drivers/net/fs_enet/mac-scc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 03134f4..48f2f30 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c @@ -158,7 +158,7 @@ static int setup_data(struct net_device *dev) { struct fs_enet_private *fep = netdev_priv(dev); -#ifdef CONFIG_PPC_CPM_NEW_BINDING +#ifndef CONFIG_PPC_CPM_NEW_BINDING struct fs_platform_info *fpi = fep->fpi; fep->scc.idx = fs_get_scc_index(fpi->fs_no); -- 1.5.3.4 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH2/2] [POWERPC] fs_enet: select PHYLIB as the driver needs it.
Add a select PHYLIB to config FS_ENET as the driver uses functions of libphy. LD .tmp_vmlinux1 drivers/built-in.o: In function `fs_ioctl': drivers/net/fs_enet/fs_enet-main.c:952: undefined reference to `phy_mii_ioctl' [...] make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- drivers/net/fs_enet/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig index 2765e49..24502d2 100644 --- a/drivers/net/fs_enet/Kconfig +++ b/drivers/net/fs_enet/Kconfig @@ -2,6 +2,7 @@ config FS_ENET tristate "Freescale Ethernet Driver" depends on CPM1 || CPM2 select MII + select PHYLIB config FS_ENET_HAS_SCC bool "Chip has an SCC usable for ethernet" -- 1.5.3.4 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH0/2] [POWERPC] Two bug fixes for 2.6.24
Here is a series fixing some bugs for 8xx powerpc CPUs. 1. [POWERPC] Kill non-existant symbols from ksyms and commproc.h 2. [POWERPC] fs_enet: select PHYLIB as the driver needs it This series can be pulled from git://git.bocc.de/dbox2.git for-2.6.24 Thanks, Jochen - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [PPC] Compile fix for 8xx CPM Ehernet driver
Add #include for flush_dcache_range to make the driver compile again. CC arch/ppc/8xx_io/enet.o arch/ppc/8xx_io/enet.c: In function 'scc_enet_start_xmit': arch/ppc/8xx_io/enet.c:240: error: implicit declaration of function 'flush_dcache_range' make[1]: *** [arch/ppc/8xx_io/enet.o] Error 1 make: *** [arch/ppc/8xx_io] Error 2 Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- arch/ppc/8xx_io/enet.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c index 703d47e..eace3bc 100644 --- a/arch/ppc/8xx_io/enet.c +++ b/arch/ppc/8xx_io/enet.c @@ -44,6 +44,7 @@ #include #include #include +#include /* *Theory of Operation
Re: Fwd: [PATCH#2 3/4] [PPC] Compile fix for 8xx CPM Ehernet driver
Hi Jeff, Kumar Gala wrote: Begin forwarded message: From: Jochen Friedrich <[EMAIL PROTECTED]> Date: September 24, 2007 12:15:35 PM CDT To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], Marcelo Tosatti <[EMAIL PROTECTED]> Subject: [PATCH#2 3/4] [PPC] Compile fix for 8xx CPM Ehernet driver Jeff, Please pick up for 2.6.23 if you don't mind. Please send an apply-able patch... Jeff, off to bed I rebased git://git.bocc.de/dbox2.git ppc-fixes against 2.6.23. This patch is the only remaining one in this head. I'll resend. Thanks, Jochen - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ANNOUNCE: SFLC helps developers assess ar5k (enabling free Atheros HAL)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Michael, >> I don't think anyone likes the HAL-based architecture. I don't think >> we will accept a HAL-based driver into the upstream kernel. > > Yeah, wanted to hear that. ;) +1 At least, this way we have a chance to get USB working as well (See http://madwifi.org/ticket/33). OpenBSD seems to have a working driver (if_uath.c) for these USB WLAN sticks. Jochen -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEVAwUBRVxzGsP9a9GOLSE6AQIeRgf/ZyvmzdhP1+wjVshy2kK0BX+I+lx7y6RO mMmaVXPnXnHhHE4OLcf9Yrnn6d6i6rS+0CUbw60KgQouuvTFSXEFtSpIYRlXGAyj krMCj8bEfHhDEN8iYjbjdhP9Nx1wQ//JGyoBVpZZ5+sro6ik7wv70igFeDZ2IWg6 38ycxDzINaV13ZscpwoHzO3NhvcSs9k99Syrh/nR6/pp+3g2vXmrsYR+hy7DMrE/ bSI9y50h8rz6ZCire1ppDwADyBW5B1OondoRkjFYd3L8zNUu8s8xUHZ0Znz6B/cc yc7jyfQMsBRTUU7VsX3cWuMfA0UGlPn/0MR0+RHRJYHW5bRlStc5Kw== =Ajsn -END PGP SIGNATURE- - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch] d80211: use pfifo_qdisc_ops rather than d80211-specific qdisc
Hi Johannes, > On Thu, 2006-11-02 at 14:18 +, Christoph Hellwig wrote: > >> This is not about the name that makes sense. I think using ethX names >> for wireless devices is utterly stupid, but it's what all current upstream >> drivers do, and at least for WE compat we'll have to stick to it. > > No, that's not true, zd1201 doesn't [1] :) Neither does hostap [2] :) Thanks, Jochen [2] http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;h=ed00ebb6e7f4bd255d1a1fe8bf05a6f7a5574d6e;hb=aefba081d7b7dfd1c5752f6e6e709d8b5ab80ab7;f=drivers/net/wireless/hostap/hostap_hw.c#l84 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] new pcmcia IDs for hostap - ASUS WL-110
Hi Marcin, [EMAIL PROTECTED]:~# pccardctl ident Socket 0: product info: "ASUS", "802_11B_CF_CARD_25", "Version 01.00", "" manfid: 0x02aa, 0x0002 function: 6 (network) Yet another card known to work OK with hostap_cs: # pccardctl ident Socket 0: no product info available Socket 1: product info: "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02", "" manfid: 0x0156, 0x0002 function: 6 (network) Thanks, Jochen - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: How can I get local copy of your git tree?
Hi Denis, >Hi John, ># cg-clone >rsync://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git >wireless-2.6.git > > the branch softmac has been renamed to softmac-all. # cg-clone "rsync://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git#softmac-all" wireless-2.6.git Thanks, Jochen - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Fix LLC Data Corruption
Hi Arnaldo, the observed data corruption happened for two reasons: 1. Upper layer still was allowed to send data when remote_busy_flag was set. 2. TX Window handling could underflow if one REJ shrunk the window to 1 and yet another REJ arrived. These patches fix both problems. Printing larger files works OK now for me using LLC protocol. The third patch is just a trivial typo fix. Thanks, Jochen[LLC]: Fix TX window scaling Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- commit 99ed07890bd23aae1eef6237ce60d0577da3a79f tree a5d8eb27db05fbb917b6a36c3b032f3137b28fa3 parent 88f8178c39e62deabadeeb1333f65815c1711f2d author Jochen Friedrich <[EMAIL PROTECTED]> Tue, 08 Nov 2005 16:44:53 +0100 committer Jochen Friedrich <[EMAIL PROTECTED]> Tue, 08 Nov 2005 16:44:53 +0100 net/llc/llc_c_ac.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c index b0bcfb1..91fb6bc 100644 --- a/net/llc/llc_c_ac.c +++ b/net/llc/llc_c_ac.c @@ -866,7 +866,8 @@ int llc_conn_ac_send_ack_if_needed(struc llc->ack_must_be_send = 1; llc->ack_pf = pf_bit & 1; } - if (((llc->vR - llc->first_pdu_Ns + 129) % 128) >= llc->npta) { + if (((llc->vR - llc->first_pdu_Ns + 1 + LLC_2_SEQ_NBR_MODULO) + % LLC_2_SEQ_NBR_MODULO) >= llc->npta) { llc_conn_ac_send_rr_rsp_f_set_ackpf(sk, skb); llc->ack_must_be_send = 0; llc->ack_pf = 0; @@ -994,8 +995,8 @@ static int llc_conn_ac_inc_npta_value(st llc->dec_step = 0; llc->dec_cntr = llc->inc_cntr = 2; ++llc->npta; - if (llc->npta > 127) - llc->npta = 127 ; + if (llc->npta > ~LLC_2_SEQ_NBR_MODULO) + llc->npta = ~LLC_2_SEQ_NBR_MODULO ; } else --llc->inc_cntr; return 0; @@ -1065,9 +1066,10 @@ int llc_conn_ac_dec_tx_win_size(struct s struct llc_sock *llc = llc_sk(sk); u8 unacked_pdu = skb_queue_len(&llc->pdu_unack_q); - llc->k -= unacked_pdu; - if (llc->k < 2) - llc->k = 2; + if (llc->k - unacked_pdu < 1) + llc->k = 1; + else + llc->k -= unacked_pdu; return 0; } @@ -1084,8 +1086,8 @@ int llc_conn_ac_inc_tx_win_size(struct s struct llc_sock *llc = llc_sk(sk); llc->k += 1; - if (llc->k > 128) - llc->k = 128 ; + if (llc->k > ~LLC_2_SEQ_NBR_MODULO) + llc->k = ~LLC_2_SEQ_NBR_MODULO ; return 0; } @@ -1309,7 +1311,7 @@ int llc_conn_ac_set_vs_nr(struct sock *s static int llc_conn_ac_inc_vs_by_1(struct sock *sk, struct sk_buff *skb) { - llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % 128; + llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % LLC_2_SEQ_NBR_MODULO; return 0; } [LLC]: Make core block on remote busy. Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- commit 88f8178c39e62deabadeeb1333f65815c1711f2d tree 7c2b64547ff3f536a3ac9788a965ceb9aa956cbc parent f093182d313edde9b1f86dbdaf40ba4da2dbd0e7 author Jochen Friedrich <[EMAIL PROTECTED]> Tue, 08 Nov 2005 16:26:50 +0100 committer Jochen Friedrich <[EMAIL PROTECTED]> Tue, 08 Nov 2005 16:26:50 +0100 net/llc/af_llc.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 59d02cb..c3f0b07 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -116,7 +116,9 @@ static int llc_ui_send_data(struct sock* struct llc_sock* llc = llc_sk(sk); int rc = 0; - if (unlikely(llc_data_accept_state(llc->state) || llc->p_flag)) { + if (unlikely(llc_data_accept_state(llc->state) || +llc->remote_busy_flag || +llc->p_flag)) { long timeout = sock_sndtimeo(sk, noblock); rc = llc_ui_wait_for_busy_core(sk, timeout); @@ -542,6 +544,7 @@ static int llc_ui_wait_for_busy_core(str if (sk_wait_event(sk, &timeout, (sk->sk_shutdown & RCV_SHUTDOWN) || (!llc_data_accept_state(llc->state) && + !llc->remote_busy_flag && !llc->p_flag))) break; rc = -ERESTARTSYS; [LLC]: Fix typo Signed-off-by: Jochen Friedrich <[EMAIL PROTECTED]> --- commit 349fe4a0f56c7fae7bd87fb849f65a3576b7aab6 tree 024b64e82691509a598409af4cc90186f65e3f0d parent df70b17f88a4d1d8545d3569a1f6d28c6004f9e4 author Jochen Friedrich <[EMAIL PROTECTED]> Wed, 02 Nov 2005 00:37:18 +0100 committer