aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-ohci.c
Commit message (Collapse)AuthorAge
* firewire: missing newline in printkStefan Richter2007-07-09
| | | | | | | Also remove some errno printouts which will be shown by infrastructure code anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fix async reception on big endian machinesStefan Richter2007-06-29
| | | | | | | | 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>
* firewire: fix hang after card ejectionStefan Richter2007-06-16
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: Implement suspend/resume PCI driver hooks.Kristian Høgsberg2007-05-31
| | | | | | | | 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>
* firewire: Add missing byteswapping for receive DMA programs.Kristian Høgsberg2007-05-27
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* missing mm.h in fw-ohciAl Viro2007-05-15
| | | | | | | 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>
* firewire: Convert OHCI driver to use standard goto unwinding for error handling.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Always use parens with sizeof.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Provide module aliase for backwards compatibility.Olaf Hering2007-05-10
| | | | | | | | | | | | | 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>
* firewire: Uppercase most macro names.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Clean up comment style.Kristian Høgsberg2007-05-10
| | | | | | | | 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)
* firewire: Check for CONTEXT_RUN not CONTEXT_ACTIVE when starting AT DMA context.Kristian Høgsberg2007-04-11
| | | | | | | Doh, bad typo... Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Byteswap iso header so all headers are presented as be32.Kristian Høgsberg2007-04-11
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix start on cycle 0 for IT, implement start on cycle for IR.Kristian Høgsberg2007-03-28
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Remember to set the driver_data pointer when queueing a packet.Kristian Høgsberg2007-03-28
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Move sync and tag parameters to start_iso ioctl.Kristian Høgsberg2007-03-15
| | | | | | | | | 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>
* firewire: Fix dualbuffer iso receive mode and drop buffer fill mode.Kristian Høgsberg2007-03-15
| | | | | | | | | 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>
* firewire: Implement CSR cycle time and bus time registers.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement topology map and fix a couple of loopback bugs.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Move async transmit to use the general context code.Kristian Høgsberg2007-03-09
| | | | | | | | | | | | | 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>
* firewire: Clear all interrupt bits before shutting down.Kristian Høgsberg2007-03-09
| | | | | | | | 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>
* firewire: Scheduled removal of SA_xxx interrupt flags fixups 3Thomas Gleixner2007-03-09
| | | | | | | | | | | 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>
* firewire: adjust whitespaceStefan Richter2007-03-09
| | | | | | | Remove space before tab and trailing whitespace. Unify indentation of goto target labels. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement sync and tag matching for isochronous receive.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Configure channel and speed at context creation time.Kristian Høgsberg2007-03-09
| | | | | | | | 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>
* firewire: Store OHCI version and make sure we have at least 1.1 before doing ↵Kristian Høgsberg2007-03-09
| | | | | | | dualbuffer. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Don't touch DMA descriptors after appending.Kristian Høgsberg2007-03-09
| | | | | | | | | 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>
* firewire: Use a buffer fill descriptor for receive when header size is 0.Kristian Høgsberg2007-03-09
| | | | | | | | | 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>
* firewire: Set correct buffer lengths for dualbuffer DMA descriptor.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Acummulate received iso headers and send them back to user space.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Log OHCI chipset version in PCI probe.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement functionality to stop isochronous DMA contexts.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Rename 'send_iso' to 'start_iso'.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement basic isochronous receive functionality.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Generalize the iso transmit descriptor buffer logic.Kristian Høgsberg2007-03-09
| | | | | | | | | 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>
* firewire: Split the iso buffer out from fw_iso_context and avoid vmalloc.Kristian Høgsberg2007-03-09
| | | | | | | | | | 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>
* firewire: Read the *Clear versions of the iso interrupt register.Kristian Høgsberg2007-03-09
| | | | | | | | 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>
* firewire: Fix another typo from the bitfield conversion.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Use dma_mapping_error() for checking for DMA mapping errors.Kristian Høgsberg2007-03-09
| | | | | | | Pointed out by Pete Zaitcev. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement proper transaction cancelation.Kristian Høgsberg2007-03-09
| | | | | | | | | | | 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>
* firewire: Reduce some redundant register definitions.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Rework async receive DMA.Kristian Høgsberg2007-03-09
| | | | | | | | | | | | | 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>
* firewire: Make sure we wait for DMA to stop before we reprogram it.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Sanitize send error codes.Kristian Høgsberg2007-03-09
| | | | | | | | 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>
* firewire: Handle access to CSR resources on local node.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Loop requests to the host controller back into the stack.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Use struct fw_packet for incoming packets too in controller interface.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: consistent usage of node_idStefan Richter2007-03-09
| | | | | | | | | | | | | | 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>
* firewire: fw-ohci: remove unnecessary macroStefan Richter2007-03-09
| | | | | | | 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>
* firewire: fix failure path in ohci_enable_phys_dmaStefan Richter2007-03-09
| | | | | | | "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>