From: Greg Kroah-Hartman Date: Sun, 16 Sep 2018 12:32:11 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.18.9~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e59e1c3e4fef6ea786d353fe9811618d584c674;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: i2c-i801-fix-dnv-s-smbctrl-register-offset.patch i2c-xiic-make-the-start-and-the-byte-count-write-atomic.patch kvm-s390-vsie-copy-wrapping-keys-to-right-place.patch --- diff --git a/queue-4.9/i2c-i801-fix-dnv-s-smbctrl-register-offset.patch b/queue-4.9/i2c-i801-fix-dnv-s-smbctrl-register-offset.patch new file mode 100644 index 00000000000..63c7e963c63 --- /dev/null +++ b/queue-4.9/i2c-i801-fix-dnv-s-smbctrl-register-offset.patch @@ -0,0 +1,47 @@ +From 851a15114895c5bce163a6f2d57e0aa4658a1be4 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Mon, 3 Sep 2018 11:24:57 +0300 +Subject: i2c: i801: fix DNV's SMBCTRL register offset + +From: Felipe Balbi + +commit 851a15114895c5bce163a6f2d57e0aa4658a1be4 upstream. + +DNV's iTCO is slightly different with SMBCTRL sitting at a different +offset when compared to all other devices. Let's fix so that we can +properly use iTCO watchdog. + +Fixes: 84d7f2ebd70d ("i2c: i801: Add support for Intel DNV") +Cc: # v4.4+ +Signed-off-by: Felipe Balbi +Reviewed-by: Jean Delvare +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/i2c/busses/i2c-i801.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-i801.c ++++ b/drivers/i2c/busses/i2c-i801.c +@@ -135,6 +135,7 @@ + + #define SBREG_BAR 0x10 + #define SBREG_SMBCTRL 0xc6000c ++#define SBREG_SMBCTRL_DNV 0xcf000c + + /* Host status bits for SMBPCISTS */ + #define SMBPCISTS_INTS 0x08 +@@ -1387,7 +1388,11 @@ static void i801_add_tco(struct i801_pri + spin_unlock(&p2sb_spinlock); + + res = &tco_res[ICH_RES_MEM_OFF]; +- res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL; ++ if (pci_dev->device == PCI_DEVICE_ID_INTEL_DNV_SMBUS) ++ res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL_DNV; ++ else ++ res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL; ++ + res->end = res->start + 3; + res->flags = IORESOURCE_MEM; + diff --git a/queue-4.9/i2c-xiic-make-the-start-and-the-byte-count-write-atomic.patch b/queue-4.9/i2c-xiic-make-the-start-and-the-byte-count-write-atomic.patch new file mode 100644 index 00000000000..a559a95dda3 --- /dev/null +++ b/queue-4.9/i2c-xiic-make-the-start-and-the-byte-count-write-atomic.patch @@ -0,0 +1,59 @@ +From ae7304c3ea28a3ba47a7a8312c76c654ef24967e Mon Sep 17 00:00:00 2001 +From: Shubhrajyoti Datta +Date: Mon, 3 Sep 2018 15:11:11 +0530 +Subject: i2c: xiic: Make the start and the byte count write atomic + +From: Shubhrajyoti Datta + +commit ae7304c3ea28a3ba47a7a8312c76c654ef24967e upstream. + +Disable interrupts while configuring the transfer and enable them back. + +We have below as the programming sequence +1. start and slave address +2. byte count and stop + +In some customer platform there was a lot of interrupts between 1 and 2 +and after slave address (around 7 clock cyles) if 2 is not executed +then the transaction is nacked. + +To fix this case make the 2 writes atomic. + +Signed-off-by: Shubhrajyoti Datta +Signed-off-by: Michal Simek +[wsa: added a newline for better readability] +Signed-off-by: Wolfram Sang +Cc: stable@kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/i2c/busses/i2c-xiic.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/i2c/busses/i2c-xiic.c ++++ b/drivers/i2c/busses/i2c-xiic.c +@@ -538,6 +538,7 @@ static void xiic_start_recv(struct xiic_ + { + u8 rx_watermark; + struct i2c_msg *msg = i2c->rx_msg = i2c->tx_msg; ++ unsigned long flags; + + /* Clear and enable Rx full interrupt. */ + xiic_irq_clr_en(i2c, XIIC_INTR_RX_FULL_MASK | XIIC_INTR_TX_ERROR_MASK); +@@ -553,6 +554,7 @@ static void xiic_start_recv(struct xiic_ + rx_watermark = IIC_RX_FIFO_DEPTH; + xiic_setreg8(i2c, XIIC_RFD_REG_OFFSET, rx_watermark - 1); + ++ local_irq_save(flags); + if (!(msg->flags & I2C_M_NOSTART)) + /* write the address */ + xiic_setreg16(i2c, XIIC_DTR_REG_OFFSET, +@@ -563,6 +565,8 @@ static void xiic_start_recv(struct xiic_ + + xiic_setreg16(i2c, XIIC_DTR_REG_OFFSET, + msg->len | ((i2c->nmsgs == 1) ? XIIC_TX_DYN_STOP_MASK : 0)); ++ local_irq_restore(flags); ++ + if (i2c->nmsgs == 1) + /* very last, enable bus not busy as well */ + xiic_irq_clr_en(i2c, XIIC_INTR_BNB_MASK); diff --git a/queue-4.9/kvm-s390-vsie-copy-wrapping-keys-to-right-place.patch b/queue-4.9/kvm-s390-vsie-copy-wrapping-keys-to-right-place.patch new file mode 100644 index 00000000000..696eacadd1b --- /dev/null +++ b/queue-4.9/kvm-s390-vsie-copy-wrapping-keys-to-right-place.patch @@ -0,0 +1,38 @@ +From 204c97245612b6c255edf4e21e24d417c4a0c008 Mon Sep 17 00:00:00 2001 +From: Pierre Morel +Date: Thu, 23 Aug 2018 12:25:54 +0200 +Subject: KVM: s390: vsie: copy wrapping keys to right place + +From: Pierre Morel + +commit 204c97245612b6c255edf4e21e24d417c4a0c008 upstream. + +Copy the key mask to the right offset inside the shadow CRYCB + +Fixes: bbeaa58b3 ("KVM: s390: vsie: support aes dea wrapping keys") +Signed-off-by: Pierre Morel +Reviewed-by: David Hildenbrand +Reviewed-by: Cornelia Huck +Reviewed-by: Janosch Frank +Cc: stable@vger.kernel.org # v4.8+ +Message-Id: <1535019956-23539-2-git-send-email-pmorel@linux.ibm.com> +Signed-off-by: Janosch Frank +Signed-off-by: Christian Borntraeger +Signed-off-by: Greg Kroah-Hartman + +--- + arch/s390/kvm/vsie.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/s390/kvm/vsie.c ++++ b/arch/s390/kvm/vsie.c +@@ -156,7 +156,8 @@ static int shadow_crycb(struct kvm_vcpu + return set_validity_icpt(scb_s, 0x0039U); + + /* copy only the wrapping keys */ +- if (read_guest_real(vcpu, crycb_addr + 72, &vsie_page->crycb, 56)) ++ if (read_guest_real(vcpu, crycb_addr + 72, ++ vsie_page->crycb.dea_wrapping_key_mask, 56)) + return set_validity_icpt(scb_s, 0x0035U); + + scb_s->ecb3 |= ecb3_flags; diff --git a/queue-4.9/series b/queue-4.9/series index cf001812e2a..13ef9b8377b 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1,2 +1,3 @@ i2c-xiic-make-the-start-and-the-byte-count-write-atomic.patch i2c-i801-fix-dnv-s-smbctrl-register-offset.patch +kvm-s390-vsie-copy-wrapping-keys-to-right-place.patch