All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning
@ 2015-11-09 11:56 Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/nouveau/gem: return only valid domain when there's only one Jiri Slaby
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: SeongJae Park, Mark Brown, Jiri Slaby

From: SeongJae Park <sj38.park@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit e1bde3b11fedace5042f0232339da90bc85666af upstream.

Fix the pointer-integer size mismatch warning below:
	drivers/spi/spi-gpio.c: In function ‘spi_gpio_setup’:
	drivers/spi/spi-gpio.c:252:8: warning: cast from pointer to integer of
			different size [-Wpointer-to-int-cast]
	   cs = (unsigned int) spi->controller_data;
	        ^

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/spi/spi-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
index 68b69fec13a9..64cebdb0a8b6 100644
--- a/drivers/spi/spi-gpio.c
+++ b/drivers/spi/spi-gpio.c
@@ -249,7 +249,7 @@ static int spi_gpio_setup(struct spi_device *spi)
 		/*
 		 * ... otherwise, take it from spi->controller_data
 		 */
-		cs = (unsigned int) spi->controller_data;
+		cs = (unsigned int)(uintptr_t) spi->controller_data;
 	}
 
 	if (!spi->controller_state) {
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] drm/nouveau/gem: return only valid domain when there's only one
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/i915: Restore lost DPLL register write on gen2-4 Jiri Slaby
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Ilia Mirkin, Ben Skeggs, Jiri Slaby

From: Ilia Mirkin <imirkin@alum.mit.edu>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 2a6c521bb41ce862e43db46f52e7681d33e8d771 upstream.

On nv50+, we restrict the valid domains to just the one where the buffer
was originally created. However after the buffer is evicted to system
memory, we might move it back to a different domain that was not
originally valid. When sharing the buffer and retrieving its GEM_INFO
data, we still want the domain that will be valid for this buffer in a
pushbuf, not the one where it currently happens to be.

This resolves fdo#92504 and several others. These are due to suspend
evicting all buffers, making it more likely that they temporarily end up
in the wrong place.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92504
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/gpu/drm/nouveau/nouveau_gem.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index d2dfdf7663c2..152d39daac3e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -205,11 +205,12 @@ nouveau_gem_info(struct drm_file *file_priv, struct drm_gem_object *gem,
 	struct nouveau_bo *nvbo = nouveau_gem_object(gem);
 	struct nouveau_vma *vma;
 
-	if (nvbo->bo.mem.mem_type == TTM_PL_TT)
+	if (is_power_of_2(nvbo->valid_domains))
+		rep->domain = nvbo->valid_domains;
+	else if (nvbo->bo.mem.mem_type == TTM_PL_TT)
 		rep->domain = NOUVEAU_GEM_DOMAIN_GART;
 	else
 		rep->domain = NOUVEAU_GEM_DOMAIN_VRAM;
-
 	rep->offset = nvbo->bo.offset;
 	if (cli->base.vm) {
 		vma = nouveau_bo_vma_find(nvbo, cli->base.vm);
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] drm/i915: Restore lost DPLL register write on gen2-4
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/nouveau/gem: return only valid domain when there's only one Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-11 22:25   ` Luis Henriques
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] rbd: require stable pages if message data CRCs are enabled Jiri Slaby
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Ville Syrjälä, Nick Bowler, Jani Nikula, Jiri Slaby

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 8e7a65aa70bcc1235a44e40ae0da5056525fe081 upstream.

We accidentally lost the initial DPLL register write in
1c4e02746147 drm/i915: Fix DVO 2x clock enable on 830M

The "three times for luck" hack probably saved us from a total
disaster. But anyway, bring the initial write back so that the
code actually makes some sense.

Reported-and-tested-by: Nick Bowler <nbowler@draconx.ca>
References: http://mid.gmane.org/CAN_QmVyMaArxYgEcVVsGvsMo7-6ohZr8HmF5VhkkL4i9KOmrhw@mail.gmail.com
Cc: Nick Bowler <nbowler@draconx.ca>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/gpu/drm/i915/intel_display.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 37a9d3c89feb..8af80f5fe210 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1379,6 +1379,8 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
 
 	I915_WRITE(reg, dpll);
 
+	I915_WRITE(reg, dpll);
+
 	/* Wait for the clocks to stabilize. */
 	POSTING_READ(reg);
 	udelay(150);
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] rbd: require stable pages if message data CRCs are enabled
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/nouveau/gem: return only valid domain when there's only one Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/i915: Restore lost DPLL register write on gen2-4 Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] Revert "ARM64: unwind: Fix PC calculation" Jiri Slaby
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Ronny Hegewald, Ronny Hegewald, Ilya Dryomov, Jiri Slaby

From: Ronny Hegewald <ronny.hegewald@online.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit bae818ee1577c27356093901a0ea48f672eda514 upstream.

rbd requires stable pages, as it performs a crc of the page data before
they are send to the OSDs.

But since kernel 3.9 (patch 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0
"mm: only enforce stable page writes if the backing device requires
it") it is not assumed anymore that block devices require stable pages.

This patch sets the necessary flag to get stable pages back for rbd.

In a ceph installation that provides multiple ext4 formatted rbd
devices "bad crc" messages appeared regularly (ca 1 message every 1-2
minutes on every OSD that provided the data for the rbd) in the
OSD-logs before this patch. After this patch this messages are pretty
much gone (only ca 1-2 / month / OSD).

Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de>
[idryomov@gmail.com: require stable pages only in crc case, changelog]
[idryomov@gmail.com: backport to 3.9-3.17: context]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/block/rbd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 66f632730969..6d3ec00ba845 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3441,6 +3441,9 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
 	blk_queue_io_opt(q, segment_size);
 
 	blk_queue_merge_bvec(q, rbd_merge_bvec);
+	if (!ceph_test_opt(rbd_dev->rbd_client->client, NOCRC))
+		q->backing_dev_info.capabilities |= BDI_CAP_STABLE_WRITES;
+
 	disk->queue = q;
 
 	q->queuedata = rbd_dev;
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] Revert "ARM64: unwind: Fix PC calculation"
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (2 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] rbd: require stable pages if message data CRCs are enabled Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] dm btree: fix leak of bufio-backed block in btree_split_beneath error path Jiri Slaby
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Will Deacon, Jiri Slaby

From: Will Deacon <will.deacon@arm.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 9702970c7bd3e2d6fecb642a190269131d4ac16c upstream.

This reverts commit e306dfd06fcb44d21c80acb8e5a88d55f3d1cf63.

With this patch applied, we were the only architecture making this sort
of adjustment to the PC calculation in the unwinder. This causes
problems for ftrace, where the PC values are matched against the
contents of the stack frames in the callchain and fail to match any
records after the address adjustment.

Whilst there has been some effort to change ftrace to workaround this,
those patches are not yet ready for mainline and, since we're the odd
architecture in this regard, let's just step in line with other
architectures (like arch/arm/) for now.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 arch/arm64/kernel/stacktrace.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
index 048334bb2651..d25459ff57fc 100644
--- a/arch/arm64/kernel/stacktrace.c
+++ b/arch/arm64/kernel/stacktrace.c
@@ -48,11 +48,7 @@ int unwind_frame(struct stackframe *frame)
 
 	frame->sp = fp + 0x10;
 	frame->fp = *(unsigned long *)(fp);
-	/*
-	 * -4 here because we care about the PC at time of bl,
-	 * not where the return will go.
-	 */
-	frame->pc = *(unsigned long *)(fp + 8) - 4;
+	frame->pc = *(unsigned long *)(fp + 8);
 
 	return 0;
 }
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] dm btree: fix leak of bufio-backed block in btree_split_beneath error path
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (3 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] Revert "ARM64: unwind: Fix PC calculation" Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xhci: handle no ping response error properly Jiri Slaby
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Mike Snitzer, Jiri Slaby

From: Mike Snitzer <snitzer@redhat.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 4dcb8b57df3593dcb20481d9d6cf79d1dc1534be upstream.

btree_split_beneath()'s error path had an outstanding FIXME that speaks
directly to the potential for _not_ cleaning up a previously allocated
bufio-backed block.

Fix this by releasing the previously allocated bufio block using
unlock_block().

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/md/persistent-data/dm-btree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c
index 50cf11119af9..fc3d733aab1c 100644
--- a/drivers/md/persistent-data/dm-btree.c
+++ b/drivers/md/persistent-data/dm-btree.c
@@ -523,7 +523,7 @@ static int btree_split_beneath(struct shadow_spine *s, uint64_t key)
 
 	r = new_block(s->info, &right);
 	if (r < 0) {
-		/* FIXME: put left */
+		unlock_block(s->info, left);
 		return r;
 	}
 
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] xhci: handle no ping response error properly
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (4 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] dm btree: fix leak of bufio-backed block in btree_split_beneath error path Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xhci: Add spurious wakeup quirk for LynxPoint-LP controllers Jiri Slaby
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Mathias Nyman, Jiri Slaby

From: Mathias Nyman <mathias.nyman@linux.intel.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 3b4739b8951d650becbcd855d7d6f18ac98a9a85 upstream.

