]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: core: integrate software-forced bus resets with bus management
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 8 Jul 2010 14:09:06 +0000 (16:09 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 13 Jul 2010 07:58:27 +0000 (09:58 +0200)
commit135aec4d68012b54f957b9f23082b60565b8ad90
treea019891672a1505e35eb15fa2621caffecff2c80
parentf32189ed1f83a861e39644597e52be9438466eb6
firewire: core: integrate software-forced bus resets with bus management

Bus resets which are triggered
  - by the kernel drivers after updates of the local nodes' config ROM,
  - by userspace software via ioctl
shall be deferred until after >=2 seconds after the last bus reset.

If multiple modifications of the local nodes' config ROM happen in a row,
only a single bus reset should happen after them.

When the local node's link goes from inactive to active or vice versa,
and at the two occasions of bus resets mentioned above --- and if the
current gap count differs from 63 --- the bus reset should be preceded
by a PHY configuration packet that reaffirms the gap count.  Otherwise a
bus manager would have to reset the bus again right after that.

This is necessary to promote bus stability, e.g. leave grace periods for
allocations and reallocations of isochronous channels and bandwidth,
SBP-2 reconnections etc.; see IEEE 1394 clause 8.2.1.

This change implements all of the above by moving bus reset initiation
into a delayed work (except for bus resets which are triggered by the
bus manager workqueue job and are performed there immediately).  It
comes with a necessary addition to the card driver methods that allows
to get the current gap count from PHY registers.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-card.c
drivers/firewire/core-cdev.c
drivers/firewire/core-transaction.c
drivers/firewire/core.h
drivers/firewire/ohci.c
include/linux/firewire.h