aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2013-08-21net/mlx4_en: Reduce scope of local variables in mlx4_en_xmitAmir Vadai1-3/+7
Some variables could have their scope reduced. Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21net/mlx4_en: Fix handling of dma_map failureAmir Vadai1-35/+62
Result of skb_frag_dma_map() and dma_map_single() wasn't checked. Added a check and proper handling in case of failure. Moved the mapping to the beginning of mlx4_en_xmit(), before updating the ring data structure to make error handling easier. Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21net/mlx4_en: Notify user when TX ring in error stateAmir Vadai1-0/+9
When hardware gets into error state, must notify user about it. When QP in error state no traffic will be tx'ed from the attached tx_ring. Driver should know how to recover from this unexpected state. I will send later on the recovery flow, but having the print shouldn't be delayed. Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21net/mlx4_en: Disable global flow control when PFC enabledEugenia Emantayev1-2/+2
Fix a bug when FC and PFC are enabled/disabled at the same time. According to ConnectX-3 Programmer Manual these two features are mutial exclusive. So make sure when enabling PFC to turn off global FC and vise versa. Otherwise it hurts the performance. Signed-off-by: Eugenia Emantayev <[email protected]> Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21net/mlx4_en: Coding style cleanup in mlx4_en_dcbnl_ieee_setpfc()Amir Vadai1-6/+9
Fix some coding style issues in this function. Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21sfc: Move and rename Falcon/Siena common NIC operationsBen Hutchings9-1858/+2088
Add efx_nic_type operations for the many efx_nic functions that need to be implemented different on EF10. For now, change most of the existing efx_nic_*() functions into inline wrappers. As a later step, we may be able to improve branch prediction for operations used on the fast path by copying the pointers into each queue/channel structure. Move the Falcon/Siena implementations to new file farch.c and rename the functions and static data to use a prefix of 'efx_farch_'. Move efx_may_push_tx_desc() to nic.h, as the EF10 TX code will also use it. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21qlcnic: Update version to 5.3.48Himanshu Madhani1-2/+2
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21qlcnic: Implement ndo_get_phys_port_id for 82xx adapterShahed Shaikh7-11/+63
Each function driver instance uses the MAC address of the lowest function belonging to that physical port as a unique port identifier. This port identifier is read and cached in driver during probe and provided to user space through ndo_get_phys_port_id() Signed-off-by: Shahed Shaikh <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21qlcnic: Enable diagnostic test for multiple Tx queues.Himanshu Madhani6-14/+34
o Enable diagnostic test via ethtool and QConvergeConsole application when Multiple Tx queues are enabled on 82xx series adapters. Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter.Himanshu Madhani8-35/+145
o using ethtool {set|get}_channel option, user can change number of Tx queues for 82xx Series adapter. o updated ethtool -S <ethX> option to display stats from each Tx queue. Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21qlcnic: Multi Tx queue support for 82xx Series adapter.Himanshu Madhani8-112/+487
o 82xx firmware allows support for multiple Tx queues. This patch will enable multi Tx queue support for 82xx series adapter. Max number of Tx queues supported will be 8. Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-21sfc: Refactor queue teardown sequence to allow for EF10 flush behaviourBen Hutchings9-48/+59
Currently efx_stop_datapath() will try to flush our DMA queues (if DMA is enabled), then finalise software and hardware state for each queue. However, for EF10 we must ask the MC to finalise each queue, which implicitly starts flushing it, and then wait for the flush events. We therefore need to delegate more of this to the NIC type. Combine all the hardware operations into a new NIC-type operation efx_nic_type::fini_dmaq, and call this before tearing down the software state and buffers for all the DMA queues. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Remove bogus call to efx_release_tx_buffers()Ben Hutchings1-11/+0
efx_unregister_netdev() should not call efx_release_tx_buffers() directly, as it is already done when closing the device: efx_net_stop() -> efx_stop_all() -> efx_stop_datapath() -> efx_fini_tx_queue() -> efx_release_tx_buffers(). (This was presumably a workaround for a race between efx_stop_all() and the data path that has since been properly fixed.) Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Stop RX refill before flushing RX queuesBen Hutchings4-9/+13
rx_queue::enabled guards refill, so rename it to reflect that. Clear it at the start of the queue teardown process rather than waiting for the RX queue to be flushed. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Limit scope of a Falcon A1 IRQ workaroundBen Hutchings3-10/+2
We unconditionally acknowledge legacy interrupts just before disabling them. This workaround is needed on Falcon A1 but probably not on later chips where the legacy interrupt mechanism is different. It was also originally done after the IRQ handler was removed, not before. Restore the original behaviour for Falcon A1 only by doing this acknowledgement in the efx_nic_type::fini operation. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Rework IRQ enable/disableBen Hutchings4-59/+112
There are many problems with the current efx_stop_interrupts() and efx_start_interrupts(): 1. On Siena, it is unsafe to disable the master IRQ enable bit (DRV_INT_EN_KER) while any IRQ sources are enabled. 2. On EF10 there is no master IRQ enable bit, so we cannot expect to defer IRQs without tearing down event queues. (Though I don't think we will need to keep any event queues around while the device is down, as we do for VFDI on Siena.) 3. synchronize_irq() only waits for a running IRQ handler to finish, not for any propagation through IRQ controllers. Therefore an IRQ may still be received and handled after efx_stop_interrupts() returns. IRQ handlers can then race with channel reallocation. To fix this: a. Introduce a software IRQ enable flag. So long as this is clear, IRQ handlers will only acknowledge IRQs and not touch the channel structures. b. Define a new struct efx_msi_context as the context for MSIs. This is never reallocated and is sufficient to find the software enable flag and the channel structure. It also includes the channel/IRQ name, which was previously separated out as it must also not be reallocated. c. Split efx_{start,stop}_interrupts() into efx_{,soft_}_{enable,disable}_interrupts(). The 'soft' functions don't touch the hardware master enable flag (if it exists) and don't reinitialise or tear down channels with the keep_eventq flag set. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Remove efx_process_channel_now()Ben Hutchings4-81/+3
efx_process_channel_now() is unneeded since self-tests can rely on normal NAPI polling. Remove it and all calls to it. efx_channel::work_pending and efx_channel_processed() are also unneeded (the latter being the same as efx_nic_eventq_read_ack()). Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Rename Falcon-architecture register definitionsBen Hutchings8-10/+10
The EF10 architecture has a very different register layout from previous controllers, so we'll use separate files for the two sets of register definitions. Use 'farch' as an abbreviation for Falcon-architecture. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Make struct efx_special_buffer less specialBen Hutchings2-43/+37
On EF10, the firmware is in charge of allocating buffer table entries. Change struct efx_special_buffer to use a struct efx_buffer member, so that it can be used with efx_nic_{alloc,free}_buffer() in that case. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Add GFP flags to efx_nic_alloc_buffer() and make most callers allow ↵Ben Hutchings9-14/+19
blocking Most call sites for efx_nic_alloc_buffer() are part of the probe or reconfiguration paths and can allocate with GFP_KERNEL. A few others should use GFP_NOIO (I think). Only one is in atomic context and must use the current GFP_ATOMIC. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Make MCDI independent of SienaBen Hutchings5-77/+157
Move the lowest layer (transport) of the current MCDI code to per-NIC-type operations. Introduce a new structure and efx_nic member for MCDI-specific data. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Make efx_mcdi_init() call efx_mcdi_handle_assertion()Ben Hutchings3-9/+6
This should probably be done during MCDI initialisation for any NIC. Change efx_mcdi_init() to return an error code. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Collect all MCDI port functions into mcdi_port.cBen Hutchings7-306/+242
Collect together MCDI port functions from mcdi.c, mcdi_mac.c, mcdi_phy.c and siena.c. Rename the 'siena' functions accordingly. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Move efx_mcdi_mac_reconfigure() to siena.c and renameBen Hutchings3-23/+22
EF10 does not include a multicast hash filter, so this function is specific to Siena. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Move siena_reset_hw() and siena_map_reset_reason() into MCDI moduleBen Hutchings3-31/+30
These implementations should work for EF10 too. Rename them accordingly. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Add and use MCDI_SET_QWORD() and MCDI_SET_ARRAY_QWORD()Ben Hutchings4-29/+34
No need to keep open-coding the assignment of high and low dwords. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Ensure MCDI buffers, but not lengths, are dword alignedBen Hutchings3-31/+46
We currently require that MCDI request and response lengths are multiples of 4 bytes, because we will copy dwords in and out of shared memory and we want to be sure we won't read or write out of bounds. But all we really need to know is that there is sufficient padding for that. Also, we should ensure that buffers are dword-aligned, as on some architectures misaligned access will result in data corruption or a crash. Change the buffer type to array-of-efx_dword_t and remove the requirement that the lengths are multiples of 4. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Use proper macros to declare and access MCDI arraysBen Hutchings6-94/+85
A few functions are using heap buffers; change them to use stack buffers as we really don't need to resort to the heap for a 252 byte buffer in process context. MC_CMD_MEMCPY is quite weird in that it can use inline data placed in the request buffer after the array of records. Thus there are two variable-length arrays and we can't use the normal accessors for the second. So we have to use _MCDI_PTR() in efx_sriov_memcpy(). Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Introduce and use MCDI_CTL_SDU_LEN_MAX_V1 macro for Siena-specific codeBen Hutchings2-4/+7
The MCDI version 2 protocol supports larger payloads, but will not be implemented on Siena. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Fill out the set of MCDI accessorsBen Hutchings1-10/+32
We need to access arrays of 16-bit words and 32-bit dwords in MCDI buffers based on the MCDI protocol definitions. We should also be able to read and write fields within structures, without specifying an array index each time. So add MCDI_FIELD() and make MCDI_ARRAY_FIELD() use it. Also add MCDI_SET_FIELD(). Split MCDI_ARRAY_PTR() into MCDI_ARRAY_STRUCT_PTR() and _MCDI_ARRAY_PTR(), which are currently identical but will diverge in later changes. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Rationalise MCDI buffer accessorsBen Hutchings1-26/+20
Add _MCDI_DWORD() which yields an lvalue for the given dword field and change MCDI_DWORD(), MCDI_SET_DWORD() and MCDI_QWORD() to use it. Fold the rather trivial MCDI_PTR2() into MCDI_PTR() and _MCDI_DWORD(). Remove MCDI_SET_DWORD2() and MCDI_QWORD2(). MCDI_DWORD2() should also go, but it still has one user which we'll get rid of later. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Introduce and use MCDI_DECLARE_BUF macroBen Hutchings7-56/+66
MCDI_DECLARE_BUF declares a variable as an MCDI buffer of the requested length, adding any necessary padding. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Move more Falcon-specific code and definitions into falcon.cBen Hutchings5-666/+538
In particular, fold in the whole of falcon_xmac.c. Drop some entirely unused definitions. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Move details of a Falcon bug workaround out of ethtool.cBen Hutchings5-23/+31
Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: Use efx_mcdi_mon() to find efx_mcdi_mon structure from efx_nicBen Hutchings1-2/+1
This needs to be done before we separate MCDI from siena_nic_data. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21sfc: const-qualify source pointers for MMIO write functionsBen Hutchings1-8/+10
Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21Merge branch 'sfc-3.11'Ben Hutchings1-1/+1
Merge sfc fixes destined for 3.11 so we can avoid conflicts with development for 3.12+.
2013-08-21sfc: Fix lookup of default RX MAC filters when steered using ethtoolBen Hutchings1-1/+1
commit 385904f819e3 ('sfc: Don't use efx_filter_{build,hash,increment}() for default MAC filters') used the wrong name to find the index of default RX MAC filters at insertion/ update time. This could result in memory corruption and would in any case silently fail to update the filter. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-21mac80211: add a flag to indicate CCK support for HT clientsFelix Fietkau3-3/+6
brcm80211 cannot handle sending frames with CCK rates as part of an A-MPDU session. Other drivers may have issues too. Set the flag in all drivers that have been tested with CCK rates. This fixes a reported brcmsmac regression introduced in commit ef47a5e4f1aaf1d0e2e6875e34b2c9595897bef6 "mac80211/minstrel_ht: fix cck rate sampling" Cc: [email protected] # 3.10 Reported-by: Tom Gundersen <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-08-21can: mcp251x: Allow tuning SPI mode and limit maximal SPI speedAlexander Shiyan1-1/+5
Patch allow to use different mode settings for SPI (MODE3 for example) and limit maximal speed according to IC datasheet. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2013-08-21can: mcp251x: Eliminate irq_flags from driver platform_dataAlexander Shiyan1-8/+1
Flags is not used by boards, so remove this field from the driver platform_data. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2013-08-21can: mcp251x: Replace power callbacks with regulator APIAlexander Shiyan1-40/+43
This patch replaces power callbacks to the regulator API. To improve the readability of the code, helper for the regulator enable/disable was added. Acked-by: Haojian Zhuang <[email protected]> Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2013-08-21net/phy: micrel: Add OF configuration support for ksz9021Sean Cross1-1/+102
Some boards require custom PHY configuration, for example due to trace length differences. Add the ability to configure these registers in order to get the PHY to function on boards that need it. Because PHYs are auto-detected based on MDIO device IDs, allow PHY configuration to be specified in the parent Ethernet device node if no PHY device node is present. Signed-off-by: Sean Cross <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-20net: cpsw: Add support for wake-on-lan for cpswMatus Ujhelyi1-0/+25
Some phy's can be configured to enable wake on lan (e.g. at803x or marvell 88E1318S). There is no way how to enable wol on CPSW with such connected phys. This patch adds this support. It is provided by calling the phy's related code. Tested on board with at8030x connected phy. Wol interrupt line is connected to GPIO0 on am335x. Signed-off-by: Matus Ujhelyi <[email protected]> Acked-by: Mugunthan V N <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-20drivers: net: cpsw: remove platform data header file of cpswMugunthan V N2-1/+43
CPSW driver no longer supports platform register as all the SoCs which has CPSW are supporting DT only booting, so moving cpsw.h header file from platform include to drivers/net/ethernet/ti Signed-off-by: Mugunthan V N <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-20bcm63xx_enet: replace devm_request_and_ioremap by devm_ioremap_resourceJulia Lawall1-5/+5
Use devm_ioremap_resource instead of devm_request_and_ioremap. This was done using the semantic patch scripts/coccinelle/api/devm_ioremap_resource.cocci The relevant call to platform_get_resource was manually moved down to the call to devm_ioremap_resource. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-20Merge branch 'for-davem' of ↵David S. Miller7-29/+37
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless John W. Linville says: ==================== Regarding the iwlwifi bits, Johannes says: "We revert an rfkill bugfix that unfortunately caused more bugs, shuffle some code to avoid touching the PCIe device before it's enabled and disconnect if firmware fails to do our bidding. I also have Stanislaw's fix to not crash in some channel switch scenarios." As for the mac80211 bits, Johannes says: "This time, I have one fix from Dan Carpenter for users of nl80211hdr_put(), and one fix from myself fixing a regression with the libertas driver." Along with the above... Dan Carpenter fixes some incorrectly placed "address of" operators in hostap that caused copying of junk data. Jussi Kivilinna corrects zd1201 to use an allocated buffer rather than the stack for a URB operation. ==================== Signed-off-by: David S. Miller <[email protected]>
2013-08-20net: davinci_mdio: use platform_{get,set}_drvdata()Libo Chen1-2/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <[email protected]> Acked-by: Mugunthan V N <[email protected]> Acked-by: Lad, Prabhakar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-20net: xilinx_emaclite: use platform_{get,set}_drvdata()Libo Chen1-2/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &of_dev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <[email protected]> Acked-by: Michal Simek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-20net: sunhme: use platform_{get,set}_drvdata()Libo Chen1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &of->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <[email protected]> Signed-off-by: David S. Miller <[email protected]>