Archived
14
0
Fork 0
Commit graph

2367 commits

Author SHA1 Message Date
Dave Jones
a2f5d4d94f [SCSI] remove unnecessary includes of linux/config.h from drivers/scsi/
kbuild includes this automatically these days.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:39:11 -07:00
dave wysochanski
84961f28e9 [SCSI] Don't add scsi_device for devices that return PQ=1, PDT=0x1f
Some targets may return slight variations of PQ and PDT to indicate
no LUN mapped.  USB UFI setting PDT=0x1f but having reserved bits for
PQ is one example, and NetApp targets returning PQ=1 and PDT=0x1f is
another.  Both instances seem like reasonable responses according to
SPC-3 and UFI specs.

The current scsi_probe_and_add_lun() code adds a scsi_device
for targets that return PQ=1 and PDT=0x1f.  This causes LUNs of type
"UNKNOWN" to show up in /proc/scsi/scsi when no LUNs are mapped.
In addition, subsequent rescans fail to recognize LUNs that may be
added on the target, unless preceded by a write to the delete attribute
of the "UNKNOWN" LUN.

This patch addresses this problem by skipping over the scsi_add_lun()
when PQ=1,PDT=0x1f is encountered, and just returns
SCSI_SCAN_TARGET_PRESENT.

Signed-off-by: Dave Wysochanski <davidw@netapp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:37:40 -07:00
Mark Haverkamp
8c867b257d [SCSI] aacraid: Reset adapter in recovery timeout
Received from Mark Salyzyn

If the adapter is in blinkled (Firmware Assert) when error recovery
timeout actions have been triggered, perform an adapter warm reset and
restart the initialization.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:35:11 -07:00
Mark Haverkamp
90ee346651 [SCSI] aacraid: Check for unlikely errors
Received from Mark Salyzyn

The enclosed patch cleans up some code fragments, adds some paranoia
(unproven causes of potential driver failures).

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:33:45 -07:00
Mark Haverkamp
8c23cd7457 [SCSI] aacraid: Restart adapter on firmware assert (Update 2)
Received from Mark Salyzyn

If the adapter should be in a blinkled (Firmware Assert) state when the
driver loads, we will perform a warm restart of the Adapter Firmware to
see if we can rescue the adapter. Possible causes of a blinkled can
occur on some early release motherboard BIOSes, transitory PCI bus
problems on embedded systems or non-x86 based architectures, transitory
startup failures of early release drives or transitory hardware
failures; some of which can bite the adapter later at runtime. Future
enhancements will include recovery during runtime.

Fixed extra whitespace space issue.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:33:13 -07:00
Mark Haverkamp
c8f7b073e0 [SCSI] aacraid: interruptible ioctl
Received from Mark Salyzyn

This patch allows the FSACTL_SEND_LARGE_FIB, FSACTL_SENDFIB and
FSACTL_SEND_RAW_SRB ioctl calls into the aacraid driver to be
interruptible. Only necessary if the adapter and/or the management
software has gone into some sort of misbehavior and the system is being
rebooted, thus permitting the user management software applications to
be killed relatively cleanly. The FIB queue resource is held out of the
free queue until the adapter finally, if ever, completes the command.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:32:57 -07:00
Andreas Herrmann
04846f2592 [SCSI] limit recursion when flushing shost->starved_list
Attached is a patch that should limit a possible recursion that can
lead to a stack overflow like follows:

Kernel stack overflow.
CPU:    3    Not tainted
Process zfcperp0.0.d819
(pid: 13897, task: 000000003e0d8cc8, ksp: 000000003499dbb8)
Krnl PSW : 0404000180000000 000000000030f8b2 (get_device+0x12/0x48)
Krnl GPRS: 00000000135a1980 000000000030f758 000000003ed6c1e8 0000000000000005
           0000000000000000 000000000044a780 000000003dbf7000 0000000034e15800
           000000003621c048 070000003499c108 000000003499c1a0 000000003ed6c000
           0000000040895000 00000000408ab630 000000003499c0a0 000000003499c0a0
Krnl Code: a7 fb ff e8 a7 19 00 00 b9 02 00 22 e3 e0 f0 98 00 24 a7 84
Call Trace:
([<000000004089edc2>] scsi_request_fn+0x13e/0x650 [scsi_mod])
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod]
 [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod]
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
...
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089ff8c>] scsi_queue_insert+0x22c/0x2a4 [scsi_mod]
 [<000000004089779a>] scsi_dispatch_cmd+0x8a/0x3d0 [scsi_mod]
 [<000000004089f1ec>] scsi_request_fn+0x568/0x650 [scsi_mod]
 [<00000000002c5ff4>] blk_run_queue+0xd4/0x1a4
 [<000000004089fa9e>] scsi_run_host_queues+0x196/0x230 [scsi_mod]
 [<00000000409eba28>] zfcp_erp_thread+0x2638/0x3080 [zfcp]
 [<0000000000107462>] kernel_thread_starter+0x6/0xc
 [<000000000010745c>] kernel_thread_starter+0x0/0xc
<0>Kernel panic - not syncing: Corrupt kernel stack, can't continue.

This stack overflow occurred during tests on s390 using zfcp.
Recursion depth for this panic was 19.

Usually recursion between blk_run_queue and a request_fn is avoided
using QUEUE_FLAG_REENTER. But this does not help if the scsi stack
tries to flush the starved_list of a scsi_host.

Limit recursion depth when flushing the starved_list
of a scsi_host.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-19 13:31:53 -07:00
Greg Kroah-Hartman
f8872f4cb4 Merge gregkh@master.kernel.org:/home/rmk/linux-2.6-arm 2006-08-10 15:07:17 -07:00
Martin Hicks
a34b6fc04d [PATCH] libata: PHY reset requires writing 0x4 to SControl
Hi,

Reading the Intel VSC and AHCI it seems like writing 0x302 is incorrect.
The only valid values are 4, 1 and 0.  Writing 4 disables the
PHY.

Signed-off-by: Martin Hicks <mort@bork.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-10 08:29:12 -04:00
Jeff Garzik
c6fd280766 Move libata to drivers/ata. 2006-08-10 07:31:37 -04:00
Jeff Garzik
79ed35a9f1 Merge branch 'tj-upstream-pci_register_driver' of git://htj.dyndns.org/libata-tj into upstream 2006-08-10 06:56:51 -04:00
Jeff Garzik
6a2e42ad0f Merge branch 'upstream-fixes' into upstream 2006-08-10 06:55:26 -04:00
Albert Lee
51704c609f [PATCH] libata: Use ATA_FLAG_PIO_POLLING for pdc_adma
pdc_adma was overlooked and broken by the irq-pio patch:
Only HSM_ST_LAST interrupts should be delivered to this LLDD.

Adding ATA_FLAG_PIO_POLLING to pdc_adma fixes the problem (temporarily),
before we convert the irq handler of pdc_adma to handle all interrupts.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-10 06:55:18 -04:00
Jeff Garzik
2b8ae728a8 Merge branch 'sii-m15w' into upstream 2006-08-10 06:46:16 -04:00
Pavel Roskin
b7887196e3 [PATCH] libata: replace pci_module_init() with pci_register_driver()
Replace pci_module_init() with pci_register_driver().

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 18:13:18 +09:00
Tejun Heo
4852ba24f6 [PATCH] libata: kill unused hard_port_no and legacy_mode
Kill unused probe_ent/ap->hard_port_no and probe_ent->legacy_mode.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:18 +09:00
Tejun Heo
2a88d1ac8d [PATCH] libata: replace ap->hard_port_no with ap->port_no
Replace ap->hard_port_no with ap->port_no.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:16 +09:00
Tejun Heo
c4b01f1de2 [PATCH] libata: use dummy port for stolen legacy ports
Use dummy port for stolen legacy ports.  This makes ap->port_no always
equal ap->hard_port_no.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:14 +09:00
Tejun Heo
dd5b06c490 [PATCH] libata: implement dummy port
Implement dummy port which can be requested by setting appropriate bit
in probe_ent->dummy_port_mask.  The dummy port is used as placeholder
for stolen legacy port.  This allows libata to guarantee that
index_of(ap) == ap->port_no == actual_device_port_no, and thus to
remove error-prone ap->hard_port_no.

As it's used only when one port of a legacy controller is reserved by
some other entity (e.g. IDE), the focus is on keeping the added *code*
complexity at minimum, so dummy port allocates all libata core
resources and acts as a normal port.  It just has all dummy port_ops.

This patch only implements dummy port.  The following patch will make
libata use it for stolen legacy ports.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:12 +09:00
Alan Cox
2ec7df0457 [PATCH] libata: rework legacy handling to remove much of the cruft
Kill host_set->next
Fix simplex support
Allow per platform setting of IDE legacy bases

Some of this can be tidied further later on, in particular all the
legacy port gunge belongs as a PCI quirk/PCI header decode to understand
the special legacy IDE rules in the PCI spec.

Longer term Jeff also wants to move the request_irq/free_irq out of core
which will make this even cleaner.

tj: folded in three followup patches - ata_piix-fix, broken-arch-fix
and fix-new-legacy-handling, and separated per-dev xfermask into
separate patch preceding this one.  Folded in fixes are...

* ata_piix-fix: fix build failure due to host_set->next removal
* broken-arch-fix: add missing include/asm-*/libata-portmap.h
* fix-new-legacy-handling:
	* In ata_pci_init_legacy_port(), probe_num was incorrectly
          incremented during initialization of the secondary port and
          probe_ent->n_ports was incorrectly fixed to 1.

	* Both legacy ports ended up having the same hard_port_no.

	* When printing port information, both legacy ports printed
	  the first irq.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:10 +09:00
Tejun Heo
37deecb513 [PATCH] libata: implement per-dev xfermask
Implement per-dev xfermask.  libata used to determine xfermask
per-port - the fastest mode of the slowest device on the port.  This
patch enables per-dev xfermask.

Original patch is from Alan Cox <alan@redhat.com>.  The following
changes are made by me.

* simplex warning message is added
* remove disabled device handling code which is never invoked
  (originally for choosing port-wide lowest PIO mode)

Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:07 +09:00
Jeff Garzik
6d0500df5b [PATCH] [libata] Kill 'count' var in ata_device_add()
Eliminate redundant loop variable 'count'

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:05 +09:00
Jeff Garzik
996139f1ce [PATCH] [libata] some function renaming
s/ata_host_add/ata_port_add/
s/ata_host_init/ata_port_init/

libata naming got stuck in the middle of a Great Renaming:

	ata_host -> ata_port
	ata_host_set -> ata_host

To eliminate confusion, let's just give up for now, and simply ensure
that things are internally consistent.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:03 +09:00
Tejun Heo
4608c16085 [PATCH] libata: update ata_host_init() and rename it to ata_port_init_shost()
Update ata_host_init() such that it only initializes SCSI host related
stuff and doesn't call into ata_port_init(), and rename it to
ata_port_init_shost().

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-10 16:59:01 +09:00
Jeff Garzik
3f06688759 Merge branch 'upstream-fixes' into upstream 2006-08-09 01:19:18 -04:00
Tejun Heo
22aac0896b [PATCH] libata: clear sdev->locked on door lock failure
SCSI EH locks door if sdev->locked is set.  Sometimes door lock
command fails continuously (e.g. when medium is not present) and as
libata uses EH to acquire sense data, this easily creates a loop where
a failed lock door invokes EH and EH issues lock door on completion.

This patch clears sdev->locked on door lock failure to break this
loop.  This problem has been spotted and diagnosed by Unicorn Chang
<uchang@tw.ibm.com>.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 01:16:27 -04:00
Keith Owens
85455dd342 [PATCH] Fix compile problem when sata debugging is on
Fix a sata debug print statement that still uses an old variable name.

Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 01:16:27 -04:00
Tejun Heo
f4b5cc8741 [PATCH] ahci: remove IRQ mask clearing from init_controller()
Initial IRQ mask clearing is done by libata-core by freezing all ports
prior to requesting IRQ.  Remove redundant IRQ clearing from
init_controller().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 00:13:28 -04:00
Brian King
80289167fd [PATCH] libata: Add support for SATA attachment to SAS adapters
The following patch enhances libata to allow SAS device drivers
to utilize libata to talk to SATA devices. It introduces some
new APIs which allow libata to be used without allocating a
virtual scsi host.

New APIs:

ata_sas_port_alloc - Allocate an ata_port
ata_sas_port_init - Initialize an ata_port (probe device, etc)
ata_sas_port_destroy - Free an ata_port allocated by ata_sas_port_alloc
ata_sas_slave_configure - configure scsi device
ata_sas_queuecmd - queue a scsi command, similar to ata_scsi_queuecomand

