]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[L2TP]: Add the ability to autoload a pppox protocol module.
James Chapman [Mon, 30 Apr 2007 07:21:02 +0000 (00:21 -0700)]
[L2TP]: Add the ability to autoload a pppox protocol module.

This patch allows a name "pppox-proto-nnn" to be used in modprobe.conf
to autoload a PPPoX protocol nnn.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'cfq' into for-linus
Jens Axboe [Mon, 30 Apr 2007 07:09:27 +0000 (09:09 +0200)]
Merge branch 'cfq' into for-linus

17 years ago[PATCH] elevator: elv_list_lock does not need irq disabling
Jens Axboe [Thu, 26 Apr 2007 12:41:53 +0000 (14:41 +0200)]
[PATCH] elevator: elv_list_lock does not need irq disabling

It's never grabbed from irq context, so just make it plain spin_lock().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[BLOCK] Don't pin lots of memory in mempools
Jens Axboe [Mon, 2 Apr 2007 08:06:42 +0000 (10:06 +0200)]
[BLOCK] Don't pin lots of memory in mempools

Currently we scale the mempool sizes depending on memory installed
in the machine, except for the bio pool itself which sits at a fixed
256 entry pre-allocation.

There's really no point in "optimizing" this OOM path, we just need
enough preallocated to make progress. A single unit is enough, lets
scale it down to 2 just to be on the safe side.

This patch saves ~150kb of pinned kernel memory on a 32-bit box.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[SKB]: Introduce skb_queue_walk_safe()
James Chapman [Mon, 30 Apr 2007 07:07:31 +0000 (00:07 -0700)]
[SKB]: Introduce skb_queue_walk_safe()

This patch provides a method for walking skb lists while inserting or
removing skbs from the list.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agocfq-iosched: speedup cic rb lookup
Jens Axboe [Tue, 24 Apr 2007 19:23:53 +0000 (21:23 +0200)]
cfq-iosched: speedup cic rb lookup

We often lookup the same queue many times in succession, so cache
the last looked up queue to avoid browsing the rbtree.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoll_rw_blk: add io_context private pointer
Jens Axboe [Tue, 24 Apr 2007 19:17:33 +0000 (21:17 +0200)]
ll_rw_blk: add io_context private pointer

To be used by as/cfq as they see fit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: get rid of cfqq hash
Vasily Tarasov [Wed, 25 Apr 2007 10:29:51 +0000 (12:29 +0200)]
cfq-iosched: get rid of cfqq hash

cfq hash is no more necessary.  We always can get cfqq from io context.
cfq_get_io_context_noalloc() function is introduced, because we don't
want to allocate cic on merging and checking may_queue.  In order to
identify sync queue we've used hash key = CFQ_KEY_ASYNC. Since hash is
eliminated we need to use other criterion: sync flag for queue is added.
In all places where we dig in rb_tree we're in current context, so no
additional locking is required.

Advantages of this patch: no additional memory for hash, no seeking in
hash, code is cleaner. But it is necessary now to seek cic in per-ioc
rbtree, but it is faster:
- most processes work only with few devices
- most systems have only few block devices
- it is a rb-tree

Signed-off-by: Vasily Tarasov <vtaras@openvz.org>
Changes by me:

- Merge into CFQ devel branch
- Get rid of cfq_get_io_context_noalloc()
- Fix various bugs with dereferencing cic->cfqq[] with offset other
  than 0 or 1.
- Fix bug in cfqq setup, is_sync condition was reversed.
- Fix bug where only bio_sync() is used, we need to check for a READ too

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: tighten queue request overlap condition
Jens Axboe [Fri, 20 Apr 2007 18:45:39 +0000 (20:45 +0200)]
cfq-iosched: tighten queue request overlap condition

For tagged devices, allow overlap of requests if the idle window
isn't enabled on the current active queue.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: improve sync vs async workloads
Jens Axboe [Mon, 23 Apr 2007 06:33:33 +0000 (08:33 +0200)]
cfq-iosched: improve sync vs async workloads

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: never allow an async queue idling
Jens Axboe [Thu, 19 Apr 2007 12:32:26 +0000 (14:32 +0200)]
cfq-iosched: never allow an async queue idling

We don't enable it by default, don't let it get enabled during
runtime.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: get rid of ->dispatch_slice
Jens Axboe [Mon, 23 Apr 2007 06:26:36 +0000 (08:26 +0200)]
cfq-iosched: get rid of ->dispatch_slice

We can track it fairly accurately locally, let the slice handling
take care of the rest.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: don't pass unused preemption variable around
Jens Axboe [Mon, 23 Apr 2007 06:25:00 +0000 (08:25 +0200)]
cfq-iosched: don't pass unused preemption variable around

We don't use it anymore in the slice expiry handling.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: get rid of ->cur_rr and ->cfq_list
Jens Axboe [Thu, 19 Apr 2007 10:03:34 +0000 (12:03 +0200)]
cfq-iosched: get rid of ->cur_rr and ->cfq_list

It's only used for preemption now that the IDLE and RT queues also
use the rbtree. If we pass an 'add_front' variable to
cfq_service_tree_add(), we can set ->rb_key to 0 to force insertion
at the front of the tree.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: slice offset should take ioprio into account
Jens Axboe [Fri, 20 Apr 2007 12:18:00 +0000 (14:18 +0200)]
cfq-iosched: slice offset should take ioprio into account

Use the max_slice-cur_slice as the multipler for the insertion offset.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] cfq-iosched: style cleanups and comments
Jens Axboe [Thu, 26 Apr 2007 10:54:48 +0000 (12:54 +0200)]
[PATCH] cfq-iosched: style cleanups and comments

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: sort IDLE queues into the rbtree
Jens Axboe [Wed, 18 Apr 2007 18:13:32 +0000 (20:13 +0200)]
cfq-iosched: sort IDLE queues into the rbtree

Same treatment as the RT conversion, just put the sorted idle
branch at the end of the tree.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: sort RT queues into the rbtree
Jens Axboe [Wed, 18 Apr 2007 18:01:57 +0000 (20:01 +0200)]
cfq-iosched: sort RT queues into the rbtree

Currently CFQ does a linked insert into the current list for RT
queues. We can just factor the class into the rb insertion,
and then we don't have to treat RT queues in a special way. It's
faster, too.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[PATCH] cfq-iosched: speed up rbtree handling
Jens Axboe [Thu, 26 Apr 2007 10:53:50 +0000 (12:53 +0200)]
[PATCH] cfq-iosched: speed up rbtree handling

For cases where the rbtree is mainly used for sorting and min retrieval,
a nice speedup of the rbtree code is to maintain a cache of the leftmost
node in the tree.

Also spotted in the CFS CPU scheduler code.

Improved by Alan D. Brunelle <Alan.Brunelle@hp.com> by updating the
leftmost hint in cfq_rb_first() if it isn't set, instead of only
updating it on insert.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: rework the whole round-robin list concept
Jens Axboe [Fri, 20 Apr 2007 12:27:50 +0000 (14:27 +0200)]
cfq-iosched: rework the whole round-robin list concept

Drawing on some inspiration from the CFS CPU scheduler design, overhaul
the pending cfq_queue concept list management. Currently CFQ uses a
doubly linked list per priority level for sorting and service uses.
Kill those lists and maintain an rbtree of cfq_queue's, sorted by when
to service them.

This unfortunately means that the ionice levels aren't as strong
anymore, will work on improving those later. We only scale the slice
time now, not the number of times we service. This means that latency
is better (for all priority levels), but that the distinction between
the highest and lower levels aren't as big.

The diffstat speaks for itself.

 cfq-iosched.c |  363 +++++++++++++++++---------------------------------
 1 file changed, 125 insertions(+), 238 deletions(-)

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: minor updates
Jens Axboe [Tue, 17 Apr 2007 10:47:55 +0000 (12:47 +0200)]
cfq-iosched: minor updates

- Move the queue_new flag clear to when the queue is selected
- Only select the non-first queue in cfq_get_best_queue(), if there's
  a substantial difference between the best and first.
- Get rid of ->busy_rr
- Only select a close cooperator, if the current queue is known to take
  a while to "think".

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: development update
Jens Axboe [Wed, 25 Apr 2007 10:44:27 +0000 (12:44 +0200)]
cfq-iosched: development update

- Implement logic for detecting cooperating processes, so we
  choose the best available queue whenever possible.

- Improve residual slice time accounting.

- Remove dead code: we no longer see async requests coming in on
  sync queues. That part was removed a long time ago. That means
  that we can also remove the difference between cfq_cfqq_sync()
  and cfq_cfqq_class_sync(), they are now indentical. And we can
  kill the on_dispatch array, just make it a counter.

- Allow a process to go into the current list, if it hasn't been
  serviced in this scheduler tick yet.

Possible future improvements including caching the cfqq lookup
in cfq_close_cooperator(), so we don't have to look it up twice.
cfq_get_best_queue() should just use that last decision instead
of doing it again.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocfq-iosched: improve preemption for cooperating tasks
Jens Axboe [Wed, 14 Feb 2007 18:59:49 +0000 (19:59 +0100)]
cfq-iosched: improve preemption for cooperating tasks

