Skip to contentSkip to conversation

scsi: arcmsr: support new Raid controller ARC-1688

PATCH Applied ching Huang 2 participants 2 messages Oct 2, 2023 – Dec 6, 2023 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/3 scsi: arcmsr: support new Raid controller ARC-1688

From: ching Huang <[email protected]>

This patch supports Areca new Raid controller ARC-1688

---
 drivers/scsi/arcmsr/arcmsr.h     | 23 ++++++++
 drivers/scsi/arcmsr/arcmsr_hba.c | 90 +++++++++++++++++++++++++++++++-
 2 files changed, 112 insertions(+), 1 deletion(-)
drivers/scsi/arcmsr/arcmsr.h +23 -0
index ed8d93198..8f20d9cc5 100644
@@ -818,6 +818,23 @@ typedef struct deliver_completeQ {
 	uint16_t	cmdLMID;        // reserved (0)
 	uint16_t	cmdFlag2;       // reserved (0)
 } DeliverQ, CompletionQ, *pDeliver_Q, *pCompletion_Q;
+
+#define ARCMSR_XOR_SEG_SIZE	(1024 * 1024)
+struct HostRamBuf {
+	uint32_t	hrbSignature;	// must be "HRBS"
+	uint32_t	hrbSize;	// total sg size, be multiples of MB
+	uint32_t	hrbRes[2];	// reserved, must be set to 0
+};
+struct	Xor_sg {
+	dma_addr_t	xorPhys;
+	uint64_t	xorBufLen;
+};
+struct	XorHandle {
+	dma_addr_t	xorPhys;
+	uint64_t	xorBufLen;
+	void		*xorVirt;
+};
+
 /*
 *******************************************************************************
 **                 Adapter Control Block
@@ -929,6 +946,7 @@ struct AdapterControlBlock
 	char			firm_model[12];
 	char			firm_version[20];
 	char			device_map[20];			/*21,84-99*/
+	uint32_t		firm_PicStatus;
 	struct work_struct 	arcmsr_do_message_isr_bh;
 	struct timer_list	eternal_timer;
 	unsigned short		fw_flag;
@@ -937,6 +955,7 @@ struct AdapterControlBlock
 #define	FW_DEADLOCK			0x0010
 	uint32_t		maxOutstanding;
 	int			vector_count;
+	int			xor_mega;
 	uint32_t		maxFreeCCB;
 	struct timer_list	refresh_timer;
 	uint32_t		doneq_index;
@@ -946,6 +965,10 @@ struct AdapterControlBlock
 	uint32_t		completionQ_entry;
 	pCompletion_Q		pCompletionQ;
 	uint32_t		completeQ_size;
+	void			*xorVirt;
+	dma_addr_t		xorPhys;
+	unsigned int		init2cfg_size;
+	unsigned int		xorVirtOffset;
 };/* HW_DEVICE_EXTENSION */
 /*
 *******************************************************************************
drivers/scsi/arcmsr/arcmsr_hba.c +89 -1

120 lines not on this page · raw message

Signature · 1 line
2.39.3