summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-03-17ixgbe: always write DMA for single_mapped value with skbAlexander Duyck
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 <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Write gso_segs and bytcount to the ring soonerAlexander Duyck
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 <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Place skb on first buffer_info structure to avoid using stack spaceAlexander Duyck
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 <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Use packets to track Tx completions instead of a seperate valueAlexander Duyck
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 <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Modify setup of descriptor flags to avoid conditional jumpsAlexander Duyck
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 <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Make certain that all frames fit minimum size requirementsAlexander Duyck
This change makes certain that any packet we attempt to transmit will meet minimum size requirements for the hardware. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: cleanup logic in ixgbe_change_mtuAlexander Duyck
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 <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Replace standard receive path with a page based receiveAlexander Duyck
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 <alexander.h.duyck@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Support RX-ALL feature flag.Ben Greear
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 <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17ixgbe: Support sending custom Ethernet FCS.Ben Greear
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 <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17igb: Support RX-ALL feature flag.Ben Greear
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 <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-17igb: Support sending custom Ethernet FCS.Ben Greear
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 <greearb@candelatech.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-16eni: fix driver remove function and driver probe error path.françois romieu
- add eni_do_release() to balance eni_do_init - turn the zeroes DMA area into a per device data Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16net/irda: add clk_prepare/clk_unprepare to pxaficp_irPhilipp Zabel
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 <philipp.zabel@gmail.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16usbnet: use netif_tx_wake_queue instead of netif_start_queueAlexey Orishko
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 <sjur.brandeland@stericsson.com> Tested-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16stmmac: Add device-tree supportStefan Roese
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 <sr@denx.de> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16netxen: qlogic ethernet : Fix endian bug.Santosh Nayak
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 <santoshprasadnayak@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16pxa168: remove unused stats member.Rami Rosen
The patch removes unused stats member in pxa168 network driver. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16Merge branch 'master' of ↵John W. Linville
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 Orishko
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 <sjur.brandeland@stericsson.com> Tested-by: Dmitry Tarnyagin <Dmitry.Tarnyagin@stericsson.com> Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16cdc_ncm: fix MTU and max_datagram_size handlingAlexey Orishko
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 <sjur.brandeland@stericsson.com> Tested-by: Dmitry Tarnyagin <Dmitry.Tarnyagin@stericsson.com> Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16cdc_ncm: reduce driver latency in the data pathAlexey Orishko
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 <sjur.brandeland@stericsson.com> Tested-by: Dmitry Tarnyagin <Dmitry.Tarnyagin@stericsson.com> Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-16asix: asix_rx_fixup surgery to reduce skb truesizesEric Dumazet
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 <eric.dumazet@gmail.com> Cc: Aurelien Jacobs <aurel@gnuage.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Trond Wuellner <trond@chromium.org> Cc: Grant Grundler <grundler@chromium.org> Cc: Paul Stewart <pstew@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-15Merge branch 'master' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller
2012-03-15libertas: remove dump_survey implementationDaniel Drake
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 <dsd@laptop.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: remove unused initvalsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k: inline AR9271 1.0 INI overridesFelix Fietkau
Makes them more readable and reduces code size Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: remove iniModes_*_tx_gain_9271Felix Fietkau
Program tx gain through iniModesTxGain like on AR9287 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: clean up iniModesAdditionalFelix Fietkau
use iniModesFastClock for 5 ghz fast clock specific settings, and iniAdditional for clock/chip specific initval overrides Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: fix AR9380 register settings for channel 14Felix Fietkau
Program the ah->ini_japan2484 INI values which were left out by accident Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: fold ar9002_hw_cck_chan14_spread into mode regs initializationFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: remove iniCommon_*_cck_fir_coeff_9271Felix Fietkau
These arrays are unused Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: clean up ath9k_hw_setuprxdescFelix Fietkau
The ATH9K_HW_CAP_AUTOSLEEP check is bogus, the rx status area needs to be cleared on all non-EDMA PCI/AHB based chipsets anyway. Limit the memset to the rx status area to improve performance. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: remove ath9k_hw_gettxintrtxqsFelix Fietkau
The driver can just check the mask directly Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k: optimize register access functionsFelix Fietkau
By checking for NR_CPUS, the compiler can optimize out register access serialization code on non-SMP kernels Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: remove ath9k_hw_getdefantennaFelix Fietkau
The default antenna (as programmed by the INI file) is always 0 anyway. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: remove ath9k_hw_htc_resetinitFelix Fietkau
Automatically set the ah->htc_reset_init on init and after PHY disable. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: clean up tx completion interrupt handlingFelix Fietkau
TXQ_FLAG_TXOKINT_ENABLE and TXQ_FLAG_TXERRINT_ENABLE are always set and used together, and they share the same bitmask in enum ath9k_tx_queue_flags. Simplify the code that tests for these flags. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: simplify tx queue interrupt mask handlingFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15rt2x00: rt2800usb: limit tx queues lengthStanislaw Gruszka
TX status fifo is limited to 16 elements. When we send more frames than that, we can easily loose status, what is not good for rate scaling algorithm. On my testing the change does not degrade performance, actually make is slightly better. Additionally with the patch I can see much less various rt2x00 warnings in dmesg. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15rt2x00: rt2800usb: do not check packedid for aggregated framesStanislaw Gruszka
Tx statuses of aggregated subframes contain packetid of first subframe in the AMPDU. We can not identify AMPDU subframes based on packedid, so simply assume that status match first pending frame in the queue. Thats mostly the same what 2800pci do. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15rt2x00: rt2800usb: rework txstatus codeStanislaw Gruszka
Currently we read tx status register after each urb data transfer. As callback procedure also trigger reading, that causing we have many "threads" of reading status. To prevent that introduce TX_STATUS_READING flags, and check if we are already in process of sequential reading TX_STA_FIFO, before requesting new reads. Change timer to hrtimer, that make TX_STA_FIFO overruns less possible. Use 200 us for initial timeout, and then reschedule in 100 us period, this values probably have to be tuned. Make changes on txdone work. Schedule it from rt2800usb_tx_sta_fifo_read_completed() callback when first valid status show up. Check in callback if tx status timeout happens, and schedule work on that condition too. That make possible to remove tx status timeout from generic watchdog. I moved that to rt2800usb. Loop in txdone work, that should prevent situation when we queue work, which is already processed, and after finish work is not rescheduled again. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15rt2x00: rt2800usb: rework txdone codeStanislaw Gruszka
Patch change txdone code to make it similar like txdone in rt2800pci, process only one entry from queue matching tx status. Before we processed all pending entries from queue until PACKEDID match, that caused that we do not report tx statuses correctly. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15rt2x00: rt2800usb: move additional txdone into new functionStanislaw Gruszka
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k: Fix multi-VIF BSS handlingSujith Manoharan
mac80211 provides short preamble information and ERP protection information on a per-BSS basis, which can be used. Remove flags stored in the driver, which was incorrect since they were being used in a global manner. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k: Remove aggregation flagsSujith Manoharan
SC_OP_TXAGGR and SC_OP_RXAGGR are not really needed. The HT capabilities of the station and HW can be used instead. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k_hw: Cleanup FastChannelChangeSujith Manoharan
The logic to determine whether to use FCC is a bit convoluted. Use a small helper function to decide whether FCC is to be used. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k: Remove 'other' VIF countSujith Manoharan
It is not needed and will not be used anyway since unsupported interfaces are not allowed to be created. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k: Remove unused variablesSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15ath9k: Remove unnecessary initializationSujith Manoharan
There is no need to mask out SWBA/BMISS from the interrupt mask in start(). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>