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>
This commit is contained in:
James Smart 2021-06-01 16:54:45 -07:00 committed by Martin K. Petersen
parent 18be69fa34
commit 7c5b76831e
3 changed files with 1371 additions and 0 deletions

View File

@ -19,4 +19,19 @@ struct efc_dma {
struct pci_dev *pdev;
};
#define efc_log_crit(efc, fmt, args...) \
dev_crit(&((efc)->pci)->dev, fmt, ##args)
#define efc_log_err(efc, fmt, args...) \
dev_err(&((efc)->pci)->dev, fmt, ##args)
#define efc_log_warn(efc, fmt, args...) \
dev_warn(&((efc)->pci)->dev, fmt, ##args)
#define efc_log_info(efc, fmt, args...) \
dev_info(&((efc)->pci)->dev, fmt, ##args)
#define efc_log_debug(efc, fmt, args...) \
dev_dbg(&((efc)->pci)->dev, fmt, ##args)
#endif /* __EFC_COMMON_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -3718,4 +3718,13 @@ struct sli4 {
struct efc_dma vpd_data;
};
static inline void
sli_cmd_fill_hdr(struct sli4_rqst_hdr *hdr, u8 opc, u8 sub, u32 ver, __le32 len)
{
hdr->opcode = opc;
hdr->subsystem = sub;
hdr->dw3_version = cpu_to_le32(ver);
hdr->request_length = len;
}
#endif /* !_SLI4_H */