Skip to content

Commit bc94632

Browse files
committed
Merge tag 'char-misc-5.19-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes for real from Greg KH: "Let's tag the proper branch this time... Here are some small char/misc driver fixes for 5.19-rc3 that resolve some reported issues. They include: - mei driver fixes - comedi driver fix - rtsx build warning fix - fsl-mc-bus driver fix All of these have been in linux-next for a while with no reported issues" This is what the merge in commit f0ec9c6 _should_ have merged, but Greg fat-fingered the pull request and I got some small changes from linux-next instead there. Credit to Nathan Chancellor for eagle-eyes. Link: https://lore.kernel.org/all/Yqywy+Md2AfGDu8v@dev-arch.thelio-3990X/ * tag 'char-misc-5.19-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: bus: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove() mei: me: add raptor lake point S DID mei: hbm: drop capability response on early shutdown mei: me: set internal pg flag to off on hardware reset misc: rtsx: Fix clang -Wsometimes-uninitialized in rts5261_init_from_hw() comedi: vmk80xx: fix expression for tx buffer size
2 parents ee4eb6e + 928ea98 commit bc94632

File tree

7 files changed

+14
-5
lines changed

7 files changed

+14
-5
lines changed

drivers/bus/fsl-mc/fsl-mc-bus.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,14 +1239,14 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
12391239
static int fsl_mc_bus_remove(struct platform_device *pdev)
12401240
{
12411241
struct fsl_mc *mc = platform_get_drvdata(pdev);
1242+
struct fsl_mc_io *mc_io;
12421243

12431244
if (!fsl_mc_is_root_dprc(&mc->root_mc_bus_dev->dev))
12441245
return -EINVAL;
12451246

1247+
mc_io = mc->root_mc_bus_dev->mc_io;
12461248
fsl_mc_device_remove(mc->root_mc_bus_dev);
1247-
1248-
fsl_destroy_mc_io(mc->root_mc_bus_dev->mc_io);
1249-
mc->root_mc_bus_dev->mc_io = NULL;
1249+
fsl_destroy_mc_io(mc_io);
12501250

12511251
bus_unregister_notifier(&fsl_mc_bus_type, &fsl_mc_nb);
12521252

drivers/comedi/drivers/vmk80xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
684684
if (!devpriv->usb_rx_buf)
685685
return -ENOMEM;
686686

687-
size = max(usb_endpoint_maxp(devpriv->ep_rx), MIN_BUF_SIZE);
687+
size = max(usb_endpoint_maxp(devpriv->ep_tx), MIN_BUF_SIZE);
688688
devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
689689
if (!devpriv->usb_tx_buf)
690690
return -ENOMEM;

drivers/misc/cardreader/rts5261.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ static void rts5261_init_from_hw(struct rtsx_pcr *pcr)
407407
// default
408408
setting_reg1 = PCR_SETTING_REG1;
409409
setting_reg2 = PCR_SETTING_REG2;
410+
} else {
411+
return;
410412
}
411413

412414
pci_read_config_dword(pdev, setting_reg2, &lval2);

drivers/misc/mei/hbm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,8 @@ int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
13511351

13521352
if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
13531353
dev->hbm_state != MEI_HBM_CAP_SETUP) {
1354-
if (dev->dev_state == MEI_DEV_POWER_DOWN) {
1354+
if (dev->dev_state == MEI_DEV_POWER_DOWN ||
1355+
dev->dev_state == MEI_DEV_POWERING_DOWN) {
13551356
dev_dbg(dev->dev, "hbm: capabilities response: on shutdown, ignoring\n");
13561357
return 0;
13571358
}

drivers/misc/mei/hw-me-regs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
#define MEI_DEV_ID_ADP_P 0x51E0 /* Alder Lake Point P */
110110
#define MEI_DEV_ID_ADP_N 0x54E0 /* Alder Lake Point N */
111111

112+
#define MEI_DEV_ID_RPL_S 0x7A68 /* Raptor Lake Point S */
113+
112114
/*
113115
* MEI HW Section
114116
*/

drivers/misc/mei/hw-me.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,8 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
11541154
ret = mei_me_d0i3_exit_sync(dev);
11551155
if (ret)
11561156
return ret;
1157+
} else {
1158+
hw->pg_state = MEI_PG_OFF;
11571159
}
11581160
}
11591161

drivers/misc/mei/pci-me.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
116116
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_P, MEI_ME_PCH15_CFG)},
117117
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_N, MEI_ME_PCH15_CFG)},
118118

119+
{MEI_PCI_DEVICE(MEI_DEV_ID_RPL_S, MEI_ME_PCH15_CFG)},
120+
119121
/* required last entry */
120122
{0, }
121123
};

0 commit comments

Comments
 (0)