diff options
-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 5ad224e4a38b..4b9e11cc561b 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, | |||
705 | lwe = pip->link_width_enabled; | 705 | lwe = pip->link_width_enabled; |
706 | if (lwe) { | 706 | if (lwe) { |
707 | if (lwe == 0xFF) | 707 | if (lwe == 0xFF) |
708 | lwe = ppd->link_width_supported; | 708 | set_link_width_enabled(ppd, ppd->link_width_supported); |
709 | else if (lwe >= 16 || (lwe & ~ppd->link_width_supported)) | 709 | else if (lwe >= 16 || (lwe & ~ppd->link_width_supported)) |
710 | smp->status |= IB_SMP_INVALID_FIELD; | 710 | smp->status |= IB_SMP_INVALID_FIELD; |
711 | else if (lwe != ppd->link_width_enabled) | 711 | else if (lwe != ppd->link_width_enabled) |
@@ -720,7 +720,8 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev, | |||
720 | * speeds. | 720 | * speeds. |
721 | */ | 721 | */ |
722 | if (lse == 15) | 722 | if (lse == 15) |
723 | lse = ppd->link_speed_supported; | 723 | set_link_speed_enabled(ppd, |
724 | ppd->link_speed_supported); | ||
724 | else if (lse >= 8 || (lse & ~ppd->link_speed_supported)) | 725 | else if (lse >= 8 || (lse & ~ppd->link_speed_supported)) |
725 | smp->status |= IB_SMP_INVALID_FIELD; | 726 | smp->status |= IB_SMP_INVALID_FIELD; |
726 | else if (lse != ppd->link_speed_enabled) | 727 | else if (lse != ppd->link_speed_enabled) |
@@ -849,7 +850,7 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev, | |||
849 | if (clientrereg) | 850 | if (clientrereg) |
850 | pip->clientrereg_resv_subnetto |= 0x80; | 851 | pip->clientrereg_resv_subnetto |= 0x80; |
851 | 852 | ||
852 | goto done; | 853 | goto get_only; |
853 | 854 | ||
854 | err: | 855 | err: |
855 | smp->status |= IB_SMP_INVALID_FIELD; | 856 | smp->status |= IB_SMP_INVALID_FIELD; |