IEEE 1394 updates for Linux 2.6.16.y (v710 2008-05-04) drivers/ieee1394/.gitignore | 1 drivers/ieee1394/Kconfig | 118 drivers/ieee1394/Makefile | 9 drivers/ieee1394/config_roms.c | 94 drivers/ieee1394/config_roms.h | 20 drivers/ieee1394/csr.c | 31 drivers/ieee1394/csr.h | 107 drivers/ieee1394/csr1212.c | 932 +-- drivers/ieee1394/csr1212.h | 480 - drivers/ieee1394/dma.c | 49 drivers/ieee1394/dma.h | 104 drivers/ieee1394/dv1394-private.h | 6 drivers/ieee1394/dv1394.c | 153 drivers/ieee1394/eth1394.c | 982 +-- drivers/ieee1394/eth1394.h | 30 drivers/ieee1394/highlevel.c | 522 - drivers/ieee1394/highlevel.h | 205 drivers/ieee1394/hosts.c | 61 drivers/ieee1394/hosts.h | 89 drivers/ieee1394/ieee1394-ioctl.h | 11 drivers/ieee1394/ieee1394.h | 314 - drivers/ieee1394/ieee1394_core.c | 629 +- drivers/ieee1394/ieee1394_core.h | 141 drivers/ieee1394/ieee1394_hotplug.h | 30 drivers/ieee1394/ieee1394_transactions.c | 249 drivers/ieee1394/ieee1394_transactions.h | 57 drivers/ieee1394/ieee1394_types.h | 68 drivers/ieee1394/iso.c | 89 drivers/ieee1394/iso.h | 106 drivers/ieee1394/nodemgr.c | 685 +- drivers/ieee1394/nodemgr.h | 58 drivers/ieee1394/ohci1394.c | 699 -- drivers/ieee1394/ohci1394.h | 28 drivers/ieee1394/oui.db | 7048 ----------------------- drivers/ieee1394/oui2c.sh | 23 drivers/ieee1394/pcilynx.c | 36 drivers/ieee1394/pcilynx.h | 1 drivers/ieee1394/raw1394-private.h | 18 drivers/ieee1394/raw1394.c | 654 +- drivers/ieee1394/raw1394.h | 14 drivers/ieee1394/sbp2.c | 2851 +++------ drivers/ieee1394/sbp2.h | 356 - drivers/ieee1394/video1394.c | 134 drivers/scsi/scsi_lib.c | 13 drivers/scsi/sd.c | 6 include/linux/pci_ids.h | 1 46 files changed, 5005 insertions(+), 13307 deletions(-) ======================================================================== Date: Fri, 2 May 2008 20:14:52 +0200 (CEST) From: Stefan Richter Subject: ieee1394: reduce log noise about config ROM CRC errors This avoids redundant messages about a special and usually harmless firmware flaw. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) ======================================================================== Date: Thu, 1 May 2008 10:43:04 +0200 (CEST) From: Stefan Richter Subject: ieee1394: fix NULL pointer dereference in sysfs access Regression since "ieee1394: prevent device binding of raw1394, video1394, dv1394", commit d2ace29fa44589da51fedc06a67b3f05301f3bfd: $ cat /sys/bus/ieee1394/drivers/raw1394/device_ids triggers a NULL pointer dereference in fw_show_drv_device_ids. Reported by Miles Lane. Signed-off-by: Stefan Richter Tested-by: Miles Lane --- drivers/ieee1394/nodemgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ======================================================================== Date: Thu, 24 Apr 2008 09:02:04 +0200 (CEST) From: Tony Breeds Subject: ieee1394: silence defined but not used warning in non-modular builds Currently the kernel will issue the following warning: drivers/ieee1394/raw1394.c:2938: warning: 'raw1394_id_table' defined but not used Add #ifdef MODULE guards around the declaration. Signed-off-by: Tony Breeds Ditto with dv1394_id_table and video1394_id_table. Signed-off-by: Stefan Richter --- drivers/ieee1394/dv1394.c | 2 ++ drivers/ieee1394/raw1394.c | 2 ++ drivers/ieee1394/video1394.c | 2 ++ 3 files changed, 6 insertions(+) ======================================================================== Date: Wed, 19 Mar 2008 22:10:59 +0100 From: Pieter Palmers Subject: ieee1394: rawiso: requeue packet for transmission after skipped cycle As it seems, some host controllers have issues that can cause them to skip cycles now and then when using large packets. I suspect that this is due to DMA not succeeding in time. If the transmit fifo can't contain more than one packet (big packets), the DMA should provide a new packet each cycle (125us). I am under the impression that my current PCI express test system can't guarantee this. In any case, the patch tries to provide a workaround as follows: The DMA program descriptors are modified such that when an error occurs, the DMA engine retries the descriptor the next cycle instead of stalling. This way no data is lost. The side effect of this is that packets are sent with one cycle delay. This however might not be that much of a problem for certain protocols (e.g. AM824). If they use padding packets for e.g. rate matching they can drop one of those to resync the streams. The amount of skips between two userspace wakeups is counted. This number is then propagated to userspace through the upper 16 bits of the 'dropped' parameter. This allows unmodified userspace applications due to the following: 1) libraw simply passes this dropped parameter to the user application 2) the meaning of the dropped parameter is: if it's nonzero, something bad has happened. The actual value of the parameter at this moment does not have a specific meaning. A libraw client can then retrieve the number of skipped cycles and account for them if needed. Signed-off-by: Pieter Palmers Signed-off-by: Stefan Richter --- drivers/ieee1394/iso.h | 2 ++ drivers/ieee1394/ohci1394.c | 34 ++++++++++++++++++++++++++++++++++ drivers/ieee1394/raw1394.c | 7 ++++++- 3 files changed, 42 insertions(+), 1 deletion(-) ======================================================================== Date: Fri, 11 Apr 2008 16:27:59 +0200 From: Philippe De Muyter Subject: ieee1394: limit early node speed to host interface speed The following patch limits the node speed to the host interface speed, before using it. Signed-off-by: Philippe De Muyter It should actually suffice to do this only for the local node's speedcap[]. But there is another bug in the speed calculation: The local node's speed is not correctly propagated to the speeds which are to be used to access remote nodes. http://thread.gmane.org/gmane.linux.kernel.firewire.devel/11772/focus=12024 Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== Date: Thu, 27 Mar 2008 10:48:37 -0400 (EDT) From: "Robert P. J. Day" Subject: ieee1394: Remove superfluous calls to kobject_set_name(). Unless you're adding a kobject to the sysfs hierarchy, there is no point setting its kobject name. Signed-off-by: Robert P. J. Day Signed-off-by: Stefan Richter --- drivers/ieee1394/dv1394.c | 1 - drivers/ieee1394/raw1394.c | 1 - drivers/ieee1394/video1394.c | 1 - 3 files changed, 3 deletions(-) ======================================================================== Date: Mon, 24 Mar 2008 20:53:34 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: missing PPC PMac feature calls in failure path The failure path of ohci1394_pci_probe() reuses ohci1394_pci_remove(). Doing so it missed to call ohci1394_pmac_off() in a few unlikely early error cases. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ======================================================================== Date: Mon, 24 Mar 2008 20:52:42 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: refactor some printk format strings to reduce the size of ohci1394.ko. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) ======================================================================== Date: Mon, 24 Mar 2008 20:49:01 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: unroll a macro with return We don't want to hide something like return in a preprocessor macro. Unroll the macro and use a goto, which also reduces the size of ohci1394.ko. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 94 +++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 38 deletions(-) ======================================================================== Date: Sun, 23 Mar 2008 10:15:28 -0400 (EDT) From: "Robert P. J. Day" Subject: ieee1394: Use shorter list_splice_init() for brevity. Signed-off-by: Robert P. J. Day Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 6 ++---- drivers/ieee1394/pcilynx.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) ======================================================================== Date: Tue, 11 Mar 2008 22:32:52 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: fix for SYM13FW500 bridge (Datafab disk) Fix I/O errors due to SYM13FW500's inability to handle larger request sizes. Reported by Piergiorgio Sartor for firewire-sbp2 in https://bugzilla.redhat.com/show_bug.cgi?id=436879 This fix is necessary because sbp2's default request size limit has been lifted since 2.6.25-rc1. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/ieee1394/sbp2.c | 5 +++++ 1 file changed, 5 insertions(+) ======================================================================== Date: Wed, 05 Mar 2008 18:24:54 -0800 From: Harvey Harrison Subject: ieee1394: replace remaining __FUNCTION__ occurrences __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter --- drivers/ieee1394/highlevel.c | 6 +++--- drivers/ieee1394/ieee1394_core.c | 2 +- drivers/ieee1394/ohci1394.c | 2 +- drivers/ieee1394/pcilynx.c | 12 ++++++------ drivers/ieee1394/sbp2.c | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) ======================================================================== Date: Sat, 1 Mar 2008 12:36:42 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: refactor probe, remove, suspend, resume Clean up shared code and variable names. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 110 +++++++++++++++--------------------- 1 file changed, 47 insertions(+), 63 deletions(-) ======================================================================== Date: Sat, 1 Mar 2008 12:36:06 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: switch on bus power after resume on PPC PMac The platform feature calls in the suspend method switched off cable power, but the calls in the resume method did not switch it back on. Add the necessary feature call to .resume. Also add the corresponding call to .suspend to make .suspend's behavior explicitly the same on all PMacs. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ======================================================================== Date: Mon, 18 Feb 2008 21:11:07 +0100 (CET) From: Stefan Richter Subject: ieee1394: prevent device binding of raw1394, video1394, dv1394 These drivers don't need to match any unit_directory type device. They just need the id_table for module autoloading per module alias. Not binding any of these drivers allows special-purpose drivers with similar or same IDs to bind to devices. This currently only benefits out-of-tree drivers; on the other hand it is in no way detrimental to in-tree drivers. Signed-off-by: Stefan Richter --- drivers/ieee1394/dv1394.c | 3 +-- drivers/ieee1394/nodemgr.c | 6 +++++- drivers/ieee1394/raw1394.c | 1 - drivers/ieee1394/video1394.c | 3 +-- 4 files changed, 7 insertions(+), 6 deletions(-) ======================================================================== Date: Sun, 17 Feb 2008 14:57:10 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: fix rescan-scsi-bus rescan-scsi-bus used to add SBP-2 targets which weren't there. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 3 +++ 1 file changed, 3 insertions(+) ======================================================================== Date: Sun, 3 Feb 2008 23:07:44 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: add INQUIRY delay workaround Add the same workaround as found in fw-sbp2 for feature parity and compatibility of the workarounds module parameter. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 12 ++++++++++++ drivers/ieee1394/sbp2.h | 2 ++ 2 files changed, 14 insertions(+) ======================================================================== Date: Sun, 16 Dec 2007 20:53:13 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: don't schedule IT tasklets on IR events Bug noted by Pieter Palmers: Isochronous transmit tasklets were scheduled on isochronous receive events, in addition to the proper isochronous receive tasklets. http://marc.info/?l=linux1394-devel&m=119783196222802 Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ======================================================================== Date: Sun, 16 Dec 2007 17:31:26 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: raise default transfer size limit This patch speeds up sbp2 a little bit --- but more importantly, it brings the behavior of sbp2 and fw-sbp2 closer to each other. Like fw-sbp2, sbp2 now does not limit the size of single transfers to 255 sectors anymore, unless told so by a blacklist flag or by module load parameters. Only very old bridge chips have been known to need the 255 sectors limit, and we have got one such chip in our hardwired blacklist. There certainly is a danger that more bridges need that limit; but I prefer to have this issue present in both fw-sbp2 and sbp2 rather than just one of them. An OXUF922 with 400GB 7200RPM disk on an S400 controller is sped up by this patch from 22.9 to 23.5 MB/s according to hdparm. The same effect could be achieved before by setting a higher max_sectors module parameter. On buses which use 1394b beta mode, sbp2 and fw-sbp2 will now achieve virtually the same bandwidth. Fw-sbp2 only remains faster on 1394a buses due to fw-core's gap count optimization. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 26 +++++++++++++++----------- drivers/ieee1394/sbp2.h | 1 - 2 files changed, 15 insertions(+), 12 deletions(-) ======================================================================== Date: Sat, 15 Dec 2007 14:11:41 +0100 (CET) From: Stefan Richter Subject: ieee1394: remove unused code The code has been in "#if 0 - #endif" since Linux 2.6.12. Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 68 ----------------------- 1 file changed, 68 deletions(-) ======================================================================== Date: Mon, 19 Nov 2007 17:48:10 -0800 From: Joe Perches Subject: ieee1394: Add missing "space" Signed-off-by: Joe Perches Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 28 Oct 2007 16:51:32 +0100 From: Adrian Bunk Subject: ieee1394: ieee1394_transactions.c: remove dead code This patch removes dead code spotted by the Intel C Compiler. Signed-off-by: Adrian Bunk Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 2 -- 1 file changed, 2 deletions(-) ======================================================================== Date: Fri, 12 Oct 2007 19:57:23 +0200 From: Matthias Kaehlcke Subject: ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definition drivers/ieee1394/ieee1394_core.c: Define spinlock using DEFINE_SPINLOCK instead of assignment to SPIN_LOCK_UNLOCKED Signed-off-by: Matthias Kaehlcke Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Thu Sep 20 21:17:33 CEST 2007 From: Stefan Richter Subject: ieee1394: ohci1394: fix initialization if built non-modular Initialization of ohci1394 was broken according to one reporter if the driver was statically linked, i.e. not built as loadable module. Dmesg: PCI: Device 0000:02:07.0 not available because of resource collisions ohci1394: Failed to enable OHCI hardware. This was reported for a Toshiba Satellite 5100-503. The cause is commit 8df4083c5291b3647e0381d3c69ab2196f5dd3b7 in Linux 2.6.19-rc1 which only served purposes of early remote debugging via FireWire. This functionality is better provided by the currently out-of-tree driver ohci1394_earlyinit. Reversal of the commit was OK'd by Andi Kleen. Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 2 +- drivers/ieee1394/ohci1394.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) ======================================================================== Date: Sat, 15 Sep 2007 14:50:25 +0200 (CEST) From: Stefan Richter Subject: ieee1394: csr1212: proper refcounting At least since nodemgr got rid of coarse global locking, accesses to struct csr1212_keyval's reference counter should be atomic and coupled with proper barriers. Also, calls to csr1212_keep_keyval(kv) should occur before kv is being used. (We probably should convert refcnt to struct kref, but how to keep csr1212_destroy_keyval's implementation non-recursively then?) Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 57 +++++++++++++++++++------------------ drivers/ieee1394/csr1212.h | 6 ++- drivers/ieee1394/nodemgr.c | 4 +- 3 files changed, 36 insertions(+), 31 deletions(-) ======================================================================== Date: Sat, 15 Sep 2007 14:45:53 +0200 (CEST) From: Stefan Richter Subject: ieee1394: nodemgr: fix leak of struct csr1212_keyval csr1212_keep_keyval(kv) in nodemgr_process_root_directory was unbalanced if ne->vendor_name_kv already exists. This happens for example if eth1394 or raw1394 modify the local config ROM and it is parsed again. As a bonus, the attempt to add the vendor_name_kv sysfs attribute when it already exists is now fixed for good. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) ======================================================================== Date: Wed, 15 Aug 2007 20:05:38 +0530 (IST) From: Satyam Sharma Subject: ieee1394: Fix kthread stopping in nodemgr_host_thread The nodemgr host thread can exit on its own even when kthread_should_stop is not true, on receiving a signal (might never happen in practice, as it ignores signals). But considering kthread_stop() must not be mixed with kthreads that can exit on their own, I think changing the code like this is clearer. This change means the thread can cut its sleep short when receive a signal but looking at the code around, that sounds okay (and again, it might never actually recieve a signal in practice). Signed-off-by: Satyam Sharma Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== Date: Sat, 11 Aug 2007 11:52:08 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: fix unsafe iteration over list of devices sbp2_host_reset and sbp2_handle_status_write are not serialized against sbp2_alloc_device and sbp2_remove_device. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) ======================================================================== Date: Sat, 11 Aug 2007 11:51:16 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: fix sbp2_remove_device for error cases Bug found by Olaf Hering : sbp2util_remove_command_orb_pool requires a valid lu->hi pointer. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ======================================================================== Date: Sun, 29 Jul 2007 00:01:35 +0200 (CEST) From: Stefan Richter Subject: ieee1394: pcilynx: superfluous local variables Signed-off-by: Stefan Richter --- drivers/ieee1394/pcilynx.c | 3 --- 1 file changed, 3 deletions(-) ======================================================================== Date: Sat, 28 Jul 2007 23:45:03 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: fix lock imbalance bad_proto can be reached from points which did not take priv->lock. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) ======================================================================== Date: Sat, 28 Jul 2007 23:44:25 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: superfluous local variable Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 2 -- 1 file changed, 2 deletions(-) ======================================================================== Date: Thu, 26 Jul 2007 17:36:19 +0100 From: Al Viro Subject: [PATCH] raw1394 __user annotation Signed-off-by: Al Viro --- drivers/ieee1394/raw1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: Al Viro Date: Sun, 15 Jul 2007 19:59:51 +0000 (+0100) Subject: ieee1394: forgotten dereference... X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=51ec138c6416e9ed2ba0eae3af5f0ea8a90ae44b ieee1394: forgotten dereference... Going through the string and waiting for _pointer_ to become '\0' is not what the authors meant... Signed-off-by: Al Viro Acked-by: Ben Collins Signed-off-by: Linus Torvalds --- --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Wed, 4 Jul 2007 23:13:53 +0200 (CEST) From: Stefan Richter Subject: ieee1394: raw1394: fix a 32/64-bits compat fix I was told that only i386 aligns 64 bit integers at 4 bytes boundaries while all other architectures (32 bit architectures with 64 bit siblings) align it on 8 bytes boundaries. Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ======================================================================== Date: Sun, 24 Jun 2007 15:31:54 +0200 (CEST) From: Stefan Richter Subject: ieee1394: remove old isochronous ABI Based on patch "the scheduled removal of RAW1394_REQ_ISO_{SEND,LISTEN}" from Adrian Bunk, November 20 2006. This patch also removes the underlying facilities in ohci1394 and disables them in pcilynx. That is, hpsb_host_driver.devctl() and hpsb_host_driver.transmit_packet() are no longer used for iso reception and transmission. Since video1394 and dv1394 only work with ohci1394 and raw1394's rawiso interface has never been implemented in pcilynx, pcilynx is now no longer useful for isochronous applications. raw1394 will still handle the request types but will complete the requests with errors that indicate API version conflicts. Signed-off-by: Stefan Richter [[ patch version without Documentation/ hunks ]] --- drivers/ieee1394/highlevel.c | 45 ---- drivers/ieee1394/highlevel.h | 16 - drivers/ieee1394/hosts.h | 8 drivers/ieee1394/ieee1394_core.c | 8 drivers/ieee1394/ieee1394_core.h | 5 drivers/ieee1394/ieee1394_transactions.c | 30 --- drivers/ieee1394/ieee1394_transactions.h | 2 drivers/ieee1394/ohci1394.c | 221 +---------------------- drivers/ieee1394/ohci1394.h | 14 - drivers/ieee1394/pcilynx.c | 16 + drivers/ieee1394/raw1394-private.h | 5 drivers/ieee1394/raw1394.c | 176 ------------------ drivers/ieee1394/raw1394.h | 4 13 files changed, 32 insertions(+), 518 deletions(-) ======================================================================== Date: Sun, 17 Jun 2007 23:54:52 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: change some module parameters from int to bool This is upwards compatible, except that integer values other than 0 or 1 are no longer accepted. But values like "Y", "N", "no", "nnoooh!" work now. Also, improve a comment on the serialize_io parameter and make the ORB_SET_EXCLUSIVE macro ultra-safe. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 15 +++++++-------- drivers/ieee1394/sbp2.h | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) ======================================================================== Date: Mon, 4 Jun 2007 11:49:19 -0400 From: "Carlos E. Ugarte" Subject: ieee1394: fix to ether1394_tx in ether1394.c This patch fixes a problem that occurs when packets cannot be sent across the ieee1394 bus and we return NETDEV_TX_BUSY in the net driver "hard start xmit" routine ether1394_tx. When we return NETDEV_TX_BUSY the stack will call ether1394_tx again with the same skb. So we need to restore the header to look like it did before we munged it for xmit over ieee1394. [Stefan Richter: changed whitespace, deleted a local variable] Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) ======================================================================== Date: Sun, 27 May 2007 13:17:15 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: offer SAM-conforming target port ID in sysfs With "modprobe sbp2 long_ieee1394_id=y", the format of /sys/bus/scsi/devices/*:*:*:*/ieee1394_id is changed from e.g. 0001041010004beb:0:0 to 0001041010004beb:00042c:0000. The longer format fully conforms to object identifier sizes as per SAM(-2...4) and reflects what the SAM target port identifier is meant to contain: A Discovery ID allegedly specified by ISO/IEC 13213:1994 --- however there is no such thing; the authors of SAM probably meant Directory ID). Especially target nodes with multiple dynamically added targets may use Directory IDs to persistently identify target ports. The new format is independent of implementation details of nodemgr. Thus the same ieee1394_id attribute format can be implemented in the new firewire stack. The ieee1394_id is typically used to create persistently named links in /dev/disk/by-id. Signed-off-by: Stefan Richter --- Requires patch 'ieee1394: fix calculation of sysfs attribute "address"'. drivers/ieee1394/nodemgr.c | 5 +++++ drivers/ieee1394/nodemgr.h | 1 + drivers/ieee1394/sbp2.c | 31 +++++++++++++++++++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 27 May 2007 13:11:47 +0200 (CEST) From: Stefan Richter Subject: ieee1394: fix calculation of sysfs attribute "address" struct csr1212_keyval.offset is relative to 0xffff f000 0000 rather than 0xffff f000 0400. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Mon, 21 May 2007 18:52:06 +0200 (CEST) From: Stefan Richter Subject: ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment Pointed out by Arnd Bergmann: PPC32 aligns this at 64bit, IA32 packs it. A kernel-wide available __compat_u64 which is 4-byte aligned on AMD64 and IA64 would be nicer though. Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ======================================================================== Date: Sat, 19 May 2007 12:29:37 +0200 (CEST) From: Stefan Richter Subject: ieee1394: add comments in struct hpsb_packet to clarify who is supposed to set what Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ======================================================================== Date: Mon, 7 May 2007 04:14:47 +0200 From: Petr Vandrovec Subject: ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel Add compat_ioctl. Although all structures are more or less same, raw1394_iso_packets got pointer inside, and raw1394_cycle_timer got unwanted padding in the middle. I did not add any translation for ioctls passing array of integers around as integers seem to have same size (32 bits) on all architectures supported by Linux. Signed-off-by: Petr Vandrovec Acked-by: Dan Dennedy Signed-off-by: Stefan Richter (split into 3 patches) --- drivers/ieee1394/raw1394.c | 97 ++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) ======================================================================== Date: Mon, 7 May 2007 04:14:47 +0200 From: Petr Vandrovec Subject: ieee1394: raw1394: Fix write() for 32bit userland on 64bit kernel * write(fd, buf, 52) from 32bit app was returning 56. Most of callers did not care, but some (arm registration) did, and anyway it looks bad if request for writing 52 bytes returns 56. And returning sizeof anything in 'int' is not good as well. So all functions now return '0' instead of sizeof(struct raw1394_request) on success, and write() itself provides correct return value (it just returns value it was asked to write on success as raw1394 does not do any partial writes at all). * Related to this was problem that write() could have returned 0 when kernel state would become corrupted and moved to different state than opened/initialized/connected. Now it returns -EBADFD which seemed appropriate. Signed-off-by: Petr Vandrovec Acked-by: Dan Dennedy Signed-off-by: Stefan Richter (split into 3 patches) --- drivers/ieee1394/raw1394.c | 65 +++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 31 deletions(-) ======================================================================== Date: Mon, 7 May 2007 04:14:47 +0200 From: Petr Vandrovec Subject: ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel read() always failed with -EFAULT. This was happening due to raw1394_compat_read copying data to wrong location - access_ok always failed as 'r' is kernel address, not user. Whole function just tried to copy data from 'r' to 'r', which is not good. Signed-off-by: Petr Vandrovec Acked-by: Dan Dennedy Signed-off-by: Stefan Richter (split into 3 patches) --- drivers/ieee1394/raw1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 13 May 2007 22:14:44 -0700 From: Petr Vandrovec Subject: ieee1394: raw1394: Fix async send While playing with libiec61883 I've noticed that async_send is broken because it was doing copy_from_user(...., packet->data_size) before packet->data_size was set to any useful value. It got broken when packet->allocated_data_size got introduced, as hpsb_alloc_packet does not set packet->data_size anymore. (Regression in 2.6.22-rc1) Signed-off-by: Petr Vandrovec Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ======================================================================== From: Martin Schwidefsky Date: Thu, 10 May 2007 13:45:56 +0000 (+0200) Subject: [S390] Kconfig: refine depends statements. X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=eeca7a36a86db8bfc1945dd7f6f0c22a6b66b31d [[ only ieee1394 part of the patch included here ]] [S390] Kconfig: refine depends statements. Refine some depends statements to limit their visibility to the environments that are actually supported. Signed-off-by: Martin Schwidefsky --- drivers/ieee1394/Kconfig | 1 + 1 file changed, 1 insertion(+) [[ only ieee1394 part of the patch included here ]] ======================================================================== From: Michael Opdenacker Date: Wed, 9 May 2007 06:57:56 +0000 (+0200) Subject: Fix occurrences of "the the " X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=59c51591a0ac7568824f541f57de967e88adaa07 [[ only ieee1394 part of the patch included here ]] Fix occurrences of "the the " Signed-off-by: Michael Opdenacker Signed-off-by: Adrian Bunk --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [[ only ieee1394 part of the patch included here ]] ======================================================================== From: Randy Dunlap Date: Tue, 8 May 2007 07:28:08 +0000 (-0700) Subject: header cleaning: don't include smp_lock.h when not used X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=e63340ae6b6205fef26b40a75673d1c9c0c8bb90 [[ only ieee1394 part of the patch included here ]] header cleaning: don't include smp_lock.h when not used Remove includes of where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ieee1394/dv1394.c | 1 - drivers/ieee1394/raw1394.c | 1 - drivers/ieee1394/video1394.c | 1 - 3 files changed, 3 deletions(-) [[ only ieee1394 part of the patch included here ]] ======================================================================== From: Jean Delvare Date: Tue, 6 Mar 2007 10:45:12 +0000 (-0800) Subject: PCI: Cleanup the includes of X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6473d160b4aba8023bcf38519a5989694dfd51a7 [[ only ieee1394 part of the patch included here ]] PCI: Cleanup the includes of I noticed that many source files include while they do not appear to need it. Here is an attempt to clean it all up. In order to find all possibly affected files, I searched for all files including but without any other occurence of "pci" or "PCI". I removed the include statement from all of these, then I compiled an allmodconfig kernel on both i386 and x86_64 and fixed the false positives manually. My tests covered 66% of the affected files, so there could be false positives remaining. Untested files are: arch/alpha/kernel/err_common.c arch/alpha/kernel/err_ev6.c arch/alpha/kernel/err_ev7.c arch/ia64/sn/kernel/huberror.c arch/ia64/sn/kernel/xpnet.c arch/m68knommu/kernel/dma.c arch/mips/lib/iomap.c arch/powerpc/platforms/pseries/ras.c arch/ppc/8260_io/enet.c arch/ppc/8260_io/fcc_enet.c arch/ppc/8xx_io/enet.c arch/ppc/syslib/ppc4xx_sgdma.c arch/sh64/mach-cayman/iomap.c arch/xtensa/kernel/xtensa_ksyms.c arch/xtensa/platform-iss/setup.c drivers/i2c/busses/i2c-at91.c drivers/i2c/busses/i2c-mpc.c drivers/media/video/saa711x.c drivers/misc/hdpuftrs/hdpu_cpustate.c drivers/misc/hdpuftrs/hdpu_nexus.c drivers/net/au1000_eth.c drivers/net/fec_8xx/fec_main.c drivers/net/fec_8xx/fec_mii.c drivers/net/fs_enet/fs_enet-main.c drivers/net/fs_enet/mac-fcc.c drivers/net/fs_enet/mac-fec.c drivers/net/fs_enet/mac-scc.c drivers/net/fs_enet/mii-bitbang.c drivers/net/fs_enet/mii-fec.c drivers/net/ibm_emac/ibm_emac_core.c drivers/net/lasi_82596.c drivers/parisc/hppb.c drivers/sbus/sbus.c drivers/video/g364fb.c drivers/video/platinumfb.c drivers/video/stifb.c drivers/video/valkyriefb.c include/asm-arm/arch-ixp4xx/dma.h sound/oss/au1550_ac97.c I would welcome test reports for these files. I am fine with removing the untested files from the patch if the general opinion is that these changes aren't safe. The tested part would still be nice to have. Note that this patch depends on another header fixup patch I submitted to LKML yesterday: [PATCH] scatterlist.h needs types.h http://lkml.org/lkml/2007/3/01/141 Signed-off-by: Jean Delvare Cc: Badari Pulavarty Signed-off-by: Greg Kroah-Hartman --- drivers/ieee1394/hosts.c | 1 - 1 file changed, 1 deletion(-) [[ only ieee1394 part of the patch included here ]] ======================================================================== Date: Sat, 5 May 2007 17:25:51 +0200 (CEST) From: Stefan Richter Subject: [PATCH 2/2] ieee1394: eth1394: handle tlabel exhaustion When eth1394 was unable to acquire a transaction label, it just dropped outgoing packets without attempt to resend them later. The transmit queue is now halted if no tlabel is available to ->hard_start_xmit(). A workqueue job is then scheduled to catch the moment when ieee1394 recycled the next lot of tlabels. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=8402 Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 77 ++++++++++++++++++++++++++++--------- drivers/ieee1394/eth1394.h | 3 + 2 files changed, 63 insertions(+), 17 deletions(-) ======================================================================== Date: Sat, 5 May 2007 17:19:09 +0200 (CEST) From: Stefan Richter Subject: [PATCH 1/2] ieee1394: eth1394: remove bogus netif_wake_queue When we are within hard_start_xmit, the queue is already awake. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 4 ---- 1 file changed, 4 deletions(-) ======================================================================== Date: Sat, 5 May 2007 17:18:12 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: include workqueue.h Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Fri, 27 Apr 2007 01:47:32 +0200 From: Adrian Bunk Subject: ieee1394: unexport highlevel_host_reset highlevel_host_reset no longer has any modular users. Signed-off-by: Adrian Bunk Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 1 - 1 file changed, 1 deletion(-) ======================================================================== Subject: ieee1394: iso.c needs sched.h Date: Thu, 26 Apr 2007 00:16:04 -0700 From: Andrew Morton 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 Signed-off-by: Stefan Richter (brought into alphabetic order) --- drivers/ieee1394/iso.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Tue, 24 Apr 2007 23:44:57 +0100 Subject: ieee1394: ohci1394: Fix mistake in printk message. From: Simon Arlott Fix the "attempting to setting" message in ohci1394. Signed-off-by: Simon Arlott Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Mon, 23 Apr 2007 11:50:56 -0700 Subject: ieee1394: sbp2: include fixes From: Andrew Morton 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 Signed-off-by: Stefan Richter (brought into alphabetic order) --- drivers/ieee1394/sbp2.c | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== Date: Mon, 23 Apr 2007 21:28:47 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) ======================================================================== Date: Mon, 23 Apr 2007 21:27:13 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/ieee1394_transactions.c | 7 +++++++ 1 file changed, 7 insertions(+) ======================================================================== Date: Sat, 21 Apr 2007 21:02:52 +0200 (CEST) From: Stefan Richter Subject: ieee1394: remove garbage from Kconfig Signed-off-by: Stefan Richter --- drivers/ieee1394/Kconfig | 2 -- 1 file changed, 2 deletions(-) ======================================================================== Date: Sat, 21 Apr 2007 20:54:37 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/Kconfig | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) ======================================================================== Date: Sat, 21 Apr 2007 18:36:26 +0900 From: Akinobu Mita Subject: 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 Signed-off-by: Stefan Richter (whitespace) --- drivers/ieee1394/eth1394.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) ======================================================================== Date: Fri, 20 Apr 2007 13:59:54 +0200 Subject: ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register From: Bernhard Kauer 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 Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ======================================================================== Date: Thu, 12 Apr 2007 22:21:55 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/ohci1394.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Wed, 11 Apr 2007 23:24:34 +0530 From: Milind Arun Choudhary Subject: ieee1394: SPIN_LOCK_UNLOCKED cleanup SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK instead Signed-off-by: Milind Arun Choudhary Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Tue, 10 Apr 2007 00:01:15 +0200 (CEST) From: Stefan Richter Subject: ieee1394: some more includes Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 3 +++ drivers/ieee1394/nodemgr.c | 1 + 2 files changed, 4 insertions(+) ======================================================================== Date: Mon, 9 Apr 2007 21:03:15 +0200 Subject: ieee1394: ieee1394_transactions needs sched.h From: "Torsten Kaiser" 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 Signed-off-by: Stefan Richter (added comment) --- drivers/ieee1394/ieee1394_transactions.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Tue, 3 Apr 2007 13:00:47 -0700 From: Randy Dunlap Subject: 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 Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Mon, 2 Apr 2007 02:24:27 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:23:19 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: hard_start_xmit is called in atomic context Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:22:21 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: some conditions are unlikely Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:21:46 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:20:37 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: don't use alloc_etherdev Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:19:48 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:19:02 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: CONFIG_INET is always defined because CONFIG_IEEE1394_ETH1394 depends on it. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) ======================================================================== Date: Tue, 3 Apr 2007 23:55:40 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:16:40 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:15:53 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: shorter error messages Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 40 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 24 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:15:21 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: correct a memset argument The old argument calculated the correct value in a wrong way. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Mon, 2 Apr 2007 02:14:45 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 48 ++++++++++++------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:13:51 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: .probe and .update may sleep Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:12:32 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 430 +++++++++++++++++-------------------- drivers/ieee1394/eth1394.h | 24 -- 2 files changed, 208 insertions(+), 246 deletions(-) ======================================================================== Date: Sun, 1 Apr 2007 10:06:33 +0200 From: Jean Delvare Subject: 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 Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 71 ++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 40 deletions(-) ======================================================================== Date: Tue, 27 Mar 2007 01:36:50 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/Kconfig | 29 +++--------- drivers/ieee1394/config_roms.c | 76 ++++++--------------------------- drivers/ieee1394/config_roms.h | 7 ++- drivers/ieee1394/eth1394.c | 7 ++- drivers/ieee1394/hosts.c | 3 - 5 files changed, 36 insertions(+), 86 deletions(-) ======================================================================== Date: Thu, 22 Mar 2007 00:40:06 +0100 (CET) From: Stefan Richter Subject: 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 [[ patch version without Documentation/ hunks ]] --- drivers/ieee1394/Kconfig | 6 +++--- drivers/ieee1394/dv1394.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) ======================================================================== Date: Sun, 18 Mar 2007 12:23:11 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/eth1394.c | 74 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 38 deletions(-) ======================================================================== Date: Sun, 18 Mar 2007 00:55:15 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/ieee1394_core.c | 91 +++++++++++++------------------ 1 file changed, 41 insertions(+), 50 deletions(-) ======================================================================== Date: Sun, 25 Mar 2007 22:22:40 +0200 (CEST) From: Stefan Richter Subject: 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 --- drivers/ieee1394/Kconfig | 1 drivers/ieee1394/hosts.c | 2 drivers/ieee1394/hosts.h | 4 drivers/ieee1394/ieee1394_core.c | 291 ++++++++++++++++--------------- drivers/ieee1394/ieee1394_core.h | 27 -- drivers/ieee1394/raw1394.c | 3 6 files changed, 166 insertions(+), 162 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:29:20 +0100 (CET) From: Stefan Richter Subject: [PATCH 5/5] 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 --- drivers/ieee1394/csr1212.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:28:36 +0100 (CET) From: Stefan Richter Subject: [PATCH 4/5] 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 --- drivers/ieee1394/csr1212.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:27:46 +0100 (CET) From: Stefan Richter Subject: [PATCH 3/5] ieee1394: csr1212: warn on unreachable code We want bugs to show themselves. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:27:18 +0100 (CET) From: Stefan Richter Subject: [PATCH 2/5] 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 --- drivers/ieee1394/csr1212.c | 123 +++++++++++++------------------------ 1 file changed, 46 insertions(+), 77 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:26:38 +0100 (CET) From: Stefan Richter Subject: [PATCH 1/5] ieee1394: csr1212: coding style Whitespace, line breaks, braces... Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 215 ++++++++++++++++++++----------------- drivers/ieee1394/csr1212.h | 31 ++--- 2 files changed, 133 insertions(+), 113 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:51:24 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/csr1212.c | 4 +++- drivers/ieee1394/csr1212.h | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:20:53 +0100 (CET) From: Stefan Richter Subject: 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 --- Update: Make csr1212_read_keyval() static. drivers/ieee1394/csr1212.c | 28 ++++++++++++++++++++++++---- drivers/ieee1394/csr1212.h | 28 +++++----------------------- drivers/ieee1394/ieee1394_core.c | 9 ++++----- 3 files changed, 33 insertions(+), 32 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:50:13 +0100 (CET) From: Stefan Richter Subject: ieee1394: stricter error checks in csr1212 return -EINVAL becomes BUG_ON in checks of function call parameters. Signed-off-by: Stefan Richter --- drivers/ieee1394/config_roms.c | 14 +++--- drivers/ieee1394/csr1212.c | 67 +++++++++++---------------------- drivers/ieee1394/csr1212.h | 4 - 3 files changed, 34 insertions(+), 51 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:49:34 +0100 (CET) From: Stefan Richter Subject: ieee1394: csr1212: rename some types Use u8, u32 etc. instead of u_int8_t, csr1212_quad_t etc. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 93 +++++++++++++++++-------------------- drivers/ieee1394/csr1212.h | 62 +++++++++++------------- 2 files changed, 74 insertions(+), 81 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:49:05 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/csr1212.c | 159 ++++++++++------------- drivers/ieee1394/csr1212.h | 88 +----------- drivers/ieee1394/ieee1394_transactions.c | 1 drivers/ieee1394/nodemgr.c | 2 4 files changed, 83 insertions(+), 167 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:47:34 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/csr1212.c | 309 ++++++++++--------------------------- drivers/ieee1394/csr1212.h | 262 +------------------------------ 2 files changed, 95 insertions(+), 476 deletions(-) ======================================================================== Date: Mon, 5 Mar 2007 03:07:38 +0100 (CET) From: Stefan Richter Subject: ieee1394: small header cleanup Signed-off-by: Stefan Richter --- --- drivers/ieee1394/config_roms.h | 3 +-- drivers/ieee1394/eth1394.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) ======================================================================== Date: Mon, 5 Mar 2007 03:06:23 +0100 (CET) From: Stefan Richter Subject: ieee1394: move some comments from declaration to definition Signed-off-by: Stefan Richter --- drivers/ieee1394/config_roms.c | 7 + drivers/ieee1394/config_roms.h | 10 -- drivers/ieee1394/dma.c | 24 ++++++ drivers/ieee1394/dma.h | 22 +---- drivers/ieee1394/highlevel.c | 89 ++++++++++++++++++++++- drivers/ieee1394/highlevel.h | 46 ----------- drivers/ieee1394/hosts.c | 8 ++ drivers/ieee1394/hosts.h | 6 - drivers/ieee1394/ieee1394_core.c | 77 +++++++++++++++++-- drivers/ieee1394/ieee1394_core.h | 73 +----------------- drivers/ieee1394/ieee1394_transactions.c | 29 +++++++ drivers/ieee1394/ieee1394_transactions.h | 20 ----- drivers/ieee1394/iso.c | 84 +++++++++++++++++++++ drivers/ieee1394/iso.h | 35 --------- drivers/ieee1394/nodemgr.c | 32 ++++++-- drivers/ieee1394/nodemgr.h | 20 ----- drivers/ieee1394/ohci1394.c | 1 drivers/ieee1394/ohci1394.h | 4 - 18 files changed, 348 insertions(+), 239 deletions(-) ======================================================================== Date: Mon, 5 Mar 2007 03:05:32 +0100 (CET) From: Stefan Richter Subject: ieee1394: remove declarations of nonexisting functions Signed-off-by: Stefan Richter --- drivers/ieee1394/highlevel.h | 9 --------- drivers/ieee1394/nodemgr.c | 2 +- drivers/ieee1394/nodemgr.h | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) ======================================================================== From: Tobias Klauser Date: Sat, 17 Feb 2007 19:11:19 +0000 (+0100) Subject: Storage class should be before const qualifier X-Git-Url: http://git2.kernel.org/git/?p=linux%2Fkernel%2Fgit%2Fbunk%2Ftrivial.git;a=commitdiff_plain;h=c5a69d57eb48e36f84c0737b5b24ec277d7dbfba 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 Signed-off-by: Adrian Bunk ### Stefan Richter: omitted all but the ieee1394 parts ### --- --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: Tim Schmielau Date: Wed, 14 Feb 2007 08:33:14 +0000 (-0800) Subject: [PATCH] remove many unneeded #includes of sched.h X-Git-Url: http://git2.kernel.org/git/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cd354f1ae75e6466a7e31b727faede57a1f89ca5 [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 Acked-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ### Stefan Richter: omitted all but the ieee1394 parts ### --- --- drivers/ieee1394/eth1394.c | 1 - drivers/ieee1394/iso.c | 1 - drivers/ieee1394/ohci1394.c | 1 - 3 files changed, 3 deletions(-) ======================================================================== Date: Thu, 4 Jan 2007 17:48:09 +0100 From: Jean Delvare Subject: [PATCH] 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. The remaining i2c bus drivers (one dozen) will need to be fixed one by one, most likely by turning them info platform drivers. Signed-off-by: Jean Delvare ### Stefan Richter: omitted all but the ieee1394 parts ### --- --- drivers/ieee1394/pcilynx.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Sat, 10 Feb 2007 23:57:57 +0100 (CET) From: Stefan Richter Subject: ieee1394: eth1394: clean up host removal ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/eth1394.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) ======================================================================== Date: Sat, 10 Feb 2007 23:56:38 +0100 (CET) From: Stefan Richter Subject: 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 --- --- drivers/ieee1394/eth1394.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ======================================================================== Date: Sat, 10 Feb 2007 22:06:18 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/nodemgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== Date: Tue, 6 Feb 2007 02:34:45 +0100 (CET) From: Stefan Richter Subject: ieee1394: fix host device registering when nodemgr disabled Since my commit 8252bbb1363b7fe963a3eb6f8a36da619a6f5a65 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. http://bugzilla.kernel.org/show_bug.cgi?id=7942 Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) ======================================================================== Date: Sun, 4 Feb 2007 20:57:38 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/sbp2.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) ======================================================================== Date: Sun, 4 Feb 2007 20:54:57 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/sbp2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ======================================================================== Date: Sun, 4 Feb 2007 13:04:32 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/sbp2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== Date: Sat, 3 Feb 2007 16:48:51 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/raw1394.c | 48 ++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 19 deletions(-) ======================================================================== Date: Sat, 3 Feb 2007 17:44:39 +0100 (CET) From: Stefan Richter Subject: ieee1394: cycle timer read extension for raw1394 From: Pieter Palmers 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 Acked-by: Pieter Palmers Acked-by: Dan Dennedy --- drivers/ieee1394/ieee1394-ioctl.h | 2 + drivers/ieee1394/ieee1394_core.c | 43 ++++++++++++++++++++++++++++++ drivers/ieee1394/ieee1394_core.h | 3 ++ drivers/ieee1394/raw1394.c | 20 +++++++++++++ drivers/ieee1394/raw1394.h | 10 ++++++ 5 files changed, 78 insertions(+) ======================================================================== Date: Sat, 27 Jan 2007 13:54:23 +0100 (CET) From: Stefan Richter Subject: ieee1394: dv1394: tidy up card removal small coding style touch-up and terser coding Signed-off-by: Stefan Richter --- drivers/ieee1394/dv1394.c | 39 ++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) ======================================================================== Date: Thu, 25 Jan 2007 22:35:47 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/sbp2.c | 2 -- 1 file changed, 2 deletions(-) ======================================================================== Date: Sun, 7 Jan 2007 21:51:48 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/hosts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 7 Jan 2007 21:49:27 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/hosts.c | 13 ++++++++----- drivers/ieee1394/hosts.h | 3 ++- drivers/ieee1394/ieee1394_core.c | 1 + drivers/ieee1394/ohci1394.c | 4 +--- 4 files changed, 12 insertions(+), 9 deletions(-) ======================================================================== Date: Sat, 6 Jan 2007 15:07:05 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/ohci1394.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) ======================================================================== Date: Wed, 3 Jan 2007 19:32:13 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/csr1212.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ======================================================================== Date: Tue, 2 Jan 2007 22:56:53 +0100 From: Adrian Bunk Subject: the scheduled IEEE1394_OUI_DB removal This patch contains the scheduled IEEE1394_OUI_DB removal. Signed-off-by: Adrian Bunk Update: Also remove drivers/ieee1394/.gitignore. Remove now unused struct members in drivers/ieee1394/nodemgr.h. Signed-off-by: Stefan Richter [[ patch version without feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/.gitignore | 1 drivers/ieee1394/Kconfig | 14 drivers/ieee1394/Makefile | 10 drivers/ieee1394/nodemgr.c | 32 drivers/ieee1394/nodemgr.h | 3 drivers/ieee1394/oui.db | 7048 ------------------------------------ drivers/ieee1394/oui2c.sh | 22 7 files changed, 7130 deletions(-) ======================================================================== Date: Tue, 2 Jan 2007 22:56:57 +0100 From: Adrian Bunk Subject: the scheduled IEEE1394_EXPORT_FULL_API removal This patch contains the scheduled IEEE1394_EXPORT_FULL_API removal. Signed-off-by: Adrian Bunk Update: Pull proper portion of feature-removal-schedule.txt. Signed-off-by: Stefan Richter [[ patch version without feature-removal-schedule.txt hunk ]] --- --- drivers/ieee1394/Kconfig | 7 ------- drivers/ieee1394/ieee1394_core.c | 22 ---------------------- 2 files changed, 29 deletions(-) ======================================================================== Date: Sun, 17 Dec 2006 14:34:09 -0500 From: Kristian =?iso-8859-1?Q?H=F8gsberg?= Subject: [PATCH] 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. --- drivers/ieee1394/ohci1394.c | 4 +--- include/linux/pci_ids.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) ======================================================================== Date: Sun, 14 Jan 2007 19:40:41 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove bogus "emulated" host flag There is no emulation going on here. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/sbp2.c | 1 - 1 file changed, 1 deletion(-) ======================================================================== Date: Wed, 10 Jan 2007 20:17:15 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: fix probing of some DVD-ROM/RWs Since commit 98e238cd42be6c0852da519303cf0182690f8d9f 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 --- drivers/ieee1394/sbp2.c | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== Date: Fri, 29 Dec 2006 23:47:04 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/sbp2.c | 73 +++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 33 deletions(-) ======================================================================== Date: Sat Dec 30 15:37:09 CET 2006 From: Stefan Richter Subject: 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 --- Idea stolen from Kristian Høgsbergs fw-sbp2. drivers/ieee1394/sbp2.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) ======================================================================== Date: Thu, 28 Dec 2006 19:57:49 +0100 (CET) From: Stefan Richter Subject: 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. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/sbp2.c | 10 ---------- 1 file changed, 10 deletions(-) ======================================================================== Date: Fri, 8 Dec 2006 00:53:24 +0100 From: Andrea Guzzo Subject: 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 Signed-off-by: Stefan Richter --- --- drivers/ieee1394/csr1212.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ======================================================================== Date: Sat, 2 Dec 2006 22:23:34 +0100 (CET) From: Stefan Richter Subject: ieee1394: nodemgr: remove a kcalloc Was I sleepwalking when I wrote this? Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 66 +++++++++++-------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) ======================================================================== Date: Fri, 24 Nov 2006 20:19:09 +0100 (CET) From: Stefan Richter Subject: 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 [[ patch version without feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/ieee1394_core.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Thu, 23 Nov 2006 13:59:48 -0500 From: Ben Collins Subject: 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 --- drivers/ieee1394/dv1394.c | 6 +----- drivers/ieee1394/eth1394.c | 4 +--- drivers/ieee1394/ieee1394_core.c | 3 +-- drivers/ieee1394/nodemgr.c | 13 ++++++++++--- drivers/ieee1394/nodemgr.h | 7 ++++++- drivers/ieee1394/raw1394.c | 6 +----- drivers/ieee1394/sbp2.c | 4 +--- drivers/ieee1394/video1394.c | 6 +----- 8 files changed, 22 insertions(+), 27 deletions(-) ======================================================================== Date: Wed, 22 Nov 2006 21:44:34 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: convert from PCI DMA to generic DMA API conversion without change in functionality Signed-off-by: Stefan Richter --- drivers/ieee1394/Kconfig | 2 drivers/ieee1394/sbp2.c | 126 ++++++++++++++++++--------------------- drivers/ieee1394/sbp2.h | 2 3 files changed, 62 insertions(+), 68 deletions(-) ======================================================================== Date: Wed, 22 Nov 2006 21:28:19 +0100 (CET) From: Stefan Richter Subject: ieee1394: nodemgr: spaces to tabs whitespace pedantry Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 108 ++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 54 deletions(-) ======================================================================== Date: Wed, 22 Nov 2006 21:09:42 +0100 From: Stefan Richter Subject: 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 bf74ad5bc41727d5f2f1c6bedb2c1fac394de731, "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 --- drivers/ieee1394/nodemgr.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) ======================================================================== Date: Sat, 18 Nov 2006 23:16:11 +0100 (CET) From: Stefan Richter Subject: ieee1394: nodemgr: remove duplicate assignment Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Wed, 15 Nov 2006 19:14:15 +0100 From: Luca Tettamanti Subject: sbp2: make 1bit bitfield unsigned A signed single-bit bitfield doesn't make much sense. Make it unsigned. Signed-off-by: Luca Tettamanti Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 19 Nov 2006 23:04:31 +0100 (CET) From: Stefan Richter Subject: 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 [[ patch version without feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 19 Nov 2006 23:03:09 +0100 (CET) From: Stefan Richter Subject: 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 [[ patch version without feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/Kconfig | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) ======================================================================== Date: Mon, 20 Nov 2006 00:07:26 +0100 (CET) From: Stefan Richter Subject: ieee1394: dv1394: schedule for feature removal Signed-off-by: Stefan Richter [[ patch version without feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/Kconfig | 13 ++++--------- drivers/ieee1394/dv1394.c | 4 ++++ 2 files changed, 8 insertions(+), 9 deletions(-) ======================================================================== Date: Mon, 20 Nov 2006 00:05:05 +0100 (CET) From: Stefan Richter Subject: 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 [[ patch version without feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/raw1394.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ======================================================================== Date: Sat, 11 Nov 2006 00:26:24 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: call PMac code in shutdown only for proper machines There has been an if(...) missing, for ages. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sat, 11 Nov 2006 00:23:50 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: reformat PPC_PMAC platform code Adjust whitespace and line lengths Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) ======================================================================== Date: Sat, 11 Nov 2006 00:22:35 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/ohci1394.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) ======================================================================== Date: Sat, 4 Nov 2006 09:55:33 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: wrap two functions into one Move the body of a function into its only caller. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: update comment on things to do Some people actually look at those comments. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: use list_move_tail() It's OK to reorder list_del() and sbp2util_free_command_dma() here. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: 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 --- drivers/ieee1394/sbp2.c | 1168 +++++++++++++++++++--------------------- drivers/ieee1394/sbp2.h | 15 drivers/ieee1394/sbp2.c | 1168 +++++++++++++++++++--------------------- drivers/ieee1394/sbp2.h | 15 2 files changed, 580 insertions(+), 603 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove unused struct members Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 23 ++++------------------- drivers/ieee1394/sbp2.h | 6 ------ 2 files changed, 4 insertions(+), 25 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: proper unit in module parameter description It's 2^20 bit/s, not 0.001 bit. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: clean up sbp2_ namespace Prepend sbp2*_ to anything globally defined in sbp2.c except for some macros. Strip sbp2_ from names of struct members. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 237 +++++++++++++++++++--------------------- drivers/ieee1394/sbp2.h | 28 ++-- 2 files changed, 132 insertions(+), 133 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: some conditions in queue_command are unlikely Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove superfluous comments And update and reformat remaining comments. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 384 +++++++--------------------------------- drivers/ieee1394/sbp2.h | 80 +++----- 2 files changed, 109 insertions(+), 355 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: coding style of some macros Adjust parentheses, indentation, line lengths. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.h | 157 ++++++++++++++++++++-------------------- 1 file changed, 79 insertions(+), 78 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove debug macros No need to keep them in released sources. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 300 ++-------------------------------------- 1 file changed, 20 insertions(+), 280 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: consolidate log levels Replace some calls to SBP2_ERR and SBP2_WARN by SBP2_INFO. Remove logging macros SBP2_NOTICE and SBP2_WARN. Remove direct usage of HPSB_ logging macros. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove duplicate code The same case is handled further below in sbp2scsi_complete_command. Note, the second version behaves slightly different but looks preferable. It's an extremely unlikely case by the way. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 11 ----------- 1 file changed, 11 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove dead code This has been within #if 0 for a long time and is wrong anyway. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 15 --------------- 1 file changed, 15 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: clean up function declarations Remove unnecessary function prototypes. Remove variable names from function prototypes. Move declarations from sbp2.h to sbp2.c. Move definitions of driver templates together near the top of sbp2.c. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 145 +++++++++++++++++++++++----------------- drivers/ieee1394/sbp2.h | 45 ------------ 2 files changed, 86 insertions(+), 104 deletions(-) ======================================================================== Date: Thu, 2 Nov 2006 21:16:08 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove irritating log message The queue depth can be read from /sys/bus/scsi/devices/*/queue_depth, so don't log it. And the hint about speed improvements is misleading, at least under current kernels. If serialization is switched off, read performance is typically increased by less than 10%. (I did not test write performance recently.) On the other hand, serialize_io=0 is not yet safe due to some implementation issues that are not trivial to fix. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 2 -- 1 file changed, 2 deletions(-) ======================================================================== ohci1394: shortcut irq printing To print irq number no need to transform to string using %d, then print using %s. Just use %d. Signed-off-by: Alexey Dobriyan Patch adapted for Linux 2.6.18. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/ohci1394.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ======================================================================== Date: Sun, 29 Oct 2006 19:58:25 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: proper log messages in suspend and resume - correct thinko in one of my last commits: cannot use PRINT macro with ohci == NULL - add log messages on ohci == NULL and on pci_enable_device != 0 - update log macros from patch "revert fail on error in suspend" to use PRINT and DBGMSG where possible Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) ======================================================================== Date: Sun, 29 Oct 2006 19:52:49 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: revert fail on error in suspend Some errors during preparation for suspended state can be skipped with a warning instead of a failure of the whole suspend transition, notably an error in pci_set_power_state. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ======================================================================== Date: Tue, 24 Oct 2006 11:19:11 -0700 From: Randy Dunlap Subject: ieee1394: only build OUI database files if config enabled Only build IEEE1394 OUI database files if the config option is enabled. Signed-off-by: Randy Dunlap Signed-off-by: Stefan Richter --- drivers/ieee1394/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ======================================================================== Date: Mon, 23 Oct 2006 21:44:36 -0700 From: Randy Dunlap Subject: ieee1394: fix printk format warning Fix printk format warning: drivers/ieee1394/nodemgr.c:364: warning: long long unsigned int format, u64 arg (arg 3) Signed-off-by: Randy Dunlap Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 22 Oct 2006 16:16:27 +0200 (CEST) From: Stefan Richter Subject: ieee1394: nodemgr: revise semaphore protection of driver core data - The list "struct class.children" is supposed to be protected by class.sem, not by class.subsys.rwsem. - nodemgr_remove_uds() iterated over nodemgr_ud_class.children without proper protection. This was never observed as a bug since the code is usually only accessed by knodemgrd. All knodemgrds are currently globally serialized. But userspace can trigger this code too by writing to /sys/bus/ieee1394/destroy_node. - Clean up access to the FireWire bus type's subsys.rwsem: Access it uniformly via ieee1394_bus_type. Shrink rwsem protected regions where possible. Expand them where necessary. The latter wasn't a problem so far because knodemgr is globally serialized. This should harden the interaction of ieee1394 with sysfs and lay ground for deserialized operation of multiple knodemgrds and for implementation of subthreads for parallelized scanning and probing. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 142 +++++++++++++++++++++++-------------- 1 file changed, 92 insertions(+), 50 deletions(-) ======================================================================== Date: Sat, 21 Oct 2006 01:23:56 +0200 (CEST) From: Stefan Richter Subject: ieee1394: nodemgr: reflect which return values are errors Give better names to local variables. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 64 +++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 34 deletions(-) ======================================================================== Date: Fri, 20 Oct 2006 21:01:58 +0200 (CEST) From: Stefan Richter Subject: dv1394: remove BKL contention Purges the one remaining call to lock_kernel() from the 1394 subsystem. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/dv1394.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) ======================================================================== Date: Fri, 20 Oct 2006 14:56:01 +0100 (BST) From: Daniel Drake Subject: video1394: remove BKL contention video1394 does not need to take the BKL. The data structures shared between file_operations and interrupts are already protected through context-specific spinlocks. The only other danger is video1394_release() being called during another operation, however this cannot happen because release is only ever invoked when the last thread has closed the fd. Signed-off-by: Daniel Drake Signed-off-by: Stefan Richter --- --- drivers/ieee1394/video1394.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) ======================================================================== Date: Wed, 18 Oct 2006 21:37:14 +0100 (BST) From: Daniel Drake Subject: video1394: small optimizations to frame retrieval codepath Add some GCC branch prediction optimizations to unlikely error/safety conditions in the ioctl handling code commonly called during an application's capture loop. Signed-off-by: Daniel Drake Signed-off-by: Stefan Richter --- --- drivers/ieee1394/video1394.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) ======================================================================== Date: Tue, 10 Oct 2006 21:12:39 +0200 (CEST) From: Stefan Richter Subject: ieee1394: coding style in hosts.c Some 80-columns pedantry, and touch up of a // comment. Signed-off-by: Stefan Richter --- drivers/ieee1394/hosts.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) ======================================================================== Date: Tue, 10 Oct 2006 21:11:43 +0200 (CEST) From: Stefan Richter Subject: ieee1394: lock smaller region by host_num_alloc mutex We need the mutex only around the iteration over existing hosts. Signed-off-by: Stefan Richter --- drivers/ieee1394/hosts.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) ======================================================================== Date: Sun, 8 Oct 2006 11:45:13 +0200 (CEST) From: Stefan Richter Subject: ieee1394: usecs_to_jiffies takes unsigned int argument Signed-off-by: Stefan Richter --- The constants could be written as 1000000U etc. but I followed the style used in all other unsigned int expressions in csr.c. --- drivers/ieee1394/csr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) ======================================================================== Date: Sun, 24 Sep 2006 11:01:00 +0200 (CEST) From: Stefan Richter Subject: ieee1394: ohci1394: suspend/resume cosmetics Reorder the definitions of ohci1394_pci_suspend and _resume. Remove redundant comments. Beautify return statements. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 126 +++++++++++++----------------------- 1 file changed, 48 insertions(+), 78 deletions(-) ======================================================================== Date: Wed, 6 Sep 2006 14:58:30 +0200 (CEST) From: Bernhard Kaindl Subject: Re: ohci1394: steps to implement suspend/resume I did a quick shot on what I described and the appended patch does the first thing needed for working suspend/resume in ohci1394 which is HW de- and re-initialisation. It works with suspend2disk on my Ricoh R5C552 IEEE 1394 Controller with the 2.6.17 kernel to the extent that if I call dvgrab --interactive after suspend2disk without unloading ohci1394, it does not lock up dvgrab with 100% CPU but properly connects to the camera, given that I first unplug and plug the camera after coming back from suspend. I guess that could be fixed by forcing a bus reset in the resume function. I cannot test suspend to RAM here at the moment and should follow the guidelines in Documentation/power/pci.txt also, so this is rather a quick report than a finished patch and there are some rough edges: However, with this patch, I have to unload at least some in-kernel users of ohci1394 like dv1394 or video1394 before suspending. Not doing that caused an Oops and a bad tasklet error, probably from not handling ISO tasklets during suspend/resume properly. Maybe these can be temporarily cleared or unregistered and re-registered for suspend/resume with help from the other layers or from the highlevel 1394 core, but I do not really know what these do. But this patch provides a useful base to start from and is already of much help for people which do not need dv1394 and video1394 or can unload them at least during suspend. I cannot test function with sbp2 at the moment, but raw1394 seems to work fine. Signed-off-by: Bernhard Kaindl Update: merge with previous two ohci1394 suspend/resume patches Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 75 +++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) ======================================================================== ieee1394: sbp2: slightly reorder sbp2scsi_abort Put the target's fetch agent into reset state before the underlying ORB DMA is unmapped and the ->done handler is called. It is highly unlikely but the target could access that ORB right before sbp2 sends the reset request. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) ======================================================================== ieee1394: ohci1394: check for errors in suspend or resume Some of the suspend and resume litany may fail. Tell the PCI core about it. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) ======================================================================== ieee1394: remove unused struct member from highlevel API struct hpsb_highlevel's struct module *owner is neither used by the IEEE 1394 core nor set by any of the in-tree drivers or the two out-of-tree highlevel drivers I know about (dfg1394, mem1394) --- nor is this member documented. An unscheduled removal seems acceptable. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/highlevel.h | 1 - 1 file changed, 1 deletion(-) ======================================================================== Date: Mon, 30 Oct 2006 00:14:55 +0000 (-0800) From: David S. Miller Subject: [ETH1394]: Fix unaligned accesses. Several u64 objects are derefernced in situations where the pointer is not guarenteed to be aligned correctly. Use get_unaligned() as needed. Thanks to Will Simoneau for lots of testing and debugging help. Signed-off-by: David S. Miller Acked-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) ======================================================================== From: Pavel Machek Subject: set power state of firewire host during suspend Put firewire host controller in PCI Dx state for system suspend. (I was not able to measure any power savings, but it sounds like right thing to do, anyway.) Signed-off-by: Pavel Machek Update by stefanr: Shuffle with existing PPC_PMAC code. Set power state in the resume hook too. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ======================================================================== Date: Fri, 6 Oct 2006 19:49:52 +0200 (CEST) From: Stefan Richter Subject: ieee1394: nodemgr: fix startup of knodemgrd Revert a thinko in commit d2f119fe319528da8c76a1107459d6f478cbf28c: When knodemgrd starts, it needs to sleep until host->generation was incremented above its initial value of 0. My wrong logic caused it to start sending requests when the bus wasn't completely ready. Seen as "AT dma reset ctx=0, aborting transmission" messages in 2.6.19-rc1. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== ieee1394: raw1394: add comments on lock usage Add a who-is-who about some locks and list heads in raw1394's struct definitions. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/raw1394-private.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ======================================================================== ieee1394: raw1394: arm functions slept in atomic context Sleeping functions like copy_to_user were accessed inside spinlocks in raw1394's arm_register, arm_unregister, arm_get_buf, arm_set_buf. http://bugzilla.kernel.org/show_bug.cgi?id=7120 Signed-off-by: Stefan Richter --- --- drivers/ieee1394/raw1394.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) ======================================================================== ieee1394: ohci1394: more obvious endianess handling Rename ohci1394's packet_swab to header_le32_to_cpu to better reflect what it actually does. Also, define a constant array as 'const' and check the array index properly. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) ======================================================================== ieee1394: ohci1394: fix endianess bug in debug message The transaction labels were misprinted int the debug printk "Packet received from node..." due two byte-swapping once too often. Affected were big endian machines, except UniNorth based ones. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== ieee1394: sbp2: don't prefer MODE SENSE 10 In the old days, sbp2 used to coerce all MODE SENSE commands into the 10 bytes version. When all command set conversions were removed from sbp2 several months ago, sdev->use_10_for_ms = 1 was added. Meaning, higher SCSI layers preferred the 10 bytes version but would try the 6 bytes version if the former failed. Recently, a problem with the 10 bytes version was discovered. An Initio INIC-1530 firmware accepted the 10 bytes version but replied with bogus data, showing the HDD incorrectly as write-protected. Since RBC actually mandates MODE SENSE (6), I checked which version was sent by Windows XP and Mac OS X 10.3 to an SBP-2 target hosted by Linux --- it was the 6 bytes version. (Exception: OS X sent the 10 bytes version to an MMC target. RBC and SBC got MODE SENSE (6).) Therefore, drop the use_10_for_ms flag from sbp2. Now the upper layers will try MODE SENSE (6) before MODE SENSE (10) on all SBP-2 devices. Signed-off-by: Stefan Richter Long story, short patch. This supercedes patch "ieee1394: sbp2: workaround for write protect bit of Initio firmware". --- drivers/ieee1394/sbp2.c | 1 - 1 file changed, 1 deletion(-) ======================================================================== ieee1394: nodemgr: grab class.subsys.rwsem in nodemgr_resume_ne nodemgr_resume_ne was iterating over nodemgr_ud_class.children without protection by nodemgr_ud_class.subsys.rwsem. FIXME: Shouldn't we rather use class->sem there, not class->subsys.rwsem? Signed-off-by: Stefan Richter --- --- drivers/ieee1394/nodemgr.c | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== ieee1394: nodemgr: fix rwsem recursion nodemgr_update_pdrv grabbed an rw semaphore (as reader) which was already taken by its caller's caller, nodemgr_probe_ne (as reader too). Reported by Miles Lane, call path pointed out by Arjan van de Ven. FIXME: Shouldn't we rather use class->sem there, not class->subsys.rwsem? Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ======================================================================== ieee1394: sbp2: more help in Kconfig Add some pointers to SCSI to the configuration menu item of sbp2. Signed-off-by: Stefan Richter --- drivers/ieee1394/Kconfig | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ======================================================================== ieee1394: sbp2: prevent rare deadlock in shutdown Scsi_remove_device() may go into uninterruptible sleep if blocked. Therefore sbp2_remove() unblocks the Scsi_Host before the device is requested to be removed. But there could be another 1394 bus reset after that which would block the host again. The 1394 subsystem won't call sbp2_update() concurrently to sbp2_remove(), which is why there is no chance for sbp2_remove() to be unblocked by sbp2_update(). The fix is to tell sbp2's bus reset handler when a device is to be shut down so that it skips scsi_block_requests() on that host. As before, any new commands after a reset without reconnect will be failed quickly by sbp2scsi_queuecommand(). In the long term, means to go without scsi_block_requests() should be found. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 21 +++++++++++---------- drivers/ieee1394/sbp2.h | 9 ++++++++- 2 files changed, 19 insertions(+), 11 deletions(-) ======================================================================== ieee1394: sbp2: update includes Remove unused includes. Add missing includes, i.e. explicitly include all used headers. Sort includes alphabetically. Replace one call to signal_pending(current) to avoid to include headers just for this line. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 49 ++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 22 deletions(-) ======================================================================== ieee1394: sbp2: better handling of transport errors If the target signals a transport failure via status block, complete the request with DID_BUSY to indicate to the SCSI subsystem that the command may succeed when retried. Also log diagnostic information if the status block shows a transport related problem. It may point to hardware faults. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 16 +++++++++++----- drivers/ieee1394/sbp2.h | 6 +++--- 2 files changed, 14 insertions(+), 8 deletions(-) ======================================================================== ieee1394: sbp2: recheck node generation in sbp2_update While sbp2_update() is doing its duties after a bus reset, another reset could happen. Don't accept new requests until the next undisturbed sbp2_update() or until sbp2_remove(). Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ======================================================================== ieee1394: sbp2: safer agent reset in error handlers The scsi_host_template's eh_abort_handler and eh_device_reset_handler are allowed to sleep. Use this to run sbp2_agent_reset in the more reliable mode which returns _after_ its write transaction was finished. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== ieee1394: sbp2: handle "sbp2util_node_write_no_wait failed" Fix for http://bugzilla.kernel.org/show_bug.cgi?id=6948 Because sbp2 writes to the target's fetch agent's registers from within atomic context, it cannot sleep to guaranteedly get a free transaction label. This may repeatedly lead to "sbp2util_node_write_no_wait failed" and consequently to SCSI command abortion after timeout. A likely cause is that many queue_command softirqs may occur before khpsbpkt (the ieee1394 driver's thread which cleans up after finished transactions) is woken up to recycle tlabels. Sbp2 now schedules a workqueue job whenever sbp2_link_orb_command fails in sbp2util_node_write_no_wait. The job will reliably get a transaction label because it can sleep. We use the kernel-wide shared workqueue because it is unlikely that the job itself actually needs to sleep. In the improbable case that it has to sleep, it doesn't need to sleep long since the standard transaction timeout is 100ms. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 71 +++++++++++++++++++++++++++++++++++++--- drivers/ieee1394/sbp2.h | 3 + 2 files changed, 69 insertions(+), 5 deletions(-) ======================================================================== Subject: CONFIG_PM=n slim: drivers/ieee1394/ohci1394.c From: Alexey Dobriyan Date: Fri, 11 Aug 2006 16:46:14 -0700 Remove some code which is unneeded if CONFIG_PM=n. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton --- drivers/ieee1394/ohci1394.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ======================================================================== [PATCH update] ieee1394: sbp2: enable auto spin-up for all SBP-2 devices This is a follow-up to patch "ieee1394: sbp2: enable auto spin-up for Maxtor disks". When I 'ejected' an OXUF922 based HDD from a Mac OS X box, it was spun down by the Mac and did not spin up by itself when attached to a Linux box right after that. The first SCSI command that required the bridge to access the drive ended in sda:<6>sd 18:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Additional sense: Logical unit not ready, initializing cmd. required Therefore the flag which instructs scsi_mod to send START STOP UNIT with START=1 ("make medium ready") after such a condition is now enabled unconditionally for all FireWire storage devices. Signed-off-by: Stefan Richter --- Patch updated (refreshed) to be applicable without the obsolete patch "ieee1394: sbp2: workaround for write protect bit of Initio firmware". --- drivers/ieee1394/sbp2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ======================================================================== 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 --- drivers/ieee1394/dv1394.c | 4 ++-- drivers/ieee1394/ieee1394_core.c | 2 +- drivers/ieee1394/ieee1394_types.h | 2 +- drivers/ieee1394/ohci1394.c | 8 ++++---- drivers/ieee1394/raw1394.c | 2 +- drivers/ieee1394/sbp2.c | 18 +++++++++--------- drivers/ieee1394/video1394.c | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) ======================================================================== video1394: add poll file operation support This patch adds support for the poll file operation to the video1394 driver. Signed-off-by: David Moore --- drivers/ieee1394/video1394.c | 38 ++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) ======================================================================== the scheduled removal of drivers/ieee1394/sbp2.c:force_inquiry_hack This patch contains the scheduled removal of the force_inquiry_hack module parameter. Signed-off-by: Adrian Bunk Signed-off-by: Stefan Richter [[ patch version without feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/sbp2.c | 10 ---------- 1 file changed, 10 deletions(-) ======================================================================== From: Andi Kleen Subject: Initialize ieee1394 early when built in This makes debugging with firescope easier. Signed-off-by: Andi Kleen (original patch) Update: - no need for #ifdef MODULE - add comment in ieee1394_core, more verbose comment in ohci1394 Signed-off-by: Stefan Richter (update) --- drivers/ieee1394/ieee1394_core.c | 2 +- drivers/ieee1394/ohci1394.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) ======================================================================== ieee1394: sbp2: convert sbp2util_down_timeout to waitqueue The waitqueue API is used to replace a custom wait mechanism. Only one global waitqueue (instead of per-device waitqueues or completions) is added because there is usually just one waiter. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 51 +++++++++++++++++----------------------- drivers/ieee1394/sbp2.h | 4 +-- 2 files changed, 24 insertions(+), 31 deletions(-) ======================================================================== ieee1394: sbp2: more checks of status block - Add checks for the (very unlikely) cases that the target writes too little or too much status data or writes unsolicited status. - Indicate that these and similar conditions are unlikely(). - Check the 'resp' and 'sbp_status' fields for possible failure status. - Slightly optimize access macros for the status block bitfields. - Unify a few related log messages. Signed-off-by: Stefan Richter TODO: Check if 'src'==1, then withhold the respective ORB from reuse until status for any subsequent ORB was received. This is an old bug whose fix requires more complex command queue handling. --- drivers/ieee1394/sbp2.c | 70 +++++++++++++++++----------------------- drivers/ieee1394/sbp2.h | 14 ++++---- 2 files changed, 38 insertions(+), 46 deletions(-) ======================================================================== ieee1394: sbp2: safer initialization of status fifo Sbp2's copy of the status fifo was cleared when management ORBs or new command ORBs were prepared. The latter had potential for a race condition if the block layer's soft IRQ and the 1394 LLD's interrupt handler ran on different CPUs. It would also yield wrong status if a command was completed with non-zero completion status before other commands that had zero completion status, and no new command was enqueued in the meantime. Now, the status buffer is cleared right before it is written. Thus it ends up in the following simpler and safer access pattern: - sbp2_alloc_device: allocates and implicitly clears once, - sbp2_handle_status_write: clears, writes, and reads, - sbp2_query_logins, sbp2_login_device, sbp2_reconnect_device: read. The latter three do not race with sbp2_handle_status_write because of how the protocol works. As a tiny optimization, the first two quadlets of the status never need to be cleared. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 80 +++++++++++++++------------------------- 1 file changed, 30 insertions(+), 50 deletions(-) ======================================================================== ieee1394: sbp2: optimize DMA direction of command ORBs Only the driver writes ORBs, the device just reads them. Therefore PCI_DMA_BIDIRECTIONAL can be replaced by PCI_DMA_TODEVICE which may be cheaper on some architectures. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ======================================================================== ieee1394: sbp2: discard return value of sbp2_link_orb_command Since sbp2 is at the moment unable to do anything with the return value of sbp2_link_orb_command, just discard it. Signed-off-by: Stefan Richter TODO: Alas sbp2 initiates 1394 write requests to ORB_POINTER and DOORBELL from atomic context. The write transactions should be moved into non-atomic context, i.e. a kthread or workqueue. That way, typical failures of sbp2util_node_write_no_wait can be avoided in the first place, and there are better possibilities to recover from remaining failures. --- drivers/ieee1394/sbp2.c | 8 +++----- drivers/ieee1394/sbp2.h | 5 ----- 2 files changed, 3 insertions(+), 10 deletions(-) ======================================================================== ieee1394: sbp2: safer last_orb and next_ORB handling The sbp2 initiator has two ways to tell a target's fetch agent about new command ORBs: - Write the ORB's address to the ORB_POINTER register. This must not be done while the fetch agent is active. - Put the ORB's address into the previously submitted ORB's next_ORB field and write to the DOORBELL register. This may be done while the fetch agent is active or suspended. It must not be done while the fetch agent is in reset state. Sbp2 has a last_orb pointer which indicates in what way a new command should be announced. That pointer is concurrently accessed at various occasions. Furthermore, initiator and target are accessing the next_ORB field of ORBs concurrently and asynchronously. This patch does: - Protect all initiator accesses to last_orb by sbp2_command_orb_lock. - Add pci_dma_sync_single_for_device before a previously submitted ORB's next_ORB field is overwritten. - Insert a memory barrier between when next_ORB_lo and next_ORB_hi are overwritten. Next_ORB_hi must not be updated before next_ORB_lo. - Remove the rather unspecific and now superfluous qualifier "volatile" from the next_ORB fields. - Add comments on how last_orb is connected with what is known about the target's fetch agent's state. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 101 +++++++++++++++++++--------------------- drivers/ieee1394/sbp2.h | 4 - 2 files changed, 50 insertions(+), 55 deletions(-) ======================================================================== ieee1394: remove #include These includes in ieee1394_core and eth1394 are obsolete. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 1 - drivers/ieee1394/ieee1394_core.c | 1 - drivers/ieee1394/ieee1394_core.h | 1 - 3 files changed, 3 deletions(-) ======================================================================== ieee1394: fix kerneldoc of hpsb_alloc_host There was stuff between the comment and the function. Signed-off-by: Stefan Richter --- drivers/ieee1394/hosts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== ieee1394: shrink tlabel pools, remove tpool semaphores This patch reduces the size of struct hpsb_host and also removes semaphores from ieee1394_transactions.c. On i386, struct hpsb_host shrinks from 10656 bytes to 6688 bytes. This is accomplished by - using a single wait_queue for hpsb_get_tlabel instead of many instances of semaphores, - using a single lock to serialize access to all tlabel pools (the protected code regions are small, i.e. lock contention very low), - omitting the sysfs attribute tlabels_allocations. Drawback: In the rare case that a process needs to sleep because all transaction labels for the node are temporarily exhausted, it is also woken up if a tlabel for a different node became free, checks for an available tlabel, and is put to sleep again. The check is not costly and the situation occurs very rarely, therefore the benefit of reduced tpool size outweighs this drawback. The sysfs attributes tlabels_free and tlabels_mask are not compiled anymore unless CONFIG_IEEE1394_VERBOSEDEBUG is set. The by far biggest member of struct hpsb_host, the struct csr_control csr (5272 bytes on i386), is now placed at the end of struct hpsb_host. Note, hpsb_get_tlabel calls the macro wait_event_interruptible with a condition argument which has a side effect (allocation of a tlabel and manipulation of the packet). This side effect happens only if the condition is true. The patch relies on wait_event_interruptible not evaluating the condition again after it became true. Signed-off-by: Stefan Richter Replaces the patches "ieee1394: reduce size of hpsb_host by 252 bytes" "ieee1394: coarser locking for tlabel allocation" "ieee1394: nodemgr: read tlabel attributes atomically" "ieee1394: convert ieee1394_transactions from semaphores to waitqueue" --- drivers/ieee1394/hosts.c | 3 drivers/ieee1394/hosts.h | 19 +--- drivers/ieee1394/ieee1394_transactions.c | 108 +++++++++++++---------- drivers/ieee1394/ieee1394_transactions.h | 4 drivers/ieee1394/ieee1394_types.h | 23 ---- drivers/ieee1394/nodemgr.c | 43 +++++---- drivers/ieee1394/nodemgr.h | 1 7 files changed, 102 insertions(+), 99 deletions(-) ======================================================================== ieee1394: nodemgr: convert nodemgr_serialize semaphore to mutex Another trivial sem2mutex conversion. Side note: nodemgr_serialize's purpose, when introduced in linux1394's revision 529 in July 2002, was to protect several data structures which are now largely handled by or together with Linux' driver core and are now protected by the LDM's own mechanisms. It may very well be possible to remove this mutex now. But fully parallelized node scanning is on our long-term TODO list anyway; the mutex will certainly go away then. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ======================================================================== ieee1394: nodemgr: switch to kthread api, replace reset semaphore Convert nodemgr's host thread from kernel_thread to kthread and its sleep/restart mechanism from a counting semaphore to a schedule()/ wake_up_process() scheme. Signed-off-by: Stefan Richter Replaces the patches "ieee1394: nodemgr: switch to kthread API" "ieee1394: nodemgr: replace reset semaphore" --- drivers/ieee1394/nodemgr.c | 120 ++++++++++++------------------------- 1 file changed, 41 insertions(+), 79 deletions(-) ======================================================================== ieee1394: nodemgr: make module parameter ignore_drivers writable Nodemgr's ignore_drivers variable is exposed as a module load parameter (therefore also as a sysfs attribute below /sys/module) and additionally as an attribute below /sys/bus/ieee1394. Since the latter is writable, make the former writable too. Note, the bus's attribute ignore_drivers is only relevant to newly added units, not to present or suspended or resuming units. Those have their own attribute ignore_driver. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== ieee1394: nodemgr: do not spawn kernel_thread for sysfs rescan nodemgr.c::fw_set_rescan() is used to re-run the driver core over nodemgr's representation of unit directories in order to initiate protocol driver probes. It is initiated via write access to one of nodemgr's sysfs attributes. The purpose is to attach drivers to units after switching a unit's ignore_driver attribute from 1 to 0. It is not really necessary to fork a kernel_thread for this job. The call to kernel_thread() can be eliminated to avoid the deprecated API and to simplify the code a bit. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) ======================================================================== ieee1394: nodemgr: remove unnecessary includes Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 4 ---- 1 file changed, 4 deletions(-) ======================================================================== ieee1394: raw1394: remove redundant counting semaphore An already existing wait queue replaces raw1394's complete_sem which was maintained in parallel to the wait queue. The role of the semaphore's counter is taken over by a direct check of what was really counted: The presence of items in the list of completed requests. Notes: - raw1394_release() sleeps uninterruptibly until all requests were completed. This is the same behaviour as before the patch. - The macros wait_event and wait_event_interruptible are called with a condition argument which has a side effect, i.e. manipulation of the requests list. This side effect happens only if the condition is true. The patch relies on the fact that wait_event[_interruptible] does not evaluate the condition again after it became true. - The diffstat looks unfavorable with respect to added lines of code. However 19 of them are comments, and some are due to separation of existing code blocks into two small helper functions. Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394-private.h | 3 drivers/ieee1394/raw1394.c | 91 ++++++++++++++++++----------- 2 files changed, 58 insertions(+), 36 deletions(-) ======================================================================== ieee1394: dv1394: sem2mutex conversion Signed-off-by: Stefan Richter (not runtime-tested) --- drivers/ieee1394/dv1394-private.h | 6 ++--- drivers/ieee1394/dv1394.c | 31 +++++++++++++++--------------- 2 files changed, 19 insertions(+), 18 deletions(-) ======================================================================== ieee1394: clean up declarations of hpsb_*_config_rom hpsb_update_config_rom() is defined in csr.c, not hosts.c. hpsb_get_config_rom() does not exist. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr.h | 5 +++++ drivers/ieee1394/hosts.h | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) ======================================================================== ieee1394: remove unused macros HPSB_PANIC and HPSB_TRACE Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 6 +++--- drivers/ieee1394/ieee1394_types.h | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) ======================================================================== ieee1394: remove redundant code from ieee1394_hotplug.h Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_hotplug.h | 29 +++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) ======================================================================== ieee1394: update #include directives in midlayer header files Remove unnecessary includes, add missing includes. Use forward type declarations for some structs. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr.h | 6 ++---- drivers/ieee1394/dma.c | 7 +++++-- drivers/ieee1394/dma.h | 7 +++++-- drivers/ieee1394/dv1394.c | 12 ++++++------ drivers/ieee1394/eth1394.c | 11 ++++++----- drivers/ieee1394/highlevel.h | 10 ++++++++++ drivers/ieee1394/hosts.h | 10 ++++++---- drivers/ieee1394/ieee1394_core.h | 10 +++++++--- drivers/ieee1394/ieee1394_hotplug.h | 3 +-- drivers/ieee1394/ieee1394_transactions.h | 7 ++++++- drivers/ieee1394/ieee1394_types.h | 7 ++----- drivers/ieee1394/iso.c | 5 ++++- drivers/ieee1394/iso.h | 7 ++++++- drivers/ieee1394/nodemgr.c | 9 +++++---- drivers/ieee1394/nodemgr.h | 10 ++++++++-- drivers/ieee1394/raw1394.c | 11 ++++++----- drivers/ieee1394/video1394.c | 12 ++++++------ 17 files changed, 91 insertions(+), 53 deletions(-) ======================================================================== ieee1394: coding style and comment fixes in midlayer header files Adjust tabulators, line wraps, empty lines, and comment style. Update comments in ieee1394_transactions.h and highlevel.h. Fix typo in comment in csr.h. Signed-off-by: Stefan Richter TODO: Move comments from function declarations to function definitions. Add kernel-doc compliant comments to data type definitions which are part of ieee1394's APIs like done in this patch for dma.h. --- drivers/ieee1394/csr.h | 96 +++---- drivers/ieee1394/dma.h | 81 +++-- drivers/ieee1394/highlevel.h | 203 +++++++------- drivers/ieee1394/hosts.h | 15 - drivers/ieee1394/ieee1394-ioctl.h | 9 drivers/ieee1394/ieee1394.h | 312 +++++++++++------------ drivers/ieee1394/ieee1394_core.h | 17 - drivers/ieee1394/ieee1394_transactions.h | 32 -- drivers/ieee1394/ieee1394_types.h | 31 +- drivers/ieee1394/iso.h | 80 +++-- drivers/ieee1394/nodemgr.h | 16 - 11 files changed, 450 insertions(+), 442 deletions(-) ======================================================================== ieee1394: replace __inline__ by inline Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_types.h | 2 +- drivers/ieee1394/ohci1394.c | 5 +++-- drivers/ieee1394/sbp2.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) ======================================================================== 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 --- drivers/ieee1394/ieee1394.h | 2 ++ drivers/ieee1394/ieee1394_core.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) ======================================================================== ieee1394: fix cosmetic problem in speed probe If ieee1394.h::IEEE1394_SPEED_MAX is bigger than the actual speed of an 1394b host adapter and the speed to another 1394b node was probed, a bigger speed than actually used was kept in host->speed[n]. The only resulting problem so far was sbp2 displaying bogus values in the syslog, e.g. S3200 for actual S800 connections if IEEE1394_SPEED_MAX was S3200. But other high-level drivers which access this field could get into more trouble. (Eth1394 is the only other in-tree driver which does so. It seems it is not affected.) Nodemgr now clips this value according to the host adapter's link speed. A pointer expression in nodemgr_check_speed is also changed for clarity. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ======================================================================== ieee1394: fix calculation of csr->expire This variant of calculate_expire() is more correct and easier to read. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) ======================================================================== Remove obsolete #include Signed-off-by: Joern Engel Signed-off-by: Adrian Bunk ### Stefan Richter: omitted all but the ieee1394 parts ### --- drivers/ieee1394/config_roms.c | 1 - drivers/ieee1394/dv1394.c | 1 - drivers/ieee1394/highlevel.c | 1 - drivers/ieee1394/hosts.c | 1 - drivers/ieee1394/ieee1394_core.c | 1 - drivers/ieee1394/nodemgr.c | 1 - drivers/ieee1394/ohci1394.c | 1 - drivers/ieee1394/oui2c.sh | 1 - drivers/ieee1394/pcilynx.c | 1 - drivers/ieee1394/pcilynx.h | 1 - drivers/ieee1394/sbp2.c | 1 - drivers/ieee1394/video1394.c | 1 - 12 files changed, 12 deletions(-) ======================================================================== spelling fixes acquired (aquired) contiguous (contigious) successful (succesful, succesfull) surprise (suprise) whether (weather) some other misspellings Signed-off-by: Andreas Mohr Signed-off-by: Adrian Bunk ### Stefan Richter: omitted all but the ieee1394 parts ### --- drivers/ieee1394/hosts.c | 2 +- drivers/ieee1394/ieee1394_core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ======================================================================== ieee1394: nodemgr: do not peek into struct semaphore Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ======================================================================== eth1394: replace __constant_htons by htons ...and __constant_ntohs, __constant_ntohl, __constant_cpu_to_be32 too where possible. Htons and friends are resolved to constants in these places anyway. Also fix an endianess glitch in a log message, spotted by Alexey Dobriyan. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) ======================================================================== ieee1394: adjust code formatting in highlevel.c Replace spaces by tabulators, wrap lines at 80 columns, delete some blank lines and superfluous braces. Collapse some if()-within-if() constructs. Replace a literal CSR address by its preprocessor constant. Signed-off-by: Stefan Richter --- drivers/ieee1394/highlevel.c | 415 +++++++++++++++-------------------- 1 file changed, 182 insertions(+), 233 deletions(-) ======================================================================== ieee1394: hl_irqs_lock is taken in hardware interrupt context ohci1394 and pcilynx call highlevel_host_reset from their hardware interrupt handler (via hpsb_selfid_complete). Therefore all readers and writers of hl_irqs_lock have to disable interrupts. Reported by Jiri Slaby and J. A. Magallon. Signed-off-by: Stefan Richter --- drivers/ieee1394/highlevel.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) ======================================================================== 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 Signed-off-by: Jody McIntyre Signed-off-by: Stefan Richter Signed-off-by: Andrew Morton --- drivers/ieee1394/ieee1394_core.c | 48 +++++++++---------------------- 1 file changed, 15 insertions(+), 33 deletions(-) ======================================================================== ieee1394: sbp2: Kconfig fix We only support x86 and ppc, due to the use of bus_to_virt() and friends. Signed-off-by: Stefan Richter Signed-off-by: Andrew Morton --- drivers/ieee1394/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== ieee1394: add preprocessor constant for invalid csr address Replace occurrences of the magic value ~(u64)0 for invalid CSR address spaces by a named constant for better readability. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 2 +- drivers/ieee1394/csr1212.h | 1 + drivers/ieee1394/eth1394.c | 16 +++++++--------- drivers/ieee1394/eth1394.h | 2 -- drivers/ieee1394/highlevel.c | 9 +++++---- drivers/ieee1394/sbp2.c | 8 ++++---- 6 files changed, 18 insertions(+), 20 deletions(-) ======================================================================== sbp2: fix deregistration of status fifo address space The proper designator of an invalid CSR address is ~(u64)0, not (u64)0. Use the correct value in initialization and deregistration. Also, scsi_id->sbp2_lun does not need to be initialized twice. (scsi_id was kzalloc'd.) Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== [PATCH] eth1394: endian fixes Signed-off-by: Alexey Dobriyan --- drivers/ieee1394/eth1394.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ======================================================================== sbp2: use __attribute__((packed)) for on-the-wire structures It seems to have worked without the attribute during all the years just because sizes of all struct members are multiples of 32 bits. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) ======================================================================== sbp2: provide helptext for CONFIG_IEEE1394_SBP2_PHYS_DMA and mark it experimental It appears I will not get it fixed overnight. Signed-off-by: Stefan Richter --- drivers/ieee1394/Kconfig | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ======================================================================== sbp2: fix S800 transfers if phys_dma is off If sbp2 is forced to move data via ARM handler, the maximum packet size allowed for S800 transfers exceeds ohci1394's buffer size on platforms where PAGE_SIZE is 4096. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) ======================================================================== sbp2: remove ohci1394 specific constant Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== ohci1394: make phys_dma parameter read-only Being able to switch physical DMA on and off at run time would be a nice feature but a PITA to support by highlevel drivers and userspace apps. Therefore allow it only to be set when the driver is being loaded. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== ohci1394: set address range properties This patch supplies the API extension introduced by patch "ieee1394: extend lowlevel API for address range properties" with proper addresses. Like in patch ''ohci1394, sbp2: fix "scsi_add_device failed" with PL-3507 based devices'', 1 TeraByte is chosen as physical upper bound. This leaves a window for the middle address range. This choice is only relevant for adapters which actually have a programmable pysical upper bound register. (Only ALi and Fujitsu adapters are known for this. Most adapters have a fixed bound at 4 GB.) The middle address range is suitable for posted writes. AFAIK, PCILynx does not support physical DMA nor posted writes, therefore no equivalent change in the pcilynx driver is necessary. There is also a driver for GP2Lynx, although not in mainline Linux. I assume this hardware does not support these OHCI features either. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 11 ++++++++++- drivers/ieee1394/ohci1394.h | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) ======================================================================== ieee1394: extend lowlevel API for address range properties Host adapter hardware imposes certain restrictions and features on address ranges. Instead of hard-wire such ranges into the ieee1394 core or even into protocol drivers, let lowlevel drivers specify these ranges via struct hpsb_host. Patch "ohci1394: set address range properties" must be applied too, else hpsb_allocate_and_register_addrspace() won't work properly. Signed-off-by: Stefan Richter --- drivers/ieee1394/highlevel.c | 4 +++- drivers/ieee1394/hosts.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) ======================================================================== ohci1394, sbp2: fix "scsi_add_device failed" with PL-3507 based devices Re-enable posted writes for status FIFO. Besides bringing back a very minor bandwidth tweak from Linux 2.6.15.x and older, this also fixes an interoperability regression since 2.6.16: http://bugzilla.kernel.org/show_bug.cgi?id=6356 (sbp2: scsi_add_device failed. IEEE1394 HD is not working anymore.) The ugly hardwired PhyUpperBound which this patch introduces into sbp2 will be eliminated by a subsequent patchset. ############### This is only a part of the patch. ############### ############### The rest is already in patch-2.6.16.20. ############### Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== sbp2: log number of supported concurrent logins Since this is useful information, promote it from a debug macro to a regular log message. The message appears only if the user set exclusive_login=0, therefore won't clutter the logs in normal use. Also update the comment on exclusive_login. Signed-off-by: Stefan Richter Signed-off-by: Jody McIntyre --- drivers/ieee1394/sbp2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ======================================================================== sbp2: remove manipulation of inquiry response This code became ineffective a few Linux releases ago and is not required anyway. Note from Christoph Hellwig: scsi_cmnd.request_buffer is always a scatterlist these days. Checking random bites into it and then mangling the data in sbp2_check_sbp2_response will cause really bad memory corruption when you're not lucky enough to have the check not trigger by luck. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 34 ---------------------------------- drivers/ieee1394/sbp2.h | 5 ++--- 2 files changed, 2 insertions(+), 37 deletions(-) ======================================================================== sbp2: add ability to override hardwired blacklist In case the blacklist with workarounds for device bugs yields a false positive, the module load parameter can now also be used as an override instead of an addition to the blacklist. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 29 ++++++++++++++++++----------- drivers/ieee1394/sbp2.h | 1 + 2 files changed, 19 insertions(+), 11 deletions(-) ======================================================================== ieee1394: save RAM by using a single tlabel for broadcast transactions Since broadcast transactions are already complete when the request has been sent, the same transaction label can be reused all over again, see IEEE 1394 7.3.2.5 and 6.2.4.3. Therefore we can reduce the footprint of struct hpsb_host by the size of one struct hpsb_tlabel_pool. Signed-off-by: Stefan Richter --- drivers/ieee1394/hosts.h | 18 +++++++++--------- drivers/ieee1394/ieee1394_transactions.c | 10 ++++++++-- 2 files changed, 17 insertions(+), 11 deletions(-) ======================================================================== 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 Cc: Hakan Ardo Cc: Calculex Cc: Robert J. Kosinski --- drivers/ieee1394/eth1394.c | 6 +-- drivers/ieee1394/hosts.h | 11 +++-- drivers/ieee1394/ieee1394_core.c | 14 ++++--- drivers/ieee1394/nodemgr.c | 61 +++++++++++++++++++++++++++++-- drivers/ieee1394/sbp2.c | 4 -- 5 files changed, 76 insertions(+), 20 deletions(-) ======================================================================== ieee1394/ohci1394: CycleTooLong interrupt management This patch modifies the ohci1394.c file to enable and manage the "cycle too long" interrupt. If this interrupt occurs, the "LinkControl.CycleMaster" bit of the host controller is reseted. This implies, that the host controller does not send "cycle start" packet anymore freezing then the isochronous communication. The management of the interrupt added by the patch is that when the interrupt occurs, the OHCI irq handler prints a kernel log warning and then sets the "LinkControl.CycleMaster" bit again resuming the isochronous communication. Signed-off-by: Jean-Baptiste Mur Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 10 ++++++++++ 1 file changed, 10 insertions(+) ======================================================================== raw1394: fix whitespace after x86_64 compat patch Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 54 +++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 28 deletions(-) ======================================================================== x86_64: Implement compat code for raw1394 read/write Not for the ioctls so far because I was too lazy. Cc: bcollins@debian.org Cc: dan@dennedy.org Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- drivers/ieee1394/raw1394.c | 96 +++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 5 deletions(-) ======================================================================== From: Arjan van de Ven Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Cc: Ben Collins Cc: Jody McIntyre Signed-off-by: Andrew Morton --- drivers/ieee1394/hosts.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ======================================================================== sbp2: make TSB42AA9 workaround specific to Momobay CX-1 The workarounds are not required for DViCO Momobay FX-3A and AFAIR not for Momobay CX-2. These contain an TSB42AA9A but feature the same firmware_revision value as the older DViCO Momobay CX-1. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== sbp2: add read_capacity workaround for iPod Apple decided to copy some USB stupidity over to FireWire. The sector number returned by iPods from read_capacity is one too many. This may cause I/O errors, especially if the kernel is configured for EFI partition support. We use the same workaround as usb-storage but have to check for different model IDs. http://marc.theaimsgroup.com/?t=114233262300001 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=187409 Acknowledgements: Diagnosis and therapy by Mathieu Chouquet-Stringer , additional data about affected and unaffected Apple hardware from Vladimir Kotal, Sander De Graaf, Bryan Olmstead, Hugh Dixon. ########## An equivalent patch is already in patch-2.6.16.20 ########## ########## but was removed by patch 47-sbp2-consolidate... ########## Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 49 ++++++++++++++++++++++++++++++++++++---- drivers/ieee1394/sbp2.h | 1 2 files changed, 46 insertions(+), 4 deletions(-) ======================================================================== sbp2: consolidate workarounds Grand unification of the three types of workarounds we have so far. The "skip mode page 8" workaround is now limited to devices which pretend to be of TYPE_DISK instead of TYPE_RBC. This workaround is no longer enabled for Initio bridges. Patch update in anticipation of more workarounds: - Add module parameter "workarounds". - Deprecate parameter "force_inquiry_hack". - Compose the blacklist of a compound type for better readability and extensibility. - Remove a now unused #define. ######## This patch also removes a patch from patch-2.6.16.20: ######## ######## "sbp2: backport read_capacity workaround for iPod" ######## ######## 48a-sbp2-add-read_capacity-workaround-for-ipod.patch ######## ######## will bring it back. ######## Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 161 ++++++++++++++++++++++------------------ drivers/ieee1394/sbp2.h | 16 +-- 2 files changed, 96 insertions(+), 81 deletions(-) ======================================================================== ohci1394: Remove superfluous call to free_dma_rcv_ctx, spotted by Adrian Bunk. Also remove some superfluous comments. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 11 ----------- 1 file changed, 11 deletions(-) ======================================================================== ieee1394: speed up of dma_region_sync_for_cpu when attempting to find the 'last' part of the dma region continue the search from where we left off, instead of starting the search over. Signed-off-by: Jim Westfall --- drivers/ieee1394/dma.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) ======================================================================== video1394: be quiet When working with multiple cameras and intensive applications, our logs get flooded with video1394 information which isn't of much interest. Any objections to demoting these messages to debug messages? Signed-off-by: Daniel Drake --- drivers/ieee1394/video1394.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ======================================================================== sd, scsi_lib: fix recognition of cache type of Initio SBP-2 bridges Regardless what mode page was asked for, Initio INIC-14x0 and INIC-2430 always return page 6 without mode page headers. Check for this breakage in scsi_mode_sense(). Taken from a patch by Al Viro . http://marc.theaimsgroup.com/?l=linux-scsi&m=114055884611429 Signed-off-by: Stefan Richter --- drivers/scsi/scsi_lib.c | 13 +++++++++++-- drivers/scsi/sd.c | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) ======================================================================== ohci1394: cleanup the "Unexpected PCI resource length" warning. This warning happens in practice because the resource length reported by the chipset is too large. This is not actually a problem, so don't warn about it. If it happens to be too small, warn about that, but with a different message so people who are used to ignoring the old message don't. Signed-off-by: Jody McIntyre --- drivers/ieee1394/ohci1394.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== sbp2: misc debug logging cleanups - move call of scsi_print_command from sbp2_send_command to the beginning of sbp2_queue_command to show also commands which are not sent - put sbp2's name into scsi_print_sense - use __FUNCTION__ in log messages - remove a few less useful log messages and comments Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 110 ++++++++++++---------------------------- 1 file changed, 33 insertions(+), 77 deletions(-) ======================================================================== sbp2: proper treatment of DID_OK Sbp2 relied on DID_OK to be defined as 0. Always shift DID_OK into the right position anyway, and explicitly return DID_OK together with CHECK_CONDITION. Also comment on some #if 0 code. The patch does not change current behaviour. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ======================================================================== ieee1394: set read permission for parameter disable_irm No need to hide it from /sys/module/ieee1394/parameters/. Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== sbp2: check for ARM failure Sbp2 did not check for successful registration of the lower address range when CONFIG_IEEE1394_SBP2_PHYS_DMA was set. If hpsb_register_addrspace failed, a "login timed-out" would occur which is misleading. Now sbp2 logs a sensible error message. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ======================================================================== ohci1394: clean up asynchronous and physical request filters programming Various cleanups of how ohci1394 programs AsynchronousRequestFilter, PhysicalRequestFilter, and physUpperBoundOffset. In particular, do not rewrite registers within the bus reset interrupt handler if bus resets do not affect the registers in the first place. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 37 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) ======================================================================== 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 Cc: Greg Kroah-Hartman Cc: Dan Dennedy --- drivers/ieee1394/dv1394.c | 41 +------------------------------ drivers/ieee1394/ieee1394_core.c | 14 +--------- drivers/ieee1394/ieee1394_core.h | 1 drivers/ieee1394/raw1394.c | 6 ---- drivers/ieee1394/video1394.c | 16 ------------ 5 files changed, 5 insertions(+), 73 deletions(-) ======================================================================== ohci1394: log physical posted write errors Give a warning if incoming write requests to the physical range fail. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ======================================================================== ieee1394: remove amdtp remains from ieee1394_core.h since amdtp driver was deleted Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.h | 2 -- 1 file changed, 2 deletions(-) ======================================================================== sbp2: prevent unloading of 1394 low-level driver When a new SBP-2 unit is added, sbp2 now takes a reference on the 1394 low-level driver (ohci1394 or pcilynx). This prevents the 1394 host driver module from being unloaded, e.g. by an administrative routine cleanup of unused kernel modules or when another 1394 driver which depends on ohci1394 is unloaded. The reference is dropped when the SBP-2 unit was disconnected, when sbp2 is unloaded or detached from the unit, or when addition of the SBP-2 unit failed. Patch depends on patch "sbp2: remove duplicate code from sbp2_start_device()" because all error paths in sbp2_alloc_device() and sbp2_start_device() must now call sbp2_remove_device() to drop the host driver reference. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 9 +++++++++ 1 file changed, 9 insertions(+) ========================================================================