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-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

I wrote:
"Char/Misc fixes for 4.19-rc7

Here are 8 small fixes for some char/misc driver issues

Included here are:
- fpga driver fixes
- thunderbolt bugfixes
- firmware core revert/fix
- hv core fix
- hv tool fix

All of these have been in linux-next with no reported issues."

* tag 'char-misc-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
thunderbolt: Initialize after IOMMUs
thunderbolt: Do not handle ICM events after domain is stopped
firmware: Always initialize the fw_priv list object
docs: fpga: document fpga manager flags
fpga: bridge: fix obvious function documentation error
tools: hv: fcopy: set 'error' in case an unknown operation was requested
fpga: do not access region struct after fpga_region_unregister
Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect()

+57 -44
+5
Documentation/driver-api/fpga/fpga-mgr.rst
··· 184 184 API for programming an FPGA 185 185 --------------------------- 186 186 187 + FPGA Manager flags 188 + 189 + .. kernel-doc:: include/linux/fpga/fpga-mgr.h 190 + :doc: FPGA Manager flags 191 + 187 192 .. kernel-doc:: include/linux/fpga/fpga-mgr.h 188 193 :functions: fpga_image_info 189 194
+5 -2
drivers/base/firmware_loader/main.c
··· 226 226 } 227 227 228 228 tmp = __allocate_fw_priv(fw_name, fwc, dbuf, size); 229 - if (tmp && !(opt_flags & FW_OPT_NOCACHE)) 230 - list_add(&tmp->list, &fwc->head); 229 + if (tmp) { 230 + INIT_LIST_HEAD(&tmp->list); 231 + if (!(opt_flags & FW_OPT_NOCACHE)) 232 + list_add(&tmp->list, &fwc->head); 233 + } 231 234 spin_unlock(&fwc->lock); 232 235 233 236 *fw_priv = tmp;
+3 -1
drivers/fpga/dfl-fme-region.c
··· 14 14 */ 15 15 16 16 #include <linux/module.h> 17 + #include <linux/fpga/fpga-mgr.h> 17 18 #include <linux/fpga/fpga-region.h> 18 19 19 20 #include "dfl-fme-pr.h" ··· 67 66 static int fme_region_remove(struct platform_device *pdev) 68 67 { 69 68 struct fpga_region *region = dev_get_drvdata(&pdev->dev); 69 + struct fpga_manager *mgr = region->mgr; 70 70 71 71 fpga_region_unregister(region); 72 - fpga_mgr_put(region->mgr); 72 + fpga_mgr_put(mgr); 73 73 74 74 return 0; 75 75 }
+1 -1
drivers/fpga/fpga-bridge.c
··· 125 125 * 126 126 * Given a device, get an exclusive reference to a fpga bridge. 127 127 * 128 - * Return: fpga manager struct or IS_ERR() condition containing error code. 128 + * Return: fpga bridge struct or IS_ERR() condition containing error code. 129 129 */ 130 130 struct fpga_bridge *fpga_bridge_get(struct device *dev, 131 131 struct fpga_image_info *info)
+2 -1
drivers/fpga/of-fpga-region.c
··· 437 437 static int of_fpga_region_remove(struct platform_device *pdev) 438 438 { 439 439 struct fpga_region *region = platform_get_drvdata(pdev); 440 + struct fpga_manager *mgr = region->mgr; 440 441 441 442 fpga_region_unregister(region); 442 - fpga_mgr_put(region->mgr); 443 + fpga_mgr_put(mgr); 443 444 444 445 return 0; 445 446 }
+5 -3
drivers/hv/connection.c
··· 76 76 __u32 version) 77 77 { 78 78 int ret = 0; 79 + unsigned int cur_cpu; 79 80 struct vmbus_channel_initiate_contact *msg; 80 81 unsigned long flags; 81 82 ··· 119 118 * the CPU attempting to connect may not be CPU 0. 120 119 */ 121 120 if (version >= VERSION_WIN8_1) { 122 - msg->target_vcpu = 123 - hv_cpu_number_to_vp_number(smp_processor_id()); 124 - vmbus_connection.connect_cpu = smp_processor_id(); 121 + cur_cpu = get_cpu(); 122 + msg->target_vcpu = hv_cpu_number_to_vp_number(cur_cpu); 123 + vmbus_connection.connect_cpu = cur_cpu; 124 + put_cpu(); 125 125 } else { 126 126 msg->target_vcpu = 0; 127 127 vmbus_connection.connect_cpu = 0;
+20 -29
drivers/thunderbolt/icm.c
··· 738 738 u8 link, depth; 739 739 u64 route; 740 740 741 - /* 742 - * After NVM upgrade adding root switch device fails because we 743 - * initiated reset. During that time ICM might still send 744 - * XDomain connected message which we ignore here. 745 - */ 746 - if (!tb->root_switch) 747 - return; 748 - 749 741 link = pkg->link_info & ICM_LINK_INFO_LINK_MASK; 750 742 depth = (pkg->link_info & ICM_LINK_INFO_DEPTH_MASK) >> 751 743 ICM_LINK_INFO_DEPTH_SHIFT; ··· 1027 1035 * packet for now. 1028 1036 */ 1029 1037 if (pkg->hdr.packet_id) 1030 - return; 1031 - 1032 - /* 1033 - * After NVM upgrade adding root switch device fails because we 1034 - * initiated reset. During that time ICM might still send device 1035 - * connected message which we ignore here. 1036 - */ 1037 - if (!tb->root_switch) 1038 1038 return; 1039 1039 1040 1040 route = get_route(pkg->route_hi, pkg->route_lo); ··· 1392 1408 1393 1409 mutex_lock(&tb->lock); 1394 1410 1395 - switch (n->pkg->code) { 1396 - case ICM_EVENT_DEVICE_CONNECTED: 1397 - icm->device_connected(tb, n->pkg); 1398 - break; 1399 - case ICM_EVENT_DEVICE_DISCONNECTED: 1400 - icm->device_disconnected(tb, n->pkg); 1401 - break; 1402 - case ICM_EVENT_XDOMAIN_CONNECTED: 1403 - icm->xdomain_connected(tb, n->pkg); 1404 - break; 1405 - case ICM_EVENT_XDOMAIN_DISCONNECTED: 1406 - icm->xdomain_disconnected(tb, n->pkg); 1407 - break; 1411 + /* 1412 + * When the domain is stopped we flush its workqueue but before 1413 + * that the root switch is removed. In that case we should treat 1414 + * the queued events as being canceled. 1415 + */ 1416 + if (tb->root_switch) { 1417 + switch (n->pkg->code) { 1418 + case ICM_EVENT_DEVICE_CONNECTED: 1419 + icm->device_connected(tb, n->pkg); 1420 + break; 1421 + case ICM_EVENT_DEVICE_DISCONNECTED: 1422 + icm->device_disconnected(tb, n->pkg); 1423 + break; 1424 + case ICM_EVENT_XDOMAIN_CONNECTED: 1425 + icm->xdomain_connected(tb, n->pkg); 1426 + break; 1427 + case ICM_EVENT_XDOMAIN_DISCONNECTED: 1428 + icm->xdomain_disconnected(tb, n->pkg); 1429 + break; 1430 + } 1408 1431 } 1409 1432 1410 1433 mutex_unlock(&tb->lock);
+1 -1
drivers/thunderbolt/nhi.c
··· 1191 1191 tb_domain_exit(); 1192 1192 } 1193 1193 1194 - fs_initcall(nhi_init); 1194 + rootfs_initcall(nhi_init); 1195 1195 module_exit(nhi_unload);
+14 -6
include/linux/fpga/fpga-mgr.h
··· 53 53 FPGA_MGR_STATE_OPERATING, 54 54 }; 55 55 56 - /* 57 - * FPGA Manager flags 58 - * FPGA_MGR_PARTIAL_RECONFIG: do partial reconfiguration if supported 59 - * FPGA_MGR_EXTERNAL_CONFIG: FPGA has been configured prior to Linux booting 60 - * FPGA_MGR_BITSTREAM_LSB_FIRST: SPI bitstream bit order is LSB first 61 - * FPGA_MGR_COMPRESSED_BITSTREAM: FPGA bitstream is compressed 56 + /** 57 + * DOC: FPGA Manager flags 58 + * 59 + * Flags used in the &fpga_image_info->flags field 60 + * 61 + * %FPGA_MGR_PARTIAL_RECONFIG: do partial reconfiguration if supported 62 + * 63 + * %FPGA_MGR_EXTERNAL_CONFIG: FPGA has been configured prior to Linux booting 64 + * 65 + * %FPGA_MGR_ENCRYPTED_BITSTREAM: indicates bitstream is encrypted 66 + * 67 + * %FPGA_MGR_BITSTREAM_LSB_FIRST: SPI bitstream bit order is LSB first 68 + * 69 + * %FPGA_MGR_COMPRESSED_BITSTREAM: FPGA bitstream is compressed 62 70 */ 63 71 #define FPGA_MGR_PARTIAL_RECONFIG BIT(0) 64 72 #define FPGA_MGR_EXTERNAL_CONFIG BIT(1)
+1
tools/hv/hv_fcopy_daemon.c
··· 234 234 break; 235 235 236 236 default: 237 + error = HV_E_FAIL; 237 238 syslog(LOG_ERR, "Unknown operation: %d", 238 239 buffer.hdr.operation); 239 240