Commit Graph

23 Commits

Author SHA1 Message Date
Kristian Høgsberg 2d826cc5c7 firewire: Always use parens with sizeof.
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-10 18:24:14 +02:00
Kristian Høgsberg a77754a75d firewire: Uppercase most macro names.
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-10 18:24:13 +02:00
Kristian Høgsberg c781c06d11 firewire: Clean up comment style.
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-05-10 18:24:13 +02:00
Kristian Høgsberg d60d7f1d5c firewire: Implement CSR cycle time and bus time registers.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:03:15 +01:00
Kristian Høgsberg 473d28c730 firewire: Implement topology map and fix a couple of loopback bugs.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:03:14 +01:00
Kristian Høgsberg a3aca3dabb firewire: Switch cdev code over to use register_chrdev and keep a list of devices.
The old mechanism kept a struct cdev for each fw device, but fops->release
would reference this struct after the device got freed in some cases.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:03:09 +01:00
Kristian Høgsberg 937f687969 firewire: Let an fw_descriptor specify a leading immediate key/value pair.
This lets us break out "Juju" as the model name in the config rom.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:03:05 +01:00
Kristian Høgsberg 6e2e8424d3 firewire: Use correct payload pointer when demarshalling incoming requests.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:57 +01:00
Kristian Høgsberg 730c32f58b firewire: Implement proper transaction cancelation.
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-09 22:02:51 +01:00
Kristian Høgsberg 32b46093a0 firewire: Rework async receive DMA.
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-09 22:02:50 +01:00
Kristian Høgsberg 9fc82689bf firewire: Fix bit shift typo.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:48 +01:00
Kristian Høgsberg e5f49c3b83 firewire: Sanitize send error codes.
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-09 22:02:47 +01:00
Kristian Høgsberg 93c4cceb96 firewire: Handle access to CSR resources on local node.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:47 +01:00
Kristian Høgsberg 36bfe49d07 firewire: Clean up response handling.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:46 +01:00
Kristian Høgsberg 2639a6fb26 firewire: Use struct fw_packet for incoming packets too in controller interface.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:45 +01:00
Kristian Høgsberg 83db801ce8 firewire: Implement gap count optimization.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:44 +01:00
Stefan Richter 907293d788 firewire: consistent usage of node_id
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-09 22:02:43 +01:00
Stefan Richter 5af4e5eab3 firewire: comma after last enum item or initializer
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-03-09 22:02:41 +01:00
Stefan Richter 5e20c28218 firewire: whitespace adjustments
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-03-09 22:02:40 +01:00
Adrian Bunk 95688e97cd firewire: cleanups
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>
2007-03-09 22:02:40 +01:00
Stefan Richter 21ebcd1224 firewire: mark some structs const
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>
2007-03-09 22:02:39 +01:00
Kristian Høgsberg 19a15b937b firewire: Add device probing and sysfs integration.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:33 +01:00
Kristian Høgsberg 3038e353cf firewire: Add core firewire stack.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:33 +01:00