diff options
author | Mitko Haralanov <mitko@qlogic.com> | 2011-02-22 16:56:37 -0800 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-02-22 16:56:37 -0800 |
commit | cc7fb05946fb1cd2fd0582f9e39f759e20dfeefa (patch) | |
tree | 5b6bc0af27d0312f558f70b52ff82e17c1694e2b /drivers/infiniband/hw | |
parent | a5bbef0b2deb7b943f095181309ecc9e1fc91c0f (diff) | |
download | kernel_samsung_espresso10-cc7fb05946fb1cd2fd0582f9e39f759e20dfeefa.zip kernel_samsung_espresso10-cc7fb05946fb1cd2fd0582f9e39f759e20dfeefa.tar.gz kernel_samsung_espresso10-cc7fb05946fb1cd2fd0582f9e39f759e20dfeefa.tar.bz2 |
IB/qib: Return correct MAD when setting link width to 255
Fix a bug which causes the driver to return incorrect MADs as a
response to Set(PortInfo) which sets the link width to 0xFF or link
speed to 0xF.
Signed-off-by: Mitko Haralanov <mitko@qlogic.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_mad.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c index 5ad224e..4b9e11c 100644 --- a/drivers/infiniband/hw/qib/qib_mad.c +++ b/drivers/infiniband/hw/qib/qib_mad.c @@ -705,7 +705,7 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev, lwe = pip->link_width_enabled; if (lwe) { if (lwe == 0xFF) - lwe = ppd->link_width_supported; + set_link_width_enabled(ppd, ppd->link_width_supported); else if (lwe >= 16 || (lwe & ~ppd->link_width_supported)) smp->status |= IB_SMP_INVALID_FIELD; else if (lwe != ppd->link_width_enabled) @@ -720,7 +720,8 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev, * speeds. */ if (lse == 15) - lse = ppd->link_speed_supported; + set_link_speed_enabled(ppd, + ppd->link_speed_supported); else if (lse >= 8 || (lse & ~ppd->link_speed_supported)) smp->status |= IB_SMP_INVALID_FIELD; else if (lse != ppd->link_speed_enabled) @@ -849,7 +850,7 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev, if (clientrereg) pip->clientrereg_resv_subnetto |= 0x80; - goto done; + goto get_only; err: smp->status |= IB_SMP_INVALID_FIELD; |