* [ 00/11] 3.4.18-stable review
@ 2012-11-02 17:06 Greg Kroah-Hartman
2012-11-02 17:06 ` [ 01/11] ext4: fix unjournaled inode bitmap modification Greg Kroah-Hartman
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, torvalds, akpm, alan
This is the start of the stable review cycle for the 3.4.18 release.
There are 11 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun Nov 4 17:03:08 UTC 2012.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.4.18-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 3.4.18-rc1
Ben Skeggs <bskeggs@redhat.com>
drm/nouveau: headless mode by default if pci class != vga display
Ben Skeggs <bskeggs@redhat.com>
drm/nouveau: fix suspend/resume when in headless mode
Ben Skeggs <bskeggs@redhat.com>
drm/nouveau: silence modesetting spam on pre-gf8 chipsets
Jiri Slaby <jslaby@suse.cz>
HID: microsoft: fix invalid rdesc for 3k kbd
Nicholas Bellinger <nab@linux-iscsi.org>
target: Fix double-free of se_cmd in target_complete_tmr_failure
Larry Finger <Larry.Finger@lwfinger.net>
b43: Fix oops on unload when firmware not found
Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
floppy: do put_disk on current dr if blk_init_queue fails
NeilBrown <neilb@suse.de>
md/raid1: Fix assembling of arrays containing Replacements.
Mathias Nyman <mathias.nyman@linux.intel.com>
gpiolib: Don't return -EPROBE_DEFER to sysfs, or for invalid gpios
Dan Carpenter <dan.carpenter@oracle.com>
gpio-timberdale: fix a potential wrapping issue
Eric Sandeen <sandeen@redhat.com>
ext4: fix unjournaled inode bitmap modification
-------------
Diffstat:
Makefile | 4 ++--
drivers/block/floppy.c | 1 +
drivers/gpio/gpio-timberdale.c | 4 ++--
drivers/gpio/gpiolib.c | 10 +++++++---
drivers/gpu/drm/nouveau/nouveau_drv.c | 20 +++++++++++---------
drivers/gpu/drm/nouveau/nouveau_state.c | 4 +++-
drivers/gpu/drm/nouveau/nv04_dac.c | 8 ++++----
drivers/gpu/drm/nouveau/nv04_dfp.c | 6 +++---
drivers/gpu/drm/nouveau/nv04_tv.c | 4 ++--
drivers/hid/hid-microsoft.c | 18 +++++++++++++-----
drivers/md/raid1.c | 2 +-
drivers/net/wireless/b43/main.c | 2 ++
drivers/target/target_core_transport.c | 1 -
fs/ext4/ialloc.c | 19 +++++++++----------
14 files changed, 60 insertions(+), 43 deletions(-)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 01/11] ext4: fix unjournaled inode bitmap modification
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 02/11] gpio-timberdale: fix a potential wrapping issue Greg Kroah-Hartman
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Nix, Eric Sandeen, Theodore Tso
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Sandeen <sandeen@redhat.com>
commit ffb5387e85d528fb6d0d924abfa3fbf0fc484071 upstream.
commit 119c0d4460b001e44b41dcf73dc6ee794b98bd31 changed
ext4_new_inode() such that the inode bitmap was being modified
outside a transaction, which could lead to corruption, and was
discovered when journal_checksum found a bad checksum in the
journal during log replay.
Nix ran into this when using the journal_async_commit mount
option, which enables journal checksumming. The ensuing
journal replay failures due to the bad checksums led to
filesystem corruption reported as the now infamous
"Apparent serious progressive ext4 data corruption bug"
[ Changed by tytso to only call ext4_journal_get_write_access() only
when we're fairly certain that we're going to allocate the inode. ]
I've tested this by mounting with journal_checksum and
running fsstress then dropping power; I've also tested by
hacking DM to create snapshots w/o first quiescing, which
allows me to test journal replay repeatedly w/o actually
power-cycling the box. Without the patch I hit a journal
checksum error every time. With this fix it survives
many iterations.
Reported-by: Nix <nix@esperi.org.uk>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/ialloc.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -697,6 +697,10 @@ repeat_in_this_group:
"inode=%lu", ino + 1);
continue;
}
+ BUFFER_TRACE(inode_bitmap_bh, "get_write_access");
+ err = ext4_journal_get_write_access(handle, inode_bitmap_bh);
+ if (err)
+ goto fail;
ext4_lock_group(sb, group);
ret2 = ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data);
ext4_unlock_group(sb, group);
@@ -710,6 +714,11 @@ repeat_in_this_group:
goto out;
got:
+ BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata");
+ err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh);
+ if (err)
+ goto fail;
+
/* We may have to initialize the block bitmap if it isn't already */
if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
@@ -742,11 +751,6 @@ got:
goto fail;
}
- BUFFER_TRACE(inode_bitmap_bh, "get_write_access");
- err = ext4_journal_get_write_access(handle, inode_bitmap_bh);
- if (err)
- goto fail;
-
BUFFER_TRACE(group_desc_bh, "get_write_access");
err = ext4_journal_get_write_access(handle, group_desc_bh);
if (err)
@@ -789,11 +793,6 @@ got:
ext4_unlock_group(sb, group);
}
- BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata");
- err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh);
- if (err)
- goto fail;
-
BUFFER_TRACE(group_desc_bh, "call ext4_handle_dirty_metadata");
err = ext4_handle_dirty_metadata(handle, NULL, group_desc_bh);
if (err)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 02/11] gpio-timberdale: fix a potential wrapping issue
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
2012-11-02 17:06 ` [ 01/11] ext4: fix unjournaled inode bitmap modification Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 03/11] gpiolib: Dont return -EPROBE_DEFER to sysfs, or for invalid gpios Greg Kroah-Hartman
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Dan Carpenter, Linus Walleij
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit d79550a7bc35c16476ebdc27c78378d8093390ec upstream.
->last_ier is an unsigned long but the high bits can't be used int the
original code because the shift wraps.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/gpio-timberdale.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -116,7 +116,7 @@ static void timbgpio_irq_disable(struct
unsigned long flags;
spin_lock_irqsave(&tgpio->lock, flags);
- tgpio->last_ier &= ~(1 << offset);
+ tgpio->last_ier &= ~(1UL << offset);
iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
spin_unlock_irqrestore(&tgpio->lock, flags);
}
@@ -128,7 +128,7 @@ static void timbgpio_irq_enable(struct i
unsigned long flags;
spin_lock_irqsave(&tgpio->lock, flags);
- tgpio->last_ier |= 1 << offset;
+ tgpio->last_ier |= 1UL << offset;
iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);
spin_unlock_irqrestore(&tgpio->lock, flags);
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 03/11] gpiolib: Dont return -EPROBE_DEFER to sysfs, or for invalid gpios
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
2012-11-02 17:06 ` [ 01/11] ext4: fix unjournaled inode bitmap modification Greg Kroah-Hartman
2012-11-02 17:06 ` [ 02/11] gpio-timberdale: fix a potential wrapping issue Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 04/11] md/raid1: Fix assembling of arrays containing Replacements Greg Kroah-Hartman
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Mathias Nyman, Linus Walleij
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Nyman <mathias.nyman@linux.intel.com>
commit ad2fab36d7922401c4576fb7ea9b21a47a29a17f upstream.
gpios requested with invalid numbers, or gpios requested from userspace via sysfs
should not try to be deferred on failure.
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/gpiolib.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -623,9 +623,11 @@ static ssize_t export_store(struct class
*/
status = gpio_request(gpio, "sysfs");
- if (status < 0)
+ if (status < 0) {
+ if (status == -EPROBE_DEFER)
+ status = -ENODEV;
goto done;
-
+ }
status = gpio_export(gpio, true);
if (status < 0)
gpio_free(gpio);
@@ -1191,8 +1193,10 @@ int gpio_request(unsigned gpio, const ch
spin_lock_irqsave(&gpio_lock, flags);
- if (!gpio_is_valid(gpio))
+ if (!gpio_is_valid(gpio)) {
+ status = -EINVAL;
goto done;
+ }
desc = &gpio_desc[gpio];
chip = desc->chip;
if (chip == NULL)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 04/11] md/raid1: Fix assembling of arrays containing Replacements.
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2012-11-02 17:06 ` [ 03/11] gpiolib: Dont return -EPROBE_DEFER to sysfs, or for invalid gpios Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 05/11] floppy: do put_disk on current dr if blk_init_queue fails Greg Kroah-Hartman
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, NeilBrown
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <neilb@suse.de>
commit 02b898f2f04e418094f0093a3ad0b415bcdbe8eb upstream.
setup_conf in raid1.c uses conf->raid_disks before assigning
a value. It is used when including 'Replacement' devices.
The consequence is that assembling an array which contains a
replacement will misbehave and either not include the replacement, or
not include the device being replaced.
Though this doesn't lead directly to data corruption, it could lead to
reduced data safety.
So use mddev->raid_disks, which is initialised, instead.
Bug was introduced by commit c19d57980b38a5bb613a898937a1cf85f422fb9b
md/raid1: recognise replacements when assembling arrays.
in 3.3, so fix is suitable for 3.3.y thru 3.6.y.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/raid1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2564,7 +2564,7 @@ static struct r1conf *setup_conf(struct
|| disk_idx < 0)
continue;
if (test_bit(Replacement, &rdev->flags))
- disk = conf->mirrors + conf->raid_disks + disk_idx;
+ disk = conf->mirrors + mddev->raid_disks + disk_idx;
else
disk = conf->mirrors + disk_idx;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 05/11] floppy: do put_disk on current dr if blk_init_queue fails
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2012-11-02 17:06 ` [ 04/11] md/raid1: Fix assembling of arrays containing Replacements Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 06/11] b43: Fix oops on unload when firmware not found Greg Kroah-Hartman
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Ben Hutchings,
Herton Ronaldo Krzesinski, Jiri Kosina, Jens Axboe
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
commit 238ab78469c6ab7845b43d5061cd3c92331b2452 upstream.
If blk_init_queue fails, we do not call put_disk on the current dr
(dr is decremented first in the error handling loop).
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/floppy.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4161,6 +4161,7 @@ static int __init floppy_init(void)
disks[dr]->queue = blk_init_queue(do_fd_request, &floppy_lock);
if (!disks[dr]->queue) {
+ put_disk(disks[dr]);
err = -ENOMEM;
goto out_put_disk;
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 06/11] b43: Fix oops on unload when firmware not found
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2012-11-02 17:06 ` [ 05/11] floppy: do put_disk on current dr if blk_init_queue fails Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 07/11] target: Fix double-free of se_cmd in target_complete_tmr_failure Greg Kroah-Hartman
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Larry Finger, Markus Kanet,
John W. Linville
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit f89ff6441df06abc2d95f3ef67525923032d6283 upstream.
When b43 fails to find firmware when loaded, a subsequent unload will
oops due to calling ieee80211_unregister_hw() when the corresponding
register call was never made.
Commit 2d838bb608e2d1f6cb4280e76748cb812dc822e7 fixed the same problem
for b43legacy.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Markus Kanet <dvmailing@gmx.eu>
Cc: Markus Kanet <dvmailing@gmx.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/b43/main.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -5430,6 +5430,8 @@ static void b43_ssb_remove(struct ssb_de
cancel_work_sync(&wldev->restart_work);
B43_WARN_ON(!wl);
+ if (!wldev->fw.ucode.data)
+ return; /* NULL if firmware never loaded */
if (wl->current_dev == wldev) {
/* Restore the queues count before unregistering, because firmware detect
* might have modified it. Restoring is important, so the networking
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 07/11] target: Fix double-free of se_cmd in target_complete_tmr_failure
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2012-11-02 17:06 ` [ 06/11] b43: Fix oops on unload when firmware not found Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 08/11] HID: microsoft: fix invalid rdesc for 3k kbd Greg Kroah-Hartman
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, alan, Nicholas Bellinger, Christoph Hellwig,
Roland Dreier, Andy Grover
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicholas Bellinger <nab@linux-iscsi.org>
commit e13d5fef88c40b87c8430f8274c3a9ca32ef90bc upstream.
Fabric drivers currently expect to internally release se_cmd in the event
of a TMR failure during target_submit_tmr(), which means the immediate call
to transport_generic_free_cmd() after TFO->queue_tm_rsp() from within
target_complete_tmr_failure() workqueue context is wrong.
This is done as some fabrics expect TMR operations to be acknowledged
before releasing the descriptor, so the assumption that core is releasing
se_cmd associated TMR memory is incorrect. This fixes a OOPs where
transport_generic_free_cmd() was being called more than once.
This bug was originally observed with tcm_qla2xxx fabric ports.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@purestorage.com>
Cc: Andy Grover <agrover@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/target_core_transport.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1748,7 +1748,6 @@ static void target_complete_tmr_failure(
se_cmd->se_tmr_req->response = TMR_LUN_DOES_NOT_EXIST;
se_cmd->se_tfo->queue_tm_rsp(se_cmd);
- transport_generic_free_cmd(se_cmd, 0);
}
/**
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 08/11] HID: microsoft: fix invalid rdesc for 3k kbd
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2012-11-02 17:06 ` [ 07/11] target: Fix double-free of se_cmd in target_complete_tmr_failure Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 09/11] drm/nouveau: silence modesetting spam on pre-gf8 chipsets Greg Kroah-Hartman
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Jiri Slaby, Jiri Kosina
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Slaby <jslaby@suse.cz>
commit 3ccc60f9d8c39180c205dba1a020735bda1b2491 upstream.
Microsoft Digital Media Keyboard 3000 has two interfaces, and the
second one has a report descriptor with a bug. The second collection
says:
05 01 -- global; usage page -- 01 -- Generic Desktop Controls
09 80 -- local; usage -- 80 -- System Control
a1 01 -- main; collection -- 01 -- application
85 03 -- global; report ID -- 03
19 00 -- local; Usage Minimum -- 00
29 ff -- local; Usage Maximum -- ff
15 00 -- global; Logical Minimum -- 0
26 ff 00 -- global; Logical Maximum -- ff
81 00 -- main; input
c0 -- main; End Collection
I.e. it makes us think that there are all kinds of usages of system
control. That the keyboard is a not only a keyboard, but also a
joystick, mouse, gamepad, keypad, etc. The same as for the Wireless
Desktop Receiver, this should be Physical Min/Max. So fix that
appropriately.
References: https://bugzilla.novell.com/show_bug.cgi?id=776834
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-microsoft.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
--- a/drivers/hid/hid-microsoft.c
+++ b/drivers/hid/hid-microsoft.c
@@ -29,22 +29,30 @@
#define MS_RDESC 0x08
#define MS_NOGET 0x10
#define MS_DUPLICATE_USAGES 0x20
+#define MS_RDESC_3K 0x40
-/*
- * Microsoft Wireless Desktop Receiver (Model 1028) has
- * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
- */
static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);
+ /*
+ * Microsoft Wireless Desktop Receiver (Model 1028) has
+ * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
+ */
if ((quirks & MS_RDESC) && *rsize == 571 && rdesc[557] == 0x19 &&
rdesc[559] == 0x29) {
hid_info(hdev, "fixing up Microsoft Wireless Receiver Model 1028 report descriptor\n");
rdesc[557] = 0x35;
rdesc[559] = 0x45;
}
+ /* the same as above (s/usage/physical/) */
+ if ((quirks & MS_RDESC_3K) && *rsize == 106 &&
+ !memcmp((char []){ 0x19, 0x00, 0x29, 0xff },
+ &rdesc[94], 4)) {
+ rdesc[94] = 0x35;
+ rdesc[96] = 0x45;
+ }
return rdesc;
}
@@ -193,7 +201,7 @@ static const struct hid_device_id ms_dev
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB),
.driver_data = MS_PRESENTER },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K),
- .driver_data = MS_ERGONOMY },
+ .driver_data = MS_ERGONOMY | MS_RDESC_3K },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0),
.driver_data = MS_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500),
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 09/11] drm/nouveau: silence modesetting spam on pre-gf8 chipsets
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2012-11-02 17:06 ` [ 08/11] HID: microsoft: fix invalid rdesc for 3k kbd Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 10/11] drm/nouveau: fix suspend/resume when in headless mode Greg Kroah-Hartman
2012-11-02 17:06 ` [ 11/11] drm/nouveau: headless mode by default if pci class != vga display Greg Kroah-Hartman
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Ben Skeggs
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Skeggs <bskeggs@redhat.com>
commit cee59f15a60cc6269a25e3f6fbf1a577d6ab8115 upstream.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/nouveau/nv04_dac.c | 8 ++++----
drivers/gpu/drm/nouveau/nv04_dfp.c | 6 +++---
drivers/gpu/drm/nouveau/nv04_tv.c | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
--- a/drivers/gpu/drm/nouveau/nv04_dac.c
+++ b/drivers/gpu/drm/nouveau/nv04_dac.c
@@ -210,7 +210,7 @@ out:
NVWriteVgaCrtc(dev, 0, NV_CIO_CR_MODE_INDEX, saved_cr_mode);
if (blue == 0x18) {
- NV_INFO(dev, "Load detected on head A\n");
+ NV_DEBUG(dev, "Load detected on head A\n");
return connector_status_connected;
}
@@ -323,7 +323,7 @@ nv17_dac_detect(struct drm_encoder *enco
if (nv17_dac_sample_load(encoder) &
NV_PRAMDAC_TEST_CONTROL_SENSEB_ALLHI) {
- NV_INFO(dev, "Load detected on output %c\n",
+ NV_DEBUG(dev, "Load detected on output %c\n",
'@' + ffs(dcb->or));
return connector_status_connected;
} else {
@@ -398,7 +398,7 @@ static void nv04_dac_commit(struct drm_e
helper->dpms(encoder, DRM_MODE_DPMS_ON);
- NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
+ NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
}
@@ -447,7 +447,7 @@ static void nv04_dac_dpms(struct drm_enc
return;
nv_encoder->last_dpms = mode;
- NV_INFO(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
+ NV_DEBUG(dev, "Setting dpms mode %d on vga encoder (output %d)\n",
mode, nv_encoder->dcb->index);
nv04_dac_update_dacclk(encoder, mode == DRM_MODE_DPMS_ON);
--- a/drivers/gpu/drm/nouveau/nv04_dfp.c
+++ b/drivers/gpu/drm/nouveau/nv04_dfp.c
@@ -476,7 +476,7 @@ static void nv04_dfp_commit(struct drm_e
helper->dpms(encoder, DRM_MODE_DPMS_ON);
- NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
+ NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
}
@@ -519,7 +519,7 @@ static void nv04_lvds_dpms(struct drm_en
return;
nv_encoder->last_dpms = mode;
- NV_INFO(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
+ NV_DEBUG(dev, "Setting dpms mode %d on lvds encoder (output %d)\n",
mode, nv_encoder->dcb->index);
if (was_powersaving && is_powersaving_dpms(mode))
@@ -564,7 +564,7 @@ static void nv04_tmds_dpms(struct drm_en
return;
nv_encoder->last_dpms = mode;
- NV_INFO(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
+ NV_DEBUG(dev, "Setting dpms mode %d on tmds encoder (output %d)\n",
mode, nv_encoder->dcb->index);
nv04_dfp_update_backlight(encoder, mode);
--- a/drivers/gpu/drm/nouveau/nv04_tv.c
+++ b/drivers/gpu/drm/nouveau/nv04_tv.c
@@ -69,7 +69,7 @@ static void nv04_tv_dpms(struct drm_enco
struct nv04_mode_state *state = &dev_priv->mode_reg;
uint8_t crtc1A;
- NV_INFO(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
+ NV_DEBUG(dev, "Setting dpms mode %d on TV encoder (output %d)\n",
mode, nv_encoder->dcb->index);
state->pllsel &= ~(PLLSEL_TV_CRTC1_MASK | PLLSEL_TV_CRTC2_MASK);
@@ -162,7 +162,7 @@ static void nv04_tv_commit(struct drm_en
helper->dpms(encoder, DRM_MODE_DPMS_ON);
- NV_INFO(dev, "Output %s is running on CRTC %d using output %c\n",
+ NV_DEBUG(dev, "Output %s is running on CRTC %d using output %c\n",
drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base), nv_crtc->index,
'@' + ffs(nv_encoder->dcb->or));
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 10/11] drm/nouveau: fix suspend/resume when in headless mode
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2012-11-02 17:06 ` [ 09/11] drm/nouveau: silence modesetting spam on pre-gf8 chipsets Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
2012-11-02 17:06 ` [ 11/11] drm/nouveau: headless mode by default if pci class != vga display Greg Kroah-Hartman
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Ben Skeggs
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Skeggs <bskeggs@redhat.com>
Backport of fixes from upstream commit:
9430738d80223a1cd791a2baa74fa170d3df1262
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/nouveau/nouveau_drv.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -186,11 +186,13 @@ nouveau_pci_suspend(struct pci_dev *pdev
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
- NV_INFO(dev, "Disabling display...\n");
- nouveau_display_fini(dev);
+ if (dev->mode_config.num_crtc) {
+ NV_INFO(dev, "Disabling display...\n");
+ nouveau_display_fini(dev);
- NV_INFO(dev, "Disabling fbcon...\n");
- nouveau_fbcon_set_suspend(dev, 1);
+ NV_INFO(dev, "Disabling fbcon...\n");
+ nouveau_fbcon_set_suspend(dev, 1);
+ }
NV_INFO(dev, "Unpinning framebuffer(s)...\n");
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
@@ -363,10 +365,12 @@ nouveau_pci_resume(struct pci_dev *pdev)
NV_ERROR(dev, "Could not pin/map cursor.\n");
}
- nouveau_fbcon_set_suspend(dev, 0);
- nouveau_fbcon_zfill_all(dev);
+ if (dev->mode_config.num_crtc) {
+ nouveau_fbcon_set_suspend(dev, 0);
+ nouveau_fbcon_zfill_all(dev);
- nouveau_display_init(dev);
+ nouveau_display_init(dev);
+ }
/* Force CLUT to get re-loaded during modeset */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
^ permalink raw reply [flat|nested] 12+ messages in thread
* [ 11/11] drm/nouveau: headless mode by default if pci class != vga display
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2012-11-02 17:06 ` [ 10/11] drm/nouveau: fix suspend/resume when in headless mode Greg Kroah-Hartman
@ 2012-11-02 17:06 ` Greg Kroah-Hartman
10 siblings, 0 replies; 12+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-02 17:06 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, alan, Ben Skeggs
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Skeggs <bskeggs@redhat.com>
This is to prevent nouveau from taking over the console on headless boards
such as Tesla.
Backport of upstream commit: e412e95a268fa8544858ebfe066826b290430d51
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -488,9 +488,7 @@ static int __init nouveau_init(void)
#ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force())
nouveau_modeset = 0;
- else
#endif
- nouveau_modeset = 1;
}
if (!nouveau_modeset)
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index c610144..f5e9584 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -50,6 +50,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_engine *engine = &dev_priv->engine;
+ u32 pclass = dev->pdev->class >> 8;
switch (dev_priv->chipset & 0xf0) {
case 0x00:
@@ -428,7 +429,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
}
/* headless mode */
- if (nouveau_modeset == 2) {
+ if (nouveau_modeset == 2 ||
+ (nouveau_modeset < 0 && pclass != PCI_CLASS_DISPLAY_VGA)) {
engine->display.early_init = nouveau_stub_init;
engine->display.late_takedown = nouveau_stub_takedown;
engine->display.create = nouveau_stub_init;
--
1.7.12.4
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-11-02 17:06 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 17:06 [ 00/11] 3.4.18-stable review Greg Kroah-Hartman
2012-11-02 17:06 ` [ 01/11] ext4: fix unjournaled inode bitmap modification Greg Kroah-Hartman
2012-11-02 17:06 ` [ 02/11] gpio-timberdale: fix a potential wrapping issue Greg Kroah-Hartman
2012-11-02 17:06 ` [ 03/11] gpiolib: Dont return -EPROBE_DEFER to sysfs, or for invalid gpios Greg Kroah-Hartman
2012-11-02 17:06 ` [ 04/11] md/raid1: Fix assembling of arrays containing Replacements Greg Kroah-Hartman
2012-11-02 17:06 ` [ 05/11] floppy: do put_disk on current dr if blk_init_queue fails Greg Kroah-Hartman
2012-11-02 17:06 ` [ 06/11] b43: Fix oops on unload when firmware not found Greg Kroah-Hartman
2012-11-02 17:06 ` [ 07/11] target: Fix double-free of se_cmd in target_complete_tmr_failure Greg Kroah-Hartman
2012-11-02 17:06 ` [ 08/11] HID: microsoft: fix invalid rdesc for 3k kbd Greg Kroah-Hartman
2012-11-02 17:06 ` [ 09/11] drm/nouveau: silence modesetting spam on pre-gf8 chipsets Greg Kroah-Hartman
2012-11-02 17:06 ` [ 10/11] drm/nouveau: fix suspend/resume when in headless mode Greg Kroah-Hartman
2012-11-02 17:06 ` [ 11/11] drm/nouveau: headless mode by default if pci class != vga display Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).