Skip to content

Commit 090699c

Browse files
author
Stefan Richter
committed
firewire: ohci: always use packet-per-buffer mode for isochronous reception
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 <[email protected]>
1 parent cf0e575 commit 090699c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/firewire/ohci.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,6 @@ static int ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
22262226
if (rest == 0)
22272227
return -EINVAL;
22282228

2229-
/* FIXME: make packet-per-buffer/dual-buffer a context option */
22302229
while (rest > 0) {
22312230
d = context_get_descriptors(&ctx->context,
22322231
z + header_z, &d_bus);
@@ -2470,7 +2469,10 @@ static int __devinit pci_probe(struct pci_dev *dev,
24702469
}
24712470

24722471
version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
2472+
#if 0
2473+
/* FIXME: make it a context option or remove dual-buffer mode */
24732474
ohci->use_dualbuffer = version >= OHCI_VERSION_1_1;
2475+
#endif
24742476

24752477
/* dual-buffer mode is broken if more than one IR context is active */
24762478
if (dev->vendor == PCI_VENDOR_ID_AGERE &&

0 commit comments

Comments
 (0)