iio: adc: max9611: explicitly cast gain_selectors
Subsystems (23)
Sasha Levin
maintainerPATCH 1/103 iio: adc: max9611: explicitly cast gain_selectors
From: Stefan Agner <[email protected]>
[ Upstream commit b1ec0802503820ccbc894aadfd2a44da20232f5e ]
After finding a reasonable gain, the function converts the configured gain to a gain configuration option selector enum max9611_csa_gain. Make the conversion clearly visible by using an explicit cast. This also avoids a warning seen with clang:
drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from
enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion]
*csa_gain = gain_selectors[i];
~ ^~~~~~~~~~~~~~~~~
--- drivers/iio/adc/max9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/max9611.c +1 -1
@@ -289,7 +289,7 @@ static int max9611_read_csa_voltage(struct max9611_dev *max9611,return ret;if (*adc_raw >0 ) { - *csa_gain = gain_selectors[i]; + *csa_gain = (enum max9611_csa_gain )gain_selectors[i];return 0 ; } }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 2/103 tee: optee: take DT status property into account
From: Ard Biesheuvel <[email protected]>
[ Upstream commit db878f76b9ff7487da9bb0f686153f81829f1230 ]
DT nodes may have a 'status' property which, if set to anything other than 'ok' or 'okay', indicates to the OS that the DT node should be treated as if it was not present. So add that missing logic to the OP-TEE driver.
--- drivers/tee/optee/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tee/optee/core.c +1 -1
@@ -590,7 +590,7 @@ static int __init optee_driver_init(void)return -ENODEV ; np =of_find_matching_node (fw_np, optee_match); -if (!np) +if (!np || !of_device_is_available (np))return -ENODEV ; optee =optee_probe (np);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 3/103 ath10k: fix kernel panic by moving pci flush after napi_disable
In reply to Sasha LevinFrom: Tamizh chelvam <[email protected]>
[ Upstream commit bd1d395070cca4f42a93e520b0597274789274a4 ]
When continuously running wifi up/down sequence, the napi poll can be scheduled after the CE buffers being freed by ath10k_pci_flush
Steps:
In a certain condition, during wifi down below scenario might occur.
ath10k_stop->ath10k_hif_stop->napi_schedule->ath10k_pci_flush->napi_poll(napi_synchronize).
In the above scenario, CE buffer entries will be freed up and become NULL in ath10k_pci_flush. And the napi_poll has been invoked after the flush process and it will try to get the skb from the CE buffer entry and perform some action on that. Since the CE buffer already cleaned by pci flush this action will create NULL pointer dereference and trigger below kernel panic.
Unable to handle kernel NULL pointer dereference at virtual address 0000005c PC is at ath10k_pci_htt_rx_cb+0x64/0x3ec [ath10k_pci]
ath10k_pci_htt_rx_cb [ath10k_pci] ath10k_ce_per_engine_service+0x74/0xc4 [ath10k_pci] ath10k_ce_per_engine_service [ath10k_pci] ath10k_ce_per_engine_service_any+0x74/0x80 [ath10k_pci] ath10k_ce_per_engine_service_any [ath10k_pci] ath10k_pci_napi_poll+0x48/0xec [ath10k_pci] ath10k_pci_napi_poll [ath10k_pci] net_rx_action+0xac/0x160net_rx_action__do_softirq+0xdc/0x208__do_softirqirq_exit+0x84/0xe0irq_exit__handle_domain_irq+0x80/0xa0 __handle_domain_irqgic_handle_irq+0x38/0x5cgic_handle_irq__irq_usr+0x44/0x60
Tested on QCA4019 and firmware version 10.4.3.2.1.1-00010
--- drivers/net/wireless/ath/ath10k/ahb.c | 4 ++-- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/ahb.c +2 -2
@@ -663,10 +663,10 @@ static void ath10k_ahb_hif_stop(struct ath10k *ar)ath10k_ahb_irq_disable (ar);synchronize_irq (ar_ahb->irq); -ath10k_pci_flush (ar); -napi_synchronize (&ar->napi);napi_disable (&ar->napi); + +ath10k_pci_flush (ar); }static int ath10k_ahb_hif_power_up (struct ath10k *ar)
drivers/net/wireless/ath/ath10k/pci.c +1 -1
@@ -1787,9 +1787,9 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)ath10k_pci_irq_disable (ar);ath10k_pci_irq_sync (ar); -ath10k_pci_flush (ar);napi_synchronize (&ar->napi);napi_disable (&ar->napi); +ath10k_pci_flush (ar);spin_lock_irqsave (&ar_pci->ps_lock, flags);WARN_ON (ar_pci->ps_wake_refcount >0 );
Signature · 7 lines
2.20.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Sasha Levin
maintainerPATCH 4/103 iio: dac: mcp4922: fix error handling in mcp4922_write_raw
In reply to Sasha LevinFrom: Marcus Folkesson <[email protected]>
[ Upstream commit 0833627fc3f757a0dca11e2a9c46c96335a900ee ]
Do not try to write negative values and make sure that the write goes well.
--- drivers/iio/dac/mcp4922.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/iio/dac/mcp4922.c +8 -3
@@ -94,17 +94,22 @@ static int mcp4922_write_raw(struct iio_dev *indio_dev, long mask) {struct mcp4922_state *state =iio_priv (indio_dev); +int ret;if (val2 !=0 )return -EINVAL ;switch (mask) {case IIO_CHAN_INFO_RAW : -if (val >GENMASK (chan->scan_type.realbits-1 ,0 )) +if (val <0 || val >GENMASK (chan->scan_type.realbits -1 ,0 ))return -EINVAL ; val <<= chan->scan_type.shift; - state->value[chan->channel] = val; -return mcp4922_spi_write (state, chan->channel, val); + + ret =mcp4922_spi_write (state, chan->channel, val); +if (!ret) + state->value[chan->channel] = val; +return ret; +default :return -EINVAL ; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 5/103 arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage
In reply to Sasha LevinFrom: Andre Przywara <[email protected]>
[ Upstream commit 93366b49a35f3a190052734b3f32c8fe2535b53f ]
The Olinuxino board uses DDR3L chips which are supposed to be driven with 1.35V. The reset default of the AXP is properly set to 1.36V.
While technically the chips can also run at 1.5 volts, changing the voltage on the fly while booting Linux is asking for trouble. Also running at a lower voltage saves power.
So fix the DCDC5 value to match the actual board design.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +6 -2
@@ -120,10 +120,14 @@ /* DCDC3 is polyphased with DCDC2 */ +/* + * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal + * 1.35V that the PMIC can drive. + */ ®_dcdc5 { regulator-always-on; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; + regulator-min-microvolt = <1360000>; + regulator-max-microvolt = <1360000>; regulator-name = "vcc-ddr3"; };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 6/103 arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage
In reply to Sasha LevinFrom: Andre Przywara <[email protected]>
[ Upstream commit 480f58cdbe392d4387a2193b6131a277e0111dd0 ]
According to the NanoPi-A64 schematics, DCDC1 is connected to a voltage rail named "VDD_SYS_3.3V". All users seem to expect 3.3V here: the Ethernet PHY, the uSD card slot, the camera interface and the GPIO pins on the headers.
Fix up the voltage on the regulator to lift it up to 3.3V.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts +3 -3
@@ -126,9 +126,9 @@ ®_dcdc1 { regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-3v"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; }; ®_dcdc2 {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 7/103 ALSA: pcm: signedness bug in snd_pcm_plug_alloc()
In reply to Sasha LevinFrom: Dan Carpenter <[email protected]>
[ Upstream commit 6f128fa41f310e1f39ebcea9621d2905549ecf52 ]
The "frames" variable is unsigned so the error handling doesn't work properly.
--- sound/core/oss/pcm_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/oss/pcm_plugin.c +2 -2
@@ -111,7 +111,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->next) {if (plugin->dst_frames) frames = plugin->dst_frames (plugin, frames); -if (snd_BUG_ON (frames <=0 )) +if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 ))return -ENXIO ; plugin = plugin->next; err =snd_pcm_plugin_alloc (plugin, frames);
@@ -123,7 +123,7 @@ int snd_pcm_plug_alloc(struct snd_pcm_substream *plug, snd_pcm_uframes_t frames)while (plugin->prev) {if (plugin->src_frames) frames = plugin->src_frames (plugin, frames); -if (snd_BUG_ON (frames <=0 )) +if (snd_BUG_ON ((snd_pcm_sframes_t )frames <=0 ))return -ENXIO ; plugin = plugin->prev; err =snd_pcm_plugin_alloc (plugin, frames);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 8/103 arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply
In reply to Sasha LevinFrom: Aapo Vienamo <[email protected]>
[ Upstream commit 6ff7705da8806de45ca1490194f0b4eb07725804 ]
On p2180 sdmmc4 is powered from a fixed 1.8 V regulator.
--- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi +1 -0
@@ -282,6 +282,7 @@ status = "okay"; bus-width = <8>; non-removable; + vqmmc-supply = <&vdd_1v8>; }; clocks {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 9/103 ARM: dts: at91/trivial: Fix USART1 definition for at91sam9g45
In reply to Sasha LevinFrom: Jay Foster <[email protected]>
[ Upstream commit 10af10db8c76fa5b9bf1f52a895c1cb2c0ac24da ]
Fix a typo. No functional change made by this patch.
--- arch/arm/boot/dts/at91sam9g45.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91sam9g45.dtsi +1 -1
@@ -566,7 +566,7 @@ }; }; - uart1 { + usart1 { pinctrl_usart1: usart1-0 { atmel,pins = <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_PULL_UP /* PB4 periph A with pullup */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 10/103 rtc: rv8803: fix the rv8803 id in the OF table
In reply to Sasha LevinFrom: Alexandre Belloni <[email protected]>
[ Upstream commit c856618d20662695fcdb47bf4d560dc457662aec ]
The ID for RV8803 must be rv_8803
--- drivers/rtc/rtc-rv8803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rv8803.c +1 -1
@@ -622,7 +622,7 @@ MODULE_DEVICE_TABLE(i2c, rv8803_id);static const struct of_device_id rv8803_of_match[] = { { .compatible ="microcrystal,rv8803" , - .data = (void *)rx_8900 + .data = (void *)rv_8803 }, { .compatible ="epson,rx8900" ,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 11/103 remoteproc/davinci: Use %zx for formating size_t
In reply to Sasha LevinFrom: Bjorn Andersson <[email protected]>
[ Upstream commit 1e28dbbeced6152b9ea7c417ff8cef3f7dcf0f19 ]
da8xx_rproc_mem size is of type size_t, so use %zx to format the debug print of it to avoid a compile warning.
--- drivers/remoteproc/da8xx_remoteproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/da8xx_remoteproc.c +1 -1
@@ -207,7 +207,7 @@ static int da8xx_rproc_get_internal_memories(struct platform_device *pdev, res->start &DA8XX_RPROC_LOCAL_ADDRESS_MASK ; drproc->mem[i].size =resource_size (res); -dev_dbg (dev,"memory %8s: bus addr %pa size 0x%x va %p da 0x%x\n" , +dev_dbg (dev,"memory %8s: bus addr %pa size 0x%zx va %p da 0x%x\n" , mem_names[i], &drproc->mem[i].bus_addr, drproc->mem[i].size, drproc->mem[i].cpu_addr, drproc->mem[i].dev_addr);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 12/103 extcon: cht-wc: Return from default case to avoid warnings
In reply to Sasha LevinFrom: Andy Shevchenko <[email protected]>
[ Upstream commit 962341b54b99965ebec5f70c8d39f1c382eea833 ]
When we have first case to fall through it's not enough to put single comment there to satisfy compiler. Instead of doing that, return fall back value directly from default case.
This to avoid following warnings:
drivers/extcon/extcon-intel-cht-wc.c: In function ‘cht_wc_extcon_get_charger’:include/linux/device.h:1420:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~drivers/extcon/extcon-intel-cht-wc.c:148:3: note: in expansion of macro ‘dev_warn’
dev_warn(ext->dev,
^~~~~~~~drivers/extcon/extcon-intel-cht-wc.c:152:2: note: here
case CHT_WC_USBSRC_TYPE_SDP:
^~~~
--- drivers/extcon/extcon-intel-cht-wc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-intel-cht-wc.c +1 -1
@@ -155,7 +155,7 @@ static int cht_wc_extcon_get_charger(struct cht_wc_extcon_data *ext,dev_warn (ext->dev,"Unhandled charger type %d, defaulting to SDP\n" , ret); -/* Fall through, treat as SDP */ +return EXTCON_CHG_USB_SDP ;case CHT_WC_USBSRC_TYPE_SDP :case CHT_WC_USBSRC_TYPE_FLOAT_DP_DN :case CHT_WC_USBSRC_TYPE_OTHER :
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 13/103 cfg80211: Avoid regulatory restore when COUNTRY_IE_IGNORE is set
In reply to Sasha LevinFrom: Rajeev Kumar Sirasanagandla <[email protected]>
[ Upstream commit 7417844b63d4b0dc8ab23f88259bf95de7d09b57 ]
When REGULATORY_COUNTRY_IE_IGNORE is set, __reg_process_hint_country_ie() ignores the country code change request from __cfg80211_connect_result() via regulatory_hint_country_ie().
After Disconnect, similar to above, country code should not be reset to world when country IE ignore is set. But this is violated and restore of regulatory settings is invoked by cfg80211_disconnect_work via regulatory_hint_disconnect().
To address this, avoid regulatory restore from regulatory_hint_disconnect() when COUNTRY_IE_IGNORE is set.
Note: Currently, restore_regulatory_settings() takes care of clearing beacon hints. But in the proposed change, regulatory restore is avoided. Therefore, explicitly clear beacon hints when DISABLE_BEACON_HINTS is not set.
--- net/wireless/reg.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
net/wireless/reg.c +46 -0
@@ -2703,8 +2703,54 @@ static void restore_regulatory_settings(bool reset_user)schedule_work (®_work); } +static bool is_wiphy_all_set_reg_flag (enum ieee80211_regulatory_flags flag) +{ +struct cfg80211_registered_device *rdev; +struct wireless_dev *wdev; + +list_for_each_entry (rdev, &cfg80211_rdev_list, list) { +list_for_each_entry (wdev, &rdev->wiphy.wdev_list, list) { +wdev_lock (wdev); +if (!(wdev->wiphy->regulatory_flags & flag)) { +wdev_unlock (wdev); +return false; + } +wdev_unlock (wdev); + } + } + +return true; +} +void regulatory_hint_disconnect (void ) { +/* Restore of regulatory settings is not required when wiphy(s) +* ignore IE from connected access point but clearance of beacon hints +* is required when wiphy(s) supports beacon hints. +*/ +if (is_wiphy_all_set_reg_flag (REGULATORY_COUNTRY_IE_IGNORE )) { +struct reg_beacon *reg_beacon, *btmp; + +if (is_wiphy_all_set_reg_flag (REGULATORY_DISABLE_BEACON_HINTS )) +return ; + +spin_lock_bh (®_pending_beacons_lock); +list_for_each_entry_safe (reg_beacon, btmp, + ®_pending_beacons, list) { +list_del (®_beacon->list); +kfree (reg_beacon); + } +spin_unlock_bh (®_pending_beacons_lock); + +list_for_each_entry_safe (reg_beacon, btmp, + ®_beacon_list, list) { +list_del (®_beacon->list); +kfree (reg_beacon); + } + +return ; + } +pr_debug ("All devices are disconnected, going to restore regulatory settings\n" );restore_regulatory_settings (false); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 14/103 ALSA: seq: Do error checks at creating system ports
In reply to Sasha LevinFrom: Takashi Iwai <[email protected]>
[ Upstream commit b8e131542b47b81236ecf6768c923128e1f5db6e ]
snd_seq_system_client_init() doesn't check the errors returned from its port creations. Let's do it properly and handle the error paths.
--- sound/core/seq/seq_system.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
sound/core/seq/seq_system.c +15 -3
@@ -123,6 +123,7 @@ int __init snd_seq_system_client_init(void) {struct snd_seq_port_callback pcallbacks;struct snd_seq_port_info *port; +int err; port =kzalloc (sizeof (*port),GFP_KERNEL );if (!port)
@@ -144,7 +145,10 @@ int __init snd_seq_system_client_init(void) port->flags =SNDRV_SEQ_PORT_FLG_GIVEN_PORT ; port->addr.client = sysclient; port->addr.port =SNDRV_SEQ_PORT_SYSTEM_TIMER ; -snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , port); + err =snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , + port); +if (err <0 ) + goto error_port;/* register announcement port */ strcpy (port->name,"Announce" );
@@ -154,16 +158,24 @@ int __init snd_seq_system_client_init(void) port->flags =SNDRV_SEQ_PORT_FLG_GIVEN_PORT ; port->addr.client = sysclient; port->addr.port =SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE ; -snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , port); + err =snd_seq_kernel_client_ctl (sysclient,SNDRV_SEQ_IOCTL_CREATE_PORT , + port); +if (err <0 ) + goto error_port; announce_port = port->addr.port;kfree (port);return 0 ; + + error_port: +snd_seq_system_client_done (); +kfree (port); +return err; }/* unregister our internal client */ -void __exit snd_seq_system_client_done(void) +void snd_seq_system_client_done (void ) {int oldsysclient = sysclient;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 15/103 ath9k: fix tx99 with monitor mode interface
In reply to Sasha LevinFrom: Felix Fietkau <[email protected]>
[ Upstream commit d9c52fd17cb483bd8a470398afcb79f86c1b77c8 ]
Tx99 is typically configured via a monitor mode interface, which does not get added to the driver as a vif. Since the code currently expects a configured virtual interface for tx99, enabling tx99 via debugfs fails. Since the vif is not needed anyway, remove all checks for it.
--- drivers/net/wireless/ath/ath9k/ath9k.h | 1 - drivers/net/wireless/ath/ath9k/main.c | 12 +++--------- drivers/net/wireless/ath/ath9k/tx99.c | 9 --------- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- 4 files changed, 4 insertions(+), 20 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +0 -1
@@ -1074,7 +1074,6 @@ struct ath_softc {struct ath_spec_scan_priv spec_priv; -struct ieee80211_vif *tx99_vif;struct sk_buff *tx99_skb;bool tx99_state;s16 tx99_power;
drivers/net/wireless/ath/ath9k/main.c +3 -9
@@ -1250,15 +1250,10 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,struct ath_vif *avp = (void *)vif->drv_priv;struct ath_node *an = &avp->mcast_node; -mutex_lock (&sc->mutex); +if (IS_ENABLED (CONFIG_ATH9K_TX99 )) +return -EOPNOTSUPP ; -if (IS_ENABLED (CONFIG_ATH9K_TX99 )) { -if (sc->cur_chan->nvifs >=1 ) { -mutex_unlock (&sc->mutex); -return -EOPNOTSUPP ; - } - sc->tx99_vif = vif; - } +mutex_lock (&sc->mutex);ath_dbg (common,CONFIG ,"Attach a VIF of type: %d\n" , vif->type); sc->cur_chan->nvifs++;
@@ -1341,7 +1336,6 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,ath9k_p2p_remove_vif (sc, vif); sc->cur_chan->nvifs--; - sc->tx99_vif =NULL ;if (!ath9k_is_chanctx_enabled ())list_del (&avp->list);
drivers/net/wireless/ath/ath9k/tx99.c +0 -9
@@ -54,12 +54,6 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)struct ieee80211_hdr *hdr;struct ieee80211_tx_info *tx_info;struct sk_buff *skb; -struct ath_vif *avp; - -if (!sc->tx99_vif) -return NULL ; - - avp = (struct ath_vif *)sc->tx99_vif->drv_priv; skb =alloc_skb (len,GFP_KERNEL );if (!skb)
@@ -77,14 +71,11 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)memcpy (hdr->addr2, hw->wiphy->perm_addr,ETH_ALEN );memcpy (hdr->addr3, hw->wiphy->perm_addr,ETH_ALEN ); - hdr->seq_ctrl |=cpu_to_le16 (avp->seq_no); - tx_info =IEEE80211_SKB_CB (skb);memset (tx_info,0 ,sizeof (*tx_info)); rate = &tx_info->control.rates[0 ]; tx_info->band = sc->cur_chan->chandef.chan->band; tx_info->flags =IEEE80211_TX_CTL_NO_ACK ; - tx_info->control.vif = sc->tx99_vif; rate->count =1 ;if (ah->curchan &&IS_CHAN_HT (ah->curchan)) { rate->flags |=IEEE80211_TX_RC_MCS ;
drivers/net/wireless/ath/ath9k/xmit.c +1 -1
@@ -2952,7 +2952,7 @@ int ath9k_tx99_send(struct ath_softc *sc, struct sk_buff *skb,return -EINVAL ; } -ath_set_rates (sc->tx99_vif,NULL , bf); +ath_set_rates (NULL ,NULL , bf);ath9k_hw_set_desc_link (sc->sc_ah, bf->bf_desc, bf->bf_daddr);ath9k_hw_tx99_start (sc->sc_ah, txctl->txq->axq_qnum);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 16/103 ath10k: limit available channels via DT ieee80211-freq-limit
In reply to Sasha LevinFrom: Sven Eckelmann <[email protected]>
[ Upstream commit 34d5629d2ca89d847b7040762b87964c696c14da ]
Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in the RX and TX path. These filtered channel can in theory still be used by the hardware but the signal strength is reduced so much that it makes no sense.
There is already a DT property to limit the available channels but ath10k has to manually call this functionality to limit the currrently set wiphy channels further.
--- drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath10k/mac.c +2 -0
@@ -17,6 +17,7 @@#include "mac.h" +#include <net/cfg80211.h> #include <net/mac80211.h> #include <linux/etherdevice.h> #include <linux/acpi.h>
@@ -8174,6 +8175,7 @@ int ath10k_mac_register(struct ath10k *ar) ar->hw->wiphy->bands[NL80211_BAND_5GHZ ] = band; } +wiphy_read_of_freq_limits (ar->hw->wiphy);ath10k_mac_setup_ht_vht_cap (ar); ar->hw->wiphy->interface_modes =
Signature · 7 lines
2.20.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Sasha Levin
maintainerPATCH 17/103 gfs2: Don't set GFS2_RDF_UPTODATE when the lvb is updated
In reply to Sasha LevinFrom: Bob Peterson <[email protected]>
[ Upstream commit 4f36cb36c9d14340bb200d2ad9117b03ce992cfe ]
The GFS2_RDF_UPTODATE flag in the rgrp is used to determine when a rgrp buffer is valid. It's cleared when the glock is invalidated, signifying that the buffer data is now invalid. But before this patch, function update_rgrp_lvb was setting the flag when it determined it had a valid lvb. But that's an invalid assumption:
just because you have a valid lvb doesn't mean you have valid buffers. After all, another node may have made the lvb valid, and this node just fetched it from the glock via dlm.
Consider this scenario:
1. The file system is mounted with RGRPLVB option.
2. In gfs2_inplace_reserve it locks the rgrp glock EX, but thanks to GL_SKIP, it skips the gfs2_rgrp_bh_get.
3. Since loops == 0 and the allocation target (ap->target) is bigger than the largest known chunk of blocks in the rgrp (rs->rs_rbm.rgd->rd_extfail_pt) it skips that rgrp and bypasses the call to gfs2_rgrp_bh_get there as well.
4. update_rgrp_lvb sees the lvb MAGIC number is valid, so bypasses gfs2_rgrp_bh_get, but it still sets sets GFS2_RDF_UPTODATE due to this invalid assumption.
5. The next time update_rgrp_lvb is called, it sees the bit is set and just returns 0, assuming both the lvb and rgrp are both uptodate. But since this is a smaller allocation, or space has been freed by another node, thus adjusting the lvb values, it decides to use the rgrp for allocations, with invalid rd_free due to the fact it was never updated.
This patch changes update_rgrp_lvb so it doesn't set the UPTODATE flag anymore. That way, it has no choice but to fetch the latest values.
--- fs/gfs2/rgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/rgrp.c +1 -1
@@ -1201,7 +1201,7 @@ static int update_rgrp_lvb(struct gfs2_rgrpd *rgd) rl_flags =be32_to_cpu (rgd->rd_rgl->rl_flags); rl_flags &= ~GFS2_RDF_MASK ; rgd->rd_flags &=GFS2_RDF_MASK ; - rgd->rd_flags |= (rl_flags |GFS2_RDF_UPTODATE |GFS2_RDF_CHECK ); + rgd->rd_flags |= (rl_flags |GFS2_RDF_CHECK );if (rgd->rd_rgl->rl_unlinked ==0 ) rgd->rd_flags &= ~GFS2_RDF_CHECK ; rgd->rd_free =be32_to_cpu (rgd->rd_rgl->rl_free);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 18/103 ASoC: dpcm: Properly initialise hw->rate_max
In reply to Sasha LevinFrom: Charles Keepax <[email protected]>
[ Upstream commit e33ffbd9cd39da09831ce62c11025d830bf78d9e ]
If the CPU DAI does not initialise rate_max, say if using using KNOT or CONTINUOUS, then the rate_max field will be initialised to 0. A value of zero in the rate_max field of the hardware runtime will cause the sound card to support no sample rates at all. Obviously this is not desired, just a different mechanism is being used to apply the constraints. As such update the setting of rate_max in dpcm_init_runtime_hw to be consistent with the non-DPCM cases and set rate_max to UINT_MAX if nothing is defined on the CPU DAI.
--- sound/soc/soc-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-pcm.c +1 -1
@@ -1578,7 +1578,7 @@ static void dpcm_init_runtime_hw(struct snd_pcm_runtime *runtime, u64 formats) { runtime->hw.rate_min = stream->rate_min; - runtime->hw.rate_max = stream->rate_max; + runtime->hw.rate_max =min_not_zero (stream->rate_max,UINT_MAX ); runtime->hw.channels_min = stream->channels_min; runtime->hw.channels_max = stream->channels_max;if (runtime->hw.formats)
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 19/103 pinctrl: ingenic: Probe driver at subsys_initcall
In reply to Sasha LevinFrom: Paul Cercueil <[email protected]>
[ Upstream commit 556a36a71ed80e17ade49225b58513ea3c9e4558 ]
Using postcore_initcall() makes the driver try to initialize way too early.
--- drivers/pinctrl/pinctrl-ingenic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-ingenic.c +1 -1
@@ -849,4 +849,4 @@ static int __init ingenic_pinctrl_drv_register(void) {return platform_driver_register (&ingenic_pinctrl_driver); } -postcore_initcall (ingenic_pinctrl_drv_register); +subsys_initcall (ingenic_pinctrl_drv_register);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 20/103 MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
In reply to Sasha LevinFrom: Tuomas Tynkkynen <[email protected]>
[ Upstream commit feef7918667b84f9d5653c501542dd8d84ae32af ]
Setting GPIO 21 high seems to be required to enable power to USB ports on the WNDR3400v3. As there is already similar code for WNR3500L, make the existing USB power GPIO code generic and use that.
Patchwork: https://patchwork.linux-mips.org/patch/20259/
--- arch/mips/bcm47xx/workarounds.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
arch/mips/bcm47xx/workarounds.c +5 -3
@@ -5,9 +5,8 @@#include <bcm47xx_board.h> #include <bcm47xx.h> -static void __init bcm47xx_workarounds_netgear_wnr3500l (void ) +static void __init bcm47xx_workarounds_enable_usb_power (int usb_power) { -const int usb_power =12 ;int err; err =gpio_request_one (usb_power,GPIOF_OUT_INIT_HIGH ,"usb_power" );
@@ -23,7 +22,10 @@ void __init bcm47xx_workarounds(void)switch (board) {case BCM47XX_BOARD_NETGEAR_WNR3500L : -bcm47xx_workarounds_netgear_wnr3500l (); +bcm47xx_workarounds_enable_usb_power (12 ); +break ; +case BCM47XX_BOARD_NETGEAR_WNDR3400_V3 : +bcm47xx_workarounds_enable_usb_power (21 );break ;default :/* No workaround(s) needed */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 21/103 ARM: dts: exynos: Fix sound in Snow-rev5 Chromebook
In reply to Sasha LevinFrom: Marek Szyprowski <[email protected]>
[ Upstream commit 64858773d78e820003a94e5a7179d368213655d6 ]
This patch adds missing properties to the CODEC and sound nodes, so the audio will work also on Snow rev5 Chromebook. This patch is an extension to the commit e9eefc3f8ce0 ("ARM: dts: exynos: Add missing clock and DAI properties to the max98095 node in Snow Chromebook")
and commit 6ab569936d60 ("ARM: dts: exynos: Enable HDMI audio on Snow Chromebook"). It has been reported that such changes work fine on the rev5 board too.
--- arch/arm/boot/dts/exynos5250-snow-rev5.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/boot/dts/exynos5250-snow-rev5.dts +11 -0
@@ -23,6 +23,14 @@ samsung,model = "Snow-I2S-MAX98090"; samsung,audio-codec = <&max98090>; + + cpu { + sound-dai = <&i2s0 0>; + }; + + codec { + sound-dai = <&max98090 0>, <&hdmi>; + }; }; };
@@ -34,6 +42,9 @@ interrupt-parent = <&gpx0>; pinctrl-names = "default"; pinctrl-0 = <&max98090_irq>; + clocks = <&pmu_system_controller 0>; + clock-names = "mclk"; + #sound-dai-cells = <1>; }; };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 22/103 liquidio: fix race condition in instruction completion processing
In reply to Sasha LevinFrom: Rick Farrington <[email protected]>
[ Upstream commit b943f17e06493fd2c7fd00743093ad5dcdb90e7f ]
In lio_enable_irq, the pkt_in_done count register was being cleared to zero. However, there could be some completed instructions which were not yet processed due to budget and limit constraints.
So, only write this register with the number of actual completions that were processed.
--- drivers/net/ethernet/cavium/liquidio/octeon_device.c | 5 +++-- drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 2 ++ drivers/net/ethernet/cavium/liquidio/request_manager.c | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/cavium/liquidio/octeon_device.c +3 -2
@@ -1444,8 +1444,9 @@ void lio_enable_irq(struct octeon_droq *droq, struct octeon_instr_queue *iq) }if (iq) {spin_lock_bh (&iq->lock); -writel (iq->pkt_in_done, iq->inst_cnt_reg); - iq->pkt_in_done =0 ; +writel (iq->pkts_processed, iq->inst_cnt_reg); + iq->pkt_in_done -= iq->pkts_processed; + iq->pkts_processed =0 ;/* this write needs to be flushed before we release the lock */ mmiowb ();spin_unlock_bh (&iq->lock);
drivers/net/ethernet/cavium/liquidio/octeon_iq.h +2 -0
@@ -84,6 +84,8 @@ struct octeon_instr_queue {u32 pkt_in_done; +u32 pkts_processed; +/** A spinlock to protect access to the input ring.*/ spinlock_t iq_flush_running_lock;
drivers/net/ethernet/cavium/liquidio/request_manager.c +2 -0
@@ -122,6 +122,7 @@ int octeon_init_instr_queue(struct octeon_device *oct, iq->do_auto_flush =1 ; iq->db_timeout = (u32 )conf->db_timeout;atomic_set (&iq->instr_pending,0 ); + iq->pkts_processed =0 ;/* Initialize the spinlock for this instruction queue */ spin_lock_init (&iq->lock);
@@ -474,6 +475,7 @@ octeon_flush_iq(struct octeon_device *oct, struct octeon_instr_queue *iq,lio_process_iq_request_list (oct, iq,0 );if (inst_processed) { + iq->pkts_processed += inst_processed;atomic_sub (inst_processed, &iq->instr_pending); iq->stats.instr_processed += inst_processed; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 23/103 ARM: dts: exynos: Fix regulators configuration on Peach Pi/Pit Chromebooks
In reply to Sasha LevinFrom: Marek Szyprowski <[email protected]>
[ Upstream commit f8f3b7fc21b1cb59385b780acd9b9a26d04cb7b2 ]
Regulators, which are marked as 'on-in-suspend' seems to be critical for board operation, thus they must not be disabled anytime. This can be only assured by marking them as 'always-on', because otherwise some actions of their clients might result in turning them off. This patch restores suspend/resume operation on Peach-Pit Chromebook board. It partially reverts 'always-on' property removal done by the commit mentioned in the Fixes tag.
--- arch/arm/boot/dts/exynos5420-peach-pit.dts | 3 +++ arch/arm/boot/dts/exynos5800-peach-pi.dts | 3 +++ 2 files changed, 6 insertions(+)
arch/arm/boot/dts/exynos5420-peach-pit.dts +3 -0
@@ -301,6 +301,7 @@ regulator-name = "vdd_1v35"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -322,6 +323,7 @@ regulator-name = "vdd_2v"; regulator-min-microvolt = <2000000>; regulator-max-microvolt = <2000000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -332,6 +334,7 @@ regulator-name = "vdd_1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
arch/arm/boot/dts/exynos5800-peach-pi.dts +3 -0
@@ -301,6 +301,7 @@ regulator-name = "vdd_1v35"; regulator-min-microvolt = <1350000>; regulator-max-microvolt = <1350000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -322,6 +323,7 @@ regulator-name = "vdd_2v"; regulator-min-microvolt = <2000000>; regulator-max-microvolt = <2000000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
@@ -332,6 +334,7 @@ regulator-name = "vdd_1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; regulator-state-mem { regulator-on-in-suspend;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 24/103 i40e: use correct length for strncpy
In reply to Sasha LevinFrom: Mitch Williams <[email protected]>
[ Upstream commit 7eb74ff891b4e94b8bac48f648a21e4b94ddee64 ]
Caught by GCC 8. When we provide a length for strncpy, we should not include the terminating null. So we must tell it one less than the size of the destination buffer.
--- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_ptp.c +2 -1
@@ -704,7 +704,8 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf)if (!IS_ERR_OR_NULL (pf->ptp_clock))return 0 ; -strncpy (pf->ptp_caps.name, i40e_driver_name,sizeof (pf->ptp_caps.name)); +strncpy (pf->ptp_caps.name, i40e_driver_name, +sizeof (pf->ptp_caps.name) -1 ); pf->ptp_caps.owner =THIS_MODULE ; pf->ptp_caps.max_adj =999999999 ; pf->ptp_caps.n_ext_ts =0 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 25/103 i40e: hold the rtnl lock on clearing interrupt scheme
In reply to Sasha LevinFrom: Patryk Małek <[email protected]>
[ Upstream commit 5cba17b14182696d6bb0ec83a1d087933f252241 ]
Hold the rtnl lock when we're clearing interrupt scheme in i40e_shutdown and in i40e_remove.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +8 -0
@@ -11885,6 +11885,7 @@ static void i40e_remove(struct pci_dev *pdev)mutex_destroy (&hw->aq.asq_mutex);/* Clear all dynamic memory lists of rings, q_vectors, and VSIs */ +rtnl_lock ();i40e_clear_interrupt_scheme (pf);for (i =0 ; i < pf->num_alloc_vsi; i++) {if (pf->vsi[i]) {
@@ -11893,6 +11894,7 @@ static void i40e_remove(struct pci_dev *pdev) pf->vsi[i] =NULL ; } } +rtnl_unlock ();for (i =0 ; i <I40E_MAX_VEB ; i++) {kfree (pf->veb[i]);
@@ -12086,7 +12088,13 @@ static void i40e_shutdown(struct pci_dev *pdev)wr32 (hw,I40E_PFPM_WUFC , (pf->wol_en ?I40E_PFPM_WUFC_MAG_MASK :0 )); +/* Since we're going to destroy queues during the +* i40e_clear_interrupt_scheme() we should hold the RTNL lock for this +* whole section +*/ +rtnl_lock ();i40e_clear_interrupt_scheme (pf); +rtnl_unlock ();if (system_state ==SYSTEM_POWER_OFF ) {pci_wake_from_d3 (pdev, pf->wol_en);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 26/103 i40e: Prevent deleting MAC address from VF when set by PF
In reply to Sasha LevinFrom: Patryk Małek <[email protected]>
[ Upstream commit 5907cf6c5bbe78be2ed18b875b316c6028b20634 ]
To prevent VF from deleting MAC address that was assigned by the PF we need to check for that scenario when we try to delete a MAC address from a VF.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +10 -0
@@ -2177,6 +2177,16 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen) ret =I40E_ERR_INVALID_MAC_ADDR ; goto error_param; } + +if (vf->pf_set_mac && +ether_addr_equal (al->list[i].addr, + vf->default_lan_addr.addr)) { +dev_err (&pf->pdev->dev, +"MAC addr %pM has been set by PF, cannot delete it for VF %d, reset VF to change MAC addr\n" , + vf->default_lan_addr.addr, vf->vf_id); + ret =I40E_ERR_PARAM ; + goto error_param; + } } vsi = pf->vsi[vf->lan_vsi_idx];
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 27/103 IB/rxe: fixes for rdma read retry
In reply to Sasha LevinFrom: Vijay Immanuel <[email protected]>
[ Upstream commit 030e46e495af855a13964a0aab9753ea82a96edc ]
When a read request is retried for the remaining partial data, the response may restart from read response first or read response only. So support those cases.
Do not advance the comp psn beyond the current wqe's last_psn as that could skip over an entire read wqe and will cause the req_retry() logic to set an incorrect req psn.
An example sequence is as follows:
Write PSN 40 -- this is the current WQE.
Read request PSN 41
Write PSN 42
Receive ACK PSN 42 -- this will complete the current WQE for PSN 40, and set the comp psn to 42 which is a problem because the read request at PSN 41 has been skipped over. So when req_retry() tries to retransmit the read request, it sets the req psn to 42 which is incorrect.
When retrying a read request, calculate the number of psns completed based on the dma resid instead of the wqe first_psn. The wqe first_psn could have moved if the read request was retried multiple times.
Set the reth length to the dma resid to handle read retries for the remaining partial data.
--- drivers/infiniband/sw/rxe/rxe_comp.c | 21 ++++++++++++++++----- drivers/infiniband/sw/rxe/rxe_req.c | 15 +++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-)
drivers/infiniband/sw/rxe/rxe_comp.c +16 -5
@@ -253,6 +253,17 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE :if (pkt->opcode !=IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE && pkt->opcode !=IB_OPCODE_RC_RDMA_READ_RESPONSE_LAST ) { +/* read retries of partial data may restart from +* read response first or response only. +*/ +if ((pkt->psn == wqe->first_psn && + pkt->opcode == +IB_OPCODE_RC_RDMA_READ_RESPONSE_FIRST ) || + (wqe->first_psn == wqe->last_psn && + pkt->opcode == +IB_OPCODE_RC_RDMA_READ_RESPONSE_ONLY )) +break ; +return COMPST_ERROR ; }break ;
@@ -501,11 +512,11 @@ static inline enum comp_state complete_wqe(struct rxe_qp *qp, struct rxe_pkt_info *pkt, struct rxe_send_wqe *wqe) { - qp->comp.opcode = -1; - -if (pkt) { -if (psn_compare (pkt->psn, qp->comp.psn) >=0 ) - qp->comp.psn = (pkt->psn +1 ) &BTH_PSN_MASK ; +if (pkt && wqe->state == wqe_state_pending) { +if (psn_compare (wqe->last_psn, qp->comp.psn) >=0 ) { + qp->comp.psn = (wqe->last_psn +1 ) &BTH_PSN_MASK ; + qp->comp.opcode =-1 ; + }if (qp->req.wait_psn) { qp->req.wait_psn =0 ;
drivers/infiniband/sw/rxe/rxe_req.c +9 -6
@@ -73,9 +73,6 @@ static void req_retry(struct rxe_qp *qp)int npsn;int first =1 ; - wqe =queue_head (qp->sq.queue); - npsn = (qp->comp.psn - wqe->first_psn) &BTH_PSN_MASK ; - qp->req.wqe_index =consumer_index (qp->sq.queue); qp->req.psn = qp->comp.psn; qp->req.opcode =-1 ;
@@ -107,11 +104,17 @@ static void req_retry(struct rxe_qp *qp)if (first) { first =0 ; -if (mask &WR_WRITE_OR_SEND_MASK ) +if (mask &WR_WRITE_OR_SEND_MASK ) { + npsn = (qp->comp.psn - wqe->first_psn) & +BTH_PSN_MASK ;retry_first_write_send (qp, wqe, mask, npsn); + } -if (mask &WR_READ_MASK ) +if (mask &WR_READ_MASK ) { + npsn = (wqe->dma.length - wqe->dma.resid) / + qp->mtu; wqe->iova += npsn * qp->mtu; + } } wqe->state = wqe_state_posted;
@@ -435,7 +438,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,if (pkt->mask &RXE_RETH_MASK ) {reth_set_rkey (pkt, ibwr->wr.rdma.rkey);reth_set_va (pkt, wqe->iova); -reth_set_len (pkt, wqe->dma.length); +reth_set_len (pkt, wqe->dma.resid); }if (pkt->mask &RXE_IMMDT_MASK )
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 28/103 iwlwifi: don't WARN on trying to dump dead firmware
In reply to Sasha LevinFrom: Johannes Berg <[email protected]>
[ Upstream commit 84f260251ed8153e84c64eb2c5278ab18d3ddef6 ]
There's no point in warning here, the user will just get an error back to the debugfs file write, and warning just makes it seem like there's an internal consistency problem when in reality the user just happened to hit this at a bad time. Remove the warning.
--- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/dbg.c +3 -4
@@ -954,7 +954,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,* If the loading of the FW completed successfully, the next step is to * get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non * zero, the FW was already loaded successully. If the state is "NO_FW" -* in such a case - WARN and exit, since FW may be dead. Otherwise, we +* in such a case - exit, since FW may be dead. Otherwise, we * can try to collect the data, since FW might just not be fully * loaded (no "ALIVE" yet), and the debug data is accessible. *
@@ -962,9 +962,8 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,* config. In such a case, due to HW access problems, we might * collect garbage. */ -if (WARN ((fwrt->trans->state ==IWL_TRANS_NO_FW ) && - fwrt->smem_cfg.num_lmacs, -"Can't collect dbg data when FW isn't alive\n" )) +if (fwrt->trans->state ==IWL_TRANS_NO_FW && + fwrt->smem_cfg.num_lmacs)return -EIO ;if (test_and_set_bit (IWL_FWRT_STATUS_DUMPING , &fwrt->status))
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 29/103 iwlwifi: mvm: avoid sending too many BARs
In reply to Sasha LevinFrom: Sara Sharon <[email protected]>
[ Upstream commit 1a19c139be18ed4d6d681049cc48586fae070120 ]
When we receive TX response, we may release a few packets due to a hole that was closed in the transmission window.
However, if that frame failed, we will mark all the released frames as failed and will send multiple BARs.
This affects statistics badly, and cause unnecessary frames transmission.
Instead, mark all the following packets as success, with the desired result of sending a bar for the failed frame only.
--- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +8 -0
@@ -1378,6 +1378,14 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,break ; } +/* +* If we are freeing multiple frames, mark all the frames +* but the first one as acked, since they were acknowledged +* before +* */ +if (skb_freed >1 ) + info->flags |=IEEE80211_TX_STAT_ACK ; +iwl_mvm_tx_status_check_trigger (mvm, status); info->status.rates[0 ].count = tx_resp->failure_frame +1 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 30/103 ARM: dts: pxa: fix the rtc controller
In reply to Sasha LevinFrom: Robert Jarzmik <[email protected]>
[ Upstream commit 24a610eba32a80ed778ea79680b600c3fe73d7de ]
The RTC controller is fed by an external fixed 32kHz clock. Yet the driver wants to acquire this clock, even though it doesn't make any use of it, ie. doesn't get the rate to make calculation.
Therefore, use the exported 32.768kHz clock in the PXA clock tree to make the driver happy and working.
--- arch/arm/boot/dts/pxa25x.dtsi | 4 ++++ arch/arm/boot/dts/pxa27x.dtsi | 4 ++++ 2 files changed, 8 insertions(+)
arch/arm/boot/dts/pxa25x.dtsi +4 -0
@@ -80,6 +80,10 @@ #pwm-cells = <1>; clocks = <&clks CLK_PWM1>; }; + + rtc@40900000 { + clocks = <&clks CLK_OSC32k768>; + }; }; timer@40a00000 {
arch/arm/boot/dts/pxa27x.dtsi +4 -0
@@ -113,6 +113,10 @@ status = "disabled"; }; + + rtc@40900000 { + clocks = <&clks CLK_OSC32k768>; + }; }; clocks {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 31/103 ARM: dts: pxa: fix power i2c base address
In reply to Sasha LevinFrom: Marcel Ziswiler <[email protected]>
[ Upstream commit 8a1ecc01a473b75ab97be9b36f623e4551a6e9ae ]
There is one too many zeroes in the Power I2C base address. Fix this.
--- arch/arm/boot/dts/pxa27x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/pxa27x.dtsi +1 -1
@@ -71,7 +71,7 @@ clocks = <&clks CLK_PWM1>; }; - pwri2c: i2c@40f000180 { + pwri2c: i2c@40f00180 { compatible = "mrvl,pxa-i2c"; reg = <0x40f00180 0x24>; interrupts = <6>;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 32/103 rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument
In reply to Sasha LevinFrom: Larry Finger <[email protected]>
[ Upstream commit 199ba9faca909e77ac533449ecd1248123ce89e7 ]
In gcc8, when the 3rd argument (size) of a call to strncpy() matches the length of the first argument, the compiler warns of the possibility of an unterminated string. Using strlcpy() forces a null at the end.
--- drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c +1 -1
@@ -146,7 +146,7 @@ static int rtl8187_register_led(struct ieee80211_hw *dev, led->dev = dev; led->ledpin = ledpin; led->is_radio = is_radio; -strncpy (led->name, name,sizeof (led->name)); +strlcpy (led->name, name,sizeof (led->name)); led->led_dev.name = led->name; led->led_dev.default_trigger = default_trigger;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 33/103 soc: imx: gpc: fix PDN delay
In reply to Sasha LevinFrom: Sven Schmitt <[email protected]>
[ Upstream commit 9f4d61d531e0efc9c3283963ae5ef7e314579191 ]
imx6_pm_domain_power_off() reads iso and iso2sw from GPC_PGC_PUPSCR_OFFS which stores the power up delays.
So use GPC_PGC_PDNSCR_OFFS for the correct delays.
--- drivers/soc/imx/gpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/imx/gpc.c +1 -1
@@ -73,7 +73,7 @@ static int imx6_pm_domain_power_off(struct generic_pm_domain *genpd)return -EBUSY ;/* Read ISO and ISO2SW power down delays */ -regmap_read (pd->regmap, pd->reg_offs +GPC_PGC_PUPSCR_OFFS , &val); +regmap_read (pd->regmap, pd->reg_offs +GPC_PGC_PDNSCR_OFFS , &val); iso = val &0x3f ; iso2sw = (val >>8 ) &0x3f ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 34/103 ASoC: rsnd: ssi: Fix issue in dma data address assignment
In reply to Sasha LevinFrom: Jiada Wang <[email protected]>
[ Upstream commit 0e289012b47a2de1f029a6b61c75998e2f159dd9 ]
Same SSI device may be used in different dai links, by only having one dma struct in rsnd_ssi, after the first instance's dma config be initilized, the following instances can no longer configure dma, this causes issue, when their dma data address are different from the first instance.
--- sound/soc/sh/rcar/rsnd.h | 1 + sound/soc/sh/rcar/ssi.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
sound/soc/sh/rcar/rsnd.h +1 -0
@@ -432,6 +432,7 @@ struct rsnd_dai_stream {char name[RSND_DAI_NAME_SIZE ];struct snd_pcm_substream *substream;struct rsnd_mod *mod[RSND_MOD_MAX ]; +struct rsnd_mod *dma;struct rsnd_dai *rdai;u32 parent_ssi_status; };
sound/soc/sh/rcar/ssi.c +1 -3
@@ -66,7 +66,6 @@struct rsnd_ssi {struct rsnd_mod mod; -struct rsnd_mod *dma;u32 flags;u32 cr_own;
@@ -868,7 +867,6 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,struct rsnd_dai_stream *io, struct rsnd_priv *priv) { - struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); int ret;/*
@@ -883,7 +881,7 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,return ret;/* SSI probe might be called many times in MUX multi path */ - ret =rsnd_dma_attach (io, mod, &ssi->dma); + ret =rsnd_dma_attach (io, mod, &io->dma);return ret; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 35/103 net: phy: mscc: read 'vsc8531,vddmac' as an u32
In reply to Sasha LevinFrom: Quentin Schulz <[email protected]>
[ Upstream commit a993e0f583c7925adaa7721226ccd7a41e7e63d1 ]
In the DT binding, it is specified nowhere that 'vsc8531,vddmac' is an u16, even though it's read as an u16 in the driver.
Let's update the driver to take into consideration that the 'vsc8531,vddmac' property is of the default type u32.
--- drivers/net/phy/mscc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/phy/mscc.c +3 -3
@@ -111,7 +111,7 @@ struct vsc8531_private {#ifdef CONFIG_OF_MDIO struct vsc8531_edge_rate_table { -u16 vddmac; +u32 vddmac;u8 slowdown[8 ]; };
@@ -376,7 +376,7 @@ static void vsc85xx_wol_get(struct phy_device *phydev,static int vsc85xx_edge_rate_magic_get (struct phy_device *phydev) {u8 sd; -u16 vdd; +u32 vdd;int rc, i, j;struct device *dev = &phydev->mdio.dev;struct device_node *of_node = dev->of_node;
@@ -385,7 +385,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)if (!of_node)return -ENODEV ; - rc =of_property_read_u16 (of_node,"vsc8531,vddmac" , &vdd); + rc =of_property_read_u32 (of_node,"vsc8531,vddmac" , &vdd);if (rc !=0 ) vdd =MSCC_VDDMAC_3300 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 36/103 net: phy: mscc: read 'vsc8531, edge-slowdown' as an u32
In reply to Sasha LevinFrom: Quentin Schulz <[email protected]>
[ Upstream commit 36c53cf0f46526b898390659b125155939f67892 ]
In the DT binding, it is specified nowhere that 'vsc8531,edge-slowdown' is an u8, even though it's read as an u8 in the driver.
Let's update the driver to take into consideration that the 'vsc8531,edge-slowdown' property is of the default type u32.
--- drivers/net/phy/mscc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/phy/mscc.c +3 -4
@@ -112,7 +112,7 @@ struct vsc8531_private {#ifdef CONFIG_OF_MDIO struct vsc8531_edge_rate_table {u32 vddmac; -u8 slowdown[8 ]; +u32 slowdown[8 ]; }; static const struct vsc8531_edge_rate_table edge_table[] = {
@@ -375,8 +375,7 @@ static void vsc85xx_wol_get(struct phy_device *phydev,#ifdef CONFIG_OF_MDIO static int vsc85xx_edge_rate_magic_get (struct phy_device *phydev) { -u8 sd; -u32 vdd; +u32 vdd, sd;int rc, i, j;struct device *dev = &phydev->mdio.dev;struct device_node *of_node = dev->of_node;
@@ -389,7 +388,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)if (rc !=0 ) vdd =MSCC_VDDMAC_3300 ; - rc =of_property_read_u8 (of_node,"vsc8531,edge-slowdown" , &sd); + rc =of_property_read_u32 (of_node,"vsc8531,edge-slowdown" , &sd);if (rc !=0 ) sd =0 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 37/103 ARM: dts: meson8: fix the clock controller register size
In reply to Sasha LevinFrom: Martin Blumenstingl <[email protected]>
[ Upstream commit f7f9da89bc4f61e33f7b9f5c75c4efdc1f0455d8 ]
The clock controller registers are not 0x460 wide because the reset controller starts at CBUS 0x4404. This currently overlaps with the clock controller (which is at CBUS 0x4000).
There is no public documentation available on the actual size of the clock controller's register area (also called "HHI"). However, in Amlogic's GPL kernel sources the last "HHI" register is HHI_HDMI_PHY_CNTL2 at CBUS + 0x43a8. 0x400 was chosen because that size doesn't seem unlikely.
--- arch/arm/boot/dts/meson8.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/meson8.dtsi +1 -1
@@ -170,7 +170,7 @@ #clock-cells = <1>; #reset-cells = <1>; compatible = "amlogic,meson8-clkc"; - reg = <0x8000 0x4>, <0x4000 0x460>; + reg = <0x8000 0x4>, <0x4000 0x400>; }; pwm_ef: pwm@86c0 {
Signature · 7 lines
2.20.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Sasha Levin
maintainerPATCH 38/103 ARM: dts: meson8b: fix the clock controller register size
In reply to Sasha LevinFrom: Martin Blumenstingl <[email protected]>
[ Upstream commit f31094fe8c16fbd2ca47921acf93b744b045aace ]
The clock controller registers are not 0x460 wide because the reset controller starts at CBUS 0x4404. This currently overlaps with the clock controller (which is at CBUS 0x4000).
There is no public documentation available on the actual size of the clock controller's register area (also called "HHI"). However, in Amlogic's GPL kernel sources the last "HHI" register is HHI_HDMI_PHY_CNTL2 at CBUS + 0x43a8. 0x400 was chosen because that size doesn't seem unlikely.
--- arch/arm/boot/dts/meson8b.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/meson8b.dtsi +1 -1
@@ -121,7 +121,7 @@ #clock-cells = <1>; #reset-cells = <1>; compatible = "amlogic,meson8b-clkc"; - reg = <0x8000 0x4>, <0x4000 0x460>; + reg = <0x8000 0x4>, <0x4000 0x400>; }; reset: reset-controller@4404 {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 39/103 net: lan78xx: Bail out if lan78xx_get_endpoints fails
In reply to Sasha LevinFrom: Stefan Wahren <[email protected]>
[ Upstream commit fa8cd98c06407b5798b927cd7fd14d30f360ed02 ]
We need to bail out if lan78xx_get_endpoints() fails, otherwise the result is overwritten.
--- drivers/net/usb/lan78xx.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/usb/lan78xx.c +5 -0
@@ -2818,6 +2818,11 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)int i; ret =lan78xx_get_endpoints (dev, intf); +if (ret) { +netdev_warn (dev->net,"lan78xx_get_endpoints failed: %d\n" , + ret); +return ret; + } dev->data[0 ] = (unsigned long )kzalloc (sizeof (*pdata),GFP_KERNEL );
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 40/103 ASoC: sgtl5000: avoid division by zero if lo_vag is zero
In reply to Sasha LevinFrom: Colin Ian King <[email protected]>
[ Upstream commit 9ab708aef61f5620113269a9d1bdb1543d1207d0 ]
In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag is set to zero and later vol_quot is computed by dividing by lo_vag causing a division by zero error. Fix this by avoiding a zero division and set vol_quot to zero in this specific case so that the lowest setting for i is correctly set.
--- sound/soc/codecs/sgtl5000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sgtl5000.c +1 -1
@@ -1314,7 +1314,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)* Searching for a suitable index solving this formula: * idx = 40 * log10(vag_val / lo_cagcntrl) + 15 */ - vol_quot = (vag *100 ) / lo_vag; + vol_quot = lo_vag ? (vag *100 ) / lo_vag :0 ; lo_vol =0 ;for (i =0 ; i <ARRAY_SIZE (vol_quot_table); i++) {if (vol_quot >= vol_quot_table[i])
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 41/103 ARM: dts: exynos: Disable pull control for S5M8767 PMIC
In reply to Sasha LevinFrom: Marek Szyprowski <[email protected]>
[ Upstream commit ef2ecab9af5feae97c47b7f61cdd96f7f49b2c23 ]
S5M8767 PMIC interrupt line on Exynos5250-based Arndale board has external pull-up resistors, so disable any pull control for it in in controller node. This fixes support for S5M8767 interrupts and enables operation of wakeup from S5M8767 RTC alarm.
--- arch/arm/boot/dts/exynos5250-arndale.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/exynos5250-arndale.dts +9 -0
@@ -169,6 +169,8 @@ reg = <0x66>; interrupt-parent = <&gpx3>; interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&s5m8767_irq>; vinb1-supply = <&main_dc_reg>; vinb2-supply = <&main_dc_reg>;
@@ -544,6 +546,13 @@ cap-sd-highspeed; }; +&pinctrl_0 { + s5m8767_irq: s5m8767-irq { + samsung,pins = "gpx3-2"; + samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; + }; +}; + &rtc { status = "okay"; };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 42/103 ath10k: wmi: disable softirq's while calling ieee80211_rx
In reply to Sasha LevinFrom: Erik Stromdahl <[email protected]>
[ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ]
This is done in order not to trig the below warning in ieee80211_rx_napi:
WARN_ON_ONCE(softirq_count() == 0);
ieee80211_rx_napi requires that softirq's are disabled during execution.
The High latency bus drivers (SDIO and USB) sometimes call the wmi ep_rx_complete callback from non softirq context, resulting in a trigger of the above warning.
Calling ieee80211_rx_ni with softirq's already disabled (e.g., from softirq context) should be safe as the local_bh_disable and local_bh_enable functions (called from ieee80211_rx_ni) are fully reentrant.
--- drivers/net/wireless/ath/ath10k/wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/wmi.c +2 -1
@@ -2414,7 +2414,8 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) status->freq, status->band, status->signal, status->rate_idx); -ieee80211_rx (ar->hw, skb); +ieee80211_rx_ni (ar->hw, skb); +return 0 ; }
Signature · 7 lines
2.20.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Sasha Levin
maintainerPATCH 43/103 IB/ipoib: Ensure that MTU isn't less than minimum permitted
In reply to Sasha LevinFrom: Muhammad Sammar <[email protected]>
[ Upstream commit 142a9c287613560edf5a03c8d142c8b6ebc1995b ]
It is illegal to change MTU to a value lower than the minimum MTU stated in ethernet spec. In addition to that we need to add 4 bytes for encapsulation header (IPOIB_ENCAP_LEN).
Before "ifconfig ib0 mtu 0" command, succeeds while it obviously shouldn't.
--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/ulp/ipoib/ipoib_main.c +2 -1
@@ -249,7 +249,8 @@ static int ipoib_change_mtu(struct net_device *dev, int new_mtu)return 0 ; } -if (new_mtu >IPOIB_UD_MTU (priv->max_ib_mtu)) +if (new_mtu < (ETH_MIN_MTU +IPOIB_ENCAP_LEN ) || + new_mtu >IPOIB_UD_MTU (priv->max_ib_mtu))return -EINVAL ; priv->admin_mtu = new_mtu;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 44/103 RDMA/core: Rate limit MAD error messages
In reply to Sasha LevinFrom: Parav Pandit <[email protected]>
[ Upstream commit f9d08f1e1939ad4d92e38bd3dee6842512f5bee6 ]
While registering a mad agent, a user space can trigger various errors and flood the logs.
Therefore, decrease verbosity and rate limit such error messages. While we are at it, use __func__ to print function name.
--- drivers/infiniband/core/mad.c | 72 ++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 35 deletions(-)
drivers/infiniband/core/mad.c +37 -35
@@ -217,30 +217,30 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,/* Validate parameters */ qpn =get_spl_qp_index (qp_type);if (qpn ==-1 ) { -dev_notice (&device->dev, -"ib_register_mad_agent: invalid QP Type %d\n" , - qp_type); +dev_dbg_ratelimited (&device->dev,"%s: invalid QP Type %d\n" , + __func__, qp_type); goto error1; }if (rmpp_version && rmpp_version !=IB_MGMT_RMPP_VERSION ) { -dev_notice (&device->dev, -"ib_register_mad_agent: invalid RMPP Version %u\n" , - rmpp_version); +dev_dbg_ratelimited (&device->dev, +"%s: invalid RMPP Version %u\n" , + __func__, rmpp_version); goto error1; }/* Validate MAD registration request if supplied */ if (mad_reg_req) {if (mad_reg_req->mgmt_class_version >=MAX_MGMT_VERSION ) { -dev_notice (&device->dev, -"ib_register_mad_agent: invalid Class Version %u\n" , - mad_reg_req->mgmt_class_version); +dev_dbg_ratelimited (&device->dev, +"%s: invalid Class Version %u\n" , + __func__, + mad_reg_req->mgmt_class_version); goto error1; }if (!recv_handler) { -dev_notice (&device->dev, -"ib_register_mad_agent: no recv_handler\n" ); +dev_dbg_ratelimited (&device->dev, +"%s: no recv_handler\n" , __func__); goto error1; }if (mad_reg_req->mgmt_class >=MAX_MGMT_CLASS ) {
@@ -250,9 +250,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,*/ if (mad_reg_req->mgmt_class !=IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid Mgmt Class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid Mgmt Class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }else if (mad_reg_req->mgmt_class ==0 ) {
@@ -260,8 +260,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,* Class 0 is reserved in IBA and is used for * aliasing of IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE */ -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid Mgmt Class 0\n" ); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid Mgmt Class 0\n" , + __func__); goto error1; }else if (is_vendor_class (mad_reg_req->mgmt_class)) {/*
@@ -269,18 +270,19 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,* ensure supplied OUI is not zero */ if (!is_vendor_oui (mad_reg_req->oui)) { -dev_notice (&device->dev, -"ib_register_mad_agent: No OUI specified for class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: No OUI specified for class 0x%x\n" , + __func__, + mad_reg_req->mgmt_class); goto error1; } }/* Make sure class supplied is consistent with RMPP */ if (!ib_is_mad_class_rmpp (mad_reg_req->mgmt_class)) {if (rmpp_version) { -dev_notice (&device->dev, -"ib_register_mad_agent: RMPP version for non-RMPP class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: RMPP version for non-RMPP class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }
@@ -291,9 +293,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, IB_MGMT_CLASS_SUBN_LID_ROUTED) && (mad_reg_req->mgmt_class != IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid SM QP type: class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid SM QP type: class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }else {
@@ -301,9 +303,9 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, IB_MGMT_CLASS_SUBN_LID_ROUTED) || (mad_reg_req->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid GS QP type: class 0x%x\n" , - mad_reg_req->mgmt_class); +dev_dbg_ratelimited (&device->dev, +"%s: Invalid GS QP type: class 0x%x\n" , + __func__, mad_reg_req->mgmt_class); goto error1; } }
@@ -318,18 +320,18 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,/* Validate device and port */ port_priv =ib_get_mad_port (device, port_num);if (!port_priv) { -dev_notice (&device->dev, -"ib_register_mad_agent: Invalid port %d\n" , - port_num); +dev_dbg_ratelimited (&device->dev,"%s: Invalid port %d\n" , + __func__, port_num); ret =ERR_PTR (-ENODEV ); goto error1; } -/* Verify the QP requested is supported. For example, Ethernet devices -* will not have QP0 */ +/* Verify the QP requested is supported. For example, Ethernet devices +* will not have QP0. +*/ if (!port_priv->qp_info[qpn].qp) { -dev_notice (&device->dev, -"ib_register_mad_agent: QP %d not supported\n" , qpn); +dev_dbg_ratelimited (&device->dev,"%s: QP %d not supported\n" , + __func__, qpn); ret =ERR_PTR (-EPROTONOSUPPORT ); goto error1; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 45/103 RDMA/core: Follow correct unregister order between sysfs and cgroup
In reply to Sasha LevinFrom: Parav Pandit <[email protected]>
[ Upstream commit c715a39541bb399eb03d728a996b224d90ce1336 ]
During register_device() init sequence is,
(a) register with rdma cgroup followed by
(b) register with sysfs
Therefore, unregister_device() sequence should follow the reverse order.
--- drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/device.c +1 -1
@@ -599,8 +599,8 @@ void ib_unregister_device(struct ib_device *device) }up_read (&lists_rwsem); -ib_device_unregister_rdmacg (device);ib_device_unregister_sysfs (device); +ib_device_unregister_rdmacg (device);mutex_unlock (&device_mutex);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 46/103 mips: txx9: fix iounmap related issue
In reply to Sasha LevinFrom: Ding Xiang <[email protected]>
[ Upstream commit c6e1241a82e6e74d1ae5cc34581dab2ffd6022d0 ]
if device_register return error, iounmap should be called, also iounmap need to call before put_device.
Patchwork: https://patchwork.linux-mips.org/patch/20476/
--- arch/mips/txx9/generic/setup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/mips/txx9/generic/setup.c +2 -3
@@ -959,12 +959,11 @@ void __init txx9_sramc_init(struct resource *r) goto exit_put; err =sysfs_create_bin_file (&dev->dev.kobj, &dev->bindata_attr);if (err) { -device_unregister (&dev->dev);iounmap (dev->base); -kfree (dev); +device_unregister (&dev->dev); }return ; exit_put: +iounmap (dev->base);put_device (&dev->dev); -return ; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 47/103 ASoC: Intel: hdac_hdmi: Limit sampling rates at dai creation
In reply to Sasha LevinFrom: Yong Zhi <[email protected]>
[ Upstream commit 3b857472f34faa7d11001afa5e158833812c98d7 ]
Playback of 44.1Khz contents with HDMI plugged returns "Invalid pipe config" because HDMI paths in the FW topology are configured to operate at 48Khz.
This patch filters out sampling rates not supported at hdac_hdmi_create_dais() to let user space SRC to do the converting.
--- sound/soc/codecs/hdac_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/soc/codecs/hdac_hdmi.c +6 -0
@@ -1408,6 +1408,12 @@ static int hdac_hdmi_create_dais(struct hdac_device *hdac,if (ret)return ret; +/* Filter out 44.1, 88.2 and 176.4Khz */ + rates &= ~(SNDRV_PCM_RATE_44100 |SNDRV_PCM_RATE_88200 | +SNDRV_PCM_RATE_176400 ); +if (!rates) +return -EINVAL ; +sprintf (dai_name,"intel-hdmi-hifi%d" , i+1 ); hdmi_dais[i].name =devm_kstrdup (&hdac->dev, dai_name,GFP_KERNEL );
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 48/103 of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC
In reply to Sasha LevinFrom: Rob Herring <[email protected]>
[ Upstream commit f6707fd6241e483f6fea2caae82d876e422bb11a ]
Cache nodes under the cpu node(s) is PowerMac specific according to the comment above, so make the code enforce that.
--- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/base.c +1 -1
@@ -1837,7 +1837,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)/* OF on pmac has nodes instead of properties named "l2-cache" * beneath CPU nodes. */ -if (!strcmp (np->type,"cpu" )) +if (IS_ENABLED (CONFIG_PPC_PMAC ) && !strcmp (np->type,"cpu" ))for_each_child_of_node (np, child)if (!strcmp (child->type,"cache" ))return child;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 49/103 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit fa0d7dc355c890725b6178dab0cc11b194203afa ]
needed for device variants based on GTA04 board but with different display panel (driver).
--- arch/arm/boot/dts/omap3-gta04.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -1
@@ -71,7 +71,7 @@ #sound-dai-cells = <0>; }; - spi_lcd { + spi_lcd: spi_lcd { compatible = "spi-gpio"; #address-cells = <0x1>; #size-cells = <0x0>;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 50/103 ARM: dts: omap3-gta04: fixes for tvout / venc
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit f6591391373dbff2c0200e1055d4ff86191578d2 ]
* fix connector compatibility (composite)
* add comment for gpio1 23
* add proper #address-cells
* we use only one venc_out channel for composite
--- arch/arm/boot/dts/omap3-gta04.dtsi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +7 -3
@@ -123,7 +123,7 @@ }; tv0: connector { - compatible = "svideo-connector"; + compatible = "composite-video-connector"; label = "tv"; port {
@@ -135,7 +135,7 @@ tv_amp: opa362 { compatible = "ti,opa362"; - enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; /* GPIO_23 to enable video out amplifier */ ports { #address-cells = <1>;
@@ -540,10 +540,14 @@ vdda-supply = <&vdac>; + #address-cells = <1>; + #size-cells = <0>; + port { + reg = <0>; venc_out: endpoint { remote-endpoint = <&opa_in>; - ti,channels = <2>; + ti,channels = <1>; ti,invert-polarity; }; };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 51/103 ARM: dts: omap3-gta04: tvout: enable as display1 alias
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit 8905592b6e50cec905e6c6035bbd36201a3bfac1 ]
The omap dss susbystem takes the display aliases to find out which displays exist. To enable tv-out we must define an alias.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -0
@@ -28,6 +28,7 @@ aliases { display0 = &lcd; + display1 = &tv0; }; gpio-keys {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 52/103 ARM: dts: omap3-gta04: fix touchscreen tsc2007
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit 7384a24248eda140a234d356b6c840701ee9f055 ]
we fix penirq polarity, add penirq pinmux and touchscreen properties.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +17 -1
@@ -275,6 +275,13 @@ OMAP3_CORE1_IOPAD(0x2134, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio112 */ >; }; + + penirq_pins: pinmux_penirq_pins { + pinctrl-single,pins = < + /* here we could enable to wakeup the cpu from suspend by a pen touch */ + OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio160 */ + >; + }; }; &omap3_pmx_core2 {
@@ -412,10 +419,19 @@ tsc2007@48 { compatible = "ti,tsc2007"; reg = <0x48>; + pinctrl-names = "default"; + pinctrl-0 = <&penirq_pins>; interrupt-parent = <&gpio6>; interrupts = <0 IRQ_TYPE_EDGE_FALLING>; /* GPIO_160 */ - gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; + gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* GPIO_160 */ ti,x-plate-ohms = <600>; + touchscreen-size-x = <480>; + touchscreen-size-y = <640>; + touchscreen-max-pressure = <1000>; + touchscreen-fuzz-x = <3>; + touchscreen-fuzz-y = <8>; + touchscreen-fuzz-pressure = <10>; + touchscreen-inverted-y; }; /* RFID EEPROM */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 53/103 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit fa99c21ecb3cd4021a60d0e8bf880e78b5bd0729 ]
Vendor defined U-Boot has changed the partition scheme a while ago:
* kernel partition 6MB
* file system partition uses the remainder up to end of the NAND
* increased size of the environment partition (to get an OneNAND compatible base address)
* shrink the U-Boot partition
Let's be compatible (e.g. Debian kernel built from upstream).
--- arch/arm/boot/dts/omap3-gta04.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -6
@@ -608,22 +608,22 @@ bootloaders@80000 { label = "U-Boot"; - reg = <0x80000 0x1e0000>; + reg = <0x80000 0x1c0000>; }; - bootloaders_env@260000 { + bootloaders_env@240000 { label = "U-Boot Env"; - reg = <0x260000 0x20000>; + reg = <0x240000 0x40000>; }; kernel@280000 { label = "Kernel"; - reg = <0x280000 0x400000>; + reg = <0x280000 0x600000>; }; - filesystem@680000 { + filesystem@880000 { label = "File System"; - reg = <0x680000 0xf980000>; + reg = <0x880000 0>; /* 0 = MTDPART_SIZ_FULL */ }; }; };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 54/103 ARM: dts: omap3-gta04: keep vpll2 always on
In reply to Sasha LevinFrom: "H. Nikolaus Schaller" <[email protected]>
[ Upstream commit 1ae00833e30c9b4af5cbfda65d75b1de12f74013 ]
This is needed to make the display and venc work properly. Compare to omap3-beagle.dts.
--- arch/arm/boot/dts/omap3-gta04.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -0
@@ -537,6 +537,12 @@ regulator-max-microvolt = <3150000>; }; +/* Needed to power the DPI pins */ + +&vpll2 { + regulator-always-on; +}; + &dss { pinctrl-names = "default"; pinctrl-0 = < &dss_dpi_pins >;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 55/103 sched/debug: Use symbolic names for task state constants
In reply to Sasha LevinFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit ff28915fd31ccafc0d38e6f84b66df280ed9e86a ]
include/trace/events/sched.h includes <linux/sched.h> (via <linux/sched/numa_balancing.h>) and so knows about the TASK_* constants used to interpret .prev_state. So instead of duplicating the magic numbers make use of the defined macros to ease understanding the mapping from state bits to letters which isn't completely intuitive for an outsider.
--- include/trace/events/sched.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
include/trace/events/sched.h +8 -3
@@ -169,9 +169,14 @@ TRACE_EVENT(sched_switch, (__entry->prev_state & (TASK_REPORT_MAX -1 )) ?__print_flags (__entry->prev_state & (TASK_REPORT_MAX -1 ),"|" , - { 0x01, "S" }, { 0x02, "D" }, { 0x04, "T" }, - { 0x08, "t" }, { 0x10, "X" }, { 0x20, "Z" }, - { 0x40, "P" }, { 0x80, "I" }) : + { TASK_INTERRUPTIBLE, "S" }, + { TASK_UNINTERRUPTIBLE, "D" }, + { __TASK_STOPPED, "T" }, + { __TASK_TRACED, "t" }, + { EXIT_DEAD, "X" }, + { EXIT_ZOMBIE, "Z" }, + { TASK_PARKED, "P" }, + { TASK_DEAD, "I" }) :"R" , __entry->prev_state & TASK_REPORT_MAX ? "+" : "",
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 56/103 arm64: dts: rockchip: Fix VCC5V0_HOST_EN on rk3399-sapphire
In reply to Sasha LevinFrom: Vicente Bergas <[email protected]>
[ Upstream commit bcdb578a5f5b4aea79441606ab7f0a2e076b4474 ]
The pin is GPIO4-D1 not GPIO1-D1, see schematic, page 15 for reference.
--- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +1 -1
@@ -136,7 +136,7 @@ vcc5v0_host: vcc5v0-host-regulator { compatible = "regulator-fixed"; enable-active-high; - gpio = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>; + gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_host_en>; regulator-name = "vcc5v0_host";
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 57/103 dmaengine: dma-jz4780: Don't depend on MACH_JZ4780
In reply to Sasha LevinFrom: Paul Cercueil <[email protected]>
[ Upstream commit c558ecd21c852c97ff98dc6c61f715ba420ec251 ]
If we make this driver depend on MACH_JZ4780, that means it can be enabled only if we're building a kernel specially crafted for a JZ4780-based board, while most GNU/Linux distributions will want one generic MIPS kernel that works on multiple boards.
--- drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/Kconfig +1 -1
@@ -143,7 +143,7 @@ config DMA_JZ4740 config DMA_JZ4780 tristate "JZ4780 DMA support" - depends on MACH_JZ4780 || COMPILE_TEST + depends on MIPS || COMPILE_TEST select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 58/103 dmaengine: dma-jz4780: Further residue status fix
In reply to Sasha LevinFrom: Daniel Silsby <[email protected]>
[ Upstream commit 83ef4fb7556b6a673f755da670cbacab7e2c7f1b ]
Func jz4780_dma_desc_residue() expects the index to the next hw descriptor as its last parameter. Caller func jz4780_dma_tx_status(), however, applied modulus before passing it. When the current hw descriptor was last in the list, the index passed became zero.
The resulting excess of reported residue especially caused problems with cyclic DMA transfer clients, i.e. ALSA AIC audio output, which rely on this for determining current DMA location within buffer.
Combined with the recent and related residue-reporting fixes, spurious ALSA audio underruns on jz4770 hardware are now fixed.
--- drivers/dma/dma-jz4780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/dma-jz4780.c +1 -1
@@ -580,7 +580,7 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan, to_jz4780_dma_desc(vdesc), 0); }else if (cookie == jzchan->desc->vdesc.tx.cookie) { txstate->residue =jz4780_dma_desc_residue (jzchan, jzchan->desc, - (jzchan->curr_hwdesc +1 ) % jzchan->desc->count); + jzchan->curr_hwdesc +1 ); }else txstate->residue =0 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 59/103 EDAC, sb_edac: Return early on ADDRV bit and address type test
In reply to Sasha LevinFrom: Qiuxu Zhuo <[email protected]>
[ Upstream commit dcc960b225ceb2bd66c45e0845d03e577f7010f9 ]
Users of the mce_register_decode_chain() are called for every logged error. EDAC drivers should check:
1) Is this a memory error? [bit 7 in status register]
2) Is there a valid address? [bit 58 in status register]
3) Is the address a system address? [bitfield 8:6 in misc register]
The sb_edac driver performed test "1" twice. Waited far too long to perform check "2". Didn't do check "3" at all.
Fix it by moving the test for valid address from sbridge_mce_output_error() into sbridge_mce_check_error() and add a test for the type immediately after. Delete the redundant check for the type of the error from sbridge_mce_output_error().
--- drivers/edac/sb_edac.c | 68 ++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 33 deletions(-)
drivers/edac/sb_edac.c +35 -33
@@ -2915,35 +2915,27 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,* cccc = channel * If the mask doesn't match, report an error to the parsing logic */ -if (! ((errcode &0xef80 ) ==0x80 )) { - optype ="Can't parse: it is not a mem" ; - }else { -switch (optypenum) { -case 0 : - optype ="generic undef request error" ; -break ; -case 1 : - optype ="memory read error" ; -break ; -case 2 : - optype ="memory write error" ; -break ; -case 3 : - optype ="addr/cmd error" ; -break ; -case 4 : - optype ="memory scrubbing error" ; -break ; -default : - optype ="reserved" ; -break ; - } +switch (optypenum) { +case 0 : + optype ="generic undef request error" ; +break ; +case 1 : + optype ="memory read error" ; +break ; +case 2 : + optype ="memory write error" ; +break ; +case 3 : + optype ="addr/cmd error" ; +break ; +case 4 : + optype ="memory scrubbing error" ; +break ; +default : + optype ="reserved" ; +break ; } -/* Only decode errors with an valid address (ADDRV) */ -if (!GET_BITFIELD (m->status,58 ,58 )) -return ; -if (pvt->info.type ==KNIGHTS_LANDING ) {if (channel ==14 ) { edac_dbg(0, "%s%s err_code:%04x:%04x EDRAM bank %d\n",
@@ -3049,17 +3041,11 @@ static int sbridge_mce_check_error(struct notifier_block *nb, unsigned long val, {struct mce *mce = (struct mce *)data;struct mem_ctl_info *mci; -struct sbridge_pvt *pvt;char *type;if (edac_get_report_status () ==EDAC_REPORTING_DISABLED )return NOTIFY_DONE ; - mci =get_mci_for_node_id (mce->socketid,IMC0 ); -if (!mci) -return NOTIFY_DONE ; - pvt = mci->pvt_info; -/* * Just let mcelog handle it if the error is * outside the memory controller. A memory error
@@ -3069,6 +3055,22 @@ static int sbridge_mce_check_error(struct notifier_block *nb, unsigned long val,if ((mce->status &0xefff ) >>7 !=1 )return NOTIFY_DONE ; +/* Check ADDRV bit in STATUS */ +if (!GET_BITFIELD (mce->status,58 ,58 )) +return NOTIFY_DONE ; + +/* Check MISCV bit in STATUS */ +if (!GET_BITFIELD (mce->status,59 ,59 )) +return NOTIFY_DONE ; + +/* Check address type in MISC (physical address only) */ +if (GET_BITFIELD (mce->misc,6 ,8 ) !=2 ) +return NOTIFY_DONE ; + + mci =get_mci_for_node_id (mce->socketid,IMC0 ); +if (!mci) +return NOTIFY_DONE ; +if (mce->mcgstatus &MCG_STATUS_MCIP ) type ="Exception" ;else
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 60/103 rtc: mt6397: fix possible race condition
In reply to Sasha LevinFrom: Alexandre Belloni <[email protected]>
[ Upstream commit babab2f86440352d24e76118fdd7d40cab5fd7bf ]
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference.
Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ.
--- drivers/rtc/rtc-mt6397.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/rtc/rtc-mt6397.c +8 -5
@@ -333,6 +333,10 @@ static int mtk_rtc_probe(struct platform_device *pdev)platform_set_drvdata (pdev, rtc); + rtc->rtc_dev =devm_rtc_allocate_device (rtc->dev); +if (IS_ERR (rtc->rtc_dev)) +return PTR_ERR (rtc->rtc_dev); + ret = request_threaded_irq(rtc->irq, NULL, mtk_rtc_irq_handler_thread, IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
@@ -345,11 +349,11 @@ static int mtk_rtc_probe(struct platform_device *pdev)device_init_wakeup (&pdev->dev,1 ); - rtc->rtc_dev =rtc_device_register ("mt6397-rtc" , &pdev->dev, - &mtk_rtc_ops,THIS_MODULE ); -if (IS_ERR (rtc->rtc_dev)) { + rtc->rtc_dev->ops = &mtk_rtc_ops; + + ret =rtc_register_device (rtc->rtc_dev); +if (ret) {dev_err (&pdev->dev,"register rtc device failed\n" ); - ret =PTR_ERR (rtc->rtc_dev); goto out_free_irq; }
@@ -366,7 +370,6 @@ static int mtk_rtc_remove(struct platform_device *pdev) {struct mt6397_rtc *rtc =platform_get_drvdata (pdev); -rtc_device_unregister (rtc->rtc_dev);free_irq (rtc->irq, rtc->rtc_dev);irq_dispose_mapping (rtc->irq);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 61/103 rtc: pl030: fix possible race condition
In reply to Sasha LevinFrom: Alexandre Belloni <[email protected]>
[ Upstream commit c778ec85825dc895936940072aea9fe9037db684 ]
The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference.
Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc before requesting the IRQ.
--- drivers/rtc/rtc-pl030.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/rtc/rtc-pl030.c +9 -6
@@ -112,6 +112,13 @@ static int pl030_probe(struct amba_device *dev, const struct amba_id *id) goto err_rtc; } + rtc->rtc =devm_rtc_allocate_device (&dev->dev); +if (IS_ERR (rtc->rtc)) { + ret =PTR_ERR (rtc->rtc); + goto err_rtc; + } + + rtc->rtc->ops = &pl030_ops; rtc->base =ioremap (dev->res.start,resource_size (&dev->res));if (!rtc->base) { ret = -ENOMEM ;
@@ -128,12 +135,9 @@ static int pl030_probe(struct amba_device *dev, const struct amba_id *id)if (ret) goto err_irq; - rtc->rtc =rtc_device_register ("pl030" , &dev->dev, &pl030_ops, -THIS_MODULE ); -if (IS_ERR (rtc->rtc)) { - ret =PTR_ERR (rtc->rtc); + ret =rtc_register_device (rtc->rtc); +if (ret) goto err_reg; - }return 0 ;
@@ -154,7 +158,6 @@ static int pl030_remove(struct amba_device *dev)writel (0 , rtc->base +RTC_CR );free_irq (dev->irq[0 ], rtc); -rtc_device_unregister (rtc->rtc);iounmap (rtc->base);amba_release_regions (dev);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 62/103 ath9k: add back support for using active monitor interfaces for tx99
In reply to Sasha LevinFrom: Felix Fietkau <[email protected]>
[ Upstream commit 6df0580be8bc30803c4d8b2ed9c2230a2740c795 ]
Various documented examples on how to set up tx99 with ath9k rely on setting up a regular monitor interface for setting the channel. My previous patch "ath9k: fix tx99 with monitor mode interface" made it possible to set it up this way again. However, it was removing support for using an active monitor interface, which is required for controlling the bitrate as well, since the bitrate is not passed down with a regular monitor interface.
This patch partially reverts the previous one, but keeps support for using a regular monitor interface to keep documented steps working in cases where the bitrate does not matter
--- drivers/net/wireless/ath/ath9k/ath9k.h | 1 + drivers/net/wireless/ath/ath9k/main.c | 10 ++++++++-- drivers/net/wireless/ath/ath9k/tx99.c | 7 +++++++ drivers/net/wireless/ath/ath9k/xmit.c | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +1 -0
@@ -1074,6 +1074,7 @@ struct ath_softc {struct ath_spec_scan_priv spec_priv; +struct ieee80211_vif *tx99_vif;struct sk_buff *tx99_skb;bool tx99_state;s16 tx99_power;
drivers/net/wireless/ath/ath9k/main.c +8 -2
@@ -1250,8 +1250,13 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,struct ath_vif *avp = (void *)vif->drv_priv;struct ath_node *an = &avp->mcast_node; -if (IS_ENABLED (CONFIG_ATH9K_TX99 )) -return -EOPNOTSUPP ; +if (IS_ENABLED (CONFIG_ATH9K_TX99 )) { +if (sc->cur_chan->nvifs >=1 ) { +mutex_unlock (&sc->mutex); +return -EOPNOTSUPP ; + } + sc->tx99_vif = vif; + }mutex_lock (&sc->mutex);
@@ -1336,6 +1341,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,ath9k_p2p_remove_vif (sc, vif); sc->cur_chan->nvifs--; + sc->tx99_vif =NULL ;if (!ath9k_is_chanctx_enabled ())list_del (&avp->list);
drivers/net/wireless/ath/ath9k/tx99.c +7 -0
@@ -54,6 +54,7 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)struct ieee80211_hdr *hdr;struct ieee80211_tx_info *tx_info;struct sk_buff *skb; +struct ath_vif *avp; skb =alloc_skb (len,GFP_KERNEL );if (!skb)
@@ -71,11 +72,17 @@ static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)memcpy (hdr->addr2, hw->wiphy->perm_addr,ETH_ALEN );memcpy (hdr->addr3, hw->wiphy->perm_addr,ETH_ALEN ); +if (sc->tx99_vif) { + avp = (struct ath_vif *) sc->tx99_vif->drv_priv; + hdr->seq_ctrl |=cpu_to_le16 (avp->seq_no); + } + tx_info =IEEE80211_SKB_CB (skb);memset (tx_info,0 ,sizeof (*tx_info)); rate = &tx_info->control.rates[0 ]; tx_info->band = sc->cur_chan->chandef.chan->band; tx_info->flags =IEEE80211_TX_CTL_NO_ACK ; + tx_info->control.vif = sc->tx99_vif; rate->count =1 ;if (ah->curchan &&IS_CHAN_HT (ah->curchan)) { rate->flags |=IEEE80211_TX_RC_MCS ;
drivers/net/wireless/ath/ath9k/xmit.c +1 -1
@@ -2952,7 +2952,7 @@ int ath9k_tx99_send(struct ath_softc *sc, struct sk_buff *skb,return -EINVAL ; } -ath_set_rates (NULL ,NULL , bf); +ath_set_rates (sc->tx99_vif,NULL , bf);ath9k_hw_set_desc_link (sc->sc_ah, bf->bf_desc, bf->bf_daddr);ath9k_hw_tx99_start (sc->sc_ah, txctl->txq->axq_qnum);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 63/103 IB/hfi1: Missing return value in error path for user sdma
In reply to Sasha LevinFrom: "Michael J. Ruhl" <[email protected]>
[ Upstream commit 2bf4b33f83dfe521c4c7c407b6b150aeec04d69c ]
If the set_txreq_header_agh() function returns an error, the exit path is chosen.
In this path, the code fails to set the return value. This will cause the caller to not realize an error has occurred.
Set the return value correctly in the error path.
--- drivers/infiniband/hw/hfi1/user_sdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/user_sdma.c +3 -1
@@ -856,8 +856,10 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, unsigned maxpkts) changes =set_txreq_header_ahg (req, tx, datalen); -if (changes <0 ) +if (changes <0 ) { + ret = changes; goto free_tx; + } } }else { ret = sdma_txinit(&tx->txreq, 0, sizeof(req->hdr) +
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 64/103 signal: Always ignore SIGKILL and SIGSTOP sent to the global init
In reply to Sasha LevinFrom: "Eric W. Biederman" <[email protected]>
[ Upstream commit 86989c41b5ea08776c450cb759592532314a4ed6 ]
If the first process started (aka /sbin/init) receives a SIGKILL it will panic the system if it is delivered. Making the system unusable and undebugable. It isn't much better if the first process started receives SIGSTOP.
So always ignore SIGSTOP and SIGKILL sent to init.
This is done in a separate clause in sig_task_ignored as force_sig_info can clear SIG_UNKILLABLE and this protection should work even then.
--- kernel/signal.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/signal.c +4 -0
@@ -77,6 +77,10 @@ static int sig_task_ignored(struct task_struct *t, int sig, bool force) handler =sig_handler (t, sig); +/* SIGKILL and SIGSTOP may not be sent to the global init */ +if (unlikely (is_global_init (t) &&sig_kernel_only (sig))) +return true; +if (unlikely (t->signal->flags &SIGNAL_UNKILLABLE ) && handler ==SIG_DFL && !(force &&sig_kernel_only (sig)))return 1 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 65/103 signal: Properly deliver SIGILL from uprobes
In reply to Sasha LevinFrom: "Eric W. Biederman" <[email protected]>
[ Upstream commit 55a3235fc71bf34303e34a95eeee235b2d2a35dd ]
For userspace to tell the difference between a random signal and an exception, the exception must include siginfo information.
Using SEND_SIG_FORCED for SIGILL is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver.
Therefore replace force_sig_info(SIGILL, SEND_SIG_FORCE, current) with force_sig(SIG_ILL, current) which gets this right and is shorter and easier to type.
--- kernel/events/uprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/events/uprobes.c +2 -2
@@ -1854,7 +1854,7 @@ static void handle_trampoline(struct pt_regs *regs) sigill:uprobe_warn (current,"handle uretprobe, sending SIGILL." ); -force_sig_info (SIGILL ,SEND_SIG_FORCED , current); +force_sig (SIGILL , current); }
@@ -1970,7 +1970,7 @@ static void handle_singlestep(struct uprobe_task *utask, struct pt_regs *regs)if (unlikely (err)) {uprobe_warn (current,"execute the probed insn, sending SIGILL." ); -force_sig_info (SIGILL ,SEND_SIG_FORCED , current); +force_sig (SIGILL , current); } }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 66/103 signal: Properly deliver SIGSEGV from x86 uprobes
In reply to Sasha LevinFrom: "Eric W. Biederman" <[email protected]>
[ Upstream commit 4a63c1ffd384ebdce40aac9c997dab68379137be ]
For userspace to tell the difference between an random signal and an exception, the exception must include siginfo information.
Using SEND_SIG_FORCED for SIGSEGV is thus wrong, and it will result in userspace seeing si_code == SI_USER (like a random signal) instead of si_code == SI_KERNEL or a more specific si_code as all exceptions deliver.
Therefore replace force_sig_info(SIGSEGV, SEND_SIG_FORCE, current) with force_sig(SIG_SEGV, current) which gets this right and is shorter and easier to type.
--- arch/x86/kernel/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/uprobes.c +1 -1
@@ -987,7 +987,7 @@ arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regspr_err ("uprobe: return address clobbered: pid=%d, %%sp=%#lx, " "%%ip=%#lx\n" , current->pid, regs->sp, regs->ip); -force_sig_info (SIGSEGV ,SEND_SIG_FORCED , current); +force_sig (SIGSEGV , current); }return -1 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 67/103 f2fs: fix memory leak of percpu counter in fill_super()
In reply to Sasha LevinFrom: Chao Yu <[email protected]>
[ Upstream commit 4a70e255449c9a13eed7a6eeecc85a1ea63cef76 ]
In fill_super -> init_percpu_info, we should destroy percpu counter in error path, otherwise memory allcoated for percpu counter will leak.
--- fs/f2fs/super.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/f2fs/super.c +5 -1
@@ -2117,8 +2117,12 @@ static int init_percpu_info(struct f2fs_sb_info *sbi)if (err)return err; -return percpu_counter_init (&sbi->total_valid_inode_count,0 , + err =percpu_counter_init (&sbi->total_valid_inode_count,0 ,GFP_KERNEL ); +if (err) +percpu_counter_destroy (&sbi->alloc_valid_block_count); + +return err; }#ifdef CONFIG_BLK_DEV_ZONED
Signature · 8 lines
2.20.1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Sasha Levin
maintainerPATCH 68/103 scsi: qla2xxx: Fix iIDMA error
In reply to Sasha LevinFrom: Quinn Tran <[email protected]>
[ Upstream commit 8d9bf0a9a268f7ca0b811d6e6a1fc783afa5c746 ]
When switch responds with error for Get Port Speed Command (GPSC), driver should not proceed with telling FW about the speed of the remote port.
--- drivers/scsi/qla2xxx/qla_gs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_gs.c +2 -2
@@ -3033,7 +3033,7 @@ static void qla24xx_async_gpsc_sp_done(void *s, int res)ql_dbg (ql_dbg_disc, vha,0x2019 ,"GPSC command unsupported, disabling query.\n" ); ha->flags.gpsc_supported =0 ; - res =QLA_SUCCESS ; + goto done; } }else {switch (be16_to_cpu (ct_rsp->rsp.gpsc.speed)) {
@@ -3066,13 +3066,13 @@ static void qla24xx_async_gpsc_sp_done(void *s, int res)be16_to_cpu (ct_rsp->rsp.gpsc.speeds), be16_to_cpu(ct_rsp->rsp.gpsc.speed)); } -done:memset (&ea,0 ,sizeof (ea)); ea.event =FCME_GPSC_DONE ; ea.rc = res; ea.fcport = fcport;qla2x00_fcport_event_handler (vha, &ea); +done: sp->free (sp); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 69/103 scsi: qla2xxx: Defer chip reset until target mode is enabled
In reply to Sasha LevinFrom: Quinn Tran <[email protected]>
[ Upstream commit 93eca6135183f7a71e36acd47655a085ed11bcdc ]
For target mode, any chip reset triggered before target mode is enabled will be held off until user is ready to enable. This prevents the chip from starting or running before it is intended.
--- drivers/scsi/qla2xxx/qla_os.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +21 -7
@@ -5797,12 +5797,27 @@ qla2x00_do_dpc(void *data)if (test_and_clear_bit (ISP_ABORT_NEEDED , &base_vha->dpc_flags) && !test_bit (UNLOADING , &base_vha->dpc_flags)) { +bool do_reset = true; + +switch (ql2x_ini_mode) { +case QLA2XXX_INI_MODE_ENABLED : +break ; +case QLA2XXX_INI_MODE_DISABLED : +if (!qla_tgt_mode_enabled (base_vha)) + do_reset = false; +break ; +case QLA2XXX_INI_MODE_DUAL : +if (!qla_dual_mode_enabled (base_vha)) + do_reset = false; +break ; +default : +break ; + } -ql_dbg (ql_dbg_dpc, base_vha,0x4007 , -"ISP abort scheduled.\n" ); -if (!(test_and_set_bit (ABORT_ISP_ACTIVE , +if (do_reset && !(test_and_set_bit (ABORT_ISP_ACTIVE , &base_vha->dpc_flags))) { - +ql_dbg (ql_dbg_dpc, base_vha,0x4007 , +"ISP abort scheduled.\n" );if (ha->isp_ops->abort_isp (base_vha)) {/* failed. retry later */ set_bit(ISP_ABORT_NEEDED,
@@ -5810,10 +5825,9 @@ qla2x00_do_dpc(void *data) }clear_bit (ABORT_ISP_ACTIVE , &base_vha->dpc_flags); +ql_dbg (ql_dbg_dpc, base_vha,0x4008 , +"ISP abort end.\n" ); } - -ql_dbg (ql_dbg_dpc, base_vha,0x4008 , -"ISP abort end.\n" ); } if (test_and_clear_bit(FCPORT_UPDATE_NEEDED,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 70/103 scsi: qla2xxx: Fix dropped srb resource.
In reply to Sasha LevinFrom: Quinn Tran <[email protected]>
[ Upstream commit 527b8ae3948bb59c13ebaa7d657ced56ea25ab05 ]
When FW rejects a command due to "entry_status" error (malform IOCB), the srb resource needs to be returned back for cleanup. The filter to catch this is in the wrong location.
--- drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_isr.c +1 -1
@@ -2792,6 +2792,7 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)case ELS_IOCB_TYPE :case ABORT_IOCB_TYPE :case MBX_IOCB_TYPE : +default : sp =qla2x00_get_sp_from_handle (vha, func, req, pkt);if (sp) { sp->done (sp, res);
@@ -2802,7 +2803,6 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)case ABTS_RESP_24XX :case CTIO_TYPE7 :case CTIO_CRC2 : -default :return 1 ; } fatal:
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 71/103 scsi: lpfc: Fix errors in log messages.
In reply to Sasha LevinFrom: James Smart <[email protected]>
[ Upstream commit 2879265f514b1f4154288243c91438ddbedb3ed4 ]
Message 6408 is displayed for each entry in an array, but the cpu and queue numbers were incorrect for the entry. Message 6001 includes an extraneous character.
Resolve both issues
--- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/scsi/lpfc/lpfc_nvme.c +1 -1
@@ -144,7 +144,7 @@ lpfc_nvme_delete_queue(struct nvme_fc_local_port *pnvme_lport, vport = lport->vport;lpfc_printf_vlog (vport,KERN_INFO ,LOG_NVME , -"6001 ENTER. lpfc_pnvme %p, qidx x%xi qhandle %p\n" , +"6001 ENTER. lpfc_pnvme %p, qidx x%x qhandle %p\n" , lport, qidx, handle);kfree (handle); }
drivers/scsi/lpfc/lpfc_nvmet.c +3 -4
@@ -1078,15 +1078,14 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) idx =0 ; } - infop = phba->sli4_hba.nvmet_ctx_info; -for (j =0 ; j < phba->cfg_nvmet_mrq; j++) { -for (i =0 ; i < phba->sli4_hba.num_present_cpu; i++) { +for (i =0 ; i < phba->sli4_hba.num_present_cpu; i++) { +for (j =0 ; j < phba->cfg_nvmet_mrq; j++) { + infop =lpfc_get_ctx_list (phba, i, j);lpfc_printf_log (phba,KERN_INFO ,LOG_NVME |LOG_INIT ,"6408 TOTAL NVMET ctx for CPU %d " "MRQ %d: cnt %d nextcpu %p\n" , i, j, infop->nvmet_ctx_list_cnt, infop->nvmet_ctx_next_cpu); - infop++; } }return 0 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 72/103 scsi: sym53c8xx: fix NULL pointer dereference panic in sym_int_sir()
In reply to Sasha LevinFrom: George Kennedy <[email protected]>
[ Upstream commit 288315e95264b6355e26609e9dec5dc4563d4ab0 ]
sym_int_sir() in sym_hipd.c does not check the command pointer for NULL before using it in debug message prints.
--- drivers/scsi/sym53c8xx_2/sym_hipd.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/scsi/sym53c8xx_2/sym_hipd.c +11 -4
@@ -4371,6 +4371,13 @@ static void sym_nego_rejected(struct sym_hcb *np, struct sym_tcb *tp, struct symOUTB (np,HS_PRT ,HS_BUSY ); } +#define sym_printk(lvl, tp, cp, fmt, v...) do { \ + if (cp) \ + scmd_printk(lvl, cp->cmd, fmt, ##v); \ + else \ + starget_printk(lvl, tp->starget, fmt, ##v); \ +} while (0) +/* * chip exception handler for programmed interrupts. */
@@ -4416,7 +4423,7 @@ static void sym_int_sir(struct sym_hcb *np)* been selected with ATN. We do not want to handle that. */ case SIR_SEL_ATN_NO_MSG_OUT : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No MSG OUT phase after selection with ATN\n" ); goto out_stuck;/*
@@ -4424,7 +4431,7 @@ static void sym_int_sir(struct sym_hcb *np)* having reselected the initiator. */ case SIR_RESEL_NO_MSG_IN : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No MSG IN phase after reselection\n" ); goto out_stuck;/*
@@ -4432,7 +4439,7 @@ static void sym_int_sir(struct sym_hcb *np)* an IDENTIFY. */ case SIR_RESEL_NO_IDENTIFY : -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"No IDENTIFY after reselection\n" ); goto out_stuck;/*
@@ -4461,7 +4468,7 @@ static void sym_int_sir(struct sym_hcb *np)case SIR_RESEL_ABORTED : np->lastmsg = np->msgout[0 ]; np->msgout[0 ] =M_NOOP ; -scmd_printk (KERN_WARNING , cp->cmd, +sym_printk (KERN_WARNING , tp, cp,"message %x sent on bad reselection\n" , np->lastmsg); goto out;/*
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 73/103 ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set
In reply to Sasha LevinFrom: Oleksij Rempel <[email protected]>
[ Upstream commit 8148d2136002da2e2887caf6a07bbd9c033f14f3 ]
One of the Freescale recommended sequences for power off with external PMIC is the following:
...
3. SoC is programming PMIC for power off when standby is asserted.
4. In CCM STOP mode, Standby is asserted, PMIC gates SoC supplies.
See:
http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf
page 5083
This patch implements step 4. of this sequence.
--- arch/arm/mach-imx/pm-imx6.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/mach-imx/pm-imx6.c +25 -0
@@ -604,6 +604,28 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata IMX6Q_GPR1_GINT); } +static void imx6_pm_stby_poweroff (void ) +{ +imx6_set_lpm (STOP_POWER_OFF ); +imx6q_suspend_finish (0 ); + +mdelay (1000 ); + +pr_emerg ("Unable to poweroff system\n" ); +} + +static int imx6_pm_stby_poweroff_probe (void ) +{ +if (pm_power_off) { +pr_warn ("%s: pm_power_off already claimed %p %pf!\n" , + __func__, pm_power_off, pm_power_off); +return -EBUSY ; + } + + pm_power_off = imx6_pm_stby_poweroff; +return 0 ; +} +void __init imx6_pm_ccm_init (const char *ccm_compat) {struct device_node *np;
@@ -620,6 +642,9 @@ void __init imx6_pm_ccm_init(const char *ccm_compat) val =readl_relaxed (ccm_base +CLPCR ); val &= ~BM_CLPCR_LPM ;writel_relaxed (val, ccm_base +CLPCR ); + +if (of_property_read_bool (np,"fsl,pmic-stby-poweroff" )) +imx6_pm_stby_poweroff_probe (); }void __init imx6q_pm_init (void )
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 74/103 scsi: pm80xx: Corrected dma_unmap_sg() parameter
In reply to Sasha LevinFrom: Deepak Ukey <[email protected]>
[ Upstream commit 76cb25b058034d37244be6aca97a2ad52a5fbcad ]
For the function dma_unmap_sg(), the <nents> parameter should be number of elements in the scatter list prior to the mapping, not after the mapping.
--- drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pm8001/pm8001_sas.c +1 -1
@@ -466,7 +466,7 @@ static int pm8001_task_exec(struct sas_task *task,dev_printk (KERN_ERR , pm8001_ha->dev,"pm8001 exec failed[%d]!\n" , rc);if (!sas_protocol_ata (t->task_proto))if (n_elem) -dma_unmap_sg (pm8001_ha->dev, t->scatter, n_elem, +dma_unmap_sg (pm8001_ha->dev, t->scatter, t->num_scatter, t->data_dir); out_done:spin_unlock_irqrestore (&pm8001_ha->lock, flags);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 75/103 scsi: pm80xx: Fixed system hang issue during kexec boot
In reply to Sasha LevinFrom: Deepak Ukey <[email protected]>
[ Upstream commit 72349b62a571effd6faadd0600b8e657dd87afbf ]
When the firmware is not responding, execution of kexec boot causes a system hang. When firmware assertion happened, driver get notified with interrupt vector updated in MPI configuration table. Then, the driver will read scratchpad register and set controller_fatal_error flag to true.
--- drivers/scsi/pm8001/pm8001_hwi.c | 6 +++ drivers/scsi/pm8001/pm8001_sas.c | 7 +++ drivers/scsi/pm8001/pm8001_sas.h | 1 + drivers/scsi/pm8001/pm80xx_hwi.c | 80 +++++++++++++++++++++++++++++--- drivers/scsi/pm8001/pm80xx_hwi.h | 3 ++ 5 files changed, 91 insertions(+), 6 deletions(-)
drivers/scsi/pm8001/pm8001_hwi.c +6 -0
@@ -1479,6 +1479,12 @@ u32 pm8001_mpi_msg_consume(struct pm8001_hba_info *pm8001_ha, }else {u32 producer_index;void *pi_virt = circularQ->pi_virt; +/* spurious interrupt during setup if +* kexec-ing and driver doing a doorbell access +* with the pre-kexec oq interrupt setup +*/ +if (!pi_virt) +break ;/* Update the producer index from SPC */ producer_index =pm8001_read_32 (pi_virt); circularQ->producer_index =cpu_to_le32 (producer_index);
drivers/scsi/pm8001/pm8001_sas.c +7 -0
@@ -374,6 +374,13 @@ static int pm8001_task_exec(struct sas_task *task,return 0 ; } pm8001_ha =pm8001_find_ha_by_dev (task->dev); +if (pm8001_ha->controller_fatal_error) { +struct task_status_struct *ts = &t->task_status; + + ts->resp =SAS_TASK_UNDELIVERED ; + t->task_done (t); +return 0 ; + }PM8001_IO_DBG (pm8001_ha,pm8001_printk ("pm8001_task_exec device \n " ));spin_lock_irqsave (&pm8001_ha->lock, flags); do {
drivers/scsi/pm8001/pm8001_sas.h +1 -0
@@ -529,6 +529,7 @@ struct pm8001_hba_info {u32 logging_level;u32 fw_status;u32 smp_exp_mode; +bool controller_fatal_error;const struct firmware *fw_image;struct isr_param irq_vector[PM8001_MAX_MSIX_VEC ]; };
drivers/scsi/pm8001/pm80xx_hwi.c +74 -6
115 lines not on this page · raw message
drivers/scsi/pm8001/pm80xx_hwi.h +3 -0
@@ -1288,6 +1288,9 @@ typedef struct SASProtocolTimerConfig SASProtocolTimerConfig_t;#define SCRATCH_PAD_BOOT_LOAD_SUCCESS 0x0#define SCRATCH_PAD_IOP0_READY 0xC00#define SCRATCH_PAD_IOP1_READY 0x3000 +#define SCRATCH_PAD_MIPSALL_READY (SCRATCH_PAD_IOP1_READY | \ + SCRATCH_PAD_IOP0_READY | \ + SCRATCH_PAD_RAAE_READY)/* boot loader state */ #define SCRATCH_PAD1_BOOTSTATE_MASK 0x70/* Bit 4-6 */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 76/103 kprobes: Don't call BUG_ON() if there is a kprobe in use on free list
In reply to Sasha LevinFrom: Masami Hiramatsu <[email protected]>
[ Upstream commit cbdd96f5586151e48317d90a403941ec23f12660 ]
Instead of calling BUG_ON(), if we find a kprobe in use on free kprobe list, just remove it from the list and keep it on kprobe hash list as same as other in-use kprobes.
--- kernel/kprobes.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
kernel/kprobes.c +7 -1
@@ -544,8 +544,14 @@ static void do_free_cleaned_kprobes(void)struct optimized_kprobe *op, *tmp;list_for_each_entry_safe (op, tmp, &freeing_list, list) { -BUG_ON (!kprobe_unused (&op->kp));list_del_init (&op->list); +if (WARN_ON_ONCE (!kprobe_unused (&op->kp))) { +/* +* This must not happen, but if there is a kprobe +* still in use, keep it on kprobes hash list. +*/ +continue ; + }free_aggr_kprobe (&op->kp); } }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 77/103 Drivers: hv: vmbus: Fix synic per-cpu context initialization
In reply to Sasha LevinFrom: Michael Kelley <[email protected]>
[ Upstream commit f25a7ece08bdb1f2b3c4bbeae942682fc3a99dde ]
If hv_synic_alloc() errors out, the state of the per-cpu context for some CPUs is unknown since the zero'ing is done as each CPU is iterated over. In such case, hv_synic_cleanup() may try to free memory based on uninitialized values. Fix this by zero'ing the per-cpu context for all CPUs before doing any memory allocations that might fail.
--- drivers/hv/hv.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/hv/hv.c +12 -3
@@ -148,6 +148,17 @@ static void hv_init_clockevent_device(struct clock_event_device *dev, int cpu)int hv_synic_alloc (void ) {int cpu; +struct hv_per_cpu_context *hv_cpu; + +/* +* First, zero all per-cpu memory areas so hv_synic_free() can +* detect what memory has been allocated and cleanup properly +* after any failures. +*/ +for_each_present_cpu (cpu) { + hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); +memset (hv_cpu,0 ,sizeof (*hv_cpu)); + } hv_context.hv_numa_map =kzalloc (sizeof (struct cpumask ) * nr_node_ids,GFP_ATOMIC );
@@ -157,10 +168,8 @@ int hv_synic_alloc(void) }for_each_present_cpu (cpu) { -struct hv_per_cpu_context *hv_cpu - =per_cpu_ptr (hv_context.cpu_context, cpu); + hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); -memset (hv_cpu,0 ,sizeof (*hv_cpu));tasklet_init (&hv_cpu->msg_dpc, vmbus_on_msg_dpc, (unsigned long ) hv_cpu);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 78/103 nvmem: core: return error code instead of NULL from nvmem_device_get
In reply to Sasha LevinFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit ca6ac25cecf0e740d7cc8e03e0ebbf8acbeca3df ]
nvmem_device_get() should return ERR_PTR() on error or valid pointer on success, but one of the code path seems to return NULL, so fix it.
--- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/core.c +1 -1
@@ -617,7 +617,7 @@ static struct nvmem_device *nvmem_find(const char *name) d =bus_find_device (&nvmem_bus_type,NULL , (void *)name, nvmem_match);if (!d) -return NULL ; +return ERR_PTR (-ENOENT );return to_nvmem_device (d); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 79/103 media: dt-bindings: adv748x: Fix decimal unit addresses
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 27582f0ea97fe3e4a38beb98ab36cce4b6f029d5 ]
With recent dtc and W=1:
Warning (graph_port): video-receiver@70/port@10: graph node unit address error, expected "a" Warning (graph_port): video-receiver@70/port@11: graph node unit address error, expected "b"
Unit addresses are always hexadecimal (without prefix), while the bases of reg property values depend on their prefixes.
--- Documentation/devicetree/bindings/media/i2c/adv748x.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/media/i2c/adv748x.txt +2 -2
@@ -73,7 +73,7 @@ Example: }; }; - port@10 { + port@a { reg = <10>; adv7482_txa: endpoint {
@@ -83,7 +83,7 @@ Example: }; }; - port@11 { + port@b { reg = <11>; adv7482_txb: endpoint {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 80/103 media: fix: media: pci: meye: validate offset to avoid arbitrary access
In reply to Sasha LevinFrom: Lao Wei <[email protected]>
[ Upstream commit eac7230fdb4672c2cb56f6a01a1744f562c01f80 ]
Motion eye video4linux driver for Sony Vaio PictureBook desn't validate user-controlled parameter 'vma->vm_pgoff', a malicious process might access all of kernel memory from user space by trying pass different arbitrary address.
Discussion: http://www.openwall.com/lists/oss-security/2018/07/06/1
--- drivers/media/pci/meye/meye.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/meye/meye.c +1 -1
@@ -1460,7 +1460,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma)unsigned long page, pos;mutex_lock (&meye.lock); -if (size > gbuffers * gbufsize) { +if (size > gbuffers * gbufsize || offset > gbuffers * gbufsize - size) {mutex_unlock (&meye.lock);return -EINVAL ; }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 81/103 media: dvb: fix compat ioctl translation
In reply to Sasha LevinFrom: Arnd Bergmann <[email protected]>
[ Upstream commit 1ccbeeb888ac33627d91f1ccf0b84ef3bcadef24 ]
The VIDEO_GET_EVENT and VIDEO_STILLPICTURE was added back in 2005 but it never worked because the command number is wrong.
Using the right command number means we have a better chance of them actually doing the right thing, though clearly nobody has ever tried it successfully.
I noticed these while auditing the remaining users of compat_time_t for y2038 bugs. This one is fine in that regard, it just never did anything.
--- fs/compat_ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/compat_ioctl.c +6 -4
@@ -161,6 +161,7 @@ struct compat_video_event {unsigned int frame_rate; } u; }; +#define VIDEO_GET_EVENT32 _IOR('o', 28, struct compat_video_event)static int do_video_get_event (struct file *file,unsigned int cmd,struct compat_video_event __user *up)
@@ -172,7 +173,7 @@ static int do_video_get_event(struct file *file,if (kevent ==NULL )return -EFAULT ; - err =do_ioctl (file, cmd, (unsigned long )kevent); + err =do_ioctl (file,VIDEO_GET_EVENT , (unsigned long )kevent);if (!err) { err =convert_in_user (&kevent->type, &up->type); err |=convert_in_user (&kevent->timestamp, &up->timestamp);
@@ -191,6 +192,7 @@ struct compat_video_still_picture {compat_uptr_t iFrame;int32_t size; }; +#define VIDEO_STILLPICTURE32 _IOW('o', 30, struct compat_video_still_picture)static int do_video_stillpicture (struct file *file,unsigned int cmd,struct compat_video_still_picture __user *up)
@@ -213,7 +215,7 @@ static int do_video_stillpicture(struct file *file,if (err)return -EFAULT ; - err =do_ioctl (file, cmd, (unsigned long ) up_native); + err =do_ioctl (file,VIDEO_STILLPICTURE , (unsigned long ) up_native);return err; }
@@ -1476,9 +1478,9 @@ static long do_ioctl_trans(unsigned int cmd,return rtc_ioctl (file, cmd, argp);/* dvb */ -case VIDEO_GET_EVENT : +case VIDEO_GET_EVENT32 :return do_video_get_event (file, cmd, argp); -case VIDEO_STILLPICTURE : +case VIDEO_STILLPICTURE32 :return do_video_stillpicture (file, cmd, argp);case VIDEO_SET_SPU_PALETTE :return do_video_set_spu_palette (file, cmd, argp);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 82/103 arm64: dts: meson: libretech: update board model
In reply to Sasha LevinFrom: Jerome Brunet <[email protected]>
[ Upstream commit b7eb0e26cc4a212fde09144cd49d4103170d2b9e ]
There is actually several different libretech board with the CC suffix so the model name is not appropriate here. Update to something more specific
--- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +1 -1
@@ -14,7 +14,7 @@ / { compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl"; - model = "Libre Technology CC"; + model = "Libre Computer Board AML-S905X-CC"; aliases { serial0 = &uart_AO;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 83/103 ALSA: intel8x0m: Register irq handler after register initializations
In reply to Sasha LevinFrom: Takashi Iwai <[email protected]>
[ Upstream commit 7064f376d4a10686f51c879401a569bb4babf9c6 ]
The interrupt handler has to be acquired after the other resource initialization when allocated with IRQF_SHARED. Otherwise it's triggered before the resource gets ready, and may lead to unpleasant behavior.
--- sound/pci/intel8x0m.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
sound/pci/intel8x0m.c +10 -10
@@ -1171,16 +1171,6 @@ static int snd_intel8x0m_create(struct snd_card *card, } port_inited: -if (request_irq (pci->irq, snd_intel8x0m_interrupt,IRQF_SHARED , -KBUILD_MODNAME , chip)) { -dev_err (card->dev,"unable to grab IRQ %d\n" , pci->irq); -snd_intel8x0m_free (chip); -return -EBUSY ; - } - chip->irq = pci->irq; -pci_set_master (pci); -synchronize_irq (chip->irq); -/* initialize offsets */ chip->bdbars_count =2 ; tbl = intel_regs;
@@ -1224,11 +1214,21 @@ static int snd_intel8x0m_create(struct snd_card *card, chip->int_sta_reg =ICH_REG_GLOB_STA ; chip->int_sta_mask = int_sta_masks; +pci_set_master (pci); +if ((err =snd_intel8x0m_chip_init (chip,1 )) <0 ) {snd_intel8x0m_free (chip);return err; } +if (request_irq (pci->irq, snd_intel8x0m_interrupt,IRQF_SHARED , +KBUILD_MODNAME , chip)) { +dev_err (card->dev,"unable to grab IRQ %d\n" , pci->irq); +snd_intel8x0m_free (chip); +return -EBUSY ; + } + chip->irq = pci->irq; +if ((err =snd_device_new (card,SNDRV_DEV_LOWLEVEL , chip, &ops)) <0 ) {snd_intel8x0m_free (chip);return err;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 84/103 pinctrl: at91-pio4: fix has_config check in atmel_pctl_dt_subnode_to_map()
In reply to Sasha LevinFrom: Dan Carpenter <[email protected]>
[ Upstream commit b97760ae8e3dc8bb91881c13425a0bff55f2bd85 ]
Smatch complains about this condition:
if (has_config && num_pins >= 1)
The "has_config" variable is either uninitialized or true. The "num_pins" variable is unsigned and we verified that it is non-zero on the lines before so we know "num_pines >= 1" is true. Really, we could just check "num_configs" directly and remove the "has_config" variable.
--- drivers/pinctrl/pinctrl-at91-pio4.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/pinctrl/pinctrl-at91-pio4.c +2 -6
@@ -483,7 +483,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,unsigned num_pins, num_configs, reserve;unsigned long *configs;struct property *pins; -bool has_config;u32 pinfunc;int ret, i;
@@ -499,9 +498,6 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,return ret; } -if (num_configs) - has_config = true; - num_pins = pins->length /sizeof (u32);if (!num_pins) {dev_err (pctldev->dev,"no pins found in node %pOF\n" , np);
@@ -514,7 +510,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,* map for each pin. */ reserve =1 ; -if (has_config && num_pins >=1 ) +if (num_configs) reserve++; reserve *= num_pins; ret = pinctrl_utils_reserve_map(pctldev, map, reserved_maps, num_maps,
@@ -537,7 +533,7 @@ static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev,pinctrl_utils_add_map_mux (pctldev, map, reserved_maps, num_maps, group, func); -if (has_config) { +if (num_configs) { ret = pinctrl_utils_add_map_configs(pctldev, map, reserved_maps, num_maps, group, configs, num_configs,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 85/103 MIPS: lantiq: Do not enable IRQs in dma open
In reply to Sasha LevinFrom: Hauke Mehrtens <[email protected]>
[ Upstream commit cc973aecf0b0541918c5ecabe6c90d1f709b5f89 ]
When a DMA channel is opened the IRQ should not get activated automatically, this allows it to pull data out manually without the help of interrupts. This is needed for a workaround in the vrx200 Ethernet driver.
--- arch/mips/lantiq/xway/dma.c | 1 - drivers/net/ethernet/lantiq_etop.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
arch/mips/lantiq/xway/dma.c +0 -1
@@ -106,7 +106,6 @@ ltq_dma_open(struct ltq_dma_channel *ch)spin_lock_irqsave (<q_dma_lock, flag);ltq_dma_w32 (ch->nr,LTQ_DMA_CS );ltq_dma_w32_mask (0 ,DMA_CHAN_ON ,LTQ_DMA_CCTRL ); -ltq_dma_w32_mask (0 ,1 << ch->nr,LTQ_DMA_IRNEN );spin_unlock_irqrestore (<q_dma_lock, flag); }EXPORT_SYMBOL_GPL (ltq_dma_open);
drivers/net/ethernet/lantiq_etop.c +1 -0
@@ -438,6 +438,7 @@ ltq_etop_open(struct net_device *dev)if (!IS_TX (i) && (!IS_RX (i)))continue ;ltq_dma_open (&ch->dma); +ltq_dma_enable_irq (&ch->dma);napi_enable (&ch->napi); }phy_start (dev->phydev);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 86/103 llc: avoid blocking in llc_sap_close()
In reply to Sasha LevinFrom: Cong Wang <[email protected]>
[ Upstream commit 9708d2b5b7c648e8e0a40d11e8cea12f6277f33c ]
llc_sap_close() is called by llc_sap_put() which could be called in BH context in llc_rcv(). We can't block in BH.
There is no reason to block it here, kfree_rcu() should be sufficient.
--- include/net/llc.h | 1 + net/llc/llc_core.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
include/net/llc.h +1 -0
@@ -66,6 +66,7 @@ struct llc_sap {int sk_count;struct hlist_nulls_head sk_laddr_hash[LLC_SK_LADDR_HASH_ENTRIES ];struct hlist_head sk_dev_hash[LLC_SK_DEV_HASH_ENTRIES ]; +struct rcu_head rcu; }; static inline
net/llc/llc_core.c +1 -3
@@ -127,9 +127,7 @@ void llc_sap_close(struct llc_sap *sap)list_del_rcu (&sap->node);spin_unlock_bh (&llc_sap_list_lock); -synchronize_rcu (); - -kfree (sap); +kfree_rcu (sap, rcu); }static struct packet_type llc_packet_type__read_mostly = {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 87/103 ARM: dts: qcom: ipq4019: fix cpu0's qcom,saw2 reg value
In reply to Sasha LevinFrom: Christian Lamparter <[email protected]>
[ Upstream commit bd73a3dd257fb838bd456a18eeee0ef0224b7a40 ]
while compiling an ipq4019 target, dtc will complain:
regulator@b089000 unit address format error, expected "2089000"
The saw0 regulator reg value seems to be
copied and pasted from qcom-ipq8064.dtsi.
This patch fixes the reg value to match that of the unit address which in turn silences the warning. (There is no driver for qcom,saw2 right now. So this went unnoticed)
--- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-ipq4019.dtsi +1 -1
@@ -234,7 +234,7 @@ saw0: regulator@b089000 { compatible = "qcom,saw2"; - reg = <0x02089000 0x1000>, <0x0b009000 0x1000>; + reg = <0x0b089000 0x1000>, <0x0b009000 0x1000>; regulator; };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 88/103 soc: qcom: wcnss_ctrl: Avoid string overflow
In reply to Sasha LevinFrom: Niklas Cassel <[email protected]>
[ Upstream commit 4c96ed170d658d8826d94edec8ac93ee777981a2 ]
'chinfo.name' is used as a NUL-terminated string, but using strncpy() with the length equal to the buffer size may result in lack of the termination:
drivers//soc/qcom/wcnss_ctrl.c: In function 'qcom_wcnss_open_channel':drivers//soc/qcom/wcnss_ctrl.c:284:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(chinfo.name, name, sizeof(chinfo.name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes it to use the safer strscpy() instead.
--- drivers/soc/qcom/wcnss_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/wcnss_ctrl.c +1 -1
@@ -281,7 +281,7 @@ struct rpmsg_endpoint *qcom_wcnss_open_channel(void *wcnss, const char *name, rpstruct rpmsg_channel_info chinfo;struct wcnss_ctrl *_wcnss = wcnss; -strncpy (chinfo.name, name,sizeof (chinfo.name)); +strscpy (chinfo.name, name,sizeof (chinfo.name)); chinfo.src =RPMSG_ADDR_ANY ; chinfo.dst =RPMSG_ADDR_ANY ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 89/103 powerpc/vdso: Correct call frame information
In reply to Sasha LevinFrom: Alan Modra <[email protected]>
[ Upstream commit 56d20861c027498b5a1112b4f9f05b56d906fdda ]
Call Frame Information is used by gdb for back-traces and inserting breakpoints on function return for the "finish" command. This failed when inside __kernel_clock_gettime. More concerning than difficulty debugging is that CFI is also used by stack frame unwinding code to implement exceptions. If you have an app that needs to handle asynchronous exceptions for some reason, and you are unlucky enough to get one inside the VDSO time functions, your app will crash.
What's wrong: There is control flow in __kernel_clock_gettime that reaches label 99 without saving lr in r12. CFI info however is interpreted by the unwinder without reference to control flow: It's a simple matter of "Execute all the CFI opcodes up to the current address". That means the unwinder thinks r12 contains the return address at label 99. Disabuse it of that notion by resetting CFI for the return address at label 99.
Note that the ".cfi_restore lr" could have gone anywhere from the "mtlr r12" a few instructions earlier to the instruction at label 99. I put the CFI as late as possible, because in general that's best practice (and if possible grouped with other CFI in order to reduce the number of CFI opcodes executed when unwinding). Using r12 as the return address is perfectly fine after the "mtlr r12" since r12 on that code path still contains the return address.
__get_datapage also has a CFI error. That function temporarily saves lr in r0, and reflects that fact with ".cfi_register lr,r0". A later use of r0 means the CFI at that point isn't correct, as r0 no longer contains the return address. Fix that too.
--- arch/powerpc/kernel/vdso32/datapage.S | 1 + arch/powerpc/kernel/vdso32/gettimeofday.S | 1 + arch/powerpc/kernel/vdso64/datapage.S | 1 + arch/powerpc/kernel/vdso64/gettimeofday.S | 1 + 4 files changed, 4 insertions(+)
arch/powerpc/kernel/vdso32/datapage.S +1 -0
@@ -37,6 +37,7 @@ data_page_branch: mtlr r0 addi r3, r3, __kernel_datapage_offset-data_page_branch lwz r0,0(r3) + .cfi_restore lr add r3,r0,r3 blr .cfi_endproc
arch/powerpc/kernel/vdso32/gettimeofday.S +1 -0
@@ -139,6 +139,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) */ 99: li r0,__NR_clock_gettime + .cfi_restore lr sc blr .cfi_endproc
arch/powerpc/kernel/vdso64/datapage.S +1 -0
@@ -37,6 +37,7 @@ data_page_branch: mtlr r0 addi r3, r3, __kernel_datapage_offset-data_page_branch lwz r0,0(r3) + .cfi_restore lr add r3,r0,r3 blr .cfi_endproc
arch/powerpc/kernel/vdso64/gettimeofday.S +1 -0
@@ -124,6 +124,7 @@ V_FUNCTION_BEGIN(__kernel_clock_gettime) */ 99: li r0,__NR_clock_gettime + .cfi_restore lr sc blr .cfi_endproc
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 90/103 ARM: dts: socfpga: Fix I2C bus unit-address error
In reply to Sasha LevinFrom: Dinh Nguyen <[email protected]>
[ Upstream commit cbbc488ed85061a765cf370c3e41f383c1e0add6 ]
dtc has new checks for I2C buses. Fix the warnings in unit-addresses.
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dtb: Warning (i2c_bus_reg): /soc/i2c@ffc04000/adxl345@0: I2C bus unit address format error, expected "53"
--- arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts +1 -1
@@ -88,7 +88,7 @@ status = "okay"; clock-frequency = <100000>; - adxl345: adxl345@0 { + adxl345: adxl345@53 { compatible = "adi,adxl345"; reg = <0x53>;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 91/103 pinctrl: at91: don't use the same irqchip with multiple gpiochips
In reply to Sasha LevinFrom: Ludovic Desroches <[email protected]>
[ Upstream commit 0c3dfa176912b5f87732545598200fb55e9c1978 ]
Sharing the same irqchip with multiple gpiochips is not a good practice. For instance, when installing hooks, we change the state of the irqchip. The initial state of the irqchip for the second gpiochip to register is then disrupted.
--- drivers/pinctrl/pinctrl-at91.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/pinctrl/pinctrl-at91.c +14 -14
@@ -1566,16 +1566,6 @@ void at91_pinctrl_gpio_resume(void)#define gpio_irq_set_wake NULL#endif /* CONFIG_PM */ -static struct irq_chip gpio_irqchip = { - .name ="GPIO" , - .irq_ack = gpio_irq_ack, - .irq_disable = gpio_irq_mask, - .irq_mask = gpio_irq_mask, - .irq_unmask = gpio_irq_unmask, -/* .irq_set_type is set dynamically */ - .irq_set_wake = gpio_irq_set_wake, -}; -static void gpio_irq_handler (struct irq_desc *desc) {struct irq_chip *chip =irq_desc_get_chip (desc);
@@ -1616,12 +1606,22 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,struct gpio_chip *gpiochip_prev =NULL ;struct at91_gpio_chip *prev =NULL ;struct irq_data *d =irq_get_irq_data (at91_gpio->pioc_virq); +struct irq_chip *gpio_irqchip;int ret, i; + gpio_irqchip =devm_kzalloc (&pdev->dev,sizeof (*gpio_irqchip),GFP_KERNEL ); +if (!gpio_irqchip) +return -ENOMEM ; + at91_gpio->pioc_hwirq =irqd_to_hwirq (d); -/* Setup proper .irq_set_type function */ - gpio_irqchip.irq_set_type = at91_gpio->ops->irq_type; + gpio_irqchip->name ="GPIO" ; + gpio_irqchip->irq_ack = gpio_irq_ack; + gpio_irqchip->irq_disable = gpio_irq_mask; + gpio_irqchip->irq_mask = gpio_irq_mask; + gpio_irqchip->irq_unmask = gpio_irq_unmask; + gpio_irqchip->irq_set_wake = gpio_irq_set_wake, + gpio_irqchip->irq_set_type = at91_gpio->ops->irq_type;/* Disable irqs of this PIO controller */ writel_relaxed (~0 , at91_gpio->regbase +PIO_IDR );
@@ -1632,7 +1632,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,* interrupt. */ ret =gpiochip_irqchip_add (&at91_gpio->chip, - &gpio_irqchip, + gpio_irqchip,0 , handle_edge_irq,IRQ_TYPE_NONE );
@@ -1650,7 +1650,7 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,if (!gpiochip_prev) {/* Then register the chain on the parent IRQ */ gpiochip_set_chained_irqchip (&at91_gpio->chip, - &gpio_irqchip, + gpio_irqchip, at91_gpio->pioc_virq, gpio_irq_handler);return 0 ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 92/103 cxgb4: Fix endianness issue in t4_fwcache()
In reply to Sasha LevinFrom: Ganesh Goudar <[email protected]>
[ Upstream commit 0dc235afc59a226d951352b0adf4a89b532a9d13 ]
Do not put host-endian 0 or 1 into big endian feild.
--- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +1 -1
@@ -3750,7 +3750,7 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op) c.param[0 ].mnem =cpu_to_be32 (FW_PARAMS_MNEM_V (FW_PARAMS_MNEM_DEV ) |FW_PARAMS_PARAM_X_V (FW_PARAMS_PARAM_DEV_FWCACHE )); - c.param[0 ].val = (__force __be32 )op; + c.param[0 ].val =cpu_to_be32 (op);return t4_wr_mbox (adap, adap->mbox, &c,sizeof (c),NULL ); }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 93/103 blok, bfq: do not plug I/O if all queues are weight-raised
In reply to Sasha LevinFrom: Paolo Valente <[email protected]>
[ Upstream commit c8765de0adfcaaf4ffb2d951e07444f00ffa9453 ]
To reduce latency for interactive and soft real-time applications, bfq privileges the bfq_queues containing the I/O of these applications. These privileged queues, referred-to as weight-raised queues, get a much higher share of the device throughput w.r.t. non-privileged queues. To preserve this higher share, the I/O of any non-weight-raised queue must be plugged whenever a sync weight-raised queue, while being served, remains temporarily empty. To attain this goal, bfq simply plugs any I/O (from any queue), if a sync weight-raised queue remains empty while in service.
Unfortunately, this plugging typically lowers throughput with random I/O, on devices with internal queueing (because it reduces the filling level of the internal queues of the device).
This commit addresses this issue by restricting the cases where plugging is performed: if a sync weight-raised queue remains empty while in service, then I/O plugging is performed only if some of the active bfq_queues are *not* weight-raised (which is actually the only circumstance where plugging is needed to preserve the higher share of the throughput of weight-raised queues). This restriction proved able to boost throughput in really many use cases needing only maximum throughput.
--- block/bfq-iosched.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
block/bfq-iosched.c +8 -2
@@ -3314,7 +3314,12 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq)* whether bfqq is being weight-raised, because * bfq_symmetric_scenario() does not take into account also * weight-raised queues (see comments on -* bfq_weights_tree_add()). +* bfq_weights_tree_add()). In particular, if bfqq is being +* weight-raised, it is important to idle only if there are +* other, non-weight-raised queues that may steal throughput +* to bfqq. Actually, we should be even more precise, and +* differentiate between interactive weight raising and +* soft real-time weight raising. * * As a side note, it is worth considering that the above * device-idling countermeasures may however fail in the
@@ -3326,7 +3331,8 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq)* to let requests be served in the desired order until all * the requests already queued in the device have been served. */ - asymmetric_scenario = bfqq->wr_coeff >1 || + asymmetric_scenario = (bfqq->wr_coeff >1 && + bfqd->wr_busy_queues < bfqd->busy_queues) || !bfq_symmetric_scenario (bfqd);/*
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 94/103 arm64: dts: meson: Fix erroneous SPI bus warnings
In reply to Sasha LevinFrom: Rob Herring <[email protected]>
[ Upstream commit 68ecb5c1920c5b98b1e717fd2349fba2ee5d4031 ]
dtc has new checks for SPI buses. The meson dts files have a node named spi' which causes false positive warnings. As the node is a pinctrl child node, change the node name to be 'spi-pins' to fix the warnings.
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dtb: Warning (spi_bus_bridge): /soc/periphs@c8834000/pinctrl@4b0/spi: incorrect #address-cells for SPI bus
--- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +1 -1
@@ -413,7 +413,7 @@ }; }; - spi_pins: spi { + spi_pins: spi-pins { mux { groups = "spi_miso", "spi_mosi",
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +1 -1
@@ -310,7 +310,7 @@ }; }; - spi_pins: spi { + spi_pins: spi-pins { mux { groups = "spi_miso", "spi_mosi",
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 95/103 power: supply: ab8500_fg: silence uninitialized variable warnings
In reply to Sasha LevinFrom: Dan Carpenter <[email protected]>
[ Upstream commit 54baff8d4e5dce2cef61953b1dc22079cda1ddb1 ]
If kstrtoul() fails then we print "charge_full" when it's uninitialized. The debug printk doesn't add anything so I deleted it and cleaned these two functions up a bit.
--- drivers/power/supply/ab8500_fg.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-)
drivers/power/supply/ab8500_fg.c +12 -19
@@ -2437,17 +2437,14 @@ static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf, size_t count) {unsigned long charge_full; -ssize_t ret; +int ret; ret =kstrtoul (buf,10 , &charge_full); +if (ret) +return ret; -dev_dbg (di->dev,"Ret %zd charge_full %lu" , ret, charge_full); - -if (!ret) { - di->bat_cap.max_mah = (int ) charge_full; - ret = count; - } -return ret; + di->bat_cap.max_mah = (int ) charge_full; +return count; }static ssize_t charge_now_show (struct ab8500_fg *di,char *buf)
@@ -2459,20 +2456,16 @@ static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf, size_t count) {unsigned long charge_now; -ssize_t ret; +int ret; ret =kstrtoul (buf,10 , &charge_now); +if (ret) +return ret; -dev_dbg (di->dev,"Ret %zd charge_now %lu was %d" , - ret, charge_now, di->bat_cap.prev_mah); - -if (!ret) { - di->bat_cap.user_mah = (int ) charge_now; - di->flags.user_cap = true; - ret = count; -queue_delayed_work (di->fg_wq, &di->fg_periodic_work,0 ); - } -return ret; + di->bat_cap.user_mah = (int ) charge_now; + di->flags.user_cap = true; +queue_delayed_work (di->fg_wq, &di->fg_periodic_work,0 ); +return count; } static struct ab8500_fg_sysfs_entry charge_full_attr =
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 96/103 power: reset: at91-poweroff: do not procede if at91_shdwc is allocated
In reply to Sasha LevinFrom: Claudiu Beznea <[email protected]>
[ Upstream commit 9f1e44774be578fb92776add95f1fcaf8284d692 ]
There should be only one instance of struct shdwc in the system. This is referenced through at91_shdwc. Return in probe if at91_shdwc is already allocated.
--- drivers/power/reset/at91-sama5d2_shdwc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/power/reset/at91-sama5d2_shdwc.c +3 -0
@@ -246,6 +246,9 @@ static int __init at91_shdwc_probe(struct platform_device *pdev)if (!pdev->dev.of_node)return -ENODEV ; +if (at91_shdwc) +return -EBUSY ; + at91_shdwc =devm_kzalloc (&pdev->dev,sizeof (*at91_shdwc),GFP_KERNEL );if (!at91_shdwc)return -ENOMEM ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 97/103 power: supply: max8998-charger: Fix platform data retrieval
In reply to Sasha LevinFrom: Tomasz Figa <[email protected]>
[ Upstream commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 ]
Since the max8998 MFD driver supports instantiation by DT, platform data retrieval is handled in MFD probe and cell drivers should get use the pdata field of max8998_dev struct to obtain them.
--- drivers/power/supply/max8998_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/max8998_charger.c +1 -1
@@ -85,7 +85,7 @@ static const struct power_supply_desc max8998_battery_desc = {static int max8998_battery_probe (struct platform_device *pdev) {struct max8998_dev *iodev =dev_get_drvdata (pdev->dev.parent); -struct max8998_platform_data *pdata =dev_get_platdata (iodev->dev); +struct max8998_platform_data *pdata = iodev->pdata;struct power_supply_config psy_cfg = {};struct max8998_battery_data *max8998;struct i2c_client *i2c;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 98/103 component: fix loop condition to call unbind() if bind() fails
In reply to Sasha LevinFrom: Banajit Goswami <[email protected]>
[ Upstream commit bdae566d5d9733b6e32b378668b84eadf28a94d4 ]
During component_bind_all(), if bind() fails for any particular component associated with a master, unbind() should be called for all previous components in that master's match array, whose bind() might have completed successfully. As per the current logic, if bind() fails for the component at position 'n' in the master's match array, it would start calling unbind() from component in 'n'th position itself and work backwards, and will always skip calling unbind() for component in 0th position in the master's match array.
Fix this by updating the loop condition, and the logic to refer to the components in master's match array, so that unbind() is called for all components starting from 'n-1'st position in the array, until (and including) component in 0th position.
--- drivers/base/component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/base/component.c +3 -3
@@ -461,9 +461,9 @@ int component_bind_all(struct device *master_dev, void *data) }if (ret !=0 ) { -for (; i--; ) -if (!master->match->compare[i].duplicate) { - c = master->match->compare[i].component; +for (; i >0 ; i--) +if (!master->match->compare[i -1 ].duplicate) { + c = master->match->compare[i -1 ].component;component_unbind (c, master, data); } }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 99/103 kernfs: Fix range checks in kernfs_get_target_path
In reply to Sasha LevinFrom: Bernd Edlinger <[email protected]>
[ Upstream commit a75e78f21f9ad4b810868c89dbbabcc3931591ca ]
The terminating NUL byte is only there because the buffer is allocated with kzalloc(PAGE_SIZE, GFP_KERNEL), but since the range-check is off-by-one, and PAGE_SIZE==PATH_MAX, the returned string may not be zero-terminated if it is exactly PATH_MAX characters long. Furthermore also the initial loop may theoretically exceed PATH_MAX and cause a fault.
--- fs/kernfs/symlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/kernfs/symlink.c +4 -1
@@ -63,6 +63,9 @@ static int kernfs_get_target_path(struct kernfs_node *parent,if (base == kn)break ; +if ((s - path) +3 >=PATH_MAX ) +return -ENAMETOOLONG ; +strcpy (s,"../" ); s +=3 ; base = base->parent;
@@ -79,7 +82,7 @@ static int kernfs_get_target_path(struct kernfs_node *parent,if (len <2 )return -EINVAL ; len--; -if ((s - path) + len >PATH_MAX ) +if ((s - path) + len >=PATH_MAX )return -ENAMETOOLONG ;/* reverse fillup of target string from target to base */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 100/103 ip_gre: fix parsing gre header in ipgre_err
In reply to Sasha LevinFrom: Haishuang Yan <[email protected]>
[ Upstream commit b0350d51f001e6edc13ee4f253b98b50b05dd401 ]
gre_parse_header stops parsing when csum_err is encountered, which means tpi->key is undefined and ip_tunnel_lookup will return NULL improperly.
This patch introduce a NULL pointer as csum_err parameter. Even when csum_err is encountered, it won't return error and continue parsing gre header as expected.
--- net/ipv4/gre_demux.c | 7 ++++--- net/ipv4/ip_gre.c | 9 +++------ 2 files changed, 7 insertions(+), 9 deletions(-)
net/ipv4/gre_demux.c +4 -3
@@ -86,13 +86,14 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi, options = (__be32 *)(greh +1 );if (greh->flags &GRE_CSUM ) { -if (skb_checksum_simple_validate (skb)) { +if (!skb_checksum_simple_validate (skb)) { +skb_checksum_try_convert (skb,IPPROTO_GRE ,0 , + null_compute_pseudo); + }else if (csum_err) { *csum_err = true;return -EINVAL ; } -skb_checksum_try_convert (skb,IPPROTO_GRE ,0 , - null_compute_pseudo); options++; }
net/ipv4/ip_gre.c +3 -6
@@ -230,13 +230,10 @@ static void gre_err(struct sk_buff *skb, u32 info)const int type =icmp_hdr (skb)->type;const int code =icmp_hdr (skb)->code;struct tnl_ptk_info tpi; -bool csum_err = false; -if (gre_parse_header (skb, &tpi, &csum_err,htons (ETH_P_IP ), - iph->ihl *4 ) <0 ) { -if (!csum_err)/* ignore csum errors. */ -return ; - } +if (gre_parse_header (skb, &tpi,NULL ,htons (ETH_P_IP ), + iph->ihl *4 ) <0 ) +return ;if (type ==ICMP_DEST_UNREACH && code ==ICMP_FRAG_NEEDED ) { ipv4_update_pmtu(skb, dev_net(skb->dev), info,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 101/103 ARM: dts: rockchip: Fix erroneous SPI bus dtc warnings on rk3036
In reply to Sasha LevinFrom: Rob Herring <[email protected]>
[ Upstream commit 131c3eb428ccd5f0c784b9edb4f72ec296a045d2 ]
dtc has new checks for SPI buses. The rk3036 dts file has a node named spi' which causes false positive warnings. As the node is a pinctrl child node, change the node name to be 'spi-pins' to fix the warnings.
arch/arm/boot/dts/rk3036-evb.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #address-cells for SPI bus arch/arm/boot/dts/rk3036-kylin.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #address-cells for SPI bus arch/arm/boot/dts/rk3036-evb.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #size-cells for SPI bus arch/arm/boot/dts/rk3036-kylin.dtb: Warning (spi_bus_bridge): /pinctrl/spi: incorrect #size-cells for SPI bus
--- arch/arm/boot/dts/rk3036.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/rk3036.dtsi +1 -1
@@ -750,7 +750,7 @@ /* no rts / cts for uart2 */ }; - spi { + spi-pins { spi_txd:spi-txd { rockchip,pins = <1 29 RK_FUNC_3 &pcfg_pull_default>; };
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 102/103 ACPI / LPSS: Exclude I2C busses shared with PUNIT from pmc_atom_d3_mask
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 86b62e5cd8965d3056f9e9ccdec51631c37add81 ]
lpss_iosf_enter_d3_state() checks if all hw-blocks using the DMA controllers are in d3 before powering down the DMA controllers.
But on devices, where the I2C bus connected to the PMIC is shared by the PUNIT, the controller for that bus will never reach d3 since it has an effectively empty _PS3 method. Instead it appears to automatically power-down during S0i3 and we never see it as being in d3.
This causes the DMA controllers to never be powered-down on these devices, causing them to never reach S0i3. This commit uses the ACPI _SEM method to detect if an I2C bus is shared with the PUNIT and if it is, it removes it from the mask of devices which lpss_iosf_enter_d3_state() checks for.
This fixes these devices never reaching any S0ix states.
--- drivers/acpi/acpi_lpss.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/acpi/acpi_lpss.c +20 -2
@@ -98,6 +98,9 @@ struct lpss_private_data {u32 prv_reg_ctx[LPSS_PRV_REG_COUNT ]; }; +/* Devices which need to be in D3 before lpss_iosf_enter_d3_state() proceeds */ +static u32 pmc_atom_d3_mask =0xfe000ffe ; +/* LPSS run time quirks */ static unsigned int lpss_quirks;
@@ -174,6 +177,21 @@ static void byt_pwm_setup(struct lpss_private_data *pdata)static void byt_i2c_setup (struct lpss_private_data *pdata) { +const char *uid_str =acpi_device_uid (pdata->adev); +acpi_handle handle = pdata->adev->handle; +unsigned long long shared_host =0 ; +acpi_status status; +long uid =0 ; + +/* Expected to always be true, but better safe then sorry */ +if (uid_str) + uid =simple_strtol (uid_str,NULL ,10 ); + +/* Detect I2C bus shared with PUNIT and ignore its d3 status */ + status =acpi_evaluate_integer (handle,"_SEM" ,NULL , &shared_host); +if (ACPI_SUCCESS (status) && shared_host && uid) + pmc_atom_d3_mask &= ~(BIT_LPSS2_F1_I2C1 << (uid -1 )); +lpss_deassert_reset (pdata);if (readl (pdata->mmio_base + pdata->dev_desc->prv_offset))
@@ -789,7 +807,7 @@ static void lpss_iosf_enter_d3_state(void)* Here we read the values related to LPSS power island, i.e. LPSS * devices, excluding both LPSS DMA controllers, along with SCC domain. */ -u32 func_dis, d3_sts_0, pmc_status, pmc_mask =0xfe000ffe ; +u32 func_dis, d3_sts_0, pmc_status;int ret; ret =pmc_atom_read (PMC_FUNC_DIS , &func_dis);
@@ -807,7 +825,7 @@ static void lpss_iosf_enter_d3_state(void)* Shutdown both LPSS DMA controllers if and only if all other devices * are already in D3hot. */ - pmc_status = (~(d3_sts_0 | func_dis)) & pmc_mask; + pmc_status = (~(d3_sts_0 | func_dis)) & pmc_atom_d3_mask;if (pmc_status) goto exit;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 103/103 ath9k: Fix a locking bug in ath9k_add_interface()
In reply to Sasha LevinFrom: Dan Carpenter <[email protected]>
[ Upstream commit 461cf036057477805a8a391e5fd0f5264a5e56a8 ]
We tried to revert commit d9c52fd17cb4 ("ath9k: fix tx99 with monitor mode interface") but accidentally missed part of the locking change.
The lock has to be held earlier so that we're holding it when we do "sc->tx99_vif = vif;" and also there in the current code there is a stray unlock before we have taken the lock.
--- drivers/net/wireless/ath/ath9k/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +1 -2
@@ -1250,6 +1250,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,struct ath_vif *avp = (void *)vif->drv_priv;struct ath_node *an = &avp->mcast_node; +mutex_lock (&sc->mutex);if (IS_ENABLED (CONFIG_ATH9K_TX99 )) {if (sc->cur_chan->nvifs >=1 ) {mutex_unlock (&sc->mutex);
@@ -1258,8 +1259,6 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, sc->tx99_vif = vif; } -mutex_lock (&sc->mutex); -ath_dbg (common,CONFIG ,"Attach a VIF of type: %d\n" , vif->type); sc->cur_chan->nvifs++;
Signature · 1 line
2.20.1