~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/firewire/core-cdev.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
        int generation;
142
142
        u64 channels;
143
143
        s32 bandwidth;
144
 
        __be32 transaction_data[2];
145
144
        struct iso_resource_event *e_alloc, *e_dealloc;
146
145
};
147
146
 
150
149
static void schedule_iso_resource(struct iso_resource *r, unsigned long delay)
151
150
{
152
151
        client_get(r->client);
153
 
        if (!schedule_delayed_work(&r->work, delay))
 
152
        if (!queue_delayed_work(fw_workqueue, &r->work, delay))
154
153
                client_put(r->client);
155
154
}
156
155
 
254
253
        init_waitqueue_head(&client->wait);
255
254
        init_waitqueue_head(&client->tx_flush_wait);
256
255
        INIT_LIST_HEAD(&client->phy_receiver_link);
 
256
        INIT_LIST_HEAD(&client->link);
257
257
        kref_init(&client->kref);
258
258
 
259
259
        file->private_data = client;
260
260
 
261
 
        mutex_lock(&device->client_list_mutex);
262
 
        list_add_tail(&client->link, &device->client_list);
263
 
        mutex_unlock(&device->client_list_mutex);
264
 
 
265
261
        return nonseekable_open(inode, file);
266
262
}
267
263
 
452
448
        if (ret != 0)
453
449
                return -EFAULT;
454
450
 
 
451
        mutex_lock(&client->device->client_list_mutex);
 
452
 
455
453
        client->bus_reset_closure = a->bus_reset_closure;
456
454
        if (a->bus_reset != 0) {
457
455
                fill_bus_reset_event(&bus_reset, client);
458
 
                if (copy_to_user(u64_to_uptr(a->bus_reset),
459
 
                                 &bus_reset, sizeof(bus_reset)))
460
 
                        return -EFAULT;
 
456
                ret = copy_to_user(u64_to_uptr(a->bus_reset),
 
457
                                   &bus_reset, sizeof(bus_reset));
461
458
        }
462
 
 
463
 
        return 0;
 
459
        if (ret == 0 && list_empty(&client->link))
 
460
                list_add_tail(&client->link, &client->device->client_list);
 
461
 
 
462
        mutex_unlock(&client->device->client_list_mutex);
 
463
 
 
464
        return ret ? -EFAULT : 0;
464
465
}
465
466
 
466
467
static int add_client_resource(struct client *client,
1108
1109
                payload += u.packet.payload_length;
1109
1110
                count++;
1110
1111
        }
 
1112
        fw_iso_context_queue_flush(ctx);
1111
1113
 
1112
1114
        a->size    -= uptr_to_u64(p) - a->packets;
1113
1115
        a->packets  = uptr_to_u64(p);
1229
1231
                        r->channels, &channel, &bandwidth,
1230
1232
                        todo == ISO_RES_ALLOC ||
1231
1233
                        todo == ISO_RES_REALLOC ||
1232
 
                        todo == ISO_RES_ALLOC_ONCE,
1233
 
                        r->transaction_data);
 
1234
                        todo == ISO_RES_ALLOC_ONCE);
1234
1235
        /*
1235
1236
         * Is this generation outdated already?  As long as this resource sticks
1236
1237
         * in the idr, it will be scheduled again for a newer generation or at
1584
1585
        if (_IOC_TYPE(cmd) != '#' ||
1585
1586
            _IOC_NR(cmd) >= ARRAY_SIZE(ioctl_handlers) ||
1586
1587
            _IOC_SIZE(cmd) > sizeof(buffer))
1587
 
                return -EINVAL;
 
1588
                return -ENOTTY;
1588
1589
 
1589
1590
        if (_IOC_DIR(cmd) == _IOC_READ)
1590
1591
                memset(&buffer, 0, _IOC_SIZE(cmd));