aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-ohci.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-07-10firewire: missing newline in printkStefan Richter1-3/+3
Also remove some errno printouts which will be shown by infrastructure code anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-06-29firewire: fix async reception on big endian machinesStefan Richter1-3/+3
descriptor.data_address is little endian Tested-by: Olaf Hering <olh@suse.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-06-16firewire: fix hang after card ejectionStefan Richter1-1/+1
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-05-31firewire: Implement suspend/resume PCI driver hooks.Kristian Høgsberg1-64/+123
It's a low-impact design, that just makes suspend/resume look like a bus reset to the upper level drivers, but it should be sufficient. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-27firewire: Add missing byteswapping for receive DMA programs.Kristian Høgsberg1-2/+3
Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-15missing mm.h in fw-ohciAl Viro1-0/+1
need it for page_private(), not all targets have it pulled indirectly Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-10firewire: Convert OHCI driver to use standard goto unwinding for error handling.Kristian Høgsberg1-44/+42
Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-10firewire: Always use parens with sizeof.Kristian Høgsberg1-14/+14
Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-10firewire: Provide module aliase for backwards compatibility.Olaf Hering1-0/+5
This patch loads fw-sbp2 if sbp2 is still in the config file. So one can go back and forth between releases without worry about the root filesystem drivers. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Existing mkinitrd scripts still have to be adapted, unless they grok module aliases. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-10firewire: Uppercase most macro names.Kristian Høgsberg1-74/+74
Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-10firewire: Clean up comment style.Kristian Høgsberg1-50/+94
Drop filenames from file preamble, drop editor annotations and use standard indent style for block comments. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed typo)
2007-04-12firewire: Check for CONTEXT_RUN not CONTEXT_ACTIVE when starting AT DMA context.Kristian Høgsberg1-1/+1
Doh, bad typo... Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-12firewire: Byteswap iso header so all headers are presented as be32.Kristian Høgsberg1-1/+7
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-28firewire: Fix start on cycle 0 for IT, implement start on cycle for IR.Kristian Høgsberg1-9/+13
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-28firewire: Remember to set the driver_data pointer when queueing a packet.Kristian Høgsberg1-0/+1
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-15firewire: Move sync and tag parameters to start_iso ioctl.Kristian Høgsberg1-5/+4
Setting these at create_context time or start_iso time doesn't matter much, but raw1394 sets them at start_iso time so that will be easier to emulate this way. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-15firewire: Fix dualbuffer iso receive mode and drop buffer fill mode.Kristian Høgsberg1-114/+46
The dualbuffer DMA setup did not account for the iso trailer word and thus didn't work correctly. With this fixed we can drop the dual buffer fallback mode. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Implement CSR cycle time and bus time registers.Kristian Høgsberg1-2/+24
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Implement topology map and fix a couple of loopback bugs.Kristian Høgsberg1-2/+9
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Move async transmit to use the general context code.Kristian Høgsberg1-212/+148
The old async transmit context handling was starting and stopping DMA for every packet transmission. This could cause silently failing packet transmission, if the DMA was reprogrammed too close to being stopped. The general context code keeps DMA running at all times and fixes this problem. It's also a nice cleanup. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Clear all interrupt bits before shutting down.Kristian Høgsberg1-1/+2
Some flaky controllers doesn't honor the masterIntEnable bits and can generate bus reset events even if that bit is cleared. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Scheduled removal of SA_xxx interrupt flags fixups 3Thomas Gleixner1-1/+1
The obsolete SA_xxx interrupt flags have been used despite the scheduled removal. Fixup the remaining users in -mm. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: adjust whitespaceStefan Richter1-24/+22
Remove space before tab and trailing whitespace. Unify indentation of goto target labels. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Implement sync and tag matching for isochronous receive.Kristian Høgsberg1-2/+30
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Configure channel and speed at context creation time.Kristian Høgsberg1-2/+2
We need the channel number as we queue up iso packets for transmission so we can fill out the header correctly. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Store OHCI version and make sure we have at least 1.1 before doing dualbuffer.Kristian Høgsberg1-4/+15
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Don't touch DMA descriptors after appending.Kristian Høgsberg1-6/+6
When a DMA descriptor is appended to the context we sync it for DMA and the device might potentially read it immediately. So, we can't set the IRQ bits in the descriptor after appending. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Use a buffer fill descriptor for receive when header size is 0.Kristian Høgsberg1-15/+92
When the DMA is setup to not strip any headers, we need to use the buffer fill descriptor instead of the dual buffer, since the dual buffer descriptor must strip a non-zero number of header quadlets. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Set correct buffer lengths for dualbuffer DMA descriptor.Kristian Høgsberg1-4/+3
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Acummulate received iso headers and send them back to user space.Kristian Høgsberg1-15/+34
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Log OHCI chipset version in PCI probe.Kristian Høgsberg1-2/+4
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Implement functionality to stop isochronous DMA contexts.Kristian Høgsberg1-11/+33
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Rename 'send_iso' to 'start_iso'.Kristian Høgsberg1-2/+2
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Implement basic isochronous receive functionality.Kristian Høgsberg1-19/+149
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Generalize the iso transmit descriptor buffer logic.Kristian Høgsberg1-142/+218
The descriptor circular buffer logic used for iso transmission is useful for async transmit too, so pull the sharable logic out in a few standalone functions. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Split the iso buffer out from fw_iso_context and avoid vmalloc.Kristian Høgsberg1-4/+8
This patch splits out the iso buffer so we can initialize it at mmap time with the size provided in the mmap call. Furthermore, allocate the backing pages using alloc_page to avoid setting up kernel side virtual memory mappings for the pages. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Read the *Clear versions of the iso interrupt register.Kristian Høgsberg1-2/+2
The *Clear registers returns the masked value when read which is what we want. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Fix another typo from the bitfield conversion.Kristian Høgsberg1-4/+4
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Use dma_mapping_error() for checking for DMA mapping errors.Kristian Høgsberg1-8/+15
Pointed out by Pete Zaitcev. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Implement proper transaction cancelation.Kristian Høgsberg1-0/+33
Drivers such as fw-sbp2 had no way to properly cancel in-progress transactions, which could leave a pending transaction or an unset packet in the low-level queues after kfree'ing the containing structure. fw_cancel_transaction() lets drivers cancel a submitted transaction. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Reduce some redundant register definitions.Kristian Høgsberg1-28/+22
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Rework async receive DMA.Kristian Høgsberg1-82/+130
The old DMA program for receiving async packets stops DMA while processing received packets and only expects one packet per interrupt. Stopping DMA can silently drop packets and we need to handle multiple received packets per interrupt. This new version keeps DMA running at all times and just append new pages as buffers fill up, and supports multiple packets per interrupt. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Make sure we wait for DMA to stop before we reprogram it.Kristian Høgsberg1-5/+16
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Sanitize send error codes.Kristian Høgsberg1-10/+10
Drop the negative errnos and use RCODEs for all error codes in the complete transaction callback. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Handle access to CSR resources on local node.Kristian Høgsberg1-16/+114
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Loop requests to the host controller back into the stack.Kristian Høgsberg1-8/+25
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Use struct fw_packet for incoming packets too in controller interface.Kristian Høgsberg1-20/+41
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: consistent usage of node_idStefan Richter1-9/+12
Definitions as per IEEE 1212 and IEEE 1394: Node ID: Concatenation of bus ID and local ID. 16 bits long. Bus ID: Identifies a particular bus within a group of buses interconnected by bus bridges. Local ID: Identifies a particular node on a bus. PHY ID: Local ID of IEEE 1394 nodes. 6 bits long. Never ever use a variable called node_id for anything else than a node ID. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: fw-ohci: remove unnecessary macroStefan Richter1-3/+0
Cleans up after patch "Add PCI class ID for firewire OHCI controllers". Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-03-09firewire: fix failure path in ohci_enable_phys_dmaStefan Richter1-3/+1
"goto out" happens with the lock taken. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>