History log of /linux-master/drivers/message/fusion/mptbase.h
Revision Date Author Comments
# 6e36a56a 12-Apr-2023 Josh Poimboeuf <jpoimboe@kernel.org>

scsi: message: fusion: Mark mpt_halt_firmware() __noreturn

mpt_halt_firmware() doesn't return. Mark it as such.

Fixes the following warnings:

vmlinux.o: warning: objtool: mptscsih_abort+0x7f4: unreachable instruction
vmlinux.o: warning: objtool: mptctl_timeout_expired+0x310: unreachable instruction

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Mark Rutland <mark.rutland@arm.com>
Debugged-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/d8129817423422355bf30e90dadc6764261b53e0.1681342859.git.jpoimboe@kernel.org


# 31455068 21-Feb-2023 Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>

scsi: message: fusion: Remove unused sas_persist_task work

MPT_ADAPTER->sas_persist_task is no longer used since commit 3eb0822c6740
("[SCSI] mpt fusion: Firmware event implementation using seperate
WorkQueue").

Link: https://lore.kernel.org/r/b2ca2164-5347-8ec1-d8b6-3225df864173@I-love.SAKURA.ne.jp
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# a534ff3f 04-Oct-2021 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

scsi: message: fusion: Remove unused mpt_pci driver .probe() 'id' parameter

The only two drivers don't make use of the id parameter, so drop it. This
is a step toward removing pci_dev->driver.

Link: https://lore.kernel.org/r/20211004125935.2300113-9-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>


# 69a1709e 17-Mar-2021 Bhaskar Chowdhury <unixbhaskar@gmail.com>

scsi: fusion: Fix a typo in the file mptbase.h

s/contets/contents/

Link: https://lore.kernel.org/r/20210317101238.2627574-1-unixbhaskar@gmail.com
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 8cd1943b 21-Apr-2015 Luis R. Rodriguez <mcgrof@suse.com>

fusion: remove dead MTRR code

If and when this gets enabled the driver could should split
up IO memory space properly and that is quite a bit of work.
Just remove the uncommented dead MTRR code then.

There are a few motivations for this:

a) Take advantage of PAT when available

b) Help bury MTRR code away, MTRR is architecture specific and on
x86 its replaced by PAT

c) Help with the goal of eventually using _PAGE_CACHE_UC over
_PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
de33c442e titled "x86 PAT: fix performance drop for glx,
use UC minus for ioremap(), ioremap_nocache() and
pci_mmap_page_range()")

Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Acked-by: Sreekanth Reddy <ureekanth.reddy@avagotech.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>


# c9834c70 25-Jun-2014 Joe Lawrence <joe.lawrence@stratus.com>

mptfusion: make adapter prod_name[] a pointer

The struct _MPT_ADAPTER doesn't need a full copy of the product string,
so prod_name can point to the string literal storage that the driver
already provides.

Avoids the following smatch warning:

drivers/message/fusion/mptbase.c:2858 MptDisplayIocCapabilities()
warn: this array is probably non-NULL. 'ioc->prod_name'

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 9cb78c16 25-Jun-2014 Hannes Reinecke <hare@suse.de>

scsi: use 64-bit LUNs

The SCSI standard defines 64-bit values for LUNs, and large arrays
employing large or hierarchical LUN numbers become more and more
common.

So update the linux SCSI stack to use 64-bit LUN numbers.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 8af3d8d5 25-Aug-2011 Ferenc Wagner <wferi@niif.hu>

[SCSI] fusion: ensure NUL-termination of MptCallbacksName elements

Using strlcpy instead of memcpy makes the strlen() calls superfluous
and also ensures zero-termination of the copied string.
At the same time get rid of the magic constant 50.

Actually, I can't see why copying the callback name is necessary
instead of simply storing a pointer to it (just like to the callback
function itself), but that goes beyond the scope of this fix.

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 98cbe371 04-Aug-2011 kashyap.desai@lsi.com <kashyap.desai@lsi.com>

[SCSI] mptfusion: Fix for device offline while doing aggressive HBA reset

[Resend patch as per Bernd Schubert comment ]

Issue:

Device goes offline while doing aggressive HBA reset
along with IO using some utility.

Root cause:

FW goes into bad state due to aggressive reset. Softreset does not
help to recover FW. And also aggressive reset open up the window for
Error handling thread to kicked off at the same time HBA will be in
constant RESET loop as part of aggressive reset test case can lead
Device to goes offline.

Changes:

1. Added extra check as below inside eh_timed_out call back as below.
if(ioc->ioc_reset_in_progress) Rc = EH_TIMER_RESET

2. Removed " DOORBELL_ACTIVE" check for SAS controller from task
management context. Since SAS controller uses high priority queue
for task management. This check is not required for SAS controller.

3. Moved SoftReset call to HardReset from Task Mgmt context.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 731f56c8 04-Aug-2011 kashyap.desai@lsi.com <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version 3.4.20

Upgrade version string.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# e62cca19 04-Aug-2011 kashyap.desai@lsi.com <kashyap.desai@lsi.com>

[SCSI] mptfusion: Better handling of DEAD IOC PCI-E Link down error condition

Find Non-Operation IOC and remove it from OS: Detecting
dead(non-functional) ioc will be done reading doorbell register value
from fault reset thread, which has been called from work thread
context after each specific interval. If doorbell value is 0xFFFFFFFF,
it will be considered as IOC is non-operational and marked as dead
ioc.

Once Dead IOC has been detected, it will be removed at pci layer using
"pci_remove_bus_device" API.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# cbc78ae7 25-Apr-2011 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version 3.4.19

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# d2b21476 09-Feb-2011 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version 03.04.18

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# eb6edad3 10-Aug-2010 Alexey Dobriyan <adobriyan@gmail.com>

mpt fusion: convert to seq_file

Convert everything except ->proc_info() stuff, it is done within separate
->proc_info path series.

Problem with ->read_proc et al is described here commit
786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
/proc entries"

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 943a2df8 26-Jul-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version 03.04.17

Version upgrade patch.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 213aaca3 26-Jul-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Extra debug prints added relavent to Device missing delay error handling

Adding function name in original debug prints and few more debug prints are
added.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# c9de7dc4 26-Jul-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Block Error handling for deleting devices or Device in DMD

Issue description:
In multipath topology, when device deletion is in transient state,
multipath driver can call blk_flush_queue() as part of path failure.
Before device get deleted from OS, Device may go OFFLINE as part of error
handling kicked off triggered from multipathing driver. Above condition hits
more frequently if device missing delay timer (which is LSI specific firmware
parameter) is non zero value.

root cause of this issue is Error handling thread is getting kicked off for
device which is not really present(in transient state of deleting).

This patch has solution for this issue. driver is now using eh_timed_out
callback. See below.

mptsas_transport_template->eh_timed_out = mptsas_eh_timed_out

Using mptsas_eh_timed_out function, driver can decide weather vdevice is
under Device missing delay or deleting state.

for either of those cases, there is BLK_EH_RESET_TIMER return to scsi mid
and error handling thread will not be kicked off for that particular scsi
command.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# c817ce84 17-Jun-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version 03.04.16

Upgrade driver version to 3.4.16

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# b68bf096 17-Jun-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: schedule_target_reset from all Reset context

Issue:
target reset will be queued to driver's internal queue to get schedule
later. When driver add target into internal target_reset queue we will block IOs
on those target using scsi midlayer API. Now due to some cause driver is not
executing those target_reset list and it is always in block state.

Changes:
now we are clearing target_reset queue from all other Callback context
instead of only DeviceReset context.Now wherever driver is clearing
taskmgmt_in_progress flag it is considering target_reset queue cleanup
also.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# aca794dd 17-Jun-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Corrected declaration of device_missing_delay

device missing delay is 8 bit value in io unit pg1. Making correct variable
declaration for device_missing_delay.

The driver is storing the calculated device missing delay in IOC structure
as a u8 instead of a u16. It needs to be a u16 if the delay is > 255.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 4f581b97 18-Mar-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version 03.04.15

Upgrade version from 3.04.14 to 3.04.15

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# d0f698c4 18-Mar-2010 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Added new less expensive RESET (Message Unit Reset)

Message Unit Reset - instructs the IOC to reset the Reply Post and
Free FIFO's. All the Message Frames on Reply Free FIFO are
discarded. All posted buffers are freed, and event notification is
turned off. IOC doesnt reply to any outstanding request. This will
transfer IOC to READY state. Message unit ready is less expensive
operations than Hard Reset. soft reset will not force Firmware to
reload again, it only do clean up of Message units.

mpt_Soft_Hard_ResetHandler will first try for Soft Reset,if
it fails then go for big hammer reset which is Hard Reset.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 4ffd005a 16-Dec-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version 03.04.14

Version upgrade to 3.04.14.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 080bb708 06-Oct-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptfusion: Bump version to 3.04.13

Bump version 3.04.13.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# b437b956 01-Sep-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptsas : Bump version to 3.04.12

Bump version to 3.04.12

Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 8ea0696e 04-Aug-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptsas : Bump version to 3.04.11

Bump version to 3.04.11

Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# a247fa45 04-Aug-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptsas : Removed mptscsih_timer_expired.

Removed mptscsih_timer_expired. This timer is no more use.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 9d2e9d66 04-Aug-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mptsas : Change DEFINED value of can queue for FC and SAS devices.

Change DEFINED value of can queue for FC and SAS devices.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# db7051b2 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Added support for Broadcast primitives Event handling

Firmware is able to handle Broadcast primitives, but upstream driver does not
have support for broadcast primitive handling. Now this patch is mainly to
support broadcast primitives.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# a7938b0b 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: RAID device handling and Dual port Raid support is added

1. Handle integrated Raid device(Add/Delete) and error condition and check
related to Raid device. is_logical_volume will represent logical volume
device.
2. Raid device dual port support is added. Main functions to support this
feature are mpt_raid_phys_disk_get_num_paths and mpt_raid_phys_disk_pg1.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 2f187862 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Code Cleanup patch

Resending patch considering Grants G's code review.

Main goal to submit this patch is code cleaup.
1. Better driver debug prints and code indentation.
2. fault_reset_work_lock is not used anywhere. driver is using taskmgmt_lock
instead of fault_reset_work_lock.
3. setting pci_set_drvdata properly.
4. Ingore config request when IOC is in reset state.( ioc_reset_in_progress
is set).
5. Init/clear managment frame proprely.(INITIALIZE_MGMT_STATUS and
CLEAR_MGMT_STATUS)

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# eedf92b9 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Rescan SAS topology added

