[Linux1394-cvslog] rev 670 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-11-16 15:33:48
|
Author: bencollins Date: 2002-11-16 10:33:14 -0500 (Sat, 16 Nov 2002) New Revision: 670 Modified: trunk/ohci1394.c Log: Fix logic a bit better in selfid interrupt handler. Modified: trunk/ohci1394.c ============================================================================== --- trunk/ohci1394.c (original) +++ trunk/ohci1394.c 2002-11-16 10:33:14.000000000 -0500 @@ -1876,26 +1876,26 @@ event &= ~OHCI1394_selfIDComplete; if (host->in_bus_reset) { - node_id = reg_read(ohci, OHCI1394_NodeID); + node_id = reg_read(ohci, OHCI1394_NodeID); - if (node_id & 0x80000000) { /* NodeID valid */ - phyid = node_id & 0x0000003f; - isroot = (node_id & 0x40000000) != 0; - - DBGMSG(ohci->id, - "SelfID interrupt received " - "(phyid %d, %s)", phyid, - (isroot ? "root" : "not root")); - - handle_selfid(ohci, host, - phyid, isroot); - } else { - PRINT(KERN_ERR, ohci->id, + if (!(node_id & 0x80000000)) { + PRINT(KERN_ERR, ohci->id, "SelfID received, but NodeID invalid " "(probably new bus reset occured): %08X", node_id); + goto selfid_not_valid; } + phyid = node_id & 0x0000003f; + isroot = (node_id & 0x40000000) != 0; + + DBGMSG(ohci->id, + "SelfID interrupt received " + "(phyid %d, %s)", phyid, + (isroot ? "root" : "not root")); + + handle_selfid(ohci, host, phyid, isroot); + /* Clear the bus reset event and re-enable the * busReset interrupt. */ spin_lock_irqsave(&ohci->event_lock, flags); @@ -1926,6 +1926,8 @@ } else PRINT(KERN_ERR, ohci->id, "SelfID received outside of bus reset sequence"); + +selfid_not_valid: } /* Make sure we handle everything, just in case we accidentally |