When testing the syslet async io approach, I discovered that CFQ
sometimes didn't perform as well as expected. cfq_should_preempt()
needs to better check for cooperating tasks, so fix that by allowing
preemption of an equal priority queue if the recently queued request
is as good a candidate for IO as the one we are currently waiting for.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
Paul Mackerras [Mon, 30 Apr 2007 03:03:39 +0000 (13:03 +1000)]
[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c

Commit 404d5b185b4eb56d6fa2f7bd27833f8df1c38ce4 changed the definition
of dev_dbg in the !DEBUG case from being a #define to being a static
inline.  There was code in drivers/ps3/vuart.c to do exactly that,
which fails to compile now.  This fixes it by removing the redefinition,
as the redefinition is now superfluous.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoMerge branch 'linux-2.6' into for-2.6.22
Paul Mackerras [Mon, 30 Apr 2007 02:38:01 +0000 (12:38 +1000)]
Merge branch 'linux-2.6' into for-2.6.22

17 years ago[POWERPC] remove kernel module option for booke wdt
Dave Jiang [Fri, 13 Apr 2007 22:25:24 +0000 (08:25 +1000)]
[POWERPC] remove kernel module option for booke wdt

Remove option of making booke_wdt into a kernel module. This watchdog
cannot be disabled. No point being a kernel module.

Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Avoid putting cpu node twice
John Rigby [Fri, 6 Apr 2007 22:57:37 +0000 (08:57 +1000)]
[POWERPC] Avoid putting cpu node twice

Call of_find_node_by_type with NULL instead of np
so the cpu node does not get put twice.
This was causing kref_put warnings.

Signed-off-by: John Rigby <jrigby@freescale.com>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Spinlock initializer cleanup
Thomas Gleixner [Sun, 29 Apr 2007 16:10:39 +0000 (16:10 +0000)]
[POWERPC] Spinlock initializer cleanup

Use DEFINE_SPINLOCK instead of initializing spinlocks to
SPIN_LOCK_UNLOCKED, since DEFINE_SPINLOCK is better for lockdep.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] ppc4xx_sgdma needs dma-mapping.h
Andrew Morton [Thu, 26 Apr 2007 07:07:05 +0000 (00:07 -0700)]
[POWERPC] ppc4xx_sgdma needs dma-mapping.h

For dma_alloc_*()

Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] arch/powerpc/sysdev/timer.c build fix
Srinivasa Ds [Thu, 26 Apr 2007 07:07:04 +0000 (00:07 -0700)]
[POWERPC] arch/powerpc/sysdev/timer.c build fix

arch/powerpc/sysdev/timer.c:51: error: variable `timer_sysclass' has
initializer but incomplete type
arch/powerpc/sysdev/timer.c:52: error: unknown field `resume' specified in initializer
<etc>

Signed-off-by: Srinivasa Ds <srinivasa@in.ibm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] get_property cleanups
Stephen Rothwell [Sun, 29 Apr 2007 06:29:08 +0000 (16:29 +1000)]
[POWERPC] get_property cleanups

Just another pass through arch/powerpc for old usages.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove the unused HTDMSOUND driver
Adrian Bunk [Sat, 28 Apr 2007 19:19:56 +0000 (05:19 +1000)]
[POWERPC] Remove the unused HTDMSOUND driver

Recently, someone fixed a syntax error in the HTDMSOUND driver
introduced 4 years ago.

Unfortunately not by trying to compile this driver for his hardware but
by code inspection - which seems to be a strong indication that there
are no users left for this OSS sound driver.

This patch therefore removes it.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Dan Malek <dan@embeddedalley.com>
Acked-by: Marcelo Tosatti <marcelo@kvack.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] cell: cbe_cpufreq cleanup and crash fix
Olof Johansson [Sat, 28 Apr 2007 02:49:03 +0000 (12:49 +1000)]
[POWERPC] cell: cbe_cpufreq cleanup and crash fix

cbe_cpufreq cleanups:

* comment format
* whitespace
* don't init on non-cell platforms

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Declare enable_kernel_spe in a header
Johannes Berg [Fri, 27 Apr 2007 22:00:03 +0000 (08:00 +1000)]
[POWERPC] Declare enable_kernel_spe in a header

This patch puts enable_kernel_spe into <asm-powerpc/system.h> along with
enable_kernel_altivec etc.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add dt_xlate_addr() to bootwrapper
Mark A. Greer [Fri, 27 Apr 2007 20:48:24 +0000 (06:48 +1000)]
[POWERPC] Add dt_xlate_addr() to bootwrapper

