can: mcp251xfd: mcp251xfd_ring_init(): check TX-coalescing configuration
Subsystems (8)
Sasha Levin
maintainerPATCH 1/8 can: mcp251xfd: mcp251xfd_ring_init(): check TX-coalescing configuration
From: Marc Kleine-Budde <[email protected]>
[ Upstream commit ac2b81eb8b2d104033560daea886ee84531e3d0a ]
When changing the interface from CAN-CC to CAN-FD mode the old coalescing parameters are re-used. This might cause problem, as the configured parameters are too big for CAN-FD mode.
During testing an invalid TX coalescing configuration has been seen. The problem should be been fixed in the previous patch, but add a safeguard here to ensure that the number of TEF coalescing buffers (if configured) is exactly the half of all TEF buffers.
--- drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c +11 -3
@@ -279,7 +279,7 @@ int mcp251xfd_ring_init(struct mcp251xfd_priv *priv)const struct mcp251xfd_rx_ring *rx_ring;u16 base =0 , ram_used;u8 fifo_nr =1 ; -int i; +int err =0 , i;netdev_reset_queue (priv->ndev);
@@ -375,10 +375,18 @@ int mcp251xfd_ring_init(struct mcp251xfd_priv *priv)netdev_err (priv->ndev,"Error during ring configuration, using more RAM (%u bytes) than available (%u bytes).\n" , ram_used,MCP251XFD_RAM_SIZE ); -return -ENOMEM ; + err = -ENOMEM ; } -return 0 ; +if (priv->tx_obj_num_coalesce_irq && + priv->tx_obj_num_coalesce_irq *2 != priv->tx->obj_num) { +netdev_err (priv->ndev, +"Error during ring configuration, number of TEF coalescing buffers (%u) must be half of TEF buffers (%u).\n" , + priv->tx_obj_num_coalesce_irq, priv->tx->obj_num); + err = -EINVAL ; + } + +return err; }void mcp251xfd_ring_free (struct mcp251xfd_priv *priv)
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 2/8 ASoC: Intel: soc-acpi-cht: Make Lenovo Yoga Tab 3 X90F DMI match less strict
From: Hans de Goede <[email protected]>
[ Upstream commit 839a4ec06f75cec8fec2cc5fc14e921d0c3f7369 ]
There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it turns out that the 2G version has a DMI product name of "CHERRYVIEW D1 PLATFORM" where as the 4G version has "CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are unique enough that the product-name check is not necessary.
Drop the product-name check so that the existing DMI match for the 4G RAM version also matches the 2G RAM version.
--- sound/soc/intel/common/soc-acpi-intel-cht-match.c | 1 - 1 file changed, 1 deletion(-)
sound/soc/intel/common/soc-acpi-intel-cht-match.c +0 -1
@@ -84,7 +84,6 @@ static const struct dmi_system_id lenovo_yoga_tab3_x90[] = {/* Lenovo Yoga Tab 3 Pro YT3-X90, codec missing from DSDT */ .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Intel Corporation" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"CHERRYVIEW D1 PLATFORM" ), DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"), }, },
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 3/8 ASoC: intel: fix module autoloading
In reply to Sasha LevinFrom: Liao Chen <[email protected]>
[ Upstream commit ae61a3391088d29aa8605c9f2db84295ab993a49 ]
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- sound/soc/intel/keembay/kmb_platform.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/intel/keembay/kmb_platform.c +1 -0
@@ -817,6 +817,7 @@ static const struct of_device_id kmb_plat_of_match[] = { { .compatible = "intel,keembay-tdm", .data = &intel_kmb_tdm_dai}, {} }; +MODULE_DEVICE_TABLE (of, kmb_plat_of_match);static int kmb_plat_dai_probe (struct platform_device *pdev) {
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 4/8 ASoC: tda7419: fix module autoloading
In reply to Sasha LevinFrom: Liao Chen <[email protected]>
[ Upstream commit 934b44589da9aa300201a00fe139c5c54f421563 ]
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- sound/soc/codecs/tda7419.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/tda7419.c +1 -0
@@ -623,6 +623,7 @@ static const struct of_device_id tda7419_of_match[] = { { .compatible = "st,tda7419" }, { }, }; +MODULE_DEVICE_TABLE (of, tda7419_of_match);static struct i2c_driver tda7419_driver = { .driver = {
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 5/8 spi: spidev: Add an entry for elgin,jg10309-01
In reply to Sasha LevinFrom: Fabio Estevam <[email protected]>
[ Upstream commit 5f3eee1eef5d0edd23d8ac0974f56283649a1512 ]
The rv1108-elgin-r1 board has an LCD controlled via SPI in userspace. The marking on the LCD is JG10309-01.
Add the "elgin,jg10309-01" compatible string.
--- drivers/spi/spidev.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spidev.c +1 -0
@@ -722,6 +722,7 @@ static int spidev_of_check(struct device *dev)static const struct of_device_id spidev_dt_ids[] = { { .compatible ="cisco,spi-petra" , .data = &spidev_of_check }, { .compatible ="dh,dhcom-board" , .data = &spidev_of_check }, + { .compatible ="elgin,jg10309-01" , .data = &spidev_of_check }, { .compatible ="lineartechnology,ltc2488" , .data = &spidev_of_check }, { .compatible ="lwn,bk4" , .data = &spidev_of_check }, { .compatible ="menlo,m53cpld" , .data = &spidev_of_check },
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 6/8 drm: komeda: Fix an issue related to normalized zpos
In reply to Sasha LevinFrom: "hongchi.peng" <[email protected]>
[ Upstream commit 258905cb9a6414be5c9ca4aa20ef855f8dc894d4 ]
We use komeda_crtc_normalize_zpos to normalize zpos of affected planes to their blending zorder in CU. If there's only one slave plane in affected planes and its layer_split property is enabled, order++ for its split layer, so that when calculating the normalized_zpos of master planes, the split layer of the slave plane is included, but the max_slave_zorder does not include the split layer and keep zero because there's only one slave plane in affacted planes, although we actually use two slave layers in this commit.
In most cases, this bug does not result in a commit failure, but assume the following situation:
slave_layer 0: zpos = 0, layer split enabled, normalized_zpos = 0;(use slave_layer 2 as its split layer)
master_layer 0: zpos = 2, layer_split enabled, normalized_zpos = 2;(use master_layer 2 as its split layer)
master_layer 1: zpos = 4, normalized_zpos = 4; master_layer 3: zpos = 5, normalized_zpos = 5; kcrtc_st->max_slave_zorder = 0;
When we use master_layer 3 as a input of CU in function komeda_compiz_set_input and check it with function komeda_component_check_input, the parameter idx is equal to normailzed_zpos minus max_slave_zorder, the value of idx is 5 and is euqal to CU's max_active_inputs, so that komeda_component_check_input returns a -EINVAL value.
To fix the bug described above, when calculating the max_slave_zorder with the layer_split enabled, count the split layer in this calculation directly.
--- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_kms.c +7 -3
@@ -163,6 +163,7 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,struct drm_plane *plane;struct list_head zorder_list;int order =0 , err; +u32 slave_zpos =0 ;DRM_DEBUG_ATOMIC ("[CRTC:%d:%s] calculating normalized zpos values\n" , crtc->base.id, crtc->name);
@@ -202,10 +203,13 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc, plane_st->zpos, plane_st->normalized_zpos);/* calculate max slave zorder */ -if (has_bit (drm_plane_index (plane), kcrtc->slave_planes)) +if (has_bit (drm_plane_index (plane), kcrtc->slave_planes)) { + slave_zpos = plane_st->normalized_zpos; +if (to_kplane_st (plane_st)->layer_split) + slave_zpos++; kcrtc_st->max_slave_zorder = -max (plane_st->normalized_zpos, - kcrtc_st->max_slave_zorder); +max (slave_zpos, kcrtc_st->max_slave_zorder); + } } crtc_st->zpos_changed = true;
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 7/8 spi: bcm63xx: Enable module autoloading
In reply to Sasha LevinFrom: Liao Chen <[email protected]>
[ Upstream commit 709df70a20e990d262c473ad9899314039e8ec82 ]
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/spi/spi-bcm63xx.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-bcm63xx.c +1 -0
@@ -482,6 +482,7 @@ static const struct of_device_id bcm63xx_spi_of_match[] = { { .compatible = "brcm,bcm6358-spi", .data = &bcm6358_spi_reg_offsets }, { }, }; +MODULE_DEVICE_TABLE (of, bcm63xx_spi_of_match);static int bcm63xx_spi_probe (struct platform_device *pdev) {
Signature · 1 line
2.43.0
Sasha Levin
maintainerPATCH 8/8 smb: client: fix hang in wait_for_response() for negproto
In reply to Sasha LevinFrom: Paulo Alcantara <[email protected]>
[ Upstream commit 7ccc1465465d78e6411b7bd730d06e7435802b5c ]
Call cifs_reconnect() to wake up processes waiting on negotiate protocol to handle the case where server abruptly shut down and had no chance to properly close the socket.
Simple reproducer:
ssh 192.168.2.100 pkill -STOP smbd
mount.cifs //192.168.2.100/test /mnt -o ... [never returns]
--- fs/smb/client/connect.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
fs/smb/client/connect.c +13 -1
@@ -673,6 +673,19 @@ allocate_buffers(struct TCP_Server_Info *server)static bool server_unresponsive (struct TCP_Server_Info *server) { +/* +* If we're in the process of mounting a share or reconnecting a session +* and the server abruptly shut down (e.g. socket wasn't closed, packet +* had been ACK'ed but no SMB response), don't wait longer than 20s to +* negotiate protocol. +*/ +spin_lock (&server->srv_lock); +if (server->tcpStatus == CifsInNegotiate && +time_after (jiffies, server->lstrp +20 *HZ )) { +spin_unlock (&server->srv_lock); +cifs_reconnect (server, false); +return true; + }/* * We need to wait 3 echo intervals to make sure we handle such * situations right:
@@ -684,7 +697,6 @@ server_unresponsive(struct TCP_Server_Info *server)* 65s kernel_recvmsg times out, and we see that we haven't gotten * a response in >60s. */ -spin_lock (&server->srv_lock); if ((server->tcpStatus == CifsGood || server->tcpStatus == CifsNeedNegotiate) && (!server->ops->can_echo || server->ops->can_echo(server)) &&
Signature · 1 line
2.43.0