Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-13 Thread Florian Fainelli
Hello Rafal, Le 12/11/12 12:32, Rafał Miłecki a écrit : --- It works, but is missing failure paths (handling allocation errors, etc.) Don't use it in any production environment! --- drivers/bcma/driver_chipcommon_pmu.c|2 +- drivers/net/ethernet/broadcom/Makefile |1 +

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-13 Thread Hauke Mehrtens
On 12/13/2012 11:29 AM, Florian Fainelli wrote: Hello Rafal, Le 12/11/12 12:32, Rafał Miłecki a écrit : --- It works, but is missing failure paths (handling allocation errors, etc.) Don't use it in any production environment! --- drivers/bcma/driver_chipcommon_pmu.c|2 +-

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-13 Thread Hauke Mehrtens
On 12/11/2012 06:19 PM, Florian Fainelli wrote: Hello, I would add to the list: 5. this driver probably needs some kind of specific driver for its internal BCMA PHY, and the MDIO operations. The driver does a tad too much MDIO/PHY stuff, suggesting that it should be one or two separate

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-13 Thread Florian Fainelli
Le 12/13/12 14:57, Hauke Mehrtens a écrit : On 12/11/2012 06:19 PM, Florian Fainelli wrote: Hello, I would add to the list: 5. this driver probably needs some kind of specific driver for its internal BCMA PHY, and the MDIO operations. The driver does a tad too much MDIO/PHY stuff, suggesting

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-12 Thread Rafał Miłecki
2012/12/12 Nathan Hintz nlhi...@hotmail.com: /* query bus clock frequency for PMU-enabled chipcommon */ -static u32 bcma_pmu_get_clockcontrol(struct bcma_drv_cc *cc) +u32 bcma_pmu_get_clockcontrol(struct bcma_drv_cc *cc) bcma_pmu_get_clockcontrol will need to be an exported symbol if this

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-12 Thread Hauke Mehrtens
On 12/11/2012 12:32 PM, Rafał Miłecki wrote: --- It works, but is missing failure paths (handling allocation errors, etc.) Don't use it in any production environment! --- drivers/bcma/driver_chipcommon_pmu.c|2 +- drivers/net/ethernet/broadcom/Makefile |1 +

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-12 Thread Rafał Miłecki
2012/12/13 Hauke Mehrtens ha...@hauke-m.de: I just tried this on my BCM47186 device and Ethernet did not worked, because unaligned addressing is not implemented. Unaligned addressing should be just a feature. Driver still should be working without this. [4.204000] bgmac: u0: Timeout

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-12 Thread Rafał Miłecki
2012/12/13 Rafał Miłecki zaj...@gmail.com: + char buf[2]; + if (nvram_getenv(et_swtype, buf, 1)) { nvram_getenv() returns the number of bytes read. Please try this: if (nvram_getenv(et_swtype, buf, 1) 0) { Whoops, good catch. I didn't think it can

[OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-11 Thread Rafał Miłecki
--- It works, but is missing failure paths (handling allocation errors, etc.) Don't use it in any production environment! --- drivers/bcma/driver_chipcommon_pmu.c|2 +- drivers/net/ethernet/broadcom/Makefile |1 + drivers/net/ethernet/broadcom/bgmac.c | 1200

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-11 Thread Hauke Mehrtens
On 12/11/2012 12:32 PM, Rafał Miłecki wrote: --- It works, but is missing failure paths (handling allocation errors, etc.) Don't use it in any production environment! I would like to add this as a patch to OpenWrt trunk, this is better than no driver and I assume that you will fix most of

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-11 Thread Florian Fainelli
Hello, Le 12/11/12 18:09, Hauke Mehrtens a écrit : On 12/11/2012 12:32 PM, Rafał Miłecki wrote: --- It works, but is missing failure paths (handling allocation errors, etc.) Don't use it in any production environment! I would like to add this as a patch to OpenWrt trunk, this is better than

Re: [OpenWrt-Devel] [WIP][NOT READY][PATCH] bgmac

2012-12-11 Thread Rafał Miłecki
2012/12/11 Hauke Mehrtens ha...@hauke-m.de: On 12/11/2012 12:32 PM, Rafał Miłecki wrote: --- It works, but is missing failure paths (handling allocation errors, etc.) Don't use it in any production environment! I would like to add this as a patch to OpenWrt trunk, this is better than no