[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190803141401.bmjo7u723p4wxtqb@wunner.de>
Date: Sat, 3 Aug 2019 16:14:01 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org,
Andreas Noever <andreas.noever@...il.com>,
Michael Jamet <michael.jamet@...el.com>,
Yehezkel Bernat <YehezkelShB@...il.com>
Subject: Re: [PATCH 4/8] thunderbolt: Do not fail adding switch if some port
is not implemented
On Fri, Jul 05, 2019 at 12:57:56PM +0300, Mika Westerberg wrote:
> There are two ways to mark a port as unimplemented. Typical way is to
> return port type as TB_TYPE_INACTIVE when its config space is read.
> Alternatively if the port is not physically present (such as ports 10
> and 11 in ICL) reading from port config space returns
> TB_CFG_ERROR_INVALID_CONFIG_SPACE instead. Currently the driver bails
> out from adding the switch if it receives any error during port
> inititialization which is wrong.
>
> Handle this properly and just leave the port as TB_TYPE_INACTIVE before
> continuing to the next port.
Your patch may also cause this snippet in eeprom.c to become obsolete:
/* Port 5 is inaccessible on this gen 1 controller */
if (sw->config.device_id == PCI_DEVICE_ID_INTEL_LIGHT_RIDGE)
sw->ports[5].disabled = true;
To verify this hypothesis, one needs to comment out the call to
tb_drom_copy_efi() as well as the above-quoted snippet and boot
on a Mac with Light Ridge. The driver should hit an error without
your patch and it may work correctly with your patch.
Thanks,
Lukas
Powered by blists - more mailing lists