1.) SAS topology Rescan is added. If Firmware is doing Reset and we get
Device add interrupt from Firmware, we will not receive it as part of Reset
is going ON. After Reset we will do special Rescan of SAS topology.
2.) Driver version changed from 3.04.08 to 3.04.09.

Added proper lock/unlock in mptsas_not_responding_devices() as per James'
comment.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# f9c34022 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: SAS topology scan changes, expander events

SAS topology scan is restructured. HBA firmware is generating more
events. Expander Events are added, Link status events are also added with
respect to SAS topology scan optimization.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 3eb0822c 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue

Now Firmware events are handled by firmware event queue.
Previously it was handled in interrupt context/WorkQueue of Linux.
Firmware Event handling is restructured and optimized.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# ea2a788d 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: rewrite of ioctl_cmds internal generated function

1) rewrite of ioctl_cmds internal generated function that issue commands to
firmware, porting them to be single threaded using the generic MPT_MGMT
struct. All wait Queues are replace by completion Queue.
2) added seperate callback handler for ioctl task managment
(mptctl_taskmgmt_reply), to handle command that timeout
3) rewrite mptctl_bus_reset

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# e7deff33 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Adding DeviceResetCtx for internal Device reset frame

1.) Added taskmgmt_quiesce_io flag in IOC and removed resetPending from
_MPT_SCSI_HOST struct.
2.) Reset from Scsi mid layer and internal Reset are seperate context.
Adding DeviceResetCtx for internal Device reset frame.
mptsas_taskmgmt_complete is optimized as part of implementation.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 1ba9ab2e 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: rewrite taskmgmt request and completion routines

1.) rewrite taskmanagement request and completion routines, making them
single threaded and using the generic MPT_MGMT struct, deleting
mptscsih_TMHandler, replacing with single request TM handler
mptscsih_IssueTaskMgmt, and killing the watchdog timer functions.
2.) cleanup ioc_reset callback handlers, introducing wrappers for
synchronizing error recovery (mpt_set_taskmgmt_in_progress_flag,
mpt_clear_taskmgmt_in_progress_flag), as the fusion firmware only handles
one task management request at a time

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 37c60f37 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: rewrite of all internal generated functions

Rewrite of all internal generated functions that issue commands to firmware,
porting them to be single threaded using the generic MPT_MGMT
struct. Implemented using completion Queue.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# f0f09d3b 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: config path optimized, completion queue is used

1) Previously we had mutliple #defines to use same values.
Now those #defines are optimized.
MPT_IOCTL_STATUS_* is removed and MPT_MGMT_STATUS_* are new
#defines.
2.) config path is optimized.
Instead of wait Queue and timer, using completion Q.
3.) mpt_timer_expired is not used.

[jejb: elide patch to eliminate mpt_timer_expired]
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 7b5a65b9 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Added support for MPT discovery completion check

sas_discovery_quiesce_io flag is used to control IO start/resume functionality.
IO will be stoped while doing discovery of topology. Once discovery is completed
It will resume IO. Resending patch including James review.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 14d0f0b0 29-May-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Fixing 1078 data corruption issue for 36GB memory region

The reason for this change is there is a data corruption when four different
physical memory regions in the 36GB to 37GB region are
accessed. This is only affecting 1078.

The solution is we need to use different addressing when filling in
the scatter gather table for the effected memory regions. So instead
of snooping on all four different memory holes, we treat any physical
addresses in the 36GB address with the same algorithm.

The fix is explained below
1) Ensure that the message frames are NOT located in the trouble
region. There is no remapping available for message frames, they must
be allocated outside the problem region.
2) Ensure that Sense buffers are NOT in the trouble region. There is
no remapping available.
3) Walk through the SGE entries and if any are inside the trouble region
then they need to be remapped as discussed below.
1) Set the Local Address bit in the SGE Flags field.
MPI_SGE_FLAGS_LOCAL_ADDRESS
2) Ensure we are using 64-bit SGEs
3) Set MSb (Bit 63) of the 64-bit address, this will indicate buffer
location is Host Memory.

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 2f4c782c 06-Jan-2009 Kashyap, Desai <kashyap.desai@lsi.com>

[SCSI] mpt fusion: Add Firmware debug support

Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# aab0de24 01-May-2008 Kay Sievers <kay.sievers@vrfy.org>

driver core: remove KOBJ_NAME_LEN define

Kobjects do not have a limit in name size since a while, so stop
pretending that they do.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# d54d48b8 20-May-2008 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion : Adding FAULT Reset polling work

When the firmware is in Fault state it will be identifed only when the next time
the driver access the IOC state.
This patch includes a polling function in the driver which will be executed in
regular interval to check the status of the firmware and if it is in Fault
state, then the firmware will be reset by the driver.

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# cddc0ab7 20-May-2008 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion : Updated copyright statment with 2008 included

Updating copyright statement to include the year 2008

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 22288ca9 20-May-2008 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Driver version upgrade to 3.04.07

