diff options
| author | Michael Brown | 2010-09-16 04:23:45 +0200 |
|---|---|---|
| committer | Michael Brown | 2010-09-16 04:30:45 +0200 |
| commit | 09555826e9737cbe94be99331934d2e6a1e6c8be (patch) | |
| tree | 2e356c0db029cbba37519b912e8b4edc8f51eb88 /src/drivers | |
| parent | [scsi] Include sense key within error number reported to user (diff) | |
| download | ipxe-09555826e9737cbe94be99331934d2e6a1e6c8be.tar.gz ipxe-09555826e9737cbe94be99331934d2e6a1e6c8be.tar.xz ipxe-09555826e9737cbe94be99331934d2e6a1e6c8be.zip | |
[infiniband] Always call ib_link_state_changed() in ib_smc_update()
ib_smc_update() potentially updates the Infiniband port state, and so
should almost always be followed by a call to ib_link_state_changed().
The one exception is the call made to ib_smc_update() before the
device is registered.
Fix by removing explicit calls to ib_link_state_changed() from drivers
using ib_smc_update(), including a call to ib_link_state_changed()
within ib_smc_update(), and creating a separate ib_smc_init() for use
prior to device registration.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/infiniband/arbel.c | 7 | ||||
| -rw-r--r-- | src/drivers/infiniband/hermon.c | 10 |
2 files changed, 5 insertions, 12 deletions
diff --git a/src/drivers/infiniband/arbel.c b/src/drivers/infiniband/arbel.c index 129ec574e..768553270 100644 --- a/src/drivers/infiniband/arbel.c +++ b/src/drivers/infiniband/arbel.c @@ -1436,9 +1436,6 @@ static void arbel_event_port_state_change ( struct arbel *arbel, /* Update MAD parameters */ ib_smc_update ( arbel->ibdev[port], arbel_mad ); - - /* Notify Infiniband core of link state change */ - ib_link_state_changed ( arbel->ibdev[port] ); } /** @@ -2169,9 +2166,9 @@ static int arbel_probe ( struct pci_device *pci, if ( ( rc = arbel_create_eq ( arbel ) ) != 0 ) goto err_create_eq; - /* Update MAD parameters */ + /* Initialise parameters using SMC */ for ( i = 0 ; i < ARBEL_NUM_PORTS ; i++ ) - ib_smc_update ( arbel->ibdev[i], arbel_mad ); + ib_smc_init ( arbel->ibdev[i], arbel_mad ); /* Register Infiniband devices */ for ( i = 0 ; i < ARBEL_NUM_PORTS ; i++ ) { diff --git a/src/drivers/infiniband/hermon.c b/src/drivers/infiniband/hermon.c index 8b5c2487c..907865ded 100644 --- a/src/drivers/infiniband/hermon.c +++ b/src/drivers/infiniband/hermon.c @@ -1821,9 +1821,6 @@ static void hermon_event_port_state_change ( struct hermon *hermon, /* Update MAD parameters */ ib_smc_update ( hermon->ibdev[port], hermon_mad ); - - /* Notify Infiniband core of link state change */ - ib_link_state_changed ( hermon->ibdev[port] ); } /** @@ -2826,10 +2823,9 @@ static int hermon_probe ( struct pci_device *pci, if ( ( rc = hermon_configure_special_qps ( hermon ) ) != 0 ) goto err_conf_special_qps; - /* Update IPoIB MAC address */ - for ( i = 0 ; i < hermon->cap.num_ports ; i++ ) { - ib_smc_update ( hermon->ibdev[i], hermon_mad ); - } + /* Initialise parameters using SMC */ + for ( i = 0 ; i < hermon->cap.num_ports ; i++ ) + ib_smc_init ( hermon->ibdev[i], hermon_mad ); /* Register Infiniband devices */ for ( i = 0 ; i < hermon->cap.num_ports ; i++ ) { |
