Commit 3210d190 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: core: handle ack_busy when fetching the Config ROM
parents 6719db6a aaff1203
...@@ -455,15 +455,20 @@ static struct device_attribute fw_device_attributes[] = { ...@@ -455,15 +455,20 @@ static struct device_attribute fw_device_attributes[] = {
static int read_rom(struct fw_device *device, static int read_rom(struct fw_device *device,
int generation, int index, u32 *data) int generation, int index, u32 *data)
{ {
int rcode; u64 offset = (CSR_REGISTER_BASE | CSR_CONFIG_ROM) + index * 4;
int i, rcode;
/* device->node_id, accessed below, must not be older than generation */ /* device->node_id, accessed below, must not be older than generation */
smp_rmb(); smp_rmb();
rcode = fw_run_transaction(device->card, TCODE_READ_QUADLET_REQUEST, for (i = 10; i < 100; i += 10) {
device->node_id, generation, device->max_speed, rcode = fw_run_transaction(device->card,
(CSR_REGISTER_BASE | CSR_CONFIG_ROM) + index * 4, TCODE_READ_QUADLET_REQUEST, device->node_id,
data, 4); generation, device->max_speed, offset, data, 4);
if (rcode != RCODE_BUSY)
break;
msleep(i);
}
be32_to_cpus(data); be32_to_cpus(data);
return rcode; return rcode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment