Commit Graph

99 Commits

Author SHA1 Message Date
Alexey Dobriyan 1f050a19e1 [PATCH] video1394: fix "return E;" typo
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ben Collins <bcollins@debian.org>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-28 20:53:43 -08:00
Stefan Richter a80614d1ad sbp2: update 36byte inquiry workaround (fix compatibility regression)
Since about Linux 2.6.14, sbp2's inquiry workaround did not work anymore
due to changes in the SCSI layer. Update it to become effective again.
Testing one of the two known affected bridges has shown that skip_ms_page_8
is required as well.

Also, make force_inquiry_hack tunable via /sys/module/sbp2/parameters.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
(cherry picked from 99496037c6744fd938ffb8ccfc8fc91762322ff8 commit)
2006-02-23 00:29:31 -05:00
Stefan Richter 35bdddb83f sbp2: variable status FIFO address (fix login timeout)
Let the ieee1394 core select a suitable 1394 address range for sbp2's
status FIFO instead of using a fixed range. Since the core only selects
addresses which are guaranteed to be out of the "physical range" as per
OHCI 1.1, this patch also fixes an old bug:

OHCI controllers which implement a writeable PhysicalUpperBound register
included sbp2's status FIFO in the physical range. That way sbp2 was
never notified of a succesful login and always failed after timeout.
Affected OHCI host adapters include ALi and Fujitsu controllers.

As another side effect of this patch, the status FIFO is no longer
located in a range for which OHCI chips perform "posted writes". Each
status write now requires a response subaction. But since large data
transfers involve only few status writes, there is no measurable
decrease of I/O throughput. What's more, the status FIFO is now safe
from potential host bus errors. Nevertheless, posted writes could be
re-enabled by extensions to the ARM features of the 1394 stack.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
(cherry picked from b2d38cccad4ef80d6b672b8f89aae5fe2907b113 commit)
2006-02-23 00:28:52 -05:00
Stefan Richter bf637ec3ef sbp2: fix another deadlock after disconnection
If there were commands enqueued but not completed before an SBP-2 unit
was unplugged (or an attempt to reconnect failed), knodemgrd or any
process which tried to remove the device would sleep uninterruptibly
in blk_execute_rq().  Therefore make sure that all commands are
completed when sbp2 retreats.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
(cherry picked from 61daa34c132c5d4ed8630e2c46e9bf2f0c7b3428 commit)
2006-02-23 00:25:08 -05:00
Al Viro e30809fde5 [PATCH] don't mangle INQUIRY if cmddt or evpd bits are set
sbp2.c mangles INQUIRY response in a way that only applies to standard
inquiry data (i.e. when both cmddt and evpd bits are 0).  Leave other cases
alone; e.g. when asking for VPD the length of reply is in byte 3, not 4
and byte 4 is the first byte of device serial number.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-18 15:54:13 -05:00
Jody McIntyre 506eecde44 Actually remove amdtp.[ch], cmp.[ch].
The feature removal was done in 7301c8d3a0
but these files were not removed for some reason.

Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2006-01-16 19:21:57 -05:00
Christoph Hellwig 7ff92053dd [PATCH] don't include ioctl32.h in drivers
These days ioctl32.h is only used for communication of fs/compat.c and
fs/compat_ioctl.c and doesn't contain anything of interest to drivers.

Remove inclusion in various drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:34 -08:00
Dave Jones 8c1d286e6a [PATCH] don't freeze firewire on suspend.
We had a report from one loony user who tried out suspend to disk using a
swap partition on a firewire drive.  As the firewire thread was put to
sleep it didn't work out too well.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ben Collins <bcollins@debian.org>
Cc: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:43 -08:00
Jody McIntyre 0a75c23a00 Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2006-01-05 08:03:40 -05:00
Linus Torvalds db9edfd7e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04 18:44:12 -08:00
Linus Torvalds 25c862cc9e Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2006-01-04 16:36:52 -08:00
Kay Sievers 312c004d36 [PATCH] driver core: replace "hotplug" by "uevent"
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>
2006-01-04 16:18:08 -08:00
Brian Gerst 352dd1df32 gitignore: misc files
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>
2006-01-01 22:21:50 +01:00
Stefan Richter eaceec7f6c sbp2: remove duplicate code from sbp2_start_device()
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>
2005-12-13 11:05:05 -05:00
Stefan Richter cf8d2c0965 sbp2: split sbp2_create_command_orb() for better readability
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>
2005-12-13 11:05:03 -05:00
Stefan Richter 209171a17a ohci1394: log number of implemented isochronous contexts
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>
2005-12-13 11:05:00 -05:00
Stefan Richter d51e86c18a ieee1394: write broadcast_channel only to select nodes (fixes device recognition)
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)
2005-12-12 23:21:12 -05:00
Stefan Richter 48622b7bde ieee1394: resume remote ports when starting a host (fixes device recognition)
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)
2005-12-12 23:20:58 -05:00
Stefan Richter dc3edd5412 sbp2: did not clean up after scsi_add_device() failed
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>
2005-12-12 23:03:30 -05:00
Stefan Richter 43863eba76 sbp2: delete sbp2scsi_direction_table
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>
2005-12-12 23:03:24 -05:00
Stefan Richter 51c1d80e92 ieee1394: run high-level updates before high-level probes
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>
2005-12-12 23:03:19 -05:00
Stefan Richter e38dc0ae24 ieee1394: remove nonexistent functions from nodemgr.h
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-12-05 16:29:02 -05:00
Stefan Richter 61c7f775ca ieee1394: write broadcast_channel only to select nodes (fixes device recognition)
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>
2005-12-05 16:28:59 -05:00
Stefan Richter 741854e4f9 ieee1394: whitespace cleanup in hosts.[ch], ieee1394_core.[ch]
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-12-01 18:52:03 -05:00
Stefan Richter 546513f9fd ieee1394: hpsb_send_phy_config() cleanup
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>
2005-12-01 18:52:01 -05:00
Stefan Richter d7758461b9 ieee1394: add definitions for phy packet constants
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>
2005-12-01 18:51:56 -05:00
Stefan Richter 14c0fa243b ieee1394: resume remote ports when starting a host (fixes device recognition)
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>
2005-12-01 18:51:52 -05:00
Jens-Michael Hoffmann c64d472abc ieee1394/raw1394: LIndent fixes
This patch contains fixes by LIndent.

