Commit Graph

25 Commits

Author SHA1 Message Date
Stefan Richter 8a2d9ed321 firewire: fix unloading of fw-ohci while devices are attached
Fix panic in run_timer_softirq right after "modprobe -r firewire-ohci"
if a FireWire disk was attached and firewire-sbp2 loaded.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-08-25 18:00:27 +02:00
Stefan Richter 24d40125f1 firewire: optimize gap count with 1394b leaf nodes
Table-based gap count optimization cannot be used if 1394b repeater PHYs
are present.  But it does work with 1394b leaf nodes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:43 +02:00
Kristian Høgsberg 2aef469a35 firewire: Implement suspend/resume PCI driver hooks.
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-31 21:40:14 +02:00
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 a98e271987 firewire: Coding style cleanup: no spaces after function 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 6a5033be96 firewire: Convert card_rwsem to a regular mutex.
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 e175569c46 firewire: Use lib/ implementation of CRC ITU-T.
With the CRC ITU-T implementation available in lib/ we can use that instead.

This also fixes a bug in the topology map crc computation.

Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed Kconfig)
2007-05-10 18:24:13 +02:00
Kristian Høgsberg dde2b95430 firewire: Don't use subsystem rwsem, it's going away.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-17 21:14:32 +02:00
Kristian Høgsberg 66dea3e5f6 firewire: Add ioctls to add and remove config rom descriptors.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed whitespace)
2007-03-28 21:30:14 +02:00
Marc Butler ecab413359 firewire: Add phy register defines.
Signed-off-by: Marc Butler <marc@adaptivecode.com>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added whitespace)
2007-03-24 23:29:19 +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 49e1179b16 firewire: Drop the unused fw_card device.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:03:06 +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 bbf19db37e firewire: Use atomic_t's for serial numbers.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>

Use atomic_inc_return.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:54 +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
Stefan Richter 641f8791f0 firewire: use atomic type for fw_device.state
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:49 +01:00
Kristian Høgsberg 931c4834c8 firewire: Implement compliant bus management.
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 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 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
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