Commit graph

26 commits

Author SHA1 Message Date
Pieter Palmers 3dc5ea9b31 ieee1394: cycle timer read extension for raw1394
This implements the simultaneous read of the isochronous cycle timer and
the system clock (in usecs).  This allows to express the exact receive
time of an ISO packet as a system time with microsecond accuracy.
http://bugzilla.kernel.org/show_bug.cgi?id=7773

The counterpart patch for libraw1394 can be found at
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/8934

Patch update (Stefan R.):  Disable preemption and local interrupts.
Prevent integer overflow.  Add paranoid error checks and kerneldoc to
hpsb_read_cycle_timer.  Move it to other ieee1394_core high-level API
functions.  Change comments.  Adjust whitespace.  Rename struct
_raw1394_cycle_timer.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Pieter Palmers <pieterp@joow.be>
Acked-by: Dan Dennedy <dan@dennedy.org>
2007-02-17 14:39:33 +01:00
Stefan Richter 3360177c62 ieee1394: restore config ROM when resuming
After PM suspend + resume, the local configuration ROM was not restored.
This prevented remote nodes from recognizing the resuming machine.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:59:19 +01:00
Adrian Bunk d395a1774f the scheduled IEEE1394_EXPORT_FULL_API removal
This patch contains the scheduled IEEE1394_EXPORT_FULL_API removal.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

