From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux-kernel@vger.kernel.org
Cc: linux1394-devel@lists.sourceforge.net,
Clemens Ladisch <cladisch@fastmail.net>
Subject: [PATCH 3/5] firewire: ohci: always use packet-per-buffer mode for isochronous reception
Date: Sat, 26 Dec 2009 01:35:14 +0100 (CET) [thread overview]
Message-ID: <tkrat.057bc7eccde4ce2f@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.edaaa9d0f51812e8@s5r6.in-berlin.de>
This is a minimal change meant for the short term: Never set the
ohci->use_dualbuffer flag to true.
There are two reasons to do so:
- Packet-per-buffer mode and dual-buffer mode do not behave the same
under certain circumstances, notably if several packets are covered
by a single fw_cdev_iso_packet descriptor.
http://marc.info/?l=linux1394-devel&m=124965653718313
Therefore the driver stack should not silently choose one or the
other mode but should leave the choice to the high-level driver
(regardless if kernel driver or userspace driver). Or simply always
only offer packet-per-buffer mode, since a considerable number of
controllers, even current ones, does not offer dual-buffer support.
- Even under circumstances where packet-per-buffer mode and
dual-buffer mode behave exactly the same --- notably when used
through libraw1394, libdc1394, as well as the current two kernel
drivers which use isochronous reception (firewire-net and firedtv)
--- we are still faced with the problem that several OHCI 1.1
controllers have bugs in dual-buffer mode. Although it looks like
we have identified most of those buggy controllers by now, we
cannot be quite sure about that.
So, use packet-per-buffer by default from now on. This change should
be followed up by a more complete solution: Either extend the
in-kernel API and the userspace ABI by a choice between the two IR modes
or remove all dual-buffer related code from firewire-ohci.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/ohci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-2.6.33-rc2/drivers/firewire/ohci.c
===================================================================
--- linux-2.6.33-rc2.orig/drivers/firewire/ohci.c
+++ linux-2.6.33-rc2/drivers/firewire/ohci.c
@@ -2226,7 +2226,6 @@ static int ohci_queue_iso_receive_dualbu
if (rest == 0)
return -EINVAL;
- /* FIXME: make packet-per-buffer/dual-buffer a context option */
while (rest > 0) {
d = context_get_descriptors(&ctx->context,
z + header_z, &d_bus);
@@ -2470,7 +2469,10 @@ static int __devinit pci_probe(struct pc
}
version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
+#if 0
+ /* FIXME: make it a context option or remove dual-buffer mode */
ohci->use_dualbuffer = version >= OHCI_VERSION_1_1;
+#endif
/* dual-buffer mode is broken if more than one IR context is active */
if (dev->vendor == PCI_VENDOR_ID_AGERE &&
--
Stefan Richter
-=====-==--= ==-- ==-=-
http://arcgraph.de/sr/
next prev parent reply other threads:[~2009-12-26 0:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-26 0:32 [PATCH 0/5] firewire: fixes, status update Stefan Richter
2009-12-26 0:33 ` [PATCH 1/5] firewire: fix use of multiple AV/C devices, allow multiple FCP listeners Stefan Richter
2009-12-26 8:35 ` Pieter Palmers
2009-12-26 12:01 ` Stefan Richter
2009-12-26 13:23 ` Pieter Palmers
2009-12-26 14:13 ` Stefan Richter
2009-12-26 14:33 ` Stefan Richter
2010-01-23 14:51 ` Stefan Richter
2010-01-24 15:45 ` [PATCH] firewire: core: fix use-after-free regression in FCP handler Stefan Richter
2009-12-26 0:34 ` [PATCH 2/5] firewire: cdev: fix another memory leak in an error path Stefan Richter
2009-12-26 0:35 ` Stefan Richter [this message]
2009-12-26 0:36 ` [PATCH 4/5] firewire, ieee1394: update MAINTAINERS entries Stefan Richter
2009-12-26 15:57 ` Dan Dennedy
2009-12-26 0:36 ` [PATCH 5/5] firewire, ieee1394: update Kconfig help Stefan Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tkrat.057bc7eccde4ce2f@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=cladisch@fastmail.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox