]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/firewire/fw-cdev.c
firewire: support S100B...S400B and link slower than PHY
[mv-sheeva.git] / drivers / firewire / fw-cdev.c
index 5d402d63799f377f165a05482e31e3150308935c..75388641a7d34619f1a1ec1c11aa856e5d13fe6f 100644 (file)
@@ -397,7 +397,7 @@ static int ioctl_send_request(struct client *client, void *buffer)
                        request->tcode & 0x1f,
                        device->node->node_id,
                        request->generation,
-                       device->node->max_speed,
+                       device->max_speed,
                        request->offset,
                        response->response.data, request->length,
                        complete_transaction, response);
@@ -640,6 +640,7 @@ iso_callback(struct fw_iso_context *context, u32 cycle,
 static int ioctl_create_iso_context(struct client *client, void *buffer)
 {
        struct fw_cdev_create_iso_context *request = buffer;
+       struct fw_iso_context *context;
 
        if (request->channel > 63)
                return -EINVAL;
@@ -661,15 +662,17 @@ static int ioctl_create_iso_context(struct client *client, void *buffer)
                return -EINVAL;
        }
 
+       context =  fw_iso_context_create(client->device->card,
+                                        request->type,
+                                        request->channel,
+                                        request->speed,
+                                        request->header_size,
+                                        iso_callback, client);
+       if (IS_ERR(context))
+               return PTR_ERR(context);
+
        client->iso_closure = request->closure;
-       client->iso_context = fw_iso_context_create(client->device->card,
-                                                   request->type,
-                                                   request->channel,
-                                                   request->speed,
-                                                   request->header_size,
-                                                   iso_callback, client);
-       if (IS_ERR(client->iso_context))
-               return PTR_ERR(client->iso_context);
+       client->iso_context = context;
 
        /* We only support one context at this time. */
        request->handle = 0;