Skip to content

Commit

Permalink
[SCSI] megaraid_sas: Add 9565/9285 specific code
Browse files Browse the repository at this point in the history
This patch adds MegaRAID 9265/9285 (Device id 0x5b) specific code

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
adam radford authored and James Bottomley committed Dec 23, 2010
1 parent cd50ba8 commit 9c915a8
Show file tree
Hide file tree
Showing 6 changed files with 3,751 additions and 111 deletions.
3 changes: 2 additions & 1 deletion drivers/scsi/megaraid/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
obj-$(CONFIG_MEGARAID_MM) += megaraid_mm.o
obj-$(CONFIG_MEGARAID_MAILBOX) += megaraid_mbox.o
obj-$(CONFIG_MEGARAID_SAS) += megaraid_sas.o
megaraid_sas-objs := megaraid_sas_base.o
megaraid_sas-objs := megaraid_sas_base.o megaraid_sas_fusion.o \
megaraid_sas_fp.o
38 changes: 30 additions & 8 deletions drivers/scsi/megaraid/megaraid_sas.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
/*
* MegaRAID SAS Driver meta data
*/
#define MEGASAS_VERSION "00.00.04.31-rc1"
#define MEGASAS_RELDATE "May 3, 2010"
#define MEGASAS_EXT_VERSION "Mon. May 3, 11:41:51 PST 2010"
#define MEGASAS_VERSION "00.00.05.29-rc1"
#define MEGASAS_RELDATE "Dec. 7, 2010"
#define MEGASAS_EXT_VERSION "Tue. Dec. 7 17:00:00 PDT 2010"

/*
* Device IDs
Expand All @@ -47,6 +47,7 @@
#define PCI_DEVICE_ID_LSI_SAS0079GEN2 0x0079
#define PCI_DEVICE_ID_LSI_SAS0073SKINNY 0x0073
#define PCI_DEVICE_ID_LSI_SAS0071SKINNY 0x0071
#define PCI_DEVICE_ID_LSI_FUSION 0x005b

/*
* =====================================
Expand Down Expand Up @@ -436,7 +437,6 @@ struct megasas_ctrl_prop {
* Add properties that can be controlled by
* a bit in the following structure.
*/

struct {
u32 copyBackDisabled : 1;
u32 SMARTerEnabled : 1;
Expand Down Expand Up @@ -716,6 +716,7 @@ struct megasas_ctrl_info {
#define MEGASAS_DEFAULT_INIT_ID -1
#define MEGASAS_MAX_LUN 8
#define MEGASAS_MAX_LD 64
#define MEGASAS_DEFAULT_CMD_PER_LUN 128
#define MEGASAS_MAX_PD (MEGASAS_MAX_PD_CHANNELS * \
MEGASAS_MAX_DEV_PER_CHANNEL)
#define MEGASAS_MAX_LD_IDS (MEGASAS_MAX_LD_CHANNELS * \
Expand Down Expand Up @@ -784,7 +785,10 @@ struct megasas_ctrl_info {
*/

struct megasas_register_set {
u32 reserved_0[4]; /*0000h*/
u32 doorbell; /*0000h*/
u32 fusion_seq_offset; /*0004h*/
u32 fusion_host_diag; /*0008h*/
u32 reserved_01; /*000Ch*/

u32 inbound_msg_0; /*0010h*/
u32 inbound_msg_1; /*0014h*/
Expand All @@ -804,15 +808,18 @@ struct megasas_register_set {
u32 inbound_queue_port; /*0040h*/
u32 outbound_queue_port; /*0044h*/

u32 reserved_2[22]; /*0048h*/
u32 reserved_2[9]; /*0048h*/
u32 reply_post_host_index; /*006Ch*/
u32 reserved_2_2[12]; /*0070h*/

u32 outbound_doorbell_clear; /*00A0h*/

u32 reserved_3[3]; /*00A4h*/

u32 outbound_scratch_pad ; /*00B0h*/
u32 outbound_scratch_pad_2; /*00B4h*/

u32 reserved_4[3]; /*00B4h*/
u32 reserved_4[2]; /*00B8h*/

u32 inbound_low_queue_port ; /*00C0h*/

Expand Down Expand Up @@ -1287,6 +1294,9 @@ struct megasas_instance {

u16 max_num_sge;
u16 max_fw_cmds;
/* For Fusion its num IOCTL cmds, for others MFI based its
max_fw_cmds */
u16 max_mfi_cmds;
u32 max_sectors_per_req;
struct megasas_aen_event *ev;

Expand Down Expand Up @@ -1336,9 +1346,15 @@ struct megasas_instance {
struct timer_list io_completion_timer;
struct list_head internal_reset_pending_q;

/* Ptr to hba specfic information */
void *ctrl_context;
u8 msi_flag;
struct msix_entry msixentry;
u64 map_id;
struct megasas_cmd *map_update_cmd;
unsigned long bar;
long reset_flags;
struct mutex reset_mutex;
};

enum {
Expand Down Expand Up @@ -1397,7 +1413,13 @@ struct megasas_cmd {
struct list_head list;
struct scsi_cmnd *scmd;
struct megasas_instance *instance;
u32 frame_count;
union {
struct {
u16 smid;
u16 resvd;
} context;
u32 frame_count;
};
};

#define MAX_MGMT_ADAPTERS 1024
Expand Down
Loading

0 comments on commit 9c915a8

Please sign in to comment.