forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/scsi/qla2xxx/qla_mr.h
....@@ -1,11 +1,12 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * QLogic Fibre Channel HBA Driver
34 * Copyright (c) 2003-2014 QLogic Corporation
4
- *
5
- * See LICENSE.qla2xxx for copyright and licensing details.
65 */
76 #ifndef __QLA_MR_H
87 #define __QLA_MR_H
8
+
9
+#include "qla_dsd.h"
910
1011 /*
1112 * The PCI VendorID and DeviceID for our board.
....@@ -46,8 +47,7 @@
4647 uint8_t fcp_cdb[MAX_CMDSZ]; /* SCSI command words. */
4748 __le32 byte_count; /* Total byte count. */
4849
49
- uint32_t dseg_0_address[2]; /* Data segment 0 address. */
50
- uint32_t dseg_0_len; /* Data segment 0 length. */
50
+ struct dsd64 dsd;
5151 };
5252
5353 #define STATUS_TYPE_FX00 0x01 /* Status entry. */
....@@ -95,7 +95,7 @@
9595 uint8_t sys_define;
9696 uint8_t entry_status; /* Entry Status. */
9797
98
- __le32 handle; /* System handle. */
98
+ uint32_t handle; /* System handle. */
9999
100100 uint32_t reserved_0;
101101
....@@ -120,13 +120,13 @@
120120 uint8_t sys_define; /* System defined. */
121121 uint8_t entry_status; /* Entry Status. */
122122
123
- __le32 handle; /* System handle. */
123
+ uint32_t handle; /* System handle. */
124124 __le32 reserved_0;
125125
126126 __le16 tgt_id_sts; /* Completion status. */
127127 __le16 options;
128128
129
- __le32 abort_handle; /* System handle. */
129
+ uint32_t abort_handle; /* System handle. */
130130 __le32 reserved_2;
131131
132132 __le16 req_que_no;
....@@ -165,7 +165,7 @@
165165 uint8_t sys_define; /* System Defined. */
166166 uint8_t entry_status; /* Entry Status. */
167167
168
- __le32 handle; /* System handle. */
168
+ uint32_t handle; /* System handle. */
169169 __le32 reserved_0; /* System handle. */
170170
171171 __le16 func_num;
....@@ -176,10 +176,8 @@
176176 uint8_t flags;
177177 uint8_t reserved_1;
178178
179
- __le32 dseg_rq_address[2]; /* Data segment 0 address. */
180
- __le32 dseg_rq_len; /* Data segment 0 length. */
181
- __le32 dseg_rsp_address[2]; /* Data segment 1 address. */
182
- __le32 dseg_rsp_len; /* Data segment 1 length. */
179
+ struct dsd64 dseg_rq;
180
+ struct dsd64 dseg_rsp;
183181
184182 __le32 dataword;
185183 __le32 adapid;
....@@ -360,47 +358,47 @@
360358 #define CONTINUE_A64_TYPE_FX00 0x03 /* Continuation entry. */
361359
362360 #define QLAFX00_SET_HST_INTR(ha, value) \
363
- WRT_REG_DWORD((ha)->cregbase + QLAFX00_HST_TO_HBA_REG, \
361
+ wrt_reg_dword((ha)->cregbase + QLAFX00_HST_TO_HBA_REG, \
364362 value)
365363
366364 #define QLAFX00_CLR_HST_INTR(ha, value) \
367
- WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG, \
365
+ wrt_reg_dword((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG, \
368366 ~value)
369367
370368 #define QLAFX00_RD_INTR_REG(ha) \
371
- RD_REG_DWORD((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG)
369
+ rd_reg_dword((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG)
372370
373371 #define QLAFX00_CLR_INTR_REG(ha, value) \
374
- WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG, \
372
+ wrt_reg_dword((ha)->cregbase + QLAFX00_HBA_TO_HOST_REG, \
375373 ~value)
376374
377375 #define QLAFX00_SET_HBA_SOC_REG(ha, off, val)\
378
- WRT_REG_DWORD((ha)->cregbase + off, val)
376
+ wrt_reg_dword((ha)->cregbase + off, val)
379377
380378 #define QLAFX00_GET_HBA_SOC_REG(ha, off)\
381
- RD_REG_DWORD((ha)->cregbase + off)
379
+ rd_reg_dword((ha)->cregbase + off)
382380
383381 #define QLAFX00_HBA_RST_REG(ha, val)\
384
- WRT_REG_DWORD((ha)->cregbase + QLAFX00_HST_RST_REG, val)
382
+ wrt_reg_dword((ha)->cregbase + QLAFX00_HST_RST_REG, val)
385383
386384 #define QLAFX00_RD_ICNTRL_REG(ha) \
387
- RD_REG_DWORD((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG)
385
+ rd_reg_dword((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG)
388386
389387 #define QLAFX00_ENABLE_ICNTRL_REG(ha) \
390
- WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG, \
388
+ wrt_reg_dword((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG, \
391389 (QLAFX00_GET_HBA_SOC_REG(ha, QLAFX00_HBA_ICNTRL_REG) | \
392390 QLAFX00_ICR_ENB_MASK))
393391
394392 #define QLAFX00_DISABLE_ICNTRL_REG(ha) \
395
- WRT_REG_DWORD((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG, \
393
+ wrt_reg_dword((ha)->cregbase + QLAFX00_HBA_ICNTRL_REG, \
396394 (QLAFX00_GET_HBA_SOC_REG(ha, QLAFX00_HBA_ICNTRL_REG) & \
397395 QLAFX00_ICR_DIS_MASK))
398396
399397 #define QLAFX00_RD_REG(ha, off) \
400
- RD_REG_DWORD((ha)->cregbase + off)
398
+ rd_reg_dword((ha)->cregbase + off)
401399
402400 #define QLAFX00_WR_REG(ha, off, val) \
403
- WRT_REG_DWORD((ha)->cregbase + off, val)
401
+ wrt_reg_dword((ha)->cregbase + off, val)
404402
405403 struct qla_mt_iocb_rqst_fx00 {
406404 __le32 reserved_0;