Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ignore all files generated from *_shipped files, plus a few others.
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Use sbp2_remove_device() to free FIFO and ORB DMAs in a failure case.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
sbp2_create_command_orb() code cleanup:
- add two helper functions to reduce nesting depth
- omit the return value which was always ignored
- remove unnecessary declaration from sb2.h
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Print the number of IR and IT contexts which a hardware implements
as an informational log message when ohci1394 initializes.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Some old 1394-1995 SBP-2 bridges would hang if they received a broadcast write
request to BROADCAST_CHANNEL before the config ROM was read. Affected devices
include Datafab MD2-FW2 2.5" HDD and SmartDisk VST FWCDRW-V8 portable CD writer.
The write request is now directed to specific nodes instead of being broadcast
to all nodes at once, and it is only performed if a previous read request at
this register succeeded.
Fixes an old interoperability problem which was perceived as a 2.6.14-specific
regression: http://marc.theaimsgroup.com/?t=113190586800003
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
(cherry picked from 61c7f775ca commit)
After initializing an IEEE 1394 host, broadcast a resume packet. This makes
remote nodes visible which suspended their ports while the host was down.
Such nodes had to be unplugged and replugged in order to be recognized.
Motorola DCT6200 cable reciever was affected, probably other devices too.
http://marc.theaimsgroup.com/?t=113202715800001
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
(cherry picked from 14c0fa243b commit)
If scsi_add_device() at the end of sbp2_start_device() fails, e.g. due to
transport errors during SCSI inquiry, sbp2 needs to log out of the device
and release all associated resources.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
DMA_BIDIRECTIONAL data direction may be handled properly by Linux in the
future. For now, reject it instead to convert it to another direction.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
After a bus reset, let nodemgr call high-level update hooks first for nodes
which do not need to be probed. The main benefit is for a bus with more
than one SBP-2 device: SBP-2 reconnects will be performed before SBP-2
logins, thus have a much higher chance to succeed, and their SCSI devices
will not be blocked much longer than necessary. This was demonstrated for
Linux 2.4 by Dave Cinege a while ago.
A better approach would be to perform time-consuming probes in parallel by a
subthread. I actually plan to implement this for sbp2 but it may take a
while to get that done and tested. Until then, this tweak is a huge
improvement for users with multiple SBP-2 devices.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Some old 1394-1995 SBP-2 bridges would hang if they received a broadcast write
request to BROADCAST_CHANNEL before the config ROM was read. Affected devices
include Datafab MD2-FW2 2.5" HDD and SmartDisk VST FWCDRW-V8 portable CD writer.
The write request is now directed to specific nodes instead of being broadcast
to all nodes at once, and it is only performed if a previous read request at
this register succeeded.
Fixes an old interoperability problem which was perceived as a 2.6.14-specific
regression: http://marc.theaimsgroup.com/?t=113190586800003
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Eliminate some code in hpsb_send_phy_config() which is provided
by hpsb_make_phypacket().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Introduce new macros related to phy packets and use them in ieee1394_core and
nodemgr.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
After initializing an IEEE 1394 host, broadcast a resume packet. This makes
remote nodes visible which suspended their ports while the host was down.
Such nodes had to be unplugged and replugged in order to be recognized.
Motorola DCT6200 cable reciever was affected, probably other devices too.
http://marc.theaimsgroup.com/?t=113202715800001
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Don't read the keyval if there's already a valid one in place. May not be
necessary but shouldn't hurt.
Signed-off-by: Jody McIntyre <scjdy@steamballoon.com>
csr1212_parse_csr() did not properly check return values when reading
keyvals. Fix this by using _csr1212_read_keyval() instead of
csr1212_get_keyval() and checking the return code.
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
The coverity checker spotted that this was a NULL pointer dereference in
the "if (copy_from_user(...))" case since the next step is to
kfree(cache->filled_head).
There's no need to free cache at this point, and it's getting free'd
later.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
- sbp2scsi_reset does not need to take host_lock
- sbp2scsi_reset, as our device reset handler, does not need to stand in as
bus reset or host reset handler
- let scsi_mod use scsi_host_template.name instead of .info
(sbp2 is not an emulation anway)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
This patch fixes the incoherent timestamps generated by video1394 since
the single-buffer patch was applied in 2.6.11. Credits have also been
removed from the header and a "//" comment was changed to "/* */".
Signed-off-by: Damien Douxchamps <ddouxchamps@users.sf.net>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Fixes an oops in sbp2util_find_command_for_SCpnt after sbp2scsi_abort:
https://bugzilla.novell.com/show_bug.cgi?id=113734
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
(cherry picked from 7945619794 commit)
Remove the Audio and Music Data Transmission Protocol driver and the
Connection Management Procedures driver. These are incomplete, have never
worked, and are better implemented in userland via raw1394 (see
http://freebob.sourceforge.net/ for example.)
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Cc: Adrian Bunk <bunk@stusta.de>
Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Ben Collins <bcollins@debian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Their version information is not trustworthy.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
since we no longer need to worry about it.
Depends on patch "ieee1394: remove sbp2's TYPE_RBC and 10byte handling".
Signed-off-by: Ben Collins <bcollins@debian.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Added more cleanups to remove unused code.
Signed-off-by: Ben Collins <bcollins@debian.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Fixes an oops in sbp2util_find_command_for_SCpnt after sbp2scsi_abort:
https://bugzilla.novell.com/show_bug.cgi?id=113734
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.
Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The previous patch adding the ability to nest struct class_device
changed the paramaters to the call class_device_create(). This patch
fixes up all in-kernel users of the function.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Changes all spinlocks that can be held during an irq handler to disable
interrupts while the lock is held. Changes spin_[un]lock_irq to use the
irqsave/irqrestore variants for robustness and readability.
In raw1394.c:handle_iso_listen(), don't grab host_info_lock at all -- we're
not accessing host_info_list or host_count, and holding this lock while
trying to tasklet_kill the iso tasklet this can cause an ABBA deadlock if
ohci:dma_rcv_tasklet is running and tries to grab host_info_lock in
raw1394.c:receive_iso. Test program attached reliably deadlocks all SMP
machines I have been able to test without this patch.
Signed-off-by: Andy Wingo <wingo@pobox.com>
Acked-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- added typedef unsigned int __nocast gfp_t;
- replaced __nocast uses for gfp flags with gfp_t - it gives exactly
the same warnings as far as sparse is concerned, doesn't change
generated code (from gcc point of view we replaced unsigned int with
typedef) and documents what's going on far better.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
less noise in dmesg
Signed-off-by: Ben Collins <bcollins@debian.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
amdtp, dv1394, raw1394, video1394:
Delete legacy module aliases. The macros did not work and the aliases are not
needed nowadays.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@debian.org>
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Work around limitation in rawiso routines. Required with 1394b cards on
architectures where PAGE_SIZE is 4096. Based on a previous patch by Ben
Collins.
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Cc: Ben Collins <bcollins@debian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>