Commit Graph

335 Commits (9543a931dcd82bfc5143807440ff63c7721a2e2a)

Author SHA1 Message Date
Stefan Richter 9543a931dc ieee1394: some more includes
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Torsten Kaiser 3a23a81e83 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)
2007-04-30 00:00:29 +02:00
Randy Dunlap 504945c9c6 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>
2007-04-30 00:00:29 +02:00
Stefan Richter 7542e0e696 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>
2007-04-30 00:00:29 +02:00
Stefan Richter d265250341 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>
2007-04-30 00:00:29 +02:00
Stefan Richter 511f7b3227 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>
2007-04-30 00:00:29 +02:00
Stefan Richter c94ccf9e33 ieee1394: csr1212: warn on unreachable code
We want bugs to show themselves.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Stefan Richter a1c6250cb6 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>
2007-04-30 00:00:28 +02:00
Stefan Richter c868ae2a1d ieee1394: csr1212: coding style
Whitespace, line breaks, braces...

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter fd2f3bddae 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>
2007-04-30 00:00:28 +02:00
Stefan Richter c1a37f2c65 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>
2007-04-30 00:00:28 +02:00
Stefan Richter 64ff712321 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>
2007-04-30 00:00:28 +02:00
Stefan Richter 982610bd0d 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>
2007-04-30 00:00:28 +02:00
Stefan Richter 7fb9addba8 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>
2007-04-30 00:00:28 +02:00
Stefan Richter 6c88e47566 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>
2007-04-30 00:00:28 +02:00
Stefan Richter e167c88ebb ieee1394: small header cleanup
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter afd6546d8d ieee1394: move some comments from declaration to definition
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter ef8153348f ieee1394: remove declarations of nonexisting functions
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:27 +02:00
Andrew Morton f84c922ba1 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)
2007-04-30 00:00:27 +02:00
Stefan Richter 3d269cb50c 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>
2007-04-30 00:00:27 +02:00
Stefan Richter 2446a79f4f 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>
2007-04-30 00:00:27 +02:00
Stefan Richter 0555659d63 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>
2007-04-30 00:00:27 +02:00
Stefan Richter f412bf440b ieee1394: sbp2: remove unnecessary alignments of struct members
The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of
sbp2.h::sbp2_command_info do not have to be aligned themselves --- only
the memory which they point to has to be.

The member "struct sbp2_command_orb command_orb" has to be aligned on
4 bytes boundary which is guaranteed because it contains u32 members.

The member "struct sbp2_unrestricted_page_table scatter_gather_element",
i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary
according to the SBP-2 spec.  This is not a requirement for FireWire
controllers but could be expected by SBP-2 targets.

I see no need to align the members command_orb and
scatter_gather_element on CPU cacheline boundaries.  It could have
performance benefits, but on the other hand sbp2 has a somewhat wasteful
allocation scheme which should be optimized first before further tweaks
like cacheline alignments.  (E.g. don't always allocate SG_ALL s/g table
elements.)

Note, before as well as after the patch, the code relies on the
assumption that memory alignment in the virtual address space is
preserved in the physical address space after DMA mapping.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:27 +02:00
Greg Kroah-Hartman a2a0f74dc1 IEEE1394: remove rwsem use from ieee1394 core
The subsystem rwsem is not used by the driver core at all, so the use of
it in the ieee1394 code doesn't make any sense.  They might possibly
want to use a local lock, but as most of these operations are already
protected by a local lock, it really doesn't look like it would be
needed.

Cc: Ben Collins <bcollins@debian.org>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux1394-devel <linux1394-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 10:57:30 -07:00
Eric Rannaud bf62456eb9 uevent: use add_uevent_var() instead of open coding it
Make use of add_uevent_var() instead of (often incorrectly) open coding it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Eric Rannaud <eric.rannaud@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 10:57:29 -07:00
Arnaldo Carvalho de Melo eddc9ec53b [SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:25:10 -07:00
Arnaldo Carvalho de Melo 98e399f82a [SK_BUFF]: Introduce skb_mac_header()
For the places where we need a pointer to the mac header, it is still legal to
touch skb->mac.raw directly if just adding to, subtracting from or setting it
to another layer header.

This one also converts some more cases to skb_reset_mac_header() that my
regex missed as it had no spaces before nor after '=', ugh.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:24:41 -07:00
Arnaldo Carvalho de Melo 459a98ed88 [SK_BUFF]: Introduce skb_reset_mac_header(skb)
For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can
later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in
64bit land while possibly keeping it as a pointer on 32bit.

This one touches just the most simple case, next will handle the slightly more
"complex" cases.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25 22:24:32 -07:00
Stefan Richter 199c1167f5 ieee1394: change deprecation status of dv1394
Nobody ported ffmpeg from dv1394 to rawiso yet, and there is no
justification to remove dv1394 right now.

Nevertheless, a strong deprecation of this ABI makes a lot of sense,
especially as Kristian H's drivers shape up to be an attractive
alternative to the existing ones.  But we don't have a schedule at the
moment.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-09 18:52:27 +02:00
Stefan Richter 7a9eeb2fa1 ieee1394: fix oops on "modprobe -r ohci1394" after network class_device conversion
The networking subsystem has been converted from class_device to device
but ieee1394 hasn't.  This results in a 100% reproducible NULL pointer
dereference if the ohci1394 driver module is unloaded while the eth1394
module is still loaded.
http://lkml.org/lkml/2006/11/16/147
http://lkml.org/lkml/2007/3/14/4

This is a regression in 2.6.21-rc1.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Ismail Dönmez <ismail@pardus.org.tr>
2007-03-23 10:55:25 +01:00
Linus Torvalds 874ff01bd9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits)
  Documentation/kernel-docs.txt update.
  arch/cris: typo in KERN_INFO
  Storage class should be before const qualifier
  kernel/printk.c: comment fix
  update I/O sched Kconfig help texts - CFQ is now default, not AS.
  Remove duplicate listing of Cris arch from README
  kbuild: more doc. cleanups
  doc: make doc. for maxcpus= more visible
  drivers/net/eexpress.c: remove duplicate comment
  add a help text for BLK_DEV_GENERIC
  correct a dead URL in the IP_MULTICAST help text
  fix the BAYCOM_SER_HDX help text
  fix SCSI_SCAN_ASYNC help text
  trivial documentation patch for platform.txt
  Fix typos concerning hierarchy
  Fix comment typo "spin_lock_irqrestore".
  Fix misspellings of "agressive".
  drivers/scsi/a100u2w.c: trivial typo patch
  Correct trivial typo in log2.h.
  Remove useless FIND_FIRST_BIT() macro from cardbus.c.
  ...
2007-02-19 13:29:02 -08:00
Linus Torvalds 920841d8d1 Merge branch 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: fix another deadlock in nodemgr
  ieee1394: cycle timer read extension for raw1394
2007-02-19 13:07:19 -08:00
Tobias Klauser c5a69d57eb Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 20:11:19 +01:00
Stefan Richter a65421ea3f ieee1394: fix another deadlock in nodemgr
A "modprobe ohci1394; sleep 1.5; modprobe -r ohci1394" could get stuck
in uninterruptible state, especially if an external node was connected.
http://bugzilla.kernel.org/show_bug.cgi?id=7792

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-17 14:41:18 +01:00
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
Tim Schmielau cd354f1ae7 [PATCH] remove many unneeded #includes of sched.h
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there.  Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm.  I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Jean Delvare 12a917f69d i2c: Declare more i2c_adapter parent devices
Declare the parent device of i2c_adapter devices each time we can
easily do so. It makes the i2c_adapter appear at the right place in
the device tree, rather than as a platform device.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: v4l-dvb-maintainer@linuxtv.org
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
2007-02-13 22:09:03 +01:00
Arjan van de Ven 2b8693c061 [PATCH] mark struct file_operations const 3
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:45 -08:00
Stefan Richter 91efa46205 ieee1394: fix host device registering when nodemgr disabled
Since my commit 8252bbb136 in 2.6.20-rc1,
host devices have a dummy driver attached.  Alas the driver was not
registered before use if ieee1394 was loaded with disable_nodemgr=1.

