aboutsummaryrefslogtreecommitdiff
path: root/drivers/ieee1394
AgeCommit message (Collapse)Author
2008-05-01Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire: fw-sbp2: log scsi_target ID at release ieee1394: fix NULL pointer dereference in sysfs access
2008-05-01ieee1394: fix NULL pointer dereference in sysfs accessStefan Richter
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 <stefanr@s5r6.in-berlin.de> Tested-by: Miles Lane <miles.lane@gmail.com>
2008-04-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: ieee1394: silence defined but not used warning in non-modular builds ieee1394: rawiso: requeue packet for transmission after skipped cycle
2008-04-25ieee1394: silence defined but not used warning in non-modular buildsTony Breeds
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 <tony@bakeyournoodle.com> Ditto with dv1394_id_table and video1394_id_table. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-25ieee1394: rawiso: requeue packet for transmission after skipped cyclePieter Palmers
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 <pieterp@joow.be> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18Convert asm/semaphore.h users to linux/semaphore.hMatthew Wilcox
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18ieee1394: limit early node speed to host interface speedPhilippe De Muyter
The following patch limits the node speed to the host interface speed, before using it. Signed-off-by: Philippe De Muyter <phdm@macqel.be> 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 <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: Remove superfluous calls to kobject_set_name().Robert P. J. Day
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 <rpjday@crashcourse.ca> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: ohci1394: missing PPC PMac feature calls in failure pathStefan Richter
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 <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: ohci1394: refactor some printk format stringsStefan Richter
to reduce the size of ohci1394.ko. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: ohci1394: unroll a macro with returnStefan Richter
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 <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: Use shorter list_splice_init() for brevity.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: ohci1394: refactor probe, remove, suspend, resumeStefan Richter
Clean up shared code and variable names. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: ohci1394: switch on bus power after resume on PPC PMacStefan Richter
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 <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: prevent device binding of raw1394, video1394, dv1394Stefan Richter
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 <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: be*_add_cpu conversionMarcin Slusarz
replace all: big_endian_variable = cpu_to_beX(beX_to_cpu(big_endian_variable) + expression_in_cpu_byteorder); with: beX_add_cpu(&big_endian_variable, expression_in_cpu_byteorder); generated with semantic patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: sbp2: relax SCSI DMA alignmentStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-03-14ieee1394: sbp2: fix for SYM13FW500 bridge (Datafab disk)Stefan Richter
Fix I/O errors due to SYM13FW500's inability to handle larger request sizes. Reported by Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> 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 <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
2008-02-19ieee1394: sbp2: fix rescan-scsi-busStefan Richter
rescan-scsi-bus used to add SBP-2 targets which weren't there. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-02-16ieee1394: sbp2: add INQUIRY delay workaroundStefan Richter
Add the same workaround as found in fw-sbp2 for feature parity and compatibility of the workarounds module parameter. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
2008-02-02ieee1394: sbp2: fix bogus s/g access changeStefan Richter
sg_dma_len(sg) is invalid before the s/g list is DMA-mapped. This fixes a post 2.6.24 regression which prevents access to SBP-2 devices on several architectures, introduced by "ieee1394: sbp2: s/g list access cosmetics", commit 825f1df545ab0289185373b0eaf06fb0b3487422. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: ohci1394: don't schedule IT tasklets on IR eventsStefan Richter
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 <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: sbp2: raise default transfer size limitStefan Richter
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 <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: remove unused codeStefan Richter
The code has been in "#if 0 - #endif" since Linux 2.6.12. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: small cleanup after "nopage"Stefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: nopageNick Piggin
Convert ieee1394 from nopage to fault. Remove redundant vma range checks (correct resource range check is retained). Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: Add missing "space"Joe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: sbp2: s/g list access cosmeticsStefan Richter
Replace sg->length by sg_dma_len(sg). Rename a variable for shorter line lengths and eliminate some superfluous local variables. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30ieee1394: sbp2: prepare for s/g chainingStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-01-30x86: early boot debugging via FireWire (ohci1394_dma=early)Bernhard Kaindl
This patch adds a new configuration option, which adds support for a new early_param which gets checked in arch/x86/kernel/setup_{32,64}.c:setup_arch() to decide wether OHCI-1394 FireWire controllers should be initialized and enabled for physical DMA access to allow remote debugging of early problems like issues ACPI or other subsystems which are executed very early. If the config option is not enabled, no code is changed, and if the boot paramenter is not given, no new code is executed, and independent of that, all new code is freed after boot, so the config option can be even enabled in standard, non-debug kernels. With specialized tools, it is then possible to get debugging information from machines which have no serial ports (notebooks) such as the printk buffer contents, or any data which can be referenced from global pointers, if it is stored below the 4GB limit and even memory dumps of of the physical RAM region below the 4GB limit can be taken without any cooperation from the CPU of the host, so the machine can be crashed early, it does not matter. In the extreme, even kernel debuggers can be accessed in this way. I wrote a small kgdb module and an accompanying gdb stub for FireWire which allows to gdb to talk to kgdb using remote remory reads and writes over FireWire. An version of the gdb stub fore FireWire is able to read all global data from a system which is running a a normal kernel without any kernel debugger, without any interruption or support of the system's CPU. That way, e.g. the task struct and so on can be read and even manipulated when the physical DMA access is granted. A HOWTO is included in this patch, in Documentation/debugging-via-ohci1394.txt and I've put a copy online at ftp://ftp.suse.de/private/bk/firewire/docs/debugging-via-ohci1394.txt It also has links to all the tools which are available to make use of it another copy of it is online at: ftp://ftp.suse.de/private/bk/firewire/kernel/ohci1394_dma_early-v2.diff Signed-Off-By: Bernhard Kaindl <bk@suse.de> Tested-By: Thomas Renninger <trenn@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits) [SCSI] usbstorage: use last_sector_bug flag universally [SCSI] libsas: abstract STP task status into a function [SCSI] ultrastor: clean up inline asm warnings [SCSI] aic7xxx: fix firmware build [SCSI] aacraid: fib context lock for management ioctls [SCSI] ch: remove forward declarations [SCSI] ch: fix device minor number management bug [SCSI] ch: handle class_device_create failure properly [SCSI] NCR5380: fix section mismatch [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices [SCSI] IB/iSER: add logical unit reset support [SCSI] don't use __GFP_DMA for sense buffers if not required [SCSI] use dynamically allocated sense buffer [SCSI] scsi.h: add macro for enclosure bit of inquiry data [SCSI] sd: add fix for devices with last sector access problems [SCSI] fix pcmcia compile problem [SCSI] aacraid: add Voodoo Lite class of cards. [SCSI] aacraid: add new driver features flags [SCSI] qla2xxx: Update version number to 8.02.00-k7. [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command. ...
2008-01-24ieee1394: use class iteration apiDave Young
Convert to use the class iteration api. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-11[SCSI] relax scsi dma alignmentJames Bottomley
This patch relaxes the default SCSI DMA alignment from 512 bytes to 4 bytes. I remember from previous discussions that usb and firewire have sector size alignment requirements, so I upped their alignments in the respective slave allocs. The reason for doing this is so that we don't get such a huge amount of copy overhead in bio_copy_user() for udev. (basically all inquiries it issues can now be directly mapped). Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-11-04ieee1394: iso and async streams: s/g list fixJens Axboe
Torsten Kaiser wrote: > Looking that calltrace upwards, it seems replacing the > memset(dma->sglist,...) with sg_init_table(...) would fix the BUG_ON() > as that inits the SG_MAGIC. Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-11-02cleanup asm/scatterlist.h includesAdrian Bunk
Not architecture specific code should not #include <asm/scatterlist.h>. This patch therefore either replaces them with #include <linux/scatterlist.h> or simply removes them if they were unused. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-31ieee1394: ieee1394_transactions.c: remove dead codeAdrian Bunk
This patch removes dead code spotted by the Intel C Compiler. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-24SG: Change sg_set_page() to take length and offset argumentJens Axboe
Most drivers need to set length and offset as well, so may as well fold those three lines into one. Add sg_assign_page() for those two locations that only needed to set the page, where the offset/length is set outside of the function context. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-23[PATCH] Fix breakage after SG cleanupsRalf Baechle
Commits 58b053e4ce9d2fc3023645c1b96e537c72aa8d9a ("Update arch/ to use sg helpers") 45711f1af6eff1a6d010703b4862e0d2b9afd056 ("[SG] Update drivers to use sg helpers") fa05f1286be25a8ce915c5dd492aea61126b3f33 ("Update net/ to use sg helpers") converted many files to use the scatter gather helpers without ensuring that the necessary headerfile <linux/scatterlist> is included. This happened to work for ia64, powerpc, sparc64 and x86 because they happened to drag in that file via their <asm/dma-mapping.h>. On most of the others this probably broke. Instead of increasing the header file spider web I choose to include <linux/scatterlist.h> directly into the affectes files. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-22[SG] Update drivers to use sg helpersJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-16ieee1394: ieee1394_core.c: use DEFINE_SPINLOCK for spinlock definitionMatthias Kaehlcke
drivers/ieee1394/ieee1394_core.c: Define spinlock using DEFINE_SPINLOCK instead of assignment to SPIN_LOCK_UNLOCKED Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: csr1212: proper refcountingStefan Richter
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 <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: nodemgr: fix leak of struct csr1212_keyvalStefan Richter
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 <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: pcilynx: I2C cleanupsJean Delvare
* Delete optional and empty i2c client_register and client_unregister callbacks. * Use the proper i2c adapter ID. * Don't use a template to initialize the i2c_adapter structure, it's inefficient. * Update a misleading comment on why we use i2c_transfer rather than higher level i2c functions. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: Fix kthread stopping in nodemgr_host_threadSatyam Sharma
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 <satyam@infradead.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: sbp2: fix unsafe iteration over list of devicesStefan Richter
sbp2_host_reset and sbp2_handle_status_write are not serialized against sbp2_alloc_device and sbp2_remove_device. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: pcilynx: superfluous local variablesStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: eth1394: fix lock imbalanceStefan Richter
bad_proto can be reached from points which did not take priv->lock. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-16ieee1394: eth1394: superfluous local variableStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-12Driver core: change add_uevent_var to use a structKay Sievers
This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>