aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2014-08-27ARM: 8130/1: cpuidle/cpuidle-big_little: fix reading cpu id part numberJuri Lelli1-10/+3
Commit af040ffc9ba1 ("ARM: make it easier to check the CPU part number correctly") changed ARM_CPU_PART_X masks, and the way they are returned and checked against. Usage of read_cpuid_part_number() is now deprecated, and calling places updated accordingly. This actually broke cpuidle-big_little initialization, as bl_idle_driver_init() performs a check using an hardcoded mask on cpu_id. Create an interface to perform the check (that is now even easier to read). Define also a proper mask (ARM_CPU_PART_MASK) that makes this kind of checks cleaner and helps preventing bugs in the future. Update usage accordingly. Signed-off-by: Juri Lelli <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Russell King <[email protected]>
2014-08-27parisc: dino: fix %d confusingly prefixed with 0x in format stringHans Wennborg1-1/+1
Signed-off-by: Hans Wennborg <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2014-08-27drm/i915: don't warn if backlight unexpectedly enabledScot Doyle1-4/+4
BIOS or firmware can modify hardware state during suspend/resume, for example on the Toshiba CB35 or Lenovo T400, so log a debug message instead of a warning if the backlight is unexpectedly enabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80930 Cc: Jani Nikula <[email protected]> Signed-off-by: Scot Doyle <[email protected]> Signed-off-by: Jani Nikula <[email protected]>
2014-08-27HID: picolcd: sanity check report size in raw_event() callbackJiri Kosina1-0/+6
The report passed to us from transport driver could potentially be arbitrarily large, therefore we better sanity-check it so that raw_data that we hold in picolcd_pending structure are always kept within proper bounds. Cc: [email protected] Reported-by: Steven Vittitoe <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2014-08-27HID: magicmouse: sanity check report size in raw_event() callbackJiri Kosina1-0/+10
The report passed to us from transport driver could potentially be arbitrarily large, therefore we better sanity-check it so that magicmouse_emit_touch() gets only valid values of raw_id. Cc: [email protected] Reported-by: Steven Vittitoe <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2014-08-26usb: ehci/ohci-exynos: Fix PHY getting sequenceVivek Gautam2-45/+42
Since we want to keep support for both older usb-phys as well as the newer generic phys, lets first get the generic PHYs and fallback to older USB-PHYs only when we fail to get the former. This should fix the issue with ehci-exynos and ohci-exynos, wherein in the absence of SAMSUNG_USB2PHY config symbol, we end up getting the NOP_USB_XCEIV phy when the same is enabled. And thus the PHYs are not configured properly. Reported-by: Sachin Kamat <[email protected]> Signed-off-by: Vivek Gautam <[email protected]> Cc: Alan Stern <[email protected]> Cc: Jingoo Han <[email protected]> Tested-by: Sachin Kamat <[email protected]> Acked-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-26usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1Roger Quadros1-1/+5
If user specifies that USB autosuspend must be disabled by module parameter "usbcore.autosuspend=-1" then we must prevent autosuspend of USB hub devices as well. commit 596d789a211d introduced in v3.8 changed the original behaivour and stopped respecting the usbcore.autosuspend parameter for hubs. Fixes: 596d789a211d "USB: set hub's default autosuspend delay as 0" Cc: [3.8+] <[email protected]> Signed-off-by: Roger Quadros <[email protected]> Tested-by: Michael Welling <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-26Input: elantech - add support for trackpoint found on some v3 modelsUlrik De Bie2-9/+130
Some elantech v3 touchpad equipped laptops also have a trackpoint, before this commit, these give sync errors. With this patch, the trackpoint is provided as another input device: 'Elantech PS/2 TrackPoint' The patch will also output messages that do not follow the expected pattern. In the mean time I've seen 2 unknown packets occasionally: 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 0x00 , 0x00 , 0x00 , 0x02 , 0x00 , 0x00 I don't know what those are for, but they can be safely ignored. Currently all packets that are not known to v3 touchpad and where packet[3] (the fourth byte) lowest nibble is 6 are now recognized as PACKET_TRACKPOINT and processed by the new elantech_report_trackpoint. This has been verified to work on a laptop Lenovo L530 where the touchpad/trackpoint combined identify themselves as: psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x350f02) psmouse serio1: elantech: Synaptics capabilities query result 0xb9, 0x15, 0x0c. Reviewed-by: David Herrmann <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Ulrik De Bie <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-08-26Input: elantech - reset the device when elantech probe failsUlrik De Bie1-0/+1
elantech_init() calls elantech_set_absolute_mode which sets the driver in an absolute mode. When after this the elantech_init fails, it is best to turn the ps/2 mouse emulation mode back on by calling psmouse_reset() so that it can work as a regular mouse. Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Ulrik De Bie <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-08-26Input: ALPS - suppress message about 'Unknown touchpad'Dmitry Torokhov1-2/+2
When we fail to match data returned by E7 and EC reports we state that we found "Unknown ALPS touchpad" whereas it is most likely it is not ALPS touchpad at all. Change wording a bit and reduce the message to debug so that it does not litter users logs and confuse them. Reported-by: Paul Menzel <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-08-26thunderbolt: Clear hops before overwritingAndreas Noever1-1/+20
Zero hops in tb_path_activate before writing a new path. This fixes the following scenario: - Boot with a coldplugged device - Unplug device - Plug device back in - PCI hotplug fails The hotplug operation fails because our new path matches the (now defunct) path which was setup by the firmware for the coldplugged device. By writing zeros before writing our path configuration we can force thunderbolt to retrain the path. Signed-off-by: Andreas Noever <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-26Merge branch 'for-linus' of ↵Linus Torvalds2-4/+18
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - wire up the system calls seccomp, getrandom and memfd_create - use static system information as input to add_device_randomness - .. and three bug fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/sclp: remove unnecessary XTABS flag s390/3215: fix tty output containing tabs s390: wire up memfd_create syscall s390: add system information as device randomness s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL s390: wire up seccomp and getrandom syscalls
2014-08-26USB: sisusb: add device id for Magic Control USB videoStephen Hemminger1-0/+1
I have a j5 create (JUA210) USB 2 video device and adding it device id to SIS USB video gets it to work. Signed-off-by: Stephen Hemminger <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-26regmap: Fix handling of volatile registers for format_write() chipsMark Brown1-1/+1
A previous over-zealous factorisation of code means that we only treat registers as volatile if they are readable. For most devices this is fine since normally most registers can be read and volatility implies readability but for format_write() devices where there is no readback from the hardware and we use volatility to mean simply uncacheability this means that we end up treating all registers as cacheble. A bigger refactoring of the code to clarify this is in order but as a fix make a minimal change and only check readability when checking volatility if there is no format_write() operation defined for the device. Signed-off-by: Mark Brown <[email protected]> Tested-by: Lars-Peter Clausen <[email protected]> Cc: [email protected]
2014-08-26drm/radeon: handle broken disabled rb mask gracefully (6xx/7xx) (v2)Alex Deucher2-33/+16
This is a port of cedb655a3a7764c3fd946077944383c9e0e68dd4 to older asics. Fixes a possible divide by 0 if the harvest register is invalid. v2: drop some additional harvest munging. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2014-08-26drm/radeon: save/restore the PD addr on suspend/resumeChristian König4-9/+37
This fixes a problem with GPU resets and TLB flushes on SI/CIK. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2014-08-26ata: ahci_tegra: Read calibration fuseMikko Perttunen1-4/+10
The original version of the driver did not read the SATA calibration fuse to remove the dependency to the fuse driver. The fuse driver is now merged, so add this functionality. The calibration fuse contains a 2-bit value used to pick a set of calibration values for the SATA pad. Signed-off-by: Mikko Perttunen <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2014-08-26drm/msm: Fix missing unlock on error in msm_fbdev_create()Wei Yongjun1-1/+1
Add the missing unlock before return from function msm_fbdev_create() in the error handling case. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2014-08-26drm/msm: fix compile error for non-dt buildsRob Clark1-2/+1
Signed-off-by: Rob Clark <[email protected]>
2014-08-26drm/msm/mdp4: request vblank during modesetRob Clark1-0/+2
This avoids a problem seen with weston (for example) where the display gets stuck in "black screen" if starting weston first thing after boot. Possibly mdp5 needs something similar. The downstream android fbdev driver always requests DMA_E (or DMA_P) when display is active, rather than only enabling it on-demand as the drm driver does, which I believe has the same end result. Signed-off-by: Rob Clark <[email protected]>
2014-08-26drm/msm: avoid flood of kernel logs on faultsRob Clark1-2/+2
87e956e9 changed the fault handler to return -ENOSYS, which causes the iommu driver to print out a huge splat. Which wouldn't be quite so bad if nothing ever faulted. But seems like some EXA composite operations generate quite a lot of (seemingly harmless) faults. That is probably a userspace problem, but the huge increase in verbosity from iommu fault dumps makes things kind of unusable. We probably should actually log *some* message (not conditional on drm.debug). But ratelimit it. Signed-off-by: Rob Clark <[email protected]>
2014-08-26video: da8xx-fb: preserve display width when changing HSYNCIan Abbott1-1/+1
When looking at this driver for a client, I noticed the code that configures the HSYNC pulse clobbers the display width in the same register. It only preserves the MS part of the width in bit 3 and zeros the LS part of the width in bits 9 to 4. This doesn't matter during initialization as the width is configured afterwards, but subsequent use of the FBIPUT_HSYNC ioctl would clobber the width. Preserve bits 9 to 0 of LCD_RASTER_TIMING_0_REG when configuring the horizontal sync. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2014-08-26drm: sti: Add missing dependency on RESET_CONTROLLERJingoo Han1-0/+1
Add missing dependency on RESET_CONTROLLER in order to fix the following build error. drivers/gpu/drm/sti/sti_hdmi.c: In function 'sti_hdmi_probe' drivers/gpu/drm/sti/sti_hdmi.c:780:2: error: implicit declaration of function 'devm_reset_control_get' [-Werror=implicit-function-declaration] Benjamin Gaignard remark: I have change "depends on" to "select" but keep the original author name. Signed-off-by: Jingoo Han <[email protected]>
2014-08-26drm: sti: Make of_device_id array constKiran Padwal3-3/+3
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Kiran Padwal <[email protected]>
2014-08-26drm: sti: Fix return value check in sti_drm_platform_probe()Wei Yongjun1-2/+2
In case of error, the function platform_device_register_resndata() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]>
2014-08-26drm: sti: hda: fix return value check in sti_hda_probe()Wei Yongjun1-4/+4
In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <[email protected]>
2014-08-26drm: sti: hdmi: fix return value check in sti_hdmi_probe()Wei Yongjun1-4/+4
In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <[email protected]>
2014-08-26drm: sti: tvout: fix return value check in sti_tvout_probe()Wei Yongjun1-2/+2
In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <[email protected]>
2014-08-26drm/i915: Move intel_ddi_set_vc_payload_alloc(false) to haswell_crtc_disable()Ville Syrjälä1-4/+3
Somehow the intel_ddi_set_vc_payload_alloc(false) call has ended up in ironlake_crtc_disable() rather than haswell_crtc_disable(). Move it to the correct place. intel_ddi_disable_transcoder_func() already disables the vc payload allocation so this doesn't actually do anything more. The spec says we should wait for some kind of ack after frobbing the bit. We don't appear to do that currently, but if and when someone decides that we should do it, intel_ddi_set_vc_payload_alloc() would appear to be be the right place for it. So having the function call in haswell_crtc_disable() seems like the right thing for the future even if it does nothing currently. Cc: Dave Airlie <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Jani Nikula <[email protected]>
2014-08-26drm/i915: fix plane/cursor handling when runtime suspendedPaulo Zanoni1-0/+24
If we're runtime suspended and try to use the plane interfaces, we will get a lot of WARNs saying we did the wrong thing. We need to get runtime PM references to pin the objects, and to change the fences. The pin functions are the ideal places for this, but intel_crtc_cursor_set_obj() doesn't call them, so we also have to add get/put calls inside it. There is no problem if we runtime suspend right after these functions are finished, because the registers written are forwarded to system memory. Note: for a complete fix of the cursor-dpms test case, we also need the patch named "drm/i915: Don't try to enable cursor from setplane when crtc is disabled". v2: - Narrow the put/get calls on intel_crtc_cursor_set_obj() (Daniel) v3: - Make get/put also surround the fence and unpin calls (Daniel and Ville). - Merge all the plane changes into a single patch since they're the same fix. - Add the comment requested by Daniel. v4: - Remove spurious whitespace (Ville). v5: - Remove intel_crtc_update_cursor() chunk since Ville did an equivalent fix in another patch (Ville). v6: - Remove unpin chunk: it will be on a separate patch (Ville, Chris, Daniel). v7: - Same thing, new color. Testcase: igt/pm_rpm/cursor Testcase: igt/pm_rpm/cursor-dpms Testcase: igt/pm_rpm/legacy-planes Testcase: igt/pm_rpm/legacy-planes-dpms Testcase: igt/pm_rpm/universal-planes Testcase: igt/pm_rpm/universal-planes-dpms Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82603 Cc: [email protected] Signed-off-by: Paulo Zanoni <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Jani Nikula <[email protected]>
2014-08-26drm/i915: Ignore VBT backlight presence check on Acer C720 (4005U)Scot Doyle1-0/+3
commit c675949ec58ca50d5a3ae3c757892f1560f6e896 Author: Jani Nikula <[email protected]> Date: Wed Apr 9 11:31:37 2014 +0300 drm/i915: do not setup backlight if not available according to VBT prevents backlight setup on the Acer C720 (Core i3 4005U CPU), which has a misconfigured VBT. Apply quirk to ignore the VBT backlight presence check during backlight setup. Signed-off-by: Scot Doyle <[email protected]> Tested-by: Tyler Cleveland <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] (3.15+) Signed-off-by: Jani Nikula <[email protected]>
2014-08-26video: of: display_timing: double free on errorDan Carpenter1-0/+1
The display_timings_release() function frees "disp" and we free it again on the next line. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2014-08-26drivers: video: fbdev: atmel_lcdfb.c: fix error return codeJulia Lawall1-0/+2
Convert a zero return value on error to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2014-08-26video: ARM CLCD: Fix calculation of bits-per-pixelJon Medhurst (Tixy)1-5/+18
If the device-tree specifies a max-memory-bandwidth property then the CLCD driver uses that to calculate the bits-per-pixel supported, however, this calculation is faulty for two reasons. 1. It doesn't ensure that the result is a sane value, i.e. a power of 2 and <= 32 as the rest of the code assumes. 2. It uses the displayed resolution and calculates the average bandwidth across the whole frame. It should instead calculate the peak bandwidth based on the pixel clock. This patch fixes both the above. Signed-off-by: Jon Medhurst <[email protected]> Acked-by: Pawel Moll <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2014-08-26fbdev: Remove __init from chips_hw_init() to fix build failurePranith Kumar1-1/+1
Fix build failure caused as follows: The function chipsfb_pci_init() references the function __init chips_hw_init(). This is often because chipsfb_pci_init lacks a __init annotation or the annotation of chips_hw_init is wrong. make: *** [drivers] Error 2 by removing the __init annotation from chips_hw_init(). The other thing that could have been done was annotating chipsfb_pci_init(). But that cannot be done since chipsfb_pci_init() is called from non __init functions. Signed-off-by: Pranith Kumar <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2014-08-26iommu/vt-d: Check return value of acpi_bus_get_device()Joerg Roedel1-2/+1
Checking adev == NULL is not sufficient as acpi_bus_get_device() might not touch the value of this parameter in an error case, so check the return value directly. Fixes: ed40356b5fcf1ce28e026ab39c5b2b6939068b50 Cc: David Woodhouse <[email protected]> Signed-off-by: Joerg Roedel <[email protected]> Reviewed-by: Alex Williamson <[email protected]>
2014-08-26iommu/core: Make iommu_group_get_for_dev() more robustJoerg Roedel1-3/+5
When a non-PCI device is passed to that function it might pass group == NULL to iommu_group_add_device() which then dereferences it and cause a crash this way. Fix it by just returning an error for non-PCI devices. Fixes: 104a1c13ac66e40cf8c6ae74d76ff14ff24b9b01 Cc: Alex Williamson <[email protected]> Acked-by: Alex Williamson <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
2014-08-26regmap: Fix regcache debugfs initializationLars-Peter Clausen3-6/+9
Commit 6cfec04bcc05 ("regmap: Separate regmap dev initialization") moved the regmap debugfs initialization after regcache initialization. This means that the regmap debugfs directory is not created yet when the cache initialization runs and so any debugfs files registered by the regcache are created in the debugfs root directory rather than the debugfs directory of the regmap instance. Fix this by adding a separate callback for the regcache debugfs initialization which will be called after the parent debugfs entry has been created. Fixes: 6cfec04bcc05 (regmap: Separate regmap dev initialization) Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2014-08-25mvneta: Add missing if_vlan.h include.David S. Miller1-0/+1
drivers/net/ethernet/marvell/mvneta.c: In function 'mvneta_skb_tx_csum': drivers/net/ethernet/marvell/mvneta.c:1374:3: error: implicit declaration of function 'vlan_get_protocol' [-Werror=implicit-function-declaration] __be16 l3_proto = vlan_get_protocol(skb); ^ Reporeted-by: Stephen Rothwell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25xen-netback: move netif_napi_add before binding interruptWei Liu1-3/+3
Interrupt is enabled when bind_interdomain_evtchn_to_irqhandler returns. If there's interrupt pending interrupt handler is invoked. NAPI needs to be initialised before binding interrupt otherwise the interrupt handler will try to scheduling a NAPI instance that is not initialised yet, resulting in kernel OOPS. This fixes a regression introduced in ea2c5e13 ("xen-netback: move NAPI add/remove calls"). Ideally function calls to create kthreads should also be moved before binding but I intent to fix this regression with minimal changes and refactor the code with another patch. Reported-by: Thomas Leonard <[email protected]> Signed-off-by: Wei Liu <[email protected]> Cc: Ian Campbell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25qlge: Fix TSO for non-accelerated vlan trafficVlad Yasevich1-2/+3
This device claims TSO support for vlans. It also allows a user to control vlan acceleration offloading. As such, it is possible to turn off vlan acceleration and configure a vlan which will continue to send TSO traffic. In such situation the packet passed down the the device will contain a vlan header and skb->protocol will be set to ETH_P_8021Q. The device assumes that skb->protocol contains network protocol value and uses that value to set up TSO information. This results in corrupted frames sent on the wire. This patch extracts the protocol value correctly by using a vlan_get_protocol() helper and corrects corrupt TSO frames. CC: Shahed Shaikh <[email protected]> CC: Jitendra Kalsaria <[email protected]> CC: Ron Mercer <[email protected]> CC: [email protected] Signed-off-by: Vladislav Yasevich <[email protected]> Acked-by: Shahed Shaikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25mvneta: Fix TSO and checksum for non-acceleration vlan trafficVlad Yasevich1-3/+4
This driver doesn't appear to support vlan acceleration at all. However, it does claim to support TSO and IP checksums for vlan devices. Thus any configured vlan device would end up passing down partial checksums or TSO frames. The driver also uses the value from skb->protocol to determine TSO and checksum offload information, but assumes that skb->protocol holds the l3 protocol information. As a result, vlan traffic with partial checksums or TSO will fail those checks and TSO will not happen. Fix this by using vlan_get_protocol() helper. CC: Thomas Petazzoni <[email protected]> Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25i40evf: Fix TSO and hw checksums for non-accelerated vlan packets.Vlad Yasevich1-1/+1
This device claims TSO and checksum support for vlans. It also allows a user to control vlan acceleration offloading. As such, it is possible to turn off vlan acceleration and configure a vlan which will continue to support TSO and hw checksums. In such situation the packet passed down the the device will contain a vlan header and skb->protocol will be set to ETH_P_8021Q. The device assumes that skb->protocol contains network protocol value and uses that value to set up TSO and checksum information. This results in corrupted frames sent on the wire. This patch extract the protocol value correctly and corrects TSO and checksums for non-accelerated traffic. Fix this by using vlan_get_protocol() helper. CC: Jeff Kirsher <[email protected]> CC: Jesse Brandeburg <[email protected]> CC: Bruce Allan <[email protected]> CC: Carolyn Wyborny <[email protected]> CC: Don Skidmore <[email protected]> CC: Greg Rose <[email protected]> CC: Alex Duyck <[email protected]> CC: John Ronciak <[email protected]> CC: Mitch Williams <[email protected]> CC: Linux NICS <[email protected]> CC: [email protected] Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25i40e: Fix TSO and hw checksums for non-accelerated vlan packets.Vlad Yasevich1-1/+1
This device claims TSO and checksum support for vlans. It also allows a user to control vlan acceleration offloading. As such, it is possible to turn off vlan acceleration and configure a vlan which will continue to support TSO and hw checksums. In such situation the packet passed down the the device will contain a vlan header and skb->protocol will be set to ETH_P_8021Q. The device assumes that skb->protocol contains network protocol value and uses that value to set up TSO and checksum information. This results in corrupted frames sent on the wire. This patch extract the protocol value correctly and corrects TSO and checksums for non-accelerated traffic. Fix this by using vlan_get_protocol() helper. CC: Jeff Kirsher <[email protected]> CC: Jesse Brandeburg <[email protected]> CC: Bruce Allan <[email protected]> CC: Carolyn Wyborny <[email protected]> CC: Don Skidmore <[email protected]> CC: Greg Rose <[email protected]> CC: Alex Duyck <[email protected]> CC: John Ronciak <[email protected]> CC: Mitch Williams <[email protected]> CC: Linux NICS <[email protected]> CC: [email protected] Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25ehea: Fix TSO and hw checksums with non-accelerated vlan packets.Vlad Yasevich1-1/+1
The driver claims that it can do TSO and IP checksums on vlan devices and also allows user to control vlan acceleration offloading. This makes it possible to push traffic to this driver that has TSO or partial checksums set, but also have a non-accelearted vlan header. In this case, the driver will fail to correctly identify such traffic and will not correctly perform segmentation and checksum calculation. Fix this by using vlan_get_protocol() helper instead of assuming skb->protocol always has this information. CC: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25bna: Support TSO and partial checksum with non-accelerated vlans.Vlad Yasevich1-3/+4
This device claims TSO and checksum support for vlans. It also allows a user to control vlan acceleration offloading. As such, it is possible to turn off vlan acceleration and configure a vlan which will continue to support TSO. In such situation the packet passed down the the device will contain a vlan header and skb->protocol will be set to ETH_P_8021Q. The device assumes that skb->protocol contains network protocol value and uses that value to set up TSO information. This results in corrupted frames sent on the wire. This patch extract the protocol value correctly and corrects TSO and checksums for non-accelerated traffic. CC: Rasesh Mody <[email protected]> Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25e1000: Fix TSO for non-accelerated vlan trafficVlad Yasevich1-8/+11
This device claims TSO and checksum support for vlans. It also allows a user to control vlan acceleration offloading. As such, it is possible to turn off vlan acceleration and configure a vlan which will continue to support TSO. In such situation the packet passed down the the device will contain a vlan header and skb->protocol will be set to ETH_P_8021Q. The device assumes that skb->protocol contains network protocol value and uses that value to set up TSO and checksum information. This will results in corrupted frames sent on the wire. This patch extract the protocol value correctly and corrects TSO for non-accelerated traffic. CC: Jeff Kirsher <[email protected]> CC: Jesse Brandeburg <[email protected]> CC: Bruce Allan <[email protected]> CC: Carolyn Wyborny <[email protected]> CC: Don Skidmore <[email protected]> CC: Greg Rose <[email protected]> CC: Alex Duyck <[email protected]> CC: John Ronciak <[email protected]> CC: Mitch Williams <[email protected]> CC: Linux NICS <[email protected]> CC: [email protected] Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25e1000e: Fix TSO with non-accelerated vlansVlad Yasevich1-12/+9
This device claims TSO support for vlans. It also allows a user to control vlan acceleration offloading. As such, it is possible to turn off vlan acceleration and configure a vlan which will continue to support TSO. In such situation the packet passed down the the device will contain a vlan header and skb->protocol will be set to ETH_P_8021Q. The device assumes that skb->protocol contains network protocol value and uses that value to set up TSO information. This results in corrupted frames sent on the wire. Corruptions include incorrect IP total length and invalid IP checksum. This patch extract the protocol value correctly and corrects TSO for non-accelerated traffic. CC: Jeff Kirsher <[email protected]> CC: Jesse Brandeburg <[email protected]> CC: Bruce Allan <[email protected]> CC: Carolyn Wyborny <[email protected]> CC: Don Skidmore <[email protected]> CC: Greg Rose <[email protected]> CC: Alex Duyck <[email protected]> CC: John Ronciak <[email protected]> CC: Mitch Williams <[email protected]> CC: Linux NICS <[email protected]> CC: [email protected] Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25net: moxa: continue loop on skb allocation failureJonas Jensen1-7/+5
If netdev_alloc_skb_ip_align() fails, subsequent code will try to dereference an invalid pointer. Continue to next descriptor on error. While we're at it, 1. eliminate the chance of an endless loop, replace the main loop with while(rx < budget) 2. use napi_complete() and remove the explicit napi_gro_flush() Signed-off-by: Jonas Jensen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-08-25net: moxa: synchronize DMA memoryJonas Jensen1-0/+6
DMA memory should be synchronized before data is passed to/from controller. Add dma_sync_single_for_cpu(.., DMA_FROM_DEVICE) to RX path and dma_sync_single_for_device(.., DMA_TO_DEVICE) to TX path. Signed-off-by: Jonas Jensen <[email protected]> Signed-off-by: David S. Miller <[email protected]>