Commit Graph

2529 Commits (04d9768ff8847b0ae8c41ac3cfb3c5bb2e31699a)

Author SHA1 Message Date
Jeff Garzik 83aabc1be5 [SCSI] SCSI megaraid_sas: handle thrown errors
- handle clear_user() error

- handle and properly unwind from sysfs errors thrown during mod init

- adjust order of calls in megasas_exit() to precisely match
  registration order in megasas_init()

Signed-off-by: Jeff Garzik <jeff@garzik.org>

Updated for extra attribute and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:26:25 -05:00
Jeff Garzik bb0766204c [SCSI] SCSI aic94xx: handle sysfs errors
Handle and unwind from errors returned by driver model functions.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:17:47 -05:00
Jeff Garzik 13026a6b98 [SCSI] SCSI st: fix error handling in module init, sysfs
- Notice and handle sysfs errors in module init, tape init

- Properly unwind errors in module init

- Remove bogus st_sysfs_class==NULL test, it is guaranteed !NULL at that point

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:16:29 -05:00
Jeff Garzik 5e4009ba3d [SCSI] SCSI sd: fix module init/exit error handling
- Properly handle and unwind errors in init_sd().  Fixes leaks on error,
  if class_register() or scsi_register_driver() failed.

- Ensure that exit_sd() execution order is the perfect inverse of
  initialization order.

FIXME:  If some-but-not-all register_blkdev() calls fail, we wind up
calling unregister_blkdev() for block devices we did not register.
This was a pre-existing bug.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:14:16 -05:00
Jeff Garzik 37e0333c68 [SCSI] SCSI osst: add error handling to module init, sysfs
- check all sysfs-related return codes, and propagate them back to callers

- properly unwind errors in osst_probe(), init_osst().  This fixes a
  leak that occured if scsi driver registration failed, and fixes an
  oops if sysfs creation returned an error.

(unrelated)
- kzalloc() cleanup in new_tape_buf()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:12:44 -05:00
Henne de77aaff5f [SCSI] scsi: remove hosts.h
Remove the obsolete hosts.h file under drivers/scsi.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:10:52 -05:00
Henne c127828936 [SCSI] scsi: Scsi_Cmnd convertion in aic7xxx_old.c
Changes the obsolete Scsi_Cmnd to struct scsi_cmnd in aic7xxx_old.c.
Also replacing lots of whitespaces with tabs in structures and functions
which have been changed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 13:10:01 -05:00
Sumant Patro 2a3681e56e [SCSI] megaraid_sas: sets ioctl timeout and updates version,changelog
This patch sets timeout of max 180 seconds for ioctl completion.
It also updates the Changelog and hikes the version to 3.05.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:55:29 -05:00
Sumant Patro 5d018ad057 [SCSI] megaraid_sas: adds tasklet for cmd completion
This patch adds a tasklet for command completion.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:53:42 -05:00
Sumant Patro 658dcedb4e [SCSI] megaraid_sas: prints pending cmds before setting hw_crit_error
This patch adds function to print the pending frame details before returning
failure from the reset routine. It also exposes a new variable megasas_dbg_lvl
that allows the user to set the debug level for logging.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:52:15 -05:00
Sumant Patro b274cab779 [SCSI] megaraid_sas: function pointer for disable interrupt
This patch adds function pointer to invoke disable interrupt for
xscale and ppc IOP based controllers. Removes old implementation that checks
for controller type in megasas_disable_intr.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:49:27 -05:00
Sumant Patro b1df99d943 [SCSI] megaraid_sas: frame count optimization
This patch removes duplicated code in frame calculation &  adds
megasas_get_frame_count() that also takes into account the number of frames
that can be contained in the Main frame.
FW uses the frame count to pull sufficient number of frames from host memory.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:48:17 -05:00
Sumant Patro e3bbff9f3c [SCSI] megaraid_sas: FW transition and q size changes
This patch has the following enhancements :
        a. handles new transition states of FW to support controller hotplug.
        b. It reduces by 1 the maximum cmds that the driver may send to FW.
        c. Sends "Stop Processing" cmd to FW before returning failure from reset routine
        d. Adds print in megasas_transition routine
        e. Sends "RESET" flag to FW to do a soft reset of controller
to move from Operational to Ready state.
	f. Sending correct pointer (cmd->sense) to pci_pool_free

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-04 12:45:19 -05:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Andrew Vasquez 65935ff95c [SCSI] qla2xxx: Update version number to 8.01.07-k2.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:10 -05:00
Andrew Vasquez 07db518313 [SCSI] qla2xxx: Stall mid-layer error handlers while rport is blocked.
Stall error handler if attempting recovery while an rport is
blocked.  This avoids device offline scenarios due to errors in
the error handler.

Reference implementation from lpfc/mptfc.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:06 -05:00
Andrew Vasquez bb8ee49984 [SCSI] qla2xxx: Add MODULE_FIRMWARE tags.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:29:02 -05:00
Andrew Vasquez 7047fcddb1 [SCSI] qla2xxx: Add support for host port state FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:58 -05:00
Andrew Vasquez 90991c85d3 [SCSI] qla2xxx: Add support for fabric name FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:50 -05:00
Andrew Vasquez a740a3f040 [SCSI] qla2xxx: Add support for system hostname FC transport attribute.
The system hostname will be used during a subsequent FDMI registration
with the fabric.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:46 -05:00
Andrew Vasquez 1620f7c2d8 [SCSI] qla2xxx: Add support for symbolic nodename FC transport attribute.
Refactored original code from qla_gs.c:qla2x00_rsnn_nn().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:42 -05:00
Andrew Vasquez d8b4521349 [SCSI] qla2xxx: Add iIDMA support.
iIDMA (Intelligent Interleaved Direct Memory Access) allows for
the HBA hardware to send FC frames at the rate at which they can
be received by a target device.  By taking advantage of the
higher link rate, the HBA can maximize bandwidth utilization in a
heterogeneous multi-speed SAN.

Within a fabric topology, port speed detection is done via a Name
Server command (GFPN_ID) followed by a Fabric Management command
(GPSC).  In an FCAL/N2N topology, port speed is based on the HBA
link-rate.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:38 -05:00
Henne ee0ca6bab3 [SCSI] scsi: Scsi_Cmnd convertion in arm subtree
Changes the obsolete Scsi_Cmnd to struct scsi_cmnd in the arm subdir
of the scsi-subsys.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:33 -05:00
Henne 1516b55d90 [SCSI] scsi: Convertion to struct scsi_cmnd in ips-driver
Converts the obsolete Scsi_Cmnd to struct scsi_cmnd in the ips-driver.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 17:28:29 -05:00
Uwe Zeisberger f30c226954 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:01:26 +02:00
Matt LaPlante 84eb8d0608 Fix "can not" in Documentation and Kconfig
Randy brought it to my attention that in proper english "can not" should always
be written "cannot". I donot see any reason to argue, even if I mightnot
understand why this rule exists.  This patch fixes "can not" in several
Documentation files as well as three Kconfigs.

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:53:09 +02:00
Matt LaPlante 095096038d Fix several typos in drivers/
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:31:37 +02:00
Guennadi Liakhovetski 8f6fd19f1f [SCSI] enable clustering for tmscsim
following an email from John Adams <johna@onevista.com> to me with a patch
to enable tmscsim to use blocks up to 1MB and a discussion on linux-scsi,
below is a patch to enable clustering for tmscsim. I made it switchable
with a module parameter, with default "enable" - in case somebody gets
problems with it. Unfortunately, I was not able to check if this alone
lets you use any bigger blocks with a tape, as my tape seems to only
support 1 block size - only "mt setblk 1" is successful, any other value
fails. OTOH, testing on a P-133 showed that enabling clustering alone
improves throughput by 10% and reduces CPU load by another 10%, so, seems
a worthy thing to do. As for setting max_sectors, that might become a
separate patch...

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-03 09:16:48 -05:00
Serge E. Hallyn 96b644bdec [PATCH] namespaces: utsname: use init_utsname when appropriate
In some places, particularly drivers and __init code, the init utsns is the
appropriate one to use.  This patch replaces those with a the init_utsname
helper.

