aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-ohci.c
Commit message (Collapse)AuthorAge
* firewire: fw-ohci: check for misconfigured bus (phyID == 63)Stefan Richter2007-10-16
| | | | | | | | | | Check NodeID.nodeNumber as per OHCI 1.1 clause 7.2.3.2. See also IEEE 1394a table 5B-1. Also, demote the "node ID not valid" message from error to notification as it is not an error condition. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: missing dma_unmap_singleStefan Richter2007-10-16
| | | | | | | at_context_queue_packet() didn't clean up in an early exit path. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-ohci: log posted write errorsStefan Richter2007-10-16
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: reorder includesStefan Richter2007-10-16
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: fix includesStefan Richter2007-10-16
| | | | | | Add used includes, remove unused includes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: enforce read order for selfID generationStefan Richter2007-10-16
| | | | | | | | | | | | | | It seems unlikely, but access to self_id_cpu[0] could at least in theory be deferred until after the loop over self_id_cpu[1..n] or even after the subsequent reg_read. Enforce the desired order by a read barrier. Also prevent the reg_read from being reordered relative to the for loop. This isn't necessary if the loop's conditional printk counts as an implicit barrier, but better make it explicit. (self_id_cpu[] is a coherent DMA buffer.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: ignore failure of pci_set_power_state (fix suspend ↵Stefan Richter2007-09-07
| | | | | | | | | | | | | | | regression) Fixes (papers over) "Sleep problems with kernels >= 2.6.21 on powerpc", http://lkml.org/lkml/2007/8/25/155. The issue is that the FireWire controller's pci_dev.current_state of iBook G3 and presumably older PowerBooks is still in PCI_UNKNOWN instead of PCI_D0 when the firewire driver's .suspend method is called. Like it was suggested earlier in http://lkml.org/lkml/2006/10/24/13, we do not fail .suspend anymore if pci_set_power_state failed. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: dma_free_coherent needs IRQs enabledStefan Richter2007-08-02
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: fix "scheduling while atomic"Stefan Richter2007-07-18
| | | | | | context_stop is called by bus_reset_tasklet, among else. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: flush MMIO write before msleepStefan Richter2007-07-18
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* 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>