aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-29net/cadence/macb: fix invalid 0 return if no phy is discovered on mii initBoris BREZILLON1-3/+3
Replace misleading -1 (-EPERM) by a more appropriate return code (-ENXIO) in macb_mii_probe function. Save macb_mii_probe return before branching to err_out_unregister to avoid erronous 0 return. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29net: mdio-sun4i: Convert to devm_* apiJisheng Zhang1-9/+9
Use devm_ioremap_resource instead of of_iomap() and devm_kzalloc() instead of kmalloc() to make cleanup paths simpler. This patch also fixes the resource leak caused by missing corresponding iounamp() of the of_iomap(). Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-nextDavid S. Miller20-1326/+1536
Ben Hutchings says: ==================== 1. Further cleanup and refactoring in preparation for EF10. 2. Remove ethtool stats that are always zero on Falcon boards. 3. Add an ethtool stat for merged TX completions. 4. Prepare to support merged RX completions. 5. Prepare to support more hwmon sensors. 6. Add support for new events that are generated by EF10 firmware. 7. Update MC reboot detection for EF10. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29qlcnic: underflow in qlcnic_validate_max_tx_rings()Dan Carpenter2-2/+2
This function checks the upper bound but it doesn't check for negative numbers: if (txq > QLCNIC_MAX_TX_RINGS) { I've solved this by making "txq" a u32 type. I chose that because ->tx_count in the ethtool_channels struct is a __u32. This bug was added in aa4a1f7df7 ('qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter.'). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29xen-netback: rename functionsWei Liu3-133/+134
As we move to 1:1 model and melt xen_netbk and xenvif together, it would be better to use single prefix for all functions in xen-netback. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29xen-netback: switch to NAPI + kthread 1:1 modelWei Liu3-507/+351
This patch implements 1:1 model netback. NAPI and kthread are utilized to do the weight-lifting job: - NAPI is used for guest side TX (host side RX) - kthread is used for guest side RX (host side TX) Xenvif and xen_netbk are made into one structure to reduce code size. This model provides better scheduling fairness among vifs. It is also prerequisite for implementing multiqueue for Xen netback. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29xen-netback: remove page tracking facilityWei Liu1-75/+2
The data flow from DomU to DomU on the same host in current copying scheme with tracking facility: copy DomU --------> Dom0 DomU | ^ |____________________________| copy The page in Dom0 is a page with valid MFN. So we can always copy from page Dom0, thus removing the need for a tracking facility. copy copy DomU --------> Dom0 -------> DomU Simple iperf test shows no performance regression (obviously we copy twice either way): W/ tracking: ~5.3Gb/s W/o tracking: ~5.4Gb/s Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-nextDavid S. Miller17-1767/+2118
Ben Hutchings says: ==================== More refactoring and cleanup, particularly around filter management. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27sfc: Use extended MC_CMD_SENSOR_INFO and MC_CMD_READ_SENSORSBen Hutchings1-44/+95
We need to use extended requests to read and get metadata for sensors numbered > 31. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Return an error code when a sensor is busy.Alexandre Rames1-1/+6
[bwh: Also name this new state, though we don't expect to see it in an event] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Add support for reading packet length from prefixBen Hutchings2-2/+14
Define a flag for struct efx_rx_buffer and efx_rx_packet() that indicates packet length must be read from the prefix. If this is set, read the length in __efx_rx_packet() (when the prefix should have arrived in cache). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Add TX merged completion counterBen Hutchings3-0/+6
Add a counter for TX merged completion events. This is implemented in the common TX path, because the NIC event handlers only know how many descriptors were completed, not how many packets. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Generalise packet hash lookup to support EF10 RX prefixJon Cooper6-13/+28
EF10 uses an entirely different RX prefix format from Falcon-arch. Extend struct efx_nic_type to describe this. [bwh: Also replace the magic numbers used for the Falcon-arch RX prefix] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Rename EFX_PAGE_BLOCK_SIZE to EFX_VI_PAGE_SIZE and adjust commentsBen Hutchings1-4/+4
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Remove early call to efx_nic_type::reconfigure_mac in efx_reset_up()Ben Hutchings1-2/+0
efx_reset_up() calls efx_nic_type::reconfigure_mac once directly, then again through efx_start_all() -> efx_start_port() -> efx->type->reconfigure_mac(). This first call is also made too early to work properly on EF10. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: use MCDI epoch flag to improve MC reboot detection in the driverDaniel Pieczko2-6/+15
The Huntington MC will reject all MCDI requests after an MC reboot until it sees one with the NOT_EPOCH flag clear. This flag is set by default for all requests, and then cleared on the first request after we detect that an MC reboot has occurred. The old MCDI_STATUS_DELAY_COUNT gave a timeout of 10ms, which was not long enough for the driver to detect that a reboot had occurred based on the warm boot count while calling efx_mcdi_poll_reboot() from the loop in efx_mcdi_ev_death(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Add EF10 support for TX/RX DMA error events handling.Alexandre Rames5-11/+15
Also, since we handle all DMA errors in the same way, merge RESET_TYPE_(RX|TX)_DESC_FETCH into RESET_TYPE_DMA_ERROR. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Add a function pointer to abstract write of host time into NIC shared memoryLaurence Evans3-2/+16
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: PTP MCDI requests need to initialise periph ID fieldLaurence Evans1-0/+7
This field is ignored by Siena firmware but is significant to EF10 firmware. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Delegate MAC/NIC statistic description to efx_nic_typeBen Hutchings8-389/+498
Various hardware statistics that are available for Siena are unavailable or meaningless for Falcon. Huntington adds further to the NIC-type-specific statistics, as it has different MAC blocks from Falcon/Siena. All NIC types still provide most statistics by DMA, and use little-endian byte order. Therefore: 1. Add some general utility functions for reporting hardware statistics, efx_nic_describe_stats() and efx_nic_update_stats(). 2. Add an efx_nic_type::describe_stats operation to get the number and names of statistics, implemented using efx_nic_describe_stats() 3. Change efx_nic_type::update_stats to store the core statistics (struct rtnl_link_stats64) or full statistics (array of u64) in a caller-provided buffer. Use efx_nic_update_stats() to aid in the implementation. 4. Rename struct efx_ethtool_stat to struct efx_sw_stat_desc and EFX_ETHTOOL_NUM_STATS to EFX_ETHTOOL_SW_STAT_COUNT. 5. Remove efx_nic::mac_stats and struct efx_mac_stats. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Remove driver-local struct ethtool_stringBen Hutchings1-24/+13
It's not really helpful to pretend ethtool string arrays are structured. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Remove more left-overs from Falcon GMAC supportBen Hutchings3-18/+6
We only ever used the XMAC (10G link speed) in production. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Move MTD operations into efx_nic_typeBen Hutchings9-831/+807
Merge the per-NIC-type MTD probe selection and struct efx_mtd_ops into struct efx_nic_type. Move the implementations into the appropriate source files. Several NVRAM functions are now only called from MTD operations which are now implemented in the same file (falcon.c or mcdi.c). There is no need for them to be extern, or to be defined at all if CONFIG_SFC_MTD is not enabled, so move them into the #ifdef CONFIG_SFC_MTD sections in those files. Most of the SPI-related definitions are also only used in falcon.c, so move them there. Put the remainder of spi.h into nic.h (which previously included it). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27e1000e: balance semaphore put/get for 82573Steven La1-0/+5
Steven (cc-ed) noticed an imbalance in semaphore put/get for 82573-based NICs. Don't we need something like the following (untested) patch? Signed-off-by: Steven La <sla@riverbed.com> Acked-by: Arthur Kepner <akepner@riverbed.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27bna: firmware update to 3.2.1.1Rasesh Mody1-2/+2
This patch updates the firmware to address the thermal notification issue Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27VMXNET3: Add support for virtual IOMMUAndy King2-83/+138
This patch adds support for virtual IOMMU to the vmxnet3 module. We switch to DMA consistent mappings for anything we pass to the device. There were a few places where we already did this, but using pci_blah(); these have been fixed to use dma_blah(), along with all new occurrences where we've replaced kmalloc() and friends. Also fix two small bugs: 1) use after free of rq->buf_info in vmxnet3_rq_destroy() 2) a cpu_to_le32() that should have been a cpu_to_le64() Acked-by: George Zhang <georgezhang@vmware.com> Acked-by: Aditya Sarwade <asarwade@vmware.com> Signed-off-by: Andy King <acking@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27be2net: implement ethtool set/get_channel hooksSathya Perla3-32/+104
Support is provided only for combined channels. When SR-IOV is not enabled, BE3 supports upto 16 channels and Lancer-R/SH-R support upto 32 channels. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27be2net: refactor be_setup() to consolidate queue creation routinesSathya Perla2-58/+50
1) Move be_cmd_if_create() above queue create routines to allow TXQ creation (that requires if_handle) to be clubbed with TX-CQ creation. 2) Consolidate all queue create routines into be_setup_queues() Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27be2net: Fix be_cmd_if_create() to use MBOX if MCCQ is not createdSathya Perla1-24/+85
Currently the IF_CREATE FW cmd is issued only *after* MCCQ is created as it was coded to only use MCCQ. By fixing this, cmd_if_create() can be called before MCCQ is created and the same routine for VF provisioning can be called after. This allows for consolidating all the queue create routines by moving the be_cmd_if_create() call above all queue create calls in be_setup(). Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27be2net: refactor be_get_resources() codeSathya Perla6-189/+229
1) use be_resources{} struct to query/store HW resource limits 2) The HW queue/resource limits for BE2/BE3 chips are mostly called out in driver as constants. Code to handle this is scattered across various places in be_setup(). Consolidate this code into BEx_get_resources(). For Lancer-R, Skyhawk-R, these limits are queried from FW. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27be2net: Fixup profile management routinesVasundhara Volam2-59/+88
1) Parse PCIe descriptor for max-VFs supported by HW 2) Cleanup NIC descriptor parsing in get_func/profile_config() routines 3) Use common struct definitions for v0 and v1 versions of GET_FUNC_CONFIG Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27be2net: use EQ_CREATEv2 for SH-RSathya Perla4-39/+18
EQ_CREATEv2 explicitly returns the msix-index associated with a EQ. For SH-R this is needed if EQs need to be deleted and re-created without resetting a function. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27qlcnic: Update version to 5.3.49.Sucheta Chakraborty1-2/+2
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27qlcnic: dcb: Add support for CEE Netlink interface.Sucheta Chakraborty4-1/+629
o Adapter and driver supports only CEE dcbnl ops. Only GET callbacks within dcbnl ops are supported currently. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27qlcnic: dcb: Register DCB AEN handler.Sucheta Chakraborty7-2/+137
o Adapter sends Asynchronous Event Notifications to the driver when there are changes in the switch or adapter DCBX configuration. AEN handler updates the driver DCBX parameters. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27qlcnic: dcb: Get DCB parameters from the adapter.Sucheta Chakraborty7-2/+278
o Populate driver data structures with local, operational, and peer DCB parameters. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27qlcnic: dcb: Query adapter DCB capabilities.Sucheta Chakraborty12-0/+345
o Query adapter DCB capabilities and populate local data structures with relevant information. o Add QLCNIC_DCB to Kconfig for enabling/disabling DCB. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-27Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-nextDavid S. Miller21-2581/+7788
Ben Hutchings says: ==================== 1. Refactoring and cleanup in preparation for new hardware support. 2. Some bug fixes for firmware completion handling. (They're not known to cause real problems, otherwise I'd be submitting these for net and stable.) 3. Update to the firmware protocol (MCDI) definitions. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller18-93/+170
Conflicts: drivers/net/wireless/iwlwifi/pcie/trans.c include/linux/inetdevice.h The inetdevice.h conflict involves moving the IPV4_DEVCONF values into a UAPI header, overlapping additions of some new entries. The iwlwifi conflict is a context overlap. Signed-off-by: David S. Miller <davem@davemloft.net>
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-08-25bonding: fix error return code in bond_enslave()Wei Yongjun1-1/+2
Fix to return a negative error code in the add bond vlan ids error handling case instead of 0, as done elsewhere in this function. Introduced by commit 1ff412ad7714f6952f76ffd77f0a7f2f563288a1. (bonding: change the bond's vlan syncing functions with the standard ones) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-25Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-nextDavid S. Miller20-1278/+1130
Merge SFC driver changes from Ben Hutchings. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22fs_enet: cleanup clock API useGerhard Sittig1-0/+20
make the Freescale ethernet driver get, prepare and enable the FEC clock during probe(); disable and unprepare the clock upon remove(), put is done by the devm approach; hold a reference to the clock over the period of use. clock lookup is non-fatal as not all platforms provide clock specs in their device tree; failure to enable specified clocks is fatal. Signed-off-by: Gerhard Sittig <gsi@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22fs_enet: silence a build warning (unused variable)Gerhard Sittig1-1/+0
Since commit 720a43efd30f04a0a492c85fb997361c44fbae05 (drivers:net: Remove unnecessary OOM messages after netdev_alloc_skb) there is a build warning: drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c: In function 'tx_skb_align_workaround': drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c:586:26: warning: unused variable 'fep' Fix it. Signed-off-by: Gerhard Sittig <gsi@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next into cpswDavid S. Miller3-3/+3
Marc Kleine-Budde says: ==================== another pull-request for net-next. It consists of two patches by Libo Chen, the at91 and flexcan driver make use of platform_set_drvdata() rather than open coding it. Chen Gang improves the error checking in the c_can_platform driver's probe function. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22net: ethernet: davinci_cpdma: export cpdma_chan_get_statsDaniel Mack1-0/+1
This is needed when the cpsw driver is built as module. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22be2net: fix disabling TX in be_close()Sathya Perla1-1/+1
commit fba875591 ("disable TX in be_close()") disabled TX in be_close() to protect be_xmit() from touching freed up queues in the AER recovery flow. But, TX must be disabled *before* cleaning up TX completions in the close() path, not after. This allows be_tx_compl_clean() to free up all TX-req skbs that were notified to the HW. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22ethernet: broadcom: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22ethernet: moxa: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22Merge branch 'sfc-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfcDavid S. Miller1-1/+1
Merge in a fix for RX MAC address filter programming bug in the sfc driver. Signed-off-by: David S. Miller <davem@davemloft.net>