Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'char-misc-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char / misc driver fixes from Greg KH:
"Here are some small char/misc and other driver fixes for 6.9-rc5.
Included in here are the following:

- binder driver fix for reported problem

- speakup crash fix

- mei driver fixes for reported problems

- comdei driver fix

- interconnect driver fixes

- rtsx driver fix

- peci.h kernel doc fix

All of these have been in linux-next for over a week with no reported
problems"

* tag 'char-misc-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
peci: linux/peci.h: fix Excess kernel-doc description warning
binder: check offset alignment in binder_get_object()
comedi: vmk80xx: fix incomplete endpoint checking
mei: vsc: Unregister interrupt handler for system suspend
Revert "mei: vsc: Call wake_up() in the threaded IRQ handler"
misc: rtsx: Fix rts5264 driver status incorrect when card removed
mei: me: disable RPL-S on SPS and IGN firmwares
speakup: Avoid crash on very long word
interconnect: Don't access req_list while it's being manipulated
interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM

+104 -80
+1 -1
drivers/accessibility/speakup/main.c
··· 574 574 } 575 575 attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr); 576 576 buf[cnt++] = attr_ch; 577 - while (tmpx < vc->vc_cols - 1) { 577 + while (tmpx < vc->vc_cols - 1 && cnt < sizeof(buf) - 1) { 578 578 tmp_pos += 2; 579 579 tmpx++; 580 580 ch = get_char(vc, (u_short *)tmp_pos, &temp);
+3 -1
drivers/android/binder.c
··· 1708 1708 size_t object_size = 0; 1709 1709 1710 1710 read_size = min_t(size_t, sizeof(*object), buffer->data_size - offset); 1711 - if (offset > buffer->data_size || read_size < sizeof(*hdr)) 1711 + if (offset > buffer->data_size || read_size < sizeof(*hdr) || 1712 + !IS_ALIGNED(offset, sizeof(u32))) 1712 1713 return 0; 1714 + 1713 1715 if (u) { 1714 1716 if (copy_from_user(object, u + offset, read_size)) 1715 1717 return 0;
+12 -23
drivers/comedi/drivers/vmk80xx.c
··· 641 641 struct vmk80xx_private *devpriv = dev->private; 642 642 struct usb_interface *intf = comedi_to_usb_interface(dev); 643 643 struct usb_host_interface *iface_desc = intf->cur_altsetting; 644 - struct usb_endpoint_descriptor *ep_desc; 645 - int i; 644 + struct usb_endpoint_descriptor *ep_rx_desc, *ep_tx_desc; 645 + int ret; 646 646 647 - if (iface_desc->desc.bNumEndpoints != 2) 647 + if (devpriv->model == VMK8061_MODEL) 648 + ret = usb_find_common_endpoints(iface_desc, &ep_rx_desc, 649 + &ep_tx_desc, NULL, NULL); 650 + else 651 + ret = usb_find_common_endpoints(iface_desc, NULL, NULL, 652 + &ep_rx_desc, &ep_tx_desc); 653 + 654 + if (ret) 648 655 return -ENODEV; 649 656 650 - for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) { 651 - ep_desc = &iface_desc->endpoint[i].desc; 652 - 653 - if (usb_endpoint_is_int_in(ep_desc) || 654 - usb_endpoint_is_bulk_in(ep_desc)) { 655 - if (!devpriv->ep_rx) 656 - devpriv->ep_rx = ep_desc; 657 - continue; 658 - } 659 - 660 - if (usb_endpoint_is_int_out(ep_desc) || 661 - usb_endpoint_is_bulk_out(ep_desc)) { 662 - if (!devpriv->ep_tx) 663 - devpriv->ep_tx = ep_desc; 664 - continue; 665 - } 666 - } 667 - 668 - if (!devpriv->ep_rx || !devpriv->ep_tx) 669 - return -ENODEV; 657 + devpriv->ep_rx = ep_rx_desc; 658 + devpriv->ep_tx = ep_tx_desc; 670 659 671 660 if (!usb_endpoint_maxp(devpriv->ep_rx) || !usb_endpoint_maxp(devpriv->ep_tx)) 672 661 return -EINVAL;
+8
drivers/interconnect/core.c
··· 176 176 177 177 path->num_nodes = num_nodes; 178 178 179 + mutex_lock(&icc_bw_lock); 180 + 179 181 for (i = num_nodes - 1; i >= 0; i--) { 180 182 node->provider->users++; 181 183 hlist_add_head(&path->reqs[i].req_node, &node->req_list); ··· 187 185 /* reference to previous node was saved during path traversal */ 188 186 node = node->reverse; 189 187 } 188 + 189 + mutex_unlock(&icc_bw_lock); 190 190 191 191 return path; 192 192 } ··· 796 792 pr_err("%s: error (%d)\n", __func__, ret); 797 793 798 794 mutex_lock(&icc_lock); 795 + mutex_lock(&icc_bw_lock); 796 + 799 797 for (i = 0; i < path->num_nodes; i++) { 800 798 node = path->reqs[i].node; 801 799 hlist_del(&path->reqs[i].req_node); 802 800 if (!WARN_ON(!node->provider->users)) 803 801 node->provider->users--; 804 802 } 803 + 804 + mutex_unlock(&icc_bw_lock); 805 805 mutex_unlock(&icc_lock); 806 806 807 807 kfree_const(path->name);
-26
drivers/interconnect/qcom/x1e80100.c
··· 116 116 .links = { X1E80100_SLAVE_A2NOC_SNOC }, 117 117 }; 118 118 119 - static struct qcom_icc_node ddr_perf_mode_master = { 120 - .name = "ddr_perf_mode_master", 121 - .id = X1E80100_MASTER_DDR_PERF_MODE, 122 - .channels = 1, 123 - .buswidth = 4, 124 - .num_links = 1, 125 - .links = { X1E80100_SLAVE_DDR_PERF_MODE }, 126 - }; 127 - 128 119 static struct qcom_icc_node qup0_core_master = { 129 120 .name = "qup0_core_master", 130 121 .id = X1E80100_MASTER_QUP_CORE_0, ··· 677 686 .buswidth = 16, 678 687 .num_links = 1, 679 688 .links = { X1E80100_MASTER_A2NOC_SNOC }, 680 - }; 681 - 682 - static struct qcom_icc_node ddr_perf_mode_slave = { 683 - .name = "ddr_perf_mode_slave", 684 - .id = X1E80100_SLAVE_DDR_PERF_MODE, 685 - .channels = 1, 686 - .buswidth = 4, 687 - .num_links = 0, 688 689 }; 689 690 690 691 static struct qcom_icc_node qup0_core_slave = { ··· 1360 1377 .nodes = { &ebi }, 1361 1378 }; 1362 1379 1363 - static struct qcom_icc_bcm bcm_acv_perf = { 1364 - .name = "ACV_PERF", 1365 - .num_nodes = 1, 1366 - .nodes = { &ddr_perf_mode_slave }, 1367 - }; 1368 - 1369 1380 static struct qcom_icc_bcm bcm_ce0 = { 1370 1381 .name = "CE0", 1371 1382 .num_nodes = 1, ··· 1560 1583 }; 1561 1584 1562 1585 static struct qcom_icc_bcm * const clk_virt_bcms[] = { 1563 - &bcm_acv_perf, 1564 1586 &bcm_qup0, 1565 1587 &bcm_qup1, 1566 1588 &bcm_qup2, 1567 1589 }; 1568 1590 1569 1591 static struct qcom_icc_node * const clk_virt_nodes[] = { 1570 - [MASTER_DDR_PERF_MODE] = &ddr_perf_mode_master, 1571 1592 [MASTER_QUP_CORE_0] = &qup0_core_master, 1572 1593 [MASTER_QUP_CORE_1] = &qup1_core_master, 1573 1594 [MASTER_QUP_CORE_2] = &qup2_core_master, 1574 - [SLAVE_DDR_PERF_MODE] = &ddr_perf_mode_slave, 1575 1595 [SLAVE_QUP_CORE_0] = &qup0_core_slave, 1576 1596 [SLAVE_QUP_CORE_1] = &qup1_core_slave, 1577 1597 [SLAVE_QUP_CORE_2] = &qup2_core_slave,
+1 -1
drivers/misc/cardreader/rtsx_pcr.c
··· 1002 1002 } else { 1003 1003 pcr->card_removed |= SD_EXIST; 1004 1004 pcr->card_inserted &= ~SD_EXIST; 1005 - if (PCI_PID(pcr) == PID_5261) { 1005 + if ((PCI_PID(pcr) == PID_5261) || (PCI_PID(pcr) == PID_5264)) { 1006 1006 rtsx_pci_write_register(pcr, RTS5261_FW_STATUS, 1007 1007 RTS5261_EXPRESS_LINK_FAIL_MASK, 0); 1008 1008 pcr->extra_caps |= EXTRA_CAPS_SD_EXPRESS;
+1 -1
drivers/misc/mei/pci-me.c
··· 116 116 {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_P, MEI_ME_PCH15_CFG)}, 117 117 {MEI_PCI_DEVICE(MEI_DEV_ID_ADP_N, MEI_ME_PCH15_CFG)}, 118 118 119 - {MEI_PCI_DEVICE(MEI_DEV_ID_RPL_S, MEI_ME_PCH15_CFG)}, 119 + {MEI_PCI_DEVICE(MEI_DEV_ID_RPL_S, MEI_ME_PCH15_SPS_CFG)}, 120 120 121 121 {MEI_PCI_DEVICE(MEI_DEV_ID_MTL_M, MEI_ME_PCH15_CFG)}, 122 122 {MEI_PCI_DEVICE(MEI_DEV_ID_ARL_S, MEI_ME_PCH15_CFG)},
+16 -1
drivers/misc/mei/platform-vsc.c
··· 400 400 static int mei_vsc_suspend(struct device *dev) 401 401 { 402 402 struct mei_device *mei_dev = dev_get_drvdata(dev); 403 + struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev); 403 404 404 405 mei_stop(mei_dev); 406 + 407 + mei_disable_interrupts(mei_dev); 408 + 409 + vsc_tp_free_irq(hw->tp); 405 410 406 411 return 0; 407 412 } ··· 414 409 static int mei_vsc_resume(struct device *dev) 415 410 { 416 411 struct mei_device *mei_dev = dev_get_drvdata(dev); 412 + struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev); 417 413 int ret; 414 + 415 + ret = vsc_tp_request_irq(hw->tp); 416 + if (ret) 417 + return ret; 418 418 419 419 ret = mei_restart(mei_dev); 420 420 if (ret) 421 - return ret; 421 + goto err_free; 422 422 423 423 /* start timer if stopped in suspend */ 424 424 schedule_delayed_work(&mei_dev->timer_work, HZ); 425 425 426 426 return 0; 427 + 428 + err_free: 429 + vsc_tp_free_irq(hw->tp); 430 + 431 + return ret; 427 432 } 428 433 429 434 static DEFINE_SIMPLE_DEV_PM_OPS(mei_vsc_pm_ops, mei_vsc_suspend, mei_vsc_resume);
+59 -25
drivers/misc/mei/vsc-tp.c
··· 94 94 {} 95 95 }; 96 96 97 + static irqreturn_t vsc_tp_isr(int irq, void *data) 98 + { 99 + struct vsc_tp *tp = data; 100 + 101 + atomic_inc(&tp->assert_cnt); 102 + 103 + wake_up(&tp->xfer_wait); 104 + 105 + return IRQ_WAKE_THREAD; 106 + } 107 + 108 + static irqreturn_t vsc_tp_thread_isr(int irq, void *data) 109 + { 110 + struct vsc_tp *tp = data; 111 + 112 + if (tp->event_notify) 113 + tp->event_notify(tp->event_notify_context); 114 + 115 + return IRQ_HANDLED; 116 + } 117 + 97 118 /* wakeup firmware and wait for response */ 98 119 static int vsc_tp_wakeup_request(struct vsc_tp *tp) 99 120 { ··· 405 384 EXPORT_SYMBOL_NS_GPL(vsc_tp_register_event_cb, VSC_TP); 406 385 407 386 /** 387 + * vsc_tp_request_irq - request irq for vsc_tp device 388 + * @tp: vsc_tp device handle 389 + */ 390 + int vsc_tp_request_irq(struct vsc_tp *tp) 391 + { 392 + struct spi_device *spi = tp->spi; 393 + struct device *dev = &spi->dev; 394 + int ret; 395 + 396 + irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY); 397 + ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr, 398 + IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 399 + dev_name(dev), tp); 400 + if (ret) 401 + return ret; 402 + 403 + return 0; 404 + } 405 + EXPORT_SYMBOL_NS_GPL(vsc_tp_request_irq, VSC_TP); 406 + 407 + /** 408 + * vsc_tp_free_irq - free irq for vsc_tp device 409 + * @tp: vsc_tp device handle 410 + */ 411 + void vsc_tp_free_irq(struct vsc_tp *tp) 412 + { 413 + free_irq(tp->spi->irq, tp); 414 + } 415 + EXPORT_SYMBOL_NS_GPL(vsc_tp_free_irq, VSC_TP); 416 + 417 + /** 408 418 * vsc_tp_intr_synchronize - synchronize vsc_tp interrupt 409 419 * @tp: vsc_tp device handle 410 420 */ ··· 464 412 disable_irq(tp->spi->irq); 465 413 } 466 414 EXPORT_SYMBOL_NS_GPL(vsc_tp_intr_disable, VSC_TP); 467 - 468 - static irqreturn_t vsc_tp_isr(int irq, void *data) 469 - { 470 - struct vsc_tp *tp = data; 471 - 472 - atomic_inc(&tp->assert_cnt); 473 - 474 - return IRQ_WAKE_THREAD; 475 - } 476 - 477 - static irqreturn_t vsc_tp_thread_isr(int irq, void *data) 478 - { 479 - struct vsc_tp *tp = data; 480 - 481 - wake_up(&tp->xfer_wait); 482 - 483 - if (tp->event_notify) 484 - tp->event_notify(tp->event_notify_context); 485 - 486 - return IRQ_HANDLED; 487 - } 488 415 489 416 static int vsc_tp_match_any(struct acpi_device *adev, void *data) 490 417 { ··· 521 490 tp->spi = spi; 522 491 523 492 irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY); 524 - ret = devm_request_threaded_irq(dev, spi->irq, vsc_tp_isr, 525 - vsc_tp_thread_isr, 526 - IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 527 - dev_name(dev), tp); 493 + ret = request_threaded_irq(spi->irq, vsc_tp_isr, vsc_tp_thread_isr, 494 + IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 495 + dev_name(dev), tp); 528 496 if (ret) 529 497 return ret; 530 498 ··· 552 522 err_destroy_lock: 553 523 mutex_destroy(&tp->mutex); 554 524 525 + free_irq(spi->irq, tp); 526 + 555 527 return ret; 556 528 } 557 529 ··· 564 532 platform_device_unregister(tp->pdev); 565 533 566 534 mutex_destroy(&tp->mutex); 535 + 536 + free_irq(spi->irq, tp); 567 537 } 568 538 569 539 static const struct acpi_device_id vsc_tp_acpi_ids[] = {
+3
drivers/misc/mei/vsc-tp.h
··· 37 37 int vsc_tp_register_event_cb(struct vsc_tp *tp, vsc_tp_event_cb_t event_cb, 38 38 void *context); 39 39 40 + int vsc_tp_request_irq(struct vsc_tp *tp); 41 + void vsc_tp_free_irq(struct vsc_tp *tp); 42 + 40 43 void vsc_tp_intr_enable(struct vsc_tp *tp); 41 44 void vsc_tp_intr_disable(struct vsc_tp *tp); 42 45 void vsc_tp_intr_synchronize(struct vsc_tp *tp);
-1
include/linux/peci.h
··· 58 58 /** 59 59 * struct peci_device - PECI device 60 60 * @dev: device object to register PECI device to the device model 61 - * @controller: manages the bus segment hosting this PECI device 62 61 * @info: PECI device characteristics 63 62 * @info.family: device family 64 63 * @info.model: device model