aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2013-09-04bonding: simplify bond_3ad_update_lacp_rate and use RTNL for sync[email protected]2-8/+7
We can drop the use of bond->lock for mutual exclusion in bond_3ad_update_lacp_rate and use RTNL in the sysfs store function instead. This way we'll prevent races with mode change and interface up/down as well as simplify update_lacp_rate by removing the check for port->slave because it'll always be initialized (done while enslaving with RTNL). This change will also help in the future removal of reader bond->lock from bond_enslave. Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04bonding: trivial: remove outdated comment and braces[email protected]1-5/+1
We don't have to release all slaves when closing the bond dev, so remove the outdated comment and the braces around the left single statement. Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04bonding: simplify and fix peer notification[email protected]1-15/+7
This patch aims to remove a use of the bond->lock for mutual exclusion which will later allow easier migration to RCU of the users of this functionality. We use RTNL as a synchronizing mechanism since it's always held when send_peer_notif is set, and when it is decremented from the notifier function. We can also drop some locking, and fix the leakage of the send_peer_notif counter. Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03Merge tag 'for-3.12-rc1' of git://gitorious.org/linux-pwm/linux-pwmLinus Torvalds9-50/+62
Pull pwm changes from Thierry Reding: "A set of patches makes the device tree documentation for the various PWM drivers more consistent. Device tree support is added to the Renesas TPU driver. The sysfs interface now makes use of dev_groups. Other than that there is a healthy assortment of fixes and enhancements for minor issues that have shown up" * tag 'for-3.12-rc1' of git://gitorious.org/linux-pwm/linux-pwm: pwm: pxa: Use module_platform_driver pwm: tiehrpwm: add missing __iomem annotation pwm: tiecap: add CONFIG_PM_SLEEP to ecap_pwm_{save,restore}_context() pwm: simplify use of devm_ioremap_resource pwm: renesas-tpu: Add DT support ARM: dts: Use the PWM polarity flags pwm: Update DT bindings to reference pwm.txt for cells documentation pwm: Use the DT macro directly when parsing PWM DT flags pwm: Add PWM polarity flag macro for DT pwm: mxs: Check the return value from stmp_reset_block() pwm: convert class code to use dev_groups
2013-09-03Merge tag 'please-pull-pstore' of ↵Linus Torvalds2-12/+40
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull pstore changes from Tony Luck: "A big part of this is the addition of compression to the generic pstore layer so that all backends can use the pitiful amounts of storage they control more effectively. Three other small fixes/cleanups too. * tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: pstore/ram: (really) fix undefined usage of rounddown_pow_of_two pstore/ram: Read and write to the 'compressed' flag of pstore efi-pstore: Read and write to the 'compressed' flag of pstore erst: Read and write to the 'compressed' flag of pstore powerpc/pseries: Read and write to the 'compressed' flag of pstore pstore: Add file extension to pstore file if compressed pstore: Add decompression support to pstore pstore: Introduce new argument 'compressed' in the read callback pstore: Add compression support to pstore pstore/Kconfig: Select ZLIB_DEFLATE and ZLIB_INFLATE when PSTORE is selected pstore: Add new argument 'compressed' in pstore write callback powerpc/pseries: Remove (de)compression in nvram with pstore enabled pstore: d_alloc_name() doesn't return an ERR_PTR acpi/apei/erst: Add missing iounmap() on error in erst_exec_move_data()
2013-09-04drm/nouveau: fix command submission to use vmalloc for big allocationsMaarten Lankhorst1-7/+20
I was getting a order 4 allocation failure from kmalloc when testing some game after a few days uptime with some suspend/resumes. For big allocations vmalloc should be used instead. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)Martin Peres1-1/+2
Some vbioses have extra useless entries after "the end" of the table. This is problematic since all of the vbios I found with this issue redefine the pwm freq divider to insane levels (52750 Hz instead of 2500), thus breaking fan management. The first solution to solve this mess would be to change the length of the table. The solution I choose was simply to avoid setting the pwm freq twice as the other redefinitions are harmless with our current parser. Signed-off-by: Martin Peres <[email protected]> Reported-by: Mariusz Bialonczyk <[email protected]> Tested-by: Mariusz Bialonczyk <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau: use MSI interruptsLucas Stach3-1/+25
MSIs were only problematic on some old, broken chipsets. But now that we already see systems where PCI legacy interrupts are somewhat flaky, it's really time to move to MSIs. v2 (Ben Skeggs): blacklist BR02 boards Signed-off-by: Lucas Stach <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nv50-/kms: assume analog display connected if load on any pinBen Skeggs1-1/+1
Fixes a VGA monitor with a dodgy red (in this case) pin not being detected. Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nv50/disp: prevent false output detection on the original nv50Emil Velikov1-5/+10
Commit ea9197cc323839ef3d5280c0453b2c622caa6bc7 effectively enabled the use of an improved DAC detection code, but introduced a regression on the original nv50 chipset, causing a ghost monitor to be detected. v2 (Ben Skeggs): the offending line was likely a thinko, removed it for all chipsets (tested nv50 and nve6 to cover entire range) and added some additional debugging. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67382 Tested-by: Martin Peres <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Cc: <[email protected]> # 3.9+ Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/i2c: pass the function pointers in at creation timeIlia Mirkin8-21/+23
i2c_bit_add_bus can call the pre_xfer function, which expects the func pointer to be set. Pass in func to the port creation logic so that it is set before i2c_bit_add_bus. See https://bugs.freedesktop.org/show_bug.cgi?id=68456 Reported-by: Hans-Peter Deifel <[email protected]> Tested-by: Hans-Peter Deifel <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/therm: survive to suspend/resume cyclesMartin Peres4-1/+51
Therm uses 3 ptimer alarms. Two to drive the fan and one for polling the temperature. When suspending/resuming, alarms will never be fired. As we are checking if there isn't an alarm pending before rescheduling another one, we end up never checking temperature or updating the fan speed. This commit also adds debug messages to be able to spot more easily if this case happens again in the future. Sorry for the spam if you activate the debug level though. Tested-by: Dash Four <[email protected]> v2: - fix temperature polling too Signed-off-by: Martin Peres <[email protected]> Tested-by: Martin Peres <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/timer: add a way to cancel alarmsMartin Peres3-0/+29
Since alarms don't play well with suspend, it is important every alarm user cancels his tasks before suspending. The task should be rescheduled on resume. Signed-off-by: Martin Peres <[email protected]> Tested-by: Martin Peres <[email protected]> Tested-by: Dash Four <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/timer: restore the time on resumeMartin Peres1-1/+14
This can be useful if some parts of Nouveau try to calculate the time between two events. Without this patch, the time difference would be negative in the case where the computer is suspended/resumed between two events. This patch should fix fan speed probing when done while suspending/resuming. Solve this by saving the current time before suspending and by restoring it on resume. Signed-off-by: Martin Peres <[email protected]> Tested-by: Martin Peres <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/fan: restore pwm value on resume when in manual/auto modeMartin Peres2-1/+9
If the fan was in manual or auto mode, we should restore the fan speed that was previously set when resuming. The initial pwm value is saved when loading the module. Signed-off-by: Martin Peres <[email protected]> Tested-by: Martin Peres <[email protected]> Tested-by: Dash Four <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/therm: Set the correct pwm_mode upon resumeEmil Velikov1-1/+1
Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Martin Peres <[email protected]> Tested-by: Martin Peres <[email protected]> Tested-by: Dash Four <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau: require contiguous bo for framebufferMaarten Lankhorst1-0/+5
This was already required before, but no check in the kernel was done to enforce it. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nv50-/disp: use the number of dac, sor, pior rather than hardcoded valuesEmil Velikov1-17/+17
The values are already stored on chipset specific basis in the ctor. Make the most of them and simplify the code further by using a temporary variable to avoid code duplication. Signed-off-by: Emil Velikov <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau: remove duplicate copy of nv44_graph_classIlia Mirkin2-8/+5
Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/vdec: implement support for VP3 enginesIlia Mirkin6-53/+104
For NV98+, BSP/VP/PPP are all FUC-based engines. Hook them all up in the same way as NVC0, but with a couple of different values. Also make sure that the PPP engine is handled in the fifo/mc/vm. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-04drm/nouveau/core: get rid of math.h, replace log2i with order_base_2Ilia Mirkin7-27/+7
Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2013-09-03ibmasmfs: don't bother passing superblock when not neededAl Viro1-14/+12
Signed-off-by: Al Viro <[email protected]>
2013-09-03oprofile: get rid of pointless forward declarations of struct super_blockAl Viro2-2/+0
Signed-off-by: Al Viro <[email protected]>
2013-09-03oprofilefs_create_...() do not need superblock argumentAl Viro4-39/+38
same story as with oprofilefs_mkdir() Signed-off-by: Al Viro <[email protected]>
2013-09-03oprofilefs_mkdir() doesn't need superblock argumentAl Viro3-11/+10
it's always equal to ->d_sb of the second argument (parent dentry), due to either being literally that, or ->d_sb of parent's parent. Signed-off-by: Al Viro <[email protected]>
2013-09-03don't bother with passing superblock to oprofile_create_stats_files()Al Viro3-14/+14
Signed-off-by: Al Viro <[email protected]>
2013-09-03oprofile: don't bother with passing superblock to ->create_files()Al Viro2-9/+9
Signed-off-by: Al Viro <[email protected]>
2013-09-03don't bother passing sb to oprofile_create_files()Al Viro3-15/+15
it's always root->d_sb Signed-off-by: Al Viro <[email protected]>
2013-09-03coh901318: don't open-code simple_read_from_buffer()Al Viro1-21/+5
... and BTW, failing copy_to_user() means EFAULT, not EINVAL Signed-off-by: Al Viro <[email protected]>
2013-09-03vhost_net: correctly limit the max pending buffersJason Wang1-11/+7
As Michael point out, We used to limit the max pending DMAs to get better cache utilization. But it was not done correctly since it was one done when there's no new buffers submitted from guest. Guest can easily exceeds the limitation by keeping sending packets. So this patch moves the check into main loop. Tests shows about 5%-10% improvement on per cpu throughput for guest tx. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03vhost_net: poll vhost queue after marking DMA is doneJason Wang1-4/+5
We used to poll vhost queue before making DMA is done, this is racy if vhost thread were waked up before marking DMA is done which can result the signal to be missed. Fix this by always polling the vhost thread before DMA is done. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03vhost_net: determine whether or not to use zerocopy at one timeJason Wang1-27/+20
Currently, even if the packet length is smaller than VHOST_GOODCOPY_LEN, if upend_idx != done_idx we still set zcopy_used to true and rollback this choice later. This could be avoided by determining zerocopy once by checking all conditions at one time before. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03vhost: switch to use vhost_add_used_n()Jason Wang1-42/+12
Let vhost_add_used() to use vhost_add_used_n() to reduce the code duplication. To avoid the overhead brought by __copy_to_user(). We will use put_user() when one used need to be added. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03vhost_net: use vhost_add_used_and_signal_n() in vhost_zerocopy_signal_used()Jason Wang1-5/+8
We tend to batch the used adding and signaling in vhost_zerocopy_callback() which may result more than 100 used buffers to be updated in vhost_zerocopy_signal_used() in some cases. So switch to use vhost_add_used_and_signal_n() to avoid multiple calls to vhost_add_used_and_signal(). Which means much less times of used index updating and memory barriers. 2% performance improvement were seen on netperf TCP_RR test. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03vhost_net: make vhost_zerocopy_signal_used() return voidJason Wang1-3/+2
None of its caller use its return value, so let it return void. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: sunhme: use pci_{get,set}_drvdata()Jingoo Han1-3/+3
Use the wrapper functions for getting and setting the driver data using pci_dev instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct pci_dev. This is a purely cosmetic change. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: tulip: use pci_{get,set}_drvdata()Jingoo Han1-1/+1
Use the wrapper functions for getting and setting the driver data using pci_dev instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct pci_dev. This is a purely cosmetic change. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: mdio-octeon: use platform_{get,set}_drvdata()Jingoo Han1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. This is a purely cosmetic change. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: sunhme: use platform_{get,set}_drvdata()Jingoo Han1-1/+1
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. This is a purely cosmetic change. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: emac: use platform_{get,set}_drvdata()Jingoo Han1-5/+5
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. This is a purely cosmetic change. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03drivers: net: ethernet: 8390: Kconfig: add H8300H_AKI3068NET and ↵Chen Gang1-1/+1
H8300H_H8MAX dependancy for NE_H8300 Currently only H8300H_AKI3068NET and H8300H_H8MAX define default I/O base and IRQ values for the NE_H8300 driver. Hence builds for other H8300H platforms will fail as per below. Since H8300H does not support multi platform builds, we simply limit building the driver to those two platforms specifically. The release error: drivers/net/ethernet/8390/ne-h8300.c: In function 'init_dev': drivers/net/ethernet/8390/ne-h8300.c:117:23: error: 'h8300_ne_base' undeclared (first use in this function) drivers/net/ethernet/8390/ne-h8300.c:117:23: note: each undeclared identifier is reported only once for each function it appears in drivers/net/ethernet/8390/ne-h8300.c:117:23: error: bit-field '<anonymous>' width not an integer constant drivers/net/ethernet/8390/ne-h8300.c:119:20: error: 'h8300_ne_irq' undeclared (first use in this function) drivers/net/ethernet/8390/ne-h8300.c: In function 'init_module': drivers/net/ethernet/8390/ne-h8300.c:647:21: error: 'h8300_ne_base' undeclared (first use in this function) drivers/net/ethernet/8390/ne-h8300.c:648:15: error: 'h8300_ne_irq' undeclared (first use in this function) drivers/net/ethernet/8390/ne-h8300.c:661:4: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat] Signed-off-by: Chen Gang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03drivers/net: Convert uses of compare_ether_addr to ether_addr_equalJoe Perches11-30/+30
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: (and a little typing) $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver SupportLiu Junliang4-0/+742
Signed-off-by: Liu Junliang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03tg3: Don't turn off led on 5719 serdes port 0Nithin Sujir1-2/+16
Turning off led on port 0 of the 5719 serdes causes all other ports to lose power and stop functioning. Add tg3_phy_led_bug() function to check for this condition. We use a switch() in tg3_phy_led_bug() for consistency with the tg3_phy_power_bug() function. Signed-off-by: Nithin Nayak Sujir <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: calxedaxgmac: fix xgmac_xmit DMA mapping error handlingRob Herring1-5/+26
On a DMA mapping error in xgmac_xmit, we should simply free the skb and return NETDEV_TX_OK rather than -EIO. In the case of errors in mapping frags, we need to undo everything that has been setup. Reported-by: Andreas Herrmann <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: calxedaxgmac: fix rx DMA mapping API size mismatchesRob Herring1-6/+12
Fix the mismatch in the DMA mapping and unmapping sizes for receive. The unmap size must be equal to the map size and should not be the actual received frame length. The map size should also be adjusted by the NET_IP_ALIGN size since the h/w buffer size (dma_buf_sz) includes this offset. Also, add a missing dma_mapping_error check in xgmac_rx_refill. Reported-by: Lennert Buytenhek <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: calxedaxgmac: remove some unused statistic countersRob Herring1-3/+0
rx_sa_filter_fail and tx_undeflow events are unused and impossible to occur based on how the h/w is used. We never filter on source MAC address and TX store and forward mode prevents underflow events. Reported-by: Lennert Buytenhek <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: calxedaxgmac: fix various errors in xgmac_set_rx_modeRob Herring1-4/+13
Fix xgmac_set_rx_mode to handle several conditions that were not handled correctly as Lennert Buytenhek describes: If we have, say, 100 unicast addresses, and 5 multicast addresses, the unicast address count check will evaluate to true, and set use_hash to true. The multicast address check will however evaluate to false, and use_hash won't be set to true again, and XGMAC_FRAME_FILTER_HMC won't be OR'd into XGMAC_FRAME_FILTER, but since use_hash was still true from the unicast check, netdev_for_each_mc_addr() will program the multicast addresses into the hash table instead of using the MAC address registers, but since the HMC bit wasn't set, the hash table won't be checked for multicast addresses on receive, and we'll stop receiving multicast packets entirely. Also, there is no code that zeroes out MAC address registers reg..31 at the end of this function, meaning that under the right conditions, unicast/multicast addresses that were previously in the filter but were then deleted won't be cleared out. Reported-by: Lennert Buytenhek <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: calxedaxgmac: enable interrupts after napi_enableRob Herring1-3/+5
Fix a race condition where the interrupt handler may have called napi_schedule before napi_enable is called. This would disable interrupts and never actually schedule napi to run. Reported-by: Lennert Buytenhek <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-03net: calxedaxgmac: fix race with tx queue stop/wakeRob Herring1-5/+15
Since the xgmac transmit start and completion work locklessly, it is possible for xgmac_xmit to stop the tx queue after the xgmac_tx_complete has run resulting in the tx queue never being woken up. Fix this by ensuring that ring buffer index updates are visible and recheck the ring space after stopping the queue. Also fix an off-by-one bug where we need to stop the queue when the ring buffer space is equal to MAX_SKB_FRAGS. The implementation used here was copied from drivers/net/ethernet/broadcom/tg3.c. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>