aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas
AgeCommit message (Collapse)AuthorFilesLines
2010-04-11[SCSI] mpt2sas: Copyright 2010.Kashyap, Desai15-15/+15
Copyright changes for year 2010. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Default descriptor for RAID Passthru command.Kashyap, Desai1-2/+5
RAID_SCSI_IO_PASSTHROUGH: Driver needs to be send the default descriptor for RAID Passthru, currently its sending SCSI_IO descriptor. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: return -ENOMEM if memory allocation failed.Kashyap, Desai1-1/+10
Added proper return type values in case memory allocation failed. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: removed use of tm_cmds.mutex in IOCTL branch.Kashyap, Desai3-83/+108
Removed all the mutex's for ioc->tm_cmds.mutex, then created one single mutex inside the function mpt2sas_scsih_issue_tm. This is the single function used when sending task management. Also the sanity checks required for scsi mid layer escalation were moved to inside the same function because these checks need to be done while the mutex is held. The ioc->tm_cmds.mutex inside the IOCTL branch is really not required since there is another mutex in this code called for ctl_cmds handling this sync. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Fix for little endianKashyap, Desai5-26/+46
1. Fixes for little endian issues. 2. Now Debug info for Discovery event is more readable. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Driver will not treat NEEDS_INIT as failure.Kashyap, Desai1-15/+138
Now Driver will not treat NEEDS_INIT as failure. In addition to this, the driver will now display message to describe the the access flags when bits are set, so the end user can better understand failures. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Early return from function if shost is in recovery.Kashyap, Desai2-3/+5
Aded checks for shost_recovery flag for early return from function. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Use of get_free_pages for huge memorary allocation.Kashyap, Desai2-7/+10
use the get_free_pages API for larger contigious physical memory chunk. Also, the ioc->chain_depth need to be changed from a 16bit to 32bit variable because the number of chains will exceed 64k when the queue depth is large. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Corrected conditional checks for Internal device ResetKashyap, Desai1-3/+3
bug fix in the handling of the internal device reset event The reason code check in scsih_sas_device_status_change_event never evaluates as true for internal device reset, hence driver never quiesce s IO when firmware is sending a device reset. The fix is to change the evaluate to: if (event_data->ReasonCode != MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET && event_data->ReasonCode != MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET) return; Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Corrected time stampKashyap, Desai1-2/+2
incorrect timestamp on 32 bit platforms: The upper 32 bit of the timestamp was getting truncated when converting seconds to milliseconds, which was due to the variable being long. To fix the problem, the variable needs to be u64. Also the microseconds conversion to milliseconds was incorrect; it should be divide by 1000 instead of divide by 8. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas : Do not reset handle before calling _scsih_remove_device in ↵Kashyap, Desai1-2/+0
RESCAN task after HBA RESET Setting handle to zero is not required before _scsih_remove_device. Driver uses sas_device->handle reference in _scsih_remove_device. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: use correct pci_resource_flag for comparisonRichard A Lary1-10/+13
This patch replaces incorrect base address space flag with correct IO resource flag. Also, performs check of memory resource to validate resource before using. Signed-off-by: Richard A Lary <[email protected]> Acked-by: "Desai, Kashyap" <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas : Device removal algorithm in interrupt context onlyKashyap, Desai2-195/+123
external host not connecting after controller reboot: The problem is : devices are not coming back after having the cable disconnected then reconnected. The problem is because the driver/firmware device removal handshake is failing. Due to this failure, the controller firmware is not sending out device add events when the target is reconnected. This is root caused to a race in the driver/firmware device removal algorithm. There is duplicate code in both interrupt and user context; where target reset is being issue from user context path while sas_iounit_control(OP_REMOVE) is being sent from interrupt context. An active target_reset will fail the OP_REMOVE. To fix this problem, the duplicate code has been removed from user context path. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Upgrading version to 04.100.01.02Kashyap, Desai1-2/+2
Upgraded version string. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: modified _scsih_sas_device_find_by_handle/sas_addressKashyap, Desai1-39/+18
modified _scsih_sas_device_find_by_handle so to handle the search on both list(device list and device_init_list) Also, we moved the priority of the search so the ioc->sas_device_list is done first. The "sas_device_init_list" is only used during the 1st port enable, so its unlikely there’s devices on it. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: RESCAN Barrier work is added in case of HBA reset.Kashyap, Desai3-69/+79
Add the cancel_pending_work flag from the fw_event_work structure, and then to set the flag during host reset, check the flag later from work threads context and if cancel_pending_work_flag is set ingore those events. Now Rescan after host reset is changed. Added special task MPT2SAS_RESCAN_AFTER_HOST_RESET. This task will be queued at the time of HBA reset. this task is treated as barrier. All work after MPT2SAS_RESCAN_AFTER_HOST_RESET will be treated as new work and will be server by callback handle. If host_recovery is going on while running RESCAN task, it will wait for shos_recovery_done completion which will be called from HBA reset DONE context. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: fix the incorrect scsi_dma_map error checkingFUJITA Tomonori1-2/+2
scsi_dma_map() returns -1 if an error occurred (zero means that the command has no data). So the following current code can't catch an error: sges_left = scsi_dma_map(scmd); if (!sges_left) { sdev_printk(KERN_ERR, scmd->device, "pci_map_sg" " failed: request for %d bytes!\n", scsi_bufflen(scmd)); return -ENOMEM; } Signed-off-by: FUJITA Tomonori <[email protected]> Acked-by: "Desai, Kashyap" <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo3-0/+3
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <[email protected]> Guess-its-ok-by: Christoph Lameter <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Lee Schermerhorn <[email protected]>
2010-02-17[SCSI] mpt2sas: Do not call sas_is_tlr_enabled for RAID volumes.Kashyap, Desai1-3/+5
For RAID volume sas_is_tlr_enabled call will hit BUG at scsi_transport_sas.c:163, since raid volume is not visible to sas transport layer. Now Added check to make sure arg pass in sas_is_tlr_enabled() is not a volume. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Bump version 04.100.01.00Kashyap, Desai1-3/+3
Version upgraded to 04.100.01.00. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Enable TLR for SSP TAPE drives (Added SAS Transport APIs)Kashyap, Desai1-20/+35
If TLR is supported for end device, MPT2SAS driver will enable the TLR bit in the SCSI_IO for every request. If there is a response with MPI2_SCSITASKMGMT_RSP_INVALID_FRAME, the driver will turn off the TLR logic. [jejb: updated to new transport class TLR API] Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Update driver header to latest MPI Spec.Kashyap, Desai6-40/+201
Update header to latest MPI SPEC revision. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Added phy_enable and set_phy_speed sysfs callback support.Kashyap, Desai3-17/+232
Added new callbacks phy_enable and set_phy_speed in the mpt2sas_transport_functions template. This will allow end user to enable/disable phys and change links rates using the SysFS interface. Current implementation only supports direct attached phys, but we could in the future add support for expander based phys. A new subroutine mpt2sas_config_set_sas_iounit_pg1 was added; this wrapper function used to send request to controller firmware to modify the phys and link rates. A new subroutine _transport_find_local_phy was added; a function for easly obtaining the local phy object for direct attached. Example to disable a phy echo 0 > /sys/class/phy3:0/enable Example to enable the same phy echo 1 > /sys/class/phy3:0/enable Example to change the link rate to 1.5 #echo "1.5 Gbit" > /sys/class/phy3:0/maximum_linkrate #cat /sys/class/phy3:0/negotiated_linkrate 1.5 Gbit Example to change the link rate to 3.0 #echo "3.0 Gbit" > /sys/class/phy3:0/maximum_linkrate #cat /sys/class/phy3:0/negotiated_linkrate 3.0 Gbit Example to change the link rate to 6.0 #echo "6.0 Gbit" > /sys/class/phy3:0/maximum_linkrate #cat /sys/class/phy3:0/negotiated_linkrate 6.0 Gbit Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Added raid transport supportKashyap, Desai3-4/+189
Adding support for raid transport layer. This will provide sysfs attributes containing raid level, state, and resync rate. MPT2SAS module will select RAID_ATTRS. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Use compat_ptr to setup the pointer compatibility.Kashyap, Desai1-8/+4
On ppc64, an 32bit application was failing due to data buffers not being copied properly from user to kernel memory. The problem due to improper conversion of 32 to 64 bit pointers. The fix is to use compat_ptr to setup the pointer compatibility in the routine _ctl_compat_mpt_command. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Set ioc->fwfault_debug to the cmd line option ↵Kashyap, Desai1-2/+3
mpt2sas_fwfault_debug. (1) change the formentioned string from logging_level to fwfault_debug (2) set ioc->fwfault_debug to the command line option mpt2sas_fwfault_debug setting at driver load time. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: User resource_size_t instead of unsigned longKashyap, Desai2-8/+9
Use resource_size_t to define the type resource for the system interface register set. The existing implementation was using "unsigned long" which would be 32 bit in 32 bit OS. If 32 bit OS is using 64 bit physical address space for the system interface register set, we need to shift to using resource_size_t which takes care of physical address space. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Return -ENODATA on IOCTL timeoutKashyap, Desai1-0/+1
The driver was modified to return -ENODATA when there is a timeout via ioctl path. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-02-08[SCSI] mpt2sas: Delete volume before HBA detach.Kashyap, Desai1-0/+17
The driver hangs when doing `rmmod mpt2sas` if there are any IR volumes present.The hang is due the scsi midlayer trying to access the IR volumes after the driver releases controller resources. Perhaps when scsi_remove_host is called,the scsi mid layer is sending some request. This doesn't occur for bare drives becuase the driver is already reporting those drives deleted prior to calling mpt2sas_base_detach. To solve this issue, we need to delete the volumes as well. Signed-off-by: Kashyap Desai <[email protected]> Reviewed-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-12-10[SCSI] mpt2sas: add missing initialization of scsih_cmdsKashyap, Desai1-0/+5
Internal command scsih_cmds init is included in mpt2sas_base_attach. Signed-off-by: Kashyap Desai <[email protected]> Cc: Stable Tree <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-12-09Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits) tree-wide: fix misspelling of "definition" in comments reiserfs: fix misspelling of "journaled" doc: Fix a typo in slub.txt. inotify: remove superfluous return code check hdlc: spelling fix in find_pvc() comment doc: fix regulator docs cut-and-pasteism mtd: Fix comment in Kconfig doc: Fix IRQ chip docs tree-wide: fix assorted typos all over the place drivers/ata/libata-sff.c: comment spelling fixes fix typos/grammos in Documentation/edac.txt sysctl: add missing comments fs/debugfs/inode.c: fix comment typos sgivwfb: Make use of ARRAY_SIZE. sky2: fix sky2_link_down copy/paste comment error tree-wide: fix typos "couter" -> "counter" tree-wide: fix typos "offest" -> "offset" fix kerneldoc for set_irq_msi() spidev: fix double "of of" in comment comment typo fix: sybsystem -> subsystem ...
2009-12-04[SCSI] modify change_queue_depth to take in reason why it is being calledMike Christie1-3/+7
This patch modifies scsi_host_template->change_queue_depth so that it takes an argument indicating why it is being called. This will be used so that if a LLD needs to do some extra processing when handling queue fulls or later ramp ups, it can do so. This is a simple port of the drivers setting a change_queue_depth callback. In the patch I just have these LLDs adjust the queue depth if the user was requesting it. Signed-off-by: Mike Christie <[email protected]> [Vasu.Dev: v2 Also converted pmcraid_change_queue_depth and then verified all modules compile using "make allmodconfig" for any new build warnings on X86_64. Updated original description after combing two original patches from Mike to make this patch git bisectable.] Signed-off-by: Vasu Dev <[email protected]> [jejb: fixed up 53c700] Signed-off-by: James Bottomley <[email protected]>
2009-12-04tree-wide: fix assorted typos all over the placeAndré Goddard Rosa1-1/+1
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2009-10-29[SCSI] mpt2sas: Bump version 03.100.03.00Kashyap, Desai1-2/+2
Bump version to 03.100.03.00 Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: No link rate change, do not call update links nor unblock deviceKashyap, Desai1-25/+27
(1) target resets are sending link change rate events with no link rate change -> thus said the driver was modified so when there is no link rate change, we don't need to call mpt2sas_transport_update_links nor _scsih_ublock_io_device. (2) There were changes made in _scsih_sas_topology_change_event_debug to change the debug strings so they are more clear. Also the link rate change information was added to display the new and previous link rate. for the MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST event when the ExpStatus is set to zero, display "responding" instead of "unknown status". Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas : Add support for RAID Action System Shutdown Initiated at OS ↵Kashyap, Desai2-1/+136
shutdown (1) Added new function _scsih_ir_shutdown. This function will issue the MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED request via MPI2_FUNCTION_RAID_ACTION. The function will wait 10 seconds for reply message frame, then print out the ioc status and loginfo. This function is only called when there are raid volumes present. (2) Add shutdown callback in the struct pci_driver object scsih_driver. This will be called only when the system is shutting down. From this function, we will call _scsih_ir_shutdown mentioned above. (3) Add support in _scsih_remove to call _scsih_ir_shutdown. The function _scsih_remove will be called when the driver is unloaded (and system is still running). scsih internal command contex is added to send internal message frames from mpt2sas_scsih.c. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Freeze the sdev IO queue when firmware sends internal dev resetKashyap, Desai1-1/+33
When receiving the MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET event, the driver will set the tm_busy flag in the sdev private host data, When tm_busy flag is set, the driver will return SCSI_MLQUEUE_DEVICE_BUSY, effectly freezing the IO to the device. The tm_busy flag is cleared with the MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET event. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas : PPC (power pc) endian bug fix'sKashyap, Desai4-22/+24
(1) EEDP(End to End data protection) was not working. This was due to not setting EEDP BlockSize and Flags to little endian format in the message frame. (2) Some expander sysfs attributes were not getting set properly. The sas format was not getting set due to endian issues with sas_format field in the struct rep_manu_reply. Since sas_format was not set properly, the component_vendor_id, component_revision_id, and component_id were not set. (3) In _transport_smp_handler: we don't need to convert the smid from little endian to cpu prior to calling mpt2sas_base_free_smid, because its allready in cpu format. (4) Some loginfos and ioc status were not xonverted from little endian to cpu. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: mpt2sas_base_get_sense_buffer_dma should be returning little ↵Kashyap, Desai4-6/+7
endian cpu_to_le64 when calculating the physical dma address. This will properly handle endianess on big endian systems. The return value of this function was changed from dma_addr_t to __le64. Remove the typecasting of u32 when setting the SenseBufferLowAddress, since its already in __le32 format. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Return DID_TRANSPORT_DISRUPTED in nexus ↵Kashyap, Desai1-4/+3
loss,SCSI_MLQUEUE_DEVICE_BUSY if device is busy 1 Its observed that the OS was sending request to the driver after it had been put into blocking state, so the driver was modified to return SCSI_MLQUEUE_DEVICE_BUSY. 2. Driver will return DID_TRANSPORT_DISRUPTED when sdev is haivng nexus loss. This occurrs when sdev is blocked, between the MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING and MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING events. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Retrieve the ioc facts prior to putting the controller into ↵Kashyap, Desai1-2/+2
READY state The driver needs to retrieve the ioc facts prior to putting the controller into READY state. The current design is calling ioc facts after putting the controller into READY state, which means the driver is sending a diag reset instead of message unit reset becuase the capability information is not yet available. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Added new info messages for IR and Expander events.Kashyap, Desai1-2/+14
(1) for the MPI2_EVENT_IR_OPERATION_STATUS event, add support to print "background init" or "make data consistent" for debugging purposes. If the RAIDOperation is set to a value not defined, then don't print anything (2) for the MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE event, add support to print "expander reduced functionality" and "expander reduced functionality complete", which are new events. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Limit the max_depth to 32 for SATA devices which are not ↵Kashyap, Desai1-0/+25
part of volume Added sanity check in _scsih_change_queue_depth to limit the max_depth to 32 for SATA devices. This is only for physical devices not part of a volume. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Added support to set the TimeStamp when sending ioc_initKashyap, Desai1-0/+9
Added support to set the TimeStamp when sending ioc_init. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Add Extended Type for Diagnostic Buffer supportKashyap, Desai3-8/+29
Added tests for registry entries of EXBuffSize, EXImmed, and EXType to support the new Extended diag buffer type. Modified code where necessary to handle the new ExtendedType field in the F/W diagnostic Post and Release messages. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Added command line option diag_buffer_enable.Kashyap, Desai3-37/+104
Added command line option diag_buffer_enable. When the command line option is set, the driver will automatically post diag buffers at driver load time. The command line option diag_buffer_enable is bitwise, so it's possible to enable both and/or snapshot + trace buffers. For trace, the driver will allocate 1MB buffer, whereas for snapshot its 2MB. The purpose for this is so the enduser doesn't have to manually use an application to setup diag buffers for debugging firmware related issues. Here is some examples trace: # insmod mpt2sas.ko diag_buffer_enable=1 snapshot: # insmod mpt2sas.ko diag_buffer_enable=2 both trace and snapshot: # insmod mpt2sas.ko diag_buffer_enable=3 Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Fixed some of the commentKashyap, Desai1-10/+10
Fixed some of the comments sections for some of the function so "@ioc: pointer to scsi command object" was changed to "@ioc: per adapter object" Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Support for stopping driver when Firmware encountersKashyap, Desai4-16/+119
Added command line option and shost sysfs attribute called mpt2sas_fwfault_debug. When enduser writes a "1" to this parameter, this will enable support in the driver for debugging firmware timeout related issues. This handling was added in three areas (a) scsi error handling callback called task_abort, (b) IOCTL interface, and (c) other timeouts that result in diag resets, such as manufacturing config pages. When this support is enabled, the driver will provide dump_stack to console, halt controller firmware, and panic driver. The end user probably would want to setup serial console redirection so the dump stack can be seen. Here are the three methods for enable this support: (a) # insmod mpt2sas.ko mpt2sas_fwfault_debug=1 (b) # echo 1 > /sys/module/mpt2sas/parameters/mpt2sas_fwfault_debug (c) # echo 1 > /sys/class/scsi_host/host#/fwfault_debug (where # is the host number) Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: Adding MPI Headers - revision LKashyap, Desai5-14/+305
The new headers contain the following changes: (1) Added IO Unit Page 7. (2) Added new device ids for SAS2208. (3) Added SAS IO Unit Page 5. (4) Added partial and slumber power management capable flags to SAS Device Page 0 Flags field. (5) Added PhyInfo defines for power condition. (6) Added Ethernet configuration pages. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-10-29[SCSI] mpt2sas: New device SAS2208 support is addedKashyap, Desai2-0/+26
Added device ids range for { 0x80 - 87 } , modified mpi/mpi2_cnfg.h containing MPI2_MFGPAGE_DEVID_SAS2208_X. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>