diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 21:48:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 21:48:03 -0500 |
commit | 224b148ef7c9a00642eb33dbdf62f2840bde974f (patch) | |
tree | 1236762b06beb3565671adc5d554ae2651cd661f /drivers/ieee1394/ohci1394.c | |
parent | 547679087bc60277d11b11631d826895762c4505 (diff) | |
parent | c0e4077c946104e5d8a62f835dcdca5c79c8af7d (diff) |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394:
ohci1394: cleanup the "Unexpected PCI resource length" warning.
sbp2: misc debug logging cleanups
sbp2: proper treatment of DID_OK
ieee1394: set read permission for parameter disable_irm
sbp2: check for ARM failure
ohci1394: clean up asynchronous and physical request filters programming
ieee1394: remove amdtp remains from ieee1394_core.h
ieee1394: remove devfs support
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
sbp2: prevent unloading of 1394 low-level driver
Diffstat (limited to 'drivers/ieee1394/ohci1394.c')
-rw-r--r-- | drivers/ieee1394/ohci1394.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index b6b96fa04d62..a86beeb6af5d 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c | |||
@@ -544,12 +544,19 @@ static void ohci_initialize(struct ti_ohci *ohci) | |||
544 | /* Initialize IR Legacy DMA channel mask */ | 544 | /* Initialize IR Legacy DMA channel mask */ |
545 | ohci->ir_legacy_channels = 0; | 545 | ohci->ir_legacy_channels = 0; |
546 | 546 | ||
547 | /* | 547 | /* Accept AR requests from all nodes */ |
548 | * Accept AT requests from all nodes. This probably | 548 | reg_write(ohci, OHCI1394_AsReqFilterHiSet, 0x80000000); |
549 | * will have to be controlled from the subsystem | 549 | |
550 | * on a per node basis. | 550 | /* Set the address range of the physical response unit. |
551 | */ | 551 | * Most controllers do not implement it as a writable register though. |
552 | reg_write(ohci,OHCI1394_AsReqFilterHiSet, 0x80000000); | 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)); | ||
553 | 560 | ||
554 | /* Specify AT retries */ | 561 | /* Specify AT retries */ |
555 | reg_write(ohci, OHCI1394_ATRetries, | 562 | reg_write(ohci, OHCI1394_ATRetries, |
@@ -572,6 +579,7 @@ static void ohci_initialize(struct ti_ohci *ohci) | |||
572 | OHCI1394_reqTxComplete | | 579 | OHCI1394_reqTxComplete | |
573 | OHCI1394_isochRx | | 580 | OHCI1394_isochRx | |
574 | OHCI1394_isochTx | | 581 | OHCI1394_isochTx | |
582 | OHCI1394_postedWriteErr | | ||
575 | OHCI1394_cycleInconsistent); | 583 | OHCI1394_cycleInconsistent); |
576 | 584 | ||
577 | /* Enable link */ | 585 | /* Enable link */ |
@@ -2374,7 +2382,10 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, | |||
2374 | 2382 | ||
2375 | event &= ~OHCI1394_unrecoverableError; | 2383 | event &= ~OHCI1394_unrecoverableError; |
2376 | } | 2384 | } |
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 | } | ||
2378 | if (event & OHCI1394_cycleInconsistent) { | 2389 | if (event & OHCI1394_cycleInconsistent) { |
2379 | /* We subscribe to the cycleInconsistent event only to | 2390 | /* We subscribe to the cycleInconsistent event only to |
2380 | * clear the corresponding event bit... otherwise, | 2391 | * clear the corresponding event bit... otherwise, |
@@ -2382,7 +2393,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, | |||
2382 | DBGMSG("OHCI1394_cycleInconsistent"); | 2393 | DBGMSG("OHCI1394_cycleInconsistent"); |
2383 | event &= ~OHCI1394_cycleInconsistent; | 2394 | event &= ~OHCI1394_cycleInconsistent; |
2384 | } | 2395 | } |
2385 | |||
2386 | if (event & OHCI1394_busReset) { | 2396 | if (event & OHCI1394_busReset) { |
2387 | /* The busReset event bit can't be cleared during the | 2397 | /* The busReset event bit can't be cleared during the |
2388 | * selfID phase, so we disable busReset interrupts, to | 2398 | * selfID phase, so we disable busReset interrupts, to |
@@ -2426,7 +2436,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, | |||
2426 | } | 2436 | } |
2427 | event &= ~OHCI1394_busReset; | 2437 | event &= ~OHCI1394_busReset; |
2428 | } | 2438 | } |
2429 | |||
2430 | if (event & OHCI1394_reqTxComplete) { | 2439 | if (event & OHCI1394_reqTxComplete) { |
2431 | struct dma_trm_ctx *d = &ohci->at_req_context; | 2440 | struct dma_trm_ctx *d = &ohci->at_req_context; |
2432 | DBGMSG("Got reqTxComplete interrupt " | 2441 | DBGMSG("Got reqTxComplete interrupt " |
@@ -2514,26 +2523,20 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, | |||
2514 | reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); | 2523 | reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); |
2515 | spin_unlock_irqrestore(&ohci->event_lock, flags); | 2524 | spin_unlock_irqrestore(&ohci->event_lock, flags); |
2516 | 2525 | ||
2517 | /* Accept Physical requests from all nodes. */ | ||
2518 | reg_write(ohci,OHCI1394_AsReqFilterHiSet, 0xffffffff); | ||
2519 | reg_write(ohci,OHCI1394_AsReqFilterLoSet, 0xffffffff); | ||
2520 | |||
2521 | /* Turn on phys dma reception. | 2526 | /* Turn on phys dma reception. |
2522 | * | 2527 | * |
2523 | * TODO: Enable some sort of filtering management. | 2528 | * TODO: Enable some sort of filtering management. |
2524 | */ | 2529 | */ |
2525 | if (phys_dma) { | 2530 | if (phys_dma) { |
2526 | reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0xffffffff); | 2531 | reg_write(ohci, OHCI1394_PhyReqFilterHiSet, |
2527 | reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0xffffffff); | 2532 | 0xffffffff); |
2528 | reg_write(ohci,OHCI1394_PhyUpperBound, 0xffff0000); | 2533 | reg_write(ohci, OHCI1394_PhyReqFilterLoSet, |
2529 | } else { | 2534 | 0xffffffff); |
2530 | reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0x00000000); | ||
2531 | reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0x00000000); | ||
2532 | } | 2535 | } |
2533 | 2536 | ||
2534 | DBGMSG("PhyReqFilter=%08x%08x", | 2537 | DBGMSG("PhyReqFilter=%08x%08x", |
2535 | reg_read(ohci,OHCI1394_PhyReqFilterHiSet), | 2538 | reg_read(ohci, OHCI1394_PhyReqFilterHiSet), |
2536 | reg_read(ohci,OHCI1394_PhyReqFilterLoSet)); | 2539 | reg_read(ohci, OHCI1394_PhyReqFilterLoSet)); |
2537 | 2540 | ||
2538 | hpsb_selfid_complete(host, phyid, isroot); | 2541 | hpsb_selfid_complete(host, phyid, isroot); |
2539 | } else | 2542 | } else |
@@ -3259,8 +3262,8 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, | |||
3259 | * fail to report the right length. Anyway, the ohci spec | 3262 | * fail to report the right length. Anyway, the ohci spec |
3260 | * clearly says it's 2kb, so this shouldn't be a problem. */ | 3263 | * clearly says it's 2kb, so this shouldn't be a problem. */ |
3261 | ohci_base = pci_resource_start(dev, 0); | 3264 | ohci_base = pci_resource_start(dev, 0); |
3262 | if (pci_resource_len(dev, 0) != OHCI1394_REGISTER_SIZE) | 3265 | if (pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE) |
3263 | PRINT(KERN_WARNING, "Unexpected PCI resource length of %lx!", | 3266 | PRINT(KERN_WARNING, "PCI resource length of %lx too small!", |
3264 | pci_resource_len(dev, 0)); | 3267 | pci_resource_len(dev, 0)); |
3265 | 3268 | ||
3266 | /* Seems PCMCIA handles this internally. Not sure why. Seems | 3269 | /* Seems PCMCIA handles this internally. Not sure why. Seems |