aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_ptp.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-22igb: Reset the link when EEE setting changedAkeem G Abodunrin1-1/+3
This patch resets the link, if link is up - whenever users enable or disable EEE Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22can: flexcan: use platform_set_drvdata()Libo Chen1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_set_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-08-22can: at91_can: use platform_set_drvdata()Libo Chen1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_set_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-08-22can: c_can: fix error checking of priv->instance in probe()Chen Gang1-1/+1
This patch adds a type cast from 'unsigned int' to 'int'. 'priv->instance' may less than zero, so need a type cast, the related warnings (allmodconfig, "EXTRA_CFLAGS=-W"): drivers/net/can/c_can/c_can_platform.c:198:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-08-21ARM: tegra: always enable USB VBUS regulatorsStephen Warren3-0/+8
This fixes a regression exposed during the merge window by commit 9f310de "ARM: tegra: fix VBUS regulator GPIO polarity in DT"; namely that USB VBUS doesn't get turned on, so USB devices are not detected. This affects the internal USB port on TrimSlice (i.e. the USB->SATA bridge, to which the SSD is connected) and the external port(s) on Seaboard/ Springbank and Whistler. The Tegra DT as written in v3.11 allows two paths to enable USB VBUS: 1) Via the legacy DT binding for the USB controller; it can directly acquire a VBUS GPIO and activate it. 2) Via a regulator for VBUS, which is referenced by the new DT binding for the USB controller. Those two methods both use the same GPIO, and hence whichever of the USB controller and regulator gets probed first ends up owning the GPIO. In practice, the USB driver only supports path (1) above, since the patches to support the new USB binding are not present until v3.12:-( In practice, the regulator ends up being probed first and owning the GPIO. Since nothing enables the regulator (the USB driver code is not yet present), the regulator ends up being turned off. This originally caused no problem, because the polarity in the regulator definition was incorrect, so attempting to turn off the regulator actually turned it on, and everything worked:-( However, when testing the new USB driver code in v3.12, I noticed the incorrect polarity and fixed it in commit 9f310de "ARM: tegra: fix VBUS regulator GPIO polarity in DT". In the context of v3.11, this patch then caused the USB VBUS to actually turn off, which broke USB ports with VBUS control. I got this patch included in v3.11-rc1 since it fixed a bug in device tree (incorrect polarity specification), and hence was suitable to be included early in the rc series. I evidently did not test the patch at all, or correctly, in the context of v3.11, and hence did not notice the issue that I have explained above:-( Fix this by making the USB VBUS regulators always enabled. This way, if the regulator owns the GPIO, it will always be turned on, even if there is no USB driver code to request the regulator be turned on. Even ignoring this bug, this is a reasonable way to configure the HW anyway. If this patch is applied to v3.11, it will cause a couple pretty trivial conflicts in tegra20-{trimslice,seaboard}.dts when creating v3.12, since the context right above the added lines changed in patches destined for v3.12. Reported-by: Kyle McMartin <kmcmarti@redhat.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2013-08-21net: phy: mdio-octeon: use platform_set_drvdata()Libo Chen1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_set_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: irda: pxaficp_ir: use platform_set_drvdata()Libo Chen1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using deva_set_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21hso: Fix stack corruption on some architecturesDaniel Gimpelevich1-1/+5
As Sergei Shtylyov explained in the #mipslinux IRC channel: [Mon 2013-08-19 12:28:21 PM PDT] <headless> guys, are you sure it's not "DMA off stack" case? [Mon 2013-08-19 12:28:35 PM PDT] <headless> it's a known stack corruptor on non-coherent arches [Mon 2013-08-19 12:31:48 PM PDT] <DonkeyHotei> headless: for usb/ehci? [Mon 2013-08-19 12:34:11 PM PDT] <DonkeyHotei> headless: explain [Mon 2013-08-19 12:35:38 PM PDT] <headless> usb_control_msg() (or other such func) should not use buffer on stack. DMA from/to stack is prohibited [Mon 2013-08-19 12:35:58 PM PDT] <headless> and EHCI uses DMA on control xfers (as well as all the others) Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21hso: Earlier catch of error conditionDaniel Gimpelevich1-4/+5
There is no need to get an interface specification if we know it's the wrong one. Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21stmmac: remove useless csum flagGiuseppe CAVALLARO2-3/+1
This patch removes the no_csum_insertion private parameter that is not used anymore and, also, the "likely" annotation from the condition that is not in a critical path. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21of: fdt: fix memory initialization for expanded DTWladislav Wiebe1-0/+2
Already existing property flags are filled wrong for properties created from initial FDT. This could cause problems if this DYNAMIC device-tree functions are used later, i.e. properties are attached/detached/replaced. Simply dumping flags from the running system show, that some initial static (not allocated via kzmalloc()) nodes are marked as dynamic. I putted some debug extensions to property_proc_show(..) : .. + if (OF_IS_DYNAMIC(pp)) + pr_err("DEBUG: xxx : OF_IS_DYNAMIC\n"); + if (OF_IS_DETACHED(pp)) + pr_err("DEBUG: xxx : OF_IS_DETACHED\n"); when you operate on the nodes (e.g.: ~$ cat /proc/device-tree/*some_node*) you will see that those flags are filled wrong, basically in most cases it will dump a DYNAMIC or DETACHED status, which is in not true. (BTW. this OF_IS_DETACHED is a own define for debug purposes which which just make a test_bit(OF_DETACHED, &x->_flags) If nodes are dynamic kernel is allowed to kfree() them. But it will crash attempting to do so on the nodes from FDT -- they are not allocated via kzmalloc(). Signed-off-by: Wladislav Wiebe <wladislav.kw@gmail.com> Acked-by: Alexander Sverdlin <alexander.sverdlin@nsn.com> Cc: stable@vger.kernel.org Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-08-21net: emac: remove unnecessary dev_set_drvdata()Libo Chen1-2/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: davinci_mdio: remove unnecessary dev_set_drvdata()Libo Chen1-2/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: xilinx_emaclite: remove unnecessary dev_set_drvdata()Libo Chen1-1/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: sunhme: remove unnecessary dev_set_drvdata()Libo Chen1-2/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: sunbmac: remove unnecessary dev_set_drvdata()Libo Chen1-2/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata()Libo Chen1-1/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: ucc_geth: remove unnecessary dev_set_drvdata()Libo Chen1-1/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21net: fsl_pq_mdio: remove unnecessary dev_set_drvdata()Libo Chen1-2/+0
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21tun: Get skfilter layoutPavel Emelyanov2-0/+11
The only thing we may have from tun device is the fprog, whic contains the number of filter elements and a pointer to (user-space) memory where the elements are. The program itself may not be available if the device is persistent and detached. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21tun: Allow to skip filter on attachPavel Emelyanov2-5/+8
There's a small problem with sk-filters on tun devices. Consider an application doing this sequence of steps: fd = open("/dev/net/tun"); ioctl(fd, TUNSETIFF, { .ifr_name = "tun0" }); ioctl(fd, TUNATTACHFILTER, &my_filter); ioctl(fd, TUNSETPERSIST, 1); close(fd); At that point the tun0 will remain in the system and will keep in mind that there should be a socket filter at address '&my_filter'. If after that we do fd = open("/dev/net/tun"); ioctl(fd, TUNSETIFF, { .ifr_name = "tun0" }); we most likely receive the -EFAULT error, since tun_attach() would try to connect the filter back. But (!) if we provide a filter at address &my_filter, then tun0 will be created and the "new" filter would be attached, but application may not know about that. This may create certain problems to anyone using tun-s, but it's critical problem for c/r -- if we meet a persistent tun device with a filter in mind, we will not be able to attach to it to dump its state (flags, owner, address, vnethdr size, etc.). The proposal is to allow to attach to tun device (with TUNSETIFF) w/o attaching the filter to the tun-file's socket. After this attach app may e.g clean the device by dropping the filter, it doesn't want to have one, or (in case of c/r) get information about the device with tun ioctls. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21tun: Report whether the queue is attached or notPavel Emelyanov1-0/+3
Multiqueue tun devices allow to attach and detach from its queues while keeping the interface itself set on file. Knowing this is critical for the checkpoint part of criu project. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21tun: Add ability to create tun device with given indexPavel Emelyanov2-1/+21
Tun devices cannot be created with ifidex user wants, but it's required by checkpoint-restore project. Long time ago such ability was implemented for rtnl_ops-based interface for creating links (9c7dafbf net: Allow to create links with given ifindex), but the only API for creating and managing tuntap devices is ioctl-based and is evolving with adding new ones (cde8b15f tuntap: add ioctl to attach or detach a file form tuntap device). Following that trend, here's how a new ioctl that sets the ifindex for device, that _will_ be created by TUNSETIFF ioctl looks like. So those who want a tuntap device with the ifindex N, should open the tun device, call ioctl(fd, TUNSETIFINDEX, &N), then call TUNSETIFF. If the index N is busy, then the register_netdev will find this out and the ioctl would be failed with -EBUSY. If setifindex is not called, then it will be generated as before. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-21sfc: Do not assume efx_nic_type::ev_fini is idempotentBen Hutchings2-0/+7
efx_fini_eventq() needs to be idempotent but EF10 firmware is picky about queue states. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: EFX_WORKAROUND_ALWAYS is really specific to Falcon-architectureBen Hutchings3-36/+19
The workarounds that currently use EFX_WORKAROUND_ALWAYS are in Falcon-specific or Falcon-arch-specific code, so get rid of the conditions altogether. Add/move comments as appropriate. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Get rid of per-NIC-type phys_addr_channels and mem_map_sizeBen Hutchings4-32/+37
EF10 functions don't have a fixed BAR size, and the minimum is not large enough for all the queues we might want to allocate. We have to find out the BAR size at run-time, and therefore phys_addr_channels and mem_map_size cannot be defined per-NIC-type. Change efx_nic_type::mem_map_size to a function pointer which is called to find the wanted memory map size (before probe). Replace efx_nic_type::phys_addr_channels with efx_nic::max_channels, to be initialised by the probe function. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Update and improve kernel-doc for efx_mcdi_state & efx_mcdi_ifaceBen Hutchings1-11/+9
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Fix race in completion handlingBen Hutchings1-15/+10
When we poll for MCDI request completion, we don't hold the interface lock while setting the response fields in struct efx_mcdi_iface. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Add support for MCDI v2Ben Hutchings6-55/+127
MCDI v2 adds a second header dword with wider command and length fields. It also defines extra error codes. Change the fallback error number for unknown MCDI error codes from EIO to EPROTO. EIO is treated as indicating the MCDI transport has failed and we need to reset the function, which is rather drastic. v2 error codes and lengths don't fit into completion events, so for a v2-capable transport, always read the response header rather then using the event fields. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Update MCDI protocol definitions for EF10Ben Hutchings3-342/+5196
EF10 controllers do not have shared memory for communication with the MC; instead it reads requests and writes responses in host memory, which allows for longer messages. It is also responsible for all datapath control operations and hardware resource allocation, which requires a large number of new commands and adds more possible error cases. MCDI v2 extends the message header to support this. Update the MCDI protocol definition header to include v2 lengths, errors and messages, and a few definitions specific to the SFC9100 family (codenames Farmingdale and Huntington) which is the first generation of EF10. Some messages have been extended, so adjust the code accordingly: - The request for MC_CMD_DRV_ATTACH now includes a datapath firmware ID. This is ignored by Siena but we should fill it in anyway, initially always specifying low-latency datapath. - The response for MC_CMD_GET_LOOPBACK_MODES now includes a 40G field. Accept shorter responses that don't include it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Translate MCDI error numbers received in eventsBen Hutchings2-29/+37
Currently we only translate error codes in efx_mcdi_poll(), but we also need to do so in efx_mcdi_ev_cpl(). The reason we didn't notice before is that the MC firmware error codes are mostly taken from Unix/Linux and no translation is necessary on most architectures. Make sure we notice any future failure by changing the sign of resprc (matching the kernel convention) and BUG if it's ever positive at command completion. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
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 <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <eugenia@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <bhutchings@solarflare.com>
2013-08-21qlcnic: Update version to 5.3.48Himanshu Madhani1-2/+2
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <shahed.shaikh@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <bhutchings@solarflare.com>
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 <bhutchings@solarflare.com>
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 <bhutchings@solarflare.com>
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 <bhutchings@solarflare.com>
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 <bhutchings@solarflare.com>
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 <bhutchings@solarflare.com>
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 <bhutchings@solarflare.com>
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 <bhutchings@solarflare.com>