These new APIs can be used either directly by a SAS LLDD or could be used
by the SAS transport class.

Possible usage for a SAS LLDD would be:

scsi_scan_host
	target_alloc
		ata_sas_port_alloc
	slave_alloc
		ata_sas_port_init
	slave_configure
		ata_sas_slave_configure

Commands received by the LLDD for SATA devices would call ata_sas_queuecmd.

Device teardown would occur with:

slave_destroy
	port_disable
target_destroy
	ata_sas_port_destroy

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 00:08:39 -04:00
Brian King
f6d950e2a5 [PATCH] libata: Move ata_probe_ent_alloc to libata_core
Move ata_probe_ent_alloc to libata-core. It will also be used by
future SAS/SATA integration patches.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 00:08:38 -04:00
Brian King
155a8a9c8f [PATCH] libata: Add ata_port_init
Separate out the ata_port initialization from ata_host_init
so that it can be used in future SAS patches.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 00:08:38 -04:00
Brian King
b03732f006 [PATCH] libata: Add ata_host_set_init
Add ata_host_set_init in preparation for SAS attached SATA.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 00:08:38 -04:00
Jeff Garzik
c256e95f7d Merge branch 'upstream-fixes' into upstream 2006-08-08 23:59:55 -04:00
Paul Mackerras
32bc6e095d Merge branch 'merge' 2006-08-08 17:09:11 +10:00
James Bottomley
19ac0db3e2 [SCSI] fix up short inquiry printing
A recent drivers base commit:

3e95637a48

Caused the bus to be added to dev_printk, so now our SCSI inquiry short
messages print like this:

scsiscsi 2:0:0:0: Direct access     IBM-ESXS ST973401SS       B519 PQ: 0 ANSI: 5

Just remove the "scsi" from the sdev_printk to compensate.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 18:19:19 -05:00
Matthew Wilcox
4ff36718ed [SCSI] Improve inquiry printing
- Replace scsi_device_types array API with scsi_device_type function API.
   Gets rid of a lot of common code, as well as being easier to use.
 - Add the new device types in SPC4 r05a, and rename some of the older ones.
 - Reformat the printing of inquiry data; now fits on one line and
   includes PQ.

I think I've addressed all the feedback from the previous versions.  My
current test box prints:

scsi 2:0:1:0: Direct access     HP 18.2G ATLAS10K3_18_SCA HP05 PQ: 0 ANSI: 2

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:59:26 -05:00
Brian King
008cd5bbfb [SCSI] ipr: Bump driver version to 2.1.4
Bump the ipr driver version to 2.1.4.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:51:12 -05:00
Brian King
117d2ce1ce [SCSI] ipr: Auto sense handling fix
Fix up a logic error in the checking for valid sense data.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:50:50 -05:00
Brian King
5b7304fbfb [SCSI] ipr: Properly handle IOA recovered errors
The ipr driver currently translates adapter recovered errors
to DID_ERROR. This patch fixes this to translate these
errors to success instead.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:50:19 -05:00
Brian King
896bbd2140 [SCSI] ipr: Handle new SAS error codes
Add definitions for some SAS error codes that can be
logged by ipr SAS adapters.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:49:57 -05:00
Brian King
b5145d25f0 [SCSI] ipr: Add some hardware defined types for SATA
Add some hardware defined types for SATA. This is required
by future patches to add SATA support to ipr.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 15:49:40 -05:00
Russell King
574dc0abab [ARM] Fix Acorn platform SCSI driver build failures
SCSI folk forgot to fix up all the uses of 'buffer' before deleting
this struct member.  Do it for them to rescue the resulting build
failures.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-06 20:55:33 +01:00
Russell King
ca8c100a00 [ARM] Fix NCR5380-based SCSI card build
The NCR5380-based SCSI cards need the SCSI SPI transport selected
to build correctly.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-06 20:53:40 +01:00
Christoph Hellwig
3e74051bc7 [SCSI] hptiop: backout ioctl mess
The hptiop just got merged with a horrible amount of really bad ioctl
code that is against the standards for new scsi drivers.  This patch
backs it out (and fixes a small bug where scsi_add_host is called to
early).  We can re-add proper APIs once we agree on them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 13:19:56 -05:00
James Bottomley
00dd7b7d26 Merge ../linux-2.6
Conflicts:

	arch/ia64/hp/sim/simscsi.c

Stylistic differences in two separate fixes for buffer->request_buffer
problem.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 12:42:33 -05:00
Michael Reed
dd7e2f2266 [SCSI] scsi_queue_work() documented return value is incorrect
If you examine the queue_work() routine you'll see that it returns
1 on success, 0 if the work is already queued.

This patch corrects the source code documentation for the
scsi_queue_work function.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:36:23 -05:00
Andrew Vasquez
c2602c48b5 [SCSI] qla2xxx: Update version number to 8.01.05-k4.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:30:41 -05:00
Vladislav Bolkhovitin
b0328beed0 [SCSI] qla2xxx: Fix to allow to reset devices using sg interface (sg_reset).
Currently it is impossible to reset provided by Qlogic QLA2xxx driver
SCSI devices externally using corresponding sg devices, particularly via
sg_reset utility, because qla2xxx driver in qla2xxx_eh_device_reset()
function checks if the input scsi_cmnd has its private data (CMD_SP())
attached. Then the found pointer isn't used anywhere inside of
qla2xxx_eh_device_reset(). If the RESET request comes from sg device, it
doesn't have such private data.

The attached patch removes check for non-NULL CMD_SP() from
qla2xxx_eh_device_reset(), hence allows to reset QLA2xxx's devices using
corresponding sg devices.

AV: change applies to bus/host reset handlers as well.

Signed-off-by: Vladislav Bolkhovitin <vst@vlnb.net>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:30:28 -05:00
Andrew Vasquez
45ebeb5605 [SCSI] qla2xxx: Log Trace/Diagonostic asynchronous events.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:30:10 -05:00
Shyam Sundar
b797b6de9d [SCSI] qla2xxx: Correct endianess problem while issuing a Marker IOCB on ISP24xx.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:29:45 -05:00
James Smart
416780d3a7 [SCSI] lpfc 8.1.7 : Change version number to 8.1.8
Change version number to 8.1.8

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:29:11 -05:00
James Smart
dca9479be8 [SCSI] lpfc 8.1.7 : ID String and Message fixes
ID String and Message fixes
 - Fix switch symbolic name registration to match cross-OS values
 - Replace printk's with more standard lpfc_printf_log calls
 - Make all lpfc_printf_log message numbers unique

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:28:55 -05:00
James Smart
8f6d98d2e0 [SCSI] lpfc 8.1.7 : Short bug fixes
Short bug fixes:
 - Fix iocbq list corruption due to missing list_del's in ct handling
 - Missing unlock in lpfc_sli_next_iotag()
 - Fix initialization of can_queue value
 - Differentiate sysfs mailbox errors with different codes.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:28:41 -05:00
James Smart
1c067a4241 [SCSI] lpfc 8.1.7 : Fix race condition between lpfc_sli_issue_mbox and lpfc_online
Fix race condition between lpfc_sli_issue_mbox and lpfc_online

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:28:22 -05:00
James Smart
a309a6b6e6 [SCSI] lpfc 8.1.7 : Fix failing firmware download due to mailbox delays needing to be longer
Fix failing firmware download due to mailbox delays needing to be longer.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:28:03 -05:00
James Smart
64ba881829 [SCSI] lpfc 8.1.7 : Add statistics reset callback for FC transport
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-06 11:27:31 -05:00
Tejun Heo
77f3f87938 [PATCH] libata: fix ata_device_add() error path
In the error path, ata_device_add()

* dereferences null host_set->ports[] element.
* calls scsi_remove_host() on not-yet-added shost.

This patch fixes both bugs.  The first problem was spotted and initial
patch submitted by Dave Jones <davej@redhat.com>.  The second problem
was mentioned and fixed by Jeff Garzik <jgarzik@pobox.com> in a larger
cleanup patch.

Cc: Dave Jones <davej@redhat.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-05 03:59:19 +09:00
Jeff Garzik
6543bc0777 [PATCH] [libata] manually inline ata_host_remove()
(tj: this is for the following ata_device_add() fix)

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-05 03:59:17 +09:00
Tejun Heo
f31e945c50 [PATCH] sata_sil24: don't set probe_ent->mmio_base
sata_sil24 doesn't make use of probe_ent->mmio_base and setting this
field causes the area to be released twice on detach.  Don't set
probe_ent->mmio_base.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-05 03:59:15 +09:00
Tejun Heo
f814b75f4e [PATCH] ata_piix: fix host_set private_data intialization
To get host_set->private_data initialized reliably, all pinfos need to
point to the same hpriv.  Restore pinfo->private_data after pata pinfo
assignment.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-05 03:59:13 +09:00
Tejun Heo
c3cf30a989 [PATCH] libata: fix ata_port_detach() for old EH ports
ata_prot_detach() did nothing for old EH ports and thus SCSI hosts
associated with those ports are left dangling after they are detached
leaving stale devices and causing oops eventually.  Make
ata_port_detach() remove SCSI hosts for old EH ports.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-08-05 03:59:11 +09:00
Dave Jones
2672ea86be [SCSI] advansys pci tweaks.
Remove a lot of duplicate #defines from the advansys driver,
and make them look like PCI IDs as defined elsewhere in the kernel.
Also add a module table so that it automatically gets picked up
by tools relying on modinfo output (like say, distro installers).

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-04 09:28:43 -04:00
Jeff Garzik
36a2c6b280 Merge branch 'upstream-fixes' into upstream 2006-08-03 17:35:48 -04:00
Unicorn Chang
f1d39b291e [PATCH] ahci: skip protocol test altogether in spurious interrupt code
Skip protocol test altogether in spurious interrupt code. If PIOS is received
when it shouldn't, ahci will raise protocol violation.

Signed-off-by: Unicorn Chang <uchang@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-03 17:34:52 -04:00
James Bottomley
d67a70aca2 [SCSI] arcmsr: fix up sysfs values
The sysfs files in arcmsr are non-standard in that they aren't simple
filename value pairs, the values actually contain preceeding text which
would have to be parsed.  The idea of sysfs files is that the file name
is the description and the contents is a simple value.

Fix up arcmsr to conform to this standard.

Acked-By: Erich Chen <erich@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-02 10:53:18 -04:00
Andrew Morton
43d6b68dc3 [SCSI] areca sysfs fix
Remove sysfs_remove_bin_file() return-value checking from the areca driver.

There's nothing a driver can do if sysfs file removal fails, so we'll soon be
changing sysfs_remove_bin_file() to internally print a diagnostic and to
return void.

Cc: Erich Chen <erich@areca.com.tw>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-08-02 10:51:23 -04:00
Sam Ravnborg
dba654d150 kbuild: hardcode value of YACC&LEX for aic7-triple-x
When we introduced -rR then aic7xxx no loger could pick up definition
of YACC&LEX from make - so do it explicit now.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-08-01 11:32:46 +02:00
Paul Mackerras
57cad8084e Merge branch 'merge' 2006-08-01 10:37:25 +10:00
Jeremy Kerr
af5f92d881 [POWERPC] sata_svw: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.

sata_svw changes

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-07-31 15:55:06 +10:00
Jeremy Kerr
294ef16a2e [POWERPC] scsi: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.

powerpc-specific scsi driver changes.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-07-31 15:55:05 +10:00
Jeff Garzik
95916edd02 [libata] ahci: add SiS PCI IDs
Signed-off-by: David Wang <touch@sis.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:10:14 -04:00
Tejun Heo
3c5100c1c4 [PATCH] libata: cosmetic changes to PM functions
Unify pm_message_t argument to the new-style @mesg.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:04:55 -04:00
Tejun Heo
c1332875cb [PATCH] ahci: implement Power Management support
Implement power management support.

Original implementation is from Zhao, Forrest <forrest.zhao@intel.com>

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:01:31 -04:00
Tejun Heo
d91542c11f [PATCH] ahci: separate out ahci_reset_controller() and ahci_init_controller()
Separate out ahci_reset_controller() and ahci_init_controller() from
ata_host_init().  These will be used by PM callbacks.  This patch
doesn't introduce any behavior change.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:01:31 -04:00
Tejun Heo
0be0aa9898 [PATCH] libata: improve driver initialization and deinitialization
Implement ahci_[de]init_port() and use it during initialization and
de-initialization.  ahci_[de]init_port() are supersets of what used to
be done during driver [de-]initialization.  This patch makes the
following behavior changes.

* Per-port IRQ mask is cleared on driver load as done in other
  drivers.  The mask will be configured properly during probe.

* During init_one(), HOST_IRQ_STAT is cleared after masking port IRQs
  such that there is no race window.

