- 11 Feb, 2022 9 commits
-
-
Xiang Chen authored
The callers of function sas_discover_event() do not check its return value. The function also only ever returns 0, so use void instead. Link: https://lore.kernel.org/r/1644561778-183074-2-git-send-email-chenxiang66@hisilicon.comReviewed-by: John Garry <john.garry@huawei.com> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Julia Lawall authored
Pci_driver probe functions aren't called with locks held and thus don't need GFP_ATOMIC. Use GFP_KERNEL instead. Problem found with Coccinelle. Link: https://lore.kernel.org/r/20220210204223.104181-9-Julia.Lawall@inria.frSigned-off-by: Julia Lawall <Julia.Lawall@inria.fr> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Don Brace authored
Driver added a new dev_pm_ops structure used only if CONFIG_PM is set. The CONFIG_PM MACRO needed to be moved up in the code to avoid the compiler warnings. The hunk to move the location was missing from the above patch. Found by kernel test robot by building driver with CONFIG_PM disabled. Link: https://lore.kernel.org/all/202202090657.bstNLuce-lkp@intel.com/ Link: https://lore.kernel.org/r/20220210201151.236170-1-don.brace@microchip.com Fixes: c66e078a ("scsi: smartpqi: Fix hibernate and suspend") Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Mike Mcgowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
John Garry authored
This flag is now only ever set, so delete it. This also avoids a use-after-free in the pm8001 queue path, as reported in the following: https://lore.kernel.org/linux-scsi/c3cb7228-254e-9584-182b-007ac5e6fe0a@huawei.com/T/#m28c94c6d3ff582ec4a9fa54819180740e8bd4cfb https://lore.kernel.org/linux-scsi/0cc0c435-b4f2-9c76-258d-865ba50a29dd@huawei.com/ [mkp: checkpatch + two SAS_TASK_AT_INITIATOR references] Link: https://lore.kernel.org/r/1644489804-85730-3-git-send-email-john.garry@huawei.comReviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
John Garry authored
In the queue path, move around when we assign sas_task->lldd_task such that this pointer and the SAS_TASK_AT_INITIATOR flag are set atomically. It is also not required to clear SAS_TASK_AT_INITIATOR in isci_task_execute_task() error path as it is also cleared immediately after in isci_task_refuse() call. Now the following items may be considered: - SAS_TASK_STATE_DONE and SAS_TASK_AT_INITIATOR are mutually exclusive apart from possibly when SAS_TASK_STATE_DONE is set in sas_scsi_find_task(), but that is after .lldd_abort_task, i.e. the considered callback, is called. - If isci_task_refuse() is called in the queue path, then sas_task->lldd_task and SAS_TASK_AT_INITIATOR are cleared atomically in isci_task_refuse(). - In the completion path, SAS_TASK_STATE_DONE is set and SAS_TASK_AT_INITIATOR is cleared atomically before the sas_task.lldd_task is cleared later. So in isci_task_abort_task() if SAS_TASK_STATE_DONE is not set and sas_task.lldd_task is still set, then SAS_TASK_AT_INITIATOR must be set - so we can drop this check on SAS_TASK_AT_INITIATOR. [mkp: checkpatch] Link: https://lore.kernel.org/r/1644489804-85730-2-git-send-email-john.garry@huawei.comSigned-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Gleb Chesnokov authored
The qla_sess_op_cmd_list was introduced in commit 8b2f5ff3 ("qla2xxx: cleanup cmd in qla workqueue before processing TMR"). Then the usage of this list was dropped in commit fb35265b ("scsi: qla2xxx: Remove session creation redundant code"). Thus, remove this list since it is no longer used. Link: https://lore.kernel.org/r/AS8PR10MB49524AAB4C8016E4AFF17FFB9D2D9@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COMReviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Gleb Chesnokov <Chesnokov.G@raidix.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Yang Li authored
Eliminate the following smatch warning: drivers/scsi/pm8001/pm8001_ctl.c:760 pm8001_update_flash() warn: inconsistent indenting Link: https://lore.kernel.org/r/20220208025500.29511-1-yang.lee@linux.alibaba.comReported-by: Abaci Robot <abaci@linux.alibaba.com> Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Kees Cook authored
Instead of doing a cast to storage that is too small, add a union for the high 64 bits. Silences the warnings under -Warray-bounds: drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function 'ibmvscsis_send_messages': drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1934:44: error: array subscript 'struct viosrp_crq[0]' is partly outside array bounds of 'u64[1]' {aka 'long long unsigned int[1]'} [-Werror=array-bounds] 1934 | crq->valid = VALID_CMD_RESP_EL; | ^~ drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1875:13: note: while referencing 'msg_hi' 1875 | u64 msg_hi = 0; | ^~~~~~ There is no change to the resulting binary instructions. Link: https://lore.kernel.org/lkml/20220125142430.75c3160e@canb.auug.org.au Link: https://lore.kernel.org/r/20220208061231.3429486-1-keescook@chromium.org Cc: Michael Cyr <mikecyr@linux.ibm.com> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Tyrel Datwyler <tyreld@linux.ibm.com> Cc: linux-scsi@vger.kernel.org Cc: target-devel@vger.kernel.org Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Saurav Kashyap authored
This done routine will delete the timer and check for its return value and decrease the reference count accordingly. This prevents boot hangs reported after commit 31e6cdbe ("scsi: qla2xxx: Implement ref count for SRB") was merged. Link: https://lore.kernel.org/r/20220208093946.4471-1-njavali@marvell.com Fixes: 31e6cdbe ("scsi: qla2xxx: Implement ref count for SRB") Reported-by: Ewan Milne <emilne@redhat.com> Tested-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
- 08 Feb, 2022 22 commits
-
-
Don Brace authored
Link: https://lore.kernel.org/r/164375215867.440833.17567317655622946368.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Gerry Morong <gerry.morong@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Kevin Barnett authored
Correct lsscsi -t output for newer controllers that support 16-byte WWID in the SAS address field. lsscsi -t was displaying all zeros for SAS addresses. When we added support to smartpqi for 16-byte WWIDs in the RPL data for newer controllers, we were copying the wrong part of the 16-byte WWID to the SAS address field. Link: https://lore.kernel.org/r/164375215363.440833.7298523719813806902.stgit@brunhilda.pdev.netReviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Kevin Barnett authored
Restructure the hibernate/suspend code to allow workarounds for the controller boot differences. Newer controllers have subtle differences in the way that they boot up. Link: https://lore.kernel.org/r/164375214859.440833.14683009064111314948.stgit@brunhilda.pdev.netReviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Mike McGowen authored
Add calls to the functions at the beginning driver initialization. The BUILD_BUG_ON() statements that are currently in functions named verify_structures() in the modules smartpqi_init.c and smartpqi_sis.c do not work as currently implemented. Link: https://lore.kernel.org/r/164375214355.440833.13129778749209816497.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Mike McGowen authored
Correct NUMA node association when calling pqi_pci_probe(). In the function pqi_pci_probe(), the driver makes an OS call to get the NUMA node associated with a controller. If the call returns that there is no associated node, the driver attempts to set it to node 0. The problem is that a different local variable (cp_node) was being used to do this, but the original local variable (node) was still being used in the call to pqi_alloc_ctrl_info(). The value of "node" is not updated if the conditional after the call to dev_to_node() evaluates to TRUE. Link: https://lore.kernel.org/r/164375213850.440833.5243014942807747074.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Kevin Barnett authored
Remove UNIQUE_WWID_IN_REPORT_PHYS_LUN PQI feature. This feature was originally added to solve a problem with NVMe drives, but this problem has since been solved a different way, so this PQI feature is no longer required for any type of drive. The kernel was not creating symbolic links in sysfs between SATA drives and their enclosure. The driver was enabling the UNIQUE_WWID_IN_REPORT_PHYS_LUN PQI feature, which causes the FW to return a WWID for SATA drives that is derived from a unique ID read from the SATA drive itself. The driver was exposing this WWID as the drive's SAS address. However, because this SAS address does not match the SAS address returned by an enclosure's SES Page 0xA data, the Linux kernel was not able to match a SATA drive with its enclosure. Link: https://lore.kernel.org/r/164375213346.440833.12379222470149882747.stgit@brunhilda.pdev.netReviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Mike McGowen authored
Use all data disks for sequential read operations. Testing discovered inconsistent performance on RAID 10 volumes when performing 256K sequential reads. The driver was only using a single tracker to determine which physical drive to send a request to for AIO requests. Change the single tracker (next_bypass_group) to an array of trackers based on the number of data disks in a row of the RAID map. Link: https://lore.kernel.org/r/164375212842.440833.6733971458765002128.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Mahesh Rajashekhara authored
Avoid dropping into shell if the controller is in locked up state. Driver issues SIS soft reset to bring back the controller to SIS mode while OS boots into kdump mode. If the controller is in lockup state, SIS soft reset does not work. Since the controller lockup code has not been cleared, driver considers the firmware is no longer up and running. Driver returns back an error code to OS and the kdump fails. Link: https://lore.kernel.org/r/164375212337.440833.11955356190354940369.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Mahesh Rajashekhara authored
After modifying logical volume size, lsblk command still shows previous size of logical volume. When the driver gets any event from firmware it schedules rescan worker with delay of 10 seconds. If array expansion is so quick that it gets completed in a second, the driver could not catch logical volume expansion due to worker delay. Since driver does not detect volume expansion, driver would not call rescan device to update new size to the OS. Link: https://lore.kernel.org/r/164375211833.440833.17023155389220583731.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Sagar Biradar authored
On certain systems (based on PCI IDs), when the OS transitions the system into the suspend (S3) state, the BMIC flush cache command will indicate a system RESTART instead of SUSPEND. This avoids drive spin-down. Link: https://lore.kernel.org/r/164375211330.440833.7203813692110347698.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Sagar Biradar <sagar.biradar@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Balsundar P authored
Change PQI_HZ to HZ. PQI_HZ macro was set to 1000 when HZ value is less than 1000. By default, PQI_HZ will result into a delay of 10 seconds(for kernel, which has HZ = 100). So in this case when firmware raises an event, rescan worker will be scheduled after a delay of (10 x PQI_HZ) = 100 seconds instead of 10 seconds. Also driver uses PQI_HZ at many instances, which might result in some other issues with respect to delay. Link: https://lore.kernel.org/r/164375210825.440833.15510172447583227486.stgit@brunhilda.pdev.netReviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Balsundar P <balsundar.p@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Kevin Barnett authored
Use correct pqi_aio_path_request structure to calculate the offset to sg_descriptors. The function pqi_aio_submit_io() uses the pqi_raid_path_request structure to calculate the offset of the structure member sg_descriptors. This is incorrect. It should be using the pqi_aio_path_request structure instead. This typo is benign because the offsets are the same in both structures. Link: https://lore.kernel.org/r/164375210321.440833.2566086558909686629.stgit@brunhilda.pdev.netReviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Kevin Barnett authored
Rename the function pqi_is_io_high_priority() to pqi_is_io_high_priority(). Remove 2 unnecessary lines from the function, and adjusted the white space. Link: https://lore.kernel.org/r/164375209818.440833.10908948825731635853.stgit@brunhilda.pdev.netReviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Murthy Bhat authored
Return DID_NO_CONNECT when a path failure is detected. When a path fails during I/O and AIO path gets disabled for a multipath device, the I/O was retried in the RAID path slowing down path fail detection. Returning DID_NO_CONNECT allows multipath to switch paths more quickly. Link: https://lore.kernel.org/r/164375209313.440833.9992416628621839233.stgit@brunhilda.pdev.netReviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Sagar Biradar <sagar.biradar@microchip.com> Signed-off-by: Murthy Bhat <Murthy.Bhat@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Sagar Biradar authored
Avoid drive spin down during a warm boot. Call the BMIC Flush Cache command (0xc2) to indicate the reason for the flush cache (shutdown, hibernate, suspend, or restart). Link: https://lore.kernel.org/r/164375208810.440833.11254644025650871435.stgit@brunhilda.pdev.netReviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Sagar Biradar <sagar.biradar@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Gilbert Wu authored
Add device attribute 'sas_ncq_prio_enable' to enable SATA NCQ priority support and provide I/O priority in SCSI command and pass priority information to controller firmware. This device attribute works only when device has NCQ priority support and controller firmware can handle I/Os with NCQ priority attribute. Link: https://lore.kernel.org/r/164375208306.440833.7392577382127815362.stgit@brunhilda.pdev.netReviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Signed-off-by: Gilbert Wu <Gilbert.Wu@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Don Brace authored
Add in new ZTE controllers: VID / DID / SVID / SDID ---- ---- ---- ---- ZTE SmartROC3100 RS241-18i 2G 9005 / 028F / 1CF2 / 5449 ZTE SmartROC3100 RS242-18i 4G 9005 / 028F / 1CF2 / 544A ZTE SmartIOC2100 RS243-18i 9005 / 028F / 1CF2 / 544B ZTE SmartROC3100 RM241B-18i 2G 9005 / 028F / 1CF2 / 544D ZTE SmartROC3100 RM242B-18i 4G 9005 / 028F / 1CF2 / 544E ZTE SmartIOC2100 RM243B-18i 9005 / 028F / 1CF2 / 544F Add PCI ID for 1100-24i controller: VID / DID / SVID / SDID ---- ---- ---- ---- HBA 1100-24i 9005 / 028F / 9005 / 1304 Add PCI IDs for HPE and Adaptec devices: VID / DID / SVID / SDID ---- ---- ---- ---- Adaptec Smart HBA 2200-8io /e 9005 / 028F / 9005 / 1463 Adaptec Smart HBA 2200-16io /e 9005 / 028F / 9005 / 14C2 HPE SR308i-p Gen11 9005 / 028F / 1590 / 0382 HPE SR308i-o Gen11 9005 / 028F / 1590 / 0383 HPE SR932i-p Gen11 9005 / 028F / 1590 / 0381 Add PCI IDs for Inspur controllers: VID / DID / SVID / SDID ---- ---- ---- ---- INSPUR RS0800M5H24i 9005 / 028F / 1BD4 / 006B INSPUR RS0800M5E8I 9005 / 028F / 1BD4 / 006C INSPUR RS0800M5H8I 9005 / 028F / 1BD4 / 006D INSPUR RS0804M5R16i 9005 / 028F / 1BD4 / 006F INSPUR RS0800M5E16i 9005 / 028F / 1BD4 / 0070 INSPUR RS0800M5H16i 9005 / 028F / 1BD4 / 0071 INSPUR RS0800M5E16i 9005 / 028F / 1BD4 / 0072 NT RAID 3100-24i 9005 / 028F / 1F0C / 3161 Add HPE and Adaptec OROC PCI IDs: VID / DID / SVID / SDID ---- ---- ---- ---- HPE SR216i-o Gen11 9005 / 028F / 9005 / 036F Adaptec SmartRAID 3284-16io /e/uC 9005 / 028F / 9005 / 1473 Adaptec SmartRAID 3254-16io /e 9005 / 028F / 9005 / 1474 Add PCI IDs for new channel controllers: VID / DID / SVID / SDID ---- ---- ---- ---- Adaptec SmartRAID 3254-8i /e 9005 / 028F / 9005 / 14A4 Adaptec SmartRAID 3252-8i /e 9005 / 028F / 9005 / 14A5 Adaptec SmartRAID 3204-8i /e 9005 / 028F / 9005 / 14A6 Align PCI IDs with OOB driver. Easier to check for differences. Link: https://lore.kernel.org/r/164375207802.440833.15947108153078495425.stgit@brunhilda.pdev.netReviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Co-developed-by: Mike McGowen <Mike.McGowen@microchip.com> Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com> Co-developed-by: Murthy Bhat <Murthy.Bhat@microchip.com> Signed-off-by: Murthy Bhat <Murthy.Bhat@microchip.com> Co-developed-by: Sagar Biradar <sagar.biradar@microchip.com> Signed-off-by: Sagar Biradar <sagar.biradar@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Don Brace authored
Prevent "BUG: scheduling while atomic: rmmod" stack trace. Stop setting spin_locks before calling OS functions to remove devices. Link: https://lore.kernel.org/r/164375207296.440833.4996145011193819683.stgit@brunhilda.pdev.netReviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Kees Cook authored
This converts to a flexible array instead of the old-style 1-element arrays. The existing code already did the correct math for finding the size of the resulting flexible array structure, so there is no binary difference. The other two structures converted to use flexible arrays appear to have no users at all. Link: https://lore.kernel.org/r/20220201223948.1455637-1-keescook@chromium.orgSigned-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Sebastian Andrzej Siewior authored
The USB storage driver can complete its requests directly from a kernel thread. Use scsi_done_direct() to avoid waking ksoftirqd. Link: https://lore.kernel.org/r/20220201210954.570896-3-sebastian@breakpoint.ccSigned-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Sebastian Andrzej Siewior authored
Add scsi_done_direct() which behaves like scsi_done() except that it invokes blk_mq_complete_request_direct() in order to complete the request. Callers from process context can complete the request directly instead waking ksoftirqd. Link: https://lore.kernel.org/r/Yfw7JaszshmfYa1d@flowReviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Martin Wilck authored
If a SCSI device handler module is loaded after some SCSI devices have already been probed (e.g. via request_module() by dm-multipath), the "access_state" and "preferred_path" sysfs attributes remain invisible for these devices, although the handler is attached and live. The reason is that the visibility is only checked when the sysfs attribute group is first created. This results in an inconsistent user experience depending on the load order of SCSI low-level drivers vs. device handler modules. This patch changes user space API: attempting to read the "access_state" or "preferred_path" attributes will now result in -EINVAL rather than -ENODEV for devices that have no device handler, and tests for the existence of these attributes will have a different result. Link: https://lore.kernel.org/r/20220127141351.30706-1-mwilck@suse.comReviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
- 31 Jan, 2022 7 commits
-
-
Minghao Chi (CGEL ZTE) authored
destroy_workqueue() already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant flush_workqueue() call. Link: https://lore.kernel.org/r/20220127014330.1185114-1-chi.minghao@zte.com.cnReported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Minghao Chi (CGEL ZTE) authored
destroy_workqueue() already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant flush_workqueue() calls. Link: https://lore.kernel.org/r/20220127013934.1184923-1-chi.minghao@zte.com.cnReported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Yang Guang authored
coccinelle report: ./drivers/scsi/bfa/bfad_attr.c:908:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:860:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:888:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:853:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:808:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:728:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:822:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:927:9-17: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:900:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:874:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:714:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/bfa/bfad_attr.c:839:8-16: WARNING: use scnprintf or sprintf Use sysfs_emit() instead of scnprintf() or sprintf(). Link: https://lore.kernel.org/r/def83ff75faec64ba592b867a8499b1367bae303.1643181468.git.yang.guang5@zte.com.cnReported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn> Signed-off-by: David Yang <davidcomponentone@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Yang Guang authored
coccinelle report: ./drivers/scsi/mvsas/mv_init.c:699:8-16: WARNING: use scnprintf or sprintf ./drivers/scsi/mvsas/mv_init.c:747:8-16: WARNING: use scnprintf or sprintf Use sysfs_emit() instead of scnprintf() or sprintf(). Link: https://lore.kernel.org/r/c1711f7cf251730a8ceb5bdfc313bf85662b3395.1643182948.git.yang.guang5@zte.com.cnReported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn> Signed-off-by: David Yang <davidcomponentone@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Yin Xiujiang authored
Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Link: https://lore.kernel.org/r/20220126014248.466806-1-yinxiujiang@kylinos.cnSigned-off-by: Yin Xiujiang <yinxiujiang@kylinos.cn> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Cai Huoqing authored
Replace 'Offlaod' with 'Offload'. Link: https://lore.kernel.org/r/20220128063101.6953-1-cai.huoqing@linux.devAcked-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Jinyoung Choi authored
Because WB performs writes in SLC mode, it is not possible to use WriteBooster indefinitely. Vendors can set a lifetime limit in the device. If the lifetime exceeds this limit, the device ican disable the WB feature. The feature is defined in the "bWriteBoosterBufferLifeTimeEst (IDN = 1E)" attribute. With lifetime exceeding the limit value, the current driver continuously performs the following query: - Write Flag: WB_ENABLE / DISABLE - Read attr: Available Buffer Size - Read attr: Current Buffer Size This patch recognizes that WriteBooster is no longer supported by the device, and prevents unnecessary queries. Link: https://lore.kernel.org/r/1891546521.01643252701746.JavaMail.epsvc@epcpadp3Reviewed-by: Asutosh Das <quic_asutoshd@quicinc.com> Acked-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
- 25 Jan, 2022 2 commits
-
-
Douglas Gilbert authored
Log subpages are starting to appear in real devices (e.g. SSDs) so add support for one. Adopt approach where all "wild" sub-pages are themselves listed as long as there is at least one non-wild page or subpage for a given page number. Link: https://lore.kernel.org/r/20220109012853.301953-10-dgilbert@interlog.comSigned-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Douglas Gilbert authored
By default, this driver places a read lock around all user data fetches and a write lock around all user data modifying operations (e.g. WRITE commands). These locks have "per store" granularity. Other drivers that have a similar function (e.g. null_blk) do not take this data integrity step and run significantly faster in some tests. In the common case of a (simulated) device to device copy (e.g. what dd and its variants do) there should be no need for locks around data accesses. So add the driver and sysfs parameter no_rwlock which is boolean and when set does what its name suggests. The default is false for backward comaptibility. Link: https://lore.kernel.org/r/20220109012853.301953-7-dgilbert@interlog.comSigned-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-