Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374705
b: refs/heads/master
c: 6767213
h: refs/heads/master
i:
  374703: ebcb46d
v: v3
  • Loading branch information
Peter Hurley authored and Stefan Richter committed Apr 30, 2013
1 parent ba32ba2 commit 960dad9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 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: de97cb64a959fe5ccf828b02d3a78de9f9defb67
refs/heads/master: 67672134aaafd520a61dda448a662336e8fde236
27 changes: 14 additions & 13 deletions trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ static void bus_reset_work(struct work_struct *work)

reg = reg_read(ohci, OHCI1394_SelfIDCount);
if (reg & OHCI1394_SelfIDCount_selfIDError) {
ohci_notice(ohci, "inconsistent self IDs\n");
ohci_notice(ohci, "self ID receive error\n");
return;
}
/*
Expand All @@ -1923,35 +1923,36 @@ static void bus_reset_work(struct work_struct *work)
self_id_count = (reg >> 3) & 0xff;

if (self_id_count > 252) {
ohci_notice(ohci, "inconsistent self IDs\n");
ohci_notice(ohci, "bad selfIDSize (%08x)\n", reg);
return;
}

generation = (cond_le32_to_cpu(ohci->self_id_cpu[0]) >> 16) & 0xff;
rmb();

for (i = 1, j = 0; j < self_id_count; i += 2, j++) {
if (ohci->self_id_cpu[i] != ~ohci->self_id_cpu[i + 1]) {
u32 id = cond_le32_to_cpu(ohci->self_id_cpu[i]);
u32 id2 = cond_le32_to_cpu(ohci->self_id_cpu[i + 1]);

if (id != ~id2) {
/*
* If the invalid data looks like a cycle start packet,
* it's likely to be the result of the cycle master
* having a wrong gap count. In this case, the self IDs
* so far are valid and should be processed so that the
* bus manager can then correct the gap count.
*/
if (cond_le32_to_cpu(ohci->self_id_cpu[i])
== 0xffff008f) {
ohci_notice(ohci,
"ignoring spurious self IDs\n");
if (id == 0xffff008f) {
ohci_notice(ohci, "ignoring spurious self IDs\n");
self_id_count = j;
break;
} else {
ohci_notice(ohci, "inconsistent self IDs\n");
return;
}

ohci_notice(ohci, "bad self ID %d/%d (%08x != ~%08x)\n",
j, self_id_count, id, id2);
return;
}
ohci->self_id_buffer[j] =
cond_le32_to_cpu(ohci->self_id_cpu[i]);
ohci->self_id_buffer[j] = id;
}

if (ohci->quirks & QUIRK_TI_SLLZ059) {
Expand All @@ -1964,7 +1965,7 @@ static void bus_reset_work(struct work_struct *work)
}

if (self_id_count == 0) {
ohci_notice(ohci, "inconsistent self IDs\n");
ohci_notice(ohci, "no self IDs\n");
return;
}
rmb();
Expand Down

0 comments on commit 960dad9

Please sign in to comment.