ASoC: allow module autoloading for table db1200_pids
Subsystems (5)
Sasha Levin
maintainerPATCH 1/8 ASoC: allow module autoloading for table db1200_pids
From: Hongbo Li <[email protected]>
[ Upstream commit 0e9fdab1e8df490354562187cdbb8dec643eae2c ]
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from platform_device_id table.
--- sound/soc/au1x/db1200.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/au1x/db1200.c +1 -0
@@ -44,6 +44,7 @@ static const struct platform_device_id db1200_pids[] = { }, {}, }; +MODULE_DEVICE_TABLE (platform, db1200_pids);/*------------------------- AC97 PART ---------------------------*/
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 2/8 ALSA: hda/realtek - Fixed ALC256 headphone no sound
From: Kailang Yang <[email protected]>
[ Upstream commit 9b82ff1362f50914c8292902e07be98a9f59d33d ]
Dell platform, plug headphone or headset, it had a chance to get no sound from headphone.
Replace depop procedure will solve this issue.
--- sound/pci/hda/patch_realtek.c | 50 ++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 13 deletions(-)
sound/pci/hda/patch_realtek.c +37 -13
@@ -4847,6 +4847,30 @@ static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, } } +static void alc_hp_mute_disable (struct hda_codec *codec,unsigned int delay) +{ +if (delay <=0 ) + delay =75 ; +snd_hda_codec_write (codec,0x21 ,0 , +AC_VERB_SET_AMP_GAIN_MUTE ,AMP_OUT_MUTE ); +msleep (delay); +snd_hda_codec_write (codec,0x21 ,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL ,0x0 ); +msleep (delay); +} + +static void alc_hp_enable_unmute (struct hda_codec *codec,unsigned int delay) +{ +if (delay <=0 ) + delay =75 ; +snd_hda_codec_write (codec,0x21 ,0 , +AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_OUT ); +msleep (delay); +snd_hda_codec_write (codec,0x21 ,0 , +AC_VERB_SET_AMP_GAIN_MUTE ,AMP_OUT_UNMUTE ); +msleep (delay); +} +static const struct coef_fw alc225_pre_hsmode[] = {UPDATE_COEF (0x4a ,1 <<8 ,0 ),UPDATE_COEFEX (0x57 ,0x05 ,1 <<14 ,0 ),
@@ -4948,6 +4972,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)case 0x10ec0236 :case 0x10ec0256 :case 0x19e58326 : +alc_hp_mute_disable (codec,75 );alc_process_coef_fw (codec, coef0256);break ;case 0x10ec0234 :
@@ -5219,6 +5244,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)alc_write_coef_idx (codec,0x45 ,0xc089 );msleep (50 );alc_process_coef_fw (codec, coef0256); +alc_hp_enable_unmute (codec,75 );break ;case 0x10ec0234 :case 0x10ec0274 :
@@ -5316,6 +5342,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)case 0x10ec0256 :case 0x19e58326 :alc_process_coef_fw (codec, coef0256); +alc_hp_enable_unmute (codec,75 );break ;case 0x10ec0234 :case 0x10ec0274 :
@@ -5431,6 +5458,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)case 0x10ec0256 :case 0x19e58326 :alc_process_coef_fw (codec, coef0256); +alc_hp_enable_unmute (codec,75 );break ;case 0x10ec0234 :case 0x10ec0274 :
@@ -5536,25 +5564,21 @@ static void alc_determine_headset_type(struct hda_codec *codec)alc_write_coef_idx (codec,0x06 ,0x6104 );alc_write_coefex_idx (codec,0x57 ,0x3 ,0x09a3 ); -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_AMP_GAIN_MUTE ,AMP_OUT_MUTE ); -msleep (80 ); -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL ,0x0 ); -alc_process_coef_fw (codec, coef0255);msleep (300 ); val =alc_read_coef_idx (codec,0x46 ); is_ctia = (val &0x0070 ) ==0x0070 ; - +if (!is_ctia) { +alc_write_coef_idx (codec,0x45 ,0xe089 ); +msleep (100 ); + val =alc_read_coef_idx (codec,0x46 ); +if ((val &0x0070 ) ==0x0070 ) + is_ctia = false; +else + is_ctia = true; + }alc_write_coefex_idx (codec,0x57 ,0x3 ,0x0da3 );alc_update_coefex_idx (codec,0x57 ,0x5 ,1 <<14 ,0 ); - -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_OUT ); -msleep (80 ); -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_AMP_GAIN_MUTE ,AMP_OUT_UNMUTE );break ;case 0x10ec0234 :case 0x10ec0274 :
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 3/8 ALSA: hda/realtek - FIxed ALC285 headphone no sound
In reply to Sasha LevinFrom: Kailang Yang <[email protected]>
[ Upstream commit 1fa7b099d60ad64f559bd3b8e3f0d94b2e015514 ]
Dell platform with ALC215 ALC285 ALC289 ALC225 ALC295 ALC299, plug headphone or headset.
It had a chance to get no sound from headphone.
Replace depop procedure will solve this issue.
--- sound/pci/hda/patch_realtek.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
sound/pci/hda/patch_realtek.c +14 -12
@@ -5007,6 +5007,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)case 0x10ec0295 :case 0x10ec0289 :case 0x10ec0299 : +alc_hp_mute_disable (codec,75 );alc_process_coef_fw (codec, alc225_pre_hsmode);alc_process_coef_fw (codec, coef0225);break ;
@@ -5232,6 +5233,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)case 0x10ec0299 :alc_process_coef_fw (codec, alc225_pre_hsmode);alc_process_coef_fw (codec, coef0225); +alc_hp_enable_unmute (codec,75 );break ;case 0x10ec0255 :alc_process_coef_fw (codec, coef0255);
@@ -5391,6 +5393,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)alc_process_coef_fw (codec, coef0225_2); elsealc_process_coef_fw (codec ,coef0225_1 ); +alc_hp_enable_unmute (codec,75 );break ;case 0x10ec0867 :alc_update_coefex_idx (codec,0x57 ,0x5 ,1 <<14 ,0 );
@@ -5496,6 +5499,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)case 0x10ec0289 :case 0x10ec0299 :alc_process_coef_fw (codec, coef0225); +alc_hp_enable_unmute (codec,75 );break ; }codec_dbg (codec,"Headset jack set to Nokia-style headset mode.\n" );
@@ -5655,12 +5659,6 @@ static void alc_determine_headset_type(struct hda_codec *codec)case 0x10ec0295 :case 0x10ec0289 :case 0x10ec0299 : -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_AMP_GAIN_MUTE ,AMP_OUT_MUTE ); -msleep (80 ); -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL ,0x0 ); -alc_process_coef_fw (codec, alc225_pre_hsmode);alc_update_coef_idx (codec,0x67 ,0xf000 ,0x1000 ); val =alc_read_coef_idx (codec,0x45 );
@@ -5677,15 +5675,19 @@ static void alc_determine_headset_type(struct hda_codec *codec) val =alc_read_coef_idx (codec,0x46 ); is_ctia = (val &0x00f0 ) ==0x00f0 ; } +if (!is_ctia) { +alc_update_coef_idx (codec,0x45 ,0x3f <<10 ,0x38 <<10 ); +alc_update_coef_idx (codec,0x49 ,3 <<8 ,1 <<8 ); +msleep (100 ); + val =alc_read_coef_idx (codec,0x46 ); +if ((val &0x00f0 ) ==0x00f0 ) + is_ctia = false; +else + is_ctia = true; + }alc_update_coef_idx (codec,0x4a ,7 <<6 ,7 <<6 );alc_update_coef_idx (codec,0x4a ,3 <<4 ,3 <<4 );alc_update_coef_idx (codec,0x67 ,0xf000 ,0x3000 ); - -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL ,PIN_OUT ); -msleep (80 ); -snd_hda_codec_write (codec,0x21 ,0 , -AC_VERB_SET_AMP_GAIN_MUTE ,AMP_OUT_UNMUTE );break ;case 0x10ec0867 : is_ctia = true;
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 4/8 pinctrl: at91: make it work with current gpiolib
In reply to Sasha LevinFrom: Thomas Blocher <[email protected]>
[ Upstream commit 752f387faaae0ae2e84d3f496922524785e77d60 ]
pinctrl-at91 currently does not support the gpio-groups devicetree property and has no pin-range.
Because of this at91 gpios stopped working since patch
commit 2ab73c6d8323fa1e ("gpio: Support GPIO controllers without pin-ranges") This was discussed in the patches
commit fc328a7d1fcce263 ("gpio: Revert regression in sysfs-gpio (gpiolib.c)") commit 56e337f2cf132632 ("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"")
As a workaround manually set pin-range via gpiochip_add_pin_range() until
a) pinctrl-at91 is reworked to support devicetree gpio-groups
b) another solution as mentioned in
commit 56e337f2cf132632 ("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"") is found
--- drivers/pinctrl/pinctrl-at91.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pinctrl/pinctrl-at91.c +4 -1
@@ -1401,8 +1401,11 @@ static int at91_pinctrl_probe(struct platform_device *pdev)/* We will handle a range of GPIO pins */ for (i =0 ; i < gpio_banks; i++) -if (gpio_chips[i]) +if (gpio_chips[i]) {pinctrl_add_gpio_range (info->pctl, &gpio_chips[i]->range); +gpiochip_add_pin_range (&gpio_chips[i]->chip,dev_name (info->pctl->dev),0 , + gpio_chips[i]->range.pin_base, gpio_chips[i]->range.npins); + }dev_info (&pdev->dev,"initialized AT91 pinctrl driver\n" );
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 5/8 microblaze: don't treat zero reserved memory regions as error
In reply to Sasha LevinFrom: Mike Rapoport <[email protected]>
[ Upstream commit 0075df288dd8a7abfe03b3766176c393063591dd ]
Before commit 721f4a6526da ("mm/memblock: remove empty dummy entry") the check for non-zero of memblock.reserved.cnt in mmu_init() would always be true either because memblock.reserved.cnt is initialized to 1 or because there were memory reservations earlier.
The removal of dummy empty entry in memblock caused this check to fail because now memblock.reserved.cnt is initialized to 0.
Remove the check for non-zero of memblock.reserved.cnt because it's perfectly fine to have an empty memblock.reserved array that early in boot.
--- arch/microblaze/mm/init.c | 5 ----- 1 file changed, 5 deletions(-)
arch/microblaze/mm/init.c +0 -5
@@ -245,11 +245,6 @@ asmlinkage void __init mmu_init(void) {unsigned int kstart, ksize; -if (!memblock.reserved.cnt) { -pr_emerg ("Error memory count\n" ); -machine_restart (NULL ); - } -if ((u32 ) memblock.memory.regions[0 ].size <0x400000 ) {pr_emerg ("Memory must be greater than 4MB\n" );machine_restart (NULL );
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 6/8 net: ftgmac100: Ensure tx descriptor updates are visible
In reply to Sasha LevinFrom: Jacky Chou <[email protected]>
[ Upstream commit 4186c8d9e6af57bab0687b299df10ebd47534a0a ]
The driver must ensure TX descriptor updates are visible before updating TX pointer and TX clear pointer.
This resolves TX hangs observed on AST2600 when running iperf3.
--- drivers/net/ethernet/faraday/ftgmac100.c | 26 ++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-)
drivers/net/ethernet/faraday/ftgmac100.c +18 -8
@@ -569,7 +569,7 @@ static bool ftgmac100_rx_packet(struct ftgmac100 *priv, int *processed) (*processed)++;return true; - drop: +drop:/* Clean rxdes0 (which resets own bit) */ rxdes->rxdes0 =cpu_to_le32 (status & priv->rxdes0_edorr_mask); priv->rx_pointer =ftgmac100_next_rx_pointer (priv, pointer);
@@ -653,6 +653,11 @@ static bool ftgmac100_tx_complete_packet(struct ftgmac100 *priv)ftgmac100_free_tx_packet (priv, pointer, skb, txdes, ctl_stat); txdes->txdes0 =cpu_to_le32 (ctl_stat & priv->txdes0_edotr_mask); +/* Ensure the descriptor config is visible before setting the tx +* pointer. +*/ +smp_wmb (); + priv->tx_clean_pointer =ftgmac100_next_tx_pointer (priv, pointer);return true;
@@ -806,6 +811,11 @@ static netdev_tx_t ftgmac100_hard_start_xmit(struct sk_buff *skb,dma_wmb (); first->txdes0 =cpu_to_le32 (f_ctl_stat); +/* Ensure the descriptor config is visible before setting the tx +* pointer. +*/ +smp_wmb (); +/* Update next TX pointer */ priv->tx_pointer = pointer;
@@ -826,7 +836,7 @@ static netdev_tx_t ftgmac100_hard_start_xmit(struct sk_buff *skb,return NETDEV_TX_OK ; - dma_err: +dma_err:if (net_ratelimit ())netdev_err (netdev,"map tx fragment failed\n" );
@@ -848,7 +858,7 @@ static netdev_tx_t ftgmac100_hard_start_xmit(struct sk_buff *skb,* last fragment, so we know ftgmac100_free_tx_packet() * hasn't freed the skb yet. */ - drop: +drop:/* Drop the packet */ dev_kfree_skb_any (skb); netdev->stats.tx_dropped++;
@@ -1419,7 +1429,7 @@ static void ftgmac100_reset_task(struct work_struct *work)ftgmac100_init_all (priv, true);netdev_dbg (netdev,"Reset done !\n" ); - bail: +bail:if (priv->mii_bus)mutex_unlock (&priv->mii_bus->mdio_lock);if (netdev->phydev)
@@ -1490,15 +1500,15 @@ static int ftgmac100_open(struct net_device *netdev)return 0 ; - err_ncsi: +err_ncsi:napi_disable (&priv->napi);netif_stop_queue (netdev); - err_alloc: +err_alloc:ftgmac100_free_buffers (priv);free_irq (netdev->irq, netdev); - err_irq: +err_irq:netif_napi_del (&priv->napi); - err_hw: +err_hw:iowrite32 (0 , priv->base +FTGMAC100_OFFSET_IER );ftgmac100_free_rings (priv);return err;
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 7/8 wifi: iwlwifi: lower message level for FW buffer destination
In reply to Sasha LevinFrom: Benjamin Berg <[email protected]>
[ Upstream commit f8a129c1e10256c785164ed5efa5d17d45fbd81b ]
An invalid buffer destination is not a problem for the driver and it does not make sense to report it with the KERN_ERR message level. As such, change the message to use IWL_DEBUG_FW.
--- drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +2 -1
@@ -111,7 +111,8 @@ iwl_pcie_ctxt_info_dbg_enable(struct iwl_trans *trans, }break ;default : -IWL_ERR (trans,"WRT: Invalid buffer destination\n" ); +IWL_DEBUG_FW (trans,"WRT: Invalid buffer destination (%d)\n" , +le32_to_cpu (fw_mon_cfg->buf_location)); } out:if (dbg_flags)
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 8/8 wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead
In reply to Sasha LevinFrom: Emmanuel Grumbach <[email protected]>
[ Upstream commit 3a84454f5204718ca5b4ad2c1f0bf2031e2403d1 ]
There is a WARNING in iwl_trans_wait_tx_queues_empty() (that was recently converted from just a message), that can be hit if we wait for TX queues to become empty after firmware died. Clearly, we can't expect anything from the firmware after it's declared dead.
Don't call iwl_trans_wait_tx_queues_empty() in this case. While it could be a good idea to stop the flow earlier, the flush functions do some maintenance work that is not related to the firmware, so keep that part of the code running even when the firmware is not running.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +8 -1
@@ -4747,6 +4747,10 @@ static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop)int i;if (!iwl_mvm_has_new_tx_api (mvm)) { +/* we can't ask the firmware anything if it is dead */ +if (test_bit (IWL_MVM_STATUS_HW_RESTART_REQUESTED , + &mvm->status)) +return ;if (drop) {mutex_lock (&mvm->mutex); iwl_mvm_flush_tx_path(mvm,
@@ -4828,8 +4832,11 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,/* this can take a while, and we may need/want other operations * to succeed while doing this, so do it without the mutex held +* If the firmware is dead, this can't work... */ -if (!drop && !iwl_mvm_has_new_tx_api (mvm)) +if (!drop && !iwl_mvm_has_new_tx_api (mvm) && + !test_bit (IWL_MVM_STATUS_HW_RESTART_REQUESTED , + &mvm->status))iwl_trans_wait_tx_queues_empty (mvm->trans, msk); }
Signature · 1 line
2.43.0