Commit bc94632c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'char-misc-5.19-rc3-take2' of...

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 f0ec9c65 _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
parents ee4eb6ee 928ea982
...@@ -1239,14 +1239,14 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) ...@@ -1239,14 +1239,14 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
static int fsl_mc_bus_remove(struct platform_device *pdev) static int fsl_mc_bus_remove(struct platform_device *pdev)
{ {
struct fsl_mc *mc = platform_get_drvdata(pdev); struct fsl_mc *mc = platform_get_drvdata(pdev);
struct fsl_mc_io *mc_io;
if (!fsl_mc_is_root_dprc(&mc->root_mc_bus_dev->dev)) if (!fsl_mc_is_root_dprc(&mc->root_mc_bus_dev->dev))
return -EINVAL; return -EINVAL;
mc_io = mc->root_mc_bus_dev->mc_io;
fsl_mc_device_remove(mc->root_mc_bus_dev); fsl_mc_device_remove(mc->root_mc_bus_dev);
fsl_destroy_mc_io(mc_io);
fsl_destroy_mc_io(mc->root_mc_bus_dev->mc_io);
mc->root_mc_bus_dev->mc_io = NULL;
bus_unregister_notifier(&fsl_mc_bus_type, &fsl_mc_nb); bus_unregister_notifier(&fsl_mc_bus_type, &fsl_mc_nb);
......
...@@ -684,7 +684,7 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev) ...@@ -684,7 +684,7 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
if (!devpriv->usb_rx_buf) if (!devpriv->usb_rx_buf)
return -ENOMEM; return -ENOMEM;
size = max(usb_endpoint_maxp(devpriv->ep_rx), MIN_BUF_SIZE); size = max(usb_endpoint_maxp(devpriv->ep_tx), MIN_BUF_SIZE);
devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL); devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
if (!devpriv->usb_tx_buf) if (!devpriv->usb_tx_buf)
return -ENOMEM; return -ENOMEM;
......
...@@ -407,6 +407,8 @@ static void rts5261_init_from_hw(struct rtsx_pcr *pcr) ...@@ -407,6 +407,8 @@ static void rts5261_init_from_hw(struct rtsx_pcr *pcr)
// default // default
setting_reg1 = PCR_SETTING_REG1; setting_reg1 = PCR_SETTING_REG1;
setting_reg2 = PCR_SETTING_REG2; setting_reg2 = PCR_SETTING_REG2;
} else {
return;
} }
pci_read_config_dword(pdev, setting_reg2, &lval2); pci_read_config_dword(pdev, setting_reg2, &lval2);
......
...@@ -1351,7 +1351,8 @@ int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr) ...@@ -1351,7 +1351,8 @@ int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
if (dev->dev_state != MEI_DEV_INIT_CLIENTS || if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
dev->hbm_state != MEI_HBM_CAP_SETUP) { dev->hbm_state != MEI_HBM_CAP_SETUP) {
if (dev->dev_state == MEI_DEV_POWER_DOWN) { if (dev->dev_state == MEI_DEV_POWER_DOWN ||
dev->dev_state == MEI_DEV_POWERING_DOWN) {
dev_dbg(dev->dev, "hbm: capabilities response: on shutdown, ignoring\n"); dev_dbg(dev->dev, "hbm: capabilities response: on shutdown, ignoring\n");
return 0; return 0;
} }
......
...@@ -109,6 +109,8 @@ ...@@ -109,6 +109,8 @@
#define MEI_DEV_ID_ADP_P 0x51E0 /* Alder Lake Point P */ #define MEI_DEV_ID_ADP_P 0x51E0 /* Alder Lake Point P */
#define MEI_DEV_ID_ADP_N 0x54E0 /* Alder Lake Point N */ #define MEI_DEV_ID_ADP_N 0x54E0 /* Alder Lake Point N */
#define MEI_DEV_ID_RPL_S 0x7A68 /* Raptor Lake Point S */
/* /*
* MEI HW Section * MEI HW Section
*/ */
......
...@@ -1154,6 +1154,8 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable) ...@@ -1154,6 +1154,8 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
ret = mei_me_d0i3_exit_sync(dev); ret = mei_me_d0i3_exit_sync(dev);
if (ret) if (ret)
return ret; return ret;
} else {
hw->pg_state = MEI_PG_OFF;
} }
} }
......
...@@ -116,6 +116,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = { ...@@ -116,6 +116,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_P, MEI_ME_PCH15_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_P, MEI_ME_PCH15_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_ADP_N, MEI_ME_PCH15_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_N, MEI_ME_PCH15_CFG)},
{MEI_PCI_DEVICE(MEI_DEV_ID_RPL_S, MEI_ME_PCH15_CFG)},
/* required last entry */ /* required last entry */
{0, } {0, }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment