Commit 01585964 authored by Mark Haverkamp's avatar Mark Haverkamp Committed by Christoph Hellwig

[PATCH] megaraid driver update

This is a patch for the megaraid driver that splits the mbox_t structure
into two sections.  The raw_mbox automatics are sized based on the
mbox_out part.  This saves quite a few bytes on the stack (for the
raw_mbox arrays) and limits the amount of bytes in the mbox_t structure
that are cleared.

In issue_scb_block, I changed setting the cmdid and busy elements from
being set in the raw_mbox to being set in the mbox itself after the
memcpy.
parent 533b1217
This diff is collapsed.
......@@ -120,8 +120,7 @@
#define NVIRT_CHAN 4 /* # of virtual channels to represent
up to 60 logical drives */
typedef struct {
struct mbox_out {
/* 0x0 */ u8 cmd;
/* 0x1 */ u8 cmdid;
/* 0x2 */ u16 numsectors;
......@@ -130,12 +129,20 @@ typedef struct {
/* 0xC */ u8 logdrv;
/* 0xD */ u8 numsgelements;
/* 0xE */ u8 resvd;
} __attribute__ ((packed));
struct mbox_in {
/* 0xF */ volatile u8 busy;
/* 0x10 */ volatile u8 numstatus;
/* 0x11 */ volatile u8 status;
/* 0x12 */ volatile u8 completed[MAX_FIRMWARE_STATUS];
volatile u8 poll;
volatile u8 ack;
} __attribute__ ((packed));
typedef struct {
struct mbox_out m_out;
struct mbox_in m_in;
} __attribute__ ((packed)) mbox_t;
typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment