aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas
AgeCommit message (Collapse)AuthorFilesLines
2010-07-27[SCSI] mpt2sas: Added expander phy counter supportKashyap, Desai1-9/+233
Added support to retrieve the invalid_dword_count, running_disparity_error_count, loss_of_dword_sync_count, and phy_reset_problem_count for expanders. This will be exported to attributes within the sas transport layer. A new wrapper function was added for sending SMP passthru to retrieve the expander phy error log. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-27[SCSI] mpt2sas: staged device discovery. disable_discovery module parameter ↵Kashyap, Desai1-0/+7
is added. Added command line option called disable_discovery. When enabled on the command line, the driver will not send a port_enable when loaded for the first time. If port_enable is not called, then there is no discovery of devices, as well as the sas topology. Then later if one desires to invoke discovery, then they will need to issue a diagnostic reset. A diagnostic reset can be issued various ways. One of the way is throught sysfs. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-27[SCSI] mpt2sas: Hold Controller reset when another reset is in progressKashyap, Desai3-7/+27
Driver should not allow multiple host reset when already host reset is in progress. It is possible that host reset was sent by scsi mid layer while there was already an host reset active, either issued via IOCTL interface or internaly, like a config page timeout. Since there was a host reset active, the driver would return a FAILED response to the scsi mid layer. The solution is make sure pending host resets will wait for the active host reset to complete before returning control back up the call stack. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-27[SCSI] mpt2sas: Fix to use sas device list instead of enclosure list for ↵Kashyap, Desai1-6/+6
_transpor_get_enclosure_identifier. Enclosure_identifier not being returned by mpt2sas The driver exports callback function to the sas transport layer for obtaining the enclosure logical id. This function is called _transport_get_enclosure_identifier. The driver was searching the wrong list for the enclosure_identifier. The driver should be searching the sas device list instead of enclosure list. The sas address that is passed to the driver is for the end device, not enclosure. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-07-27[SCSI] mpt2sas: DIF Type 2 Protection SupportEric Moore2-8/+14
Adding DIF Type 2 protection support, as well as turning on 32 byte cdb's, and setting the cdb length for > 16 byte in the SCSI_IO->control parameter. Signed-off-by: Martin Petersen <[email protected]> Signed-off-by: Eric Moore <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-06-16Merge branch 'master' into for-nextJiri Kosina2-2/+2
2010-06-16fix typos concerning "management"Uwe Kleine-König2-3/+3
Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2010-05-25kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, ↵Alexey Dobriyan2-2/+2
SHRT_MAX and SHRT_MIN - C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not USHORT_MAX/SHORT_MAX/SHORT_MIN. - Make SHRT_MIN of type s16, not int, for consistency. [[email protected]: fix drivers/dma/timb_dma.c] [[email protected]: fix security/keys/keyring.c] Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-04-11[SCSI] mpt2sas: Bump version 05.100.00.02Kashyap, Desai1-2/+2
Upgrade version to 05.100.00.02 Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Before removing sas_device search device in list for ↵Kashyap, Desai1-3/+8
_scsih_sas_device_remove Fix a oops in _scsih_sas_device_remove. The driver was attempting to delete a object from the sas_device link list when the object was not present. Added sanity check for sas_device NULL dereference. before deleting sas_device now driver will search device in list then only it will follow device removal. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Reworked scmd->result priority for _scsih_qcmd.Kashyap, Desai1-7/+14
we added support to set the deleted flag prior to device scan, then clear the flag for responding devices, leaving the deleted flag only set for missing devices. The problem is for internal generated host resets, IO queues are not blocked at scsi mid layer level. IO will be continued sent to driver, and driver will return SCSI_MLQUEUE_HOST_BUSY. The problem is the driver checks for the deleted flag before it checks for the controller being in reset, so there is a window where the driver would be returning DID_NO_CONNECT for responding devices. This occurs during the time between calling _scsih_prep_device_scan, and _scsih_mark_responding_sas_device & _scsih_mark_responding_raid_device. Fix the queuecommand entry point so ioc->shost_recovery flag sanity check is given higher presidence then the device "deleted flag" check. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Upgrade version 05.100.00.01Kashyap, Desai1-2/+2
Upgraded version string. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Check for NULL pointer before free_pages is added.Kashyap, Desai1-1/+4
Added check before free_pages just to make sure ioc->scsi_lookup is not NULL. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Added support for PCIe Advanced Error Recovery.Kashyap, Desai2-0/+124
Added support in the driver to support EEH and PCIe Advanced Error Recovery. This involves adding new pci_error_handler interface for recovering the controller from PCI Bus errors, such as SERR and PERR. Some tools are available for simulating PCI errors in order to validate this interface: http://www.kernel.org/pub/linux/utils/pci/aer-inject Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Send default descriptor for RAID pass through in mpt2ctlKashyap, Desai1-2/+5
RAID_SCSI_IO_PASSTHROUGH: Driver needs to be sending 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: sanity added to remove duplicate port from topologyKashyap, Desai2-0/+86
There are few special cases which needs to be handled deleting old port. CASE1: In topology you need cascaded expanders. Through sysfs just make sure topology is up. Erase the manufacturing image of the cascaded expander and reset the board. In some cases Adapter will receive Exapnder Add event before expander delete. In such a case, driver needs to delete duplicate port before adding new port. CASE2: Enable Device Missing delay of HBA through lsiutils. If expander or end device is hotswapped with different device before DMD timer expires, driver will get device add for new device first and then device deletion event for the original devices will arrive later at DMD timer expires. In this case also driver need to delete duplicate port before adding port for new device. Added new function which will make sure when new port is added, that its not claiming the same phy resources already in use by another port. If it does, then it will delete the other port before adding the new port. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas : IOs needs to be pause until handles are refreshed for all ↵Kashyap, Desai1-9/+40
device after recovery After Host Reset firmware will have new list of device handles for the target. Device handle refresh in driver is part of Rescan topology logic. (See functions like *_search_responding_*). This needs to be done from Host Reset context before making shost_recovery to 0. Currently it is done in Firwmare event context, which may leads IO to a wrong device. Now handler refresh is moved to HBA reset context. Apart from this, Now driver will stop IOs for all device setting deleted flag to 1 at the time of HBA Reset through _scsih_prep_device_scan. It will only unblock devices, if devices has been found as part of RESCAN. This way it will make more safe IO blocking at the time of HBA reset at mpt2sas driver layer. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-04-11[SCSI] mpt2sas: Bump version 05.100.00.00Kashyap, Desai1-4/+4
Upgraded version string. Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
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]>