regulator: rtmv20: Fix wrong mask for strobe-polarity-high
Subsystems (9)
Sasha Levin
maintainerPATCH 1/17 regulator: rtmv20: Fix wrong mask for strobe-polarity-high
From: ChiYuan Huang <[email protected]>
[ Upstream commit 2b6a761be079f9fa8abf3157b5679a6f38885db4 ]
Fix wrong mask for strobe-polarity-high.
In-reply-to: <CAFRkauB=0KwrJW19nJTTagdHhBR=V2R8YFWG3R3oVXt=rBRsqw@mail.gmail.com>
--- drivers/regulator/rtmv20-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/rtmv20-regulator.c +1 -1
@@ -37,7 +37,7 @@#define RTMV20_WIDTH2_MASK GENMASK(7, 0)#define RTMV20_LBPLVL_MASK GENMASK(3, 0)#define RTMV20_LBPEN_MASK BIT(7) -#define RTMV20_STROBEPOL_MASK BIT(1) +#define RTMV20_STROBEPOL_MASK BIT(0)#define RTMV20_VSYNPOL_MASK BIT(1)#define RTMV20_FSINEN_MASK BIT(7)#define RTMV20_ESEN_MASK BIT(6)
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 2/17 regulator: rt5033: Fix n_voltages settings for BUCK and LDO
From: Axel Lin <[email protected]>
[ Upstream commit 6549c46af8551b346bcc0b9043f93848319acd5c ]
For linear regulators, the n_voltages should be (max - min) / step + 1.
Buck voltage from 1v to 3V, per step 100mV, and vout mask is 0x1f. If value is from 20 to 31, the voltage will all be fixed to 3V. And LDO also, just vout range is different from 1.2v to 3v, step is the same. If value is from 18 to 31, the voltage will also be fixed to 3v.
--- include/linux/mfd/rt5033-private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/mfd/rt5033-private.h +2 -2
@@ -200,13 +200,13 @@ enum rt5033_reg {#define RT5033_REGULATOR_BUCK_VOLTAGE_MIN 1000000U#define RT5033_REGULATOR_BUCK_VOLTAGE_MAX 3000000U#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP 100000U -#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP_NUM 32 +#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP_NUM 21/* RT5033 regulator LDO output voltage uV */ #define RT5033_REGULATOR_LDO_VOLTAGE_MIN 1200000U#define RT5033_REGULATOR_LDO_VOLTAGE_MAX 3000000U#define RT5033_REGULATOR_LDO_VOLTAGE_STEP 100000U -#define RT5033_REGULATOR_LDO_VOLTAGE_STEP_NUM 32 +#define RT5033_REGULATOR_LDO_VOLTAGE_STEP_NUM 19/* RT5033 regulator SAFE LDO output voltage uV */ #define RT5033_REGULATOR_SAFE_LDO_VOLTAGE 4900000U
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 3/17 spi: stm32h7: fix full duplex irq handler handling
In reply to Sasha LevinFrom: Alain Volmat <[email protected]>
[ Upstream commit e4a5c19888a5f8a9390860ca493e643be58c8791 ]
In case of Full-Duplex mode, DXP flag is set when RXP and TXP flags are set. But to avoid 2 different handlings, just add TXP and RXP flag in the mask instead of DXP, and then keep the initial handling of TXP and RXP events.
Also rephrase comment about EOTIE which is one of the interrupt enable bits. It is not triggered by any event.
--- drivers/spi/spi-stm32.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/spi/spi-stm32.c +9 -6
@@ -917,15 +917,18 @@ static irqreturn_t stm32h7_spi_irq_thread(int irq, void *dev_id) ier =readl_relaxed (spi->base +STM32H7_SPI_IER ); mask = ier; -/* EOTIE is triggered on EOT, SUSP and TXC events. */ +/* +* EOTIE enables irq from EOT, SUSP and TXC events. We need to set +* SUSP to acknowledge it later. TXC is automatically cleared +*/ + mask |=STM32H7_SPI_SR_SUSP ;/* -* When TXTF is set, DXPIE and TXPIE are cleared. So in case of -* Full-Duplex, need to poll RXP event to know if there are remaining -* data, before disabling SPI. +* DXPIE is set in Full-Duplex, one IT will be raised if TXP and RXP +* are set. So in case of Full-Duplex, need to poll TXP and RXP event. */ -if (spi->rx_buf && !spi->cur_usedma) - mask |=STM32H7_SPI_SR_RXP ; +if ((spi->cur_comm ==SPI_FULL_DUPLEX ) && !spi->cur_usedma) + mask |=STM32H7_SPI_SR_TXP |STM32H7_SPI_SR_RXP ;if (!(sr & mask)) { dev_warn(spi->dev, "spurious IT (sr=0x%08x, ier=0x%08x)\n",
Signature · 7 lines
2.30.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sasha Levin
maintainerPATCH 4/17 ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits
In reply to Sasha LevinFrom: Kyle Russell <[email protected]>
[ Upstream commit 9cf76a72af6ab81030dea6481b1d7bdd814fbdaf ]
These are backwards from Table 7-71 of the TLV320AIC3100 spec [1].
This was broken in 12eb4d66ba2e when BCLK_MASTER and WCLK_MASTER were converted from 0x08 and 0x04 to BIT(2) and BIT(3), respectively.
-#define AIC31XX_BCLK_MASTER 0x08
-#define AIC31XX_WCLK_MASTER 0x04
+#define AIC31XX_BCLK_MASTER BIT(2)
+#define AIC31XX_WCLK_MASTER BIT(3)
Probably just a typo since the defines were not listed in bit order.
[1] https://www.ti.com/lit/gpn/tlv320aic3100
--- sound/soc/codecs/tlv320aic31xx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/tlv320aic31xx.h +2 -2
@@ -151,8 +151,8 @@ struct aic31xx_pdata {#define AIC31XX_WORD_LEN_24BITS 0x02#define AIC31XX_WORD_LEN_32BITS 0x03#define AIC31XX_IFACE1_MASTER_MASK GENMASK(3, 2) -#define AIC31XX_BCLK_MASTER BIT(2) -#define AIC31XX_WCLK_MASTER BIT(3) +#define AIC31XX_BCLK_MASTER BIT(3) +#define AIC31XX_WCLK_MASTER BIT(2)/* AIC31XX_DATA_OFFSET */ #define AIC31XX_DATA_OFFSET_MASK GENMASK(7, 0)
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 5/17 USB: core: Fix incorrect pipe calculation in do_proc_control()
In reply to Sasha LevinFrom: Alan Stern <[email protected]>
[ Upstream commit b0863f1927323110e3d0d69f6adb6a91018a9a3c ]
When the user submits a control URB via usbfs, the user supplies the bRequestType value and the kernel uses it to compute the pipe value. However, do_proc_control() performs this computation incorrectly in the case where the bRequestType direction bit is set to USB_DIR_IN and the URB's transfer length is 0: The pipe's direction is also set to IN but it should be OUT, which is the direction the actual transfer will use regardless of bRequestType.
Commit 5cc59c418fde ("USB: core: WARN if pipe direction != setup packet direction") added a check to compare the direction bit in the pipe value to a control URB's actual direction and to WARN if they are different. This can be triggered by the incorrect computation mentioned above, as found by syzbot.
This patch fixes the computation, thus avoiding the WARNing.
--- drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/core/devio.c +1 -1
@@ -1133,7 +1133,7 @@ static int do_proc_control(struct usb_dev_state *ps,"wIndex=%04x wLength=%04x\n" , ctrl->bRequestType, ctrl->bRequest, ctrl->wValue, ctrl->wIndex, ctrl->wLength); -if (ctrl->bRequestType &0x80 ) { +if ((ctrl->bRequestType &USB_DIR_IN ) && ctrl->wLength) { pipe =usb_rcvctrlpipe (dev,0 );snoop_urb (dev,NULL , pipe, ctrl->wLength, tmo,SUBMIT ,NULL ,0 );
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 6/17 r8152: Fix potential PM refcount imbalance
In reply to Sasha LevinFrom: Takashi Iwai <[email protected]>
[ Upstream commit 9c23aa51477a37f8b56c3c40192248db0663c196 ]
rtl8152_close() takes the refcount via usb_autopm_get_interface() but it doesn't release when RTL8152_UNPLUG test hits. This may lead to the imbalance of PM refcount. This patch addresses it.
--- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/usb/r8152.c +2 -1
@@ -5282,9 +5282,10 @@ static int rtl8152_close(struct net_device *netdev) tp->rtl_ops.down (tp);mutex_unlock (&tp->control); + } +if (!res)usb_autopm_put_interface (tp->intf); - }free_all_mem (tp);
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 7/17 qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
In reply to Sasha LevinFrom: Jia He <[email protected]>
[ Upstream commit 6206b7981a36476f4695d661ae139f7db36a802d ]
Liajian reported a bug_on hit on a ThunderX2 arm64 server with FastLinQ QL41000 ethernet controller:
BUG: scheduling while atomic: kworker/0:4/531/0x00000200 [qed_probe:488()]hw prepare failed kernel BUG at mm/vmalloc.c:2355! Internal error: Oops - BUG: 0 [#1] SMP CPU: 0 PID: 531 Comm: kworker/0:4 Tainted: G W 5.4.0-77-generic #86-Ubuntu pstate: 00400009 (nzcv daif +PAN -UAO) Call trace: vunmap+0x4c/0x50 iounmap+0x48/0x58 qed_free_pci+0x60/0x80 [qed] qed_probe+0x35c/0x688 [qed] __qede_probe+0x88/0x5c8 [qede] qede_probe+0x60/0xe0 [qede] local_pci_probe+0x48/0xa0 work_for_cpu_fn+0x24/0x38 process_one_work+0x1d0/0x468 worker_thread+0x238/0x4e0 kthread+0xf0/0x118 ret_from_fork+0x10/0x18
In this case, qed_hw_prepare() returns error due to hw/fw error, but in theory work queue should be in process context instead of interrupt.
The root cause might be the unpaired spin_{un}lock_bh() in _qed_mcp_cmd_and_union(), which causes botton half is disabled incorrectly.
--- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/net/ethernet/qlogic/qed/qed_mcp.c +17 -6
@@ -474,14 +474,18 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,spin_lock_bh (&p_hwfn->mcp_info->cmd_lock); -if (!qed_mcp_has_pending_cmd (p_hwfn)) +if (!qed_mcp_has_pending_cmd (p_hwfn)) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; + } rc =qed_mcp_update_pending_cmd (p_hwfn, p_ptt); -if (!rc) +if (!rc) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; -else if (rc != -EAGAIN ) + }else if (rc != -EAGAIN ) { goto err; + }spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);
@@ -498,6 +502,8 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,return -EAGAIN ; } +spin_lock_bh (&p_hwfn->mcp_info->cmd_lock); +/* Send the mailbox command */ qed_mcp_reread_offsets (p_hwfn, p_ptt); seq_num = ++p_hwfn->mcp_info->drv_mb_seq;
@@ -524,14 +530,18 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,spin_lock_bh (&p_hwfn->mcp_info->cmd_lock); -if (p_cmd_elem->b_is_completed) +if (p_cmd_elem->b_is_completed) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; + } rc =qed_mcp_update_pending_cmd (p_hwfn, p_ptt); -if (!rc) +if (!rc) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; -else if (rc != -EAGAIN ) + }else if (rc != -EAGAIN ) { goto err; + }spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock); }while (++cnt < max_retries);
@@ -554,6 +564,7 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,return -EAGAIN ; } +spin_lock_bh (&p_hwfn->mcp_info->cmd_lock);qed_mcp_cmd_del_elem (p_hwfn, p_cmd_elem);spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 8/17 ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend
In reply to Sasha LevinFrom: Oder Chiou <[email protected]>
[ Upstream commit 6a503e1c455316fd0bfd8188c0a62cce7c5525ca ]
While using the DMIC recording, the garbled data will be captured by the DMIC. It is caused by the critical power of PLL closed in the jack detect function.
--- sound/soc/codecs/rt5682.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
sound/soc/codecs/rt5682.c +6 -2
@@ -971,10 +971,14 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)rt5682_enable_push_button_irq (component, false);snd_soc_component_update_bits (component,RT5682_CBJ_CTRL_1 ,RT5682_TRIG_JD_MASK ,RT5682_TRIG_JD_LOW ); -if (!snd_soc_dapm_get_pin_status (dapm,"MICBIAS" )) +if (!snd_soc_dapm_get_pin_status (dapm,"MICBIAS" ) && + !snd_soc_dapm_get_pin_status (dapm,"PLL1" ) && + !snd_soc_dapm_get_pin_status (dapm,"PLL2B" ))snd_soc_component_update_bits (component,RT5682_PWR_ANLG_1 ,RT5682_PWR_MB ,0 ); -if (!snd_soc_dapm_get_pin_status (dapm,"Vref2" )) +if (!snd_soc_dapm_get_pin_status (dapm,"Vref2" ) && + !snd_soc_dapm_get_pin_status (dapm,"PLL1" ) && + !snd_soc_dapm_get_pin_status (dapm,"PLL2B" ))snd_soc_component_update_bits (component,RT5682_PWR_ANLG_1 ,RT5682_PWR_VREF2 ,0 ); snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3,
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 9/17 mt7530 fix mt7530_fdb_write vid missing ivl bit
In reply to Sasha LevinFrom: Eric Woudstra <[email protected]>
[ Upstream commit 11d8d98cbeef1496469b268d79938b05524731e8 ]
According to reference guides mt7530 (mt7620) and mt7531:
NOTE: When IVL is reset, MAC[47:0] and FID[2:0] will be used to read/write the address table. When IVL is set, MAC[47:0] and CVID[11:0] will be used to read/write the address table.
Since the function only fills in CVID and no FID, we need to set the IVL bit. The existing code does not set it.
This is a fix for the issue I dropped here earlier:
http://lists.infradead.org/pipermail/linux-mediatek/2021-June/025697.html
With this patch, it is now possible to delete the 'self' fdb entry manually. However, wifi roaming still has the same issue, the entry does not get deleted automatically. Wifi roaming also needs a fix somewhere else to function correctly in combination with vlan.
--- drivers/net/dsa/mt7530.c | 1 + drivers/net/dsa/mt7530.h | 1 + 2 files changed, 2 insertions(+)
drivers/net/dsa/mt7530.c +1 -0
@@ -359,6 +359,7 @@ mt7530_fdb_write(struct mt7530_priv *priv, u16 vid,int i; reg[1 ] |= vid &CVID_MASK ; + reg[1 ] |=ATA2_IVL ; reg[2 ] |= (aging &AGE_TIMER_MASK ) <<AGE_TIMER ; reg[2 ] |= (port_mask &PORT_MAP_MASK ) <<PORT_MAP ;/* STATIC_ENT indicate that entry is static wouldn't
drivers/net/dsa/mt7530.h +1 -0
@@ -74,6 +74,7 @@ enum mt753x_bpdu_port_fw {#define STATIC_EMP 0#define STATIC_ENT 3#define MT7530_ATA2 0x78 +#define ATA2_IVL BIT(15)/* Register for address table write data */ #define MT7530_ATWD 0x7c
Signature · 7 lines
2.30.2 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Sasha Levin
maintainerPATCH 10/17 net: Fix zero-copy head len calculation.
In reply to Sasha LevinFrom: Pravin B Shelar <[email protected]>
[ Upstream commit a17ad0961706244dce48ec941f7e476a38c0e727 ]
In some cases skb head could be locked and entire header data is pulled from skb. When skb_zerocopy() called in such cases, following BUG is triggered. This patch fixes it by copying entire skb in such cases.
This could be optimized incase this is performance bottleneck.
---8<---
kernel BUG at net/core/skbuff.c:2961!
invalid opcode: 0000 [#1] SMP PTI
CPU: 2 PID: 0 Comm: swapper/2 Tainted: G OE 5.4.0-77-generic #86-Ubuntu Hardware name: OpenStack Foundation OpenStack Nova, BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:skb_zerocopy+0x37a/0x3a0 RSP: 0018:ffffbcc70013ca38 EFLAGS: 00010246 Call Trace: <IRQ> queue_userspace_packet+0x2af/0x5e0 [openvswitch] ovs_dp_upcall+0x3d/0x60 [openvswitch] ovs_dp_process_packet+0x125/0x150 [openvswitch] ovs_vport_receive+0x77/0xd0 [openvswitch] netdev_port_receive+0x87/0x130 [openvswitch] netdev_frame_hook+0x4b/0x60 [openvswitch] __netif_receive_skb_core+0x2b4/0xc90 __netif_receive_skb_one_core+0x3f/0xa0 __netif_receive_skb+0x18/0x60 process_backlog+0xa9/0x160 net_rx_action+0x142/0x390 __do_softirq+0xe1/0x2d6 irq_exit+0xae/0xb0 do_IRQ+0x5a/0xf0 common_interrupt+0xf/0xf
Code that triggered BUG:
intskb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
{
int i, j = 0;
int plen = 0; /* length of skb->head fragment */
int ret;
struct page *page;
unsigned int offset;
BUG_ON(!from->head_frag && !hlen);--- net/core/skbuff.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/core/skbuff.c +4 -1
@@ -2916,8 +2916,11 @@ skb_zerocopy_headlen(const struct sk_buff *from)if (!from->head_frag ||skb_headlen (from) <L1_CACHE_BYTES || -skb_shinfo (from)->nr_frags >=MAX_SKB_FRAGS ) +skb_shinfo (from)->nr_frags >=MAX_SKB_FRAGS ) { hlen =skb_headlen (from); +if (!hlen) + hlen = from->len; + }if (skb_has_frag_list (from)) hlen = from->len;
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 11/17 ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startup
In reply to Sasha LevinFrom: Peter Ujfalusi <[email protected]>
[ Upstream commit 78d2a05ef22e7b5863b01e073dd6a06b3979bb00 ]
In case of an error within j721e_audio_startup() the domain->active must be decremented to avoid unbalanced counter.
--- sound/soc/ti/j721e-evm.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
sound/soc/ti/j721e-evm.c +11 -5
@@ -278,23 +278,29 @@ static int j721e_audio_startup(struct snd_pcm_substream *substream) j721e_rule_rate, &priv->rate_range, SNDRV_PCM_HW_PARAM_RATE, -1); -mutex_unlock (&priv->mutex);if (ret) -return ret; + goto out;/* Reset TDM slots to 32 */ ret =snd_soc_dai_set_tdm_slot (cpu_dai,0x3 ,0x3 ,2 ,32 );if (ret && ret != -ENOTSUPP ) -return ret; + goto out;for_each_rtd_codec_dais (rtd, i, codec_dai) { ret =snd_soc_dai_set_tdm_slot (codec_dai,0x3 ,0x3 ,2 ,32 );if (ret && ret != -ENOTSUPP ) -return ret; + goto out; } -return 0 ; +if (ret == -ENOTSUPP ) + ret =0 ; +out: +if (ret) + domain->active--; +mutex_unlock (&priv->mutex); + +return ret; } static int j721e_audio_hw_params(struct snd_pcm_substream *substream,
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 12/17 ASoC: ti: j721e-evm: Check for not initialized parent_clk_id
In reply to Sasha LevinFrom: Peter Ujfalusi <[email protected]>
[ Upstream commit 82d28b67f780910f816fe1cfb0f676fc38c4cbb3 ]
During probe the parent_clk_id is set to -1 which should not be used to array index within hsdiv_rates[].
--- sound/soc/ti/j721e-evm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/ti/j721e-evm.c +1 -1
@@ -197,7 +197,7 @@ static int j721e_configure_refclk(struct j721e_priv *priv,return ret; } -if (priv->hsdiv_rates[domain->parent_clk_id] != scki) { +if (domain->parent_clk_id ==-1 || priv->hsdiv_rates[domain->parent_clk_id] != scki) { dev_dbg(priv->dev, "%s configuration for %u Hz: %s, %dxFS (SCKI: %u Hz)\n", audio_domain == J721E_AUDIO_DOMAIN_CPB ? "CPB" : "IVI",
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 13/17 efi/mokvar: Reserve the table only if it is in boot services data
In reply to Sasha LevinFrom: Borislav Petkov <[email protected]>
[ Upstream commit 47e1e233e9d822dfda068383fb9a616451bda703 ]
One of the SUSE QA tests triggered:
localhost kernel: efi: Failed to lookup EFI memory descriptor for 0x000000003dcf8000
which comes from x86's version of efi_arch_mem_reserve() trying to reserve a memory region. Usually, that function expects EFI_BOOT_SERVICES_DATA memory descriptors but the above case is for the MOKvar table which is allocated in the EFI shim as runtime services.
That lead to a fix changing the allocation of that table to boot services.
However, that fix broke booting SEV guests with that shim leading to this kernel fix
8d651ee9c71b ("x86/ioremap: Map EFI-reserved memory as encrypted for SEV")
which extended the ioremap hint to map reserved EFI boot services as decrypted too.
However, all that wasn't needed, IMO, because that error message in efi_arch_mem_reserve() was innocuous in this case - if the MOKvar table is not in boot services, then it doesn't need to be reserved in the first place because it is, well, in runtime services which *should* be reserved anyway.
So do that reservation for the MOKvar table only if it is allocated in boot services data. I couldn't find any requirement about where that table should be allocated in, unlike the ESRT which allocation is mandated to be done in boot services data by the UEFI spec.
--- drivers/firmware/efi/mokvar-table.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/firmware/efi/mokvar-table.c +4 -1
@@ -180,7 +180,10 @@ void __init efi_mokvar_table_init(void)pr_err ("EFI MOKvar config table is not valid\n" );return ; } -efi_mem_reserve (efi.mokvar_table, map_size_needed); + +if (md.type ==EFI_BOOT_SERVICES_DATA ) +efi_mem_reserve (efi.mokvar_table, map_size_needed); + efi_mokvar_table_size = map_size_needed; }
Signature · 1 line
2.30.2
Sasha Levin
maintainerPATCH 14/17 nvme: fix nvme_setup_command metadata trace event
In reply to Sasha LevinFrom: Keith Busch <[email protected]>
[ Upstream commit 234211b8dd161fa25f192c78d5a8d2dd6bf920a0 ]
The metadata address is set after the trace event, so the trace is not capturing anything useful. Rather than logging the memory address, it's useful to know if the command carries a metadata payload, so change the trace event to log that true/false state instead.
--- drivers/nvme/host/trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/nvme/host/trace.h +3 -3
@@ -56,7 +56,7 @@ TRACE_EVENT(nvme_setup_cmd, __field(u8, fctype) __field(u16, cid) __field(u32, nsid) - __field(u64, metadata) + __field(bool, metadata)__array (u8, cdw10,24 ) ), TP_fast_assign(
@@ -66,13 +66,13 @@ TRACE_EVENT(nvme_setup_cmd, __entry->flags = cmd->common.flags; __entry->cid = cmd->common.command_id; __entry->nsid =le32_to_cpu (cmd->common.nsid); - __entry->metadata =le64_to_cpu (cmd->common.metadata); + __entry->metadata = !!blk_integrity_rq (req); __entry->fctype = cmd->fabrics.fctype;__assign_disk_name (__entry->disk, req->rq_disk);memcpy (__entry->cdw10, &cmd->common.cdw10,sizeof (__entry->cdw10)); ), - TP_printk("nvme%d: %sqid=%d, cmdid=%u, nsid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)", + TP_printk("nvme%d: %sqid=%d, cmdid=%u, nsid=%u, flags=0x%x, meta=0x%x, cmd=(%s %s)", __entry->ctrl_id, __print_disk_name(__entry->disk), __entry->qid, __entry->cid, __entry->nsid, __entry->flags, __entry->metadata,
Signature · 7 lines
2.30.2 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Re: [PATCH AUTOSEL 5.10 14/17] nvme: fix nvme_setup_command metadata trace event
Hi!
Quoted 4 lines
The metadata address is set after the trace event, so the trace is not capturing anything useful. Rather than logging the memory address, it's useful to know if the command carries a metadata payload, so change the trace event to log that true/false state instead.
I see this makes sense for mainline, but I'm not sure if it is severe-enough bug for -stable.
Best regards,
Pavel
Signature · 1 line
http://www.livejournal.com/~pavelmachek
Sasha Levin
maintainerPATCH 15/17 drm/amd/display: Fix comparison error in dcn21 DML
In reply to Sasha LevinFrom: Victor Lu <[email protected]>
[ Upstream commit ec3102dc6b36c692104c4a0546d4119de59a3bc1 ]
[why]
A comparison error made it possible to not iterate through all the specified prefetch modes.
[how]
Correct "<" to "<="
--- drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +1 -1
@@ -4888,7 +4888,7 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l } }while ((locals->PrefetchSupported[i][j] != true || locals->VRatioInPrefetchSupported[i][j] != true) && (mode_lib->vba.NextMaxVStartup != mode_lib->vba.MaxMaxVStartup[0 ][0 ] - || mode_lib->vba.NextPrefetchMode < mode_lib->vba.MaxPrefetchMode)); + || mode_lib->vba.NextPrefetchMode <= mode_lib->vba.MaxPrefetchMode));if (locals->PrefetchSupported[i][j] == true && locals->VRatioInPrefetchSupported[i][j] == true) { mode_lib->vba.BandwidthAvailableForImmediateFlip = locals->ReturnBWPerState[i][0 ];
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Sasha Levin
maintainerPATCH 16/17 drm/amd/display: Fix max vstartup calculation for modes with borders
In reply to Sasha LevinFrom: Nicholas Kazlauskas <[email protected]>
[ Upstream commit d7940911fc0754d99b208f0e3098762d39f403a0 ]
[Why]
Vertical and horizontal borders in timings are treated as increasing the active area - vblank and hblank actually shrink.
Our input into DML does not include these borders so it incorrectly assumes it has more time than available for vstartup and tmdl calculations for some modes with borders.
An example of such a timing would be 640x480@72Hz:
h_total: 832h_border_left: 8h_addressable: 640h_border_right: 8h_front_porch: 16h_sync_width: 40v_total: 520v_border_top: 8v_addressable: 480v_border_bottom: 8v_front_porch: 1v_sync_width: 3pix_clk_100hz: 315000
[How]
Include borders as part of destination vactive/hactive.
This change DCN20+ so it has wide impact, but the destination vactive and hactive are only really used for vstartup calculation anyway.
Most modes do not have vertical or horizontal borders.
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +4 -2
@@ -2077,8 +2077,10 @@ int dcn20_populate_dml_pipes_from_context( - timing->v_border_bottom; pipes[pipe_cnt].pipe.dest.htotal = timing->h_total; pipes[pipe_cnt].pipe.dest.vtotal = v_total; - pipes[pipe_cnt].pipe.dest.hactive = timing->h_addressable; - pipes[pipe_cnt].pipe.dest.vactive = timing->v_addressable; + pipes[pipe_cnt].pipe.dest.hactive = + timing->h_addressable + timing->h_border_left + timing->h_border_right; + pipes[pipe_cnt].pipe.dest.vactive = + timing->v_addressable + timing->v_border_top + timing->v_border_bottom; pipes[pipe_cnt].pipe.dest.interlaced = timing->flags.INTERLACE; pipes[pipe_cnt].pipe.dest.pixel_rate_mhz = timing->pix_clk_100hz/10000.0 ;if (timing->timing_3d_format ==TIMING_3D_FORMAT_HW_FRAME_PACKING )
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Sasha Levin
maintainerPATCH 17/17 ACPI: fix NULL pointer dereference
In reply to Sasha LevinFrom: Linus Torvalds <[email protected]>
[ Upstream commit fc68f42aa737dc15e7665a4101d4168aadb8e4c4 ]
Commit 71f642833284 ("ACPI: utils: Fix reference counting in for_each_acpi_dev_match()") started doing "acpi_dev_put()" on a pointer that was possibly NULL. That fails miserably, because that helper inline function is not set up to handle that case.
Just make acpi_dev_put() silently accept a NULL pointer, rather than calling down to put_device() with an invalid offset off that NULL pointer.
--- include/acpi/acpi_bus.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/acpi/acpi_bus.h +2 -1
@@ -689,7 +689,8 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv);static inline void acpi_dev_put (struct acpi_device *adev) { -put_device (&adev->dev); +if (adev) +put_device (&adev->dev); }#else /* CONFIG_ACPI */
Signature · 1 line
2.30.2