Rajeshwar R Shinde
2d6f70fe17
scsi: elx: sli4: Remove code duplication
...
In the function sli_xmit_bls_rsp64_wqe(), the 'if' and 'else' conditions
evaluates the same expression and give the same output. Also, params->s_id
shall not be equal to U32_MAX. Remove the unused code.
This fixes coccinelle warning such as:
drivers/scsi/elx/libefc_sli/sli4.c:2320:2-4: WARNING: possible
condition with no effect (if == else)
Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com >
Link: https://lore.kernel.org/r/20230817114301.17601-1-coolrrsh@gmail.com
Reviewed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:56 -04:00
Randy Dunlap
2aa0f83edb
scsi: elx: libefc_sli: Use "/*" for non-kernel-doc comment
...
Don't use "/**" to begin non-kernel-doc comments. Prevent a kernel-doc
warning:
drivers/scsi/elx/libefc_sli/sli4.c:13: warning: cannot understand function prototype: 'struct sli4_asic_entry_t sli4_asic_table[] = '
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: James Smart <james.smart@broadcom.com >
Cc: Ram Vegesna <ram.vegesna@broadcom.com >
Cc: target-devel@vger.kernel.org
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com >
Cc: "Martin K. Petersen" <martin.petersen@oracle.com >
Link: https://lore.kernel.org/r/20230117070151.29339-1-rdunlap@infradead.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-01-23 20:53:43 -05:00
Julia Lawall
8037185d1a
scsi: elx: libefc_sli: Fix typos in comments
...
Various spelling mistakes in comments. Detected with the help of
Coccinelle.
Link: https://lore.kernel.org/r/20220314115354.144023-18-Julia.Lawall@inria.fr
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-03-15 00:32:15 -04:00
Christoph Hellwig
efac162a4e
scsi: efct: Don't pass GFP_DMA to dma_alloc_coherent()
...
dma_alloc_coherent() ignores the zone specifiers so this is pointless and
confusing.
Link: https://lore.kernel.org/r/20211214163605.416288-1-hch@lst.de
Reviewed-by: James Smart <jsmart2021@gmail.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-12-16 22:52:29 -05:00
Christophe JAILLET
2c2934c80e
scsi: elx: Use 'bitmap_zalloc()' when applicable
...
'sli4->ext[i].use_map' is a bitmap. Use 'bitmap_zalloc()' to simplify code,
improve the semantic and avoid some open-coded arithmetic in allocator
arguments.
Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.
Link: https://lore.kernel.org/r/2a0a83949fb896a0a236dcca94dfdc8486d489f5.1635104793.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-10-26 23:28:33 -04:00
James Smart
f6060eb134
scsi: elx: libefc_sli: Fix ANDing with zero bit value
...
Flags value is being set to a constant and ANDed with 0 which always
results in 0.
Remove the assignment line.
Link: https://lore.kernel.org/r/20210619155641.19942-1-jsmart2021@gmail.com
Fixes: 1628f5b497 ("scsi: elx: libefc_sli: Populate and post different WQEs")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Co-developed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-06-22 21:07:30 -04:00
James Smart
388f36edec
scsi: elx: libefc_sli: APIs to setup SLI library
...
Add APIs to initialize the library, initialize the SLI Port, reset
firmware, terminate the SLI Port, and terminate the library.
Link: https://lore.kernel.org/r/20210601235512.20104-8-jsmart2021@gmail.com
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Co-developed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: James Smart <jsmart2021@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-06-15 23:39:29 -04:00
James Smart
9bd267093b
scsi: elx: libefc_sli: BMBX routines and SLI config commands
...
Add routines to create mailbox commands used during adapter initialization
and add APIs to issue mailbox commands to the adapter through the bootstrap
mailbox register.
Link: https://lore.kernel.org/r/20210601235512.20104-7-jsmart2021@gmail.com
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Co-developed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: James Smart <jsmart2021@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-06-15 23:39:29 -04:00
James Smart
1628f5b497
scsi: elx: libefc_sli: Populate and post different WQEs
...
Add service routines to create different WQEs and add APIs to issue iread,
iwrite, treceive, tsend and other work queue entries.
Link: https://lore.kernel.org/r/20210601235512.20104-6-jsmart2021@gmail.com
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Co-developed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: James Smart <jsmart2021@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-06-15 23:39:29 -04:00
James Smart
7c5b76831e
scsi: elx: libefc_sli: Queue create/destroy/parse routines
...
Add service routines to create mailbox commands and add APIs to
create/destroy/parse SLI-4 EQ, CQ, RQ and MQ queues.
Link: https://lore.kernel.org/r/20210601235512.20104-5-jsmart2021@gmail.com
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Co-developed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: James Smart <jsmart2021@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-06-15 23:39:29 -04:00
James Smart
edba59f3cd
scsi: elx: libefc_sli: SLI-4 register offsets and field definitions
...
This is the initial patch for the new Emulex target mode SCSI driver.
- Create the new Emulex source level directory drivers/scsi/elx and add
the directory to the MAINTAINERS file.
- Create the first library subdirectory drivers/scsi/elx/libefc_sli. This
library is a SLI-4 interface library.
- Start the population of the libefc_sli library with definitions of SLI-4
hardware register offsets and definitions.
Link: https://lore.kernel.org/r/20210601235512.20104-2-jsmart2021@gmail.com
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Co-developed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: Ram Vegesna <ram.vegesna@broadcom.com >
Signed-off-by: James Smart <jsmart2021@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-06-15 23:39:28 -04:00