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

Pull char/misc driver fixes from Greg KH:
"Here are three tiny last-minute driver fixes for 4.20-rc8 that resolve
some reported issues, and one MAINTAINERS file update.

All of them are related to the hyper-v subsystem, it seems people are
actually testing and using it now, which is nice to see :)

The fixes are:
- uio_hv_generic: fix for opening multiple times
- Remove PCI dependancy on hyperv drivers
- return proper error code for an unopened channel.

And Sasha has signed up to help out with the hyperv maintainership.

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

* tag 'char-misc-4.20-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
x86, hyperv: remove PCI dependency
MAINTAINERS: Patch monkey for the Hyper-V code
uio_hv_generic: set callbacks on open

+27 -6
+3 -1
MAINTAINERS
··· 6906 6906 M: "K. Y. Srinivasan" <kys@microsoft.com> 6907 6907 M: Haiyang Zhang <haiyangz@microsoft.com> 6908 6908 M: Stephen Hemminger <sthemmin@microsoft.com> 6909 + M: Sasha Levin <sashal@kernel.org> 6910 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git 6909 6911 L: devel@linuxdriverproject.org 6910 - S: Maintained 6912 + S: Supported 6911 6913 F: Documentation/networking/netvsc.txt 6912 6914 F: arch/x86/include/asm/mshyperv.h 6913 6915 F: arch/x86/include/asm/trace/hyperv.h
+1 -1
drivers/hv/Kconfig
··· 4 4 5 5 config HYPERV 6 6 tristate "Microsoft Hyper-V client drivers" 7 - depends on X86 && ACPI && PCI && X86_LOCAL_APIC && HYPERVISOR_GUEST 7 + depends on X86 && ACPI && X86_LOCAL_APIC && HYPERVISOR_GUEST 8 8 select PARAVIRT 9 9 help 10 10 Select this option to run Linux as a Hyper-V client operating
+20
drivers/hv/vmbus_drv.c
··· 316 316 317 317 if (!hv_dev->channel) 318 318 return -ENODEV; 319 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 320 + return -EINVAL; 319 321 hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, &outbound); 320 322 return sprintf(buf, "%d\n", outbound.current_interrupt_mask); 321 323 } ··· 331 329 332 330 if (!hv_dev->channel) 333 331 return -ENODEV; 332 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 333 + return -EINVAL; 334 334 hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, &outbound); 335 335 return sprintf(buf, "%d\n", outbound.current_read_index); 336 336 } ··· 347 343 348 344 if (!hv_dev->channel) 349 345 return -ENODEV; 346 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 347 + return -EINVAL; 350 348 hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, &outbound); 351 349 return sprintf(buf, "%d\n", outbound.current_write_index); 352 350 } ··· 363 357 364 358 if (!hv_dev->channel) 365 359 return -ENODEV; 360 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 361 + return -EINVAL; 366 362 hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, &outbound); 367 363 return sprintf(buf, "%d\n", outbound.bytes_avail_toread); 368 364 } ··· 379 371 380 372 if (!hv_dev->channel) 381 373 return -ENODEV; 374 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 375 + return -EINVAL; 382 376 hv_ringbuffer_get_debuginfo(&hv_dev->channel->outbound, &outbound); 383 377 return sprintf(buf, "%d\n", outbound.bytes_avail_towrite); 384 378 } ··· 394 384 395 385 if (!hv_dev->channel) 396 386 return -ENODEV; 387 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 388 + return -EINVAL; 397 389 hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); 398 390 return sprintf(buf, "%d\n", inbound.current_interrupt_mask); 399 391 } ··· 409 397 410 398 if (!hv_dev->channel) 411 399 return -ENODEV; 400 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 401 + return -EINVAL; 412 402 hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); 413 403 return sprintf(buf, "%d\n", inbound.current_read_index); 414 404 } ··· 424 410 425 411 if (!hv_dev->channel) 426 412 return -ENODEV; 413 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 414 + return -EINVAL; 427 415 hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); 428 416 return sprintf(buf, "%d\n", inbound.current_write_index); 429 417 } ··· 440 424 441 425 if (!hv_dev->channel) 442 426 return -ENODEV; 427 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 428 + return -EINVAL; 443 429 hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); 444 430 return sprintf(buf, "%d\n", inbound.bytes_avail_toread); 445 431 } ··· 456 438 457 439 if (!hv_dev->channel) 458 440 return -ENODEV; 441 + if (hv_dev->channel->state != CHANNEL_OPENED_STATE) 442 + return -EINVAL; 459 443 hv_ringbuffer_get_debuginfo(&hv_dev->channel->inbound, &inbound); 460 444 return sprintf(buf, "%d\n", inbound.bytes_avail_towrite); 461 445 }
+3 -4
drivers/uio/uio_hv_generic.c
··· 204 204 if (atomic_inc_return(&pdata->refcnt) != 1) 205 205 return 0; 206 206 207 + vmbus_set_chn_rescind_callback(dev->channel, hv_uio_rescind); 208 + vmbus_set_sc_create_callback(dev->channel, hv_uio_new_channel); 209 + 207 210 ret = vmbus_connect_ring(dev->channel, 208 211 hv_uio_channel_cb, dev->channel); 209 - 210 212 if (ret == 0) 211 213 dev->channel->inbound.ring_buffer->interrupt_mask = 1; 212 214 else ··· 335 333 dev_err(&dev->device, "hv_uio register failed\n"); 336 334 goto fail_close; 337 335 } 338 - 339 - vmbus_set_chn_rescind_callback(channel, hv_uio_rescind); 340 - vmbus_set_sc_create_callback(channel, hv_uio_new_channel); 341 336 342 337 ret = sysfs_create_bin_file(&channel->kobj, &ring_buffer_bin_attr); 343 338 if (ret)