summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-02-03drm fb helper: remove unused variable conn_limitSascha Hauer
conn_limit is set but never used. Remove it from struct drm_fb_helper. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm fb helper: use drm_helper_connector_dpms to do dpmsSascha Hauer
drm_fb_helper_on|off currently manually searches for encoders to turn on/off. Make this simpler by using the helper function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm: add proper return value for drm_mode_crtc_set_gamma_sizeSascha Hauer
drm_mode_crtc_set_gamma_size returns boolean true for success and false for failure. This is not very kernel conform, so change it to return 0 for success and a propert error code otherwise. Noone checks the return value, so no users have to be fixed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm drm_fb_helper: destroy modesSascha Hauer
drm_setup_crtcs allocated modes using drm_mode_duplicate. Free them in drm_fb_helper_crtc_free. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm crtc: use drm_mode_destroy instead of kfree in drm_mode_removeSascha Hauer
Modes are created using drm_mode_create which does a drm_mode_object_get, so use drm_mode_destroy in drm_mode_remove which does a drm_mode_object_put. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/edid: drm modes have to be free with drm_mode_destroySascha Hauer
to add the missing drm_mode_object_put for that mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm crtc: add forgotten idr cleanup functionsSascha Hauer
drm_mode_config_init initializes the idr with idr_init, so add the missing counterparts in drm_mode_config_cleanup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/radeon/kms: add r1xx/r2xx CS support for tiled texturesAlex Deucher
Not likely this will be implemented anytime soon, but for completeness... Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/radeon/kms: add r1xx/r2xx support for CS_KEEP_TILING_FLAGSAlex Deucher
Previous patch only updates r3xx+. It's not likely anyone will use this on r1xx/r2xx, but add it for consistency. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm: give up on edid retries when i2c bus is not respondingEugeni Dodonov
This allows to avoid talking to a non-responding bus repeatedly until we finally timeout after 15 attempts. We can do this by catching the -ENXIO error, provided by i2c_algo_bit:bit_doAddress call. Within the bit_doAddress we already try 3 times to get the edid data, so if the routine tells us that bus is not responding, it is mostly pointless to keep re-trying those attempts over and over again until we reach final number of retries. This change should fix https://bugs.freedesktop.org/show_bug.cgi?id=41059 and improve overall edid detection timing by 10-30% in most cases, and by a much larger margin in case of phantom outputs (up to 30x in one worst case). Timing results for i915-powered machines for 'time xrandr' command: Machine 1: from 0.840s to 0.290s Machine 2: from 0.315s to 0.280s Machine 3: from +/- 4s to 0.184s Timing results for HD5770 with 'time xrandr' command: Machine 4: from 3.210s to 1.060s Reviewed-by: Chris Wilson <chris@hchris-wilson.co.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Sean Finney <seanius@seanius.net> Tested-by: Soren Hansen <soren@linux2go.dk> Tested-by: Hernando Torque <sirius@sonnenkinder.org> Tested-by: Mike Lothian <mike@fireburn.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41059 Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/radeon/kms/dce3+: add support for hw i2c using atomAlex Deucher
Starting with DCE3 hardware, atom contains a general purpose ProcessI2cChannelTransaction similar to ProcessAuxChannelTransaction. Add an implementation using the atom tables for DCE3+ hardware. This should be a little less CPU intensive than bit banging and may work better in certain cases. Enable it by setting the radeon hw_i2c module parameter to 1. E.g., radeon.hw_i2c=1 on the kernel command line in grub. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/radeon/kms: Use the standard VESA timeout for DDC channelsJean Delvare
The VESA specification suggests a 2.2 ms timeout on DDC channels. Use exactly that (as the i915 driver does) instead of hard-coding a jiffy count. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/kms: Make i2c buses fasterJean Delvare
A udelay value of 20 leads to an I2C bus running at only 25 kbps. I2C devices can typically operate faster than this, 50 kbps should be fine for all devices (and compliant devices can always stretch the clock if needed.) FWIW, the vast majority of framebuffer drivers set udelay to 10 already. So set it to 10 in DRM drivers too, this will make EDID block reads faster. We might even lower the udelay value later if no problem is reported. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/radeon/kms: remove benchmarks shorter than one pageIlija Hadzic
copy_blit operation works only on integral number of pages so benchmarks shorter than one page size (4K) do not make sense v2: use RADEON_GPU_PAGE_SIZE instead of "magic" 1024 number and sweep sizes between 1 * <page_size> to 16K * <page_size> doubling the size in each iteration; we get the same coverage, as in the original benchmark, but guarantee integer multiples of page size v3: add whitespace between '*' operator per review received from zajec5@gmail.com Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm/radeon/kms: common definitions for blit copy codeIlija Hadzic
R600/700 and Evergreen/NI blit code have a few redundant definitions in respective .c file. Move common definitions into a separate (new) .h file. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-03drm: remove master fd restriction on mode setting gettersMandeep Singh Baines
Its useful to be able to call the mode setting getter ioctls. Not requiring master fd, enables writing a simple program which can query the state of the video system. Since these ioctls are only "getters" there is no security or synchronization issues which would require master fd. Opening an new fd is already protected by the file permissions on the device file. Signed-off-by: Mandeep Singh Baines <msb@chromium.org> Cc: Dave Airlie <airlied@redhat.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ilija Hadzic <ihadzic@research.bell-labs.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Stephane Marchesin <marcheu@chromium.org> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-02Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: fix safety of rbd_put_client() rbd: fix a memory leak in rbd_get_client() ceph: create a new session lock to avoid lock inversion ceph: fix length validation in parse_reply_info() ceph: initialize client debugfs outside of monc->mutex ceph: change "ceph.layout" xattr to be "ceph.file.layout"
2012-02-02rbd: fix safety of rbd_put_client()Alex Elder
The rbd_client structure uses a kref to arrange for cleaning up and freeing an instance when its last reference is dropped. The cleanup routine is rbd_client_release(), and one of the things it does is delete the rbd_client from rbd_client_list. It acquires node_lock to do so, but the way it is done is still not safe. The problem is that when attempting to reuse an existing rbd_client, the structure found might already be in the process of getting destroyed and cleaned up. Here's the scenario, with "CLIENT" representing an existing rbd_client that's involved in the race: Thread on CPU A | Thread on CPU B --------------- | --------------- rbd_put_client(CLIENT) | rbd_get_client() kref_put() | (acquires node_lock) kref->refcount becomes 0 | __rbd_client_find() returns CLIENT calls rbd_client_release() | kref_get(&CLIENT->kref); | (releases node_lock) (acquires node_lock) | deletes CLIENT from list | ...and starts using CLIENT... (releases node_lock) | and frees CLIENT | <-- but CLIENT gets freed here Fix this by having rbd_put_client() acquire node_lock. The result could still be improved, but at least it avoids this problem. Signed-off-by: Alex Elder <elder@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-02rbd: fix a memory leak in rbd_get_client()Alex Elder
If an existing rbd client is found to be suitable for use in rbd_get_client(), the rbd_options structure is not being freed as it should. Fix that. Signed-off-by: Alex Elder <elder@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-02Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon/kms/blit: fix blit copy for very large buffers drm/radeon/kms: fix TRAVIS panel setup drm/radeon: fix use after free in ATRM bios reading code. drm/radeon/kms: Fix device tree linkage of DP i2c buses too drm/radeon: Set DESKTOP_HEIGHT register to the framebuffer (not mode) height. drm/radeon/kms: disable output polling when suspended drm/nv50/pm: signedness bug in nv50_pm_clocks_pre() drm/nouveau/gem: fix fence_sync race / oops drm/nouveau: fix typo on mxmdcb option drm/nouveau/mxm: pretend to succeed, even if we can't shadow the MXM-SIS drm/nouveau/disp: check that panel power gpio is enabled at init time
2012-02-02drm/radeon/kms/blit: fix blit copy for very large buffersIlija Hadzic
Evergreen and NI blit copy was broken if the buffer maps to a rectangle whose one dimension is 16384 (max dimension allowed by these chips). In the mainline kernel, the problem is exposed only when buffers are very large (1G), but it's still a problem. The problem could be exposed for smaller buffers if anyone modifies the algorithm for rectangle construction in r600_blit_create_rect() (the reason why someone would modify that algorithm is to tune the performance of buffer moves). The root cause was in i2f() function which only operated on range between 0 and 16383. Fix this by extending the range of i2f() function to 0 to 32767. While at it improve the function so that the range can be easily extended in the future (if it becomes necessary), cleanup lines over 80 characters, and replace in-line comments with one strategic comment that explains the crux of the function. Credits to michel@daenzer.net for pointing out the root cause of the bug. v2: Fix I2F_MAX_INPUT constant definition goof and warn only once if input argument is out of range. Edit the comment a little bit to avoid some linguistic confusion and make it look better in general. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-02drm/radeon/kms: fix TRAVIS panel setupAlex Deucher
Different versions of the DP to LVDS bridge chip need different panel mode settings depending on the chip version used. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41569 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-02drm/radeon: fix use after free in ATRM bios reading code.Dave Airlie
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45503 Reported-and-Debugged-by: mlambda@gmail.com Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-02Merge tag 'firewire-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 firewire fixes post v3.3-rc1 Add workarounds table entries for hardware bugs in - FireWire part of Sound Blaster Audigy cards, - Ricoh PCIe 1394 controllers. Without these, several protocols, e.g. AV/C, do not work on the Audigy, and the Ricoh PCIe controllers wouldn't work at all. This does not concern the older Ricoh PCI controllers. * tag 'firewire-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: ohci: disable MSI on Ricoh controllers firewire: ohci: add reset packet quirk for SB Audigy
2012-02-02staging: fix go7007-usb licenseRandy Dunlap
Add MODULE_LICENSE() as per the license in the comment at the top of the file for this source module to fix build warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/staging/media/go7007/go7007-usb.o see include/linux/module.h for more information Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Ross Cohen <rcohen@snurgle.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-02-01Merge tag 'rdma-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband InfiniBand/RDMA fixes for 3.3: - Fix a crash due to a regression (uninitialized refcnt) introduced in 3.2 with XRC support. - Close race in how ucma reports events when connect fails. - Process vendor-specific MADs in mlx4 so that eg FDR-10 data rate works. - Fix regression in qib caused by over-aggressive PCIe tuning. - Other small fixes for hardware drivers (ipath, nes, qib). * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: RDMA/nes: Copyright update IB/mlx4: pass SMP vendor-specific attribute MADs to firmware RDMA/nes: Fix fast memory registration opcode RDMA/nes: Fix fast memory registration length RDMA/ucma: Discard all events for new connections until accepted IB/qib: Roll back PCIe tuning change IB/qib: Use GFP_ATOMIC when locks are held RDMA/nes: Add missing rcu_read_unlock() in nes_addr_resolve_neigh() RDMA/nes: Fix for sending MPA reject frame IB/ipath: Calling PTR_ERR() on right variable in create_file() RDMA/core: Fix kernel panic by always initializing qp->usecnt
2012-02-01drm/radeon/kms: Fix device tree linkage of DP i2c buses tooJean Delvare
Properly set the parent device of DP i2c buses before registering them too. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-01drm/radeon: Set DESKTOP_HEIGHT register to the framebuffer (not mode) height.Michel Dänzer
The value of this register is transferred to the V_COUNTER register at the beginning of vertical blank. V_COUNTER is the reference for VLINE waits and goes from VIEWPORT_Y_START to VIEWPORT_Y_START+VIEWPORT_HEIGHT during scanout, so if VIEWPORT_Y_START is not 0, V_COUNTER actually went backwards at the beginning of vertical blank, and VLINE waits excluding the whole scanout area could never finish (possibly only if VIEWPORT_Y_START is larger than the length of vertical blank in scanlines). Setting DESKTOP_HEIGHT to the framebuffer height should prevent this for any kind of VLINE wait. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=45329 . CC: stable@vger.kernel.org Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-01drm/radeon/kms: disable output polling when suspendedSeth Forshee
Polling the outputs when the device is suspended can result in erroneous status updates. Disable output polling during suspend to prevent this from happening. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-01drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()Dan Carpenter
calc_mclk() returns zero on success and negative on failure but clk is a u32. v2: Martin Peres: - clk should be an int, not a u32 Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-02-01drm/nouveau/gem: fix fence_sync race / oopsBen Skeggs
Due to a race it was possible for a fence to be destroyed while another thread was trying to synchronise with it. If this happened in the fallback non-semaphore path, it lead to the following oops due to fence->channel being NULL. BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<fa9632ce>] nouveau_fence_update+0xe/0xe0 [nouveau] *pde = a649c067 SMP Modules linked in: fuse nouveau(O) ttm(O) drm_kms_helper(O) drm(O) mxm_wmi video wmi netconsole configfs lockd bnep bluetooth rfkill ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ip6table_filter ip6_tables snd_hda_codec_realtek snd_hda_intel snd_hda_cobinfmt_misc uinput ata_generic pata_acpi pata_aet2c_algo_bit i2c_core [last unloaded: wmi] Pid: 2255, comm: gnome-shell Tainted: G O 3.2.0-0.rc5.git0.1.fc17.i686 #1 System manufacturer System Product Name/M2A-VM EIP: 0060:[<fa9632ce>] EFLAGS: 00010296 CPU: 1 EIP is at nouveau_fence_update+0xe/0xe0 [nouveau] EAX: 00000000 EBX: ddfc6dd0 ECX: dd111580 EDX: 00000000 ESI: 00003e80 EDI: dd111580 EBP: dd121d00 ESP: dd121ce8 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 Process gnome-shell (pid: 2255, ti=dd120000 task=dd111580 task.ti=dd120000) Stack: 7dc86c76 00000000 00003e80 ddfc6dd0 00003e80 dd111580 dd121d0c fa96371f 00000000 dd121d3c fa963773 dd111580 01000246 000ec53d 00000000 ddfc6dd0 00001f40 00000000 ddfc6dd0 00000010 dc7df840 dd121d6c fa9639a0 00000000 Call Trace: [<fa96371f>] __nouveau_fence_signalled+0x1f/0x30 [nouveau] [<fa963773>] __nouveau_fence_wait+0x43/0xd0 [nouveau] [<fa9639a0>] nouveau_fence_sync+0x1a0/0x1c0 [nouveau] [<fa964046>] validate_list+0x176/0x300 [nouveau] [<f7d9c9c0>] ? ttm_bo_mem_put+0x30/0x30 [ttm] [<fa964b8a>] nouveau_gem_ioctl_pushbuf+0x48a/0xfd0 [nouveau] [<c0406481>] ? die+0x31/0x80 [<f7c93d98>] drm_ioctl+0x388/0x490 [drm] [<c0406481>] ? die+0x31/0x80 [<fa964700>] ? nouveau_gem_ioctl_new+0x150/0x150 [nouveau] [<c0635c7b>] ? file_has_perm+0xcb/0xe0 [<f7c93a10>] ? drm_copy_field+0x80/0x80 [drm] [<c0564f56>] do_vfs_ioctl+0x86/0x5b0 [<c0406481>] ? die+0x31/0x80 [<c0635f22>] ? selinux_file_ioctl+0x62/0x130 [<c0554f30>] ? fget_light+0x30/0x340 [<c05654ef>] sys_ioctl+0x6f/0x80 [<c099e3a4>] syscall_call+0x7/0xb [<c0406481>] ? die+0x31/0x80 [<c0406481>] ? die+0x31/0x80 Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
2012-02-01drm/nouveau: fix typo on mxmdcb optionBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-02-01drm/nouveau/mxm: pretend to succeed, even if we can't shadow the MXM-SISBen Skeggs
There's at least one known case where our shadowing code is buggy, and we fail init. Until we can be confident we're doing all this correctly, lets succeed and risk crazy bios tables rather than failing for perfectly valid configs too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-02-01drm/nouveau/disp: check that panel power gpio is enabled at init timeBen Skeggs
Reported-by: Yuriy Khomchik <homyur@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-01-31Merge branch 'hwmon-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776F hwmon: (sht15) fix bad error code MAINTAINERS: Drop maintainer for MAX1668 hwmon driver MAINTAINERS: Add hwmon entries for Wolfson hwmon: (f71805f) Fix clamping of temperature limits
2012-01-31Merge branch 'for-torvalds' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Here are some fixes to the pin control system that has accumulated since -rc1. Mainly Tony Lindgren fixed the module load/unload logic and the rest are minor fixes and documentation. * 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: add checks for empty function names pinctrl: fix pinmux_hog_maps when ctrl_dev_name is not set pinctrl: fix some pinmux typos pinctrl: free debugfs entries when unloading a pinmux driver pinctrl: unbreak error messages Documentation/pinctrl: fix a few syntax errors in code examples pinctrl: fix pinconf_pins_show iteration
2012-01-31Merge branches 'cma', 'ipath', 'misc', 'mlx4', 'nes' and 'qib' into for-nextRoland Dreier
2012-01-31RDMA/nes: Copyright updateTatyana Nikolova
Update copyright information in the source files. Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Faisal Latif <Faisal.Latif@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-01-31IB/mlx4: pass SMP vendor-specific attribute MADs to firmwareJack Morgenstein
In the current code, vendor-specific MADs (e.g with the FDR-10 attribute) are silently dropped by the driver, resulting in timeouts at the sending side and inability to query/configure the relevant feature. However, the ConnectX firmware is able to handle such MADs. For unsupported attributes, the firmware returns a GET_RESPONSE MAD containing an error status. For example, for a FDR-10 node with LID 11: # ibstat mlx4_0 1 CA: 'mlx4_0' Port 1: State: Active Physical state: LinkUp Rate: 40 (FDR10) Base lid: 11 LMC: 0 SM lid: 24 Capability mask: 0x02514868 Port GUID: 0x0002c903002e65d1 Link layer: InfiniBand Extended Port Query (EPI) vendor mad timeouts before the patch: # smpquery MEPI 11 -d ibwarn: [4196] smp_query_via: attr 0xff90 mod 0x0 route Lid 11 ibwarn: [4196] _do_madrpc: retry 1 (timeout 1000 ms) ibwarn: [4196] _do_madrpc: retry 2 (timeout 1000 ms) ibwarn: [4196] _do_madrpc: timeout after 3 retries, 3000 ms ibwarn: [4196] mad_rpc: _do_madrpc failed; dport (Lid 11) smpquery: iberror: [pid 4196] main: failed: operation EPI: ext port info query failed EPI query works OK with the patch: # smpquery MEPI 11 -d ibwarn: [6548] smp_query_via: attr 0xff90 mod 0x0 route Lid 11 ibwarn: [6548] mad_rpc: data offs 64 sz 64 mad data 0000 0000 0000 0001 0000 0001 0000 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 # Ext Port info: Lid 11 port 0 StateChangeEnable:...............0x00 LinkSpeedSupported:..............0x01 LinkSpeedEnabled:................0x01 LinkSpeedActive:.................0x01 Signed-off-by: Jack Morgenstein <jackm@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Acked-by: Ira Weiny <weiny2@llnl.gov> Cc: <stable@vger.kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-01-30Merge tag 'tty-3.3-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Here are some tty/serial patches for 3.3-rc1 Big thing here is the movement of the 8250 serial drivers to their own directory, now that the patch churn has calmed down. Other than that, only minor stuff (omap patches were reverted as they were found to be wrong), and another broken driver removed from the system. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * tag 'tty-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: Kill off Moorestown code Revert "tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode" Revert "tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip" serial: Fix wakeup init logic to speed up startup docbook: don't use serial_core.h in device-drivers book serial: amba-pl011: lock console writes against interrupts amba-pl011: do not disable RTS during shutdown tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode omap-serial: make serial_omap_restore_context depend on CONFIG_PM_RUNTIME omap-serial :Make the suspend/resume functions depend on CONFIG_PM_SLEEP. TTY: fix UV serial console regression jsm: Fixed EEH recovery error Updated TTY MAINTAINERS info serial: group all the 8250 related code together
2012-01-30firewire: ohci: disable MSI on Ricoh controllersStefan Richter
The PCIe device FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd FireWire Host Controller [1180:e832] (prog-if 10 [OHCI]) is unable to access attached FireWire devices when MSI is enabled but works if MSI is disabled. http://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg28251.html Hence add the "disable MSI" quirks flag for this device, or in fact for safety and simplicity for all current (R5U230, R5U231, R5U240) and future Ricoh PCIe 1394 controllers. Reported-by: Stefan Thomas <kontrapunktstefan@googlemail.com> Cc: 2.6.36+ <stable@vger.kernel.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2012-01-30Merge tag 'usb-3.3-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Here are a bunch of USB patches for 3.3-rc1. Nothing major, largest thing here is the removal of some drivers that did not work at all. Other than that, the normal collection of bugfixes and new device ids. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * tag 'usb-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (52 commits) uwb & wusb: fix kconfig error USB: Realtek cr: fix autopm scheduling while atomic USB: ftdi_sio: Add more identifiers xHCI: Cleanup isoc transfer ring when TD length mismatch found usb: musb: omap2430: minor cleanups. qcaux: add more Pantech UML190 and UML290 ports Revert "drivers: usb: Fix dependency for USB_HWA_HCD" usb: mv-otg - Fix build if CONFIG_USB is not set USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE usb: add support for STA2X11 host driver drivers: usb: Fix dependency for USB_HWA_HCD kernel-doc: fix new warning in usb.h USB: OHCI: fix new compiler warnings usb: serial: kobil_sct: fix compile warning: drivers/usb/host/ehci-fsl.c: add missing iounmap USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal USB: cdc-wdm: use two mutexes to allow simultaneous read and write USB: cdc-wdm: updating desc->length must be protected by spin_lock USB: usbsevseg: fix max length ...
2012-01-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
1) Setting link attributes can modify the size of the attributes that would be reported on a subsequent getlink netlink operation, therefore min_ifinfo_dump_size needs to be adjusted. From Stefan Gula. 2) Resegmentation of TSO frames while trimming can violate invariants expected by callers, namely that the number of segments can only stay the same or decrease, never increase. If MSS changes, however, we can trim data but then end up with more segments. Fix this by only segmenting to the MSS already recorded in the SKB. That's the simplest fix for now and if we want to get more fancy in the future that's a more involved change. This probably explains some retransmit counter inaccuracies. From Neal Cardwell. 3) Fix too-many-wakeups in POLL with AF_UNIX sockets, from Eric Dumazet. 4) Fix CAIF crashes wrt. namespace handling. From Eric Dumazet and Eric W. Biederman. 5) TCP port selection fixes from Flavio Leitner. 6) More socket memory cgroup build fixes in certain randonfig situations. From Glauber Costa. 7) Fix TCP memory sysctl regression reported by Ingo Molnar, also from Glauber Costa. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: af_unix: fix EPOLLET regression for stream sockets tcp: fix tcp_trim_head() to adjust segment count with skb MSS net/tcp: Fix tcp memory limits initialization when !CONFIG_SYSCTL net caif: Register properly as a pernet subsystem. netns: Fail conspicously if someone uses net_generic at an inappropriate time. net: explicitly add jump_label.h header to sock.h net: RTNETLINK adjusting values of min_ifinfo_dump_size ipv6: Fix ip_gre lockless xmits. xen-netfront: correct MAX_TX_TARGET calculation. netns: fix net_alloc_generic() tcp: bind() optimize port allocation tcp: bind() fix autoselection to share ports l2tp: l2tp_ip - fix possible oops on packet receive iwlwifi: fix PCI-E transport "inta" race mac80211: set bss_conf.idle when vif is connected mac80211: update oper_channel on ibss join
2012-01-30Merge tag 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator This fixes an integration issue with the regulator device tree bindings which shook out in -rc. The bindings were overly enthusiatic when deciding to set a voltage on a regulator and would try to set zero volts on an unconfigured regulator which isn't supported. * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Set apply_uV only when min and max voltages are defined
2012-01-30Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: [S390] dasd: revalidate server for new pathgroup [S390] dasd: revert LCU optimization [S390] cleanup entry point definition
2012-01-30vmwgfx: Fix assignment in vmw_framebuffer_create_handleRyan Mallon
The assignment of handle in vmw_framebuffer_create_handle doesn't actually do anything useful and is incorrectly assigning an integer value to a pointer argument. It appears that this is a typo and should be dereferencing handle rather than assigning to it directly. This fixes a bug where an undefined handle value is potentially returned to user-space. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Reviewed-by: Jakob Bornecrantz<jakob@vmware.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-30drm/radeon/kms: Fix device tree linkage of i2c busesJean Delvare
Properly set the parent device of i2c buses before registering them so that they will show at the right place in the device tree (rather than in /sys/devices directly.) Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Dave Airlie <airlied@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-30drm: Pass the real error code back during GEM bo initialisationChris Wilson
In particular, I found I was hitting the max-file limit in the VFS, and the EFILE was being magically transformed into ENOMEM. Confusion reigns. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-30Revert "drm/i810: cleanup reclaim_buffers"Daniel Vetter
This reverts commit 87499ffdcb1c70f66988cd8febc4ead0ba2f9118. Where is that paper bag ... ah here. I've failed to take an odd interaction between my other cleanups and this reclaim_buffers patch into account and also failed to properly test it. Looks like there are more dragons and hidden trapdoors in the drm release path than actual lines of code. Until I get a clue, let's just revert this. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-29hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776FGuenter Roeck
NCT6776F only supports pwm mode for pwm2 and pwm3. Return error if an attempt is made to set those pwm channels to DC mode. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: stable@vger.kernel.org # 3.0+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>