linux/drivers/infiniband/hw
Hoang-Nam Nguyen bbdd267ef2 IB/ehca: Add "port connection autodetect mode"
This patch enhances ehca with a capability to "autodetect" the ports
being connected physically. In order to utilize that function the
module option nr_ports must be set to -1 (default is 2 - two
ports). This feature is experimental and will made the default later.

More detail:

If the user connects only one port to the switch, current code requires
  1) port one to be connected and
  2) module option nr_ports=1 to be given.

If autodetect is enabled, ehca will not wait at creation of the GSI QP
for the respective port to become active. Since firmware does not
accept modify_qp() while the port is down at initialization, we need
to cache all calls to modify_qp() for the SMI/GSI QP and just return a
good return code.

When a port is activated and we get a PORT_ACTIVE event, we replay the
cached modify-qp() parms and re-trigger any posted recv WRs. Only then
do we forward the PORT_ACTIVE event to registered clients.

The result of this autodetect patch is that all ports will be
accessible by the users. Depending on their respective cabling only
those ports that are connected properly will become operable. If a
user tries to modify a regular QP of a non-connected port, modify_qp()
will fail. Furthermore, ibv_devinfo should show the port state
accordingly.

Note that this patch primarily improves the loading behaviour of
ehca. If the cable is removed while the driver is operating and
plugged in again, firmware will handle that properly by sending an
appropriate async event.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-01-25 14:15:44 -08:00
..
amso1100 [NET]: Nuke SET_MODULE_OWNER macro. 2007-10-10 16:51:13 -07:00
cxgb3 RDMA/cxgb3: Endianness annotation for irs field 2008-01-25 14:15:42 -08:00
ehca IB/ehca: Add "port connection autodetect mode" 2008-01-25 14:15:44 -08:00
ipath IB/ipath: Fix some sparse warnings about shadowed symbols 2008-01-25 14:15:42 -08:00
mlx4 IB/mlx4: Micro-optimize mlx4_ib_poll_one() 2008-01-25 14:15:34 -08:00
mthca IB/mthca: Remove MSI support as scheduled 2008-01-25 14:15:33 -08:00