summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
Commit message (Collapse)AuthorAgeFilesLines
* firewire: Implement sync and tag matching for isochronous receive.Kristian Høgsberg2007-03-095-7/+64
| | | | | 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-095-16/+21
| | | | | | | | 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-091-4/+15
| | | | | | | dualbuffer. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Get zeroed out pages for mapping to user space.Kristian Høgsberg2007-03-091-1/+1
| | | | | 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-091-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>
* firewire: Use a buffer fill descriptor for receive when header size is 0.Kristian Høgsberg2007-03-093-17/+95
| | | | | | | | | 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-091-4/+3
| | | | | 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-094-24/+57
| | | | | 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-091-2/+4
| | | | | 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-095-11/+53
| | | | | 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-095-20/+16
| | | | | 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-096-30/+181
| | | | | 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-091-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>
* firewire: Split the iso buffer out from fw_iso_context and avoid vmalloc.Kristian Høgsberg2007-03-095-84/+151
| | | | | | | | | | 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: Use correct payload pointer when demarshalling incoming requests.Kristian Høgsberg2007-03-091-1/+1
| | | | | 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-091-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>
* firewire: Fix another typo from the bitfield conversion.Kristian Høgsberg2007-03-091-4/+4
| | | | | 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-093-25/+47
| | | | | | | 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: Credit the old sbp2.c driver for being a good starting point.Kristian Høgsberg2007-03-091-1/+10
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Use atomic_t's for serial numbers.Kristian Høgsberg2007-03-092-4/+4
| | | | | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Use atomic_inc_return. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Spell out fw as firewire in sysfs.Kristian Høgsberg2007-03-091-1/+1
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Complete SCSI commands with DID_BUS_BUSY when a bus reset happens.Kristian Høgsberg2007-03-091-1/+1
| | | | | | | | This lets the SCSI stack retry the command when a SCSI command is interrupted by a FireWire bus reset. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Schedule topology work before calling driver update functions.Kristian Høgsberg2007-03-091-2/+1
| | | | | | | | | | | This prevents superfluous bus traffic as fw-sbp2 logs in only to get kicked off the device by another bus reset as the driver core does bus management. Scheduling it this way lets the driver core finish bus management before higher level drivers get the update callback. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Introduce a retry mechanism for reconnects and logins.Kristian Høgsberg2007-03-091-71/+109
| | | | | | | | Sometimes we reconnect too soon, sometimes too late. Adding a retry mechanism make the reconnect step much more robust. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: Do ORB timeout right.Kristian Høgsberg2007-03-091-3/+21
| | | | | | | | | When a management ORB times out, either because the fw_transaction times out or when we don't get the status write, we need to properly cancel the entire operation. 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-095-7/+95
| | | | | | | | | | | 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-091-28/+22
| | | | | 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-092-83/+132
| | | | | | | | | | | | | 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: use atomic type for fw_device.stateStefan Richter2007-03-093-5/+6
| | | | 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-091-5/+16
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement compliant bus management.Kristian Høgsberg2007-03-094-25/+117
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix bit shift typo.Kristian Høgsberg2007-03-091-1/+1
| | | | | 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-093-16/+18
| | | | | | | | 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-093-21/+154
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add lock transaction opcodes to fw-device-cdev.h.Kristian Høgsberg2007-03-091-0/+8
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Clean up response handling.Kristian Høgsberg2007-03-091-27/+27
| | | | | 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-092-13/+25
| | | | | 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-093-81/+92
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fix compilation with gcc 3.4Stefan Richter2007-03-091-2/+3
| | | | | | | | drivers/firewire/fw-topology.c: In function `report_found_node': drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement gap count optimization.Kristian Høgsberg2007-03-095-31/+120
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: set command set related device flagsStefan Richter2007-03-091-0/+17
| | | | | | | | | | Copied from sbp2: - enable spin-up by START STOP UNIT for all devices - enable INQUIRY (36) workaround on demand - prefer READ/ WRITE (10) over (6) for all devices - prefer MODE SENSE (10) for MMC devices Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: consistent usage of node_idStefan Richter2007-03-096-20/+23
| | | | | | | | | | | | | | 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-091-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>
* firewire: fw-sbp2: remove unused macroStefan Richter2007-03-091-3/+2
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: fw-sbp2: remove bogus "emulated" host flagStefan Richter2007-03-091-1/+0
| | | | | | | There is no emulation going on here too. 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-091-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>
* firewire: comma after last enum item or initializerStefan Richter2007-03-098-16/+16
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: whitespace adjustmentsStefan Richter2007-03-0911-169/+144
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: cleanupsAdrian Bunk2007-03-095-10/+10
| | | | | | | | | This patch contains the following cleanups: - "extern inline" -> "static inline" - fw-topology.c: make struct fw_node_create static Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: mark some structs constStefan Richter2007-03-098-23/+23
| | | | | | | | | | | | Instances of struct file_operations and struct fw_card_driver can be qualified as "const". Ditto with struct fw_descriptor.data, struct fw_device_id, and predefined instances of struct fw_address_region, at least in the current implementation. Data qualified as const is placed into the .rodata section which won't be mixed with dirty data. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>