- Mar 12, 2020
-
-
Phong Tran authored
Make the aacraid driver -Wcast-function-type clean Report by: https://github.com/KSPP/linux/issues/20 drivers/scsi/aacraid/aachba.c:813:23: warning: cast between incompatible function types from 'int (*)(struct scsi_cmnd *)' to 'void (*)(struct scsi_cmnd *)' [-Wcast-function-type] Link: https://lore.kernel.org/r/20200309155319.12658-1-tranmanphong@gmail.com Reviewed-by:
Bart van Assche <bvanassche@acm.org> Reviewed-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Phong Tran <tranmanphong@gmail.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
Device quirk "UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE" is enabled for all Samsung devices by default currently. However MediaTek UFS host requires different host PA_TACTIVATE configuration. Hence clear this quirk first and then apply vendor-specific value in vops callback. Link: https://lore.kernel.org/r/20200302135346.16797-1-stanley.chu@mediatek.com Reviewed-by:
Avri Altman <avri.altman@wdc.com> Signed-off-by:
Stanley Chu <stanley.chu@mediatek.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Brian King authored
Fix up a compiler warning introduced via 54b04c99d02e Link: https://lore.kernel.org/r/1583159961-15903-1-git-send-email-brking@linux.vnet.ibm.com Fixes: 54b04c99d02e ("scsi: ibmvfc: Avoid loss of all paths during SVC node reboot") Signed-off-by:
Brian King <brking@linux.vnet.ibm.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Randy Dunlap authored
When driver debugging is not enabled, change the debug print macros to use the no_printk() macro. This fixes a gcc warning when -Wextra is set: ../drivers/message/fusion/mptlan.c:266:39: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] I have verified that there is very little object code change (with gcc 7.5.0). There are a few changes like: cmp %a,%b jl $1 to cmp %b,%a jg $1 Link: https://lore.kernel.org/r/ff9df31b-c4c1-c942-1cbf-18039e084c8e@infradead.org Cc: Bart Van Assche <bvanassche@acm.org> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Cc: MPT-FusionLinux.pdl@broadcom.com Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com> Cc: Chaitra P B <chaitra.basappa@broadcom.com> Cc: Sathya Prakash <sathya.prakash@broadcom.com> Reviewed-by:
Bart van Assche <bvanassche@acm.org> Reviewed-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Randy Dunlap <rdunlap@infradead.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Frank Mayhar authored
iSCSI session destruction can be arbitrarily slow, since it might require network operations and serialization inside the SCSI layer. This patch adds a new user event to trigger the destruction work asynchronously, releasing the rx_queue_mutex as soon as the operation is queued and before it is performed. This change allows other operations to run in other sessions in the meantime, removing one of the major iSCSI bottlenecks for us. To prevent the session from being used after the destruction request, we remove it immediately from the sesslist. This simplifies the locking required during the asynchronous removal. Link: https://lore.kernel.org/r/20200227195945.761719-1-krisman@collabora.com Co-developed-by:
Gabriel Krisman Bertazi <krisman@collabora.com> Co-developed-by:
Khazhismel Kumykov <khazhy@google.com> Reviewed-by:
Lee Duncan <lduncan@suse.com> Signed-off-by:
Gabriel Krisman Bertazi <krisman@collabora.com> Signed-off-by:
Frank Mayhar <fmayhar@google.com> Signed-off-by:
Khazhismel Kumykov <khazhy@google.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Sagar Biradar authored
Fixes the occasional adapter panic when sg_reset is issued with -d, -t, -b and -H flags. Removal of command type HBA_IU_TYPE_SCSI_TM_REQ in aac_hba_send since iu_type, request_id and fib_flags are not populated. Device and target reset handlers are made to send TMF commands only when reset_state is 0. Link: https://lore.kernel.org/r/1581553771-25796-1-git-send-email-Sagar.Biradar@microchip.com Reviewed-by:
Sagar Biradar <Sagar.Biradar@microchip.com> Signed-off-by:
Sagar Biradar <Sagar.Biradar@microchip.com> Signed-off-by:
Balsundar P <balsundar.p@microsemi.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Brian King authored
When an SVC node goes down as part of a node reboot, its WWPNs are moved to the remaining node. When the node is back online, its WWPNs are moved back. The result is that the WWPN moves from one NPort_ID to another, then back again. The ibmvfc driver was forcing the old port to be removed, but not sending an implicit logout. When the WWPN showed up at the new location, the PLOGI failed as there was already a login established for the old scsi id. The patch below fixes this by ensuring we always send an implicit logout for any scsi id associated with an rport prior to calling fc_remote_port_delete. Link: https://lore.kernel.org/r/1582767943-16611-1-git-send-email-brking@linux.vnet.ibm.com Signed-off-by:
Brian King <brking@linux.vnet.ibm.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Gustavo A. R. Silva authored
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour") Link: https://lore.kernel.org/r/20200224161406.GA21454@embeddedor Reviewed-by:
Lee Duncan <lduncan@suse.com> Reviewed-by:
Satish Kharat <satishkh@cisco.com> Signed-off-by:
Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
- Feb 29, 2020
-
-
Bart Van Assche authored
lrbp->cmd is set only for SCSI commands. Use this knowledge to simplify two boolean expressions. Link: https://lore.kernel.org/r/20200123035637.21848-4-bvanassche@acm.org Cc: Alim Akhtar <alim.akhtar@samsung.com> Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: Bean Huo <beanhuo@micron.com> Cc: Can Guo <cang@codeaurora.org> Reviewed-by:
Stanley Chu <stanley.chu@mediatek.com> Reviewed-by:
Asutosh Das <asutoshd@codeaurora.org> Reviewed-by:
Avri Altman <avri.altman@wdc.com> Signed-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
This patch does not change any functionality but makes the next patch in this series easier to read. Link: https://lore.kernel.org/r/20200123035637.21848-3-bvanassche@acm.org Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: Stanley Chu <stanley.chu@mediatek.com> Cc: Bean Huo <beanhuo@micron.com> Cc: Can Guo <cang@codeaurora.org> Reviewed-by:
Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by:
Avri Altman <avri.altman@wdc.com> Signed-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
The current behavior of the SCSI core is to clear driver-private data before preparing a request for submission to the SCSI LLD. Make it possible for SCSI LLDs to disable clearing of driver-private data. These hooks will be used by a later patch, namely "scsi: ufs: Let the SCSI core allocate per-command UFS data". Link: https://lore.kernel.org/r/20200123035637.21848-2-bvanassche@acm.org Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: Stanley Chu <stanley.chu@mediatek.com> Cc: Bean Huo <beanhuo@micron.com> Cc: Avri Altman <avri.altman@wdc.com> Cc: Can Guo <cang@codeaurora.org> Cc: Ming Lei <ming.lei@redhat.com> Cc: Johannes Thumshirn <jth@kernel.org> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Remove cmd_list functionality; no users left. With that the scsi_put_command() becomes empty, so remove that one, too. Link: https://lore.kernel.org/r/20200228075318.91255-14-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart van Assche <bvanassche@acm.org> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Use the SCSI midlayer helper to traverse the number of outstanding commands. This also eliminates the last usage for the cmd_list functionality so we can drop it. Link: https://lore.kernel.org/r/20200228075318.91255-13-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Balsundar P <balsundar.p@microchip.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Instead of traversing the list of possible commands by hands we should be using scsi_host_busy_iter() to figure out if there are outstanding commands. Link: https://lore.kernel.org/r/20200228075318.91255-12-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Balsundar P < <Balsundar.P@microchip.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Add an iterator scsi_host_busy_iter() to traverse all busy commands. If locking against concurrent command completions is required, it has to be provided by the caller. Link: https://lore.kernel.org/r/20200228075318.91255-11-hare@suse.de Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Use scsi_host_block() and scsi_host_unblock() instead of scsi_block_requests()/scsi_unblock_requests() to block and unblock I/O. This has the advantage that the block layer will stop sending I/O to the adapter instead of having the SCSI midlayer requeueing I/O internally. Link: https://lore.kernel.org/r/20200228075318.91255-10-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Balsundar P < <Balsundar.P@microchip.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Add helper functions to call scsi_internal_device_block()/ scsi_internal_device_unblock() for all attached devices on a SCSI host. Link: https://lore.kernel.org/r/20200228075318.91255-9-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
_aac_reset_adapter() only has one caller, and that one already calls scsi_block_requests(). Move the calls out of _aac_reset_adapter() to avoid calling scsi_block_requests() twice. Link: https://lore.kernel.org/r/20200228075318.91255-8-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Balsundar P < <Balsundar.P@microchip.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Use the midlayer helper scsi_host_complete_all_commands() to flush all outstanding commands. Link: https://lore.kernel.org/r/20200228075318.91255-7-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Acked-by:
Balsundar P <balsundar.p@microchip.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Use scsi_host_complete_all_commands() to terminate all outstanding commands and change the command result for terminated commands to the more common 'DID_RESET' instead of 'QUEUE_FULL'. Link: https://lore.kernel.org/r/20200228075318.91255-6-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Acked-by:
Balsundar P <balsundar.p@microchip.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
There is no need to wait for outstanding write commands on synchronize cache; the block layer is responsible for I/O scheduling, no need to out-guess it in the driver layer. Link: https://lore.kernel.org/r/20200228075318.91255-5-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Balsundar P <balsundar.b@microchip.com> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Rather than traversing all outstanding commands manually, use the scsi_host_complete_all_commands() helper to terminate all commands during reset. With that we can drop the cmd_list usage from the midlayer. Link: https://lore.kernel.org/r/20200228075318.91255-4-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Add a helper scsi_host_complete_all_commands() to terminate all outstanding commands on a SCSI host. Link: https://lore.kernel.org/r/20200228075318.91255-3-hare@suse.de Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Hannes Reinecke authored
Rename the badly named function into adpt_i2o_scsi_complete(), and make it a void function as the return value is never used. This also fixes a potential use-after-free as the return value might be evaluated from the command result after the command has been freed. Link: https://lore.kernel.org/r/20200228075318.91255-2-hare@suse.de Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Hannes Reinecke <hare@suse.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Guosong Su authored
Use kobj_to_dev to instead of open-coding it. Link: https://lore.kernel.org/r/20200225100411.10250-1-guosongsu@gmail.com Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Guosong Su <suguosong@xiaomi.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Stanley Chu authored
Some delays may be required either after gating or before ungating reference clock for device according to vendor requirements. Note that in UFS 3.0, the delay time after gating reference clock can be defined by attribute bRefClkGatingWaitTime. Use the formal value instead if it can be queried from device. Link: https://lore.kernel.org/r/20200220134848.8807-2-stanley.chu@mediatek.com Reviewed-by:
Bean Huo <beanhuo@micron.com> Signed-off-by:
Stanley Chu <stanley.chu@mediatek.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Can Guo authored
Western Digital UFS devices require host's PA_TACTIVATE to be lower than device's PA_TACTIVATE, otherwise it may get stuck during hibern8 sequence. Link: https://lore.kernel.org/r/1582517363-11536-3-git-send-email-cang@codeaurora.org Reviewed-by:
Asutosh Das <asutoshd@codeaurora.org> Acked-by:
Avri Altman <avri.altman@wdc.com> Signed-off-by:
Can Guo <cang@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Can Guo authored
Currently ufshcd_vops_apply_dev_quirks() comes after all UniPro parameters have been tuned. Move it up so that vendors have a chance to apply device quirks in advance. Link: https://lore.kernel.org/r/1582517363-11536-2-git-send-email-cang@codeaurora.org Reviewed-by:
Stanley Chu <stanley.chu@mediatek.com> Signed-off-by:
Can Guo <cang@codeaurora.org> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
Use an enum to specify the various quirks instead of #defines inside the structure definition. [mkp: fix typo] Link: https://lore.kernel.org/r/20200221140812.476338-3-hch@lst.de Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
Remove various quirks that don't have users, as well as the dead code keyed off them. Link: https://lore.kernel.org/r/20200221140812.476338-2-hch@lst.de Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Himanshu Madhani authored
Link: https://lore.kernel.org/r/20200226224022.24518-19-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
When transitioning from loop to N2N, stale NPort ID is not re-assigned. Stale ID can collide with remote device. This patch will re-assign NPort ID on N2N is detected. Link: https://lore.kernel.org/r/20200226224022.24518-18-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Quinn Tran <qutran@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Arun Easi authored
Certain state flags bit combinations are not checked and not handled correctly. Plus, do not log a normal underrun situation where there is no frame drop. Link: https://lore.kernel.org/r/20200226224022.24518-17-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Arun Easi <aeasi@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
T10-PI and FC-NVMe are not mutually exclusive. This patch removes restrictions where if FC-NVMe is enabled T10-PI defaults to disabled. Link: https://lore.kernel.org/r/20200226224022.24518-16-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Quinn Tran <qutran@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
For N2N, fc_port struct is created during report id acquisition. At later time, the loop resync (fabric, n2n, loop) would trigger the rest of the login using the created fc_port struct. The loop resync logic can trigger another fc_port allocation if the 1st allocation was not able to execute. This patch prevents the 2nd allocation trigger. Link: https://lore.kernel.org/r/20200226224022.24518-15-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Quinn Tran <qutran@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
NPIV re-enable code was blocked after FW had been initialized. The blocking check was too broad. Reduce the check to make sure if FW is initialized or not. Link: https://lore.kernel.org/r/20200226224022.24518-14-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Quinn Tran <qutran@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
RPD information failed to display by switch cli command. This is caused by driver failure to properly format RDP response data with data descriptor to allow switch to parse it correctly. Link: https://lore.kernel.org/r/20200226224022.24518-13-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Quinn Tran <qutran@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
For single port 28XX adapter, the second core can still run in the background. The flash semaphore can be held by the non-active core. This patch tell MPI FW to check for this case and clear the semaphore from the non-active core. Link: https://lore.kernel.org/r/20200226224022.24518-12-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Quinn Tran <qutran@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Quinn Tran authored
Per FW request, MB 1-7 should be logged for 8002 error. Link: https://lore.kernel.org/r/20200226224022.24518-11-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Quinn Tran <qutran@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Andrew Vasquez authored
commit e4e3a2ce ("scsi: qla2xxx: Add ability to autodetect SFP type") takes a heavy handed approach to BPM (Buffer Plus Management) enablement: 1) During hardware initialization, if an LR-capable transceiver is recognized, the driver schedules a disruptive post-initialization chip-reset (ISP-ABORT) to allow the BPM settings to be sent to the firmware. This chip-reset will result in (short-term) path-loss to all fc-rports and their attached SCSI devices. 2) LR-detection is triggered during any link-up event, resulting in a refresh and potential chip-reset Based on firmware-team guidance, upon LR-capable transceiver recognition, the driver's hardware initialization code will now re-execute firmware with the new BPM settings, then continue on with driver initialization. To address the second issue, the driver performs LR-capable detection upon the driver receiving a transceiver-insertion asynchronous event from firmware. No short-term path loss is needed with this new semantic. Link: https://lore.kernel.org/r/20200226224022.24518-10-hmadhani@marvell.com Signed-off-by:
Himanshu Madhani <hmadhani@marvell.com> Signed-off-by:
Andrew Vasquez <andrewv@marvell.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
-