/* fill crypto context */
fctx = nctx->u.fctx;
- flags.f = be64_to_cpu(fctx->flags.f);
+ flags.fu = be64_to_cpu(fctx->flags.f);
flags.w0.aes_keylen = aes_keylen;
- fctx->flags.f = cpu_to_be64(flags.f);
+ fctx->flags.f = cpu_to_be64(flags.fu);
/* copy enc key to context */
memset(&fctx->crypto, 0, sizeof(fctx->crypto));
struct flexi_crypto_context *fctx = nctx->u.fctx;
union fc_ctx_flags flags;
- flags.f = be64_to_cpu(fctx->flags.f);
+ flags.fu = be64_to_cpu(fctx->flags.f);
flags.w0.mac_len = authsize;
- fctx->flags.f = cpu_to_be64(flags.f);
+ fctx->flags.f = cpu_to_be64(flags.fu);
aead->authsize = authsize;
flags->w0.iv_source = IV_FROM_DPTR;
/* ask microcode to calculate ipad/opad */
flags->w0.auth_input_type = 1;
- flags->f = be64_to_cpu(flags->f);
+ flags->f = cpu_to_be64(flags->fu);
return 0;
}
#include <linux/debugfs.h>
#include "nitrox_csr.h"
+#include "nitrox_debugfs.h"
#include "nitrox_dev.h"
static int firmware_show(struct seq_file *s, void *v)
#include "nitrox_dev.h"
#include "nitrox_csr.h"
+#include "nitrox_hal.h"
#define PLL_REF_CLK 50
#define MAX_CSR_RETRIES 10
#include "nitrox_csr.h"
#include "nitrox_common.h"
#include "nitrox_hal.h"
+#include "nitrox_isr.h"
#include "nitrox_mbx.h"
/**
int nitrox_sriov_register_interupts(struct nitrox_device *ndev);
void nitrox_sriov_unregister_interrupts(struct nitrox_device *ndev);
+#ifdef CONFIG_PCI_IOV
+int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs);
+#else
+static inline int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs)
+{
+ return 0;
+}
+#endif
+
#endif /* __NITROX_ISR_H */
module_param(qlen, uint, 0644);
MODULE_PARM_DESC(qlen, "Command queue length - default 2048");
-#ifdef CONFIG_PCI_IOV
-int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs);
-#else
-int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs)
-{
- return 0;
-}
-#endif
-
/**
* struct ucode - Firmware Header
* @id: microcode ID
nitrox_remove_from_devlist(ndev);
-#ifdef CONFIG_PCI_IOV
/* disable SR-IOV */
nitrox_sriov_configure(pdev, 0);
-#endif
nitrox_crypto_unregister();
nitrox_debugfs_exit(ndev);
nitrox_pf_sw_cleanup(ndev);
.probe = nitrox_probe,
.remove = nitrox_remove,
.shutdown = nitrox_shutdown,
-#ifdef CONFIG_PCI_IOV
.sriov_configure = nitrox_sriov_configure,
-#endif
};
module_pci_driver(nitrox_driver);
#include "nitrox_csr.h"
#include "nitrox_hal.h"
#include "nitrox_dev.h"
+#include "nitrox_mbx.h"
#define RING_TO_VFNO(_x, _y) ((_x) / (_y))
union fc_ctx_flags {
__be64 f;
+ u64 fu;
struct {
#if defined(__BIG_ENDIAN_BITFIELD)
u64 cipher_type : 4;
* - packet payload bytes
*/
union pkt_instr_hdr {
+ __be64 bev;
u64 value;
struct {
#if defined(__BIG_ENDIAN_BITFIELD)
* @ctxp: Context pointer. CTXP<63,2:0> must be zero in all cases.
*/
union pkt_hdr {
+ __be64 bev[2];
u64 value[2];
struct {
#if defined(__BIG_ENDIAN_BITFIELD)
* sglist components at [RPTR] on the remote host.
*/
union slc_store_info {
+ __be64 bev[2];
u64 value[2];
struct {
#if defined(__BIG_ENDIAN_BITFIELD)
#include <linux/workqueue.h>
#include <crypto/internal/skcipher.h>
+#include "nitrox_common.h"
#include "nitrox_dev.h"
#include "nitrox_req.h"
#include "nitrox_csr.h"
sr->instr.ih.s.ssz = sr->out.sgmap_cnt;
sr->instr.ih.s.fsz = FDATA_SIZE + sizeof(struct gphdr);
sr->instr.ih.s.tlen = sr->instr.ih.s.fsz + sr->in.total_bytes;
- sr->instr.ih.value = cpu_to_be64(sr->instr.ih.value);
+ sr->instr.ih.bev = cpu_to_be64(sr->instr.ih.value);
/* word 2 */
sr->instr.irh.value[0] = 0;
sr->instr.irh.s.ctxc = req->ctrl.s.ctxc;
sr->instr.irh.s.arg = req->ctrl.s.arg;
sr->instr.irh.s.opcode = req->opcode;
- sr->instr.irh.value[0] = cpu_to_be64(sr->instr.irh.value[0]);
+ sr->instr.irh.bev[0] = cpu_to_be64(sr->instr.irh.value[0]);
/* word 3 */
sr->instr.irh.s.ctxp = cpu_to_be64(ctx_handle);
/* word 4 */
sr->instr.slc.value[0] = 0;
sr->instr.slc.s.ssz = sr->out.sgmap_cnt;
- sr->instr.slc.value[0] = cpu_to_be64(sr->instr.slc.value[0]);
+ sr->instr.slc.bev[0] = cpu_to_be64(sr->instr.slc.value[0]);
/* word 5 */
sr->instr.slc.s.rptr = cpu_to_be64(sr->out.sgcomp_dma);