Skip to content

Commit ce7ba95

Browse files
committed
Merge tag 'char-misc-4.13-rc5' of git://git.kernel.org/pub/scm/linux/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
2 parents 438630e + 1cd65d1 commit ce7ba95

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

drivers/misc/mei/pci-me.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
215215

216216
pci_set_drvdata(pdev, dev);
217217

218+
/*
219+
* MEI requires to resume from runtime suspend mode
220+
* in order to perform link reset flow upon system suspend.
221+
*/
222+
pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
223+
218224
/*
219225
* For not wake-able HW runtime pm framework
220226
* can't be used on pci device level.

drivers/misc/mei/pci-txe.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
137137

138138
pci_set_drvdata(pdev, dev);
139139

140+
/*
141+
* MEI requires to resume from runtime suspend mode
142+
* in order to perform link reset flow upon system suspend.
143+
*/
144+
pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
145+
140146
/*
141147
* For not wake-able HW runtime pm framework
142148
* can't be used on pci device level.

drivers/thunderbolt/eeprom.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,15 @@ static int tb_drom_parse_entry_port(struct tb_switch *sw,
333333
int res;
334334
enum tb_port_type type;
335335

336+
/*
337+
* Some DROMs list more ports than the controller actually has
338+
* so we skip those but allow the parser to continue.
339+
*/
340+
if (header->index > sw->config.max_port_number) {
341+
dev_info_once(&sw->dev, "ignoring unnecessary extra entries in DROM\n");
342+
return 0;
343+
}
344+
336345
port = &sw->ports[header->index];
337346
port->disabled = header->port_disabled;
338347
if (port->disabled)

0 commit comments

Comments
 (0)