OSDN Git Service

IB/srpt: Support HCAs with more than two ports
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 26 Jun 2018 22:24:48 +0000 (15:24 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 29 Jun 2018 20:35:45 +0000 (14:35 -0600)
commite620ebfc228dcbef7519e3d16f43c6c6f1a1d0cb
tree97d2f3b7c4f205a2c4ee606d5bfd75fac957754a
parent68348441ef7d15e6a902c956e139723c99e065ed
IB/srpt: Support HCAs with more than two ports

Since there are adapters that have four ports, increase the size of
the srpt_device.port[] array. This patch avoids that the following
warning is hit with quad port Chelsio adapters:

    WARN_ON(sdev->device->phys_port_cnt > ARRAY_SIZE(sdev->port));

Reported-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: <stable@vger.kernel.org>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/infiniband/ulp/srpt/ib_srpt.h