summaryrefslogtreecommitdiff
path: root/drivers/scsi/pm8001/pm8001_sas.h
AgeCommit message (Collapse)Author
2021-04-15scsi: pm80xx: Remove global lock from outbound queue processingViswas G
Introduce spin lock for outbound queue. With this, driver need not acquire HBA global lock for outbound queue processing. Link: https://lore.kernel.org/r/20210415103352.3580-9-Viswas.G@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-04-15scsi: pm80xx: Completing pending I/O after fatal errorRuksar Devadi
When controller runs into fatal error, I/Os get stuck with no response, handler event is defined to complete the pending I/Os (SAS task and internal task) and also perform the cleanup for the drives. Link: https://lore.kernel.org/r/20210415103352.3580-7-Viswas.G@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Ashokkumar N <Ashokkumar.N@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-04-12scsi: pm8001: Clean up white spaceLuo Jiaxing
checkpatch reports the following: ERROR: space prohibited before that ',' (ctx:WxW) +int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb); Remove unnecessary whitespace. Link: https://lore.kernel.org/r/1617886593-36421-2-git-send-email-luojiaxing@huawei.com Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com> Signed-off-by: Jianqin Xie <xiejianqin@hisilicon.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-03-09scsi: pm80xx: Remove list entry from pm8001_ccb_infoIgor Pylypiv
List entry is not used. Link: https://lore.kernel.org/r/20210301181847.2893199-1-ipylypiv@google.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Igor Pylypiv <ipylypiv@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-01-13scsi: pm80xx: Check for fatal errorakshatzen
When the controller runs into a fatal error, commands get stuck due to no response. If the controller is in fatal error state, abort requests issued to the controller get stuck too. Check the controller state for fatal error conditions. Link: https://lore.kernel.org/r/20210109123849.17098-3-Viswas.G@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: akshatzen <akshatzen@google.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: Radha Ramachandran <radha@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-11-30scsi: pm8001: Convert pm8001_printk() to pm8001_info()Joe Perches
Use the more common logging style. [mkp: fixed a few conflicts] Link: https://lore.kernel.org/r/69dc34ff63adfa60b3f203ed2d58143b5692af57.1606192458.git.joe@perches.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-11-23scsi: pm8001: Make implicit use of pm8001_ha in pm8001_printk() explicitJoe Perches
Make the pm8001_printk() macro take an explicit HBA instead of assuming the existence of an unspecified pm8001_ha argument. Miscellanea: - Add pm8001_ha to the few uses of pm8001_printk() - Add HBA to the pm8001_dbg macro call to pm8001_printk() Link: https://lore.kernel.org/r/0e17a4c845f15e18f98b346ffb9b039584d21cdd.1605914030.git.joe@perches.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-11-23scsi: pm8001: Neaten debug logging macros and usesJoe Perches
Every PM8001_<FOO>_DBG macro uses an internal call to pm8001_printk. Convert all uses of: PM8001_<FOO>_DBG(hba, pm8001_printk(fmt, ...)) to pm8001_dbg(hba, <FOO>, fmt, ...) so the visual complexity of each macro is reduced. The repetitive macro definitions are converted to a single pm8001_dbg and the level is concatenated using PM8001_##level##_LOGGING for the specific level test. Done with coccinelle, checkpatch and a little typing of the new macro definition. Miscellanea: - Coalesce formats - Realign arguments - Add missing terminating newlines to formats - Remove trailing spaces from formats - Change defective loop with printk(KERN_INFO... to emit a 16 byte hex block to %p16h Link: https://lore.kernel.org/r/49f36a93af7752b613d03c89a87078243567fd9a.1605914030.git.joe@perches.com Reported-by: kernel test robot <lkp@intel.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-11-04scsi: pm80xx: Make running_req atomicViswas G
Incorrect value of the running_req was causing the driver unload to be stuck during the SAS lldd_dev_gone notification handling. During SATA I/O completion, for some error status values, the driver schedules the event handler and running_req is decremented from that. However, there are some other error status values (like IO_DS_IN_RECOVERY, IO_XFER_ERR_LAST_PIO_DATAIN_CRC_ERR) where the I/O has already been completed by fw/driver so running_req is not decremented. Also during NCQ error handling, driver itself will initiate READ_LOG_EXT and ABORT_ALL. When libsas/libata initiate READ_LOG_EXT (0x2F), driver increments running_req. This will be completed by the driver in pm80xx_chip_sata_req(), but running_req was not decremented. Link: https://lore.kernel.org/r/20201102165528.26510-3-Viswas.G@microchip.com.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-10-07scsi: pm80xx: Driver version updateViswas G
Update driver version from "0.1.39" -> "0.1.40" Link: https://lore.kernel.org/r/20201005145011.23674-5-Viswas.G@microchip.com.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-10-07scsi: pm80xx: Increase the number of outstanding I/O supported to 1024Viswas G
The pm80xx driver currently sets the controller queue depth to 256. Hoewver, the controller supports outstanding I/Os up 1024. Increase the number of outstanding I/Os from 256 to 1024. CCBs and tags are allocated according to outstanding I/Os. Also update the can_queue value (max_out_io - PM8001_RESERVE_SLOT) used by the SCSI midlayer. [mkp: fixed zeroday complaint] Link: https://lore.kernel.org/r/20201005145011.23674-4-Viswas.G@microchip.com.com Reported-by: kernel test robot <lkp@intel.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-10-07scsi: pm80xx: Increase number of supported queuesViswas G
Current driver uses fixed number of Inbound and Outbound queues and all of the I/O, TMF and internal requests are submitted through those. A global spin lock is used to control the shared access. This can create a lock contention and it is real bottleneck in the I/O path. To avoid this, the number of supported Inbound and Outbound queues is increased to 64, and the number of queues used is decided based on number of CPU cores online and number of MSI-X vectors allocated. Also add locks per queue instead of using the global lock. Link: https://lore.kernel.org/r/20201005145011.23674-2-Viswas.G@microchip.com.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-03-17scsi: pm80xx: Introduce read and write length for IOCTL payload structureViswas G
Removed the common length and introduce read and write length for IOCTL payload structure. [mkp: fixed SoB ordering] Link: https://lore.kernel.org/r/20200316074906.9119-7-deepak.ukey@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Viswas G <viswas.g@microchip.com> Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Radha Ramachandran <radha@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-03-17scsi: pm80xx: sysfs attribute for non fatal dumpDeepak Ukey
Added the sysfs attribute for non fatal log so that management utility can get the non fatal dump from driver. The non-fatal error is an error condition or abnormal behavior detected by the host, or detected and reported by the controller to the host.The non-fatal error does not stop the controller firmware and enables it to still respond to host requests. A typical example of a non-fatal error is an I/O timeout or an unusual error notification from the controller. Since the firmware is operational, the error dump information is pushed to host memory (by firmware) upon request from the host. Link: https://lore.kernel.org/r/20200316074906.9119-6-deepak.ukey@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Radha Ramachandran <radha@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-11-19scsi: pm80xx: Modified the logic to collect fatal dumpDeepak Ukey
Added the correct method to collect the fatal dump. Link: https://lore.kernel.org/r/20191114100910.6153-14-deepak.ukey@microchip.com Reported-by: kbuild test robot <lkp@intel.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-11-19scsi: pm80xx: Tie the interrupt name to the module instanceVikram Auradkar
With MSI-x enabled, the interrupt instances are <prefix><index> where the prefix is fixed for all module instances, making it a little harder to track down what's what. Link: https://lore.kernel.org/r/20191114100910.6153-13-deepak.ukey@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Vikram Auradkar <auradkar@google.com> Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-11-19scsi: pm80xx: Do not request 12G sas speedspeter chang
Occasionally, 6G capable drives fail to train at 6G on links that look good from a signal-integrity perspective. PMC suggests configuring the port to not even expect 12G. Link: https://lore.kernel.org/r/20191114100910.6153-11-deepak.ukey@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: peter chang <dpf@google.com> Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-11-19scsi: pm80xx: Fix command issue sizingpeter chang
The commands to the controller are sent in fixed sized chunks which are set per-chip-generation and stashed in iomb_size. The driver fills in structs matching the register layout and memcpy this to memory shared with the controller. However, there are two problem cases: 1) Things like phy_start_req are too large because they share the sas_identify_frame definition with libsas, and it includes the crc word. This means that it's overwriting the start of the next command block, that's ok except if it happens at the end of the shared memory area. 2) Things like set_nvm_data_req which are shared between the HAL layers. This means that it's sending 'random' data for things that are in the reserved area. So far we haven't found a case where the controller FW cares, but sending possible gibberish (for most of the structures this is in the reserved area so previously zeroed) is not recommended. Link: https://lore.kernel.org/r/20191114100910.6153-9-deepak.ukey@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: peter chang <dpf@google.com> Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-11-19scsi: pm80xx: Squashed logging cleanup changespeter chang
The default logging doesn't include the device name, so it's difficult to determine which controller is being logged about in error scenarios. The logging level was only settable via sysfs, which made it inconvenient for actual debugging. This changes the default to only cover error handling. Link: https://lore.kernel.org/r/20191114100910.6153-6-deepak.ukey@microchip.com Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: peter chang <dpf@google.com> Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-06-20scsi: libsas: aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()John Garry
Many times in libsas, and in LLDDs which use libsas, the check for an expander device is re-implemented or open coded. Use dev_is_expander() instead. We rename this from sas_dev_type_is_expander() to not spill so many lines in referencing. Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03scsi: pm8001: fix spelling mistake, interupt -> interruptColin Ian King
Rename the functions pm8001_chip_is_our_interupt, pm80xx_chip_is_our_interupt and function pointer is_our_interrupt to fix spelling mistakes. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-11scsi: pm80xx: Update driver version to 0.1.39Deepak Ukey
Updated the driver version from 0.1.38 to 0.1.39. Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-11scsi: pm80xx: Fixed system hang issue during kexec bootDeepak Ukey
When the firmware is not responding, execution of kexec boot causes a system hang. When firmware assertion happened, driver get notified with interrupt vector updated in MPI configuration table. Then, the driver will read scratchpad register and set controller_fatal_error flag to true. Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-10-18scsi: pm80xx: corrected SATA abort handling sequence.Viswas G
Modified SATA abort handling with following steps: 1) Set device state as recovery. 2) Send phy reset. 3) Wait for reset completion. 4) After successful reset, abort all IO's to the device. 5) After aborting all IO's to device, set device state as operational. Signed-off-by: Deepak Ukey <deepak.ukey@microsemi.com> Signed-off-by: Viswas G <Viswas.G@microsemi.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-10-18scsi: pm80xx: ILA and inactive firmware version through sysfsViswas G
Added support to read ILA version and inactive firmware version from MPI configuration table and export through sysfs. Signed-off-by: Deepak Ukey <deepak.ukey@microsemi.com> Signed-off-by: Viswas G <Viswas.G@microsemi.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-02-06scsi: pm8001: switch to pci_irq_alloc_vectorsChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-11-02pm80xx: set PHY profiles for ATTO 12Gb SAS controllersBenjamin Rood
PHY profiles are not saved in NVRAM on ATTO 12Gb SAS controllers. Therefore, in order for the controller to function in a wide range of configurations, the PHY profiles must be statically set. This patch provides the necessary functionality to do so. Signed-off-by: Benjamin Rood <brood@attotech.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-11-02pm80xx: add support for PMC Sierra 8070 and PMC Sierra 8072 SAS controllersBenjamin Rood
These SAS controllers support speeds up to 12Gb. Signed-off-by: Benjamin Rood <brood@attotech.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-08-26pm80xx: Bump pm80xx driver version to 0.1.38Viswas G
Bump pm80xx driver version to 0.1.38. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-08-26pm80xx: Add PORT RECOVERY TIMEOUT supportViswas G
PORT RECOVERY TIMEOUT is the maximum time between the controller's detection of the PHY down until the receipt of the ID_Frame (from the same remote SAS port). If the time expires before the ID_FRAME is received, the port is considered INVALID and can be removed. The IOP_EVENT_PORT_RECOVERY_TIMER_TMO event is reported following the IOP_EVENT_ PHY_DOWN event when the PHY/port does not recover after Port Recovery Time. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-08-26pm80xx: Corrected device state changes in I_T_Nexus_Reset.Viswas G
In Nexus reset the device state request are not needed. Signed-off-by: Viswas G <Viswas.G@pmcs.com> Reviewed-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2014-11-27libsas: remove task_collector modeChristoph Hellwig
The task_collector mode (or "latency_injector", (C) Dan Willians) is an optional I/O path in libsas that queues up scsi commands instead of directly sending it to the hardware. It generall increases latencies to in the optiomal case slightly reduce mmio traffic to the hardware. Only the obsolete aic94xx driver and the mvsas driver allowed to use it without recompiling the kernel, and most drivers didn't support it at all. Remove the giant blob of code to allow better optimizations for scsi-mq in the future. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: Dan Williams <dan.j.williams@intel.com>
2014-07-25pm8001: add a new spinlock to protect the CCBTomas Henzl
Patch adds a new spinlock to protect the ccb management. It may happen that concurrent threads become the same tag value from the 'alloc' function', the spinlock prevents this situation. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Acked-by: Jack Wang <xjtuwjp@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-07-25pm8001: clean bitmap management functionsTomas Henzl
In the driver two different functions are used to free the same resource, this patch makes the code easier to read. In addittion to that, some minor optimisations were made too. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Acked-by: Jack Wang <xjtuwjp@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-03-15[SCSI] pm80xx: Spinlock fixSuresh Thiagarajan
spin_lock_irqsave for the HBA lock is called in one function where flag is local to that function. Another function is called from the first function where lock has to be released using spin_unlock_irqrestore for calling task_done of libsas. In the second function also flag is declared and used. For calling task_done there is no need to enable the irq. So instead of using spin_lock_irqsave and spin_unlock_irqrestore, spin_lock and spin_unlock is used now. This also avoids passing the flags across all the functions where HBA lock is being used. Also removed redundant code. Reported-by: Jason Seba <jason.seba42@gmail.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Signed-off-by: Viswas G <viswas.g@pmcs.com> Acked-by: Jack Wang <xjtuwjp@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-12-02[SCSI] pm80xx: Tasklets synchronization fix.Nikith Ganigarakoppal
When multiple vectors are used, the vector variable is over written, resulting in unhandled operation for those vectors. This fix prevents the problem by maitaining HBA instance and vector values for each irq. [jejb: checkpatch fixes] Signed-off-by: Nikith.Ganigarakoppal@pmcs.com Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] pm80xx: Firmware logging support.Anand Kumar Santhanam
Supports below logging facilities, Inbound outbound queues dump. Non fatal dump in case of IO failures. Fatal dump in case of firmware failure. [jejb: checkpatch spacing fixes] Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] pm80xx: Phy settings support for motherboard controller.Anand Kumar Santhanam
Phy profile implementation to support phy settings feature for motherboard controllers. [jejb: checkpatch fixes] Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-10-25[SCSI] pm80xx: Device id changes to support series 8 controllers.Anand Kumar Santhanam
Updated pci id table with device, vendor, subdevice and subvendor ids for 8074, 8076, 8077 SAS/SATA 12G controllers. Added 12G related macros. Signed-off-by: Anandkumar.Santhanam@pmcs.com Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] sas: unify the pointlessly separated enums sas_dev_type and ↵James Bottomley
sas_device_type These enums have been separate since the dawn of SAS, mainly because the latter is a procotol only enum and the former includes additional state for libsas. The dichotomy causes endless confusion about which one you should use where and leads to pointless warnings like this: drivers/scsi/mvsas/mv_sas.c: In function 'mvs_update_phyinfo': drivers/scsi/mvsas/mv_sas.c:1162:34: warning: comparison between 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare] Fix by eliminating one of them. The one kept is effectively the sas.h one, but call it sas_device_type and make sure the enums are all properly namespaced with the SAS_ prefix. Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] pm80xx: thermal, sas controller config and error handling updateSakthivel K
Modified thermal configuration to happen after interrupt registration Added SAS controller configuration during initialization Added error handling logic to handle I_T_Nexus errors and variants [jejb: fix up tabs and spaces issues] Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] pm80xx: NCQ error handling changesSakthivel K
Handled NCQ errors in the low level driver as the FW is not providing the faulty tag for NCQ errors for libsas to recover. [jejb: fix checkpatch issues] Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] pm80xx: Changed module name and debug messages updateSakthivel K
Changed name in driver to pm80xx. Updated debug messages. Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant ↵Sakthivel K
changes in common files Implementation of SPCv/ve specific hardware functionality and macros. Changing common functionalities wrt SPCv/ve operations. Conditional checks for SPC specific operations. Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] pm80xx: MSI-X implementation for using 64 interruptsSakthivel K
Implementation of interrupt handlers and tasklets to support upto 64 interrupt for the device. Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] pm80xx: Updated common functions common for SPC and SPCv/veSakthivel K
Update of function prototype for common function to SPC and SPCv/ve. Multiple queues implementation for IO. Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-10[SCSI] pm80xx: Added SPCv/ve specific ids, variables and modify for SPCSakthivel K
Updated pci id table with device, vendor, subdevice and subvendor ids for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related macros. Updated macros, hba info structure and other structures for SPCv/ve. Update of structure and variable names for SPC hardware functionalities. Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] pm8001: deficient responses to IO_XFER_ERROR_BREAK and ↵Mark Salyzyn
IO_XFER_OPEN_RETRY_TIMEOUT IO_XFER_ERROR_BREAK and IO_XFER_OPEN_RETRY_TIMEOUT are deficient of the required actions as outlined in the programming manual for the pm8001. Due to the overlapping code requirements of these recovery responses, we found it necessary to bundle them together into one patch. When a break is received during the command phase (ssp_completion), this is a result of a timeout or interruption on the bus. Logic suggests that we should retry the command. When a break is received during the data-phase (ssp_event), the task must be aborted on the target or it will retain a data-phase lock turning the target reticent to all future media commands yet will successfully respond to TUR, INQUIRY and ABORT leading eventually to target failure through several abort-cycle loops. The open retry interval is exceedingly short resulting in occasional target drop-off during expander resets or when targets push-back during bad-block remapping. Increased effective timeout from 130ms to 1.5 seconds for each try so as to trigger after the administrative inquiry/tur timeout in the scsi subsystem to keep error-recovery harmonics to a minimum. When an open retry timeout event is received, the action required by the targets is to issue an abort for the outstanding command then logic suggests we retry the command as this state is usually an indication of a credit block or busy condition on the target. We hijacked the pm8001_handle_event work queue handler so that it will handle task as an argument instead of device for the workers in support of the deferred handling outlined above. Moderate to Heavy bad-path testing on a 2.6.32 vintage kernel, compile-testing on scsi-misc-2.6 kernel ... Signed-off-by: Mark Salyzyn <mark_salyzyn@xyratex.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19[SCSI] pm8001: Add FUNC_GET_EVENTSMark Salyzyn
Jack noticed I dropped a patch fragment associated with a flags automatic variable in mpi_set_phys_g3_with_ssc (ooops) and that the pre-emptive locking that piggy-backed this patch was not in-fact necessary because of underlying atomic accesses to the hardware. Here is the updated patch fixing these two issues. The pm8001 driver is missing the FUNC_GET_EVENTS handler in the phy control function. Since the pm8001_bar4_shift function was not designed to be called at runtime, added locking surrounding the adjustment for all accesses. Signed-off-by: Mark Salyzyn <mark_salyzyn@xyratex.com> Acked-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-02[SCSI] pm8001: remove pm8001_slave_{alloc|configure}Dan Williams
libsas handles: 1/ limiting ata scanning to lun0 2/ changes to /sys/block/<sdX>/device/queue_depth for ata devices libata handles turning off ncq globally via kernel command line (libata.force=noncq) or sysfs (echo 1 > /sys/block/<sdX>/device/queue_depth). A lldd specific compile option is not necessary. Cc: Jack Wang <jack_wang@usish.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>