aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-04Input: introduce BTN/ABS bits for drums and guitarsDavid Herrmann2-3/+24
There are a bunch of guitar and drums devices out there that all report similar data. To avoid reporting this as BTN_MISC or ABS_MISC, we allocate some proper namespace for them. Note that most of these devices are toys and we cannot report any sophisticated physics via this API. I did some google-images research and tried to provide definitions that work with all common devices. That's why I went with 4 toms, 4 cymbals, one bass, one hi-hat. I haven't seen other drums and I doubt that we need any additions to that. Anyway, the naming-scheme is intentionally done in an extensible way. For guitars, we support 5 frets (normally aligned vertically, compared to the real horizontal layouts), a single strum-bar with up/down directions, an optional fret-board and a whammy-bar. Most of the devices provide pressure values so I went with ABS_* bits. If we ever support devices which only provide digital input, we have to decide whether to emulate pressure data or add additional BTN_* bits. If someone is not familiar with these devices, here are two pictures which provide almost all introduced interfaces (or try the given keywords with a google-image search): Guitar: ("guitar hero world tour guitar") http://images1.wikia.nocookie.net/__cb20120911023442/applezone/es/images/f/f9/Wii_Guitar.jpg Drums: ("guitar hero drums") http://oyster.ignimgs.com/franchises/images/03/55/35526_band-hero-drum-set-hands-on-20090929040735768.jpg Signed-off-by: David Herrmann <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04Merge branch 'drm-nouveau-next' of ↵Dave Airlie37-145/+323
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next Nothing major ready for merging yet, so mostly bug fixes below, in addition to VP3 enablement from Ilia. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau: fix command submission to use vmalloc for big allocations drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5) drm/nouveau: use MSI interrupts drm/nv50-/kms: assume analog display connected if load on any pin drm/nv50/disp: prevent false output detection on the original nv50 drm/nouveau/i2c: pass the function pointers in at creation time drm/nouveau/therm: survive to suspend/resume cycles drm/nouveau/timer: add a way to cancel alarms drm/nouveau/timer: restore the time on resume drm/nouveau/fan: restore pwm value on resume when in manual/auto mode drm/nouveau/therm: Set the correct pwm_mode upon resume drm/nouveau: require contiguous bo for framebuffer drm/nv50-/disp: use the number of dac, sor, pior rather than hardcoded values drm/nouveau: remove duplicate copy of nv44_graph_class drm/nouveau/vdec: implement support for VP3 engines drm/nouveau/core: get rid of math.h, replace log2i with order_base_2
2013-09-04tcp: Change return value of tcp_rcv_established()Vijay Subramanian5-18/+12
tcp_rcv_established() returns only one value namely 0. We change the return value to void (as suggested by David Miller). After commit 0c24604b (tcp: implement RFC 5961 4.2), we no longer send RSTs in response to SYNs. We can remove the check and processing on the return value of tcp_rcv_established(). We also fix jtcp_rcv_established() in tcp_probe.c to match that of tcp_rcv_established(). Signed-off-by: Vijay Subramanian <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04net: tcp_probe: adapt tbuf size for recent changesDaniel Borkmann1-1/+1
With recent changes in tcp_probe module (e.g. f925d0a62d ("net: tcp_probe: add IPv6 support")) we also need to take into account that tbuf needs to be updated as format string will be further expanded. tbuf sits on the stack in tcpprobe_read() function that is invoked when user space reads procfs file /proc/net/tcpprobe, hence not fast path as in jtcp_rcv_established(). Having a size similarly as in sctp_probe module of 256 bytes is fully sufficient for that, we need theoretical maximum of 252 bytes otherwise we could get truncated. Signed-off-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04qlcnic: remove a stray semicolonDan Carpenter1-1/+1
Just remove a small semicolon. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04qlcnic: Fix sparse warning.Sucheta Chakraborty1-1/+1
This patch fixes warning "warning: symbol 'qlcnic_set_dcb_ops' was not declared. Should it be static?" Signed-off-by: Sucheta Chakraborty <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04x25: add a sanity check parsing X.25 facilitiesDan Carpenter1-0/+4
This was found with a manual audit and I don't have a reproducer. We limit ->calling_len and ->called_len when we get them from copy_from_user() in x25_ioctl() so when they come from skb->data then we should cap them there as well. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04caif: add a sanity check to the tty nameDan Carpenter1-1/+3
"tty->name" and "name" are a 64 character buffers. My static checker complains because we add the "cf" on the front so it look like we are copying a 66 character string into a 64 character buffer. Also if the name is larger than IFNAMSIZ (16) it triggers a BUG_ON() inside the call to alloc_netdev(). This is all under CAP_SYS_ADMIN so it's not a security fix, it just adds a little robustness. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04ibmveth: Fix little endian issuesAnton Blanchard2-5/+18
The hypervisor is big endian, so little endian kernel builds need to byteswap. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04net: netx-eth: remove unnecessary castingJingoo Han1-1/+1
Casting from 'void *' is unnecessary, because casting from 'void *' to any pointer type is automatic. Reported-by: Sergei Shtylyov <[email protected]> Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Update version to 2.5.18.Michael Chan1-2/+2
Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Eliminate local copy of pfid.Michael Chan2-18/+12
Use bp->pfid from bnx2x instead to avoid duplication. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Eliminate CNIC_PORT macro and port_mode in local struct.Michael Chan2-9/+6
Use BP_PORT and chip_port_mode directly from bnx2x.h to avoid duplication. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Redefine BNX2X_HW_CID using existing bnx2x macrosMichael Chan2-12/+18
to avoid duplication of the same logic. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Use CHIP_NUM macros from bnx2x.hMichael Chan2-67/+29
This eliminates duplication and ensures that all bnx2x chips will be supported. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04net: correctly interlink lower/upper devicesVeaceslav Falico1-2/+2
Currently we're linking upper devices to lower ones, which results in upside-down relationship: upper devices seeing lower devices via its upper lists. Fix this by correctly linking lower devices to the upper ones. CC: "David S. Miller" <[email protected]> CC: Eric Dumazet <[email protected]> CC: Jiri Pirko <[email protected]> CC: Alexander Duyck <[email protected]> CC: Cong Wang <[email protected]> Signed-off-by: Veaceslav Falico <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04tunnels: harmonize cleanup done on skb on rx pathNicolas Dichtel7-26/+13
The goal of this patch is to harmonize cleanup done on a skbuff on rx path. Before this patch, behaviors were different depending of the tunnel type. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04tunnels: harmonize cleanup done on skb on xmit pathNicolas Dichtel9-22/+15
The goal of this patch is to harmonize cleanup done on a skbuff on xmit path. Before this patch, behaviors were different depending of the tunnel type. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04skb: allow skb_scrub_packet() to be used by tunnelsNicolas Dichtel6-15/+20
This function was only used when a packet was sent to another netns. Now, it can also be used after tunnel encapsulation or decapsulation. Only skb_orphan() should not be done when a packet is not crossing netns. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04vxlan: remove net arg from vxlan[6]_xmit_skb()Nicolas Dichtel3-6/+6
This argument is not used, let's remove it. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04iptunnels: remove net arg from iptunnel_xmit()Nicolas Dichtel6-11/+7
This argument is not used, let's remove it. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04bonding: drop read_lock in bond_compute_features[email protected]1-7/+3
bond_compute_features is always called with RTNL held, so we can safely drop the read bond->lock. Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04bonding: drop read_lock in bond_fix_features[email protected]1-7/+3
We're protected by RTNL so nothing can happen and we can safely drop the read bond->lock. Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 Torvalds26-98/+141
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 Torvalds9-140/+306
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-04add formats for dentry/file pathnamesAl Viro2-0/+91
New formats: %p[dD][234]?. The next pointer is interpreted as struct dentry * or struct file * resp. ('d' => dentry, 'D' => file) and the last component(s) of pathname are printed (%pd => just the last one, %pd2 => the last two, etc.) Signed-off-by: Al Viro <[email protected]>
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-03kvm eventfd: switch to fdgetAl Viro1-10/+10
Signed-off-by: Al Viro <[email protected]>
2013-09-03powerpc kvm: use fdgetAl Viro1-10/+10
Signed-off-by: Al Viro <[email protected]>
2013-09-03switch fchmod() to fdgetAl Viro1-6/+5
Signed-off-by: Al Viro <[email protected]>
2013-09-03switch epoll_ctl() to fdgetAl Viro1-16/+15
Signed-off-by: Al Viro <[email protected]>
2013-09-03switch copy_module_from_fd() to fdgetAl Viro1-7/+6
Signed-off-by: Al Viro <[email protected]>