[Linux1394-cvslog] rev 669 - in branches: . gasp
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-11-16 05:00:37
|
Author: bencollins Date: 2002-11-16 00:00:04 -0500 (Sat, 16 Nov 2002) New Revision: 669 Added: branches/gasp/ Modified: branches/gasp/ohci1394.c branches/gasp/sbp2.h Log: Create new gasp branch from trunk, r668 Copied: gasp (from rev 666, trunk) Modified: branches/gasp/ohci1394.c ============================================================================== --- trunk/ohci1394.c (original) +++ branches/gasp/ohci1394.c 2002-11-16 00:00:05.000000000 -0500 @@ -1873,16 +1873,11 @@ event &= ~OHCI1394_isochTx; } if (event & OHCI1394_selfIDComplete) { + event &= ~OHCI1394_selfIDComplete; + if (host->in_bus_reset) { node_id = reg_read(ohci, OHCI1394_NodeID); - /* If our nodeid is not valid, give a msec delay - * to let it settle in and try again. */ - if (!(node_id & 0x80000000)) { - mdelay(1); - node_id = reg_read(ohci, OHCI1394_NodeID); - } - if (node_id & 0x80000000) { /* NodeID valid */ phyid = node_id & 0x0000003f; isroot = (node_id & 0x40000000) != 0; @@ -1896,52 +1891,41 @@ phyid, isroot); } else { PRINT(KERN_ERR, ohci->id, - "SelfID interrupt received, but " - "NodeID is not valid: %08X", + "SelfID received, but NodeID invalid " + "(probably new bus reset occured): %08X", node_id); } + /* Clear the bus reset event and re-enable the + * busReset interrupt. */ + spin_lock_irqsave(&ohci->event_lock, flags); + reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset); + reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); + spin_unlock_irqrestore(&ohci->event_lock, flags); + /* Accept Physical requests from all nodes. */ - reg_write(ohci,OHCI1394_AsReqFilterHiSet, - 0xffffffff); - reg_write(ohci,OHCI1394_AsReqFilterLoSet, - 0xffffffff); + reg_write(ohci,OHCI1394_AsReqFilterHiSet, 0xffffffff); + reg_write(ohci,OHCI1394_AsReqFilterLoSet, 0xffffffff); + + /* Turn on phys dma reception. + * + * TODO: Enable some sort of filtering management. + */ + if (phys_dma) { + reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0xffffffff); + reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0xffffffff); + reg_write(ohci,OHCI1394_PhyUpperBound, 0xffff0000); + } else { + reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0x00000000); + reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0x00000000); + } + + DBGMSG(ohci->id, "PhyReqFilter=%08x%08x\n", + reg_read(ohci,OHCI1394_PhyReqFilterHiSet), + reg_read(ohci,OHCI1394_PhyReqFilterLoSet)); } else PRINT(KERN_ERR, ohci->id, "SelfID received outside of bus reset sequence"); - - /* Finally, we clear the busReset event and reenable - * the busReset interrupt. */ - spin_lock_irqsave(&ohci->event_lock, flags); - reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset); - reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); - spin_unlock_irqrestore(&ohci->event_lock, flags); - event &= ~OHCI1394_selfIDComplete; - - /* Turn on phys dma reception. We should - * probably manage the filtering somehow, - * instead of blindly turning it on. */ - - /* - * CAUTION! - * Some chips (TI TSB43AB22) won't take a value in - * the PhyReqFilter register until after the IntEvent - * is cleared for bus reset, and even then a short - * delay is required. - */ - if (phys_dma) { - mdelay(1); - reg_write(ohci,OHCI1394_PhyReqFilterHiSet, - 0xffffffff); - reg_write(ohci,OHCI1394_PhyReqFilterLoSet, - 0xffffffff); - reg_write(ohci,OHCI1394_PhyUpperBound, - 0xffff0000); - } - - DBGMSG(ohci->id, "PhyReqFilter=%08x%08x\n", - reg_read(ohci,OHCI1394_PhyReqFilterHiSet), - reg_read(ohci,OHCI1394_PhyReqFilterLoSet)); } /* Make sure we handle everything, just in case we accidentally Modified: branches/gasp/sbp2.h ============================================================================== --- trunk/sbp2.h (original) +++ branches/gasp/sbp2.h 2002-11-16 00:00:05.000000000 -0500 @@ -493,10 +493,10 @@ static int sbp2scsi_detect (Scsi_Host_Template *tpnt); static const char *sbp2scsi_info (struct Scsi_Host *host); void sbp2scsi_setup(char *str, int *ints); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28) -static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,44) +static int sbp2scsi_biosparam (struct scsi_device *sdev, struct block_device *dev, sector_t capacity, int geom[]); #else -static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]); +static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]); #endif static int sbp2scsi_abort (Scsi_Cmnd *SCpnt); static int sbp2scsi_reset (Scsi_Cmnd *SCpnt); |