Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a74477db authored by Stephan Gatzka's avatar Stephan Gatzka Committed by Stefan Richter
Browse files

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: default avatarStephan Gatzka <stephan@gatzka.org>
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 4ec4a67a
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1121,17 +1121,12 @@ static int fwnet_broadcast_start(struct fwnet_device *dev)
	unsigned u;

	if (dev->local_fifo == FWNET_NO_FIFO_ADDR) {
		/* outside OHCI posted write area? */
		static const struct fw_address_region region = {
			.start = 0xffff00000000ULL,
			.end   = CSR_REGISTER_BASE,
		};

		dev->handler.length = 4096;
		dev->handler.address_callback = fwnet_receive_packet;
		dev->handler.callback_data = dev;

		retval = fw_core_add_address_handler(&dev->handler, &region);
		retval = fw_core_add_address_handler(&dev->handler,
					&fw_high_memory_region);
		if (retval < 0)
			goto failed_initial;

+2 −1
Original line number Diff line number Diff line
@@ -2045,6 +2045,7 @@ static irqreturn_t irq_handler(int irq, void *data)
		reg_read(ohci, OHCI1394_PostedWriteAddressLo);
		reg_write(ohci, OHCI1394_IntEventClear,
			  OHCI1394_postedWriteErr);
		if (printk_ratelimit())
			fw_error("PCI posted write error\n");
	}