diff options
author | Stephan Gatzka <stephan@gatzka.org> | 2011-09-26 15:44:30 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-10-09 11:00:18 -0400 |
commit | a74477db9171e677b7a37b89e6e0ac8a15ba1f26 (patch) | |
tree | 72f6a3ba84ef8db0bcbb58c75384e2aa9ccd1c9f /drivers/firewire | |
parent | 4ec4a67aa100268b4ac5ae32b54843d975969969 (diff) |
firewire: net: Use posted writes
Change memory region to ohci "middle address space". This effectively
reduces the number of packets by 50%.
[Stefan R.:] This eliminates 1394 ack packets and improved throughput
by a few percent in some tests with an S400a connection with and without
gap count optimization. Since firewire-net taxes the AR-req DMA unit of
a FireWire controller much more than firewire-sbp2 (which uses the
middle address space with PCI posted writes too), this commit also
changes a related error printk into a ratelimited one as a precaution.
Side note: The IPv4-over-1394 drivers of Mac OS X 10.4, Windows XP SP3,
and the Thesycon 1394 bus driver for Windows all use the middle address
space too.
Signed-off-by: Stephan Gatzka <stephan@gatzka.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/net.c | 9 | ||||
-rw-r--r-- | drivers/firewire/ohci.c | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index d1fad1fb17e2..a20f45b1e7e5 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
@@ -1121,17 +1121,12 @@ static int fwnet_broadcast_start(struct fwnet_device *dev) | |||
1121 | unsigned u; | 1121 | unsigned u; |
1122 | 1122 | ||
1123 | if (dev->local_fifo == FWNET_NO_FIFO_ADDR) { | 1123 | if (dev->local_fifo == FWNET_NO_FIFO_ADDR) { |
1124 | /* outside OHCI posted write area? */ | ||
1125 | static const struct fw_address_region region = { | ||
1126 | .start = 0xffff00000000ULL, | ||
1127 | .end = CSR_REGISTER_BASE, | ||
1128 | }; | ||
1129 | |||
1130 | dev->handler.length = 4096; | 1124 | dev->handler.length = 4096; |
1131 | dev->handler.address_callback = fwnet_receive_packet; | 1125 | dev->handler.address_callback = fwnet_receive_packet; |
1132 | dev->handler.callback_data = dev; | 1126 | dev->handler.callback_data = dev; |
1133 | 1127 | ||
1134 | retval = fw_core_add_address_handler(&dev->handler, ®ion); | 1128 | retval = fw_core_add_address_handler(&dev->handler, |
1129 | &fw_high_memory_region); | ||
1135 | if (retval < 0) | 1130 | if (retval < 0) |
1136 | goto failed_initial; | 1131 | goto failed_initial; |
1137 | 1132 | ||
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 399d5926caf7..bffc2ad7ecab 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -2045,7 +2045,8 @@ static irqreturn_t irq_handler(int irq, void *data) | |||
2045 | reg_read(ohci, OHCI1394_PostedWriteAddressLo); | 2045 | reg_read(ohci, OHCI1394_PostedWriteAddressLo); |
2046 | reg_write(ohci, OHCI1394_IntEventClear, | 2046 | reg_write(ohci, OHCI1394_IntEventClear, |
2047 | OHCI1394_postedWriteErr); | 2047 | OHCI1394_postedWriteErr); |
2048 | fw_error("PCI posted write error\n"); | 2048 | if (printk_ratelimit()) |
2049 | fw_error("PCI posted write error\n"); | ||
2049 | } | 2050 | } |
2050 | 2051 | ||
2051 | if (unlikely(event & OHCI1394_cycleTooLong)) { | 2052 | if (unlikely(event & OHCI1394_cycleTooLong)) { |