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-5.15-rc6' 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 driver fixes for 5.15-rc6 for reported
issues that include:

- habanalabs driver fixes

- mei driver fixes and new ids

- fpga new device ids

- MAINTAINER file updates for fpga subsystem

- spi module id table additions and fixes

- fastrpc locking fixes

- nvmem driver fix

All of these have been in linux-next for a while with no reported
issues"

* tag 'char-misc-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
eeprom: 93xx46: fix MODULE_DEVICE_TABLE
nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells
mei: hbm: drop hbm responses on early shutdown
mei: me: add Ice Lake-N device id.
eeprom: 93xx46: Add SPI device ID table
eeprom: at25: Add SPI ID table
misc: HI6421V600_IRQ should depend on HAS_IOMEM
misc: fastrpc: Add missing lock before accessing find_vma()
cb710: avoid NULL pointer subtraction
misc: gehc: Add SPI ID table
MAINTAINERS: Drop outdated FPGA Manager website
MAINTAINERS: Add Hao and Yilun as maintainers
habanalabs: fix resetting args in wait for CS IOCTL
fpga: ice40-spi: Add SPI device ID table

+73 -25
+2 -1
MAINTAINERS
··· 7343 7343 7344 7344 FPGA MANAGER FRAMEWORK 7345 7345 M: Moritz Fischer <mdf@kernel.org> 7346 + M: Wu Hao <hao.wu@intel.com> 7347 + M: Xu Yilun <yilun.xu@intel.com> 7346 7348 R: Tom Rix <trix@redhat.com> 7347 7349 L: linux-fpga@vger.kernel.org 7348 7350 S: Maintained 7349 - W: http://www.rocketboards.org 7350 7351 Q: http://patchwork.kernel.org/project/linux-fpga/list/ 7351 7352 T: git git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga.git 7352 7353 F: Documentation/devicetree/bindings/fpga/
+7
drivers/fpga/ice40-spi.c
··· 192 192 }; 193 193 MODULE_DEVICE_TABLE(of, ice40_fpga_of_match); 194 194 195 + static const struct spi_device_id ice40_fpga_spi_ids[] = { 196 + { .name = "ice40-fpga-mgr", }, 197 + {}, 198 + }; 199 + MODULE_DEVICE_TABLE(spi, ice40_fpga_spi_ids); 200 + 195 201 static struct spi_driver ice40_fpga_driver = { 196 202 .probe = ice40_fpga_probe, 197 203 .driver = { 198 204 .name = "ice40spi", 199 205 .of_match_table = of_match_ptr(ice40_fpga_of_match), 200 206 }, 207 + .id_table = ice40_fpga_spi_ids, 201 208 }; 202 209 203 210 module_spi_driver(ice40_fpga_driver);
+1
drivers/misc/Kconfig
··· 224 224 tristate "HiSilicon Hi6421v600 IRQ and powerkey" 225 225 depends on OF 226 226 depends on SPMI 227 + depends on HAS_IOMEM 227 228 select MFD_CORE 228 229 select REGMAP_SPMI 229 230 help
+1 -1
drivers/misc/cb710/sgbuf2.c
··· 47 47 #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS 48 48 return false; 49 49 #else 50 - return ((ptr - NULL) & 3) != 0; 50 + return ((uintptr_t)ptr & 3) != 0; 51 51 #endif 52 52 } 53 53
+8
drivers/misc/eeprom/at25.c
··· 366 366 }; 367 367 MODULE_DEVICE_TABLE(of, at25_of_match); 368 368 369 + static const struct spi_device_id at25_spi_ids[] = { 370 + { .name = "at25",}, 371 + { .name = "fm25",}, 372 + { } 373 + }; 374 + MODULE_DEVICE_TABLE(spi, at25_spi_ids); 375 + 369 376 static int at25_probe(struct spi_device *spi) 370 377 { 371 378 struct at25_data *at25 = NULL; ··· 498 491 .dev_groups = sernum_groups, 499 492 }, 500 493 .probe = at25_probe, 494 + .id_table = at25_spi_ids, 501 495 }; 502 496 503 497 module_spi_driver(at25_driver);
+18
drivers/misc/eeprom/eeprom_93xx46.c
··· 406 406 }; 407 407 MODULE_DEVICE_TABLE(of, eeprom_93xx46_of_table); 408 408 409 + static const struct spi_device_id eeprom_93xx46_spi_ids[] = { 410 + { .name = "eeprom-93xx46", 411 + .driver_data = (kernel_ulong_t)&at93c46_data, }, 412 + { .name = "at93c46", 413 + .driver_data = (kernel_ulong_t)&at93c46_data, }, 414 + { .name = "at93c46d", 415 + .driver_data = (kernel_ulong_t)&atmel_at93c46d_data, }, 416 + { .name = "at93c56", 417 + .driver_data = (kernel_ulong_t)&at93c56_data, }, 418 + { .name = "at93c66", 419 + .driver_data = (kernel_ulong_t)&at93c66_data, }, 420 + { .name = "93lc46b", 421 + .driver_data = (kernel_ulong_t)&microchip_93lc46b_data, }, 422 + {} 423 + }; 424 + MODULE_DEVICE_TABLE(spi, eeprom_93xx46_spi_ids); 425 + 409 426 static int eeprom_93xx46_probe_dt(struct spi_device *spi) 410 427 { 411 428 const struct of_device_id *of_id = ··· 572 555 }, 573 556 .probe = eeprom_93xx46_probe, 574 557 .remove = eeprom_93xx46_remove, 558 + .id_table = eeprom_93xx46_spi_ids, 575 559 }; 576 560 577 561 module_spi_driver(eeprom_93xx46_driver);
+2
drivers/misc/fastrpc.c
··· 814 814 rpra[i].pv = (u64) ctx->args[i].ptr; 815 815 pages[i].addr = ctx->maps[i]->phys; 816 816 817 + mmap_read_lock(current->mm); 817 818 vma = find_vma(current->mm, ctx->args[i].ptr); 818 819 if (vma) 819 820 pages[i].addr += ctx->args[i].ptr - 820 821 vma->vm_start; 822 + mmap_read_unlock(current->mm); 821 823 822 824 pg_start = (ctx->args[i].ptr & PAGE_MASK) >> PAGE_SHIFT; 823 825 pg_end = ((ctx->args[i].ptr + len - 1) & PAGE_MASK) >>
+1
drivers/misc/gehc-achc.c
··· 539 539 540 540 static const struct spi_device_id gehc_achc_id[] = { 541 541 { "ge,achc", 0 }, 542 + { "achc", 0 }, 542 543 { } 543 544 }; 544 545 MODULE_DEVICE_TABLE(spi, gehc_achc_id);
+19 -14
drivers/misc/habanalabs/common/command_submission.c
··· 2649 2649 free_seq_arr: 2650 2650 kfree(cs_seq_arr); 2651 2651 2652 - /* update output args */ 2653 - memset(args, 0, sizeof(*args)); 2654 2652 if (rc) 2655 2653 return rc; 2654 + 2655 + if (mcs_data.wait_status == -ERESTARTSYS) { 2656 + dev_err_ratelimited(hdev->dev, 2657 + "user process got signal while waiting for Multi-CS\n"); 2658 + return -EINTR; 2659 + } 2660 + 2661 + /* update output args */ 2662 + memset(args, 0, sizeof(*args)); 2656 2663 2657 2664 if (mcs_data.completion_bitmap) { 2658 2665 args->out.status = HL_WAIT_CS_STATUS_COMPLETED; ··· 2674 2667 /* update if some CS was gone */ 2675 2668 if (mcs_data.timestamp) 2676 2669 args->out.flags |= HL_WAIT_CS_STATUS_FLAG_GONE; 2677 - } else if (mcs_data.wait_status == -ERESTARTSYS) { 2678 - args->out.status = HL_WAIT_CS_STATUS_INTERRUPTED; 2679 2670 } else { 2680 2671 args->out.status = HL_WAIT_CS_STATUS_BUSY; 2681 2672 } ··· 2693 2688 rc = _hl_cs_wait_ioctl(hdev, hpriv->ctx, args->in.timeout_us, seq, 2694 2689 &status, &timestamp); 2695 2690 2691 + if (rc == -ERESTARTSYS) { 2692 + dev_err_ratelimited(hdev->dev, 2693 + "user process got signal while waiting for CS handle %llu\n", 2694 + seq); 2695 + return -EINTR; 2696 + } 2697 + 2696 2698 memset(args, 0, sizeof(*args)); 2697 2699 2698 2700 if (rc) { 2699 - if (rc == -ERESTARTSYS) { 2700 - dev_err_ratelimited(hdev->dev, 2701 - "user process got signal while waiting for CS handle %llu\n", 2702 - seq); 2703 - args->out.status = HL_WAIT_CS_STATUS_INTERRUPTED; 2704 - rc = -EINTR; 2705 - } else if (rc == -ETIMEDOUT) { 2701 + if (rc == -ETIMEDOUT) { 2706 2702 dev_err_ratelimited(hdev->dev, 2707 2703 "CS %llu has timed-out while user process is waiting for it\n", 2708 2704 seq); ··· 2829 2823 dev_err_ratelimited(hdev->dev, 2830 2824 "user process got signal while waiting for interrupt ID %d\n", 2831 2825 interrupt->interrupt_id); 2832 - *status = HL_WAIT_CS_STATUS_INTERRUPTED; 2833 2826 rc = -EINTR; 2834 2827 } else { 2835 2828 *status = CS_WAIT_STATUS_BUSY; ··· 2883 2878 args->in.interrupt_timeout_us, args->in.addr, 2884 2879 args->in.target, interrupt_offset, &status); 2885 2880 2886 - memset(args, 0, sizeof(*args)); 2887 - 2888 2881 if (rc) { 2889 2882 if (rc != -EINTR) 2890 2883 dev_err_ratelimited(hdev->dev, ··· 2890 2887 2891 2888 return rc; 2892 2889 } 2890 + 2891 + memset(args, 0, sizeof(*args)); 2893 2892 2894 2893 switch (status) { 2895 2894 case CS_WAIT_STATUS_COMPLETED:
+8 -4
drivers/misc/mei/hbm.c
··· 1298 1298 1299 1299 if (dev->dev_state != MEI_DEV_INIT_CLIENTS || 1300 1300 dev->hbm_state != MEI_HBM_STARTING) { 1301 - if (dev->dev_state == MEI_DEV_POWER_DOWN) { 1301 + if (dev->dev_state == MEI_DEV_POWER_DOWN || 1302 + dev->dev_state == MEI_DEV_POWERING_DOWN) { 1302 1303 dev_dbg(dev->dev, "hbm: start: on shutdown, ignoring\n"); 1303 1304 return 0; 1304 1305 } ··· 1382 1381 1383 1382 if (dev->dev_state != MEI_DEV_INIT_CLIENTS || 1384 1383 dev->hbm_state != MEI_HBM_DR_SETUP) { 1385 - if (dev->dev_state == MEI_DEV_POWER_DOWN) { 1384 + if (dev->dev_state == MEI_DEV_POWER_DOWN || 1385 + dev->dev_state == MEI_DEV_POWERING_DOWN) { 1386 1386 dev_dbg(dev->dev, "hbm: dma setup response: on shutdown, ignoring\n"); 1387 1387 return 0; 1388 1388 } ··· 1450 1448 1451 1449 if (dev->dev_state != MEI_DEV_INIT_CLIENTS || 1452 1450 dev->hbm_state != MEI_HBM_CLIENT_PROPERTIES) { 1453 - if (dev->dev_state == MEI_DEV_POWER_DOWN) { 1451 + if (dev->dev_state == MEI_DEV_POWER_DOWN || 1452 + dev->dev_state == MEI_DEV_POWERING_DOWN) { 1454 1453 dev_dbg(dev->dev, "hbm: properties response: on shutdown, ignoring\n"); 1455 1454 return 0; 1456 1455 } ··· 1493 1490 1494 1491 if (dev->dev_state != MEI_DEV_INIT_CLIENTS || 1495 1492 dev->hbm_state != MEI_HBM_ENUM_CLIENTS) { 1496 - if (dev->dev_state == MEI_DEV_POWER_DOWN) { 1493 + if (dev->dev_state == MEI_DEV_POWER_DOWN || 1494 + dev->dev_state == MEI_DEV_POWERING_DOWN) { 1497 1495 dev_dbg(dev->dev, "hbm: enumeration response: on shutdown, ignoring\n"); 1498 1496 return 0; 1499 1497 }
+1
drivers/misc/mei/hw-me-regs.h
··· 92 92 #define MEI_DEV_ID_CDF 0x18D3 /* Cedar Fork */ 93 93 94 94 #define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */ 95 + #define MEI_DEV_ID_ICP_N 0x38E0 /* Ice Lake Point N */ 95 96 96 97 #define MEI_DEV_ID_JSP_N 0x4DE0 /* Jasper Lake Point N */ 97 98
+1
drivers/misc/mei/pci-me.c
··· 96 96 {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H_3, MEI_ME_PCH8_ITOUCH_CFG)}, 97 97 98 98 {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)}, 99 + {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_N, MEI_ME_PCH12_CFG)}, 99 100 100 101 {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH15_CFG)}, 101 102 {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_H, MEI_ME_PCH15_SPS_CFG)},
+2 -1
drivers/nvmem/core.c
··· 1383 1383 *p-- = 0; 1384 1384 1385 1385 /* clear msb bits if any leftover in the last byte */ 1386 - *p &= GENMASK((cell->nbits%BITS_PER_BYTE) - 1, 0); 1386 + if (cell->nbits % BITS_PER_BYTE) 1387 + *p &= GENMASK((cell->nbits % BITS_PER_BYTE) - 1, 0); 1387 1388 } 1388 1389 1389 1390 static int __nvmem_cell_read(struct nvmem_device *nvmem,
+2 -4
include/uapi/misc/habanalabs.h
··· 917 917 #define HL_WAIT_CS_STATUS_BUSY 1 918 918 #define HL_WAIT_CS_STATUS_TIMEDOUT 2 919 919 #define HL_WAIT_CS_STATUS_ABORTED 3 920 - #define HL_WAIT_CS_STATUS_INTERRUPTED 4 921 920 922 921 #define HL_WAIT_CS_STATUS_FLAG_GONE 0x1 923 922 #define HL_WAIT_CS_STATUS_FLAG_TIMESTAMP_VLD 0x2 ··· 1285 1286 * EIO - The CS was aborted (usually because the device was reset) 1286 1287 * ENODEV - The device wants to do hard-reset (so user need to close FD) 1287 1288 * 1288 - * The driver also returns a custom define inside the IOCTL which can be: 1289 + * The driver also returns a custom define in case the IOCTL call returned 0. 1290 + * The define can be one of the following: 1289 1291 * 1290 1292 * HL_WAIT_CS_STATUS_COMPLETED - The CS has been completed successfully (0) 1291 1293 * HL_WAIT_CS_STATUS_BUSY - The CS is still executing (0) ··· 1294 1294 * (ETIMEDOUT) 1295 1295 * HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the 1296 1296 * device was reset (EIO) 1297 - * HL_WAIT_CS_STATUS_INTERRUPTED - Waiting for the CS was interrupted (EINTR) 1298 - * 1299 1297 */ 1300 1298 1301 1299 #define HL_IOCTL_WAIT_CS \