If a host fails to wake up a isochronous SuperSpeed device from U1/U2
in time for a isoch transfer it will generate a "No ping response error"
Host will then move to the next transfer descriptor.

Handle this case in the same way as missed service errors, tag the
current TD as skipped and handle it on the next transfer event.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/usb/host/xhci-ring.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index ad381c22e5ac..2c9d2c33b834 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2387,6 +2387,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 	u32 trb_comp_code;
 	int ret = 0;
 	int td_num = 0;
+	bool handling_skipped_tds = false;
 
 	slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));
 	xdev = xhci->devs[slot_id];
@@ -2520,6 +2521,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 		ep->skip = true;
 		xhci_dbg(xhci, "Miss service interval error, set skip flag\n");
 		goto cleanup;
+	case COMP_PING_ERR:
+		ep->skip = true;
+		xhci_dbg(xhci, "No Ping response error, Skip one Isoc TD\n");
+		goto cleanup;
 	default:
 		if (xhci_is_vendor_info_code(xhci, trb_comp_code)) {
 			status = 0;
@@ -2651,13 +2656,18 @@ static int handle_tx_event(struct xhci_hcd *xhci,
 						 ep, &status);
 
 cleanup:
+
+
+		handling_skipped_tds = ep->skip &&
+			trb_comp_code != COMP_MISSED_INT &&
+			trb_comp_code != COMP_PING_ERR;
+
 		/*
-		 * Do not update event ring dequeue pointer if ep->skip is set.
-		 * Will roll back to continue process missed tds.
+		 * Do not update event ring dequeue pointer if we're in a loop
+		 * processing missed tds.
 		 */
-		if (trb_comp_code == COMP_MISSED_INT || !ep->skip) {
+		if (!handling_skipped_tds)
 			inc_deq(xhci, xhci->event_ring);
-		}
 
 		if (ret) {
 			urb = td->urb;
@@ -2692,7 +2702,7 @@ cleanup:
 	 * Process them as short transfer until reach the td pointed by
 	 * the event.
 	 */
-	} while (ep->skip && trb_comp_code != COMP_MISSED_INT);
+	} while (handling_skipped_tds);
 
 	return 0;
 }
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] xhci: Add spurious wakeup quirk for LynxPoint-LP controllers
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (5 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xhci: handle no ping response error properly Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing) Jiri Slaby
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable
  Cc: Laura Abbott, Takashi Iwai, Oliver Neukum, Mathias Nyman, Jiri Slaby

From: Laura Abbott <labbott@fedoraproject.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit fd7cd061adcf5f7503515ba52b6a724642a839c8 upstream.

We received several reports of systems rebooting and powering on
after an attempted shutdown. Testing showed that setting
XHCI_SPURIOUS_WAKEUP quirk in addition to the XHCI_SPURIOUS_REBOOT
quirk allowed the system to shutdown as expected for LynxPoint-LP
xHCI controllers. Set the quirk back.

Note that the quirk was originally introduced for LynxPoint and
LynxPoint-LP just for this same reason. See:

commit 638298dc66ea ("xhci: Fix spurious wakeups after S5 on Haswell")

It was later limited to only concern HP machines as it caused
regression on some machines, see both bug and commit:

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66171
commit 6962d914f317 ("xhci: Limit the spurious wakeup fix only to HP machines")

Later it was discovered that the powering on after shutdown
was limited to LynxPoint-LP (Haswell-ULT) and that some non-LP HP
machine suffered from spontaneous resume from S3 (which should
not be related to the SPURIOUS_WAKEUP quirk at all). An attempt
to fix this then removed the SPURIOUS_WAKEUP flag usage completely.

commit b45abacde3d5 ("xhci: no switching back on non-ULT Haswell")

