Commit graph

1235 commits

Author SHA1 Message Date
Jamie Wellnitz
d9d959c41f [SCSI] lpfc 8.1.2: Remove hba_list from struct lpfc_hba
Remove hba_list from struct lpfc_hba

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 19:00:11 -06:00
Jamie Wellnitz
7f0b5b1913 [SCSI] lpfc 8.1.2: Correct use of the hostdata field in scsi_host
Correct use of the hostdata field in scsi_host

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:58:02 -06:00
Jamie Wellnitz
c9f8735bea [SCSI] lpfc 8.1.2: Misc FC Discovery changes :
Misc FC Discovery changes :
   - Added FC_BYPASSED_MODE statistic
   - Corrected some log message data
   - Fix up Discovery infrastructure to support FAN:
       Allow Fabric entities to flow thru DSM
       Fix up linkup/linkdown unregister login processing for Fabric entities
       Clean up Discovery code
       Utilize nodev_tmo for Fabric entities
   - Use of 3 * ratov for CT handling timeouts
   - Fix up DSM to make more appropriate decisions and clean up code.

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:57:23 -06:00
Jamie Wellnitz
b28485acb9 [SCSI] lpfc 8.1.2: Add module parameter to limit number of outstanding commands per lpfc HBA
Add module parameter to limit number of outstanding commands per lpfc HBA

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:56:23 -06:00
Jamie Wellnitz
406d6041ac [SCSI] lpfc 8.1.2: Fixed a double insertion of mail box object to the SLI mailbox list.
Fixed a double insertion of mail box object to the SLI mailbox list.

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:55:50 -06:00
Jamie Wellnitz
901a920f07 [SCSI] lpfc 8.1.2: Fixed system panic in lpfc_sli_brdreset during dynamic add of LP11K
Fixed system panic in lpfc_sli_brdreset during dynamic add of LP11K

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:55:24 -06:00
Jamie Wellnitz
7062c5281c [SCSI] lpfc 8.1.2: Explicitly initialize the skip_post argument to lpfc_sli_send_reset
Explicitly initialize the skip_post argument to lpfc_sli_send_reset
  on a ERATT interrupt.

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:54:09 -06:00
Jamie Wellnitz
6ad425356b [SCSI] lpfc 8.1.2: Fixed a race condition in the PLOGI retry logic.
Fixed a race condition in the PLOGI retry logic.

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:53:33 -06:00
Jamie Wellnitz
7bb3b137ab [SCSI] lpfc 8.1.2: Handling of ELS commands RRQ, RPS, RPL and LIRR correctly
Handling of ELS commands RRQ, RPS, RPL and LIRR correctly

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:52:50 -06:00
Jamie Wellnitz
0228aadd0f [SCSI] lpfc 8.1.2: Remove unused SLI_IOCB_HIGH_PRIORITY
Remove unused SLI_IOCB_HIGH_PRIORITY

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:51:38 -06:00
Jamie Wellnitz
0c71fd9e43 [SCSI] lpfc 8.1.2: Remove unreferenced cfg_fcp_bind_method from struct lpfc_hba
Remove unreferenced cfg_fcp_bind_method from struct lpfc_hba

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:51:19 -06:00
Jamie Wellnitz
3bbae37ab4 [SCSI] lpfc 8.1.2: Remove unused prototypes from lpfc_crtn.h
Remove unused prototypes from lpfc_crtn.h

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-28 18:50:44 -06:00
Brian King
32f9579250 [SCSI] scsi: Handle device_add failure in scsi_alloc_target
Fixes scsi to handle device_add failure in scsi_alloc_target.
Without this patch, if this call were to fail, we can oops
when we free the target.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 23:38:59 -06:00
James Bottomley
ffedb45225 [SCSI] fix scsi process problems and clean up the target reap issues
In order to use the new execute_in_process_context() API, you have to
provide it with the work storage, which I do in SCSI in scsi_device and
scsi_target, but which also means that we can no longer queue up the
target reaps, so instead I moved the target to a state model which
allows target_alloc to detect if we've received a dying target and wait
for it to be gone.  Hopefully, this should also solve the target
namespace race.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 23:37:45 -06:00
Mike Christie
ba3af0aff0 [SCSI] don't call ips_eh_reset in ips_queue to avoid deadlock
When the locking was changed in the eh code ips_eh_reset was changed
so that it was a wraper around __ips_eh_reset and all ips_eh_reset
does is grab the host lock and then calls __ips_eh_reset.

In the queuecommand, ips_queue is called with the host_lock held so if
it calls ips_eh_reset we will have a problem. This patch just has
ips_queue call __ips_eh_reset.

Patch is only compile tested. I do not have the HW.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Hammer, Jack <Jack_Hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 23:32:39 -06:00
Al Viro
6d73c8514d [SCSI] scsi_lib: fix recognition of cache type of Initio SBP-2 bridges
Regardless what mode page was asked for, Initio INIC-14x0 and
INIC-2430 always return page 6 without mode page headers.  Try to
recognise this as a special case in scsi_mode_sense and setting the
mode sense headers accordingly.

Signed-off-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 23:31:07 -06:00
Matthew Wilcox
fc25307d06 [SCSI] Improve message printing code
Fix a bug where we would consume one byte too many in the message
printing code.
Add support for 256-byte long messages.
Add support for the Modify Bidirectional Data Pointer message.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 23:26:56 -06:00
Alan Stern
1bfc5d9d5e [SCSI] Recognize missing LUNs for non-standard devices
Some non-standard SCSI targets or protocols, such as USB UFI, report "no
LUN present" by setting the Peripheral Device Type to 0x1f and the
Peripheral Qualifier to 0 (not 3 as the standard requires) in the INQUIRY
response.  This patch (as650b) adds a new target flag and code to
accomodate such targets.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 23:24:09 -06:00
Christoph Hellwig
8cac814501 [SCSI] aic7xxx: semaphore to completion conversion
On Tue, Jan 31, 2006 at 06:20:18PM +0100, Christoph Hellwig wrote:
> switch eh_sem to a completion.  due to wait_for_completion_timeout this
> also nicely simplifies the code.  Unfortunately it's untested, so if
> someone with the hardware could give it a try that would be nice.  Once
> it works the same thing can be applied to aic79xx.

New version that switches to the common onstack completion and just a
pointer in the platform_data struct idiom.  This gets rid of all the
flags fiddling.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 23:08:37 -06:00
Christoph Hellwig
fe27381d16 [SCSI] aacraid: use kthread_ API
Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Salyzyn, Mark <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:14 -06:00
James Bottomley
38e14f895b [SCSI] Add EXPORT_SYMBOL for spi msg functions
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:13 -06:00
Christoph Hellwig
a012564136 [SCSI] sas: add support for enclosure and bad ID rphy attributes
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:13 -06:00
Ralf Baechle
ae198df377 [SCSI] jazz_esp: Fix sparse warnings.
Using plain integer as NULL pointer.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:11 -06:00
Ralf Baechle
0320503dce [SCSI] jazz_esp: Delete useless prototype
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:11 -06:00
Matthew Wilcox
e24d873d25 [SCSI] Make spi_print_msg more consistent
Almost all the output from spi_print_msg() has a trailing space.
This patch fixes up the three cases that don't.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:10 -06:00
Matthew Wilcox
6ea3c0b2da [SCSI] Add spi_populate_*_msg functions
Introduce new helpers:
 - spi_populate_width_msg()
 - spi_populate_sync_msg()
 - spi_populate_ppr_msg()

and use them in drivers which already enable the SPI transport.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:09 -06:00
Matthew Wilcox
b0dc1db152 [SCSI] ncr53c8xx update
Delete unused NAME53C definition
Remove use of the M_* constants; use the common SCSI constants instead
Translate some remaining German
Add a missing changelog entry

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:08 -06:00
Matthew Wilcox
ea697e456a [SCSI] unused show_spi_transport_period_helper parameter
show_spi_transport_period_helper() doesn't need the class_device parameter

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:07 -06:00
Matthew Wilcox
a97a83a06b [SCSI] fix uninitialized variable error
in __scsi_add_device, sdev may be uninitialised if
scsi_host_scan_allowed() returns false.  Fix by initialising at the
top of the routine.  Also rely on the fact that
scsi_probe_and_add_lun() only actually fills in the sdev pointer if
the SCSI_SCAN_LUN_PRESENT case (so no need to check the return value).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:07 -06:00
Linas Vepstas
f8a88b19b9 [SCSI] PCI Error Recovery: IPR SCSI device driver
Various PCI bus errors can be signaled by newer PCI controllers.  This
patch adds the PCI error recovery callbacks to the IPR SCSI device driver.
The patch has been tested, and appears to work well.

Signed-off-by: Linas Vepstas <linas@linas.org>
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:05 -06:00
Greg KH
5e3c34c1e9 [SCSI] Remove devfs support from the SCSI subsystem
As devfs has been disabled from the kernel tree for a number of months
now (5 to be exact), here's a patch against 2.6.16-rc1-git1 that removes
support for it from the SCSI subsystem.

The patch also removes the scsi_disk devfs_name field as it's no longer
needed.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:04 -06:00
Jes Sorensen
24669f75a3 [SCSI] SCSI core kmalloc2kzalloc
Change the core SCSI code to use kzalloc rather than kmalloc+memset
where possible.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-27 22:55:02 -06:00
Al Viro
4897080077 [PATCH] sd: fix memory corruption with broken mode page headers
There's a problem in sd where we blindly believe the length of the
headers and block descriptors.  Some devices return insane values for
these and cause our length to end up greater than the actual buffer
size, so check to make sure.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Also removed the buffer size magic number (512) and added DPOFUA of
zero to the defaults

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-26 09:09:49 -08:00
Christoph Hellwig
a6ceda7457 [SCSI] esp: fix eh locking
esp_reset didn't get fixed when the EH locking changed.
->eh_bus_reset_handler is now called without the host lock held.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-02-22 14:35:52 -08:00
Tejun Heo
2e242fa994 [PATCH] libata: make ata_sg_setup_one() trim zero length sg
This patch makes ata_sg_setup_one() trim sg entry (thus making
qc->n_elem zero) if padding results in zero length sg entry.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-20 16:48:18 -05:00
Tejun Heo
9ae61c6cb6 [PATCH] libata: fix WARN_ON() condition in *_fill_sg()
For ATAPI commands, padding can reduce qc->n_elem by one and thus to
zero making assert(qc->n_elem > 0)'s in ata_fill_sg() and qs_fill_sg()
fail for legal commands.  This patch fixes the assert()'s to take
qc->pad_len into account.

Although the condition check seems a bit excessive, as this part of
code isn't still stable yet, I think it's worth to keep those.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-20 16:48:17 -05:00
Jens Axboe
c15d85c8f3 [PATCH] Add missing FUA write to sata_mv dma command list
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-17 16:31:18 -05:00
Albert Lee
0565c26de7 [PATCH] libata: minor fix for 2.6.16-rc3
- Fix the array index value in ata_rwcmd_protocol() for the added FUA commands.
 - Filter out ATAPI packet command error messages in ata_pio_error()

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-17 16:29:07 -05:00
Dan Williams
2ae5b30ff0 [PATCH] Necessary evil to get sata_vsc to initialize with Intel iq3124h hba
* libata does not care about error interrupts, so handle them locally
* the interrupts that are ignored only appear to happen at init time

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2006-02-17 16:27:19 -05:00
Linus Torvalds
26d451b603 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-02-16 12:47:44 -08:00
James Bottomley
65110b2168 [SCSI] fix wrong context bugs in SCSI
There's a bug in releasing scsi_device where the release function
actually frees the block queue.  However, the block queue release
calls flush_work(), which requires process context (the scsi_device
structure may release from irq context).  Update the release function
to invoke via the execute_in_process_context() API.

Also clean up the scsi_target structure releasing via this API.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-14 11:15:11 -06:00
James Bottomley
faead26d7a [PATCH] add scsi_execute_in_process_context() API
We have several points in the SCSI stack (primarily for our device
functions) where we need to guarantee process context, but (given the
place where the last reference was released) we cannot guarantee this.

This API gets around the issue by executing the function directly if
the caller has process context, but scheduling a workqueue to execute
in process context if the caller doesn't have it.  Unfortunately, it
requires memory allocation in interrupt context, but it's better than
what we have previously.  The true solution will require a bit of
re-engineering, so isn't appropriate for 2.6.16.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-14 11:14:26 -06:00
Matthew Wilcox
e2230eac17 [SCSI] sym2: Mask off opcode from RBC
pm->sg.size is set from the Residual Byte Count register.  However,
the upper byte of the RBC is the opcode of the instruction that was
executing, so we need to mask it off.  This fixes some spurious rejects
of IGNORE WIDE RESIDUE messages.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-12 11:13:09 -06:00
Ju, Seokmann
3542adcb35 [SCSI] megaraid_legacy: kobject_register failure
Attached patch fixes problem that cause kobject_register failure
during loading.  Kobject_register would fail when there are more than
1 module with same module name.  This patch will change module name of
megaraid_legacy from 'megaraid' to 'megaraid_legacy'.

Signed-Off-by: Seokmann Ju <seokmann.ju@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-12 11:11:09 -06:00
Brian King
4733804c9f [SCSI] ipr: Fix adapter initialization failure
Since scsi core is always sending scatterlists now, remove
some code which was written with the bad assumption that
a small transfer would not be sent down in a scatterlist.
Without this fix, the ipr driver ends up sending garbage
data to the adapter following a reset, causing it to
fail the reset and take the adapter offline.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-12 11:05:44 -06:00
Jeff Garzik
9caafa6c86 Merge branch 'upstream-fixes' 2006-02-09 04:29:00 -05:00
Jeff Garzik
cac0e8e8bb Merge branch 'master' 2006-02-09 00:58:59 -05:00
Al Viro
2d20eaf942 [PATCH] sg gfp_t annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:58:27 -05:00
Al Viro
e5fb81bd89 [PATCH] scsi_transport_iscsi gfp_t annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:58:21 -05:00
Al Viro
7be7cbf684 [PATCH] drivers/scsi/mac53c94.c __iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:57:14 -05:00
Al Viro
164006da31 [PATCH] bogus asm/delay.h includes
asm/delay.h is non-portable; linux/delay.h should be used in generic code.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:56:41 -05:00
andrew.vasquez@qlogic.com
0d4be1240b [PATCH] qla2xxx: Correct lun assignment during IOCB submission.
4gb products require an IOCB's FCP-LUN to be formatted in
wire-format prior to submission.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:54:07 -06:00
andrew.vasquez@qlogic.com
247ec457ce [PATCH] qla2xxx: Pass input-buffer length to Get-ID-List mailbox command.
Recent ISP24xx firmwares require that mailbox register 8 be
set to the maximum number of bytes to transfer during DMA
copying of the list.  We safely set this value to zero
(infinite), since the call is *only* made in FCAL
topologies.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:54:05 -06:00
andrew.vasquez@qlogic.com
f7757a5f0f [PATCH] qla2xxx: Remove bogus debug-code.
Commit 854165f424
inadvertently added some code meant only for testing -- the
driver was ignoring the non-zero function numbers of a
multi-port HBA.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:54:02 -06:00
andrew.vasquez@qlogic.com
387f96b4d9 [PATCH] qla2xxx: Close window on race between rport removal and fcport transition.
Fcport visibility is recognized during interrupt time, but,
rport removal can only occur during a process
(sleeping)-context.  Return a DID_IMM_RETRY status for
commands submitted within this window to insure I/Os do not
prematurely run-out of retries.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-07 10:53:56 -06:00
adam radford
62288f105b [SCSI] 3ware 9000 driver >4GB memory fix
The attached patch fixes a bug in the 3ware 9000 series driver:

- Fix use_sg == 0 mapping on systems with 4GB or higher.

  This fixes REPORT_LUNS (0xa0) failing with 3ware 9000 controllers on systems
  with lots of ram, mentioned in bugzilla # 6009:

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

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-05 17:15:15 -06:00
Eric Dumazet
88a2a4ac6b [PATCH] percpu data: only iterate over possible CPUs
percpu_data blindly allocates bootmem memory to store NR_CPUS instances of
cpudata, instead of allocating memory only for possible cpus.

As a preparation for changing that, we need to convert various 0 -> NR_CPUS
loops to use for_each_cpu().

(The above only applies to users of asm-generic/percpu.h.  powerpc has gone it
alone and is presently only allocating memory for present CPUs, so it's
currently corrupting memory).

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Jens Axboe <axboe@suse.de>
Cc: Anton Blanchard <anton@samba.org>
Acked-by: William Irwin <wli@holomorphy.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-05 11:06:51 -08:00
Jenx Axboe
40cdc840dc [SCSI] gdth: don't map zero-length requests
Don't map zero-length requests in gdth, zome architectures don't like
that in their dma mapping routines.

[ I'm pretty sure Jens posted this before, but for some reason it got
  forgotten  --hch ]

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-05 12:59:29 -06:00
Sumant Patro
f9876f0b67 [SCSI] megaraid_sas: support for 1078 type controller added
This patch adds support for 1078 type controller (device id : 0x60).

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:38:41 -06:00
Joshua Giles
122da30223 [SCSI] megaraid_sas: register 16 byte CDB capability
This patch properly registers the 16 byte command length capability of
the megaraid_sas controlled hardware with the scsi midlayer.  All
megaraid_sas hardware supports 16 byte CDB's.

Signed-off-by: Joshua Giles <joshua_giles@dell.com>
Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:37:29 -06:00
Mike Christie
b5b8101653 [SCSI] iscsi update: rm unused sessions list
rm unused sessions list.

This patch is last becuase I was not sure if this patchset was
going to be applied over the kmalloc2kzalloc one by JesS. If it
is then this patch will not apply and can be dropped for now. I will
resend later when things setttle down.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:30:37 -06:00
Mike Christie
28e5554df6 [SCSI] iscsi update: use gfp_t
Use gfp_t. I accidentally removed this in our last update.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:20:12 -06:00
Mike Christie
b36ae07cb7 [SCSI] iscsi update: fix mgmt pool err path release
>From ogerlitz@voltaire.com:

mgmtpool shoild be frees in immdata_alloc_fail label.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:19:53 -06:00
Mike Christie
351f739e68 [SCSI] iscsi update: set correct state at creation time
>From erezz@voltaire.com:

We are still in ISCSI_STATE_FREE state at create time. The addition
of the first connection puts us in ISCSI_STATE_LOGGED_IN.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:19:31 -06:00
Mike Christie
1fd459e367 [SCSI] iscsi update: rm conn lock
>From erezz@voltaire.com:

rm conn->lock since it is not used anymore. The dataqueue is protected
by the session lock and xmitmutex.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:19:08 -06:00
Mike Christie
ee7f8e4053 [SCSI] iscsi update: set deamon pid earlier
>From michaelc@cs.wisc.edu:

If the transport lookup fails we set the daemon pid too late.
This can cause us deadlock since the netlink code will think we
meant to call back into our iscsi_if_rx function.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:18:51 -06:00
Mike Christie
142e301fc8 [SCSI] iscsi update: setup pool before using
>From andmike@us.ibm.com:

 Ensure that pool data is setup prior to calling mempool_create as it will
 call the the alloc function during create.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:18:27 -06:00
Mike Christie
5b940adf5b [SCSI] iscsi update: pass correct skb to skb_trim
>From da-x@monatomic.org:

Wrong skb is passed to skb_trim in iscsi_if_get_stats.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:18:09 -06:00
Mike Christie
7b7232f3fb [SCSI] iscsi update: cleanup iscsi class interface
From:
michaelc@cs.wisc.edu
fujita.tomonori@lab.ntt.co.jp
da-x@monatomic.org

and err path fixup from:
ogerlitz@voltaire.com

This patch cleans up that interface by having the lld and class
pass a iscsi_cls_session or iscsi_cls_conn between each other when
the function is used by HW and SW iscsi llds. This way the lld
does not have to remember if it has to send a handle or pointer
and a handle or pointer to connection, session or host.

This also has the class verify the session handle that gets passed from
userspace instead of using the pointer passed into the kernel directly.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:17:03 -06:00
Mark Haverkamp
bb08f92ebd [SCSI] aacraid: use no_uld_attach flag
Received From Mark Salyzyn.

In order to support user tools accessing the array components (SMART,
Mode Page information, Cache page adjustments, WWN determination,
Firmware updates etc), we take advantage of the no_uld_attach flag and
deprecate the code that filters Inquiries to block the requests to array
components. The quirk prevents the sd layer from attaching to the
components.

We also took the opportunity to balance the queue depths based on the
total adapter queue depth to the array devices to reduce the chances of
starvation.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:16:14 -06:00
Mark Haverkamp
bfb35aa850 [SCSI] aacraid: Update global function names
Received from Mark Salyzyn,

Reduce the possibility of namespace collision.  Prefix with aac_.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:16:07 -06:00
Mark Haverkamp
d8a571135a [SCSI] aacraid: reduce device probe warnings
Received from Mark Salyzyn.

This patch sets up some device quirks surrounding arrays to inform the
scsi layer that various mode pages are not supported. This reduces the
severity of the complaints that show up in the logs as the array devices
are enumerated.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:15:56 -06:00
andrew.vasquez@qlogic.com
854165f424 [SCSI] qla2xxx: Add support to retrieve/update HBA option-rom.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:12:41 -06:00
andrew.vasquez@qlogic.com
1b3f63659b [SCSI] qla2xxx: Return correct data-len during NVRAM retrieval.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:12:19 -06:00
andrew.vasquez@qlogic.com
f6df144cca [SCSI] qla2xxx: Add beacon support via class-device attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:11:57 -06:00
andrew.vasquez@qlogic.com
392e2f651c [SCSI] qla2xxx: Add host-statistics FC transport attributes.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:11:35 -06:00
andrew.vasquez@qlogic.com
8d067623ad [SCSI] qla2xxx: Add host port-type FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:10:28 -06:00
andrew.vasquez@qlogic.com
04414013bb [SCSI] qla2xxx: Add port-speed FC transport attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-02-04 16:10:07 -06:00
Jeff Garzik
ddef9bb367 [libata sata_mv] do not enable PCI MSI by default
Several bug reports have come in, noting that disabling CONFIG_PCI_MSI
has fixed their problems with this driver.  This may be generic system
issues, but there is also the probability of unimplemented hardware
errata workarounds.  Until this ream of bug reports is sorted out, we
can get them going in non-MSI interrupt mode.

As such, this change adds an 'msi' module option, which defaults to off.
2006-02-02 16:17:06 -05:00
Mikael Pettersson
b62735d9c6 [PATCH] ide-scsi: fix for IDE probe/remove ops changes
Kernel 2.6.16-rc1 broke the ide-scsi driver: ide-scsi loads but fails to
find any devices to bind to.  It also triggers a message "Driver 'ide-scsi'
needs updating - please use bus_type methods" from the driver core.

The IDE core in 2.6.16-rc1 changed the location of an IDE driver's
->probe()/->remove()/->shutdown() methods: they are now in the ide_driver_t
struct not in the gen_driver sub-struct.  drivers/ide/ was updated for this
change but ide-scsi.c wasn't.  Hence the breakage.

This patch repairs ide-scsi and also eliminates the driver core warning.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:09 -08:00
Linus Torvalds
2f4c5416b3 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-01-31 21:22:45 -08:00
Linus Torvalds
e0ae23550f Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2006-01-31 13:12:41 -08:00
Jack Hammer
a5b3c86e4b [SCSI] ServeRAID: prevent seeing DADSI devices
A critical thing the ServeRAID driver MUST do is hide the physical DASDI
devices from the OS. It does this by intercepting the INQUIRY commands.

In recent 2.6.15 testing, I discovered this to be failing.

The cause was the driver assuming that the INQUIRY response data was in a
simple single buffer, when it was actually a 1 element scatter gather list.

This patch makes ips always look at the correct data when examining an
INQUIRY response.

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:43:18 -06:00
Hannes Reinecke
eb22184954 [SCSI] aic79xx: Fix timer handling
Fix the timer handling in aic79xx to use the SCSI-ML provided handling
instead of implementing our own.
It also fixes a deadlock in the command recovery code.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:50 -06:00
Hannes Reinecke
3fb0861264 [SCSI] aic79xx: SLOWCRC fix
This patch introduces the SLOWCRC handling for certain buggy chipsets.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:48 -06:00
Hannes Reinecke
53467e636b [SCSI] aic79xx: sequencer fixes
This patch updates the aic79xx sequencer with latest fixes from adaptec.
The sequencer code now corresponds with adaptec version 2.0.15.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:46 -06:00
Hannes Reinecke
2628ed2b1a [SCSI] aic7xxx: Update aicasm
This patchset updates aicasm code with the latest fixes from adaptec.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:44 -06:00
Moore, Eric
d99ca4180f [SCSI] scsi_transport_sas.c: display port identifier
This patch displays the port identifier on
the folder attribute; located in the middle digit.

/sys/class/sas_rphy/rphy-%x:%x:%x

The port identifier is basically the unique identifier
for each sas domain.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-31 14:39:36 -06:00
Jens Axboe
48bdc8ec4a [LIBATA] Blacklist certain Maxtor firmware revisions for FUA support
It looks like they are either discarding or corrupting data when the FUA
command is used, bad.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-30 16:09:35 +01:00
Jeff Garzik
9220a2d0da [libata ahci] add another JMicron pci id 2006-01-29 12:40:57 -05:00
Sumant Patro
1341c93922 [SCSI] megaraid_sas: new template defined to represent each type of controllers
This patch defines a new template to represent each type of
controllers (identified by the processor used). The template has
members that is set with appropriate values during driver
initialisation. This change is done to support new controllers with
minimal change to existing code. In future, for a new controller
support, a template will be declared and its members initialised
appropriately.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>

Rejections fixed and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-29 11:25:30 -06:00
Sumant Patro
cb59aa6a7c [SCSI] megaraid_sas: cleanup queue command path
This patch (originally submitted by Christoph Hellwig) removes code
duplication in megasas_build_cmd.  It also defines
MEGASAS_IOC_FIRMWARE32 to allow 64 bit compiled applications to work.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>

Rejections fixed and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-29 11:18:16 -06:00
Jeff Garzik
bd12097c74 [libata ahci] Isolate Intel-ism, add JMicron JMB360 support
Isolate some PCI config register bitbanging to Intel hardware, as it
should have been all along.

Add support for JMicron JMB360.
2006-01-29 02:47:03 -05:00
Jeff Garzik
51e9f2ff83 [libata sata_sil] implement 'slow_down' module parameter
On occasion, a user will submit a patch that enables the "mod15write"
quirk for their device.  Enabling this quirk has the effect of clamping
all ATA commands to no more than 15 sectors.  The intended use of this
quirk is to stop the controller from generating FIS's of unusual size
("but Wesley, what about the FOUS's?"), which in turn works around
problems in a <list> of hard drives.

One side effect of this quirk is greatly decreased performance.  Users
often enable the mod15write quirk to fix various system, power, chip,
and/or driver problems.  For a few rare problematic cases, enabling this
has cured lockups or data corruption.

Rather than add bogus listings to the mod15write quirk list (I get a
patch every month doing such), we add a 'slow_down' module parameter.
This allows users to employ a performance sledgehammer in the hopes
of curing a problem.  It defaults to off (0), of course.
2006-01-27 16:50:27 -05:00
brking@us.ibm.com
bb1d1073a1 [SCSI] Prevent scsi_execute_async from guessing cdb length
When the scsi_execute_async interface was added it ended up reducing
the flexibility of userspace to send arbitrary scsi commands through
sg using SG_IO. The SG_IO interface allows userspace to specify the
CDB length. This is now ignored in scsi_execute_async and it is
guessed using the COMMAND_SIZE macro, which is not always correct,
particularly for vendor specific commands. This patch adds a cmd_len
parameter to the scsi_execute_async interface to allow the caller
to specify the length of the CDB.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 15:13:50 -05:00
Jack Hammer
15084a4a63 [SCSI] ips soft lockup during reset/initialization
Resetting the adapter causes the ServeRAID driver to exceed
the max time allowed by the softlock watchdog. Resetting the
hardware can easily require 30 or more seconds. To avoid the

    "BUG: soft lockup detected on CPU#0!"

result, this patch replaces the mdelay() calls in the
initialization/reset routines with msleep().

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:18:23 -05:00
andrew.vasquez@qlogic.com
77427f514f [SCSI] qla2xxx: Drop legacy 'bypass lun scan for tape device' code.
Internal lun discovery has been removed since fc_transport
integration.  Short-circuiting for tape-devices in
qla2x00_update_fcport() could inadvertently result in a
blocked rport timing-out and its targets being reaped.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:17:25 -05:00
andrew.vasquez@qlogic.com
052c40c83b [SCSI] qla2xxx: Correct issue where the rport's upcall was not being made after relogin.
A target can LOGO an initiator at any time (i.e. during I/O,
due to a controller hicup, or as a simple authentication
mechanism after an initial CDB command), when this occurs,
the driver attempts to relogin (PLOGI) to the device via the
DPC thread.  Add code to make the appropriate upcall to the
FC transport layer (fc_remote_port_add()) upon successful
completion of the PLOGI.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:17:00 -05:00
andrew.vasquez@qlogic.com
d97994dc1f [SCSI] qla2xxx: Correct synchronization issues during rport addition/deletion.
The driver can typically detect port-loss during an
interrupt context (i.e. via interrogation of a status IOCB's
completion status [CS_PORT_LOGGED_OUT].  Due to the calling
requirements of the fc_rport APIs, the driver would defer
removal of the device to the default workqueue.  If the
work-item was preceded by an event which caused the port to
obtain visibility (relogin successful, target re-logged into
the topology), deferred removal could inadvertently drop the
rport.  The code also no longer defers removal via the
default workqueue, instead opting for use of the driver's
own DPC thread.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:16:50 -05:00
Guennadi Liakhovetski
1d12d98d28 [SCSI] dc395x: "fix" virt_addr calculation on AUTO_REQSENSE
The patch below "fixes" calculation of the virt_addr for the AUTO_REQSENSE
case. I put "fixes" in quotes because the real fix would be to completely
remove it, but that's beyond the scope of this patch.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-01-26 08:11:13 -05:00