Signed-off-by: Jens-Michael Hoffmann <jensmh@gmx.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-22 12:37:10 -05:00
Jens-Michael Hoffmann 066ef9c2fb ieee1394/iso: LIndent fixes
This patch contains fixes by LIndent.

Signed-off-by: Jens-Michael Hoffmann <jensmh@gmx.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-22 12:35:23 -05:00
Jens-Michael Hoffmann 16c333a34a ieee1394/ieee1394_transactions: LIndent fixes
This patch contains fixes by LIndent.

Signed-off-by: Jens-Michael Hoffmann <jensmh@gmx.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-22 12:34:16 -05:00
Jens-Michael Hoffmann 6649e92d79 ieee1394/dma: LIndent fixes
This patch contains fixes by LIndent.

Signed-off-by: Jens-Michael Hoffmann <jensmh@gmx.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-22 12:18:28 -05:00
Jody McIntyre a96074e76f csr1212: add check for !valid
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>
2005-11-22 12:17:14 -05:00
Jody McIntyre 5303a986c3 csr1212: check results of keyval reads
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>
2005-11-22 12:17:11 -05:00
Stefan Richter b12479ddce raw1394: fix memory deallocation in modify_config_rom
raw1394: use correct deallocation macro for CSR cache

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-21 17:32:18 -05:00
Adrian Bunk d734f92b0d drivers/ieee1394/raw1394.c: fix a NULL pointer
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>
2005-11-21 17:32:14 -05:00
Stefan Richter 977545e352 sbp2: slimmer interface to scsi_mod
- 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>
2005-11-19 21:35:22 -05:00
Damien Douxchamps e4cda1654e Fix incorrect video1394 timestamps.
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>
2005-11-19 21:32:03 -05:00
Adrian Bunk e27d3014f3 Every file should #include the headers containing the prototypes for
it's global functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-19 21:23:48 -05:00
Jody McIntyre 963f48a116 sbp2_command_orb_lock must be held when accessing the _orb_inuse list.
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)
2005-11-18 16:41:39 -05:00
Jody McIntyre a9931a6e37 Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-11-18 00:18:25 -05:00
Jody McIntyre 7301c8d3a0 Remove amdtp, cmp drivers.
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>
2005-11-18 00:16:26 -05:00
Nishanth Aravamudan 4de4ebc6d8 [PATCH] ieee1394: fix-up schedule_timeout() usage
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>
2005-11-07 07:53:57 -08:00
Stefan Richter ef797546a9 Remove definitions of unreferenced macros virt_to_page and vmalloc_32 from
dv1394 and video1394.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-07 06:31:50 -05:00
Stefan Richter 8551158abc kmalloc/kzalloc changes:
dv1394, eth1394, ieee1394, ohci1394, pcilynx, raw1394, sbp2c, video1394:
 - use kzalloc
 - provide safer size arguments to kmalloc and kzalloc
 - omit some casts

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-07 06:31:45 -05:00
Stefan Richter 7afa146776 Remove version strings from eth1394, ohci1394, sbp2.
Their version information is not trustworthy.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-07 06:31:42 -05:00
Stefan Richter a237f35fdd sbp2, ohci1394 cleanups:
sbp2: various code formatting cleanups
ohci1394: remove form feed characters

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-07 06:31:39 -05:00
Ben Collins e309fc6d71 sbp2: Remove our tracking of device type,
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>
2005-11-07 06:31:34 -05:00
Ben Collins 365c786f0b sbp2: Merge TYPE_RBC and 10byte removal patch from scsi maintainers.
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>
2005-11-07 06:31:24 -05:00
Jody McIntyre 7945619794 sbp2_command_orb_lock must be held when accessing the _orb_inuse list.
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>
2005-11-07 06:29:39 -05:00
Greg KH 6fbfddcb52 Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00