aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas/mpt2sas_base.h
AgeCommit message (Collapse)Author
2010-02-08[SCSI] mpt2sas: Bump version 04.100.01.00Kashyap, Desai
Version upgraded to 04.100.01.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>
2010-02-08[SCSI] mpt2sas: Added phy_enable and set_phy_speed sysfs callback support.Kashyap, Desai
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 <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] mpt2sas: Added raid transport supportKashyap, Desai
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 <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-08[SCSI] mpt2sas: User resource_size_t instead of unsigned longKashyap, Desai
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 <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mpt2sas: Bump version 03.100.03.00Kashyap, Desai
Bump version to 03.100.03.00 Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mpt2sas : Add support for RAID Action System Shutdown Initiated at OS ↵Kashyap, Desai
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 <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mpt2sas: mpt2sas_base_get_sense_buffer_dma should be returning little ↵Kashyap, Desai
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 <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mpt2sas: Added command line option diag_buffer_enable.Kashyap, Desai
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 <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mpt2sas: Support for stopping driver when Firmware encountersKashyap, Desai
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 <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-29[SCSI] mpt2sas: Driver will use sas address instead of handle as a lookupKashyap, Desai
The device driver was not handling updating device handles in all cases across diag resets. To fix this issue, the driver is converted to using sas address instead of handle as a lookup reference to the parent expander or sas_host. Also, for both expanders and sas host, the phy handle will be one unique handle. In the sas host case, the phy handle can be different for every phy, so the change is to set the handle to the handle of the first phy; every phy will be one single sas address(phy 0) instead of a different sas address for every phy(previous implementation). So making one consistent sas address for all the direct attachedports to the sas host, will make it better user experience when using udev /dev/disk/by-path dev nodes Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: Eric Moore <Eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-10-02[SCSI] mpt2sas: Bump version 02.100.03.00Kashyap, Desai
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>
2009-10-02[SCSI] mpt2sas: Target Reset will be issued from Interrupt context.Kashyap, Desai
(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>
2009-10-02[SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to ↵Kashyap, Desai
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>
2009-10-02[SCSI] mpt2sas: Copyright change to 2009.Kashyap, Desai
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>
2009-10-02[SCSI] mpt2sas: Update driver to MPI2 REV K headers.Kashyap, Desai
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>
2009-09-05[SCSI] mpt2sas: Bump driver version 01.100.06.00Kashyap, Desai
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>
2009-09-05[SCSI] mpt2sas: cleanup interrupt routine and config_request optimizationKashyap, Desai
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>
2009-09-05[SCSI] mpt2sas: Raid 10 Volume is showing as Raid 1E in dmesgKashyap, Desai
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>
2009-09-05[SCSI] mpt2sas: setting SDEV into RUNNING state from Interrupt contextKashyap, Desai
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>
2009-09-05[SCSI] mpt2sas: Removed wrapper funtions _scsih_link_change.Kashyap, Desai
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>
2009-09-05[SCSI] mpt2sas: Prevent sending command to FW while Host ResetKashyap, Desai
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>
2009-09-05[SCSI] mpt2sas : Rescan topology from Interrupt context instead of work threadKashyap, Desai
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>
2009-08-13[SCSI] mpt2sas: Bump driver version 01.100.04.00Kashyap, Desai
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>
2009-08-13[SCSI] mpt2sas: fix crash due to Watchdog is active while OS in standby modeKashyap, Desai
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>
2009-05-23[SCSI] mpt2sas: bump driver version to 01.100.03.00Eric Moore
Bump driver version. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-05-23[SCSI] mpt2sas: T10 DIF SupportEric Moore
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>
2009-05-18[SCSI] mpt2sas: fix driver version inconsistencyEric Moore
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>
2009-04-27[SCSI] mpt2sas : bump driver version to 01.100.02.00Eric Moore
Bump driver version. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-04-27[SCSI] mpt2sas : Identify Dell series-7 adapters at driver load timeEric Moore
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>
2009-03-17[SCSI] mpt2sas: make global symbols uniqueEric Moore
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>
2009-03-13[SCSI] mpt2sas v00.100.11.15Eric Moore
* 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>