Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[sfrench/cifs-2.6.git] / drivers / infiniband / hw / hns / hns_roce_ah.c
index cc258edec3313cc7a931be21dc8e7c86efdf99e9..492b122d052199f13c062d08f252b5a9be171080 100644 (file)
@@ -30,7 +30,6 @@
  * SOFTWARE.
  */
 
-#include <linux/platform_device.h>
 #include <linux/pci.h>
 #include <rdma/ib_addr.h>
 #include <rdma/ib_cache.h>
@@ -61,7 +60,7 @@ int hns_roce_create_ah(struct ib_ah *ibah, struct rdma_ah_init_attr *init_attr,
        struct hns_roce_ah *ah = to_hr_ah(ibah);
        int ret = 0;
 
-       if (hr_dev->pci_dev->revision <= PCI_REVISION_ID_HIP08 && udata)
+       if (hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP08 && udata)
                return -EOPNOTSUPP;
 
        ah->av.port = rdma_ah_get_port_num(ah_attr);
@@ -80,7 +79,7 @@ int hns_roce_create_ah(struct ib_ah *ibah, struct rdma_ah_init_attr *init_attr,
        memcpy(ah->av.mac, ah_attr->roce.dmac, ETH_ALEN);
 
        /* HIP08 needs to record vlan info in Address Vector */
-       if (hr_dev->pci_dev->revision <= PCI_REVISION_ID_HIP08) {
+       if (hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP08) {
                ret = rdma_read_gid_l2_fields(ah_attr->grh.sgid_attr,
                                              &ah->av.vlan_id, NULL);
                if (ret)