[Infiniband] Add preliminary support for multi-port devices.

Arbel and Hermon cards both have multiple ports.  Add the
infrastructure required to register each port as a separate IB
device.  Don't yet register more than one port, since registration
will currently fail unless a valid link is detected.

Use ib_*_{set,get}_{drv,owner}data wrappers to access driver- and
owner-private data on Infiniband structures.
This commit is contained in:
Michael Brown
2008-02-27 13:59:56 +00:00
parent 6570203571
commit bc3f0a25c6
7 changed files with 284 additions and 119 deletions
+7
View File
@@ -17,6 +17,10 @@
*
*/
/* Ports in existence */
#define HERMON_NUM_PORTS 1
#define HERMON_PORT_BASE 1
/* PCI BARs */
#define HERMON_PCI_CONFIG_BAR PCI_BASE_ADDRESS_0
#define HERMON_PCI_CONFIG_BAR_SIZE 0x100000
@@ -402,6 +406,9 @@ struct hermon {
/** Device capabilities */
struct hermon_dev_cap cap;
/** Infiniband devices */
struct ib_device *ibdev[HERMON_NUM_PORTS];
};
/** Global protection domain */