@@ -544,12 +544,19 @@ static void ohci_initialize(struct ti_ohci *ohci)
544544 /* Initialize IR Legacy DMA channel mask */
545545 ohci -> ir_legacy_channels = 0 ;
546546
547- /*
548- * Accept AT requests from all nodes. This probably
549- * will have to be controlled from the subsystem
550- * on a per node basis.
551- */
552- reg_write (ohci ,OHCI1394_AsReqFilterHiSet , 0x80000000 );
547+ /* Accept AR requests from all nodes */
548+ reg_write (ohci , OHCI1394_AsReqFilterHiSet , 0x80000000 );
549+
550+ /* Set the address range of the physical response unit.
551+ * Most controllers do not implement it as a writable register though.
552+ * They will keep a hardwired offset of 0x00010000 and show 0x0 as
553+ * register content.
554+ * To actually enable physical responses is the job of our interrupt
555+ * handler which programs the physical request filter. */
556+ reg_write (ohci , OHCI1394_PhyUpperBound , 0xffff0000 );
557+
558+ DBGMSG ("physUpperBoundOffset=%08x" ,
559+ reg_read (ohci , OHCI1394_PhyUpperBound ));
553560
554561 /* Specify AT retries */
555562 reg_write (ohci , OHCI1394_ATRetries ,
@@ -572,6 +579,7 @@ static void ohci_initialize(struct ti_ohci *ohci)
572579 OHCI1394_reqTxComplete |
573580 OHCI1394_isochRx |
574581 OHCI1394_isochTx |
582+ OHCI1394_postedWriteErr |
575583 OHCI1394_cycleInconsistent );
576584
577585 /* Enable link */
@@ -2374,15 +2382,17 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
23742382
23752383 event &= ~OHCI1394_unrecoverableError ;
23762384 }
2377-
2385+ if (event & OHCI1394_postedWriteErr ) {
2386+ PRINT (KERN_ERR , "physical posted write error" );
2387+ /* no recovery strategy yet, had to involve protocol drivers */
2388+ }
23782389 if (event & OHCI1394_cycleInconsistent ) {
23792390 /* We subscribe to the cycleInconsistent event only to
23802391 * clear the corresponding event bit... otherwise,
23812392 * isochronous cycleMatch DMA won't work. */
23822393 DBGMSG ("OHCI1394_cycleInconsistent" );
23832394 event &= ~OHCI1394_cycleInconsistent ;
23842395 }
2385-
23862396 if (event & OHCI1394_busReset ) {
23872397 /* The busReset event bit can't be cleared during the
23882398 * selfID phase, so we disable busReset interrupts, to
@@ -2426,7 +2436,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
24262436 }
24272437 event &= ~OHCI1394_busReset ;
24282438 }
2429-
24302439 if (event & OHCI1394_reqTxComplete ) {
24312440 struct dma_trm_ctx * d = & ohci -> at_req_context ;
24322441 DBGMSG ("Got reqTxComplete interrupt "
@@ -2514,26 +2523,20 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
25142523 reg_write (ohci , OHCI1394_IntMaskSet , OHCI1394_busReset );
25152524 spin_unlock_irqrestore (& ohci -> event_lock , flags );
25162525
2517- /* Accept Physical requests from all nodes. */
2518- reg_write (ohci ,OHCI1394_AsReqFilterHiSet , 0xffffffff );
2519- reg_write (ohci ,OHCI1394_AsReqFilterLoSet , 0xffffffff );
2520-
25212526 /* Turn on phys dma reception.
25222527 *
25232528 * TODO: Enable some sort of filtering management.
25242529 */
25252530 if (phys_dma ) {
2526- reg_write (ohci ,OHCI1394_PhyReqFilterHiSet , 0xffffffff );
2527- reg_write (ohci ,OHCI1394_PhyReqFilterLoSet , 0xffffffff );
2528- reg_write (ohci ,OHCI1394_PhyUpperBound , 0xffff0000 );
2529- } else {
2530- reg_write (ohci ,OHCI1394_PhyReqFilterHiSet , 0x00000000 );
2531- reg_write (ohci ,OHCI1394_PhyReqFilterLoSet , 0x00000000 );
2531+ reg_write (ohci , OHCI1394_PhyReqFilterHiSet ,
2532+ 0xffffffff );
2533+ reg_write (ohci , OHCI1394_PhyReqFilterLoSet ,
2534+ 0xffffffff );
25322535 }
25332536
25342537 DBGMSG ("PhyReqFilter=%08x%08x" ,
2535- reg_read (ohci ,OHCI1394_PhyReqFilterHiSet ),
2536- reg_read (ohci ,OHCI1394_PhyReqFilterLoSet ));
2538+ reg_read (ohci , OHCI1394_PhyReqFilterHiSet ),
2539+ reg_read (ohci , OHCI1394_PhyReqFilterLoSet ));
25372540
25382541 hpsb_selfid_complete (host , phyid , isroot );
25392542 } else
@@ -3259,8 +3262,8 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
32593262 * fail to report the right length. Anyway, the ohci spec
32603263 * clearly says it's 2kb, so this shouldn't be a problem. */
32613264 ohci_base = pci_resource_start (dev , 0 );
3262- if (pci_resource_len (dev , 0 ) != OHCI1394_REGISTER_SIZE )
3263- PRINT (KERN_WARNING , "Unexpected PCI resource length of %lx!" ,
3265+ if (pci_resource_len (dev , 0 ) < OHCI1394_REGISTER_SIZE )
3266+ PRINT (KERN_WARNING , "PCI resource length of %lx too small !" ,
32643267 pci_resource_len (dev , 0 ));
32653268
32663269 /* Seems PCMCIA handles this internally. Not sure why. Seems
0 commit comments