aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-10-01ufs: Active Power Mode - configuring bActiveICCLevelYaniv Gardi3-0/+165
The maximum power consumption in active is determined by bActiveICCLevel. The configuration is done by reading max current supported by the regulators connected to VCC, VCCQ and VCCQ2 rails on the boards, and reading the current consumption levels from the device for each rails (vcc/vccq/vccq2) using power descriptor. We configure the bActiveICCLevel attribute, with the max value that correspond to the minimum-of(VCC-current-level,VCCQ-current-level, VCCQ2-current-level). In order to minimize resume latency, pre-fetch icc levels and reference clock during initialization and avoid reading them each link startup during resume. Signed-off-by: Raviv Shvili <[email protected]> Signed-off-by: Yaniv Gardi <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01ufs: improve init sequenceSujit Reddy Thumma2-28/+75
In ->hce_enable_notify() callback the vendor specific initialization may carry out additional DME configuration using UIC commands and hence the UIC command completion interrupt enable bit should be set before the post reset notification. Add retries if the link-startup fails. This is required since due to hardware timing issues, the Uni-Pro link-startup might fail. The UFS HCI recovery procedure contradicts the Uni-Pro sequence. The UFS HCI specifies to resend DME_LINKSTARTUP command after IS.ULLS (link-lost interrupt) is received. The Uni-Pro specifies that if link-startup fails the link is in "down" state. The link-lost is indicated to the DME user only when the link is up. Hence, the UFS HCI recovery procedure of waiting for IS.ULLS and retrying link-startup may not work properly. At the end, if detection fails, power off (disable clocks, regulators, phy) if the UFS device detection fails. This saves power while UFS device is not embedded into the system. Signed-off-by: Sujit Reddy Thumma <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01ufs: refactor query descriptor API supportSubhash Jadavani2-39/+153
Currently reading query descriptor is more tightened to each descriptor type. This patch generalize the approach and allows reading any parameter from any query descriptor. Signed-off-by: Subhash Jadavani <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01ufs: add voting support for host controller powerRaviv Shvili4-2/+54
Add the support for voting of the regulator powering the host controller logic. Signed-off-by: Raviv Shvili <[email protected]> Signed-off-by: Subhash Jadavani <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01ufs: Add clock initialization supportSujit Reddy Thumma5-3/+192
Add generic clock initialization support for UFSHCD platform driver. The clock info is read from device tree using standard clock bindings. A generic max-clock-frequency-hz property is defined to save information on maximum operating clock frequency the h/w supports. Signed-off-by: Sujit Reddy Thumma <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01ufs: Add regulator enable supportSujit Reddy Thumma5-3/+342
UFS devices are powered by at most three external power supplies - - VCC - The flash memory core power supply, 2.7V to 3.6V or 1.70V to 1.95V - VCCQ - The controller and I/O power supply, 1.1V to 1.3V - VCCQ2 - Secondary controller and/or I/O power supply, 1.65V to 1.95V For some devices VCCQ or VCCQ2 are optional as they can be generated using internal LDO inside the UFS device. Add DT bindings for voltage regulators that can be controlled from host driver. Signed-off-by: Sujit Reddy Thumma <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01ufs: Allow vendor specific initializationSujit Reddy Thumma4-38/+194
Some vendor specific controller versions might need to configure vendor specific - registers, clocks, voltage regulators etc. to initialize the host controller UTP layer and Uni-Pro stack. Provide some common initialization operations that can be used to configure vendor specifics. The methods can be extended in future, for example, for power mode transitions. The operations are vendor/board specific and hence determined with the help of compatible property in device tree. Signed-off-by: Sujit Reddy Thumma <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01scsi: don't add scsi_device if its already visibleSubhash Jadavani1-0/+3
If LLD has added scsi device (by calling scsi_add_device) before scheduling async scsi_scan_host then scsi_finish_async_scan() will end up calling scsi_sysfs_add_sdev for scsi device which was already added by LLD. This patch fixes this issue by skipping the call to scsi_sysfs_add_sdev() if it's already visible to rest of the kernel. Signed-off-by: Subhash Jadavani <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-10-01scsi: fix the type for well known LUsSubhash Jadavani2-0/+14
Some devices may respond with wrong type for well-known logical units. This patch forces well-known type for devices which doesn't report it correct. Signed-off-by: Subhash Jadavani <[email protected]> Signed-off-by: Sujit Reddy Thumma <[email protected]> Signed-off-by: Dolev Raviv <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-30scsi_debug: deadlock between completions and surprise module removalDouglas Gilbert1-14/+19
A deadlock has been reported when the completion of SCSI commands (simulated by a timer) was surprised by a module removal. This patch removes one half of the offending locks around timer deletions. This fix is applied both to stop_all_queued() which is were the deadlock was discovered and stop_queued_cmnd() which has very similar logic. This patch should be applied both to the lk 3.17 tree and Christoph's drivers-for-3.18 tree. Tested-and-reported-by: Milan Broz <[email protected]> Signed-off-by: Douglas Gilbert <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-30be2iscsi: check ip buffer before copyingMike Christie1-5/+8
Dan Carpenter found a issue where be2iscsi would copy the ip from userspace to the driver buffer before checking the len of the data being copied: http://marc.info/?l=linux-scsi&m=140982651504251&w=2 This patch just has us only copy what we the driver buffer can support. Cc: <[email protected]> Tested-by: John Soni Jose <[email protected]> Signed-off-by: Mike Christie <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-30iscsi_tcp: export port being usedMike Christie2-2/+9
This just has iscsi_tcp support ISCSI_PARAM_LOCAL_PORT which exports the local port being used by the iscsi connection. Signed-off-by: Mike Christie <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-30be2iscsi : Bump the driver versionJohn Soni Jose1-1/+1
Bump the driver version Signed-off-by: John Soni Jose <[email protected]> Signed-off-by: Jayamohan Kallickal <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-30be2iscsi : Fix kernel panic during reboot/shutdownJohn Soni Jose1-1/+1
In the reboot/shutdown path, workqueue was destroyed after the adapter resource were freed. The task associated with workqueue was getting executed after resources were freed. This lead to kernel panic. Signed-off-by: John Soni Jose <[email protected]> Signed-off-by: Jayamohan Kallickal <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-30libfc: Replace rcu_assign_pointer() with RCU_INIT_POINTER()Andreea-Cristina Bernat1-2/+2
The uses of "rcu_assign_pointer()" are NULLing out the pointers. According to RCU_INIT_POINTER()'s block comment: "1. This use of RCU_INIT_POINTER() is NULLing out the pointer" it is better to use it instead of rcu_assign_pointer() because it has a smaller overhead. The following Coccinelle semantic patch was used: @@ @@ - rcu_assign_pointer + RCU_INIT_POINTER (..., NULL) Signed-off-by: Andreea-Cristina Bernat <[email protected]> Acked-by: Vasu Dev <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-30fcoe: extend ethtool to FC port speed mappingChris Leech1-6/+33
add support for 20 Gbit and 40 Gbit links Signed-off-by: Chris Leech <[email protected]> Signed-off-by: Vasu Dev <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-26ipr: fix compile failureChristoph Hellwig1-1/+1
Fix a typo in the IPR_IOASC_HW_CMD_FAILED declaration. Based on a patch from Wen Xiong <[email protected]>. Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Add memory barrier before ringing doorbell.Himanshu Madhani1-0/+16
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Add flags for tracing the target commands.Saurav Kashyap3-4/+74
Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Fix hang due to cmd_kref not decrementingQuinn Tran2-12/+7
Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Do not send SS_RESIDUAL_UNDER with SAM_STAT_BUSYHimanshu Madhani1-6/+0
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Add support for QFull throttling and Term Exchange retryQuinn Tran5-8/+316
Through the qla target code, the qlt_send_term_exchange() routine is used in various different places to cleanup an exchange. For the case of IOCB request queue is full, the exchange is left unhandled/ dangling. Existing code does not have re-try logic to cleanup the exchange. This patch add retry logic to cleanup the exchange before letting new commands through. For the case of FW running out of exchanges, driver need to reply SAM_STAT_BUSY to the initiators. This patch add a pending queue for the busy reply in case IOCB queue is unable to handle the cmd. Cc: <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Increase the request queue size to 8K for ISP2031Saurav Kashyap2-1/+2
Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Host reset handling in ABTS path.Arun Easi1-0/+2
ABTS path takes path similar to regular task management, but reset_count was not initialized when allocating mcmd causing the response to get dropped in qlt_xmit_tm_rsp. Fix this by initializing reset_count correctly. Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Handle chip reset in target mode.Arun Easi6-3/+72
A chip reset can occur after driver submits command to the stack. Abort command processing if a chip reset has occurred or in progress when you get a follow up for a command. Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Add Host reset handling in target mode.Arun Easi4-1/+78
Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: fix crash due to task mgmt cmd typeHimanshu Madhani1-2/+7
tcm_qla2xxx_get_task_tag incorrectly assume command is qla_tgt_cmd. Add check to see if it's a scsi cmd or task mgmt command. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Add counter for messageSaurav Kashyap1-5/+5
Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Enable SLER conditionally in target mode.Arun Easi1-4/+19
Sequence level error recovery (aka FC Tape) is not really required for disk devices. On heavily loaded system, with slow turn around, a bunch of status enquiries using REC puts additional burden to the target, so just turn off SLER by default. Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Remove verbose messages in target mode.Arun Easi1-138/+16
Turning logging bits for target mode ON dumps quite a lot verbose messages, remove those and change some of the IO path logging to use IO bits. Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Increase room in request queue for sending priority packetsHimanshu Madhani1-2/+2
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Use correct offset to req-q-out for reserve calculationArun Easi1-3/+1
Cc: <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: fix kernel NULL pointer accessHimanshu Madhani1-0/+1
This patch is to fix regression added by commit id 51a07f84649d2be206c4c2ad9a612956db0c2f8c. When allocating memory for new session original patch does not assign vha to op->vha resulting into NULL pointer access during qlt_create_sess_from_atio(). Cc: <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Fix sparse warnings in tcm_qla2xxx.cHimanshu Madhani1-6/+6
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Update the driver version to 8.07.00.16-k.Saurav Kashyap1-1/+1
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Fix sparse warning in qla_iocb.c file.Joe Carnuccio1-1/+1
Signed-off-by: Joe Carnuccio <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Move warning message to debug level.Sawan Chandak1-1/+1
Signed-off-by: Sawan Chandak <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Fail adapter initialization on load ram failure.Chad Dupuis1-2/+2
If we fail to load one of the segments of firmware fail the operation instead of trying to continue which will lead to a system crash since the pointers to the next segment will not be updated correctly. Signed-off-by: Chad Dupuis <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Disable PCI device in shutdown handler.Chad Dupuis1-0/+3
Disable the PCI device during shutdown to prevent any races with other PCI code such as the AER handling code. Signed-off-by: Chad Dupuis <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Mark port lost when we receive an RSCN for it.Chad Dupuis1-1/+16
Signed-off-by: Chad Dupuis <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Restore WWPN in case of Loop Dead.Himanshu Madhani4-3/+18
For FA-WWPN capable device, ISP2031 and ISP27XX, when loop dead is detected by a driver, restore WWPN from NVRAM. Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Honor FCP_RSP retry delay timer field.Chad Dupuis5-1/+32
Parse the retry delay timer field from the FCP response data and if: - It is not zero - The SCSI status is busy or queue full return SCSI_MLQUEUE_TARGET_BUSY for the number of milliseconds specified in the retry delay timer field. Signed-off-by: Chad Dupuis <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Add missing ISP27xx checks to optrom code.Alex Vechersky2-2/+3
Signed-off-by: Alex Vechersky <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Force use of mailbox interface for flash access commands for ISP27xx.Chad Dupuis1-1/+3
Signed-off-by: Chad Dupuis <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Free sysfs attributes for ISP27xx.Nigel Kirkland1-0/+2
Signed-off-by: Nigel Kirkland <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Disable laser for ISP2031 while unloading driver.Himanshu Madhani3-1/+37
Nameserver data on FC switch is not refreshed when qla2xxx driver is unloaded. Disabling laser for ISP2031 will force FC switch to rescan ports and clear fdmi entries from Nameserver. Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Enable diagnostic port using NVRAM parameters.Himanshu Madhani2-0/+5
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Declaration error cause stack corruption.Quinn Tran1-1/+1
Declaration error of mb array in qla2x00_iidma_fcport cause data to be written beyond the array. This ends up causing stack corruption. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Add fix in driver unload for pending activity.Sawan Chandak1-2/+4
Signed-off-by: Sawan Chandak <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2014-09-25qla2xxx: Unload of qla2xxx driver crashes the machine.Arun Easi1-2/+2
Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>