Updating driver version to 3.04.07 from 3.04.06

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 15424921 21-Apr-2008 Adrian Bunk <bunk@kernel.org>

[SCSI] mpt fusion: make struct mpt_proc_root_dir static

This patch makes the needlessly global struct mpt_proc_root_dir static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: "Prakash, Sathya" <Sathya.Prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 7748369f 20-Mar-2008 Michael Reed <mdr@sgi.com>

[SCSI] mptsas: do not use ioc->handle to locate hba portinfo structure

While performing hardware raid reset testing via the raid's client, I
noticed that sometimes, following the reset, that there would be more
raid targets in the lsscsi output than there actually were raid
targets. I tracked this down to the following issue.

Fusion cannot always find the mptsas_portinfo structure for the hba
because it uses the handle stored in ioc->handle to locate it. The
problem is that the firmware can change the handle associated with the
hba when h/w raid is reset (via the raid client). When this happens,
the driver will allocate another mptsas_portinfo structure and link it
into the chain of said structures. This ultimately causes confusion
within the driver resulting in targets not being removed when they
should be.

Eric Moore pointed out that the hba's portinfo structure is always the
first structure on the sas_topology list. This patch modifies
mptsas.c to access the hba's portinfo structure by taking the first
structure on said list.

Signed-off-by: Michael Reed <mdr@sgi.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# ed5f606f 08-Mar-2008 Matthias Kaehlcke <matthias@kaehlcke.net>

[SCSI] mpt fusion: convert inactive_list_mutex to a mutex

the semaphore inactive_list_mutex is used as a mutex, convert it to
the mutex API

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 23a274c8 07-Mar-2008 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Enable MSI by default for SAS controllers

This patch modifies the driver to enable MSI by default for all SAS chips.

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 2939deaa 16-Oct-2007 Kyle McMartin <kyle@mcmartin.ca>

[SCSI] mpt fusion: kill warnings in mptbase.h on parisc64

Verified all the arches necessary select the CONFIG_64BIT symbol. This
also kills the warning (since it was using the 32-bit case) on parisc64
and mips64.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# e78d5b8f 08-Feb-2008 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Request I/O resources only when required

This patch modifies the I/O resource allocation behavior of FUSION
driver. The current version of driver allocates the I/O resources
even if they are not required and this creates trouble in low resource
environments. This driver now uses
pci_enable_device_mem/pci_enable_device functions to differentiate the
resource allocations.

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 984621b4 11-Jan-2008 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Fix for module unload problem in flash less controller environment

This patch fixes the module unload problem in flash less 1030
controller environment where firmware download boot functionality is
invoked. The problem is due to the firmware download is being done in
the reverse order, which this patch solves by insureing the download
occurs to the last controller being reset.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# c51d0bea 29-Sep-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] mpt fusion: fix up fusion prints using the sdev_printk, dev_printk, and shost_printk API

Cleaning up prints that use the xxx_printk API, in that the fusion
preamble "mptbase: iocX" follows the info provided by the print API.
The way its currently coded, the [H:C:T] print in sdev_printk will be
inbetween "mptbase" and "iocX", instead of before.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# e8206381 29-Sep-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] mpt fusion: lock down ScsiLookup

ScsiLookup is an array of pending scmd pointers that the scsi lld
maintains. This array is touched from queuecommand, eh threads, and
interrupt context. This array should put under locks, hence this patch
to synchronize its access. I've added some nice little function
wrappers for this, and moved the ScsiLookup array over to MPT_ADAPTER
struct.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 2b832247 14-Sep-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] mpt fusion: bump version to 3.04.06

bump version

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# f36789e2 14-Aug-2007 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Change company name from LSI Logic to LSI

Recently LSI Logic Corp was renamed as LSI Corp, so whereever there is
a reference of LSI Logic, it is changed to LSI in mpt fusion driver
code.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# eb5329f4 14-Aug-2007 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Link speed change display support

When there is state change in FC links, a message is displayed with
old and new link speed.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# f606f571 14-Aug-2007 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Change call back indices to u8 from int

The call back index requires only u8 but in lot of places it is
referred as int, now everywhere the call back index variables are
declared as u8 with uniform name cb_idx

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 7a195f46 14-Aug-2007 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: Usage of high priority request FIFO to send task management commands

Added support for sending the task management requests through High priority
request FIFO instead of Doorbell writes when firmware support High priority
FIFO.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 232f08fc 14-Aug-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] mpt fusion: Add support for ATTO 4LD: Rebranded LSI 53C1030

Per request from Matthew Wilcox - using PCI_VENDOR_ATTO.

Add support for ATTO UL4D, they are rebranded 53C1030.
The changes are
1. Adding a new PCI vendor ID in pci table
2. The spi_port_page_2 is in different format than that of LSI generic
spi_port_page_2 and hence mapping code is added.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 5c1b91b9 24-Jul-2007 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: logging support in Kconfig, Makefile, mptbase.h and addition of mptdebug.h

This patch adds a new file mptdebug.h in the fusion source directory,
which contains different debug macros. The existing debug macros and
flags are removed from the mptbase.h and Makefile In Kconfig a new
configuration parameter FUSION_LOGGING is added to enable/disable the
logging support during compile time.

signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# ef1d8df7 17-Jul-2007 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: add support for Brocade branded LSI FC HBA

Add support for Brocade 410/420 4Gbit FC HBAs.
They are re-branded LSI HBAs [LSI7104EP-LC/LSI7204EP-LC]

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# edb9068d 17-Jul-2007 Prakash, Sathya <sathya.prakash@lsi.com>

[SCSI] mpt fusion: add sysfs attributes to display IOC parameters

New sysfs scsi_host attributes are added to provide information about Firmware
version, BIOS version, MPI version and other product related information

signed-off-by: Sathya Praksh <sathya.prakash@lsi.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# d36b113e 13-Jun-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] mpt fusion: bump version

bump version

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 16d20101 13-Jun-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] mpt fusion: update MAINTAINERS (fusion part)

Update assocated fusion sources with new support email address.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3d9780b9 21-May-2007 Dave Jones <davej@redhat.com>

[SCSI] fusion: Fix |/|| confusion

There are several cases where the fusion driver uses the logical || to
try to do an arithmetical or ... fix by replacing with |.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 72978245 07-Feb-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] fusion: fix domain validation loops

After host reset, the device are programmed to default asyn narrow nego.
We need to reprogram the parameter back to previous values. If the host
reset is called as a result of spi_dv_device() commands timing out, its
possible to get into an infinite loop of dv to host reset. This will
prevent that case, as we merely program old values. If host reset is
called outside context of domain validation, then we can call
spi_dv_device.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 07c861d6 29-Jan-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] fusion - bump version - 3.04.04

bump version, and fix email addr for lsi support

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# df9e062a 29-Jan-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] fusion - serialize target resets in mptsas.c

Fusion firmware requires target reset following hotplug removal event,
with purpose to flush target outstanding request in fw. Current implementation
does the target resets from delayed work tasks, that in heavy load
conditions, take too long to be invoked, resulting in command time outs
This patch will issue target reset immediately from ISR context, and will
queue remaining target resets to be issued after the previous one completes.
The delayed work tasks are spawned during the target reset completion.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# b506ade9 29-Jan-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] fusion - inactive raid support, and raid event bug fix's

inactive raid support, e.g. exposing hidden raid components
belonging to a volume that are inactive. Also misc bug fix's for
various raid asyn events.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# c6c727a1 29-Jan-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] fusion - iocstatus, loginfo, and event debug updates

various string updates for iocstatus, logingo, and fw asyn events.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 873c82ed 29-Jan-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] fusion - added mptspi debug

helpful debug for mptspi module

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 793955f5 29-Jan-2007 Eric Moore <eric.moore@lsi.com>

[SCSI] fusion - Greater than 255 target and lun support

Add support for greater than 255 target and luns.
Kill the hd->Target[] field, and change all references
of bus_id/target_id, to channel/id.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# d0a6b08a 04-Jan-2007 Eric Moore <eric.moore@lsil.com>

[SCSI] fusion: bump version

bump version

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 9f4203b3 04-Jan-2007 Eric Moore <eric.moore@lsil.com>

[SCSI] fusion: MODULE_VERSION support

* Add modinfo driver version support.
* Change copyright year to 2007.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# f99be43b 04-Jan-2007 Eric Moore <eric.moore@lsil.com>

[SCSI] fusion: power pc and miscellaneous bug fixs

* Endian fix's for warnings found in ppc environment.
* Fix compile time warning when calling scsi_device_reprobe, where
in newer kernels this API expects its return value to be examined.
* Fix compile errors when debug messages are enabled.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 35508e46 06-Oct-2006 Michael Reed <mdr@sgi.com>

[SCSI] mptfc: stall eh handlers if resetting while rport blocked

Thanks to James Smart for the inspiration.

Stall error handler if attempting recovery while an rport is blocked.
This avoids device offline scenarios due to errors in the error handler.
Also verify that VirtDevice is available before issuing scsi command.
VirtDevice is removed when fc transport removes a target.

See James Smart's patch of 08/17/2006 for greater detail.

http://marc.theaimsgroup.com/?l=linux-scsi&m=115583213624803&w=2

Also bump version number per Eric's request.

Signed-off-by: Michael Reed <mdr@sgi.com>
Acked-by: Eric Moore <eric.moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3a0c56d8 30-Jul-2006 Michael Reed <mdr@sgi.com>

[SCSI] mptfc: correct out of order event processing

This patch corrects a problem in mptfc which can result in targets
being removed after executing an "lsiutil 99" reset of the fibre
channel ports.

The last rescan event was being processed before the setup reset work
due to an inappropriate optimization in the event processing logic.
Every rescan event is now queued for execution and the setup reset
work now executes in the proper sequence.

Signed-off-by: Michael Reed <mdr@sgi.com>
Acked-by: Moore, Eric <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 92c0bfea 11-Jul-2006 Eric Moore <eric.moore@lsil.com>

[SCSI] mptfusion: bump version to 3.04.01

bump version to 3.04.01

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# ba856d32 11-Jul-2006 Eric Moore <eric.moore@lsil.com>

[SCSI] mptfusion: misc fix's

* removing obsolete 1066, 1066E from Kconfig
* initializing aen_event_read_flag after host reset
* remove oem references
* remove obsolete mpt_pq_filter command line option

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3dc0b03f 11-Jul-2006 Eric Moore <eric.moore@lsil.com>

