mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
[infiniband] Require drivers to specify the number of ports
Require drivers to report the total number of Infiniband ports. This is necessary to report the correct number of ports on devices with dynamic port types. For example, dual-port Mellanox cards configured for (eth, ib) would be rejected by the subnet manager, because they report using "port 2, out of 1". Signed-off-by: Christian Iversen <ci@iversenit.dk>
This commit is contained in:
committed by
Michael Brown
parent
4f9fbe6c16
commit
b9de7e6eda
@@ -3061,6 +3061,7 @@ static int arbel_probe ( struct pci_device *pci ) {
|
||||
ibdev->op = &arbel_ib_operations;
|
||||
ibdev->dev = &pci->dev;
|
||||
ibdev->port = ( ARBEL_PORT_BASE + i );
|
||||
ibdev->ports = ARBEL_NUM_PORTS;
|
||||
ib_set_drvdata ( ibdev, arbel );
|
||||
}
|
||||
|
||||
|
||||
@@ -1165,6 +1165,7 @@ flexboot_nodnic_allocate_infiniband_devices( struct flexboot_nodnic *flexboot_no
|
||||
ibdev->op = &flexboot_nodnic_ib_operations;
|
||||
ibdev->dev = &pci->dev;
|
||||
ibdev->port = ( FLEXBOOT_NODNIC_PORT_BASE + i);
|
||||
ibdev->ports = device_priv->device_cap.num_ports;
|
||||
ib_set_drvdata(ibdev, flexboot_nodnic_priv);
|
||||
}
|
||||
return status;
|
||||
|
||||
@@ -2386,6 +2386,7 @@ static int golan_probe_normal ( struct pci_device *pci ) {
|
||||
ibdev->op = &golan_ib_operations;
|
||||
ibdev->dev = &pci->dev;
|
||||
ibdev->port = (GOLAN_PORT_BASE + i);
|
||||
ibdev->ports = golan->caps.num_ports;
|
||||
ib_set_drvdata( ibdev, golan );
|
||||
}
|
||||
|
||||
|
||||
@@ -3829,6 +3829,7 @@ static int hermon_probe ( struct pci_device *pci ) {
|
||||
ibdev->op = &hermon_ib_operations;
|
||||
ibdev->dev = &pci->dev;
|
||||
ibdev->port = ( HERMON_PORT_BASE + i );
|
||||
ibdev->ports = hermon->cap.num_ports;
|
||||
ib_set_drvdata ( ibdev, hermon );
|
||||
}
|
||||
|
||||
|
||||
@@ -2330,6 +2330,7 @@ static int linda_probe ( struct pci_device *pci ) {
|
||||
ibdev->op = &linda_ib_operations;
|
||||
ibdev->dev = &pci->dev;
|
||||
ibdev->port = 1;
|
||||
ibdev->ports = 1;
|
||||
|
||||
/* Fix up PCI device */
|
||||
adjust_pci_device ( pci );
|
||||
|
||||
@@ -2348,6 +2348,7 @@ static int qib7322_probe ( struct pci_device *pci ) {
|
||||
ibdev->dev = &pci->dev;
|
||||
ibdev->op = &qib7322_ib_operations;
|
||||
ibdev->port = ( QIB7322_PORT_BASE + i );
|
||||
ibdev->ports = QIB7322_MAX_PORTS;
|
||||
ibdev->link_width_enabled = ibdev->link_width_supported =
|
||||
IB_LINK_WIDTH_4X; /* 1x does not work */
|
||||
ibdev->link_speed_enabled = ibdev->link_speed_supported =
|
||||
|
||||
Reference in New Issue
Block a user