aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] mpt2sas: Bump version 02.100.03.00Kashyap, Desai2009-10-021-3/+3
| | | | | | | Bump version to 02.100.03.00 Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Support dev remove when phy status is ↵Kashyap, Desai2009-10-021-5/+6
| | | | | | | | | | MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT Add support to process device removal events when the phy status is set to MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Timeout occurred within the HANDSHAKE logic while waiting on ↵Kashyap, Desai2009-10-021-3/+1
| | | | | | | | | | | | | | | | firmware to ACK. Following a diag_reset, a request to send an ioc_init is timing out. The timeout occurred within the HANDSHAKE logic while waiting on firmware to acknowledge that the driver had wrote to the doorbell register. This was root caused to a logic timeout in the firmware code. The proposed solution is for the driver to call the udelay instead of msleep API in function where its looping reading the interrupt status. In addition to this change, there were two additional cases where we deleted the clearing interrupt status outside handshake context. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Call init_completion on a per request basis.Kashyap, Desai2009-10-023-3/+10
| | | | | | | | | | | | Now driver call init_completion on a per request basis. At some point the wait_for_completion_timeout is not waiting for the timeout, instead returning immediately, thus going into diag reset. This fix will address all request using the wait_for_completion_timeout API. The previous implimentation was only calling init_completion at driver load time. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Target Reset will be issued from Interrupt context.Kashyap, Desai2009-10-026-54/+372
| | | | | | | | | | | | | | | | | | (1) Added three new functions to handle sending target resest and OP_REMOVE from interrupt time, they are _scsih_tm_tr_send, _scsih_tm_tr_complete, and _scsih_sas_control_complete. This code will create a link list of pending target resets if there is no more available request in the hipriority request queue. The list is stored in ioc->delayed_tr_list. (2) All callback handler return type is changed from void to u8. Now _base_interrupt will check for return type of callback handlers to take decision of message frame is already freed or not. In genral, Return 1 meaning mf should be freed from _base_interrupt 0 means the mf is freed from function. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to ↵Kashyap, Desai2009-10-024-137/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | support multiple TM 1) create a pool of high priority message frames in the region of memory between message frames and chains. The modifications are in _base_allocate_memory_pools. Also create a seperate pool of memory for internal commands located near the same region of memory. The pool of high priority message frames is restriced by the facts->HighPriorityCredit. 2) Create additional API for accessing request message frames. New function mpt2sas_base_get_smid_hpr is for highpriority request. New function mpt2sas_base_get_smid_scsiio for SCSI_IO, passing in the scsi command pointer. The mpt2sas_base_get_smid function is for requesting internal commands. 3) Added new function _base_get_cb_idx to obtain the callback index from one of the three pools of request message frames. 4) Removed wrapper functions _scsih_scsi_lookup_set and _scsih_scsi_lookup_getclear. These were removed because this handling was moved into mpt2sas_base_get_smid_scsiio and mpt2sas_base_free_smid. 5) The function mpt2sas_base_free_smid is modified so the request message frames are put back on one of the three pools of request message frames. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Copyright change to 2009.Kashyap, Desai2009-10-029-9/+9
| | | | | | | Update the copyright year to 2009 through out the code. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Added mpi2_history.txt for MPI2 headers.Kashyap, Desai2009-10-021-0/+334
| | | | | | | Added new file for MPI2 header version history. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Update driver to MPI2 REV K headers.Kashyap, Desai2009-10-0211-207/+652
| | | | | | | | | Drivers header are updated to the MPI2 REV K headers. Renamed VF_ID to msix_index in all call back handlers. VF_ID is removed from all request descriptor. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Bump driver version 01.100.06.00Kashyap, Desai2009-09-051-2/+2
| | | | | | | | Bump version to 01.100.06.00 Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by:: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: cleanup interrupt routine and config_request optimizationKashyap, Desai2009-09-054-753/+234
| | | | | | | | | | | Cleaned up base_interrupt routine to be more effiecent. Deleted about a third of the config page API by moving redundant code from all the calling functions to _config_request. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Raid 10 Volume is showing as Raid 1E in dmesgKashyap, Desai2009-09-054-4/+109
| | | | | | | | | | | | | | | This patch modifies the slave_configure callback so the messages that get sent to system log for RAID1E volumes contain the string "RAID10" instead of "RAID1E". These messages contain information regarding what kind of scsi device is being added. Certain OEMS can enable displaying the RAID10 string instead of RAID1E via manufacturing page 10. The driver will read this config page at driver load time, then determine from the GenericFlags0 bits whether display the RAID10 or RAID1E string, also even drive count is taken into consideration. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <Eric.moore@lsi.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: setting SDEV into RUNNING state from Interrupt contextKashyap, Desai2009-09-052-6/+13
| | | | | | | | | | | | | | | | Changing SDEV Running state from interrupt context. Previously It was handle in work queue thread. With this change It will not wait for work queue thread to execute scsih_ublock_io_device to put SDEV into Running state. This will reduce delay for Device becoming RUNNING. Modified this patch considering James comment "Not to change SDEV state using scsi_device_set_state API, instead use scsi_internal_device_unblock scsi_internal_device_block API" Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <Eric.moore@lsi.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Removed wrapper funtions _scsih_link_change.Kashyap, Desai2009-09-053-33/+17
| | | | | | | | | | | | Deleted the wrapper function called _scsih_link_change. This function was implemented for compatibility reasons only, between different kernel versions. Currently this function is no longer needed. The calling function are converted to calling mpt2sas_transport_update_phy_link_change directly in the transport layer. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Prevent sending command to FW while Host ResetKashyap, Desai2009-09-055-54/+47
| | | | | | | | | | | | | | | This patch renames the flag for indicating host reset from ioc_reset_in_progress to shost_recovery. It also removes the spin locks surrounding the setting of this flag, which are unnecessary. Sanity checks on the shost_recovery flag were added thru out the code so as to prevent sending firmware commands during host reset. Also, the setting of the shost state to SHOST_RECOVERY was removed to prevent deadlocks, this is actually better handled by the shost_recovery flag. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <Eric.moore@lsi.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas : Rescan topology from Interrupt context instead of work threadKashyap, Desai2009-09-053-89/+57
| | | | | | | | | | | | | | Following host reset its possible that the controller firmware could assign new handles for devices, as well as adding or deleting devices. There is code in the driver that will rescan the topology folowing host reset; updating device handles, and remove devices that are no longer responding. This patch will improve the responsivness by moving this rescaning from the delayed hotplug worker thread to immediately following the host reset. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <Eric.moore@lsi.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix config request and diag reset deadlockKashyap, Desai2009-08-141-65/+20
| | | | | | | | Moving the setting and clearing of the mutex's to _config_request. There was a mutex deadlock when diag reset is called from inside _config_request, so diag reset was moved to outside the mutexs. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Bump driver version 01.100.04.00Kashyap, Desai2009-08-131-2/+2
| | | | | | | Bump version to 01.100.04.00 Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix oops because drv data points to NULL on resume from ↵Kashyap, Desai2009-08-131-3/+3
| | | | | | | | | | | | hibernate Fix another ocurring when the system resumes. This oops was due to driver setting the pci drvdata to NULL on the prior hibernation. Becuase it was set to NULL, upon resmume we assume the pci drvdata is non-zero, and we oops. To fix the ooops, we don't set pci drvdata to NULL at hibernation time. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix crash due to Watchdog is active while OS in standby modeKashyap, Desai2009-08-133-28/+64
| | | | | | | | | Fix oops ocurring at hibernation time. This oops was due to the firmware fault watchdog timer still running after we freed resources. To fix the issue we need to terminate the watchdog timer at hibernation time. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: fix infinite loop inside config requestKashyap, Desai2009-08-131-0/+6
| | | | | | | | | This restriction is introduced just to avoid loop of config_request. Retry must be limited so we have restricted config request to maximum 2 times. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Excessive log info causes sas iounit page time outKashyap, Desai2009-08-132-0/+8
| | | | | | | | | | Inhibit 0x3117 loginfos - during cable pull, there are too many printks going to the syslog, this is have impact on how fast the interrupt routine can handle keeping up with command completions; this was the root cause to the config pages timeouts. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Raid 10 Value is showing as Raid 1E in /va/log/messagesKashyap, Desai2009-08-131-26/+64
| | | | | | | | | | | | | | When a volume is activated, the driver will recieve a pair of ir config change events to remove the foreign volume, then add the native. In the process of the removal event, the hidden raid componet is removed from the parent.When the disks is added back, the adding of the port fails becuase there is no instance of the device in its parent. To fix this issue, the driver needs to call mpt2sas_transport_update_links() prior to calling _scsih_add_device. In addition, we added sanity checks on volume add and removal to ignore events for foreign volumes. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Expander fix oops saying "Already part of another port"Kashyap, Desai2009-08-131-6/+15
| | | | | | | | | Kernel panic is seen because driver did not tear down the port which should be dnoe using mpt2sas_transport_port_remove(). without this fix When expander is added back we would oops inside sas_port_add_phy. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] mpt2sas: Introduced check for enclosure_handle to avoid crashKashyap, Desai2009-08-131-4/+3
| | | | | | | | Kernel panic is seen because of enclosure_handle received from FW is zero. Check is introduced before calling mpt2sas_config_get_enclosure_pg0. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] Merge branch 'linus'James Bottomley2009-06-121-12/+11
|\ | | | | | | | | | | | | | | | | Conflicts: drivers/message/fusion/mptsas.c fixed up conflict between req->data_len accessors and mptsas driver updates. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
| * Merge branch 'for-2.6.31' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds2009-06-111-12/+11
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block: (153 commits) block: add request clone interface (v2) floppy: fix hibernation ramdisk: remove long-deprecated "ramdisk=" boot-time parameter fs/bio.c: add missing __user annotation block: prevent possible io_context->refcount overflow Add serial number support for virtio_blk, V4a block: Add missing bounce_pfn stacking and fix comments Revert "block: Fix bounce limit setting in DM" cciss: decode unit attention in SCSI error handling code cciss: Remove no longer needed sendcmd reject processing code cciss: change SCSI error handling routines to work with interrupts enabled. cciss: separate error processing and command retrying code in sendcmd_withirq_core() cciss: factor out fix target status processing code from sendcmd functions cciss: simplify interface of sendcmd() and sendcmd_withirq() cciss: factor out core of sendcmd_withirq() for use by SCSI error handling code cciss: Use schedule_timeout_uninterruptible in SCSI error handling code block: needs to set the residual length of a bidi request Revert "block: implement blkdev_readpages" block: Fix bounce limit setting in DM Removed reference to non-existing file Documentation/PCI/PCI-DMA-mapping.txt ... Manually fix conflicts with tracing updates in: block/blk-sysfs.c drivers/ide/ide-atapi.c drivers/ide/ide-cd.c drivers/ide/ide-floppy.c drivers/ide/ide-tape.c include/trace/events/block.h kernel/trace/blktrace.c
| | * Merge branch 'master' into for-2.6.31Jens Axboe2009-05-225-96/+261
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/block/hd.c drivers/block/mg_disk.c Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| | * | block: set rq->resid_len to blk_rq_bytes() on issueTejun Heo2009-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit c3a4d78c580de4edc9ef0f7c59812fb02ceb037f, while introducing rq->resid_len, the default value of residue count was changed from full count to zero. The conversion was done under the assumption that when a request fails residue count wasn't defined. However, Boaz and James pointed out that this wasn't true and the residue count should be preserved for failed requests too. This patchset restores the original behavior by setting rq->resid_len to blk_rq_bytes(rq) on request start and restoring explicit clearing in affected drivers. While at it, take advantage of the fact that rq->resid_len is set to full count where applicable. * ide-cd: rq->resid_len cleared on pc success * mptsas: req->resid_len cleared on success * sas_expander: rsp/req->resid_len cleared on success * mpt2sas_transport: req->resid_len cleared on success * ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take advantage of initial full count to simplify code Boaz Harrosh spotted bug in resid_len initialization. Fixed as suggested. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Borislav Petkov <petkovbb@googlemail.com> Cc: Boaz Harrosh <bharrosh@panasas.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| | * | block: cleanup rq->data_len usagesTejun Heo2009-05-111-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With recent unification of fields, it's now guaranteed that rq->data_len always equals blk_rq_bytes(). Convert all non-IDE direct users to accessors. IDE will be converted in a separate patch. Boaz: spotted incorrect data_len/resid_len conversion in osd. [ Impact: convert direct rq->data_len usages to blk_rq_bytes() ] Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Darrick J. Wong <djwong@us.ibm.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Boaz Harrosh <bharrosh@panasas.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| | * | block: add rq->resid_lenTejun Heo2009-05-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rq->data_len served two purposes - the length of data buffer on issue and the residual count on completion. This duality creates some headaches. First of all, block layer and low level drivers can't really determine what rq->data_len contains while a request is executing. It could be the total request length or it coulde be anything else one of the lower layers is using to keep track of residual count. This complicates things because blk_rq_bytes() and thus [__]blk_end_request_all() relies on rq->data_len for PC commands. Drivers which want to report residual count should first cache the total request length, update rq->data_len and then complete the request with the cached data length. Secondly, it makes requests default to reporting full residual count, ie. reporting that no data transfer occurred. The residual count is an exception not the norm; however, the driver should clear rq->data_len to zero to signify the normal cases while leaving it alone means no data transfer occurred at all. This reverse default behavior complicates code unnecessarily and renders block PC on some drivers (ide-tape/floppy) unuseable. This patch adds rq->resid_len which is used only for residual count. While at it, remove now unnecessasry blk_rq_bytes() caching in ide_pc_intr() as rq->data_len is not changed anymore. Boaz : spotted missing conversion in osd Sergei : spotted too early conversion to blk_rq_bytes() in ide-tape [ Impact: cleanup residual count handling, report 0 resid by default ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Mike Miller <mike.miller@hp.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Doug Gilbert <dgilbert@interlog.com> Cc: Mike Miller <mike.miller@hp.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Darrick J. Wong <djwong@us.ibm.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | | | [SCSI] mpt2sas: bump driver version to 01.100.03.00Eric Moore2009-05-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump driver version. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | | | [SCSI] mpt2sas: using the same naming convention for all static functionEric Moore2009-05-232-89/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix's is for all local function so their name has the "_" preceeding the module name, then function name. Most the code is already is using this naming convention. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | | | [SCSI] mpt2sas: add query task support for MPT2COMMAND ioctlEric Moore2009-05-231-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will find an active mid for a query_task request via the ioctl path. This code is already there for task_abort, so this patch combining code using the same fuction _ctl_set_task_mid(), previously _ctl_do_task_abort(). Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | | | [SCSI] mpt2sas: LUN Reset SupportEric Moore2009-05-231-2/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding new eh_target_reset_handler for target reset. Change the eh_device_reset_handler so its sending MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET, instead of MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET. Add new function _scsih_scsi_lookup_find_by_lun as a sanity check to insure I_T_L commands are completed upon completing lun reset. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | | | [SCSI] mpt2sas: T10 DIF SupportEric Moore2009-05-232-0/+119
|/ / / | | | | | | | | | | | | | | | | | | This add support for type 1 and 3 DIF support per the Oracle API. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | | [SCSI] mpt2sas: fix driver version inconsistencyEric Moore2009-05-181-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Commit commit 3b8b5c9b1f08660583e5dfe095c24170df62f1d2 Author: Eric Moore <eric.moore@lsi.com> Date: Tue Apr 21 15:44:27 2009 -0600 [SCSI] mpt2sas : bump driver version to 01.100.02.00 The MPT2SAS_MAJOR_VERSION didn't get bumped from 00 to 01 so applications will see it incorrectly as 00.100.02.00 driver instead of 01.100.02.00. Fix by making MPT2SAS_MAJOR_VERSION match the major number in MPT2SAS_DRIVER_VERSION Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : bump driver version to 01.100.02.00Eric Moore2009-04-271-3/+3
| | | | | | | | | | | | | | Bump driver version. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas: fix hotplug event processingEric Moore2009-04-271-5/+5
| | | | | | | | | | | | | | | | | | | | Here's a fix for hotplug events. The useage of queue_delayed_work seems to broke the fifo for processing of firmware events. After several iterations of adding and removing cabling connected to jbods, the devices are not getting added becuase kernel thread is activited out of order. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : release diagnotic buffers prior host resetEric Moore2009-04-272-70/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Diagnostic buffer support is already there in the driver. This support allows applications to pull ring buffers from controller firmware for debugging firmware related issues. What this patch does is sends reqeust to firmware to release the buffers prior to host reset. This will allow what ever debug info is there prior to reset to be dma'd to host memory. With out this fix, some of the debug data would been lost. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : Broadcast Primative AEN bug fixEric Moore2009-04-271-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug fix in the broadcast primative async event code where the driver would stop sending tm queries after the first queury was completed. This was due driver not reseting the tm_cmds.status field back to MPT2_CMD_NOT_USED after completing a task management request. An addtional fix adding sanity check to insure sas_device->starget set to NULL. During multipath testing fail over/fail back, the mid layer was holding onto sdev longer than the fail back period, thus starget was getting set to NULL for device being added. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : Identify Dell series-7 adapters at driver load timeEric Moore2009-04-272-0/+84
| | | | | | | | | | | | | | | | | | | | The Dell branding along with the VID, DID, SSVID, SSDID following the LSI branding that contains the card firmware/chip/bios versions. If the SSDID is not known but it is a Dell HBA, the driver will print the SSDID instead of the Dell branding string. Nothing will be printed for non Dell HBAs Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : driver name needs to be in the MPT2IOCINFO ioctlEric Moore2009-04-271-3/+3
| | | | | | | | | | | | | | | | | | The driver name needs to be at the beginining of the driver_version string in MPT2IOCINFO ioctl. This is the same behaviour is there already in the mptsas driver. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : running out of message framesEric Moore2009-04-271-1/+3
| | | | | | | | | | | | | | | | | | The driver is not freeing message frame when returning failure from _ctl_do_task_abort. If you call this function 500 times when its unable to find an active task mid, you end up with no message frames. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : fix oops when firmware sends large sense buffer sizeEric Moore2009-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | There is a bug in firmware where the reply message frame says there is a 16kb sense buffer, when in reality its only 20 bytes. This fix insures the memcpy action doesn't corrupte the memory beyond the 90 bytes allocated in the scsi command for sense buffer. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : the sanity check in base_interrupt needs to be on dword ↵Eric Moore2009-04-271-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | boundary The poison sanity check on the reply_post_free register needs to be by 32bit, not 64bit. The poison check is there because its possible that the driver read the 1st 32bit before the 2nd 32bit has been written to by firmware. In other words, this handles race between driver reading the 64 bit register, and it being dma'd across pci memory from controller firmware as two 32bit pci writes. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* | [SCSI] mpt2sas : unique ioctl magic numberEric Moore2009-04-271-1/+1
|/ | | | | | | | | The current magic number is shared with mptsas driver. This to be unique to fix issues with register_ioctls32_conversion in older kernels. We are making this change across all versions of the sas2.0 drivers. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)Yang Hongyang2009-04-131-5/+5
| | | | | | | | | | | | | | | | This is the second go through of the old DMA_nBIT_MASK macro,and there're not so many of them left,so I put them into one patch.I hope this is the last round. After this the definition of the old DMA_nBIT_MASK macro could be removed. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Tony Lindgren <tony@atomide.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Greg KH <greg@kroah.com> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [SCSI] mpt2sas: make global symbols uniqueEric Moore2009-03-173-10/+10
| | | | | | | | | | The ioc_list global symbol is already used in 1st generation mpt fusion drivers, so this patch makes it unique in the 2nd generation driver. I've checked the entire sources, and I don't see any other global system missing the mpt2sas_xxx prefix. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] mpt2sas v00.100.11.15Eric Moore2009-03-1318-0/+21991
* This is new scsi lld device driver from LSI supporting the SAS 2.0 standard. I have split patchs by filename. * Here is list of new 6gb host controllers: LSI SAS2004 LSI SAS2008 LSI SAS2108 LSI SAS2116 * Here are the changes in the 4th posting of this patch set: (1) fix compile errors when SCSI_MPT2SAS_LOGGING is not enabled (2) add mpt2sas to the SCSI Mid Layer Makefile (3) append mpt2sas_ to the naming of all non-static functions (4) fix oops for SMP_PASSTHRU (5) doorbell algorithm imported changes from windows driver * Here are the changes in the 3rd posting of this patch set: (1) add readl following writel from the function that disables interrupts (2) replace 0xFFFFFFFFFFFFFFFFULL with ~0ULL (3) when calling pci_enable_msix, only pass one msix entry (instead of 15). (4) remove the "current HW implementation uses..... " comment in the sources (5) merged bug fix for SIGIO/POLLIN notifcation; reported by the storlib team. * Here are the changes in the 2nd posting of this patch set: (1) use little endian types in the mpi headers (2) merged in bug fix's from inhouse drivers. Signed-off-by: Eric Moore <eric.moore@lsi.com> Tested-by: peter Bogdanovic <pbog@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>