[Linux1394-cvslog] rev 818 - branches/linux-2.4
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2003-03-07 18:06:34
|
Author: bencollins Date: 2003-03-07 13:05:46 -0500 (Fri, 07 Mar 2003) New Revision: 818 Modified: branches/linux-2.4/nodemgr.c branches/linux-2.4/ohci1394.c Log: ne needs to be memset after kmalloc. Modified: branches/linux-2.4/ohci1394.c ============================================================================== --- branches/linux-2.4/ohci1394.c (original) +++ branches/linux-2.4/ohci1394.c 2003-03-07 13:05:48.000000000 -0500 @@ -2253,22 +2253,28 @@ } if (event & OHCI1394_busReset) { + int loops = 0; + /* The busReset event bit can't be cleared during the * selfID phase, so we disable busReset interrupts, to * avoid burying the cpu in interrupt requests. */ spin_lock_irqsave(&ohci->event_lock, flags); reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset); - if (ohci->dev->vendor == PCI_VENDOR_ID_APPLE && - ohci->dev->device == PCI_DEVICE_ID_APPLE_UNI_N_FW) { - udelay(10); - while(reg_read(ohci, OHCI1394_IntEventSet) & OHCI1394_busReset) { - reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset); - spin_unlock_irqrestore(&ohci->event_lock, flags); - udelay(10); - spin_lock_irqsave(&ohci->event_lock, flags); - } + udelay(10); + while (reg_read(ohci, OHCI1394_IntEventSet) & OHCI1394_busReset) { + if (loops++ > 10000) { + hpsb_reset_bus(host, 1); + loops = 0; + DBGMSG(ohci->id, "Out of control loop, resetting"); + } + + reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset); + spin_unlock_irqrestore(&ohci->event_lock, flags); + udelay(10); + spin_lock_irqsave(&ohci->event_lock, flags); } spin_unlock_irqrestore(&ohci->event_lock, flags); + if (!host->in_bus_reset) { DBGMSG(ohci->id, "irq_handler: Bus reset requested%s", (attempt_root) ? " and attempting to become root" Modified: branches/linux-2.4/nodemgr.c ============================================================================== --- branches/linux-2.4/nodemgr.c (original) +++ branches/linux-2.4/nodemgr.c 2003-03-07 13:05:48.000000000 -0500 @@ -312,6 +312,7 @@ } ne = kmalloc(total_size, SLAB_ATOMIC); if (ne != NULL) { + memset(ne, 0, total_size); if (size != 0) { ne->vendor_name = (const char *) &(ne->quadlets[2]); |