summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-ohci.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-08-30 00:11:40 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-10-17 00:00:08 +0200
commit02ff8f8ee151e880414b99a11f67cae0cecd4977 (patch)
treebafdb5af973e0010fb46ea21a2c4f4550a5d8a4d /drivers/firewire/fw-ohci.c
parentab88ca488b8af66c3defa165874e81e695319a19 (diff)
downloadlinux-02ff8f8ee151e880414b99a11f67cae0cecd4977.tar.gz
linux-02ff8f8ee151e880414b99a11f67cae0cecd4977.tar.bz2
linux-02ff8f8ee151e880414b99a11f67cae0cecd4977.zip
firewire: fw-ohci: check for misconfigured bus (phyID == 63)
Check NodeID.nodeNumber as per OHCI 1.1 clause 7.2.3.2. See also IEEE 1394a table 5B-1. Also, demote the "node ID not valid" message from error to notification as it is not an error condition. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-ohci.c')
-rw-r--r--drivers/firewire/fw-ohci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index ec70c9f91171..2f307c4df335 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -917,10 +917,15 @@ static void bus_reset_tasklet(unsigned long data)
reg = reg_read(ohci, OHCI1394_NodeID);
if (!(reg & OHCI1394_NodeID_idValid)) {
- fw_error("node ID not valid, new bus reset in progress\n");
+ fw_notify("node ID not valid, new bus reset in progress\n");
return;
}
- ohci->node_id = reg & 0xffff;
+ if ((reg & OHCI1394_NodeID_nodeNumber) == 63) {
+ fw_notify("malconfigured bus\n");
+ return;
+ }
+ ohci->node_id = reg & (OHCI1394_NodeID_busNumber |
+ OHCI1394_NodeID_nodeNumber);
/*
* The count in the SelfIDCount register is the number of