Char/Misc driver fixes for 4.3-rc3

Here's some tiny char and misc driver fixes that resolve some reported
 errors for 4.3-rc3.  All of these have been in linux-next with no
 problems for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlYGyqYACgkQMUfUDdst+ymQ+gCfU53bctJdhOVz/4z1YqHC+vJN
 r/QAoJb6sddHgurOGXLOo5IenVOLJ3Sz
 =fmIB
 -----END PGP SIGNATURE-----

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

Pull char/misc driver fixes from Greg KH:
 "Here's some tiny char and misc driver fixes that resolve some reported
  errors for 4.3-rc3.

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

* tag 'char-misc-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  extcon: Fix attached value returned by is_extcon_changed
  Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc
  mei: fix debugfs files leak on error path
  thunderbolt: Allow loading of module on recent Apple MacBooks with thunderbolt 2 controller
This commit is contained in:
Linus Torvalds 2015-09-26 20:53:15 -04:00
commit 64b796e231
4 changed files with 21 additions and 3 deletions

View File

@ -159,7 +159,7 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
static bool is_extcon_changed(u32 prev, u32 new, int idx, bool *attached)
{
if (((prev >> idx) & 0x1) != ((new >> idx) & 0x1)) {
*attached = new ? true : false;
*attached = ((new >> idx) & 0x1) ? true : false;
return true;
}

View File

@ -204,6 +204,8 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
list_del(&channel->listentry);
spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
primary_channel = channel;
} else {
primary_channel = channel->primary_channel;
spin_lock_irqsave(&primary_channel->lock, flags);
@ -211,6 +213,14 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
primary_channel->num_sc--;
spin_unlock_irqrestore(&primary_channel->lock, flags);
}
/*
* We need to free the bit for init_vp_index() to work in the case
* of sub-channel, when we reload drivers like hv_netvsc.
*/
cpumask_clear_cpu(channel->target_cpu,
&primary_channel->alloced_cpus_in_node);
free_channel(channel);
}
@ -458,6 +468,13 @@ static void init_vp_index(struct vmbus_channel *channel, const uuid_le *type_gui
continue;
}
/*
* NOTE: in the case of sub-channel, we clear the sub-channel
* related bit(s) in primary->alloced_cpus_in_node in
* hv_process_channel_removal(), so when we reload drivers
* like hv_netvsc in SMP guest, here we're able to re-allocate
* bit from primary->alloced_cpus_in_node.
*/
if (!cpumask_test_cpu(cur_cpu,
&primary->alloced_cpus_in_node)) {
cpumask_set_cpu(cur_cpu,

View File

@ -204,6 +204,8 @@ int mei_dbgfs_register(struct mei_device *dev, const char *name)
if (!dir)
return -ENOMEM;
dev->dbgfs_dir = dir;
f = debugfs_create_file("meclients", S_IRUSR, dir,
dev, &mei_dbgfs_fops_meclients);
if (!f) {
@ -228,7 +230,6 @@ int mei_dbgfs_register(struct mei_device *dev, const char *name)
dev_err(dev->dev, "allow_fixed_address: registration failed\n");
goto err;
}
dev->dbgfs_dir = dir;
return 0;
err:
mei_dbgfs_deregister(dev);

View File

@ -643,7 +643,7 @@ static struct pci_device_id nhi_ids[] = {
{
.class = PCI_CLASS_SYSTEM_OTHER << 8, .class_mask = ~0,
.vendor = PCI_VENDOR_ID_INTEL, .device = 0x156c,
.subvendor = 0x2222, .subdevice = 0x1111,
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
},
{ 0,}
};