Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89641
b: refs/heads/master
c: c9755e1
h: refs/heads/master
i:
  89639: eff98de
v: v3
  • Loading branch information
Stefan Richter committed Apr 18, 2008
1 parent fc5822e commit 504f7c5
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 48 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1dadff71d6356ebb804c3f4f1d3049247e16111c
refs/heads/master: c9755e14a01987ada4063e8b4c50c2b6738d879e
2 changes: 1 addition & 1 deletion trunk/drivers/firewire/fw-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ fw_card_bm_work(struct work_struct *work)
*/
spin_unlock_irqrestore(&card->lock, flags);
goto out;
} else if (root_device->config_rom[2] & BIB_CMC) {
} else if (root_device->cmc) {
/*
* FIXME: I suppose we should set the cmstr bit in the
* STATE_CLEAR register of this node, as described in
Expand Down
13 changes: 10 additions & 3 deletions trunk/drivers/firewire/fw-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,21 +269,28 @@ static int ioctl_get_info(struct client *client, void *buffer)
{
struct fw_cdev_get_info *get_info = buffer;
struct fw_cdev_event_bus_reset bus_reset;
unsigned long ret = 0;

client->version = get_info->version;
get_info->version = FW_CDEV_VERSION;

down_read(&fw_device_rwsem);

if (get_info->rom != 0) {
void __user *uptr = u64_to_uptr(get_info->rom);
size_t want = get_info->rom_length;
size_t have = client->device->config_rom_length * 4;

if (copy_to_user(uptr, client->device->config_rom,
min(want, have)))
return -EFAULT;
ret = copy_to_user(uptr, client->device->config_rom,
min(want, have));
}
get_info->rom_length = client->device->config_rom_length * 4;

up_read(&fw_device_rwsem);

if (ret != 0)
return -EFAULT;

client->bus_reset_closure = get_info->bus_reset_closure;
if (get_info->bus_reset != 0) {
void __user *uptr = u64_to_uptr(get_info->bus_reset);
Expand Down
Loading

0 comments on commit 504f7c5

Please sign in to comment.