aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-02scsi_dh_alua: Use vpd_pg83 informationHannes Reinecke1-69/+18
The SCSI device now has the VPD page 0x83 information attached, so there is no need to query it again. [mkp: Fixed a checkpatch warning] Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-12-02scsi_dh_alua: Disable ALUA handling for non-disk devicesHannes Reinecke1-0/+12
Non-disk devices might support ALUA, but the firmware implementation is untested and frequently broken. As we're don't actually need it disable ALUA support for non-disk device for now. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-12-02scsi: ignore errors from scsi_dh_add_device()Hannes Reinecke1-3/+4
device handler initialisation might fail due to a number of reasons. But as device_handlers are optional this shouldn't cause us to disable the device entirely. So just ignore errors from scsi_dh_add_device(). Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-12-02scsi_dh: move 'dh_state' sysfs attribute to generic codeHannes Reinecke3-73/+60
As scsi_dh.c is now always compiled in we should be moving the 'dh_state' attribute to the generic code. Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30mvsas: fix misleading indentationLuis de Bethencourt1-2/+2
Fix a smatch warning: drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended? The code is correct, the indention is misleading. When the device is not ready we want to return SAS_PHY_DOWN. But current indentation makes it look like we only do so in the else branch of if (mvi_dev). Signed-off-by: Luis de Bethencourt <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30scsi: ufs: fix spelling mistake in error messageColin Ian King1-1/+1
Minor issue, fix spelling mistake, Intialization -> Initialization Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: change driver version to v1.30.00.22-20151126Ching Huang1-1/+1
Change driver version to v1.30.00.22-20151126 Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: Split dma resource allocation to a new functionChing Huang1-82/+93
Split dma resource allocation and io register assignment from get_config to a new function arcmsr_alloc_io_queue. Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: more readability improvementsChing Huang1-47/+26
Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: changes driver version numberChing Huang1-1/+1
Changes driver version number. Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: adds code to support new Areca adapter ARC1203Ching Huang2-5/+31
Support Areca's new PCIe to SATA RAID adapter ARC1203. Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: make code more readableChing Huang2-7/+10
[mkp: Fixed checkpatch whitespace warning] Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: fixes not release allocated resourceChing Huang1-1/+5
Releasing allocated resource if get configuration data failed. Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30arcmsr: fixed getting wrong configuration dataChing Huang1-10/+10
Fixed getting wrong configuration data of adapter type B and type D. Signed-off-by: Ching Huang <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30scsi_transport_fc: Introduce scsi_host_{get,put}()Bart Van Assche1-6/+6
Use scsi_host_{get,put}() instead of open-coding these functions. Compile-tested only. [mkp: Dropped CC:stable and fixed James Smart's email address] Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30scsi_debug: check for bigger value firstAndy Shevchenko1-3/+3
Even for signed types we have to check for bigger positive value first. Otherwise it will be never happened. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Ewan Milne <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-30scsi: rescan VPD attributesHannes Reinecke5-10/+39
The VPD page information might change, so we need to be able to update it. This patch implements a VPD page rescan whenever the 'rescan' sysfs attribute is triggered. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Shane Seymour <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25aacraid: aac_release_resources() can be staticFengguang Wu1-1/+1
Signed-off-by: Fengguang Wu <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Mahesh Rajashekhara <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25scsi: use sector_div instead of do_divArnd Bergmann1-2/+2
do_div is the wrong way to divide a sector_t, as it is less efficient when sector_t is 32-bit wide. With the upcoming do_div optimizations, the kernel starts warning about this: drivers/scsi/scsi_debug.c: In function 'dif_store': include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast This changes the code to use sector_div instead, which always produces optimal code. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinicke <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Remove dependency on of_irq_countJohn Garry3-40/+5
Originally the driver would use of_irq_count to calculate how much memory is required for storing the interrupt names, since the number of interrupt sources for the controller is variable. Since of_irq_count cannot be used by the driver, use fixed names. Signed-off-by: John Garry <[email protected]> Signed-off-by: Zhangfei Gao <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25MAINTAINERS: Add maintainer for HiSi SAS driverJohn Garry1-0/+7
Add maintainer for HiSilicon SAS driver. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add fatal irq handlerJohn Garry1-0/+119
Add handlers for fatal interrupts. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add control phy handlerJohn Garry3-0/+55
Add method for lldd_control_phy. Currently link rate control and spinup hold is unsupported. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add tmf methodsJohn Garry1-0/+309
Add function methods for tmf's. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add scan finished and startJohn Garry2-0/+26
Add functions for scsi host template scan_finished and scan_start methods. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add smp protocol supportJohn Garry3-0/+100
Add support for smp function, which allows devices attached by expander to be controlled. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add bcast interrupt handlerJohn Garry1-0/+31
This is for expander broadcast event. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add abnormal irq handlerJohn Garry3-0/+190
Add abnormal irq handler. This handler is concerned with phy down event. Also add port formed and port deformed handlers. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add dev_found and dev_goneJohn Garry3-0/+142
Add functions to deal with lldd_dev_found and lldd_dev_gone. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add cq interrupt handlerJohn Garry3-0/+389
Add cq interrupt handler and also slot error handler function. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add ssp command functionJohn Garry3-0/+458
Add path to send ssp command to HW. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add path from phyup irq to SAS frameworkJohn Garry3-0/+66
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add v1 hardware interrupt initJohn Garry2-0/+166
Add code to interrupts, so now we can get a phy up interrupt when a disk is connected. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add v1 hardware initialisation codeJohn Garry3-0/+342
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add v1 hardware register definitionsJohn Garry1-0/+389
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add v1 hw module initJohn Garry3-0/+57
Add module init code for v1 hw. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add timer and spinlock initJohn Garry2-0/+5
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add phy and port initJohn Garry2-0/+46
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add hisi sas device typeJohn Garry2-0/+18
Include initialisation. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add hisi_hba workqueueJohn Garry2-0/+9
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Set dev DMA maskJohn Garry1-0/+8
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add phy SAS ADDR initializationJohn Garry2-0/+13
The SAS address for the HBA comes from the device tree. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add cq structure initializationJohn Garry2-0/+13
Each completion queue has a structure. This is mainly for passing to irq handler so we know which queue the irq occured on. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add slot init codeJohn Garry2-0/+27
Add functionality to init slot indexing. Slot indexing is for the host to track which slots (or tags) are free and which are used. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add hisi_sas_removeJohn Garry1-1/+70
This patch also includes relevant memory/pool freeing and sas/scsi host removal. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Allocate memories and create poolsJohn Garry2-0/+124
Allocate DMA and non-DMA memories for the controller. Also create DMA pools. These include: - Delivery queues - Completion queues - Command status buffer - Command table - ITCT (For device context) - Host slot info - IO status - Breakpoint - host slot indexing - SG data - FIS - interrupts names Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add HW DMA structuresJohn Garry1-0/+131
Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Scan device treeJohn Garry2-1/+54
Scan the device tree for all properties. Also do this: - do ioremap for SAS registers - allocate memory for interrupt names Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add scsi host registrationJohn Garry2-0/+150
Add functionality to register device as a scsi host. The SAS domain transport ops are empty at this point. Signed-off-by: John Garry <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2015-11-25hisi_sas: Add initial bare main driverJohn Garry6-0/+78
This patch adds the initial bare main driver for the HiSilicon SAS HBA. This only introduces the changes to build and load the main driver module. The complete driver consists of the core main module and also a module platform driver for driving the hw. The HBA is a platform device. Signed-off-by: John Garry <[email protected]> Signed-off-by: Zhangfei Gao <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>