6.7.12-rc1 review
Subsystems (7)
Greg Kroah-Hartman
maintainerPATCH 399/432 usb: dwc2: host: Fix remote wakeup from hibernation
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Minas Harutyunyan <[email protected]>
commit bae2bc73a59c200db53b6c15fb26bb758e2c6108 upstream.
Starting from core v4.30a changed order of programming GPWRDN_PMUACTV to 0 in case of exit from hibernation on remote wakeup signaling from device.
--- drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hcd.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-)
drivers/usb/dwc2/core.h +1 -0
@@ -1086,6 +1086,7 @@ struct dwc2_hsotg {bool needs_byte_swap;/* DWC OTG HW Release versions */ +#define DWC2_CORE_REV_4_30a 0x4f54430a#define DWC2_CORE_REV_2_71a 0x4f54271a#define DWC2_CORE_REV_2_72a 0x4f54272a#define DWC2_CORE_REV_2_80a 0x4f54280a
drivers/usb/dwc2/hcd.c +13 -4
@@ -5610,10 +5610,12 @@ int dwc2_host_exit_hibernation(struct dwdwc2_writel (hsotg, hr->hcfg,HCFG );/* De-assert Wakeup Logic */ - gpwrdn =dwc2_readl (hsotg,GPWRDN ); - gpwrdn &= ~GPWRDN_PMUACTV ; -dwc2_writel (hsotg, gpwrdn,GPWRDN ); -udelay (10 ); +if (!(rem_wakeup && hsotg->hw_params.snpsid >= DWC2_CORE_REV_4_30a)) { + gpwrdn =dwc2_readl (hsotg,GPWRDN ); + gpwrdn &= ~GPWRDN_PMUACTV ; +dwc2_writel (hsotg, gpwrdn,GPWRDN ); +udelay (10 ); + } hprt0 = hr->hprt0; hprt0 |=HPRT0_PWR ;
@@ -5638,6 +5640,13 @@ int dwc2_host_exit_hibernation(struct dw hprt0 |=HPRT0_RES ;dwc2_writel (hsotg, hprt0,HPRT0 ); +/* De-assert Wakeup Logic */ +if ((rem_wakeup && hsotg->hw_params.snpsid >= DWC2_CORE_REV_4_30a)) { + gpwrdn =dwc2_readl (hsotg,GPWRDN ); + gpwrdn &= ~GPWRDN_PMUACTV ; +dwc2_writel (hsotg, gpwrdn,GPWRDN ); +udelay (10 ); + }/* Wait for Resume time and then program HPRT again */ mdelay (100 ); hprt0 &= ~HPRT0_RES ;
Greg Kroah-Hartman
maintainerPATCH 400/432 usb: dwc2: host: Fix hibernation flow
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Minas Harutyunyan <[email protected]>
commit 3c7b9856a82227db01a20171d2e24c7ce305d59b upstream.
Added to backup/restore registers HFLBADDR, HCCHARi, HCSPLTi, HCTSIZi, HCDMAi and HCDMABi.
--- drivers/usb/dwc2/core.h | 12 ++++++++++++ drivers/usb/dwc2/hcd.c | 18 ++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-)
drivers/usb/dwc2/core.h +12 -0
@@ -729,8 +729,14 @@ struct dwc2_dregs_backup {* struct dwc2_hregs_backup - Holds host registers state before * entering partial power down * @hcfg: Backup of HCFG register +* @hflbaddr: Backup of HFLBADDR register * @haintmsk: Backup of HAINTMSK register +* @hcchar: Backup of HCCHAR register +* @hcsplt: Backup of HCSPLT register * @hcintmsk: Backup of HCINTMSK register +* @hctsiz: Backup of HCTSIZ register +* @hdma: Backup of HCDMA register +* @hcdmab: Backup of HCDMAB register * @hprt0: Backup of HPTR0 register * @hfir: Backup of HFIR register * @hptxfsiz: Backup of HPTXFSIZ register
@@ -738,8 +744,14 @@ struct dwc2_dregs_backup {*/ struct dwc2_hregs_backup {u32 hcfg; +u32 hflbaddr;u32 haintmsk; +u32 hcchar[MAX_EPS_CHANNELS ]; +u32 hcsplt[MAX_EPS_CHANNELS ];u32 hcintmsk[MAX_EPS_CHANNELS ]; +u32 hctsiz[MAX_EPS_CHANNELS ]; +u32 hcidma[MAX_EPS_CHANNELS ]; +u32 hcidmab[MAX_EPS_CHANNELS ];u32 hprt0;u32 hfir;u32 hptxfsiz;
drivers/usb/dwc2/hcd.c +16 -2
@@ -5406,9 +5406,16 @@ int dwc2_backup_host_registers(struct dw/* Backup Host regs */ hr = &hsotg->hr_backup; hr->hcfg =dwc2_readl (hsotg,HCFG ); + hr->hflbaddr =dwc2_readl (hsotg,HFLBADDR ); hr->haintmsk =dwc2_readl (hsotg,HAINTMSK ); -for (i =0 ; i < hsotg->params.host_channels; ++i) +for (i =0 ; i < hsotg->params.host_channels; ++i) { + hr->hcchar[i] =dwc2_readl (hsotg,HCCHAR (i)); + hr->hcsplt[i] =dwc2_readl (hsotg,HCSPLT (i)); hr->hcintmsk[i] =dwc2_readl (hsotg,HCINTMSK (i)); + hr->hctsiz[i] =dwc2_readl (hsotg,HCTSIZ (i)); + hr->hcidma[i] =dwc2_readl (hsotg,HCDMA (i)); + hr->hcidmab[i] =dwc2_readl (hsotg,HCDMAB (i)); + } hr->hprt0 =dwc2_read_hprt0 (hsotg); hr->hfir =dwc2_readl (hsotg,HFIR );
@@ -5442,10 +5449,17 @@ int dwc2_restore_host_registers(struct d hr->valid = false;dwc2_writel (hsotg, hr->hcfg,HCFG ); +dwc2_writel (hsotg, hr->hflbaddr,HFLBADDR );dwc2_writel (hsotg, hr->haintmsk,HAINTMSK ); -for (i =0 ; i < hsotg->params.host_channels; ++i) +for (i =0 ; i < hsotg->params.host_channels; ++i) { +dwc2_writel (hsotg, hr->hcchar[i],HCCHAR (i)); +dwc2_writel (hsotg, hr->hcsplt[i],HCSPLT (i));dwc2_writel (hsotg, hr->hcintmsk[i],HCINTMSK (i)); +dwc2_writel (hsotg, hr->hctsiz[i],HCTSIZ (i)); +dwc2_writel (hsotg, hr->hcidma[i],HCDMA (i)); +dwc2_writel (hsotg, hr->hcidmab[i],HCDMAB (i)); + }dwc2_writel (hsotg, hr->hprt0,HPRT0 );dwc2_writel (hsotg, hr->hfir,HFIR );
Greg Kroah-Hartman
maintainerPATCH 401/432 usb: dwc2: host: Fix ISOC flow in DDMA mode
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Minas Harutyunyan <[email protected]>
commit b258e42688501cadb1a6dd658d6f015df9f32d8f upstream.
Fixed ISOC completion flow in DDMA mode. Added isoc descriptor actual length value and update urb's start_frame value.
Fixed initialization of ISOC DMA descriptors flow.
--- drivers/usb/dwc2/hcd.c | 12 ++++++++++-- drivers/usb/dwc2/hcd_ddma.c | 17 +++++++++++------ drivers/usb/dwc2/hw.h | 2 +- 3 files changed, 22 insertions(+), 9 deletions(-)
drivers/usb/dwc2/hcd.c +10 -2
@@ -2701,8 +2701,11 @@ enum dwc2_transaction_type dwc2_hcd_sele hsotg->available_host_channels--; } qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); -if (dwc2_assign_and_init_hc (hsotg, qh)) +if (dwc2_assign_and_init_hc (hsotg, qh)) { +if (hsotg->params.uframe_sched) + hsotg->available_host_channels++;break ; + }/* * Move the QH from the periodic ready schedule to the
@@ -2735,8 +2738,11 @@ enum dwc2_transaction_type dwc2_hcd_sele hsotg->available_host_channels--; } -if (dwc2_assign_and_init_hc (hsotg, qh)) +if (dwc2_assign_and_init_hc (hsotg, qh)) { +if (hsotg->params.uframe_sched) + hsotg->available_host_channels++;break ; + }/* * Move the QH from the non-periodic inactive schedule to the
@@ -4143,6 +4149,8 @@ void dwc2_host_complete(struct dwc2_hsot urb->actual_length);if (usb_pipetype (urb->pipe) ==PIPE_ISOCHRONOUS ) { +if (!hsotg->params.dma_desc_enable) + urb->start_frame = qtd->qh->start_active_frame; urb->error_count =dwc2_hcd_urb_get_error_count (qtd->urb);for (i =0 ; i < urb->number_of_packets; ++i) { urb->iso_frame_desc[i].actual_length =
drivers/usb/dwc2/hcd_ddma.c +11 -6
@@ -559,7 +559,7 @@ static void dwc2_init_isoc_dma_desc(stru idx = qh->td_last; inc = qh->host_interval; hsotg->frame_number =dwc2_hcd_get_frame_number (hsotg); - cur_idx =dwc2_frame_list_idx (hsotg->frame_number); + cur_idx = idx; next_idx =dwc2_desclist_idx_inc (qh->td_last, inc, qh->dev_speed);/*
@@ -866,6 +866,8 @@ static int dwc2_cmpl_host_isoc_dma_desc( {struct dwc2_dma_desc *dma_desc;struct dwc2_hcd_iso_packet_desc *frame_desc; +u16 frame_desc_idx; +struct urb *usb_urb = qtd->urb->priv;u16 remain =0 ;int rc =0 ;
@@ -878,8 +880,11 @@ static int dwc2_cmpl_host_isoc_dma_desc( DMA_FROM_DEVICE); dma_desc = &qh->desc_list[idx]; + frame_desc_idx = (idx - qtd->isoc_td_first) & (usb_urb->number_of_packets -1 ); - frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last]; + frame_desc = &qtd->urb->iso_descs[frame_desc_idx]; +if (idx == qtd->isoc_td_first) + usb_urb->start_frame =dwc2_hcd_get_frame_number (hsotg); dma_desc->buf = (u32)(qtd->urb->dma + frame_desc->offset);if (chan->ep_is_in) remain = (dma_desc->status & HOST_DMA_ISOC_NBYTES_MASK) >>
@@ -900,7 +905,7 @@ static int dwc2_cmpl_host_isoc_dma_desc( frame_desc->status =0 ; } -if (++qtd->isoc_frame_index == qtd->urb->packet_count) { +if (++qtd->isoc_frame_index == usb_urb->number_of_packets) {/* * urb->status is not used for isoc transfers here. The * individual frame_desc status are used instead.
@@ -1005,11 +1010,11 @@ static void dwc2_complete_isoc_xfer_ddmareturn ; idx =dwc2_desclist_idx_inc (idx, qh->host_interval, chan->speed); -if (!rc) +if (rc ==0 )continue ; -if (rc ==DWC2_CMPL_DONE ) -break ; +if (rc ==DWC2_CMPL_DONE || rc ==DWC2_CMPL_STOP ) + goto stop_scan;/* rc == DWC2_CMPL_STOP */
drivers/usb/dwc2/hw.h +1 -1
@@ -698,7 +698,7 @@#define TXSTS_QTOP_TOKEN_MASK (0x3 << 25)#define TXSTS_QTOP_TOKEN_SHIFT 25#define TXSTS_QTOP_TERMINATE BIT(24) -#define TXSTS_QSPCAVAIL_MASK (0xff << 16) +#define TXSTS_QSPCAVAIL_MASK (0x7f << 16)#define TXSTS_QSPCAVAIL_SHIFT 16#define TXSTS_FSPCAVAIL_MASK (0xffff << 0)#define TXSTS_FSPCAVAIL_SHIFT 0
Greg Kroah-Hartman
maintainerPATCH 402/432 usb: dwc2: gadget: Fix exiting from clock gating
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Minas Harutyunyan <[email protected]>
commit 31f42da31417bec88158f3cf62d19db836217f1e upstream.
Added exiting from the clock gating mode on USB Reset Detect interrupt if core in the clock gating mode.
Added new condition to check core in clock gating mode or no.
--- drivers/usb/dwc2/core_intr.c | 9 ++++++--- drivers/usb/dwc2/gadget.c | 6 ++++++ drivers/usb/dwc2/hcd.c | 2 +- drivers/usb/dwc2/platform.c | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-)
drivers/usb/dwc2/core_intr.c +6 -3
@@ -297,7 +297,8 @@ static void dwc2_handle_session_req_intr/* Exit gadget mode clock gating. */ if (hsotg->params.power_down == -DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended) +DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended && + !hsotg->params.no_clock_gating)dwc2_gadget_exit_clock_gating (hsotg,0 ); }
@@ -408,7 +409,8 @@ static void dwc2_handle_wakeup_detected_/* Exit gadget mode clock gating. */ if (hsotg->params.power_down == -DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended) +DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended && + !hsotg->params.no_clock_gating)dwc2_gadget_exit_clock_gating (hsotg,0 ); }else {/* Change to L0 state */
@@ -425,7 +427,8 @@ static void dwc2_handle_wakeup_detected_ }if (hsotg->params.power_down == -DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended) +DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended && + !hsotg->params.no_clock_gating)dwc2_host_exit_clock_gating (hsotg,1 );/*
drivers/usb/dwc2/gadget.c +6 -0
@@ -3727,6 +3727,12 @@ irq_retry:if (hsotg->in_ppd && hsotg->lx_state ==DWC2_L2 )dwc2_exit_partial_power_down (hsotg,0 , true); +/* Exit gadget mode clock gating. */ +if (hsotg->params.power_down == +DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended && + !hsotg->params.no_clock_gating) +dwc2_gadget_exit_clock_gating (hsotg,0 ); + hsotg->lx_state =DWC2_L0 ; }
drivers/usb/dwc2/hcd.c +1 -1
@@ -4657,7 +4657,7 @@ static int _dwc2_hcd_urb_enqueue(struct }if (hsotg->params.power_down ==DWC2_POWER_DOWN_PARAM_NONE && - hsotg->bus_suspended) { + hsotg->bus_suspended && !hsotg->params.no_clock_gating) {if (dwc2_is_device_mode (hsotg))dwc2_gadget_exit_clock_gating (hsotg,0 );else
drivers/usb/dwc2/platform.c +1 -1
@@ -331,7 +331,7 @@ static void dwc2_driver_remove(struct pl/* Exit clock gating when driver is removed. */ if (hsotg->params.power_down ==DWC2_POWER_DOWN_PARAM_NONE && - hsotg->bus_suspended) { + hsotg->bus_suspended && !hsotg->params.no_clock_gating) {if (dwc2_is_device_mode (hsotg))dwc2_gadget_exit_clock_gating (hsotg,0 );else
Greg Kroah-Hartman
maintainerPATCH 403/432 usb: dwc2: gadget: LPM flow fix
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Minas Harutyunyan <[email protected]>
commit 5d69a3b54e5a630c90d82a4c2bdce3d53dc78710 upstream.
Added functionality to exit from L1 state by device initiation using remote wakeup signaling, in case when function driver queuing request while core in L1 state.
--- drivers/usb/dwc2/core.h | 1 drivers/usb/dwc2/core_intr.c | 65 ++++++++++++++++++++++++++++--------------- drivers/usb/dwc2/gadget.c | 4 ++ 3 files changed, 48 insertions(+), 22 deletions(-)
drivers/usb/dwc2/core.h +1 -0
@@ -1336,6 +1336,7 @@ int dwc2_backup_global_registers(structint dwc2_restore_global_registers (struct dwc2_hsotg *hsotg);void dwc2_enable_acg (struct dwc2_hsotg *hsotg); +void dwc2_wakeup_from_lpm_l1 (struct dwc2_hsotg *hsotg,bool remotewakeup);/* This function should be called on every hardware interrupt. */ irqreturn_t dwc2_handle_common_intr (int irq,void *dev);
drivers/usb/dwc2/core_intr.c +43 -22
97 lines not on this page · raw message
drivers/usb/dwc2/gadget.c +4 -0
@@ -1415,6 +1415,10 @@ static int dwc2_hsotg_ep_queue(struct us ep->name, req, req->length, req->buf, req->no_interrupt, req->zero, req->short_not_ok); +if (hs->lx_state ==DWC2_L1 ) { +dwc2_wakeup_from_lpm_l1 (hs, true); + } +/* Prevent new request submission when controller is suspended */ if (hs->lx_state !=DWC2_L0 ) { dev_dbg(hs->dev, "%s: submit request only in active state\n",
Greg Kroah-Hartman
maintainerPATCH 404/432 usb: udc: remove warning when queue disabled ep
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: yuan linyu <[email protected]>
commit 2a587a035214fa1b5ef598aea0b81848c5b72e5e upstream.
It is possible trigger below warning message from mass storage function,
WARNING: CPU: 6 PID: 3839 at drivers/usb/gadget/udc/core.c:294 usb_ep_queue+0x7c/0x104 pc : usb_ep_queue+0x7c/0x104 lr : fsg_main_thread+0x494/0x1b3c
Root cause is mass storage function try to queue request from main thread, but other thread may already disable ep when function disable.
As there is no function failure in the driver, in order to avoid effort to fix warning, change WARN_ON_ONCE() in usb_ep_queue() to pr_debug().
--- drivers/usb/gadget/udc/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/gadget/udc/core.c +3 -1
@@ -292,7 +292,9 @@ int usb_ep_queue(struct usb_ep *ep, {int ret =0 ; -if (WARN_ON_ONCE (!ep->enabled && ep->address)) { +if (!ep->enabled && ep->address) { +pr_debug ("USB gadget: queue request to disabled ep 0x%x (%s)\n" , + ep->address, ep->name); ret = -ESHUTDOWN ; goto out; }
Greg Kroah-Hartman
maintainerPATCH 405/432 usb: typec: ucsi: Fix race between typec_switch and role_switch
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Kurapati <[email protected]>
commit f5e9bda03aa50ffad36eccafe893d004ef213c43 upstream.
When orientation switch is enabled in ucsi glink, there is a xhci probe failure seen when booting up in host mode in reverse orientation.
During bootup the following things happen in multiple drivers:
a) DWC3 controller driver initializes the core in device mode when the dr_mode is set to DRD. It relies on role_switch call to change role to host.
b) QMP driver initializes the lanes to TYPEC_ORIENTATION_NORMAL as a normal routine. It relies on the typec_switch_set call to get notified of orientation changes.
c) UCSI core reads the UCSI_GET_CONNECTOR_STATUS via the glink and provides initial role switch to dwc3 controller.
When booting up in host mode with orientation TYPEC_ORIENTATION_REVERSE, then we see the following things happening in order:
a) UCSI gives initial role as host to dwc3 controller ucsi_register_port. Upon receiving this notification, the dwc3 core needs to program GCTL from PRTCAP_DEVICE to PRTCAP_HOST and as part of this change, it asserts GCTL Core soft reset and waits for it to be completed before shifting it to host. Only after the reset is done will the dwc3_host_init be invoked and xhci is probed. DWC3 controller expects that the usb phy's are stable during this process i.e., the phy init is already done.
b) During the 100ms wait for GCTL core soft reset, the actual notification from PPM is received by ucsi_glink via pmic glink for changing role to host. The pmic_glink_ucsi_notify routine first sends the orientation change to QMP and then sends role to dwc3 via ucsi framework. This is happening exactly at the time GCTL core soft reset is being processed.
c) When QMP driver receives typec switch to TYPEC_ORIENTATION_REVERSE, it then re-programs the phy at the instant GCTL core soft reset has been asserted by dwc3 controller due to which the QMP PLL lock fails in qmp_combo_usb_power_on.
d) After the 100ms of GCTL core soft reset is completed, the dwc3 core goes for initializing the host mode and invokes xhci probe. But at this point the QMP is non-responsive and as a result, the xhci plat probe fails during xhci_reset.
Fix this by passing orientation switch to available ucsi instances if their gpio configuration is available before ucsi_register is invoked so that by the time, the pmic_glink_ucsi_notify provides typec_switch to QMP, the lane is already configured and the call would be a NOP thus not racing with role switch.
--- drivers/usb/typec/ucsi/ucsi_glink.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/usb/typec/ucsi/ucsi_glink.c +14 -0
@@ -254,6 +254,20 @@ static void pmic_glink_ucsi_notify(strucstatic void pmic_glink_ucsi_register (struct work_struct *work) { struct pmic_glink_ucsi *ucsi = container_of(work, struct pmic_glink_ucsi, register_work); +int orientation; +int i; + +for (i =0 ; i <PMIC_GLINK_MAX_PORTS ; i++) { +if (!ucsi->port_orientation[i]) +continue ; + orientation =gpiod_get_value (ucsi->port_orientation[i]); + +if (orientation >=0 ) { +typec_switch_set (ucsi->port_switch[i], + orientation ?TYPEC_ORIENTATION_REVERSE + :TYPEC_ORIENTATION_NORMAL ); + } + }ucsi_register (ucsi->ucsi); }
Greg Kroah-Hartman
maintainerPATCH 406/432 usb: typec: Return size of buffer if pd_set operation succeeds
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kyle Tso <[email protected]>
commit 53f5094fdf5deacd99b8655df692e9278506724d upstream.
The attribute writing should return the number of bytes used from the buffer on success.
--- drivers/usb/typec/class.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/usb/typec/class.c +6 -1
@@ -1310,6 +1310,7 @@ static ssize_t select_usb_power_delivery {struct typec_port *port =to_typec_port (dev);struct usb_power_delivery *pd; +int ret;if (!port->ops || !port->ops->pd_set)return -EOPNOTSUPP ;
@@ -1318,7 +1319,11 @@ static ssize_t select_usb_power_deliveryif (!pd)return -EINVAL ; -return port->ops->pd_set (port, pd); + ret = port->ops->pd_set (port, pd); +if (ret) +return ret; + +return size; } static ssize_t select_usb_power_delivery_show(struct device *dev,
Greg Kroah-Hartman
maintainerPATCH 407/432 usb: typec: ucsi: Clear EVENT_PENDING under PPM lock
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit 15b2e71b4653b3e13df34695a29ebeee237c5af2 upstream.
Suppose we sleep on the PPM lock after clearing the EVENT_PENDING bit because the thread for another connector is executing a command. In this case the command completion of the other command will still report the connector change for our connector.
Clear the EVENT_PENDING bit under the PPM lock to avoid another useless call to ucsi_handle_connector_change() in this case.
--- drivers/usb/typec/ucsi/ucsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/typec/ucsi/ucsi.c +2 -2
@@ -933,11 +933,11 @@ static void ucsi_handle_connector_changeif (con->status.change &UCSI_CONSTAT_CAM_CHANGE )ucsi_partner_task (con, ucsi_check_altmodes,1 ,0 ); -clear_bit (EVENT_PENDING , &con->ucsi->flags); -mutex_lock (&ucsi->ppm_lock); +clear_bit (EVENT_PENDING , &con->ucsi->flags); ret =ucsi_acknowledge_connector_change (ucsi);mutex_unlock (&ucsi->ppm_lock); +if (ret)dev_err (ucsi->dev,"%s: ACK failed (%d)" , __func__, ret);
Greg Kroah-Hartman
maintainerPATCH 408/432 usb: typec: ucsi: Check for notifications after init
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit 808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56 upstream.
The completion notification for the final SET_NOTIFICATION_ENABLE command during initialization can include a connector change notification. However, at the time this completion notification is processed, the ucsi struct is not ready to handle this notification. As a result the notification is ignored and the controller never sends an interrupt again.
Re-check CCI for a pending connector state change after initialization is complete. Adjust the corresponding debug message accordingly.
--- drivers/usb/typec/ucsi/ucsi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi.c +9 -1
@@ -955,7 +955,7 @@ void ucsi_connector_change(struct ucsi *struct ucsi_connector *con = &ucsi->connector[num -1 ];if (!(ucsi->ntfy &UCSI_ENABLE_NTFY_CONNECTOR_CHANGE )) { -dev_dbg (ucsi->dev,"Bogus connector change event\n" ); +dev_dbg (ucsi->dev,"Early connector change event\n" );return ; }
@@ -1352,6 +1352,7 @@ static int ucsi_init(struct ucsi *ucsi) {struct ucsi_connector *con, *connector;u64 command, ntfy; +u32 cci;int ret;int i;
@@ -1404,6 +1405,13 @@ static int ucsi_init(struct ucsi *ucsi) ucsi->connector = connector; ucsi->ntfy = ntfy; + + ret = ucsi->ops->read (ucsi,UCSI_CCI , &cci,sizeof (cci)); +if (ret) +return ret; +if (UCSI_CCI_CONNECTOR (READ_ONCE (cci))) +ucsi_connector_change (ucsi, cci); +return 0 ; err_unregister:
Greg Kroah-Hartman
maintainerPATCH 409/432 usb: typec: ucsi: Ack unsupported commands
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit 6b5c85ddeea77d18c4b69e3bda60e9374a20c304 upstream.
If a command completes the OPM must send an ack. This applies to unsupported commands, too.
Send the required ACK for unsupported commands.
--- drivers/usb/typec/ucsi/ucsi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi.c +5 -1
@@ -138,8 +138,12 @@ static int ucsi_exec_command(struct ucsiif (!(cci &UCSI_CCI_COMMAND_COMPLETE ))return -EIO ; -if (cci &UCSI_CCI_NOT_SUPPORTED ) +if (cci &UCSI_CCI_NOT_SUPPORTED ) { +if (ucsi_acknowledge_command (ucsi) <0 ) +dev_err (ucsi->dev, +"ACK of unsupported command failed\n" );return -EOPNOTSUPP ; + }if (cci &UCSI_CCI_ERROR ) {if (cmd ==UCSI_GET_ERROR_STATUS )
Greg Kroah-Hartman
maintainerPATCH 410/432 usb: typec: ucsi_acpi: Refactor and fix DELL quirk
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit 6aaceb7d9cd00f3e065dc4b054ecfe52c5253b03 upstream.
Some DELL systems don't like UCSI_ACK_CC_CI commands with the UCSI_ACK_CONNECTOR_CHANGE but not the UCSI_ACK_COMMAND_COMPLETE bit set. The current quirk still leaves room for races because it requires two consecutive ACK commands to be sent.
Refactor and significantly simplify the quirk to fix this:
Send a dummy command and bundle the connector change ack with the command completion ack in a single UCSI_ACK_CC_CI command. This removes the need to probe for the quirk.
While there define flag bits for struct ucsi_acpi->flags in ucsi_acpi.c and don't re-use definitions from ucsi.h for struct ucsi->flags.
--- drivers/usb/typec/ucsi/ucsi_acpi.c | 71 ++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 40 deletions(-)
drivers/usb/typec/ucsi/ucsi_acpi.c +31 -40
@@ -23,10 +23,11 @@ struct ucsi_acpi {void *base;struct completion complete;unsigned long flags; +#define UCSI_ACPI_SUPPRESS_EVENT 0 +#define UCSI_ACPI_COMMAND_PENDING 1 +#define UCSI_ACPI_ACK_PENDING 2guid_t guid;u64 cmd; -bool dell_quirk_probed; -bool dell_quirk_active; };static int ucsi_acpi_dsm (struct ucsi_acpi *ua,int func)
@@ -79,9 +80,9 @@ static int ucsi_acpi_sync_write(struct uint ret;if (ack) -set_bit (ACK_PENDING , &ua->flags); +set_bit (UCSI_ACPI_ACK_PENDING , &ua->flags);else -set_bit (COMMAND_PENDING , &ua->flags); +set_bit (UCSI_ACPI_COMMAND_PENDING , &ua->flags); ret =ucsi_acpi_async_write (ucsi, offset, val, val_len);if (ret)
@@ -92,9 +93,9 @@ static int ucsi_acpi_sync_write(struct u out_clear_bit:if (ack) -clear_bit (ACK_PENDING , &ua->flags); +clear_bit (UCSI_ACPI_ACK_PENDING , &ua->flags);else -clear_bit (COMMAND_PENDING , &ua->flags); +clear_bit (UCSI_ACPI_COMMAND_PENDING , &ua->flags);return ret; }
@@ -129,51 +130,40 @@ static const struct ucsi_operations ucsi };/* -* Some Dell laptops expect that an ACK command with the -* UCSI_ACK_CONNECTOR_CHANGE bit set is followed by a (separate) -* ACK command that only has the UCSI_ACK_COMMAND_COMPLETE bit set. -* If this is not done events are not delivered to OSPM and -* subsequent commands will timeout. +* Some Dell laptops don't like ACK commands with the +* UCSI_ACK_CONNECTOR_CHANGE but not the UCSI_ACK_COMMAND_COMPLETE +* bit set. To work around this send a dummy command and bundle the +* UCSI_ACK_CONNECTOR_CHANGE with the UCSI_ACK_COMMAND_COMPLETE +* for the dummy command. */ static int ucsi_dell_sync_write (struct ucsi *ucsi,unsigned int offset,const void *val,size_t val_len) {struct ucsi_acpi *ua =ucsi_get_drvdata (ucsi); -u64 cmd = *(u64 *)val, ack =0 ; +u64 cmd = *(u64 *)val; +u64 dummycmd =UCSI_GET_CAPABILITY ;int ret; -if (UCSI_COMMAND (cmd) ==UCSI_ACK_CC_CI && - cmd &UCSI_ACK_CONNECTOR_CHANGE ) - ack =UCSI_ACK_CC_CI |UCSI_ACK_COMMAND_COMPLETE ; +if (cmd == (UCSI_ACK_CC_CI |UCSI_ACK_CONNECTOR_CHANGE )) { + cmd |=UCSI_ACK_COMMAND_COMPLETE ; - ret =ucsi_acpi_sync_write (ucsi, offset, val, val_len); -if (ret !=0 ) -return ret; -if (ack ==0 ) -return ret; - -if (!ua->dell_quirk_probed) { - ua->dell_quirk_probed = true; +/* +* The UCSI core thinks it is sending a connector change ack +* and will accept new connector change events. We don't want +* this to happen for the dummy command as its response will +* still report the very event that the core is trying to clear. +*/ +set_bit (UCSI_ACPI_SUPPRESS_EVENT , &ua->flags); + ret =ucsi_acpi_sync_write (ucsi,UCSI_CONTROL , &dummycmd, +sizeof (dummycmd)); +clear_bit (UCSI_ACPI_SUPPRESS_EVENT , &ua->flags); - cmd =UCSI_GET_CAPABILITY ; - ret =ucsi_acpi_sync_write (ucsi,UCSI_CONTROL , &cmd, -sizeof (cmd)); -if (ret ==0 ) -return ucsi_acpi_sync_write (ucsi,UCSI_CONTROL , - &ack,sizeof (ack)); -if (ret != -ETIMEDOUT ) +if (ret <0 )return ret; - - ua->dell_quirk_active = true; -dev_err (ua->dev,"Firmware bug: Additional ACK required after ACKing a connector change.\n" ); -dev_err (ua->dev,"Firmware bug: Enabling workaround\n" ); } -if (!ua->dell_quirk_active) -return ret; - -return ucsi_acpi_sync_write (ucsi,UCSI_CONTROL , &ack,sizeof (ack)); +return ucsi_acpi_sync_write (ucsi,UCSI_CONTROL , &cmd,sizeof (cmd)); }static const struct ucsi_operations ucsi_dell_ops = {
@@ -209,13 +199,14 @@ static void ucsi_acpi_notify(acpi_handleif (ret)return ; -if (UCSI_CCI_CONNECTOR (cci)) +if (UCSI_CCI_CONNECTOR (cci) && + !test_bit (UCSI_ACPI_SUPPRESS_EVENT , &ua->flags))ucsi_connector_change (ua->ucsi,UCSI_CCI_CONNECTOR (cci));if (cci &UCSI_CCI_ACK_COMPLETE &&test_bit (ACK_PENDING , &ua->flags))complete (&ua->complete);if (cci &UCSI_CCI_COMMAND_COMPLETE && -test_bit (COMMAND_PENDING , &ua->flags)) +test_bit (UCSI_ACPI_COMMAND_PENDING , &ua->flags))complete (&ua->complete); }
Greg Kroah-Hartman
maintainerPATCH 411/432 usb: typec: ucsi: Clear UCSI_CCI_RESET_COMPLETE before reset
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian A. Ehrhardt <[email protected]>
commit 3de4f996a0b5412aa451729008130a488f71563e upstream.
Check the UCSI_CCI_RESET_COMPLETE complete flag before starting another reset. Use a UCSI_SET_NOTIFICATION_ENABLE command to clear the flag if it is set.
--- drivers/usb/typec/ucsi/ucsi.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi.c +35 -1
@@ -982,13 +982,47 @@ static int ucsi_reset_connector(struct ustatic int ucsi_reset_ppm (struct ucsi *ucsi) { -u64 command =UCSI_PPM_RESET ; +u64 command;unsigned long tmo;u32 cci;int ret;mutex_lock (&ucsi->ppm_lock); + ret = ucsi->ops->read (ucsi,UCSI_CCI , &cci,sizeof (cci)); +if (ret <0 ) + goto out; + +/* +* If UCSI_CCI_RESET_COMPLETE is already set we must clear +* the flag before we start another reset. Send a +* UCSI_SET_NOTIFICATION_ENABLE command to achieve this. +* Ignore a timeout and try the reset anyway if this fails. +*/ +if (cci &UCSI_CCI_RESET_COMPLETE ) { + command =UCSI_SET_NOTIFICATION_ENABLE ; + ret = ucsi->ops->async_write (ucsi,UCSI_CONTROL , &command, +sizeof (command)); +if (ret <0 ) + goto out; + + tmo = jiffies +msecs_to_jiffies (UCSI_TIMEOUT_MS ); +do { + ret = ucsi->ops->read (ucsi,UCSI_CCI , + &cci,sizeof (cci)); +if (ret <0 ) + goto out; +if (cci &UCSI_CCI_COMMAND_COMPLETE ) +break ; +if (time_is_before_jiffies (tmo)) +break ; +msleep (20 ); + }while (1 ); + +WARN_ON (cci &UCSI_CCI_RESET_COMPLETE ); + } + + command =UCSI_PPM_RESET ; ret = ucsi->ops->async_write (ucsi,UCSI_CONTROL , &command,sizeof (command));if (ret <0 )
Greg Kroah-Hartman
maintainerPATCH 412/432 scsi: qla2xxx: Prevent command send on chip reset
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quinn Tran <[email protected]>
commit 4895009c4bb72f71f2e682f1e7d2c2d96e482087 upstream.
Currently IOCBs are allowed to push through while chip reset could be in progress. During chip reset the outstanding_cmds array is cleared twice. Once when any command on this array is returned as failed and secondly when the array is initialize to zero. If a command is inserted on to the array between these intervals, then the command will be lost. Check for chip reset before sending IOCB.
--- drivers/scsi/qla2xxx/qla_init.c | 8 ++++++-- drivers/scsi/qla2xxx/qla_iocb.c | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +6 -2
@@ -1193,8 +1193,12 @@ int qla24xx_async_gnl(struct scsi_qla_horeturn rval; done_free_sp: -/* ref: INIT */ -kref_put (&sp->cmd_kref, qla2x00_sp_release); +/* +* use qla24xx_async_gnl_sp_done to purge all pending gnl request. +* kref_put is call behind the scene. +*/ + sp->u.iocb_cmd.u.mbx.in_mb[0 ] =MBS_COMMAND_ERROR ; +qla24xx_async_gnl_sp_done (sp,QLA_COMMAND_ERROR ); fcport->flags &= ~(FCF_ASYNC_SENT ); done: fcport->flags &= ~(FCF_ASYNC_ACTIVE );
drivers/scsi/qla2xxx/qla_iocb.c +31 -2
@@ -2587,6 +2587,33 @@ void qla2x00_sp_release(struct kref *kref) { struct srb *sp = container_of(kref, struct srb, cmd_kref); +struct scsi_qla_host *vha = sp->vha; + +switch (sp->type) { +case SRB_CT_PTHRU_CMD : +/* GPSC & GFPNID use fcport->ct_desc.ct_sns for both req & rsp */ +if (sp->u.iocb_cmd.u.ctarg.req && + (!sp->fcport || + sp->u.iocb_cmd.u.ctarg.req != sp->fcport->ct_desc.ct_sns)) { +dma_free_coherent (&vha->hw->pdev->dev, + sp->u.iocb_cmd.u.ctarg.req_allocated_size, + sp->u.iocb_cmd.u.ctarg.req, + sp->u.iocb_cmd.u.ctarg.req_dma); + sp->u.iocb_cmd.u.ctarg.req =NULL ; + } +if (sp->u.iocb_cmd.u.ctarg.rsp && + (!sp->fcport || + sp->u.iocb_cmd.u.ctarg.rsp != sp->fcport->ct_desc.ct_sns)) { +dma_free_coherent (&vha->hw->pdev->dev, + sp->u.iocb_cmd.u.ctarg.rsp_allocated_size, + sp->u.iocb_cmd.u.ctarg.rsp, + sp->u.iocb_cmd.u.ctarg.rsp_dma); + sp->u.iocb_cmd.u.ctarg.rsp =NULL ; + } +break ; +default : +break ; + } sp->free (sp); }
@@ -2692,7 +2719,7 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *v*/ sp =qla2x00_get_sp (vha, fcport,GFP_KERNEL );if (!sp) { -kfree (fcport); +qla2x00_free_fcport (fcport);ql_log (ql_log_info, vha,0x70e6 ,"SRB allocation failed\n" );return -ENOMEM ;
@@ -2747,6 +2774,7 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vif (rval !=QLA_SUCCESS ) {/* ref: INIT */ kref_put (&sp->cmd_kref, qla2x00_sp_release); +qla2x00_free_fcport (fcport);return QLA_FUNCTION_FAILED ; }
@@ -2756,6 +2784,7 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *v fcport->d_id.b.area, fcport->d_id.b.al_pa);wait_for_completion (&elsio->u.els_logo.comp); +qla2x00_free_fcport (fcport);/* ref: INIT */ kref_put (&sp->cmd_kref, qla2x00_sp_release);
@@ -3918,7 +3947,7 @@ qla2x00_start_sp(srb_t *sp)return -EAGAIN ; } - pkt =__qla2x00_alloc_iocbs (sp->qpair, sp); + pkt =qla2x00_alloc_iocbs_ready (sp->qpair, sp);if (!pkt) { rval = -EAGAIN ; ql_log(ql_log_warn, vha, 0x700c,
Greg Kroah-Hartman
maintainerPATCH 413/432 scsi: qla2xxx: Fix N2N stuck connection
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quinn Tran <[email protected]>
commit 881eb861ca3877300570db10abbf11494e48548d upstream.
Disk failed to rediscover after chip reset error injection. The chip reset happens at the time when a PLOGI is being sent. This causes a flag to be left on which blocks the retry. Clear the blocking flag.
--- drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 32 +++++++++++--------------------- drivers/scsi/qla2xxx/qla_os.c | 2 +- 3 files changed, 13 insertions(+), 23 deletions(-)
drivers/scsi/qla2xxx/qla_gbl.h +1 -1
@@ -44,7 +44,7 @@ extern int qla2x00_fabric_login(scsi_qlaextern int qla2x00_local_device_login (scsi_qla_host_t *,fc_port_t *);extern int qla24xx_els_dcmd_iocb (scsi_qla_host_t *,int ,port_id_t ); -extern int qla24xx_els_dcmd2_iocb (scsi_qla_host_t *,int ,fc_port_t *,bool ); +extern int qla24xx_els_dcmd2_iocb (scsi_qla_host_t *,int ,fc_port_t *);extern void qla2x00_els_dcmd2_free (scsi_qla_host_t *vha,struct els_plogi *els_plogi);
drivers/scsi/qla2xxx/qla_iocb.c +11 -21
@@ -3041,7 +3041,7 @@ static void qla2x00_els_dcmd2_sp_done(srint qla24xx_els_dcmd2_iocb (scsi_qla_host_t *vha,int els_opcode, -fc_port_t *fcport,bool wait) +fc_port_t *fcport) {srb_t *sp;struct srb_iocb *elsio =NULL ;
@@ -3056,8 +3056,7 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *if (!sp) {ql_log (ql_log_info, vha,0x70e6 ,"SRB allocation failed\n" ); - fcport->flags &= ~FCF_ASYNC_ACTIVE ; -return -ENOMEM ; + goto done; } fcport->flags |=FCF_ASYNC_SENT ;
@@ -3066,9 +3065,6 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *ql_dbg (ql_dbg_io, vha,0x3073 ,"%s Enter: PLOGI portid=%06x\n" , __func__, fcport->d_id.b24); -if (wait) - sp->flags =SRB_WAKEUP_ON_COMP ; - sp->type =SRB_ELS_DCMD ; sp->name ="ELS_DCMD" ; sp->fcport = fcport;
@@ -3084,7 +3080,7 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *if (!elsio->u.els_plogi.els_plogi_pyld) { rval =QLA_FUNCTION_FAILED ; - goto out; + goto done_free_sp; } resp_ptr = elsio->u.els_plogi.els_resp_pyld =
@@ -3093,7 +3089,7 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *if (!elsio->u.els_plogi.els_resp_pyld) { rval =QLA_FUNCTION_FAILED ; - goto out; + goto done_free_sp; }ql_dbg (ql_dbg_io, vha,0x3073 ,"PLOGI %p %p\n" , ptr, resp_ptr);
@@ -3109,7 +3105,6 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *if (els_opcode ==ELS_DCMD_PLOGI &&DBELL_ACTIVE (vha)) {struct fc_els_flogi *p = ptr; - p->fl_csp.sp_features |=cpu_to_be16 (FC_SP_FT_SEC ); }
@@ -3118,10 +3113,11 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t * (uint8_t *)elsio->u.els_plogi.els_plogi_pyld, sizeof(*elsio->u.els_plogi.els_plogi_pyld)); -init_completion (&elsio->u.els_plogi.comp); rval =qla2x00_start_sp (sp);if (rval !=QLA_SUCCESS ) { - rval =QLA_FUNCTION_FAILED ; + fcport->flags |=FCF_LOGIN_NEEDED ; +set_bit (RELOGIN_NEEDED , &vha->dpc_flags); + goto done_free_sp; }else { ql_dbg(ql_dbg_disc, vha, 0x3074, "%s PLOGI sent, hdl=%x, loopid=%x, to port_id %06x from port_id %06x\n",
@@ -3129,21 +3125,15 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t * fcport->d_id.b24, vha->d_id.b24); } -if (wait) { -wait_for_completion (&elsio->u.els_plogi.comp); - -if (elsio->u.els_plogi.comp_status !=CS_COMPLETE ) - rval =QLA_FUNCTION_FAILED ; - }else { - goto done; - } +return rval; -out: - fcport->flags &= ~(FCF_ASYNC_SENT |FCF_ASYNC_ACTIVE ); +done_free_sp:qla2x00_els_dcmd2_free (vha, &elsio->u.els_plogi);/* ref: INIT */ kref_put (&sp->cmd_kref, qla2x00_sp_release); done: + fcport->flags &= ~(FCF_ASYNC_SENT |FCF_ASYNC_ACTIVE ); +qla2x00_set_fcport_disc_state (fcport,DSC_DELETED );return rval; }
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -5583,7 +5583,7 @@ qla2x00_do_work(struct scsi_qla_host *vhbreak ;case QLA_EVT_ELS_PLOGI :qla24xx_els_dcmd2_iocb (vha,ELS_DCMD_PLOGI , - e->u.fcport.fcport, false); + e->u.fcport.fcport);break ;case QLA_EVT_SA_REPLACE : rc =qla24xx_issue_sa_replace_iocb (vha, e);
Greg Kroah-Hartman
maintainerPATCH 414/432 scsi: qla2xxx: Split FCE|EFT trace control
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quinn Tran <[email protected]>
commit 76a192e1a566e15365704b9f8fb3b70825f85064 upstream.
Current code combines the allocation of FCE|EFT trace buffers and enables the features all in 1 step.
Split this step into separate steps in preparation for follow-on patch to allow user to have a choice to enable / disable FCE trace feature.
--- drivers/scsi/qla2xxx/qla_init.c | 102 ++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 61 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +41 -61
@@ -2669,6 +2669,40 @@ exit:return rval; } +static void qla_enable_fce_trace (scsi_qla_host_t *vha) +{ +int rval; +struct qla_hw_data *ha = vha->hw; + +if (ha->fce) { + ha->flags.fce_enabled =1 ; +memset (ha->fce,0 ,fce_calc_size (ha->fce_bufs)); + rval =qla2x00_enable_fce_trace (vha, + ha->fce_dma, ha->fce_bufs, ha->fce_mb, &ha->fce_bufs); + +if (rval) { +ql_log (ql_log_warn, vha,0x8033 , +"Unable to reinitialize FCE (%d).\n" , rval); + ha->flags.fce_enabled =0 ; + } + } +} + +static void qla_enable_eft_trace (scsi_qla_host_t *vha) +{ +int rval; +struct qla_hw_data *ha = vha->hw; + +if (ha->eft) { +memset (ha->eft,0 ,EFT_SIZE ); + rval =qla2x00_enable_eft_trace (vha, ha->eft_dma,EFT_NUM_BUFFERS ); + +if (rval) { +ql_log (ql_log_warn, vha,0x8034 , +"Unable to reinitialize EFT (%d).\n" , rval); + } + } +}/* * qla2x00_initialize_adapter * Initialize board.
@@ -3672,9 +3706,8 @@ qla24xx_chip_diag(scsi_qla_host_t *vha) }static void -qla2x00_init_fce_trace (scsi_qla_host_t *vha) +qla2x00_alloc_fce_trace (scsi_qla_host_t *vha) { -int rval;dma_addr_t tc_dma;void *tc;struct qla_hw_data *ha = vha->hw;
@@ -3703,27 +3736,17 @@ qla2x00_init_fce_trace(scsi_qla_host_t *return ; } - rval =qla2x00_enable_fce_trace (vha, tc_dma,FCE_NUM_BUFFERS , - ha->fce_mb, &ha->fce_bufs); -if (rval) { -ql_log (ql_log_warn, vha,0x00bf , -"Unable to initialize FCE (%d).\n" , rval); -dma_free_coherent (&ha->pdev->dev,FCE_SIZE , tc, tc_dma); -return ; - } -ql_dbg (ql_dbg_init, vha,0x00c0 ,"Allocated (%d KB) for FCE...\n" ,FCE_SIZE /1024 ); - ha->flags.fce_enabled =1 ; ha->fce_dma = tc_dma; ha->fce = tc; + ha->fce_bufs =FCE_NUM_BUFFERS ; }static void -qla2x00_init_eft_trace (scsi_qla_host_t *vha) +qla2x00_alloc_eft_trace (scsi_qla_host_t *vha) { -int rval;dma_addr_t tc_dma;void *tc;struct qla_hw_data *ha = vha->hw;
@@ -3748,14 +3771,6 @@ qla2x00_init_eft_trace(scsi_qla_host_t *return ; } - rval =qla2x00_enable_eft_trace (vha, tc_dma,EFT_NUM_BUFFERS ); -if (rval) { -ql_log (ql_log_warn, vha,0x00c2 , -"Unable to initialize EFT (%d).\n" , rval); -dma_free_coherent (&ha->pdev->dev,EFT_SIZE , tc, tc_dma); -return ; - } -ql_dbg (ql_dbg_init, vha,0x00c3 ,"Allocated (%d KB) EFT ...\n" ,EFT_SIZE /1024 );
@@ -3763,13 +3778,6 @@ qla2x00_init_eft_trace(scsi_qla_host_t * ha->eft = tc; } -static void -qla2x00_alloc_offload_mem (scsi_qla_host_t *vha) -{ -qla2x00_init_fce_trace (vha); -qla2x00_init_eft_trace (vha); -} -void qla2x00_alloc_fw_dump (scsi_qla_host_t *vha) {
@@ -3824,10 +3832,10 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vif (ha->tgt.atio_ring) mq_size += ha->tgt.atio_q_length *sizeof (request_t); -qla2x00_init_fce_trace (vha); +qla2x00_alloc_fce_trace (vha);if (ha->fce) fce_size =sizeof (struct qla2xxx_fce_chain ) +FCE_SIZE ; -qla2x00_init_eft_trace (vha); +qla2x00_alloc_eft_trace (vha);if (ha->eft) eft_size =EFT_SIZE ; }
@@ -4257,7 +4265,6 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)struct qla_hw_data *ha = vha->hw;struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;unsigned long flags; -uint16_t fw_major_version;int done_once =0 ;if (IS_P3P_TYPE (ha)) {
@@ -4324,7 +4331,6 @@ execute_fw_with_lr: goto failed; enable_82xx_npiv: - fw_major_version = ha->fw_major_version;if (IS_P3P_TYPE (ha))qla82xx_check_md_needed (vha);else
@@ -4353,12 +4359,11 @@ enable_82xx_npiv:if (rval !=QLA_SUCCESS ) goto failed; -if (!fw_major_version && !(IS_P3P_TYPE (ha))) -qla2x00_alloc_offload_mem (vha); -if (ql2xallocfwdump && !(IS_P3P_TYPE (ha)))qla2x00_alloc_fw_dump (vha); +qla_enable_fce_trace (vha); +qla_enable_eft_trace (vha); }else { goto failed; }
@@ -7491,7 +7496,6 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_int qla2x00_abort_isp (scsi_qla_host_t *vha) { -int rval;uint8_t status =0 ;struct qla_hw_data *ha = vha->hw;struct scsi_qla_host *vp, *tvp;
@@ -7585,31 +7589,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)if (IS_QLA81XX (ha) ||IS_QLA8031 (ha))qla2x00_get_fw_version (vha); -if (ha->fce) { - ha->flags.fce_enabled =1 ; -memset (ha->fce,0 , -fce_calc_size (ha->fce_bufs)); - rval =qla2x00_enable_fce_trace (vha, - ha->fce_dma, ha->fce_bufs, ha->fce_mb, - &ha->fce_bufs); -if (rval) { -ql_log (ql_log_warn, vha,0x8033 , -"Unable to reinitialize FCE " -"(%d).\n" , rval); - ha->flags.fce_enabled =0 ; - } - } -if (ha->eft) { -memset (ha->eft,0 ,EFT_SIZE ); - rval =qla2x00_enable_eft_trace (vha, - ha->eft_dma,EFT_NUM_BUFFERS ); -if (rval) { -ql_log (ql_log_warn, vha,0x8034 , -"Unable to reinitialize EFT " -"(%d).\n" , rval); - } - } }else {/* failed the ISP abort */ vha->flags.online =1 ;if (test_bit (ISP_ABORT_RETRY , &vha->dpc_flags)) {
Greg Kroah-Hartman
maintainerPATCH 415/432 scsi: qla2xxx: Update manufacturer detail
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bikash Hazarika <[email protected]>
commit 688fa069fda6fce24d243cddfe0c7024428acb74 upstream.
Update manufacturer detail from "Marvell Semiconductor, Inc." to "Marvell".
--- drivers/scsi/qla2xxx/qla_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_def.h +1 -1
@@ -82,7 +82,7 @@ typedef union {#include "qla_nvme.h" #define QLA2XXX_DRIVER_NAME "qla2xxx"#define QLA2XXX_APIDEV "ql2xapidev" -#define QLA2XXX_MANUFACTURER "Marvell Semiconductor, Inc." +#define QLA2XXX_MANUFACTURER "Marvell"/* * We have MAILBOX_REGISTER_COUNT sized arrays in a few places,
Greg Kroah-Hartman
maintainerPATCH 416/432 scsi: qla2xxx: NVME|FCP prefer flag not being honored
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quinn Tran <[email protected]>
commit 69aecdd410106dc3a8f543a4f7ec6379b995b8d0 upstream.
Changing of [FCP|NVME] prefer flag in flash has no effect on driver. For device that supports both FCP + NVMe over the same connection, driver continues to connect to this device using the previous successful login mode.
On completion of flash update, adapter will be reset. Driver will reset the prefer flag based on setting from flash.
--- drivers/scsi/qla2xxx/qla_init.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/scsi/qla2xxx/qla_init.c +18 -0
@@ -7501,6 +7501,7 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)struct scsi_qla_host *vp, *tvp;struct req_que *req = ha->req_q_map[0 ];unsigned long flags; +fc_port_t *fcport;if (vha->flags.online) {qla2x00_abort_isp_cleanup (vha);
@@ -7569,6 +7570,15 @@ qla2x00_abort_isp(scsi_qla_host_t *vha) "ISP Abort - ISP reg disconnect post nvmram config, exiting.\n");return status; } + +/* User may have updated [fcp|nvme] prefer in flash */ +list_for_each_entry (fcport, &vha->vp_fcports, list) { +if (NVME_PRIORITY (ha, fcport)) + fcport->do_prli_nvme =1 ; +else + fcport->do_prli_nvme =0 ; + } +if (!qla2x00_restart_isp (vha)) {clear_bit (RESET_MARKER_NEEDED , &vha->dpc_flags);
@@ -7639,6 +7649,14 @@ qla2x00_abort_isp(scsi_qla_host_t *vha)atomic_inc (&vp->vref_count);spin_unlock_irqrestore (&ha->vport_slock, flags); +/* User may have updated [fcp|nvme] prefer in flash */ +list_for_each_entry (fcport, &vp->vp_fcports, list) { +if (NVME_PRIORITY (ha, fcport)) + fcport->do_prli_nvme =1 ; +else + fcport->do_prli_nvme =0 ; + } +qla2x00_vp_abort_isp (vp);spin_lock_irqsave (&ha->vport_slock, flags);
Greg Kroah-Hartman
maintainerPATCH 417/432 scsi: qla2xxx: Fix command flush on cable pull
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quinn Tran <[email protected]>
commit a27d4d0e7de305def8a5098a614053be208d1aa1 upstream.
System crash due to command failed to flush back to SCSI layer.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 27 PID: 793455 Comm: kworker/u130:6 Kdump: loaded Tainted: G OE --------- - - 4.18.0-372.9.1.el8.x86_64 #1 Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021 Workqueue: nvme-wq nvme_fc_connect_ctrl_work [nvme_fc] RIP: 0010:__wake_up_common+0x4c/0x190 Code: 24 10 4d 85 c9 74 0a 41 f6 01 04 0f 85 9d 00 00 00 48 8b 43 08 48 83 c3 08 4c 8d 48 e8 49 8d 41 18 48 39 c3 0f 84 f0 00 00 00 <49> 8b 41 18 89 54 24 08 31 ed 4c 8d 70 e8 45 8b 29 41 f6 c5 04 75 RSP: 0018:ffff95f3e0cb7cd0 EFLAGS: 00010086 RAX: 0000000000000000 RBX: ffff8b08d3b26328 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffff8b08d3b26320 RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffffffffffe8 R10: 0000000000000000 R11: ffff95f3e0cb7a60 R12: ffff95f3e0cb7d20 R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8b2fdf6c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000002f1e410002 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: __wake_up_common_lock+0x7c/0xc0 qla_nvme_ls_req+0x355/0x4c0 [qla2xxx] qla2xxx [0000:12:00.1]-f084:3: qlt_free_session_done: se_sess 0000000000000000 / sess ffff8ae1407ca000 from port 21:32:00:02:ac:07:ee:b8 loop_id 0x02 s_id 01:02:00 logout 1 keep 0 els_logo 0 ? __nvme_fc_send_ls_req+0x260/0x380 [nvme_fc] qla2xxx [0000:12:00.1]-207d:3: FCPort 21:32:00:02:ac:07:ee:b8 state transitioned from ONLINE to LOST - portid=010200. ? nvme_fc_send_ls_req.constprop.42+0x1a/0x45 [nvme_fc] qla2xxx [0000:12:00.1]-2109:3: qla2x00_schedule_rport_del 21320002ac07eeb8. rport ffff8ae598122000 roles 1 ? nvme_fc_connect_ctrl_work.cold.63+0x1e3/0xa7d [nvme_fc] qla2xxx [0000:12:00.1]-f084:3: qlt_free_session_done: se_sess 0000000000000000 / sess ffff8ae14801e000 from port 21:32:01:02:ad:f7:ee:b8 loop_id 0x04 s_id 01:02:01 logout 1 keep 0 els_logo 0 ? __switch_to+0x10c/0x450 ? process_one_work+0x1a7/0x360 qla2xxx [0000:12:00.1]-207d:3: FCPort 21:32:01:02:ad:f7:ee:b8 state transitioned from ONLINE to LOST - portid=010201. ? worker_thread+0x1ce/0x390 ? create_worker+0x1a0/0x1a0 qla2xxx [0000:12:00.1]-2109:3: qla2x00_schedule_rport_del 21320102adf7eeb8. rport ffff8ae3b2312800 roles 70 ? kthread+0x10a/0x120 qla2xxx [0000:12:00.1]-2112:3: qla_nvme_unregister_remote_port: unregister remoteport on ffff8ae14801e000 21320102adf7eeb8 ? set_kthread_struct+0x40/0x40 qla2xxx [0000:12:00.1]-2110:3: remoteport_delete of ffff8ae14801e000 21320102adf7eeb8 completed. ? ret_from_fork+0x1f/0x40 qla2xxx [0000:12:00.1]-f086:3: qlt_free_session_done: waiting for sess ffff8ae14801e000 logout
The system was under memory stress where driver was not able to allocate an SRB to carry out error recovery of cable pull. The failure to flush causes upper layer to start modifying scsi_cmnd. When the system frees up some memory, the subsequent cable pull trigger another command flush. At this point the driver access a null pointer when attempting to DMA unmap the SGL.
Add a check to make sure commands are flush back on session tear down to prevent the null pointer access.
--- drivers/scsi/qla2xxx/qla_target.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/scsi/qla2xxx/qla_target.c +10 -0
@@ -1062,6 +1062,16 @@ void qlt_free_session_done(struct work_s "%s: sess %p logout completed\n", __func__, sess); } +/* check for any straggling io left behind */ +if (!(sess->flags &FCF_FCP2_DEVICE ) && +qla2x00_eh_wait_for_pending_commands (sess->vha, sess->d_id.b24,0 ,WAIT_TARGET )) { +ql_log (ql_log_warn, vha,0x3027 , +"IO not return. Resetting.\n" ); +set_bit (ISP_ABORT_NEEDED , &vha->dpc_flags); +qla2xxx_wake_dpc (vha); +qla2x00_wait_for_chip_reset (vha); + } +if (sess->logo_ack_needed) { sess->logo_ack_needed =0 ; qla24xx_async_notify_ack(vha, sess,
Greg Kroah-Hartman
maintainerPATCH 418/432 scsi: qla2xxx: Fix double free of the ha->vp_map pointer
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saurav Kashyap <[email protected]>
commit e288285d47784fdcf7c81be56df7d65c6f10c58b upstream.
Coverity scan reported potential risk of double free of the pointer ha->vp_map. ha->vp_map was freed in qla2x00_mem_alloc(), and again freed in function qla2x00_mem_free(ha).
Assign NULL to vp_map and kfree take care of NULL.
--- drivers/scsi/qla2xxx/qla_os.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/qla2xxx/qla_os.c +1 -0
@@ -4602,6 +4602,7 @@ fail_free_init_cb: ha->init_cb_dma =0 ; fail_free_vp_map:kfree (ha->vp_map); + ha->vp_map =NULL ; fail:ql_log (ql_log_fatal,NULL ,0x0030 ,"Memory allocation failure.\n" );
Greg Kroah-Hartman
maintainerPATCH 419/432 scsi: qla2xxx: Fix double free of fcport
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saurav Kashyap <[email protected]>
commit 82f522ae0d97119a43da53e0f729275691b9c525 upstream.
The server was crashing after LOGO because fcport was getting freed twice.
-----------[ cut here ]-----------
kernel BUG at mm/slub.c:371!
invalid opcode: 0000 1 SMP PTI
CPU: 35 PID: 4610 Comm: bash Kdump: loaded Tainted: G OE --------- - - 4.18.0-425.3.1.el8.x86_64 #1 Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021 RIP: 0010:set_freepointer.part.57+0x0/0x10 RSP: 0018:ffffb07107027d90 EFLAGS: 00010246 RAX: ffff9cb7e3150000 RBX: ffff9cb7e332b9c0 RCX: ffff9cb7e3150400 RDX: 0000000000001f37 RSI: 0000000000000000 RDI: ffff9cb7c0005500 RBP: fffff693448c5400 R08: 0000000080000000 R09: 0000000000000009 R10: 0000000000000000 R11: 0000000000132af0 R12: ffff9cb7c0005500 R13: ffff9cb7e3150000 R14: ffffffffc06990e0 R15: ffff9cb7ea85ea58 FS: 00007ff6b79c2740(0000) GS:ffff9cb8f7ec0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055b426b7d700 CR3: 0000000169c18002 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: kfree+0x238/0x250 qla2x00_els_dcmd_sp_free+0x20/0x230 [qla2xxx] ? qla24xx_els_dcmd_iocb+0x607/0x690 [qla2xxx] qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] ? qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] ? kernfs_fop_write+0x11e/0x1a0
Remove one of the free calls and add check for valid fcport. Also use function qla2x00_free_fcport() instead of kfree().
--- drivers/scsi/qla2xxx/qla_iocb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_iocb.c +3 -2
@@ -2637,7 +2637,8 @@ static void qla2x00_els_dcmd_sp_free(srb {struct srb_iocb *elsio = &sp->u.iocb_cmd; -kfree (sp->fcport); +if (sp->fcport) +qla2x00_free_fcport (sp->fcport);if (elsio->u.els_logo.els_logo_pyld) dma_free_coherent(&sp->vha->hw->pdev->dev, DMA_POOL_SIZE,
@@ -2750,6 +2751,7 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vif (!elsio->u.els_logo.els_logo_pyld) {/* ref: INIT */ kref_put (&sp->cmd_kref, qla2x00_sp_release); +qla2x00_free_fcport (fcport);return QLA_FUNCTION_FAILED ; }
@@ -2784,7 +2786,6 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *v fcport->d_id.b.area, fcport->d_id.b.al_pa);wait_for_completion (&elsio->u.els_logo.comp); -qla2x00_free_fcport (fcport);/* ref: INIT */ kref_put (&sp->cmd_kref, qla2x00_sp_release);
Greg Kroah-Hartman
maintainerPATCH 420/432 scsi: qla2xxx: Change debug message during driver unload
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saurav Kashyap <[email protected]>
commit b5a30840727a3e41d12a336d19f6c0716b299161 upstream.
Upon driver unload, purge_mbox flag is set and the heartbeat monitor thread detects this flag and does not send the mailbox command down to FW with a debug message "Error detected: purge[1] eeh[0] cmd=0x0, Exiting". This being not a real error, change the debug message.
--- drivers/scsi/qla2xxx/qla_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
@@ -194,7 +194,7 @@ qla2x00_mailbox_command(scsi_qla_host_tif (ha->flags.purge_mbox || chip_reset != ha->chip_reset || ha->flags.eeh_busy) {ql_log (ql_log_warn, vha,0xd035 , -"Error detected: purge[%d] eeh[%d] cmd=0x%x, Exiting.\n" , +"Purge mbox: purge[%d] eeh[%d] cmd=0x%x, Exiting.\n" , ha->flags.purge_mbox, ha->flags.eeh_busy, mcp->mb[0 ]); rval =QLA_ABORTED ; goto premature_exit;
Greg Kroah-Hartman
maintainerPATCH 421/432 scsi: qla2xxx: Delay I/O Abort on PCI error
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quinn Tran <[email protected]>
commit 591c1fdf2016d118b8fbde427b796fac13f3f070 upstream.
Currently when PCI error is detected, I/O is aborted manually through the ABORT IOCB mechanism which is not guaranteed to succeed.
Instead, wait for the OS or system to notify driver to wind down I/O through the pci_error_handlers api. Set eeh_busy flag to pause all traffic and wait for I/O to drain.
--- drivers/scsi/qla2xxx/qla_attr.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +12 -2
@@ -2741,7 +2741,13 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rpreturn ;if (unlikely (pci_channel_offline (fcport->vha->hw->pdev))) { -qla2x00_abort_all_cmds (fcport->vha,DID_NO_CONNECT <<16 ); +/* Will wait for wind down of adapter */ +ql_dbg (ql_dbg_aer, fcport->vha,0x900c , +"%s pci offline detected (id %06x)\n" , __func__, + fcport->d_id.b24); +qla_pci_set_eeh_busy (fcport->vha); +qla2x00_eh_wait_for_pending_commands (fcport->vha, fcport->d_id.b24, +0 ,WAIT_TARGET );return ; } }
@@ -2763,7 +2769,11 @@ qla2x00_terminate_rport_io(struct fc_rpo vha = fcport->vha;if (unlikely (pci_channel_offline (fcport->vha->hw->pdev))) { -qla2x00_abort_all_cmds (fcport->vha,DID_NO_CONNECT <<16 ); +/* Will wait for wind down of adapter */ +ql_dbg (ql_dbg_aer, fcport->vha,0x900b , +"%s pci offline detected (id %06x)\n" , __func__, + fcport->d_id.b24); +qla_pci_set_eeh_busy (vha);qla2x00_eh_wait_for_pending_commands (fcport->vha, fcport->d_id.b24,0 ,WAIT_TARGET );return ;
Greg Kroah-Hartman
maintainerPATCH 422/432 x86/bugs: Fix the SRSO mitigation on Zen3/4
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Borislav Petkov (AMD) <[email protected]>
commit 4535e1a4174c4111d92c5a9a21e542d232e0fcaa upstream.
The original version of the mitigation would patch in the calls to the untraining routines directly. That is, the alternative() in UNTRAIN_RET will patch in the CALL to srso_alias_untrain_ret() directly.
However, even if commit e7c25c441e9e ("x86/cpu: Cleanup the untrain mess") meant well in trying to clean up the situation, due to micro- architectural reasons, the untraining routine srso_alias_untrain_ret() must be the target of a CALL instruction and not of a JMP instruction as it is done now.
Reshuffle the alternative macros to accomplish that.
--- arch/x86/include/asm/asm-prototypes.h | 1 + arch/x86/include/asm/nospec-branch.h | 21 ++++++++++++++++----- arch/x86/lib/retpoline.S | 11 ++++++----- 3 files changed, 23 insertions(+), 10 deletions(-)
arch/x86/include/asm/asm-prototypes.h +1 -0
@@ -13,6 +13,7 @@#include <asm/preempt.h> #include <asm/asm.h> #include <asm/gsseg.h> +#include <asm/nospec-branch.h> #ifndef CONFIG_X86_CMPXCHG64 extern void cmpxchg8b_emu (void );
arch/x86/include/asm/nospec-branch.h +16 -5
@@ -271,11 +271,20 @@ .Lskip_rsb_\@: .endm +/* + * The CALL to srso_alias_untrain_ret() must be patched in directly at + * the spot where untraining must be done, ie., srso_alias_untrain_ret() + * must be the target of a CALL instruction instead of indirectly + * jumping to a wrapper which then calls it. Therefore, this macro is + * called outside of __UNTRAIN_RET below, for the time being, before the + * kernel can support nested alternatives with arbitrary nesting. + */ +.macro CALL_UNTRAIN_RET#if defined(CONFIG_CPU_UNRET_ENTRY ) || defined(CONFIG_CPU_SRSO ) -#define CALL_UNTRAIN_RET "call entry_untrain_ret" -#else -#define CALL_UNTRAIN_RET "" +ALTERNATIVE_2 "" ,"call entry_untrain_ret" ,X86_FEATURE_UNRET , \ +"call srso_alias_untrain_ret" ,X86_FEATURE_SRSO_ALIAS #endif +.endm/* * Mitigate RETBleed for AMD/Hygon Zen uarch. Requires KERNEL CR3 because the
@@ -291,8 +300,8 @@ .macro __UNTRAIN_RET ibpb_feature, call_depth_insns#if defined(CONFIG_RETHUNK ) || defined(CONFIG_CPU_IBPB_ENTRY )VALIDATE_UNRET_END - ALTERNATIVE_3 "", \ -CALL_UNTRAIN_RET ,X86_FEATURE_UNRET , \ + CALL_UNTRAIN_RET +ALTERNATIVE_2 "" , \ "call entry_ibpb", \ibpb_feature, \ __stringify(\call_depth_insns), X86_FEATURE_CALL_DEPTH#endif
@@ -351,6 +360,8 @@ extern void retbleed_return_thunk(void);static inline void retbleed_return_thunk (void ) {}#endif +extern void srso_alias_untrain_ret (void ); +#ifdef CONFIG_CPU_SRSO extern void srso_return_thunk (void );extern void srso_alias_return_thunk (void );
arch/x86/lib/retpoline.S +6 -5
@@ -163,6 +163,7 @@ SYM_CODE_START_NOALIGN(srso_alias_untrai lfence jmp srso_alias_return_thunk SYM_FUNC_END(srso_alias_untrain_ret) +__EXPORT_THUNK(srso_alias_untrain_ret) .popsection .pushsection .text..__x86.rethunk_safe
@@ -224,10 +225,12 @@ SYM_CODE_START(srso_return_thunk) SYM_CODE_END(srso_return_thunk) #define JMP_SRSO_UNTRAIN_RET "jmp srso_untrain_ret" -#define JMP_SRSO_ALIAS_UNTRAIN_RET "jmp srso_alias_untrain_ret" #else /* !CONFIG_CPU_SRSO */ #define JMP_SRSO_UNTRAIN_RET "ud2" -#define JMP_SRSO_ALIAS_UNTRAIN_RET "ud2" +/* Dummy for the alternative in CALL_UNTRAIN_RET. */ +SYM_CODE_START(srso_alias_untrain_ret) + RET +SYM_FUNC_END(srso_alias_untrain_ret) #endif /* CONFIG_CPU_SRSO */ #ifdef CONFIG_CPU_UNRET_ENTRY
@@ -319,9 +322,7 @@ SYM_FUNC_END(retbleed_untrain_ret) #if defined(CONFIG_CPU_UNRET_ENTRY) || defined(CONFIG_CPU_SRSO) SYM_FUNC_START(entry_untrain_ret) - ALTERNATIVE_2 JMP_RETBLEED_UNTRAIN_RET, \ - JMP_SRSO_UNTRAIN_RET, X86_FEATURE_SRSO, \ - JMP_SRSO_ALIAS_UNTRAIN_RET, X86_FEATURE_SRSO_ALIAS + ALTERNATIVE JMP_RETBLEED_UNTRAIN_RET, JMP_SRSO_UNTRAIN_RET, X86_FEATURE_SRSO SYM_FUNC_END(entry_untrain_ret) __EXPORT_THUNK(entry_untrain_ret)
Greg Kroah-Hartman
maintainerPATCH 423/432 crash: use macro to add crashk_res into iomem early for specific arch
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baoquan He <[email protected]>
commit 32fbe5246582af4f611ccccee33fd6e559087252 upstream.
There are regression reports[1][2] that crashkernel region on x86_64 can't be added into iomem tree sometime. This causes the later failure of kdump loading.
This happened after commit 4a693ce65b18 ("kdump: defer the insertion of crashkernel resources") was merged.
Even though, these reported issues are proved to be related to other component, they are just exposed after above commmit applied, I still would like to keep crashk_res and crashk_low_res being added into iomem early as before because the early adding has been always there on x86_64 and working very well. For safety of kdump, Let's change it back.
Here, add a macro HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY to limit that only ARCH defining the macro can have the early adding crashk_res/_low_res into iomem. Then define HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY on x86 to enable it.
Note: In reserve_crashkernel_low(), there's a remnant of crashk_low_res handling which was mistakenly added back in commit 85fcde402db1 ("kexec:
split crashkernel reservation code out from crash_core.c").
[1]
[PATCH V2] x86/kexec: do not update E820 kexec table for setup_data
https://lore.kernel.org/all/[email protected]/T/#u
[2]
Question about Address Range Validation in Crash Kernel Allocation
https://lore.kernel.org/all/[email protected]/T/#u
--- arch/x86/include/asm/crash_core.h | 2 ++ kernel/crash_core.c | 8 ++++++++ 2 files changed, 10 insertions(+)
arch/x86/include/asm/crash_core.h +2 -0
@@ -39,4 +39,6 @@ static inline unsigned long crash_low_si #endif } +#define HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY +#endif /* _X86_CRASH_CORE_H */
kernel/crash_core.c +8 -0
@@ -377,6 +377,9 @@ static int __init reserve_crashkernel_lo crashk_low_res.start = low_base; crashk_low_res.end = low_base + low_size -1 ; +#ifdef HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY +insert_resource (&iomem_resource, &crashk_low_res); +#endif #endif return 0 ; }
@@ -458,8 +461,12 @@ retry: crashk_res.start = crash_base; crashk_res.end = crash_base + crash_size -1 ; +#ifdef HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY +insert_resource (&iomem_resource, &crashk_res); +#endif } +#ifndef HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY static __init int insert_crashkernel_resources (void ) {if (crashk_res.start < crashk_res.end)
@@ -472,6 +479,7 @@ static __init int insert_crashkernel_res }early_initcall (insert_crashkernel_resources);#endif +#endif int crash_prepare_elf64_headers (struct crash_mem *mem,int need_kernel_map,void **addr,unsigned long *sz)
Greg Kroah-Hartman
maintainerPATCH 424/432 x86/bugs: Use fixed addressing for VERW operand
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pawan Gupta <[email protected]>
commit 8009479ee919b9a91674f48050ccbff64eafedaa upstream.
The macro used for MDS mitigation executes VERW with relative addressing for the operand. This was necessary in earlier versions of the series. Now it is unnecessary and creates a problem for backports on older kernels that don't support relocations in alternatives. Relocation support was added by commit 270a69c4485d ("x86/alternative:
Support relocations in alternatives"). Also asm for fixed addressing is much cleaner than relative RIP addressing.
Simplify the asm by using fixed addressing for VERW operand.
[ dhansen: tweak changelog ]
--- arch/x86/include/asm/nospec-branch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/nospec-branch.h +1 -1
@@ -332,7 +332,7 @@* Note: Only the memory operand variant of VERW clears the CPU buffers. */ .macro CLEAR_CPU_BUFFERS - ALTERNATIVE "", __stringify(verw _ASM_RIP(mds_verw_sel)), X86_FEATURE_CLEAR_CPU_BUF + ALTERNATIVE "", __stringify(verw mds_verw_sel), X86_FEATURE_CLEAR_CPU_BUF .endm#else /* __ASSEMBLY__ */
Greg Kroah-Hartman
maintainerPATCH 425/432 Revert "x86/bugs: Use fixed addressing for VERW operand"
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Hansen <[email protected]>
commit 532a0c57d7ff75e8f07d4e25cba4184989e2a241 upstream.
This was reverts commit 8009479ee919b9a91674f48050ccbff64eafedaa.
It was originally in x86/urgent, but was deemed wrong so got zapped. But in the meantime, x86/urgent had been merged into x86/apic to resolve a conflict. I didn't notice the merge so didn't zap it from x86/apic and it managed to make it up with the x86/apic material.
The reverted commit is known to cause some KASAN problems.
--- arch/x86/include/asm/nospec-branch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/nospec-branch.h +1 -1
@@ -332,7 +332,7 @@* Note: Only the memory operand variant of VERW clears the CPU buffers. */ .macro CLEAR_CPU_BUFFERS - ALTERNATIVE "", __stringify(verw mds_verw_sel), X86_FEATURE_CLEAR_CPU_BUF + ALTERNATIVE "", __stringify(verw _ASM_RIP(mds_verw_sel)), X86_FEATURE_CLEAR_CPU_BUF .endm#else /* __ASSEMBLY__ */
Greg Kroah-Hartman
maintainerPATCH 426/432 usb: dwc3: pci: Drop duplicate ID
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heikki Krogerus <[email protected]>
commit f121531703ae442edc1dde4b56803680628bc5b7 upstream.
Intel Arrow Lake CPU uses the Meteor Lake ID with this controller (the controller that's part of the Intel Arrow Lake chipset (PCH) does still have unique PCI ID).
--- drivers/usb/dwc3/dwc3-pci.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/dwc3/dwc3-pci.c +0 -2
@@ -51,7 +51,6 @@#define PCI_DEVICE_ID_INTEL_MTLP 0x7ec1#define PCI_DEVICE_ID_INTEL_MTLS 0x7f6f#define PCI_DEVICE_ID_INTEL_MTL 0x7e7e -#define PCI_DEVICE_ID_INTEL_ARLH 0x7ec1#define PCI_DEVICE_ID_INTEL_ARLH_PCH 0x777e#define PCI_DEVICE_ID_INTEL_TGL 0x9a15#define PCI_DEVICE_ID_AMD_MR 0x163a
@@ -423,7 +422,6 @@ static const struct pci_device_id dwc3_p { PCI_DEVICE_DATA(INTEL, MTLP, &dwc3_pci_intel_swnode) }, { PCI_DEVICE_DATA(INTEL, MTL, &dwc3_pci_intel_swnode) }, { PCI_DEVICE_DATA(INTEL, MTLS, &dwc3_pci_intel_swnode) }, - { PCI_DEVICE_DATA(INTEL, ARLH, &dwc3_pci_intel_swnode) }, { PCI_DEVICE_DATA(INTEL, ARLH_PCH, &dwc3_pci_intel_swnode) }, { PCI_DEVICE_DATA(INTEL, TGL, &dwc3_pci_intel_swnode) },
Greg Kroah-Hartman
maintainerPATCH 427/432 scsi: lpfc: Correct size for cmdwqe/rspwqe for memset()
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muhammad Usama Anjum <[email protected]>
commit 16cc2ba71b9f6440805aef7f92ba0f031f79b765 upstream.
The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset() with the same type.
--- drivers/scsi/lpfc/lpfc_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/lpfc/lpfc_bsg.c +2 -2
@@ -3169,10 +3169,10 @@ lpfc_bsg_diag_loopback_run(struct bsg_jo } cmdwqe = &cmdiocbq->wqe; -memset (cmdwqe,0 ,sizeof (union lpfc_wqe )); +memset (cmdwqe,0 ,sizeof (*cmdwqe));if (phba->sli_rev <LPFC_SLI_REV4 ) { rspwqe = &rspiocbq->wqe; -memset (rspwqe,0 ,sizeof (union lpfc_wqe )); +memset (rspwqe,0 ,sizeof (*rspwqe)); }INIT_LIST_HEAD (&head);
Greg Kroah-Hartman
maintainerPATCH 428/432 scsi: libsas: Add a helper sas_get_sas_addr_and_dev_type()
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xingui Yang <[email protected]>
commit a57345279fd311ba679b8083feb0eec5272c7729 upstream.
Add a helper to get attached_sas_addr and device type from disc_resp.
--- drivers/scsi/libsas/sas_expander.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
drivers/scsi/libsas/sas_expander.c +12 -7
@@ -1621,6 +1621,16 @@ out_err:/* ---------- Domain revalidation ---------- */ +static void sas_get_sas_addr_and_dev_type (struct smp_disc_resp *disc_resp, +u8 *sas_addr, +enum sas_device_type *type) +{ +memcpy (sas_addr, disc_resp->disc.attached_sas_addr,SAS_ADDR_SIZE ); + *type =to_dev_type (&disc_resp->disc); +if (*type ==SAS_PHY_UNUSED ) +memset (sas_addr,0 ,SAS_ADDR_SIZE ); +} +static int sas_get_phy_discover (struct domain_device *dev,int phy_id,struct smp_disc_resp *disc_resp) {
@@ -1674,13 +1684,8 @@ int sas_get_phy_attached_dev(struct domareturn -ENOMEM ; res =sas_get_phy_discover (dev, phy_id, disc_resp); -if (res ==0 ) { -memcpy (sas_addr, disc_resp->disc.attached_sas_addr, -SAS_ADDR_SIZE ); - *type =to_dev_type (&disc_resp->disc); -if (*type ==0 ) -memset (sas_addr,0 ,SAS_ADDR_SIZE ); - } +if (res ==0 ) +sas_get_sas_addr_and_dev_type (disc_resp, sas_addr, type);kfree (disc_resp);return res; }
Greg Kroah-Hartman
maintainerPATCH 429/432 scsi: lpfc: Correct size for wqe for memset()
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muhammad Usama Anjum <[email protected]>
commit 28d41991182c210ec1654f8af2e140ef4cc73f20 upstream.
The wqe is of type lpfc_wqe128. It should be memset with the same type.
--- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_nvmet.c +1 -1
@@ -1586,7 +1586,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_ wqe = &nvmewqe->wqe;/* Initialize WQE */ -memset (wqe,0 ,sizeof (union lpfc_wqe )); +memset (wqe,0 ,sizeof (*wqe)); ctx_buf->iocbq->cmd_dmabuf =NULL ;spin_lock (&phba->sli4_hba.sgl_list_lock);
Greg Kroah-Hartman
maintainerPATCH 430/432 scsi: libsas: Fix disk not being scanned in after being removed
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xingui Yang <[email protected]>
commit 8e68a458bcf5b5cb9c3624598bae28f08251601f upstream.
As of commit d8649fc1c5e4 ("scsi: libsas: Do discovery on empty PHY to update PHY info"), do discovery will send a new SMP_DISCOVER and update phy->phy_change_count. We found that if the disk is reconnected and phy change_count changes at this time, the disk scanning process will not be triggered.
Therefore, call sas_set_ex_phy() to update the PHY info with the results of the last query. And because the previous phy info will be used when calling sas_unregister_devs_sas_addr(), sas_unregister_devs_sas_addr() should be called before sas_set_ex_phy().
--- drivers/scsi/libsas/sas_expander.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-)
drivers/scsi/libsas/sas_expander.c +22 -10
@@ -1945,6 +1945,7 @@ static int sas_rediscover_dev(struct domstruct expander_device *ex = &dev->ex_dev;struct ex_phy *phy = &ex->ex_phy[phy_id];enum sas_device_type type =SAS_PHY_UNUSED ; +struct smp_disc_resp *disc_resp;u8 sas_addr[SAS_ADDR_SIZE ];char msg[80 ] ="" ;int res;
@@ -1956,33 +1957,41 @@ static int sas_rediscover_dev(struct dom SAS_ADDR(dev->sas_addr), phy_id, msg);memset (sas_addr,0 ,SAS_ADDR_SIZE ); - res =sas_get_phy_attached_dev (dev, phy_id, sas_addr, &type); + disc_resp =alloc_smp_resp (DISCOVER_RESP_SIZE ); +if (!disc_resp) +return -ENOMEM ; + + res =sas_get_phy_discover (dev, phy_id, disc_resp);switch (res) {case SMP_RESP_NO_PHY : phy->phy_state =PHY_NOT_PRESENT ;sas_unregister_devs_sas_addr (dev, phy_id, last); -return res; + goto out_free_resp;case SMP_RESP_PHY_VACANT : phy->phy_state =PHY_VACANT ;sas_unregister_devs_sas_addr (dev, phy_id, last); -return res; + goto out_free_resp;case SMP_RESP_FUNC_ACC :break ;case -ECOMM :break ;default : -return res; + goto out_free_resp; } +if (res ==0 ) +sas_get_sas_addr_and_dev_type (disc_resp, sas_addr, &type); +if ((SAS_ADDR (sas_addr) ==0 ) || (res == -ECOMM )) { phy->phy_state =PHY_EMPTY ;sas_unregister_devs_sas_addr (dev, phy_id, last);/* -* Even though the PHY is empty, for convenience we discover -* the PHY to update the PHY info, like negotiated linkrate. +* Even though the PHY is empty, for convenience we update +* the PHY info, like negotiated linkrate. */ -sas_ex_phy_discover (dev, phy_id); -return res; +if (res ==0 ) +sas_set_ex_phy (dev, phy_id, disc_resp); + goto out_free_resp; }else if (SAS_ADDR (sas_addr) ==SAS_ADDR (phy->attached_sas_addr) &&dev_type_flutter (type, phy->attached_dev_type)) {struct domain_device *ata_dev =sas_ex_to_ata (dev, phy_id);
@@ -1994,7 +2003,7 @@ static int sas_rediscover_dev(struct dom action =", needs recovery" ;pr_debug ("ex %016llx phy%02d broadcast flutter%s\n" ,SAS_ADDR (dev->sas_addr), phy_id, action); -return res; + goto out_free_resp; }/* we always have to delete the old device when we went here */
@@ -2003,7 +2012,10 @@ static int sas_rediscover_dev(struct dom SAS_ADDR(phy->attached_sas_addr));sas_unregister_devs_sas_addr (dev, phy_id, last); -return sas_discover_new (dev, phy_id); + res =sas_discover_new (dev, phy_id); +out_free_resp: +kfree (disc_resp); +return res; }/**
Greg Kroah-Hartman
maintainerPATCH 431/432 x86/sev: Skip ROM range scans and validation for SEV-SNP guests
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kevin Loughlin <[email protected]>
commit 0f4a1e80989aca185d955fcd791d7750082044a2 upstream.
SEV-SNP requires encrypted memory to be validated before access. Because the ROM memory range is not part of the e820 table, it is not pre-validated by the BIOS. Therefore, if a SEV-SNP guest kernel wishes to access this range, the guest must first validate the range.
The current SEV-SNP code does indeed scan the ROM range during early boot and thus attempts to validate the ROM range in probe_roms(). However, this behavior is neither sufficient nor necessary for the following reasons:
* With regards to sufficiency, if EFI_CONFIG_TABLES are not enabled and CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK is set, the kernel will attempt to access the memory at SMBIOS_ENTRY_POINT_SCAN_START (which falls in the ROM range) prior to validation.
For example, Project Oak Stage 0 provides a minimal guest firmware that currently meets these configuration conditions, meaning guests booting atop Oak Stage 0 firmware encounter a problematic call chain during dmi_setup() -> dmi_scan_machine() that results in a crash during boot if SEV-SNP is enabled.
* With regards to necessity, SEV-SNP guests generally read garbage (which changes across boots) from the ROM range, meaning these scans are unnecessary. The guest reads garbage because the legacy ROM range is unencrypted data but is accessed via an encrypted PMD during early boot (where the PMD is marked as encrypted due to potentially mapping actually-encrypted data in other PMD-contained ranges).
In one exceptional case, EISA probing treats the ROM range as unencrypted data, which is inconsistent with other probing.
Continuing to allow SEV-SNP guests to use garbage and to inconsistently classify ROM range encryption status can trigger undesirable behavior. For instance, if garbage bytes appear to be a valid signature, memory may be unnecessarily reserved for the ROM range. Future code or other use cases may result in more problematic (arbitrary) behavior that should be avoided.
While one solution would be to overhaul the early PMD mapping to always treat the ROM region of the PMD as unencrypted, SEV-SNP guests do not currently rely on data from the ROM region during early boot (and even if they did, they would be mostly relying on garbage data anyways).
As a simpler solution, skip the ROM range scans (and the otherwise- necessary range validation) during SEV-SNP guest early boot. The potential SEV-SNP guest crash due to lack of ROM range validation is thus avoided by simply not accessing the ROM range.
In most cases, skip the scans by overriding problematic x86_init functions during sme_early_init() to SNP-safe variants, which can be likened to x86_init overrides done for other platforms (ex: Xen); such overrides also avoid the spread of cc_platform_has() checks throughout the tree.
In the exceptional EISA case, still use cc_platform_has() for the simplest change, given (1) checks for guest type (ex: Xen domain status) are already performed here, and (2) these checks occur in a subsys initcall instead of an x86_init function.
[ bp: Massage commit message, remove "we"s. ]
--- arch/x86/include/asm/sev.h | 4 ++-- arch/x86/include/asm/x86_init.h | 3 ++- arch/x86/kernel/eisa.c | 3 ++- arch/x86/kernel/probe_roms.c | 10 ---------- arch/x86/kernel/setup.c | 3 +-- arch/x86/kernel/sev.c | 27 ++++++++++++--------------- arch/x86/kernel/x86_init.c | 2 ++ arch/x86/mm/mem_encrypt_amd.c | 18 ++++++++++++++++++ 8 files changed, 39 insertions(+), 31 deletions(-)
arch/x86/include/asm/sev.h +2 -2
@@ -203,12 +203,12 @@ void __init early_snp_set_memory_private unsigned long npages);void __init early_snp_set_memory_shared (unsigned long vaddr,unsigned long paddr,unsigned long npages); -void __init snp_prep_memory (unsigned long paddr,unsigned int sz,enum psc_op op);void snp_set_memory_shared (unsigned long vaddr,unsigned long npages);void snp_set_memory_private (unsigned long vaddr,unsigned long npages);void snp_set_wakeup_secondary_cpu (void );bool snp_init (struct boot_params *bp);void __init __noreturn snp_abort (void ); +void snp_dmi_setup (void );int snp_issue_guest_request (u64 exit_code,struct snp_req_data *input,struct snp_guest_request_ioctl *rio);void snp_accept_memory (phys_addr_t start,phys_addr_t end);u64 snp_get_unsupported_features (u64 status);
@@ -227,12 +227,12 @@ static inline void __init early_snp_set_memory_private(unsigned long vaddr, unsigned long paddr, unsigned long npages) { }static inline void __init early_snp_set_memory_shared (unsigned long vaddr,unsigned long paddr,unsigned long npages) { } -static inline void __init snp_prep_memory (unsigned long paddr,unsigned int sz,enum psc_op op) { }static inline void snp_set_memory_shared (unsigned long vaddr,unsigned long npages) { }static inline void snp_set_memory_private (unsigned long vaddr,unsigned long npages) { }static inline void snp_set_wakeup_secondary_cpu (void ) { }static inline bool snp_init (struct boot_params *bp) {return false; }static inline void snp_abort (void ) { } +static inline void snp_dmi_setup (void ) { }static inline int snp_issue_guest_request (u64 exit_code,struct snp_req_data *input,struct snp_guest_request_ioctl *rio) {return -ENOTTY ;
arch/x86/include/asm/x86_init.h +2 -1
@@ -30,12 +30,13 @@ struct x86_init_mpparse {* @reserve_resources: reserve the standard resources for the * platform * @memory_setup: platform specific memory setup -* +* @dmi_setup: platform specific DMI setup */ struct x86_init_resources {void (*probe_roms)(void );void (*reserve_resources)(void );char *(*memory_setup)(void ); +void (*dmi_setup)(void ); };/**
arch/x86/kernel/eisa.c +2 -1
@@ -2,6 +2,7 @@/* * EISA specific code */ +#include <linux/cc_platform.h> #include <linux/ioport.h> #include <linux/eisa.h> #include <linux/io.h>
@@ -12,7 +13,7 @@ static __init int eisa_bus_probe(void) {void __iomem *p; -if (xen_pv_domain () && !xen_initial_domain ()) +if ((xen_pv_domain () && !xen_initial_domain ()) ||cc_platform_has (CC_ATTR_GUEST_SEV_SNP ))return 0 ; p =ioremap (0x0FFFD9 ,4 );
arch/x86/kernel/probe_roms.c +0 -10
@@ -203,16 +203,6 @@ void __init probe_roms(void)unsigned char c;int i; -/* -* The ROM memory range is not part of the e820 table and is therefore not -* pre-validated by BIOS. The kernel page table maps the ROM region as encrypted -* memory, and SNP requires encrypted memory to be validated before access. -* Do that here. -*/ -snp_prep_memory (video_rom_resource.start, - ((system_rom_resource.end +1 ) - video_rom_resource.start), -SNP_PAGE_STATE_PRIVATE ); -/* video rom */ upper = adapter_rom_resources[0 ].start;for (start = video_rom_resource.start; start < upper; start +=2048 ) {
arch/x86/kernel/setup.c +1 -2
@@ -9,7 +9,6 @@#include <linux/console.h> #include <linux/crash_dump.h> #include <linux/dma-map-ops.h> -#include <linux/dmi.h> #include <linux/efi.h> #include <linux/ima.h> #include <linux/init_ohci1394_dma.h>
@@ -904,7 +903,7 @@ void __init setup_arch(char **cmdline_p)efi_init ();reserve_ibft_region (); -dmi_setup (); + x86_init.resources.dmi_setup ();/* * VMware detection requires dmi to be available, so this
arch/x86/kernel/sev.c +12 -15
@@ -23,6 +23,7 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/psp-sev.h> +#include <linux/dmi.h> #include <uapi/linux/sev-guest.h> #include <asm/cpu_entry_area.h>
@@ -774,21 +775,6 @@ void __init early_snp_set_memory_shared(early_set_pages_state (vaddr, paddr, npages,SNP_PAGE_STATE_SHARED ); } -void __init snp_prep_memory (unsigned long paddr,unsigned int sz,enum psc_op op) -{ -unsigned long vaddr, npages; - - vaddr = (unsigned long )__va (paddr); - npages =PAGE_ALIGN (sz) >>PAGE_SHIFT ; - -if (op ==SNP_PAGE_STATE_PRIVATE ) -early_snp_set_memory_private (vaddr, paddr, npages); -else if (op ==SNP_PAGE_STATE_SHARED ) -early_snp_set_memory_shared (vaddr, paddr, npages); -else -WARN (1 ,"invalid memory op %d\n" , op); -} -static unsigned long __set_pages_state (struct snp_psc_desc *data,unsigned long vaddr,unsigned long vaddr_end,int op) {
@@ -2112,6 +2098,17 @@ void __init __noreturn snp_abort(void)sev_es_terminate (SEV_TERM_SET_GEN ,GHCB_SNP_UNSUPPORTED ); } +/* +* SEV-SNP guests should only execute dmi_setup() if EFI_CONFIG_TABLES are +* enabled, as the alternative (fallback) logic for DMI probing in the legacy +* ROM region can cause a crash since this region is not pre-validated. +*/ +void __init snp_dmi_setup (void ) +{ +if (efi_enabled (EFI_CONFIG_TABLES )) +dmi_setup (); +} +static void dump_cpuid_table (void ) {const struct snp_cpuid_table *cpuid_table =snp_cpuid_get_table ();
arch/x86/kernel/x86_init.c +2 -0
@@ -3,6 +3,7 @@* * For licencing details see kernel-base/COPYING */ +#include <linux/dmi.h> #include <linux/init.h> #include <linux/ioport.h> #include <linux/export.h>
@@ -66,6 +67,7 @@ struct x86_init_ops x86_init __initdata .probe_roms = probe_roms, .reserve_resources = reserve_standard_io_resources, .memory_setup = e820__memory_setup_default, + .dmi_setup = dmi_setup, }, .mpparse = {
arch/x86/mm/mem_encrypt_amd.c +18 -0
@@ -492,6 +492,24 @@ void __init sme_early_init(void)*/ if (sev_status &MSR_AMD64_SEV_ENABLED )ia32_disable (); + +/* +* Override init functions that scan the ROM region in SEV-SNP guests, +* as this memory is not pre-validated and would thus cause a crash. +*/ +if (sev_status &MSR_AMD64_SEV_SNP_ENABLED ) { + x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.pci.init_irq = x86_init_noop; + x86_init.resources.probe_roms = x86_init_noop; + +/* +* DMI setup behavior for SEV-SNP guests depends on +* efi_enabled(EFI_CONFIG_TABLES), which hasn't been +* parsed yet. snp_dmi_setup() will run after that +* parsing has happened. +*/ + x86_init.resources.dmi_setup = snp_dmi_setup; + } }void __init mem_encrypt_free_decrypted_mem (void )
Greg Kroah-Hartman
maintainerPATCH 432/432 tools/resolve_btfids: fix build with musl libc
In reply to Greg Kroah-Hartman6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Natanael Copa <[email protected]>
commit 62248b22d01e96a4d669cde0d7005bd51ebf9e76 upstream.
Include the header that defines u32.
This fixes build of 6.6.23 and 6.1.83 kernels for Alpine Linux, which uses musl libc. I assume that GNU libc indirecly pulls in linux/types.h.
--- tools/include/linux/btf_ids.h | 2 ++ 1 file changed, 2 insertions(+)
tools/include/linux/btf_ids.h +2 -0
@@ -3,6 +3,8 @@ #ifndef _LINUX_BTF_IDS_H #define _LINUX_BTF_IDS_H +#include <linux/types.h> /* for u32 */ + struct btf_id_set { u32 cnt; u32 ids[];
Hello,
Quoted 10 lines · On Mon, 1 Apr 2024 17:39:47 +0200 Greg Kroah-Hartman…
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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.
Quoted 8 lines
Responses should be made by Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.
This rc kernel passes DAMON functionality test[1] on my test machine. Attaching the test results summary below. Please note that I retrieved the kernel from linux-stable-rc tree[2].
[1] https://github.com/awslabs/damon-tests/tree/next/corr
[2] b15156435f06 ("Linux 6.7.12-rc1")
Thanks,
SJ
[...]
---
ok 1 selftests: damon: debugfs_attrs.sh
ok 2 selftests: damon: debugfs_schemes.sh
ok 3 selftests: damon: debugfs_target_ids.sh
ok 4 selftests: damon: debugfs_empty_targets.sh
ok 5 selftests: damon: debugfs_huge_count_read_write.sh
ok 6 selftests: damon: debugfs_duplicate_context_creation.sh
ok 7 selftests: damon: debugfs_rm_non_contexts.sh
ok 8 selftests: damon: sysfs.sh
ok 9 selftests: damon: sysfs_update_removed_scheme_dir.sh
ok 10 selftests: damon: reclaim.sh
ok 11 selftests: damon: lru_sort.sh
ok 1 selftests: damon-tests: kunit.sh
ok 2 selftests: damon-tests: huge_count_read_write.sh
ok 3 selftests: damon-tests: buffer_overflow.sh
ok 4 selftests: damon-tests: rm_contexts.sh
ok 5 selftests: damon-tests: record_null_deref.sh
ok 6 selftests: damon-tests: dbgfs_target_ids_read_before_terminate_race.sh ok 7 selftests: damon-tests: dbgfs_target_ids_pid_leak.sh
ok 8 selftests: damon-tests: damo_tests.sh
ok 9 selftests: damon-tests: masim-record.sh
ok 10 selftests: damon-tests: build_i386.sh
ok 11 selftests: damon-tests: build_arm64.sh
ok 12 selftests: damon-tests: build_m68k.sh
ok 13 selftests: damon-tests: build_i386_idle_flag.sh
ok 14 selftests: damon-tests: build_i386_highpte.sh
ok 15 selftests: damon-tests: build_nomemcg.sh
[33m
[92mPASS [39m
Quoted 15 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Following kernel warnings have been noticed on qemu-x86_64 while running LTP cve ioctl_sg01 tests the kernel with stable-rc 6.6.24-rc1, 6.7.12-rc1 and 6.8.3-rc1.
We have started bi-secting this issue.
Always reproduced.
ioctl_sg01.c:81: TINFO: Found SCSI device /dev/sg0
------------[ cut here ]------------ [ 36.606841] WARNING: CPU: 0 PID: 8 at drivers/scsi/sg.c:2237 sg_remove_sfp_usercontext+0x145/0x150 [ 36.609445] Modules linked in: [ 36.610793] CPU: 0 PID: 8 Comm: kworker/0:0 Not tainted 6.6.24-rc1 #1 [ 36.611568] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 36.612872] Workqueue: events sg_remove_sfp_usercontext [ 36.613691] RIP: 0010:sg_remove_sfp_usercontext+0x145/0x150
<trim>
[ 36.621539] Call Trace: [ 36.621953] <TASK> [ 36.622444] ? show_regs+0x69/0x80 [ 36.622819] ? __warn+0x8d/0x150 [ 36.623078] ? sg_remove_sfp_usercontext+0x145/0x150 [ 36.623558] ? report_bug+0x171/0x1a0 [ 36.623881] ? handle_bug+0x42/0x80 [ 36.624070] ? exc_invalid_op+0x1c/0x70 [ 36.624491] ? asm_exc_invalid_op+0x1f/0x30 [ 36.624897] ? sg_remove_sfp_usercontext+0x145/0x150 [ 36.625408] process_one_work+0x141/0x300 [ 36.625769] worker_thread+0x2f6/0x430 [ 36.626073] ? __pfx_worker_thread+0x10/0x10 [ 36.626529] kthread+0x105/0x140 [ 36.626778] ? __pfx_kthread+0x10/0x10 [ 36.627059] ret_from_fork+0x41/0x60 [ 36.627441] ? __pfx_kthread+0x10/0x10 [ 36.627735] ret_from_fork_asm+0x1b/0x30 [ 36.628293] </TASK> [ 36.628604] ---[ end trace 0000000000000000 ]---
ioctl_sg01.c:122: TPASS: Output buffer is empty, no data leaked
Suspecting commit:
-----
scsi: sg: Avoid sg device teardown race
commit 27f58c04a8f438078583041468ec60597841284d upstream.
+ WARN_ON_ONCE(kref_read(&sdp->d_ref) != 1);
Steps to reproduce:
- https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2eVWFlAeOUepfeFVkrOXFYNNAqI/reproducer
Links:
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.6.y/build/v6.6.23-397-g75a2533b74d0/testrun/23255318/suite/log-parser-test/tests/
- https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2eVTitwVMagaiWhs5T2iKH390D5
--
Linaro LKFT
https://lkft.linaro.org
Quoted 14 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 14 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 14 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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.
Successfully compiled and installed the kernel on my computer (Acer Aspire E15, Intel Core i3 Haswell). No noticeable regressions.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 15 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
Regressions on arm64, arm, x86_64, and i386 with libgpiod tests.
libgpiod test regressions noticed on Linux stable-rc 6.8, 6.7 and 6.6 and Linux next and mainline master.
Anders bisected and found this first bad commit,
gpio: cdev: sanitize the label before requesting the interrupt commit b34490879baa847d16fc529c8ea6e6d34f004b38 upstream.
LKFT is running libgpiod test suite version
v2.0.1-0-gae275c3 (and also tested v2.1)
libgpiod
- _gpiod_edge-event_edge_event_wait_timeout
- _gpiod_edge-event_event_copy
- _gpiod_edge-event_null_buffer
- _gpiod_edge-event_read_both_events
- _gpiod_edge-event_read_both_events_blocking
- _gpiod_edge-event_read_falling_edge_event
- _gpiod_edge-event_read_rising_edge_event
- _gpiod_edge-event_read_rising_edge_event_polled
- _gpiod_edge-event_reading_more_events_than_the_queue_contains_doesnt_block
- _gpiod_edge-event_seqno
- _gpiod_line-info_edge_detection_settings
Test log:
-------
ok 16 /gpiod/edge-event/edge_event_buffer_max_capacity
** gpiod-test:ERROR:tests-edge-event.c:52:_gpiod_test_func_edge_event_wait_timeout:
'_request' should not be NULL
# gpiod-test:ERROR:tests-edge-event.c:52:_gpiod_test_func_edge_event_wait_timeout:
'_request' should not be NULL
not ok 17 /gpiod/edge-event/edge_event_wait_timeout
ok 18 /gpiod/edge-event/cannot_request_lines_in_output_mode_with_edge_detection ** gpiod-test:ERROR:tests-edge-event.c:125:_gpiod_test_func_read_both_events:
'_request' should not be NULL
# gpiod-test:ERROR:tests-edge-event.c:125:_gpiod_test_func_read_both_events:
'_request' should not be NULL
not ok 19 /gpiod/edge-event/read_both_events
--
Linaro LKFT
https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 71 lines · Naresh Kamboju
Quoted 15 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
Regressions on arm64, arm,x86_64, and i386 with libgpiod tests.libgpiod test regressions noticed on Linux stable-rc 6.8, 6.7 and 6.6 and Linux next and mainline master.
Anders bisected and found this first bad commit,
gpio: cdev: sanitize the label before requesting the interrupt commitb34490879baa847d16fc529c8ea6e6d34f004b38upstream.LKFT is running libgpiod test suite version
v2.0.1-0-gae275c3 (and also tested v2.1)libgpiod
- _gpiod_edge-event_edge_event_wait_timeout
- _gpiod_edge-event_event_copy
- _gpiod_edge-event_null_buffer
- _gpiod_edge-event_read_both_events
- _gpiod_edge-event_read_both_events_blocking
- _gpiod_edge-event_read_falling_edge_event
- _gpiod_edge-event_read_rising_edge_event
- _gpiod_edge-event_read_rising_edge_event_polled
- _gpiod_edge-event_reading_more_events_than_the_queue_contains_doesnt_block
- _gpiod_edge-event_seqno
- _gpiod_line-info_edge_detection_settingsTest log:
-------
ok 16 /gpiod/edge-event/edge_event_buffer_max_capacity
** gpiod-test:ERROR:tests-edge-event.c:52:_gpiod_test_func_edge_event_wait_timeout:
'_request' should not be NULL
# gpiod-test:ERROR:tests-edge-event.c:52:_gpiod_test_func_edge_event_wait_timeout:
'_request' should not be NULL
not ok 17 /gpiod/edge-event/edge_event_wait_timeout
ok 18 /gpiod/edge-event/cannot_request_lines_in_output_mode_with_edge_detection ** gpiod-test:ERROR:tests-edge-event.c:125:_gpiod_test_func_read_both_events:
'_request' should not be NULL
# gpiod-test:ERROR:tests-edge-event.c:125:_gpiod_test_func_read_both_events:
'_request' should not be NULL
not ok 19 /gpiod/edge-event/read_both_events
Quoted 2 lines
I'm going to drop the gpio change and make it for the next round of stable kernels, so we don't get this regression.
thanks,
greg k-h
Quoted 14 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Quoted 9 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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.
Quoted 14 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.7.12-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.7.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.7:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 116 pass, 0 failLinux version: 6.7.12-rc1-gb15156435f06
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04Jon
Quoted 5 lines · Greg Kroah-Hartman
Note, this will be the LAST 6.7.y kernel release. After this one it will be end-of-life. Please move to 6.8.y now.
------------------------------------------
Quoted 7 lines
This is the start of the stable review cycle for the 6.7.12 release. There are 432 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 Wed, 03 Apr 2024 15:24:46 +0000. Anything received after that time might be too late.
IK I am late, bank holiday for Easter delayed things :)
Cheers,
Conor.