aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/faraday (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-05-27net: ethernet: remove unnecessary platform_set_drvdata()Jingoo Han2-4/+0
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Roland Stigge <stigge@antcom.de> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Tested-by: Roland Stigge <stigge@antcom.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-18net: ftgmac100: Use module_platform_driver()Sachin Kamat1-16/+1
module_platform_driver macro removes some boilerplate and makes the code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Po-Yu Chuang <ratbert@faraday-tech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-17drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)Joe Perches2-7/+6
Reduce the number of calls required to alloc a zeroed block of memory. Trivially reduces overall object size. Other changes around these removals o Neaten call argument alignment o Remove an unnecessary OOM message after dma_alloc_coherent failure o Remove unnecessary gfp_t stack variable Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-14net: phy: remove flags argument from phy_{attach, connect, connect_direct}Florian Fainelli1-2/+1
The flags argument of the phy_{attach,connect,connect_direct} functions is then used to assign a struct phy_device dev_flags with its value. All callers but the tg3 driver pass the flag 0, which results in the underlying PHY drivers in drivers/net/phy/ not being able to actually use any of the flags they would set in dev_flags. This patch gets rid of the flags argument, and passes phydev->dev_flags to the internal PHY library call phy_attach_direct() such that drivers which actually modify a phy device dev_flags get the value preserved for use by the underlying phy driver. Acked-by: Kosta Zertsekel <konszert@marvell.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06ethtool: fix drvinfo strings set in driversJiri Pirko2-6/+6
Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18net: ftgmac100/ftmac100: dont pull too much dataEric Dumazet2-6/+14
Drivers should pull only ethernet header from page frag to skb->head. Pulling 64 bytes is too much for TCP (without options) on IPv4. However, it makes sense to pull all the frame if it fits the 128 bytes bloc allocated for skb->head, to free one page per small incoming frame. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Po-Yu Chuang <ratbert@faraday-tech.com> Acked-by: Yan-Pai Chen <yanpai.chen@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15net: replace random_ether_addr() with eth_hw_addr_random()Danny Kukawka2-2/+2
Replace usage of random_ether_addr() with eth_hw_addr_random() to set addr_assign_type correctly to NET_ADDR_RANDOM. Change the trivial cases. v2: adapt to renamed eth_hw_addr_random() Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-18net: ftgmac100/ftmac100: add missing interrupt.h includeThomas Faber2-0/+2
Fixes compilation failure of these modules due to missing irqreturn_t type for the ft(g)mac100_interrupt definition. Signed-off-by: Thomas Faber <thfabba@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-13ftmac100: fix skb truesize underestimationEric Dumazet1-1/+4
ftmac100 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. If frame is under 64 bytes, page is freed, so increase truesize only for bigger frames. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Po-Yu Chuang <ratbert@faraday-tech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-13ftgmac100: fix skb truesize underestimationEric Dumazet1-1/+3
ftgmac100 allocates a page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. If frame is under 64 bytes, page is freed, and truesize adjusted. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Po-Yu Chuang <ratbert@faraday-tech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-15MII: fix Kconfig dependencies for MIIJeff Kirsher1-0/+1
MII Kconfig option is apart of the core networking drivers and by default NET_CORE is enabled so drivers selecting MII will have MII enabled as well. It was found using the randconfig option during testing, MII would be selected but NET_CORE could be disabled. This caused a dependency error. Resolved the dependency by selecting NET_CORE when MII is selected. Reported-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-27drivers/net/ethernet/*: Enabled vendor Kconfig optionsJeff Kirsher1-0/+1
Based on finds for Stephen Rothwell, where current defconfig's enable a ethernet driver and it is not compiled due to the newly added NET_VENDOR_* component of Kconfig. This patch enables all the "new" Kconfig options so that current defconfig's will continue to compile the expected drivers. In addition, by enabling all the new Kconfig options does not add any un-expected options. CC: Stephen Rothwll <sfc@canb.auug.org.au> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11ftgmac100/ftmac100: Move the Faraday driversJeff Kirsher6-0/+3033
Move the Faraday driver into drivers/net/ethernet/faraday/ and make the necessary Kconfig and Makefile changes. CC: "Po-Yu Chuang" <ratbert@faraday-tech.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Po-Yu Chuang <ratbert@faraday-tech.com>