diff options
-rw-r--r-- | drivers/firewire/fw-ohci.c | 9 | ||||
-rw-r--r-- | drivers/firewire/fw-ohci.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index ec70c9f9117..2f307c4df33 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 diff --git a/drivers/firewire/fw-ohci.h b/drivers/firewire/fw-ohci.h index fa15706397d..dec4f04e6b2 100644 --- a/drivers/firewire/fw-ohci.h +++ b/drivers/firewire/fw-ohci.h @@ -59,6 +59,8 @@ #define OHCI1394_LinkControl_cycleSource (1 << 22) #define OHCI1394_NodeID 0x0E8 #define OHCI1394_NodeID_idValid 0x80000000 +#define OHCI1394_NodeID_nodeNumber 0x0000003f +#define OHCI1394_NodeID_busNumber 0x0000ffc0 #define OHCI1394_PhyControl 0x0EC #define OHCI1394_PhyControl_Read(addr) (((addr) << 8) | 0x00008000) #define OHCI1394_PhyControl_ReadDone 0x80000000 |