aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/debugging-via-ohci1394.txt4
-rw-r--r--drivers/firewire/ohci.c19
-rw-r--r--lib/Kconfig.debug11
3 files changed, 12 insertions, 22 deletions
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt
index 14d194496490..73473aa8d861 100644
--- a/Documentation/debugging-via-ohci1394.txt
+++ b/Documentation/debugging-via-ohci1394.txt
@@ -38,9 +38,7 @@ Drivers
38 38
39The firewire-ohci driver in drivers/firewire uses filtered physical 39The firewire-ohci driver in drivers/firewire uses filtered physical
40DMA by default, which is more secure but not suitable for remote debugging. 40DMA by default, which is more secure but not suitable for remote debugging.
41Compile the driver with CONFIG_FIREWIRE_OHCI_REMOTE_DMA (Kernel hacking menu: 41Pass the remote_dma=1 parameter to the driver to get unfiltered physical DMA.
42Remote debugging over FireWire with firewire-ohci) to get unfiltered physical
43DMA.
44 42
45Because the firewire-ohci driver depends on the PCI enumeration to be 43Because the firewire-ohci driver depends on the PCI enumeration to be
46completed, an initialization routine which runs pretty early has been 44completed, an initialization routine which runs pretty early has been
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 6aa8a86cb83b..036fb3bd5659 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -370,6 +370,10 @@ MODULE_PARM_DESC(debug, "Verbose logging (default = 0"
370 ", busReset events = " __stringify(OHCI_PARAM_DEBUG_BUSRESETS) 370 ", busReset events = " __stringify(OHCI_PARAM_DEBUG_BUSRESETS)
371 ", or a combination, or all = -1)"); 371 ", or a combination, or all = -1)");
372 372
373static bool param_remote_dma;
374module_param_named(remote_dma, param_remote_dma, bool, 0444);
375MODULE_PARM_DESC(remote_dma, "Enable unfiltered remote DMA (default = N)");
376
373static void log_irqs(struct fw_ohci *ohci, u32 evt) 377static void log_irqs(struct fw_ohci *ohci, u32 evt)
374{ 378{
375 if (likely(!(param_debug & 379 if (likely(!(param_debug &
@@ -2050,10 +2054,10 @@ static void bus_reset_work(struct work_struct *work)
2050 be32_to_cpu(ohci->next_header)); 2054 be32_to_cpu(ohci->next_header));
2051 } 2055 }
2052 2056
2053#ifdef CONFIG_FIREWIRE_OHCI_REMOTE_DMA 2057 if (param_remote_dma) {
2054 reg_write(ohci, OHCI1394_PhyReqFilterHiSet, ~0); 2058 reg_write(ohci, OHCI1394_PhyReqFilterHiSet, ~0);
2055 reg_write(ohci, OHCI1394_PhyReqFilterLoSet, ~0); 2059 reg_write(ohci, OHCI1394_PhyReqFilterLoSet, ~0);
2056#endif 2060 }
2057 2061
2058 spin_unlock_irq(&ohci->lock); 2062 spin_unlock_irq(&ohci->lock);
2059 2063
@@ -2587,13 +2591,13 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
2587static int ohci_enable_phys_dma(struct fw_card *card, 2591static int ohci_enable_phys_dma(struct fw_card *card,
2588 int node_id, int generation) 2592 int node_id, int generation)
2589{ 2593{
2590#ifdef CONFIG_FIREWIRE_OHCI_REMOTE_DMA
2591 return 0;
2592#else
2593 struct fw_ohci *ohci = fw_ohci(card); 2594 struct fw_ohci *ohci = fw_ohci(card);
2594 unsigned long flags; 2595 unsigned long flags;
2595 int n, ret = 0; 2596 int n, ret = 0;
2596 2597
2598 if (param_remote_dma)
2599 return 0;
2600
2597 /* 2601 /*
2598 * FIXME: Make sure this bitmask is cleared when we clear the busReset 2602 * FIXME: Make sure this bitmask is cleared when we clear the busReset
2599 * interrupt bit. Clear physReqResourceAllBuses on bus reset. 2603 * interrupt bit. Clear physReqResourceAllBuses on bus reset.
@@ -2622,7 +2626,6 @@ static int ohci_enable_phys_dma(struct fw_card *card,
2622 spin_unlock_irqrestore(&ohci->lock, flags); 2626 spin_unlock_irqrestore(&ohci->lock, flags);
2623 2627
2624 return ret; 2628 return ret;
2625#endif /* CONFIG_FIREWIRE_OHCI_REMOTE_DMA */
2626} 2629}
2627 2630
2628static u32 ohci_read_csr(struct fw_card *card, int csr_offset) 2631static u32 ohci_read_csr(struct fw_card *card, int csr_offset)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index db25707aa41b..dc30284a3b07 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1547,17 +1547,6 @@ config PROVIDE_OHCI1394_DMA_INIT
1547 1547
1548 See Documentation/debugging-via-ohci1394.txt for more information. 1548 See Documentation/debugging-via-ohci1394.txt for more information.
1549 1549
1550config FIREWIRE_OHCI_REMOTE_DMA
1551 bool "Remote debugging over FireWire with firewire-ohci"
1552 depends on FIREWIRE_OHCI
1553 help
1554 This option lets you use the FireWire bus for remote debugging
1555 with help of the firewire-ohci driver. It enables unfiltered
1556 remote DMA in firewire-ohci.
1557 See Documentation/debugging-via-ohci1394.txt for more information.
1558
1559 If unsure, say N.
1560
1561config BUILD_DOCSRC 1550config BUILD_DOCSRC
1562 bool "Build targets in Documentation/ tree" 1551 bool "Build targets in Documentation/ tree"
1563 depends on HEADERS_CHECK 1552 depends on HEADERS_CHECK