|
@@ -325,6 +325,7 @@ int ib_register_device(struct ib_device *device,
|
|
{
|
|
{
|
|
int ret;
|
|
int ret;
|
|
struct ib_client *client;
|
|
struct ib_client *client;
|
|
|
|
+ struct ib_udata uhw = {.outlen = 0, .inlen = 0};
|
|
|
|
|
|
mutex_lock(&device_mutex);
|
|
mutex_lock(&device_mutex);
|
|
|
|
|
|
@@ -352,6 +353,13 @@ int ib_register_device(struct ib_device *device,
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ memset(&device->attrs, 0, sizeof(device->attrs));
|
|
|
|
+ ret = device->query_device(device, &device->attrs, &uhw);
|
|
|
|
+ if (ret) {
|
|
|
|
+ printk(KERN_WARNING "Couldn't query the device attributes\n");
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
ret = ib_device_register_sysfs(device, port_callback);
|
|
ret = ib_device_register_sysfs(device, port_callback);
|
|
if (ret) {
|
|
if (ret) {
|
|
printk(KERN_WARNING "Couldn't register device %s with driver model\n",
|
|
printk(KERN_WARNING "Couldn't register device %s with driver model\n",
|