IEEE 1394 updates for Linux 2.6.20.y (v710 2008-05-04) drivers/Makefile | 1 drivers/firewire/Kconfig | 76 drivers/firewire/Makefile | 12 drivers/firewire/fw-card.c | 545 + drivers/firewire/fw-cdev.c | 1019 +++ drivers/firewire/fw-device.c | 901 ++ drivers/firewire/fw-device.h | 177 drivers/firewire/fw-iso.c | 158 drivers/firewire/fw-ohci.c | 2572 ++++++++ drivers/firewire/fw-ohci.h | 157 drivers/firewire/fw-sbp2.c | 1645 +++++ drivers/firewire/fw-topology.c | 565 + drivers/firewire/fw-topology.h | 76 drivers/firewire/fw-transaction.c | 919 ++ drivers/firewire/fw-transaction.h | 462 + drivers/ieee1394/.gitignore | 1 drivers/ieee1394/Kconfig | 82 drivers/ieee1394/Makefile | 10 drivers/ieee1394/config_roms.c | 93 drivers/ieee1394/config_roms.h | 20 drivers/ieee1394/csr1212.c | 932 +-- drivers/ieee1394/csr1212.h | 481 - drivers/ieee1394/dma.c | 24 drivers/ieee1394/dma.h | 22 drivers/ieee1394/dv1394.c | 51 drivers/ieee1394/eth1394.c | 914 +- drivers/ieee1394/eth1394.h | 29 drivers/ieee1394/highlevel.c | 124 drivers/ieee1394/highlevel.h | 69 drivers/ieee1394/hosts.c | 36 drivers/ieee1394/hosts.h | 25 drivers/ieee1394/ieee1394-ioctl.h | 2 drivers/ieee1394/ieee1394_core.c | 545 + drivers/ieee1394/ieee1394_core.h | 112 drivers/ieee1394/ieee1394_transactions.c | 143 drivers/ieee1394/ieee1394_transactions.h | 22 drivers/ieee1394/iso.c | 84 drivers/ieee1394/iso.h | 37 drivers/ieee1394/nodemgr.c | 139 drivers/ieee1394/nodemgr.h | 28 drivers/ieee1394/ohci1394.c | 577 - drivers/ieee1394/ohci1394.h | 18 drivers/ieee1394/oui.db | 7048 ----------------------- drivers/ieee1394/oui2c.sh | 22 drivers/ieee1394/pcilynx.c | 35 drivers/ieee1394/raw1394-private.h | 5 drivers/ieee1394/raw1394.c | 443 - drivers/ieee1394/raw1394.h | 14 drivers/ieee1394/sbp2.c | 181 drivers/ieee1394/sbp2.h | 13 drivers/ieee1394/video1394.c | 9 include/linux/Kbuild | 2 include/linux/crc-itu-t.h | 28 include/linux/firewire-cdev.h | 477 + include/linux/firewire-constants.h | 67 include/linux/pci_ids.h | 1 lib/Kconfig | 8 lib/Kconfig.debug | 12 lib/Makefile | 1 lib/crc-itu-t.c | 69 60 files changed, 12169 insertions(+), 10171 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: Wed, 5 Mar 2008 01:34:55 +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 | 176 +++++++++++++++++++++++++++++---- 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, 191 insertions(+), 33 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: Sun, 24 Feb 2008 18:59:11 +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 | 72 ++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 32 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. Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 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: 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 12:31:22 +0200 (CEST) From: Stefan Richter Subject: firewire: point to migration document Signed-off-by: Stefan Richter --- drivers/firewire/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== 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: Thu, 6 Sep 2007 09:50:30 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: ignore failure of pci_set_power_state (fix suspend regression) Fixes (papers over) "Sleep problems with kernels >= 2.6.21 on powerpc", http://lkml.org/lkml/2007/8/25/155. The issue is that the FireWire controller's pci_dev.current_state of iBook G3 and presumably older PowerBooks is still in PCI_UNKNOWN instead of PCI_D0 when the firewire driver's .suspend method is called. Like it was suggested earlier in http://lkml.org/lkml/2006/10/24/13, we do not fail .suspend anymore if pci_set_power_state failed. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 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 | 594 ++++++++++++++++++++--------------- 2 files changed, 340 insertions(+), 259 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(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Date: Fri, 24 Aug 2007 18:59:58 -0400 Subject: firewire: Add ref-counting for sbp2 orbs (fix command abortion) This handles the case where we get the status write before getting the complete_transaction callback ("status write for unknown orb"). In this case, we just assume that the initial orb pointer transaction succeeded and finish the orb. To prevent the transaction callback from touching freed memory, we ref-count the orb structures. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 49 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 9 deletions(-) ======================================================================== Date: Tue, 21 Aug 2007 01:05:14 +0200 (CEST) From: Stefan Richter Subject: firewire: fix unloading of fw-ohci while devices are attached Fix panic in run_timer_softirq right after "modprobe -r firewire-ohci" if a FireWire disk was attached and firewire-sbp2 loaded. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ======================================================================== Date: Sat, 11 Aug 2007 11:51:16 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: fix sbp2_remove_device for error cases Bug found by Olaf Hering : sbp2util_remove_command_orb_pool requires a valid lu->hi pointer. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ======================================================================== Date: Sat, 28 Jul 2007 23:18:48 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-core: make two variables static Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== Date: Thu, 26 Jul 2007 17:36:19 +0100 From: Al Viro Subject: [PATCH] raw1394 __user annotation Signed-off-by: Al Viro --- drivers/ieee1394/raw1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Wed, 25 Jul 2007 19:18:08 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: dma_free_coherent needs IRQs enabled Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) ======================================================================== Date: Sat, 21 Jul 2007 22:43:05 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: set correct maximum payload (fixes CardBus adapters) As far as I know, all CardBus FireWire 400 adapters have a maximum payload of 1024 bytes which is less than the speed-dependent limit of 2048 bytes. Fw-sbp2 has to take the host adapter's limit into account. This apparently fixes Juju's incompatibility with my CardBus cards, a NEC based card and a VIA based card. Signed-off-by: Stefan Richter Acked-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 5 ++++- drivers/firewire/fw-transaction.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) ======================================================================== Date: Tue, 17 Jul 2007 02:15:36 +0200 (CEST) From: Stefan Richter Subject: firewire: fix memory leak of fw_request instances Found and debugged by Jay Fenlason . The bug was especially noticeable with direct I/O over fw-sbp2. Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 4 +++- drivers/firewire/fw-transaction.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) ======================================================================== Date: Tue, 17 Jul 2007 02:13:48 +0200 (CEST) From: Stefan Richter Subject: firewire: remove bogus check in fw_core_handle_request This check is bogus: - Maximum asynchronous payload size for S800...S3200 is 4096. - The p->payload_length is totally uninteresting. Only the request->length of the subsequently allocated and initialized struct fw_request is of significance. Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 5 ----- 1 file changed, 5 deletions(-) ======================================================================== From: Al Viro Date: Sun, 15 Jul 2007 19:59:51 +0000 (+0100) Subject: ieee1394: forgotten dereference... X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=51ec138c6416e9ed2ba0eae3af5f0ea8a90ae44b ieee1394: forgotten dereference... Going through the string and waiting for _pointer_ to become '\0' is not what the authors meant... Signed-off-by: Al Viro Acked-by: Ben Collins Signed-off-by: Linus Torvalds --- --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Thu, 12 Jul 2007 22:25:14 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: fix "scheduling while atomic" context_stop is called by bus_reset_tasklet, among else. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Thu, 12 Jul 2007 22:24:19 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-ohci: flush MMIO write before msleep Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Sun, 8 Jul 2007 13:34:21 +0200 (CEST) From: Stefan Richter Subject: ieee1394: first minimal NUMA awareness Association of a host device with a node on NUMA machines optimizes allocations of skbs given from the networking stack to eth1394. Signed-off-by: Stefan Richter --- drivers/ieee1394/hosts.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Wed, 4 Jul 2007 23:13:53 +0200 (CEST) From: Stefan Richter Subject: ieee1394: raw1394: fix a 32/64-bits compat fix I was told that only i386 aligns 64 bit integers at 4 bytes boundaries while all other architectures (32 bit architectures with 64 bit siblings) align it on 8 bytes boundaries. Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ======================================================================== Date: Mon, 2 Jul 2007 21:04:44 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: fix DMA mapping of management ORBs The CPU must not touch the buffer after it was DMA-mapped. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) ======================================================================== Date: Mon, 2 Jul 2007 21:04:08 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: fix DMA mapping of command ORBs The CPU must not touch the buffer after it was DMA-mapped. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) ======================================================================== Date: Mon, 2 Jul 2007 22:07:34 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: fix DMA mapping of S/G tables - The CPU must not touch the buffer after it was DMA-mapped. - The size argument of dma_unmap_single(...page_table...) was bogus. - Move a comment closer to the code to which it refers to. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) ======================================================================== Date: Sun, 1 Jul 2007 13:56:03 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: add a boundary check Add rudimentary check for the case that the page table overflows due to merging of s/g elements by the IOMMU. This would have lead to overwriting of arbitrary memory. After this change I expect that an offending command will be unsuccessfully retried until the scsi_device is taken offline by SCSI core. It's a border case and not worth to implement a recovery strategy. Signed-off-by: Stefan Richter Acked-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 5 +++++ 1 file changed, 5 insertions(+) ======================================================================== Date: Sun, 1 Jul 2007 13:55:31 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: correctly align page tables This is required per SBP-2 clause 5.2. Signed-off-by: Stefan Richter Acked-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 1 Jul 2007 13:54:57 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: memset wants string.h Signed-off-by: Stefan Richter Acked-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Sun, 1 Jul 2007 13:54:24 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: use correct speed in sbp2_agent_reset noticed by Jay Fenlason Signed-off-by: Stefan Richter Acked-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Wed, 27 Jun 2007 16:04:33 -0400 From: Jay Fenlason Subject: firewire: fw-sbp2: correctly dereference by container_of Replace a cast with a container_of(). As long as nobody reorders the structure elements, they do the same thing, but container_of() is more readable. Signed-off-by: Stefan Richter (added complete_command_orb) Acked-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ======================================================================== Date: Mon, 25 Jun 2007 22:18:40 +0200 (CEST) From: Stefan Richter Subject: firewire: add Kconfig help on building both stacks Alas that won't work so good, because nobody reads help texts. I thought about adding some crude multiple choice selection (build the old stack, build the new stack, build both stacks). It's possible, but it would introduce awkward dummy config variables. Signed-off-by: Stefan Richter --- drivers/firewire/Kconfig | 65 +++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 22 deletions(-) ======================================================================== Date: Sun, 24 Jun 2007 15:31:54 +0200 (CEST) From: Stefan Richter Subject: ieee1394: remove old isochronous ABI Based on patch "the scheduled removal of RAW1394_REQ_ISO_{SEND,LISTEN}" from Adrian Bunk, November 20 2006. This patch also removes the underlying facilities in ohci1394 and disables them in pcilynx. That is, hpsb_host_driver.devctl() and hpsb_host_driver.transmit_packet() are no longer used for iso reception and transmission. Since video1394 and dv1394 only work with ohci1394 and raw1394's rawiso interface has never been implemented in pcilynx, pcilynx is now no longer useful for isochronous applications. raw1394 will still handle the request types but will complete the requests with errors that indicate API version conflicts. Signed-off-by: Stefan Richter [[ patch version without Documentation/ hunks ]] --- drivers/ieee1394/highlevel.c | 45 ---- drivers/ieee1394/highlevel.h | 16 - drivers/ieee1394/hosts.h | 8 drivers/ieee1394/ieee1394_core.c | 8 drivers/ieee1394/ieee1394_core.h | 5 drivers/ieee1394/ieee1394_transactions.c | 30 --- drivers/ieee1394/ieee1394_transactions.h | 2 drivers/ieee1394/ohci1394.c | 221 +---------------------- drivers/ieee1394/ohci1394.h | 14 - drivers/ieee1394/pcilynx.c | 16 + drivers/ieee1394/raw1394-private.h | 5 drivers/ieee1394/raw1394.c | 176 ------------------ drivers/ieee1394/raw1394.h | 4 13 files changed, 32 insertions(+), 518 deletions(-) ======================================================================== Date: Sat, 23 Jun 2007 20:28:17 +0200 (CEST) From: Stefan Richter Subject: firewire: fix async reception on big endian machines descriptor.data_address is little endian Tested-by: Olaf Hering Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ======================================================================== Date: Fri, 22 Jun 2007 00:20:34 +0200 (CEST) From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Document userspace ioctl interface. The isochronous packet format is still not documented, but this is a good first step. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter (format, wording) --- Update 2: - minimal changes to wordings - changed alignment and line wraps for nicer(?) layout in the source file - corrected a few '&' versus '@' mistakes - tested with scripts/kernel-doc -text, -man, -html Update 3: - corrected fw_cdev_add_descriptor.key include/linux/firewire-cdev.h | 297 ++++++++++++++++++++++++++++++---- 1 file changed, 264 insertions(+), 33 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Only set client->iso_context if allocation was successful. Date: Wed, 20 Jun 2007 17:48:07 -0400 This patch fixes an OOPS on cdev release for an fd where iso context creation failed. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-cdev.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) ======================================================================== Date: Sun, 17 Jun 2007 23:55:41 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: implement nonexclusive login Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) ======================================================================== Date: Sun, 17 Jun 2007 23:54:52 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: change some module parameters from int to bool This is upwards compatible, except that integer values other than 0 or 1 are no longer accepted. But values like "Y", "N", "no", "nnoooh!" work now. Also, improve a comment on the serialize_io parameter and make the ORB_SET_EXCLUSIVE macro ultra-safe. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 15 +++++++-------- drivers/ieee1394/sbp2.h | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) ======================================================================== Date: Mon, 18 Jun 2007 18:46:49 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: let SCSI shutdown commands through before logout This affects of course only the "soft shutdown" case, e.g. "modprobe -r firewire-sbp2", while it doesn't matter for hot unplug. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- Update: - Do it much simpler without scsi_remove_device. - Omit the unrelated sbp2_sysfs_ieee1394_id_show hunks. They will come back later when multi-LU support is implemented. drivers/firewire/fw-sbp2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ======================================================================== Date: Sun, 17 Jun 2007 23:52:08 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: implement max sectors limit for some old bridges This currently only affects one bridge in the hardwired blacklist. I don't own one of those, hence haven't tested it. Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ======================================================================== Date: Sun, 17 Jun 2007 23:39:58 +0200 (CEST) From: Stefan Richter Subject: firewire: simplify a struct type cleanup after "firewire: support S100B...S400B and link slower than PHY" Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-topology.c | 48 +++++++++++++++------------------ drivers/firewire/fw-topology.h | 6 ---- 2 files changed, 24 insertions(+), 30 deletions(-) ======================================================================== Date: Mon, 4 Jun 2007 11:49:19 -0400 From: "Carlos E. Ugarte" Subject: ieee1394: fix to ether1394_tx in ether1394.c This patch fixes a problem that occurs when packets cannot be sent across the ieee1394 bus and we return NETDEV_TX_BUSY in the net driver "hard start xmit" routine ether1394_tx. When we return NETDEV_TX_BUSY the stack will call ether1394_tx again with the same skb. So we need to restore the header to look like it did before we munged it for xmit over ieee1394. [Stefan Richter: changed whitespace, deleted a local variable] Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) ======================================================================== Date: Sun, 10 Jun 2007 21:31:36 +0200 From: Stefan Richter Subject: firewire: support S100B...S400B and link slower than PHY Use a speed probe to determine the speed over 1394b buses and of nodes which report a link speed less than their PHY speed. Log the effective maximum speed of newly created nodes in dmesg. Also, read the config ROM (except bus info block) at the maximum speed rather than S100. This isn't a real optimization though because we still only use quadlet read requests for the entire ROM. The patch also adds support for S1600 and S3200, although such hardware does not exist yet. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-cdev.c | 2 - drivers/firewire/fw-device.c | 38 +++++++++++++++++++++++++++++---- drivers/firewire/fw-device.h | 1 drivers/firewire/fw-sbp2.c | 7 ++---- drivers/firewire/fw-topology.h | 13 +++++------ 5 files changed, 45 insertions(+), 16 deletions(-) ======================================================================== Date: Mon, 18 Jun 2007 19:44:12 +0200 (CEST) From: Stefan Richter Subject: firewire: optimize gap count with 1394b leaf nodes Table-based gap count optimization cannot be used if 1394b repeater PHYs are present. But it does work with 1394b leaf nodes. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- Updates: Use plain int and bool instead of a bitfield, add a comment. Use local temp variable for topology type in build_tree(). drivers/firewire/fw-card.c | 7 +++++-- drivers/firewire/fw-topology.c | 16 ++++++++-------- drivers/firewire/fw-topology.h | 6 ------ drivers/firewire/fw-transaction.h | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) ======================================================================== Date: Sat, 9 Jun 2007 19:31:14 +0200 (CEST) From: Stefan Richter Subject: firewire: fix hang after card ejection Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sat, 9 Jun 2007 19:27:07 +0200 (CEST) From: Stefan Richter Subject: firewire: remove unused macro Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.h | 1 - 1 file changed, 1 deletion(-) ======================================================================== Date: Sat, 9 Jun 2007 19:26:22 +0200 (CEST) From: Stefan Richter Subject: firewire: missing newline in printk Also remove some errno printouts which will be shown by infrastructure code anyway. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 6 +++--- drivers/firewire/fw-sbp2.c | 2 +- drivers/firewire/fw-topology.c | 2 +- 3 files changed, 5 insertions(+), 5 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(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Install firewire-constants.h and firewire-cdev.h for userspace. Date: Thu, 31 May 2007 11:36:23 -0400 This just adds them to include/linux/Kbuild using header-y. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- include/linux/Kbuild | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Change struct fw_cdev_iso_packet to not use bitfields. Date: Thu, 31 May 2007 11:16:43 -0400 The struct is part of the userspace interface and can not use bitfields. This patch replaces the bitfields with a __u32 'control' word and provides access macros to set the bits. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-cdev.c | 17 ++++++++++++++++- include/linux/firewire-cdev.h | 14 ++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Implement suspend/resume PCI driver hooks. Date: Wed, 30 May 2007 19:06:35 -0400 It's a low-impact design, that just makes suspend/resume look like a bus reset to the upper level drivers, but it should be sufficient. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 5 drivers/firewire/fw-ohci.c | 187 ++++++++++++++++++++++++------------- 2 files changed, 123 insertions(+), 69 deletions(-) ======================================================================== Date: Sun, 27 May 2007 07:09:18 -0400 From: Jeff Garzik Subject: [PATCH] firewire: fix return code Fix this warning on x86-64 drivers/firewire/fw-cdev.c:798: warning: initialization from incompatible pointer type by making the return code of ioctl_send_request() the same as all the other ioctl_xxx() return codes. Signed-off-by: Jeff Garzik Signed-off-by: Stefan Richter --- drivers/firewire/fw-cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 27 May 2007 13:18:27 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: implement sysfs ieee1394_id The attribute /sys/bus/scsi/devices/*:*:*:*/ieee1394_id, as generated by the old sbp2 driver, is typically used to create persistently named links in /dev/disk/by-id. Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device.h | 1 drivers/firewire/fw-sbp2.c | 53 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) ======================================================================== Date: Sun, 27 May 2007 13:17:15 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: offer SAM-conforming target port ID in sysfs With "modprobe sbp2 long_ieee1394_id=y", the format of /sys/bus/scsi/devices/*:*:*:*/ieee1394_id is changed from e.g. 0001041010004beb:0:0 to 0001041010004beb:00042c:0000. The longer format fully conforms to object identifier sizes as per SAM(-2...4) and reflects what the SAM target port identifier is meant to contain: A Discovery ID allegedly specified by ISO/IEC 13213:1994 --- however there is no such thing; the authors of SAM probably meant Directory ID). Especially target nodes with multiple dynamically added targets may use Directory IDs to persistently identify target ports. The new format is independent of implementation details of nodemgr. Thus the same ieee1394_id attribute format can be implemented in the new firewire stack. The ieee1394_id is typically used to create persistently named links in /dev/disk/by-id. Signed-off-by: Stefan Richter --- Requires patch 'ieee1394: fix calculation of sysfs attribute "address"'. drivers/ieee1394/nodemgr.c | 5 +++++ drivers/ieee1394/nodemgr.h | 1 + drivers/ieee1394/sbp2.c | 31 +++++++++++++++++++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 27 May 2007 13:11:47 +0200 (CEST) From: Stefan Richter Subject: ieee1394: fix calculation of sysfs attribute "address" struct csr1212_keyval.offset is relative to 0xffff f000 0000 rather than 0xffff f000 0400. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Fri, 25 May 2007 13:54:49 +0200 (CEST) From: Stefan Richter Subject: [rfc patch] firewire: prefix modules with firewire- instead of fw- Of course everybody immediately associates "fw-" with FireWire, not firmware or firewall or whatever. But "firewire-" has a nice ring to it too. Signed-off-by: Stefan Richter Acked-by: Kristian Hoegsberg --- drivers/firewire/Kconfig | 14 +++++++------- drivers/firewire/Makefile | 12 +++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Add missing byteswapping for receive DMA programs. Date: Tue, 22 May 2007 18:55:48 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ======================================================================== Date: Mon, 21 May 2007 18:52:06 +0200 (CEST) From: Stefan Richter Subject: ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment Pointed out by Arnd Bergmann: PPC32 aligns this at 64bit, IA32 packs it. A kernel-wide available __compat_u64 which is 4-byte aligned on AMD64 and IA64 would be nicer though. Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ======================================================================== Date: Sat, 19 May 2007 12:29:37 +0200 (CEST) From: Stefan Richter Subject: ieee1394: add comments in struct hpsb_packet to clarify who is supposed to set what Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ======================================================================== Date: Mon, 7 May 2007 04:14:47 +0200 From: Petr Vandrovec Subject: ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel Add compat_ioctl. Although all structures are more or less same, raw1394_iso_packets got pointer inside, and raw1394_cycle_timer got unwanted padding in the middle. I did not add any translation for ioctls passing array of integers around as integers seem to have same size (32 bits) on all architectures supported by Linux. Signed-off-by: Petr Vandrovec Acked-by: Dan Dennedy Signed-off-by: Stefan Richter (split into 3 patches) --- drivers/ieee1394/raw1394.c | 97 ++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) ======================================================================== Date: Mon, 7 May 2007 04:14:47 +0200 From: Petr Vandrovec Subject: ieee1394: raw1394: Fix write() for 32bit userland on 64bit kernel * write(fd, buf, 52) from 32bit app was returning 56. Most of callers did not care, but some (arm registration) did, and anyway it looks bad if request for writing 52 bytes returns 56. And returning sizeof anything in 'int' is not good as well. So all functions now return '0' instead of sizeof(struct raw1394_request) on success, and write() itself provides correct return value (it just returns value it was asked to write on success as raw1394 does not do any partial writes at all). * Related to this was problem that write() could have returned 0 when kernel state would become corrupted and moved to different state than opened/initialized/connected. Now it returns -EBADFD which seemed appropriate. Signed-off-by: Petr Vandrovec Acked-by: Dan Dennedy Signed-off-by: Stefan Richter (split into 3 patches) --- drivers/ieee1394/raw1394.c | 65 +++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 31 deletions(-) ======================================================================== Date: Mon, 7 May 2007 04:14:47 +0200 From: Petr Vandrovec Subject: ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel read() always failed with -EFAULT. This was happening due to raw1394_compat_read copying data to wrong location - access_ok always failed as 'r' is kernel address, not user. Whole function just tried to copy data from 'r' to 'r', which is not good. Signed-off-by: Petr Vandrovec Acked-by: Dan Dennedy Signed-off-by: Stefan Richter (split into 3 patches) --- drivers/ieee1394/raw1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 13 May 2007 22:14:44 -0700 From: Petr Vandrovec Subject: ieee1394: raw1394: Fix async send While playing with libiec61883 I've noticed that async_send is broken because it was doing copy_from_user(...., packet->data_size) before packet->data_size was set to any useful value. It got broken when packet->allocated_data_size got introduced, as hpsb_alloc_packet does not set packet->data_size anymore. (Regression in 2.6.22-rc1) Signed-off-by: Petr Vandrovec Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ======================================================================== From: Martin Schwidefsky Date: Thu, 10 May 2007 13:45:56 +0000 (+0200) Subject: [S390] Kconfig: refine depends statements. X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=eeca7a36a86db8bfc1945dd7f6f0c22a6b66b31d [[ only ieee1394 part of the patch included here ]] [S390] Kconfig: refine depends statements. Refine some depends statements to limit their visibility to the environments that are actually supported. Signed-off-by: Martin Schwidefsky --- drivers/ieee1394/Kconfig | 1 + 1 file changed, 1 insertion(+) [[ only ieee1394 part of the patch included here ]] ======================================================================== From: Michael Opdenacker Date: Wed, 9 May 2007 06:57:56 +0000 (+0200) Subject: Fix occurrences of "the the " X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=59c51591a0ac7568824f541f57de967e88adaa07 [[ only ieee1394 part of the patch included here ]] Fix occurrences of "the the " Signed-off-by: Michael Opdenacker Signed-off-by: Adrian Bunk --- drivers/ieee1394/nodemgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) [[ only ieee1394 part of the patch included here ]] ======================================================================== From: Randy Dunlap Date: Tue, 8 May 2007 07:28:08 +0000 (-0700) Subject: header cleaning: don't include smp_lock.h when not used X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=e63340ae6b6205fef26b40a75673d1c9c0c8bb90 [[ only ieee1394 part of the patch included here ]] header cleaning: don't include smp_lock.h when not used Remove includes of where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ieee1394/dv1394.c | 1 - drivers/ieee1394/raw1394.c | 1 - drivers/ieee1394/video1394.c | 1 - 3 files changed, 3 deletions(-) [[ only ieee1394 part of the patch included here ]] ======================================================================== From: Jean Delvare Date: Tue, 6 Mar 2007 10:45:12 +0000 (-0800) Subject: PCI: Cleanup the includes of X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6473d160b4aba8023bcf38519a5989694dfd51a7 [[ only ieee1394 part of the patch included here ]] PCI: Cleanup the includes of I noticed that many source files include while they do not appear to need it. Here is an attempt to clean it all up. In order to find all possibly affected files, I searched for all files including but without any other occurence of "pci" or "PCI". I removed the include statement from all of these, then I compiled an allmodconfig kernel on both i386 and x86_64 and fixed the false positives manually. My tests covered 66% of the affected files, so there could be false positives remaining. Untested files are: arch/alpha/kernel/err_common.c arch/alpha/kernel/err_ev6.c arch/alpha/kernel/err_ev7.c arch/ia64/sn/kernel/huberror.c arch/ia64/sn/kernel/xpnet.c arch/m68knommu/kernel/dma.c arch/mips/lib/iomap.c arch/powerpc/platforms/pseries/ras.c arch/ppc/8260_io/enet.c arch/ppc/8260_io/fcc_enet.c arch/ppc/8xx_io/enet.c arch/ppc/syslib/ppc4xx_sgdma.c arch/sh64/mach-cayman/iomap.c arch/xtensa/kernel/xtensa_ksyms.c arch/xtensa/platform-iss/setup.c drivers/i2c/busses/i2c-at91.c drivers/i2c/busses/i2c-mpc.c drivers/media/video/saa711x.c drivers/misc/hdpuftrs/hdpu_cpustate.c drivers/misc/hdpuftrs/hdpu_nexus.c drivers/net/au1000_eth.c drivers/net/fec_8xx/fec_main.c drivers/net/fec_8xx/fec_mii.c drivers/net/fs_enet/fs_enet-main.c drivers/net/fs_enet/mac-fcc.c drivers/net/fs_enet/mac-fec.c drivers/net/fs_enet/mac-scc.c drivers/net/fs_enet/mii-bitbang.c drivers/net/fs_enet/mii-fec.c drivers/net/ibm_emac/ibm_emac_core.c drivers/net/lasi_82596.c drivers/parisc/hppb.c drivers/sbus/sbus.c drivers/video/g364fb.c drivers/video/platinumfb.c drivers/video/stifb.c drivers/video/valkyriefb.c include/asm-arm/arch-ixp4xx/dma.h sound/oss/au1550_ac97.c I would welcome test reports for these files. I am fine with removing the untested files from the patch if the general opinion is that these changes aren't safe. The tested part would still be nice to have. Note that this patch depends on another header fixup patch I submitted to LKML yesterday: [PATCH] scatterlist.h needs types.h http://lkml.org/lkml/2007/3/01/141 Signed-off-by: Jean Delvare Cc: Badari Pulavarty Signed-off-by: Greg Kroah-Hartman --- drivers/ieee1394/hosts.c | 1 - 1 file changed, 1 deletion(-) [[ only ieee1394 part of the patch included here ]] ======================================================================== Date: Sat, 5 May 2007 17:25:51 +0200 (CEST) From: Stefan Richter Subject: [PATCH 2/2] ieee1394: eth1394: handle tlabel exhaustion When eth1394 was unable to acquire a transaction label, it just dropped outgoing packets without attempt to resend them later. The transmit queue is now halted if no tlabel is available to ->hard_start_xmit(). A workqueue job is then scheduled to catch the moment when ieee1394 recycled the next lot of tlabels. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=8402 Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 80 +++++++++++++++++++++++++++++-------- drivers/ieee1394/eth1394.h | 4 + 2 files changed, 67 insertions(+), 17 deletions(-) ======================================================================== Date: Sat, 5 May 2007 17:19:09 +0200 (CEST) From: Stefan Richter Subject: [PATCH 1/2] ieee1394: eth1394: remove bogus netif_wake_queue When we are within hard_start_xmit, the queue is already awake. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/eth1394.c | 4 ---- 1 file changed, 4 deletions(-) ======================================================================== Date: Sat, 5 May 2007 17:18:12 +0200 (CEST) From: Stefan Richter Subject: ieee1394: sbp2: include workqueue.h Signed-off-by: Stefan Richter --- --- drivers/ieee1394/sbp2.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Thu, 3 May 2007 20:24:19 +0200 (CEST) From: Stefan Richter Subject: ieee1394: ohci1394: remove dead CONFIG variable spotted by Robert P. J. Day Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 51 +++++------------------------------- 1 file changed, 8 insertions(+), 43 deletions(-) ======================================================================== Date: Sat, 21 Apr 2007 21:02:52 +0200 (CEST) From: Stefan Richter Subject: ieee1394: remove garbage from Kconfig Signed-off-by: Stefan Richter --- drivers/ieee1394/Kconfig | 2 -- 1 file changed, 2 deletions(-) ======================================================================== Date: Sat, 21 Apr 2007 20:54:37 +0200 (CEST) From: Stefan Richter Subject: ieee1394: more help in Kconfig - s/Device Drivers/Controllers/ - clarify who needs pcilynx - don't recommend Y for raw1394; M is typically used Signed-off-by: Stefan Richter --- drivers/ieee1394/Kconfig | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) ======================================================================== Date: Thu, 22 Mar 2007 00:40:06 +0100 (CET) From: Stefan Richter Subject: ieee1394: change deprecation status of dv1394 Nobody ported ffmpeg from dv1394 to rawiso yet, and there is no justification to remove dv1394 right now. Nevertheless, a strong deprecation of this ABI makes a lot of sense, especially as Kristian H's drivers shape up to be an attractive alternative to the existing ones. But we don't have a schedule at the moment. Signed-off-by: Stefan Richter [[ patch version without Documentation/ hunks ]] --- drivers/ieee1394/Kconfig | 6 +++--- drivers/ieee1394/dv1394.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) ======================================================================== Date: Mon, 23 Apr 2007 21:28:47 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: send async streams at S100 on 1394b buses eth1394 did not work on buses consisting of S100B...S400B hardware because it attempted to send GASP packets at S800. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) ======================================================================== Date: Sat, 21 Apr 2007 18:36:26 +0900 From: Akinobu Mita Subject: ieee1394: eth1394: fix error path in module_init This patch fixes some error handlings in eth1394: - check return value of kmem_cache_create() - cleanup resources if hpsb_register_protocol() fails Signed-off-by: Akinobu Mita Signed-off-by: Stefan Richter (whitespace) --- drivers/ieee1394/eth1394.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:24:27 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: correct return codes in hard_start_xmit This patch actually doesn't change anything because there was always 0 == NETDEV_TX_OK returned before. TODO: Return NETDEV_TX_BUSY in error case and test in different error conditions. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:23:19 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: hard_start_xmit is called in atomic context Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:22:21 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: some conditions are unlikely Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:21:46 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: clean up fragment_overlap offset > fi->offset + fi->len - 1 == !(offset < fi->offset + fi->len) offset + len - 1 < fi->offset == !(offset + len > fi->offset) !(A || B) == (!A && !B) Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:20:37 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: don't use alloc_etherdev Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:19:48 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: omit useless set_mac_address callback We can't reconfigure the MAC address, hence we don't need the callback. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:19:02 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: CONFIG_INET is always defined because CONFIG_IEEE1394_ETH1394 depends on it. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) ======================================================================== Date: Tue, 3 Apr 2007 23:55:40 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: allow MTU bigger than 1500 RFC 2734 says: "IP-capable nodes may operate with an MTU size larger than the default [1500 octets], but the means by which a larger MTU is configured are beyond the scope of this document." Allow users to set an MTU bigger than 1500. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) ======================================================================== Date: Fri, 27 Apr 2007 01:47:32 +0200 From: Adrian Bunk Subject: ieee1394: unexport highlevel_host_reset highlevel_host_reset no longer has any modular users. Signed-off-by: Adrian Bunk Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 1 - 1 file changed, 1 deletion(-) ======================================================================== Date: Mon, 2 Apr 2007 02:16:40 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: contain host reset Call only eth1394's own host reset handler from .tx_timeout, not the reset hooks of all other IEEE 1394 drivers. A minor drawback of this patch is that ether1394_host_reset by timeout is not serialized against ether1394_host_reset by bus reset. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:15:53 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: shorter error messages Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 40 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 24 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:15:21 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: correct a memset argument The old argument calculated the correct value in a wrong way. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Mon, 2 Apr 2007 02:14:45 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: refactor .probe and .update Move common code into an extra function. This implicitly adds a missing node_info->fifo = CSR1212_INVALID_ADDR_SPACE; to .update. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 48 ++++++++++++------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:13:51 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: .probe and .update may sleep Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) ======================================================================== Date: Mon, 2 Apr 2007 02:12:32 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: coding style Adjust white space and line wraps. Remove unnecessary parentheses and braces, unused macros, and some of the more redundant comments. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 430 +++++++++++++++++-------------------- drivers/ieee1394/eth1394.h | 24 -- 2 files changed, 208 insertions(+), 246 deletions(-) ======================================================================== Date: Sun, 1 Apr 2007 10:06:33 +0200 From: Jean Delvare Subject: ieee1394: eth1394: Move common recv_init code to helper function There is some common code between ether1394_open and ether1394_add_host which can be moved to a separate helper function for a slightly smaller eth1394 driver (-160 bytes on i386.) Signed-off-by: Jean Delvare Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 71 ++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 40 deletions(-) ======================================================================== Date: Tue, 27 Mar 2007 01:36:50 +0200 (CEST) From: Stefan Richter Subject: ieee1394: eth1394: don't autoload by hotplug when ohci1394 starts Until now, ieee1394 put an IP-over-1394 capability entry into each new host's config ROM. As soon as the controller was initialized --- i.e. right after modprobe ohci1394 --- this entry triggered a hotplug event which typically caused auto-loading of eth1394. This irritated or annoyed many users and distributors. Of course they could blacklist eth1394, but then ieee1394 wrongly advertized IP-over- 1394 capability to the FireWire bus. Therefore - remove the offending kernel config option IEEE1394_CONFIG_ROM_IP1394, - let eth1394 add the ROM entry by itself, i.e. only after eth1394 was loaded. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7793 . To emulate the behaviour of older kernels, simply add the following to to /etc/modprobe.conf: install ohci1394 /sbin/modprobe eth1394; \ /sbin/modprobe --ignore-install ohci1394 Note, autoloading of eth1394 when an _external_ IP-over-1394 capable device is discovered is _not_ affected by this patch. Signed-off-by: Stefan Richter --- drivers/ieee1394/Kconfig | 29 +++--------- drivers/ieee1394/config_roms.c | 76 ++++++--------------------------- drivers/ieee1394/config_roms.h | 7 ++- drivers/ieee1394/eth1394.c | 7 ++- drivers/ieee1394/hosts.c | 3 - 5 files changed, 36 insertions(+), 86 deletions(-) ======================================================================== Date: Sun, 18 Mar 2007 12:23:11 +0100 (CET) From: Stefan Richter Subject: ieee1394: eth1394: reduce excessive function inlining Shrinks eth1394.ko by about 5%. Many of these functions have only one caller and are therefore auto- inlined anyway. Signed-off-by: Stefan Richter --- drivers/ieee1394/eth1394.c | 74 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 38 deletions(-) ======================================================================== Date: Sat, 10 Feb 2007 23:57:57 +0100 (CET) From: Stefan Richter Subject: ieee1394: eth1394: clean up host removal ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/eth1394.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) ======================================================================== Date: Sat, 10 Feb 2007 23:56:38 +0100 (CET) From: Stefan Richter Subject: ieee1394: eth1394: unregister address space in failure case Warn if hpsb_allocate_and_register_addrspace() failed. Unregister the address space if something else failed. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/eth1394.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ======================================================================== Date: Mon, 23 Apr 2007 21:27:13 +0200 (CEST) From: Stefan Richter Subject: ieee1394: send async streams at S100 The comment says it all. This affects only asynchronous streams sent via raw1394; the eth1394 driver has own code and needs an own fix. Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 7 +++++++ 1 file changed, 7 insertions(+) ======================================================================== Subject: ieee1394: iso.c needs sched.h Date: Thu, 26 Apr 2007 00:16:04 -0700 From: Andrew Morton alpha: drivers/ieee1394/iso.c: In function 'hpsb_iso_xmit_sync': drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct' drivers/ieee1394/iso.c:440: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/iso.c:440: error: (Each undeclared identifier is reported only once drivers/ieee1394/iso.c:440: error: for each function it appears in.) drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'signal_pending' drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct' drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'schedule' drivers/ieee1394/iso.c: In function 'hpsb_iso_wake': drivers/ieee1394/iso.c:562: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter (brought into alphabetic order) --- drivers/ieee1394/iso.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== From: Tim Schmielau Date: Wed, 14 Feb 2007 08:33:14 +0000 (-0800) Subject: [PATCH] remove many unneeded #includes of sched.h X-Git-Url: http://git2.kernel.org/git/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cd354f1ae75e6466a7e31b727faede57a1f89ca5 [PATCH] remove many unneeded #includes of sched.h After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau Acked-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ### Stefan Richter: omitted all but the ieee1394 parts ### --- --- drivers/ieee1394/eth1394.c | 1 - drivers/ieee1394/iso.c | 1 - drivers/ieee1394/ohci1394.c | 1 - 3 files changed, 3 deletions(-) ======================================================================== Date: Wed, 11 Apr 2007 23:24:34 +0530 From: Milind Arun Choudhary Subject: ieee1394: SPIN_LOCK_UNLOCKED cleanup SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK instead Signed-off-by: Milind Arun Choudhary Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Fri, 30 Mar 2007 19:21:05 +0200 (CEST) From: Stefan Richter Subject: ieee1394: nodemgr: unify some error messages Shrinks object file size a little bit. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) ======================================================================== Date: Fri, 30 Mar 2007 19:19:55 +0200 (CEST) From: Stefan Richter Subject: ieee1394: nodemgr: less noise in dmesg Everytime when eth1394 or a libraw1394 client updates the configuration ROM, a certain sysfs attribute cannot be added since it already exists. Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) ======================================================================== Date: Sun, 18 Mar 2007 00:55:15 +0100 (CET) From: Stefan Richter Subject: ieee1394: unroll a weird macro This is a coding style touch-up for ieee1394's handle_incoming_packet(). A preprocessor macro contained hardwired variable names and, even worse, the 'break' keyword. This macro is now unrolled and removed. Also, all 'break's which had the effect of a return are replaced by return. And a FIXME comment is brought up to date. Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 91 +++++++++++++------------------ 1 file changed, 41 insertions(+), 50 deletions(-) ======================================================================== Date: Tue, 10 Apr 2007 02:39:07 +0200 (CEST) From: Stefan Richter Subject: ieee1394: some more includes Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_transactions.c | 3 +++ drivers/ieee1394/nodemgr.c | 1 + 2 files changed, 4 insertions(+) ======================================================================== Date: Mon, 9 Apr 2007 21:03:15 +0200 Subject: ieee1394: ieee1394_transactions needs sched.h From: "Torsten Kaiser" drivers/ieee1394/ieee1394_transactions.c fails for me if CONFIG_SMP=n gcc complains: CC drivers/ieee1394/ieee1394_transactions.o drivers/ieee1394/ieee1394_transactions.c: In function 'hpsb_get_tlabel': drivers/ieee1394/ieee1394_transactions.c:183: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/ieee1394_transactions.c:183: error: (Each undeclared identifier is reported only once Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter (added comment) --- drivers/ieee1394/ieee1394_transactions.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Tue, 3 Apr 2007 13:00:47 -0700 From: Randy Dunlap Subject: ieee1394: ieee1394_core printk format Fix printk format string: drivers/ieee1394/ieee1394_core.c:702: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' Signed-off-by: Randy Dunlap Signed-off-by: Stefan Richter --- drivers/ieee1394/ieee1394_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 25 Mar 2007 22:22:40 +0200 (CEST) From: Stefan Richter Subject: ieee1394: remove usage of skb_queue as packet queue This considerably reduces the memory requirements for a packet and eliminates ieee1394's dependency on CONFIG_NET. Signed-off-by: Stefan Richter --- Update: - Keep explicit packet->data_size = 0 initializations. - Add check for header size in raw1394. The old code relied on payload memory being appended directly after header memory. This assumption could break in the future. TODO: - Double-check if there are any drivers whose packet complete routine really needs process context. If there are none, get rid of khpsbpkt and execute the complete routine in the low-level driver's bottom half's context. - Check whether the complete packet really has to be zeroed when allocated. - Use kmem_cache for packets with up to 8 quadlets payload? Nodemgr issues bursts of quadlet read requests; sbp2 frequently sends octlet write requests. (For packets with bigger payloads, hpsb_alloc_packet may allocate extra data sections.) drivers/ieee1394/Kconfig | 1 drivers/ieee1394/hosts.c | 12 - drivers/ieee1394/hosts.h | 4 drivers/ieee1394/ieee1394_core.c | 291 ++++++++++++++++--------------- drivers/ieee1394/ieee1394_core.h | 27 -- drivers/ieee1394/raw1394.c | 3 6 files changed, 166 insertions(+), 172 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:29:20 +0100 (CET) From: Stefan Richter Subject: [PATCH 5/5] ieee1394: csr1212: log if devices have CRC errors in their ROM This will point out firmware bugs. I tested with 11 SBP-2 devices and one OS X PC and got these errors from two old CD-RWs only. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:28:36 +0100 (CET) From: Stefan Richter Subject: [PATCH 4/5] ieee1394: csr1212: more sensible names for jump targets Code beneath two labels called "fail" is actually also reached in case of success. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:27:46 +0100 (CET) From: Stefan Richter Subject: [PATCH 3/5] ieee1394: csr1212: warn on unreachable code We want bugs to show themselves. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:27:18 +0100 (CET) From: Stefan Richter Subject: [PATCH 2/5] ieee1394: shrink csr1212_new_string_descriptor_leaf Make unnecessarily generic code specific and thus simpler. Shrink a lookup table from 128 to 16 bytes. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 123 +++++++++++++------------------------ 1 file changed, 46 insertions(+), 77 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:26:38 +0100 (CET) From: Stefan Richter Subject: [PATCH 1/5] ieee1394: csr1212: coding style Whitespace, line breaks, braces... Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 215 ++++++++++++++++++++----------------- drivers/ieee1394/csr1212.h | 31 ++--- 2 files changed, 133 insertions(+), 113 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:51:24 +0100 (CET) From: Stefan Richter Subject: ieee1394: replace vmalloc by kmalloc in csr1212 The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes + sizeof(struct csr1212_csr_rom_cache) big. Most of the time much smaller data structures are allocated. Therefore vmalloc is a waste. The one exception is csr1212_append_new_cache() which is called to append a chunk of CSR1212_EXTENDED_ROM_SIZE + sizeof(struct csr1212_csr_rom_cache) if the currently allocated ROM cache is too small. CSR1212_EXTENDED_ROM_SIZE is generously defined as 256 kBytes. In SVN commit 1220, Steve Kinneberg lowered this to 2 kBytes in the config_rom_2.4 branch. This same commit also switched CSR1212_MALLOC from kmalloc to vmalloc in the SVN trunk branch: > r1220 | kberg | 2004-05-31 01:51:44 +0200 (Mon, 31 May 2004) | 13 lines > > CSR1212 Extended ROM bug fixes: > trunk line changes: > - Use vmalloc instead of kmalloc > - Change delayed_reset_bus() to operate in a work_queue instead of a > timer interrupt. > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. > config-rom-2.4 changes: > - Changed extended rom allocation from 256K to 8K. (It was actually 2 kB, not 8 kB.) > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. I am now setting CSR1212_EXTENDED_ROM_SIZE to 2 kB minus the overhead of struct csr1212_csr_rom_cache. Note, this code path is not used by the in-kernel drivers though. raw1394 could trigger it, but the respective libraw1394 functions don't exist yet. Furthermore, userspace programs can replace the entire local ROM via raw1394. If kmalloc does not fulfill their needs --- well, tough luck. I decree that nobody needs such huge extended ROMs. (Extended ROMs are defined by IEEE 1212 clause 7.7.18. The spec does not impose practically relevant restrictions on the size of extended ROM chunks.) Another potentially demanding use of CSR1212_MALLOC is if external FireWire devices come with Extended ROM entries. If they are too big for kmalloc (or have been too big for vmalloc) we just fail to read their ROM. This is quite unlikely though, to my knowledge. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 4 +++- drivers/ieee1394/csr1212.h | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) ======================================================================== Date: Wed, 14 Mar 2007 00:20:53 +0100 (CET) From: Stefan Richter Subject: ieee1394: de-inline some functions This small reorganization of public csr1212 functions saves one exported symbol and a few bytes in the driver modules. Signed-off-by: Stefan Richter --- Update: Make csr1212_read_keyval() static. drivers/ieee1394/csr1212.c | 28 ++++++++++++++++++++++++---- drivers/ieee1394/csr1212.h | 28 +++++----------------------- drivers/ieee1394/ieee1394_core.c | 9 ++++----- 3 files changed, 33 insertions(+), 32 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:50:13 +0100 (CET) From: Stefan Richter Subject: ieee1394: stricter error checks in csr1212 return -EINVAL becomes BUG_ON in checks of function call parameters. Signed-off-by: Stefan Richter --- drivers/ieee1394/config_roms.c | 14 +++--- drivers/ieee1394/csr1212.c | 67 +++++++++++---------------------- drivers/ieee1394/csr1212.h | 4 - 3 files changed, 34 insertions(+), 51 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:49:34 +0100 (CET) From: Stefan Richter Subject: ieee1394: csr1212: rename some types Use u8, u32 etc. instead of u_int8_t, csr1212_quad_t etc. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 93 +++++++++++++++++-------------------- drivers/ieee1394/csr1212.h | 62 +++++++++++------------- 2 files changed, 74 insertions(+), 81 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:49:05 +0100 (CET) From: Stefan Richter Subject: ieee1394: drop csr1212's support for external compilation csr1212 was written to be compiled either as part of the ieee1394 kernel driver or of an anticipated IEEE 1212 userspace library. We now drop support for the latter. The costs in terms of code footprint and depth of abstraction are not countered by any actual benefit. Also remove some obsolete #includes. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 158 ++++++++++------------- drivers/ieee1394/csr1212.h | 88 +----------- drivers/ieee1394/ieee1394_transactions.c | 1 drivers/ieee1394/nodemgr.c | 2 drivers/ieee1394/csr1212.c | 159 ++++++++++------------- drivers/ieee1394/csr1212.h | 88 +----------- drivers/ieee1394/ieee1394_transactions.c | 1 drivers/ieee1394/nodemgr.c | 2 4 files changed, 83 insertions(+), 167 deletions(-) ======================================================================== Date: Sun, 11 Mar 2007 22:47:34 +0100 (CET) From: Stefan Richter Subject: ieee1394: remove unused csr1212 code Delete unused code. Make some extern functions static. Remove superfluous inline keywords. Move private definitions from csr1212.h to csr1212.c. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 309 ++++++++++--------------------------- drivers/ieee1394/csr1212.h | 262 +------------------------------ 2 files changed, 95 insertions(+), 476 deletions(-) ======================================================================== Date: Mon, 5 Mar 2007 03:07:38 +0100 (CET) From: Stefan Richter Subject: ieee1394: small header cleanup Signed-off-by: Stefan Richter --- --- drivers/ieee1394/config_roms.h | 3 +-- drivers/ieee1394/eth1394.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) ======================================================================== Date: Mon, 5 Mar 2007 03:06:23 +0100 (CET) From: Stefan Richter Subject: ieee1394: move some comments from declaration to definition Signed-off-by: Stefan Richter --- drivers/ieee1394/config_roms.c | 7 + drivers/ieee1394/config_roms.h | 10 -- drivers/ieee1394/dma.c | 24 ++++++ drivers/ieee1394/dma.h | 22 +---- drivers/ieee1394/highlevel.c | 89 ++++++++++++++++++++++- drivers/ieee1394/highlevel.h | 46 ----------- drivers/ieee1394/hosts.c | 8 ++ drivers/ieee1394/hosts.h | 6 - drivers/ieee1394/ieee1394_core.c | 77 +++++++++++++++++-- drivers/ieee1394/ieee1394_core.h | 73 +----------------- drivers/ieee1394/ieee1394_transactions.c | 29 +++++++ drivers/ieee1394/ieee1394_transactions.h | 20 ----- drivers/ieee1394/iso.c | 84 +++++++++++++++++++++ drivers/ieee1394/iso.h | 35 --------- drivers/ieee1394/nodemgr.c | 32 ++++++-- drivers/ieee1394/nodemgr.h | 20 ----- drivers/ieee1394/ohci1394.c | 1 drivers/ieee1394/config_roms.c | 7 + drivers/ieee1394/config_roms.h | 10 -- drivers/ieee1394/dma.c | 24 ++++++ drivers/ieee1394/dma.h | 22 +---- drivers/ieee1394/highlevel.c | 89 ++++++++++++++++++++++- drivers/ieee1394/highlevel.h | 46 ----------- drivers/ieee1394/hosts.c | 8 ++ drivers/ieee1394/hosts.h | 6 - drivers/ieee1394/ieee1394_core.c | 77 +++++++++++++++++-- drivers/ieee1394/ieee1394_core.h | 73 +----------------- drivers/ieee1394/ieee1394_transactions.c | 29 +++++++ drivers/ieee1394/ieee1394_transactions.h | 20 ----- drivers/ieee1394/iso.c | 84 +++++++++++++++++++++ drivers/ieee1394/iso.h | 35 --------- drivers/ieee1394/nodemgr.c | 32 ++++++-- drivers/ieee1394/nodemgr.h | 20 ----- drivers/ieee1394/ohci1394.c | 1 drivers/ieee1394/ohci1394.h | 4 - 18 files changed, 348 insertions(+), 239 deletions(-) ======================================================================== Date: Mon, 5 Mar 2007 03:05:32 +0100 (CET) From: Stefan Richter Subject: ieee1394: remove declarations of nonexisting functions Signed-off-by: Stefan Richter --- drivers/ieee1394/highlevel.h | 9 --------- drivers/ieee1394/nodemgr.c | 2 +- drivers/ieee1394/nodemgr.h | 4 ---- 3 files changed, 1 insertion(+), 14 deletions(-) ======================================================================== Date: Thu, 4 Jan 2007 17:48:09 +0100 From: Jean Delvare Subject: [PATCH] i2c: Declare more i2c_adapter parent devices Declare the parent device of i2c_adapter devices each time we can easily do so. It makes the i2c_adapter appear at the right place in the device tree, rather than as a platform device. The remaining i2c bus drivers (one dozen) will need to be fixed one by one, most likely by turning them info platform drivers. Signed-off-by: Jean Delvare ### Stefan Richter: omitted all but the ieee1394 parts ### --- # drivers/ieee1394/pcilynx.c | 1 + # 1 file changed, 1 insertion(+) # ======================================================================== Date: Sat, 10 Feb 2007 22:06:18 +0100 (CET) From: Stefan Richter Subject: ieee1394: fix another deadlock in nodemgr A "modprobe ohci1394; sleep 1.5; modprobe -r ohci1394" could get stuck in uninterruptible state, especially if an external node was connected. http://bugzilla.kernel.org/show_bug.cgi?id=7792 Signed-off-by: Stefan Richter --- drivers/ieee1394/nodemgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== Date: Tue, 24 Apr 2007 23:44:57 +0100 Subject: ieee1394: ohci1394: Fix mistake in printk message. From: Simon Arlott Fix the "attempting to setting" message in ohci1394. Signed-off-by: Simon Arlott Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Fri, 20 Apr 2007 13:59:54 +0200 Subject: ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register From: Bernhard Kauer Remove the unneeded code that clears, sets and again clears the rcvPhyPkt bit in the ohci1394 LinkControl register in ohci_initialize(). Signed-off-by: Bernhard Kauer Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ======================================================================== Date: Thu, 12 Apr 2007 22:21:55 +0200 (CEST) From: Stefan Richter Subject: ieee1394: ohci1394: fix cosmetic problem in error logging If posted write failed, an "Unhandled interrupt(s) 0x00000100" message was logged by mistake. Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== From: Tobias Klauser Date: Sat, 17 Feb 2007 19:11:19 +0000 (+0100) Subject: Storage class should be before const qualifier X-Git-Url: http://git2.kernel.org/git/?p=linux%2Fkernel%2Fgit%2Fbunk%2Ftrivial.git;a=commitdiff_plain;h=c5a69d57eb48e36f84c0737b5b24ec277d7dbfba Storage class should be before const qualifier The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser Signed-off-by: Adrian Bunk ### Stefan Richter: omitted all but the ieee1394 parts ### --- --- drivers/ieee1394/ohci1394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Mon, 23 Apr 2007 11:50:56 -0700 Subject: ieee1394: sbp2: include fixes From: Andrew Morton drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout': drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once drivers/ieee1394/sbp2.c:399: error: for each function it appears in.) drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending' drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout' drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg': drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address' drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write': drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) Possibly due to changes in -mm, but this file should explicitly include the headers for the stuff it uses. Signed-off-by: Andrew Morton Signed-off-by: Stefan Richter (brought into alphabetic order) --- drivers/ieee1394/sbp2.c | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== Date: Sun, 4 Feb 2007 20:57:38 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: move some memory allocations into non-atomic context When the command ORB pool is created, the ORB list won't be accessed concurrently. Therefore we don't have to take the spinlock there. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) ======================================================================== Date: Sun, 4 Feb 2007 20:54:57 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: optimize DMA direction of s/g tables Unlike the name suggests, "cmd->scatter_gather_element" holds only the s/g table, not the actual s/g elements. Since the table is only read but never written by the device, DMA_BIDIRECTIONAL can be replaced by DMA_TO_DEVICE which may be cheaper on some architectures. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ======================================================================== Date: Sun, 4 Feb 2007 13:04:32 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove unnecessary alignments of struct members The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of sbp2.h::sbp2_command_info do not have to be aligned themselves --- only the memory which they point to has to be. The member "struct sbp2_command_orb command_orb" has to be aligned on 4 bytes boundary which is guaranteed because it contains u32 members. The member "struct sbp2_unrestricted_page_table scatter_gather_element", i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary according to the SBP-2 spec. This is not a requirement for FireWire controllers but could be expected by SBP-2 targets. I see no need to align the members command_orb and scatter_gather_element on CPU cacheline boundaries. It could have performance benefits, but on the other hand sbp2 has a somewhat wasteful allocation scheme which should be optimized first before further tweaks like cacheline alignments. (E.g. don't always allocate SG_ALL s/g table elements.) Note, before as well as after the patch, the code relies on the assumption that memory alignment in the virtual address space is preserved in the physical address space after DMA mapping. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== Date: Sat, 3 Feb 2007 16:48:51 +0100 (CET) From: Stefan Richter Subject: ieee1394: raw1394: prevent unloading of low-level driver Unloading the low-level driver module of a FireWire host can lead to all sorts of trouble if a raw1394 userspace client is using the host. Just disallow it by incrementing the LLD's module reference count on a RAW1394_REQ_SET_CARD write operation. Decrement it when the file is closed. This feature wouldn't be relevant if "modprobe -r video1394" or "modprobe -r dv1394" didn't automatically unload ohci1394 too. http://bugzilla.kernel.org/show_bug.cgi?id=7701 Signed-off-by: Stefan Richter --- drivers/ieee1394/raw1394.c | 48 ++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 19 deletions(-) ======================================================================== Date: Sat, 3 Feb 2007 17:44:39 +0100 (CET) From: Stefan Richter Subject: ieee1394: cycle timer read extension for raw1394 From: Pieter Palmers This implements the simultaneous read of the isochronous cycle timer and the system clock (in usecs). This allows to express the exact receive time of an ISO packet as a system time with microsecond accuracy. http://bugzilla.kernel.org/show_bug.cgi?id=7773 The counterpart patch for libraw1394 can be found at http://thread.gmane.org/gmane.linux.kernel.firewire.devel/8934 Patch update (Stefan R.): Disable preemption and local interrupts. Prevent integer overflow. Add paranoid error checks and kerneldoc to hpsb_read_cycle_timer. Move it to other ieee1394_core high-level API functions. Change comments. Adjust whitespace. Rename struct _raw1394_cycle_timer. Signed-off-by: Stefan Richter Acked-by: Pieter Palmers Acked-by: Dan Dennedy --- drivers/ieee1394/ieee1394-ioctl.h | 2 + drivers/ieee1394/ieee1394_core.c | 43 ++++++++++++++++++++++++++++++ drivers/ieee1394/ieee1394_core.h | 3 ++ drivers/ieee1394/raw1394.c | 20 +++++++++++++ drivers/ieee1394/raw1394.h | 10 ++++++ 5 files changed, 78 insertions(+) ======================================================================== Date: Sat, 27 Jan 2007 13:54:23 +0100 (CET) From: Stefan Richter Subject: ieee1394: dv1394: tidy up card removal small coding style touch-up and terser coding Signed-off-by: Stefan Richter --- drivers/ieee1394/dv1394.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) ======================================================================== Date: Thu, 25 Jan 2007 22:35:47 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: lower block queue alignment requirement The old setting is copy & waste from usb-storage and doesn't apply to sbp2. There is only 4-byte alignment required for everything, except for S/G table elements which have to be 8-byte aligned according to the SBP-2 spec. (They happen to be ____cacheline_aligned in our implementation. Whether that's good is another question.) We now simply don't tune block queue alignment at all. The default alignment would surely never become anything else than a multiple of 4, else tons of calls to blk_queue_dma_alignment would have to be added everywhere in drivers/... Signed-off-by: Stefan Richter --- --- drivers/ieee1394/sbp2.c | 2 -- 1 file changed, 2 deletions(-) ======================================================================== Date: Sat, 13 Jan 2007 16:53:58 -0800 From: Arjan van de Ven Subject: ieee1394: mark struct file_operations const Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven patch reduced to drivers/ieee1394 part Signed-off-by: Stefan Richter --- drivers/ieee1394/dv1394.c | 2 +- drivers/ieee1394/raw1394.c | 2 +- drivers/ieee1394/video1394.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) ======================================================================== Date: Sun, 7 Jan 2007 21:51:48 +0100 (CET) From: Stefan Richter Subject: ieee1394: save one word in struct hpsb_host hpsb_host.config_roms is a bitfield of which only one bit is currently used. hpsb_host.update_config_rom is only a Boolean. Neither one is accessed in hot code paths or with alignment requirements. Signed-off-by: Stefan Richter --- drivers/ieee1394/hosts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== Date: Sun, 7 Jan 2007 21:49:27 +0100 (CET) From: Stefan Richter Subject: ieee1394: restore config ROM when resuming After PM suspend + resume, the local configuration ROM was not restored. This prevented remote nodes from recognizing the resuming machine. Signed-off-by: Stefan Richter --- drivers/ieee1394/hosts.c | 13 ++++++++----- drivers/ieee1394/hosts.h | 3 ++- drivers/ieee1394/ieee1394_core.c | 1 + drivers/ieee1394/ohci1394.c | 4 +--- 4 files changed, 12 insertions(+), 9 deletions(-) ======================================================================== Date: Sat, 6 Jan 2007 15:07:05 +0100 (CET) From: Stefan Richter Subject: ieee1394: ohci1394: drop pcmcia-cs compatibility code #ifdef PCMCIA is only true if compiled inside pcmcia-cs, isn't it? Signed-off-by: Stefan Richter --- drivers/ieee1394/ohci1394.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) ======================================================================== Date: Wed, 3 Jan 2007 19:32:13 +0100 (CET) From: Stefan Richter Subject: ieee1394: nodemgr: check info_length in ROM header earlier The whole ROM area which is covered by the crc_length field of the ROM header was fetched before the info_length field was checked for correct general ROM format. This might be wasteful or even dangerous with nodes with minimal ROM, nonstandard ROM, or corrupt ROM. Perform this check at the earliest opportunity. Signed-off-by: Stefan Richter --- drivers/ieee1394/csr1212.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ======================================================================== Date: Tue, 2 Jan 2007 22:56:53 +0100 From: Adrian Bunk Subject: the scheduled IEEE1394_OUI_DB removal This patch contains the scheduled IEEE1394_OUI_DB removal. Signed-off-by: Adrian Bunk Update: Also remove drivers/ieee1394/.gitignore. Remove now unused struct members in drivers/ieee1394/nodemgr.h. Signed-off-by: Stefan Richter [[ patch version without Documentation/feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/.gitignore | 1 drivers/ieee1394/Kconfig | 14 drivers/ieee1394/Makefile | 10 drivers/ieee1394/nodemgr.c | 39 drivers/ieee1394/nodemgr.h | 3 drivers/ieee1394/oui.db | 7048 ------------------------------------ drivers/ieee1394/oui2c.sh | 22 7 files changed, 7137 deletions(-) ======================================================================== Date: Tue, 2 Jan 2007 22:56:57 +0100 From: Adrian Bunk Subject: the scheduled IEEE1394_EXPORT_FULL_API removal This patch contains the scheduled IEEE1394_EXPORT_FULL_API removal. Signed-off-by: Adrian Bunk Update: Pull proper portion of feature-removal-schedule.txt. Signed-off-by: Stefan Richter [[ patch version without Documentation/feature-removal-schedule.txt hunk ]] --- drivers/ieee1394/Kconfig | 7 ------- drivers/ieee1394/ieee1394_core.c | 22 ---------------------- 2 files changed, 29 deletions(-) ======================================================================== Date: Sun, 14 Jan 2007 19:40:41 +0100 (CET) From: Stefan Richter Subject: ieee1394: sbp2: remove bogus "emulated" host flag There is no emulation going on here. Signed-off-by: Stefan Richter --- --- drivers/ieee1394/sbp2.c | 1 - 1 file changed, 1 deletion(-) ======================================================================== Date: Sat Dec 30 15:37:09 CET 2006 From: Stefan Richter Subject: ieee1394: sbp2: use a better wildcard for blacklist 0x000000 could be a valid value to match against, but anything bigger than 0xffffff cannot. Signed-off-by: Stefan Richter --- drivers/ieee1394/sbp2.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) ======================================================================== Date: Fri, 8 Dec 2006 00:53:24 +0100 From: Andrea Guzzo Subject: ieee1394: modified csr1212_key_id_type_map to support lisight This patch applies a little change in csr1212.c to fix iSight (firewire digital camera) related issues (but maybe other firewire devices could also need such modification) The actual implementation of the "csr1212_key_id_type_map" table doesn't support some node types used by the iSight for the audio unit. This limit makes the csr scanning routine to never see the audio unit node , and consequently the iSight driver probe() routine to be never called and there is no way to hook an isight device when it is inserted. Signed-off-by: Andrea Guzzo Signed-off-by: Stefan Richter --- --- drivers/ieee1394/csr1212.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ======================================================================== From: Al Viro Date: Tue, 15 May 2007 19:36:10 +0000 (+0100) Subject: missing mm.h in fw-ohci X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=faa2fb4e67775101a5c46074fa24f0d81cdb4deb;hp=835a906c74ecf20cdb817d6d02975cc0ba421e35 missing mm.h in fw-ohci need it for page_private(), not all targets have it pulled indirectly Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- --- drivers/firewire/fw-ohci.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Fri, 11 May 2007 23:04:08 +0200 (CEST) From: Stefan Richter Subject: firewire: fw-sbp2: remove unused struct member cleanup after support of single-buffer requests was dropped Signed-off-by: Stefan Richter Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-sbp2.c | 6 ------ 1 file changed, 6 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Convert OHCI driver to use standard goto unwinding for error handling. Date: Wed, 9 May 2007 19:23:15 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 86 ++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 44 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Always use parens with sizeof. Date: Wed, 9 May 2007 19:23:14 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 4 +- drivers/firewire/fw-cdev.c | 36 +++++++++++------------ drivers/firewire/fw-device.c | 8 ++--- drivers/firewire/fw-ohci.c | 28 +++++++++--------- drivers/firewire/fw-sbp2.c | 46 +++++++++++++++--------------- drivers/firewire/fw-topology.c | 2 - drivers/firewire/fw-transaction.c | 6 +-- 7 files changed, 65 insertions(+), 65 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Drop single buffer request support. Date: Wed, 9 May 2007 19:23:11 -0400 The SCSI layer only passes sg requests down, so drop the use_sg == 0, request_bufflen != 0 case. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 43 ------------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Return SCSI_MLQUEUE_HOST_BUSY for out of memory cases in queuecommand. Date: Wed, 9 May 2007 19:23:09 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Handle the last few DMA mapping error cases. Date: Wed, 9 May 2007 19:23:08 -0400 This should be the last missing checks. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Allocate scsi_host up front and allocate the sbp2_device as hostdata. Date: Wed, 9 May 2007 19:23:07 -0400 Avoids an extra allocation and simplifies lifetime rules for the scsi_host. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 136 +++++++++++++------------------------ 1 file changed, 51 insertions(+), 85 deletions(-) ======================================================================== Subject: firewire: Provide module aliase for backwards compatibility. Date: Sat, 5 May 2007 23:17:13 +0200 From: Olaf Hering This patch loads fw-sbp2 if sbp2 is still in the config file. So one can go back and forth between releases without worry about the root filesystem drivers. Signed-off-by: Kristian Hoegsberg Existing mkinitrd scripts still have to be adapted, unless they grok module aliases. Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 5 +++++ drivers/firewire/fw-sbp2.c | 5 +++++ 2 files changed, 10 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Add to fw-core-y instead of assigning fw-core-objs in Makefile. Date: Mon, 7 May 2007 20:33:38 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Break out shared IEEE1394 constant to separate header file. Date: Mon, 7 May 2007 20:33:37 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.h | 61 -------------------------- include/linux/firewire-cdev.h | 51 ++-------------------- include/linux/firewire-constants.h | 67 +++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 105 deletions(-) create mode 100644 include/linux/firewire-constants.h ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Use linux/*.h instead of asm/*.h header files. Date: Mon, 7 May 2007 20:33:36 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- include/linux/firewire-cdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Uppercase most macro names. Date: Mon, 7 May 2007 20:33:35 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 42 ++++---- drivers/firewire/fw-ohci.c | 148 +++++++++++++++--------------- drivers/firewire/fw-sbp2.c | 107 ++++++++++----------- drivers/firewire/fw-topology.c | 40 ++++---- drivers/firewire/fw-transaction.c | 126 ++++++++++++------------- 5 files changed, 231 insertions(+), 232 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Coding style cleanup: no spaces after function names. Date: Mon, 7 May 2007 20:33:34 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 12 ++++---- drivers/firewire/fw-sbp2.c | 4 +- drivers/firewire/fw-topology.c | 6 ++-- drivers/firewire/fw-topology.h | 2 - drivers/firewire/fw-transaction.h | 42 +++++++++++++++--------------- 5 files changed, 33 insertions(+), 33 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Convert card_rwsem to a regular mutex. Date: Mon, 7 May 2007 20:33:33 -0400 Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Clean up comment style. Date: Mon, 7 May 2007 20:33:32 -0400 Drop filenames from file preamble, drop editor annotations and use standard indent style for block comments. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter (fixed typo) --- drivers/firewire/fw-card.c | 105 +++++++++++++-------- drivers/firewire/fw-cdev.c | 33 ++++-- drivers/firewire/fw-device.c | 101 +++++++++++++-------- drivers/firewire/fw-device.h | 5 - drivers/firewire/fw-iso.c | 4 drivers/firewire/fw-ohci.c | 144 +++++++++++++++++++----------- drivers/firewire/fw-sbp2.c | 101 +++++++++++++-------- drivers/firewire/fw-topology.c | 65 ++++++++----- drivers/firewire/fw-topology.h | 5 - drivers/firewire/fw-transaction.c | 71 +++++++++----- drivers/firewire/fw-transaction.h | 58 +++++++----- 11 files changed, 439 insertions(+), 253 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Use lib/ implementation of CRC ITU-T. Date: Mon, 7 May 2007 20:33:31 -0400 With the CRC ITU-T implementation available in lib/ we can use that instead. This also fixes a bug in the topology map crc computation. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter (fixed Kconfig) --- drivers/firewire/Kconfig | 1 drivers/firewire/fw-card.c | 37 +++++++++++---------------------- drivers/firewire/fw-topology.c | 5 +--- drivers/firewire/fw-topology.h | 5 ++-- 4 files changed, 19 insertions(+), 29 deletions(-) ======================================================================== Subject: CRC ITU-T V.41 Date: Mon, 12 Jun 2006 16:17:04 +0200 From: Ivo van Doorn This will add the CRC calculation according to the CRC ITU-T V.41 to the kernel lib/ folder. This code has been derived from the rt2x00 driver, currently found only in the wireless-dev tree, but this library is generic and could be used by more drivers who currently use their own implementation. Signed-off-by: Ivo van Doorn Also useful for the new firewire stack. Signed-off-by: Kristian Hoegsberg Signed-off-by: Stefan Richter --- include/linux/crc-itu-t.h | 28 +++++++++++++++ lib/Kconfig | 8 ++++ lib/Makefile | 1 lib/crc-itu-t.c | 69 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Rename fw-device-cdev.c to fw-cdev.c and move header to include/linux. Date: Mon, 30 Apr 2007 15:03:15 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/Makefile | 2 drivers/firewire/fw-cdev.c | 954 ++++++++++++++++++++++++++++++ drivers/firewire/fw-device-cdev.c | 954 ------------------------------ drivers/firewire/fw-device-cdev.h | 268 -------- include/linux/firewire-cdev.h | 268 ++++++++ 5 files changed, 1223 insertions(+), 1223 deletions(-) create mode 100644 drivers/firewire/fw-cdev.c delete mode 100644 drivers/firewire/fw-device-cdev.c delete mode 100644 drivers/firewire/fw-device-cdev.h create mode 100644 include/linux/firewire-cdev.h ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Future proof the iso ioctls by adding a handle for the iso context. Date: Mon, 30 Apr 2007 15:03:14 -0400 Currently create context always returns 0 and the other iso ioctls will expect user space to pass that in for subsequent ioctls. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 16 ++++++++++++++-- drivers/firewire/fw-device-cdev.h | 12 ++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Add read/write and size annotations to IOC numbers. Date: Mon, 30 Apr 2007 15:03:13 -0400 Also, with this change, refactor ioctl dispatch code to do the copying from and to user space as indicated by the IOC annotations. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 278 +++++++++++++----------------- drivers/firewire/fw-device-cdev.h | 24 +- 2 files changed, 135 insertions(+), 167 deletions(-) ======================================================================== Date: Wed, 25 Apr 2007 22:43:16 -0700 Subject: firewire: don't use extern on public symbols From: Randy Dunlap Make firewire entry points not 'extern': drivers/firewire/fw-device.c:160:25: warning: function 'fw_device_get' with external linkage has definition drivers/firewire/fw-device.c:167:13: warning: function 'fw_device_put' with external linkage has definition Signed-off-by: Randy Dunlap Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Don't use subsystem rwsem, it's going away. Date: Tue, 17 Apr 2007 11:51:57 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 18 ++++++++++-------- drivers/firewire/fw-device.c | 17 +++++++++-------- 2 files changed, 19 insertions(+), 16 deletions(-) ======================================================================== Date: Wed, 11 Apr 2007 18:44:33 -0400 From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Do an agent reset on error recovery. Signed-off-by: Kristian Høgsberg (Reverted part which moved it from eh_abort_handler to eh_host_reset_handler) Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Only free ORBs that completed the initial transaction. Date: Tue, 10 Apr 2007 18:11:20 -0400 In some situations we can receive the ORB status write before we have received the ORB pointer write response. When this happens, we assume that the fw_transaction is finished and free the ORB struct containing the fw_transaction. This fix make the status write logic only accept status writes for ORBs where the initial ORB pointer write transaction finished. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Forward SAM status codes to the scsi stack. Date: Tue, 10 Apr 2007 18:11:18 -0400 Or the SAM status codes from the device sense data into the command error code. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 39 +++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 21 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Check for CONTEXT_RUN not CONTEXT_ACTIVE when starting AT DMA context. Date: Tue, 10 Apr 2007 18:11:17 -0400 Doh, bad typo... Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Byteswap iso header so all headers are presented as be32. Date: Tue, 10 Apr 2007 18:11:16 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Fix start on cycle 0 for IT, implement start on cycle for IR. Date: Wed, 28 Mar 2007 14:26:10 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Fix the range check for the queue_iso payload pointer. Date: Wed, 28 Mar 2007 20:46:23 +0200 (CEST) Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter (renamed a variable) --- drivers/firewire/fw-device-cdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Increase the number of config rom retries and the retry delay. Date: Tue, 27 Mar 2007 01:43:43 -0400 Some devices have a really long power-on cycle, and we fail to successfully probe these if they're plugged in and then turned on. There's really no down-side to bumping the number of retries and the retry delay, and most devices will get picked up within the first couple of retries anyway. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Don't set card->irm_node before we have a new valid topology. Date: Tue, 27 Mar 2007 09:42:39 -0500 In case the topology build fails, we want to retain the old topology info until another reset finishes and results in a valid new tree. If we clear card->irm_node to NULL and the topology build fails, we end up dereferencing a NULL pointer in a few places. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-topology.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Generalize resource tracking for cdev implementation. Date: Tue, 27 Mar 2007 01:43:41 -0400 Generalize the way we keep track of the various resources and assign a unique handle to each resource. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 231 ++++++++++++++---------------- drivers/firewire/fw-device-cdev.h | 7 2 files changed, 119 insertions(+), 119 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Add ioctls to add and remove config rom descriptors. Date: Wed, 28 Mar 2007 21:26:42 +0200 (CEST) Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter (fixed whitespace) --- drivers/firewire/fw-card.c | 2 drivers/firewire/fw-device-cdev.c | 94 ++++++++++++++++++++++++++++++ drivers/firewire/fw-device-cdev.h | 23 ++++++- 3 files changed, 114 insertions(+), 5 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Streamline userspace interface structs. Date: Tue, 27 Mar 2007 01:43:39 -0400 Make event struct layout common part include the closure and add a union for all event types; provide a mechanism for setting the bus reset event closure. Shuffle struct fw_cdev_queue_iso fields around to be 64-bit safe. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 14 ++++++++------ drivers/firewire/fw-device-cdev.h | 28 +++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 11 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] firewire: Remember to set the driver_data pointer when queueing a packet. Date: Mon, 26 Mar 2007 19:18:19 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- --- drivers/firewire/fw-ohci.c | 1 + 1 file changed, 1 insertion(+) ======================================================================== Date: Fri, 23 Mar 2007 10:24:02 -0600 From: Marc Butler Subject: [PATCH] firewire: Add phy register defines. Signed-off-by: Marc Butler Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter (added whitespace) --- drivers/firewire/fw-card.c | 14 ++++++++++---- drivers/firewire/fw-transaction.h | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) ======================================================================== Date: Tue, 20 Mar 2007 19:44:26 +0100 (CET) From: Stefan Richter Subject: firewire: ROM cache is CPU-endian Puts a stray endian annotation down. Signed-off-by: Stefan Richter --- --- drivers/firewire/fw-device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Tue, 20 Mar 2007 19:42:15 +0100 (CET) From: Stefan Richter Subject: firewire: fix compiler warnings on 64bit Signed-off-by: Stefan Richter Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 7 ++++--- drivers/firewire/fw-device.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) ======================================================================== Date: Mon, 19 Mar 2007 11:37:16 -0400 From: Stefan Richter Subject: firewire: add includes for sem and rw_sem as a precaution. Signed-off-by: Stefan Richter --- --- drivers/firewire/fw-device.c | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: firewire: Grab dev->sem when doing the update callback. Date: Mon, 19 Mar 2007 11:37:16 -0400 This serializes the update callback with the probe and remove callback from the driver core and prevents remove from being called while update is running for the same device. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ======================================================================== Date: Sun, 18 Mar 2007 01:39:28 +0100 (CET) From: Stefan Richter Subject: firewire: rename CONFIG_FW to CONFIG_FIREWIRE to avoid confusion with CONFIG_FW_LOADER. Signed-off-by: Stefan Richter Acked-by: Kristian Høgsberg --- drivers/Makefile | 2 +- drivers/firewire/Kconfig | 10 +++++----- drivers/firewire/Makefile | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 6/6] firewire: Add ref-counting for sbp2_device and hold a ref while we have work scheduled. Date: Wed, 14 Mar 2007 17:34:58 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 42 ++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 5/6] firewire: Free pending transactions on cdev release. Date: Wed, 14 Mar 2007 17:34:57 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 4/6] firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack. Date: Wed, 14 Mar 2007 17:34:56 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 2 ++ 1 file changed, 2 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 3/6] firewire: Implement deallocation of address ranges. Date: Wed, 14 Mar 2007 17:34:55 -0400 Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 28 ++++++++++++++++++++++++++++ drivers/firewire/fw-device-cdev.h | 17 +++++++++++------ 2 files changed, 39 insertions(+), 6 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 2/6] firewire: Move sync and tag parameters to start_iso ioctl. Date: Wed, 14 Mar 2007 17:34:54 -0400 Setting these at create_context time or start_iso time doesn't matter much, but raw1394 sets them at start_iso time so that will be easier to emulate this way. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 20 ++++++++++---------- drivers/firewire/fw-device-cdev.h | 4 ++-- drivers/firewire/fw-iso.c | 12 ++++-------- drivers/firewire/fw-ohci.c | 9 ++++----- drivers/firewire/fw-transaction.h | 13 ++++++------- 5 files changed, 26 insertions(+), 32 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 1/6] firewire: Fix dualbuffer iso receive mode and drop buffer fill mode. Date: Wed, 14 Mar 2007 17:34:53 -0400 The dualbuffer DMA setup did not account for the iso trailer word and thus didn't work correctly. With this fixed we can drop the dual buffer fallback mode. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 28 +++-- drivers/firewire/fw-ohci.c | 160 ++++++++---------------------- 2 files changed, 66 insertions(+), 122 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 21/21] Implement CSR cycle time and bus time registers. Date: Wed, 7 Mar 2007 12:12:56 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 26 +++++++++++- drivers/firewire/fw-transaction.c | 61 +++++++++++++++++++++++++++++- drivers/firewire/fw-transaction.h | 2 3 files changed, 86 insertions(+), 3 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 20/21] Implement topology map and fix a couple of loopback bugs. Date: Wed, 7 Mar 2007 12:12:55 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-card.c | 2 - drivers/firewire/fw-ohci.c | 11 +++++- drivers/firewire/fw-topology.c | 28 ++++++++++++---- drivers/firewire/fw-topology.h | 3 + drivers/firewire/fw-transaction.c | 52 +++++++++++++++++++++++++++--- drivers/firewire/fw-transaction.h | 5 +- 6 files changed, 85 insertions(+), 16 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 19/21] Export juju specific rcodes to user space. Date: Wed, 7 Mar 2007 12:12:54 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.h | 6 ++++++ 1 file changed, 6 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 18/21] Add generation field to send_request ioctl struct. Date: Wed, 7 Mar 2007 12:12:53 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 2 +- drivers/firewire/fw-device-cdev.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 17/21] Add card index field to get_info cdev ioctl struct. Date: Wed, 7 Mar 2007 12:12:52 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 2 ++ drivers/firewire/fw-device-cdev.h | 3 +++ 2 files changed, 5 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 16/21] Fix order of arguments for iso context creation. Date: Wed, 7 Mar 2007 12:12:51 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 15/21] Track pending transactions and cancel them on cdev release. Date: Wed, 7 Mar 2007 12:12:50 -0500 Without this, pending transactions will dereference freed memory if they complete after the device file has been closed. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 14/21] Move async transmit to use the general context code. Date: Wed, 7 Mar 2007 12:12:49 -0500 The old async transmit context handling was starting and stopping DMA for every packet transmission. This could cause silently failing packet transmission, if the DMA was reprogrammed too close to being stopped. The general context code keeps DMA running at all times and fixes this problem. It's also a nice cleanup. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 362 ++++++++++++------------------ drivers/firewire/fw-transaction.h | 3 2 files changed, 150 insertions(+), 215 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 13/21] Use only a wait queue and terminate poll and read on device removal. Date: Wed, 7 Mar 2007 12:12:48 -0500 Drop the event list semaphore and only use the wait queue and the list to synchronize queue access. Break out of a poll or read whenever the device is disconnected. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 80 +++++++++++++++++++----------- drivers/firewire/fw-device.c | 1 drivers/firewire/fw-device.h | 7 ++ 3 files changed, 59 insertions(+), 29 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 12/21] Don't time out command orbs, leave that to the scsi stack. Date: Wed, 7 Mar 2007 12:12:47 -0500 The mod_timer based timing out of orb was a little to agressive and would time out legit, but long-lived scsi cmds. Besides, the scsi stack keeps track of this already. Since we're only timing out management orbs, go back to wait_for_completion_timeout. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 11/21] Add rom_index attribute for unit sysfs directories. Date: Wed, 7 Mar 2007 12:12:46 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 10/21] Quiet down fw-sbp2 logging a bit, remove stale FIXME. Date: Wed, 7 Mar 2007 12:12:45 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 9/21] Switch cdev code over to use register_chrdev and keep a list of devices. Date: Wed, 7 Mar 2007 12:12:44 -0500 The old mechanism kept a struct cdev for each fw device, but fops->release would reference this struct after the device got freed in some cases. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 5 ++ drivers/firewire/fw-device.c | 56 +++++++++++++++++++----------- drivers/firewire/fw-device.h | 5 ++ drivers/firewire/fw-transaction.c | 7 +++ 4 files changed, 51 insertions(+), 22 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 8/21] Generalize get_config_rom to get_info. Date: Wed, 7 Mar 2007 12:12:43 -0500 Repurpose the get_config_rom ioctl to a general get_info ioctl. This ioctl is now used for version negotiation, and optionally returns the config rom, and the current bus info. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 65 ++++++++++++++++++++++-------- drivers/firewire/fw-device-cdev.h | 31 ++++++++++++-- 2 files changed, 75 insertions(+), 21 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 7/21] Implement ioctl to initiate bus reset. Date: Wed, 7 Mar 2007 12:12:42 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 15 +++++++++++++++ drivers/firewire/fw-device-cdev.h | 16 ++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 6/21] Add a bus reset event type for fw-device-cdev. Date: Wed, 7 Mar 2007 12:12:41 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 56 ++++++++++++++++++++++++++++++ drivers/firewire/fw-device-cdev.h | 17 +++++++-- drivers/firewire/fw-device.c | 2 + drivers/firewire/fw-device.h | 3 + 4 files changed, 75 insertions(+), 3 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 5/21] Only use INIT_DELAYED_WORK for first initialization. Date: Wed, 7 Mar 2007 12:12:40 -0500 Use PREPARE_DELAYED_WORK to just change the function pointer. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 4/21] Iterate through units in a keventd callback for update callbacks. Date: Wed, 7 Mar 2007 12:12:39 -0500 We can't take the klist lock for the child device list in interrupt context. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 3/21] Clear all interrupt bits before shutting down. Date: Wed, 7 Mar 2007 12:12:38 -0500 Some flaky controllers doesn't honor the masterIntEnable bits and can generate bus reset events even if that bit is cleared. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 2/21] Drop the unused fw_card device. Date: Wed, 7 Mar 2007 12:12:37 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-card.c | 40 +++++++++--------------------- drivers/firewire/fw-transaction.h | 3 -- 2 files changed, 13 insertions(+), 30 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 1/21] Let an fw_descriptor specify a leading immediate key/value pair. Date: Wed, 7 Mar 2007 12:12:36 -0500 This lets us break out "Juju" as the model name in the config rom. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-card.c | 7 +++++- drivers/firewire/fw-transaction.c | 34 ++++++++++++++++++++++-------- drivers/firewire/fw-transaction.h | 1 3 files changed, 32 insertions(+), 10 deletions(-) ======================================================================== Date: Mon, 05 Mar 2007 18:19:51 -0800 From: Thomas Gleixner Subject: Scheduled removal of SA_xxx interrupt flags fixups 3 The obsolete SA_xxx interrupt flags have been used despite the scheduled removal. Fixup the remaining users in -mm. Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Sun, 4 Mar 2007 14:45:18 +0100 (CET) From: Stefan Richter Subject: firewire: adjust whitespace Remove space before tab and trailing whitespace. Unify indentation of goto target labels. Signed-off-by: Stefan Richter --- --- drivers/firewire/fw-device.c | 6 ++-- drivers/firewire/fw-iso.c | 2 - drivers/firewire/fw-ohci.c | 46 ++++++++++++++++------------------- 3 files changed, 26 insertions(+), 28 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Implement sync and tag matching for isochronous receive. Date: Fri, 16 Feb 2007 17:34:51 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 10 ++++++++- drivers/firewire/fw-device-cdev.h | 8 +++++++ drivers/firewire/fw-iso.c | 8 +++++-- drivers/firewire/fw-ohci.c | 32 ++++++++++++++++++++++++++++-- drivers/firewire/fw-transaction.h | 13 ++++++++++-- 5 files changed, 64 insertions(+), 7 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Configure channel and speed at context creation time. Date: Fri, 16 Feb 2007 17:34:50 -0500 We need the channel number as we queue up iso packets for transmission so we can fill out the header correctly. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 11 +++++++++-- drivers/firewire/fw-device-cdev.h | 5 ++--- drivers/firewire/fw-iso.c | 11 +++++------ drivers/firewire/fw-ohci.c | 4 ++-- drivers/firewire/fw-transaction.h | 6 +++--- 5 files changed, 21 insertions(+), 16 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Store OHCI version and make sure we have at least 1.1 before doing dualbuffer. Date: Fri, 16 Feb 2007 17:34:49 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Get zeroed out pages for mapping to user space. Date: Fri, 16 Feb 2007 17:34:48 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-iso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Don't touch DMA descriptors after appending. Date: Fri, 16 Feb 2007 17:34:47 -0500 When a DMA descriptor is appended to the context we sync it for DMA and the device might potentially read it immediately. So, we can't set the IRQ bits in the descriptor after appending. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Use a buffer fill descriptor for receive when header size is 0. Date: Fri, 16 Feb 2007 17:34:46 -0500 When the DMA is setup to not strip any headers, we need to use the buffer fill descriptor instead of the dual buffer, since the dual buffer descriptor must strip a non-zero number of header quadlets. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-iso.c | 2 drivers/firewire/fw-ohci.c | 107 +++++++++++++++++++++++++----- drivers/firewire/fw-transaction.h | 3 3 files changed, 95 insertions(+), 17 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Set correct buffer lengths for dualbuffer DMA descriptor. Date: Fri, 16 Feb 2007 17:34:45 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Acummulate received iso headers and send them back to user space. Date: Fri, 16 Feb 2007 17:34:44 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 25 ++++++++++----- drivers/firewire/fw-device-cdev.h | 2 + drivers/firewire/fw-ohci.c | 49 ++++++++++++++++++++---------- drivers/firewire/fw-transaction.h | 5 ++- 4 files changed, 57 insertions(+), 24 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Log OHCI chipset version in PCI probe. Date: Fri, 16 Feb 2007 17:34:43 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Implement functionality to stop isochronous DMA contexts. Date: Fri, 16 Feb 2007 17:34:42 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 7 ++++ drivers/firewire/fw-device-cdev.h | 1 drivers/firewire/fw-iso.c | 7 ++++ drivers/firewire/fw-ohci.c | 44 ++++++++++++++++++++++-------- drivers/firewire/fw-transaction.h | 5 +++ 5 files changed, 53 insertions(+), 11 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Rename 'send_iso' to 'start_iso'. Date: Fri, 16 Feb 2007 17:34:41 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 12 ++++++------ drivers/firewire/fw-device-cdev.h | 4 ++-- drivers/firewire/fw-iso.c | 8 ++++---- drivers/firewire/fw-ohci.c | 4 ++-- drivers/firewire/fw-transaction.h | 8 ++------ 5 files changed, 16 insertions(+), 20 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Implement basic isochronous receive functionality. Date: Fri, 16 Feb 2007 17:34:40 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 23 +++- drivers/firewire/fw-device-cdev.h | 5 drivers/firewire/fw-iso.c | 7 - drivers/firewire/fw-ohci.c | 168 ++++++++++++++++++++++++++---- drivers/firewire/fw-ohci.h | 1 drivers/firewire/fw-transaction.h | 7 - 6 files changed, 181 insertions(+), 30 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Generalize the iso transmit descriptor buffer logic. Date: Fri, 16 Feb 2007 17:34:39 -0500 The descriptor circular buffer logic used for iso transmission is useful for async transmit too, so pull the sharable logic out in a few standalone functions. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 360 ++++++++++++++++++++++--------------- 1 file changed, 218 insertions(+), 142 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Split the iso buffer out from fw_iso_context and avoid vmalloc. Date: Fri, 16 Feb 2007 17:34:38 -0500 This patch splits out the iso buffer so we can initialize it at mmap time with the size provided in the mmap call. Furthermore, allocate the backing pages using alloc_page to avoid setting up kernel side virtual memory mappings for the pages. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device-cdev.c | 65 +++++++++++----- drivers/firewire/fw-device-cdev.h | 2 drivers/firewire/fw-iso.c | 120 ++++++++++++++++-------------- drivers/firewire/fw-ohci.c | 12 ++- drivers/firewire/fw-transaction.h | 38 +++++++-- 5 files changed, 152 insertions(+), 85 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Use correct payload pointer when demarshalling incoming requests. Date: Fri, 16 Feb 2007 17:34:37 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Read the *Clear versions of the iso interrupt register. Date: Fri, 16 Feb 2007 17:34:36 -0500 The *Clear registers returns the masked value when read which is what we want. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH] Fix another typo from the bitfield conversion. Date: Fri, 16 Feb 2007 17:34:35 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 11/11] Use dma_mapping_error() for checking for DMA mapping errors. Date: Tue, 6 Feb 2007 14:49:40 -0500 Pointed out by Pete Zaitcev. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-iso.c | 21 +++++++++++++++------ drivers/firewire/fw-ohci.c | 23 +++++++++++++++-------- drivers/firewire/fw-sbp2.c | 28 +++++++++++++++++----------- 3 files changed, 47 insertions(+), 25 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 10/11] Credit the old sbp2.c driver for being a good starting point. Date: Tue, 6 Feb 2007 14:49:39 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 9/11] Use atomic_t's for serial numbers. Date: Tue, 6 Feb 2007 14:49:38 -0500 Signed-off-by: Kristian Høgsberg Use atomic_inc_return. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 4 ++-- drivers/firewire/fw-device.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 8/11] Spell out fw as firewire in sysfs. Date: Tue, 6 Feb 2007 14:49:37 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 7/11] Complete SCSI commands with DID_BUS_BUSY when a bus reset happens. Date: Tue, 6 Feb 2007 14:49:36 -0500 This lets the SCSI stack retry the command when a SCSI command is interrupted by a FireWire bus reset. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 6/11] Schedule topology work before calling driver update functions. Date: Tue, 6 Feb 2007 14:49:35 -0500 This prevents superfluous bus traffic as fw-sbp2 logs in only to get kicked off the device by another bus reset as the driver core does bus management. Scheduling it this way lets the driver core finish bus management before higher level drivers get the update callback. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 5/11] Introduce a retry mechanism for reconnects and logins. Date: Tue, 6 Feb 2007 14:49:34 -0500 Sometimes we reconnect too soon, sometimes too late. Adding a retry mechanism make the reconnect step much more robust. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 180 ++++++++++++++++++++++--------------- 1 file changed, 109 insertions(+), 71 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 4/11] fw-sbp2: Do ORB timeout right. Date: Tue, 6 Feb 2007 14:49:33 -0500 When a management ORB times out, either because the fw_transaction times out or when we don't get the status write, we need to properly cancel the entire operation. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-sbp2.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 3/11] Implement proper transaction cancelation. Date: Tue, 6 Feb 2007 14:49:32 -0500 Drivers such as fw-sbp2 had no way to properly cancel in-progress transactions, which could leave a pending transaction or an unset packet in the low-level queues after kfree'ing the containing structure. fw_cancel_transaction() lets drivers cancel a submitted transaction. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-card.c | 7 +++ drivers/firewire/fw-ohci.c | 33 ++++++++++++++++++ drivers/firewire/fw-sbp2.c | 3 + drivers/firewire/fw-transaction.c | 54 ++++++++++++++++++++++++++---- drivers/firewire/fw-transaction.h | 5 ++ 5 files changed, 95 insertions(+), 7 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 2/11] Reduce some redundant register definitions. Date: Tue, 6 Feb 2007 14:49:31 -0500 Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 50 ++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 28 deletions(-) ======================================================================== From: =?utf-8?q?Kristian_H=C3=B8gsberg?= Subject: [PATCH 1/11] Rework async receive DMA. Date: Tue, 6 Feb 2007 14:49:30 -0500 The old DMA program for receiving async packets stops DMA while processing received packets and only expects one packet per interrupt. Stopping DMA can silently drop packets and we need to handle multiple received packets per interrupt. This new version keeps DMA running at all times and just append new pages as buffers fill up, and supports multiple packets per interrupt. Signed-off-by: Kristian Høgsberg --- drivers/firewire/fw-ohci.c | 210 ++++++++++++++++++------------ drivers/firewire/fw-transaction.c | 3 2 files changed, 131 insertions(+), 82 deletions(-) ======================================================================== Date: Sat, 27 Jan 2007 10:34:55 +0100 (CET) From: Stefan Richter Subject: firewire: use atomic type for fw_device.state Signed-off-by: Stefan Richter --- --- drivers/firewire/fw-card.c | 2 +- drivers/firewire/fw-device.c | 6 +++--- drivers/firewire/fw-device.h | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:38:49 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 10/10] Make sure we wait for DMA to stop before we reprogram it. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-ohci.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:38:45 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 9/10] Implement compliant bus management. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-card.c | 127 +++++++++++++++++++++++++----- drivers/firewire/fw-device.c | 2 drivers/firewire/fw-topology.c | 7 - drivers/firewire/fw-transaction.h | 6 - 4 files changed, 117 insertions(+), 25 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:38:38 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 8/10] Fix bit shift typo. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ======================================================================== Date: Fri, 26 Jan 2007 00:38:34 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 7/10] Sanitize send error codes. Drop the negative errnos and use RCODEs for all error codes in the complete transaction callback. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-ohci.c | 20 ++++++++++---------- drivers/firewire/fw-transaction.c | 12 ++++++------ drivers/firewire/fw-transaction.h | 2 ++ 3 files changed, 18 insertions(+), 16 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:38:26 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 6/10] Handle access to CSR resources on local node. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-ohci.c | 130 ++++++++++++++++++++++++++---- drivers/firewire/fw-transaction.c | 14 ++- drivers/firewire/fw-transaction.h | 31 +++++++ 3 files changed, 154 insertions(+), 21 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:38:18 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 5/10] Add lock transaction opcodes to fw-device-cdev.h. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-device-cdev.h | 8 ++++++++ 1 file changed, 8 insertions(+) ======================================================================== Date: Fri, 26 Jan 2007 00:38:13 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 4/10] Clean up response handling. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-transaction.c | 54 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:38:04 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 3/10] Loop requests to the host controller back into the stack. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-device.c | 5 ----- drivers/firewire/fw-ohci.c | 33 +++++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 13 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:37:57 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 2/10] Use struct fw_packet for incoming packets too in controller interface. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-ohci.c | 65 +++++++++++++------ drivers/firewire/fw-transaction.c | 99 ++++++++++++++---------------- drivers/firewire/fw-transaction.h | 13 +-- 3 files changed, 94 insertions(+), 83 deletions(-) ======================================================================== Date: Sat, 27 Jan 2007 16:59:15 +0100 (CET) From: Stefan Richter Subject: firewire: fix compilation with gcc 3.4 drivers/firewire/fw-topology.c: In function `report_found_node': drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field Signed-off-by: Stefan Richter --- gcc 4.1.1 (Gentoo 4.1.1-r3) is fine with this. gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk) doesn't like it. --- drivers/firewire/fw-topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ======================================================================== Date: Fri, 26 Jan 2007 00:37:50 -0500 From: Kristian =?utf-8?B?SMO4Z3NiZXJn?= Subject: [PATCH 1/10] Implement gap count optimization. Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-card.c | 46 ++++++++++++------ drivers/firewire/fw-topology.c | 76 ++++++++++++++++++++++++++---- drivers/firewire/fw-topology.h | 15 ++++- drivers/firewire/fw-transaction.c | 8 ++- drivers/firewire/fw-transaction.h | 6 +- 5 files changed, 120 insertions(+), 31 deletions(-) ======================================================================== Date: Tue, 23 Jan 2007 21:20:08 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: set command set related device flags Copied from sbp2: - enable spin-up by START STOP UNIT for all devices - enable INQUIRY (36) workaround on demand - prefer READ/ WRITE (10) over (6) for all devices - prefer MODE SENSE (10) for MMC devices Signed-off-by: Stefan Richter --- drivers/firewire/fw-sbp2.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ======================================================================== Date: Tue, 23 Jan 2007 21:11:43 +0100 (CET) From: Stefan Richter Subject: firewire: consistent usage of node_id Definitions as per IEEE 1212 and IEEE 1394: Node ID: Concatenation of bus ID and local ID. 16 bits long. Bus ID: Identifies a particular bus within a group of buses interconnected by bus bridges. Local ID: Identifies a particular node on a bus. PHY ID: Local ID of IEEE 1394 nodes. 6 bits long. Never ever use a variable called node_id for anything else than a node ID. Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 2 +- drivers/firewire/fw-device.c | 4 ++-- drivers/firewire/fw-ohci.c | 21 ++++++++++++--------- drivers/firewire/fw-sbp2.c | 8 ++++---- drivers/firewire/fw-topology.c | 2 +- drivers/firewire/fw-transaction.c | 6 +++--- 6 files changed, 23 insertions(+), 20 deletions(-) ======================================================================== Date: Tue, 23 Jan 2007 21:09:23 +0100 (CET) From: Stefan Richter Subject: firewire: fw-ohci: remove unnecessary macro Cleans up after patch "Add PCI class ID for firewire OHCI controllers". Signed-off-by: Stefan Richter Signed-off-by: Kristian Hoegsberg --- Update: linux/pci.h includes linux/pci_ids.h for us --- drivers/firewire/fw-ohci.c | 3 --- 1 file changed, 3 deletions(-) ======================================================================== Date: Sun, 21 Jan 2007 20:50:11 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: remove unused macro Signed-off-by: Stefan Richter Signed-off-by: Kristian Hoegsberg --- --- drivers/firewire/fw-sbp2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ======================================================================== Date: Sun, 21 Jan 2007 20:49:38 +0100 (CET) From: Stefan Richter Subject: firewire: fw-sbp2: remove bogus "emulated" host flag There is no emulation going on here too. Signed-off-by: Stefan Richter Signed-off-by: Kristian Hoegsberg --- --- drivers/firewire/fw-sbp2.c | 1 - 1 file changed, 1 deletion(-) ======================================================================== Date: Sun, 21 Jan 2007 20:46:45 +0100 (CET) From: Stefan Richter Subject: firewire: fix failure path in ohci_enable_phys_dma "goto out" happens with the lock taken. Signed-off-by: Stefan Richter Signed-off-by: Kristian Hoegsberg --- --- drivers/firewire/fw-ohci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ======================================================================== Date: Sun, 21 Jan 2007 20:45:32 +0100 (CET) From: Stefan Richter Subject: firewire: comma after last enum item or initializer Signed-off-by: Stefan Richter Signed-off-by: Kristian Hoegsberg --- Update: added fw-device.c::modalias_attribute --- drivers/firewire/fw-card.c | 2 +- drivers/firewire/fw-device-cdev.c | 2 +- drivers/firewire/fw-device.c | 8 ++++---- drivers/firewire/fw-device.h | 2 +- drivers/firewire/fw-ohci.c | 2 +- drivers/firewire/fw-sbp2.c | 2 +- drivers/firewire/fw-topology.h | 2 +- drivers/firewire/fw-transaction.c | 12 ++++++------ 8 files changed, 16 insertions(+), 16 deletions(-) ======================================================================== Date: Sun, 21 Jan 2007 20:44:09 +0100 (CET) From: Stefan Richter Subject: firewire: whitespace adjustments Signed-off-by: Stefan Richter Signed-off-by: Kristian Hoegsberg --- drivers/firewire/fw-card.c | 41 ++---- drivers/firewire/fw-device-cdev.h | 18 +-- drivers/firewire/fw-device.c | 4 drivers/firewire/fw-device.h | 6 - drivers/firewire/fw-iso.c | 4 drivers/firewire/fw-ohci.c | 5 drivers/firewire/fw-ohci.h | 44 +++---- drivers/firewire/fw-topology.c | 1 drivers/firewire/fw-topology.h | 8 - drivers/firewire/fw-transaction.c | 8 - drivers/firewire/fw-transaction.h | 178 +++++++++++++++--------------- 11 files changed, 146 insertions(+), 171 deletions(-) ======================================================================== Date: Mon, 22 Jan 2007 19:17:37 +0100 From: Adrian Bunk Subject: [-mm patch] drivers/firewire/: cleanups This patch contains the following cleanups: - "extern inline" -> "static inline" - fw-topology.c: make struct fw_node_create static Signed-off-by: Adrian Bunk Signed-off-by: Stefan Richter --- drivers/firewire/fw-ohci.c | 8 ++++---- drivers/firewire/fw-topology.c | 2 +- drivers/firewire/fw-topology.h | 6 +++--- drivers/firewire/fw-transaction.c | 2 +- drivers/firewire/fw-transaction.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) ======================================================================== Date: Sun, 14 Jan 2007 15:29:07 +0100 (CET) From: Stefan Richter Subject: firewire: mark some structs const Instances of struct file_operations and struct fw_card_driver can be qualified as "const". Ditto with struct fw_descriptor.data, struct fw_device_id, and predefined instances of struct fw_address_region, at least in the current implementation. Data qualified as const is placed into the .rodata section which won't be mixed with dirty data. Signed-off-by: Stefan Richter --- drivers/firewire/fw-card.c | 2 +- drivers/firewire/fw-device-cdev.c | 2 +- drivers/firewire/fw-device.c | 2 +- drivers/firewire/fw-device.h | 4 ++-- drivers/firewire/fw-ohci.c | 2 +- drivers/firewire/fw-sbp2.c | 2 +- drivers/firewire/fw-transaction.c | 14 +++++++------- drivers/firewire/fw-transaction.h | 18 +++++++++--------- 8 files changed, 23 insertions(+), 23 deletions(-) ======================================================================== Date: Sun, 7 Jan 2007 22:33:59 +0100 (CET) From: Stefan Richter Subject: firewire: additional help in Kconfig Signed-off-by: Stefan Richter --- Update: Additional help for fw-ohci and fw-sbp2 drivers/firewire/Kconfig | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) ======================================================================== Date: Sun, 31 Dec 2006 17:20:20 +0100 (CET) From: Stefan Richter Subject: firewire: put old and new stack into same Kconfig submenu Screenshot from "make menuconfig": ... ?????????????????????? IEEE 1394 (FireWire) support ??????????????????????? ? Arrow keys navigate the menu. selects submenus --->. ? ... ? ??????????????????????????????????????????????????????????????????????? ? ? ? IEEE 1394 (FireWire) support (JUJU alternative stack, experim? ? ? ? Support for OHCI firewire host controllers ? ? ? ? Support for storage devices (SBP-2 protocol driver) ? ? ? ? IEEE 1394 (FireWire) support ? ? ? ? --- Subsystem Options ? ? ? ? [ ] Excessive debugging output ? ? ... ?