summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2013-12-22 05:34:22 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2014-01-12 12:54:38 -0500
commit8bc588e0e585bc9085df75e84d4d5635f45cf360 (patch)
tree8dc98f31ce6330b1bd8670a42f60061e94481c68 /drivers/firewire
parenta9954ce769e2c8b450b00ab2a4e208f447996b2d (diff)
firewire: ohci: Turn remote DMA support into a module parameter
This makes it possible to debug kernel over FireWire without the need to recompile it. [Stefan R: changed description from "...0" to "...N"] Cc: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/ohci.c19
1 files changed, 11 insertions, 8 deletions
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)