aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-22Merge tag 'devicetree-fixes-for-3.11' of git://sources.calxeda.com/kernel/linuxLinus Torvalds1-0/+2
Pull device tree fix from Rob Herring: "For DT unflattening, add missing memory initialization. This is needed for arches like PPC that use memblock_alloc. This appears to have been an issue for some time, but is a somewhat limited usecase of OF_DYNAMIC" * tag 'devicetree-fixes-for-3.11' of git://sources.calxeda.com/kernel/linux: of: fdt: fix memory initialization for expanded DT
2013-08-22Merge tag 'dm-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dmLinus Torvalds1-9/+7
Pull device mapper fix from Mike Snitzer: "A patch to fix dm-cache-policy-mq's remove_mapping() conflict with sparc32" * tag 'dm-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm cache: avoid conflicting remove_mapping() in mq policy
2013-08-22e1000e: resolve checkpatch JIFFIES_COMPARISON warningBruce Allan1-1/+1
WARNING:JIFFIES_COMPARISON: Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22e1000e: Avoid kernel crash during shutdownLi Zhang1-0/+7
While doing shutdown on the PCI device, the corresponding callback function e1000e_shutdown() is trying to clear those correctable errors on the upstream P2P bridge. Unfortunately, we don't have the upstream P2P bridge under some cases (e.g. PCI-passthrou for KVM on Power). That leads to kernel crash eventually. The patch adds one more check on that to avoid kernel crash. Signed-off-by: Li Zhang <zhlcindy@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22e1000e: Add code to check for failure of pci_disable_link_state callCarolyn Wyborny1-26/+59
This patch attempts to work around a problem found with some systems where the call to pci_diable_link_state_locked() fails. As a result, ASPM is not, in fact, disabled. Changing disable ASPM code to check if state actually is disabled after the call and, if not, try another way to disable it. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Acked-by: Bruce W. Allan <bruce.w.allan@intel.com> Tested-by: Pavel Machek <pavel@ucw.cz> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22e1000e: cleanup whitespace in recent commitBruce Allan1-1/+2
Commit (c96ddb0b e1000e: Use marco instead of digit for defining e1000_rx_desc_packet_split) moved a define from one file to another but missed using proper indentation/whitespace. CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Expose RSS indirection table for ethtoolLaura Mihaela Vasilescu3-21/+97
This patch adds the ethtool callbacks necessary to change the RETA indirection table from userspace. In order to achieve this, we add the indirection table field (rss_indir_tbl) in the board specific data structure (struct igb_adapter) to preserve the values across hardware resets. The indirection table must be initialized with default values in the following cases: * at module init time * when the number of RX queues changes. For this reason we add a new field (rss_indir_tbl_init) in igb_adapter that keeps track of the number of RX queues. Whenever the number of RX queues changes, the rss_indir_tbl is modified and initialized with default values. The rss_indir_tbl_init is updated accordingly. CC: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Laura Mihaela Vasilescu <laura.vasilescu@rosedu.org> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Add macro for size of RETA indirection tableLaura Mihaela Vasilescu2-1/+3
RETA indirection table is used to assign the received data to a CPU in order to maintain an efficient distribution of network receive processing across multiple CPUs. This patch removes the hard-coded value for the size of the indirection table and defines a new macro. Signed-off-by: Laura Mihaela Vasilescu <laura.vasilescu@rosedu.org> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Fix get_fw_version function for all partsCarolyn Wyborny4-44/+93
This patch fixes issues found with older parts and older NVM tools in the display of the version in ethtool. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Add device support for flashless SKU of i210 deviceCarolyn Wyborny4-2/+19
This patch adds the specific device id support for versions of i210 that do not have flash installed. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Refactor NVM read functions to accommodate devices with no flashCarolyn Wyborny4-60/+77
This patch refactors NVM read functions in order to accommodate i210 devices that do not have a flash. Previously, this was not supported on i210 devices. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Refactor of init_nvm_paramsCarolyn Wyborny5-65/+92
This patch refactors the init_nvm_params functions for 82575 and adds a new function for the i210/i211 devices in order to configure separately the NVM functionality for the i210/i211 family. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Update MTU so that it is always at least a standard frame sizeAlexander Duyck1-0/+4
This change makes it so that we limit the lower bound for max_frame_size to the size of a standard Ethernet frame. This allows for feature parity with other Intel based drivers such as ixgbe. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: don't allow SR-IOV without MSI-XMitch A Williams1-0/+5
MSI-X interrupts are required for SR-IOV operation. Check to make sure they're enabled before allowing the user to turn on VFs. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-08-22igb: Added rcu_lock to avoid raceAkeem G Abodunrin1-1/+4
This patch adds rcu_lock to avoid possible race condition with igb_update_stats function accessing the rings in free_ q_vector. CC: Eric Dumazet <edumazet@google.com> 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-22igb: Read register for latch_on without return valueAkeem G Abodunrin3-19/+12
This patch changes register read to "just-read" without returning a value for hardware to accurately latch the register value. 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-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-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-21Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller1-49/+49
Marc Kleine-Budde says: ==================== this pull-request for net-next consists of a series by Alexander Shiyan, he cleans up the mcp251x driver. As the first patch touches arch/arm/mach-pxa, it's acked by Haojian Zhuang. ==================== 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-21Merge tag 'stable/for-linus-3.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tipLinus Torvalds1-1/+12
Pull Xen bug-fixes from Konrad Rzeszutek Wilk: - On ARM did not have balanced calls to get/put_cpu. - Fix to make tboot + Xen + Linux correctly. - Fix events VCPU binding issues. - Fix a vCPU online race where IPIs are sent to not-yet-online vCPU. * tag 'stable/for-linus-3.11-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/smp: initialize IPI vectors before marking CPU online xen/events: mask events when changing their VCPU binding xen/events: initialize local per-cpu mask for all possible events x86/xen: do not identity map UNUSABLE regions in the machine E820 xen/arm: missing put_cpu in xen_percpu_init
2013-08-21Merge tag 'pinctrl-for-v3.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrlLinus Torvalds2-4/+64
Pull pinctrl fixes from Linus Walleij: "Fixes for the sunxi (AllWinner) pin control driver. This was a new driver in this merge window, so some post-merge hardening is happening" [ I had completely missed this pull request for some reason, it was sent over a week ago but my mailbox is chaotic ] * tag 'pinctrl-for-v3.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sunxi: Add spinlocks pinctrl: sunxi: Fix gpio_set behaviour pinctrl: sunxi: Read register before writing to it in irq_set_type
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 Emelyanov1-0/+10
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 Emelyanov1-5/+7
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 Emelyanov1-1/+20
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>