Current understanding is that LynxPoint-LP (Haswell ULT) machines
need the SPURIOUS_WAKEUP quirk, otherwise they will restart, and
plain Lynxpoint (Haswell) machines may _not_ have the quirk
set otherwise they again will restart.

Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Oliver Neukum <oneukum@suse.com>
[Added more history to commit message -Mathias]
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/usb/host/xhci-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 68b8bc2e82d9..aedc7e479a23 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -131,6 +131,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
 		pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI) {
 		xhci->quirks |= XHCI_SPURIOUS_REBOOT;
+		xhci->quirks |= XHCI_SPURIOUS_WAKEUP;
 	}
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
 		(pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (6 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xhci: Add spurious wakeup quirk for LynxPoint-LP controllers Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] module: Fix locking in symbol_put_addr() Jiri Slaby
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Cathy Avery, Konrad Rzeszutek Wilk, Jiri Slaby

From: Cathy Avery <cathy.avery@oracle.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit a54c8f0f2d7df525ff997e2afe71866a1a013064 upstream.

xen-blkfront will crash if the check to talk_to_blkback()
in blkback_changed()(XenbusStateInitWait) returns an error.
The driver data is freed and info is set to NULL. Later during
the close process via talk_to_blkback's call to xenbus_dev_fatal()
the null pointer is passed to and dereference in blkfront_closing.

Signed-off-by: Cathy Avery <cathy.avery@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/block/xen-blkfront.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 7d0eb3f8d629..0b6932c376fb 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1965,7 +1965,8 @@ static void blkback_changed(struct xenbus_device *dev,
 			break;
 		/* Missed the backend's Closing state -- fallthrough */
 	case XenbusStateClosing:
-		blkfront_closing(info);
+		if (info)
+			blkfront_closing(info);
 		break;
 	}
 }
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] module: Fix locking in symbol_put_addr()
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (7 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing) Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] crypto: api - Only abort operations on fatal signal Jiri Slaby
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Peter Zijlstra, Rusty Russell, Jiri Slaby

From: Peter Zijlstra <peterz@infradead.org>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 275d7d44d802ef271a42dc87ac091a495ba72fc5 upstream.

Poma (on the way to another bug) reported an assertion triggering:

  [<ffffffff81150529>] module_assert_mutex_or_preempt+0x49/0x90
  [<ffffffff81150822>] __module_address+0x32/0x150
  [<ffffffff81150956>] __module_text_address+0x16/0x70
  [<ffffffff81150f19>] symbol_put_addr+0x29/0x40
  [<ffffffffa04b77ad>] dvb_frontend_detach+0x7d/0x90 [dvb_core]

Laura Abbott <labbott@redhat.com> produced a patch which lead us to
inspect symbol_put_addr(). This function has a comment claiming it
doesn't need to disable preemption around the module lookup
because it holds a reference to the module it wants to find, which
therefore cannot go away.

This is wrong (and a false optimization too, preempt_disable() is really
rather cheap, and I doubt any of this is on uber critical paths,
otherwise it would've retained a pointer to the actual module anyway and
avoided the second lookup).

While its true that the module cannot go away while we hold a reference
on it, the data structure we do the lookup in very much _CAN_ change
while we do the lookup. Therefore fix the comment and add the
required preempt_disable().

Reported-by: poma <pomidorabelisima@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: a6e6abd575fc ("module: remove module_text_address()")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/module.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index a97785308f25..3e3f90d82ecc 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -950,11 +950,15 @@ void symbol_put_addr(void *addr)
 	if (core_kernel_text(a))
 		return;
 
-	/* module_text_address is safe here: we're supposed to have reference
-	 * to module from symbol_get, so it can't go away. */
+	/*
+	 * Even though we hold a reference on the module; we still need to
+	 * disable preemption in order to safely traverse the data structure.
+	 */
+	preempt_disable();
 	modaddr = __module_text_address(a);
 	BUG_ON(!modaddr);
 	module_put(modaddr);
+	preempt_enable();
 }
 EXPORT_SYMBOL_GPL(symbol_put_addr);
 
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] crypto: api - Only abort operations on fatal signal
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (8 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] module: Fix locking in symbol_put_addr() Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] md/raid1: submit_bio_wait() returns 0 on success Jiri Slaby
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Herbert Xu, Jiri Slaby

From: Herbert Xu <herbert@gondor.apana.org.au>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 3fc89adb9fa4beff31374a4bf50b3d099d88ae83 upstream.

Currently a number of Crypto API operations may fail when a signal
occurs.  This causes nasty problems as the caller of those operations
are often not in a good position to restart the operation.

In fact there is currently no need for those operations to be
interrupted by user signals at all.  All we need is for them to
be killable.

This patch replaces the relevant calls of signal_pending with
fatal_signal_pending, and wait_for_completion_interruptible with
wait_for_completion_killable, respectively.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 crypto/ablkcipher.c  | 2 +-
 crypto/algapi.c      | 2 +-
 crypto/api.c         | 6 +++---
 crypto/crypto_user.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 7d4a8d28277e..ebcec7439a1a 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -700,7 +700,7 @@ struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name,
 err:
 		if (err != -EAGAIN)
 			break;
-		if (signal_pending(current)) {
+		if (fatal_signal_pending(current)) {
 			err = -EINTR;
 			break;
 		}
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 00d8d939733b..daf2f653b131 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -325,7 +325,7 @@ static void crypto_wait_for_test(struct crypto_larval *larval)
 		crypto_alg_tested(larval->alg.cra_driver_name, 0);
 	}
 