Changes: Removed several uses of init_utsname().  Hope I picked all the
	right ones in net/ipv4/ipconfig.c.  These are now changed to
	utsname() (the per-process namespace utsname) in the previous
	patch (2/7)

[akpm@osdl.org: CIFS fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:21 -07:00
Mike Christie f70cfa9bef [SCSI] scsi_devinfo: scsi2 HP and Hitachi entries
When SCSI-2 they can support luns past 7 and sparse luns.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:09:19 -05:00
Mike Christie 12427d9948 [SCSI] scsi_devinfo: add nec iStorage
support the report luns opcode
.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:08:41 -05:00
Mike Christie 5f619c5ba5 [SCSI] scsi_devinfo: add Tornado
This is from RHEL4. I do not have any info from our bugzilla. All
I could find was something like this thread
http://lkml.org/lkml/2005/1/7/346

Report lun for linux does not work. It may be our lun format code or
it may be the device. It is probably not worth it to add anything
special for this device, so the patch just adds BLIST_NOREPORTLUN.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:07:57 -05:00
Mike Christie 3441afc672 [SCSI] scsi_devinfo: add EMC Invista
This is from RHEL4. This box can support
scsi2 and can also support BLIST_SPARSELUN | BLIST_LARGELUN.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:07:11 -05:00
Arne Redlich 6470f2ba64 [SCSI] trivial scsi_execute_async fix
In scsi_execute_async()'s error path, a struct scsi_io_context
allocated with kmem_cache_alloc() is kfree()'d. Obviously
kmem_cache_free() should be used instead.

Signed-off-by: Arne Redlich <arne.redlich@xiranet.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:06:54 -05:00
Ed Lin fb4f66be59 [SCSI] stex: add new device (id 0x8650) support
A new device (id 0x8650, nickname 'yosemite') support is added.
It's basically the same, except for following items:
- mapping of id and lun by firmware
- special handling for some commands in interrupt routine
- change of internal copy function for these special commands
- different reset handling code
- different shutdown notification command

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:05:52 -05:00
Ed Lin f903d7b7a8 [SCSI] stex: cancel unused field in struct req_msg
The payload_sz field in struct req_msg is not big enough to indicate
the size of req_msg, as its type is u8.
It is confirmed that this field is not used by firmware, so cancel
it here.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:05:38 -05:00
Eric Sesterhenn 80c6e3c0b5 [SCSI] fix scsi_device_types overrun in scsi.c
this overrun was spotted by coverity (cid #1403).

If type == ARRAY_SIZE(scsi_device_types), we are off by one.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:04:48 -05:00
Denis Vlasenko 7b75b990e3 [SCSI] aic7xxx: fix byte I/O order in ahd_inw
Comment says "Read high byte first as some registers increment..."
but code doesn't guarantee that, I think:
	return ((ahd_inb(ahd, port+1) << 8) | ahd_inb(ahd, port));
Compiler can reorder it.

Make the order explicit.

Signed-off-by: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>

Fixed rejections and added aic7xxx code
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:03:38 -05:00
Alan Cox 02a0fa676c [SCSI] Switch ips to pci_register from pci_module
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 10:39:44 -05:00
Peter Zijlstra 6e9a4738c9 [PATCH] completions: lockdep annotate on stack completions
All on stack DECLARE_COMPLETIONs should be replaced by:
DECLARE_COMPLETION_ONSTACK

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:24 -07:00
Richard Knutsson 6e21828743 [PATCH] Generic boolean
This patch defines:
* a generic boolean-type, named 'bool'
* aliases to 0 and 1, named 'false' and 'true'

Removing colliding definitions of 'bool', 'false' and 'true'.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:18 -07:00
Jeff Garzik 1bdfd554be [PATCH] SCSI: fix request flag-related build breakage
The ->flags in struct request was split into two variables, in a recent
changeset.  The merge of this change forgot to update SCSI's libsas,
probably because libsas was a very recent merge.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-30 19:33:43 -07:00
David Howells 9361401eb7 [PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer.  Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.

This patch does the following:

 (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
     support.

 (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
     an item that uses the block layer.  This includes:

     (*) Block I/O tracing.

     (*) Disk partition code.

     (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.

     (*) The SCSI layer.  As far as I can tell, even SCSI chardevs use the
     	 block layer to do scheduling.  Some drivers that use SCSI facilities -
     	 such as USB storage - end up disabled indirectly from this.

     (*) Various block-based device drivers, such as IDE and the old CDROM
     	 drivers.

     (*) MTD blockdev handling and FTL.

     (*) JFFS - which uses set_bdev_super(), something it could avoid doing by
     	 taking a leaf out of JFFS2's book.

 (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
     linux/elevator.h contingent on CONFIG_BLOCK being set.  sector_div() is,
     however, still used in places, and so is still available.

 (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
     parts of linux/fs.h.

 (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.

 (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.

 (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
     is not enabled.

 (*) fs/no-block.c is created to hold out-of-line stubs and things that are
     required when CONFIG_BLOCK is not set:

     (*) Default blockdev file operations (to give error ENODEV on opening).

 (*) Makes some /proc changes:

     (*) /proc/devices does not list any blockdevs.

     (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.

 (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.

 (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
     given command other than Q_SYNC or if a special device is specified.

 (*) In init/do_mounts.c, no reference is made to the blockdev routines if
     CONFIG_BLOCK is not defined.  This does not prohibit NFS roots or JFFS2.

 (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
     error ENOSYS by way of cond_syscall if so).

 (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
     CONFIG_BLOCK is not set, since they can't then happen.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 20:52:31 +02:00
Jens Axboe 9bf09c2385 [PATCH] SCSI: scsi_done_q is unused
It is a leftover from before the softirq completion was migrated
to the block layer.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 20:31:11 +02:00
Jens Axboe cdd6026217 [PATCH] Remove ->rq_status from struct request
After Christophs SCSI change, the only usage left is RQ_ACTIVE
and RQ_INACTIVE. The block layer sets RQ_INACTIVE right before freeing
the request, so any check for RQ_INACTIVE in a driver is a bug and
indicates use-after-free.

So kill/clean the remaining users, straight forward.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-09-30 20:29:23 +02:00
Jens Axboe 4aff5e2333 [PATCH] Split struct request ->flags into two parts
Right now ->flags is a bit of a mess: some are request types, and
others are just modifiers. Clean this up by splitting it into
->cmd_type and ->cmd_flags. This allows introduction of generic
Linux block message types, useful for sending generic Linux commands
to block devices.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-09-30 20:23:37 +02:00
Michael Tokarev 07563c711f [PATCH] EISA bus MODALIAS attributes support
Add modalias attribute support for the almost forgotten now EISA bus and
(at least some) EISA-aware modules.

The modalias entry looks like (for an 3c509 NIC):

 eisa:sTCM5093

and the in-module alias like:

 eisa:sTCM5093*

The patch moves struct eisa_device_id declaration from include/linux/eisa.h
to include/linux/mod_devicetable.h (so that the former now #includes the
latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all
drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE
declared), and adds recognision of __mod_eisa_device_table to
scripts/mod/file2alias.c so that proper modules.alias will be generated.

There's no support for /lib/modules/$kver/modules.eisamap, as it's not used
by any existing tools, and because with in-kernel modalias mechanism those
maps are obsolete anyway.

The rationale for this patch is:

 a) to make EISA bus to act as other busses with modalias
    support, to unify driver loading

 b) to foget about EISA finally - with this patch, kernel
    (who still supports EISA) will be the only one who knows
    how to choose the necessary drivers for this bus ;)

[akpm@osdl.org: fix the kbuild bit]
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Acked-the-net-bits-by: Jeff Garzik <jeff@garzik.org>
Acked-the-tulip-bit-by: Valerie Henson <val_henson@linux.intel.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:19 -07:00
Eric Sesterhenn a2a65a3ecb [SCSI] Signedness issue in drivers/scsi/ipr.c
gcc 4.1 with some extra warnings show the following:

drivers/scsi/ipr.c:6361: warning: comparison of unsigned expression < 0 is always false
drivers/scsi/ipr.c:6385: warning: comparison of unsigned expression < 0 is always false
drivers/scsi/ipr.c:6415: warning: comparison of unsigned expression < 0 is always false

The problem is that rc is of the type u32, which can never be smaller than
zero, therefore all three error handling checks get useless.  This patch
changes it to a normal int, because all usages / all functions it get used
with expect an int.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Brian King <brking@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:36 -07:00
Henrik Kretzschmar dcbccbde00 [SCSI] pci_module_init conversion in scsi subsystem
Converts pci_module_init() to pci_register_driver() in the scsi subsys on
23 drivers which only return the value of pci_module_init().

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:32 -07:00
Eric Sesterhenn 45223fd77c [SCSI] Signdness issue in drivers/scsi/osst.c
another signdness warning from gcc 4.1

drivers/scsi/osst.c:5154: warning: comparison of unsigned expression < 0 is always false

The problem is that blk is defined as unsigned, but all usages of it are
normal int cases.  osst_get_frame_position() and osst_get_sector() return ints
and can return negative values.  If blk stays an unsigned int, the error check
is useless.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:28 -07:00
Henrik Kretzschmar 53aefd3fc3 [SCSI] scsi: included header cleanup
Free seagate.h from obsolete drivers/scsi.h, remove a double inclusion od
linux/delay.h and remove the unneeded scsi/scsi_ioctl.h

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:24 -07:00
Michal Piotrowski c03d10ab6a [SCSI] drivers/scsi/gdth.h: removal of old scsi code
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:16 -07:00
Michal Piotrowski 288777f89a [SCSI] drivers/scsi/dpt/dpti_i2o.h: removal of old scsi code
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 10:40:13 -07:00
Eric W. Biederman f5ebbeb57e [SCSI] megaraid: Use the proper type to hold the irq number.
When testing on a Unisys machine it was discovered that the megaraid driver
would not initialize as it was requesting irq 162 instead of irq 1442 it
was assigned.  The problem was the irq number had been truncated by being
stored in an unsigned char.

This patches fixes that problem and the driver now appears to work.

The ioctl interface appears fundamentally broken as it exports the irq
number to user space in an unsigned char.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 10:39:55 -07:00
Alexey Dobriyan d41ba22a6d [SCSI] 3w-xxxx: fix "ATA UDMA upgrade" message number
sparse "defined twice" warning

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 10:39:27 -07:00
Michal Piotrowski 16c8729a46 [SCSI] drivers/scsi/nsp32.h: removal of old scsi code
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 10:39:00 -07:00
Randy Dunlap 76be12de87 [SCSI] dc395x: fix printk format warning
drivers/scsi/dc395x.c:1224: warning: format '%i' expects type 'int', but argument 5 has type 'size_t'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 10:36:37 -07:00
Brian King 35a39691e4 [SCSI] ipr: Support attaching SATA devices
Adds support to attach SATA devices to ipr SAS adapters.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 09:23:18 -07:00
Henrik Kretzschmar d7694f8c0b [SCSI] seagate: remove header and convert to struct scsi_cmnd
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 09:23:17 -07:00
Jes Sorensen 15d1f53fc7 [SCSI] qla1280 command timeout
Original patch from Ian Dall in bugzilla. Set command timeout as
specified by the SCSI layer rather than hardcode it to 30 seconds. I
have received a couple of reports of people hitting this one with
various tape configurations and the patch looks obviously correct.
                                                                  - Jes

From http://bugzilla.kernel.org/show_bug.cgi?id=6275

ian@beware.dropbear.id.au (Ian Dall):

The command sent to the card was using a 30second timeout regardless of the
timeout requested in the scsi command passed down from higher levels.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 09:23:15 -07:00
Muli Ben-Yehuda bc54ec6b07 [SCSI] aic94xx: require firmware loader
aic94xx relies on external firmware and thus requires FW_LOADER.

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 09:23:15 -07:00
Douglas Gilbert 6460e75a10 [SCSI] sg: fixes for large page_size
This sg driver patch addresses the problem with larger
page sizes reported by Brian King in this post:
http://marc.theaimsgroup.com/?l=linux-scsi&m=115867718623631&w=2
Some other related matters are also addressed. Some of these
prevent oopses when the SG_SCATTER_SZ or scatter_elem_sz are
set to inappropriate values.

The scatter_elem_sz has been tested up to 4 MB which should
make the largest data transfer with one SCSI command, 32 MB
less one block, achievable with a relatively small number
of elements in the scatter gather list.

ChangeLog:
    - add scatter_elem_sz boot time parameter and sysfs module
      parameter that is initialized to SG_SCATTER_SZ
    - the driver will then adjust scatter_elem_sz to be the
      max(given(scatter_elem_sz), PAGE_SIZE)
      It will also round it up, if necessary, to be a power
      of two
    - clean up sg.h header, correct bad urls and some statements
      that are no longer valid
    - make the def_reserved_size sysfs module attribute writable

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 09:23:15 -07:00
James Smart 8aee918a1c [SCSI] lpfc: don't free mempool if mailbox is busy
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 09:23:15 -07:00
David Brownell 8b4b8a24e4 fix broken/dubious driver suspend() methods
Small driver suspend() fixes in preparation for the PRETHAW events:

 - Only compare message events for equality against PM_EVENT_* codes;
   not against integers, or using greater/less-than comparisons.
   (PM_EVENT_* should really become a __bitwise thing.)

 - Explicitly test for SUSPEND events (rather than not-something-else)
   before suspending devices.

 - Removes more of the confusion between a pm_message_t (wraps event code)
   and a "state" ... suspend() originally took a target system state.

These updates are correct and appropriate even without new PM_EVENT codes.

benh: "I think in the Mesh case, we should handle the freeze case as well or
we might get wild DMA."

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Greg KH <greg@kroah.com>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-25 21:08:37 -07:00
Al Viro 355edd2e39 [PATCH] fix idiocy in asd_init_lseq_mdp()
To whoever had written that code:

 a) priority of >> is higher than that of &
 b) priority of typecast is higher than that of any binary operator
 c) learn the fscking C

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24 20:07:49 -07:00
Al Viro 3cc27547d6 [PATCH] SCSI gfp_t annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24 20:07:49 -07:00
Matthew Wilcox 8a1cdc9ca2 [PATCH] Revert ABI-breaking change in /proc
Some user tools parse /proc/scsi/scsi, so we can't yet change the names.
Change the existing ones back to their old names, and add an admonition
to not make the same mistake that I did.

Andrew Morton reports that this was breaking YDL 4.1 userspace.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24 19:49:01 -07:00
Al Viro 6a3670c4f1 [PATCH] missing include (free_irq() use)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-24 15:55:03 -07:00
Jeff Garzik 23930fa1ce Merge branch 'master' into upstream 2006-09-24 01:52:47 -04:00
James Bottomley 1b73c4bb06 [SCSI] scsi_transport_fc: fixup netlink arguments
nlmsg_multicast now takes an extra allocation flag, so add it to
the use in the fibre channel transport class.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 22:07:20 -05:00
James Bottomley dfdc58ba35 [SCSI] SPI transport class: misc DV fixes
Key more of the domain validation settings off the inquiry data from
the disk (in particular, don't try IU or DT unless the disk claims to
support them.

Also add a new dv_in_progress flag to prevent recursive DV.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 20:53:53 -05:00
Alan Cox a07f353701 [SCSI] Switch some more scsi drivers to pci_get_device and refcounted pci structures
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 20:32:52 -05:00
Alan Cox 1a68d41a33 [SCSI] eata_pio cleanup and PCI fix
This started as a PCI reference fixup but to do that I need to build it,
to build it I need to fix it and its full of 32bitisms and uglies.

It has been resurrected, I'm not sure if this is a thank you for the
work on the license stuff or punishment for some unknown misdeed however
8). I've also fixed a memory scribble in the init code.

One oddity - the changes from HZ * to constants are deliberate. Whoever
originally wrote the code (or cleaned it up) used HZ for a cycle timing
loop even though is not HZ related. I've put it back to the counts used
in the old days when the driver was most used.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 20:28:19 -05:00
Mark Haverkamp ac5826ca91 [SCSI] aacraid: remove scsi_remove_device
Received from Mark Salyzyn:

Until the system is stabilized, I am suggesting the enclosed
modification to prevent the driver from tickling the panic. Once sysfs
and friends are stabilized, the patch may be backed out. We have yet to
evaluate if we really want to relinquish existing Scsi Devices in any
case, holding on to them as configuration of arrays comes and goes makes
some sense as well. As a result, we have opted to pull the lines rather
than comment them in legacy.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 20:10:10 -05:00
Mark Haverkamp 76a7f8fdc0 [SCSI] aacraid: merge rx and rkt code
Received from Mark Salyzyn:

The only real difference between the rkt and rx platform modules is the
offset of the message registers. This patch recognizes this similarity
and simplifies the driver to reduce it's code footprint and to improve
maintainability by reducing the code duplication.

Visibly, the 'rkt.c' portion of this patch looks more complicated than
it really is. View it as retaining the rkt-only specifics of the
interface.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 20:09:42 -05:00
Mark Haverkamp 653ba58d55 [SCSI] aacraid: expose physical devices
Received from Mark Salyzyn:

I am placing this functionality into an insmod parameter. Normally the physical
components are exported to sg, and are blocked from showing up in sd.

Note that the pass-through I/O path via the driver through the Firmware to the
physical disks is not an optimized path, the card is designed for Hardware
RAID, elevator sorting and caching. This should not be used as a means for
utilizing the aacraid based controllers as a generic scsi/SATA/SAS controller,
performance should suck by a few percentage points, any RAID meta-data on the
drives will confuse the controller about who owns the drives and there is a
high risk of destroying content in both directions. Unreliable and for
experimentation or strange controlled circumstances only.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 20:09:03 -05:00
Mark Haverkamp 6510135545 [SCSI] aacraid: misc cleanup
Received from Mark Salyzyn:

Basically cleanup, nothing here will have an affect. Adjusting some
error codes, removing superfluous definitions and code fragments.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 20:08:26 -05:00
Doug Ledford cf2b5d3fca [SCSI] aic7xxx: pause sequencer before touching SBLKCTL
Some cards need to pause the sequencer before the SBLKCTL register is
touched.  This fixes a PCI related oops seen on powerpc macs with this
card caused by trying to ascertain the bus signalling before beginning
domain validation.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 17:48:11 -05:00
James Bottomley 3e3c60e3a8 [SCSI] aic7xxx: avoid checking SBLKCTL register for certain cards
For cards that don't support LVD, checking the SBLKCTL register to
determine the bus singalling doesn't work.  So, check that the card
supports LVD first (AHC_ULTRA2) before checking the register.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 17:39:34 -05:00
Douglas Gilbert 231839102b [SCSI] scsi_debug version 1.80
See http://www.torque.net/sg/sdebug26.html for more
information on the scsi_debug driver.

ChangeLog:
  - add 'vpd_use_hostno' parameter to allow simulated hosts
    to see the same set of targets (and luns). For testing
    multipath software.
  - add 'fake_rw' parameter to ignore the data in READ and
    WRITE commands
  - add support for log subpages (new in SPC-4)
  - yield appropriate block descriptor for MODE SENSE
    commands (only for pdt=0 (i.e. disks))
  - REQUEST SENSE response no longer shows the stopped
    power condition (SAT changed to agree with SPC-3)

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 17:37:44 -05:00
James Bottomley c9802cd957 Merge mulgrave-w:git/scsi-misc-2.6
Conflicts:

	drivers/scsi/iscsi_tcp.c
	drivers/scsi/iscsi_tcp.h

Pretty horrible merge between crypto hash consolidation
and crypto_digest_...->crypto_hash_... conversion

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 15:33:43 -05:00
Jesper Juhl 2d2f8d59b1 [SCSI] megaraid: Make megaraid_ioctl() check copy_to_user() return value
Check copy_to_user() return value in drivers/scsi/megaraid.c::megadev_ioctl()
This gets rid of this little warning:
  drivers/scsi/megaraid.c:3661: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "Ju, Seokmann" <Seokmann.Ju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 11:53:09 -05:00
James Bottomley 5fcda42245 [SCSI] aha152x: remove static host array
Fix this driver not to use a static two element host array instead use
a list.  This should fix panic on multiple eject reinsert of the
pcmcia version of this device.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 11:51:57 -05:00
malahal@us.ibm.com 10d19ae5e1 [SCSI] aic94xx: Fix for a typo in aic94xx_init()
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 11:47:29 -05:00
Alexis Bruemmer f2d719c65a [SCSI] aic94xx: Removes Reliance on FLASH Manufacture IDs
This patch removes the reliance on FLASH Manufacture IDs for validation.

Signed-off-by: Alexis Bruemmer <alexisb@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-23 11:47:00 -05:00
Linus Torvalds 6bbd9b6d69 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (64 commits)
  [BLOCK] dm-crypt: trivial comment improvements
  [CRYPTO] api: Deprecate crypto_digest_* and crypto_alg_available
  [CRYPTO] padlock: Convert padlock-sha to use crypto_hash
  [CRYPTO] users: Use crypto_comp and crypto_has_*
  [CRYPTO] api: Add crypto_comp and crypto_has_*
  [CRYPTO] users: Use crypto_hash interface instead of crypto_digest
  [SCSI] iscsi: Use crypto_hash interface instead of crypto_digest
  [CRYPTO] digest: Remove old HMAC implementation
  [CRYPTO] doc: Update documentation for hash and me
  [SCTP]: Use HMAC template and hash interface
  [IPSEC]: Use HMAC template and hash interface
  [CRYPTO] tcrypt: Use HMAC template and hash interface
  [CRYPTO] hmac: Add crypto template implementation
  [CRYPTO] digest: Added user API for new hash type
  [CRYPTO] api: Mark parts of cipher interface as deprecated
  [PATCH] scatterlist: Add const to sg_set_buf/sg_init_one pointer argument
  [CRYPTO] drivers: Remove obsolete block cipher operations
  [CRYPTO] users: Use block ciphers where applicable
  [SUNRPC] GSS: Use block ciphers where applicable
  [IPSEC] ESP: Use block ciphers where applicable
  ...
2006-09-22 12:51:33 -07:00
Herbert Xu dc64ddf491 [SCSI] iscsi: Use crypto_hash interface instead of crypto_digest
This patch converts ISCSI to use the new crypto_hash interface instead
of crypto_digest.  It's a fairly straightforward substitution.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2006-09-21 11:46:20 +10:00
Jeff Garzik 4a3381feb8 Merge branch 'master' into upstream 2006-09-19 00:42:13 -04:00
Paul Mackerras c547fc28ab Merge branch 'linux-2.6' 2006-09-14 07:07:18 +10:00
Stefan Richter 7fbb36451a [PATCH] SCSI: lockdep annotation in scsi_send_eh_cmnd
Fixup for lockdep enabled kernels: Annotate an on-stack completion.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-13 07:32:14 -07:00
Tejun Heo a4f5749ba6 [PATCH] libata: ignore CFA signature while sanity-checking an ATAPI device
0x848a in ID word 0 indicates CFA device iff the ID data is obtained from
IDENTIFY DEVICE.  For ATAPI devices, 0x848a in ID work 0 indicates valid
ATAPI device.  Fix sanity check in ata_dev_read_id() such that ATAPI
devices reporting 0x848a in ID word 0 is not handled as error.

The problem is identified by J.A.  Magallon with HL-DT-ST DVDRAM GSA-4120B.

Signed-off-by: Tejun Helo <htejun@gmail.com>
Cc: J.A. Magallon <jamagallon@ono.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-13 07:32:14 -07:00
Henrik Kretzschmar 65396410af [SCSI] wd33c93: Scsi_Cmnd convertion
Changes obsolete typedef'd Scsi_Cmnd to struct scsi_cmnd.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-12 17:12:31 -05:00
Daniel Walker a506b44bb5 [SCSI] fix compile error on module_refcount
LD      .tmp_vmlinux1
drivers/built-in.o(.text+0x8e1f9): In function `scsi_device_put':
drivers/scsi/scsi.c:887: undefined reference to `module_refcount'
make: *** [.tmp_vmlinux1] Error 1

There are only two users of module_refcount() outside of kernel/module.c
and the other one uses ifdef's similar to this.

Signed-Off-By: Daniel Walker <dwalker@mvista.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-12 09:17:30 -05:00
Linus Torvalds 3f2f1257ff Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] ata_piix: add map 01b for ICH7M
  [libata] sata_mv: errata check buglet fix
2006-09-11 07:54:14 -07:00
Alan Cox 28a2a3f587 [PATCH] Fix 2.6.18-rc6 IDE breakage, add missing ident needed for current VIA boards
There are two changes here.  The first reverses the broken PCI_DEVICE
conversion back to the old format.  The second adds a missing PCI ID so
you can actually boot 2.6.18 on 2 month old VIA motherboards (right now
only 2.6.18-mm works).

CC'd to Jeff to check the PCI ident but its a) in several distro kernels
and b) in 2.6.18-mm [twice ??]

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-11 07:53:44 -07:00
Tejun Heo 6708374178 [PATCH] ata_piix: add map 01b for ICH7M
Although the document says otherwise, some ich7m uses map 01b.  This
patch adds separate map DB for ICH7M and adds map entry for 01b.

This was spotted on an ASUS laptop by Jonathan Dieter.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jonathan Dieter <jdieter@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-11 08:52:29 -04:00
Andres Salomon 62f1d0e6de [libata] sata_mv: errata check buglet fix
Fix a buglet; the errata check below this code is assuming the value in
the sstatus variable is what was pulled out of the SCR_STATUS register.
However, the status checks in the timeout loop clobber everything
but the first 4 bits of sstatus, so the errata checks are invalid.

This patch changes it to not clobber SStatus.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-09-11 08:51:05 -04:00
James Bottomley 2b7cbe2017 [SCSI] fix up SCSI netlink build
CONFIG_SCSI_NETLINK can become a bool since the item its
selecting (CONFIG_NET) cannot be a module.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-07 15:21:50 -05:00
James Bottomley a01e70e570 [SCSI] aci94xx: implement link rate setting
This patch implements the ability to set the minimum and maximum
linkrates for both libsas (for expanders) and aic94xx (for the host
phys).  It also tidies up the setting of the hardware min and max to
make sure they're updated when the expander emits a change broadcast.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-07 15:20:23 -05:00
James Bottomley d24e1eeb3a [SCSI] scsi_transport_sas: make minimum and maximum linkrate settable quantities
According to SPEC, the minimum_linkrate and maximum_linkrate should be
settable by the user.  This patch introduces a callback that allows the
sas class to pass these settings on to the driver.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-07 15:16:44 -05:00
James Bottomley 88edf74610 [SCSI] SAS: consolidate linkspeed definitions
At the moment we have two separate linkspeed enumerations covering
roughly the same values.  This patch consolidates on a single one enum
sas_linkspeed in scsi_transport_sas.h and uses it everywhere in the
aic94xx driver.  Eventually I'll get around to removing the duplicated
fields in asd_sas_phy and sas_phy ...

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-07 12:41:16 -05:00
Henrik Kretzschmar b4620233d6 [SCSI] scsi-driver ultrastore replace Scsi_Cmnd with struct scsi_cmnd
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-07 12:39:34 -05:00
James Bottomley f479ab8793 [SCSI] fix up non-modular SCSI
The recent change to the way scsi_device_get()/put() work broke the
non modular build (we do a module_refcount on a NULL).  Fix this by
checking for non-null before checking module_refcount().

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-07 10:37:22 -05:00
James Bottomley 884d25cc4f [SCSI] Fix refcount breakage with 'echo "1" > scan' when target already present
Spotted by: Dan Aloni <da-xx@monatomic.org>

The problem is there's inconsistent locking semantic usage of
scsi_alloc_target().  Two callers assume the target comes back with
reference unincremented and the third assumes its incremented.  Fix by
always making the reference incremented on return.  Also fix path in
target alloc that could consistently increment the parent lock.
Finally document scsi_alloc_target() so its callers know what the
expectations are.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-07 10:08:43 -05:00
James Smart 26dacd0c9b [SCSI] lpfc 8.1.10 : Change version number to 8.1.10
Change version number to 8.1.10

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-04 21:25:59 -05:00
James Smart c3f28afa61 [SCSI] lpfc 8.1.10 : Add support for new lpfc soft_wwpn attribute
Add support for a new lpfc soft_wwpn sysfs attribute

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-04 21:25:41 -05:00
James Smart c01f320879 [SCSI] lpfc 8.1.10 : Add support for dev_loss_tmo_callbk and fast_io_fail_tmo_callbk
Add support for new dev_loss_tmo callback
  Goodness is that it removes code for a parallel nodev timer that
  existed in the driver
Add support for the new fast_io_fail callback

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-04 21:25:21 -05:00
James Smart 0f29b966d6 [SCSI] FC transport: Add dev_loss_tmo callbacks, and new fast_io_fail_tmo w/ callback
This patch adds the following functionality to the FC transport:

- dev_loss_tmo LLDD callback :
  Called to essentially confirm the deletion of an rport. Thus, it is
  called whenever the dev_loss_tmo fires, or when the rport is deleted
  due to other circumstances (module unload, etc).  It is expected that
  the callback will initiate the termination of any outstanding i/o on
  the rport.

- fast_io_fail_tmo and LLD callback:
  There are some cases where it may take a long while to truly determine
  device loss, but the system is in a multipathing configuration that if
  the i/o was failed quickly (faster than dev_loss_tmo), it could be
  redirected to a different path and completed sooner.

Many thanks to Mike Reed who cleaned up the initial RFC in support
of this post.

The original RFC is at:
http://marc.theaimsgroup.com/?l=linux-scsi&m=115505981027246&w=2

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-04 21:22:05 -05:00
James Smart ae36764a23 [SCSI] lpfc 8.1.10 : Add support to return adapter symbolic name
Add support to return adapter symbolic name (now that attribute is dynamic)

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 15:36:04 -05:00
James Smart d2873e4c1e [SCSI] lpfc 8.1.10 : Add support to post events via new FC event interfaces
Add support to post events via new FC event interfaces

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 15:35:48 -05:00
James Smart f14e2e29cd [SCSI] SCSI & FC transport: extend event vendor id's to 64bits
During discussions with Mike Christie, I became convinced that we needed
a larger vendor id. This patch extends the id from 32 to 64 bits.

This applies on top of the prior patches that add SCSI transport events
via netlink.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 15:35:15 -05:00
James Smart 84314fd474 [SCSI] SCSI and FC Transport: add netlink support for posting of transport events
This patch formally adds support for the posting of FC events via netlink.
It is a followup to the original RFC at:
  http://marc.theaimsgroup.com/?l=linux-scsi&m=114530667923464&w=2
and the initial posting at:
  http://marc.theaimsgroup.com/?l=linux-scsi&m=115507374832500&w=2

The patch has been updated to optimize the send path, per the discussions
in the initial posting.

Per discussions at the Storage Summit and at OLS, we are to use netlink for
async events from transports. Also per discussions, to avoid a netlink
protocol per transport, I've create a single NETLINK_SCSITRANSPORT protocol,
which can then be used by all transports.

This patch:
- Creates new files scsi_netlink.c and scsi_netlink.h, which contains the
  single and shared definitions for the SCSI Transport. It is tied into the
  base SCSI subsystem intialization.
  Contains a single interface routine, scsi_send_transport_event(), for a
  transport to send an event (via multicast to a protocol specific group).
- Creates a new scsi_netlink_fc.h file, which contains the FC netlink event
  messages
- Adds 3 new routines to the fc transport:
   fc_get_event_number() -  to get a FC event #
   fc_host_post_event()  -  to send a simple FC event (32 bits of data)
   fc_host_post_vendor_event() - to send a Vendor unique event, with
                                 arbitrary amounts of data.

   Note: the separation of event number allows for a LLD to send a standard
     event, followed by vendor-specific data for the event.

Note: This patch assumes 2 prior fc transport patches have been installed:
   http://marc.theaimsgroup.com/?l=linux-scsi&m=115555807316329&w=2
   http://marc.theaimsgroup.com/?l=linux-scsi&m=115581614930261&w=2

   Sorry - next time I'll do something like making these individual
   patches of the same posting when I know they'll be posted closely
   together.

Signed-off-by: James Smart <James.Smart@emulex.com>

Tidy up configuration not to make SCSI always select NET

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 15:33:49 -05:00
James Bottomley deb81d80ba [SCSI] add failure return to scsi_init_shared_tag_map()
And use it in the stex driver.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:57:28 -05:00
Ed Lin cf355883f5 [SCSI] stex: add shared tags from block
Use block shared tags entirely within the driver. In the case of
shutdown, assume that there are no other outstanding commands, so tag
0 is fine.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:57:02 -05:00
Jeff Garzik 5a25ba1677 [SCSI] Add Promise SuperTrak driver
Add Promise SuperTrak 'stex' driver, supporting SuperTrak
EX8350/8300/16350/16300 controllers.  The controller's firmware accepts
SCSI commands, handing them to the underlying RAID or JBOD disks.

The driver consisted of the following cleanups and fixes, beyond its
initial submission:

Ed Lin:
      stex: cleanup and minor fixes
      stex: add new device ids
      stex: update internal copy code path
      stex: add hard reset function
      stex: adjust command timeout in slave_config routine
      stex: use more efficient method for unload/shutdown flush

Jeff Garzik:
      [SCSI] Add Promise SuperTrak 'shasta' driver.
      Rename drivers/scsi/shasta.c to stex.c ("SuperTrak EX").
      [SCSI] stex: update with community comments from 'Promise SuperTrak' thread
      [SCSI] stex: Fix warning, trim trailing whitespace.
      [SCSI] stex: remove last remnants of "shasta" project code name
      [SCSI] stex: removed 6-byte command emulation
      [SCSI] stex: minor cleanups
      [SCSI] stex: minor fixes: irq flag, error return value
      [SCSI] stex: use dma_alloc_coherent()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:54:02 -05:00
Hannes Reinecke 69bdd88ca2 [SCSI] Wrong size information for devices with disabled read access
When accessing a device with disabled read access the capacity is set
randomly to 1GB. This makes it impossible to userspace tools to detect
invalid device capacities.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Acked-by: Chris Mason <mason@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:47 -05:00
Mike Christie 01dfc7fc56 [SCSI] iscsi class: update version
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:43 -05:00
Mike Christie e648f63c65 [SCSI] libiscsi: don't call into lld to cleanup task
In the normal IO path we should not be calling back
into the LLD since the LLD will have cleaned up the
task before or after calling complete pdu.

For the fail_command path we still need to do this
to force the cleanup.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:40 -05:00
Mike Christie f47f2cf5d4 [SCSI] libiscsi: check that command ptr is set before accessing it
If the scsi eh sends a TUR and the session is down we could
return SCSI_ML_HOST_BUSY. scsi eh will ignore this and send
ask us to abort the command and we blindly accesst the
command ptr.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:36 -05:00
Mike Christie ca5186842a [SCSI] iscsi_tcp: fix partial digest recv
When a digest is spread across two network buffers, we currently
ignore this and try to check the digest with the partial buffer.
Or course this fails. This patch has use iscsi_tcp_copy to
copy the whole digest before testing it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:32 -05:00
Mike Christie db98ccde08 [SCSI] libiscsi: only check burst lengths when sending unsol data
The first burst length is only relevant if immedate data = Yes
or if Initial R2T is No

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:28 -05:00
Mike Christie d5390f5f78 [SCSI] iscsi_tcp: update header size during relogin
When we relogin to a target, we have not yet negotiated digests
so we must reset the hdr_size var.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:25 -05:00
Mike Christie 753e7d3866 [SCSI] iscsi_tcp: fix header resend
This patch built over the last ones fixes a bug in the partial header
resend code, where we add on another 4 bytes to the send length on the resend.
We want just the header plus digest.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:21 -05:00
Mike Christie dd8c0d9586 [SCSI] scsi_tcp: rm data rx and tx tfms
We currently allocated seperate tfms for data and header digests. There
is no reason for this since we can never calculate a rx header and
digest at the same time. Same for sends. So this patch removes the data
tfms and has the send and recv sides use the rx_tfm or tx_tfm.

I also made the connection creation code preallocate the tfms because I
thought I hit a bug where I changed the digests settings during a
relogin but could not allocate the tfm and then we just failed.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:18 -05:00
Mike Christie 62f383003c [SCSI] iscsi_tcp: fix padding, data digests, and IO at weird offsets
iscsi_tcp calculates padding by using the expected transfer length. This
has the problem where if we have immediate data = no and initial R2T =
yes, and the transfer length ended up needing padding then we send:

1. header
2. padding which should have gone after data
3. data

Besides this bug, we also assume the target will always ask for nice
transfer lengths and the first burst length will always be a nice value.
As far as I can tell form the RFC this is not a requirement. It would be
silly to do this, but if someone did it we will end doing bad things.

Finally the last bug in that bit of code is in our handling of the
recalculation of data digests when we do not send a whole iscsi_buf in
one try. The bug here is that we call crypto_digest_final on a
iscsi_sendpage error, then when we send the rest of the iscsi_buf, we
doiscsi_data_digest_init and this causes the previous data digest to be
lost.

And to make matters worse, some of these bugs are replicated over and
over and over again for immediate data, solicited data and unsolicited
data. So the attached patch made over the iscsi git tree (see
kernel.org/git for details) which I updated today to include the patches
I said I merged, consolidates the sending of data, padding and digests
and calculation of data digests and fixes the above bugs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:14 -05:00
Mike Christie 98a9416af0 [SCSI] attempt to complete r2t with data len greater than max burst
A couple targets like string bean and MDS, send r2ts with
a data len greater than the max burst we agreed to. We
were being strict in our enforcing of the iscsi rfc in that
code path, but there is no driver limitation that prevents
us from fullfilling the request. To allow those targets
to work we will ignore the max_burst length and send as
much data as the target asks for assuming it has consciously
decided to override its max burst length.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:11 -05:00
Mike Christie 60ecebf5a1 [SCSI] add refcouting around ctask usage in main IO patch
It is possible that a ctask could be completing and getting
cleaned up at the same time, we are finishing up the last
data transfer. This could then result in the data transfer
code using stale or invalid values. This patch adds a refcount
to the ctask. When the count goes to zero then we know the
transmit thread and recv thread or softirq are not touching
it and we can safely release it.

The eh should not need to grab a reference because it only cleans
up a task if it has both the xmit mutex and recv lock (or recv
side suspended).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:07 -05:00
Mike Christie ffd0436ed2 [SCSI] libiscsi, iscsi_tcp, iscsi_iser: check that burst lengths are valid.
iSCSI RFC states that the first burst length must be smaller than the
max burst length. We currently assume targets will be good, but that may
not be the case, so this patch adds a check.

This patch also moves the unsol data out offset to the lib so the LLDs
do not have to track it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:37:04 -05:00
Alan Stern e5b3cd4296 [SCSI] SCSI: sanitize INQUIRY strings
Sanitize the Vendor, Product, and Revision strings contained in an
INQUIRY result by setting all non-graphic or non-ASCII characters to ' '.
Since the standard disallows such characters, this will affect
only non-compliant devices.

To help maintain backward compatibility, NUL characters are treated
specially.  They are taken as string terminators; they and all the
following characters are set to ' '.  If some valid characters get
erased as a result... well, we weren't seeing them before so we haven't
lost anything.

The primary purpose of this change is to allow blacklist entries to
match devices with illegal Vendor or Product strings.

In addition, the patch updates a couple of function prototypes, giving
inq_result its correct type (unsigned char *).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:36:59 -05:00
James Bottomley 85b6c720b0 [SCSI] sd: fix cache flushing on module removal (and individual device removal)
The fix isn't actually in sd: it's in scsi_device_get().  I modified it
to allow devices to be returned in SDEV_CANCEL, but not SDEV_DEL.  This
means that the device_remove_driver, which occurs in device_del() in
scsi_remove_device() after the device has gone into SDEV_CANCEL is now
effective at flushing the cache.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-01 17:56:56 -04:00
James Bottomley 86e33a296c [SCSI] add shared tag map helpers
This patch adds support for sharing tag maps at the host level
(i.e. either every queue [LUN] has its own tag map or there's a single
one for the entire host).  This formulation is primarily intended to
help single issue queue hardware, like the aic7xxx

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-31 11:18:03 -04:00
Paul Mackerras aa43f77939 Merge branch 'merge' 2006-08-31 15:45:48 +10:00
Darrick J. Wong f19eaa7f53 [SCSI] aic94xx: Increase can_queue for better performance
This patch sets can_queue in the aic94xx driver's scsi_host to better
performing values than what's there currently.  It seems that
asd_ha->seq.can_queue reflects the number of requests that can be
queued per controller; so long as there's one scsi_host per
controller, it seems logical that the scsi_host ought to have the same
can_queue value.  To the best of my (still limited) knowledge, this
method provides the correct value.

The effect of leaving this value set to 1 is terrible performance in
the case of either (a) certain Maxtor SAS drives flying solo or (b)
flooding several disks with I/O simultaneously (md-raid).  There may be
more scenarios where we see similar problems that I haven't uncovered.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-30 17:30:06 -04:00
James Bottomley bc229b3663 [SCSI] aic94xx: add MODULE_FIRMWARE tag
Add a tag which shows what the firmware file we're requesting is.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-30 11:04:17 -04:00
Jeff Garzik b01e86fee6 Merge /spare/repo/linux-2.6 into upstream 2006-08-29 17:55:59 -04:00
James Bottomley 2908d778ab [SCSI] aic94xx: new driver
This is the end point of the separate aic94xx driver based on the
original driver and transport class from Luben Tuikov
<ltuikov@yahoo.com>

The log of the separate development is:

Alexis Bruemmer:
  o aic94xx: fix hotplug/unplug for expanderless systems
  o aic94xx: disable split completion timer/setting by default
  o aic94xx: wide port off expander support
  o aic94xx: remove various inline functions
  o aic94xx: use bitops
  o aic94xx: remove queue comment
  o aic94xx: remove sas_common.c
  o aic94xx: sas remove depot's
  o aic94xx: use available list_for_each_entry_safe_reverse()
  o aic94xx: sas header file merge

James Bottomley:
  o aic94xx: fix TF_TMF_NO_CTX processing
  o aic94xx: convert to request_firmware interface
  o aic94xx: fix hotplug/unplug
  o aic94xx: add link error counts to the expander phys
  o aic94xx: add transport class phy reset capability
  o aic94xx: remove local_attached flag
  o Remove README
  o Fixup Makefile variable for libsas rename
  o Rename sas->libsas
  o aic94xx: correct return code for sas_discover_event
  o aic94xx: use parent backlink port
  o aic94xx: remove channel abstraction
  o aic94xx: fix routing algorithms
  o aic94xx: add backlink port
  o aic94xx: fix cascaded expander properties
  o aic94xx: fix sleep under lock
  o aic94xx: fix panic on module removal in complex topology
  o aic94xx: make use of the new sas_port
  o rename sas_port to asd_sas_port
  o Fix for eh_strategy_handler move
  o aic94xx: move entirely over to correct transport class formulation
  o remove last vestages of sas_rphy_alloc()
  o update for eh_timed_out move
  o Preliminary expander support for aic94xx
  o sas: remove event thread
  o minor warning cleanups
  o remove last vestiges of id mapping arrays
  o Further updates
  o Convert aic94xx over entirely to the transport class end device and
  o update aic94xx/sas to use the new sas transport class end device
  o [PATCH] aic94xx: attaching to the sas transport class
  o Add missing completion removal from prior patch
  o [PATCH] aic94xx: attaching to the sas transport class
  o Build fixes from akpm

Jeff Garzik:
  o [scsi aic94xx] Remove ->owner from PCI info table

Luben Tuikov:
  o initial aic94xx driver

Mike Anderson:
  o aic94xx: fix panic on module insertion
  o aic94xx: stub out SATA_DEV case
  o aic94xx: compile warning cleanups
  o aic94xx: sas_alloc_task
  o aic94xx: ref count update
  o aic94xx nexus loss time value
  o [PATCH] aic94xx: driver assertion in non-x86 BIOS env

Randy Dunlap:
  o libsas: externs not needed

Robert Tarte:
  o aic94xx: sequence patch - fixes SATA support

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-29 09:52:29 -05:00
James Bottomley f4ad7b5807 [SCSI] scsi_transport_sas: remove local_attached flag
This flag denotes local attachment of the phy.  There are two problems
with it:

1) It's actually redundant ... you can get the same information simply
by seeing whether a host is the phys parent
2) we condition a lot of phy parameters on it on the false assumption
that we can only control local phys.  I'm wiring up phy resets in the
aic94xx now, and it will be able to reset non-local phys as well.

I fixed 2) by moving the local check into the reset and stats function
of the mptsas, since that seems to be the only HBA that can't
(currently) control non-local phys.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-27 22:30:11 -05:00
James Bottomley 8ce7a9c159 Merge ../linux-2.6 2006-08-27 21:59:59 -05:00
Ingo Molnar 36e8e57832 [PATCH] lockdep: annotate idescsi_pc_intr()
idescsi_pc_intr() uses local_irq_enable() in IRQ context: annotate it.

(this has no effect on kernels with lockdep disabled.  On kernels with lockdep
enabled this means that we wont actually disable interrupts, and the warning
message will go away as well.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-27 11:01:32 -07:00
Greg Kroah-Hartman f834c75542 Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-08-26 13:04:23 -07:00
Mike Christie 0db99e3359 [SCSI] fix scsi_send_eh_cmnd regression
The callers of scsi_send_eh_cmnd are setting the cmnd buffer,
and then scsi_send_eh_cmnd is copying that updated buffer to
the old_cmnd variable. Then after the command runs, we end up
copying that old_cmnd var which has the new cmnd to the scsi
command buffer. When this command gets recent, all types of fun
things happen like getting TUR or START_STOP commands with
data and scatterlists.

This patch made against scsi-rc-fixes, has the callers of
scsi_send_eh_cmnd pass in the command so scsi_send_eh_cmnd
can do the right thing. This should go into 2.6.18 since this
fixes a regression added when we removed some of the scsi_cmnd
fields and replaced them with local variables.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 10:03:14 -05:00
Andrew Vasquez 15a3758dc9 [SCSI] qla2xxx: Update version number to 8.01.07-k1.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:26:57 -05:00
Andrew Vasquez 476e8978d9 [SCSI] qla2xxx: Properly re-enable EFT support after an ISP abort.
Software must explicitely re-enable extended firmware tracing
after any ISP abort condition.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:26:41 -05:00
Andrew Vasquez 9c06938aa4 [SCSI] qla2xxx: Correct PLOGI retry logic.
Original code attempts to retry PLOGIs to fcports that are
FCP_TARGETs only.  If the driver never performed a successful
PLOGI/PRLI, the port-type would never be assigned, and the
relogin logic would silently drop the request (and thus the port
would not be recognized and registered).

The fix is relatively straightforward, drop the FCP_TARGET-only
check.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:26:27 -05:00
Douglas Gilbert b2155d0417 [SCSI] sg: fix incorrect page problem
There's a problem where sg is executing a ->nopage operation on a
compound page, it actually calls get_page() on the first page in the
compound rather than the page which is being mapped.  The fix is to
select the correct page by indexing into the compound.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-26 09:25:06 -05:00
Greg Kroah-Hartman 7bf13484d2 Merge branch 'upstream-greg' of gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-08-24 01:28:14 -07:00
Tejun Heo ac2164d5e4 [PATCH] sata_via: use old SCR access pattern on vt6420
vt6420 has super-fragile SCR registers which can hang the whole
machine if accessed with the wrong timings.  This patch makes sata_via
use SCR registers only during probing and with the same timings as
before (pre new EH), which is proven to work.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-24 02:51:24 -04:00
Tejun Heo 9dd9c16465 [PATCH] ata_piix: implement force_pcs module parameter
This patch implements force_pcs module parameter for ata_piix.  If 1,
PCS is ignored, 2 honored.  As there seem to be quite a few ICHs w/
impaired PCS, this option will be useful for cases where the default
setting doesn't work.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-24 02:51:24 -04:00
Tejun Heo f3745a3f9f [PATCH] ata_piix: ignore PCS on ICH5
There have been a number of reports regarding some ICH5s failing to
detect devices since the PCS handling update.  Analysis shows that
these problems are caused by bogus PCS values from those controllers.

Before the PCS update, the driver didn't honor PCS regs exactly and
probed them in many cases PCS reports no device.  Now that PCS is
honored exactly, these hardware problems are visible.

This patch makes ICH5 ignore PCS.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-24 02:51:24 -04:00
David S. Miller 25848c4e50 [SCSI] esp: Fix build on SUN4.
Noted by Alexey Dobriyan.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-23 15:33:07 -07:00