[SCSI] mptfusion: task abort fix's

Fix's to insure proper status is returned to midlayer
when a task abort failed to be aborted by controller
firmware.

Also sanity checks to prevent scsi cmd from being
double completed during error recovery.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 786899b0 11-Jul-2006 Eric Moore <eric.moore@lsil.com>

[SCSI] mptfusion: sas enclosures with smart drive

Adding support for sas enclosures with smart drives.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# e8bf3941 11-Jul-2006 James Bottomley <James.Bottomley@steeleye.com>

[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>


# dc22f16d 06-Jul-2006 Eric Moore <eric.moore@lsil.com>

[SCSI] mptsas: use unnumbered port API and remove driver porttracking

This allows us to be rid of the machinery in mptsas for creating and
tracking port numbers. Since mptsas is merely inventing the numbers,
the SAS transport class may as well do it instead.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 2686de27 29-Jun-2006 James Bottomley <James.Bottomley@steeleye.com>

[SCSI] mptsas: eliminate ghost devices

One of the current problems the mptsas driver has is that of "ghost"
devices (these are devices the firmware reports as existing, but what
they actually represent are the parents of a lower device), so for
example in my dual expander configuration, three expanders actually show
up, two for the real expanders but a third is created because the
firmware reports that the lower expander also has another expander
connected (which is simply the port going back to the upper expander).

The attached patch eliminates all these ghosts by not allocating any
devices for them if the SAS address is the SAS address of the parent.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 6ab3d562 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de>

Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# 87cf8986 27-Jun-2006 Eric Moore <eric.moore@lsil.com>

[SCSI] mptsas: Adding 1078 ROC support

* Adding 1078 ROC (Raid On Chip) Support - New host adapter

* Moving all PCI Vendor/Device ids to using internal defines; a request
from Christoph/James B. some time ago for when the next chip was added.

* Removing SAS 1066/1066E Vendor/Device IDs, as there are no plans to
manufacture that controller.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 547f9a21 27-Jun-2006 Eric Moore <eric.moore@lsil.com>

[SCSI] mptsas: wide port support

* Wide port support added - using James Bottomley's new SAS wide port API.
(There is a known problem in sas transport layer reported yesterday to
James. The Kobject dev.bus_ids for end devices are not unique across
expanders. I have added a work around in this patch, where I asigning
an unique port identifier for every port within the host - this solves
the problem, but I expect a fix from James in the sas transport).

* Adding target_alloc and target_destroy entry points, and moving code over
from the slave entry points.

* The renaming of some mptscsih_xxx functions declared in mptsas.c,
to mptsas_xxx.

* Target Reset moved from slave_destroy to hotplug work thread
handling (with regard to device removal). Also inhibit IO to end device
while device is being broken down . Talked to James Smart about this
at Linux Expo (with questions of how the fc transport handles this).

* Cleaning up the kzalloc's, and kfree's

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 1951d099 24-May-2006 Michael Reed <mdr@sgi.com>

[SCSI] mptfusion: change driver revision to 3.03.10

Bump driver version number to reflect addition of various
fibre channel patches.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 419835e2 24-May-2006 Michael Reed <mdr@sgi.com>

[SCSI] mptfc: fix fibre channel infinite request/response loop

While doing board reset testing I was able to put the system in
an infinite request/response loop between the scsi layer and
mptscsih_qcmd() by aborting the reset. This patch installs
a "SETUP RESET" handler which calls fc_remote_port_delete()
for all registered rports. This blocks the target which
prevents the loop. Additionally, should the reset fail to
complete, the transport will now terminate i/o to the target.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# ca2f938e 24-May-2006 Michael Reed <mdr@sgi.com>

[SCSI] mptfc: set fibre channel fw target missing timers to one second

The fibre channel firmware provides a timer which is similar in purpose
to the fibre channel transport's device loss timer. The effect of this
timer is to extend the total time that a target will be missing beyond
the value associated with the transport's timer. This patch changes
the firmware timer to a default of one second which significantly reduces
the lag between when a target goes missing and the notification of the
fibre channel transport.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 80d3ac77 24-May-2006 Michael Reed <mdr@sgi.com>

[SCSI] mptfusion: move fc event/reset handling to mptfc

Move fibre channel event and reset handling to mptfc. This will
result in fewer changes over time that need to be applied to
either mptbase.c or mptscsih.c.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 65207fed 21-Apr-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] - fusion - mptfc bug fix's to prevent deadlock situations

mptbase.h

bump version number to 3.03.09

remove unneeded flags
define workq and remove old fc specific locks

mptbase.c

initialize new lock and don't initialize two removed locks

mptscsih.c

when firmware reports target is no longer there, return
DID_REQUEUE for fc hosts so that i/o doesn't get killed until
the transport has an opportunity to manage the loss via its
dev loss timer

when the "eh_abort" routine is called, check to see if the
driver has the command or not before looking to see if a reset
is pending. James Smart and I talked about this and believe
that the API for this routine is: if driver doesn't have
command, return SUCCESS. This change helps prevent a target
from being taken offline. SUCCESS is returned because it's
likely that the command completed after error recovery timed
it out but before it could be aborted.