-	err = wait_for_completion_interruptible(&larval->completion);
+	err = wait_for_completion_killable(&larval->completion);
 	WARN_ON(err);
 
 out:
diff --git a/crypto/api.c b/crypto/api.c
index 2a81e98a0021..7db2e89a3114 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -172,7 +172,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg)
 	struct crypto_larval *larval = (void *)alg;
 	long timeout;
 
-	timeout = wait_for_completion_interruptible_timeout(
+	timeout = wait_for_completion_killable_timeout(
 		&larval->completion, 60 * HZ);
 
 	alg = larval->adult;
@@ -435,7 +435,7 @@ struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask)
 err:
 		if (err != -EAGAIN)
 			break;
-		if (signal_pending(current)) {
+		if (fatal_signal_pending(current)) {
 			err = -EINTR;
 			break;
 		}
@@ -552,7 +552,7 @@ void *crypto_alloc_tfm(const char *alg_name,
 err:
 		if (err != -EAGAIN)
 			break;
-		if (signal_pending(current)) {
+		if (fatal_signal_pending(current)) {
 			err = -EINTR;
 			break;
 		}
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 43665d0d0905..c7666f401381 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -361,7 +361,7 @@ static struct crypto_alg *crypto_user_aead_alg(const char *name, u32 type,
 		err = PTR_ERR(alg);
 		if (err != -EAGAIN)
 			break;
-		if (signal_pending(current)) {
+		if (fatal_signal_pending(current)) {
 			err = -EINTR;
 			break;
 		}
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] md/raid1: submit_bio_wait() returns 0 on success
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (9 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] crypto: api - Only abort operations on fatal signal Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] md/raid10: " Jiri Slaby
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Jes Sorensen, NeilBrown, Jiri Slaby

From: Jes Sorensen <Jes.Sorensen@redhat.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 203d27b0226a05202438ddb39ef0ef1acb14a759 upstream.

This was introduced with 9e882242c6193ae6f416f2d8d8db0d9126bd996b
which changed the return value of submit_bio_wait() to return != 0 on
error, but didn't update the caller accordingly.

Fixes: 9e882242c6 ("block: Add submit_bio_wait(), remove from md")
Reported-by: Bill Kuzeja <William.Kuzeja@stratus.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/md/raid1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 1cb7642c1ba9..479828ad2021 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2148,7 +2148,7 @@ static int narrow_write_error(struct r1bio *r1_bio, int i)
 		md_trim_bio(wbio, sector - r1_bio->sector, sectors);
 		wbio->bi_sector += rdev->data_offset;
 		wbio->bi_bdev = rdev->bdev;
-		if (submit_bio_wait(WRITE, wbio) == 0)
+		if (submit_bio_wait(WRITE, wbio) < 0)
 			/* failure! */
 			ok = rdev_set_badblocks(rdev, sector,
 						sectors, 0)
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] md/raid10: submit_bio_wait() returns 0 on success
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (10 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] md/raid1: submit_bio_wait() returns 0 on success Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] mvsas: Fix NULL pointer dereference in mvs_slot_task_free Jiri Slaby
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Jes Sorensen, NeilBrown, Jiri Slaby

From: Jes Sorensen <Jes.Sorensen@redhat.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 681ab4696062f5aa939c9e04d058732306a97176 upstream.

This was introduced with 9e882242c6193ae6f416f2d8d8db0d9126bd996b
which changed the return value of submit_bio_wait() to return != 0 on
error, but didn't update the caller accordingly.

Fixes: 9e882242c6 ("block: Add submit_bio_wait(), remove from md")
Reported-by: Bill Kuzeja <William.Kuzeja@stratus.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/md/raid10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index d525d663bb22..98c856dd8ccc 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -2618,7 +2618,7 @@ static int narrow_write_error(struct r10bio *r10_bio, int i)
 				   choose_data_offset(r10_bio, rdev) +
 				   (sector - r10_bio->sector));
 		wbio->bi_bdev = rdev->bdev;
-		if (submit_bio_wait(WRITE, wbio) == 0)
+		if (submit_bio_wait(WRITE, wbio) < 0)
 			/* Failure! */
 			ok = rdev_set_badblocks(rdev, sector,
 						sectors, 0)
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] mvsas: Fix NULL pointer dereference in mvs_slot_task_free
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (11 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] md/raid10: " Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] IB/cm: Fix rb-tree duplicate free and use-after-free Jiri Slaby
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Dāvis Mosāns, James Bottomley, Jiri Slaby

From: Dāvis Mosāns <davispuh@gmail.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 2280521719e81919283b82902ac24058f87dfc1b upstream.

