aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firewire/core-transaction.c6
-rw-r--r--drivers/firewire/core.h3
-rw-r--r--drivers/firewire/ohci.c27
3 files changed, 22 insertions, 14 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 0e799516a2ab..eb6935c8ad94 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -523,11 +523,11 @@ static DEFINE_SPINLOCK(address_handler_list_lock);
523static LIST_HEAD(address_handler_list); 523static LIST_HEAD(address_handler_list);
524 524
525const struct fw_address_region fw_high_memory_region = 525const struct fw_address_region fw_high_memory_region =
526 { .start = 0x000100000000ULL, .end = 0xffffe0000000ULL, }; 526 { .start = FW_MAX_PHYSICAL_RANGE, .end = 0xffffe0000000ULL, };
527EXPORT_SYMBOL(fw_high_memory_region); 527EXPORT_SYMBOL(fw_high_memory_region);
528 528
529static const struct fw_address_region low_memory_region = 529static const struct fw_address_region low_memory_region =
530 { .start = 0x000000000000ULL, .end = 0x000100000000ULL, }; 530 { .start = 0x000000000000ULL, .end = FW_MAX_PHYSICAL_RANGE, };
531 531
532#if 0 532#if 0
533const struct fw_address_region fw_private_region = 533const struct fw_address_region fw_private_region =
@@ -1217,7 +1217,7 @@ static void handle_low_memory(struct fw_card *card, struct fw_request *request,
1217} 1217}
1218 1218
1219static struct fw_address_handler low_memory = { 1219static struct fw_address_handler low_memory = {
1220 .length = 0x000100000000ULL, 1220 .length = FW_MAX_PHYSICAL_RANGE,
1221 .address_callback = handle_low_memory, 1221 .address_callback = handle_low_memory,
1222}; 1222};
1223 1223
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
index 515a42c786d0..c98764aeeec6 100644
--- a/drivers/firewire/core.h
+++ b/drivers/firewire/core.h
@@ -237,6 +237,9 @@ static inline bool is_next_generation(int new_generation, int old_generation)
237 237
238#define LOCAL_BUS 0xffc0 238#define LOCAL_BUS 0xffc0
239 239
240/* arbitrarily chosen maximum range for physical DMA: 128 TB */
241#define FW_MAX_PHYSICAL_RANGE (128ULL << 40)
242
240void fw_core_handle_request(struct fw_card *card, struct fw_packet *request); 243void fw_core_handle_request(struct fw_card *card, struct fw_packet *request);
241void fw_core_handle_response(struct fw_card *card, struct fw_packet *packet); 244void fw_core_handle_response(struct fw_card *card, struct fw_packet *packet);
242int fw_get_response_length(struct fw_request *request); 245int fw_get_response_length(struct fw_request *request);
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 6aa8a86cb83b..6f74d8d3f700 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
@@ -2363,7 +2367,7 @@ static int ohci_enable(struct fw_card *card,
2363 reg_write(ohci, OHCI1394_FairnessControl, 0); 2367 reg_write(ohci, OHCI1394_FairnessControl, 0);
2364 card->priority_budget_implemented = ohci->pri_req_max != 0; 2368 card->priority_budget_implemented = ohci->pri_req_max != 0;
2365 2369
2366 reg_write(ohci, OHCI1394_PhyUpperBound, 0x00010000); 2370 reg_write(ohci, OHCI1394_PhyUpperBound, FW_MAX_PHYSICAL_RANGE >> 16);
2367 reg_write(ohci, OHCI1394_IntEventClear, ~0); 2371 reg_write(ohci, OHCI1394_IntEventClear, ~0);
2368 reg_write(ohci, OHCI1394_IntMaskClear, ~0); 2372 reg_write(ohci, OHCI1394_IntMaskClear, ~0);
2369 2373
@@ -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)
@@ -3720,9 +3723,11 @@ static int pci_probe(struct pci_dev *dev,
3720 version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff; 3723 version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
3721 ohci_notice(ohci, 3724 ohci_notice(ohci,
3722 "added OHCI v%x.%x device as card %d, " 3725 "added OHCI v%x.%x device as card %d, "
3723 "%d IR + %d IT contexts, quirks 0x%x\n", 3726 "%d IR + %d IT contexts, quirks 0x%x%s\n",
3724 version >> 16, version & 0xff, ohci->card.index, 3727 version >> 16, version & 0xff, ohci->card.index,
3725 ohci->n_ir, ohci->n_it, ohci->quirks); 3728 ohci->n_ir, ohci->n_it, ohci->quirks,
3729 reg_read(ohci, OHCI1394_PhyUpperBound) ?
3730 ", >4 GB phys DMA" : "");
3726 3731
3727 return 0; 3732 return 0;
3728 3733