dt_xlate_reg() looks up the 'reg' property in the specified node
to get the address and size to translate.  Add dt_xlate_addr()
which is passed in the address and size to translate.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
Scott Wood [Fri, 27 Apr 2007 20:32:15 +0000 (06:32 +1000)]
[POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE

A usage of CONFIG_DEVICE_TREE got accidentally truncated; this
fix allows out-of-tree dts files to work.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
Grant Likely [Fri, 27 Apr 2007 19:50:05 +0000 (05:50 +1000)]
[POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.

Why create a platform specific board_info structure that is hacked
together, ugly, and dangerous, when we've got a perfectly fine common
board_info structure that is hacked-together, ugly and dangerous.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
Grant Likely [Fri, 27 Apr 2007 19:50:04 +0000 (05:50 +1000)]
[POWERPC] Add sane defaults for Xilinx EDK generated xparameters files

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add uartlite boot console driver for the zImage wrapper
Grant Likely [Fri, 27 Apr 2007 19:50:03 +0000 (05:50 +1000)]
[POWERPC] Add uartlite boot console driver for the zImage wrapper

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Stop using ppc_sys for Xilinx Virtex boards
Grant Likely [Fri, 27 Apr 2007 19:50:02 +0000 (05:50 +1000)]
[POWERPC] Stop using ppc_sys for Xilinx Virtex boards

The arch/ppc/syslib/ppc_sys.c infrastructure does not work well for the
virtex ports.  Move the ml300 and ml403 board ports over to use the new
virtex_devices infrastructure.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
Grant Likely [Fri, 27 Apr 2007 19:50:01 +0000 (05:50 +1000)]
[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices

Currently virtex support in mainline make use of the infrastructure in
arch/ppc/syslib/ppc_sys.c for registering common devices on virtex ppc405
platforms.  The ppc_sys.c code is not well suited to the dynamic nature of
FPGA designs and makes adding new board ports more complex.  This patch
adds a new listing of common devices which does not depend on the ppc_sys.c
infrastructure.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Merge common virtex header files
Grant Likely [Fri, 27 Apr 2007 19:50:00 +0000 (05:50 +1000)]
[POWERPC] Merge common virtex header files

The header files for the ml403 and ml300 are virtually identical, merge
them into a single file.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
Grant Likely [Fri, 27 Apr 2007 19:49:59 +0000 (05:49 +1000)]
[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform

Reverse dependency order for Xilinx Virtex parts.  For these parts, It
makes more sense for boards/chips to specify which features they
provide instead of the features listing the parts they are implemented
in.  I think it also makes adding new board ports simpler.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Clean up cpufreq Kconfig dependencies
Olof Johansson [Fri, 27 Apr 2007 05:52:43 +0000 (15:52 +1000)]
[POWERPC] Clean up cpufreq Kconfig dependencies

Shuffle Kconfig order, making the platform drivers menu depend on the global
option instead of each driver being dependent on it.

Also fix dependency of PPC_PMAC on the G5 one.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoRevert "[POWERPC] Autodetect serial console on efika"
Paul Mackerras [Mon, 30 Apr 2007 00:24:24 +0000 (10:24 +1000)]
Revert "[POWERPC] Autodetect serial console on efika"

This reverts commit 9414715a7bbb45450015e9bc2676d85d919d08d4,
at Olaf Hering's request:

> Paul, please discard this patch. The optional graphics card may have
> also device_type 'serial' if it is in VGA mode.
> I will send an updated patch later.

17 years agoieee1394: remove garbage from Kconfig
Stefan Richter [Sat, 21 Apr 2007 19:02:52 +0000 (21:02 +0200)]
ieee1394: remove garbage from Kconfig

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: more help in Kconfig
Stefan Richter [Sat, 21 Apr 2007 18:54:37 +0000 (20:54 +0200)]
ieee1394: more help in Kconfig

  - s/Device Drivers/Controllers/
  - clarify who needs pcilynx
  - don't recommend Y for raw1394; M is typically used

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ohci1394: Fix mistake in printk message.
Simon Arlott [Tue, 24 Apr 2007 22:44:57 +0000 (23:44 +0100)]
ieee1394: ohci1394: Fix mistake in printk message.

Fix the "attempting to setting" message in ohci1394.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register
Bernhard Kauer [Fri, 20 Apr 2007 11:59:54 +0000 (13:59 +0200)]
ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register

Remove the unneeded code that clears, sets and again clears the
rcvPhyPkt bit in the ohci1394 LinkControl register in ohci_initialize().

Signed-off-by: Bernhard Kauer <kauer@os.inf.tu-dresden.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ohci1394: fix cosmetic problem in error logging
Stefan Richter [Thu, 12 Apr 2007 20:21:55 +0000 (22:21 +0200)]
ieee1394: ohci1394: fix cosmetic problem in error logging

If posted write failed, an "Unhandled interrupt(s) 0x00000100" message
was logged by mistake.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: send async streams at S100 on 1394b buses
Stefan Richter [Mon, 23 Apr 2007 19:28:47 +0000 (21:28 +0200)]
ieee1394: eth1394: send async streams at S100 on 1394b buses

eth1394 did not work on buses consisting of S100B...S400B hardware
because it attempted to send GASP packets at S800.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: fix error path in module_init
Akinobu Mita [Sat, 21 Apr 2007 09:36:26 +0000 (18:36 +0900)]
ieee1394: eth1394: fix error path in module_init

This patch fixes some error handlings in eth1394:

- check return value of kmem_cache_create()
- cleanup resources if hpsb_register_protocol() fails

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace)
17 years agoieee1394: eth1394: correct return codes in hard_start_xmit
Stefan Richter [Mon, 2 Apr 2007 00:24:27 +0000 (02:24 +0200)]
ieee1394: eth1394: correct return codes in hard_start_xmit

This patch actually doesn't change anything because there was always 0
== NETDEV_TX_OK returned before.

TODO: Return NETDEV_TX_BUSY in error case and test in different error
conditions.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: hard_start_xmit is called in atomic context
Stefan Richter [Mon, 2 Apr 2007 00:23:19 +0000 (02:23 +0200)]
ieee1394: eth1394: hard_start_xmit is called in atomic context

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: some conditions are unlikely
Stefan Richter [Mon, 2 Apr 2007 00:22:21 +0000 (02:22 +0200)]
ieee1394: eth1394: some conditions are unlikely

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: clean up fragment_overlap
Stefan Richter [Mon, 2 Apr 2007 00:21:46 +0000 (02:21 +0200)]
ieee1394: eth1394: clean up fragment_overlap

offset > fi->offset + fi->len - 1  ==  !(offset < fi->offset + fi->len)
offset + len - 1 < fi->offset      ==  !(offset + len > fi->offset)
!(A || B)  ==  (!A && !B)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: don't use alloc_etherdev
Stefan Richter [Mon, 2 Apr 2007 00:20:37 +0000 (02:20 +0200)]
ieee1394: eth1394: don't use alloc_etherdev

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: omit useless set_mac_address callback
Stefan Richter [Mon, 2 Apr 2007 00:19:48 +0000 (02:19 +0200)]
ieee1394: eth1394: omit useless set_mac_address callback

We can't reconfigure the MAC address, hence we don't need the callback.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: CONFIG_INET is always defined
Stefan Richter [Mon, 2 Apr 2007 00:19:02 +0000 (02:19 +0200)]
ieee1394: eth1394: CONFIG_INET is always defined

because CONFIG_IEEE1394_ETH1394 depends on it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: allow MTU bigger than 1500
Stefan Richter [Tue, 3 Apr 2007 21:55:40 +0000 (23:55 +0200)]
ieee1394: eth1394: allow MTU bigger than 1500

RFC 2734 says: "IP-capable nodes may operate with an MTU size larger
than the default [1500 octets], but the means by which a larger MTU is
configured are beyond the scope of this document."

Allow users to set an MTU bigger than 1500.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: unexport highlevel_host_reset
Adrian Bunk [Thu, 26 Apr 2007 23:47:32 +0000 (01:47 +0200)]
ieee1394: unexport highlevel_host_reset

highlevel_host_reset no longer has any modular users.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: contain host reset
Stefan Richter [Mon, 2 Apr 2007 00:16:40 +0000 (02:16 +0200)]
ieee1394: eth1394: contain host reset

Call only eth1394's own host reset handler from .tx_timeout, not the
reset hooks of all other IEEE 1394 drivers.

A minor drawback of this patch is that ether1394_host_reset by timeout
is not serialized against ether1394_host_reset by bus reset.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: shorter error messages
Stefan Richter [Mon, 2 Apr 2007 00:15:53 +0000 (02:15 +0200)]
ieee1394: eth1394: shorter error messages

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: correct a memset argument
Stefan Richter [Mon, 2 Apr 2007 00:15:21 +0000 (02:15 +0200)]
ieee1394: eth1394: correct a memset argument

The old argument calculated the correct value in a wrong way.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: refactor .probe and .update
Stefan Richter [Mon, 2 Apr 2007 00:14:45 +0000 (02:14 +0200)]
ieee1394: eth1394: refactor .probe and .update

Move common code into an extra function.  This implicitly adds a missing
node_info->fifo = CSR1212_INVALID_ADDR_SPACE; to .update.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: .probe and .update may sleep
Stefan Richter [Mon, 2 Apr 2007 00:13:51 +0000 (02:13 +0200)]
ieee1394: eth1394: .probe and .update may sleep

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: coding style
Stefan Richter [Mon, 2 Apr 2007 00:12:32 +0000 (02:12 +0200)]
ieee1394: eth1394: coding style

Adjust white space and line wraps.  Remove unnecessary parentheses and
braces, unused macros, and some of the more redundant comments.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: Move common recv_init code to helper function
Jean Delvare [Sun, 1 Apr 2007 08:06:33 +0000 (10:06 +0200)]
ieee1394: eth1394: Move common recv_init code to helper function

There is some common code between ether1394_open and ether1394_add_host
which can be moved to a separate helper function for a slightly smaller
eth1394 driver (-160 bytes on i386.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: don't autoload by hotplug when ohci1394 starts
Stefan Richter [Mon, 26 Mar 2007 23:36:50 +0000 (01:36 +0200)]
ieee1394: eth1394: don't autoload by hotplug when ohci1394 starts

Until now, ieee1394 put an IP-over-1394 capability entry into each new
host's config ROM.  As soon as the controller was initialized --- i.e.
right after modprobe ohci1394 --- this entry triggered a hotplug event
which typically caused auto-loading of eth1394.

This irritated or annoyed many users and distributors.  Of course they
could blacklist eth1394, but then ieee1394 wrongly advertized IP-over-
1394 capability to the FireWire bus.

Therefore
  - remove the offending kernel config option
    IEEE1394_CONFIG_ROM_IP1394,
  - let eth1394 add the ROM entry by itself, i.e. only after eth1394 was
    loaded.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7793 .

To emulate the behaviour of older kernels, simply add the following to
to /etc/modprobe.conf:

install ohci1394 /sbin/modprobe eth1394; \
                 /sbin/modprobe --ignore-install ohci1394

Note, autoloading of eth1394 when an _external_ IP-over-1394 capable
device is discovered is _not_ affected by this patch.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: reduce excessive function inlining
Stefan Richter [Sun, 18 Mar 2007 11:23:11 +0000 (12:23 +0100)]
ieee1394: eth1394: reduce excessive function inlining

Shrinks eth1394.ko by about 5%.

Many of these functions have only one caller and are therefore auto-
inlined anyway.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: clean up host removal
Stefan Richter [Sat, 10 Feb 2007 22:57:57 +0000 (23:57 +0100)]
ieee1394: eth1394: clean up host removal

ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: eth1394: unregister address space in failure case
Stefan Richter [Sat, 10 Feb 2007 22:56:38 +0000 (23:56 +0100)]
ieee1394: eth1394: unregister address space in failure case

Warn if hpsb_allocate_and_register_addrspace() failed.
Unregister the address space if something else failed.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: send async streams at S100
Stefan Richter [Mon, 23 Apr 2007 19:27:13 +0000 (21:27 +0200)]
ieee1394: send async streams at S100

The comment says it all.  This affects only asynchronous streams sent
via raw1394; the eth1394 driver has own code and needs an own fix.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: SPIN_LOCK_UNLOCKED cleanup
Milind Arun Choudhary [Wed, 11 Apr 2007 17:54:34 +0000 (23:24 +0530)]
ieee1394: SPIN_LOCK_UNLOCKED cleanup

SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK instead

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: nodemgr: unify some error messages
Stefan Richter [Fri, 30 Mar 2007 17:21:05 +0000 (19:21 +0200)]
ieee1394: nodemgr: unify some error messages

Shrinks object file size a little bit.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: nodemgr: less noise in dmesg
Stefan Richter [Fri, 30 Mar 2007 17:19:55 +0000 (19:19 +0200)]
ieee1394: nodemgr: less noise in dmesg

Everytime when eth1394 or a libraw1394 client updates the configuration
ROM, a certain sysfs attribute cannot be added since it already exists.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: unroll a weird macro
Stefan Richter [Sat, 17 Mar 2007 23:55:15 +0000 (00:55 +0100)]
ieee1394: unroll a weird macro

This is a coding style touch-up for ieee1394's handle_incoming_packet().

A preprocessor macro contained hardwired variable names and, even worse,
the 'break' keyword.  This macro is now unrolled and removed.

Also, all 'break's which had the effect of a return are replaced by
return.  And a FIXME comment is brought up to date.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: iso.c needs sched.h
Andrew Morton [Thu, 26 Apr 2007 07:16:04 +0000 (00:16 -0700)]
ieee1394: iso.c needs sched.h

alpha:

drivers/ieee1394/iso.c: In function 'hpsb_iso_xmit_sync':
drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct'
drivers/ieee1394/iso.c:440: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/iso.c:440: error: (Each undeclared identifier is reported only once
drivers/ieee1394/iso.c:440: error: for each function it appears in.)
drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'signal_pending'
drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct'
drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'schedule'
drivers/ieee1394/iso.c: In function 'hpsb_iso_wake':
drivers/ieee1394/iso.c:562: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
17 years agoieee1394: some more includes
Stefan Richter [Tue, 10 Apr 2007 00:39:07 +0000 (02:39 +0200)]
ieee1394: some more includes

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: ieee1394_transactions needs sched.h
Torsten Kaiser [Mon, 9 Apr 2007 19:03:15 +0000 (21:03 +0200)]
ieee1394: ieee1394_transactions needs sched.h

drivers/ieee1394/ieee1394_transactions.c fails for me if CONFIG_SMP=n

gcc complains:
  CC      drivers/ieee1394/ieee1394_transactions.o
drivers/ieee1394/ieee1394_transactions.c: In function 'hpsb_get_tlabel':
drivers/ieee1394/ieee1394_transactions.c:183: error:
'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/ieee1394_transactions.c:183: error: (Each undeclared
identifier is reported only once

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added comment)
17 years agoieee1394: ieee1394_core printk format
Randy Dunlap [Tue, 3 Apr 2007 20:00:47 +0000 (13:00 -0700)]
ieee1394: ieee1394_core printk format

Fix printk format string:
drivers/ieee1394/ieee1394_core.c:702: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: remove usage of skb_queue as packet queue
Stefan Richter [Sun, 25 Mar 2007 20:22:40 +0000 (22:22 +0200)]
ieee1394: remove usage of skb_queue as packet queue

This considerably reduces the memory requirements for a packet and
eliminates ieee1394's dependency on CONFIG_NET.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: csr1212: log if devices have CRC errors in their ROM
Stefan Richter [Tue, 13 Mar 2007 23:29:20 +0000 (00:29 +0100)]
ieee1394: csr1212: log if devices have CRC errors in their ROM

This will point out firmware bugs.

I tested with 11 SBP-2 devices and one OS X PC and got these errors from
two old CD-RWs only.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: csr1212: more sensible names for jump targets
Stefan Richter [Tue, 13 Mar 2007 23:28:36 +0000 (00:28 +0100)]
ieee1394: csr1212: more sensible names for jump targets

Code beneath two labels called "fail" is actually also reached in case
of success.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: csr1212: warn on unreachable code
Stefan Richter [Tue, 13 Mar 2007 23:27:46 +0000 (00:27 +0100)]
ieee1394: csr1212: warn on unreachable code

We want bugs to show themselves.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: shrink csr1212_new_string_descriptor_leaf
Stefan Richter [Tue, 13 Mar 2007 23:27:18 +0000 (00:27 +0100)]
ieee1394: shrink csr1212_new_string_descriptor_leaf

Make unnecessarily generic code specific and thus simpler.
Shrink a lookup table from 128 to 16 bytes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: csr1212: coding style
Stefan Richter [Tue, 13 Mar 2007 23:26:38 +0000 (00:26 +0100)]
ieee1394: csr1212: coding style

Whitespace, line breaks, braces...

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: replace vmalloc by kmalloc in csr1212
Stefan Richter [Sun, 11 Mar 2007 21:51:24 +0000 (22:51 +0100)]
ieee1394: replace vmalloc by kmalloc in csr1212

The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes +
sizeof(struct csr1212_csr_rom_cache) big.  Most of the time much
smaller data structures are allocated.  Therefore vmalloc is a waste.

The one exception is csr1212_append_new_cache() which is called to
append a chunk of CSR1212_EXTENDED_ROM_SIZE + sizeof(struct
csr1212_csr_rom_cache) if the currently allocated ROM cache is too
small.  CSR1212_EXTENDED_ROM_SIZE is generously defined as 256 kBytes.
In SVN commit 1220, Steve Kinneberg lowered this to 2 kBytes in the
config_rom_2.4 branch.  This same commit also switched CSR1212_MALLOC
from kmalloc to vmalloc in the SVN trunk branch:

> r1220 | kberg | 2004-05-31 01:51:44 +0200 (Mon, 31 May 2004) | 13 lines
>
> CSR1212 Extended ROM bug fixes:
> trunk line changes:
>   - Use vmalloc instead of kmalloc
>   - Change delayed_reset_bus() to operate in a work_queue instead of a
>     timer interrupt.
>   - Fix hpsb_allocate_and_register_addrspace() to not allocate space
>     on top of already allocated space.
>   - Fix problems in csr1212.c filling ConfigROM images when extend
>     ROMs are present.
> config-rom-2.4 changes:
>   - Changed extended rom allocation from 256K to 8K.
(It was actually 2 kB, not 8 kB.)
>   - Fix hpsb_allocate_and_register_addrspace() to not allocate space
>     on top of already allocated space.
>   - Fix problems in csr1212.c filling ConfigROM images when extend
>     ROMs are present.

I am now setting CSR1212_EXTENDED_ROM_SIZE to 2 kB minus the overhead of
struct csr1212_csr_rom_cache.  Note, this code path is not used by the
in-kernel drivers though.  raw1394 could trigger it, but the respective
libraw1394 functions don't exist yet.

Furthermore, userspace programs can replace the entire local ROM via
raw1394.  If kmalloc does not fulfill their needs --- well, tough luck.
I decree that nobody needs such huge extended ROMs.  (Extended ROMs are
defined by IEEE 1212 clause 7.7.18.  The spec does not impose
practically relevant restrictions on the size of extended ROM chunks.)

Another potentially demanding use of CSR1212_MALLOC is if external
FireWire devices come with Extended ROM entries.  If they are too big
for kmalloc (or have been too big for vmalloc) we just fail to read
their ROM.  This is quite unlikely though, to my knowledge.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: de-inline some functions
Stefan Richter [Tue, 13 Mar 2007 23:20:53 +0000 (00:20 +0100)]
ieee1394: de-inline some functions

This small reorganization of public csr1212 functions saves one
exported symbol and a few bytes in the driver modules.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: stricter error checks in csr1212
Stefan Richter [Sun, 11 Mar 2007 21:50:13 +0000 (22:50 +0100)]
ieee1394: stricter error checks in csr1212

return -EINVAL becomes BUG_ON in checks of function call parameters.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: csr1212: rename some types
Stefan Richter [Sun, 11 Mar 2007 21:49:34 +0000 (22:49 +0100)]
ieee1394: csr1212: rename some types

Use u8, u32 etc. instead of u_int8_t, csr1212_quad_t etc.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: drop csr1212's support for external compilation
Stefan Richter [Sun, 11 Mar 2007 21:49:05 +0000 (22:49 +0100)]
ieee1394: drop csr1212's support for external compilation

csr1212 was written to be compiled either as part of the ieee1394 kernel
driver or of an anticipated IEEE 1212 userspace library.  We now drop
support for the latter.  The costs in terms of code footprint and depth
of abstraction are not countered by any actual benefit.

Also remove some obsolete #includes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: remove unused csr1212 code
Stefan Richter [Sun, 11 Mar 2007 21:47:34 +0000 (22:47 +0100)]
ieee1394: remove unused csr1212 code

Delete unused code.
Make some extern functions static.
Remove superfluous inline keywords.
Move private definitions from csr1212.h to csr1212.c.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: small header cleanup
Stefan Richter [Mon, 5 Mar 2007 02:07:38 +0000 (03:07 +0100)]
ieee1394: small header cleanup

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: move some comments from declaration to definition
Stefan Richter [Mon, 5 Mar 2007 02:06:23 +0000 (03:06 +0100)]
ieee1394: move some comments from declaration to definition

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: remove declarations of nonexisting functions
Stefan Richter [Mon, 5 Mar 2007 02:05:32 +0000 (03:05 +0100)]
ieee1394: remove declarations of nonexisting functions

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: sbp2: include fixes
Andrew Morton [Mon, 23 Apr 2007 18:50:56 +0000 (11:50 -0700)]
ieee1394: sbp2: include fixes

drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout':
drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once
drivers/ieee1394/sbp2.c:399: error: for each function it appears in.)
drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending'
drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout'
drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg':
drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address'
drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast
drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write':
drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)

Possibly due to changes in -mm, but this file should explicitly include the
headers for the stuff it uses.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
17 years agoieee1394: sbp2: move some memory allocations into non-atomic context
Stefan Richter [Sun, 4 Feb 2007 19:57:38 +0000 (20:57 +0100)]
ieee1394: sbp2: move some memory allocations into non-atomic context

When the command ORB pool is created, the ORB list won't be accessed
concurrently.  Therefore we don't have to take the spinlock there.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: sbp2: optimize DMA direction of s/g tables
Stefan Richter [Sun, 4 Feb 2007 19:54:57 +0000 (20:54 +0100)]
ieee1394: sbp2: optimize DMA direction of s/g tables

Unlike the name suggests, "cmd->scatter_gather_element" holds only the
s/g table, not the actual s/g elements.  Since the table is only read
but never written by the device, DMA_BIDIRECTIONAL can be replaced by
DMA_TO_DEVICE which may be cheaper on some architectures.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agoieee1394: sbp2: enforce 32bit DMA mapping
Stefan Richter [Sun, 4 Feb 2007 19:25:43 +0000 (20:25 +0100)]
ieee1394: sbp2: enforce 32bit DMA mapping

In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
ORBs, and response buffers have to reside within the first 4 GB of the
FireWire controller's physical address space.  Set the correct mask for
DMA mappings.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>