Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307583
b: refs/heads/master
c: 8527f8e
h: refs/heads/master
i:
  307581: b5fa010
  307579: eb9f504
  307575: 09e51c8
  307567: 7de4552
  307551: 40d3b4d
  307519: 1a881a7
  307455: a04b7ef
v: v3
  • Loading branch information
Clemens Ladisch authored and Stefan Richter committed Apr 17, 2012
1 parent 87b6b0a commit 08677e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 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: 94fba9fbeac44462c498e848496ba088198d78d1
refs/heads/master: 8527f8e2934683e53405fbe876a4e6f4a0c46eb8
33 changes: 12 additions & 21 deletions trunk/drivers/firewire/core-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,16 +1115,8 @@ static void fw_device_refresh(struct work_struct *work)
bool changed;

ret = reread_config_rom(device, device->generation, &changed);
if (ret != RCODE_COMPLETE) {
if (device->config_rom_retries < MAX_RETRIES / 2 &&
atomic_read(&device->state) == FW_DEVICE_INITIALIZING) {
device->config_rom_retries++;
fw_schedule_device_work(device, RETRY_DELAY / 2);

return;
}
goto give_up;
}
if (ret != RCODE_COMPLETE)
goto failed_config_rom;

if (!changed) {
if (atomic_cmpxchg(&device->state,
Expand All @@ -1144,16 +1136,8 @@ static void fw_device_refresh(struct work_struct *work)
device_for_each_child(&device->device, NULL, shutdown_unit);

ret = read_config_rom(device, device->generation);
if (ret != RCODE_COMPLETE) {
if (device->config_rom_retries < MAX_RETRIES &&
atomic_read(&device->state) == FW_DEVICE_INITIALIZING) {
device->config_rom_retries++;
fw_schedule_device_work(device, RETRY_DELAY);

return;
}
goto give_up;
}
if (ret != RCODE_COMPLETE)
goto failed_config_rom;

fw_device_cdev_update(device);
create_units(device);
Expand All @@ -1170,7 +1154,14 @@ static void fw_device_refresh(struct work_struct *work)
device->config_rom_retries = 0;
goto out;

give_up:
failed_config_rom:
if (device->config_rom_retries < MAX_RETRIES &&
atomic_read(&device->state) == FW_DEVICE_INITIALIZING) {
device->config_rom_retries++;
fw_schedule_device_work(device, RETRY_DELAY);
return;
}

fw_notice(card, "giving up on refresh of device %s: %s\n",
dev_name(&device->device), fw_rcode_string(ret));
gone:
Expand Down

0 comments on commit 08677e7

Please sign in to comment.