public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Kellner <ckellner@redhat.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <yehezkel.bernat@intel.com>,
	Lukas Wunner <lukas@wunner.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] thunderbolt: Do not enumerate more ports from DROM than the controller has
Date: Tue, 25 Jul 2017 18:05:33 +0200	[thread overview]
Message-ID: <1500998733.3327.2@smtp.gmail.com> (raw)
In-Reply-To: <20170725144158.23806-1-mika.westerberg@linux.intel.com>

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 
> DROM\n");
> +		return 0;
> +	}
> +
>  	port = &sw->ports[header->index];
>  	port->disabled = header->port_disabled;
>  	if (port->disabled)

Fixes the bug, everything works as expected (tested on boot,
plugging in, key based authorization), so:

Tested-by: Christian Kellner <ckellner@redhat.com>

      reply	other threads:[~2017-07-25 16:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 14:41 [PATCH v2] thunderbolt: Do not enumerate more ports from DROM than the controller has Mika Westerberg
2017-07-25 16:05 ` Christian Kellner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500998733.3327.2@smtp.gmail.com \
    --to=ckellner@redhat.com \
    --cc=andreas.noever@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=yehezkel.bernat@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox