[SCSI] qla2xxx: Correct FCAL login retry logic for ISP24xx.
ISP24XX FW does not support Mbx 0x74 ie Login Local Port.
Added the equivalent code for ISP24XX ie to relogin in non
fabric case for ISP24XX use login iocb.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Hannes Reinecke [Wed, 8 Mar 2006 12:00:07 +0000 (13:00 +0100)]
[SCSI] aic79xx: Avoid renegotiation on inquiry
Because of some quirk in the SCSI spec the aic79xx driver chose to
force a renegotiation when sending an inquiry. This should better
be handled by the upper layers if required at all.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
On certain systems the driver seems to hit upon some
"scsi0: Invalid Sequencer interrupt occurred." problem and dumps card state.
According to Adaptec engineers this message is harmless. So as not to
confuse user we can as well disable the internal card state dump and
just print out the message itself.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Hannes Reinecke [Wed, 8 Mar 2006 11:56:56 +0000 (12:56 +0100)]
[SCSI] aic79xx: use tcq functions
This patch converts aic79xx to use the midlayer-supplied tcq
functions.
We also set the queuedepth to '1' if tcq is disabled; the
aic79xx driver gets confused otherwise. Will set it back to
'2' once I figure out how to queue requests in the driver.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Hannes Reinecke [Wed, 8 Mar 2006 11:56:14 +0000 (12:56 +0100)]
[SCSI] aic79xx: remove qfrozen
This patch removes the need for platform_data->qfrozen.
We're now using complete() instead of semaphores thus
simplifying ahd_freeze_simq() quite a lot.
This also fixes some deadlocks in the recovery code (again).
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Smart [Tue, 7 Mar 2006 20:04:19 +0000 (15:04 -0500)]
[SCSI] lpfc 8.1.4 : Two misc fixes
Two misc fixes:
- Fix deadlock caused by return with host_lock held in lpfc_findnode_did
- Initialize all fields of the allocated mail box structure to zero.
Was causing some sysfs mailbox commands to fail immediately after load.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Smart [Tue, 7 Mar 2006 20:04:13 +0000 (15:04 -0500)]
[SCSI] lpfc 8.1.4 : Introduce lpfc_reset_barrier() function for resets on dual channel adapters
Introduce lpfc_reset_barrier() function for resets on dual channel adapters
Workaround for a hardware errata on dual channel asics. There is a
potential for the chip to lock up on a reset if a shared dma engine is in
use. The (ugly) work around requires a reset process which uses a mailbox
command to synchronize the independent channels prior to the reset to
avoid the issue. Unfortunately, the timing windows required to ensure this
workaround succeeds are very specific, meaning we can't release the cpu
during the barrier.
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Has an incorrect piece in sr_ioctl.c; it changes buffer from kmalloc
to kzalloc, but then removes the clearing of the stack variable struct
packet_command. This, in turn leaves rubbish in the sense pointer
which the sr_do_ioctl() command then happily writes to ... oops.
Thanks to Mike Christie <michaelc@cs.wisc.edu> for spotting this.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Willem Riede [Sat, 11 Feb 2006 19:46:56 +0000 (14:46 -0500)]
[SCSI] osst: changes required to move forward to block request
On 02/07/2006 04:12:55 AM, Christoph Hellwig wrote:
> On Mon, Feb 06, 2006 at 08:02:21PM -0500, Willem Riede wrote:
>
> > But I will certainly help retire scsi_request. And anything else that is
> > needed to keep up with proper kernel style. Let me know what those are, if
> > you would? I'll start looking at how st has changed, and will be back with
> > any questions I may have.
>
> right now the above is the most urgent bit. What would be nice but not
> required is a conversion to the sense handling helpers, similar to what
> st got (aka using the *normalize_sense functions and then dealing with the
> parsed sense buffer instead of the raw sense data)
Ok, so here is my first take at satisfying this request.
Be warned, that beyond compiling, and checking that the new module
doesn't immediately blow up, there hasn't yet been a lot of testing.
But this should allow you to comment on the changes, and move forward
with dropping scsi_request from the kernel code.
Signed-off-by: Willem Riede <osst@riede.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jamie Wellnitz [Wed, 1 Mar 2006 03:33:10 +0000 (22:33 -0500)]
[PATCH] lpfc 8.1.3: Protect NPL lists with host lock
Protect NPL lists with host lock
Symptoms: lpfc_findnode_rpi and lpfc_findnode_did can be called
outside of the discovery thread context. We have to iterate
through the NPL lists under the host lock and all add/del
operations on those lists have to be done under host lock.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jamie Wellnitz [Wed, 1 Mar 2006 03:33:09 +0000 (22:33 -0500)]
[PATCH] lpfc 8.1.3: Fix deadlock in lpfc_fdmi_tmo_handler
Fix deadlock in lpfc_fdmi_tmo_handler
lpfc_fdmi_tmo_handler was calling lpfc_fdmi_cmd with the host_lock
held. lpfc_fdmi_cmd assumes the host_lock is released as it calls functions
that acquire the host_lock. lpfc_fdmi_tmo_handler acquired the host_lock to
protect access to work_hba_events. This was already checked in the worker
thread so we can remove that code completely and remove access to the
host_lock.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jamie Wellnitz [Wed, 1 Mar 2006 03:33:05 +0000 (22:33 -0500)]
[PATCH] lpfc 8.1.3: PCI hrd_type should be obtained with pci_read_config_byte() macro
PCI hrd_type should be obtained with pci_read_config_byte() macro
Driver keys off of this field to report the proper adapter type.
The pci subsystem explicitly clears the multiport bit in the copy of
the field given the driver. Thus, to properly name the card, obtain it
from config space.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Sat, 4 Mar 2006 15:10:18 +0000 (09:10 -0600)]
[PATCH] convert aic94xx over to using the sas transport end device
Begin introducing the concept of sas remote devices that have an rphy
embedded. The first one (this) is a simple end device. All that an
end device really does is have port mode page parameters contained.
The next and more complex piece will be expander remote devices.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Thu, 2 Mar 2006 22:01:31 +0000 (16:01 -0600)]
[SCSI] make some sas class properties optional
aic94xx doesn't have a use for the bay or enclosure identifiers.
Also, I think it's not going to need a get_linkerrors(), so wire up
all of these exported properties as conditional on the underlying
function support.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.
Also switch from semaphore-based thread wakeup to wake_up_process.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-By: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Wed, 1 Mar 2006 15:02:49 +0000 (09:02 -0600)]
[SCSI] mptspi: Add transport class Domain Validation
This is the first half of a patch to add the generic domain validation
to mptspi. It also creates a secondary "virtual" channel for raid
component devices since these are now exported with no_uld_attach.
What Eric and I would have really liked is to export all physical
components on channel 0 and all raid components on channel 1.
Unfortunately, this would result in device renumbering on platforms with
mixed RAID/Physical devices which was considered unacceptable for
userland stability reasons.
Still to be done is to plug back the extra parameter setting and DV
pieces on reset and hotplug.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jamie Wellnitz [Wed, 1 Mar 2006 00:25:23 +0000 (19:25 -0500)]
[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>
James Bottomley [Thu, 23 Feb 2006 20:27:18 +0000 (14:27 -0600)]
[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>
James Bottomley [Thu, 23 Feb 2006 18:43:43 +0000 (12:43 -0600)]
[SCSI] add 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.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mike Christie [Wed, 22 Feb 2006 08:11:59 +0000 (02:11 -0600)]
[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>
Al Viro [Thu, 23 Feb 2006 01:03:16 +0000 (02:03 +0100)]
[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>
Matthew Wilcox [Sun, 19 Feb 2006 03:52:31 +0000 (20:52 -0700)]
[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>
Alan Stern [Thu, 9 Feb 2006 20:26:18 +0000 (15:26 -0500)]
[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>
[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>
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>
[SCSI] mptsas: add support for enclosure and bay identifier attributes
Adds support to retrieve the enclosure and bay identifiers. This patch
is from Eric with minor modifications from me, rewritten from a buggy
patch of mine, based on the earlier CSMI implementation from Eric..
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>