diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 15:47:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 15:47:02 -0500 |
commit | da40d036fd716f0efb2917076220814b1e927ae1 (patch) | |
tree | 567893573a48e2954d82421e77606034d3b32f84 /drivers/scsi/megaraid/megaraid_sas.h | |
parent | aa58abc20fa85328a9f048e2626c0893691ff284 (diff) | |
parent | c32e061fa19893ce4acf95d97d5613a161f0f1b7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (147 commits)
[SCSI] arcmsr: fix write to device check
[SCSI] lpfc: lower stack use in lpfc_fc_frame_check
[SCSI] eliminate an unnecessary local variable from scsi_remove_target()
[SCSI] libiscsi: use bh locking instead of irq with session lock
[SCSI] libiscsi: do not take host lock in queuecommand
[SCSI] be2iscsi: fix null ptr when accessing task hdr
[SCSI] be2iscsi: fix gfp use in alloc_pdu
[SCSI] libiscsi: add more informative failure message during iscsi scsi eh
[SCSI] gdth: Add missing call to gdth_ioctl_free
[SCSI] bfa: remove unused defintions and misc cleanups
[SCSI] bfa: remove inactive functions
[SCSI] bfa: replace bfa_assert with WARN_ON
[SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.
[SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout.
[SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.
[SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts.
[SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails on CNAs.
[SCSI] qla2xxx: Remove redundant module parameter permission bits
[SCSI] qla2xxx: Add sysfs node for displaying board temperature.
[SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.
...
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.h')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.h | 78 |
1 files changed, 63 insertions, 15 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index ad16f5e60046..1b5e375732c0 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
@@ -1,15 +1,30 @@ | |||
1 | /* | 1 | /* |
2 | * Linux MegaRAID driver for SAS based RAID controllers | ||
2 | * | 3 | * |
3 | * Linux MegaRAID driver for SAS based RAID controllers | 4 | * Copyright (c) 2009-2011 LSI Corporation. |
4 | * | 5 | * |
5 | * Copyright (c) 2003-2005 LSI Corporation. | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
6 | * | 10 | * |
7 | * This program is free software; you can redistribute it and/or | 11 | * This program is distributed in the hope that it will be useful, |
8 | * modify it under the terms of the GNU General Public License | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 | * as published by the Free Software Foundation; either version | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 | * 2 of the License, or (at your option) any later version. | 14 | * GNU General Public License for more details. |
11 | * | 15 | * |
12 | * FILE : megaraid_sas.h | 16 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | * FILE: megaraid_sas.h | ||
21 | * | ||
22 | * Authors: LSI Corporation | ||
23 | * | ||
24 | * Send feedback to: <megaraidlinux@lsi.com> | ||
25 | * | ||
26 | * Mail to: LSI Corporation, 1621 Barber Lane, Milpitas, CA 95035 | ||
27 | * ATTN: Linuxraid | ||
13 | */ | 28 | */ |
14 | 29 | ||
15 | #ifndef LSI_MEGARAID_SAS_H | 30 | #ifndef LSI_MEGARAID_SAS_H |
@@ -18,9 +33,9 @@ | |||
18 | /* | 33 | /* |
19 | * MegaRAID SAS Driver meta data | 34 | * MegaRAID SAS Driver meta data |
20 | */ | 35 | */ |
21 | #define MEGASAS_VERSION "00.00.04.31-rc1" | 36 | #define MEGASAS_VERSION "00.00.05.29-rc1" |
22 | #define MEGASAS_RELDATE "May 3, 2010" | 37 | #define MEGASAS_RELDATE "Dec. 7, 2010" |
23 | #define MEGASAS_EXT_VERSION "Mon. May 3, 11:41:51 PST 2010" | 38 | #define MEGASAS_EXT_VERSION "Tue. Dec. 7 17:00:00 PDT 2010" |
24 | 39 | ||
25 | /* | 40 | /* |
26 | * Device IDs | 41 | * Device IDs |
@@ -32,6 +47,7 @@ | |||
32 | #define PCI_DEVICE_ID_LSI_SAS0079GEN2 0x0079 | 47 | #define PCI_DEVICE_ID_LSI_SAS0079GEN2 0x0079 |
33 | #define PCI_DEVICE_ID_LSI_SAS0073SKINNY 0x0073 | 48 | #define PCI_DEVICE_ID_LSI_SAS0073SKINNY 0x0073 |
34 | #define PCI_DEVICE_ID_LSI_SAS0071SKINNY 0x0071 | 49 | #define PCI_DEVICE_ID_LSI_SAS0071SKINNY 0x0071 |
50 | #define PCI_DEVICE_ID_LSI_FUSION 0x005b | ||
35 | 51 | ||
36 | /* | 52 | /* |
37 | * ===================================== | 53 | * ===================================== |
@@ -421,7 +437,6 @@ struct megasas_ctrl_prop { | |||
421 | * Add properties that can be controlled by | 437 | * Add properties that can be controlled by |
422 | * a bit in the following structure. | 438 | * a bit in the following structure. |
423 | */ | 439 | */ |
424 | |||
425 | struct { | 440 | struct { |
426 | u32 copyBackDisabled : 1; | 441 | u32 copyBackDisabled : 1; |
427 | u32 SMARTerEnabled : 1; | 442 | u32 SMARTerEnabled : 1; |
@@ -701,6 +716,7 @@ struct megasas_ctrl_info { | |||
701 | #define MEGASAS_DEFAULT_INIT_ID -1 | 716 | #define MEGASAS_DEFAULT_INIT_ID -1 |
702 | #define MEGASAS_MAX_LUN 8 | 717 | #define MEGASAS_MAX_LUN 8 |
703 | #define MEGASAS_MAX_LD 64 | 718 | #define MEGASAS_MAX_LD 64 |
719 | #define MEGASAS_DEFAULT_CMD_PER_LUN 128 | ||
704 | #define MEGASAS_MAX_PD (MEGASAS_MAX_PD_CHANNELS * \ | 720 | #define MEGASAS_MAX_PD (MEGASAS_MAX_PD_CHANNELS * \ |
705 | MEGASAS_MAX_DEV_PER_CHANNEL) | 721 | MEGASAS_MAX_DEV_PER_CHANNEL) |
706 | #define MEGASAS_MAX_LD_IDS (MEGASAS_MAX_LD_CHANNELS * \ | 722 | #define MEGASAS_MAX_LD_IDS (MEGASAS_MAX_LD_CHANNELS * \ |
@@ -769,7 +785,10 @@ struct megasas_ctrl_info { | |||
769 | */ | 785 | */ |
770 | 786 | ||
771 | struct megasas_register_set { | 787 | struct megasas_register_set { |
772 | u32 reserved_0[4]; /*0000h*/ | 788 | u32 doorbell; /*0000h*/ |
789 | u32 fusion_seq_offset; /*0004h*/ | ||
790 | u32 fusion_host_diag; /*0008h*/ | ||
791 | u32 reserved_01; /*000Ch*/ | ||
773 | 792 | ||
774 | u32 inbound_msg_0; /*0010h*/ | 793 | u32 inbound_msg_0; /*0010h*/ |
775 | u32 inbound_msg_1; /*0014h*/ | 794 | u32 inbound_msg_1; /*0014h*/ |
@@ -789,15 +808,18 @@ struct megasas_register_set { | |||
789 | u32 inbound_queue_port; /*0040h*/ | 808 | u32 inbound_queue_port; /*0040h*/ |
790 | u32 outbound_queue_port; /*0044h*/ | 809 | u32 outbound_queue_port; /*0044h*/ |
791 | 810 | ||
792 | u32 reserved_2[22]; /*0048h*/ | 811 | u32 reserved_2[9]; /*0048h*/ |
812 | u32 reply_post_host_index; /*006Ch*/ | ||
813 | u32 reserved_2_2[12]; /*0070h*/ | ||
793 | 814 | ||
794 | u32 outbound_doorbell_clear; /*00A0h*/ | 815 | u32 outbound_doorbell_clear; /*00A0h*/ |
795 | 816 | ||
796 | u32 reserved_3[3]; /*00A4h*/ | 817 | u32 reserved_3[3]; /*00A4h*/ |
797 | 818 | ||
798 | u32 outbound_scratch_pad ; /*00B0h*/ | 819 | u32 outbound_scratch_pad ; /*00B0h*/ |
820 | u32 outbound_scratch_pad_2; /*00B4h*/ | ||
799 | 821 | ||
800 | u32 reserved_4[3]; /*00B4h*/ | 822 | u32 reserved_4[2]; /*00B8h*/ |
801 | 823 | ||
802 | u32 inbound_low_queue_port ; /*00C0h*/ | 824 | u32 inbound_low_queue_port ; /*00C0h*/ |
803 | 825 | ||
@@ -1272,6 +1294,9 @@ struct megasas_instance { | |||
1272 | 1294 | ||
1273 | u16 max_num_sge; | 1295 | u16 max_num_sge; |
1274 | u16 max_fw_cmds; | 1296 | u16 max_fw_cmds; |
1297 | /* For Fusion its num IOCTL cmds, for others MFI based its | ||
1298 | max_fw_cmds */ | ||
1299 | u16 max_mfi_cmds; | ||
1275 | u32 max_sectors_per_req; | 1300 | u32 max_sectors_per_req; |
1276 | struct megasas_aen_event *ev; | 1301 | struct megasas_aen_event *ev; |
1277 | 1302 | ||
@@ -1320,6 +1345,16 @@ struct megasas_instance { | |||
1320 | 1345 | ||
1321 | struct timer_list io_completion_timer; | 1346 | struct timer_list io_completion_timer; |
1322 | struct list_head internal_reset_pending_q; | 1347 | struct list_head internal_reset_pending_q; |
1348 | |||
1349 | /* Ptr to hba specfic information */ | ||
1350 | void *ctrl_context; | ||
1351 | u8 msi_flag; | ||
1352 | struct msix_entry msixentry; | ||
1353 | u64 map_id; | ||
1354 | struct megasas_cmd *map_update_cmd; | ||
1355 | unsigned long bar; | ||
1356 | long reset_flags; | ||
1357 | struct mutex reset_mutex; | ||
1323 | }; | 1358 | }; |
1324 | 1359 | ||
1325 | enum { | 1360 | enum { |
@@ -1345,6 +1380,13 @@ struct megasas_instance_template { | |||
1345 | struct megasas_register_set __iomem *); | 1380 | struct megasas_register_set __iomem *); |
1346 | int (*check_reset)(struct megasas_instance *, \ | 1381 | int (*check_reset)(struct megasas_instance *, \ |
1347 | struct megasas_register_set __iomem *); | 1382 | struct megasas_register_set __iomem *); |
1383 | irqreturn_t (*service_isr)(int irq, void *devp); | ||
1384 | void (*tasklet)(unsigned long); | ||
1385 | u32 (*init_adapter)(struct megasas_instance *); | ||
1386 | u32 (*build_and_issue_cmd) (struct megasas_instance *, | ||
1387 | struct scsi_cmnd *); | ||
1388 | void (*issue_dcmd) (struct megasas_instance *instance, | ||
1389 | struct megasas_cmd *cmd); | ||
1348 | }; | 1390 | }; |
1349 | 1391 | ||
1350 | #define MEGASAS_IS_LOGICAL(scp) \ | 1392 | #define MEGASAS_IS_LOGICAL(scp) \ |
@@ -1371,7 +1413,13 @@ struct megasas_cmd { | |||
1371 | struct list_head list; | 1413 | struct list_head list; |
1372 | struct scsi_cmnd *scmd; | 1414 | struct scsi_cmnd *scmd; |
1373 | struct megasas_instance *instance; | 1415 | struct megasas_instance *instance; |
1374 | u32 frame_count; | 1416 | union { |
1417 | struct { | ||
1418 | u16 smid; | ||
1419 | u16 resvd; | ||
1420 | } context; | ||
1421 | u32 frame_count; | ||
1422 | }; | ||
1375 | }; | 1423 | }; |
1376 | 1424 | ||
1377 | #define MAX_MGMT_ADAPTERS 1024 | 1425 | #define MAX_MGMT_ADAPTERS 1024 |