When pci_pool_alloc fails in mvs_task_prep then task->lldd_task stays
NULL but it's later used in mvs_abort_task as slot which is passed
to mvs_slot_task_free causing NULL pointer dereference.

Just return from mvs_slot_task_free when passed with NULL slot.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101891
Signed-off-by: Dāvis Mosāns <davispuh@gmail.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/scsi/mvsas/mv_sas.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 1aa2a8cbb4df..783288db47c0 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -988,6 +988,8 @@ static void mvs_slot_free(struct mvs_info *mvi, u32 rx_desc)
 static void mvs_slot_task_free(struct mvs_info *mvi, struct sas_task *task,
 			  struct mvs_slot_info *slot, u32 slot_idx)
 {
+	if (!slot)
+		return;
 	if (!slot->task)
 		return;
 	if (!sas_protocol_ata(task->task_proto))
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] IB/cm: Fix rb-tree duplicate free and use-after-free
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (12 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] mvsas: Fix NULL pointer dereference in mvs_slot_task_free Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 16 port Exar boards Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 12 " Jiri Slaby
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Doron Tsur, Matan Barak, Doug Ledford, Jiri Slaby

From: Doron Tsur <doront@mellanox.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 0ca81a2840f77855bbad1b9f172c545c4dc9e6a4 upstream.

ib_send_cm_sidr_rep could sometimes erase the node from the sidr
(depending on errors in the process). Since ib_send_cm_sidr_rep is
called both from cm_sidr_req_handler and cm_destroy_id, cm_id_priv
could be either erased from the rb_tree twice or not erased at all.
Fixing that by making sure it's erased only once before freeing
cm_id_priv.

Fixes: a977049dacde ('[PATCH] IB: Add the kernel CM implementation')
Signed-off-by: Doron Tsur <doront@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/infiniband/core/cm.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 784b97cb05b0..c410217fbe89 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -857,6 +857,11 @@ retest:
 	case IB_CM_SIDR_REQ_RCVD:
 		spin_unlock_irq(&cm_id_priv->lock);
 		cm_reject_sidr_req(cm_id_priv, IB_SIDR_REJECT);
+		spin_lock_irq(&cm.lock);
+		if (!RB_EMPTY_NODE(&cm_id_priv->sidr_id_node))
+			rb_erase(&cm_id_priv->sidr_id_node,
+				 &cm.remote_sidr_table);
+		spin_unlock_irq(&cm.lock);
 		break;
 	case IB_CM_REQ_SENT:
 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
