summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-06-29drm/amdgpu: correct define SMU_EnabledFeatureScoreboard_SclkDpmOnSonny Jiang
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: allocate ip_block_enabled memory in common codeAlex Deucher
Remove duplication across asic families and make it symmetric with the freeing of the code in amdgpu_device.c Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: remove unnecessary check before kfreeManinder Singh
kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: use kzalloc for allocating one thingManinder Singh
Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/radeon: fix adding all VAs to the freed list on remove v2Christian König
We only should do so when the BO_VA was actually mapped. Otherwise we get a nice error message on the next CS. v2: It actually doesn't matter if it was invalidated or not, if it was mapped we need to clear the area where it was mapped. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> (v1) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: add chunk id validity checkChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: fix crash on invalid CS IOCTLChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: reset wptr at cp compute resume (v2)Sonny Jiang
This patch is to resolve compute hang at resume time. v2: (agd5f) squash in second fix Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-29drm/amdgpu: check VCE feedback and bitstream indexChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: make VCE handle check more strictChristian König
Port of radeon commit 29c63fe22a17c64e54016040cd882481bd45ee5a. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: check VCE relocation buffer rangeChristian König
port of radeon commit 2fc5703abda201f138faf63bdca743d04dbf4b1a. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: silence invalid error messageChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: fix wrong typemonk.liu
Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-29drm/amdgpu: print the bo_list in the CS trace point as wellChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/amdgpu: add amdgpu_bo_list_set trace pointChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/amdgpu: add BO map/unmap trace pointChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/amdgpu: simplify fence debugfs output a bitChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/radeon: SDMA fix hibernation (CI GPU family).Jérôme Glisse
In order for hibernation to reliably work we need to properly turn off the SDMA block, sadly after numerous attemps i haven't not found proper sequence for clean and full shutdown. So simply reset both SDMA block, this makes hibernation works reliably on sea island GPU family (CI) Hibernation and suspend to ram were tested (several times) on : Bonaire Hawaii Mullins Kaveri Kabini Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/radeon: compute ring fix hibernation (CI GPU family) v2.Jérôme Glisse
In order for hibernation to reliably work we need to cleanup more thoroughly the compute ring. Hibernation is different from suspend resume as when we resume from hibernation the hardware is first fully initialize by regular kernel then freeze callback happens (which correspond to a suspend inside the radeon kernel driver) and turn off each of the block. It turns out we were not cleanly shutting down the compute ring. This patch fix that. Hibernation and suspend to ram were tested (several times) on : Bonaire Hawaii Mullins Kaveri Kabini Changed since v1: - Factor the ring stop logic into a function taking ring as arg. Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: Configure doorbell to maximum slotsBen Goz
Signed-off-by: Ben Goz <ben.goz@amd.com> Acked-by: Oded Gabbay <oded.gabbay@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: Initialize compute sdma and memory from kgdBen Goz
v2: add missing MTYPE_NONCACHED enum Signed-off-by: Ben Goz <ben.goz@amd.com> Acked-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/radeon: use kzalloc for allocating one thingManinder Singh
Use kzalloc for allocating one thing rather than kcalloc(1... The semantic patch that makes this change is as follows: // <smpl> @@ @@ - kcalloc(1, + kzalloc( ...) // </smpl> Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: fix hpd range check in dce_v8_0_hpd_irq()Alex Deucher
Spotted by Dan Carpenter. This is a slight variant of his fix. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29HID: picoLCD: Deletion of unnecessary checks before three function callsMarkus Elfring
The functions backlight_device_unregister(), lcd_device_unregister() and rc_unregister_device() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jiri Kosina <jkosina@suse.com>
2015-06-29HID: microsoft: Add quirk for MS Surface Type/Touch coverReyad Attiyat
The newer firmware on MS Surface 2 tablets causes the type and touch cover keyboards to timeout when waiting for reports. The quirk HID_QUIRK_NO_INIT_REPORTS allows them to function normally. Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-06-29drm/i915: fix backlight after resume on 855gmJani Nikula
Some 855gm models (at least ThinkPad X40) regressed because of commit b0cd324faed23d10d66ba6ade66579c681feef6f Author: Jani Nikula <jani.nikula@intel.com> Date: Wed Nov 12 16:25:43 2014 +0200 drm/i915: don't save/restore backlight hist ctl registers which tried to make our driver more robust by not blindly saving and restoring registers, but it failed to take into account commit 0eb96d6ed38430b72897adde58f5477a6b71757a Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Oct 14 12:33:41 2009 -0700 drm/i915: save/restore BLC histogram control reg across suspend/resume Fix the regression by enabling hist ctl on gen2. v2: Improved the comment. v3: Improved the comment, again. Reported-and-tested-by: Philipp Gesang <phg@phi-gamma.net> References: http://mid.gmane.org/20150623222648.GD12335@acheron Fixes: b0cd324faed2 ("drm/i915: don't save/restore backlight hist ctl registers") Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: stable@vger.kernel.org Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-06-29agp/intel: Fix typo in needs_ilk_vtd_wa()Chris Wilson
In needs_ilk_vtd_wa(), we pass in the GPU device but compared it against the ids for the mobile GPU and the mobile host bridge. That latter is impossible and so likely was just a typo for the desktop GPU device id (which is also buggy). Fixes commit da88a5f7f7d434e2cde1b3e19d952e6d84533662 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Feb 13 09:31:53 2013 +0000 drm/i915: Disable WC PTE updates to w/a buggy IOMMU on ILK Reported-by: Ting-Wei Lan <lantw44@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91127 References: https://bugzilla.freedesktop.org/show_bug.cgi?id=60391 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-06-29watchdog: gpio_wdt: Add option for early registrationJean-Baptiste Theou
In some situation, mainly when it's not possible to disable a watchdog, you may want the watchdog driver to be started as soon as possible. Adding GPIO_WATCHDOG_ARCH_INITCALL to raise initcall from module_init to arch_initcall. This patch require watchdog registration deferral mechanism Signed-off-by: Jean-Baptiste Theou <jtheou@adeneo-embedded.us> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-06-29watchdog: watchdog_core: Add watchdog registration deferral mechanismJean-Baptiste Theou
Currently, watchdog subsystem require the misc subsystem to register a watchdog. This may not be the case in case of an early registration of a watchdog, which can be required when the watchdog cannot be disabled. This patch introduces a deferral mechanism to remove this requirement. Signed-off-by: Jean-Baptiste Theou <jtheou@adeneo-embedded.us> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-06-29watchdog: max63xx: dynamically allocate deviceVivien Didelot
This patch removes the static watchdog device for a new max63xx_wdt data structure, and constifies the max63xx_timeout data. The new structure contains pointers to pin access routines, which abstracts mmap-specific code. This will ease future accesses like GPIO. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-06-29drm/i915: Zero unused WM1 watermarks on VLV/CHVVille Syrjälä
The hardware supposedly ignores the WM1 watermarks while the PND deadline mode is enabled, but clear out the register just in case. This is what the other OS does, and it does make register dumps look more consistent when we don't have partial WM1 values lingering in the registers (some WM1 watermarks already get zeroed when the actually used DSPFW registers get written). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Add debugfs knobs for VLVCHV memory latency valuesVille Syrjälä
Allow tweaking the VLV/CHV memory latencies thorugh sysfs, like we do for ILK+. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Don't do PM5/DDR DVFS with multiple pipesVille Syrjälä
Enabling PM5/DDR DVFS with multiple active pipes isn't a validated configuration. It does seem to work most of the time at least, but there is clearly an additional risk of underruns, so let's not play with fire. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Try to make sure cxsr is disabled around plane enable/disableVille Syrjälä
CxSR (or maxfifo on VLV/CHV) blocks somne changes to the plane control register (enable bit at least, not quite sure about the rest). So in order to have the plane enable/disable when we want we need to first kick the hardware out of cxsr. Unfortunateloy this requires some extra vblank waits. For the CxSR enable after the plane update we should eventually use an async vblank worker, but since we don't have that just do sync vblank waits. For the disable case we have no choice but to do it synchronously. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Use the memory latency based WM computation on VLV tooVille Syrjälä
In order to get decnet memory self refresh residency on VLV, flip it over to the new CHV way of doing things. VLV doesn't do PM5 or DDR DVFS so it's a bit simpler. I'm not sure the currently memory latency used for CHV is really appropriate for VLV. Some further testing will probably be needed to figure that out. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Compute display FIFO split dynamically for CHVVille Syrjälä
Consider which planes are active and compute the FIFO split based on the relative data rates. Since we only consider the pipe src width rather than the plane width when computing watermarks it seems best to do the same when computing the FIFO split as well. This means the only thing we actually have to consider for the FIFO splut is the bpp, and we can ignore the rest. I've just stuffed the logic into the watermark code for now. Eventually it'll need to move into the atomic update for the crtc. There's also one extra complication I've not yet considered; Some of the DSPARB registers contain bits related to multiple pipes. The registers are double buffered but apparently they update on the vblank of any active pipe. So doing the FIFO reconfiguration properly when multiple pipes are active is not going to be fun. But let's ignore that mess for now. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: CHV DDR DVFS support and another watermark rewriteVille Syrjälä
Turns out the VLV/CHV system agent doesn't understand memory latencies, so trying to rely on the PND deadline mechanism is not going to fly especially when DDR DVFS is enabled. Currently we try to avoid the problems by lying to the system agent about the deadlines and setting the FIFO watermarks to 8 cachelines. This however leads to bad memory self refresh residency. So in order to satosfy everyone we'll just give up on the deadline scheme and program the watermarks old school based on the worst case memory latency. I've modelled this a bit on the ILK+ approach where we compute multiple sets of watermarks for each pipe (PM2,PM5,DDR DVFS) and when merge thet appropriate one later with the watermarks from other pipes. There isn't too much to merge actually since each pipe has a totally independent FIFO (well apart from the mess with the partially shared DSPARB registers), but still decopuling the pipes from each other seems like a good idea. Eventually we'll want to perform the watermark update in two phases around the plane update to avoid underruns due to the single buffered watermark registers. But that's still in limbo for ILK+ too, so I've not gone that far yet for VLV/CHV either. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Read wm values from hardware at init on CHVVille Syrjälä
Read out the current watermark settings from the hardware at driver init time. This will allow us to compare the newly calculated values against the currrent ones and potentially avoid needless WM updates. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Split atomic wm update to pre and post variantsVille Syrjälä
Try to update the watermarks on the right side of the plane update. This is just a temporary hack until we get the proper two part update into place. However in the meantime this might have some chance of at least working. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: POSTING_READ() in intel_set_memory_cxsr()Ville Syrjälä
We want cxsr exit to happen ASAP, so toss in some POSTING_READ()s to make sure things are really kicked off. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Unconditionally do fb tracking invalidate in set_domainDaniel Vetter
We can't elide the fb tracking invalidate if the buffer is already in the right domain since that would lead to missed screen updates. I'm pretty sure I've written this already before but must have gotten lost unfortunately :( v2: Chris observed that all internal set_domain users already correctly do the fb invalidate on their own, hence we can move this just into the set_domain ioctl instead. v3: I screwed up setting the invalidate ORIGIN_* correctly (Chris). Cc: Chris Wilson <chris@chris-wilson.co.uk> Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29drm/i915: Fix IPS related flickerRodrigo Vivi
We cannot let IPS enabled with no plane on the pipe: BSpec: "IPS cannot be enabled until after at least one plane has been enabled for at least one vertical blank." and "IPS must be disabled while there is still at least one plane enabled on the same pipe as IPS." This restriction apply to HSW and BDW. However a shortcut path on update primary plane function to make primary plane invisible by setting DSPCTRL to 0 was leting IPS enabled while there was no other plane enabled on the pipe causing flickerings that we were believing that it was caused by that other restriction where ips cannot be used when pixel rate is greater than 95% of cdclok. v2: Don't mess with Atomic path as pointed out by Ville. v3: Rebase after a long time and atomic path changes. Accept Ville suggestion of not check !fb v4: Re-factore on dinq Reference: https://bugs.freedesktop.org/show_bug.cgi?id=85583 Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Kenneth Graunke <kenneth@whitecape.org> [danvet: Make it compile] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-29crypto: qat - Deletion of unnecessary checks before two function callsMarkus Elfring
The functions kfree() and release_firmware() test whether their argument is NULL and then return immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-06-28net: phy: mdio-bcm-unimac: workaround initial read failures for integrated PHYsFlorian Fainelli
All BCM7xxx integrated Gigabit PHYs have an issue in their MDIO management controller which will make the initial read or write to them to fail and return 0xffff. This is a real issue as the typical first thing we do is read from MII_PHYSID1 and MII_PHYSID2 from get_phy_id() to register a driver for these PHYs. Coupled with the workaround in drivers/net/phy/bcm7xxx.c, this workaround for the MDIO bus controller consists in scanning the list of PHYs to do this initial read workaround for as part of the MDIO bus reset routine which is invoked prior to mdiobus_scan(). Once we have a proper PHY driver/device registered, all workarounds are located there (e.g: power management suspend/resume calls). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-28net: bcmgenet: workaround initial read failures for integrated PHYsFlorian Fainelli
All BCM7xxx integrated Gigabit PHYs have an issue in their MDIO management controller which will make the initial read or write to them to fail and return 0xffff. This is a real issue as the typical first thing we do is read from MII_PHYSID1 and MII_PHYSID2 from get_phy_id() to register a driver for these PHYs. Coupled with the workaround in drivers/net/phy/bcm7xxx.c, this workaround for the MDIO bus controller consists in scanning the list of PHYs to do this initial read workaround for as part of the MDIO bus reset routine which is invoked prior to mdiobus_scan(). Once we have a proper PHY driver/device registered, all workarounds are located there (e.g: power management suspend/resume calls). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-28net: phy: bcm7xxx: workaround MDIO management controller initial readFlorian Fainelli
The initial MDIO read or write towards the BCM7xxx integrated PHY may fail, workaround this by inserting a dummy MII_BMSR read to force the MDIO management controller to see at least one valid transaction and get out of stuck state out of reset. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-28bnx2x: fix DMA API usageMichal Schmidt
With CONFIG_DMA_API_DEBUG=y bnx2x triggers the error "DMA-API: device driver frees DMA memory with wrong function". On archs where PAGE_SIZE > SGE_PAGE_SIZE it also triggers "DMA-API: device driver frees DMA memory with different size". Fix this by making the mapping and unmapping symmetric: - Do not map the whole pool page at once. Instead map the SGE_PAGE_SIZE-sized pieces individually, so they can be unmapped in the same manner. - What's mapped using dma_map_page() must be unmapped using dma_unmap_page(). Tested on ppc64. Fixes: 4cace675d687 ("bnx2x: Alloc 4k fragment for each rx ring buffer element") Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-28net: via: VIA_RHINE and VIA_VELOCITY should depend on HAS_DMAGeert Uytterhoeven
If NO_DMA=y: ERROR: "dma_sync_single_for_cpu" [drivers/net/ethernet/via/via-rhine.ko] undefined! ERROR: "dma_set_mask" [drivers/net/ethernet/via/via-rhine.ko] undefined! ERROR: "dma_mapping_error" [drivers/net/ethernet/via/via-rhine.ko] undefined! ERROR: "dma_map_single" [drivers/net/ethernet/via/via-rhine.ko] undefined! ERROR: "dma_alloc_coherent" [drivers/net/ethernet/via/via-rhine.ko] undefined! ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-rhine.ko] undefined! ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-rhine.ko] undefined! ERROR: "dma_map_page" [drivers/net/ethernet/via/via-velocity.ko] undefined! ERROR: "dma_sync_single_for_cpu" [drivers/net/ethernet/via/via-velocity.ko] undefined! ERROR: "dma_free_coherent" [drivers/net/ethernet/via/via-velocity.ko] undefined! ERROR: "dma_unmap_single" [drivers/net/ethernet/via/via-velocity.ko] undefined! ERROR: "dma_map_single" [drivers/net/ethernet/via/via-velocity.ko] undefined! ERROR: "dma_alloc_coherent" [drivers/net/ethernet/via/via-velocity.ko] undefined! Before, the symbols depended implicitly on HAS_DMA through PCI or USE_OF. Add explicit dependencies on HAS_DMA to fix this. Fixes: b7d3282a245f4428 ("net: via/Kconfig: replace USE_OF with OF_???") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-28Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-06-26 This series contains fixes for igb, e1000e and i40evf. Todd disables IPv6 extension header processing due to a hardware errata and bumps the driver version. Yanir provides six fixes for e1000e. First is a fix for a locking issue where we were not always taking the pci_bus_sem semaphore all the time when calling pci_disable_link_state_locked(), so fix the code to only call pci_disable_link_state_locked() when the semaphore has been acquired, otherwise call pci_disable_link_state(). A previous fix for i219 where the hardware prevented ULP entry caused EEE in Sx not the be enabled, so modify the code flow that allows both ULP and EEE in Sx. Fix an issue when running 10/100 full duplex on i219 where CRC errors were occurring by increasing the IPG from 8 to 0xC as per the hardware developers. Fix a data corruption issue found on some platforms by increasing the minimum gap between the PHY FIFO read and write pointers. Fix i219, which does not require the K1 workaround for LPT devices. Mitch provides a i40evf fix for a panic when changing MTU. Down was requesting queue disables, but then exited immediately without waiting for the queues to actually be disabled. This could allow any function called after i40evf_down() to run immediately, including i40evf_up(), and causes a memory leak. Fixed the issue by removing the whole reinit_locked function which allows for the driver to handle the state changes by requesting reset from the periodic timer. The second fix resolves an issue where RSS was being configured as though it is using the maximum number of queue. This can cause the device to drop a lot of receive traffic, as the packets get assigned to non-functional queues. This is resolved by only configuring RSS with the number of active queues. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-28net/phy: tune get_phy_c45_ids to support more c45 phyShengzhou Liu
As some C45 10G PHYs(e.g. Cortina CS4315/CS4340 PHY) have zero Devices In package, current driver can't get correct devices_in_package value by non-zero Devices In package. so let's probe more with zero Devices In package to support more C45 PHYs. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>