Skip to content

Commit

Permalink
Merge tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/gregkh/char-misc

Pull char/misc fixes from Greg KH:
 "Here are two patches for 4.13-rc5.

  One is a fix for a reported thunderbolt issue, and the other a fix for
  an MEI driver issue. Both have been in linux-next with no reported
  issues"

* tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  thunderbolt: Do not enumerate more ports from DROM than the controller has
  mei: exclude device from suspend direct complete optimization
  • Loading branch information
torvalds committed Aug 13, 2017
2 parents 438630e + 1cd65d1 commit ce7ba95
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/misc/mei/pci-me.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

pci_set_drvdata(pdev, dev);

/*
* MEI requires to resume from runtime suspend mode
* in order to perform link reset flow upon system suspend.
*/
pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;

/*
* For not wake-able HW runtime pm framework
* can't be used on pci device level.
Expand Down
6 changes: 6 additions & 0 deletions drivers/misc/mei/pci-txe.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

pci_set_drvdata(pdev, dev);

/*
* MEI requires to resume from runtime suspend mode
* in order to perform link reset flow upon system suspend.
*/
pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;

/*
* For not wake-able HW runtime pm framework
* can't be used on pci device level.
Expand Down
9 changes: 9 additions & 0 deletions drivers/thunderbolt/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,15 @@ static int tb_drom_parse_entry_port(struct tb_switch *sw,
int res;
enum tb_port_type type;

/*
* Some DROMs list more ports than the controller actually has
* so we skip those but allow the parser to continue.
*/
if (header->index > sw->config.max_port_number) {
dev_info_once(&sw->dev, "ignoring unnecessary extra entries in DROM\n");
return 0;
}

port = &sw->ports[header->index];
port->disabled = header->port_disabled;
if (port->disabled)
Expand Down

0 comments on commit ce7ba95

Please sign in to comment.