Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89629
b: refs/heads/master
c: c8a9a49
h: refs/heads/master
i:
  89627: bf0bbfd
v: v3
  • Loading branch information
Stefan Richter committed Apr 18, 2008
1 parent 47fb4d8 commit f0b43cb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 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: 2ed0f181f0d18d2f565bfbd259fe33d53769f72b
refs/heads/master: c8a9a498e16b2a6c0e4e367b1a01f80fdfd7b6e2
14 changes: 10 additions & 4 deletions trunk/drivers/firewire/fw-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,20 +1019,26 @@ static void bus_reset_tasklet(unsigned long data)
ohci->node_id = reg & (OHCI1394_NodeID_busNumber |
OHCI1394_NodeID_nodeNumber);

reg = reg_read(ohci, OHCI1394_SelfIDCount);
if (reg & OHCI1394_SelfIDCount_selfIDError) {
fw_notify("inconsistent self IDs\n");
return;
}
/*
* The count in the SelfIDCount register is the number of
* bytes in the self ID receive buffer. Since we also receive
* the inverted quadlets and a header quadlet, we shift one
* bit extra to get the actual number of self IDs.
*/

self_id_count = (reg_read(ohci, OHCI1394_SelfIDCount) >> 3) & 0x3ff;
self_id_count = (reg >> 3) & 0x3ff;
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])
fw_error("inconsistent self IDs\n");
if (ohci->self_id_cpu[i] != ~ohci->self_id_cpu[i + 1]) {
fw_notify("inconsistent self IDs\n");
return;
}
ohci->self_id_buffer[j] =
cond_le32_to_cpu(ohci->self_id_cpu[i]);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/firewire/fw-ohci.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define OHCI1394_HCControl_softReset 0x00010000
#define OHCI1394_SelfIDBuffer 0x064
#define OHCI1394_SelfIDCount 0x068
#define OHCI1394_SelfIDCount_selfIDError 0x80000000
#define OHCI1394_IRMultiChanMaskHiSet 0x070
#define OHCI1394_IRMultiChanMaskHiClear 0x074
#define OHCI1394_IRMultiChanMaskLoSet 0x078
Expand Down

0 comments on commit f0b43cb

Please sign in to comment.