This way both the IB core and upper level drivers can access these cached
device attributes rather than querying or caching them on their own.
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Orabug:
27687711
Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
(cherry-picked from upstream
3e153a93a1c12e3354dd38cca414fb51a15136a2)
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
goto out;
}
+ memset(&device->attrs, 0, sizeof(device->attrs));
+ ret = device->query_device(device, &device->attrs);
+ if (ret) {
+ printk(KERN_WARNING "Couldn't query the device attributes\n");
+ goto out;
+ }
+
ret = ib_device_register_sysfs(device, port_callback);
if (ret) {
printk(KERN_WARNING "Couldn't register device %s with driver model\n",
u32 local_dma_lkey;
u8 node_type;
u8 phys_port_cnt;
+ struct ib_device_attr attrs;
+
struct ib_pd *relaxed_pd;
struct list_head relaxed_pool_list;
};