This resulted in non-functional FireWire drivers or kernel lockup.
http://bugzilla.kernel.org/show_bug.cgi?id=7942

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 21:36:22 +01:00
David Moore a5782010b4 ieee1394: video1394: DMA fix
This together with the phys_to_virt fix in lib/swiotlb.c::swiotlb_sync_sg
fixes video1394 DMA on machines with DMA bounce buffers, especially Intel
x86-64 machines with > 3GB RAM.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: David Moore <dcm@acm.org>
Tested-by: Nicolas Turro <Nicolas.Turro@inrialpes.fr>
2007-02-08 21:36:18 +01:00
Stefan Richter 0fe4c6fcac ieee1394: raw1394: prevent unloading of low-level driver
Unloading the low-level driver module of a FireWire host can lead to
all sorts of trouble if a raw1394 userspace client is using the host.
Just disallow it by incrementing the LLD's module reference count on
a RAW1394_REQ_SET_CARD write operation.  Decrement it when the file
is closed.

This feature wouldn't be relevant if "modprobe -r video1394" or
"modprobe -r dv1394" didn't automatically unload ohci1394 too.
http://bugzilla.kernel.org/show_bug.cgi?id=7701

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
2007-02-08 21:36:01 +01:00
Stefan Richter 12ba145c94 ieee1394: dv1394: tidy up card removal
small coding style touch-up and terser coding

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 21:00:53 +01:00
Stefan Richter 88e7bf2a4c ieee1394: dv1394: fix CardBus card ejection
Fix NULL pointer dereference on hot ejection of a FireWire card while
dv1394 was loaded.  http://bugzilla.kernel.org/show_bug.cgi?id=7121
I did not test card ejection with open /dev/dv1394 files yet.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 21:00:48 +01:00
Stefan Richter beb2fdcad1 ieee1394: sbp2: lower block queue alignment requirement
The old setting is copy & waste from usb-storage and doesn't apply to
sbp2.  There is only 4-byte alignment required for everything, except
for S/G table elements which have to be 8-byte aligned according to the
SBP-2 spec.  (They happen to be ____cacheline_aligned in our
implementation.  Whether that's good is another question.)

We now simply don't tune block queue alignment at all.  The default
alignment would surely never become anything else than a multiple of 4,
else tons of calls to blk_queue_dma_alignment would have to be added
everywhere in drivers/...

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:59:54 +01:00
Stefan Richter 9c31b38723 ieee1394: sbp2: remove bogus "emulated" host flag
There is no emulation going on here.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:59:48 +01:00
Stefan Richter d06170a9ba ieee1394: save one word in struct hpsb_host
hpsb_host.config_roms is a bitfield of which only one bit is currently
used.  hpsb_host.update_config_rom is only a Boolean.  Neither one is
accessed in hot code paths or with alignment requirements.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:59:27 +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
Stefan Richter 083922fe1c ieee1394: ohci1394: drop pcmcia-cs compatibility code
#ifdef PCMCIA is only true if compiled inside pcmcia-cs, isn't it?

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:59:09 +01:00
Stefan Richter b2051f8873 ieee1394: nodemgr: check info_length in ROM header earlier
The whole ROM area which is covered by the crc_length field of the ROM
header was fetched before the info_length field was checked for correct
general ROM format.  This might be wasteful or even dangerous with nodes
with minimal ROM, nonstandard ROM, or corrupt ROM.

Perform this check at the earliest opportunity.

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

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

Update: Also remove drivers/ieee1394/.gitignore.
Remove now unused struct members in drivers/ieee1394/nodemgr.h.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:57:43 +01:00