Commit Graph

306 Commits

Author SHA1 Message Date
Stefan Richter
22a38e72bc firewire: put old and new stack into same Kconfig submenu
Screenshot from "make menuconfig":
...
  ?????????????????????? IEEE 1394 (FireWire) support ???????????????????????
  ?  Arrow keys navigate the menu.  <Enter> selects submenus --->.          ?
...
  ? ??????????????????????????????????????????????????????????????????????? ?
  ? ?    <M> IEEE 1394 (FireWire) support (JUJU alternative stack, experim? ?
  ? ?    <M>   Support for OHCI firewire host controllers                 ? ?
  ? ?    <M>   Support for storage devices (SBP-2 protocol driver)        ? ?
  ? ?    <M> IEEE 1394 (FireWire) support                                 ? ?
  ? ?    ---   Subsystem Options                                          ? ?
  ? ?    [ ]   Excessive debugging output                                 ? ?
...
  ?                    <Select>    < Exit >    < Help >                     ?
  ???????????????????????????????????????????????????????????????????????????

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09 22:02:38 +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
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
4618fd3001 ieee1394: sbp2: use a better wildcard for blacklist
0x000000 could be a valid value to match against, but anything bigger
than 0xffffff cannot.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:57:08 +01:00
Kristian Hgsberg
dcb7112984 Add PCI class ID for firewire OHCI controllers.
Pull this define out of drivers/ieee1394/ohci1394.c and rename to match
other PCI class defines.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:55:23 +01:00
Andrea Guzzo
0749aaab49 ieee1394: modified csr1212_key_id_type_map to support lisight
This patch applies a little change in csr1212.c to fix iSight (firewire
digital camera) related issues (but maybe other firewire devices could
also need such modification)
The actual implementation of the "csr1212_key_id_type_map" table doesn't
support some node types used by the iSight for the audio unit. This
limit makes the csr scanning routine to never see the audio unit node ,
and consequently the iSight driver probe() routine to be never called
and there is no way to hook an isight device when it is inserted.

Signed-off-by: Andrea Guzzo <xant@xant.net>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-02-08 20:55:02 +01:00
Stefan Richter
1a74bc68e4 ieee1394: sbp2: fix probing of some DVD-ROM/RWs
Since commit 98e238cd42 in Linux 2.6.19,
"ieee1394: sbp2: don't prefer MODE SENSE 10", some FireWire DVD-ROMs and
DVD-RWs were mistaken as CD-ROM because sr_mod now sent MODE SENSE 6.
The MMC command set includes only MODE SENSE 10.
http://bugzilla.kernel.org/show_bug.cgi?id=7800

This fix lets sbp2 switch scsi_device.use_10_for_rw on for MMC LUs.
This should rather be done in the command set driver sr_mod, not in the
sbp2 transport driver, and an according patch will follow for a next
Linux release.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-01-10 20:24:42 +01:00
Stefan Richter
97d552e35d ieee1394: sbp2: fix bogus dma mapping
Need to use a PCI device, not a FireWire host device.  Problem found by
Andreas Schwab, mistake pointed out by Benjamin Herrenschmidt.
http://ozlabs.org/pipermail/linuxppc-dev/2006-December/029595.html

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Andreas Schwab <schwab@suse.de>
2006-12-30 14:26:59 +01:00
Stefan Richter
b2bb550c4a ieee1394: sbp2: pass REQUEST_SENSE through to the target
Delete some incorrect code, left over from the initial driver submission
in March 2001.

SBP-2 targets should provide sense data via the SBP-2 status block
(autosense).  We have to pass the REQUEST_SENSE command through to
targets which don't implement autosense, if there are any, and to
accomodate application clients which use this command.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-30 14:26:41 +01:00
Jean Delvare
3269711b76 i2c: Discard the i2c algo del_bus wrappers
They are all only calling i2c_del_adapter, so we may as well do
it directly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:33 +01:00
Josef Sipek
4db61081fa [PATCH] struct path: convert ieee1394
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:46 -08:00
Stefan Richter
ec9b7e1044 ieee1394: sbp2: code formatting around work_struct stuff
Merge is finished, can bring the code in readable style again.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:23:25 +01:00
Stefan Richter
1e4f7bc8f8 ieee1394: nodemgr: remove a kcalloc
Was I sleepwalking when I wrote this?

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:12:16 +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
9b7d9c096d ieee1394: sbp2: convert from PCI DMA to generic DMA
API conversion without change in functionality

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:11:43 +01:00
Stefan Richter
d41bba2d3a ieee1394: nodemgr: spaces to tabs
whitespace pedantry

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:11:28 +01:00
Stefan Richter
8252bbb136 ieee1394: nodemgr: fix deadlock in shutdown
If "modprobe ohci1394" was quickly followed by "modprobe -r ohci1394",
say with 1 second pause in between, the modprobe -r got stuck in
uninterruptible sleep in kthread_stop.  At the same time the knodemgrd
slept uninterruptibly in bus_rescan_devices_helper.  That's because
driver_detach took the semaphore of the PCI device and
bus_rescan_devices_helper wanted to take the semaphore of the FireWire
host device's parent, which is the same semaphore. This was a regression
since Linux 2.6.16, commit bf74ad5bc4,
"Hold the device's parent's lock during probe and remove".

The fix (or workaround) adds a dummy driver to the hpsb_host device. Now
bus_rescan_devices_helper won't scan the host device anymore.  This
doesn't hurt since we have no drivers which will bind to these devices
and it is unlikely that there will ever be such a driver.  The dummy
driver is befittingly presented as a representation of ieee1394 itself.

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=6706

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:10:23 +01:00
Stefan Richter
cec1a31196 ieee1394: nodemgr: remove duplicate assignment
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:06:05 +01:00
Luca Tettamanti
ff6a4cd2e1 sbp2: make 1bit bitfield unsigned
A signed single-bit bitfield doesn't make much sense. Make it unsigned.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:05:47 +01:00
Stefan Richter
4e834da1da ieee1394: schedule *_oui sysfs attributes for removal
There is no manpower available to reform oui.db into a library for use
in more kernel subsystems.  The low ratio of usefulness to size and the
occasional need to update oui.db from IEEE's official list suggest to
drop oui.db.  I plan to make a userspace script available which
translates the remaining numeric sysfs attributes to names of
organizations.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:05:34 +01:00
Stefan Richter
e9429dfdc3 ieee1394: schedule unused symbol exports for removal
This also means that former parts of ieee1394's API will be subject to
change or removal.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:05:24 +01:00
Stefan Richter
861646f522 ieee1394: dv1394: schedule for feature removal
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:05:12 +01:00
Stefan Richter
9868e0ec03 ieee1394: raw1394: defer feature removal of old isoch interface
Known to be affected:
 - libdc1394: prefers video1394 for now, old-style raw1394 support might
   be dropped eventually
 - OpenH323 PWLib, AVC video input module: uses libraw1394's old API

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:04:59 +01:00
Stefan Richter
63cca59e89 ieee1394: ohci1394: call PMac code in shutdown only for proper machines
There has been an if(...) missing, for ages.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:04:35 +01:00
Stefan Richter
5370f1f5e9 ieee1394: ohci1394: reformat PPC_PMAC platform code
Adjust whitespace and line lengths

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:04:24 +01:00
Stefan Richter
48cfae44b4 ieee1394: ohci1394: add PPC_PMAC platform code to driver probe
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431
iBook G3 threw a machine check exception and put the display backlight
to full brightness after ohci1394 was unloaded and reloaded.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:04:14 +01:00
Stefan Richter
58272c1c03 ieee1394: sbp2: wrap two functions into one
Move the body of a function into its only caller.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:04:03 +01:00
Stefan Richter
2a533b179d ieee1394: sbp2: update comment on things to do
Some people actually look at those comments.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:03:49 +01:00
Stefan Richter
cd641f68d6 ieee1394: sbp2: use list_move_tail()
It's OK to reorder list_del() and sbp2util_free_command_dma() here.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 23:03:38 +01:00
Stefan Richter
138c8af864 ieee1394: sbp2: more concise names for types and variables
"struct scsi_id_instance_data" represents a logical unit.
Rename it to "struct sbp2_lu", and "scsi_id" to "lu".
Rename some other variables too.
Wrap almost all lines after at most 80 columns.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07 22:59:34 +01:00