aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-26net/cadence/macb: add support for dt phy definitionBoris BREZILLON1-7/+34
The macb driver only handle PHY description through platform_data (macb_platform_data). Thus, when using dt you cannot define phy properties like phy address or phy irq pin. This patch makes use of the of_mdiobus_register to add support for phy device definition using dt. A fallback to the autoscan procedure is added in case there is no phy devices defined in dt. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-09net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bitJongsung Kim1-1/+1
Signed-off-by: Jongsung Kim <neidhard.kim@lge.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-06net/macb: change RX path for GEMNicolas Ferre1-49/+259
GEM is able to adapt its DMA buffer size, so change the RX path to take advantage of this possibility and remove all kind of memcpy in this path. This modification introduces function pointers for managing differences between MACB and GEM adapter type. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-06net/macb: increase RX buffer size for GEMNicolas Ferre1-8/+37
Macb Ethernet controller requires a RX buffer of 128 bytes. It is highly sub-optimal for Gigabit-capable GEM that is able to use a bigger DMA buffer. Change this constant and associated macros with data stored in the private structure. RX DMA buffer size has to be multiple of 64 bytes as indicated in DMA Configuration Register specification. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-27net: ethernet: remove unnecessary platform_set_drvdata()Jingoo Han1-2/+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-05-14net/macb: fix ISR clear-on-write behavior only for some SoCNicolas Ferre1-2/+16
Commit 749a2b6 (net/macb: clear tx/rx completion flags in ISR) introduces clear-on-write on ISR register. This behavior is not always implemented when using Cadence MACB/GEM and is breaking other platforms. We are using the Design Configuration Register 1 information and a capability property to actually activate this clear-on-write behavior on ISR. Reported-by: Hein Tibosch <hein_tibosch@yahoo.es> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Hein Tibosch <hein_tibosch@yahoo.es> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-15net/macb: fix error return code in macb_probe()Nicolas Ferre1-2/+2
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Original-idea-by: <yongjun_wei@trendmicro.com.cn> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-02net/cadence/macb: Simplify OF dependenciesGuenter Roeck1-37/+6
With of_get_mac_address() and of_get_phy_mode() now defined as dummy functions if OF_NET is not configured, it is no longer necessary to provide OF dependent functions as front-end. Also, the two functions depend on OF_NET, not on OF, so the conditional code was not correct anyway. Drop the front-end functions and call of_get_mac_address() and of_get_phy_mode() directly instead. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-28net/macb: make clk_enable atomicSteffen Trumtrar1-10/+10
Use clk_prepare_enable/clk_disable_unprepare to be safe on SMP systems. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Fabio Estevam <festevam@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-28net/macb: force endian_swp_pkt_en to offSteffen Trumtrar1-0/+1
The core has a bit for swapping packet data endianism. Reset default from Cadence is off. Xilinx however, who uses this core on the Zynq SoCs, opted for on. Force it to off. This shouldn't change the behaviour for current users of the macb, but enables usage on Zynq devices. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-28net/macb: clear tx/rx completion flags in ISRSteffen Trumtrar1-0/+3
At least in the cadence IP core on the Xilinx Zynq SoC the TCOMP/RCOMP flags are not auto-cleaned. As these flags are evaluated, they need to be cleaned. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-05net: macb: use module_platform_driver_probe()Jingoo Han1-12/+1
This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net into netDavid S. Miller1-0/+5
Pull in 'net' to take in the bug fixes that didn't make it into 3.8-final. Also, deal with the semantic conflict of the change made to net/ipv6/xfrm6_policy.c A missing rt6->n neighbour release was added to 'net', but in 'net-next' we no longer cache the neighbour entries in the ipv6 routes so that change is not appropriate there. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-13net/macb: fix race with RX interrupt while doing NAPINicolas Ferre1-0/+5
When interrupts are disabled, an RX condition can occur but it is not reported when enabling interrupts again. We need to check RSR and use napi_reschedule() if condition is met. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.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-1/+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>
2012-12-03net/cadence: remove __dev* attributesBill Pemberton1-4/+4
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-23net/macb: GEM DMA configuration register updateNicolas Ferre1-2/+8
Add information to the DMA Configuration Register to maximize system performance: - rx/tx packet buffer full memory size - allow possibility to use INCR16 if supported Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Joachim Eastwood <manabian@gmail.com Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-19net/ethernet: remove useless is_valid_ether_addr from drivers ndo_openJoachim Eastwood1-3/+0
If ndo_validate_addr is set to the generic eth_validate_addr function there is no point in calling is_valid_ether_addr from driver ndo_open if ndo_open is not used elsewhere in the driver. With this change is_valid_ether_addr will be called from the generic eth_validate_addr function. So there should be no change in the actual behavior. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-19net/macb: move to circ_buf macros and fix initial conditionNicolas Ferre1-10/+7
Move to circular buffers management macro and correct an error with circular buffer initial condition. Without this patch, the macb_tx_ring_avail() function was not reporting the proper ring availability at startup: macb macb: eth0: BUG! Tx Ring full when queue awake! macb macb: eth0: tx_head = 0, tx_tail = 0 And hanginig forever... I remove the macb_tx_ring_avail() function and use the proven macros from circ_buf.h. CIRC_CNT() is used in the "consumer" part of the driver: macb_tx_interrupt() to match advice from Documentation/circular-buffers.txt. Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net/macb: clear unused address registerJoachim Eastwood1-0/+8
Only the first register set is used for matching but we support getting the initial hw addr from any of the registers. To prevent stale entries and false matches clear unused register sets. This most important for the at91_ether driver where u-boot always uses the 2nd register set. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net/macb: add support for phy irq via gpio pinJoachim Eastwood1-1/+11
Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net/at91_ether: use stat function from macbJoachim Eastwood1-1/+2
Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net/macb: export macb_set_hwaddr and macb_get_hwaddrJoachim Eastwood1-3/+5
for usage in at91_ether driver. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net/macb: support reversed hw addrJoachim Eastwood1-6/+18
This is used on one AT91RM9200 board where a bootloader stores the Ethernet address in the wrong order. Support this on macb so address setting functions can be shared with the at91_ether driver. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-07net/macb: check all address registers setsJoachim Eastwood1-15/+20
The macb driver in u-boot uses the first register set while the at91_ether driver in u-boot uses the second register set. By checking all register set, like at91_ether does, this code can be shared between the drivers. This only changes behavior on macb if no vaild address is found in the first register set. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03macb: Keep driver's speed/duplex in sync with actual NCFGRVitalii Demianets1-0/+2
When underlying phy driver restores its state very fast after being brought down and up so that macb driver function macb_handle_link_change() was never called with link state "down", driver's internal representation of phy speed and duplex (bp->speed and bp->duplex) didn't change. So, macb driver sees no reason to perform actual write to the NCFGR register, although the speed and duplex settings in that register were reset when interface was brought down and up. In that case actual phy speed and duplex differ from NCFGR settings. The patch fixes that by keeping internal driver representation of speed and duplex in sync with actual content of NCFGR. Signed-off-by: Vitalii Demianets <vitas@nppfactor.kiev.ua> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: add pinctrl consumer supportJean-Christophe PLAGNIOL-VILLARD1-0/+11
If no pinctrl available just report a warning as some architecture may not need to do anything. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> [nicolas.ferre@atmel.com: adapt the error path, remove unneeded headers] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: Offset first RX buffer by two bytesHavard Skinnemoen1-7/+16
Make the ethernet frame payload word-aligned, possibly making the memcpy into the skb a bit faster. This will be even more important after we eliminate the copy altogether. Also eliminate the redundant RX_OFFSET constant -- it has the same definition and purpose as NET_IP_ALIGN. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: adapt to newer kernel] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: better manage tx errorsNicolas Ferre1-54/+112
Handle all TX errors, not only underruns. TX error management is deferred to a dedicated workqueue. Reinitialize the TX ring after treating all remaining frames, and restart the controller when everything has been cleaned up properly. Napi is not stopped during this task as the driver only handles napi for RX for now. With this sequence, we do not need a special check during the xmit method as the packets will be caught by TX disable during workqueue execution. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: ethtool interface: add register dump featureNicolas Ferre1-0/+40
Add macb_get_regs() ethtool function and its helper function: macb_get_regs_len(). The version field is deduced from the IP revision which gives the "MACB or GEM" information. An additional version field is reserved. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: clean up ring buffer logicHavard Skinnemoen1-63/+109
Instead of masking head and tail every time we increment them, just let them wrap through UINT_MAX and mask them when subscripting. Add simple accessor functions to do the subscripting properly to minimize the chances of messing this up. This makes the code slightly smaller, and hopefully faster as well. Also, doing the ring buffer management this way will simplify things a lot when making the ring sizes configurable in the future. Available number of descriptors in ring buffer function by David Laight. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: split patch in topics, adapt to newer kernel] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: tx status is more than 8 bits nowNicolas Ferre1-1/+1
On some revision of GEM, TSR status register has more information. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: remove macb_get_drvinfo()Nicolas Ferre1-11/+0
This function has little meaning so remove it altogether and let ethtool core fill in the fields automatically. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: change debugging messagesHavard Skinnemoen1-10/+12
Convert some noisy netdev_dbg() statements to netdev_vdbg(). Defining DEBUG will no longer fill up the logs; VERBOSE_DEBUG still does. Add one more verbose debug for ISR status. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: split patch in topics, add ISR status] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: memory barriers cleanupHavard Skinnemoen1-4/+14
Remove a couple of unneeded barriers and document the remaining ones. Signed-off-by: Havard Skinnemoen <havard@skinnemoen.net> [nicolas.ferre@atmel.com: split patch in topics] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01net/macb: Add support for Gigabit Ethernet modePatrice Vilchez1-3/+12
Add Gigabit Ethernet mode to GEM cadence IP and enable RGMII connection. Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-23net/macb: fix truncate warningsJoachim Eastwood1-4/+4
When building macb on x86_64 the following warnings show up: drivers/net/ethernet/cadence/macb.c: In function macb_interrupt: drivers/net/ethernet/cadence/macb.c:556:4: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c: In function macb_reset_hw: drivers/net/ethernet/cadence/macb.c:792:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c:793:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c:796:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] Use -1 insted of ~0UL, as done in other places in the driver, to silence these warnings. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-19net/at91_ether: share macb_set_rx_mode with macbJoachim Eastwood1-1/+2
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19net/macb: export some symbols for at91_etherJoachim Eastwood1-3/+6
Export some symbols to start sharing code between macb and at91_ether drivers. Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-07-09net/macb: manage carrier state with call to netif_carrier_{on|off}()Nicolas Ferre1-2/+11
OFF carrier state is setup in probe() open() and suspend() functions. The carrier ON state is managed in macb_handle_link_change(). Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-04macb: Support the get_ts_info ethtool method.Richard Cochran1-0/+1
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15net: replace random_ether_addr() with eth_hw_addr_random()Danny Kukawka1-1/+1
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-02-06netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A Dalvi1-1/+1
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-31drivers/net: Remove alloc_etherdev error messagesJoe Perches1-3/+1
alloc_etherdev has a generic OOM/unable to alloc message. Remove the duplicative messages after alloc_etherdev calls. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-10macb: use an unique MDIO bus name.Florian Fainelli1-1/+2
Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-21net: macb: fix build break with !CONFIG_OFOlof Johansson1-0/+1
This fixes the build of the macb driver that was broken by the DT changes: drivers/net/ethernet/cadence/macb.c:1503: error: implicit declaration of function 'of_match_ptr' drivers/net/ethernet/cadence/macb.c:1503: error: 'macb_dt_ids' undeclared here (not in a function) drivers/net/ethernet/cadence/macb.c:1503: error: initializer element is not constant drivers/net/ethernet/cadence/macb.c:1503: error: (near initialization for 'macb_driver.driver.of_match_table') Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2011-12-16net/macb: add DT support for Cadence macb/gem driverJean-Christophe PLAGNIOL-VILLARD1-8/+65
Allow the device tree to provide the mac address and the phy mode. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> [nicolas.ferre@atmel.com: change "compatible" node property, doc and DT hwaddr] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> [jamie@jamieiles.com: add "gem" compatibility strings and doc] Acked-by: Jamie Iles<jamie@jamieiles.com> Acked-by: David S. Miller <davem@davemloft.net>
2011-11-22macb: allow GEM to have configurable receive buffer sizeJamie Iles1-0/+17
GEM has configurable receive buffer sizes so requires this to be programmed up. Any size < 2048 and a multiple of 64 bytes is permitted. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-11-22macb: support DMA bus widths > 32 bitsJamie Iles1-0/+23
Some GEM implementations may support DMA bus widths up to 128 bits. We can get the maximum supported DMA bus width from the design configuration register so use that to program the device up. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-11-22macb: support statistics for GEM devicesJamie Iles1-3/+54
GEM devices have a different number of statistics registers and they are at a different offset to MACB devices. Make the statistics collection method dependent on device type. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>