Skip to content

Commit

Permalink
Merge tag 'char-misc-4.3-rc3' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
Linus Torvalds committed Sep 27, 2015
2 parents 518a7cb + 5031403 commit 64b796e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/extcon/extcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
17 changes: 17 additions & 0 deletions drivers/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,23 @@ 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);
list_del(&channel->sc_list);
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);
}

Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion drivers/misc/mei/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/thunderbolt/nhi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,}
};
Expand Down

0 comments on commit 64b796e

Please sign in to comment.