aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/ohci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/ohci.c')
-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)