Re: [PATCH v2] thunderbolt: Do not enumerate more ports from DROM than the controller has

2017-07-25 Thread Christian Kellner
Hi everyone, + /* +* 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 DR

[PATCH v2] thunderbolt: Do not enumerate more ports from DROM than the controller has

2017-07-25 Thread Mika Westerberg
Some Alpine Ridge LP DROMs (there might be others) erroneusly list more ports than the controller actually has. Most probably because DROM of the full Dual/Single port Thunderbolt controller was reused for LP version. The current DROM parser does not check the upper bound thus it leads to crash whe