aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2012-03-19be2net: Program secondary UC MAC address into MAC filterAjit Khaparde2-6/+53
Signed-off-by: Ajit Khaparde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-19be2net: enable WOL by default if h/w supports itAjit Khaparde5-17/+136
Signed-off-by: Ajit Khaparde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-19Merge branch 'gianfar-bql' of ↵David S. Miller3-10/+17
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
2012-03-19ixgbe: Correct flag values set by ixgbe_fix_featuresAlexander Duyck3-61/+54
This patch replaces the variable name data with the variable name features for ixgbe_fix_features and ixgbe_set_features. This helps to make some issues more obvious such as the fact that we were disabling Rx VLAN tag stripping when we should have been forcing it to be enabled when DCB is enabled. In addition there was deprecated code present that was disabling the LRO flag if we had the itr value set too low. I have updated this logic so that we will now allow the LRO flag to be set, but will not enable RSC until the rx-usecs value is high enough to allow enough time for Rx packet coalescing. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: Add support for enabling UDP RSS via the ethtool rx-flow-hash commandAlexander Duyck3-1/+160
This patch adds support for enabling or disabling UDP RSS via the ethtool -N rx-flow-hash command. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: Whitespace cleanupsAlexander Duyck1-10/+7
This patch contains several fixes for formatting in regards to whitespace. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: Two minor fixes for RSS and FDIR set queues functionsAlexander Duyck1-3/+1
This change fixes two minor issues. The first was the fact that we were setting the return value to false twice in the set_rss_queues function. The second is the fact that we should have been using "min_t(int," instead of "min((int)" in set_fdir_queues. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: drop err_eeprom tag which is at same location as err_sw_initAlexander Duyck1-3/+2
The err_eeprom and err_sw_init tags both go to the same location. So instead of maintaining two tags this patch combines them so we only use err_sw_init. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: Move poll routine in order to improve readabilityAlexander Duyck1-49/+49
This change relocates the ixgbe_poll routine so it is right next to the interrupt routine that schedules and calls it. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: cleanup logic for the service timer and VF hang detectionAlexander Duyck1-19/+10
This change just cleans up some of the logic in the service_timer function so that we can avoid unnecessary swapping of the ready value between true to false and back to true. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: Update layout of ixgbe_ring structure to improve cache performanceAlexander Duyck1-9/+9
This change makes it so that only the 2nd cache line in the ring structure should see frequent updates. The advantage to this is that it should reduce the amount of cross CPU cache bouncing since only the 2nd cache line will be changing between most network transactions. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-19ixgbe: Store Tx flags and protocol information to tx_buffer soonerAlexander Duyck3-51/+51
This change makes it so that we store the tx_flags and protocol information to the tx_buffer_info structure sooner. This allows us to avoid unnecessary read/write transactions since we are placing the data in the final location earlier. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller16-78/+93
2012-03-18gianfar: use netif_tx_queue_stopped instead of __netif_subqueue_stoppedPaul Gortmaker1-1/+1
The __netif_subqueue_stopped() just does the following: struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); return netif_tx_queue_stopped(txq); and since we already have the txq in scope, we can just call that directly in this case. Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]>
2012-03-17Merge branch 'master' of ↵David S. Miller6-628/+772
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
2012-03-17ixgbe: always write DMA for single_mapped value with skbAlexander Duyck2-118/+153
This change makes it so that we always write the DMA address for the skb itself on the same tx_buffer struct that the skb is written on. This way we don't need the MAPPED_AS_PAGE flag and we always know it will be the first DMA value that we will have to unmap. In addition I have found an issue in which we were leaking a DMA mapping if the value happened to be 0 which is possible on some platforms. In order to resolve that I have updated the transmit path to use the length instead of the DMA mapping in order to determine if a mapping is actually present. One other tweak in this patch is that it only writes the olinfo information on the first descriptor. As it turns out it isn't necessary to write it for anything but the first descriptor so there is no need to carry it forward. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17phc: Update author's email address.Richard Cochran2-2/+2
This commit brings the author email address macros up to date for four modules in the PTP Hardware Clock subsystem. Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-17ixgbe: Write gso_segs and bytcount to the ring soonerAlexander Duyck2-25/+21
This change makes it so that gso_segs and bytecount are written to the ring sooner. This helps to simplify the logic for the two since segmentation offloads can now update them within their own function. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: Place skb on first buffer_info structure to avoid using stack spaceAlexander Duyck3-29/+40
Instead of keeping a local copy of the skb on the stack for as long as long as we do it makes sense to instead just place it on the first tx_buffer structure so that we can save space on the stack and avoid unnecessary read/write operations copying the pointer out of the stack and onto the ring later. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: Use packets to track Tx completions instead of a seperate valueAlexander Duyck2-5/+1
A separate value was added to track Tx completions in order to determine if the Tx unit was hung. However we can do the same thing using the number of packets completed without having to add another stat to the Tx ring. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: Modify setup of descriptor flags to avoid conditional jumpsAlexander Duyck1-17/+17
This change makes it more likely that the descriptor flags setup will use cmov instructions instead of conditional jumps when setting up the flags. The advantage to this is that the code should just flow a bit more smoothly. To do this it is necessary to set the TX_FLAGS_CSUM bit in tx_flags when doing TSO so that we also do the checksum in addition to the segmentation offload. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: Make certain that all frames fit minimum size requirementsAlexander Duyck1-1/+17
This change makes certain that any packet we attempt to transmit will meet minimum size requirements for the hardware. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: cleanup logic in ixgbe_change_mtuAlexander Duyck1-8/+12
This change is meant to just cleanup the logic in ixgbe_change_mtu since we are making it unnecessarily complex due to a workaround required for 82599 when SR-IOV is enabled. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: Replace standard receive path with a page based receiveAlexander Duyck3-430/+457
This patch replaces the existing Rx hot-path in the ixgbe driver with a new implementation that is based on performing a double buffered receive. The ixgbe driver already had something similar in place for its' packet split path, however in that case we were still receiving the header for the packet into the sk_buff. The big change here is the entire receive path will receive into pages only, and then pull the header out of the page and copy it into the sk_buff data. There are several motivations behind this approach. First, this allows us to avoid several cache misses as we were taking a set of cache misses for allocating the sk_buff and then another set for receiving data into the sk_buff. We are able to avoid these misses on receive now as we allocate the sk_buff when data is available. Second we are able to see a considerable performance gain when an IOMMU is enabled because we are no longer unmapping every buffer on receive. Instead we can delay the unmap until we are unable to use the page, and instead we can simply call sync_single_range on the half of the page that contains new data. Finally we are able to drop a considerable amount of code from the driver as we no longer have to support 2 different receive modes, packet split and one buffer. This allows us to optimize the Rx path further since less branching is required. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Ross Brattain <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: Support RX-ALL feature flag.Ben Greear1-2/+23
This allows the NIC to receive all frames available, including those with bad FCS, ethernet control frames, and more. Tested by sending frames with bad FCS. Signed-off-by: Ben Greear <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17ixgbe: Support sending custom Ethernet FCS.Ben Greear1-0/+3
Including bad FCS, used generate frames with bad FCS to test other system's handling of RX of bad packets. Signed-off-by: Ben Greear <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17igb: Support RX-ALL feature flag.Ben Greear2-2/+33
This allows the NIC to receive all frames available, including those with bad FCS, un-matched vlans, ethernet control frames, and more. Tested by sending frames with bad FCS. Signed-off-by: Ben Greear <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-17igb: Support sending custom Ethernet FCS.Ben Greear1-0/+4
Including bad FCS, used generate frames with bad FCS to test other system's handling of RX of bad packets. Signed-off-by: Ben Greear <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-16net/irda: add clk_prepare/clk_unprepare to pxaficp_irPhilipp Zabel1-3/+3
This patch adds clk_prepare/clk_unprepare calls to the pxaficp_ir driver by using the helper functions clk_prepare_enable and clk_disable_unprepare. Signed-off-by: Philipp Zabel <[email protected]> Cc: Eric Miao <[email protected]> Cc: Haojian Zhuang <[email protected]> Cc: Samuel Ortiz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16usbnet: use netif_tx_wake_queue instead of netif_start_queueAlexey Orishko1-1/+1
If host is going to autosuspend function with two interfaces and if IP packet has arrived in-between of two usbnet_suspend() callbacks, i.e usbnet_resume() is called in-between, tx data flow is stopped. When autosuspend timer expires and device is put to autosuspend again, tx queue is waked up and data can be sent again. This behavior might be repeated several times in a row. Tested on Intel/ARM. Reviewed-by: Sjur Brændeland <[email protected]> Tested-by: Dmitry Tarnyagin <[email protected]> Signed-off-by: Alexey Orishko <[email protected]> Acked-by: Oliver Neukum <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16stmmac: Add device-tree supportStefan Roese1-2/+72
This patch adds support to configure the STMMAC ethernet driver via device-tree instead of platform_data. Currently, only the properties needed on SPEAr600 are provided. All other properties should be added once needed on other platforms. Signed-off-by: Stefan Roese <[email protected]> Cc: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16netxen: qlogic ethernet : Fix endian bug.Santosh Nayak3-9/+9
Change the datatype of "ip_addr" to __be32 as 'ip' should be in big endian format. Adapter needs "ip address" in big endian format stored at lower 32bit of req.word[1]. netxen_config_ipaddr() now receives 'ip' in big endian format. To satisfy adapter's need, use memcpy() to copy byte by byte of 'ip' into lower 32bit of req.word[1]. Mac address and serial number of adapter need to be in little endian format. Change the data type of the related variables to __le32 / __le64 or cast it explicitly to __le32 / __le64 depending upon the requirement. Signed-off-by: Santosh Nayak <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16pxa168: remove unused stats member.Rami Rosen1-1/+0
The patch removes unused stats member in pxa168 network driver. Signed-off-by: Rami Rosen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16net: qmi_wwan: add support for ZTE MF820DBjørn Mork1-0/+34
ZTE have yet to discover the magic of USB descriptors. These devices use ff/ff/ff for class/subclass/protocol regardless of function, except for usb-storage. Use an interface number whitelist to force the driver to bind only to the QMI/wwan interface. Signed-off-by: Bjørn Mork <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-03-16Merge branch 'master' of ↵John W. Linville112-3143/+3574
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/ath/ath9k/hw.c
2012-03-16cdc_ncm: avoid discarding datagrams in rx pathAlexey Orishko1-55/+47
Changes: - removed a limit for amount of datagrams for IN NTB - using pointer to traverse NTB in rx_fixup() - renamed "temp" to "len" in rx_fixup() - do NTB sequence number check in rx path Tested on Intel/ARM. Reviewed-by: Sjur Brændeland <[email protected]> Tested-by: Dmitry Tarnyagin <[email protected]> Signed-off-by: Alexey Orishko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16cdc_ncm: fix MTU and max_datagram_size handlingAlexey Orishko1-18/+16
Changes/fixes: - inform device if max_datagram_size was changed by host - max_datagram_size can't be bigger MTU in ETH func descr - fix constants definitions to enable running CAIF service over NCM Tested on Intel/ARM. Reviewed-by: Sjur Brændeland <[email protected]> Tested-by: Dmitry Tarnyagin <[email protected]> Signed-off-by: Alexey Orishko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16cdc_ncm: reduce driver latency in the data pathAlexey Orishko1-43/+51
Changes: - use high resolution timer latency became approx. 10-15 times less than before - use taklet for sending remaining data in tx path Tested on Intel/ARM. Reviewed-by: Sjur Brændeland <[email protected]> Tested-by: Dmitry Tarnyagin <[email protected]> Signed-off-by: Alexey Orishko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16wimax/i2400m: fix erroneous NETDEV_TX_BUSY useEric Dumazet1-20/+10
A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY, since caller is going to reuse freed skb. In fact netif_tx_stop_queue() / netif_stop_queue() is needed before returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop. In case of memory allocation error, only safe way is to drop the packet and return NETDEV_TX_OK Also increments tx_dropped counter Signed-off-by: Eric Dumazet <[email protected]> Cc: Inaky Perez-Gonzalez <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16net/hyperv: fix erroneous NETDEV_TX_BUSY useEric Dumazet1-2/+2
A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY, since caller is going to reuse freed skb. This is mostly a revert of commit bf769375c (staging: hv: fix the return status of netvsc_start_xmit()) In fact netif_tx_stop_queue() / netif_stop_queue() is needed before returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop. In case of memory allocation error, only safe way is to drop the packet and return NETDEV_TX_OK Signed-off-by: Eric Dumazet <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16net/usbnet: reserve headroom on rx skbsEric Dumazet1-2/+2
network drivers should reserve some headroom on incoming skbs so that we dont need expensive reallocations, eg forwarding packets in tunnels. This NET_SKB_PAD padding is done in various helpers, like __netdev_alloc_skb_ip_align() in this patch, combining NET_SKB_PAD and NET_IP_ALIGN magic. Signed-off-by: Eric Dumazet <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Acked-by: Oliver Neukum <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16bnx2x: fix memory leak in bnx2x_init_firmware()Michal Schmidt1-26/+24
When cycling the interface down and up, bnx2x_init_firmware() knows that the firmware is already loaded, but nevertheless it allocates certain arrays anew (init_data, init_ops, init_ops_offsets, iro_arr). The old arrays are leaked. Fix the leaks by returning early if the firmware was already loaded. Because if the firmware is loaded, so are the arrays. Signed-off-by: Michal Schmidt <[email protected]> Acked-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16bnx2x: fix a crash on corrupt firmware fileMichal Schmidt1-0/+1
If the requested firmware is deemed corrupt and then released, reset the pointer to NULL in order to avoid double-freeing it in bnx2x_release_firmware() or dereferencing it in bnx2x_init_firmware(). Signed-off-by: Michal Schmidt <[email protected]> Acked-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-16asix: asix_rx_fixup surgery to reduce skb truesizesEric Dumazet1-68/+20
asix_rx_fixup() is complex, and does some unnecessary memory copies (at least on x86 where NET_IP_ALIGN is 0) Also, it tends to provide skbs with a big truesize (4096+256 with MTU=1500) to upper stack, so incoming trafic consume a lot of memory and I noticed early packet drops because we hit socket rcvbuf too fast. Switch to a different strategy, using copybreak so that we provide nice skbs to upper stack (including the NET_SKB_PAD to avoid future head reallocations in some paths) With this patch, I no longer see packets drops or tcp collapses on various tcp workload with a AX88772 adapter. Signed-off-by: Eric Dumazet <[email protected]> Cc: Aurelien Jacobs <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Trond Wuellner <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Paul Stewart <[email protected]> Reviewed-by: Grant Grundler <[email protected]> Reviewed-by: Grant Grundler <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-15Merge branch 'master' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller1-4/+2
2012-03-15gianfar: delete orphaned version strings and dead macrosPaul Gortmaker2-6/+0
There were two version strings, and neither one was being used. Also in the same proximity were some unused #define that were left over from the past. Delete them all. Signed-off-by: Paul Gortmaker <[email protected]>
2012-03-15gianfar: constify giant block of status descriptor stringsPaul Gortmaker1-1/+1
Signed-off-by: Paul Gortmaker <[email protected]>
2012-03-15gianfar: Add support for byte queue limits.Paul Gortmaker1-3/+16
Add support for byte queue limits (BQL), based on the similar modifications made to intel/igb/igb_main.c from Eric Dumazet in commit bdbc063129e811264cd6c311d8c2d9b95de01231 "igb: Add support for byte queue limits." A local variable for tx_queue->qindex was introduced in gfar_clean_tx_ring, since it is now used often enough to warrant it, and it cleans up the readability somewhat as well. Signed-off-by: Paul Gortmaker <[email protected]>
2012-03-15libertas: remove dump_survey implementationDaniel Drake1-37/+0
libertas provides a dump_survey implementation based on reading of a RSSI value. However, this RSSI value is calculated based on the last received beacon from the associated AP - it is not a good way of surveying a channel in general, and even causes an error if the card is not associated to a network. As this is not appropriate as a survey, remove it. This fixes an issue where something in userspace is repeatedly calling site-survey during boot, resulting in many repeated errors as the RSSI value cannot be read before associating. Signed-off-by: Daniel Drake <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-03-15ath9k_hw: remove unused initvalsFelix Fietkau1-302/+0
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>