- 12 Nov, 2016 4 commits
-
-
Kiwoong Kim authored
Some UFS host controller may need to configure some things around hibern8 enter/exit Signed-off-by:
Kiwoong Kim <kwmad.kim@samsung.com> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Kiwoong Kim authored
Some UFS host controller may need to configure some things before any task management request is issued Signed-off-by:
Kiwoong Kim <kwmad.kim@samsung.com> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Kiwoong Kim authored
Some UFS host controller may need to configure some things before any transfer request is issued. Signed-off-by:
Kiwoong Kim <kwmad.kim@samsung.com> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
This patch converts over hpsa to use the pci_alloc_irq_vectors including the PCI_IRQ_AFFINITY flag that automatically assigns spread out irq affinity to the I/O queues. It also cleans up the per-ctrl interrupt state due to the use of the pci_irq_vector and pci_free_irq_vectors helpers that don't need to know the exact irq type. Additionally it changes a little oddity in the existing code that was using different array indixes into the per-vector arrays depending on whether a controller is using a single INTx or single MSI irq. [mkp: fixed typo] Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Don Brace <don.brace@microsemi.com> Tested-by:
Don Brace <don.brace@microsemi.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 09 Nov, 2016 1 commit
-
-
Chanwoo Choi authored
This patch uses the resource-managed to add the devfreq device. This function will make it easy to handle the devfreq device. - struct devfreq *devm_devfreq_add_device(struct device *dev, struct devfreq_dev_profile *profile, const char *governor_name, void *data); Cc: Vinayak Holikatti <vinholikatti@gmail.com> Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Signed-off-by:
Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- 08 Nov, 2016 35 commits
-
-
Colin Ian King authored
Trivial fix to spelling mistake "operatio" to "operation" in critical error message Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Colin Ian King authored
Trivial fixes, minor spelling mistakes in comments and in a KERN_INFO message. [mkp: fixed spelling mistake in patch description] Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
Host is allocated by managed kmalloc (devm_kmalloc). The memory allocated with this function is automatically freed on driver detach. So, no need to make an exclusive free call over it. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
Do a phy_exit() over the ufs phy in the ufs qcom exit path to de-initialize the phy. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
The common layer phy exit callback ufs_qcom_phy_exit() calls phy_power_off() that has no meaning when phy_power_off() callback is already registered with the phy provider and the consumer makes use of the same. Instead, add a no-op specific phy_exit() callback for now to add the exit sequence at a later point. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
Add phy clock enable code to phy_power_on/off callbacks, and remove explicit calls to enable these phy clocks from the ufs-qcom hcd driver. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
The phy init is meant to do phy initialization rather than just getting the clock and regulator. Move these clock and regulator get to probe(), to make room for actual phy initialization sequence. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
Move the functions' definitions to remove unnecessary declarations. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
remove() callback does a phy_power_off() only over the phy, and nothing else now. The phy_power_off() over the generic phy is called from the phy consumer, and phy provider driver should not explicitly need to call any phy ops. So discard the remove callback for qcom-ufs phy platform drivers. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
The tx_iface_clk and rx_iface_clk no longer exist with UFS Phy present on msm8996. So skip obtaining these clocks using compatible match. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
Add a new compatible string for 14nm ufs phy present on msm8996 chipset. This phy is bit different from the legacy 14nm ufs phy in terms of the clocks that are needed to be handled in the driver. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
Different menthods pass around generic phy pointer to extract device pointer. Instead, pass the device pointer directly between function calls. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
This helps us in avoiding any requirement for kfree() operation to be called exclusively over the allocated string pointer. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Vivek Gautam authored
BUG_ON() are not preferred in the driver, plus the variable on which BUG_ON is asserted is already checked in the code before passing. Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Kashyap Desai authored
Signed-off-by:
Sumit Saxena <sumit.saxena@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Kashyap Desai authored
scsi: megaraid_sas: Do not set MPI2_TYPE_CUDA for JBOD FP path for FW which does not support JBOD sequence map CC: stable@vger.kernel.org Signed-off-by:
Sumit Saxena <sumit.saxena@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Kashyap Desai authored
Update MEGARAID drivers maintainers list. Signed-off-by:
Sumit Saxena <sumit.saxena@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Kashyap Desai authored
Until now the megaraid_sas driver has reported successful completion on SYNCHRONIZE_CACHE commands without sending them down to the controller. The controller firmware has been responsible for taking care of flushing disk caches for all drives that belong to a Virtual Disk at the time of system reboot/shutdown. There may have been a reason to avoid sending SYNCHRONIZE_CACHE to a VD in the past but that no longer appears to be valid. Older versions of MegaRaid firmware (Gen2 and Gen2.5) set the WCE bit for Virtual Disks but the firmware does not report correct completion status for a SYNCHRONIZE_CACHE command. As a result, we must use another method to identify whether it is safe to send the command to the controller. We use the canHandleSyncCache firmware flag in the scratch pad register at offset 0xB4. New SYNCHRONIZE_CACHE behavior: IF 'JBOD' Driver sends SYNCHRONIZE_CACHE command to the firmware Firmware sends SYNCHRONIZE_CACHE to drive Firmware obtains status from drive and returns same status back to driver ELSEIF 'VirtualDisk' IF firmware supports new API bit called canHandleSyncCache Driver sends SYNCHRONIZE_CACHE command to the firmware Firmware does not send SYNCHRONIZE_CACHE to drives Firmware returns SUCCESS ELSE Driver does not send SYNCHRONIZE_CACHE command to the firmware Driver return SUCCESS for that command ENDIF ENDIF [mkp: edited patch description] Signed-off-by:
Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by:
Sumit Saxena <sumit.saxena@broadcom.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Ewan D. Milne <emilne@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
Which cleans up a lot of the MSI-X handling, and allows us to use the PCI IRQ layer provided vector mapping, which we can then expose to blk-mq. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Acked-by:
Don Brace <don.brace@microsemi.com> Tested-by:
Don Brace <don.brace@microsemi.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
Just hand through the blk-mq map_queues method in the host template. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
This will allow SCSI to have a single blk_mq_ops structure that either lets the LLDD map the queues to PCIe MSIx vectors or use the default. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by:
Sagi Grimberg <sagi@grimberg.me> Reviewed-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Subhash Jadavani authored
When we are resuming the UFS device rails in HPM mode, we are first powering on the VCC rail while VCCQ and VCCQ2 rails still being in LPM mode. Some UFS devices may take VCC on event as hint that host wants UFS device to be resumed and may start drawing more power from the VCCQ/VCCQ2 rails (while they are still in LPM mode) causing voltage drop on these rails. This change fixes this issue by bringing VCCQ & VCCQ2 rails out of LPM before powering on VCC rail. Reviewed-by:
Venkat Gopalakrishnan <venkatg@codeaurora.org> Signed-off-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Subhash Jadavani authored
Currently clock scaling is suspended only after the host and device are put in low power mode but we should avoid clock scaling running after UFS link is put in low power mode (hibern8). This change suspends clock scaling before putting host/device in low power mode. Reviewed-by:
Sahitya Tummala <stummala@codeaurora.org> Signed-off-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Subhash Jadavani authored
If ufshcd pltfrm/pci driver's probe fails for some reason then ensure that scsi host is released to avoid memory leak but managed memory allocations (via devm_* calls) need not to be freed explicitly on probe failure as memory allocated with these functions is automatically freed on driver detach. Reviewed-by:
Sahitya Tummala <stummala@codeaurora.org> Signed-off-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Subhash Jadavani authored
UFS devfreq clock scaling work may require clocks to be ON if it need to execute some UFS commands hence it may request for clock hold before issuing the command. But if UFS clock gating work is already running in parallel, ungate work would end up waiting for the clock gating work to finish and as clock gating work would also wait for the clock scaling work to finish, we would enter in deadlock state. Here is the call trace during this deadlock state: Workqueue: devfreq_wq devfreq_monitor __switch_to __schedule schedule schedule_timeout wait_for_common wait_for_completion flush_work ufshcd_hold ufshcd_send_uic_cmd ufshcd_dme_get_attr ufs_qcom_set_dme_vs_core_clk_ctrl_clear_div ufs_qcom_clk_scale_notify ufshcd_scale_clks ufshcd_devfreq_target update_devfreq devfreq_monitor process_one_work worker_thread kthread ret_from_fork Workqueue: events ufshcd_gate_work __switch_to __schedule schedule schedule_preempt_disabled __mutex_lock_slowpath mutex_lock devfreq_monitor_suspend devfreq_simple_ondemand_handler devfreq_suspend_device ufshcd_gate_work process_one_work worker_thread kthread ret_from_fork Workqueue: events ufshcd_ungate_work __switch_to __schedule schedule schedule_timeout wait_for_common wait_for_completion flush_work __cancel_work_timer cancel_delayed_work_sync ufshcd_ungate_work process_one_work worker_thread kthread ret_from_fork This change fixes this deadlock by doing this in devfreq work (devfreq_wq): Try cancelling clock gating work. If we are able to cancel gating work or it wasn't scheduled, hold the clock reference count until scaling is in progress. If gate work is already running in parallel, let's skip the frequecy scaling at this time and it will be retried once next scaling window expires. Reviewed-by:
Sahitya Tummala <stummala@codeaurora.org> Signed-off-by:
Subhash Jadavani <subhashj@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
Use le16_to_cpu only for accessing two byte data provided by controller. Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
Support Atomic Request Descriptors for Ventura/SAS35 devices. Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
An UNMAP command on a PI formatted device will leave the Logical Block Application Tag and Logical Block Reference Tag as all F's (for those LBAs that are unmapped). To avoid IO errors if those LBAs are subsequently read before they are written with valid tag fields, the MPI SCSI IO requests need to set the EEDPFlags element EEDP Escape Mode field, Bits [7:6] appropriately. A value of 2 should be set to disable all PI checks if the Logical Block Application Tag is 0xFFFF for PI types 1 and 2. A value of 3 should be set to disable all PI checks if the Logical Block Application Tag is 0xFFFF and the Logical Block Reference Tag is 0xFFFFFFFF for PI type 3. Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
For SAS35 devices MSIX vectors are inceased to 128 from 96. To support this Reply post host index register count is increased to 16. Also variable msix96_vector is replaced with combined_reply_queue and variable combined_reply_index_count is added to set different values for SAS3 and SAS35 devices. Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
Added Device ID's for SAS35 devices (Ventura, Crusader, Harpoon & Tomcat) and updated mpi header file for the same. Also added "is_gen35_ioc" to MPT3SAS_ADAPTER structure for identifying SAS35 adapters. Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
Removing macro "MPT_DEVICE_TLR_ON" defined in header file as its unused Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
When device missing event arrives, device_remove_in_progress bit will be set and hence driver has to stop sending IOCTL commands.Now the check has been added in IOCTL path to test device_remove_in_progress bit is set, if so then IOCTL will be failed printing failure message. Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Suganath Prabu Subramani authored
scsi: mpt3sas: Fix for incorrect numbers for MSIX vectors enabled when non RDPQ card is enumerated first. No. of MSIX vectors supported = min (Total no. of CPU cores, MSIX vectors supported by card) when RDPQ is disabled "max_msix_vectors" module parameter which was declared as global was set to '8' and hence if there are more than one card in system among which if RDPQ disabled card is enumerated first then only 8 MSIX vectors was getting enabled for all the cards(including RDPQ enabled card,which can support more than 8 MSIX vectors). Used local variable instead of global variable ,if RDPQ is disabled this local variable is set to '8' else it is set to "max_msix_vectors" (by default this is set to -1, whose value can be set by user during driver load time).So now regardless of whether RDPQ disabled card is enumerated first or RDPQ enabled card is enumerated first , MSIX vectors enabled depends on the cards capability. Signed-off-by:
Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by:
Sathya Prakash <sathya.prakash@broadcom.com> Signed-off-by:
Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Reviewed-by:
Hannes Reinecke <hare@suse.com> Reviewed-by:
Tomas Henzl <thenzl@redhat.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-