@@ -3093,7 +3098,10 @@ int ib_send_cm_sidr_rep(struct ib_cm_id *cm_id,
 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
 
 	spin_lock_irqsave(&cm.lock, flags);
-	rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
+	if (!RB_EMPTY_NODE(&cm_id_priv->sidr_id_node)) {
+		rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
+		RB_CLEAR_NODE(&cm_id_priv->sidr_id_node);
+	}
 	spin_unlock_irqrestore(&cm.lock, flags);
 	return 0;
 
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 16 port Exar boards
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (13 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] IB/cm: Fix rb-tree duplicate free and use-after-free Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 12 " Jiri Slaby
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Soeren Grunewald, Jiri Slaby

From: Soeren Grunewald <soeren.grunewald@desy.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit 96a5d18bc1338786fecac73599f1681f59a59a8e upstream.

The Exar XR17V358 chip usually provides only 8 ports. But two chips can be
combined to act as a single 16 port chip. Therefor one chip is configured
as master the second as slave by connecting the mode pin to VCC (master)
or GND (slave).

Then the master chip is reporting a different device-id depending on
whether a slave is detected or not. The UARTs 8-15 are addressed from
0x2000-0x3fff. So the offset of 0x400 from UART to UART can be used to
address all 16 ports as before.

See: https://www.exar.com/common/content/document.ashx?id=1587 page 11

Signed-off-by: Soeren Grunewald <soeren.grunewald@desy.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/serial/8250/8250_pci.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index eac50ec4c70d..bdbfb25ace6d 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1574,6 +1574,8 @@ pci_wch_ch353_setup(struct serial_private *priv,
 #define PCI_DEVICE_ID_SUNIX_1999	0x1999
 
 
+#define PCI_DEVICE_ID_EXAR_XR17V8358	0x8358
+
 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584	0x1584
 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588	0x1588
@@ -2029,6 +2031,13 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
 		.subdevice	= PCI_ANY_ID,
 		.setup		= pci_xr17v35x_setup,
 	},
+	{
+		.vendor = PCI_VENDOR_ID_EXAR,
+		.device = PCI_DEVICE_ID_EXAR_XR17V8358,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+		.setup		= pci_xr17v35x_setup,
+	},
 	/*
 	 * Xircom cards
 	 */
@@ -2456,6 +2465,7 @@ enum pci_board_num_t {
 	pbn_exar_XR17V352,
 	pbn_exar_XR17V354,
 	pbn_exar_XR17V358,
+	pbn_exar_XR17V8358,
 	pbn_exar_ibm_saturn,
 	pbn_pasemi_1682M,
 	pbn_ni8430_2,
@@ -3121,6 +3131,14 @@ static struct pciserial_board pci_boards[] = {
 		.reg_shift	= 0,
 		.first_offset	= 0,
 	},
+	[pbn_exar_XR17V8358] = {
+		.flags		= FL_BASE0,
+		.num_ports	= 16,
+		.base_baud	= 7812500,
+		.uart_offset	= 0x400,
+		.reg_shift	= 0,
+		.first_offset	= 0,
+	},
 	[pbn_exar_ibm_saturn] = {
 		.flags		= FL_BASE0,
 		.num_ports	= 1,
@@ -4454,7 +4472,7 @@ static struct pci_device_id serial_pci_tbl[] = {
 		0,
 		0, pbn_exar_XR17C158 },
 	/*
-	 * Exar Corp. XR17V35[248] Dual/Quad/Octal PCIe UARTs
+	 * Exar Corp. XR17V[48]35[248] Dual/Quad/Octal/Hexa PCIe UARTs
 	 */
 	{	PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352,
 		PCI_ANY_ID, PCI_ANY_ID,
@@ -4468,7 +4486,10 @@ static struct pci_device_id serial_pci_tbl[] = {
 		PCI_ANY_ID, PCI_ANY_ID,
 		0,
 		0, pbn_exar_XR17V358 },
-
+	{	PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V8358,
+		PCI_ANY_ID, PCI_ANY_ID,
+		0,
+		0, pbn_exar_XR17V8358 },
 	/*
 	 * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
 	 */
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 12 port Exar boards
  2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
                   ` (14 preceding siblings ...)
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 16 port Exar boards Jiri Slaby
@ 2015-11-09 11:56 ` Jiri Slaby
  15 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-09 11:56 UTC (permalink / raw)
  To: stable; +Cc: Soeren Grunewald, Jiri Slaby

From: Soeren Grunewald <soeren.grunewald@desy.de>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit be32c0cf0462c36f482b5ddcff1d8371be1e183c upstream.

The Exar XR17V358 can also be combined with a XR17V354 chip to act as a
single 12 port chip. This works the same way as the combining two XR17V358
chips. But the reported device id then is 0x4358.

Signed-off-by: Soeren Grunewald <soeren.grunewald@desy.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/serial/8250/8250_pci.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index bdbfb25ace6d..ebb823cc9140 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1574,6 +1574,7 @@ pci_wch_ch353_setup(struct serial_private *priv,
 #define PCI_DEVICE_ID_SUNIX_1999	0x1999
 
 
+#define PCI_DEVICE_ID_EXAR_XR17V4358	0x4358
 #define PCI_DEVICE_ID_EXAR_XR17V8358	0x8358
 
 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
@@ -2033,6 +2034,13 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
 	},
 	{
 		.vendor = PCI_VENDOR_ID_EXAR,
+		.device = PCI_DEVICE_ID_EXAR_XR17V4358,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+		.setup		= pci_xr17v35x_setup,
+	},
+	{
+		.vendor = PCI_VENDOR_ID_EXAR,
 		.device = PCI_DEVICE_ID_EXAR_XR17V8358,
 		.subvendor	= PCI_ANY_ID,
 		.subdevice	= PCI_ANY_ID,
@@ -2465,6 +2473,7 @@ enum pci_board_num_t {
 	pbn_exar_XR17V352,
 	pbn_exar_XR17V354,
 	pbn_exar_XR17V358,
+	pbn_exar_XR17V4358,
 	pbn_exar_XR17V8358,
 	pbn_exar_ibm_saturn,
 	pbn_pasemi_1682M,
@@ -3131,6 +3140,14 @@ static struct pciserial_board pci_boards[] = {
 		.reg_shift	= 0,
 		.first_offset	= 0,
 	},
+	[pbn_exar_XR17V4358] = {
+		.flags		= FL_BASE0,
+		.num_ports	= 12,
+		.base_baud	= 7812500,
+		.uart_offset	= 0x400,
+		.reg_shift	= 0,
+		.first_offset	= 0,
+	},
 	[pbn_exar_XR17V8358] = {
 		.flags		= FL_BASE0,
 		.num_ports	= 16,
@@ -4486,6 +4503,10 @@ static struct pci_device_id serial_pci_tbl[] = {
 		PCI_ANY_ID, PCI_ANY_ID,
 		0,
 		0, pbn_exar_XR17V358 },
+	{	PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V4358,
+		PCI_ANY_ID, PCI_ANY_ID,
+		0,
+		0, pbn_exar_XR17V4358 },
 	{	PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V8358,
 		PCI_ANY_ID, PCI_ANY_ID,
 		0,
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [patch added to the 3.12 stable tree] drm/i915: Restore lost DPLL register write on gen2-4
  2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/i915: Restore lost DPLL register write on gen2-4 Jiri Slaby
@ 2015-11-11 22:25   ` Luis Henriques
  2015-11-12 13:10     ` Jiri Slaby
  0 siblings, 1 reply; 19+ messages in thread
From: Luis Henriques @ 2015-11-11 22:25 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: stable, Ville Syrjälä, Nick Bowler, Jani Nikula

On Mon, Nov 09, 2015 at 12:56:24PM +0100, Jiri Slaby wrote:
> From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> 
> This patch has been added to the 3.12 stable tree. If you have any
> objections, please let us know.
> 
> ===============
> 
> commit 8e7a65aa70bcc1235a44e40ae0da5056525fe081 upstream.
> 
> We accidentally lost the initial DPLL register write in
> 1c4e02746147 drm/i915: Fix DVO 2x clock enable on 830M
> 
> The "three times for luck" hack probably saved us from a total
> disaster. But anyway, bring the initial write back so that the
> code actually makes some sense.
> 
> Reported-and-tested-by: Nick Bowler <nbowler@draconx.ca>
> References: http://mid.gmane.org/CAN_QmVyMaArxYgEcVVsGvsMo7-6ohZr8HmF5VhkkL4i9KOmrhw@mail.gmail.com
> Cc: Nick Bowler <nbowler@draconx.ca>
> Signed-off-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 37a9d3c89feb..8af80f5fe210 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1379,6 +1379,8 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
>  
>  	I915_WRITE(reg, dpll);
>  
> +	I915_WRITE(reg, dpll);
> +

I don't think 3.12 actually needs this patch as it does not contain
commit 1c4e02746147, which deleted the I915_WRITE().

Cheers,
--
Lu�s


>  	/* Wait for the clocks to stabilize. */
>  	POSTING_READ(reg);
>  	udelay(150);
> -- 
> 2.6.3
> 
> --
> 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	[flat|nested] 19+ messages in thread

* Re: [patch added to the 3.12 stable tree] drm/i915: Restore lost DPLL register write on gen2-4
  2015-11-11 22:25   ` Luis Henriques
@ 2015-11-12 13:10     ` Jiri Slaby
  0 siblings, 0 replies; 19+ messages in thread
From: Jiri Slaby @ 2015-11-12 13:10 UTC (permalink / raw)
  To: Luis Henriques; +Cc: stable, Ville Syrjälä, Nick Bowler, Jani Nikula

On 11/11/2015, 11:25 PM, Luis Henriques wrote:
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -1379,6 +1379,8 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
>>  
>>  	I915_WRITE(reg, dpll);
>>  
>> +	I915_WRITE(reg, dpll);
>> +
> 
> I don't think 3.12 actually needs this patch as it does not contain
> commit 1c4e02746147, which deleted the I915_WRITE().

Oh yeah. Now dropped. Thanks!

-- 
js
suse labs

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-11-12 13:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 11:56 [patch added to the 3.12 stable tree] spi: fix pointer-integer size mismatch warning Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/nouveau/gem: return only valid domain when there's only one Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] drm/i915: Restore lost DPLL register write on gen2-4 Jiri Slaby
2015-11-11 22:25   ` Luis Henriques
2015-11-12 13:10     ` Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] rbd: require stable pages if message data CRCs are enabled Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] Revert "ARM64: unwind: Fix PC calculation" Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] dm btree: fix leak of bufio-backed block in btree_split_beneath error path Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xhci: handle no ping response error properly Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xhci: Add spurious wakeup quirk for LynxPoint-LP controllers Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing) Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] module: Fix locking in symbol_put_addr() Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] crypto: api - Only abort operations on fatal signal Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] md/raid1: submit_bio_wait() returns 0 on success Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] md/raid10: " Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] mvsas: Fix NULL pointer dereference in mvs_slot_task_free Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] IB/cm: Fix rb-tree duplicate free and use-after-free Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 16 port Exar boards Jiri Slaby
2015-11-09 11:56 ` [patch added to the 3.12 stable tree] serial: 8250_pci: Add support for 12 " Jiri Slaby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.