provide a routine to queue work to newly created workq, and
use it.

remove "ioc" from mptscsih_abort() it was only used one time.
the other references were via hd->ioc, so I just moved it....
net change in references to ioc via hd->ioc is zero

move hd->resetPending test and hd->timeouts increment to after
the test for whether the command to be aborted remains known
to the driver

Make certain that the workq exists before queuing work to it.

mptfc.c

no longer need to lock rport data structures as I was able to
single thread the code! I fixed up the debug code to
eliminate compilation messages due to type mismatch in the
printk. Got rid of some no longer needed rport flags.
Initialize and destroy the workq used for the rescan work.

simplify the logic regarding the increment of
fc_rescan_work_count. use post increment and test for zero
vs. pre increment and test for one; eliminate work_count
variable: queue_work can be called with the work_lock held as
it doesn't sleep

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 9dec70e0 14-Mar-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - bump version

version bump

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# e6b2d76a 14-Mar-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - expander hotplug suport in mptsas module

This adds support for hot adding and removing
expanders, and its associated attached devices.
When there is a change in topology,
the fusion firmware sends the
MPI_EVENT_SAS_DISCOVERY event to the driver.
The driver will read firmware config pages
to determine what changes took place, and refresh
drivers view of the world stored in ioc->sas_topology.

Here is the details of the action the driver does:

(1) Expander Added : The mptsas_discovery_work
workqueue is called. Config pages read, and
ioc->sas_topology is refreshed. The sas_phy_add()
is called for each phy of the expander. The
expanders attached devices are added via
sas_rphy_add(). Added end devices are handled within
the MPT_ADD_DEVICE logic in mptsas_hotplug_work
workqueue.

(2) Expander Delete : The sas_rphy_delete() will be
called for the top most compenent of the parent that the
expander is attached to. The sas_rphy_delete call
will delete all the children phys, rphys, and end devices.
This is handled from mptsas_discovery_work workqueue.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 914c2d8e 14-Mar-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - removing target_id/bus_id from the VirtDevice structure

It makes no sense in keeping the target_id and bus_id
in the VirtDevice structure, when it can be obtained
from the VirtTarget structure.

In addition, this patch fix's couple compilation bugs
in mptfc.c when MPT_DEBUG_FC is enabled. This
provided by Micheal Reed.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# c972c70f 14-Mar-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - static fix's

Patch previously provided from Adrian Bunk <bunk@stusta.de>,
moving some functions to static. This is already in
the -mm tree.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3a892bef 14-Mar-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - move some debug firmware event debug msgs to verbose level

Created a debug level MPT_DEBUG_VERBOSE_EVENTS.
Moving some of the more vebose debug messages
for firwmare events into new debug level. Also
added some more firmware events descriptions.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# c92f222e 01-Mar-2006 James Bottomley <James.Bottomley@steeleye.com>

[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>


# ea5a7a82 02-Feb-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - mptctl -adding asyn event notification support

Adding aen support.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 592f9c2f 02-Feb-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - mptctl - backplane istwi fix

Moving the toolbox call from mptbase.c, over to
mptctl.c, and using the mptctl infastructure to issue
the call. The existing code is hanging on certain HP platforms
when this ioctl is issued, and this patch fix's that.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 928496ac 16-Jan-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion: increase reply frame size from 0x40 to 0x50 bytes

Increasing the reply frame size by 16 bytes, to
be in sync with the other fusion drivers.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# fda4c2c8 25-Jan-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion: bump version

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3bc7bf1d 25-Jan-2006 Michael Reed <mdr@sgi.com>

[SCSI] fusion: FC rport code fixes

This fix's problems with recent fc submission regarding
i/o being redirected to the wrong target.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 79de278e 25-Jan-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion: move sas persistent event handling over to the mptsas module

This moves code intented for SAS from
the generic mptscsih module over to the
mptsas module.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 816aa907 13-Jan-2006 Moore, Eric <Eric.Moore@lsil.com>

[SCSI] fusion - adding raid support in mptsas

The SAS RAID volumes are reported beyond the expected number of phys.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 05e8ec17 13-Jan-2006 Michael Reed <mdr@sgi.com>

[SCSI] mptfusion - fc transport attributes

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# eeb846ce 13-Jan-2006 Christoph Hellwig <hch@lst.de>

[SCSI] fusion: convert semaphores to mutexes

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 9a28f49a 13-Jan-2006 Christoph Hellwig <hch@lst.de>

[SCSI] mptsas: support basic hotplug

Adds hotplug support for SAS end devices. Unfortunately the fusion
firmware doesn't generate similar events for expanders addition/removal
so we can't support them yet. Eric has an idea about a clever scheme to
find out about expander changes so that'll be added later on.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# f61c1c41 16-Nov-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] mptfusion - bump version

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# c7c82987 16-Nov-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] mptfusion - mapping fixs required support for transport layers.

This utilizes the hostdata area that is hung off of scsi_target and
scsi_device for saving unique firmware mapping. This will be required
for supporting new Fibre and SPI transport support.

This also fixs problems in error handling error code for SAS
controllers, in which the incorrect mapping was passed to the
firmware.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# a9b2937a 16-Nov-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] mptfusion - bus_type, change SCSI to SPI

This changes to SPI for the bus_type enumeration.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 2a238ea5 01-Dec-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] mptfusion : dv performance fix

Syncronization for Domain Validation workqueue and the initiation of the
alternate controller. Its possible that dv could be terminated if the
workqueue on the 1st channel doesn complete in time before the 2nd channel
begins initialization.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# f747307e 29-Nov-2005 Linus Torvalds <torvalds@g5.osdl.org>

Revert "[PATCH] drivers/message/fusion/mptbase.c: make code static"

This reverts commit 252ac865535e1ea9cc2d28be83f477d8d8b961a2.

It impacts the LSI customers using the mptstm target mode drivers
(source tar-ball at

ftp://ftp.lsil.com/HostAdapterDrivers/linux/Fusion-MPT/mptstm-1.00.13-src.tar.gz

for those who care).

Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 252ac865 08-Nov-2005 Adrian Bunk <bunk@stusta.de>

[PATCH] drivers/message/fusion/mptbase.c: make code static

This patch makes the following previously global and EXPORT_SYMBOL'ed
code static:
- struct mpt_proc_root_dir
- int mpt_stm_index

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 733482e4 08-Nov-2005 Olaf Hering <olh@suse.de>

[PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason

This patch removes almost all inclusions of linux/version.h. The 3
#defines are unused in most of the touched files.

A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.

There are also lots of #ifdef for long obsolete kernels, this was not
touched. In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.

quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# f9a2d2e0 19-Oct-2005 Christoph Hellwig <hch@lst.de>

[SCSI] mptsas: white space fixes and version bump

Various whitespace and comment fixes from Eric, aswell as a version
bump.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# da4fa655 19-Oct-2005 Christoph Hellwig <hch@lst.de>

[SCSI] mptsas: add support for PHY resets

Support PHY resets in mptsas. Thanks to Eric for various bug fixes
and improvements.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 466544d8 14-Sep-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] fusion SAS support (mptsas driver) updates

Summary of Changes:
* splitting mpt_interrupt per Christophs suggestion
about a month ago
* rename ScsiCfgData to SpiCfgData structure,
then move all the raid related info into
new structure called RaidCfgData. This is
done because SAS supports RAID, as well as SPI,
so the raid stuff should be seperate.
* incorrect timeout calculation for cntdn
inside WaitForDoorbellAck and WaitForDoortbellInt
* add support for interpreting SAS Log Info
* Increase Event Log Size from 0xA to 0x32
* Fix bug in mptsas/mptfc/mptspi - when controller
has Initiator Mode Disabled, and only running in
TargetMode, the mptctl would panic when loading.
The fix is to return 0, instead of -ENODEV, in
SCSI LLD respective probe routines
* Fix bug in mptlan.c - driver will panic if
there is host reset, due to dev being set to
zero in mpt_lan_ioc_reset
* Fix's for SPI - Echo Buffer
* Several fix's in mptscsih_io_done - FCP Response
info, RESIDUAL_MISMATCH, Data Underrun, etc.
* Cleanup Error Handling - EH handlers,
mptscsih_flush_cmds, and zeroing out ScsiLookup
from mptscsih_qcmd
* Cleanup asyn event handling from
mptscsih -> mptscsih_event_process. Also
added support for SAS Persistent Table Full,
an asyn event

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 82ffb671 09-Sep-2005 Christoph Hellwig <hch@lst.de>

[SCSI] fusion core changes for SAS support

- various bits for SAS support from the LSI driver.
- use the device private data for the fusion target private data.
this should be using the midlayer target data framework, but we
can't move over to that until fusion has been switched to the
generic DV code
- use target ID and channel from the fusion target private data,
because those in scsi_device will be different for mptsas

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 69218ee5 18-Aug-2005 Christoph Hellwig <hch@lst.de>

[SCSI] fusion: extended config header support

Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 7e8a2261 11-May-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] fusion - bump driver version to 3.03.02

Bump driver version to 3.03.02

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 3fadc59d 11-May-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] fusion - Adding pci recog support for Fibre 949X and 939X chips

* adding pci id support for new Fibre chips, 949X and 939X
* adding errata workaround - disabling PIO access except during fwdlb.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# d335cc38 30-Apr-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] mptfusion: fix panic loading driver statically compiled


Adjust link ordering in the Makefile. Also, the ioc->DoneCtx handles
for mptspi/mptfc in the message frame. And I'm now not seeing the
panic.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 7fadc87e 22-Apr-2005 Moore, Eric Dean <Eric.Moore@lsil.com>

[SCSI] mptfusion: mptbase cleanup, split driver support, DMA 32_BIT_MASK

(1) mptbase.c: Move registering pci ids to scsi lld drivers
(2) mptbase.c: Use the DMA_32BIT_MASK constant
(3) mptbase.c: Fix for multiple pci domains
(4) mptbase.c: Remove le32 conversion from BlockSize, which was u8 size
(5) mptbase.c: Remove credits, -sralston references , update copyright
(6) mptbase.c: split driver support

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 8d189f72 16-Apr-2005 Pavel Machek <pavel@ucw.cz>

[PATCH] fix u32 vs. pm_message_t in drivers/message

This fixes u32 vs. pm_message_t in drivers/message.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!