IEEE 1394 updates for Linux 2.6.23 (v710 2008-05-04) drivers/firewire/Kconfig | 55 - drivers/firewire/fw-card.c | 111 -- drivers/firewire/fw-cdev.c | 90 + drivers/firewire/fw-device.c | 360 +++++-- drivers/firewire/fw-device.h | 65 + drivers/firewire/fw-iso.c | 5 drivers/firewire/fw-ohci.c | 945 ++++++++++++++---- drivers/firewire/fw-ohci.h | 4 drivers/firewire/fw-sbp2.c | 1158 +++++++++++++++-------- drivers/firewire/fw-topology.c | 42 drivers/firewire/fw-topology.h | 17 drivers/firewire/fw-transaction.c | 100 + drivers/firewire/fw-transaction.h | 25 drivers/ieee1394/csr1212.c | 89 + drivers/ieee1394/csr1212.h | 6 drivers/ieee1394/dma.c | 37 drivers/ieee1394/dv1394.c | 6 drivers/ieee1394/eth1394.c | 16 drivers/ieee1394/highlevel.c | 6 drivers/ieee1394/ieee1394_core.c | 6 drivers/ieee1394/ieee1394_transactions.c | 70 - drivers/ieee1394/iso.h | 2 drivers/ieee1394/nodemgr.c | 33 drivers/ieee1394/ohci1394.c | 275 +++-- drivers/ieee1394/pcilynx.c | 44 drivers/ieee1394/raw1394.c | 15 drivers/ieee1394/sbp2.c | 65 + drivers/ieee1394/sbp2.h | 3 drivers/ieee1394/video1394.c | 6 include/linux/firewire-cdev.h | 15 lib/Kconfig.debug | 12 31 files changed, 2484 insertions(+), 1199 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: Wed, 30 Apr 2008 11:19:47 +0300 From: Boaz Harrosh Subject: [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer - struct scsi_cmnd had a 16 bytes command buffer of its own. This is an unnecessary duplication and copy of request's cmd. It is probably left overs from the time that scsi_cmnd could function without a request attached. So clean that up. - Once above is done, few places, apart from scsi-ml, needed adjustments due to changing the data type of scsi_cmnd->cmnd. - Lots of drivers still use MAX_COMMAND_SIZE. So I have left that #define but equate it to BLK_MAX_CDB. The way I see it and is reflected in the patch below is. MAX_COMMAND_SIZE - means: The longest fixed-length (*) SCSI CDB as per the SCSI standard and is not related to the implementation. BLK_MAX_CDB. - The allocated space at the request level - I have audit all ISA drivers and made sure none use ->cmnd in a DMA Operation. Same audit was done by Andi Kleen. (*)fixed-length here means commands that their size can be determined by their opcode and the CDB does not carry a length specifier, (unlike the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly true and the SCSI standard also defines extended commands and vendor specific commands that can be bigger than 16 bytes. The kernel will support these using the same infrastructure used for VARLEN CDB's. So in effect MAX_COMMAND_SIZE means the maximum size command scsi-ml supports without specifying a cmd_len by ULD's Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley [[ from commit 64a87b244b9297667ca80264aab849a36f494884 ]] [[ Stefan Richter: only firewire part included here ]] --- drivers/firewire/fw-sbp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Fri, 18 Apr 2008 22:16:32 -0400 From: Matthew Wilcox Subject: drivers: Remove unnecessary inclusions of asm/semaphore.h None of these files use any of the functionality promised by asm/semaphore.h. It's possible that they rely on it dragging in some unrelated header file, but I can't build all these files, so we'll have fix any build failures as they come up. Signed-off-by: Matthew Wilcox [[ from commit d3135846f6c1858dbad6ccb780a42e6c98953e6d ]] [[ Stefan Richter: only firewire part included here ]] --- drivers/firewire/fw-transaction.c | 1 - 1 file changed, 1 deletion(-) ======================================================================== 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 23:17:47 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: log scsi_target ID at release Makes the good-by message more informative. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 2 +- 1 file changed, 1 insertion(+), 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: Sat, 12 Apr 2008 22:31:25 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: work around generation bug in TI controllers (fix AV/C and more) Unlike the ohci1394 driver, fw-ohci uses the selfIDGeneration field of bus reset packets to determine the generation of incoming requests as per OHCI 1.1 clause 8.4.2.3. This is more precise --- provided that the controller inserts the correct generation. Texas Instruments chips often don't. This prevented the transmission of response packets, which for example broke AV/C transactions as used when communicating with miniDV cameras and any other AV/C devices. There is apparently no way to detect and adjust incorrect generations. Therefore we ignore the generation of bus reset packets from TI chips and use the generation of the self ID buffer instead. Alas this is received at a slightly wrong time. In rare cases, this could cause us to not respond to legitimate requests or to respond to expired requests. (The latter is less likely because the bus reset packet AR event is typically handled before the self ID complete event.) Bug reported by Mladen Kuntner, who was extraordinarily patient while dealing with the driver maintainers. Fix confirmed to be required and effective for TSB82AA2 and a TSB43AB22 or TSB43AB22A. https://bugzilla.redhat.com/show_bug.cgi?id=243081 Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-ohci.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ======================================================================== Date: Fri, 11 Apr 2008 00:51:15 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: extend logging of bus generations and node ID Extend the logging of "AR evt_bus_reset, link internal" to "AR evt_bus_reset, generation ${selfIDGeneration}". That way we can check whether this generation matches the one seen in self ID complete event logging. See OHCI 1.1 clause 8.4.2.3. Also extend logging of "firewire_ohci: * selfIDs, generation *" by "local node ID ffc*" in self ID logging to make the local node in AT/AR event logs more obvious. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) ======================================================================== Date: Fri, 11 Apr 2008 00:08:08 +0200 From: Stefan Richter Subject: firewire: fw-ohci: add option for remote debugging - amendment (reduced backport version for 2.6.24 and older) Signed-off-by: Stefan Richter --- lib/Kconfig.debug | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ======================================================================== Date: Mon, 7 Apr 2008 22:33:35 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: conditionally log busReset interrupts Add a debug option to watch bus reset interrupt events. Half of this patch is taken from Jarod Wilson's first version of the JMicron fix. BusReset interrupts are only generated if the respective module parameter flag was set before the controller is being initialized. Else we keep this event masked to reduce IRQ load in normal operation and to avoid potential problems with buggy chips. Note, this is unlike the other IRQ events whose logging can be enabled any time after chip initialization. This and the influence on what interrupts the chip generates is why I added an extra flag for it. Also, reorder the debug parameter flags according to their perceived usefulness. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-ohci.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) ======================================================================== Date: Mon, 7 Apr 2008 22:32:33 +0200 (CEST) From: Jarod Wilson Subject: firewire: fw-ohci: don't append to AT context when it's not active I finally tracked down the issues with this JMicron PCI-e card in my possession to a failure to comply with section 7.2.3.2 of the OHCI 1.1 specification (thanks to Kristian for the pointer to illustrate that it is indeed a flaw in this card, not the driver). The controller should simply flush the packets we've appended to its AT queue if a bus reset occurs before they've been transmitted and we'll try again, but something goes wrong and the controller winds up hung. However, we can avoid the problem by simply checking if the IntEvent.busReset register had been set before we try appending to the AT context. When busReset is set, the AT context is completely halted until busReset is cleared, so there's no point in appending AT packets until the register is cleared. So at_context_queue_packet() now checks for busReset being set, and bails with an RCODE_GENERATION packet ack, which results in us trying to append the packet again after recognizing the fact there has been a bus reset, and clearing busReset. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) ======================================================================== Date: Thu, 3 Apr 2008 17:18:23 -0400 From: Jarod Wilson Subject: firewire: fw-ohci: log regAccessFail events While trying to debug this piece of crap JMicron PCI-e controller in my possession, one thought was that perhaps I was encountering register access failures. I'm not, but logging them would be good, so we can see if they are a real problem we should be taking into account anywhere in the code. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter (added list contact) --- drivers/firewire/fw-ohci.c | 13 ++++++++++--- drivers/firewire/fw-ohci.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) ======================================================================== Date: Fri, 28 Mar 2008 10:02:50 -0400 From: Jarod Wilson Subject: firewire: fw-ohci: make sure HCControl register LPS bit is set I've now witnessed multiple occasions where one of my controllers (a very poorly working JMicron PCIe card) fails to get its registers properly set up in ohci_enable(), apparently due to an occasionally very slow to initiate SClk. The easy fix for this problem is to add a tiny while loop to try again a time or three after initially enabling LPS before we move on (or give up). Of course, the card still isn't fully functional yet, but this gets it at least one tiny step closer... Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) ======================================================================== 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, 31 Mar 2008 02:22:11 +0300 From: Adrian Bunk Subject: firewire: cleanups This patch contains the following cleanups: - #if 0 the following unused structs: - fw-transaction.c:fw_low_memory_region - fw-transaction.c:fw_private_region - fw-transaction.c:fw_csr_region - fw-transaction.c:fw_unit_space_region - remove the following unused EXPORT_SYMBOL's: - fw-card.c:fw_core_add_descriptor - fw-card.c:fw_core_remove_descriptor - fw-iso.c:fw_iso_context_create - fw-iso.c:fw_iso_context_destroy - fw-iso.c:fw_iso_context_start - fw-iso.c:fw_iso_context_queue - fw-iso.c:fw_iso_context_stop Signed-off-by: Adrian Bunk Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 2 -- drivers/firewire/fw-iso.c | 5 ----- drivers/firewire/fw-transaction.c | 13 ++++++------- drivers/firewire/fw-transaction.h | 4 ---- 4 files changed, 6 insertions(+), 18 deletions(-) eca91bbaec5f84c1845b3a125e8edffff39abedb diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index a034627..927014a 100644 ======================================================================== Date: Tue, 25 Mar 2008 16:47:16 -0400 From: Jarod Wilson Subject: firewire: fw-ohci: plug dma memory leak in AR handler There's an ugly little memory leak in firewire-ohci's ar_context_tasklet(), where we're not freeing up some of the memory we use for each ar_buffer, due to a moving pointer. The problem has been there for a while, but didn't get noticed until after converting the AR routines over to use coherent DMA and I started running into I/O stall- outs with the following message output repeatedly to the console: PCI-DMA: Out of IOMMU space for 53248 bytes at device 0000:04:09.0 Plugging this leak is definitely necessary, but unfortunately, isn't the entire answer to my problem, it only increases the amount of I/O that I can do before hitting the problem. Still working on tracking down the root cause.. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 24 Mar 2008 20:57:12 +0100 (CET) From: Stefan Richter Subject: firewire: fix synchronization of gap counts Fix: The fact that nodes had different gap counts would be overlooked if the bus manager code would pick gap count 63 because of beta repeaters or because of very large hop counts. In this case, the bus manager code would miss that it actually has to send the PHY config packet with gap count 63. Related trivial changes: Use bool for an int used as bool, touch up some comments. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 8 ++++---- drivers/firewire/fw-topology.c | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) ======================================================================== Date: Mon, 24 Mar 2008 20:56:40 +0100 (CET) From: Stefan Richter Subject: firewire: unnecessary BM delay after generation rollover Noticed by Jarod Wilson: The bus manager work was unnecessarily delayed each time the bus generation counter rolled over. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-card.c | 2 +- drivers/firewire/fw-topology.c | 2 +- drivers/firewire/fw-transaction.h | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) ======================================================================== Date: Mon, 24 Mar 2008 20:55:28 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: missing PPC PMac feature calls in failure path Balance ohci_pmac_on and ohci_pmac_off if pci_driver.probe fails. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 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 | 92 +++++++++++++++++++++--------------- 1 file changed, 54 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: Thu, 20 Mar 2008 23:48:23 +0100 (CET) From: Stefan Richter Subject: firewire: wait until PHY configuration packet was transmitted (fix bus reset loop) We now exit fw_send_phy_config /after/ the PHY config packet has been transmitted, instead of before. A subsequent fw_core_initiate_bus_reset will therefore not overlap with the transmission. This is meant to make the send PHY config packet + reset bus routine more deterministic. Fixes bus reset loop and eventual panic with - VIA VT6307 + IOGEAR hub + Unibrain Fire-i camera http://bugzilla.kernel.org/show_bug.cgi?id=10128 - JMicron card Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-transaction.c | 49 ++++++++++++++---------------- 1 file changed, 24 insertions(+), 25 deletions(-) ======================================================================== Date: Tue, 11 Mar 2008 21:22:26 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: untangle a mixed unsigned/signed expression and make another expression more readable. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ======================================================================== Date: Thu, 20 Mar 2008 22:04:36 +0100 (CET) From: Stefan Richter Subject: firewire: debug interrupt events This adds debug printks for asynchronous transmission and reception and for self ID reception. They can be enabled at module load time, and at runtime via /sys/module/firewire_ohci/parameters/debug. Signed-off-by: Jarod Wilson Also added: Logging of interrupt event codes and of cancelled AT packets. The code now depends on a Kconfig variable. This makes it easier to build firewire-ohci without the feature or to make it an option in the future. The variable is currently hidden and always on. This feature inflates firewire-ohci.ko by 7 kB = 27% on x86-64 and by 4 kB = 23% on i686. Signed-off-by: Stefan Richter --- drivers/firewire/Kconfig | 5 + drivers/firewire/fw-ohci.c | 182 +++++++++++++++++++++++++++++++++++++ 2 files changed, 187 insertions(+) ======================================================================== Date: Wed, 19 Mar 2008 22:05:02 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: catch self_id_count == 0 fw_core_handle_bus_reset() incorrectly relied on the assumption that self_id_count > 0. We check early in fw-ohci and discard the self ID complete event if self_id_count == 0 because a valid event always has at least one self ID packet in it (the one of the local node). Hence treat self_id_count == 0 like any other kind of invalid self ID buffer. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 4 ++++ 1 file changed, 4 insertions(+) ======================================================================== Date: Wed, 19 Mar 2008 21:40:32 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: add self ID error check Discard self ID buffer contents if - the selfIDError flag is set, - any of the self ID packets has bit errors. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 14 ++++++++++---- drivers/firewire/fw-ohci.h | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) ======================================================================== Date: Wed, 19 Mar 2008 22:02:40 +0100 (CET) From: Stefan Richter Subject: firewire: insist on successive self ID complete events The whole topology code only works if the old and new topologies which are compared come from immediately successive self ID complete events. If there happened bus resets without self ID complete events in the meantime, or self ID complete events with invalid selfIDs, the topology comparison could identify nodes wrongly, or more likely just corrupt kernel memory or panic right away. We now discard all nodes of the old topology and treat all current nodes as new ones if the current self ID generation is not the previous one plus 1. Signed-off-by: Stefan Richter --- drivers/firewire/fw-topology.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) ======================================================================== Date: Sun, 16 Mar 2008 00:56:41 +0100 (CET) From: Stefan Richter Subject: firewire: fix panic in handle_at_packet This fixes a use-after-free bug in the handling of split transactions. The AT DMA handler of the request was occasionally executed after the AR DMA handler of the response. The AT DMA handler then accessed an already freed packet. Reported by Johannes Berg. http://bugzilla.kernel.org/show_bug.cgi?id=9617 Signed-off-by: Stefan Richter Tested-by: Johannes Berg Signed-off-by: Jarod Wilson --- drivers/firewire/fw-transaction.c | 6 ++++++ 1 file changed, 6 insertions(+) ======================================================================== Date: Fri, 14 Mar 2008 00:27:49 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: shut up false compiler warning on PPC32 Shut up "may be used uninitialised in this function" warnings due to PPC32's implementation of dma_alloc_coherent(). Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ======================================================================== Date: Wed, 12 Mar 2008 17:43:26 -0400 From: Jarod Wilson Subject: firewire: fw-ohci: use dma_alloc_coherent for ar_buffer Currently, we do nothing to guarantee we have a consistent DMA buffer for asynchronous receive packets. Rather than doing several sync's following a dma_map_single() to get consistent buffers, just switch to using dma_alloc_coherent(). Resolves constant buffer failures on my own x86_64 laptop w/4GB of RAM and likely to fix a number of other failures witnessed on x86_64 systems with 4GB of RAM or more. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 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: Tue, 11 Mar 2008 22:32:03 +0100 (CET) From: Stefan Richter Subject: firewire: fw-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 in https://bugzilla.redhat.com/show_bug.cgi?id=436879 Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 5 +++++ 1 file changed, 5 insertions(+) ======================================================================== Date: Tue, 11 Mar 2008 02:23:29 +0100 (CET) From: Stefan Richter Subject: firewire: remove unused struct member request_generation is internal to fw-ohci and unneeded in fw_card. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 2 +- drivers/firewire/fw-transaction.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) ======================================================================== Date: Sun, 9 Mar 2008 00:27:20 +0100 (CET) From: Stefan Richter Subject: firewire: update Kconfig help text Remove some less necessary information, point out that video1394 and dv1394 should be blacklisted along with ohci1394. Signed-off-by: Stefan Richter --- drivers/firewire/Kconfig | 50 ++++++++++++++------------------------- 1 file changed, 19 insertions(+), 31 deletions(-) ======================================================================== Date: Sat, 8 Mar 2008 22:38:16 +0100 (CET) From: Stefan Richter Subject: firewire: warn on fatal condition in topology code If this ever happens to anybody, we want to have it in his log. Signed-off-by: Stefan Richter --- drivers/firewire/fw-topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== Date: Sat, 8 Mar 2008 13:18:58 -0500 From: Jarod Wilson Subject: firewire: use bitwise and to get reg in handle_registers for code efficiency. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sat, 8 Mar 2008 12:52:03 -0500 From: Jarod Wilson Subject: firewire: replace more hex values with defined csr constants Trivial change to replace more meaningless (to the untrained eye) hex values with defined CSR constants. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.c | 2 +- drivers/firewire/fw-transaction.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) ======================================================================== Date: Fri, 7 Mar 2008 01:43:31 -0500 From: Jarod Wilson Subject: firewire: fw-sbp2: set dual-phase cycle_limit Try to write dual-phase retry protocol limits to BUSY_TIMEOUT register. - The dual-phase retry protocol is optional to implement, and if not supported, writes to the dual-phase portion of the register will be ignored. We try to write the original 1394-1995 default here. - In the case of devices that are also SBP-3-compliant, all writes are ignored, as the register is read-only, but contains single-phase retry of 15, which is what we're trying to set for all SBP-2 device anyway, so this write attempt is safe and yields more consistent behavior for all devices. See section 8.3.2.3.5 of the 1394-1995 spec, section 6.2 of the SBP-2 spec, and section 6.4 of the SBP-3 spec for further details. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) ======================================================================== Date: Fri, 7 Mar 2008 01:43:01 -0500 From: Jarod Wilson Subject: firewire: fw-sbp2: set single-phase retry_limit Per the SBP-2 specification, all SBP-2 target devices must have a BUSY_TIMEOUT register. Per the 1394-1995 specification, the retry_limt portion of the register should be set to 0x0 initially, and set on the target by a logged in initiator (i.e., a Linux host w/firewire controller(s)). Well, as it turns out, lots of devices these days have actually moved on to starting to implement SBP-3 compliance, which says that retry_limit should default to 0xf instead (yes, SBP-3 stomps directly on 1394-1995, oops). Prior to this change, the firewire driver stack didn't touch retry_limit, and any SBP-3 compliant device worked fine, while SBP-2 compliant ones were unable to retransmit when the host returned an ack_busy_X, which resulted in stalled out I/O, eventually causing the SCSI layer to give up and offline the device. The simple fix is for us to set retry_limit to 0xf in the register for all devices (which actually matches what the old ieee1394 stack did). Prior to this change, a hard disk behind an SBP-2 Prolific PL-3507 bridge chip would routinely encounter buffer I/O errors and wind up offlined by the SCSI layer. With this change, I've encountered zero I/O failures moving tens of GB of data around. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) ======================================================================== 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: Mon, 24 Mar 2008 20:54:28 +0100 (CET) From: Stefan Richter Subject: firewire: reread config ROM when device reset the bus When a device changes its configuration ROM, it announces this with a bus reset. firewire-core has to check which node initiated a bus reset and whether any unit directories went away or were added on this node. Tested with an IOI FWB-IDE01AB which has its link-on bit set if bus power is available but does not respond to ROM read requests if self power is off. This implements - recognition of the units if self power is switched on after fw-core gave up the initial attempt to read the config ROM, - shutdown of the units when self power is switched off. Also tested with a second PC running Linux/ieee1394. When the eth1394 driver is inserted and removed on that node, fw-core now notices the addition and removal of the IPv4 unit on the ieee1394 node. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 2 drivers/firewire/fw-cdev.c | 13 + drivers/firewire/fw-device.c | 222 +++++++++++++++++++++++++++------ drivers/firewire/fw-device.h | 11 + drivers/firewire/fw-sbp2.c | 8 - drivers/firewire/fw-topology.c | 3 drivers/firewire/fw-topology.h | 11 - 7 files changed, 223 insertions(+), 47 deletions(-) ======================================================================== Date: Sun, 2 Mar 2008 19:35:42 +0100 (CET) From: Stefan Richter Subject: firewire: replace static ROM cache by allocated cache read_bus_info_block() is repeatedly called by workqueue jobs. These will step on each others toes eventually if there are multiple workqueue threads, and we end up with corrupt config ROM images. Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.c | 41 +++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 14 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 | 113 +++++++++++++++--------------------- 1 file changed, 49 insertions(+), 64 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: Sat, 1 Mar 2008 12:35:29 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: refactor probe, remove, suspend, resume Clean up shared code and variable names. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 100 +++++++++++++++---------------------- 1 file changed, 42 insertions(+), 58 deletions(-) ======================================================================== Date: Sat, 1 Mar 2008 12:34:50 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: 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/firewire/fw-ohci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ======================================================================== Date: Sat, 1 Mar 2008 02:47:15 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: Apple UniNorth 1st generation support Mostly copied from ohci1394.c. Necessary for some older Macs, e.g. PowerBook G3 Pismo and early PowerBook G4 Titanium. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) ======================================================================== Date: Sat, 1 Mar 2008 02:42:56 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: PPC PMac platform code Copied from ohci1394.c. This code is necessary to prevent machine check exceptions when reloading or resuming the driver. Tested on a 1st generation PowerBook G4 Titanium, which also needs the pci_probe() hunk. Signed-off-by: Stefan Richter I was able to reproduce the system exception on resume with a 3rd-gen Titanium PowerBook G4 667, and this patch does let the system resume successfully now. Not quite clear if there was possibly an updated version coming using pci_enable_device() instead of the pair of pmac_call_feature() calls, but either way, this is a definite must-have, at least for older ppc macs -- my Aluminum PowerBook G4/1.67 suspends and resumes without this patch just fine. Signed-off-by: Jarod Wilson Acked-by: Benjamin Herrenschmidt --- drivers/firewire/fw-ohci.c | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) ======================================================================== Date: Thu, 28 Feb 2008 20:54:43 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: add option for remote debugging This way firewire-ohci can be used for remote debugging like ohci1394. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 9 +++++++++ lib/Kconfig.debug | 11 +++++++++++ 2 files changed, 20 insertions(+) ======================================================================== Date: Thu, 28 Feb 2008 20:53:45 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: reduce log noise The block/unblock logic is now sufficiently tested. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ======================================================================== Date: Thu, 28 Feb 2008 20:52:43 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: remove unnecessary memset orb came from kzalloc. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 3 --- 1 file changed, 3 deletions(-) ======================================================================== Date: Thu, 28 Feb 2008 20:52:02 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: simplify some macros How hard can it be to switch on one bit? :-) Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) ======================================================================== Date: Thu, 28 Feb 2008 20:51:11 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: remove usages of fw_memcpy_to_be32 Write directly in big endian instead of byte-swapping after the fact. This saves a few conversions, lets gcc use constant endianess conversions where possible, and enables deeper endianess annotation. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 96 ++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 52 deletions(-) ======================================================================== Date: Sun, 24 Feb 2008 19:01:21 +0100 (CET) From: Stefan Richter Subject: firewire: refactor fw_unit reference counting Add wrappers for getting and putting a unit. Remove some line breaks. Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.h | 27 +++++++++++++++++---------- drivers/firewire/fw-sbp2.c | 4 ++-- 2 files changed, 19 insertions(+), 12 deletions(-) ======================================================================== Date: Sun, 24 Feb 2008 19:00:51 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: fix reference counting The reference count of the unit dropped too low in an error path in sbp2_probe. Fixed by moving the _get further up. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ======================================================================== Date: Sun, 24 Feb 2008 18:59:55 +0100 (CET) From: Stefan Richter Subject: firewire: remove superfluous reference counting The card->kref became obsolete since patch "firewire: fix crash in automatic module unloading" added another counter of card users. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 38 ------------------------------ drivers/firewire/fw-ohci.c | 8 +++--- drivers/firewire/fw-transaction.h | 4 --- 3 files changed, 4 insertions(+), 46 deletions(-) ======================================================================== Date: Wed, 27 Feb 2008 22:14:27 +0100 (CET) From: Stefan Richter Subject: firewire: fix crash in automatic module unloading "modprobe firewire-ohci; sleep .1; modprobe -r firewire-ohci" used to result in crashes like this: BUG: unable to handle kernel paging request at ffffffff8807b455 IP: [] PGD 203067 PUD 207063 PMD 7c170067 PTE 0 Oops: 0010 [1] PREEMPT SMP CPU 0 Modules linked in: i915 drm cpufreq_ondemand acpi_cpufreq freq_table applesmc input_polldev led_class coretemp hwmon eeprom snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss button thermal processor sg snd_hda_intel snd_pcm snd_timer snd snd_page_alloc sky2 i2c_i801 rtc [last unloaded: crc_itu_t] Pid: 9, comm: events/0 Not tainted 2.6.25-rc2 #3 RIP: 0010:[] [] RSP: 0018:ffff81007dcdde88 EFLAGS: 00010246 RAX: ffff81007dc95040 RBX: ffff81007dee5390 RCX: 0000000000005e13 RDX: 0000000000008c8b RSI: 0000000000000001 RDI: ffff81007dee5388 RBP: ffff81007dc5eb40 R08: 0000000000000002 R09: ffffffff8022d05c R10: ffffffff8023b34c R11: ffffffff8041a353 R12: ffff81007dee5388 R13: ffffffff8807b455 R14: ffffffff80593bc0 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffffffff8055a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: ffffffff8807b455 CR3: 0000000000201000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process events/0 (pid: 9, threadinfo ffff81007dcdc000, task ffff81007dc95040) Stack: ffffffff8023b396 ffffffff88082524 0000000000000000 ffffffff8807d9ae ffff81007dc5eb40 ffff81007dc9dce0 ffff81007dc5eb40 ffff81007dc5eb80 ffff81007dc9dce0 ffffffffffffffff ffffffff8023be87 0000000000000000 Call Trace: [] ? run_workqueue+0xdf/0x1df [] ? worker_thread+0xd8/0xe3 [] ? autoremove_wake_function+0x0/0x2e [] ? worker_thread+0x0/0xe3 [] ? kthread+0x47/0x74 [] ? trace_hardirqs_on_thunk+0x35/0x3a [] ? child_rip+0xa/0x12 [] ? restore_args+0x0/0x3d [] ? kthreadd+0x14c/0x171 [] ? kthreadd+0x14c/0x171 [] ? kthread+0x0/0x74 [] ? child_rip+0x0/0x12 Code: Bad RIP value. RIP [] RSP CR2: ffffffff8807b455 ---[ end trace c7366c6657fe5bed ]--- Note that this crash happened _after_ firewire-core was unloaded. The shared workqueue tried to run firewire-core's device initialization jobs or similar jobs. The fix makes sure that firewire-ohci and hence firewire-core is not unloaded before all device shutdown jobs have been completed. This is determined by the count of device initializations minus device releases. Also skip useless retries in the node initialization job if the node is to be shut down. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 10 +++++++++- drivers/firewire/fw-device.c | 21 ++++++--------------- drivers/firewire/fw-device.h | 16 ++++++++++++++-- drivers/firewire/fw-sbp2.c | 4 ++++ drivers/firewire/fw-transaction.h | 2 ++ 5 files changed, 35 insertions(+), 18 deletions(-) ======================================================================== Date: Sun, 24 Feb 2008 18:57:23 +0100 (CET) From: Stefan Richter Subject: firewire: invalid pointers used in fw_card_bm_work The bus management workqueue job was in danger to dereference NULL pointers. Also, after having temporarily lifted card->lock, a few node pointers and a device pointer may have become invalid. Add NULL pointer checks and get the necessary references. Also, move card->local_node out of fw_card_bm_work's sight during shutdown of the card. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 51 ++++++++++++++++++++++----------- drivers/firewire/fw-topology.c | 1 2 files changed, 35 insertions(+), 17 deletions(-) ======================================================================== Date: Sat, 23 Feb 2008 12:24:57 +0100 (CET) From: Stefan Richter Subject: firewire: endianess annotations Kills warnings from 'make C=1 CHECKFLAGS="-D__CHECK_ENDIAN__" modules': drivers/firewire/fw-transaction.c:771:10: warning: incorrect type in assignment (different base types) drivers/firewire/fw-transaction.c:771:10: expected unsigned int [unsigned] [usertype] drivers/firewire/fw-transaction.c:771:10: got restricted unsigned int [usertype] drivers/firewire/fw-transaction.h:93:10: warning: incorrect type in assignment (different base types) drivers/firewire/fw-transaction.h:93:10: expected unsigned int [unsigned] [usertype] drivers/firewire/fw-transaction.h:93:10: got restricted unsigned int [usertype] drivers/firewire/fw-ohci.c:1490:8: warning: restricted degrades to integer drivers/firewire/fw-ohci.c:1490:35: warning: restricted degrades to integer drivers/firewire/fw-ohci.c:1516:5: warning: cast to restricted type Signed-off-by: Stefan Richter Cc: sparclinux@vger.kernel.org Cc: linuxppc-dev@ozlabs.org --- drivers/firewire/fw-ohci.c | 4 ++-- drivers/firewire/fw-transaction.c | 2 +- drivers/firewire/fw-transaction.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) ======================================================================== Date: Sat, 23 Feb 2008 12:24:17 +0100 (CET) From: Stefan Richter Subject: firewire: endianess fix The generation of incoming requests was filled in in wrong byte order on machines with big endian CPU. Signed-off-by: Stefan Richter Cc: sparclinux@vger.kernel.org Cc: linuxppc-dev@ozlabs.org --- drivers/firewire/fw-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Tue, 26 Feb 2008 23:30:02 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: better fix for NULL pointer dereference in scsi_remove_device Patch "firewire: fw-sbp2: fix NULL pointer deref. in scsi_remove_device" had the unintended effect that firewire-sbp2 could not be unloaded anymore until all SBP-2 devices were unplugged. We now fix the NULL pointer bug by reacquiring a reference to the sdev instead of holding a reference to the sdev (and to the module) all the time. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 46 +++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 19 deletions(-) ======================================================================== Date: Wed, 20 Feb 2008 21:10:06 +0100 (CET) From: Stefan Richter Subject: firewire: fix NULL pointer deref. and resource leak By supplying ioctl()s in the wrong order, a userspace client was able to trigger NULL pointer dereferences. Furthermore, by calling ioctl_create_iso_context more than once, new contexts could be created without ever freeing the previously created contexts. Thanks to Anders Blomdell for the report. Signed-off-by: Stefan Richter --- drivers/firewire/fw-cdev.c | 9 +++++++-- 1 file changed, 7 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: Tue, 19 Feb 2008 09:05:49 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: fix NULL pointer deref. in scsi_remove_device Fix a kernel bug when unplugging an SBP-2 device after having its scsi_device already removed via the "delete" sysfs attribute. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== Date: Sun, 17 Feb 2008 14:56:19 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: fix NULL pointer deref. in slave_alloc Fix a kernel bug when running rescan-scsi-bus while a FireWire disk is connected: http://bugzilla.kernel.org/show_bug.cgi?id=10008 Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 4 ++++ 1 file changed, 4 insertions(+) ======================================================================== Date: Sat, 16 Feb 2008 16:37:28 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: (try to) avoid I/O errors during reconnect While fw-sbp2 takes the necessary time to reconnect to a logical unit after bus reset, the SCSI core keeps sending new commands. They are all immediately completed with host busy status, and application clients or filesystems will break quickly. The SCSI device might even be taken offline: http://bugzilla.kernel.org/show_bug.cgi?id=9734 The only remedy seems to be to block the SCSI device until reconnect. Alas the SCSI core has no useful API to block only one logical unit i.e. the scsi_device, therefore we block the entire Scsi_Host. This currently corresponds to an SBP-2 target. In case of targets with multiple logical units, we need to satisfy the dependencies between logical units by carefully tracking the blocking state of the target and its units. We block all logical units of a target as soon as one of them needs to be blocked, and keep them blocked until all of them are ready to be unblocked. Furthermore, as the history of the old sbp2 driver has shown, the scsi_block_requests() API is a minefield with high potential of deadlocks. We therefore take extra measures to keep logical units unblocked during __scsi_add_device() and during shutdown. This avoids I/O errors during reconnect in many but alas not in all cases. There may still be errors after a re-login had to be performed. Also, some bridges have been seen to cease fetching management ORBs if I/O went on up until a bus reset. In these cases, all management ORBs time out after mgt_orb_timeout. The old sbp2 driver is less vulnerable or maybe not vulnerable to this, for as yet unknown reasons. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 126 +++++++++++++++++++++++++++++++++++-- 1 file changed, 122 insertions(+), 4 deletions(-) ======================================================================== Date: Fri, 15 Feb 2008 21:29:02 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: enforce a retry of __scsi_add_device if bus generation changed fw-sbp2 is unable to reconnect while performing __scsi_add_device because there is only a single workqueue thread context available for both at the moment. This should be fixed eventually. An actual failure of __scsi_add_device is easy to handle, but an incomplete execution of __scsi_add_device with an sdev returned would remain undetected and leave the SBP-2 target unusable. Therefore we use a workaround: If there was a bus reset during __scsi_add_device (i.e. during the SCSI probe), we remove the new sdev immediately, log out, and attempt login and SCSI probe again. Tested-by: Jarod Wilson (earlier version) Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 51 ++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 15 deletions(-) ======================================================================== Date: Sun, 3 Feb 2008 23:12:17 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: sort includes Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ======================================================================== Date: Sun, 3 Feb 2008 23:11:39 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: logout and login after failed reconnect If fw-sbp2 was too late with requesting the reconnect, the target would reject this. In this case, log out before attempting the reconnect. Else several firmwares will deny the re-login because they somehow didn't invalidate the old login. Also, don't retry reconnects in this situation. The retries won't succeed either. These changes improve chances for successful re-login and shorten the period during which the logical unit is inaccessible. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 3 Feb 2008 23:10:47 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: don't add scsi_device twice When a reconnect failed but re-login succeeded, __scsi_add_device was called again. In those cases, __scsi_add_device succeeded and returned the pointer to the existing scsi_device. fw-sbp2 then continued orderly, except that it missed to call sbp2_cancel_orbs. SCSI core would call fw-sbp2's eh_abort_handler eventually if there had been an outstanding command. This patch avoids the needless lookups and temporary allocations in SCSI core and I/O stall and timeout until eh_abort_handler hits. Also, __scsi_add_device tolerating calls for devices which already exist is undocumented behavior on which we shouldn't rely. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 6 ++++++ 1 file changed, 6 insertions(+) ======================================================================== Date: Sun, 3 Feb 2008 23:09:50 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: log bus_id at management request failures for easier readable logs if more than one SBP-2 device is present. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 66 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-) ======================================================================== Date: Sun, 3 Feb 2008 23:08:58 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: wait for completion of fetch agent reset Like the old sbp2 driver, wait for the write transaction to the AGENT_RESET to complete before proceeding (after login, after reconnect, or in SCSI error handling). There is one occasion where AGENT_RESET is written to from atomic context when getting DEAD status for a command ORB. There we still continue without waiting for the transaction to complete because this is more difficult to fix... Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 39 ++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) ======================================================================== 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 Signed-off-by: Jarod Wilson --- drivers/ieee1394/sbp2.c | 12 ++++++++++++ drivers/ieee1394/sbp2.h | 2 ++ 2 files changed, 14 insertions(+) ======================================================================== Date: Sun, 3 Feb 2008 23:04:38 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: add INQUIRY delay workaround Several different SBP-2 bridges accept a login early while the IDE device is still powering up. They are therefore unable to respond to SCSI INQUIRY immediately, and the SCSI core has to retry the INQUIRY. One of these retries is typically successful, and all is well. But in case of Momobay FX-3A, the INQUIRY retries tend to fail entirely. This can usually be avoided by waiting a little while after login before letting the SCSI core send the INQUIRY. The old sbp2 driver handles this more gracefully for as yet unknown reasons (perhaps because it waits for fetch agent resets to complete, unlike fw-sbp2 which quickly proceeds after requesting the agent reset). Therefore the workaround is not as much necessary for sbp2. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) ======================================================================== Date: Sun, 3 Feb 2008 23:03:00 +0100 (CET) From: Stefan Richter Subject: firewire: log GUID of new devices This should help to interpret user reports. E.g. one can look up the vendor OUI (first three bytes of the GUID) and thus tell what is what. Also simplifies the math in the GUID sysfs attribute. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-device.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) ======================================================================== Date: Sun, 27 Jan 2008 19:14:44 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: don't retry login or reconnect after unplug If a device is being unplugged while fw-sbp2 had a login or reconnect on schedule, it would take about half a minute to shut the fw_unit down: Jan 27 18:34:54 stein firewire_sbp2: logged in to fw2.0 LUN 0000 (0 retries) Jan 27 18:34:59 stein firewire_sbp2: sbp2_scsi_abort Jan 27 18:34:59 stein scsi 25:0:0:0: Device offlined - not ready after error recovery Jan 27 18:35:01 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:06 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:12 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:17 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:22 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:27 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:32 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:32 stein firewire_sbp2: failed to login to fw2.0 LUN 0000 Jan 27 18:35:32 stein firewire_sbp2: released fw2.0 After this patch, typically only a few seconds spent in __scsi_add_device remain: Jan 27 19:05:50 stein firewire_sbp2: logged in to fw2.0 LUN 0000 (0 retries) Jan 27 19:05:56 stein firewire_sbp2: sbp2_scsi_abort Jan 27 19:05:56 stein scsi 33:0:0:0: Device offlined - not ready after error recovery Jan 27 19:05:56 stein firewire_sbp2: released fw2.0 The benefit of this is less noise in the syslog. It furthermore avoids a few wasted CPU cycles and needlessly prolonged lifetime of a few driver objects. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) ======================================================================== Date: Sat, 2 Feb 2008 15:01:09 +0100 (CET) From: Stefan Richter Subject: firewire: fix "kobject_add failed for fw* with -EEXIST" There is a race between shutdown and creation of devices: fw-core may attempt to add a device with the same name of an already existing device. http://bugzilla.kernel.org/show_bug.cgi?id=9828 Impact of the bug: Happens rarely (when shutdown of a device coincides with creation of another), forces the user to unplug and replug the new device to get it working. The fix is obvious: Free the minor number *after* instead of *before* device_unregister(). This requires to take an additional reference of the fw_device as long as the IDR tree points to it. And while we are at it, we fix an additional race condition: fw_device_op_open() took its reference of the fw_device a little bit too late, hence was in danger to access an already invalid fw_device. Signed-off-by: Stefan Richter --- drivers/firewire/fw-cdev.c | 8 +++++--- drivers/firewire/fw-device.c | 20 ++++++++++++++------ drivers/firewire/fw-device.h | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) ======================================================================== Date: Sat, 26 Jan 2008 17:43:23 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: fix logout before login retry This fixes a "can't recognize device" kind of bug. If the SCSI INQUIRY failed and hence __scsi_add_device failed due to a bus reset, we tried a logout and then waited for the already scheduled login work to happen. So far so good, but the generation used for the logout was outdated, hence the logout never reached the target. The target might therefore deny the subsequent relogin attempt, which would also leave the target inaccessible. Therefore fetch a fresh device->generation for the logout. Use memory barriers to prevent our plan being foiled by compiler or hardware optimizations. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ======================================================================== Date: Sat, 26 Jan 2008 17:42:45 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: unsigned int vs. unsigned Standardize on "unsigned int" style. Sort some struct members thematically. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) ======================================================================== Date: Fri, 25 Jan 2008 23:31:12 -0500 From: Jarod Wilson Subject: firewire: fw-sbp2: Use sbp2 device-provided mgt orb timeout for logins To be more compliant with section 7.4.8 of the SBP-2 specification, use the mgt_ORB_timeout specified in the SBP-2 device's config rom for login ORB attempts (though with some sanity checks). A happy side-effect is that certain device and controller combinations that sometimes take more than 20 seconds to get synced up (like my laptop with just about any SBP-2 device) now function more reliably. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter (silenced sparse) --- drivers/firewire/fw-sbp2.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) ======================================================================== Date: Sat, 19 Jan 2008 13:15:05 +0100 (CET) From: Jarod Wilson Subject: firewire: fw-sbp2: increase login orb reply timeout, fix "failed to login" Increase (and rename) the login orb reply timeout value to 20s to match that of the old firewire stack. 2s simply didn't give many devices enough time to spin up and reply. Fixes inability to recognize some devices. Failure mode was "orb reply timed out"/"failed to login". Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter (style, comments, changelog) --- drivers/firewire/fw-sbp2.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) ======================================================================== Date: Wed, 23 Jan 2008 16:05:45 -0500 From: Jarod Wilson Subject: firewire: replace subtraction with bitwise and Replace an unnecessary subtraction with a bitwise AND when determining the value of ext_tcode in fw_fill_transaction() to save a cpu cycle or two in a somewhat critical path. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Fri, 25 Jan 2008 17:53:49 +0100 (CET) From: Stefan Richter Subject: firewire: fw-core: react on bus resets while the config ROM is being fetched read_rom() obtained a fresh new fw_device.generation for each read transaction. Hence it was able to continue reading in the middle of the ROM even if a bus reset happened. However the device may have modified the ROM during the reset. We would end up with a corrupt fetched ROM image then. Although all of this is quite unlikely, it is not impossible. Therefore we now restart reading the ROM if the bus generation changed. Note, the memory barrier in read_rom() is still necessary according to tests by Jarod Wilson, despite of the ->generation access being moved up in the call chain. Signed-off-by: Stefan Richter This is essentially what I've been beating on locally, and I've yet to hit another config rom read failure with it. Signed-off-by: Jarod Wilson --- drivers/firewire/fw-device.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) ======================================================================== Date: Fri, 25 Jan 2008 18:57:41 +0100 (CET) From: Stefan Richter Subject: firewire: enforce access order between generation and node ID, fix "giving up on config rom" fw_device.node_id and fw_device.generation are accessed without mutexes. We have to ensure that all readers will get to see node_id updates before generation updates. Fixes an inability to recognize devices after "giving up on config rom", https://bugzilla.redhat.com/show_bug.cgi?id=429950 Signed-off-by: Stefan Richter Reviewed by Nick Piggin . Verified to fix 'giving up on config rom' issues on multiple system and drive combinations that were previously affected. Signed-off-by: Jarod Wilson Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-cdev.c | 1 + drivers/firewire/fw-device.c | 15 +++++++++++++-- drivers/firewire/fw-device.h | 12 ++++++++++++ drivers/firewire/fw-sbp2.c | 3 +++ drivers/firewire/fw-topology.c | 6 ++++++ 5 files changed, 35 insertions(+), 2 deletions(-) ======================================================================== Date: Thu, 24 Jan 2008 01:53:51 +0100 (CET) From: Stefan Richter Subject: firewire: fw-cdev: use device generation, not card generation We have to use the fw_device.generation here, not the fw_card.generation, because the generation must never be newer than the node ID when we emit a transaction. This cannot be guaranteed with fw_card.generation. Signed-off-by: Stefan Richter Verified in concert with subsequent memory barriers patch to fix 'giving up on config rom' issues on multiple system and drive combinations that were previously affected. Signed-off-by: Jarod Wilson --- This code also needs barriers to work precisely as intended. They will be added by a subsequent patch which consistently updates readers and writers of .generation and .node_id. drivers/firewire/fw-cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Thu, 24 Jan 2008 01:53:19 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: use device generation, not card generation There was a small window where a login or reconnect job could use an already updated card generation with an outdated node ID. We have to use the fw_device.generation here, not the fw_card.generation, because the generation must never be newer than the node ID when we emit a transaction. This cannot be guaranteed with fw_card.generation. Furthermore, the target's and initiator's node IDs can be obtained from fw_device and fw_card. Dereferencing their underlying topology objects is not necessary. Signed-off-by: Stefan Richter Verified in concert with subsequent memory barriers patch to fix 'giving up on config rom' issues on multiple system and drive combinations that were previously affected. Signed-off-by: Jarod Wilson --- Rework of patch "firewire: fw-sbp2: enforce read order of device generation and node ID" from November 1 2007. This code also needs barriers to work precisely as intended. They will be added by a subsequent patch which consistently updates readers and writers of .generation and .node_id. drivers/firewire/fw-sbp2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ======================================================================== Date: Sun, 20 Jan 2008 01:25:31 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: try to increase reconnect_hold (speed up reconnection) Ask the target to grant 4 seconds instead of the standard and minimum of 1 second window after bus reset for reconnection. This accelerates reconnection if there are more than one targets on the bus: If a login and inquiry to one target blocks the fw-sbp2 workqueue for more than 1s after bus reset, we now still can reconnect to the other target. Before that, fw-sbp2's reconnect attempts would be rejected with "error status: 0:9" (function rejected), and fw-sbp2 would finally re-login. All those futile reconnect attemps cost extra time until the target which needs re-login is ready for I/O again. The reconnect timeout field in the login ORB doesn't have to be honored by the target though. I found that we could get up to - allegedly 32768s from an old OXFW911 firmware - 256s from LSI bridges - 4s from OXUF922 and OXFW912 bridges, - 2s from TI bridges, - only the standard 1s from Initio and Prolific bridges and from Apple OpenFirmware in target mode. We just try to get 4 seconds which already covers the case of a few HDDs on the same bus quite nicely. A minor drawback occurs in the following (rare and impractical) border case: - two initiators are there, initiator 1 holds an exclusive login to a target, - initiator 1 goes off the bus, - target refuses login attempts from initiator 2 until reconnect_hold seconds after bus reset. An alternative approach to the issue at hand would be to parallelize fw-sbp2's reconnect and login work. Signed-off-by: Stefan Richter Acked-by: Jarod Wilson --- drivers/firewire/fw-sbp2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 20 Jan 2008 01:24:26 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: skip unnecessary logout Don't attempt to send a logout ORB if the target was already unplugged or had its link switched off. If two targets are attached, this enhances the chance to quickly reconnect to the remaining target when one target is plugged out. Signed-off-by: Stefan Richter Acked-by: Jarod Wilson --- This obsoletes patch "fw-sbp2: quiet logout errors on device removal". drivers/firewire/fw-sbp2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 06 Jan 2008 17:21:41 -0500 From: David Moore Subject: firewire: fw-ohci: Dynamically allocate buffers for DMA descriptors Previously, the fw-ohci driver used fixed-length buffers for storing descriptors for isochronous receive DMA programs. If an application (such as libdc1394) generated a DMA program that was too large, fw-ohci would reach the limit of its fixed-sized buffer and return an error to userspace. This patch replaces the fixed-length ring-buffer with a linked-list of page-sized buffers. Additional buffers can be dynamically allocated and appended to the list when necessary. For a particular context, buffers are kept around after use and reused as necessary, so there is no allocation taking place after the DMA program is generated for the first time. In addition, the buffers it uses are coherent for DMA so there is no syncing required before and after writes. This syncing wasn't properly done in the previous version of the code. - This is the fourth version of my patch that replaces a fixed-length buffer for DMA descriptors with a dynamically allocated linked-list of buffers. As we discovered with the last attempt, new context programs are sometimes queued from interrupt context, making it unacceptable to call tasklet_disable() from context_get_descriptors(). This version of the patch uses ohci->lock for all locking needs instead of tasklet_disable/enable. There is a new requirement that context_get_descriptors() be called while holding ohci->lock. It was already held for the AT context, so adding the requirement for the iso context did not seem particularly onerous. In addition, this has the side benefit of allowing iso queue to be safely called from concurrent user-space threads, which previously was not safe. Signed-off-by: David Moore Signed-off-by: Kristian Høgsberg Signed-off-by: Jarod Wilson - Fixes the following issues: - Isochronous reception stopped prematurely if an application used a larger buffer. (Reproduced with coriander.) - Isochronous reception stopped after one or a few frames on VT630x in OHCI 1.0 mode. (Fixes reception in coriander, but dvgrab still doesn't work with these chips.) Patch update: struct member alignment, whitespace nits Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 232 ++++++++++++++++++++++++------------- 1 file changed, 154 insertions(+), 78 deletions(-) ======================================================================== Date: Sat, 22 Dec 2007 22:14:52 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: CycleTooLong interrupt management The firewire-ohci driver so far lacked the ability to resume cycle master duty after that condition happened, as added to ohci1394 in Linux 2.6.18 by commit 57fdb58fa5a140bdd52cf4c4ffc30df73676f0a5. This ports this patch to fw-ohci. The "cycle too long" condition has been seen in practice - with IIDC cameras if a mode with packets too large for a speed is chosen, - sporadically when capturing DV on a VIA VT6306 card with ohci1394/ ieee1394/ raw1394/ dvgrab 2. https://bugzilla.redhat.com/show_bug.cgi?id=415841#c7 (This does not fix Fedora bug 415841.) Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ======================================================================== Date: Fri, 21 Dec 2007 23:02:15 +0530 From: Rabin Vincent Subject: firewire: Fix extraction of source node id Fix extraction of the source node id from the packet header. Signed-off-by: Rabin Vincent Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Wed, 19 Dec 2007 15:26:38 -0500 From: David Moore Subject: firewire: fw-ohci: Bug fixes for packet-per-buffer support This patch corrects a number of bugs in the current OHCI 1.0 packet-per-buffer support: 1. Correctly deal with payloads that cross a page boundary. The previous version would not split the descriptor at such a boundary, potentially corrupting unrelated memory. 2. Allow user-space to specify multiple packets per struct fw_cdev_iso_packet in the same way that dual-buffer allows. This is signaled by header_length being a multiple of header_size. This multiple determines the number of packets. The payload size allocated per packet is determined by dividing the total payload size by the number of packets. 3. Make sync support work properly for packet-per-buffer. I have tested this patch with libdc1394 by forcing my OHCI 1.1 controller to use the packet-per-buffer support instead of dual-buffer. I would greatly appreciate testing by those who have a DV devices and other types of iso streamers to make sure I didn't cause any regressions. Stefan, with this patch, I'm hoping that libdc1394 will work with all your OHCI 1.0 controllers now. The one bit of future work that remains for packet-per-buffer support is the automatic compaction of short payloads that I discussed with Kristian. Signed-off-by: David Moore Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 99 ++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 50 deletions(-) ======================================================================== Date: Wed, 19 Dec 2007 03:09:18 -0500 From: David Moore Subject: firewire: fw-ohci: Fix for dualbuffer three-or-more buffers This patch fixes the problem where different OHCI 1.1 controllers behave differently when a received iso packet straddles three or more buffers when using the dual-buffer receive mode. Two changes are made in order to handle this situation: 1. The packet sync DMA descriptor is given a non-zero header length and non-zero payload length. This is because zero-payload descriptors are not discussed in the OHCI 1.1 specs and their behavior is thus undefined. Instead we use a header size just large enough for a single header and a payload length of 4 bytes for this first descriptor. 2. As we process received packets in the context's tasklet, read the packet length out of the headers. Keep track of the running total of the packet length as "excess_bytes", so we can ignore any descriptors where no packet starts or ends. These descriptors may not have had their first_res_count or second_res_count fields updated by the controller so we cannot rely on those values. The main drawback of this patch is that the excess_bytes value might get "out of sync" with the packet descriptors if something strange happens to the DMA program. I'm not if such a thing could ever happen, but I appreciate any suggestions in making it more robust. Also, the packet-per-buffer support may need a similar fix to deal with issue 1, but I haven't done any work on that yet. Stefan, I'm hoping that with this patch, all your OHCI 1.1 controllers will work properly with an unmodified version of libdc1394. Signed-off-by: David Moore Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 44 ++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) ======================================================================== 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:32:11 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: remove unused misleading macro SBP2_MAX_SECTORS is nowhere used in fw-sbp2. It merely got copied over from sbp2 where it played a role in the past. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 2 -- 1 file changed, 2 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: Sat, 15 Dec 2007 14:04:42 +0100 (CET) From: Stefan Richter Subject: ieee1394: small cleanup after "nopage" Signed-off-by: Stefan Richter --- drivers/ieee1394/dma.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) ======================================================================== Date: Wed, 05 Dec 2007 18:15:53 +1100 From: Nick Piggin Subject: ieee1394: nopage Convert ieee1394 from nopage to fault. Remove redundant vma range checks (correct resource range check is retained). Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter --- drivers/ieee1394/dma.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) ======================================================================== Date: Mon, 03 Dec 2007 13:43:12 -0500 From: Jarod Wilson Subject: firewire: OHCI 1.0 Isochronous Receive support Third rendition of FireWire OHCI 1.0 Isochronous Receive support, using a zer-copy method similar to OHCI 1.1 which puts the IR data payload directly into the userspace buffer. The zero-copy implementation eliminates the video artifacts, audio popping, and buffer underrun problems seen with version 1 of this patch, as well as fixing a regression in OHCI 1.1 support introduced by version 2 of this patch. Successfully tested in OHCI 1.1 mode on the following chipsets: - NEC uPD72847 (rev 01), OHCI 1.1 (PCI) - Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe) - Ti TSB41AB2 (rev 01), OHCI 1.1 (PCI on SB Audigy) - Apple UniNorth 2 (rev 81), OHCI 1.1 (PowerBook G4 onboard) Successfully tested in OHCI 1.0 mode on the following chipsets: - Agere FW323 (rev 06), OHCI 1.0 (Mac Mini onboard) - Agere FW323 (rev 06), OHCI 1.0 (PCI) - Via VT6306 (rev 46), OHCI 1.0 (PCI) - NEC OrangeLink (rev 01), OHCI 1.0 (PCI) - NEC uPD72847 (rev 01), OHCI 1.1 (PCI) - Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe) The bulk of testing was done in an x86_64 system, but was also successfully sanity-tested on other systems, including a PPC(32) PowerBook G4 and an i686 EPIA M10k. Crude benchmarking (watching top during capture) puts the cpu utilization during capture on the EPIA's 1GHz Via C3 processor around 13%, which is down from 30% with the v1 code. Some implementation details: To maintain the same userspace API as dual-buffer mode, we set up two descriptors for every incoming packet. The first is an INPUT_MORE descriptor, pointing to a buffer large enough to hold just the packet's iso headers, immediately followed by an INPUT_LAST descriptor, pointing to a chunk of the userspace buffer big enough for the packet's data payload. With this setup, each incoming packet fills in these two descriptors in a manner that very closely emulates dual-buffer receive, to the point where the bulk of the handle_ir_* code is now identical between the two (and probably primed for some restructuring to share code between them). The only caveat I have at the moment is that neither of my OHCI 1.0 Via VT6307-based FireWire controllers work particularly well with this code for reasons I have yet to figure out. Signed-off-by: Jarod Wilson Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 175 ++++++++++++++++++++++++++++++++----- 1 file changed, 155 insertions(+), 20 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: Wed, 7 Nov 2007 01:12:51 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: refactor workq and kref handling This somewhat reduces the size of firewire-sbp2.ko. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 56 +++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 26 deletions(-) ======================================================================== Date: Wed, 7 Nov 2007 01:11:56 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: fix refcounting Since patch "fw-sbp2: use an own workqueue (fix system responsiveness)" increased parallelism between fw-sbp2 and fw-core, it was possible that fw-sbp2 didn't release the SCSI device when the FireWire device was disconnected. This happened if sbp2_update() ran during sbp2_login(), because a bus reset occurred during sbp2_login(). The sbp2_login() work would [try to] reschedule itself because it failed due to the bus reset, and it would _not_ drop its reference on the target. However, sbp2_update() would schedule sbp2_login() too before sbp2_login() rescheduled itself and hence sbp2_update() would take an additional reference. And then we would have one reference too many. The fix is to _always_ drop the reference when leaving the sbp2_login() work. If the sbp2_login() work reschedules itself, it takes a reference, but only if it wasn't already rescheduled by sbp2_update(). Ditto in the sbp2_reconnect() work. The resulting code is actually simpler than before: We _always_ take a reference when successfully scheduling work. And we _always_ drop a reference when leaving a workqueue job. No exceptions. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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, 19 Oct 2007 23:55:04 +0000 (+0200) From: Uwe Kleine-König Subject: fix typo "insted" -> "instead" X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=dbe7f76dd6e7ed4991870f0c779d758b605d9787 fix typo "insted" -> "instead" Signed-off-by: Uwe Kleine-König Signed-off-by: Adrian Bunk --- [[ only drivers/firewire part included here ]] ======================================================================== Date: Sun, 21 Oct 2007 11:20:07 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: shut up a superfluous compiler warning New warning since commit ab88ca488b8af66c3defa165874e81e695319a19, "firewire: fw-ohci: missing dma_unmap_single": drivers/firewire/fw-ohci.c: In function 'at_context_transmit': drivers/firewire/fw-ohci.c:609: warning: 'payload_bus' may be used uninitialized in this function Access to payload_bus is conditional on packet->payload_length > 0, and that won't change while in at_context_queue_packet. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 21 Oct 2007 10:43:11 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: log a note about unsupported features because there seems to be more time needed to implement this. Also, change related error return values to more appropriate ones. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ======================================================================== Date: Sun, 14 Oct 2007 19:34:40 +0100 From: Al Viro Subject: fw-cdev __user annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/firewire/fw-cdev.c | 5 +++-- 1 file changed, 3 insertions(+), 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: Mon, 8 Oct 2007 17:00:29 -0400 From: Jay Fenlason Subject: firewire: fw-cdev: reorder wakeup vs. spinlock Signed-off-by: Jay Fenlason Prompted by https://bugzilla.redhat.com/show_bug.cgi?id=323411 Signed-off-by: Stefan Richter --- drivers/firewire/fw-cdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ======================================================================== Date: Sun, 7 Oct 2007 02:21:29 +0200 (CEST) From: Yann Dirson Subject: firewire: in-code doc updates. Signed-off-by: Yann Dirson Signed-off-by: Stefan Richter (update) --- drivers/firewire/fw-topology.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ======================================================================== Date: Sun, 7 Oct 2007 02:10:11 +0200 (CEST) From: Stefan Richter Subject: firewire: a header cleanup fw_node() is not used (and not useful) outside fw-topology.c. Signed-off-by: Stefan Richter --- drivers/firewire/fw-topology.c | 4 ++++ drivers/firewire/fw-topology.h | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) ======================================================================== Date: Sat, 29 Sep 2007 10:41:58 +0200 (CEST) From: Stefan Richter Subject: firewire: adopt read cycle timer ABI from raw1394 This duplicates the read cycle timer feature of raw1394 (added in Linux 2.6.21) in firewire-core's userspace ABI. The argument to the ioctl is reordered though to ensure 32/64 bit compatibility. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-cdev.c | 26 ++++++++++++++++++++++++++ include/linux/firewire-cdev.h | 15 +++++++++++++++ 2 files changed, 41 insertions(+) ======================================================================== 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 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) ======================================================================== Date: Sat, 8 Sep 2007 14:09:19 +0200 From: Jean Delvare Subject: ieee1394: pcilynx: I2C cleanups * Delete optional and empty i2c client_register and client_unregister callbacks. * Use the proper i2c adapter ID. * Don't use a template to initialize the i2c_adapter structure, it's inefficient. * Update a misleading comment on why we use i2c_transfer rather than higher level i2c functions. Signed-off-by: Jean Delvare Signed-off-by: Stefan Richter --- drivers/ieee1394/pcilynx.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Fix pci resume to not pass in a __be32 config rom. Date: Tue, 5 Jun 2007 19:27:05 -0400 The ohci_enable() function shared between pci_probe and pci_resume takes a host endian config rom, but ohci->config_rom is __be32. This sets up the config rom in the wrong endian on little endian machine, specifically, BusOptions will be initialized to a 0 max receive size. This patch changes the way we reuse the config rom so that we avoid this problem. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) ======================================================================== Date: Thu, 30 Aug 2007 00:11:40 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: check for misconfigured bus (phyID == 63) Check NodeID.nodeNumber as per OHCI 1.1 clause 7.2.3.2. See also IEEE 1394a table 5B-1. Also, demote the "node ID not valid" message from error to notification as it is not an error condition. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 9 +++++++-- drivers/firewire/fw-ohci.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) ======================================================================== Date: Wed, 29 Aug 2007 19:40:28 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: missing dma_unmap_single at_context_queue_packet() didn't clean up in an early exit path. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 3 +++ 1 file changed, 3 insertions(+) ======================================================================== Date: Mon, 20 Aug 2007 21:58:30 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: log posted write errors Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ======================================================================== Date: Mon, 20 Aug 2007 21:41:22 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: reorder includes Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ======================================================================== Date: Mon, 20 Aug 2007 21:40:30 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: fix includes Add used includes, remove unused includes. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ======================================================================== Date: Sat, 25 Aug 2007 14:08:19 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: enforce read order for selfID generation It seems unlikely, but access to self_id_cpu[0] could at least in theory be deferred until after the loop over self_id_cpu[1..n] or even after the subsequent reg_read. Enforce the desired order by a read barrier. Also prevent the reg_read from being reordered relative to the for loop. This isn't necessary if the loop's conditional printk counts as an implicit barrier, but better make it explicit. (self_id_cpu[] is a coherent DMA buffer.) Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 3 +++ 1 file changed, 3 insertions(+) ======================================================================== Date: Sun, 12 Aug 2007 12:51:18 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: use an own workqueue (fix system responsiveness) Firewire-sbp2 did very uncooperative things in the kernel's shared workqueue: Sleeping until reception of management status from the target for up to 2 seconds, and performing SCSI inquiry and all of the setup of SCSI command set drivers via scsi_add_device. If there were transient or permanent error conditions, this caused long blockage of the kernel's events process, noticeable e.g. by blocked keyboard input. We now allocate a workqueue process exclusive to fw-sbp2. As a side effect, this also increases parallelism of fw-sbp2's login and reconnect work versus fw-core's device discovery and device update work which is performed in the shared workqueue. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 13 Aug 2007 17:48:25 +0200 From: Stefan Richter Subject: firewire: fw-sbp2: expose module parameter for workarounds On rare occasions, the ability to set one of the workaround flags at runtime may save the day. People who experience I/O errors with firewire-sbp2 while the old sbp2 driver worked for them should try workarounds=1 and report to the devel mailinglist whether that improves things. Firewire-sbp2 defaults to the SCSI stack's maximum transfer size per command, while sbp2 limits them to 128 kBytes. Flag 1 accomplishes just that. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 66 ++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 12 deletions(-) ======================================================================== Date: Sat, 25 Aug 2007 14:05:28 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: add support for multiple logical units per target Fixes "New firewire stack only recognizing half of a chain of drives", https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242254 Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.h | 5 drivers/firewire/fw-sbp2.c | 583 +++++++++++++++++++---------------- 2 files changed, 328 insertions(+), 260 deletions(-) ======================================================================== Date: Sat, 25 Aug 2007 10:40:42 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: always enable IRQs before calling command ORB callback On IOMMU-less noncoherent architectures, orb->callback will memcpy the whole SCSI command buffer for READ-like SCSI commands. It is therefore friendlier to enable IRQs before the call, like before patch "Add ref-counting for sbp2 orbs". Signed-off-by: Stefan Richter Acked-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ======================================================================== Date: Fri, 3 Aug 2007 20:56:31 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-core: local variable shadows a global one Sparse warned about it although it was apparently harmless: drivers/firewire/fw-cdev.c:624:23: warning: symbol 'interrupt' shadows an earlier one include/asm/hw_irq.h:29:13: originally declared here Signed-off-by: Stefan Richter --- drivers/firewire/fw-cdev.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) ======================================================================== Date: Tue, 17 Jul 2007 02:10:16 +0200 (CEST) From: Stefan Richter Subject: firewire: optimize fw_core_add_address_handler Potentially avoids unnecessary loop runs. Guarantee quadlet-aligned starts of address regions. Document the return values. Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 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: 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(-) ========================================================================