* CMD_SPIN_UP is cleared during init_one() instead of being set.  It
  is set in port_start().  This is more consistent with overall
  structure of initialization.  Note that CMD_SPIN_UP simply controls
  PHY activation.

* Slumber and staggered spin-up are handled properly.

* All init/deinit operations are done in step-by-step manner as
  described in the spec instead of issued as single merged command.

Original implementation is from Zhao, Forrest <forrest.zhao@intel.com>

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:01:31 -04:00
Tejun Heo
9f5920567b [PATCH] ahci: simplify ahci_start_engine()
Simplify ahci_start_engine() by killing prerequisite condition checks.
Rationales are..

* No user checks error return from ahci_start_engine()

* Code flow guarantees the prerequisite conditions unless the
  controller is malfunctioning.  In such cases, the driver had chances
  to learn about the problem _before_ calling this function.

* Closely related to the above two, driver calls into this function
  even when prerequisites fail hoping for the best.

Basically, ahci_start_engine() should only do the operation itself.
It isn't the right place to check for prerequisites.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:01:31 -04:00
Tejun Heo
d8fcd116d2 [PATCH] ahci: cosmetic changes to ahci_start/stop_engine()
* fascist-format comments according to comment style used in libata
  core layer.

* if() -> if ()

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:01:31 -04:00
Tejun Heo
254950cd56 [PATCH] ahci: relocate several internal functions
* move ahci_port_start/stop() below EH functions.  This makes ahci
  more consistent with other drivers and makes prototypes for
  ahci_start/stop_engine() unnecessary.

* swap positions between ahci_start_engine() and ahci_stop_engine()
  for readability.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Zhao, Forrest <forrest.zhao@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-29 04:01:31 -04:00
Jeff Garzik
5b85f29ca4 Merge branch 'upstream-fixes' into upstream 2006-07-29 01:39:26 -04:00
Jeff Garzik
ab3b3fd381 Merge branch 'master' into upstream-fixes 2006-07-29 01:39:17 -04:00
Erich Chen
1c57e86d75 [SCSI] arcmsr: initial driver, version 1.20.00.13
arcmsr is a driver for the Areca Raid controller, a host based RAID
subsystem that speaks SCSI at the firmware level.

This patch is quite a clean up over the initial submission with
contributions from:

Randy Dunlap <rdunlap@xenotime.net>
Christoph Hellwig <hch@lst.de>
Matthew Wilcox <matthew@wil.cx>
Adrian Bunk <bunk@stusta.de>

Signed-off-by: Erich Chen <erich@areca.com.tw>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 14:13:40 -05:00
brking@charter.net
f4c8aa1107 [SCSI] megaraid: Add support for change_queue_depth
Adds support for change_queue_depth so that device
queue depth can be changed at runtime through sysfs.

Signed-off-by: <brking@charter.net>
Acked-by: Seokmann Ju <seokmann.ju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 13:48:14 -05:00
Ju, Seokmann
0b4972d591 [SCSI] megaraid_{mm,mbox}: a fix on "kernel unaligned access address" issue
There was an issue in the data structure defined by megaraid driver
casuing "kernel unaligned access.." messages to be displayed during
IOCTL on IA64 platform.

The issue has been reported/fixed by Sakurai Hiroomi
[sakurai_hiro@soft.fujitsu.com].

Signed-Off By: Seokmann Ju <seokmann.ju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 13:19:12 -05:00
Ju, Seokmann
aa677bc744 [SCSI] megaraid_{mm,mbox}: a fix on INQUIRY with EVPD
With this patch, driver will protect data corruption created by
INQUIRY with EVPD request to megaraid controllers.  As specified in
the changelog, megaraid F/W already has fixed the issue and being
under process of release. Meanwhile, driver will protect the system
with this patch.

Signed-Off By: Seokmann Ju <seokmann.ju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 13:13:50 -05:00
Ju, Seokmann
fbf6080225 [SCSI] megaraid_{mm,mbox}: 64-bit DMA capability checker
This patch contains
- a fix for 64-bit DMA capability check in megaraid_{mm,mbox} driver.
- includes changes (going back to 32-bit DMA mask if 64-bit DMA mask
failes) suggested by James with previous patch.
- addition of SATA 150-4/6 as commented by Vasily Averin.

With patch, the driver access PCIconfiguration space with dedicated
offset to read a signature. If the signature read, it means that the
controller has capability to handle 64-bit DMA.
Without this patch, the driver used to blindly claim 64-bit DMA
capability.
The issue has been reported by Vasily Averin [vvs@sw.ru].
Thank you Vasily for the reporting.

Signed-Off By: Seokmann Ju <seokmann.ju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 13:10:23 -05:00
Mike Christie
f4246b33c7 [SCSI] iscsi bugfixes: update and move version number
The version info is useful for iscsi tcp, iser and qla4xxx so move to
transport class.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:50:18 -05:00
Mike Christie
f3ff0c3627 [SCSI] iscsi bugfixes: fix mem leaks in libiscsi
We were leaking some strings. This patch just frees them.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:50:02 -05:00
Mike Christie
40527afea1 [SCSI] iscsi bugfixes: pass errors from complete_pdu to caller
Must pass ISCSI_ERR values from the recv path and propogate them
upwards.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:49:50 -05:00
Mike Christie
c8dc1e523b [SCSI] iscsi bugfixes: reduce memory allocations
We currently try to allocate a max_recv_data_segment_length
which can be very large (default is 64K), and common uses
are up to 1MB. It is very very difficult to allocte this
much contiguous memory and it turns out we never even use it.
We really only need a couple of pages, so this patch has us
allocates just what we know what we need today.

Later if vendors start adding vendor specific data and
we need to handle large buffers we can do this, but for
the last 4 years we have not seen anyone do this or request
it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:49:34 -05:00
Mike Christie
9aaa2b4621 [SCSI] iscsi bugfixes: dont use GFP_KERNEL for sending errors
iscsi_tcp can send error events from soft irq context so we
cannot use GFP_KERNEL.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:49:20 -05:00
Mike Christie
63f75cc8a7 [SCSI] iscsi bugfixes: fix oops when removing session
We are touching the cls_session after we have freed
it. This causes a oops.

