Re: [PATCH RFC 2/2] IB/hfi1: Fix port ordering issue in a multiport device

From: Jason Gunthorpe
Date: Mon Feb 06 2017 - 14:26:55 EST


On Mon, Feb 06, 2017 at 11:15:33AM -0800, Tadeusz Struk wrote:
> Some hardware has multiple HFIs within the same ASIC, each one on a
> sepatate bus number. In some devices the numbers labeled on the
> faceplate of the device don't match the PCI bus order, and the result
> is that the devices (ports) are probed in the opposite order of their
> port numbers. The result is IB device unit numbers are in reverse order
> from the faceplate numbering. This leads to confusion, and errors.
> Use EPROBE_DEFER error code to enforce correct port order.
>
> Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> Signed-off-by: Tadeusz Struk <tadeusz.struk@xxxxxxxxx>
> drivers/infiniband/hw/hfi1/chip.c | 95 ++++++++++++++++++++++++++++++++++++-
> drivers/infiniband/hw/hfi1/chip.h | 2 -
> drivers/infiniband/hw/hfi1/init.c | 1
> 3 files changed, 94 insertions(+), 4 deletions(-)

Still no on this from me, this is a horrible abuse of the device core.

Jason