Update: Pull proper portion of feature-removal-schedule.txt.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:57:27 +01:00
Stefan Richter 3015c73978 ieee1394: conditionally export ieee1394_bus_type
Follow-up to patch "Consolidate driver registering":
Since I plan the lifetime of Linux 2.6.20 to be the deprecation phase
of CONFIG_IEEE1394_EXPORT_FULL_API, it seems fair to keep all previously
exported symbols available with this option until this phase is over.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:12:02 +01:00
Ben Collins ed30c26ee8 ieee1394: Consolidate driver registering
This patch consolidates some bookkeeping for driver registering. It
closely models what pci_register_driver() does. The main addition is
that the owner of the driver is set, so we get a proper symlink
for /sys/bus/ieee1394/driver/*/module.

Also moves setting of name and bus type into nodemgr. Because of this,
we can remove the EXPORT_SYMBOL for ieee1394_bus_type, since it's now
only used in ieee1394.ko.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:11:55 +01:00
Stefan Richter 611aa19fd6 ieee1394: safer definition of empty macros
A deactivated macro, defined as "#define foo(bar)", will result in
silent corruption if somebody forgets a semicolon after a call to foo.
Replace it by "#define foo(bar) do {} while (0)" which will reveal any
respective syntax errors.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-09-17 19:31:20 +02:00
Andi Kleen 8df4083c52 Initialize ieee1394 early when built in
This makes debugging with firescope easier.

Signed-off-by: Andi Kleen <ak@suse.de> (original patch)

Update:
 - no need for #ifdef MODULE
 - add comment in ieee1394_core, more verbose comment in ohci1394

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (update)
2006-09-17 19:29:34 +02:00
Stefan Richter 9154df538f ieee1394: remove #include <asm/semaphore.h>
These includes in ieee1394_core and eth1394 are obsolete.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-09-17 19:18:50 +02:00
Stefan Richter 433a87d528 [PATCH] ieee1394: skip dummy loop in build_speed_map
The last loop in ieee1394 core's speed calculation is not required
unless ieee1394.h::IEEE1394_SPEED_MAX is changed from its current value
of 3.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-07-03 12:02:27 -04:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Ben Collins f654240f33 ieee1394_core: switch to kthread API
This gets also rid of the MODPOST warning "drivers/ieee1394/ieee1394.o -
Section mismatch: reference to .exit.text: from .smp_locks after '' (at
offset 0x18)".

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:15:50 -04:00
Ben Collins 647dcb5fae ieee1394: support for slow links or slow 1394b phy ports
Add support for the following types of hardware:
 + nodes that have a link speed < PHY speed
 + 1394b PHYs that are less than S800 capable
 + 1394b/1394a adapter cable between two 1394b PHYs
Also, S1600 and S3200 are now supported if IEEE1394_SPEED_MAX is raised.

A probing function is added to nodemgr's config ROM fetching routine
which adjusts the allowable speed if an access problem was encountered.
Pros and Cons of the approach:
 + minimum code footprint to support this less widely used hardware
 + nearly no overhead for unaffected hardware
 - ineffective before nodemgr began to read the ROM of affected nodes
 - ineffective if ieee1394 is loaded with disable_nodemgr=1
The speed map CSRs which are published to the bus are not touched by the
patch.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Hakan Ardo <hakan@debian.org>
Cc: Calculex <linux@calculex.com>
Cc: Robert J. Kosinski <robk@cmcherald.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:12:37 -04:00
Stefan Richter 23e93f1742 ieee1394: set read permission for parameter disable_irm
No need to hide it from /sys/module/ieee1394/parameters/.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2006-03-28 20:03:34 -05:00
Stefan Richter a8748445e5 ieee1394: remove devfs support
Devfs has been disabled in the last kernel releases, so let's
remove it from ieee1394core, raw1394, video1394, dv1394.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2006-03-28 19:55:41 -05:00
Dave Jones 8c1d286e6a [PATCH] don't freeze firewire on suspend.
We had a report from one loony user who tried out suspend to disk using a
swap partition on a firewire drive.  As the firewire thread was put to
sleep it didn't work out too well.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ben Collins <bcollins@debian.org>
Cc: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:43 -08:00
Stefan Richter 741854e4f9 ieee1394: whitespace cleanup in hosts.[ch], ieee1394_core.[ch]
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-12-01 18:52:03 -05:00
Stefan Richter 546513f9fd ieee1394: hpsb_send_phy_config() cleanup
Eliminate some code in hpsb_send_phy_config() which is provided
by hpsb_make_phypacket().

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-12-01 18:52:01 -05:00
Stefan Richter d7758461b9 ieee1394: add definitions for phy packet constants
Introduce new macros related to phy packets and use them in ieee1394_core and
nodemgr.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-12-01 18:51:56 -05:00
Jody McIntyre db2fd664f8 [PATCH] ieee1394: fix for debug output
Fix debug code so it prints the correct speed (was defaulting to 100, so
anything > 400 showed only 100).

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@debian.org>
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-30 12:41:19 -07:00
David S. Miller 8728b834b2 [NET]: Kill skb->list
Remove the "list" member of struct sk_buff, as it is entirely
redundant.  All SKB list removal callers know which list the
SKB is on, so storing this in sk_buff does nothing other than
taking up some space.

Two tricky bits were SCTP, which I took care of, and two ATM
drivers which Francois Romieu <romieu@fr.zoreil.com> fixed
up.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2005-08-29 15:31:14 -07:00
Ben Collins 1934b8b656 [PATCH] Sync up ieee-1394
Lots of this patch is trivial code cleanups (static vars were being
intialized to 0, etc).

There's also some fixes for ISO transmits (max buffer handling).
Aswell, we have a few fixes to disable IRM capabilites correctly.  We've
also disabled, by default some generally unused EXPORT symbols for the
sake of cleanliness in the kernel.  However, instead of removing them
completely, we felt it necessary to have a config option that allowed
them to be enabled for the many projects outside of the main kernel tree
that use our API for driver development.

The primary reason for this patch is to revert a MODE6->MODE10 RBC
conversion patch from the SCSI maintainers.  The new conversions handled
directly in the scsi layer do not seem to work for SBP2.  This patch
reverts to our old working code so that users can enjoy using Firewire
disks and dvd drives again.

We are working with the SCSI maintainers to resolve this issue outside
of the main kernel tree.  We'll merge the patch once the SCSI layer's
handling of the MODE10 conversion is working for us.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-10 12:23:23 -07:00
Christoph Lameter 3e1d1d28d9 [PATCH] Cleanup patch for process freezing
1. Establish a simple API for process freezing defined in linux/include/sched.h:

   frozen(process)		Check for frozen process
   freezing(process)		Check if a process is being frozen
   freeze(process)		Tell a process to freeze (go to refrigerator)
   thaw_process(process)	Restart process
   frozen_process(process)	Process is frozen now

2. Remove all references to PF_FREEZE and PF_FROZEN from all
   kernel sources except sched.h

3. Fix numerous locations where try_to_freeze is manually done by a driver

4. Remove the argument that is no longer necessary from two function calls.

5. Some whitespace cleanup

6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
   cleared before setting PF_FROZEN, recalc_sigpending does not check
   PF_FROZEN).

This patch does not address the problem of freeze_processes() violating the rule
that a task may only modify its own flags by setting PF_FREEZE. This is not clean
in an SMP environment. freeze(process) is therefore not SMP safe!

Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25 17:10:13 -07:00
gregkh@suse.de 7e25ab9155 [PATCH] class: convert drivers/ieee1394/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20 15:15:08 -07:00
Jody McIntyre 6262d062a3 [PATCH] ieee1394: fix premature expiry of async packets
Set the initial sendtime to be 10 seconds in the future, to avoid the packet
timing out while it's still queued to be sent.  This fixes furthur "no tlabel
match" problems caused by premature expiry.

Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:24 -07:00
Jody McIntyre 9ac485dc37 [PATCH] ieee1394: drivers/ieee1394/ieee1394_transactions.c: possible cleanups
This patch contains the following possible cleanups:

- #if 0 the following unused global functions:
  - hpsb_lock
  - hpsb_send_gasp

- ieee1394_transactions.h: remove the stale hpsb_lock64 prototype

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:22 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00