Signed-off-by: Or Gerlitz  <ogerlitz@voltaire.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:49:01 -05:00
Mike Christie
1c83469d36 [SCSI] iscsi bugfixes: fix oops when iser is flushing io
When we enter recovery and flush the running commands
we cannot freee the connection before flushing the commands.
Some commands may have a reference to the connection
that needs to be released before. iscsi_stop was forcing
the term and suspend too early and was causing a oops
in iser, so this patch removes those callbacks all together
and allows the LLD to handle that detail.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:48:32 -05:00
Mike Christie
7ea8b82847 [SCSI] iscsi bugfixes: fix abort handling
Abort handler fixes.

If a connection is dropped and reconnected while an abort is
running then we should assume the recovery code will clean up
the abort. Not doing so causes a oops.

And if a command completes then we get the status for the abort, we do not
need to call into the LLD to cleanup the resources. Doing this causes
and oops in iser because it ends up freeing some resources twice.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:48:16 -05:00
Mike Christie
275fd7d129 [SCSI] iscsi bugfixes: handle data rsp errors
if iscsi_data_rsp fails we must bail out. Since the pdu values like
data length are invalid we cannot continue to process the data since
it could over run buffers.

This fixes a bug with cisco 5428s where that target is sending
too much data.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:48:01 -05:00
Mike Christie
b6c395ed03 [SCSI] iscsi bugfixes: fix r2t handling
The iscsi tcp code can pluck multiple rt2s from the tasks's r2tqueue
in the xmit code. This can result in the task being queued on the xmit queue
but gettting completed at the same time.

This patch fixes the above bug by making the fifo a list so
we always remove the entry on the list del.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:47:40 -05:00
Mike Christie
d82967c706 [SCSI] iscsi bugfixes: send correct error values to userspace
In the xmit patch we are sending a -EXXX value to iscsi_conn_failure
which is causing userspace to get confused.

We should be sending a ISCSI_ERR_* value that userspace understands.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:47:23 -05:00
HighPoint Linux Team
8d4fbd3f97 [SCSI] hptiop: wrong register used in hptiop_reset_hba()
IOP reset message should be posted to inbound message register
instead of outbound message register.

Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:47:02 -05:00
Grant Grundler
b2b3c12107 [SCSI] sym2: claim only "Storage" class
The follow patch fixes a problem for Matt Taggart.
The Compaq system he had (dl380?) has a SmartArray device that exposes
the 53c1510 device in both RAID and "normal" modes. The difference
is in RAID mode, the smart array driver (IIRC) should claim the
device instead of sym2 driver. Patch below prevents sym2 from
claiming the device when the RAID "daughter board" is attached.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:46:38 -05:00
Jens Axboe
a75ad3c27a [PATCH] scsi: kill overeager "not-ready" messages
HAL and friends have a tendency to trigger this one all the time.
It's not really interesting, so kill it. The vendor kernels all do
anyways.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-07-28 09:04:09 +02:00
Christoph Hellwig
64821324ca [PATCH] fix compile regression for a few scsi drivers
This fixes three drivers to compile again after my patch that removes
the data_cmnd member from struct scsi_cmnd.

The fas216 change is trivial, it should have been using ->cmnd all the
time.

NCR53C9 (which seem to be mostly duplicate driver with esp.c!) is doing
something odd, it should only have looked at ->cmnd before not the saved
copy that is kept for the error handlers sake.  Note that it really
should deal with the sync setting themselves but use the generic domain
validation code that get this right - but that's for later let's push
this simple compile fix for now.

And sorry for the late fix for this, I have been busy with OLS and
associated activities last week.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-26 07:30:45 -07:00
David S. Miller
6bc063d414 [SCSI] esp: Fix build.
The data_cmd[] member got deleted, so do not use it any more.  Scsi
commands do not have their ->cmd[] overwritten temporary to probe for
status after an error before retrying.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-24 22:47:14 -07:00
Jeff Garzik
48cb37bd9e Merge branch 'upstream-fixes' into upstream 2006-07-24 03:38:25 -04:00
Jeff Garzik
b71426eb10 Merge branch 'master' into upstream-fixes 2006-07-24 03:38:13 -04:00
Jeff Garzik
e36fcd8ae6 Merge branch 'upstream-fixes' into upstream 2006-07-24 03:38:01 -04:00
Jeff Garzik
8419dc8a34 [libata] sata_promise: comment out duplicate PCI ID
This is just the for-RC fix.  A 'TODO' command is added, describing
what's needed for the more-complete fix.
2006-07-24 03:37:52 -04:00
Linus Torvalds
00ab956f2f Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (38 commits)
  [SCSI] More buffer->request_buffer changes
  [SCSI] mptfusion: bump version to 3.04.01
  [SCSI] mptfusion: misc fix's
  [SCSI] mptfusion: firmware download boot fix's
  [SCSI] mptfusion: task abort fix's
  [SCSI] mptfusion: sas nexus loss support
  [SCSI] mptfusion: sas loginfo update
  [SCSI] mptfusion: mptctl panic when loading
  [SCSI] mptfusion: sas enclosures with smart drive
  [SCSI] NCR_D700: misc fixes (section and argument ordering)
  [SCSI] scsi_debug: must_check fixes
  [SCSI] scsi_transport_sas: kill the use of channel 
  [SCSI] scsi_transport_sas: add expander backlink
  [SCSI] hide EH backup data outside the scsi_cmnd
  [SCSI] ibmvscsi: handle inactive SCSI target during probe
  [SCSI] ibmvscsi: allocate lpevents for ibmvscsi on iseries
  [SCSI] aic7[9x]xx: Remove last vestiges of reverse_scan
  [SCSI] aha152x: stop poking at saved scsi_cmnd members
  [SCSI] st.c: Improve sense output
  [SCSI] lpfc 8.1.7: Change version number to 8.1.7
  ...
2006-07-21 12:04:53 -07:00
zhao, forrest
5457f2194a [PATCH] The redefinition of ahci_start_engine() and ahci_stop_engine()
- Make ahci_start_engine() and ahci_stop_engine() more consistent with
  AHCI spec 1.1
- Change their input parameter from ap to port_mmio
- Update the existing users of ahci_start_engine() and ahci_stop_engine()

Signed-off-by: Forrest Zhao <forrest.zhao@intel.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-19 16:45:42 -04:00
Tejun Heo
13abf50df2 [PATCH] libata: improve EH action and EHI flag handling
Update ata_eh_about_to_do() and ata_eh_done() to improve EH action and
EHI flag handling.

* There are two types of EHI flags - one which expires on successful
  EH and the other which expires on a successful reset.  Make this
  distinction clear.

* Unlike other EH actions, reset actions are represented by two EH
  action masks and a EHI modifier.  Implement correct about_to_do/done
  semantics for resets.  That is, prior to reset, related EH info is
  sucked in from ehi and cleared, and after reset is complete, related
  EH info in ehc is cleared.

These changes improve consistency and remove unnecessary EH actions
caused by stale EH action masks and EHI flags.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-19 14:06:53 -04:00
Tejun Heo
7c8c2cff81 [PATCH] libata: fix eh_skip_recovery condition
* (ata_dev_absent() || ata_dev_ready()) test doesn't indicate
  SUSPENDED state properly.  Fix it.

* Link resuming resets shouldn't be skipped.  Don't skip recovery on
  EHI_RESUME_LINK.  This doesn't matter for host ports as EHI_RESUME
  always coincides with EHI_HOTPLUGGED which makes attached disabled
  devices vacant.  However, PMP reset causes non-hotplug link-resuming
  resets which shouldn't be skipped.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-19 14:06:53 -04:00
Tejun Heo
4528e4da79 [PATCH] libata: fix autopsy ehc->i.action and ehc->i.dev handling
Commit 0662c58b32 updated
ata_eh_autopsy() to OR determined action to ehc->i.action to preserve
action mask set directly into ehc->i.action by nested functions.  This
broke action mask clearing on SENSE_VALID case causing revalidation
and EH complete message on successful ATAPI CC.

This patch removes two local variables - action and failed_dev - which
cache ehc->i.action and ehc->i.dev respectively, and make the function
directly modify ehc->i.* fields to remove aliasing issues.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-19 14:06:53 -04:00
Tejun Heo
dd3bec63f8 [PATCH] sata_sil: remove unaffected drives from m15w blacklist
m15w blacklist overgrew by attributing unrelated problems to m15w
including R_ERR on DMA activate FIS errata.  This patch shrinks
sata_sil m15w blacklist such that it's as reported by Silicon Image.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Carlos Pardo <Carlos.Pardo@siliconimage.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-16 11:55:46 -04:00
Jeff Garzik
f5beec4963 [libata] ata_piix: correct 'invalid MAP value' typo-caused error
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-16 11:48:28 -04:00
Jeff Garzik
73291a1cb6 [libata] ata_piix: minor cleanups noticed in prior patch run
* delete unused PIIX_FLAG_COMBINED*
* port_enable should be u16 rather than u32

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-16 11:48:28 -04:00
Jeff Garzik
08f12edc33 [libata] ata_piix: attempt to fix ICH8 support
Take into account the fact that ICH8 changed the register layout of
the MAP and PCS register bits.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-16 11:48:28 -04:00
Jeff Garzik
ea35d29e2f [libata] ata_piix: Consolidate PCS register writing
Prior to this patch, the driver would do this for each port:
	read 8-bit PCS
	write 8-bit PCS
	read 8-bit PCS
	write 8-bit PCS

In the field, flaky behavior has been observed related to this register.
In particular, these overzealous register writes can cause misdetection
problems.

Update to do the following once (not once per port) at boot:
	read 16-bit PCS
	if needs changing,
		write 16-bit PCS

And thereafter, we only perform a 'read 16-bit PCS' per port.

This should eliminate all PCS writes in many cases, and be more friendly
in the cases where we do need to enable ports.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-16 11:48:28 -04:00
Tejun Heo
d96715c1ac [PATCH] ata_piix: add host_set private structure
Add host_set private structure piix_host_priv.  Currently the only
field is ->map which used to be stored directly at
host_set->private_data.  This change allows more host_set private
fields to be added.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-16 11:48:28 -04:00
Christoph Hellwig
79bd3f8563 [SCSI] More buffer->request_buffer changes
Seem like quite a few splipped through the cracks.  Here's a patch to
update all references I could find:

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-14 09:41:13 -05:00
James Bottomley
3bb056eb1d [SCSI] NCR_D700: misc fixes (section and argument ordering)
Apparently the D700 has had an argument ordering issue for quite a while
which can cause it to get the wrong scsi_id (I just got an unbootable
voyager system because of this).  Hopefully this patch also fixes up all
the sectional mismatches within the driver.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-12 12:03:43 -04:00
Randy Dunlap
6ecaff7fe8 [SCSI] scsi_debug: must_check fixes
Check all __must_check warnings in scsi_debug.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-12 11:57:28 -04:00
James Bottomley
e8bf39417b [SCSI] scsi_transport_sas: kill the use of channel
Using the port_id for the channel is completely unnecessary since the
host_id/target_id are constructed to be globally unique.  Also move
the mptsas driver on to virtual channel 1 for its raid devices.

Acked-by: "Moore, Eric" <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-12 09:20:01 -04:00
James Bottomley
a0e1b6ef3b [SCSI] scsi_transport_sas: add expander backlink
This patch adds the ability to add a backlink to a particular port.  The
idea is to represent properly ports on expanders that are used
specifically for linking to the parent device in the topology.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-12 09:03:20 -04:00
David Howells
b4cac1a022 [PATCH] FDPIC: Move roundup() into linux/kernel.h
Move the roundup() macro from binfmt_elf.c into linux/kernel.h as it's
generally useful.

[akpm@osdl.org: nuke all the other implementations]
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10 13:24:22 -07:00
Christoph Hellwig
631c228cd0 [SCSI] hide EH backup data outside the scsi_cmnd
Currently struct scsi_cmnd has various fields that are used to backup
original data after the corresponding fields have been overridden for
EH commands.  This means drivers can easily get at it and misuse it.
Due to the old_ naming this doesn't happen for most of them, but two
that have different names have been used wrong a lot (see previous
patch).  Another downside is that they unessecarily bloat the scsi_cmnd
size.

This patch moves them onstack in scsi_send_eh_cmnd to fix those two
issues aswell as allowing future EH fixes like moving the EH command
submissions to use SG lists like everything else.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 11:56:44 -05:00
Dave C Boutcher
ae0fda0cdf [SCSI] ibmvscsi: handle inactive SCSI target during probe
Without this patch we register an interrupt with request_irq,
but then return a bad return code from the module probe.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 11:28:58 -05:00
Dave C Boutcher
6c51fe1047 [SCSI] ibmvscsi: allocate lpevents for ibmvscsi on iseries
Allocate the correct number of lp events when running
ibmvscsi on legacy iseries

Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 11:28:38 -05:00
Matthew Wilcox
d14164316d [SCSI] aic7[9x]xx: Remove last vestiges of reverse_scan
Remove last vestiges of the reverse_scan paramater from aic7xxx and aic79xx.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 11:27:43 -05:00
Christoph Hellwig
5e13cdfa5b [SCSI] aha152x: stop poking at saved scsi_cmnd members
Stop poking into the old_ & co scsi_cmnd fields that should only be used
in the EH code.  Untested, but this is required to move ahead with the
EH fixes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 11:27:23 -05:00
Luben Tuikov
4e73ea7b02 [SCSI] st.c: Improve sense output
Convert this:
st0: Error with sense data: <6>st: Current: sense key: Illegal Request
    Additional sense: Invalid field in cdb

To this:
st0: Current: sense key: Illegal Request
    Additional sense: Invalid field in cdb

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Acked-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 11:27:03 -05:00
James Smart
035bff20bf [SCSI] lpfc 8.1.7: Change version number to 8.1.7
Change version number to 8.1.7

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:49:39 -05:00
James Smart
65a29c166f [SCSI] lpfc 8.1.7: Misc Fixes
Misc Fixes:
 - Fix some sparse warnings - casts of address space
 - Fix handling of the adapter registration string. Each invocation
   was byteswapping, so every other adapter init attempt failed.
 - Correct comments and default value for the lpfc_max_luns parameter

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:49:14 -05:00
James Smart
b4c026520f [SCSI] lpfc 8.1.7: Add lpfc_sli_flush_mbox_queue() function
Add lpfc_sli_flush_mbox_queue() function and use it in lpfc_offline() call
to avoid deadlock on thread block.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:48:38 -05:00
James Smart
ce8b3ce55b [SCSI] lpfc 8.1.7: Correct the wait in attachment that delays for topology discovery
Correct the wait in attachment that delays for topology discovery

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:48:11 -05:00
James Smart
5e0b433855 [SCSI] lpfc 8.1.7: Remove depricated sysfs attribute board_online
Remove depricated sysfs attribute board_online, as it's replaced by the new
issue_reset attribute

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:47:34 -05:00
James Smart
40496f073f [SCSI] lpfc 8.1.7: Adding new issue_reset sysfs attribute
Adding new issue_reset sysfs attribute

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:44:08 -05:00
James Smart
420b630d6e [SCSI] lpfc 8.1.7: Fix panic in lpfc_sli_validate_fcp_iocb
Fix panic in lpfc_sli_validate_fcp_iocb due to access of scsi_cmnd after
returning it to the midlayer

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:43:43 -05:00
James Smart
bcf4dbfaf3 [SCSI] lpfc 8.1.7: Consolidate dma buf cleanup into a separate function
Consolidate dma buf cleanup into a separate function

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:25:27 -05:00
James Smart
9279565046 [SCSI] lpfc 8.1.7: Correct bogus nodev_tmo message on NPort that changes its NPort Id
Correct bogus nodev_tmo message on NPort that changes its NPort Id

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:23:29 -05:00
James Smart
688a88635f [SCSI] lpfc 8.1.7: Fix txcmplq related panics on heavy IO while downloading firmware
Fix txcmplq related panics on heavy IO while downloading firmware

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:21:28 -05:00
James Smart
4db621e0f3 [SCSI] lpfc 8.1.7: Issue DOWN_LINK prior to INIT_LINK to work around link failure issue
Issue DOWN_LINK prior to INIT_LINK to work around link failure issue

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:21:00 -05:00
James Smart
d0e56dad5c [SCSI] lpfc 8.1.7: Fixed infinite retry of REG_LOGIN mailbox failed due to MBXERR_RPI_FULL
Fixed infinite retry of REG_LOGIN mailbox failed due to MBXERR_RPI_FULL

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:20:30 -05:00
James Smart
9f49d3b05f [SCSI] lpfc 8.1.7: Fix memory leak and cleanup code related to per ring lookup array
Fix memory leak and cleanup code related to per ring lookup array.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:19:55 -05:00
James Smart
e17da18e2f [SCSI] lpfc 8.1.7: Standardize the driver on a single define for the maximum supported targets
Standardize the driver on a single define for the maximum supported targets.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:19:03 -05:00
James Smart
5a0e326dfa [SCSI] lpfc 8.1.7: Use mod_timer instead of add_timer in lpfc_els_timeout_handler
Use mod_timer instead of add_timer in lpfc_els_timeout_handler

This patch was formerly posted by Mark Haverkamp.
http://marc.theaimsgroup.com/?l=linux-scsi&m=114246089015681&w=2

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 10:18:28 -05:00
Douglas Gilbert
a507c6a2d9 [SCSI] update additional sense codes and some opcode names
Following on from my post titled: "additional sense codes
need update" see the attachment against lk 2.6.17 .

ChangeLog:
  - update additional sense codes table to agree with
    SPC-4 revision 5a  (14 June 2006)
  - adjust some of the opcode names

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 09:10:06 -05:00
James Bottomley
c9fefeb264 [SCSI] scsi_transport_sas: add unindexed ports
Some SAS HBAs don't want to go to the trouble of tracking port numbers,
so they'd simply like to say "add this port and give it a number".
This is especially beneficial from the hotplug point of view, since
tracking ports and the available number space can be a real pain.

The current implementation uses an incrementing number per expander to
add the port on.  However, since there can never be more ports than
there are phys, a later implementation will try to be more intelligent
about this.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 09:06:24 -05:00
Adrian Bunk
24f6d2fd31 [SCSI] aic79xx: make ahd_done_with_status() static
This patch makes a needlessly global function static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09 09:05:37 -05:00
root
9545b5781c [PATCH] ahci: Ensure that we don't grab both functions
When we force the chip into dual fn mode so we get PATA and AHCI we must
be sure we don't then do anything dumb like try and grab both with the AHCI
driver.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:58:20 -04:00
Borislav Petkov
5afc81427f [PATCH] libata-core.c: restore configuration boot messages in ata_dev_configure(), v2
This one looks better, IMHO.

This restores the default libata configuration messages printed during booting.

Signed-off-by: <petkov@math.uni-muenster.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:17:47 -04:00
Tejun Heo
d2298dca9a [PATCH] sata_sil24: add suspend/sleep support
Add suspend/sleep support.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00
Tejun Heo
2a41a6108d [PATCH] sata_sil24: separate out sil24_init_controller()
Separate out controller initialization from sil24_init_one() into
sil24_init_controller().  This will be used by resume.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-07-05 22:16:28 -04:00