diff options
Diffstat (limited to 'drivers/scsi/bfa/include')
101 files changed, 0 insertions, 14144 deletions
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen.h b/drivers/scsi/bfa/include/aen/bfa_aen.h deleted file mode 100644 index 6abbab005db6..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen.h +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_AEN_H__ | ||
18 | #define __BFA_AEN_H__ | ||
19 | |||
20 | #include "defs/bfa_defs_aen.h" | ||
21 | #include "defs/bfa_defs_status.h" | ||
22 | #include "cs/bfa_debug.h" | ||
23 | |||
24 | #define BFA_AEN_MAX_ENTRY 512 | ||
25 | |||
26 | extern int bfa_aen_max_cfg_entry; | ||
27 | struct bfa_aen_s { | ||
28 | void *bfad; | ||
29 | int max_entry; | ||
30 | int write_index; | ||
31 | int read_index; | ||
32 | int bfad_num; | ||
33 | int seq_num; | ||
34 | void (*aen_cb_notify)(void *bfad); | ||
35 | void (*gettimeofday)(struct bfa_timeval_s *tv); | ||
36 | struct bfa_trc_mod_s *trcmod; | ||
37 | int app_ri[BFA_AEN_MAX_APP]; /* For multiclient support */ | ||
38 | struct bfa_aen_entry_s list[BFA_AEN_MAX_ENTRY]; /* Must be the last */ | ||
39 | }; | ||
40 | |||
41 | |||
42 | /** | ||
43 | * Public APIs | ||
44 | */ | ||
45 | static inline void | ||
46 | bfa_aen_set_max_cfg_entry(int max_entry) | ||
47 | { | ||
48 | bfa_aen_max_cfg_entry = max_entry; | ||
49 | } | ||
50 | |||
51 | static inline int | ||
52 | bfa_aen_get_max_cfg_entry(void) | ||
53 | { | ||
54 | return bfa_aen_max_cfg_entry; | ||
55 | } | ||
56 | |||
57 | static inline int | ||
58 | bfa_aen_get_meminfo(void) | ||
59 | { | ||
60 | return sizeof(struct bfa_aen_entry_s) * bfa_aen_get_max_cfg_entry(); | ||
61 | } | ||
62 | |||
63 | static inline int | ||
64 | bfa_aen_get_wi(struct bfa_aen_s *aen) | ||
65 | { | ||
66 | return aen->write_index; | ||
67 | } | ||
68 | |||
69 | static inline int | ||
70 | bfa_aen_get_ri(struct bfa_aen_s *aen) | ||
71 | { | ||
72 | return aen->read_index; | ||
73 | } | ||
74 | |||
75 | static inline int | ||
76 | bfa_aen_fetch_count(struct bfa_aen_s *aen, enum bfa_aen_app app_id) | ||
77 | { | ||
78 | bfa_assert((app_id < BFA_AEN_MAX_APP) && (app_id >= bfa_aen_app_bcu)); | ||
79 | return ((aen->write_index + aen->max_entry) - aen->app_ri[app_id]) | ||
80 | % aen->max_entry; | ||
81 | } | ||
82 | |||
83 | int bfa_aen_init(struct bfa_aen_s *aen, struct bfa_trc_mod_s *trcmod, | ||
84 | void *bfad, int bfad_num, void (*aen_cb_notify)(void *), | ||
85 | void (*gettimeofday)(struct bfa_timeval_s *)); | ||
86 | |||
87 | void bfa_aen_post(struct bfa_aen_s *aen, enum bfa_aen_category aen_category, | ||
88 | int aen_type, union bfa_aen_data_u *aen_data); | ||
89 | |||
90 | bfa_status_t bfa_aen_fetch(struct bfa_aen_s *aen, | ||
91 | struct bfa_aen_entry_s *aen_entry, | ||
92 | int entry_req, enum bfa_aen_app app_id, int *entry_ret); | ||
93 | |||
94 | int bfa_aen_get_inst(struct bfa_aen_s *aen); | ||
95 | |||
96 | #endif /* __BFA_AEN_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_adapter.h b/drivers/scsi/bfa/include/aen/bfa_aen_adapter.h deleted file mode 100644 index 260d3ea1cab3..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_adapter.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_ADAPTER Module */ | ||
19 | #ifndef __bfa_aen_adapter_h__ | ||
20 | #define __bfa_aen_adapter_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_ADAPTER_ADD \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ADAPTER, BFA_ADAPTER_AEN_ADD) | ||
27 | #define BFA_AEN_ADAPTER_REMOVE \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ADAPTER, BFA_ADAPTER_AEN_REMOVE) | ||
29 | |||
30 | #endif | ||
31 | |||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_audit.h b/drivers/scsi/bfa/include/aen/bfa_aen_audit.h deleted file mode 100644 index 12cd7aab5d53..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_audit.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_AUDIT Module */ | ||
19 | #ifndef __bfa_aen_audit_h__ | ||
20 | #define __bfa_aen_audit_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_AUDIT_AUTH_ENABLE \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_AUDIT, BFA_AUDIT_AEN_AUTH_ENABLE) | ||
27 | #define BFA_AEN_AUDIT_AUTH_DISABLE \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_AUDIT, BFA_AUDIT_AEN_AUTH_DISABLE) | ||
29 | |||
30 | #endif | ||
31 | |||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_ethport.h b/drivers/scsi/bfa/include/aen/bfa_aen_ethport.h deleted file mode 100644 index 507d0b58d149..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_ethport.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_ETHPORT Module */ | ||
19 | #ifndef __bfa_aen_ethport_h__ | ||
20 | #define __bfa_aen_ethport_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_ETHPORT_LINKUP \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ETHPORT, BFA_ETHPORT_AEN_LINKUP) | ||
27 | #define BFA_AEN_ETHPORT_LINKDOWN \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ETHPORT, BFA_ETHPORT_AEN_LINKDOWN) | ||
29 | #define BFA_AEN_ETHPORT_ENABLE \ | ||
30 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ETHPORT, BFA_ETHPORT_AEN_ENABLE) | ||
31 | #define BFA_AEN_ETHPORT_DISABLE \ | ||
32 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ETHPORT, BFA_ETHPORT_AEN_DISABLE) | ||
33 | |||
34 | #endif | ||
35 | |||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_ioc.h b/drivers/scsi/bfa/include/aen/bfa_aen_ioc.h deleted file mode 100644 index 4daf96faa266..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_ioc.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_IOC Module */ | ||
19 | #ifndef __bfa_aen_ioc_h__ | ||
20 | #define __bfa_aen_ioc_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_IOC_HBGOOD \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_HBGOOD) | ||
27 | #define BFA_AEN_IOC_HBFAIL \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_HBFAIL) | ||
29 | #define BFA_AEN_IOC_ENABLE \ | ||
30 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_ENABLE) | ||
31 | #define BFA_AEN_IOC_DISABLE \ | ||
32 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_DISABLE) | ||
33 | #define BFA_AEN_IOC_FWMISMATCH \ | ||
34 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_FWMISMATCH) | ||
35 | #define BFA_AEN_IOC_FWCFG_ERROR \ | ||
36 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_FWCFG_ERROR) | ||
37 | #define BFA_AEN_IOC_INVALID_VENDOR \ | ||
38 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_INVALID_VENDOR) | ||
39 | #define BFA_AEN_IOC_INVALID_NWWN \ | ||
40 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_INVALID_NWWN) | ||
41 | #define BFA_AEN_IOC_INVALID_PWWN \ | ||
42 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_IOC, BFA_IOC_AEN_INVALID_PWWN) | ||
43 | |||
44 | #endif | ||
45 | |||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_itnim.h b/drivers/scsi/bfa/include/aen/bfa_aen_itnim.h deleted file mode 100644 index a7d8ddcfef99..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_itnim.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_ITNIM Module */ | ||
19 | #ifndef __bfa_aen_itnim_h__ | ||
20 | #define __bfa_aen_itnim_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_ITNIM_ONLINE \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ITNIM, BFA_ITNIM_AEN_ONLINE) | ||
27 | #define BFA_AEN_ITNIM_OFFLINE \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ITNIM, BFA_ITNIM_AEN_OFFLINE) | ||
29 | #define BFA_AEN_ITNIM_DISCONNECT \ | ||
30 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_ITNIM, BFA_ITNIM_AEN_DISCONNECT) | ||
31 | |||
32 | #endif | ||
33 | |||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_lport.h b/drivers/scsi/bfa/include/aen/bfa_aen_lport.h deleted file mode 100644 index 5a8ebb65193f..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_lport.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_LPORT Module */ | ||
19 | #ifndef __bfa_aen_lport_h__ | ||
20 | #define __bfa_aen_lport_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_LPORT_NEW \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_NEW) | ||
27 | #define BFA_AEN_LPORT_DELETE \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_DELETE) | ||
29 | #define BFA_AEN_LPORT_ONLINE \ | ||
30 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_ONLINE) | ||
31 | #define BFA_AEN_LPORT_OFFLINE \ | ||
32 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_OFFLINE) | ||
33 | #define BFA_AEN_LPORT_DISCONNECT \ | ||
34 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_DISCONNECT) | ||
35 | #define BFA_AEN_LPORT_NEW_PROP \ | ||
36 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_NEW_PROP) | ||
37 | #define BFA_AEN_LPORT_DELETE_PROP \ | ||
38 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_DELETE_PROP) | ||
39 | #define BFA_AEN_LPORT_NEW_STANDARD \ | ||
40 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_NEW_STANDARD) | ||
41 | #define BFA_AEN_LPORT_DELETE_STANDARD \ | ||
42 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_DELETE_STANDARD) | ||
43 | #define BFA_AEN_LPORT_NPIV_DUP_WWN \ | ||
44 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_NPIV_DUP_WWN) | ||
45 | #define BFA_AEN_LPORT_NPIV_FABRIC_MAX \ | ||
46 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_NPIV_FABRIC_MAX) | ||
47 | #define BFA_AEN_LPORT_NPIV_UNKNOWN \ | ||
48 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_LPORT, BFA_LPORT_AEN_NPIV_UNKNOWN) | ||
49 | |||
50 | #endif | ||
51 | |||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_port.h b/drivers/scsi/bfa/include/aen/bfa_aen_port.h deleted file mode 100644 index 9add905a622d..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_port.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_PORT Module */ | ||
19 | #ifndef __bfa_aen_port_h__ | ||
20 | #define __bfa_aen_port_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_PORT_ONLINE \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_ONLINE) | ||
27 | #define BFA_AEN_PORT_OFFLINE \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_OFFLINE) | ||
29 | #define BFA_AEN_PORT_RLIR \ | ||
30 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_RLIR) | ||
31 | #define BFA_AEN_PORT_SFP_INSERT \ | ||
32 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_SFP_INSERT) | ||
33 | #define BFA_AEN_PORT_SFP_REMOVE \ | ||
34 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_SFP_REMOVE) | ||
35 | #define BFA_AEN_PORT_SFP_POM \ | ||
36 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_SFP_POM) | ||
37 | #define BFA_AEN_PORT_ENABLE \ | ||
38 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_ENABLE) | ||
39 | #define BFA_AEN_PORT_DISABLE \ | ||
40 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_DISABLE) | ||
41 | #define BFA_AEN_PORT_AUTH_ON \ | ||
42 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_AUTH_ON) | ||
43 | #define BFA_AEN_PORT_AUTH_OFF \ | ||
44 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_AUTH_OFF) | ||
45 | #define BFA_AEN_PORT_DISCONNECT \ | ||
46 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_DISCONNECT) | ||
47 | #define BFA_AEN_PORT_QOS_NEG \ | ||
48 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_QOS_NEG) | ||
49 | #define BFA_AEN_PORT_FABRIC_NAME_CHANGE \ | ||
50 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_FABRIC_NAME_CHANGE) | ||
51 | #define BFA_AEN_PORT_SFP_ACCESS_ERROR \ | ||
52 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_SFP_ACCESS_ERROR) | ||
53 | #define BFA_AEN_PORT_SFP_UNSUPPORT \ | ||
54 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_PORT, BFA_PORT_AEN_SFP_UNSUPPORT) | ||
55 | |||
56 | #endif | ||
57 | |||
diff --git a/drivers/scsi/bfa/include/aen/bfa_aen_rport.h b/drivers/scsi/bfa/include/aen/bfa_aen_rport.h deleted file mode 100644 index 7e4be1fd5e15..000000000000 --- a/drivers/scsi/bfa/include/aen/bfa_aen_rport.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for BFA_AEN_CAT_RPORT Module */ | ||
19 | #ifndef __bfa_aen_rport_h__ | ||
20 | #define __bfa_aen_rport_h__ | ||
21 | |||
22 | #include <cs/bfa_log.h> | ||
23 | #include <defs/bfa_defs_aen.h> | ||
24 | |||
25 | #define BFA_AEN_RPORT_ONLINE \ | ||
26 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_RPORT, BFA_RPORT_AEN_ONLINE) | ||
27 | #define BFA_AEN_RPORT_OFFLINE \ | ||
28 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_RPORT, BFA_RPORT_AEN_OFFLINE) | ||
29 | #define BFA_AEN_RPORT_DISCONNECT \ | ||
30 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_RPORT, BFA_RPORT_AEN_DISCONNECT) | ||
31 | #define BFA_AEN_RPORT_QOS_PRIO \ | ||
32 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_RPORT, BFA_RPORT_AEN_QOS_PRIO) | ||
33 | #define BFA_AEN_RPORT_QOS_FLOWID \ | ||
34 | BFA_LOG_CREATE_ID(BFA_AEN_CAT_RPORT, BFA_RPORT_AEN_QOS_FLOWID) | ||
35 | |||
36 | #endif | ||
37 | |||
diff --git a/drivers/scsi/bfa/include/bfa.h b/drivers/scsi/bfa/include/bfa.h deleted file mode 100644 index d52b32f5695c..000000000000 --- a/drivers/scsi/bfa/include/bfa.h +++ /dev/null | |||
@@ -1,203 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_H__ | ||
18 | #define __BFA_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | #include <cs/bfa_debug.h> | ||
22 | #include <cs/bfa_q.h> | ||
23 | #include <cs/bfa_trc.h> | ||
24 | #include <cs/bfa_log.h> | ||
25 | #include <cs/bfa_plog.h> | ||
26 | #include <defs/bfa_defs_status.h> | ||
27 | #include <defs/bfa_defs_ioc.h> | ||
28 | #include <defs/bfa_defs_iocfc.h> | ||
29 | #include <aen/bfa_aen.h> | ||
30 | #include <bfi/bfi.h> | ||
31 | |||
32 | struct bfa_s; | ||
33 | #include <bfa_intr_priv.h> | ||
34 | |||
35 | struct bfa_pcidev_s; | ||
36 | |||
37 | /** | ||
38 | * PCI devices supported by the current BFA | ||
39 | */ | ||
40 | struct bfa_pciid_s { | ||
41 | u16 device_id; | ||
42 | u16 vendor_id; | ||
43 | }; | ||
44 | |||
45 | extern char bfa_version[]; | ||
46 | |||
47 | /** | ||
48 | * BFA Power Mgmt Commands | ||
49 | */ | ||
50 | enum bfa_pm_cmd { | ||
51 | BFA_PM_CTL_D0 = 0, | ||
52 | BFA_PM_CTL_D1 = 1, | ||
53 | BFA_PM_CTL_D2 = 2, | ||
54 | BFA_PM_CTL_D3 = 3, | ||
55 | }; | ||
56 | |||
57 | /** | ||
58 | * BFA memory resources | ||
59 | */ | ||
60 | enum bfa_mem_type { | ||
61 | BFA_MEM_TYPE_KVA = 1, /*! Kernel Virtual Memory *(non-dma-able) */ | ||
62 | BFA_MEM_TYPE_DMA = 2, /*! DMA-able memory */ | ||
63 | BFA_MEM_TYPE_MAX = BFA_MEM_TYPE_DMA, | ||
64 | }; | ||
65 | |||
66 | struct bfa_mem_elem_s { | ||
67 | enum bfa_mem_type mem_type; /* see enum bfa_mem_type */ | ||
68 | u32 mem_len; /* Total Length in Bytes */ | ||
69 | u8 *kva; /* kernel virtual address */ | ||
70 | u64 dma; /* dma address if DMA memory */ | ||
71 | u8 *kva_curp; /* kva allocation cursor */ | ||
72 | u64 dma_curp; /* dma allocation cursor */ | ||
73 | }; | ||
74 | |||
75 | struct bfa_meminfo_s { | ||
76 | struct bfa_mem_elem_s meminfo[BFA_MEM_TYPE_MAX]; | ||
77 | }; | ||
78 | #define bfa_meminfo_kva(_m) \ | ||
79 | ((_m)->meminfo[BFA_MEM_TYPE_KVA - 1].kva_curp) | ||
80 | #define bfa_meminfo_dma_virt(_m) \ | ||
81 | ((_m)->meminfo[BFA_MEM_TYPE_DMA - 1].kva_curp) | ||
82 | #define bfa_meminfo_dma_phys(_m) \ | ||
83 | ((_m)->meminfo[BFA_MEM_TYPE_DMA - 1].dma_curp) | ||
84 | |||
85 | /** | ||
86 | * Generic Scatter Gather Element used by driver | ||
87 | */ | ||
88 | struct bfa_sge_s { | ||
89 | u32 sg_len; | ||
90 | void *sg_addr; | ||
91 | }; | ||
92 | |||
93 | #define bfa_sge_to_be(__sge) do { \ | ||
94 | ((u32 *)(__sge))[0] = bfa_os_htonl(((u32 *)(__sge))[0]); \ | ||
95 | ((u32 *)(__sge))[1] = bfa_os_htonl(((u32 *)(__sge))[1]); \ | ||
96 | ((u32 *)(__sge))[2] = bfa_os_htonl(((u32 *)(__sge))[2]); \ | ||
97 | } while (0) | ||
98 | |||
99 | |||
100 | /* | ||
101 | * bfa stats interfaces | ||
102 | */ | ||
103 | #define bfa_stats(_mod, _stats) ((_mod)->stats._stats++) | ||
104 | |||
105 | #define bfa_ioc_get_stats(__bfa, __ioc_stats) \ | ||
106 | bfa_ioc_fetch_stats(&(__bfa)->ioc, __ioc_stats) | ||
107 | #define bfa_ioc_clear_stats(__bfa) \ | ||
108 | bfa_ioc_clr_stats(&(__bfa)->ioc) | ||
109 | #define bfa_get_nports(__bfa) \ | ||
110 | bfa_ioc_get_nports(&(__bfa)->ioc) | ||
111 | #define bfa_get_adapter_manufacturer(__bfa, __manufacturer) \ | ||
112 | bfa_ioc_get_adapter_manufacturer(&(__bfa)->ioc, __manufacturer) | ||
113 | #define bfa_get_adapter_model(__bfa, __model) \ | ||
114 | bfa_ioc_get_adapter_model(&(__bfa)->ioc, __model) | ||
115 | #define bfa_get_adapter_serial_num(__bfa, __serial_num) \ | ||
116 | bfa_ioc_get_adapter_serial_num(&(__bfa)->ioc, __serial_num) | ||
117 | #define bfa_get_adapter_fw_ver(__bfa, __fw_ver) \ | ||
118 | bfa_ioc_get_adapter_fw_ver(&(__bfa)->ioc, __fw_ver) | ||
119 | #define bfa_get_adapter_optrom_ver(__bfa, __optrom_ver) \ | ||
120 | bfa_ioc_get_adapter_optrom_ver(&(__bfa)->ioc, __optrom_ver) | ||
121 | #define bfa_get_pci_chip_rev(__bfa, __chip_rev) \ | ||
122 | bfa_ioc_get_pci_chip_rev(&(__bfa)->ioc, __chip_rev) | ||
123 | #define bfa_get_ioc_state(__bfa) \ | ||
124 | bfa_ioc_get_state(&(__bfa)->ioc) | ||
125 | #define bfa_get_type(__bfa) \ | ||
126 | bfa_ioc_get_type(&(__bfa)->ioc) | ||
127 | #define bfa_get_mac(__bfa) \ | ||
128 | bfa_ioc_get_mac(&(__bfa)->ioc) | ||
129 | #define bfa_get_mfg_mac(__bfa) \ | ||
130 | bfa_ioc_get_mfg_mac(&(__bfa)->ioc) | ||
131 | #define bfa_get_fw_clock_res(__bfa) \ | ||
132 | ((__bfa)->iocfc.cfgrsp->fwcfg.fw_tick_res) | ||
133 | |||
134 | /* | ||
135 | * bfa API functions | ||
136 | */ | ||
137 | void bfa_get_pciids(struct bfa_pciid_s **pciids, int *npciids); | ||
138 | void bfa_cfg_get_default(struct bfa_iocfc_cfg_s *cfg); | ||
139 | void bfa_cfg_get_min(struct bfa_iocfc_cfg_s *cfg); | ||
140 | void bfa_cfg_get_meminfo(struct bfa_iocfc_cfg_s *cfg, | ||
141 | struct bfa_meminfo_s *meminfo); | ||
142 | void bfa_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | ||
143 | struct bfa_meminfo_s *meminfo, | ||
144 | struct bfa_pcidev_s *pcidev); | ||
145 | void bfa_init_trc(struct bfa_s *bfa, struct bfa_trc_mod_s *trcmod); | ||
146 | void bfa_init_log(struct bfa_s *bfa, struct bfa_log_mod_s *logmod); | ||
147 | void bfa_init_aen(struct bfa_s *bfa, struct bfa_aen_s *aen); | ||
148 | void bfa_init_plog(struct bfa_s *bfa, struct bfa_plog_s *plog); | ||
149 | void bfa_detach(struct bfa_s *bfa); | ||
150 | void bfa_init(struct bfa_s *bfa); | ||
151 | void bfa_start(struct bfa_s *bfa); | ||
152 | void bfa_stop(struct bfa_s *bfa); | ||
153 | void bfa_attach_fcs(struct bfa_s *bfa); | ||
154 | void bfa_cb_init(void *bfad, bfa_status_t status); | ||
155 | void bfa_cb_stop(void *bfad, bfa_status_t status); | ||
156 | void bfa_cb_updateq(void *bfad, bfa_status_t status); | ||
157 | |||
158 | bfa_boolean_t bfa_intx(struct bfa_s *bfa); | ||
159 | void bfa_isr_enable(struct bfa_s *bfa); | ||
160 | void bfa_isr_disable(struct bfa_s *bfa); | ||
161 | void bfa_msix_getvecs(struct bfa_s *bfa, u32 *msix_vecs_bmap, | ||
162 | u32 *num_vecs, u32 *max_vec_bit); | ||
163 | #define bfa_msix(__bfa, __vec) ((__bfa)->msix.handler[__vec](__bfa, __vec)) | ||
164 | |||
165 | void bfa_comp_deq(struct bfa_s *bfa, struct list_head *comp_q); | ||
166 | void bfa_comp_process(struct bfa_s *bfa, struct list_head *comp_q); | ||
167 | void bfa_comp_free(struct bfa_s *bfa, struct list_head *comp_q); | ||
168 | |||
169 | typedef void (*bfa_cb_ioc_t) (void *cbarg, enum bfa_status status); | ||
170 | void bfa_iocfc_get_attr(struct bfa_s *bfa, struct bfa_iocfc_attr_s *attr); | ||
171 | bfa_status_t bfa_iocfc_get_stats(struct bfa_s *bfa, | ||
172 | struct bfa_iocfc_stats_s *stats, | ||
173 | bfa_cb_ioc_t cbfn, void *cbarg); | ||
174 | bfa_status_t bfa_iocfc_clear_stats(struct bfa_s *bfa, | ||
175 | bfa_cb_ioc_t cbfn, void *cbarg); | ||
176 | void bfa_get_attr(struct bfa_s *bfa, struct bfa_ioc_attr_s *ioc_attr); | ||
177 | |||
178 | void bfa_adapter_get_attr(struct bfa_s *bfa, | ||
179 | struct bfa_adapter_attr_s *ad_attr); | ||
180 | u64 bfa_adapter_get_id(struct bfa_s *bfa); | ||
181 | |||
182 | bfa_status_t bfa_iocfc_israttr_set(struct bfa_s *bfa, | ||
183 | struct bfa_iocfc_intr_attr_s *attr); | ||
184 | |||
185 | void bfa_iocfc_enable(struct bfa_s *bfa); | ||
186 | void bfa_iocfc_disable(struct bfa_s *bfa); | ||
187 | void bfa_ioc_auto_recover(bfa_boolean_t auto_recover); | ||
188 | void bfa_chip_reset(struct bfa_s *bfa); | ||
189 | void bfa_cb_ioc_disable(void *bfad); | ||
190 | void bfa_timer_tick(struct bfa_s *bfa); | ||
191 | #define bfa_timer_start(_bfa, _timer, _timercb, _arg, _timeout) \ | ||
192 | bfa_timer_begin(&(_bfa)->timer_mod, _timer, _timercb, _arg, _timeout) | ||
193 | |||
194 | /* | ||
195 | * BFA debug API functions | ||
196 | */ | ||
197 | bfa_status_t bfa_debug_fwtrc(struct bfa_s *bfa, void *trcdata, int *trclen); | ||
198 | bfa_status_t bfa_debug_fwsave(struct bfa_s *bfa, void *trcdata, int *trclen); | ||
199 | void bfa_debug_fwsave_clear(struct bfa_s *bfa); | ||
200 | |||
201 | #include "bfa_priv.h" | ||
202 | |||
203 | #endif /* __BFA_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/bfa_fcpim.h b/drivers/scsi/bfa/include/bfa_fcpim.h deleted file mode 100644 index 4bc9453081df..000000000000 --- a/drivers/scsi/bfa/include/bfa_fcpim.h +++ /dev/null | |||
@@ -1,177 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_FCPIM_H__ | ||
19 | #define __BFA_FCPIM_H__ | ||
20 | |||
21 | #include <bfa.h> | ||
22 | #include <bfa_svc.h> | ||
23 | #include <bfi/bfi_fcpim.h> | ||
24 | #include <defs/bfa_defs_fcpim.h> | ||
25 | |||
26 | /* | ||
27 | * forward declarations | ||
28 | */ | ||
29 | struct bfa_itnim_s; | ||
30 | struct bfa_ioim_s; | ||
31 | struct bfa_tskim_s; | ||
32 | struct bfad_ioim_s; | ||
33 | struct bfad_tskim_s; | ||
34 | |||
35 | /* | ||
36 | * bfa fcpim module API functions | ||
37 | */ | ||
38 | void bfa_fcpim_path_tov_set(struct bfa_s *bfa, u16 path_tov); | ||
39 | u16 bfa_fcpim_path_tov_get(struct bfa_s *bfa); | ||
40 | void bfa_fcpim_qdepth_set(struct bfa_s *bfa, u16 q_depth); | ||
41 | u16 bfa_fcpim_qdepth_get(struct bfa_s *bfa); | ||
42 | bfa_status_t bfa_fcpim_get_modstats(struct bfa_s *bfa, | ||
43 | struct bfa_fcpim_stats_s *modstats); | ||
44 | bfa_status_t bfa_fcpim_clr_modstats(struct bfa_s *bfa); | ||
45 | void bfa_fcpim_set_ioredirect(struct bfa_s *bfa, bfa_boolean_t state); | ||
46 | void bfa_fcpim_update_ioredirect(struct bfa_s *bfa); | ||
47 | void bfa_cb_ioredirect_state_change(void *hcb_bfad, bfa_boolean_t ioredirect); | ||
48 | |||
49 | #define bfa_fcpim_ioredirect_enabled(__bfa) \ | ||
50 | (((struct bfa_fcpim_mod_s *)(BFA_FCPIM_MOD(__bfa)))->ioredirect) | ||
51 | |||
52 | #define bfa_fcpim_get_next_reqq(__bfa, __qid) \ | ||
53 | { \ | ||
54 | struct bfa_fcpim_mod_s *__fcpim = BFA_FCPIM_MOD(__bfa); \ | ||
55 | __fcpim->reqq++; \ | ||
56 | __fcpim->reqq &= (BFI_IOC_MAX_CQS - 1); \ | ||
57 | *(__qid) = __fcpim->reqq; \ | ||
58 | } | ||
59 | |||
60 | #define bfa_iocfc_map_msg_to_qid(__msg, __qid) \ | ||
61 | *(__qid) = (u8)((__msg) & (BFI_IOC_MAX_CQS - 1)); | ||
62 | |||
63 | |||
64 | /* | ||
65 | * bfa itnim API functions | ||
66 | */ | ||
67 | struct bfa_itnim_s *bfa_itnim_create(struct bfa_s *bfa, | ||
68 | struct bfa_rport_s *rport, void *itnim); | ||
69 | void bfa_itnim_delete(struct bfa_itnim_s *itnim); | ||
70 | void bfa_itnim_online(struct bfa_itnim_s *itnim, | ||
71 | bfa_boolean_t seq_rec); | ||
72 | void bfa_itnim_offline(struct bfa_itnim_s *itnim); | ||
73 | void bfa_itnim_get_stats(struct bfa_itnim_s *itnim, | ||
74 | struct bfa_itnim_hal_stats_s *stats); | ||
75 | void bfa_itnim_clear_stats(struct bfa_itnim_s *itnim); | ||
76 | |||
77 | #define bfa_itnim_get_reqq(__ioim) (((struct bfa_ioim_s *)__ioim)->itnim->reqq) | ||
78 | |||
79 | /** | ||
80 | * BFA completion callback for bfa_itnim_online(). | ||
81 | * | ||
82 | * @param[in] itnim FCS or driver itnim instance | ||
83 | * | ||
84 | * return None | ||
85 | */ | ||
86 | void bfa_cb_itnim_online(void *itnim); | ||
87 | |||
88 | /** | ||
89 | * BFA completion callback for bfa_itnim_offline(). | ||
90 | * | ||
91 | * @param[in] itnim FCS or driver itnim instance | ||
92 | * | ||
93 | * return None | ||
94 | */ | ||
95 | void bfa_cb_itnim_offline(void *itnim); | ||
96 | void bfa_cb_itnim_tov_begin(void *itnim); | ||
97 | void bfa_cb_itnim_tov(void *itnim); | ||
98 | |||
99 | /** | ||
100 | * BFA notification to FCS/driver for second level error recovery. | ||
101 | * | ||
102 | * Atleast one I/O request has timedout and target is unresponsive to | ||
103 | * repeated abort requests. Second level error recovery should be initiated | ||
104 | * by starting implicit logout and recovery procedures. | ||
105 | * | ||
106 | * @param[in] itnim FCS or driver itnim instance | ||
107 | * | ||
108 | * return None | ||
109 | */ | ||
110 | void bfa_cb_itnim_sler(void *itnim); | ||
111 | |||
112 | /* | ||
113 | * bfa ioim API functions | ||
114 | */ | ||
115 | struct bfa_ioim_s *bfa_ioim_alloc(struct bfa_s *bfa, | ||
116 | struct bfad_ioim_s *dio, | ||
117 | struct bfa_itnim_s *itnim, | ||
118 | u16 nsgles); | ||
119 | |||
120 | void bfa_ioim_free(struct bfa_ioim_s *ioim); | ||
121 | void bfa_ioim_start(struct bfa_ioim_s *ioim); | ||
122 | void bfa_ioim_abort(struct bfa_ioim_s *ioim); | ||
123 | void bfa_ioim_delayed_comp(struct bfa_ioim_s *ioim, | ||
124 | bfa_boolean_t iotov); | ||
125 | |||
126 | |||
127 | /** | ||
128 | * I/O completion notification. | ||
129 | * | ||
130 | * @param[in] dio driver IO structure | ||
131 | * @param[in] io_status IO completion status | ||
132 | * @param[in] scsi_status SCSI status returned by target | ||
133 | * @param[in] sns_len SCSI sense length, 0 if none | ||
134 | * @param[in] sns_info SCSI sense data, if any | ||
135 | * @param[in] residue Residual length | ||
136 | * | ||
137 | * @return None | ||
138 | */ | ||
139 | void bfa_cb_ioim_done(void *bfad, struct bfad_ioim_s *dio, | ||
140 | enum bfi_ioim_status io_status, | ||
141 | u8 scsi_status, int sns_len, | ||
142 | u8 *sns_info, s32 residue); | ||
143 | |||
144 | /** | ||
145 | * I/O good completion notification. | ||
146 | * | ||
147 | * @param[in] dio driver IO structure | ||
148 | * | ||
149 | * @return None | ||
150 | */ | ||
151 | void bfa_cb_ioim_good_comp(void *bfad, struct bfad_ioim_s *dio); | ||
152 | |||
153 | /** | ||
154 | * I/O abort completion notification | ||
155 | * | ||
156 | * @param[in] dio driver IO that was aborted | ||
157 | * | ||
158 | * @return None | ||
159 | */ | ||
160 | void bfa_cb_ioim_abort(void *bfad, struct bfad_ioim_s *dio); | ||
161 | void bfa_cb_ioim_resfree(void *hcb_bfad); | ||
162 | |||
163 | void bfa_cb_ioim_resfree(void *hcb_bfad); | ||
164 | |||
165 | /* | ||
166 | * bfa tskim API functions | ||
167 | */ | ||
168 | struct bfa_tskim_s *bfa_tskim_alloc(struct bfa_s *bfa, | ||
169 | struct bfad_tskim_s *dtsk); | ||
170 | void bfa_tskim_free(struct bfa_tskim_s *tskim); | ||
171 | void bfa_tskim_start(struct bfa_tskim_s *tskim, | ||
172 | struct bfa_itnim_s *itnim, lun_t lun, | ||
173 | enum fcp_tm_cmnd tm, u8 t_secs); | ||
174 | void bfa_cb_tskim_done(void *bfad, struct bfad_tskim_s *dtsk, | ||
175 | enum bfi_tskim_status tsk_status); | ||
176 | |||
177 | #endif /* __BFA_FCPIM_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/bfa_fcptm.h b/drivers/scsi/bfa/include/bfa_fcptm.h deleted file mode 100644 index 5f5ffe0bb1bb..000000000000 --- a/drivers/scsi/bfa/include/bfa_fcptm.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_FCPTM_H__ | ||
19 | #define __BFA_FCPTM_H__ | ||
20 | |||
21 | #include <bfa.h> | ||
22 | #include <bfa_svc.h> | ||
23 | #include <bfi/bfi_fcptm.h> | ||
24 | |||
25 | /* | ||
26 | * forward declarations | ||
27 | */ | ||
28 | struct bfa_tin_s; | ||
29 | struct bfa_iotm_s; | ||
30 | struct bfa_tsktm_s; | ||
31 | |||
32 | /* | ||
33 | * bfa fcptm module API functions | ||
34 | */ | ||
35 | void bfa_fcptm_path_tov_set(struct bfa_s *bfa, u16 path_tov); | ||
36 | u16 bfa_fcptm_path_tov_get(struct bfa_s *bfa); | ||
37 | void bfa_fcptm_qdepth_set(struct bfa_s *bfa, u16 q_depth); | ||
38 | u16 bfa_fcptm_qdepth_get(struct bfa_s *bfa); | ||
39 | |||
40 | /* | ||
41 | * bfa tin API functions | ||
42 | */ | ||
43 | void bfa_tin_get_stats(struct bfa_tin_s *tin, struct bfa_tin_stats_s *stats); | ||
44 | void bfa_tin_clear_stats(struct bfa_tin_s *tin); | ||
45 | |||
46 | #endif /* __BFA_FCPTM_H__ */ | ||
47 | |||
diff --git a/drivers/scsi/bfa/include/bfa_svc.h b/drivers/scsi/bfa/include/bfa_svc.h deleted file mode 100644 index 7840943d73b0..000000000000 --- a/drivers/scsi/bfa/include/bfa_svc.h +++ /dev/null | |||
@@ -1,338 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_SVC_H__ | ||
18 | #define __BFA_SVC_H__ | ||
19 | |||
20 | /* | ||
21 | * forward declarations | ||
22 | */ | ||
23 | struct bfa_fcxp_s; | ||
24 | |||
25 | #include <defs/bfa_defs_status.h> | ||
26 | #include <defs/bfa_defs_pport.h> | ||
27 | #include <defs/bfa_defs_rport.h> | ||
28 | #include <defs/bfa_defs_qos.h> | ||
29 | #include <defs/bfa_defs_fcport.h> | ||
30 | #include <cs/bfa_sm.h> | ||
31 | #include <bfa.h> | ||
32 | |||
33 | /** | ||
34 | * BFA rport information. | ||
35 | */ | ||
36 | struct bfa_rport_info_s { | ||
37 | u16 max_frmsz; /* max rcv pdu size */ | ||
38 | u32 pid:24, /* remote port ID */ | ||
39 | lp_tag:8; /* tag */ | ||
40 | u32 local_pid:24, /* local port ID */ | ||
41 | cisc:8; /* CIRO supported */ | ||
42 | u8 fc_class; /* supported FC classes. enum fc_cos */ | ||
43 | u8 vf_en; /* virtual fabric enable */ | ||
44 | u16 vf_id; /* virtual fabric ID */ | ||
45 | enum bfa_pport_speed speed; /* Rport's current speed */ | ||
46 | }; | ||
47 | |||
48 | /** | ||
49 | * BFA rport data structure | ||
50 | */ | ||
51 | struct bfa_rport_s { | ||
52 | struct list_head qe; /* queue element */ | ||
53 | bfa_sm_t sm; /* state machine */ | ||
54 | struct bfa_s *bfa; /* backpointer to BFA */ | ||
55 | void *rport_drv; /* fcs/driver rport object */ | ||
56 | u16 fw_handle; /* firmware rport handle */ | ||
57 | u16 rport_tag; /* BFA rport tag */ | ||
58 | struct bfa_rport_info_s rport_info; /* rport info from fcs/driver */ | ||
59 | struct bfa_reqq_wait_s reqq_wait; /* to wait for room in reqq */ | ||
60 | struct bfa_cb_qe_s hcb_qe; /* BFA callback qelem */ | ||
61 | struct bfa_rport_hal_stats_s stats; /* BFA rport statistics */ | ||
62 | struct bfa_rport_qos_attr_s qos_attr; | ||
63 | union a { | ||
64 | bfa_status_t status; /* f/w status */ | ||
65 | void *fw_msg; /* QoS scn event */ | ||
66 | } event_arg; | ||
67 | }; | ||
68 | #define BFA_RPORT_FC_COS(_rport) ((_rport)->rport_info.fc_class) | ||
69 | |||
70 | /** | ||
71 | * Send completion callback. | ||
72 | */ | ||
73 | typedef void (*bfa_cb_fcxp_send_t) (void *bfad_fcxp, struct bfa_fcxp_s *fcxp, | ||
74 | void *cbarg, enum bfa_status req_status, | ||
75 | u32 rsp_len, u32 resid_len, | ||
76 | struct fchs_s *rsp_fchs); | ||
77 | |||
78 | /** | ||
79 | * BFA fcxp allocation (asynchronous) | ||
80 | */ | ||
81 | typedef void (*bfa_fcxp_alloc_cbfn_t) (void *cbarg, struct bfa_fcxp_s *fcxp); | ||
82 | |||
83 | struct bfa_fcxp_wqe_s { | ||
84 | struct list_head qe; | ||
85 | bfa_fcxp_alloc_cbfn_t alloc_cbfn; | ||
86 | void *alloc_cbarg; | ||
87 | }; | ||
88 | |||
89 | typedef u64 (*bfa_fcxp_get_sgaddr_t) (void *bfad_fcxp, int sgeid); | ||
90 | typedef u32 (*bfa_fcxp_get_sglen_t) (void *bfad_fcxp, int sgeid); | ||
91 | |||
92 | #define BFA_UF_BUFSZ (2 * 1024 + 256) | ||
93 | |||
94 | /** | ||
95 | * @todo private | ||
96 | */ | ||
97 | struct bfa_uf_buf_s { | ||
98 | u8 d[BFA_UF_BUFSZ]; | ||
99 | }; | ||
100 | |||
101 | |||
102 | struct bfa_uf_s { | ||
103 | struct list_head qe; /* queue element */ | ||
104 | struct bfa_s *bfa; /* bfa instance */ | ||
105 | u16 uf_tag; /* identifying tag fw msgs */ | ||
106 | u16 vf_id; | ||
107 | u16 src_rport_handle; | ||
108 | u16 rsvd; | ||
109 | u8 *data_ptr; | ||
110 | u16 data_len; /* actual receive length */ | ||
111 | u16 pb_len; /* posted buffer length */ | ||
112 | void *buf_kva; /* buffer virtual address */ | ||
113 | u64 buf_pa; /* buffer physical address */ | ||
114 | struct bfa_cb_qe_s hcb_qe; /* comp: BFA comp qelem */ | ||
115 | struct bfa_sge_s sges[BFI_SGE_INLINE_MAX]; | ||
116 | }; | ||
117 | |||
118 | typedef void (*bfa_cb_pport_t) (void *cbarg, enum bfa_status status); | ||
119 | |||
120 | /** | ||
121 | * bfa lport login/logout service interface | ||
122 | */ | ||
123 | struct bfa_lps_s { | ||
124 | struct list_head qe; /* queue element */ | ||
125 | struct bfa_s *bfa; /* parent bfa instance */ | ||
126 | bfa_sm_t sm; /* finite state machine */ | ||
127 | u8 lp_tag; /* lport tag */ | ||
128 | u8 reqq; /* lport request queue */ | ||
129 | u8 alpa; /* ALPA for loop topologies */ | ||
130 | u32 lp_pid; /* lport port ID */ | ||
131 | bfa_boolean_t fdisc; /* send FDISC instead of FLOGI */ | ||
132 | bfa_boolean_t auth_en; /* enable authentication */ | ||
133 | bfa_boolean_t auth_req; /* authentication required */ | ||
134 | bfa_boolean_t npiv_en; /* NPIV is allowed by peer */ | ||
135 | bfa_boolean_t fport; /* attached peer is F_PORT */ | ||
136 | bfa_boolean_t brcd_switch;/* attached peer is brcd switch */ | ||
137 | bfa_status_t status; /* login status */ | ||
138 | u16 pdusz; /* max receive PDU size */ | ||
139 | u16 pr_bbcred; /* BB_CREDIT from peer */ | ||
140 | u8 lsrjt_rsn; /* LSRJT reason */ | ||
141 | u8 lsrjt_expl; /* LSRJT explanation */ | ||
142 | wwn_t pwwn; /* port wwn of lport */ | ||
143 | wwn_t nwwn; /* node wwn of lport */ | ||
144 | wwn_t pr_pwwn; /* port wwn of lport peer */ | ||
145 | wwn_t pr_nwwn; /* node wwn of lport peer */ | ||
146 | mac_t lp_mac; /* fpma/spma MAC for lport */ | ||
147 | mac_t fcf_mac; /* FCF MAC of lport */ | ||
148 | struct bfa_reqq_wait_s wqe; /* request wait queue element */ | ||
149 | void *uarg; /* user callback arg */ | ||
150 | struct bfa_cb_qe_s hcb_qe; /* comp: callback qelem */ | ||
151 | struct bfi_lps_login_rsp_s *loginrsp; | ||
152 | bfa_eproto_status_t ext_status; | ||
153 | }; | ||
154 | |||
155 | #define BFA_FCPORT(_bfa) (&((_bfa)->modules.port)) | ||
156 | |||
157 | /* | ||
158 | * bfa pport API functions | ||
159 | */ | ||
160 | bfa_status_t bfa_fcport_enable(struct bfa_s *bfa); | ||
161 | bfa_status_t bfa_fcport_disable(struct bfa_s *bfa); | ||
162 | bfa_status_t bfa_fcport_cfg_speed(struct bfa_s *bfa, | ||
163 | enum bfa_pport_speed speed); | ||
164 | enum bfa_pport_speed bfa_fcport_get_speed(struct bfa_s *bfa); | ||
165 | bfa_status_t bfa_fcport_cfg_topology(struct bfa_s *bfa, | ||
166 | enum bfa_pport_topology topo); | ||
167 | enum bfa_pport_topology bfa_fcport_get_topology(struct bfa_s *bfa); | ||
168 | bfa_status_t bfa_fcport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa); | ||
169 | bfa_boolean_t bfa_fcport_get_hardalpa(struct bfa_s *bfa, u8 *alpa); | ||
170 | u8 bfa_fcport_get_myalpa(struct bfa_s *bfa); | ||
171 | bfa_status_t bfa_fcport_clr_hardalpa(struct bfa_s *bfa); | ||
172 | bfa_status_t bfa_fcport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxsize); | ||
173 | u16 bfa_fcport_get_maxfrsize(struct bfa_s *bfa); | ||
174 | u32 bfa_fcport_mypid(struct bfa_s *bfa); | ||
175 | u8 bfa_fcport_get_rx_bbcredit(struct bfa_s *bfa); | ||
176 | bfa_status_t bfa_fcport_trunk_enable(struct bfa_s *bfa, u8 bitmap); | ||
177 | bfa_status_t bfa_fcport_trunk_disable(struct bfa_s *bfa); | ||
178 | bfa_boolean_t bfa_fcport_trunk_query(struct bfa_s *bfa, u32 *bitmap); | ||
179 | void bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_pport_attr_s *attr); | ||
180 | wwn_t bfa_fcport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node); | ||
181 | void bfa_fcport_event_register(struct bfa_s *bfa, | ||
182 | void (*event_cbfn) (void *cbarg, | ||
183 | bfa_pport_event_t event), void *event_cbarg); | ||
184 | bfa_boolean_t bfa_fcport_is_disabled(struct bfa_s *bfa); | ||
185 | void bfa_fcport_cfg_qos(struct bfa_s *bfa, bfa_boolean_t on_off); | ||
186 | void bfa_fcport_cfg_ratelim(struct bfa_s *bfa, bfa_boolean_t on_off); | ||
187 | bfa_status_t bfa_fcport_cfg_ratelim_speed(struct bfa_s *bfa, | ||
188 | enum bfa_pport_speed speed); | ||
189 | enum bfa_pport_speed bfa_fcport_get_ratelim_speed(struct bfa_s *bfa); | ||
190 | |||
191 | void bfa_fcport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit); | ||
192 | void bfa_fcport_busy(struct bfa_s *bfa, bfa_boolean_t status); | ||
193 | void bfa_fcport_beacon(struct bfa_s *bfa, bfa_boolean_t beacon, | ||
194 | bfa_boolean_t link_e2e_beacon); | ||
195 | void bfa_cb_pport_event(void *cbarg, bfa_pport_event_t event); | ||
196 | void bfa_fcport_qos_get_attr(struct bfa_s *bfa, | ||
197 | struct bfa_qos_attr_s *qos_attr); | ||
198 | void bfa_fcport_qos_get_vc_attr(struct bfa_s *bfa, | ||
199 | struct bfa_qos_vc_attr_s *qos_vc_attr); | ||
200 | bfa_status_t bfa_fcport_get_qos_stats(struct bfa_s *bfa, | ||
201 | union bfa_fcport_stats_u *stats, | ||
202 | bfa_cb_pport_t cbfn, void *cbarg); | ||
203 | bfa_status_t bfa_fcport_clear_qos_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | ||
204 | void *cbarg); | ||
205 | bfa_status_t bfa_fcport_get_fcoe_stats(struct bfa_s *bfa, | ||
206 | union bfa_fcport_stats_u *stats, | ||
207 | bfa_cb_pport_t cbfn, void *cbarg); | ||
208 | bfa_status_t bfa_fcport_clear_fcoe_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | ||
209 | void *cbarg); | ||
210 | |||
211 | bfa_boolean_t bfa_fcport_is_ratelim(struct bfa_s *bfa); | ||
212 | bfa_boolean_t bfa_fcport_is_linkup(struct bfa_s *bfa); | ||
213 | bfa_status_t bfa_fcport_get_stats(struct bfa_s *bfa, | ||
214 | union bfa_fcport_stats_u *stats, | ||
215 | bfa_cb_pport_t cbfn, void *cbarg); | ||
216 | bfa_status_t bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | ||
217 | void *cbarg); | ||
218 | bfa_boolean_t bfa_fcport_is_qos_enabled(struct bfa_s *bfa); | ||
219 | |||
220 | /* | ||
221 | * bfa rport API functions | ||
222 | */ | ||
223 | struct bfa_rport_s *bfa_rport_create(struct bfa_s *bfa, void *rport_drv); | ||
224 | void bfa_rport_delete(struct bfa_rport_s *rport); | ||
225 | void bfa_rport_online(struct bfa_rport_s *rport, | ||
226 | struct bfa_rport_info_s *rport_info); | ||
227 | void bfa_rport_offline(struct bfa_rport_s *rport); | ||
228 | void bfa_rport_speed(struct bfa_rport_s *rport, enum bfa_pport_speed speed); | ||
229 | void bfa_rport_get_stats(struct bfa_rport_s *rport, | ||
230 | struct bfa_rport_hal_stats_s *stats); | ||
231 | void bfa_rport_clear_stats(struct bfa_rport_s *rport); | ||
232 | void bfa_cb_rport_online(void *rport); | ||
233 | void bfa_cb_rport_offline(void *rport); | ||
234 | void bfa_cb_rport_qos_scn_flowid(void *rport, | ||
235 | struct bfa_rport_qos_attr_s old_qos_attr, | ||
236 | struct bfa_rport_qos_attr_s new_qos_attr); | ||
237 | void bfa_cb_rport_qos_scn_prio(void *rport, | ||
238 | struct bfa_rport_qos_attr_s old_qos_attr, | ||
239 | struct bfa_rport_qos_attr_s new_qos_attr); | ||
240 | void bfa_rport_get_qos_attr(struct bfa_rport_s *rport, | ||
241 | struct bfa_rport_qos_attr_s *qos_attr); | ||
242 | |||
243 | /* | ||
244 | * bfa fcxp API functions | ||
245 | */ | ||
246 | struct bfa_fcxp_s *bfa_fcxp_alloc(void *bfad_fcxp, struct bfa_s *bfa, | ||
247 | int nreq_sgles, int nrsp_sgles, | ||
248 | bfa_fcxp_get_sgaddr_t get_req_sga, | ||
249 | bfa_fcxp_get_sglen_t get_req_sglen, | ||
250 | bfa_fcxp_get_sgaddr_t get_rsp_sga, | ||
251 | bfa_fcxp_get_sglen_t get_rsp_sglen); | ||
252 | void bfa_fcxp_alloc_wait(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe, | ||
253 | bfa_fcxp_alloc_cbfn_t alloc_cbfn, void *cbarg); | ||
254 | void bfa_fcxp_walloc_cancel(struct bfa_s *bfa, | ||
255 | struct bfa_fcxp_wqe_s *wqe); | ||
256 | void bfa_fcxp_discard(struct bfa_fcxp_s *fcxp); | ||
257 | |||
258 | void *bfa_fcxp_get_reqbuf(struct bfa_fcxp_s *fcxp); | ||
259 | void *bfa_fcxp_get_rspbuf(struct bfa_fcxp_s *fcxp); | ||
260 | |||
261 | void bfa_fcxp_free(struct bfa_fcxp_s *fcxp); | ||
262 | |||
263 | void bfa_fcxp_send(struct bfa_fcxp_s *fcxp, | ||
264 | struct bfa_rport_s *rport, u16 vf_id, u8 lp_tag, | ||
265 | bfa_boolean_t cts, enum fc_cos cos, | ||
266 | u32 reqlen, struct fchs_s *fchs, | ||
267 | bfa_cb_fcxp_send_t cbfn, | ||
268 | void *cbarg, | ||
269 | u32 rsp_maxlen, u8 rsp_timeout); | ||
270 | bfa_status_t bfa_fcxp_abort(struct bfa_fcxp_s *fcxp); | ||
271 | u32 bfa_fcxp_get_reqbufsz(struct bfa_fcxp_s *fcxp); | ||
272 | u32 bfa_fcxp_get_maxrsp(struct bfa_s *bfa); | ||
273 | |||
274 | static inline void * | ||
275 | bfa_uf_get_frmbuf(struct bfa_uf_s *uf) | ||
276 | { | ||
277 | return uf->data_ptr; | ||
278 | } | ||
279 | |||
280 | static inline u16 | ||
281 | bfa_uf_get_frmlen(struct bfa_uf_s *uf) | ||
282 | { | ||
283 | return uf->data_len; | ||
284 | } | ||
285 | |||
286 | /** | ||
287 | * Callback prototype for unsolicited frame receive handler. | ||
288 | * | ||
289 | * @param[in] cbarg callback arg for receive handler | ||
290 | * @param[in] uf unsolicited frame descriptor | ||
291 | * | ||
292 | * @return None | ||
293 | */ | ||
294 | typedef void (*bfa_cb_uf_recv_t) (void *cbarg, struct bfa_uf_s *uf); | ||
295 | |||
296 | /* | ||
297 | * bfa uf API functions | ||
298 | */ | ||
299 | void bfa_uf_recv_register(struct bfa_s *bfa, bfa_cb_uf_recv_t ufrecv, | ||
300 | void *cbarg); | ||
301 | void bfa_uf_free(struct bfa_uf_s *uf); | ||
302 | |||
303 | /** | ||
304 | * bfa lport service api | ||
305 | */ | ||
306 | |||
307 | u32 bfa_lps_get_max_vport(struct bfa_s *bfa); | ||
308 | struct bfa_lps_s *bfa_lps_alloc(struct bfa_s *bfa); | ||
309 | void bfa_lps_delete(struct bfa_lps_s *lps); | ||
310 | void bfa_lps_discard(struct bfa_lps_s *lps); | ||
311 | void bfa_lps_flogi(struct bfa_lps_s *lps, void *uarg, u8 alpa, u16 pdusz, | ||
312 | wwn_t pwwn, wwn_t nwwn, bfa_boolean_t auth_en); | ||
313 | void bfa_lps_fdisc(struct bfa_lps_s *lps, void *uarg, u16 pdusz, wwn_t pwwn, | ||
314 | wwn_t nwwn); | ||
315 | void bfa_lps_flogo(struct bfa_lps_s *lps); | ||
316 | void bfa_lps_fdisclogo(struct bfa_lps_s *lps); | ||
317 | u8 bfa_lps_get_tag(struct bfa_lps_s *lps); | ||
318 | bfa_boolean_t bfa_lps_is_npiv_en(struct bfa_lps_s *lps); | ||
319 | bfa_boolean_t bfa_lps_is_fport(struct bfa_lps_s *lps); | ||
320 | bfa_boolean_t bfa_lps_is_brcd_fabric(struct bfa_lps_s *lps); | ||
321 | bfa_boolean_t bfa_lps_is_authreq(struct bfa_lps_s *lps); | ||
322 | bfa_eproto_status_t bfa_lps_get_extstatus(struct bfa_lps_s *lps); | ||
323 | u32 bfa_lps_get_pid(struct bfa_lps_s *lps); | ||
324 | u8 bfa_lps_get_tag_from_pid(struct bfa_s *bfa, u32 pid); | ||
325 | u16 bfa_lps_get_peer_bbcredit(struct bfa_lps_s *lps); | ||
326 | wwn_t bfa_lps_get_peer_pwwn(struct bfa_lps_s *lps); | ||
327 | wwn_t bfa_lps_get_peer_nwwn(struct bfa_lps_s *lps); | ||
328 | u8 bfa_lps_get_lsrjt_rsn(struct bfa_lps_s *lps); | ||
329 | u8 bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps); | ||
330 | mac_t bfa_lps_get_lp_mac(struct bfa_lps_s *lps); | ||
331 | void bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status); | ||
332 | void bfa_cb_lps_flogo_comp(void *bfad, void *uarg); | ||
333 | void bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status); | ||
334 | void bfa_cb_lps_fdisclogo_comp(void *bfad, void *uarg); | ||
335 | void bfa_cb_lps_cvl_event(void *bfad, void *uarg); | ||
336 | |||
337 | #endif /* __BFA_SVC_H__ */ | ||
338 | |||
diff --git a/drivers/scsi/bfa/include/bfa_timer.h b/drivers/scsi/bfa/include/bfa_timer.h deleted file mode 100644 index f71087448222..000000000000 --- a/drivers/scsi/bfa/include/bfa_timer.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_TIMER_H__ | ||
18 | #define __BFA_TIMER_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | #include <cs/bfa_q.h> | ||
22 | |||
23 | struct bfa_s; | ||
24 | |||
25 | typedef void (*bfa_timer_cbfn_t)(void *); | ||
26 | |||
27 | /** | ||
28 | * BFA timer data structure | ||
29 | */ | ||
30 | struct bfa_timer_s { | ||
31 | struct list_head qe; | ||
32 | bfa_timer_cbfn_t timercb; | ||
33 | void *arg; | ||
34 | int timeout; /**< in millisecs. */ | ||
35 | }; | ||
36 | |||
37 | /** | ||
38 | * Timer module structure | ||
39 | */ | ||
40 | struct bfa_timer_mod_s { | ||
41 | struct list_head timer_q; | ||
42 | }; | ||
43 | |||
44 | #define BFA_TIMER_FREQ 200 /**< specified in millisecs */ | ||
45 | |||
46 | void bfa_timer_beat(struct bfa_timer_mod_s *mod); | ||
47 | void bfa_timer_init(struct bfa_timer_mod_s *mod); | ||
48 | void bfa_timer_begin(struct bfa_timer_mod_s *mod, struct bfa_timer_s *timer, | ||
49 | bfa_timer_cbfn_t timercb, void *arg, | ||
50 | unsigned int timeout); | ||
51 | void bfa_timer_stop(struct bfa_timer_s *timer); | ||
52 | |||
53 | #endif /* __BFA_TIMER_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/bfi/bfi.h b/drivers/scsi/bfa/include/bfi/bfi.h deleted file mode 100644 index a550e80cabd2..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi.h +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_H__ | ||
19 | #define __BFI_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | #include <defs/bfa_defs_status.h> | ||
23 | |||
24 | #pragma pack(1) | ||
25 | |||
26 | /** | ||
27 | * Msg header common to all msgs | ||
28 | */ | ||
29 | struct bfi_mhdr_s { | ||
30 | u8 msg_class; /* @ref bfi_mclass_t */ | ||
31 | u8 msg_id; /* msg opcode with in the class */ | ||
32 | union { | ||
33 | struct { | ||
34 | u8 rsvd; | ||
35 | u8 lpu_id; /* msg destination */ | ||
36 | } h2i; | ||
37 | u16 i2htok; /* token in msgs to host */ | ||
38 | } mtag; | ||
39 | }; | ||
40 | |||
41 | #define bfi_h2i_set(_mh, _mc, _op, _lpuid) do { \ | ||
42 | (_mh).msg_class = (_mc); \ | ||
43 | (_mh).msg_id = (_op); \ | ||
44 | (_mh).mtag.h2i.lpu_id = (_lpuid); \ | ||
45 | } while (0) | ||
46 | |||
47 | #define bfi_i2h_set(_mh, _mc, _op, _i2htok) do { \ | ||
48 | (_mh).msg_class = (_mc); \ | ||
49 | (_mh).msg_id = (_op); \ | ||
50 | (_mh).mtag.i2htok = (_i2htok); \ | ||
51 | } while (0) | ||
52 | |||
53 | /* | ||
54 | * Message opcodes: 0-127 to firmware, 128-255 to host | ||
55 | */ | ||
56 | #define BFI_I2H_OPCODE_BASE 128 | ||
57 | #define BFA_I2HM(_x) ((_x) + BFI_I2H_OPCODE_BASE) | ||
58 | |||
59 | /** | ||
60 | **************************************************************************** | ||
61 | * | ||
62 | * Scatter Gather Element and Page definition | ||
63 | * | ||
64 | **************************************************************************** | ||
65 | */ | ||
66 | |||
67 | #define BFI_SGE_INLINE 1 | ||
68 | #define BFI_SGE_INLINE_MAX (BFI_SGE_INLINE + 1) | ||
69 | |||
70 | /** | ||
71 | * SG Flags | ||
72 | */ | ||
73 | enum { | ||
74 | BFI_SGE_DATA = 0, /* data address, not last */ | ||
75 | BFI_SGE_DATA_CPL = 1, /* data addr, last in current page */ | ||
76 | BFI_SGE_DATA_LAST = 3, /* data address, last */ | ||
77 | BFI_SGE_LINK = 2, /* link address */ | ||
78 | BFI_SGE_PGDLEN = 2, /* cumulative data length for page */ | ||
79 | }; | ||
80 | |||
81 | /** | ||
82 | * DMA addresses | ||
83 | */ | ||
84 | union bfi_addr_u { | ||
85 | struct { | ||
86 | u32 addr_lo; | ||
87 | u32 addr_hi; | ||
88 | } a32; | ||
89 | }; | ||
90 | |||
91 | /** | ||
92 | * Scatter Gather Element | ||
93 | */ | ||
94 | struct bfi_sge_s { | ||
95 | #ifdef __BIGENDIAN | ||
96 | u32 flags:2, | ||
97 | rsvd:2, | ||
98 | sg_len:28; | ||
99 | #else | ||
100 | u32 sg_len:28, | ||
101 | rsvd:2, | ||
102 | flags:2; | ||
103 | #endif | ||
104 | union bfi_addr_u sga; | ||
105 | }; | ||
106 | |||
107 | /** | ||
108 | * Scatter Gather Page | ||
109 | */ | ||
110 | #define BFI_SGPG_DATA_SGES 7 | ||
111 | #define BFI_SGPG_SGES_MAX (BFI_SGPG_DATA_SGES + 1) | ||
112 | #define BFI_SGPG_RSVD_WD_LEN 8 | ||
113 | struct bfi_sgpg_s { | ||
114 | struct bfi_sge_s sges[BFI_SGPG_SGES_MAX]; | ||
115 | u32 rsvd[BFI_SGPG_RSVD_WD_LEN]; | ||
116 | }; | ||
117 | |||
118 | /* | ||
119 | * Large Message structure - 128 Bytes size Msgs | ||
120 | */ | ||
121 | #define BFI_LMSG_SZ 128 | ||
122 | #define BFI_LMSG_PL_WSZ \ | ||
123 | ((BFI_LMSG_SZ - sizeof(struct bfi_mhdr_s)) / 4) | ||
124 | |||
125 | struct bfi_msg_s { | ||
126 | struct bfi_mhdr_s mhdr; | ||
127 | u32 pl[BFI_LMSG_PL_WSZ]; | ||
128 | }; | ||
129 | |||
130 | /** | ||
131 | * Mailbox message structure | ||
132 | */ | ||
133 | #define BFI_MBMSG_SZ 7 | ||
134 | struct bfi_mbmsg_s { | ||
135 | struct bfi_mhdr_s mh; | ||
136 | u32 pl[BFI_MBMSG_SZ]; | ||
137 | }; | ||
138 | |||
139 | /** | ||
140 | * Message Classes | ||
141 | */ | ||
142 | enum bfi_mclass { | ||
143 | BFI_MC_IOC = 1, /* IO Controller (IOC) */ | ||
144 | BFI_MC_DIAG = 2, /* Diagnostic Msgs */ | ||
145 | BFI_MC_FLASH = 3, /* Flash message class */ | ||
146 | BFI_MC_CEE = 4, /* CEE */ | ||
147 | BFI_MC_FCPORT = 5, /* FC port */ | ||
148 | BFI_MC_IOCFC = 6, /* FC - IO Controller (IOC) */ | ||
149 | BFI_MC_LL = 7, /* Link Layer */ | ||
150 | BFI_MC_UF = 8, /* Unsolicited frame receive */ | ||
151 | BFI_MC_FCXP = 9, /* FC Transport */ | ||
152 | BFI_MC_LPS = 10, /* lport fc login services */ | ||
153 | BFI_MC_RPORT = 11, /* Remote port */ | ||
154 | BFI_MC_ITNIM = 12, /* I-T nexus (Initiator mode) */ | ||
155 | BFI_MC_IOIM_READ = 13, /* read IO (Initiator mode) */ | ||
156 | BFI_MC_IOIM_WRITE = 14, /* write IO (Initiator mode) */ | ||
157 | BFI_MC_IOIM_IO = 15, /* IO (Initiator mode) */ | ||
158 | BFI_MC_IOIM = 16, /* IO (Initiator mode) */ | ||
159 | BFI_MC_IOIM_IOCOM = 17, /* good IO completion */ | ||
160 | BFI_MC_TSKIM = 18, /* Initiator Task management */ | ||
161 | BFI_MC_SBOOT = 19, /* SAN boot services */ | ||
162 | BFI_MC_IPFC = 20, /* IP over FC Msgs */ | ||
163 | BFI_MC_PORT = 21, /* Physical port */ | ||
164 | BFI_MC_MAX = 32 | ||
165 | }; | ||
166 | |||
167 | #define BFI_IOC_MAX_CQS 4 | ||
168 | #define BFI_IOC_MAX_CQS_ASIC 8 | ||
169 | #define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */ | ||
170 | |||
171 | #pragma pack() | ||
172 | |||
173 | #endif /* __BFI_H__ */ | ||
174 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_boot.h b/drivers/scsi/bfa/include/bfi/bfi_boot.h deleted file mode 100644 index 5955afe7d108..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_boot.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | /* | ||
18 | * bfi_boot.h | ||
19 | */ | ||
20 | |||
21 | #ifndef __BFI_BOOT_H__ | ||
22 | #define __BFI_BOOT_H__ | ||
23 | |||
24 | #define BFI_BOOT_TYPE_OFF 8 | ||
25 | #define BFI_BOOT_PARAM_OFF 12 | ||
26 | |||
27 | #define BFI_BOOT_TYPE_NORMAL 0 /* param is device id */ | ||
28 | #define BFI_BOOT_TYPE_FLASH 1 | ||
29 | #define BFI_BOOT_TYPE_MEMTEST 2 | ||
30 | |||
31 | #define BFI_BOOT_MEMTEST_RES_ADDR 0x900 | ||
32 | #define BFI_BOOT_MEMTEST_RES_SIG 0xA0A1A2A3 | ||
33 | |||
34 | #endif | ||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_cbreg.h b/drivers/scsi/bfa/include/bfi/bfi_cbreg.h deleted file mode 100644 index a51ee61ddb19..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_cbreg.h +++ /dev/null | |||
@@ -1,319 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * bfi_cbreg.h crossbow host block register definitions | ||
20 | * | ||
21 | * !!! Do not edit. Auto generated. !!! | ||
22 | */ | ||
23 | |||
24 | #ifndef __BFI_CBREG_H__ | ||
25 | #define __BFI_CBREG_H__ | ||
26 | |||
27 | |||
28 | #define HOSTFN0_INT_STATUS 0x00014000 | ||
29 | #define __HOSTFN0_INT_STATUS_LVL_MK 0x00f00000 | ||
30 | #define __HOSTFN0_INT_STATUS_LVL_SH 20 | ||
31 | #define __HOSTFN0_INT_STATUS_LVL(_v) ((_v) << __HOSTFN0_INT_STATUS_LVL_SH) | ||
32 | #define __HOSTFN0_INT_STATUS_P 0x000fffff | ||
33 | #define HOSTFN0_INT_MSK 0x00014004 | ||
34 | #define HOST_PAGE_NUM_FN0 0x00014008 | ||
35 | #define __HOST_PAGE_NUM_FN 0x000001ff | ||
36 | #define HOSTFN1_INT_STATUS 0x00014100 | ||
37 | #define __HOSTFN1_INT_STAT_LVL_MK 0x00f00000 | ||
38 | #define __HOSTFN1_INT_STAT_LVL_SH 20 | ||
39 | #define __HOSTFN1_INT_STAT_LVL(_v) ((_v) << __HOSTFN1_INT_STAT_LVL_SH) | ||
40 | #define __HOSTFN1_INT_STAT_P 0x000fffff | ||
41 | #define HOSTFN1_INT_MSK 0x00014104 | ||
42 | #define HOST_PAGE_NUM_FN1 0x00014108 | ||
43 | #define APP_PLL_400_CTL_REG 0x00014204 | ||
44 | #define __P_400_PLL_LOCK 0x80000000 | ||
45 | #define __APP_PLL_400_SRAM_USE_100MHZ 0x00100000 | ||
46 | #define __APP_PLL_400_RESET_TIMER_MK 0x000e0000 | ||
47 | #define __APP_PLL_400_RESET_TIMER_SH 17 | ||
48 | #define __APP_PLL_400_RESET_TIMER(_v) ((_v) << __APP_PLL_400_RESET_TIMER_SH) | ||
49 | #define __APP_PLL_400_LOGIC_SOFT_RESET 0x00010000 | ||
50 | #define __APP_PLL_400_CNTLMT0_1_MK 0x0000c000 | ||
51 | #define __APP_PLL_400_CNTLMT0_1_SH 14 | ||
52 | #define __APP_PLL_400_CNTLMT0_1(_v) ((_v) << __APP_PLL_400_CNTLMT0_1_SH) | ||
53 | #define __APP_PLL_400_JITLMT0_1_MK 0x00003000 | ||
54 | #define __APP_PLL_400_JITLMT0_1_SH 12 | ||
55 | #define __APP_PLL_400_JITLMT0_1(_v) ((_v) << __APP_PLL_400_JITLMT0_1_SH) | ||
56 | #define __APP_PLL_400_HREF 0x00000800 | ||
57 | #define __APP_PLL_400_HDIV 0x00000400 | ||
58 | #define __APP_PLL_400_P0_1_MK 0x00000300 | ||
59 | #define __APP_PLL_400_P0_1_SH 8 | ||
60 | #define __APP_PLL_400_P0_1(_v) ((_v) << __APP_PLL_400_P0_1_SH) | ||
61 | #define __APP_PLL_400_Z0_2_MK 0x000000e0 | ||
62 | #define __APP_PLL_400_Z0_2_SH 5 | ||
63 | #define __APP_PLL_400_Z0_2(_v) ((_v) << __APP_PLL_400_Z0_2_SH) | ||
64 | #define __APP_PLL_400_RSEL200500 0x00000010 | ||
65 | #define __APP_PLL_400_ENARST 0x00000008 | ||
66 | #define __APP_PLL_400_BYPASS 0x00000004 | ||
67 | #define __APP_PLL_400_LRESETN 0x00000002 | ||
68 | #define __APP_PLL_400_ENABLE 0x00000001 | ||
69 | #define APP_PLL_212_CTL_REG 0x00014208 | ||
70 | #define __P_212_PLL_LOCK 0x80000000 | ||
71 | #define __APP_PLL_212_RESET_TIMER_MK 0x000e0000 | ||
72 | #define __APP_PLL_212_RESET_TIMER_SH 17 | ||
73 | #define __APP_PLL_212_RESET_TIMER(_v) ((_v) << __APP_PLL_212_RESET_TIMER_SH) | ||
74 | #define __APP_PLL_212_LOGIC_SOFT_RESET 0x00010000 | ||
75 | #define __APP_PLL_212_CNTLMT0_1_MK 0x0000c000 | ||
76 | #define __APP_PLL_212_CNTLMT0_1_SH 14 | ||
77 | #define __APP_PLL_212_CNTLMT0_1(_v) ((_v) << __APP_PLL_212_CNTLMT0_1_SH) | ||
78 | #define __APP_PLL_212_JITLMT0_1_MK 0x00003000 | ||
79 | #define __APP_PLL_212_JITLMT0_1_SH 12 | ||
80 | #define __APP_PLL_212_JITLMT0_1(_v) ((_v) << __APP_PLL_212_JITLMT0_1_SH) | ||
81 | #define __APP_PLL_212_HREF 0x00000800 | ||
82 | #define __APP_PLL_212_HDIV 0x00000400 | ||
83 | #define __APP_PLL_212_P0_1_MK 0x00000300 | ||
84 | #define __APP_PLL_212_P0_1_SH 8 | ||
85 | #define __APP_PLL_212_P0_1(_v) ((_v) << __APP_PLL_212_P0_1_SH) | ||
86 | #define __APP_PLL_212_Z0_2_MK 0x000000e0 | ||
87 | #define __APP_PLL_212_Z0_2_SH 5 | ||
88 | #define __APP_PLL_212_Z0_2(_v) ((_v) << __APP_PLL_212_Z0_2_SH) | ||
89 | #define __APP_PLL_212_RSEL200500 0x00000010 | ||
90 | #define __APP_PLL_212_ENARST 0x00000008 | ||
91 | #define __APP_PLL_212_BYPASS 0x00000004 | ||
92 | #define __APP_PLL_212_LRESETN 0x00000002 | ||
93 | #define __APP_PLL_212_ENABLE 0x00000001 | ||
94 | #define HOST_SEM0_REG 0x00014230 | ||
95 | #define __HOST_SEMAPHORE 0x00000001 | ||
96 | #define HOST_SEM1_REG 0x00014234 | ||
97 | #define HOST_SEM2_REG 0x00014238 | ||
98 | #define HOST_SEM3_REG 0x0001423c | ||
99 | #define HOST_SEM0_INFO_REG 0x00014240 | ||
100 | #define HOST_SEM1_INFO_REG 0x00014244 | ||
101 | #define HOST_SEM2_INFO_REG 0x00014248 | ||
102 | #define HOST_SEM3_INFO_REG 0x0001424c | ||
103 | #define HOSTFN0_LPU0_CMD_STAT 0x00019000 | ||
104 | #define __HOSTFN0_LPU0_MBOX_INFO_MK 0xfffffffe | ||
105 | #define __HOSTFN0_LPU0_MBOX_INFO_SH 1 | ||
106 | #define __HOSTFN0_LPU0_MBOX_INFO(_v) ((_v) << __HOSTFN0_LPU0_MBOX_INFO_SH) | ||
107 | #define __HOSTFN0_LPU0_MBOX_CMD_STATUS 0x00000001 | ||
108 | #define LPU0_HOSTFN0_CMD_STAT 0x00019008 | ||
109 | #define __LPU0_HOSTFN0_MBOX_INFO_MK 0xfffffffe | ||
110 | #define __LPU0_HOSTFN0_MBOX_INFO_SH 1 | ||
111 | #define __LPU0_HOSTFN0_MBOX_INFO(_v) ((_v) << __LPU0_HOSTFN0_MBOX_INFO_SH) | ||
112 | #define __LPU0_HOSTFN0_MBOX_CMD_STATUS 0x00000001 | ||
113 | #define HOSTFN1_LPU1_CMD_STAT 0x00019014 | ||
114 | #define __HOSTFN1_LPU1_MBOX_INFO_MK 0xfffffffe | ||
115 | #define __HOSTFN1_LPU1_MBOX_INFO_SH 1 | ||
116 | #define __HOSTFN1_LPU1_MBOX_INFO(_v) ((_v) << __HOSTFN1_LPU1_MBOX_INFO_SH) | ||
117 | #define __HOSTFN1_LPU1_MBOX_CMD_STATUS 0x00000001 | ||
118 | #define LPU1_HOSTFN1_CMD_STAT 0x0001901c | ||
119 | #define __LPU1_HOSTFN1_MBOX_INFO_MK 0xfffffffe | ||
120 | #define __LPU1_HOSTFN1_MBOX_INFO_SH 1 | ||
121 | #define __LPU1_HOSTFN1_MBOX_INFO(_v) ((_v) << __LPU1_HOSTFN1_MBOX_INFO_SH) | ||
122 | #define __LPU1_HOSTFN1_MBOX_CMD_STATUS 0x00000001 | ||
123 | #define CPE_Q0_DEPTH 0x00010014 | ||
124 | #define CPE_Q0_PI 0x0001001c | ||
125 | #define CPE_Q0_CI 0x00010020 | ||
126 | #define CPE_Q1_DEPTH 0x00010034 | ||
127 | #define CPE_Q1_PI 0x0001003c | ||
128 | #define CPE_Q1_CI 0x00010040 | ||
129 | #define CPE_Q2_DEPTH 0x00010054 | ||
130 | #define CPE_Q2_PI 0x0001005c | ||
131 | #define CPE_Q2_CI 0x00010060 | ||
132 | #define CPE_Q3_DEPTH 0x00010074 | ||
133 | #define CPE_Q3_PI 0x0001007c | ||
134 | #define CPE_Q3_CI 0x00010080 | ||
135 | #define CPE_Q4_DEPTH 0x00010094 | ||
136 | #define CPE_Q4_PI 0x0001009c | ||
137 | #define CPE_Q4_CI 0x000100a0 | ||
138 | #define CPE_Q5_DEPTH 0x000100b4 | ||
139 | #define CPE_Q5_PI 0x000100bc | ||
140 | #define CPE_Q5_CI 0x000100c0 | ||
141 | #define CPE_Q6_DEPTH 0x000100d4 | ||
142 | #define CPE_Q6_PI 0x000100dc | ||
143 | #define CPE_Q6_CI 0x000100e0 | ||
144 | #define CPE_Q7_DEPTH 0x000100f4 | ||
145 | #define CPE_Q7_PI 0x000100fc | ||
146 | #define CPE_Q7_CI 0x00010100 | ||
147 | #define RME_Q0_DEPTH 0x00011014 | ||
148 | #define RME_Q0_PI 0x0001101c | ||
149 | #define RME_Q0_CI 0x00011020 | ||
150 | #define RME_Q1_DEPTH 0x00011034 | ||
151 | #define RME_Q1_PI 0x0001103c | ||
152 | #define RME_Q1_CI 0x00011040 | ||
153 | #define RME_Q2_DEPTH 0x00011054 | ||
154 | #define RME_Q2_PI 0x0001105c | ||
155 | #define RME_Q2_CI 0x00011060 | ||
156 | #define RME_Q3_DEPTH 0x00011074 | ||
157 | #define RME_Q3_PI 0x0001107c | ||
158 | #define RME_Q3_CI 0x00011080 | ||
159 | #define RME_Q4_DEPTH 0x00011094 | ||
160 | #define RME_Q4_PI 0x0001109c | ||
161 | #define RME_Q4_CI 0x000110a0 | ||
162 | #define RME_Q5_DEPTH 0x000110b4 | ||
163 | #define RME_Q5_PI 0x000110bc | ||
164 | #define RME_Q5_CI 0x000110c0 | ||
165 | #define RME_Q6_DEPTH 0x000110d4 | ||
166 | #define RME_Q6_PI 0x000110dc | ||
167 | #define RME_Q6_CI 0x000110e0 | ||
168 | #define RME_Q7_DEPTH 0x000110f4 | ||
169 | #define RME_Q7_PI 0x000110fc | ||
170 | #define RME_Q7_CI 0x00011100 | ||
171 | #define PSS_CTL_REG 0x00018800 | ||
172 | #define __PSS_I2C_CLK_DIV_MK 0x00030000 | ||
173 | #define __PSS_I2C_CLK_DIV_SH 16 | ||
174 | #define __PSS_I2C_CLK_DIV(_v) ((_v) << __PSS_I2C_CLK_DIV_SH) | ||
175 | #define __PSS_LMEM_INIT_DONE 0x00001000 | ||
176 | #define __PSS_LMEM_RESET 0x00000200 | ||
177 | #define __PSS_LMEM_INIT_EN 0x00000100 | ||
178 | #define __PSS_LPU1_RESET 0x00000002 | ||
179 | #define __PSS_LPU0_RESET 0x00000001 | ||
180 | #define PSS_ERR_STATUS_REG 0x00018810 | ||
181 | #define __PSS_LMEM1_CORR_ERR 0x00000800 | ||
182 | #define __PSS_LMEM0_CORR_ERR 0x00000400 | ||
183 | #define __PSS_LMEM1_UNCORR_ERR 0x00000200 | ||
184 | #define __PSS_LMEM0_UNCORR_ERR 0x00000100 | ||
185 | #define __PSS_BAL_PERR 0x00000080 | ||
186 | #define __PSS_DIP_IF_ERR 0x00000040 | ||
187 | #define __PSS_IOH_IF_ERR 0x00000020 | ||
188 | #define __PSS_TDS_IF_ERR 0x00000010 | ||
189 | #define __PSS_RDS_IF_ERR 0x00000008 | ||
190 | #define __PSS_SGM_IF_ERR 0x00000004 | ||
191 | #define __PSS_LPU1_RAM_ERR 0x00000002 | ||
192 | #define __PSS_LPU0_RAM_ERR 0x00000001 | ||
193 | #define ERR_SET_REG 0x00018818 | ||
194 | #define __PSS_ERR_STATUS_SET 0x00000fff | ||
195 | |||
196 | /* | ||
197 | * These definitions are either in error/missing in spec. Its auto-generated | ||
198 | * from hard coded values in regparse.pl. | ||
199 | */ | ||
200 | #define __EMPHPOST_AT_4G_MK_FIX 0x0000001c | ||
201 | #define __EMPHPOST_AT_4G_SH_FIX 0x00000002 | ||
202 | #define __EMPHPRE_AT_4G_FIX 0x00000003 | ||
203 | #define __SFP_TXRATE_EN_FIX 0x00000100 | ||
204 | #define __SFP_RXRATE_EN_FIX 0x00000080 | ||
205 | |||
206 | |||
207 | /* | ||
208 | * These register definitions are auto-generated from hard coded values | ||
209 | * in regparse.pl. | ||
210 | */ | ||
211 | #define HOSTFN0_LPU_MBOX0_0 0x00019200 | ||
212 | #define HOSTFN1_LPU_MBOX0_8 0x00019260 | ||
213 | #define LPU_HOSTFN0_MBOX0_0 0x00019280 | ||
214 | #define LPU_HOSTFN1_MBOX0_8 0x000192e0 | ||
215 | |||
216 | |||
217 | /* | ||
218 | * These register mapping definitions are auto-generated from mapping tables | ||
219 | * in regparse.pl. | ||
220 | */ | ||
221 | #define BFA_IOC0_HBEAT_REG HOST_SEM0_INFO_REG | ||
222 | #define BFA_IOC0_STATE_REG HOST_SEM1_INFO_REG | ||
223 | #define BFA_IOC1_HBEAT_REG HOST_SEM2_INFO_REG | ||
224 | #define BFA_IOC1_STATE_REG HOST_SEM3_INFO_REG | ||
225 | #define BFA_FW_USE_COUNT HOST_SEM4_INFO_REG | ||
226 | |||
227 | #define CPE_Q_DEPTH(__n) \ | ||
228 | (CPE_Q0_DEPTH + (__n) * (CPE_Q1_DEPTH - CPE_Q0_DEPTH)) | ||
229 | #define CPE_Q_PI(__n) \ | ||
230 | (CPE_Q0_PI + (__n) * (CPE_Q1_PI - CPE_Q0_PI)) | ||
231 | #define CPE_Q_CI(__n) \ | ||
232 | (CPE_Q0_CI + (__n) * (CPE_Q1_CI - CPE_Q0_CI)) | ||
233 | #define RME_Q_DEPTH(__n) \ | ||
234 | (RME_Q0_DEPTH + (__n) * (RME_Q1_DEPTH - RME_Q0_DEPTH)) | ||
235 | #define RME_Q_PI(__n) \ | ||
236 | (RME_Q0_PI + (__n) * (RME_Q1_PI - RME_Q0_PI)) | ||
237 | #define RME_Q_CI(__n) \ | ||
238 | (RME_Q0_CI + (__n) * (RME_Q1_CI - RME_Q0_CI)) | ||
239 | |||
240 | #define CPE_Q_NUM(__fn, __q) (((__fn) << 2) + (__q)) | ||
241 | #define RME_Q_NUM(__fn, __q) (((__fn) << 2) + (__q)) | ||
242 | #define CPE_Q_MASK(__q) ((__q) & 0x3) | ||
243 | #define RME_Q_MASK(__q) ((__q) & 0x3) | ||
244 | |||
245 | |||
246 | /* | ||
247 | * PCI MSI-X vector defines | ||
248 | */ | ||
249 | enum { | ||
250 | BFA_MSIX_CPE_Q0 = 0, | ||
251 | BFA_MSIX_CPE_Q1 = 1, | ||
252 | BFA_MSIX_CPE_Q2 = 2, | ||
253 | BFA_MSIX_CPE_Q3 = 3, | ||
254 | BFA_MSIX_CPE_Q4 = 4, | ||
255 | BFA_MSIX_CPE_Q5 = 5, | ||
256 | BFA_MSIX_CPE_Q6 = 6, | ||
257 | BFA_MSIX_CPE_Q7 = 7, | ||
258 | BFA_MSIX_RME_Q0 = 8, | ||
259 | BFA_MSIX_RME_Q1 = 9, | ||
260 | BFA_MSIX_RME_Q2 = 10, | ||
261 | BFA_MSIX_RME_Q3 = 11, | ||
262 | BFA_MSIX_RME_Q4 = 12, | ||
263 | BFA_MSIX_RME_Q5 = 13, | ||
264 | BFA_MSIX_RME_Q6 = 14, | ||
265 | BFA_MSIX_RME_Q7 = 15, | ||
266 | BFA_MSIX_ERR_EMC = 16, | ||
267 | BFA_MSIX_ERR_LPU0 = 17, | ||
268 | BFA_MSIX_ERR_LPU1 = 18, | ||
269 | BFA_MSIX_ERR_PSS = 19, | ||
270 | BFA_MSIX_MBOX_LPU0 = 20, | ||
271 | BFA_MSIX_MBOX_LPU1 = 21, | ||
272 | BFA_MSIX_CB_MAX = 22, | ||
273 | }; | ||
274 | |||
275 | /* | ||
276 | * And corresponding host interrupt status bit field defines | ||
277 | */ | ||
278 | #define __HFN_INT_CPE_Q0 0x00000001U | ||
279 | #define __HFN_INT_CPE_Q1 0x00000002U | ||
280 | #define __HFN_INT_CPE_Q2 0x00000004U | ||
281 | #define __HFN_INT_CPE_Q3 0x00000008U | ||
282 | #define __HFN_INT_CPE_Q4 0x00000010U | ||
283 | #define __HFN_INT_CPE_Q5 0x00000020U | ||
284 | #define __HFN_INT_CPE_Q6 0x00000040U | ||
285 | #define __HFN_INT_CPE_Q7 0x00000080U | ||
286 | #define __HFN_INT_RME_Q0 0x00000100U | ||
287 | #define __HFN_INT_RME_Q1 0x00000200U | ||
288 | #define __HFN_INT_RME_Q2 0x00000400U | ||
289 | #define __HFN_INT_RME_Q3 0x00000800U | ||
290 | #define __HFN_INT_RME_Q4 0x00001000U | ||
291 | #define __HFN_INT_RME_Q5 0x00002000U | ||
292 | #define __HFN_INT_RME_Q6 0x00004000U | ||
293 | #define __HFN_INT_RME_Q7 0x00008000U | ||
294 | #define __HFN_INT_ERR_EMC 0x00010000U | ||
295 | #define __HFN_INT_ERR_LPU0 0x00020000U | ||
296 | #define __HFN_INT_ERR_LPU1 0x00040000U | ||
297 | #define __HFN_INT_ERR_PSS 0x00080000U | ||
298 | #define __HFN_INT_MBOX_LPU0 0x00100000U | ||
299 | #define __HFN_INT_MBOX_LPU1 0x00200000U | ||
300 | #define __HFN_INT_MBOX1_LPU0 0x00400000U | ||
301 | #define __HFN_INT_MBOX1_LPU1 0x00800000U | ||
302 | #define __HFN_INT_CPE_MASK 0x000000ffU | ||
303 | #define __HFN_INT_RME_MASK 0x0000ff00U | ||
304 | |||
305 | |||
306 | /* | ||
307 | * crossbow memory map. | ||
308 | */ | ||
309 | #define PSS_SMEM_PAGE_START 0x8000 | ||
310 | #define PSS_SMEM_PGNUM(_pg0, _ma) ((_pg0) + ((_ma) >> 15)) | ||
311 | #define PSS_SMEM_PGOFF(_ma) ((_ma) & 0x7fff) | ||
312 | |||
313 | /* | ||
314 | * End of crossbow memory map | ||
315 | */ | ||
316 | |||
317 | |||
318 | #endif /* __BFI_CBREG_H__ */ | ||
319 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_cee.h b/drivers/scsi/bfa/include/bfi/bfi_cee.h deleted file mode 100644 index 0970596583ea..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_cee.h +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | /** | ||
18 | * Copyright (c) 2006-2009 Brocade Communications Systems, Inc. | ||
19 | * All rights reserved. | ||
20 | * | ||
21 | * bfi_dcbx.h BFI Interface (Mailbox commands and related structures) | ||
22 | * between host driver and DCBX/LLDP firmware module. | ||
23 | * | ||
24 | **/ | ||
25 | |||
26 | #ifndef __BFI_CEE_H__ | ||
27 | #define __BFI_CEE_H__ | ||
28 | |||
29 | #include <bfi/bfi.h> | ||
30 | |||
31 | #pragma pack(1) | ||
32 | |||
33 | |||
34 | enum bfi_cee_h2i_msgs_e { | ||
35 | BFI_CEE_H2I_GET_CFG_REQ = 1, | ||
36 | BFI_CEE_H2I_RESET_STATS = 2, | ||
37 | BFI_CEE_H2I_GET_STATS_REQ = 3, | ||
38 | }; | ||
39 | |||
40 | |||
41 | enum bfi_cee_i2h_msgs_e { | ||
42 | BFI_CEE_I2H_GET_CFG_RSP = BFA_I2HM(1), | ||
43 | BFI_CEE_I2H_RESET_STATS_RSP = BFA_I2HM(2), | ||
44 | BFI_CEE_I2H_GET_STATS_RSP = BFA_I2HM(3), | ||
45 | }; | ||
46 | |||
47 | |||
48 | /* Data structures */ | ||
49 | |||
50 | /* | ||
51 | * BFI_CEE_H2I_RESET_STATS | ||
52 | */ | ||
53 | struct bfi_lldp_reset_stats_s { | ||
54 | struct bfi_mhdr_s mh; | ||
55 | }; | ||
56 | |||
57 | /* | ||
58 | * BFI_CEE_H2I_RESET_STATS | ||
59 | */ | ||
60 | struct bfi_cee_reset_stats_s { | ||
61 | struct bfi_mhdr_s mh; | ||
62 | }; | ||
63 | |||
64 | /* | ||
65 | * BFI_CEE_H2I_GET_CFG_REQ | ||
66 | */ | ||
67 | struct bfi_cee_get_req_s { | ||
68 | struct bfi_mhdr_s mh; | ||
69 | union bfi_addr_u dma_addr; | ||
70 | }; | ||
71 | |||
72 | |||
73 | /* | ||
74 | * BFI_CEE_I2H_GET_CFG_RSP | ||
75 | */ | ||
76 | struct bfi_cee_get_rsp_s { | ||
77 | struct bfi_mhdr_s mh; | ||
78 | u8 cmd_status; | ||
79 | u8 rsvd[3]; | ||
80 | }; | ||
81 | |||
82 | /* | ||
83 | * BFI_CEE_H2I_GET_STATS_REQ | ||
84 | */ | ||
85 | struct bfi_cee_stats_req_s { | ||
86 | struct bfi_mhdr_s mh; | ||
87 | union bfi_addr_u dma_addr; | ||
88 | }; | ||
89 | |||
90 | |||
91 | /* | ||
92 | * BFI_CEE_I2H_GET_STATS_RSP | ||
93 | */ | ||
94 | struct bfi_cee_stats_rsp_s { | ||
95 | struct bfi_mhdr_s mh; | ||
96 | u8 cmd_status; | ||
97 | u8 rsvd[3]; | ||
98 | }; | ||
99 | |||
100 | |||
101 | |||
102 | union bfi_cee_h2i_msg_u { | ||
103 | struct bfi_mhdr_s mh; | ||
104 | struct bfi_cee_get_req_s get_req; | ||
105 | struct bfi_cee_stats_req_s stats_req; | ||
106 | }; | ||
107 | |||
108 | |||
109 | union bfi_cee_i2h_msg_u { | ||
110 | struct bfi_mhdr_s mh; | ||
111 | struct bfi_cee_get_rsp_s get_rsp; | ||
112 | struct bfi_cee_stats_rsp_s stats_rsp; | ||
113 | }; | ||
114 | |||
115 | #pragma pack() | ||
116 | |||
117 | |||
118 | #endif /* __BFI_CEE_H__ */ | ||
119 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_ctreg.h b/drivers/scsi/bfa/include/bfi/bfi_ctreg.h deleted file mode 100644 index c0ef5a93b797..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_ctreg.h +++ /dev/null | |||
@@ -1,640 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * bfi_ctreg.h catapult host block register definitions | ||
20 | * | ||
21 | * !!! Do not edit. Auto generated. !!! | ||
22 | */ | ||
23 | |||
24 | #ifndef __BFI_CTREG_H__ | ||
25 | #define __BFI_CTREG_H__ | ||
26 | |||
27 | |||
28 | #define HOSTFN0_LPU_MBOX0_0 0x00019200 | ||
29 | #define HOSTFN1_LPU_MBOX0_8 0x00019260 | ||
30 | #define LPU_HOSTFN0_MBOX0_0 0x00019280 | ||
31 | #define LPU_HOSTFN1_MBOX0_8 0x000192e0 | ||
32 | #define HOSTFN2_LPU_MBOX0_0 0x00019400 | ||
33 | #define HOSTFN3_LPU_MBOX0_8 0x00019460 | ||
34 | #define LPU_HOSTFN2_MBOX0_0 0x00019480 | ||
35 | #define LPU_HOSTFN3_MBOX0_8 0x000194e0 | ||
36 | #define HOSTFN0_INT_STATUS 0x00014000 | ||
37 | #define __HOSTFN0_HALT_OCCURRED 0x01000000 | ||
38 | #define __HOSTFN0_INT_STATUS_LVL_MK 0x00f00000 | ||
39 | #define __HOSTFN0_INT_STATUS_LVL_SH 20 | ||
40 | #define __HOSTFN0_INT_STATUS_LVL(_v) ((_v) << __HOSTFN0_INT_STATUS_LVL_SH) | ||
41 | #define __HOSTFN0_INT_STATUS_P_MK 0x000f0000 | ||
42 | #define __HOSTFN0_INT_STATUS_P_SH 16 | ||
43 | #define __HOSTFN0_INT_STATUS_P(_v) ((_v) << __HOSTFN0_INT_STATUS_P_SH) | ||
44 | #define __HOSTFN0_INT_STATUS_F 0x0000ffff | ||
45 | #define HOSTFN0_INT_MSK 0x00014004 | ||
46 | #define HOST_PAGE_NUM_FN0 0x00014008 | ||
47 | #define __HOST_PAGE_NUM_FN 0x000001ff | ||
48 | #define HOST_MSIX_ERR_INDEX_FN0 0x0001400c | ||
49 | #define __MSIX_ERR_INDEX_FN 0x000001ff | ||
50 | #define HOSTFN1_INT_STATUS 0x00014100 | ||
51 | #define __HOSTFN1_HALT_OCCURRED 0x01000000 | ||
52 | #define __HOSTFN1_INT_STATUS_LVL_MK 0x00f00000 | ||
53 | #define __HOSTFN1_INT_STATUS_LVL_SH 20 | ||
54 | #define __HOSTFN1_INT_STATUS_LVL(_v) ((_v) << __HOSTFN1_INT_STATUS_LVL_SH) | ||
55 | #define __HOSTFN1_INT_STATUS_P_MK 0x000f0000 | ||
56 | #define __HOSTFN1_INT_STATUS_P_SH 16 | ||
57 | #define __HOSTFN1_INT_STATUS_P(_v) ((_v) << __HOSTFN1_INT_STATUS_P_SH) | ||
58 | #define __HOSTFN1_INT_STATUS_F 0x0000ffff | ||
59 | #define HOSTFN1_INT_MSK 0x00014104 | ||
60 | #define HOST_PAGE_NUM_FN1 0x00014108 | ||
61 | #define HOST_MSIX_ERR_INDEX_FN1 0x0001410c | ||
62 | #define APP_PLL_425_CTL_REG 0x00014204 | ||
63 | #define __P_425_PLL_LOCK 0x80000000 | ||
64 | #define __APP_PLL_425_SRAM_USE_100MHZ 0x00100000 | ||
65 | #define __APP_PLL_425_RESET_TIMER_MK 0x000e0000 | ||
66 | #define __APP_PLL_425_RESET_TIMER_SH 17 | ||
67 | #define __APP_PLL_425_RESET_TIMER(_v) ((_v) << __APP_PLL_425_RESET_TIMER_SH) | ||
68 | #define __APP_PLL_425_LOGIC_SOFT_RESET 0x00010000 | ||
69 | #define __APP_PLL_425_CNTLMT0_1_MK 0x0000c000 | ||
70 | #define __APP_PLL_425_CNTLMT0_1_SH 14 | ||
71 | #define __APP_PLL_425_CNTLMT0_1(_v) ((_v) << __APP_PLL_425_CNTLMT0_1_SH) | ||
72 | #define __APP_PLL_425_JITLMT0_1_MK 0x00003000 | ||
73 | #define __APP_PLL_425_JITLMT0_1_SH 12 | ||
74 | #define __APP_PLL_425_JITLMT0_1(_v) ((_v) << __APP_PLL_425_JITLMT0_1_SH) | ||
75 | #define __APP_PLL_425_HREF 0x00000800 | ||
76 | #define __APP_PLL_425_HDIV 0x00000400 | ||
77 | #define __APP_PLL_425_P0_1_MK 0x00000300 | ||
78 | #define __APP_PLL_425_P0_1_SH 8 | ||
79 | #define __APP_PLL_425_P0_1(_v) ((_v) << __APP_PLL_425_P0_1_SH) | ||
80 | #define __APP_PLL_425_Z0_2_MK 0x000000e0 | ||
81 | #define __APP_PLL_425_Z0_2_SH 5 | ||
82 | #define __APP_PLL_425_Z0_2(_v) ((_v) << __APP_PLL_425_Z0_2_SH) | ||
83 | #define __APP_PLL_425_RSEL200500 0x00000010 | ||
84 | #define __APP_PLL_425_ENARST 0x00000008 | ||
85 | #define __APP_PLL_425_BYPASS 0x00000004 | ||
86 | #define __APP_PLL_425_LRESETN 0x00000002 | ||
87 | #define __APP_PLL_425_ENABLE 0x00000001 | ||
88 | #define APP_PLL_312_CTL_REG 0x00014208 | ||
89 | #define __P_312_PLL_LOCK 0x80000000 | ||
90 | #define __ENABLE_MAC_AHB_1 0x00800000 | ||
91 | #define __ENABLE_MAC_AHB_0 0x00400000 | ||
92 | #define __ENABLE_MAC_1 0x00200000 | ||
93 | #define __ENABLE_MAC_0 0x00100000 | ||
94 | #define __APP_PLL_312_RESET_TIMER_MK 0x000e0000 | ||
95 | #define __APP_PLL_312_RESET_TIMER_SH 17 | ||
96 | #define __APP_PLL_312_RESET_TIMER(_v) ((_v) << __APP_PLL_312_RESET_TIMER_SH) | ||
97 | #define __APP_PLL_312_LOGIC_SOFT_RESET 0x00010000 | ||
98 | #define __APP_PLL_312_CNTLMT0_1_MK 0x0000c000 | ||
99 | #define __APP_PLL_312_CNTLMT0_1_SH 14 | ||
100 | #define __APP_PLL_312_CNTLMT0_1(_v) ((_v) << __APP_PLL_312_CNTLMT0_1_SH) | ||
101 | #define __APP_PLL_312_JITLMT0_1_MK 0x00003000 | ||
102 | #define __APP_PLL_312_JITLMT0_1_SH 12 | ||
103 | #define __APP_PLL_312_JITLMT0_1(_v) ((_v) << __APP_PLL_312_JITLMT0_1_SH) | ||
104 | #define __APP_PLL_312_HREF 0x00000800 | ||
105 | #define __APP_PLL_312_HDIV 0x00000400 | ||
106 | #define __APP_PLL_312_P0_1_MK 0x00000300 | ||
107 | #define __APP_PLL_312_P0_1_SH 8 | ||
108 | #define __APP_PLL_312_P0_1(_v) ((_v) << __APP_PLL_312_P0_1_SH) | ||
109 | #define __APP_PLL_312_Z0_2_MK 0x000000e0 | ||
110 | #define __APP_PLL_312_Z0_2_SH 5 | ||
111 | #define __APP_PLL_312_Z0_2(_v) ((_v) << __APP_PLL_312_Z0_2_SH) | ||
112 | #define __APP_PLL_312_RSEL200500 0x00000010 | ||
113 | #define __APP_PLL_312_ENARST 0x00000008 | ||
114 | #define __APP_PLL_312_BYPASS 0x00000004 | ||
115 | #define __APP_PLL_312_LRESETN 0x00000002 | ||
116 | #define __APP_PLL_312_ENABLE 0x00000001 | ||
117 | #define MBIST_CTL_REG 0x00014220 | ||
118 | #define __EDRAM_BISTR_START 0x00000004 | ||
119 | #define __MBIST_RESET 0x00000002 | ||
120 | #define __MBIST_START 0x00000001 | ||
121 | #define MBIST_STAT_REG 0x00014224 | ||
122 | #define __EDRAM_BISTR_STATUS 0x00000008 | ||
123 | #define __EDRAM_BISTR_DONE 0x00000004 | ||
124 | #define __MEM_BIT_STATUS 0x00000002 | ||
125 | #define __MBIST_DONE 0x00000001 | ||
126 | #define HOST_SEM0_REG 0x00014230 | ||
127 | #define __HOST_SEMAPHORE 0x00000001 | ||
128 | #define HOST_SEM1_REG 0x00014234 | ||
129 | #define HOST_SEM2_REG 0x00014238 | ||
130 | #define HOST_SEM3_REG 0x0001423c | ||
131 | #define HOST_SEM0_INFO_REG 0x00014240 | ||
132 | #define HOST_SEM1_INFO_REG 0x00014244 | ||
133 | #define HOST_SEM2_INFO_REG 0x00014248 | ||
134 | #define HOST_SEM3_INFO_REG 0x0001424c | ||
135 | #define ETH_MAC_SER_REG 0x00014288 | ||
136 | #define __APP_EMS_CKBUFAMPIN 0x00000020 | ||
137 | #define __APP_EMS_REFCLKSEL 0x00000010 | ||
138 | #define __APP_EMS_CMLCKSEL 0x00000008 | ||
139 | #define __APP_EMS_REFCKBUFEN2 0x00000004 | ||
140 | #define __APP_EMS_REFCKBUFEN1 0x00000002 | ||
141 | #define __APP_EMS_CHANNEL_SEL 0x00000001 | ||
142 | #define HOSTFN2_INT_STATUS 0x00014300 | ||
143 | #define __HOSTFN2_HALT_OCCURRED 0x01000000 | ||
144 | #define __HOSTFN2_INT_STATUS_LVL_MK 0x00f00000 | ||
145 | #define __HOSTFN2_INT_STATUS_LVL_SH 20 | ||
146 | #define __HOSTFN2_INT_STATUS_LVL(_v) ((_v) << __HOSTFN2_INT_STATUS_LVL_SH) | ||
147 | #define __HOSTFN2_INT_STATUS_P_MK 0x000f0000 | ||
148 | #define __HOSTFN2_INT_STATUS_P_SH 16 | ||
149 | #define __HOSTFN2_INT_STATUS_P(_v) ((_v) << __HOSTFN2_INT_STATUS_P_SH) | ||
150 | #define __HOSTFN2_INT_STATUS_F 0x0000ffff | ||
151 | #define HOSTFN2_INT_MSK 0x00014304 | ||
152 | #define HOST_PAGE_NUM_FN2 0x00014308 | ||
153 | #define HOST_MSIX_ERR_INDEX_FN2 0x0001430c | ||
154 | #define HOSTFN3_INT_STATUS 0x00014400 | ||
155 | #define __HALT_OCCURRED 0x01000000 | ||
156 | #define __HOSTFN3_INT_STATUS_LVL_MK 0x00f00000 | ||
157 | #define __HOSTFN3_INT_STATUS_LVL_SH 20 | ||
158 | #define __HOSTFN3_INT_STATUS_LVL(_v) ((_v) << __HOSTFN3_INT_STATUS_LVL_SH) | ||
159 | #define __HOSTFN3_INT_STATUS_P_MK 0x000f0000 | ||
160 | #define __HOSTFN3_INT_STATUS_P_SH 16 | ||
161 | #define __HOSTFN3_INT_STATUS_P(_v) ((_v) << __HOSTFN3_INT_STATUS_P_SH) | ||
162 | #define __HOSTFN3_INT_STATUS_F 0x0000ffff | ||
163 | #define HOSTFN3_INT_MSK 0x00014404 | ||
164 | #define HOST_PAGE_NUM_FN3 0x00014408 | ||
165 | #define HOST_MSIX_ERR_INDEX_FN3 0x0001440c | ||
166 | #define FNC_ID_REG 0x00014600 | ||
167 | #define __FUNCTION_NUMBER 0x00000007 | ||
168 | #define FNC_PERS_REG 0x00014604 | ||
169 | #define __F3_FUNCTION_ACTIVE 0x80000000 | ||
170 | #define __F3_FUNCTION_MODE 0x40000000 | ||
171 | #define __F3_PORT_MAP_MK 0x30000000 | ||
172 | #define __F3_PORT_MAP_SH 28 | ||
173 | #define __F3_PORT_MAP(_v) ((_v) << __F3_PORT_MAP_SH) | ||
174 | #define __F3_VM_MODE 0x08000000 | ||
175 | #define __F3_INTX_STATUS_MK 0x07000000 | ||
176 | #define __F3_INTX_STATUS_SH 24 | ||
177 | #define __F3_INTX_STATUS(_v) ((_v) << __F3_INTX_STATUS_SH) | ||
178 | #define __F2_FUNCTION_ACTIVE 0x00800000 | ||
179 | #define __F2_FUNCTION_MODE 0x00400000 | ||
180 | #define __F2_PORT_MAP_MK 0x00300000 | ||
181 | #define __F2_PORT_MAP_SH 20 | ||
182 | #define __F2_PORT_MAP(_v) ((_v) << __F2_PORT_MAP_SH) | ||
183 | #define __F2_VM_MODE 0x00080000 | ||
184 | #define __F2_INTX_STATUS_MK 0x00070000 | ||
185 | #define __F2_INTX_STATUS_SH 16 | ||
186 | #define __F2_INTX_STATUS(_v) ((_v) << __F2_INTX_STATUS_SH) | ||
187 | #define __F1_FUNCTION_ACTIVE 0x00008000 | ||
188 | #define __F1_FUNCTION_MODE 0x00004000 | ||
189 | #define __F1_PORT_MAP_MK 0x00003000 | ||
190 | #define __F1_PORT_MAP_SH 12 | ||
191 | #define __F1_PORT_MAP(_v) ((_v) << __F1_PORT_MAP_SH) | ||
192 | #define __F1_VM_MODE 0x00000800 | ||
193 | #define __F1_INTX_STATUS_MK 0x00000700 | ||
194 | #define __F1_INTX_STATUS_SH 8 | ||
195 | #define __F1_INTX_STATUS(_v) ((_v) << __F1_INTX_STATUS_SH) | ||
196 | #define __F0_FUNCTION_ACTIVE 0x00000080 | ||
197 | #define __F0_FUNCTION_MODE 0x00000040 | ||
198 | #define __F0_PORT_MAP_MK 0x00000030 | ||
199 | #define __F0_PORT_MAP_SH 4 | ||
200 | #define __F0_PORT_MAP(_v) ((_v) << __F0_PORT_MAP_SH) | ||
201 | #define __F0_VM_MODE 0x00000008 | ||
202 | #define __F0_INTX_STATUS 0x00000007 | ||
203 | enum { | ||
204 | __F0_INTX_STATUS_MSIX = 0x0, | ||
205 | __F0_INTX_STATUS_INTA = 0x1, | ||
206 | __F0_INTX_STATUS_INTB = 0x2, | ||
207 | __F0_INTX_STATUS_INTC = 0x3, | ||
208 | __F0_INTX_STATUS_INTD = 0x4, | ||
209 | }; | ||
210 | #define OP_MODE 0x0001460c | ||
211 | #define __APP_ETH_CLK_LOWSPEED 0x00000004 | ||
212 | #define __GLOBAL_CORECLK_HALFSPEED 0x00000002 | ||
213 | #define __GLOBAL_FCOE_MODE 0x00000001 | ||
214 | #define HOST_SEM4_REG 0x00014610 | ||
215 | #define HOST_SEM5_REG 0x00014614 | ||
216 | #define HOST_SEM6_REG 0x00014618 | ||
217 | #define HOST_SEM7_REG 0x0001461c | ||
218 | #define HOST_SEM4_INFO_REG 0x00014620 | ||
219 | #define HOST_SEM5_INFO_REG 0x00014624 | ||
220 | #define HOST_SEM6_INFO_REG 0x00014628 | ||
221 | #define HOST_SEM7_INFO_REG 0x0001462c | ||
222 | #define HOSTFN0_LPU0_MBOX0_CMD_STAT 0x00019000 | ||
223 | #define __HOSTFN0_LPU0_MBOX0_INFO_MK 0xfffffffe | ||
224 | #define __HOSTFN0_LPU0_MBOX0_INFO_SH 1 | ||
225 | #define __HOSTFN0_LPU0_MBOX0_INFO(_v) ((_v) << __HOSTFN0_LPU0_MBOX0_INFO_SH) | ||
226 | #define __HOSTFN0_LPU0_MBOX0_CMD_STATUS 0x00000001 | ||
227 | #define HOSTFN0_LPU1_MBOX0_CMD_STAT 0x00019004 | ||
228 | #define __HOSTFN0_LPU1_MBOX0_INFO_MK 0xfffffffe | ||
229 | #define __HOSTFN0_LPU1_MBOX0_INFO_SH 1 | ||
230 | #define __HOSTFN0_LPU1_MBOX0_INFO(_v) ((_v) << __HOSTFN0_LPU1_MBOX0_INFO_SH) | ||
231 | #define __HOSTFN0_LPU1_MBOX0_CMD_STATUS 0x00000001 | ||
232 | #define LPU0_HOSTFN0_MBOX0_CMD_STAT 0x00019008 | ||
233 | #define __LPU0_HOSTFN0_MBOX0_INFO_MK 0xfffffffe | ||
234 | #define __LPU0_HOSTFN0_MBOX0_INFO_SH 1 | ||
235 | #define __LPU0_HOSTFN0_MBOX0_INFO(_v) ((_v) << __LPU0_HOSTFN0_MBOX0_INFO_SH) | ||
236 | #define __LPU0_HOSTFN0_MBOX0_CMD_STATUS 0x00000001 | ||
237 | #define LPU1_HOSTFN0_MBOX0_CMD_STAT 0x0001900c | ||
238 | #define __LPU1_HOSTFN0_MBOX0_INFO_MK 0xfffffffe | ||
239 | #define __LPU1_HOSTFN0_MBOX0_INFO_SH 1 | ||
240 | #define __LPU1_HOSTFN0_MBOX0_INFO(_v) ((_v) << __LPU1_HOSTFN0_MBOX0_INFO_SH) | ||
241 | #define __LPU1_HOSTFN0_MBOX0_CMD_STATUS 0x00000001 | ||
242 | #define HOSTFN1_LPU0_MBOX0_CMD_STAT 0x00019010 | ||
243 | #define __HOSTFN1_LPU0_MBOX0_INFO_MK 0xfffffffe | ||
244 | #define __HOSTFN1_LPU0_MBOX0_INFO_SH 1 | ||
245 | #define __HOSTFN1_LPU0_MBOX0_INFO(_v) ((_v) << __HOSTFN1_LPU0_MBOX0_INFO_SH) | ||
246 | #define __HOSTFN1_LPU0_MBOX0_CMD_STATUS 0x00000001 | ||
247 | #define HOSTFN1_LPU1_MBOX0_CMD_STAT 0x00019014 | ||
248 | #define __HOSTFN1_LPU1_MBOX0_INFO_MK 0xfffffffe | ||
249 | #define __HOSTFN1_LPU1_MBOX0_INFO_SH 1 | ||
250 | #define __HOSTFN1_LPU1_MBOX0_INFO(_v) ((_v) << __HOSTFN1_LPU1_MBOX0_INFO_SH) | ||
251 | #define __HOSTFN1_LPU1_MBOX0_CMD_STATUS 0x00000001 | ||
252 | #define LPU0_HOSTFN1_MBOX0_CMD_STAT 0x00019018 | ||
253 | #define __LPU0_HOSTFN1_MBOX0_INFO_MK 0xfffffffe | ||
254 | #define __LPU0_HOSTFN1_MBOX0_INFO_SH 1 | ||
255 | #define __LPU0_HOSTFN1_MBOX0_INFO(_v) ((_v) << __LPU0_HOSTFN1_MBOX0_INFO_SH) | ||
256 | #define __LPU0_HOSTFN1_MBOX0_CMD_STATUS 0x00000001 | ||
257 | #define LPU1_HOSTFN1_MBOX0_CMD_STAT 0x0001901c | ||
258 | #define __LPU1_HOSTFN1_MBOX0_INFO_MK 0xfffffffe | ||
259 | #define __LPU1_HOSTFN1_MBOX0_INFO_SH 1 | ||
260 | #define __LPU1_HOSTFN1_MBOX0_INFO(_v) ((_v) << __LPU1_HOSTFN1_MBOX0_INFO_SH) | ||
261 | #define __LPU1_HOSTFN1_MBOX0_CMD_STATUS 0x00000001 | ||
262 | #define HOSTFN2_LPU0_MBOX0_CMD_STAT 0x00019150 | ||
263 | #define __HOSTFN2_LPU0_MBOX0_INFO_MK 0xfffffffe | ||
264 | #define __HOSTFN2_LPU0_MBOX0_INFO_SH 1 | ||
265 | #define __HOSTFN2_LPU0_MBOX0_INFO(_v) ((_v) << __HOSTFN2_LPU0_MBOX0_INFO_SH) | ||
266 | #define __HOSTFN2_LPU0_MBOX0_CMD_STATUS 0x00000001 | ||
267 | #define HOSTFN2_LPU1_MBOX0_CMD_STAT 0x00019154 | ||
268 | #define __HOSTFN2_LPU1_MBOX0_INFO_MK 0xfffffffe | ||
269 | #define __HOSTFN2_LPU1_MBOX0_INFO_SH 1 | ||
270 | #define __HOSTFN2_LPU1_MBOX0_INFO(_v) ((_v) << __HOSTFN2_LPU1_MBOX0_INFO_SH) | ||
271 | #define __HOSTFN2_LPU1_MBOX0BOX0_CMD_STATUS 0x00000001 | ||
272 | #define LPU0_HOSTFN2_MBOX0_CMD_STAT 0x00019158 | ||
273 | #define __LPU0_HOSTFN2_MBOX0_INFO_MK 0xfffffffe | ||
274 | #define __LPU0_HOSTFN2_MBOX0_INFO_SH 1 | ||
275 | #define __LPU0_HOSTFN2_MBOX0_INFO(_v) ((_v) << __LPU0_HOSTFN2_MBOX0_INFO_SH) | ||
276 | #define __LPU0_HOSTFN2_MBOX0_CMD_STATUS 0x00000001 | ||
277 | #define LPU1_HOSTFN2_MBOX0_CMD_STAT 0x0001915c | ||
278 | #define __LPU1_HOSTFN2_MBOX0_INFO_MK 0xfffffffe | ||
279 | #define __LPU1_HOSTFN2_MBOX0_INFO_SH 1 | ||
280 | #define __LPU1_HOSTFN2_MBOX0_INFO(_v) ((_v) << __LPU1_HOSTFN2_MBOX0_INFO_SH) | ||
281 | #define __LPU1_HOSTFN2_MBOX0_CMD_STATUS 0x00000001 | ||
282 | #define HOSTFN3_LPU0_MBOX0_CMD_STAT 0x00019160 | ||
283 | #define __HOSTFN3_LPU0_MBOX0_INFO_MK 0xfffffffe | ||
284 | #define __HOSTFN3_LPU0_MBOX0_INFO_SH 1 | ||
285 | #define __HOSTFN3_LPU0_MBOX0_INFO(_v) ((_v) << __HOSTFN3_LPU0_MBOX0_INFO_SH) | ||
286 | #define __HOSTFN3_LPU0_MBOX0_CMD_STATUS 0x00000001 | ||
287 | #define HOSTFN3_LPU1_MBOX0_CMD_STAT 0x00019164 | ||
288 | #define __HOSTFN3_LPU1_MBOX0_INFO_MK 0xfffffffe | ||
289 | #define __HOSTFN3_LPU1_MBOX0_INFO_SH 1 | ||
290 | #define __HOSTFN3_LPU1_MBOX0_INFO(_v) ((_v) << __HOSTFN3_LPU1_MBOX0_INFO_SH) | ||
291 | #define __HOSTFN3_LPU1_MBOX0_CMD_STATUS 0x00000001 | ||
292 | #define LPU0_HOSTFN3_MBOX0_CMD_STAT 0x00019168 | ||
293 | #define __LPU0_HOSTFN3_MBOX0_INFO_MK 0xfffffffe | ||
294 | #define __LPU0_HOSTFN3_MBOX0_INFO_SH 1 | ||
295 | #define __LPU0_HOSTFN3_MBOX0_INFO(_v) ((_v) << __LPU0_HOSTFN3_MBOX0_INFO_SH) | ||
296 | #define __LPU0_HOSTFN3_MBOX0_CMD_STATUS 0x00000001 | ||
297 | #define LPU1_HOSTFN3_MBOX0_CMD_STAT 0x0001916c | ||
298 | #define __LPU1_HOSTFN3_MBOX0_INFO_MK 0xfffffffe | ||
299 | #define __LPU1_HOSTFN3_MBOX0_INFO_SH 1 | ||
300 | #define __LPU1_HOSTFN3_MBOX0_INFO(_v) ((_v) << __LPU1_HOSTFN3_MBOX0_INFO_SH) | ||
301 | #define __LPU1_HOSTFN3_MBOX0_CMD_STATUS 0x00000001 | ||
302 | #define FW_INIT_HALT_P0 0x000191ac | ||
303 | #define __FW_INIT_HALT_P 0x00000001 | ||
304 | #define FW_INIT_HALT_P1 0x000191bc | ||
305 | #define CPE_PI_PTR_Q0 0x00038000 | ||
306 | #define __CPE_PI_UNUSED_MK 0xffff0000 | ||
307 | #define __CPE_PI_UNUSED_SH 16 | ||
308 | #define __CPE_PI_UNUSED(_v) ((_v) << __CPE_PI_UNUSED_SH) | ||
309 | #define __CPE_PI_PTR 0x0000ffff | ||
310 | #define CPE_PI_PTR_Q1 0x00038040 | ||
311 | #define CPE_CI_PTR_Q0 0x00038004 | ||
312 | #define __CPE_CI_UNUSED_MK 0xffff0000 | ||
313 | #define __CPE_CI_UNUSED_SH 16 | ||
314 | #define __CPE_CI_UNUSED(_v) ((_v) << __CPE_CI_UNUSED_SH) | ||
315 | #define __CPE_CI_PTR 0x0000ffff | ||
316 | #define CPE_CI_PTR_Q1 0x00038044 | ||
317 | #define CPE_DEPTH_Q0 0x00038008 | ||
318 | #define __CPE_DEPTH_UNUSED_MK 0xf8000000 | ||
319 | #define __CPE_DEPTH_UNUSED_SH 27 | ||
320 | #define __CPE_DEPTH_UNUSED(_v) ((_v) << __CPE_DEPTH_UNUSED_SH) | ||
321 | #define __CPE_MSIX_VEC_INDEX_MK 0x07ff0000 | ||
322 | #define __CPE_MSIX_VEC_INDEX_SH 16 | ||
323 | #define __CPE_MSIX_VEC_INDEX(_v) ((_v) << __CPE_MSIX_VEC_INDEX_SH) | ||
324 | #define __CPE_DEPTH 0x0000ffff | ||
325 | #define CPE_DEPTH_Q1 0x00038048 | ||
326 | #define CPE_QCTRL_Q0 0x0003800c | ||
327 | #define __CPE_CTRL_UNUSED30_MK 0xfc000000 | ||
328 | #define __CPE_CTRL_UNUSED30_SH 26 | ||
329 | #define __CPE_CTRL_UNUSED30(_v) ((_v) << __CPE_CTRL_UNUSED30_SH) | ||
330 | #define __CPE_FUNC_INT_CTRL_MK 0x03000000 | ||
331 | #define __CPE_FUNC_INT_CTRL_SH 24 | ||
332 | #define __CPE_FUNC_INT_CTRL(_v) ((_v) << __CPE_FUNC_INT_CTRL_SH) | ||
333 | enum { | ||
334 | __CPE_FUNC_INT_CTRL_DISABLE = 0x0, | ||
335 | __CPE_FUNC_INT_CTRL_F2NF = 0x1, | ||
336 | __CPE_FUNC_INT_CTRL_3QUART = 0x2, | ||
337 | __CPE_FUNC_INT_CTRL_HALF = 0x3, | ||
338 | }; | ||
339 | #define __CPE_CTRL_UNUSED20_MK 0x00f00000 | ||
340 | #define __CPE_CTRL_UNUSED20_SH 20 | ||
341 | #define __CPE_CTRL_UNUSED20(_v) ((_v) << __CPE_CTRL_UNUSED20_SH) | ||
342 | #define __CPE_SCI_TH_MK 0x000f0000 | ||
343 | #define __CPE_SCI_TH_SH 16 | ||
344 | #define __CPE_SCI_TH(_v) ((_v) << __CPE_SCI_TH_SH) | ||
345 | #define __CPE_CTRL_UNUSED10_MK 0x0000c000 | ||
346 | #define __CPE_CTRL_UNUSED10_SH 14 | ||
347 | #define __CPE_CTRL_UNUSED10(_v) ((_v) << __CPE_CTRL_UNUSED10_SH) | ||
348 | #define __CPE_ACK_PENDING 0x00002000 | ||
349 | #define __CPE_CTRL_UNUSED40_MK 0x00001c00 | ||
350 | #define __CPE_CTRL_UNUSED40_SH 10 | ||
351 | #define __CPE_CTRL_UNUSED40(_v) ((_v) << __CPE_CTRL_UNUSED40_SH) | ||
352 | #define __CPE_PCIEID_MK 0x00000300 | ||
353 | #define __CPE_PCIEID_SH 8 | ||
354 | #define __CPE_PCIEID(_v) ((_v) << __CPE_PCIEID_SH) | ||
355 | #define __CPE_CTRL_UNUSED00_MK 0x000000fe | ||
356 | #define __CPE_CTRL_UNUSED00_SH 1 | ||
357 | #define __CPE_CTRL_UNUSED00(_v) ((_v) << __CPE_CTRL_UNUSED00_SH) | ||
358 | #define __CPE_ESIZE 0x00000001 | ||
359 | #define CPE_QCTRL_Q1 0x0003804c | ||
360 | #define __CPE_CTRL_UNUSED31_MK 0xfc000000 | ||
361 | #define __CPE_CTRL_UNUSED31_SH 26 | ||
362 | #define __CPE_CTRL_UNUSED31(_v) ((_v) << __CPE_CTRL_UNUSED31_SH) | ||
363 | #define __CPE_CTRL_UNUSED21_MK 0x00f00000 | ||
364 | #define __CPE_CTRL_UNUSED21_SH 20 | ||
365 | #define __CPE_CTRL_UNUSED21(_v) ((_v) << __CPE_CTRL_UNUSED21_SH) | ||
366 | #define __CPE_CTRL_UNUSED11_MK 0x0000c000 | ||
367 | #define __CPE_CTRL_UNUSED11_SH 14 | ||
368 | #define __CPE_CTRL_UNUSED11(_v) ((_v) << __CPE_CTRL_UNUSED11_SH) | ||
369 | #define __CPE_CTRL_UNUSED41_MK 0x00001c00 | ||
370 | #define __CPE_CTRL_UNUSED41_SH 10 | ||
371 | #define __CPE_CTRL_UNUSED41(_v) ((_v) << __CPE_CTRL_UNUSED41_SH) | ||
372 | #define __CPE_CTRL_UNUSED01_MK 0x000000fe | ||
373 | #define __CPE_CTRL_UNUSED01_SH 1 | ||
374 | #define __CPE_CTRL_UNUSED01(_v) ((_v) << __CPE_CTRL_UNUSED01_SH) | ||
375 | #define RME_PI_PTR_Q0 0x00038020 | ||
376 | #define __LATENCY_TIME_STAMP_MK 0xffff0000 | ||
377 | #define __LATENCY_TIME_STAMP_SH 16 | ||
378 | #define __LATENCY_TIME_STAMP(_v) ((_v) << __LATENCY_TIME_STAMP_SH) | ||
379 | #define __RME_PI_PTR 0x0000ffff | ||
380 | #define RME_PI_PTR_Q1 0x00038060 | ||
381 | #define RME_CI_PTR_Q0 0x00038024 | ||
382 | #define __DELAY_TIME_STAMP_MK 0xffff0000 | ||
383 | #define __DELAY_TIME_STAMP_SH 16 | ||
384 | #define __DELAY_TIME_STAMP(_v) ((_v) << __DELAY_TIME_STAMP_SH) | ||
385 | #define __RME_CI_PTR 0x0000ffff | ||
386 | #define RME_CI_PTR_Q1 0x00038064 | ||
387 | #define RME_DEPTH_Q0 0x00038028 | ||
388 | #define __RME_DEPTH_UNUSED_MK 0xf8000000 | ||
389 | #define __RME_DEPTH_UNUSED_SH 27 | ||
390 | #define __RME_DEPTH_UNUSED(_v) ((_v) << __RME_DEPTH_UNUSED_SH) | ||
391 | #define __RME_MSIX_VEC_INDEX_MK 0x07ff0000 | ||
392 | #define __RME_MSIX_VEC_INDEX_SH 16 | ||
393 | #define __RME_MSIX_VEC_INDEX(_v) ((_v) << __RME_MSIX_VEC_INDEX_SH) | ||
394 | #define __RME_DEPTH 0x0000ffff | ||
395 | #define RME_DEPTH_Q1 0x00038068 | ||
396 | #define RME_QCTRL_Q0 0x0003802c | ||
397 | #define __RME_INT_LATENCY_TIMER_MK 0xff000000 | ||
398 | #define __RME_INT_LATENCY_TIMER_SH 24 | ||
399 | #define __RME_INT_LATENCY_TIMER(_v) ((_v) << __RME_INT_LATENCY_TIMER_SH) | ||
400 | #define __RME_INT_DELAY_TIMER_MK 0x00ff0000 | ||
401 | #define __RME_INT_DELAY_TIMER_SH 16 | ||
402 | #define __RME_INT_DELAY_TIMER(_v) ((_v) << __RME_INT_DELAY_TIMER_SH) | ||
403 | #define __RME_INT_DELAY_DISABLE 0x00008000 | ||
404 | #define __RME_DLY_DELAY_DISABLE 0x00004000 | ||
405 | #define __RME_ACK_PENDING 0x00002000 | ||
406 | #define __RME_FULL_INTERRUPT_DISABLE 0x00001000 | ||
407 | #define __RME_CTRL_UNUSED10_MK 0x00000c00 | ||
408 | #define __RME_CTRL_UNUSED10_SH 10 | ||
409 | #define __RME_CTRL_UNUSED10(_v) ((_v) << __RME_CTRL_UNUSED10_SH) | ||
410 | #define __RME_PCIEID_MK 0x00000300 | ||
411 | #define __RME_PCIEID_SH 8 | ||
412 | #define __RME_PCIEID(_v) ((_v) << __RME_PCIEID_SH) | ||
413 | #define __RME_CTRL_UNUSED00_MK 0x000000fe | ||
414 | #define __RME_CTRL_UNUSED00_SH 1 | ||
415 | #define __RME_CTRL_UNUSED00(_v) ((_v) << __RME_CTRL_UNUSED00_SH) | ||
416 | #define __RME_ESIZE 0x00000001 | ||
417 | #define RME_QCTRL_Q1 0x0003806c | ||
418 | #define __RME_CTRL_UNUSED11_MK 0x00000c00 | ||
419 | #define __RME_CTRL_UNUSED11_SH 10 | ||
420 | #define __RME_CTRL_UNUSED11(_v) ((_v) << __RME_CTRL_UNUSED11_SH) | ||
421 | #define __RME_CTRL_UNUSED01_MK 0x000000fe | ||
422 | #define __RME_CTRL_UNUSED01_SH 1 | ||
423 | #define __RME_CTRL_UNUSED01(_v) ((_v) << __RME_CTRL_UNUSED01_SH) | ||
424 | #define PSS_CTL_REG 0x00018800 | ||
425 | #define __PSS_I2C_CLK_DIV_MK 0x007f0000 | ||
426 | #define __PSS_I2C_CLK_DIV_SH 16 | ||
427 | #define __PSS_I2C_CLK_DIV(_v) ((_v) << __PSS_I2C_CLK_DIV_SH) | ||
428 | #define __PSS_LMEM_INIT_DONE 0x00001000 | ||
429 | #define __PSS_LMEM_RESET 0x00000200 | ||
430 | #define __PSS_LMEM_INIT_EN 0x00000100 | ||
431 | #define __PSS_LPU1_RESET 0x00000002 | ||
432 | #define __PSS_LPU0_RESET 0x00000001 | ||
433 | #define PSS_ERR_STATUS_REG 0x00018810 | ||
434 | #define __PSS_LPU1_TCM_READ_ERR 0x00200000 | ||
435 | #define __PSS_LPU0_TCM_READ_ERR 0x00100000 | ||
436 | #define __PSS_LMEM5_CORR_ERR 0x00080000 | ||
437 | #define __PSS_LMEM4_CORR_ERR 0x00040000 | ||
438 | #define __PSS_LMEM3_CORR_ERR 0x00020000 | ||
439 | #define __PSS_LMEM2_CORR_ERR 0x00010000 | ||
440 | #define __PSS_LMEM1_CORR_ERR 0x00008000 | ||
441 | #define __PSS_LMEM0_CORR_ERR 0x00004000 | ||
442 | #define __PSS_LMEM5_UNCORR_ERR 0x00002000 | ||
443 | #define __PSS_LMEM4_UNCORR_ERR 0x00001000 | ||
444 | #define __PSS_LMEM3_UNCORR_ERR 0x00000800 | ||
445 | #define __PSS_LMEM2_UNCORR_ERR 0x00000400 | ||
446 | #define __PSS_LMEM1_UNCORR_ERR 0x00000200 | ||
447 | #define __PSS_LMEM0_UNCORR_ERR 0x00000100 | ||
448 | #define __PSS_BAL_PERR 0x00000080 | ||
449 | #define __PSS_DIP_IF_ERR 0x00000040 | ||
450 | #define __PSS_IOH_IF_ERR 0x00000020 | ||
451 | #define __PSS_TDS_IF_ERR 0x00000010 | ||
452 | #define __PSS_RDS_IF_ERR 0x00000008 | ||
453 | #define __PSS_SGM_IF_ERR 0x00000004 | ||
454 | #define __PSS_LPU1_RAM_ERR 0x00000002 | ||
455 | #define __PSS_LPU0_RAM_ERR 0x00000001 | ||
456 | #define ERR_SET_REG 0x00018818 | ||
457 | #define __PSS_ERR_STATUS_SET 0x003fffff | ||
458 | #define PMM_1T_RESET_REG_P0 0x0002381c | ||
459 | #define __PMM_1T_RESET_P 0x00000001 | ||
460 | #define PMM_1T_RESET_REG_P1 0x00023c1c | ||
461 | #define HQM_QSET0_RXQ_DRBL_P0 0x00038000 | ||
462 | #define __RXQ0_ADD_VECTORS_P 0x80000000 | ||
463 | #define __RXQ0_STOP_P 0x40000000 | ||
464 | #define __RXQ0_PRD_PTR_P 0x0000ffff | ||
465 | #define HQM_QSET1_RXQ_DRBL_P0 0x00038080 | ||
466 | #define __RXQ1_ADD_VECTORS_P 0x80000000 | ||
467 | #define __RXQ1_STOP_P 0x40000000 | ||
468 | #define __RXQ1_PRD_PTR_P 0x0000ffff | ||
469 | #define HQM_QSET0_RXQ_DRBL_P1 0x0003c000 | ||
470 | #define HQM_QSET1_RXQ_DRBL_P1 0x0003c080 | ||
471 | #define HQM_QSET0_TXQ_DRBL_P0 0x00038020 | ||
472 | #define __TXQ0_ADD_VECTORS_P 0x80000000 | ||
473 | #define __TXQ0_STOP_P 0x40000000 | ||
474 | #define __TXQ0_PRD_PTR_P 0x0000ffff | ||
475 | #define HQM_QSET1_TXQ_DRBL_P0 0x000380a0 | ||
476 | #define __TXQ1_ADD_VECTORS_P 0x80000000 | ||
477 | #define __TXQ1_STOP_P 0x40000000 | ||
478 | #define __TXQ1_PRD_PTR_P 0x0000ffff | ||
479 | #define HQM_QSET0_TXQ_DRBL_P1 0x0003c020 | ||
480 | #define HQM_QSET1_TXQ_DRBL_P1 0x0003c0a0 | ||
481 | #define HQM_QSET0_IB_DRBL_1_P0 0x00038040 | ||
482 | #define __IB1_0_ACK_P 0x80000000 | ||
483 | #define __IB1_0_DISABLE_P 0x40000000 | ||
484 | #define __IB1_0_NUM_OF_ACKED_EVENTS_P 0x0000ffff | ||
485 | #define HQM_QSET1_IB_DRBL_1_P0 0x000380c0 | ||
486 | #define __IB1_1_ACK_P 0x80000000 | ||
487 | #define __IB1_1_DISABLE_P 0x40000000 | ||
488 | #define __IB1_1_NUM_OF_ACKED_EVENTS_P 0x0000ffff | ||
489 | #define HQM_QSET0_IB_DRBL_1_P1 0x0003c040 | ||
490 | #define HQM_QSET1_IB_DRBL_1_P1 0x0003c0c0 | ||
491 | #define HQM_QSET0_IB_DRBL_2_P0 0x00038060 | ||
492 | #define __IB2_0_ACK_P 0x80000000 | ||
493 | #define __IB2_0_DISABLE_P 0x40000000 | ||
494 | #define __IB2_0_NUM_OF_ACKED_EVENTS_P 0x0000ffff | ||
495 | #define HQM_QSET1_IB_DRBL_2_P0 0x000380e0 | ||
496 | #define __IB2_1_ACK_P 0x80000000 | ||
497 | #define __IB2_1_DISABLE_P 0x40000000 | ||
498 | #define __IB2_1_NUM_OF_ACKED_EVENTS_P 0x0000ffff | ||
499 | #define HQM_QSET0_IB_DRBL_2_P1 0x0003c060 | ||
500 | #define HQM_QSET1_IB_DRBL_2_P1 0x0003c0e0 | ||
501 | |||
502 | |||
503 | /* | ||
504 | * These definitions are either in error/missing in spec. Its auto-generated | ||
505 | * from hard coded values in regparse.pl. | ||
506 | */ | ||
507 | #define __EMPHPOST_AT_4G_MK_FIX 0x0000001c | ||
508 | #define __EMPHPOST_AT_4G_SH_FIX 0x00000002 | ||
509 | #define __EMPHPRE_AT_4G_FIX 0x00000003 | ||
510 | #define __SFP_TXRATE_EN_FIX 0x00000100 | ||
511 | #define __SFP_RXRATE_EN_FIX 0x00000080 | ||
512 | |||
513 | |||
514 | /* | ||
515 | * These register definitions are auto-generated from hard coded values | ||
516 | * in regparse.pl. | ||
517 | */ | ||
518 | |||
519 | |||
520 | /* | ||
521 | * These register mapping definitions are auto-generated from mapping tables | ||
522 | * in regparse.pl. | ||
523 | */ | ||
524 | #define BFA_IOC0_HBEAT_REG HOST_SEM0_INFO_REG | ||
525 | #define BFA_IOC0_STATE_REG HOST_SEM1_INFO_REG | ||
526 | #define BFA_IOC1_HBEAT_REG HOST_SEM2_INFO_REG | ||
527 | #define BFA_IOC1_STATE_REG HOST_SEM3_INFO_REG | ||
528 | #define BFA_FW_USE_COUNT HOST_SEM4_INFO_REG | ||
529 | |||
530 | #define CPE_DEPTH_Q(__n) \ | ||
531 | (CPE_DEPTH_Q0 + (__n) * (CPE_DEPTH_Q1 - CPE_DEPTH_Q0)) | ||
532 | #define CPE_QCTRL_Q(__n) \ | ||
533 | (CPE_QCTRL_Q0 + (__n) * (CPE_QCTRL_Q1 - CPE_QCTRL_Q0)) | ||
534 | #define CPE_PI_PTR_Q(__n) \ | ||
535 | (CPE_PI_PTR_Q0 + (__n) * (CPE_PI_PTR_Q1 - CPE_PI_PTR_Q0)) | ||
536 | #define CPE_CI_PTR_Q(__n) \ | ||
537 | (CPE_CI_PTR_Q0 + (__n) * (CPE_CI_PTR_Q1 - CPE_CI_PTR_Q0)) | ||
538 | #define RME_DEPTH_Q(__n) \ | ||
539 | (RME_DEPTH_Q0 + (__n) * (RME_DEPTH_Q1 - RME_DEPTH_Q0)) | ||
540 | #define RME_QCTRL_Q(__n) \ | ||
541 | (RME_QCTRL_Q0 + (__n) * (RME_QCTRL_Q1 - RME_QCTRL_Q0)) | ||
542 | #define RME_PI_PTR_Q(__n) \ | ||
543 | (RME_PI_PTR_Q0 + (__n) * (RME_PI_PTR_Q1 - RME_PI_PTR_Q0)) | ||
544 | #define RME_CI_PTR_Q(__n) \ | ||
545 | (RME_CI_PTR_Q0 + (__n) * (RME_CI_PTR_Q1 - RME_CI_PTR_Q0)) | ||
546 | #define HQM_QSET_RXQ_DRBL_P0(__n) \ | ||
547 | (HQM_QSET0_RXQ_DRBL_P0 + (__n) * (HQM_QSET1_RXQ_DRBL_P0 - \ | ||
548 | HQM_QSET0_RXQ_DRBL_P0)) | ||
549 | #define HQM_QSET_TXQ_DRBL_P0(__n) \ | ||
550 | (HQM_QSET0_TXQ_DRBL_P0 + (__n) * (HQM_QSET1_TXQ_DRBL_P0 - \ | ||
551 | HQM_QSET0_TXQ_DRBL_P0)) | ||
552 | #define HQM_QSET_IB_DRBL_1_P0(__n) \ | ||
553 | (HQM_QSET0_IB_DRBL_1_P0 + (__n) * (HQM_QSET1_IB_DRBL_1_P0 - \ | ||
554 | HQM_QSET0_IB_DRBL_1_P0)) | ||
555 | #define HQM_QSET_IB_DRBL_2_P0(__n) \ | ||
556 | (HQM_QSET0_IB_DRBL_2_P0 + (__n) * (HQM_QSET1_IB_DRBL_2_P0 - \ | ||
557 | HQM_QSET0_IB_DRBL_2_P0)) | ||
558 | #define HQM_QSET_RXQ_DRBL_P1(__n) \ | ||
559 | (HQM_QSET0_RXQ_DRBL_P1 + (__n) * (HQM_QSET1_RXQ_DRBL_P1 - \ | ||
560 | HQM_QSET0_RXQ_DRBL_P1)) | ||
561 | #define HQM_QSET_TXQ_DRBL_P1(__n) \ | ||
562 | (HQM_QSET0_TXQ_DRBL_P1 + (__n) * (HQM_QSET1_TXQ_DRBL_P1 - \ | ||
563 | HQM_QSET0_TXQ_DRBL_P1)) | ||
564 | #define HQM_QSET_IB_DRBL_1_P1(__n) \ | ||
565 | (HQM_QSET0_IB_DRBL_1_P1 + (__n) * (HQM_QSET1_IB_DRBL_1_P1 - \ | ||
566 | HQM_QSET0_IB_DRBL_1_P1)) | ||
567 | #define HQM_QSET_IB_DRBL_2_P1(__n) \ | ||
568 | (HQM_QSET0_IB_DRBL_2_P1 + (__n) * (HQM_QSET1_IB_DRBL_2_P1 - \ | ||
569 | HQM_QSET0_IB_DRBL_2_P1)) | ||
570 | |||
571 | #define CPE_Q_NUM(__fn, __q) (((__fn) << 2) + (__q)) | ||
572 | #define RME_Q_NUM(__fn, __q) (((__fn) << 2) + (__q)) | ||
573 | #define CPE_Q_MASK(__q) ((__q) & 0x3) | ||
574 | #define RME_Q_MASK(__q) ((__q) & 0x3) | ||
575 | |||
576 | |||
577 | /* | ||
578 | * PCI MSI-X vector defines | ||
579 | */ | ||
580 | enum { | ||
581 | BFA_MSIX_CPE_Q0 = 0, | ||
582 | BFA_MSIX_CPE_Q1 = 1, | ||
583 | BFA_MSIX_CPE_Q2 = 2, | ||
584 | BFA_MSIX_CPE_Q3 = 3, | ||
585 | BFA_MSIX_RME_Q0 = 4, | ||
586 | BFA_MSIX_RME_Q1 = 5, | ||
587 | BFA_MSIX_RME_Q2 = 6, | ||
588 | BFA_MSIX_RME_Q3 = 7, | ||
589 | BFA_MSIX_LPU_ERR = 8, | ||
590 | BFA_MSIX_CT_MAX = 9, | ||
591 | }; | ||
592 | |||
593 | /* | ||
594 | * And corresponding host interrupt status bit field defines | ||
595 | */ | ||
596 | #define __HFN_INT_CPE_Q0 0x00000001U | ||
597 | #define __HFN_INT_CPE_Q1 0x00000002U | ||
598 | #define __HFN_INT_CPE_Q2 0x00000004U | ||
599 | #define __HFN_INT_CPE_Q3 0x00000008U | ||
600 | #define __HFN_INT_CPE_Q4 0x00000010U | ||
601 | #define __HFN_INT_CPE_Q5 0x00000020U | ||
602 | #define __HFN_INT_CPE_Q6 0x00000040U | ||
603 | #define __HFN_INT_CPE_Q7 0x00000080U | ||
604 | #define __HFN_INT_RME_Q0 0x00000100U | ||
605 | #define __HFN_INT_RME_Q1 0x00000200U | ||
606 | #define __HFN_INT_RME_Q2 0x00000400U | ||
607 | #define __HFN_INT_RME_Q3 0x00000800U | ||
608 | #define __HFN_INT_RME_Q4 0x00001000U | ||
609 | #define __HFN_INT_RME_Q5 0x00002000U | ||
610 | #define __HFN_INT_RME_Q6 0x00004000U | ||
611 | #define __HFN_INT_RME_Q7 0x00008000U | ||
612 | #define __HFN_INT_ERR_EMC 0x00010000U | ||
613 | #define __HFN_INT_ERR_LPU0 0x00020000U | ||
614 | #define __HFN_INT_ERR_LPU1 0x00040000U | ||
615 | #define __HFN_INT_ERR_PSS 0x00080000U | ||
616 | #define __HFN_INT_MBOX_LPU0 0x00100000U | ||
617 | #define __HFN_INT_MBOX_LPU1 0x00200000U | ||
618 | #define __HFN_INT_MBOX1_LPU0 0x00400000U | ||
619 | #define __HFN_INT_MBOX1_LPU1 0x00800000U | ||
620 | #define __HFN_INT_LL_HALT 0x01000000U | ||
621 | #define __HFN_INT_CPE_MASK 0x000000ffU | ||
622 | #define __HFN_INT_RME_MASK 0x0000ff00U | ||
623 | |||
624 | |||
625 | /* | ||
626 | * catapult memory map. | ||
627 | */ | ||
628 | #define LL_PGN_HQM0 0x0096 | ||
629 | #define LL_PGN_HQM1 0x0097 | ||
630 | #define PSS_SMEM_PAGE_START 0x8000 | ||
631 | #define PSS_SMEM_PGNUM(_pg0, _ma) ((_pg0) + ((_ma) >> 15)) | ||
632 | #define PSS_SMEM_PGOFF(_ma) ((_ma) & 0x7fff) | ||
633 | |||
634 | /* | ||
635 | * End of catapult memory map | ||
636 | */ | ||
637 | |||
638 | |||
639 | #endif /* __BFI_CTREG_H__ */ | ||
640 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_fabric.h b/drivers/scsi/bfa/include/bfi/bfi_fabric.h deleted file mode 100644 index c0669ed41078..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_fabric.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_FABRIC_H__ | ||
19 | #define __BFI_FABRIC_H__ | ||
20 | |||
21 | #include <bfi/bfi.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_fabric_h2i_msgs { | ||
26 | BFI_FABRIC_H2I_CREATE_REQ = 1, | ||
27 | BFI_FABRIC_H2I_DELETE_REQ = 2, | ||
28 | BFI_FABRIC_H2I_SETAUTH = 3, | ||
29 | }; | ||
30 | |||
31 | enum bfi_fabric_i2h_msgs { | ||
32 | BFI_FABRIC_I2H_CREATE_RSP = BFA_I2HM(1), | ||
33 | BFI_FABRIC_I2H_DELETE_RSP = BFA_I2HM(2), | ||
34 | BFI_FABRIC_I2H_SETAUTH_RSP = BFA_I2HM(3), | ||
35 | BFI_FABRIC_I2H_ONLINE = BFA_I2HM(4), | ||
36 | BFI_FABRIC_I2H_OFFLINE = BFA_I2HM(5), | ||
37 | }; | ||
38 | |||
39 | struct bfi_fabric_create_req_s { | ||
40 | bfi_mhdr_t mh; /* common msg header */ | ||
41 | u8 vf_en; /* virtual fabric enable */ | ||
42 | u8 rsvd; | ||
43 | u16 vf_id; /* virtual fabric ID */ | ||
44 | wwn_t pwwn; /* port name */ | ||
45 | wwn_t nwwn; /* node name */ | ||
46 | }; | ||
47 | |||
48 | struct bfi_fabric_create_rsp_s { | ||
49 | bfi_mhdr_t mh; /* common msg header */ | ||
50 | u16 bfa_handle; /* host fabric handle */ | ||
51 | u8 status; /* fabric create status */ | ||
52 | u8 rsvd; | ||
53 | }; | ||
54 | |||
55 | struct bfi_fabric_delete_req_s { | ||
56 | bfi_mhdr_t mh; /* common msg header */ | ||
57 | u16 fw_handle; /* firmware fabric handle */ | ||
58 | u16 rsvd; | ||
59 | }; | ||
60 | |||
61 | struct bfi_fabric_delete_rsp_s { | ||
62 | bfi_mhdr_t mh; /* common msg header */ | ||
63 | u16 bfa_handle; /* host fabric handle */ | ||
64 | u8 status; /* fabric deletion status */ | ||
65 | u8 rsvd; | ||
66 | }; | ||
67 | |||
68 | #define BFI_FABRIC_AUTHSECRET_LEN 64 | ||
69 | struct bfi_fabric_setauth_req_s { | ||
70 | bfi_mhdr_t mh; /* common msg header */ | ||
71 | u16 fw_handle; /* f/w handle of fabric */ | ||
72 | u8 algorithm; | ||
73 | u8 group; | ||
74 | u8 secret[BFI_FABRIC_AUTHSECRET_LEN]; | ||
75 | }; | ||
76 | |||
77 | union bfi_fabric_h2i_msg_u { | ||
78 | bfi_msg_t *msg; | ||
79 | struct bfi_fabric_create_req_s *create_req; | ||
80 | struct bfi_fabric_delete_req_s *delete_req; | ||
81 | }; | ||
82 | |||
83 | union bfi_fabric_i2h_msg_u { | ||
84 | bfi_msg_t *msg; | ||
85 | struct bfi_fabric_create_rsp_s *create_rsp; | ||
86 | struct bfi_fabric_delete_rsp_s *delete_rsp; | ||
87 | }; | ||
88 | |||
89 | #pragma pack() | ||
90 | |||
91 | #endif /* __BFI_FABRIC_H__ */ | ||
92 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_fcpim.h b/drivers/scsi/bfa/include/bfi/bfi_fcpim.h deleted file mode 100644 index 52c059fb4c3a..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_fcpim.h +++ /dev/null | |||
@@ -1,301 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_FCPIM_H__ | ||
19 | #define __BFI_FCPIM_H__ | ||
20 | |||
21 | #include "bfi.h" | ||
22 | #include <protocol/fcp.h> | ||
23 | |||
24 | #pragma pack(1) | ||
25 | |||
26 | /* | ||
27 | * Initiator mode I-T nexus interface defines. | ||
28 | */ | ||
29 | |||
30 | enum bfi_itnim_h2i { | ||
31 | BFI_ITNIM_H2I_CREATE_REQ = 1, /* i-t nexus creation */ | ||
32 | BFI_ITNIM_H2I_DELETE_REQ = 2, /* i-t nexus deletion */ | ||
33 | }; | ||
34 | |||
35 | enum bfi_itnim_i2h { | ||
36 | BFI_ITNIM_I2H_CREATE_RSP = BFA_I2HM(1), | ||
37 | BFI_ITNIM_I2H_DELETE_RSP = BFA_I2HM(2), | ||
38 | BFI_ITNIM_I2H_SLER_EVENT = BFA_I2HM(3), | ||
39 | }; | ||
40 | |||
41 | struct bfi_itnim_create_req_s { | ||
42 | struct bfi_mhdr_s mh; /* common msg header */ | ||
43 | u16 fw_handle; /* f/w handle for itnim */ | ||
44 | u8 class; /* FC class for IO */ | ||
45 | u8 seq_rec; /* sequence recovery support */ | ||
46 | u8 msg_no; /* seq id of the msg */ | ||
47 | }; | ||
48 | |||
49 | struct bfi_itnim_create_rsp_s { | ||
50 | struct bfi_mhdr_s mh; /* common msg header */ | ||
51 | u16 bfa_handle; /* bfa handle for itnim */ | ||
52 | u8 status; /* fcp request status */ | ||
53 | u8 seq_id; /* seq id of the msg */ | ||
54 | }; | ||
55 | |||
56 | struct bfi_itnim_delete_req_s { | ||
57 | struct bfi_mhdr_s mh; /* common msg header */ | ||
58 | u16 fw_handle; /* f/w itnim handle */ | ||
59 | u8 seq_id; /* seq id of the msg */ | ||
60 | u8 rsvd; | ||
61 | }; | ||
62 | |||
63 | struct bfi_itnim_delete_rsp_s { | ||
64 | struct bfi_mhdr_s mh; /* common msg header */ | ||
65 | u16 bfa_handle; /* bfa handle for itnim */ | ||
66 | u8 status; /* fcp request status */ | ||
67 | u8 seq_id; /* seq id of the msg */ | ||
68 | }; | ||
69 | |||
70 | struct bfi_itnim_sler_event_s { | ||
71 | struct bfi_mhdr_s mh; /* common msg header */ | ||
72 | u16 bfa_handle; /* bfa handle for itnim */ | ||
73 | u16 rsvd; | ||
74 | }; | ||
75 | |||
76 | union bfi_itnim_h2i_msg_u { | ||
77 | struct bfi_itnim_create_req_s *create_req; | ||
78 | struct bfi_itnim_delete_req_s *delete_req; | ||
79 | struct bfi_msg_s *msg; | ||
80 | }; | ||
81 | |||
82 | union bfi_itnim_i2h_msg_u { | ||
83 | struct bfi_itnim_create_rsp_s *create_rsp; | ||
84 | struct bfi_itnim_delete_rsp_s *delete_rsp; | ||
85 | struct bfi_itnim_sler_event_s *sler_event; | ||
86 | struct bfi_msg_s *msg; | ||
87 | }; | ||
88 | |||
89 | /* | ||
90 | * Initiator mode IO interface defines. | ||
91 | */ | ||
92 | |||
93 | enum bfi_ioim_h2i { | ||
94 | BFI_IOIM_H2I_IOABORT_REQ = 1, /* IO abort request */ | ||
95 | BFI_IOIM_H2I_IOCLEANUP_REQ = 2, /* IO cleanup request */ | ||
96 | }; | ||
97 | |||
98 | enum bfi_ioim_i2h { | ||
99 | BFI_IOIM_I2H_IO_RSP = BFA_I2HM(1), /* non-fp IO response */ | ||
100 | BFI_IOIM_I2H_IOABORT_RSP = BFA_I2HM(2),/* ABORT rsp */ | ||
101 | }; | ||
102 | |||
103 | /** | ||
104 | * IO command DIF info | ||
105 | */ | ||
106 | struct bfi_ioim_dif_s { | ||
107 | u32 dif_info[4]; | ||
108 | }; | ||
109 | |||
110 | /** | ||
111 | * FCP IO messages overview | ||
112 | * | ||
113 | * @note | ||
114 | * - Max CDB length supported is 64 bytes. | ||
115 | * - SCSI Linked commands and SCSI bi-directional Commands not | ||
116 | * supported. | ||
117 | * | ||
118 | */ | ||
119 | struct bfi_ioim_req_s { | ||
120 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
121 | u16 io_tag; /* I/O tag */ | ||
122 | u16 rport_hdl; /* itnim/rport firmware handle */ | ||
123 | struct fcp_cmnd_s cmnd; /* IO request info */ | ||
124 | |||
125 | /** | ||
126 | * SG elements array within the IO request must be double word | ||
127 | * aligned. This aligment is required to optimize SGM setup for the IO. | ||
128 | */ | ||
129 | struct bfi_sge_s sges[BFI_SGE_INLINE_MAX]; | ||
130 | u8 io_timeout; | ||
131 | u8 dif_en; | ||
132 | u8 rsvd_a[2]; | ||
133 | struct bfi_ioim_dif_s dif; | ||
134 | }; | ||
135 | |||
136 | /** | ||
137 | * This table shows various IO status codes from firmware and their | ||
138 | * meaning. Host driver can use these status codes to further process | ||
139 | * IO completions. | ||
140 | * | ||
141 | * BFI_IOIM_STS_OK : IO completed with error free SCSI & | ||
142 | * transport status. | ||
143 | * - io-tag can be reused. | ||
144 | * | ||
145 | * BFA_IOIM_STS_SCSI_ERR : IO completed with scsi error. | ||
146 | * - io-tag can be reused. | ||
147 | * | ||
148 | * BFI_IOIM_STS_HOST_ABORTED : IO was aborted successfully due to | ||
149 | * host request. | ||
150 | * - io-tag cannot be reused yet. | ||
151 | * | ||
152 | * BFI_IOIM_STS_ABORTED : IO was aborted successfully | ||
153 | * internally by f/w. | ||
154 | * - io-tag cannot be reused yet. | ||
155 | * | ||
156 | * BFI_IOIM_STS_TIMEDOUT : IO timedout and ABTS/RRQ is happening | ||
157 | * in the firmware and | ||
158 | * - io-tag cannot be reused yet. | ||
159 | * | ||
160 | * BFI_IOIM_STS_SQER_NEEDED : Firmware could not recover the IO | ||
161 | * with sequence level error | ||
162 | * logic and hence host needs to retry | ||
163 | * this IO with a different IO tag | ||
164 | * - io-tag cannot be used yet. | ||
165 | * | ||
166 | * BFI_IOIM_STS_NEXUS_ABORT : Second Level Error Recovery from host | ||
167 | * is required because 2 consecutive ABTS | ||
168 | * timedout and host needs logout and | ||
169 | * re-login with the target | ||
170 | * - io-tag cannot be used yet. | ||
171 | * | ||
172 | * BFI_IOIM_STS_UNDERRUN : IO completed with SCSI status good, | ||
173 | * but the data tranferred is less than | ||
174 | * the fcp data length in the command. | ||
175 | * ex. SCSI INQUIRY where transferred | ||
176 | * data length and residue count in FCP | ||
177 | * response accounts for total fcp-dl | ||
178 | * - io-tag can be reused. | ||
179 | * | ||
180 | * BFI_IOIM_STS_OVERRUN : IO completed with SCSI status good, | ||
181 | * but the data transerred is more than | ||
182 | * fcp data length in the command. ex. | ||
183 | * TAPE IOs where blocks can of unequal | ||
184 | * lengths. | ||
185 | * - io-tag can be reused. | ||
186 | * | ||
187 | * BFI_IOIM_STS_RES_FREE : Firmware has completed using io-tag | ||
188 | * during abort process | ||
189 | * - io-tag can be reused. | ||
190 | * | ||
191 | * BFI_IOIM_STS_PROTO_ERR : Firmware detected a protocol error. | ||
192 | * ex target sent more data than | ||
193 | * requested, or there was data frame | ||
194 | * loss and other reasons | ||
195 | * - io-tag cannot be used yet. | ||
196 | * | ||
197 | * BFI_IOIM_STS_DIF_ERR : Firwmare detected DIF error. ex: DIF | ||
198 | * CRC err or Ref Tag err or App tag err. | ||
199 | * - io-tag can be reused. | ||
200 | * | ||
201 | * BFA_IOIM_STS_TSK_MGT_ABORT : IO was aborted because of Task | ||
202 | * Management command from the host | ||
203 | * - io-tag can be reused. | ||
204 | * | ||
205 | * BFI_IOIM_STS_UTAG : Firmware does not know about this | ||
206 | * io_tag. | ||
207 | * - io-tag can be reused. | ||
208 | */ | ||
209 | enum bfi_ioim_status { | ||
210 | BFI_IOIM_STS_OK = 0, | ||
211 | BFI_IOIM_STS_HOST_ABORTED = 1, | ||
212 | BFI_IOIM_STS_ABORTED = 2, | ||
213 | BFI_IOIM_STS_TIMEDOUT = 3, | ||
214 | BFI_IOIM_STS_RES_FREE = 4, | ||
215 | BFI_IOIM_STS_SQER_NEEDED = 5, | ||
216 | BFI_IOIM_STS_PROTO_ERR = 6, | ||
217 | BFI_IOIM_STS_UTAG = 7, | ||
218 | BFI_IOIM_STS_PATHTOV = 8, | ||
219 | }; | ||
220 | |||
221 | #define BFI_IOIM_SNSLEN (256) | ||
222 | /** | ||
223 | * I/O response message | ||
224 | */ | ||
225 | struct bfi_ioim_rsp_s { | ||
226 | struct bfi_mhdr_s mh; /* common msg header */ | ||
227 | u16 io_tag; /* completed IO tag */ | ||
228 | u16 bfa_rport_hndl; /* releated rport handle */ | ||
229 | u8 io_status; /* IO completion status */ | ||
230 | u8 reuse_io_tag; /* IO tag can be reused */ | ||
231 | u16 abort_tag; /* host abort request tag */ | ||
232 | u8 scsi_status; /* scsi status from target */ | ||
233 | u8 sns_len; /* scsi sense length */ | ||
234 | u8 resid_flags; /* IO residue flags */ | ||
235 | u8 rsvd_a; | ||
236 | u32 residue; /* IO residual length in bytes */ | ||
237 | u32 rsvd_b[3]; | ||
238 | }; | ||
239 | |||
240 | struct bfi_ioim_abort_req_s { | ||
241 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
242 | u16 io_tag; /* I/O tag */ | ||
243 | u16 abort_tag; /* unique request tag */ | ||
244 | }; | ||
245 | |||
246 | /* | ||
247 | * Initiator mode task management command interface defines. | ||
248 | */ | ||
249 | |||
250 | enum bfi_tskim_h2i { | ||
251 | BFI_TSKIM_H2I_TM_REQ = 1, /* task-mgmt command */ | ||
252 | BFI_TSKIM_H2I_ABORT_REQ = 2, /* task-mgmt command */ | ||
253 | }; | ||
254 | |||
255 | enum bfi_tskim_i2h { | ||
256 | BFI_TSKIM_I2H_TM_RSP = BFA_I2HM(1), | ||
257 | }; | ||
258 | |||
259 | struct bfi_tskim_req_s { | ||
260 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
261 | u16 tsk_tag; /* task management tag */ | ||
262 | u16 itn_fhdl; /* itn firmware handle */ | ||
263 | lun_t lun; /* LU number */ | ||
264 | u8 tm_flags; /* see fcp_tm_cmnd_t */ | ||
265 | u8 t_secs; /* Timeout value in seconds */ | ||
266 | u8 rsvd[2]; | ||
267 | }; | ||
268 | |||
269 | struct bfi_tskim_abortreq_s { | ||
270 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
271 | u16 tsk_tag; /* task management tag */ | ||
272 | u16 rsvd; | ||
273 | }; | ||
274 | |||
275 | enum bfi_tskim_status { | ||
276 | /* | ||
277 | * Following are FCP-4 spec defined status codes, | ||
278 | * **DO NOT CHANGE THEM ** | ||
279 | */ | ||
280 | BFI_TSKIM_STS_OK = 0, | ||
281 | BFI_TSKIM_STS_NOT_SUPP = 4, | ||
282 | BFI_TSKIM_STS_FAILED = 5, | ||
283 | |||
284 | /** | ||
285 | * Defined by BFA | ||
286 | */ | ||
287 | BFI_TSKIM_STS_TIMEOUT = 10, /* TM request timedout */ | ||
288 | BFI_TSKIM_STS_ABORTED = 11, /* Aborted on host request */ | ||
289 | }; | ||
290 | |||
291 | struct bfi_tskim_rsp_s { | ||
292 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
293 | u16 tsk_tag; /* task mgmt cmnd tag */ | ||
294 | u8 tsk_status; /* @ref bfi_tskim_status */ | ||
295 | u8 rsvd; | ||
296 | }; | ||
297 | |||
298 | #pragma pack() | ||
299 | |||
300 | #endif /* __BFI_FCPIM_H__ */ | ||
301 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_fcxp.h b/drivers/scsi/bfa/include/bfi/bfi_fcxp.h deleted file mode 100644 index e0e995a32828..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_fcxp.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_FCXP_H__ | ||
19 | #define __BFI_FCXP_H__ | ||
20 | |||
21 | #include "bfi.h" | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_fcxp_h2i { | ||
26 | BFI_FCXP_H2I_SEND_REQ = 1, | ||
27 | }; | ||
28 | |||
29 | enum bfi_fcxp_i2h { | ||
30 | BFI_FCXP_I2H_SEND_RSP = BFA_I2HM(1), | ||
31 | }; | ||
32 | |||
33 | #define BFA_FCXP_MAX_SGES 2 | ||
34 | |||
35 | /** | ||
36 | * FCXP send request structure | ||
37 | */ | ||
38 | struct bfi_fcxp_send_req_s { | ||
39 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
40 | u16 fcxp_tag; /* driver request tag */ | ||
41 | u16 max_frmsz; /* max send frame size */ | ||
42 | u16 vf_id; /* vsan tag if applicable */ | ||
43 | u16 rport_fw_hndl; /* FW Handle for the remote port */ | ||
44 | u8 class; /* FC class used for req/rsp */ | ||
45 | u8 rsp_timeout; /* timeout in secs, 0-no response */ | ||
46 | u8 cts; /* continue sequence */ | ||
47 | u8 lp_tag; /* lport tag */ | ||
48 | struct fchs_s fchs; /* request FC header structure */ | ||
49 | u32 req_len; /* request payload length */ | ||
50 | u32 rsp_maxlen; /* max response length expected */ | ||
51 | struct bfi_sge_s req_sge[BFA_FCXP_MAX_SGES]; /* request buf */ | ||
52 | struct bfi_sge_s rsp_sge[BFA_FCXP_MAX_SGES]; /* response buf */ | ||
53 | }; | ||
54 | |||
55 | /** | ||
56 | * FCXP send response structure | ||
57 | */ | ||
58 | struct bfi_fcxp_send_rsp_s { | ||
59 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
60 | u16 fcxp_tag; /* send request tag */ | ||
61 | u8 req_status; /* request status */ | ||
62 | u8 rsvd; | ||
63 | u32 rsp_len; /* actual response length */ | ||
64 | u32 residue_len; /* residual response length */ | ||
65 | struct fchs_s fchs; /* response FC header structure */ | ||
66 | }; | ||
67 | |||
68 | #pragma pack() | ||
69 | |||
70 | #endif /* __BFI_FCXP_H__ */ | ||
71 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_ioc.h b/drivers/scsi/bfa/include/bfi/bfi_ioc.h deleted file mode 100644 index 450ded6e9bc2..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_ioc.h +++ /dev/null | |||
@@ -1,208 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_IOC_H__ | ||
19 | #define __BFI_IOC_H__ | ||
20 | |||
21 | #include "bfi.h" | ||
22 | #include <defs/bfa_defs_ioc.h> | ||
23 | |||
24 | #pragma pack(1) | ||
25 | |||
26 | enum bfi_ioc_h2i_msgs { | ||
27 | BFI_IOC_H2I_ENABLE_REQ = 1, | ||
28 | BFI_IOC_H2I_DISABLE_REQ = 2, | ||
29 | BFI_IOC_H2I_GETATTR_REQ = 3, | ||
30 | BFI_IOC_H2I_DBG_SYNC = 4, | ||
31 | BFI_IOC_H2I_DBG_DUMP = 5, | ||
32 | }; | ||
33 | |||
34 | enum bfi_ioc_i2h_msgs { | ||
35 | BFI_IOC_I2H_ENABLE_REPLY = BFA_I2HM(1), | ||
36 | BFI_IOC_I2H_DISABLE_REPLY = BFA_I2HM(2), | ||
37 | BFI_IOC_I2H_GETATTR_REPLY = BFA_I2HM(3), | ||
38 | BFI_IOC_I2H_READY_EVENT = BFA_I2HM(4), | ||
39 | BFI_IOC_I2H_HBEAT = BFA_I2HM(5), | ||
40 | }; | ||
41 | |||
42 | /** | ||
43 | * BFI_IOC_H2I_GETATTR_REQ message | ||
44 | */ | ||
45 | struct bfi_ioc_getattr_req_s { | ||
46 | struct bfi_mhdr_s mh; | ||
47 | union bfi_addr_u attr_addr; | ||
48 | }; | ||
49 | |||
50 | struct bfi_ioc_attr_s { | ||
51 | wwn_t mfg_pwwn; /* Mfg port wwn */ | ||
52 | wwn_t mfg_nwwn; /* Mfg node wwn */ | ||
53 | mac_t mfg_mac; /* Mfg mac */ | ||
54 | u16 rsvd_a; | ||
55 | wwn_t pwwn; | ||
56 | wwn_t nwwn; | ||
57 | mac_t mac; /* PBC or Mfg mac */ | ||
58 | u16 rsvd_b; | ||
59 | char brcd_serialnum[STRSZ(BFA_MFG_SERIALNUM_SIZE)]; | ||
60 | u8 pcie_gen; | ||
61 | u8 pcie_lanes_orig; | ||
62 | u8 pcie_lanes; | ||
63 | u8 rx_bbcredit; /* receive buffer credits */ | ||
64 | u32 adapter_prop; /* adapter properties */ | ||
65 | u16 maxfrsize; /* max receive frame size */ | ||
66 | char asic_rev; | ||
67 | u8 rsvd_c; | ||
68 | char fw_version[BFA_VERSION_LEN]; | ||
69 | char optrom_version[BFA_VERSION_LEN]; | ||
70 | struct bfa_mfg_vpd_s vpd; | ||
71 | u32 card_type; /* card type */ | ||
72 | }; | ||
73 | |||
74 | /** | ||
75 | * BFI_IOC_I2H_GETATTR_REPLY message | ||
76 | */ | ||
77 | struct bfi_ioc_getattr_reply_s { | ||
78 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
79 | u8 status; /* cfg reply status */ | ||
80 | u8 rsvd[3]; | ||
81 | }; | ||
82 | |||
83 | /** | ||
84 | * Firmware memory page offsets | ||
85 | */ | ||
86 | #define BFI_IOC_SMEM_PG0_CB (0x40) | ||
87 | #define BFI_IOC_SMEM_PG0_CT (0x180) | ||
88 | |||
89 | /** | ||
90 | * Firmware trace offset | ||
91 | */ | ||
92 | #define BFI_IOC_TRC_OFF (0x4b00) | ||
93 | #define BFI_IOC_TRC_ENTS 256 | ||
94 | |||
95 | #define BFI_IOC_FW_SIGNATURE (0xbfadbfad) | ||
96 | #define BFI_IOC_MD5SUM_SZ 4 | ||
97 | struct bfi_ioc_image_hdr_s { | ||
98 | u32 signature; /* constant signature */ | ||
99 | u32 rsvd_a; | ||
100 | u32 exec; /* exec vector */ | ||
101 | u32 param; /* parameters */ | ||
102 | u32 rsvd_b[4]; | ||
103 | u32 md5sum[BFI_IOC_MD5SUM_SZ]; | ||
104 | }; | ||
105 | |||
106 | /** | ||
107 | * BFI_IOC_I2H_READY_EVENT message | ||
108 | */ | ||
109 | struct bfi_ioc_rdy_event_s { | ||
110 | struct bfi_mhdr_s mh; /* common msg header */ | ||
111 | u8 init_status; /* init event status */ | ||
112 | u8 rsvd[3]; | ||
113 | }; | ||
114 | |||
115 | struct bfi_ioc_hbeat_s { | ||
116 | struct bfi_mhdr_s mh; /* common msg header */ | ||
117 | u32 hb_count; /* current heart beat count */ | ||
118 | }; | ||
119 | |||
120 | /** | ||
121 | * IOC hardware/firmware state | ||
122 | */ | ||
123 | enum bfi_ioc_state { | ||
124 | BFI_IOC_UNINIT = 0, /* not initialized */ | ||
125 | BFI_IOC_INITING = 1, /* h/w is being initialized */ | ||
126 | BFI_IOC_HWINIT = 2, /* h/w is initialized */ | ||
127 | BFI_IOC_CFG = 3, /* IOC configuration in progress */ | ||
128 | BFI_IOC_OP = 4, /* IOC is operational */ | ||
129 | BFI_IOC_DISABLING = 5, /* IOC is being disabled */ | ||
130 | BFI_IOC_DISABLED = 6, /* IOC is disabled */ | ||
131 | BFI_IOC_CFG_DISABLED = 7, /* IOC is being disabled;transient */ | ||
132 | BFI_IOC_FAIL = 8, /* IOC heart-beat failure */ | ||
133 | BFI_IOC_MEMTEST = 9, /* IOC is doing memtest */ | ||
134 | }; | ||
135 | |||
136 | #define BFI_IOC_ENDIAN_SIG 0x12345678 | ||
137 | |||
138 | enum { | ||
139 | BFI_ADAPTER_TYPE_FC = 0x01, /* FC adapters */ | ||
140 | BFI_ADAPTER_TYPE_MK = 0x0f0000, /* adapter type mask */ | ||
141 | BFI_ADAPTER_TYPE_SH = 16, /* adapter type shift */ | ||
142 | BFI_ADAPTER_NPORTS_MK = 0xff00, /* number of ports mask */ | ||
143 | BFI_ADAPTER_NPORTS_SH = 8, /* number of ports shift */ | ||
144 | BFI_ADAPTER_SPEED_MK = 0xff, /* adapter speed mask */ | ||
145 | BFI_ADAPTER_SPEED_SH = 0, /* adapter speed shift */ | ||
146 | BFI_ADAPTER_PROTO = 0x100000, /* prototype adapaters */ | ||
147 | BFI_ADAPTER_TTV = 0x200000, /* TTV debug capable */ | ||
148 | BFI_ADAPTER_UNSUPP = 0x400000, /* unknown adapter type */ | ||
149 | }; | ||
150 | |||
151 | #define BFI_ADAPTER_GETP(__prop, __adap_prop) \ | ||
152 | (((__adap_prop) & BFI_ADAPTER_ ## __prop ## _MK) >> \ | ||
153 | BFI_ADAPTER_ ## __prop ## _SH) | ||
154 | #define BFI_ADAPTER_SETP(__prop, __val) \ | ||
155 | ((__val) << BFI_ADAPTER_ ## __prop ## _SH) | ||
156 | #define BFI_ADAPTER_IS_PROTO(__adap_type) \ | ||
157 | ((__adap_type) & BFI_ADAPTER_PROTO) | ||
158 | #define BFI_ADAPTER_IS_TTV(__adap_type) \ | ||
159 | ((__adap_type) & BFI_ADAPTER_TTV) | ||
160 | #define BFI_ADAPTER_IS_UNSUPP(__adap_type) \ | ||
161 | ((__adap_type) & BFI_ADAPTER_UNSUPP) | ||
162 | #define BFI_ADAPTER_IS_SPECIAL(__adap_type) \ | ||
163 | ((__adap_type) & (BFI_ADAPTER_TTV | BFI_ADAPTER_PROTO | \ | ||
164 | BFI_ADAPTER_UNSUPP)) | ||
165 | |||
166 | /** | ||
167 | * BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages | ||
168 | */ | ||
169 | struct bfi_ioc_ctrl_req_s { | ||
170 | struct bfi_mhdr_s mh; | ||
171 | u8 ioc_class; | ||
172 | u8 rsvd[3]; | ||
173 | }; | ||
174 | |||
175 | /** | ||
176 | * BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages | ||
177 | */ | ||
178 | struct bfi_ioc_ctrl_reply_s { | ||
179 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
180 | u8 status; /* enable/disable status */ | ||
181 | u8 rsvd[3]; | ||
182 | }; | ||
183 | |||
184 | #define BFI_IOC_MSGSZ 8 | ||
185 | /** | ||
186 | * H2I Messages | ||
187 | */ | ||
188 | union bfi_ioc_h2i_msg_u { | ||
189 | struct bfi_mhdr_s mh; | ||
190 | struct bfi_ioc_ctrl_req_s enable_req; | ||
191 | struct bfi_ioc_ctrl_req_s disable_req; | ||
192 | struct bfi_ioc_getattr_req_s getattr_req; | ||
193 | u32 mboxmsg[BFI_IOC_MSGSZ]; | ||
194 | }; | ||
195 | |||
196 | /** | ||
197 | * I2H Messages | ||
198 | */ | ||
199 | union bfi_ioc_i2h_msg_u { | ||
200 | struct bfi_mhdr_s mh; | ||
201 | struct bfi_ioc_rdy_event_s rdy_event; | ||
202 | u32 mboxmsg[BFI_IOC_MSGSZ]; | ||
203 | }; | ||
204 | |||
205 | #pragma pack() | ||
206 | |||
207 | #endif /* __BFI_IOC_H__ */ | ||
208 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_iocfc.h b/drivers/scsi/bfa/include/bfi/bfi_iocfc.h deleted file mode 100644 index ccdfcc5d7e0b..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_iocfc.h +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_IOCFC_H__ | ||
19 | #define __BFI_IOCFC_H__ | ||
20 | |||
21 | #include "bfi.h" | ||
22 | #include <bfi/bfi_pbc.h> | ||
23 | #include <defs/bfa_defs_ioc.h> | ||
24 | #include <defs/bfa_defs_iocfc.h> | ||
25 | #include <defs/bfa_defs_boot.h> | ||
26 | |||
27 | #pragma pack(1) | ||
28 | |||
29 | enum bfi_iocfc_h2i_msgs { | ||
30 | BFI_IOCFC_H2I_CFG_REQ = 1, | ||
31 | BFI_IOCFC_H2I_GET_STATS_REQ = 2, | ||
32 | BFI_IOCFC_H2I_CLEAR_STATS_REQ = 3, | ||
33 | BFI_IOCFC_H2I_SET_INTR_REQ = 4, | ||
34 | BFI_IOCFC_H2I_UPDATEQ_REQ = 5, | ||
35 | }; | ||
36 | |||
37 | enum bfi_iocfc_i2h_msgs { | ||
38 | BFI_IOCFC_I2H_CFG_REPLY = BFA_I2HM(1), | ||
39 | BFI_IOCFC_I2H_GET_STATS_RSP = BFA_I2HM(2), | ||
40 | BFI_IOCFC_I2H_CLEAR_STATS_RSP = BFA_I2HM(3), | ||
41 | BFI_IOCFC_I2H_UPDATEQ_RSP = BFA_I2HM(5), | ||
42 | }; | ||
43 | |||
44 | struct bfi_iocfc_cfg_s { | ||
45 | u8 num_cqs; /* Number of CQs to be used */ | ||
46 | u8 sense_buf_len; /* SCSI sense length */ | ||
47 | u8 trunk_enabled; /* port trunking enabled */ | ||
48 | u8 trunk_ports; /* trunk ports bit map */ | ||
49 | u32 endian_sig; /* endian signature of host */ | ||
50 | |||
51 | /** | ||
52 | * Request and response circular queue base addresses, size and | ||
53 | * shadow index pointers. | ||
54 | */ | ||
55 | union bfi_addr_u req_cq_ba[BFI_IOC_MAX_CQS]; | ||
56 | union bfi_addr_u req_shadow_ci[BFI_IOC_MAX_CQS]; | ||
57 | u16 req_cq_elems[BFI_IOC_MAX_CQS]; | ||
58 | union bfi_addr_u rsp_cq_ba[BFI_IOC_MAX_CQS]; | ||
59 | union bfi_addr_u rsp_shadow_pi[BFI_IOC_MAX_CQS]; | ||
60 | u16 rsp_cq_elems[BFI_IOC_MAX_CQS]; | ||
61 | |||
62 | union bfi_addr_u stats_addr; /* DMA-able address for stats */ | ||
63 | union bfi_addr_u cfgrsp_addr; /* config response dma address */ | ||
64 | union bfi_addr_u ioim_snsbase; /* IO sense buffer base address */ | ||
65 | struct bfa_iocfc_intr_attr_s intr_attr; /* IOC interrupt attributes */ | ||
66 | }; | ||
67 | |||
68 | /** | ||
69 | * Boot target wwn information for this port. This contains either the stored | ||
70 | * or discovered boot target port wwns for the port. | ||
71 | */ | ||
72 | struct bfi_iocfc_bootwwns { | ||
73 | wwn_t wwn[BFA_BOOT_BOOTLUN_MAX]; | ||
74 | u8 nwwns; | ||
75 | u8 rsvd[7]; | ||
76 | }; | ||
77 | |||
78 | struct bfi_iocfc_cfgrsp_s { | ||
79 | struct bfa_iocfc_fwcfg_s fwcfg; | ||
80 | struct bfa_iocfc_intr_attr_s intr_attr; | ||
81 | struct bfi_iocfc_bootwwns bootwwns; | ||
82 | struct bfi_pbc_s pbc_cfg; | ||
83 | }; | ||
84 | |||
85 | /** | ||
86 | * BFI_IOCFC_H2I_CFG_REQ message | ||
87 | */ | ||
88 | struct bfi_iocfc_cfg_req_s { | ||
89 | struct bfi_mhdr_s mh; | ||
90 | union bfi_addr_u ioc_cfg_dma_addr; | ||
91 | }; | ||
92 | |||
93 | /** | ||
94 | * BFI_IOCFC_I2H_CFG_REPLY message | ||
95 | */ | ||
96 | struct bfi_iocfc_cfg_reply_s { | ||
97 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
98 | u8 cfg_success; /* cfg reply status */ | ||
99 | u8 lpu_bm; /* LPUs assigned for this IOC */ | ||
100 | u8 rsvd[2]; | ||
101 | }; | ||
102 | |||
103 | /** | ||
104 | * BFI_IOCFC_H2I_GET_STATS_REQ & BFI_IOCFC_H2I_CLEAR_STATS_REQ messages | ||
105 | */ | ||
106 | struct bfi_iocfc_stats_req_s { | ||
107 | struct bfi_mhdr_s mh; /* msg header */ | ||
108 | u32 msgtag; /* msgtag for reply */ | ||
109 | }; | ||
110 | |||
111 | /** | ||
112 | * BFI_IOCFC_I2H_GET_STATS_RSP & BFI_IOCFC_I2H_CLEAR_STATS_RSP messages | ||
113 | */ | ||
114 | struct bfi_iocfc_stats_rsp_s { | ||
115 | struct bfi_mhdr_s mh; /* common msg header */ | ||
116 | u8 status; /* reply status */ | ||
117 | u8 rsvd[3]; | ||
118 | u32 msgtag; /* msgtag for reply */ | ||
119 | }; | ||
120 | |||
121 | /** | ||
122 | * BFI_IOCFC_H2I_SET_INTR_REQ message | ||
123 | */ | ||
124 | struct bfi_iocfc_set_intr_req_s { | ||
125 | struct bfi_mhdr_s mh; /* common msg header */ | ||
126 | u8 coalesce; /* enable intr coalescing*/ | ||
127 | u8 rsvd[3]; | ||
128 | u16 delay; /* delay timer 0..1125us */ | ||
129 | u16 latency; /* latency timer 0..225us */ | ||
130 | }; | ||
131 | |||
132 | /** | ||
133 | * BFI_IOCFC_H2I_UPDATEQ_REQ message | ||
134 | */ | ||
135 | struct bfi_iocfc_updateq_req_s { | ||
136 | struct bfi_mhdr_s mh; /* common msg header */ | ||
137 | u32 reqq_ba; /* reqq base addr */ | ||
138 | u32 rspq_ba; /* rspq base addr */ | ||
139 | u32 reqq_sci; /* reqq shadow ci */ | ||
140 | u32 rspq_spi; /* rspq shadow pi */ | ||
141 | }; | ||
142 | |||
143 | /** | ||
144 | * BFI_IOCFC_I2H_UPDATEQ_RSP message | ||
145 | */ | ||
146 | struct bfi_iocfc_updateq_rsp_s { | ||
147 | struct bfi_mhdr_s mh; /* common msg header */ | ||
148 | u8 status; /* updateq status */ | ||
149 | u8 rsvd[3]; | ||
150 | }; | ||
151 | |||
152 | /** | ||
153 | * H2I Messages | ||
154 | */ | ||
155 | union bfi_iocfc_h2i_msg_u { | ||
156 | struct bfi_mhdr_s mh; | ||
157 | struct bfi_iocfc_cfg_req_s cfg_req; | ||
158 | struct bfi_iocfc_stats_req_s stats_get; | ||
159 | struct bfi_iocfc_stats_req_s stats_clr; | ||
160 | struct bfi_iocfc_updateq_req_s updateq_req; | ||
161 | u32 mboxmsg[BFI_IOC_MSGSZ]; | ||
162 | }; | ||
163 | |||
164 | /** | ||
165 | * I2H Messages | ||
166 | */ | ||
167 | union bfi_iocfc_i2h_msg_u { | ||
168 | struct bfi_mhdr_s mh; | ||
169 | struct bfi_iocfc_cfg_reply_s cfg_reply; | ||
170 | struct bfi_iocfc_stats_rsp_s stats_get_rsp; | ||
171 | struct bfi_iocfc_stats_rsp_s stats_clr_rsp; | ||
172 | struct bfi_iocfc_updateq_rsp_s updateq_rsp; | ||
173 | u32 mboxmsg[BFI_IOC_MSGSZ]; | ||
174 | }; | ||
175 | |||
176 | #pragma pack() | ||
177 | |||
178 | #endif /* __BFI_IOCFC_H__ */ | ||
179 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_lport.h b/drivers/scsi/bfa/include/bfi/bfi_lport.h deleted file mode 100644 index 29010614bac9..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_lport.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_LPORT_H__ | ||
19 | #define __BFI_LPORT_H__ | ||
20 | |||
21 | #include <bfi/bfi.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_lport_h2i_msgs { | ||
26 | BFI_LPORT_H2I_CREATE_REQ = 1, | ||
27 | BFI_LPORT_H2I_DELETE_REQ = 2, | ||
28 | }; | ||
29 | |||
30 | enum bfi_lport_i2h_msgs { | ||
31 | BFI_LPORT_I2H_CREATE_RSP = BFA_I2HM(1), | ||
32 | BFI_LPORT_I2H_DELETE_RSP = BFA_I2HM(2), | ||
33 | BFI_LPORT_I2H_ONLINE = BFA_I2HM(3), | ||
34 | BFI_LPORT_I2H_OFFLINE = BFA_I2HM(4), | ||
35 | }; | ||
36 | |||
37 | #define BFI_LPORT_MAX_SYNNAME 64 | ||
38 | |||
39 | enum bfi_lport_role_e { | ||
40 | BFI_LPORT_ROLE_FCPIM = 1, | ||
41 | BFI_LPORT_ROLE_FCPTM = 2, | ||
42 | BFI_LPORT_ROLE_IPFC = 4, | ||
43 | }; | ||
44 | |||
45 | struct bfi_lport_create_req_s { | ||
46 | bfi_mhdr_t mh; /* common msg header */ | ||
47 | u16 fabric_fwhdl; /* parent fabric instance */ | ||
48 | u8 roles; /* lport FC-4 roles */ | ||
49 | u8 rsvd; | ||
50 | wwn_t pwwn; /* port name */ | ||
51 | wwn_t nwwn; /* node name */ | ||
52 | u8 symname[BFI_LPORT_MAX_SYNNAME]; | ||
53 | }; | ||
54 | |||
55 | struct bfi_lport_create_rsp_s { | ||
56 | bfi_mhdr_t mh; /* common msg header */ | ||
57 | u8 status; /* lport creation status */ | ||
58 | u8 rsvd[3]; | ||
59 | }; | ||
60 | |||
61 | struct bfi_lport_delete_req_s { | ||
62 | bfi_mhdr_t mh; /* common msg header */ | ||
63 | u16 fw_handle; /* firmware lport handle */ | ||
64 | u16 rsvd; | ||
65 | }; | ||
66 | |||
67 | struct bfi_lport_delete_rsp_s { | ||
68 | bfi_mhdr_t mh; /* common msg header */ | ||
69 | u16 bfa_handle; /* host lport handle */ | ||
70 | u8 status; /* lport deletion status */ | ||
71 | u8 rsvd; | ||
72 | }; | ||
73 | |||
74 | union bfi_lport_h2i_msg_u { | ||
75 | bfi_msg_t *msg; | ||
76 | struct bfi_lport_create_req_s *create_req; | ||
77 | struct bfi_lport_delete_req_s *delete_req; | ||
78 | }; | ||
79 | |||
80 | union bfi_lport_i2h_msg_u { | ||
81 | bfi_msg_t *msg; | ||
82 | struct bfi_lport_create_rsp_s *create_rsp; | ||
83 | struct bfi_lport_delete_rsp_s *delete_rsp; | ||
84 | }; | ||
85 | |||
86 | #pragma pack() | ||
87 | |||
88 | #endif /* __BFI_LPORT_H__ */ | ||
89 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_lps.h b/drivers/scsi/bfa/include/bfi/bfi_lps.h deleted file mode 100644 index 7ed31bbb8696..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_lps.h +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_LPS_H__ | ||
19 | #define __BFI_LPS_H__ | ||
20 | |||
21 | #include <bfi/bfi.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_lps_h2i_msgs { | ||
26 | BFI_LPS_H2I_LOGIN_REQ = 1, | ||
27 | BFI_LPS_H2I_LOGOUT_REQ = 2, | ||
28 | }; | ||
29 | |||
30 | enum bfi_lps_i2h_msgs { | ||
31 | BFI_LPS_H2I_LOGIN_RSP = BFA_I2HM(1), | ||
32 | BFI_LPS_H2I_LOGOUT_RSP = BFA_I2HM(2), | ||
33 | BFI_LPS_H2I_CVL_EVENT = BFA_I2HM(3), | ||
34 | }; | ||
35 | |||
36 | struct bfi_lps_login_req_s { | ||
37 | struct bfi_mhdr_s mh; /* common msg header */ | ||
38 | u8 lp_tag; | ||
39 | u8 alpa; | ||
40 | u16 pdu_size; | ||
41 | wwn_t pwwn; | ||
42 | wwn_t nwwn; | ||
43 | u8 fdisc; | ||
44 | u8 auth_en; | ||
45 | u8 rsvd[2]; | ||
46 | }; | ||
47 | |||
48 | struct bfi_lps_login_rsp_s { | ||
49 | struct bfi_mhdr_s mh; /* common msg header */ | ||
50 | u8 lp_tag; | ||
51 | u8 status; | ||
52 | u8 lsrjt_rsn; | ||
53 | u8 lsrjt_expl; | ||
54 | wwn_t port_name; | ||
55 | wwn_t node_name; | ||
56 | u16 bb_credit; | ||
57 | u8 f_port; | ||
58 | u8 npiv_en; | ||
59 | u32 lp_pid:24; | ||
60 | u32 auth_req:8; | ||
61 | mac_t lp_mac; | ||
62 | mac_t fcf_mac; | ||
63 | u8 ext_status; | ||
64 | u8 brcd_switch;/* attached peer is brcd switch */ | ||
65 | }; | ||
66 | |||
67 | struct bfi_lps_logout_req_s { | ||
68 | struct bfi_mhdr_s mh; /* common msg header */ | ||
69 | u8 lp_tag; | ||
70 | u8 rsvd[3]; | ||
71 | wwn_t port_name; | ||
72 | }; | ||
73 | |||
74 | struct bfi_lps_logout_rsp_s { | ||
75 | struct bfi_mhdr_s mh; /* common msg header */ | ||
76 | u8 lp_tag; | ||
77 | u8 status; | ||
78 | u8 rsvd[2]; | ||
79 | }; | ||
80 | |||
81 | struct bfi_lps_cvl_event_s { | ||
82 | struct bfi_mhdr_s mh; /* common msg header */ | ||
83 | u8 lp_tag; | ||
84 | u8 rsvd[3]; | ||
85 | }; | ||
86 | |||
87 | union bfi_lps_h2i_msg_u { | ||
88 | struct bfi_mhdr_s *msg; | ||
89 | struct bfi_lps_login_req_s *login_req; | ||
90 | struct bfi_lps_logout_req_s *logout_req; | ||
91 | }; | ||
92 | |||
93 | union bfi_lps_i2h_msg_u { | ||
94 | struct bfi_msg_s *msg; | ||
95 | struct bfi_lps_login_rsp_s *login_rsp; | ||
96 | struct bfi_lps_logout_rsp_s *logout_rsp; | ||
97 | struct bfi_lps_cvl_event_s *cvl_event; | ||
98 | }; | ||
99 | |||
100 | #pragma pack() | ||
101 | |||
102 | #endif /* __BFI_LPS_H__ */ | ||
103 | |||
104 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_pbc.h b/drivers/scsi/bfa/include/bfi/bfi_pbc.h deleted file mode 100644 index 88a4154c30c0..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_pbc.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2010 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_PBC_H__ | ||
19 | #define __BFI_PBC_H__ | ||
20 | |||
21 | #pragma pack(1) | ||
22 | |||
23 | #define BFI_PBC_MAX_BLUNS 8 | ||
24 | #define BFI_PBC_MAX_VPORTS 16 | ||
25 | |||
26 | #define BFI_PBC_PORT_DISABLED 2 | ||
27 | /** | ||
28 | * PBC boot lun configuration | ||
29 | */ | ||
30 | struct bfi_pbc_blun_s { | ||
31 | wwn_t tgt_pwwn; | ||
32 | lun_t tgt_lun; | ||
33 | }; | ||
34 | |||
35 | /** | ||
36 | * PBC virtual port configuration | ||
37 | */ | ||
38 | struct bfi_pbc_vport_s { | ||
39 | wwn_t vp_pwwn; | ||
40 | wwn_t vp_nwwn; | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * BFI pre-boot configuration information | ||
45 | */ | ||
46 | struct bfi_pbc_s { | ||
47 | u8 port_enabled; | ||
48 | u8 boot_enabled; | ||
49 | u8 nbluns; | ||
50 | u8 nvports; | ||
51 | u8 port_speed; | ||
52 | u8 rsvd_a; | ||
53 | u16 hss; | ||
54 | wwn_t pbc_pwwn; | ||
55 | wwn_t pbc_nwwn; | ||
56 | struct bfi_pbc_blun_s blun[BFI_PBC_MAX_BLUNS]; | ||
57 | struct bfi_pbc_vport_s vport[BFI_PBC_MAX_VPORTS]; | ||
58 | }; | ||
59 | |||
60 | #pragma pack() | ||
61 | |||
62 | #endif /* __BFI_PBC_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_port.h b/drivers/scsi/bfa/include/bfi/bfi_port.h deleted file mode 100644 index 3ec3bea110ba..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_port.h +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFI_PORT_H__ | ||
18 | #define __BFI_PORT_H__ | ||
19 | |||
20 | #include <bfi/bfi.h> | ||
21 | #include <defs/bfa_defs_pport.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_port_h2i { | ||
26 | BFI_PORT_H2I_ENABLE_REQ = (1), | ||
27 | BFI_PORT_H2I_DISABLE_REQ = (2), | ||
28 | BFI_PORT_H2I_GET_STATS_REQ = (3), | ||
29 | BFI_PORT_H2I_CLEAR_STATS_REQ = (4), | ||
30 | }; | ||
31 | |||
32 | enum bfi_port_i2h { | ||
33 | BFI_PORT_I2H_ENABLE_RSP = BFA_I2HM(1), | ||
34 | BFI_PORT_I2H_DISABLE_RSP = BFA_I2HM(2), | ||
35 | BFI_PORT_I2H_GET_STATS_RSP = BFA_I2HM(3), | ||
36 | BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4), | ||
37 | }; | ||
38 | |||
39 | /** | ||
40 | * Generic REQ type | ||
41 | */ | ||
42 | struct bfi_port_generic_req_s { | ||
43 | struct bfi_mhdr_s mh; /* msg header */ | ||
44 | u32 msgtag; /* msgtag for reply */ | ||
45 | u32 rsvd; | ||
46 | }; | ||
47 | |||
48 | /** | ||
49 | * Generic RSP type | ||
50 | */ | ||
51 | struct bfi_port_generic_rsp_s { | ||
52 | struct bfi_mhdr_s mh; /* common msg header */ | ||
53 | u8 status; /* port enable status */ | ||
54 | u8 rsvd[3]; | ||
55 | u32 msgtag; /* msgtag for reply */ | ||
56 | }; | ||
57 | |||
58 | /** | ||
59 | * @todo | ||
60 | * BFI_PORT_H2I_ENABLE_REQ | ||
61 | */ | ||
62 | |||
63 | /** | ||
64 | * @todo | ||
65 | * BFI_PORT_I2H_ENABLE_RSP | ||
66 | */ | ||
67 | |||
68 | /** | ||
69 | * BFI_PORT_H2I_DISABLE_REQ | ||
70 | */ | ||
71 | |||
72 | /** | ||
73 | * BFI_PORT_I2H_DISABLE_RSP | ||
74 | */ | ||
75 | |||
76 | /** | ||
77 | * BFI_PORT_H2I_GET_STATS_REQ | ||
78 | */ | ||
79 | struct bfi_port_get_stats_req_s { | ||
80 | struct bfi_mhdr_s mh; /* common msg header */ | ||
81 | union bfi_addr_u dma_addr; | ||
82 | }; | ||
83 | |||
84 | /** | ||
85 | * BFI_PORT_I2H_GET_STATS_RSP | ||
86 | */ | ||
87 | |||
88 | /** | ||
89 | * BFI_PORT_H2I_CLEAR_STATS_REQ | ||
90 | */ | ||
91 | |||
92 | /** | ||
93 | * BFI_PORT_I2H_CLEAR_STATS_RSP | ||
94 | */ | ||
95 | |||
96 | union bfi_port_h2i_msg_u { | ||
97 | struct bfi_mhdr_s mh; | ||
98 | struct bfi_port_generic_req_s enable_req; | ||
99 | struct bfi_port_generic_req_s disable_req; | ||
100 | struct bfi_port_get_stats_req_s getstats_req; | ||
101 | struct bfi_port_generic_req_s clearstats_req; | ||
102 | }; | ||
103 | |||
104 | union bfi_port_i2h_msg_u { | ||
105 | struct bfi_mhdr_s mh; | ||
106 | struct bfi_port_generic_rsp_s enable_rsp; | ||
107 | struct bfi_port_generic_rsp_s disable_rsp; | ||
108 | struct bfi_port_generic_rsp_s getstats_rsp; | ||
109 | struct bfi_port_generic_rsp_s clearstats_rsp; | ||
110 | }; | ||
111 | |||
112 | #pragma pack() | ||
113 | |||
114 | #endif /* __BFI_PORT_H__ */ | ||
115 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_pport.h b/drivers/scsi/bfa/include/bfi/bfi_pport.h deleted file mode 100644 index 50dcf45c7470..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_pport.h +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFI_PPORT_H__ | ||
18 | #define __BFI_PPORT_H__ | ||
19 | |||
20 | #include <bfi/bfi.h> | ||
21 | #include <defs/bfa_defs_pport.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_fcport_h2i { | ||
26 | BFI_FCPORT_H2I_ENABLE_REQ = (1), | ||
27 | BFI_FCPORT_H2I_DISABLE_REQ = (2), | ||
28 | BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ = (3), | ||
29 | BFI_FCPORT_H2I_STATS_GET_REQ = (4), | ||
30 | BFI_FCPORT_H2I_STATS_CLEAR_REQ = (5), | ||
31 | }; | ||
32 | |||
33 | enum bfi_fcport_i2h { | ||
34 | BFI_FCPORT_I2H_ENABLE_RSP = BFA_I2HM(1), | ||
35 | BFI_FCPORT_I2H_DISABLE_RSP = BFA_I2HM(2), | ||
36 | BFI_FCPORT_I2H_SET_SVC_PARAMS_RSP = BFA_I2HM(3), | ||
37 | BFI_FCPORT_I2H_STATS_GET_RSP = BFA_I2HM(4), | ||
38 | BFI_FCPORT_I2H_STATS_CLEAR_RSP = BFA_I2HM(5), | ||
39 | BFI_FCPORT_I2H_EVENT = BFA_I2HM(6), | ||
40 | }; | ||
41 | |||
42 | /** | ||
43 | * Generic REQ type | ||
44 | */ | ||
45 | struct bfi_fcport_req_s { | ||
46 | struct bfi_mhdr_s mh; /* msg header */ | ||
47 | u32 msgtag; /* msgtag for reply */ | ||
48 | }; | ||
49 | |||
50 | /** | ||
51 | * Generic RSP type | ||
52 | */ | ||
53 | struct bfi_fcport_rsp_s { | ||
54 | struct bfi_mhdr_s mh; /* common msg header */ | ||
55 | u8 status; /* port enable status */ | ||
56 | u8 rsvd[3]; | ||
57 | u32 msgtag; /* msgtag for reply */ | ||
58 | }; | ||
59 | |||
60 | /** | ||
61 | * BFI_FCPORT_H2I_ENABLE_REQ | ||
62 | */ | ||
63 | struct bfi_fcport_enable_req_s { | ||
64 | struct bfi_mhdr_s mh; /* msg header */ | ||
65 | u32 rsvd1; | ||
66 | wwn_t nwwn; /* node wwn of physical port */ | ||
67 | wwn_t pwwn; /* port wwn of physical port */ | ||
68 | struct bfa_pport_cfg_s port_cfg; /* port configuration */ | ||
69 | union bfi_addr_u stats_dma_addr; /* DMA address for stats */ | ||
70 | u32 msgtag; /* msgtag for reply */ | ||
71 | u32 rsvd2; | ||
72 | }; | ||
73 | |||
74 | /** | ||
75 | * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ | ||
76 | */ | ||
77 | struct bfi_fcport_set_svc_params_req_s { | ||
78 | struct bfi_mhdr_s mh; /* msg header */ | ||
79 | u16 tx_bbcredit; /* Tx credits */ | ||
80 | u16 rsvd; | ||
81 | }; | ||
82 | |||
83 | /** | ||
84 | * BFI_FCPORT_I2H_EVENT | ||
85 | */ | ||
86 | struct bfi_fcport_event_s { | ||
87 | struct bfi_mhdr_s mh; /* common msg header */ | ||
88 | struct bfa_pport_link_s link_state; | ||
89 | }; | ||
90 | |||
91 | /** | ||
92 | * fcport H2I message | ||
93 | */ | ||
94 | union bfi_fcport_h2i_msg_u { | ||
95 | struct bfi_mhdr_s *mhdr; | ||
96 | struct bfi_fcport_enable_req_s *penable; | ||
97 | struct bfi_fcport_req_s *pdisable; | ||
98 | struct bfi_fcport_set_svc_params_req_s *psetsvcparams; | ||
99 | struct bfi_fcport_req_s *pstatsget; | ||
100 | struct bfi_fcport_req_s *pstatsclear; | ||
101 | }; | ||
102 | |||
103 | /** | ||
104 | * fcport I2H message | ||
105 | */ | ||
106 | union bfi_fcport_i2h_msg_u { | ||
107 | struct bfi_msg_s *msg; | ||
108 | struct bfi_fcport_rsp_s *penable_rsp; | ||
109 | struct bfi_fcport_rsp_s *pdisable_rsp; | ||
110 | struct bfi_fcport_rsp_s *psetsvcparams_rsp; | ||
111 | struct bfi_fcport_rsp_s *pstatsget_rsp; | ||
112 | struct bfi_fcport_rsp_s *pstatsclear_rsp; | ||
113 | struct bfi_fcport_event_s *event; | ||
114 | }; | ||
115 | |||
116 | #pragma pack() | ||
117 | |||
118 | #endif /* __BFI_PPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_rport.h b/drivers/scsi/bfa/include/bfi/bfi_rport.h deleted file mode 100644 index e1cd83b56ec6..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_rport.h +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_RPORT_H__ | ||
19 | #define __BFI_RPORT_H__ | ||
20 | |||
21 | #include <bfi/bfi.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_rport_h2i_msgs { | ||
26 | BFI_RPORT_H2I_CREATE_REQ = 1, | ||
27 | BFI_RPORT_H2I_DELETE_REQ = 2, | ||
28 | BFI_RPORT_H2I_SET_SPEED_REQ = 3, | ||
29 | }; | ||
30 | |||
31 | enum bfi_rport_i2h_msgs { | ||
32 | BFI_RPORT_I2H_CREATE_RSP = BFA_I2HM(1), | ||
33 | BFI_RPORT_I2H_DELETE_RSP = BFA_I2HM(2), | ||
34 | BFI_RPORT_I2H_QOS_SCN = BFA_I2HM(3), | ||
35 | }; | ||
36 | |||
37 | struct bfi_rport_create_req_s { | ||
38 | struct bfi_mhdr_s mh; /* common msg header */ | ||
39 | u16 bfa_handle; /* host rport handle */ | ||
40 | u16 max_frmsz; /* max rcv pdu size */ | ||
41 | u32 pid:24, /* remote port ID */ | ||
42 | lp_tag:8; /* local port tag */ | ||
43 | u32 local_pid:24, /* local port ID */ | ||
44 | cisc:8; | ||
45 | u8 fc_class; /* supported FC classes */ | ||
46 | u8 vf_en; /* virtual fabric enable */ | ||
47 | u16 vf_id; /* virtual fabric ID */ | ||
48 | }; | ||
49 | |||
50 | struct bfi_rport_create_rsp_s { | ||
51 | struct bfi_mhdr_s mh; /* common msg header */ | ||
52 | u8 status; /* rport creation status */ | ||
53 | u8 rsvd[3]; | ||
54 | u16 bfa_handle; /* host rport handle */ | ||
55 | u16 fw_handle; /* firmware rport handle */ | ||
56 | struct bfa_rport_qos_attr_s qos_attr; /* QoS Attributes */ | ||
57 | }; | ||
58 | |||
59 | struct bfa_rport_speed_req_s { | ||
60 | struct bfi_mhdr_s mh; /* common msg header */ | ||
61 | u16 fw_handle; /* firmware rport handle */ | ||
62 | u8 speed; /*! rport's speed via RPSC */ | ||
63 | u8 rsvd; | ||
64 | }; | ||
65 | |||
66 | struct bfi_rport_delete_req_s { | ||
67 | struct bfi_mhdr_s mh; /* common msg header */ | ||
68 | u16 fw_handle; /* firmware rport handle */ | ||
69 | u16 rsvd; | ||
70 | }; | ||
71 | |||
72 | struct bfi_rport_delete_rsp_s { | ||
73 | struct bfi_mhdr_s mh; /* common msg header */ | ||
74 | u16 bfa_handle; /* host rport handle */ | ||
75 | u8 status; /* rport deletion status */ | ||
76 | u8 rsvd; | ||
77 | }; | ||
78 | |||
79 | struct bfi_rport_qos_scn_s { | ||
80 | struct bfi_mhdr_s mh; /* common msg header */ | ||
81 | u16 bfa_handle; /* host rport handle */ | ||
82 | u16 rsvd; | ||
83 | struct bfa_rport_qos_attr_s old_qos_attr; /* Old QoS Attributes */ | ||
84 | struct bfa_rport_qos_attr_s new_qos_attr; /* New QoS Attributes */ | ||
85 | }; | ||
86 | |||
87 | union bfi_rport_h2i_msg_u { | ||
88 | struct bfi_msg_s *msg; | ||
89 | struct bfi_rport_create_req_s *create_req; | ||
90 | struct bfi_rport_delete_req_s *delete_req; | ||
91 | struct bfi_rport_speed_req_s *speed_req; | ||
92 | }; | ||
93 | |||
94 | union bfi_rport_i2h_msg_u { | ||
95 | struct bfi_msg_s *msg; | ||
96 | struct bfi_rport_create_rsp_s *create_rsp; | ||
97 | struct bfi_rport_delete_rsp_s *delete_rsp; | ||
98 | struct bfi_rport_qos_scn_s *qos_scn_evt; | ||
99 | }; | ||
100 | |||
101 | #pragma pack() | ||
102 | |||
103 | #endif /* __BFI_RPORT_H__ */ | ||
104 | |||
diff --git a/drivers/scsi/bfa/include/bfi/bfi_uf.h b/drivers/scsi/bfa/include/bfi/bfi_uf.h deleted file mode 100644 index f328a9e7e622..000000000000 --- a/drivers/scsi/bfa/include/bfi/bfi_uf.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFI_UF_H__ | ||
19 | #define __BFI_UF_H__ | ||
20 | |||
21 | #include "bfi.h" | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum bfi_uf_h2i { | ||
26 | BFI_UF_H2I_BUF_POST = 1, | ||
27 | }; | ||
28 | |||
29 | enum bfi_uf_i2h { | ||
30 | BFI_UF_I2H_FRM_RCVD = BFA_I2HM(1), | ||
31 | }; | ||
32 | |||
33 | #define BFA_UF_MAX_SGES 2 | ||
34 | |||
35 | struct bfi_uf_buf_post_s { | ||
36 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
37 | u16 buf_tag; /* buffer tag */ | ||
38 | u16 buf_len; /* total buffer length */ | ||
39 | struct bfi_sge_s sge[BFA_UF_MAX_SGES]; /* buffer DMA SGEs */ | ||
40 | }; | ||
41 | |||
42 | struct bfi_uf_frm_rcvd_s { | ||
43 | struct bfi_mhdr_s mh; /* Common msg header */ | ||
44 | u16 buf_tag; /* buffer tag */ | ||
45 | u16 rsvd; | ||
46 | u16 frm_len; /* received frame length */ | ||
47 | u16 xfr_len; /* tranferred length */ | ||
48 | }; | ||
49 | |||
50 | #pragma pack() | ||
51 | |||
52 | #endif /* __BFI_UF_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/cna/bfa_cna_trcmod.h b/drivers/scsi/bfa/include/cna/bfa_cna_trcmod.h deleted file mode 100644 index a75a1f3be315..000000000000 --- a/drivers/scsi/bfa/include/cna/bfa_cna_trcmod.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_cna_trcmod.h CNA trace modules | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_CNA_TRCMOD_H__ | ||
23 | #define __BFA_CNA_TRCMOD_H__ | ||
24 | |||
25 | #include <cs/bfa_trc.h> | ||
26 | |||
27 | /* | ||
28 | * !!! Only append to the enums defined here to avoid any versioning | ||
29 | * !!! needed between trace utility and driver version | ||
30 | */ | ||
31 | enum { | ||
32 | BFA_TRC_CNA_CEE = 1, | ||
33 | BFA_TRC_CNA_PORT = 2, | ||
34 | BFA_TRC_CNA_IOC = 3, | ||
35 | BFA_TRC_CNA_DIAG = 4, | ||
36 | BFA_TRC_CNA_IOC_CB = 5, | ||
37 | BFA_TRC_CNA_IOC_CT = 6, | ||
38 | }; | ||
39 | |||
40 | #endif /* __BFA_CNA_TRCMOD_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/cna/cee/bfa_cee.h b/drivers/scsi/bfa/include/cna/cee/bfa_cee.h deleted file mode 100644 index 77f297f68046..000000000000 --- a/drivers/scsi/bfa/include/cna/cee/bfa_cee.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_CEE_H__ | ||
19 | #define __BFA_CEE_H__ | ||
20 | |||
21 | #include <defs/bfa_defs_cee.h> | ||
22 | #include <bfa_ioc.h> | ||
23 | #include <cs/bfa_trc.h> | ||
24 | #include <cs/bfa_log.h> | ||
25 | |||
26 | typedef void (*bfa_cee_get_attr_cbfn_t) (void *dev, bfa_status_t status); | ||
27 | typedef void (*bfa_cee_get_stats_cbfn_t) (void *dev, bfa_status_t status); | ||
28 | typedef void (*bfa_cee_reset_stats_cbfn_t) (void *dev, bfa_status_t status); | ||
29 | typedef void (*bfa_cee_hbfail_cbfn_t) (void *dev, bfa_status_t status); | ||
30 | |||
31 | struct bfa_cee_cbfn_s { | ||
32 | bfa_cee_get_attr_cbfn_t get_attr_cbfn; | ||
33 | void *get_attr_cbarg; | ||
34 | bfa_cee_get_stats_cbfn_t get_stats_cbfn; | ||
35 | void *get_stats_cbarg; | ||
36 | bfa_cee_reset_stats_cbfn_t reset_stats_cbfn; | ||
37 | void *reset_stats_cbarg; | ||
38 | }; | ||
39 | |||
40 | struct bfa_cee_s { | ||
41 | void *dev; | ||
42 | bfa_boolean_t get_attr_pending; | ||
43 | bfa_boolean_t get_stats_pending; | ||
44 | bfa_boolean_t reset_stats_pending; | ||
45 | bfa_status_t get_attr_status; | ||
46 | bfa_status_t get_stats_status; | ||
47 | bfa_status_t reset_stats_status; | ||
48 | struct bfa_cee_cbfn_s cbfn; | ||
49 | struct bfa_ioc_hbfail_notify_s hbfail; | ||
50 | struct bfa_trc_mod_s *trcmod; | ||
51 | struct bfa_log_mod_s *logmod; | ||
52 | struct bfa_cee_attr_s *attr; | ||
53 | struct bfa_cee_stats_s *stats; | ||
54 | struct bfa_dma_s attr_dma; | ||
55 | struct bfa_dma_s stats_dma; | ||
56 | struct bfa_ioc_s *ioc; | ||
57 | struct bfa_mbox_cmd_s get_cfg_mb; | ||
58 | struct bfa_mbox_cmd_s get_stats_mb; | ||
59 | struct bfa_mbox_cmd_s reset_stats_mb; | ||
60 | }; | ||
61 | |||
62 | u32 bfa_cee_meminfo(void); | ||
63 | void bfa_cee_mem_claim(struct bfa_cee_s *cee, u8 *dma_kva, | ||
64 | u64 dma_pa); | ||
65 | void bfa_cee_attach(struct bfa_cee_s *cee, struct bfa_ioc_s *ioc, void *dev, | ||
66 | struct bfa_trc_mod_s *trcmod, | ||
67 | struct bfa_log_mod_s *logmod); | ||
68 | void bfa_cee_detach(struct bfa_cee_s *cee); | ||
69 | bfa_status_t bfa_cee_get_attr(struct bfa_cee_s *cee, | ||
70 | struct bfa_cee_attr_s *attr, | ||
71 | bfa_cee_get_attr_cbfn_t cbfn, void *cbarg); | ||
72 | bfa_status_t bfa_cee_get_stats(struct bfa_cee_s *cee, | ||
73 | struct bfa_cee_stats_s *stats, | ||
74 | bfa_cee_get_stats_cbfn_t cbfn, void *cbarg); | ||
75 | bfa_status_t bfa_cee_reset_stats(struct bfa_cee_s *cee, | ||
76 | bfa_cee_reset_stats_cbfn_t cbfn, void *cbarg); | ||
77 | #endif /* __BFA_CEE_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/cna/port/bfa_port.h b/drivers/scsi/bfa/include/cna/port/bfa_port.h deleted file mode 100644 index d7babaf97848..000000000000 --- a/drivers/scsi/bfa/include/cna/port/bfa_port.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_PORT_H__ | ||
19 | #define __BFA_PORT_H__ | ||
20 | |||
21 | #include <defs/bfa_defs_port.h> | ||
22 | #include <bfa_ioc.h> | ||
23 | #include <cs/bfa_trc.h> | ||
24 | #include <cs/bfa_log.h> | ||
25 | |||
26 | typedef void (*bfa_port_stats_cbfn_t) (void *dev, bfa_status_t status); | ||
27 | typedef void (*bfa_port_endis_cbfn_t) (void *dev, bfa_status_t status); | ||
28 | |||
29 | struct bfa_port_s { | ||
30 | void *dev; | ||
31 | struct bfa_ioc_s *ioc; | ||
32 | struct bfa_trc_mod_s *trcmod; | ||
33 | struct bfa_log_mod_s *logmod; | ||
34 | u32 msgtag; | ||
35 | bfa_boolean_t stats_busy; | ||
36 | struct bfa_mbox_cmd_s stats_mb; | ||
37 | bfa_port_stats_cbfn_t stats_cbfn; | ||
38 | void *stats_cbarg; | ||
39 | bfa_status_t stats_status; | ||
40 | u32 stats_reset_time; | ||
41 | union bfa_pport_stats_u *stats; | ||
42 | struct bfa_dma_s stats_dma; | ||
43 | bfa_boolean_t endis_pending; | ||
44 | struct bfa_mbox_cmd_s endis_mb; | ||
45 | bfa_port_endis_cbfn_t endis_cbfn; | ||
46 | void *endis_cbarg; | ||
47 | bfa_status_t endis_status; | ||
48 | struct bfa_ioc_hbfail_notify_s hbfail; | ||
49 | }; | ||
50 | |||
51 | void bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc, | ||
52 | void *dev, struct bfa_trc_mod_s *trcmod, | ||
53 | struct bfa_log_mod_s *logmod); | ||
54 | void bfa_port_detach(struct bfa_port_s *port); | ||
55 | void bfa_port_hbfail(void *arg); | ||
56 | |||
57 | bfa_status_t bfa_port_get_stats(struct bfa_port_s *port, | ||
58 | union bfa_pport_stats_u *stats, | ||
59 | bfa_port_stats_cbfn_t cbfn, void *cbarg); | ||
60 | bfa_status_t bfa_port_clear_stats(struct bfa_port_s *port, | ||
61 | bfa_port_stats_cbfn_t cbfn, void *cbarg); | ||
62 | bfa_status_t bfa_port_enable(struct bfa_port_s *port, | ||
63 | bfa_port_endis_cbfn_t cbfn, void *cbarg); | ||
64 | bfa_status_t bfa_port_disable(struct bfa_port_s *port, | ||
65 | bfa_port_endis_cbfn_t cbfn, void *cbarg); | ||
66 | u32 bfa_port_meminfo(void); | ||
67 | void bfa_port_mem_claim(struct bfa_port_s *port, u8 *dma_kva, | ||
68 | u64 dma_pa); | ||
69 | |||
70 | #endif /* __BFA_PORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/cna/pstats/ethport_defs.h b/drivers/scsi/bfa/include/cna/pstats/ethport_defs.h deleted file mode 100644 index 1563ee512218..000000000000 --- a/drivers/scsi/bfa/include/cna/pstats/ethport_defs.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
9 | * published by the Free Software Foundation | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ETHPORT_DEFS_H__ | ||
18 | #define __ETHPORT_DEFS_H__ | ||
19 | |||
20 | struct bnad_drv_stats { | ||
21 | u64 netif_queue_stop; | ||
22 | u64 netif_queue_wakeup; | ||
23 | u64 tso4; | ||
24 | u64 tso6; | ||
25 | u64 tso_err; | ||
26 | u64 tcpcsum_offload; | ||
27 | u64 udpcsum_offload; | ||
28 | u64 csum_help; | ||
29 | u64 csum_help_err; | ||
30 | |||
31 | u64 hw_stats_updates; | ||
32 | u64 netif_rx_schedule; | ||
33 | u64 netif_rx_complete; | ||
34 | u64 netif_rx_dropped; | ||
35 | }; | ||
36 | #endif | ||
diff --git a/drivers/scsi/bfa/include/cna/pstats/phyport_defs.h b/drivers/scsi/bfa/include/cna/pstats/phyport_defs.h deleted file mode 100644 index eb7548030d0f..000000000000 --- a/drivers/scsi/bfa/include/cna/pstats/phyport_defs.h +++ /dev/null | |||
@@ -1,218 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
9 | * published by the Free Software Foundation | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __PHYPORT_DEFS_H__ | ||
18 | #define __PHYPORT_DEFS_H__ | ||
19 | |||
20 | #define BNA_TXF_ID_MAX 64 | ||
21 | #define BNA_RXF_ID_MAX 64 | ||
22 | |||
23 | /* | ||
24 | * Statistics | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * TxF Frame Statistics | ||
29 | */ | ||
30 | struct bna_stats_txf { | ||
31 | u64 ucast_octets; | ||
32 | u64 ucast; | ||
33 | u64 ucast_vlan; | ||
34 | |||
35 | u64 mcast_octets; | ||
36 | u64 mcast; | ||
37 | u64 mcast_vlan; | ||
38 | |||
39 | u64 bcast_octets; | ||
40 | u64 bcast; | ||
41 | u64 bcast_vlan; | ||
42 | |||
43 | u64 errors; | ||
44 | u64 filter_vlan; /* frames filtered due to VLAN */ | ||
45 | u64 filter_mac_sa; /* frames filtered due to SA check */ | ||
46 | }; | ||
47 | |||
48 | /* | ||
49 | * RxF Frame Statistics | ||
50 | */ | ||
51 | struct bna_stats_rxf { | ||
52 | u64 ucast_octets; | ||
53 | u64 ucast; | ||
54 | u64 ucast_vlan; | ||
55 | |||
56 | u64 mcast_octets; | ||
57 | u64 mcast; | ||
58 | u64 mcast_vlan; | ||
59 | |||
60 | u64 bcast_octets; | ||
61 | u64 bcast; | ||
62 | u64 bcast_vlan; | ||
63 | u64 frame_drops; | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * FC Tx Frame Statistics | ||
68 | */ | ||
69 | struct bna_stats_fc_tx { | ||
70 | u64 txf_ucast_octets; | ||
71 | u64 txf_ucast; | ||
72 | u64 txf_ucast_vlan; | ||
73 | |||
74 | u64 txf_mcast_octets; | ||
75 | u64 txf_mcast; | ||
76 | u64 txf_mcast_vlan; | ||
77 | |||
78 | u64 txf_bcast_octets; | ||
79 | u64 txf_bcast; | ||
80 | u64 txf_bcast_vlan; | ||
81 | |||
82 | u64 txf_parity_errors; | ||
83 | u64 txf_timeout; | ||
84 | u64 txf_fid_parity_errors; | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * FC Rx Frame Statistics | ||
89 | */ | ||
90 | struct bna_stats_fc_rx { | ||
91 | u64 rxf_ucast_octets; | ||
92 | u64 rxf_ucast; | ||
93 | u64 rxf_ucast_vlan; | ||
94 | |||
95 | u64 rxf_mcast_octets; | ||
96 | u64 rxf_mcast; | ||
97 | u64 rxf_mcast_vlan; | ||
98 | |||
99 | u64 rxf_bcast_octets; | ||
100 | u64 rxf_bcast; | ||
101 | u64 rxf_bcast_vlan; | ||
102 | }; | ||
103 | |||
104 | /* | ||
105 | * RAD Frame Statistics | ||
106 | */ | ||
107 | struct cna_stats_rad { | ||
108 | u64 rx_frames; | ||
109 | u64 rx_octets; | ||
110 | u64 rx_vlan_frames; | ||
111 | |||
112 | u64 rx_ucast; | ||
113 | u64 rx_ucast_octets; | ||
114 | u64 rx_ucast_vlan; | ||
115 | |||
116 | u64 rx_mcast; | ||
117 | u64 rx_mcast_octets; | ||
118 | u64 rx_mcast_vlan; | ||
119 | |||
120 | u64 rx_bcast; | ||
121 | u64 rx_bcast_octets; | ||
122 | u64 rx_bcast_vlan; | ||
123 | |||
124 | u64 rx_drops; | ||
125 | }; | ||
126 | |||
127 | /* | ||
128 | * BPC Tx Registers | ||
129 | */ | ||
130 | struct cna_stats_bpc_tx { | ||
131 | u64 tx_pause[8]; | ||
132 | u64 tx_zero_pause[8]; /* Pause cancellation */ | ||
133 | u64 tx_first_pause[8]; /* Pause initiation rather | ||
134 | *than retention */ | ||
135 | }; | ||
136 | |||
137 | /* | ||
138 | * BPC Rx Registers | ||
139 | */ | ||
140 | struct cna_stats_bpc_rx { | ||
141 | u64 rx_pause[8]; | ||
142 | u64 rx_zero_pause[8]; /* Pause cancellation */ | ||
143 | u64 rx_first_pause[8]; /* Pause initiation rather | ||
144 | *than retention */ | ||
145 | }; | ||
146 | |||
147 | /* | ||
148 | * MAC Rx Statistics | ||
149 | */ | ||
150 | struct cna_stats_mac_rx { | ||
151 | u64 frame_64; /* both rx and tx counter */ | ||
152 | u64 frame_65_127; /* both rx and tx counter */ | ||
153 | u64 frame_128_255; /* both rx and tx counter */ | ||
154 | u64 frame_256_511; /* both rx and tx counter */ | ||
155 | u64 frame_512_1023; /* both rx and tx counter */ | ||
156 | u64 frame_1024_1518; /* both rx and tx counter */ | ||
157 | u64 frame_1518_1522; /* both rx and tx counter */ | ||
158 | u64 rx_bytes; | ||
159 | u64 rx_packets; | ||
160 | u64 rx_fcs_error; | ||
161 | u64 rx_multicast; | ||
162 | u64 rx_broadcast; | ||
163 | u64 rx_control_frames; | ||
164 | u64 rx_pause; | ||
165 | u64 rx_unknown_opcode; | ||
166 | u64 rx_alignment_error; | ||
167 | u64 rx_frame_length_error; | ||
168 | u64 rx_code_error; | ||
169 | u64 rx_carrier_sense_error; | ||
170 | u64 rx_undersize; | ||
171 | u64 rx_oversize; | ||
172 | u64 rx_fragments; | ||
173 | u64 rx_jabber; | ||
174 | u64 rx_drop; | ||
175 | }; | ||
176 | |||
177 | /* | ||
178 | * MAC Tx Statistics | ||
179 | */ | ||
180 | struct cna_stats_mac_tx { | ||
181 | u64 tx_bytes; | ||
182 | u64 tx_packets; | ||
183 | u64 tx_multicast; | ||
184 | u64 tx_broadcast; | ||
185 | u64 tx_pause; | ||
186 | u64 tx_deferral; | ||
187 | u64 tx_excessive_deferral; | ||
188 | u64 tx_single_collision; | ||
189 | u64 tx_muliple_collision; | ||
190 | u64 tx_late_collision; | ||
191 | u64 tx_excessive_collision; | ||
192 | u64 tx_total_collision; | ||
193 | u64 tx_pause_honored; | ||
194 | u64 tx_drop; | ||
195 | u64 tx_jabber; | ||
196 | u64 tx_fcs_error; | ||
197 | u64 tx_control_frame; | ||
198 | u64 tx_oversize; | ||
199 | u64 tx_undersize; | ||
200 | u64 tx_fragments; | ||
201 | }; | ||
202 | |||
203 | /* | ||
204 | * Complete statistics | ||
205 | */ | ||
206 | struct bna_stats { | ||
207 | struct cna_stats_mac_rx mac_rx_stats; | ||
208 | struct cna_stats_bpc_rx bpc_rx_stats; | ||
209 | struct cna_stats_rad rad_stats; | ||
210 | struct bna_stats_fc_rx fc_rx_stats; | ||
211 | struct cna_stats_mac_tx mac_tx_stats; | ||
212 | struct cna_stats_bpc_tx bpc_tx_stats; | ||
213 | struct bna_stats_fc_tx fc_tx_stats; | ||
214 | struct bna_stats_rxf rxf_stats[BNA_TXF_ID_MAX]; | ||
215 | struct bna_stats_txf txf_stats[BNA_RXF_ID_MAX]; | ||
216 | }; | ||
217 | |||
218 | #endif | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_checksum.h b/drivers/scsi/bfa/include/cs/bfa_checksum.h deleted file mode 100644 index 650f8d0aaff9..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_checksum.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_checksum.h BFA checksum utilities | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_CHECKSUM_H__ | ||
23 | #define __BFA_CHECKSUM_H__ | ||
24 | |||
25 | static inline u32 | ||
26 | bfa_checksum_u32(u32 *buf, int sz) | ||
27 | { | ||
28 | int i, m = sz >> 2; | ||
29 | u32 sum = 0; | ||
30 | |||
31 | for (i = 0; i < m; i++) | ||
32 | sum ^= buf[i]; | ||
33 | |||
34 | return sum; | ||
35 | } | ||
36 | |||
37 | static inline u16 | ||
38 | bfa_checksum_u16(u16 *buf, int sz) | ||
39 | { | ||
40 | int i, m = sz >> 1; | ||
41 | u16 sum = 0; | ||
42 | |||
43 | for (i = 0; i < m; i++) | ||
44 | sum ^= buf[i]; | ||
45 | |||
46 | return sum; | ||
47 | } | ||
48 | |||
49 | static inline u8 | ||
50 | bfa_checksum_u8(u8 *buf, int sz) | ||
51 | { | ||
52 | int i; | ||
53 | u8 sum = 0; | ||
54 | |||
55 | for (i = 0; i < sz; i++) | ||
56 | sum ^= buf[i]; | ||
57 | |||
58 | return sum; | ||
59 | } | ||
60 | #endif | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_debug.h b/drivers/scsi/bfa/include/cs/bfa_debug.h deleted file mode 100644 index 75a911ea7936..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_debug.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_debug.h BFA debug interfaces | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_DEBUG_H__ | ||
23 | #define __BFA_DEBUG_H__ | ||
24 | |||
25 | #define bfa_assert(__cond) do { \ | ||
26 | if (!(__cond)) \ | ||
27 | bfa_panic(__LINE__, __FILE__, #__cond); \ | ||
28 | } while (0) | ||
29 | |||
30 | #define bfa_sm_fault(__mod, __event) do { \ | ||
31 | bfa_trc(__mod, (((uint32_t)0xDEAD << 16) | __event)); \ | ||
32 | bfa_sm_panic((__mod)->logm, __LINE__, __FILE__, __event); \ | ||
33 | } while (0) | ||
34 | |||
35 | #ifndef BFA_PERF_BUILD | ||
36 | #define bfa_assert_fp(__cond) bfa_assert(__cond) | ||
37 | #else | ||
38 | #define bfa_assert_fp(__cond) | ||
39 | #endif | ||
40 | |||
41 | struct bfa_log_mod_s; | ||
42 | void bfa_panic(int line, char *file, char *panicstr); | ||
43 | void bfa_sm_panic(struct bfa_log_mod_s *logm, int line, char *file, int event); | ||
44 | |||
45 | #endif /* __BFA_DEBUG_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_log.h b/drivers/scsi/bfa/include/cs/bfa_log.h deleted file mode 100644 index bc334e0a93fa..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_log.h +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_log.h BFA log library data structure and function definition | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_LOG_H__ | ||
23 | #define __BFA_LOG_H__ | ||
24 | |||
25 | #include <bfa_os_inc.h> | ||
26 | #include <defs/bfa_defs_status.h> | ||
27 | #include <defs/bfa_defs_aen.h> | ||
28 | |||
29 | /* | ||
30 | * BFA log module definition | ||
31 | * | ||
32 | * To create a new module id: | ||
33 | * Add a #define at the end of the list below. Select a value for your | ||
34 | * definition so that it is one (1) greater than the previous | ||
35 | * definition. Modify the definition of BFA_LOG_MODULE_ID_MAX to become | ||
36 | * your new definition. | ||
37 | * Should have no gaps in between the values because this is used in arrays. | ||
38 | * IMPORTANT: AEN_IDs must be at the begining, otherwise update bfa_defs_aen.h | ||
39 | */ | ||
40 | |||
41 | enum bfa_log_module_id { | ||
42 | BFA_LOG_UNUSED_ID = 0, | ||
43 | |||
44 | /* AEN defs begin */ | ||
45 | BFA_LOG_AEN_MIN = BFA_LOG_UNUSED_ID, | ||
46 | |||
47 | BFA_LOG_AEN_ID_ADAPTER = BFA_LOG_AEN_MIN + BFA_AEN_CAT_ADAPTER,/* 1 */ | ||
48 | BFA_LOG_AEN_ID_PORT = BFA_LOG_AEN_MIN + BFA_AEN_CAT_PORT, /* 2 */ | ||
49 | BFA_LOG_AEN_ID_LPORT = BFA_LOG_AEN_MIN + BFA_AEN_CAT_LPORT, /* 3 */ | ||
50 | BFA_LOG_AEN_ID_RPORT = BFA_LOG_AEN_MIN + BFA_AEN_CAT_RPORT, /* 4 */ | ||
51 | BFA_LOG_AEN_ID_ITNIM = BFA_LOG_AEN_MIN + BFA_AEN_CAT_ITNIM, /* 5 */ | ||
52 | BFA_LOG_AEN_ID_TIN = BFA_LOG_AEN_MIN + BFA_AEN_CAT_TIN, /* 6 */ | ||
53 | BFA_LOG_AEN_ID_IPFC = BFA_LOG_AEN_MIN + BFA_AEN_CAT_IPFC, /* 7 */ | ||
54 | BFA_LOG_AEN_ID_AUDIT = BFA_LOG_AEN_MIN + BFA_AEN_CAT_AUDIT, /* 8 */ | ||
55 | BFA_LOG_AEN_ID_IOC = BFA_LOG_AEN_MIN + BFA_AEN_CAT_IOC, /* 9 */ | ||
56 | BFA_LOG_AEN_ID_ETHPORT = BFA_LOG_AEN_MIN + BFA_AEN_CAT_ETHPORT,/* 10 */ | ||
57 | |||
58 | BFA_LOG_AEN_MAX = BFA_LOG_AEN_ID_ETHPORT, | ||
59 | /* AEN defs end */ | ||
60 | |||
61 | BFA_LOG_MODULE_ID_MIN = BFA_LOG_AEN_MAX, | ||
62 | |||
63 | BFA_LOG_FW_ID = BFA_LOG_MODULE_ID_MIN + 1, | ||
64 | BFA_LOG_HAL_ID = BFA_LOG_MODULE_ID_MIN + 2, | ||
65 | BFA_LOG_FCS_ID = BFA_LOG_MODULE_ID_MIN + 3, | ||
66 | BFA_LOG_WDRV_ID = BFA_LOG_MODULE_ID_MIN + 4, | ||
67 | BFA_LOG_LINUX_ID = BFA_LOG_MODULE_ID_MIN + 5, | ||
68 | BFA_LOG_SOLARIS_ID = BFA_LOG_MODULE_ID_MIN + 6, | ||
69 | |||
70 | BFA_LOG_MODULE_ID_MAX = BFA_LOG_SOLARIS_ID, | ||
71 | |||
72 | /* Not part of any arrays */ | ||
73 | BFA_LOG_MODULE_ID_ALL = BFA_LOG_MODULE_ID_MAX + 1, | ||
74 | BFA_LOG_AEN_ALL = BFA_LOG_MODULE_ID_MAX + 2, | ||
75 | BFA_LOG_DRV_ALL = BFA_LOG_MODULE_ID_MAX + 3, | ||
76 | }; | ||
77 | |||
78 | /* | ||
79 | * BFA log catalog name | ||
80 | */ | ||
81 | #define BFA_LOG_CAT_NAME "BFA" | ||
82 | |||
83 | /* | ||
84 | * bfa log severity values | ||
85 | */ | ||
86 | enum bfa_log_severity { | ||
87 | BFA_LOG_INVALID = 0, | ||
88 | BFA_LOG_CRITICAL = 1, | ||
89 | BFA_LOG_ERROR = 2, | ||
90 | BFA_LOG_WARNING = 3, | ||
91 | BFA_LOG_INFO = 4, | ||
92 | BFA_LOG_NONE = 5, | ||
93 | BFA_LOG_LEVEL_MAX = BFA_LOG_NONE | ||
94 | }; | ||
95 | |||
96 | #define BFA_LOG_MODID_OFFSET 16 | ||
97 | |||
98 | |||
99 | struct bfa_log_msgdef_s { | ||
100 | u32 msg_id; /* message id */ | ||
101 | int attributes; /* attributes */ | ||
102 | int severity; /* severity level */ | ||
103 | char *msg_value; | ||
104 | /* msg string */ | ||
105 | char *message; | ||
106 | /* msg format string */ | ||
107 | int arg_type; /* argument type */ | ||
108 | int arg_num; /* number of argument */ | ||
109 | }; | ||
110 | |||
111 | /* | ||
112 | * supported argument type | ||
113 | */ | ||
114 | enum bfa_log_arg_type { | ||
115 | BFA_LOG_S = 0, /* string */ | ||
116 | BFA_LOG_D, /* decimal */ | ||
117 | BFA_LOG_I, /* integer */ | ||
118 | BFA_LOG_O, /* oct number */ | ||
119 | BFA_LOG_U, /* unsigned integer */ | ||
120 | BFA_LOG_X, /* hex number */ | ||
121 | BFA_LOG_F, /* floating */ | ||
122 | BFA_LOG_C, /* character */ | ||
123 | BFA_LOG_L, /* double */ | ||
124 | BFA_LOG_P /* pointer */ | ||
125 | }; | ||
126 | |||
127 | #define BFA_LOG_ARG_TYPE 2 | ||
128 | #define BFA_LOG_ARG0 (0 * BFA_LOG_ARG_TYPE) | ||
129 | #define BFA_LOG_ARG1 (1 * BFA_LOG_ARG_TYPE) | ||
130 | #define BFA_LOG_ARG2 (2 * BFA_LOG_ARG_TYPE) | ||
131 | #define BFA_LOG_ARG3 (3 * BFA_LOG_ARG_TYPE) | ||
132 | |||
133 | #define BFA_LOG_GET_MOD_ID(msgid) ((msgid >> BFA_LOG_MODID_OFFSET) & 0xff) | ||
134 | #define BFA_LOG_GET_MSG_IDX(msgid) (msgid & 0xffff) | ||
135 | #define BFA_LOG_GET_MSG_ID(msgdef) ((msgdef)->msg_id) | ||
136 | #define BFA_LOG_GET_MSG_FMT_STRING(msgdef) ((msgdef)->message) | ||
137 | #define BFA_LOG_GET_SEVERITY(msgdef) ((msgdef)->severity) | ||
138 | |||
139 | /* | ||
140 | * Event attributes | ||
141 | */ | ||
142 | #define BFA_LOG_ATTR_NONE 0 | ||
143 | #define BFA_LOG_ATTR_AUDIT 1 | ||
144 | #define BFA_LOG_ATTR_LOG 2 | ||
145 | #define BFA_LOG_ATTR_FFDC 4 | ||
146 | |||
147 | #define BFA_LOG_CREATE_ID(msw, lsw) \ | ||
148 | (((u32)msw << BFA_LOG_MODID_OFFSET) | lsw) | ||
149 | |||
150 | struct bfa_log_mod_s; | ||
151 | |||
152 | /** | ||
153 | * callback function | ||
154 | */ | ||
155 | typedef void (*bfa_log_cb_t)(struct bfa_log_mod_s *log_mod, u32 msg_id, | ||
156 | const char *format, ...); | ||
157 | |||
158 | |||
159 | struct bfa_log_mod_s { | ||
160 | char instance_info[BFA_STRING_32]; /* instance info */ | ||
161 | int log_level[BFA_LOG_MODULE_ID_MAX + 1]; | ||
162 | /* log level for modules */ | ||
163 | bfa_log_cb_t cbfn; /* callback function */ | ||
164 | }; | ||
165 | |||
166 | extern int bfa_log_init(struct bfa_log_mod_s *log_mod, | ||
167 | char *instance_name, bfa_log_cb_t cbfn); | ||
168 | extern int bfa_log(struct bfa_log_mod_s *log_mod, u32 msg_id, ...); | ||
169 | extern bfa_status_t bfa_log_set_level(struct bfa_log_mod_s *log_mod, | ||
170 | int mod_id, enum bfa_log_severity log_level); | ||
171 | extern bfa_status_t bfa_log_set_level_all(struct bfa_log_mod_s *log_mod, | ||
172 | enum bfa_log_severity log_level); | ||
173 | extern bfa_status_t bfa_log_set_level_aen(struct bfa_log_mod_s *log_mod, | ||
174 | enum bfa_log_severity log_level); | ||
175 | extern enum bfa_log_severity bfa_log_get_level(struct bfa_log_mod_s *log_mod, | ||
176 | int mod_id); | ||
177 | extern enum bfa_log_severity bfa_log_get_msg_level( | ||
178 | struct bfa_log_mod_s *log_mod, u32 msg_id); | ||
179 | /* | ||
180 | * array of messages generated from xml files | ||
181 | */ | ||
182 | extern struct bfa_log_msgdef_s bfa_log_msg_array[]; | ||
183 | |||
184 | #endif | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_perf.h b/drivers/scsi/bfa/include/cs/bfa_perf.h deleted file mode 100644 index 45aa5f978ff5..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_perf.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFAD_PERF_H__ | ||
18 | #define __BFAD_PERF_H__ | ||
19 | |||
20 | #ifdef BFAD_PERF_BUILD | ||
21 | |||
22 | #undef bfa_trc | ||
23 | #undef bfa_trc32 | ||
24 | #undef bfa_assert | ||
25 | #undef BFA_TRC_FILE | ||
26 | |||
27 | #define bfa_trc(_trcp, _data) | ||
28 | #define bfa_trc32(_trcp, _data) | ||
29 | #define bfa_assert(__cond) | ||
30 | #define BFA_TRC_FILE(__mod, __submod) | ||
31 | |||
32 | #endif | ||
33 | |||
34 | #endif /* __BFAD_PERF_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_plog.h b/drivers/scsi/bfa/include/cs/bfa_plog.h deleted file mode 100644 index f5bef63b5877..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_plog.h +++ /dev/null | |||
@@ -1,167 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_PORTLOG_H__ | ||
18 | #define __BFA_PORTLOG_H__ | ||
19 | |||
20 | #include "protocol/fc.h" | ||
21 | #include <defs/bfa_defs_types.h> | ||
22 | |||
23 | #define BFA_PL_NLOG_ENTS 256 | ||
24 | #define BFA_PL_LOG_REC_INCR(_x) ((_x)++, (_x) %= BFA_PL_NLOG_ENTS) | ||
25 | |||
26 | #define BFA_PL_STRING_LOG_SZ 32 /* number of chars in string log */ | ||
27 | #define BFA_PL_INT_LOG_SZ 8 /* number of integers in the integer log */ | ||
28 | |||
29 | enum bfa_plog_log_type { | ||
30 | BFA_PL_LOG_TYPE_INVALID = 0, | ||
31 | BFA_PL_LOG_TYPE_INT = 1, | ||
32 | BFA_PL_LOG_TYPE_STRING = 2, | ||
33 | }; | ||
34 | |||
35 | /* | ||
36 | * the (fixed size) record format for each entry in the portlog | ||
37 | */ | ||
38 | struct bfa_plog_rec_s { | ||
39 | u32 tv; /* Filled by the portlog driver when the * | ||
40 | * entry is added to the circular log. */ | ||
41 | u8 port; /* Source port that logged this entry. CM | ||
42 | * entities will use 0xFF */ | ||
43 | u8 mid; /* Integer value to be used by all entities * | ||
44 | * while logging. The module id to string * | ||
45 | * conversion will be done by BFAL. See | ||
46 | * enum bfa_plog_mid */ | ||
47 | u8 eid; /* indicates Rx, Tx, IOCTL, etc. See | ||
48 | * enum bfa_plog_eid */ | ||
49 | u8 log_type; /* indicates string log or integer log. | ||
50 | * see bfa_plog_log_type_t */ | ||
51 | u8 log_num_ints; | ||
52 | /* | ||
53 | * interpreted only if log_type is INT_LOG. indicates number of | ||
54 | * integers in the int_log[] (0-PL_INT_LOG_SZ). | ||
55 | */ | ||
56 | u8 rsvd; | ||
57 | u16 misc; /* can be used to indicate fc frame length, | ||
58 | *etc.. */ | ||
59 | union { | ||
60 | char string_log[BFA_PL_STRING_LOG_SZ]; | ||
61 | u32 int_log[BFA_PL_INT_LOG_SZ]; | ||
62 | } log_entry; | ||
63 | |||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * the following #defines will be used by the logging entities to indicate | ||
68 | * their module id. BFAL will convert the integer value to string format | ||
69 | * | ||
70 | * process to be used while changing the following #defines: | ||
71 | * - Always add new entries at the end | ||
72 | * - define corresponding string in BFAL | ||
73 | * - Do not remove any entry or rearrange the order. | ||
74 | */ | ||
75 | enum bfa_plog_mid { | ||
76 | BFA_PL_MID_INVALID = 0, | ||
77 | BFA_PL_MID_DEBUG = 1, | ||
78 | BFA_PL_MID_DRVR = 2, | ||
79 | BFA_PL_MID_HAL = 3, | ||
80 | BFA_PL_MID_HAL_FCXP = 4, | ||
81 | BFA_PL_MID_HAL_UF = 5, | ||
82 | BFA_PL_MID_FCS = 6, | ||
83 | BFA_PL_MID_LPS = 7, | ||
84 | BFA_PL_MID_MAX = 8 | ||
85 | }; | ||
86 | |||
87 | #define BFA_PL_MID_STRLEN 8 | ||
88 | struct bfa_plog_mid_strings_s { | ||
89 | char m_str[BFA_PL_MID_STRLEN]; | ||
90 | }; | ||
91 | |||
92 | /* | ||
93 | * the following #defines will be used by the logging entities to indicate | ||
94 | * their event type. BFAL will convert the integer value to string format | ||
95 | * | ||
96 | * process to be used while changing the following #defines: | ||
97 | * - Always add new entries at the end | ||
98 | * - define corresponding string in BFAL | ||
99 | * - Do not remove any entry or rearrange the order. | ||
100 | */ | ||
101 | enum bfa_plog_eid { | ||
102 | BFA_PL_EID_INVALID = 0, | ||
103 | BFA_PL_EID_IOC_DISABLE = 1, | ||
104 | BFA_PL_EID_IOC_ENABLE = 2, | ||
105 | BFA_PL_EID_PORT_DISABLE = 3, | ||
106 | BFA_PL_EID_PORT_ENABLE = 4, | ||
107 | BFA_PL_EID_PORT_ST_CHANGE = 5, | ||
108 | BFA_PL_EID_TX = 6, | ||
109 | BFA_PL_EID_TX_ACK1 = 7, | ||
110 | BFA_PL_EID_TX_RJT = 8, | ||
111 | BFA_PL_EID_TX_BSY = 9, | ||
112 | BFA_PL_EID_RX = 10, | ||
113 | BFA_PL_EID_RX_ACK1 = 11, | ||
114 | BFA_PL_EID_RX_RJT = 12, | ||
115 | BFA_PL_EID_RX_BSY = 13, | ||
116 | BFA_PL_EID_CT_IN = 14, | ||
117 | BFA_PL_EID_CT_OUT = 15, | ||
118 | BFA_PL_EID_DRIVER_START = 16, | ||
119 | BFA_PL_EID_RSCN = 17, | ||
120 | BFA_PL_EID_DEBUG = 18, | ||
121 | BFA_PL_EID_MISC = 19, | ||
122 | BFA_PL_EID_FIP_FCF_DISC = 20, | ||
123 | BFA_PL_EID_FIP_FCF_CVL = 21, | ||
124 | BFA_PL_EID_LOGIN = 22, | ||
125 | BFA_PL_EID_LOGO = 23, | ||
126 | BFA_PL_EID_MAX = 24 | ||
127 | }; | ||
128 | |||
129 | #define BFA_PL_ENAME_STRLEN 8 | ||
130 | struct bfa_plog_eid_strings_s { | ||
131 | char e_str[BFA_PL_ENAME_STRLEN]; | ||
132 | }; | ||
133 | |||
134 | #define BFA_PL_SIG_LEN 8 | ||
135 | #define BFA_PL_SIG_STR "12pl123" | ||
136 | |||
137 | /* | ||
138 | * per port circular log buffer | ||
139 | */ | ||
140 | struct bfa_plog_s { | ||
141 | char plog_sig[BFA_PL_SIG_LEN]; /* Start signature */ | ||
142 | u8 plog_enabled; | ||
143 | u8 rsvd[7]; | ||
144 | u32 ticks; | ||
145 | u16 head; | ||
146 | u16 tail; | ||
147 | struct bfa_plog_rec_s plog_recs[BFA_PL_NLOG_ENTS]; | ||
148 | }; | ||
149 | |||
150 | void bfa_plog_init(struct bfa_plog_s *plog); | ||
151 | void bfa_plog_str(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | ||
152 | enum bfa_plog_eid event, u16 misc, char *log_str); | ||
153 | void bfa_plog_intarr(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | ||
154 | enum bfa_plog_eid event, u16 misc, | ||
155 | u32 *intarr, u32 num_ints); | ||
156 | void bfa_plog_fchdr(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | ||
157 | enum bfa_plog_eid event, u16 misc, | ||
158 | struct fchs_s *fchdr); | ||
159 | void bfa_plog_fchdr_and_pl(struct bfa_plog_s *plog, enum bfa_plog_mid mid, | ||
160 | enum bfa_plog_eid event, u16 misc, | ||
161 | struct fchs_s *fchdr, u32 pld_w0); | ||
162 | void bfa_plog_clear(struct bfa_plog_s *plog); | ||
163 | void bfa_plog_enable(struct bfa_plog_s *plog); | ||
164 | void bfa_plog_disable(struct bfa_plog_s *plog); | ||
165 | bfa_boolean_t bfa_plog_get_setting(struct bfa_plog_s *plog); | ||
166 | |||
167 | #endif /* __BFA_PORTLOG_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_q.h b/drivers/scsi/bfa/include/cs/bfa_q.h deleted file mode 100644 index ea895facedbc..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_q.h +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_q.h Circular queue definitions. | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_Q_H__ | ||
23 | #define __BFA_Q_H__ | ||
24 | |||
25 | #define bfa_q_first(_q) ((void *)(((struct list_head *) (_q))->next)) | ||
26 | #define bfa_q_next(_qe) (((struct list_head *) (_qe))->next) | ||
27 | #define bfa_q_prev(_qe) (((struct list_head *) (_qe))->prev) | ||
28 | |||
29 | /* | ||
30 | * bfa_q_qe_init - to initialize a queue element | ||
31 | */ | ||
32 | #define bfa_q_qe_init(_qe) { \ | ||
33 | bfa_q_next(_qe) = (struct list_head *) NULL; \ | ||
34 | bfa_q_prev(_qe) = (struct list_head *) NULL; \ | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | * bfa_q_deq - dequeue an element from head of the queue | ||
39 | */ | ||
40 | #define bfa_q_deq(_q, _qe) { \ | ||
41 | if (!list_empty(_q)) { \ | ||
42 | (*((struct list_head **) (_qe))) = bfa_q_next(_q); \ | ||
43 | bfa_q_prev(bfa_q_next(*((struct list_head **) _qe))) = \ | ||
44 | (struct list_head *) (_q); \ | ||
45 | bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe)); \ | ||
46 | BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \ | ||
47 | } else { \ | ||
48 | *((struct list_head **) (_qe)) = (struct list_head *) NULL; \ | ||
49 | } \ | ||
50 | } | ||
51 | |||
52 | /* | ||
53 | * bfa_q_deq_tail - dequeue an element from tail of the queue | ||
54 | */ | ||
55 | #define bfa_q_deq_tail(_q, _qe) { \ | ||
56 | if (!list_empty(_q)) { \ | ||
57 | *((struct list_head **) (_qe)) = bfa_q_prev(_q); \ | ||
58 | bfa_q_next(bfa_q_prev(*((struct list_head **) _qe))) = \ | ||
59 | (struct list_head *) (_q); \ | ||
60 | bfa_q_prev(_q) = bfa_q_prev(*(struct list_head **) _qe); \ | ||
61 | BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \ | ||
62 | } else { \ | ||
63 | *((struct list_head **) (_qe)) = (struct list_head *) NULL; \ | ||
64 | } \ | ||
65 | } | ||
66 | |||
67 | /* | ||
68 | * #ifdef BFA_DEBUG (Using bfa_assert to check for debug_build is not | ||
69 | * consistent across modules) | ||
70 | */ | ||
71 | #ifndef BFA_PERF_BUILD | ||
72 | #define BFA_Q_DBG_INIT(_qe) bfa_q_qe_init(_qe) | ||
73 | #else | ||
74 | #define BFA_Q_DBG_INIT(_qe) | ||
75 | #endif | ||
76 | |||
77 | #define bfa_q_is_on_q(_q, _qe) \ | ||
78 | bfa_q_is_on_q_func(_q, (struct list_head *)(_qe)) | ||
79 | extern int bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe); | ||
80 | |||
81 | #endif | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_sm.h b/drivers/scsi/bfa/include/cs/bfa_sm.h deleted file mode 100644 index 11fba9082f05..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_sm.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfasm.h State machine defines | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_SM_H__ | ||
23 | #define __BFA_SM_H__ | ||
24 | |||
25 | typedef void (*bfa_sm_t)(void *sm, int event); | ||
26 | /** | ||
27 | * oc - object class eg. bfa_ioc | ||
28 | * st - state, eg. reset | ||
29 | * otype - object type, eg. struct bfa_ioc_s | ||
30 | * etype - object type, eg. enum ioc_event | ||
31 | */ | ||
32 | #define bfa_sm_state_decl(oc, st, otype, etype) \ | ||
33 | static void oc ## _sm_ ## st(otype * fsm, etype event) | ||
34 | |||
35 | #define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (bfa_sm_t)(_state)) | ||
36 | #define bfa_sm_send_event(_sm, _event) ((_sm)->sm((_sm), (_event))) | ||
37 | #define bfa_sm_get_state(_sm) ((_sm)->sm) | ||
38 | #define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (bfa_sm_t)(_state)) | ||
39 | |||
40 | /** | ||
41 | * For converting from state machine function to state encoding. | ||
42 | */ | ||
43 | struct bfa_sm_table_s { | ||
44 | bfa_sm_t sm; /* state machine function */ | ||
45 | int state; /* state machine encoding */ | ||
46 | char *name; /* state name for display */ | ||
47 | }; | ||
48 | #define BFA_SM(_sm) ((bfa_sm_t)(_sm)) | ||
49 | |||
50 | int bfa_sm_to_state(struct bfa_sm_table_s *smt, bfa_sm_t sm); | ||
51 | |||
52 | /** | ||
53 | * State machine with entry actions. | ||
54 | */ | ||
55 | typedef void (*bfa_fsm_t)(void *fsm, int event); | ||
56 | |||
57 | /** | ||
58 | * oc - object class eg. bfa_ioc | ||
59 | * st - state, eg. reset | ||
60 | * otype - object type, eg. struct bfa_ioc_s | ||
61 | * etype - object type, eg. enum ioc_event | ||
62 | */ | ||
63 | #define bfa_fsm_state_decl(oc, st, otype, etype) \ | ||
64 | static void oc ## _sm_ ## st(otype * fsm, etype event); \ | ||
65 | static void oc ## _sm_ ## st ## _entry(otype * fsm) | ||
66 | |||
67 | #define bfa_fsm_set_state(_fsm, _state) do { \ | ||
68 | (_fsm)->fsm = (bfa_fsm_t)(_state); \ | ||
69 | _state ## _entry(_fsm); \ | ||
70 | } while (0) | ||
71 | |||
72 | #define bfa_fsm_send_event(_fsm, _event) \ | ||
73 | ((_fsm)->fsm((_fsm), (_event))) | ||
74 | #define bfa_fsm_cmp_state(_fsm, _state) \ | ||
75 | ((_fsm)->fsm == (bfa_fsm_t)(_state)) | ||
76 | |||
77 | #endif | ||
diff --git a/drivers/scsi/bfa/include/cs/bfa_trc.h b/drivers/scsi/bfa/include/cs/bfa_trc.h deleted file mode 100644 index 310771c888e7..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_trc.h +++ /dev/null | |||
@@ -1,176 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_TRC_H__ | ||
18 | #define __BFA_TRC_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | |||
22 | #ifndef BFA_TRC_MAX | ||
23 | #define BFA_TRC_MAX (4 * 1024) | ||
24 | #endif | ||
25 | |||
26 | #ifndef BFA_TRC_TS | ||
27 | #define BFA_TRC_TS(_trcm) ((_trcm)->ticks++) | ||
28 | #endif | ||
29 | |||
30 | struct bfa_trc_s { | ||
31 | #ifdef __BIGENDIAN | ||
32 | u16 fileno; | ||
33 | u16 line; | ||
34 | #else | ||
35 | u16 line; | ||
36 | u16 fileno; | ||
37 | #endif | ||
38 | u32 timestamp; | ||
39 | union { | ||
40 | struct { | ||
41 | u32 rsvd; | ||
42 | u32 u32; | ||
43 | } u32; | ||
44 | u64 u64; | ||
45 | } data; | ||
46 | }; | ||
47 | |||
48 | |||
49 | struct bfa_trc_mod_s { | ||
50 | u32 head; | ||
51 | u32 tail; | ||
52 | u32 ntrc; | ||
53 | u32 stopped; | ||
54 | u32 ticks; | ||
55 | u32 rsvd[3]; | ||
56 | struct bfa_trc_s trc[BFA_TRC_MAX]; | ||
57 | }; | ||
58 | |||
59 | |||
60 | enum { | ||
61 | BFA_TRC_FW = 1, /* firmware modules */ | ||
62 | BFA_TRC_HAL = 2, /* BFA modules */ | ||
63 | BFA_TRC_FCS = 3, /* BFA FCS modules */ | ||
64 | BFA_TRC_LDRV = 4, /* Linux driver modules */ | ||
65 | BFA_TRC_SDRV = 5, /* Solaris driver modules */ | ||
66 | BFA_TRC_VDRV = 6, /* vmware driver modules */ | ||
67 | BFA_TRC_WDRV = 7, /* windows driver modules */ | ||
68 | BFA_TRC_AEN = 8, /* AEN module */ | ||
69 | BFA_TRC_BIOS = 9, /* bios driver modules */ | ||
70 | BFA_TRC_EFI = 10, /* EFI driver modules */ | ||
71 | BNA_TRC_WDRV = 11, /* BNA windows driver modules */ | ||
72 | BNA_TRC_VDRV = 12, /* BNA vmware driver modules */ | ||
73 | BNA_TRC_SDRV = 13, /* BNA Solaris driver modules */ | ||
74 | BNA_TRC_LDRV = 14, /* BNA Linux driver modules */ | ||
75 | BNA_TRC_HAL = 15, /* BNA modules */ | ||
76 | BFA_TRC_CNA = 16, /* Common modules */ | ||
77 | BNA_TRC_IMDRV = 17 /* BNA windows intermediate driver modules */ | ||
78 | }; | ||
79 | #define BFA_TRC_MOD_SH 10 | ||
80 | #define BFA_TRC_MOD(__mod) ((BFA_TRC_ ## __mod) << BFA_TRC_MOD_SH) | ||
81 | |||
82 | /** | ||
83 | * Define a new tracing file (module). Module should match one defined above. | ||
84 | */ | ||
85 | #define BFA_TRC_FILE(__mod, __submod) \ | ||
86 | static int __trc_fileno = ((BFA_TRC_ ## __mod ## _ ## __submod) | \ | ||
87 | BFA_TRC_MOD(__mod)) | ||
88 | |||
89 | |||
90 | #define bfa_trc32(_trcp, _data) \ | ||
91 | __bfa_trc((_trcp)->trcmod, __trc_fileno, __LINE__, (u32)_data) | ||
92 | |||
93 | |||
94 | #ifndef BFA_BOOT_BUILD | ||
95 | #define bfa_trc(_trcp, _data) \ | ||
96 | __bfa_trc((_trcp)->trcmod, __trc_fileno, __LINE__, (u64)_data) | ||
97 | #else | ||
98 | void bfa_boot_trc(struct bfa_trc_mod_s *trcmod, u16 fileno, | ||
99 | u16 line, u32 data); | ||
100 | #define bfa_trc(_trcp, _data) \ | ||
101 | bfa_boot_trc((_trcp)->trcmod, __trc_fileno, __LINE__, (u32)_data) | ||
102 | #endif | ||
103 | |||
104 | |||
105 | static inline void | ||
106 | bfa_trc_init(struct bfa_trc_mod_s *trcm) | ||
107 | { | ||
108 | trcm->head = trcm->tail = trcm->stopped = 0; | ||
109 | trcm->ntrc = BFA_TRC_MAX; | ||
110 | } | ||
111 | |||
112 | |||
113 | static inline void | ||
114 | bfa_trc_stop(struct bfa_trc_mod_s *trcm) | ||
115 | { | ||
116 | trcm->stopped = 1; | ||
117 | } | ||
118 | |||
119 | #ifdef FWTRC | ||
120 | extern void dc_flush(void *data); | ||
121 | #else | ||
122 | #define dc_flush(data) | ||
123 | #endif | ||
124 | |||
125 | |||
126 | static inline void | ||
127 | __bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data) | ||
128 | { | ||
129 | int tail = trcm->tail; | ||
130 | struct bfa_trc_s *trc = &trcm->trc[tail]; | ||
131 | |||
132 | if (trcm->stopped) | ||
133 | return; | ||
134 | |||
135 | trc->fileno = (u16) fileno; | ||
136 | trc->line = (u16) line; | ||
137 | trc->data.u64 = data; | ||
138 | trc->timestamp = BFA_TRC_TS(trcm); | ||
139 | dc_flush(trc); | ||
140 | |||
141 | trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); | ||
142 | if (trcm->tail == trcm->head) | ||
143 | trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1); | ||
144 | dc_flush(trcm); | ||
145 | } | ||
146 | |||
147 | |||
148 | static inline void | ||
149 | __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data) | ||
150 | { | ||
151 | int tail = trcm->tail; | ||
152 | struct bfa_trc_s *trc = &trcm->trc[tail]; | ||
153 | |||
154 | if (trcm->stopped) | ||
155 | return; | ||
156 | |||
157 | trc->fileno = (u16) fileno; | ||
158 | trc->line = (u16) line; | ||
159 | trc->data.u32.u32 = data; | ||
160 | trc->timestamp = BFA_TRC_TS(trcm); | ||
161 | dc_flush(trc); | ||
162 | |||
163 | trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); | ||
164 | if (trcm->tail == trcm->head) | ||
165 | trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1); | ||
166 | dc_flush(trcm); | ||
167 | } | ||
168 | |||
169 | #ifndef BFA_PERF_BUILD | ||
170 | #define bfa_trc_fp(_trcp, _data) bfa_trc(_trcp, _data) | ||
171 | #else | ||
172 | #define bfa_trc_fp(_trcp, _data) | ||
173 | #endif | ||
174 | |||
175 | #endif /* __BFA_TRC_H__ */ | ||
176 | |||
diff --git a/drivers/scsi/bfa/include/cs/bfa_wc.h b/drivers/scsi/bfa/include/cs/bfa_wc.h deleted file mode 100644 index 0460bd4fc7c4..000000000000 --- a/drivers/scsi/bfa/include/cs/bfa_wc.h +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_wc.h Generic wait counter. | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_WC_H__ | ||
23 | #define __BFA_WC_H__ | ||
24 | |||
25 | typedef void (*bfa_wc_resume_t) (void *cbarg); | ||
26 | |||
27 | struct bfa_wc_s { | ||
28 | bfa_wc_resume_t wc_resume; | ||
29 | void *wc_cbarg; | ||
30 | int wc_count; | ||
31 | }; | ||
32 | |||
33 | static inline void | ||
34 | bfa_wc_up(struct bfa_wc_s *wc) | ||
35 | { | ||
36 | wc->wc_count++; | ||
37 | } | ||
38 | |||
39 | static inline void | ||
40 | bfa_wc_down(struct bfa_wc_s *wc) | ||
41 | { | ||
42 | wc->wc_count--; | ||
43 | if (wc->wc_count == 0) | ||
44 | wc->wc_resume(wc->wc_cbarg); | ||
45 | } | ||
46 | |||
47 | /** | ||
48 | * Initialize a waiting counter. | ||
49 | */ | ||
50 | static inline void | ||
51 | bfa_wc_init(struct bfa_wc_s *wc, bfa_wc_resume_t wc_resume, void *wc_cbarg) | ||
52 | { | ||
53 | wc->wc_resume = wc_resume; | ||
54 | wc->wc_cbarg = wc_cbarg; | ||
55 | wc->wc_count = 0; | ||
56 | bfa_wc_up(wc); | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * Wait for counter to reach zero | ||
61 | */ | ||
62 | static inline void | ||
63 | bfa_wc_wait(struct bfa_wc_s *wc) | ||
64 | { | ||
65 | bfa_wc_down(wc); | ||
66 | } | ||
67 | |||
68 | #endif | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h b/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h deleted file mode 100644 index aea0360d67d5..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_ADAPTER_H__ | ||
18 | #define __BFA_DEFS_ADAPTER_H__ | ||
19 | |||
20 | #include <protocol/types.h> | ||
21 | #include <defs/bfa_defs_version.h> | ||
22 | #include <defs/bfa_defs_mfg.h> | ||
23 | |||
24 | /** | ||
25 | * BFA adapter level attributes. | ||
26 | */ | ||
27 | enum { | ||
28 | BFA_ADAPTER_SERIAL_NUM_LEN = STRSZ(BFA_MFG_SERIALNUM_SIZE), | ||
29 | /* | ||
30 | *!< adapter serial num length | ||
31 | */ | ||
32 | BFA_ADAPTER_MODEL_NAME_LEN = 16, /* model name length */ | ||
33 | BFA_ADAPTER_MODEL_DESCR_LEN = 128, /* model description length */ | ||
34 | BFA_ADAPTER_MFG_NAME_LEN = 8, /* manufacturer name length */ | ||
35 | BFA_ADAPTER_SYM_NAME_LEN = 64, /* adapter symbolic name length */ | ||
36 | BFA_ADAPTER_OS_TYPE_LEN = 64, /* adapter os type length */ | ||
37 | }; | ||
38 | |||
39 | struct bfa_adapter_attr_s { | ||
40 | char manufacturer[BFA_ADAPTER_MFG_NAME_LEN]; | ||
41 | char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN]; | ||
42 | u32 card_type; | ||
43 | char model[BFA_ADAPTER_MODEL_NAME_LEN]; | ||
44 | char model_descr[BFA_ADAPTER_MODEL_DESCR_LEN]; | ||
45 | wwn_t pwwn; | ||
46 | char node_symname[FC_SYMNAME_MAX]; | ||
47 | char hw_ver[BFA_VERSION_LEN]; | ||
48 | char fw_ver[BFA_VERSION_LEN]; | ||
49 | char optrom_ver[BFA_VERSION_LEN]; | ||
50 | char os_type[BFA_ADAPTER_OS_TYPE_LEN]; | ||
51 | struct bfa_mfg_vpd_s vpd; | ||
52 | struct mac_s mac; | ||
53 | |||
54 | u8 nports; | ||
55 | u8 max_speed; | ||
56 | u8 prototype; | ||
57 | char asic_rev; | ||
58 | |||
59 | u8 pcie_gen; | ||
60 | u8 pcie_lanes_orig; | ||
61 | u8 pcie_lanes; | ||
62 | u8 cna_capable; | ||
63 | u8 is_mezz; | ||
64 | }; | ||
65 | |||
66 | /** | ||
67 | * BFA adapter level events | ||
68 | * Arguments below are in BFAL context from Mgmt | ||
69 | * BFA_PORT_AEN_ADD: [in]: None [out]: serial_num, pwwn, nports | ||
70 | * BFA_PORT_AEN_REMOVE: [in]: pwwn [out]: serial_num, pwwn, nports | ||
71 | */ | ||
72 | enum bfa_adapter_aen_event { | ||
73 | BFA_ADAPTER_AEN_ADD = 1, /* New Adapter found event */ | ||
74 | BFA_ADAPTER_AEN_REMOVE = 2, /* Adapter removed event */ | ||
75 | }; | ||
76 | |||
77 | struct bfa_adapter_aen_data_s { | ||
78 | char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN]; | ||
79 | u32 nports; /* Number of NPorts */ | ||
80 | wwn_t pwwn; /* WWN of one of its physical port */ | ||
81 | }; | ||
82 | |||
83 | #endif /* __BFA_DEFS_ADAPTER_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_aen.h b/drivers/scsi/bfa/include/defs/bfa_defs_aen.h deleted file mode 100644 index 35244698fcdc..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_aen.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_AEN_H__ | ||
19 | #define __BFA_DEFS_AEN_H__ | ||
20 | |||
21 | #include <defs/bfa_defs_types.h> | ||
22 | #include <defs/bfa_defs_ioc.h> | ||
23 | #include <defs/bfa_defs_adapter.h> | ||
24 | #include <defs/bfa_defs_port.h> | ||
25 | #include <defs/bfa_defs_lport.h> | ||
26 | #include <defs/bfa_defs_rport.h> | ||
27 | #include <defs/bfa_defs_itnim.h> | ||
28 | #include <defs/bfa_defs_tin.h> | ||
29 | #include <defs/bfa_defs_ipfc.h> | ||
30 | #include <defs/bfa_defs_audit.h> | ||
31 | #include <defs/bfa_defs_ethport.h> | ||
32 | |||
33 | #define BFA_AEN_MAX_APP 5 | ||
34 | |||
35 | enum bfa_aen_app { | ||
36 | bfa_aen_app_bcu = 0, /* No thread for bcu */ | ||
37 | bfa_aen_app_hcm = 1, | ||
38 | bfa_aen_app_cim = 2, | ||
39 | bfa_aen_app_snia = 3, | ||
40 | bfa_aen_app_test = 4, /* To be removed after unit test */ | ||
41 | }; | ||
42 | |||
43 | enum bfa_aen_category { | ||
44 | BFA_AEN_CAT_ADAPTER = 1, | ||
45 | BFA_AEN_CAT_PORT = 2, | ||
46 | BFA_AEN_CAT_LPORT = 3, | ||
47 | BFA_AEN_CAT_RPORT = 4, | ||
48 | BFA_AEN_CAT_ITNIM = 5, | ||
49 | BFA_AEN_CAT_TIN = 6, | ||
50 | BFA_AEN_CAT_IPFC = 7, | ||
51 | BFA_AEN_CAT_AUDIT = 8, | ||
52 | BFA_AEN_CAT_IOC = 9, | ||
53 | BFA_AEN_CAT_ETHPORT = 10, | ||
54 | BFA_AEN_MAX_CAT = 10 | ||
55 | }; | ||
56 | |||
57 | #pragma pack(1) | ||
58 | union bfa_aen_data_u { | ||
59 | struct bfa_adapter_aen_data_s adapter; | ||
60 | struct bfa_port_aen_data_s port; | ||
61 | struct bfa_lport_aen_data_s lport; | ||
62 | struct bfa_rport_aen_data_s rport; | ||
63 | struct bfa_itnim_aen_data_s itnim; | ||
64 | struct bfa_audit_aen_data_s audit; | ||
65 | struct bfa_ioc_aen_data_s ioc; | ||
66 | struct bfa_ethport_aen_data_s ethport; | ||
67 | }; | ||
68 | |||
69 | struct bfa_aen_entry_s { | ||
70 | enum bfa_aen_category aen_category; | ||
71 | int aen_type; | ||
72 | union bfa_aen_data_u aen_data; | ||
73 | struct bfa_timeval_s aen_tv; | ||
74 | s32 seq_num; | ||
75 | s32 bfad_num; | ||
76 | s32 rsvd[1]; | ||
77 | }; | ||
78 | |||
79 | #pragma pack() | ||
80 | |||
81 | #define bfa_aen_event_t int | ||
82 | |||
83 | #endif /* __BFA_DEFS_AEN_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_audit.h b/drivers/scsi/bfa/include/defs/bfa_defs_audit.h deleted file mode 100644 index 8e3a962bf20c..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_audit.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_AUDIT_H__ | ||
19 | #define __BFA_DEFS_AUDIT_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | |||
23 | /** | ||
24 | * BFA audit events | ||
25 | */ | ||
26 | enum bfa_audit_aen_event { | ||
27 | BFA_AUDIT_AEN_AUTH_ENABLE = 1, | ||
28 | BFA_AUDIT_AEN_AUTH_DISABLE = 2, | ||
29 | }; | ||
30 | |||
31 | /** | ||
32 | * audit event data | ||
33 | */ | ||
34 | struct bfa_audit_aen_data_s { | ||
35 | wwn_t pwwn; | ||
36 | }; | ||
37 | |||
38 | #endif /* __BFA_DEFS_AUDIT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_auth.h b/drivers/scsi/bfa/include/defs/bfa_defs_auth.h deleted file mode 100644 index f56ed871bb99..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_auth.h +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_AUTH_H__ | ||
18 | #define __BFA_DEFS_AUTH_H__ | ||
19 | |||
20 | #include <defs/bfa_defs_types.h> | ||
21 | |||
22 | #define PUBLIC_KEY 15409 | ||
23 | #define PRIVATE_KEY 19009 | ||
24 | #define KEY_LEN 32399 | ||
25 | #define BFA_AUTH_SECRET_STRING_LEN 256 | ||
26 | #define BFA_AUTH_FAIL_NO_PASSWORD 0xFE | ||
27 | #define BFA_AUTH_FAIL_TIMEOUT 0xFF | ||
28 | |||
29 | /** | ||
30 | * Authentication status | ||
31 | */ | ||
32 | enum bfa_auth_status { | ||
33 | BFA_AUTH_STATUS_NONE = 0, /* no authentication */ | ||
34 | BFA_AUTH_UNINIT = 1, /* state - uninit */ | ||
35 | BFA_AUTH_NEG_SEND = 2, /* state - negotiate send */ | ||
36 | BFA_AUTH_CHAL_WAIT = 3, /* state - challenge wait */ | ||
37 | BFA_AUTH_NEG_RETRY = 4, /* state - negotiate retry */ | ||
38 | BFA_AUTH_REPLY_SEND = 5, /* state - reply send */ | ||
39 | BFA_AUTH_STATUS_WAIT = 6, /* state - status wait */ | ||
40 | BFA_AUTH_SUCCESS = 7, /* state - success */ | ||
41 | BFA_AUTH_FAILED = 8, /* state - failed */ | ||
42 | BFA_AUTH_STATUS_UNKNOWN = 9, /* authentication status unknown */ | ||
43 | }; | ||
44 | |||
45 | enum bfa_auth_rej_code { | ||
46 | BFA_AUTH_RJT_CODE_AUTH_FAILURE = 1, /* auth failure */ | ||
47 | BFA_AUTH_RJT_CODE_LOGICAL_ERR = 2, /* logical error */ | ||
48 | }; | ||
49 | |||
50 | /** | ||
51 | * Authentication reject codes | ||
52 | */ | ||
53 | enum bfa_auth_rej_code_exp { | ||
54 | BFA_AUTH_MECH_NOT_USABLE = 1, /* auth. mechanism not usable */ | ||
55 | BFA_AUTH_DH_GROUP_NOT_USABLE = 2, /* DH Group not usable */ | ||
56 | BFA_AUTH_HASH_FUNC_NOT_USABLE = 3, /* hash Function not usable */ | ||
57 | BFA_AUTH_AUTH_XACT_STARTED = 4, /* auth xact started */ | ||
58 | BFA_AUTH_AUTH_FAILED = 5, /* auth failed */ | ||
59 | BFA_AUTH_INCORRECT_PLD = 6, /* incorrect payload */ | ||
60 | BFA_AUTH_INCORRECT_PROTO_MSG = 7, /* incorrect proto msg */ | ||
61 | BFA_AUTH_RESTART_AUTH_PROTO = 8, /* restart auth protocol */ | ||
62 | BFA_AUTH_AUTH_CONCAT_NOT_SUPP = 9, /* auth concat not supported */ | ||
63 | BFA_AUTH_PROTO_VER_NOT_SUPP = 10,/* proto version not supported */ | ||
64 | }; | ||
65 | |||
66 | struct auth_proto_stats_s { | ||
67 | u32 auth_rjts; | ||
68 | u32 auth_negs; | ||
69 | u32 auth_dones; | ||
70 | |||
71 | u32 dhchap_challenges; | ||
72 | u32 dhchap_replies; | ||
73 | u32 dhchap_successes; | ||
74 | }; | ||
75 | |||
76 | /** | ||
77 | * Authentication related statistics | ||
78 | */ | ||
79 | struct bfa_auth_stats_s { | ||
80 | u32 auth_failures; /* authentication failures */ | ||
81 | u32 auth_successes; /* authentication successes*/ | ||
82 | struct auth_proto_stats_s auth_rx_stats; /* Rx protocol stats */ | ||
83 | struct auth_proto_stats_s auth_tx_stats; /* Tx protocol stats */ | ||
84 | }; | ||
85 | |||
86 | /** | ||
87 | * Authentication hash function algorithms | ||
88 | */ | ||
89 | enum bfa_auth_algo { | ||
90 | BFA_AUTH_ALGO_MD5 = 1, /* Message-Digest algorithm 5 */ | ||
91 | BFA_AUTH_ALGO_SHA1 = 2, /* Secure Hash Algorithm 1 */ | ||
92 | BFA_AUTH_ALGO_MS = 3, /* MD5, then SHA-1 */ | ||
93 | BFA_AUTH_ALGO_SM = 4, /* SHA-1, then MD5 */ | ||
94 | }; | ||
95 | |||
96 | /** | ||
97 | * DH Groups | ||
98 | * | ||
99 | * Current value could be combination of one or more of the following values | ||
100 | */ | ||
101 | enum bfa_auth_group { | ||
102 | BFA_AUTH_GROUP_DHNULL = 0, /* DH NULL (value == 0) */ | ||
103 | BFA_AUTH_GROUP_DH768 = 1, /* DH group 768 (value == 1) */ | ||
104 | BFA_AUTH_GROUP_DH1024 = 2, /* DH group 1024 (value == 2) */ | ||
105 | BFA_AUTH_GROUP_DH1280 = 4, /* DH group 1280 (value == 3) */ | ||
106 | BFA_AUTH_GROUP_DH1536 = 8, /* DH group 1536 (value == 4) */ | ||
107 | |||
108 | BFA_AUTH_GROUP_ALL = 256 /* Use default DH group order | ||
109 | * 0, 1, 2, 3, 4 */ | ||
110 | }; | ||
111 | |||
112 | /** | ||
113 | * Authentication secret sources | ||
114 | */ | ||
115 | enum bfa_auth_secretsource { | ||
116 | BFA_AUTH_SECSRC_LOCAL = 1, /* locally configured */ | ||
117 | BFA_AUTH_SECSRC_RADIUS = 2, /* use radius server */ | ||
118 | BFA_AUTH_SECSRC_TACACS = 3, /* TACACS server */ | ||
119 | }; | ||
120 | |||
121 | /** | ||
122 | * Authentication attributes | ||
123 | */ | ||
124 | struct bfa_auth_attr_s { | ||
125 | enum bfa_auth_status status; | ||
126 | enum bfa_auth_algo algo; | ||
127 | enum bfa_auth_group dh_grp; | ||
128 | enum bfa_auth_rej_code rjt_code; | ||
129 | enum bfa_auth_rej_code_exp rjt_code_exp; | ||
130 | u8 secret_set; | ||
131 | u8 resv[3]; | ||
132 | }; | ||
133 | |||
134 | #endif /* __BFA_DEFS_AUTH_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_boot.h b/drivers/scsi/bfa/include/defs/bfa_defs_boot.h deleted file mode 100644 index 0fca10b6ad10..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_boot.h +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_BOOT_H__ | ||
19 | #define __BFA_DEFS_BOOT_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | #include <defs/bfa_defs_types.h> | ||
23 | #include <defs/bfa_defs_pport.h> | ||
24 | |||
25 | enum { | ||
26 | BFA_BOOT_BOOTLUN_MAX = 4, /* maximum boot lun per IOC */ | ||
27 | BFA_PREBOOT_BOOTLUN_MAX = 8, /* maximum preboot lun per IOC */ | ||
28 | |||
29 | }; | ||
30 | |||
31 | #define BOOT_CFG_REV1 1 | ||
32 | |||
33 | /** | ||
34 | * Boot options setting. Boot options setting determines from where | ||
35 | * to get the boot lun information | ||
36 | */ | ||
37 | enum bfa_boot_bootopt { | ||
38 | BFA_BOOT_AUTO_DISCOVER = 0, /* Boot from blun provided by fabric */ | ||
39 | BFA_BOOT_STORED_BLUN = 1, /* Boot from bluns stored in flash */ | ||
40 | BFA_BOOT_FIRST_LUN = 2, /* Boot from first discovered blun */ | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * Boot lun information. | ||
45 | */ | ||
46 | struct bfa_boot_bootlun_s { | ||
47 | wwn_t pwwn; /* port wwn of target */ | ||
48 | lun_t lun; /* 64-bit lun */ | ||
49 | }; | ||
50 | |||
51 | /** | ||
52 | * BOOT boot configuraton | ||
53 | */ | ||
54 | struct bfa_boot_cfg_s { | ||
55 | u8 version; | ||
56 | u8 rsvd1; | ||
57 | u16 chksum; | ||
58 | |||
59 | u8 enable; /* enable/disable SAN boot */ | ||
60 | u8 speed; /* boot speed settings */ | ||
61 | u8 topology; /* boot topology setting */ | ||
62 | u8 bootopt; /* bfa_boot_bootopt_t */ | ||
63 | |||
64 | u32 nbluns; /* number of boot luns */ | ||
65 | |||
66 | u32 rsvd2; | ||
67 | |||
68 | struct bfa_boot_bootlun_s blun[BFA_BOOT_BOOTLUN_MAX]; | ||
69 | struct bfa_boot_bootlun_s blun_disc[BFA_BOOT_BOOTLUN_MAX]; | ||
70 | }; | ||
71 | |||
72 | struct bfa_boot_pbc_s { | ||
73 | u8 enable; /* enable/disable SAN boot */ | ||
74 | u8 speed; /* boot speed settings */ | ||
75 | u8 topology; /* boot topology setting */ | ||
76 | u8 rsvd1; | ||
77 | u32 nbluns; /* number of boot luns */ | ||
78 | struct bfa_boot_bootlun_s pblun[BFA_PREBOOT_BOOTLUN_MAX]; | ||
79 | }; | ||
80 | |||
81 | #endif /* __BFA_DEFS_BOOT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_cee.h b/drivers/scsi/bfa/include/defs/bfa_defs_cee.h deleted file mode 100644 index 6eaf519eccdc..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_cee.h +++ /dev/null | |||
@@ -1,157 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * bfa_defs_cee.h Interface declarations between host based | ||
7 | * BFAL and DCBX/LLDP module in Firmware | ||
8 | * | ||
9 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
13 | * published by the Free Software Foundation | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, but | ||
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | * General Public License for more details. | ||
19 | */ | ||
20 | #ifndef __BFA_DEFS_CEE_H__ | ||
21 | #define __BFA_DEFS_CEE_H__ | ||
22 | |||
23 | #include <defs/bfa_defs_types.h> | ||
24 | #include <defs/bfa_defs_pport.h> | ||
25 | #include <protocol/types.h> | ||
26 | |||
27 | #pragma pack(1) | ||
28 | |||
29 | #define BFA_CEE_LLDP_MAX_STRING_LEN (128) | ||
30 | |||
31 | #define BFA_CEE_LLDP_SYS_CAP_OTHER 0x0001 | ||
32 | #define BFA_CEE_LLDP_SYS_CAP_REPEATER 0x0002 | ||
33 | #define BFA_CEE_LLDP_SYS_CAP_MAC_BRIDGE 0x0004 | ||
34 | #define BFA_CEE_LLDP_SYS_CAP_WLAN_AP 0x0008 | ||
35 | #define BFA_CEE_LLDP_SYS_CAP_ROUTER 0x0010 | ||
36 | #define BFA_CEE_LLDP_SYS_CAP_TELEPHONE 0x0020 | ||
37 | #define BFA_CEE_LLDP_SYS_CAP_DOCSIS_CD 0x0040 | ||
38 | #define BFA_CEE_LLDP_SYS_CAP_STATION 0x0080 | ||
39 | #define BFA_CEE_LLDP_SYS_CAP_CVLAN 0x0100 | ||
40 | #define BFA_CEE_LLDP_SYS_CAP_SVLAN 0x0200 | ||
41 | #define BFA_CEE_LLDP_SYS_CAP_TPMR 0x0400 | ||
42 | |||
43 | |||
44 | /* LLDP string type */ | ||
45 | struct bfa_cee_lldp_str_s { | ||
46 | u8 sub_type; | ||
47 | u8 len; | ||
48 | u8 rsvd[2]; | ||
49 | u8 value[BFA_CEE_LLDP_MAX_STRING_LEN]; | ||
50 | }; | ||
51 | |||
52 | |||
53 | /* LLDP parameters */ | ||
54 | struct bfa_cee_lldp_cfg_s { | ||
55 | struct bfa_cee_lldp_str_s chassis_id; | ||
56 | struct bfa_cee_lldp_str_s port_id; | ||
57 | struct bfa_cee_lldp_str_s port_desc; | ||
58 | struct bfa_cee_lldp_str_s sys_name; | ||
59 | struct bfa_cee_lldp_str_s sys_desc; | ||
60 | struct bfa_cee_lldp_str_s mgmt_addr; | ||
61 | u16 time_to_interval; | ||
62 | u16 enabled_system_cap; | ||
63 | }; | ||
64 | |||
65 | enum bfa_cee_dcbx_version_e { | ||
66 | DCBX_PROTOCOL_PRECEE = 1, | ||
67 | DCBX_PROTOCOL_CEE = 2, | ||
68 | }; | ||
69 | |||
70 | enum bfa_cee_lls_e { | ||
71 | CEE_LLS_DOWN_NO_TLV = 0, /* LLS is down because the TLV not sent by | ||
72 | * the peer */ | ||
73 | CEE_LLS_DOWN = 1, /* LLS is down as advertised by the peer */ | ||
74 | CEE_LLS_UP = 2, | ||
75 | }; | ||
76 | |||
77 | /* CEE/DCBX parameters */ | ||
78 | struct bfa_cee_dcbx_cfg_s { | ||
79 | u8 pgid[8]; | ||
80 | u8 pg_percentage[8]; | ||
81 | u8 pfc_enabled; /* bitmap of priorties with PFC enabled */ | ||
82 | u8 fcoe_user_priority; /* bitmap of priorities used for FcoE | ||
83 | * traffic */ | ||
84 | u8 dcbx_version; /* operating version:CEE or preCEE */ | ||
85 | u8 lls_fcoe; /* FCoE Logical Link Status */ | ||
86 | u8 lls_lan; /* LAN Logical Link Status */ | ||
87 | u8 rsvd[3]; | ||
88 | }; | ||
89 | |||
90 | /* CEE status */ | ||
91 | /* Making this to tri-state for the benefit of port list command */ | ||
92 | enum bfa_cee_status_e { | ||
93 | CEE_UP = 0, | ||
94 | CEE_PHY_UP = 1, | ||
95 | CEE_LOOPBACK = 2, | ||
96 | CEE_PHY_DOWN = 3, | ||
97 | }; | ||
98 | |||
99 | /* CEE Query */ | ||
100 | struct bfa_cee_attr_s { | ||
101 | u8 cee_status; | ||
102 | u8 error_reason; | ||
103 | struct bfa_cee_lldp_cfg_s lldp_remote; | ||
104 | struct bfa_cee_dcbx_cfg_s dcbx_remote; | ||
105 | mac_t src_mac; | ||
106 | u8 link_speed; | ||
107 | u8 nw_priority; | ||
108 | u8 filler[2]; | ||
109 | }; | ||
110 | |||
111 | |||
112 | |||
113 | |||
114 | /* LLDP/DCBX/CEE Statistics */ | ||
115 | |||
116 | struct bfa_cee_lldp_stats_s { | ||
117 | u32 frames_transmitted; | ||
118 | u32 frames_aged_out; | ||
119 | u32 frames_discarded; | ||
120 | u32 frames_in_error; | ||
121 | u32 frames_rcvd; | ||
122 | u32 tlvs_discarded; | ||
123 | u32 tlvs_unrecognized; | ||
124 | }; | ||
125 | |||
126 | struct bfa_cee_dcbx_stats_s { | ||
127 | u32 subtlvs_unrecognized; | ||
128 | u32 negotiation_failed; | ||
129 | u32 remote_cfg_changed; | ||
130 | u32 tlvs_received; | ||
131 | u32 tlvs_invalid; | ||
132 | u32 seqno; | ||
133 | u32 ackno; | ||
134 | u32 recvd_seqno; | ||
135 | u32 recvd_ackno; | ||
136 | }; | ||
137 | |||
138 | struct bfa_cee_cfg_stats_s { | ||
139 | u32 cee_status_down; | ||
140 | u32 cee_status_up; | ||
141 | u32 cee_hw_cfg_changed; | ||
142 | u32 recvd_invalid_cfg; | ||
143 | }; | ||
144 | |||
145 | |||
146 | struct bfa_cee_stats_s { | ||
147 | struct bfa_cee_lldp_stats_s lldp_stats; | ||
148 | struct bfa_cee_dcbx_stats_s dcbx_stats; | ||
149 | struct bfa_cee_cfg_stats_s cfg_stats; | ||
150 | }; | ||
151 | |||
152 | #pragma pack() | ||
153 | |||
154 | |||
155 | #endif /* __BFA_DEFS_CEE_H__ */ | ||
156 | |||
157 | |||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_driver.h b/drivers/scsi/bfa/include/defs/bfa_defs_driver.h deleted file mode 100644 index 7d00d00d3969..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_driver.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_DRIVER_H__ | ||
19 | #define __BFA_DEFS_DRIVER_H__ | ||
20 | |||
21 | /** | ||
22 | * Driver statistics | ||
23 | */ | ||
24 | struct bfa_driver_stats_s { | ||
25 | u16 tm_io_abort; | ||
26 | u16 tm_io_abort_comp; | ||
27 | u16 tm_lun_reset; | ||
28 | u16 tm_lun_reset_comp; | ||
29 | u16 tm_target_reset; | ||
30 | u16 tm_bus_reset; | ||
31 | u16 ioc_restart; /* IOC restart count */ | ||
32 | u16 rsvd; | ||
33 | u64 control_req; | ||
34 | u64 input_req; | ||
35 | u64 output_req; | ||
36 | u64 input_words; | ||
37 | u64 output_words; | ||
38 | }; | ||
39 | |||
40 | |||
41 | #endif /* __BFA_DEFS_DRIVER_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_ethport.h b/drivers/scsi/bfa/include/defs/bfa_defs_ethport.h deleted file mode 100644 index b4fa0923aa89..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_ethport.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_ETHPORT_H__ | ||
19 | #define __BFA_DEFS_ETHPORT_H__ | ||
20 | |||
21 | #include <defs/bfa_defs_status.h> | ||
22 | #include <defs/bfa_defs_port.h> | ||
23 | #include <protocol/types.h> | ||
24 | #include <cna/pstats/phyport_defs.h> | ||
25 | #include <cna/pstats/ethport_defs.h> | ||
26 | |||
27 | struct bna_tx_info_s { | ||
28 | u32 miniport_state; | ||
29 | u32 adapter_state; | ||
30 | u64 tx_count; | ||
31 | u64 tx_wi; | ||
32 | u64 tx_sg; | ||
33 | u64 tx_tcp_chksum; | ||
34 | u64 tx_udp_chksum; | ||
35 | u64 tx_ip_chksum; | ||
36 | u64 tx_lsov1; | ||
37 | u64 tx_lsov2; | ||
38 | u64 tx_max_sg_len ; | ||
39 | }; | ||
40 | |||
41 | struct bna_rx_queue_info_s { | ||
42 | u16 q_id ; | ||
43 | u16 buf_size ; | ||
44 | u16 buf_count ; | ||
45 | u16 rsvd ; | ||
46 | u64 rx_count ; | ||
47 | u64 rx_dropped ; | ||
48 | u64 rx_unsupported ; | ||
49 | u64 rx_internal_err ; | ||
50 | u64 rss_count ; | ||
51 | u64 vlan_count ; | ||
52 | u64 rx_tcp_chksum ; | ||
53 | u64 rx_udp_chksum ; | ||
54 | u64 rx_ip_chksum ; | ||
55 | u64 rx_hds ; | ||
56 | }; | ||
57 | |||
58 | struct bna_rx_q_set_s { | ||
59 | u16 q_set_type; | ||
60 | u32 miniport_state; | ||
61 | u32 adapter_state; | ||
62 | struct bna_rx_queue_info_s rx_queue[2]; | ||
63 | }; | ||
64 | |||
65 | struct bna_port_stats_s { | ||
66 | struct bna_tx_info_s tx_stats; | ||
67 | u16 qset_count ; | ||
68 | struct bna_rx_q_set_s rx_qset[8]; | ||
69 | }; | ||
70 | |||
71 | struct bfa_ethport_stats_s { | ||
72 | struct bna_stats_txf txf_stats[1]; | ||
73 | struct bna_stats_rxf rxf_stats[1]; | ||
74 | struct bnad_drv_stats drv_stats; | ||
75 | }; | ||
76 | |||
77 | /** | ||
78 | * Ethernet port events | ||
79 | * Arguments below are in BFAL context from Mgmt | ||
80 | * BFA_PORT_AEN_ETH_LINKUP: [in]: mac [out]: mac | ||
81 | * BFA_PORT_AEN_ETH_LINKDOWN: [in]: mac [out]: mac | ||
82 | * BFA_PORT_AEN_ETH_ENABLE: [in]: mac [out]: mac | ||
83 | * BFA_PORT_AEN_ETH_DISABLE: [in]: mac [out]: mac | ||
84 | * | ||
85 | */ | ||
86 | enum bfa_ethport_aen_event { | ||
87 | BFA_ETHPORT_AEN_LINKUP = 1, /* Base Port Ethernet link up event */ | ||
88 | BFA_ETHPORT_AEN_LINKDOWN = 2, /* Base Port Ethernet link down event */ | ||
89 | BFA_ETHPORT_AEN_ENABLE = 3, /* Base Port Ethernet link enable event */ | ||
90 | BFA_ETHPORT_AEN_DISABLE = 4, /* Base Port Ethernet link disable | ||
91 | * event */ | ||
92 | }; | ||
93 | |||
94 | struct bfa_ethport_aen_data_s { | ||
95 | mac_t mac; /* MAC address of the physical port */ | ||
96 | }; | ||
97 | |||
98 | |||
99 | #endif /* __BFA_DEFS_ETHPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_fcpim.h b/drivers/scsi/bfa/include/defs/bfa_defs_fcpim.h deleted file mode 100644 index c08f4f5026ac..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_fcpim.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_FCPIM_H__ | ||
18 | #define __BFA_DEFS_FCPIM_H__ | ||
19 | |||
20 | struct bfa_fcpim_stats_s { | ||
21 | u32 total_ios; /* Total IO count */ | ||
22 | u32 qresumes; /* IO waiting for CQ space */ | ||
23 | u32 no_iotags; /* NO IO contexts */ | ||
24 | u32 io_aborts; /* IO abort requests */ | ||
25 | u32 no_tskims; /* NO task management contexts */ | ||
26 | u32 iocomp_ok; /* IO completions with OK status */ | ||
27 | u32 iocomp_underrun; /* IO underrun (good) */ | ||
28 | u32 iocomp_overrun; /* IO overrun (good) */ | ||
29 | u32 iocomp_aborted; /* Aborted IO requests */ | ||
30 | u32 iocomp_timedout; /* IO timeouts */ | ||
31 | u32 iocom_nexus_abort; /* IO selection timeouts */ | ||
32 | u32 iocom_proto_err; /* IO protocol errors */ | ||
33 | u32 iocom_dif_err; /* IO SBC-3 protection errors */ | ||
34 | u32 iocom_tm_abort; /* IO aborted by TM requests */ | ||
35 | u32 iocom_sqer_needed; /* IO retry for SQ error | ||
36 | *recovery */ | ||
37 | u32 iocom_res_free; /* Delayed freeing of IO resources */ | ||
38 | u32 iocomp_scsierr; /* IO with non-good SCSI status */ | ||
39 | u32 iocom_hostabrts; /* Host IO abort requests */ | ||
40 | u32 iocom_utags; /* IO comp with unknown tags */ | ||
41 | u32 io_cleanups; /* IO implicitly aborted */ | ||
42 | u32 io_tmaborts; /* IO aborted due to TM commands */ | ||
43 | u32 rsvd; | ||
44 | }; | ||
45 | #endif /*__BFA_DEFS_FCPIM_H__*/ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_fcport.h b/drivers/scsi/bfa/include/defs/bfa_defs_fcport.h deleted file mode 100644 index af86a6396439..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_fcport.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * bfa_defs_fcport.h | ||
7 | * | ||
8 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
12 | * published by the Free Software Foundation | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | */ | ||
19 | #ifndef __BFA_DEFS_FCPORT_H__ | ||
20 | #define __BFA_DEFS_FCPORT_H__ | ||
21 | |||
22 | #include <defs/bfa_defs_types.h> | ||
23 | #include <protocol/types.h> | ||
24 | |||
25 | #pragma pack(1) | ||
26 | |||
27 | /** | ||
28 | * FCoE statistics | ||
29 | */ | ||
30 | struct bfa_fcoe_stats_s { | ||
31 | u64 secs_reset; /* Seconds since stats reset */ | ||
32 | u64 cee_linkups; /* CEE link up */ | ||
33 | u64 cee_linkdns; /* CEE link down */ | ||
34 | u64 fip_linkups; /* FIP link up */ | ||
35 | u64 fip_linkdns; /* FIP link down */ | ||
36 | u64 fip_fails; /* FIP failures */ | ||
37 | u64 mac_invalids; /* Invalid mac assignments */ | ||
38 | u64 vlan_req; /* Vlan requests */ | ||
39 | u64 vlan_notify; /* Vlan notifications */ | ||
40 | u64 vlan_err; /* Vlan notification errors */ | ||
41 | u64 vlan_timeouts; /* Vlan request timeouts */ | ||
42 | u64 vlan_invalids; /* Vlan invalids */ | ||
43 | u64 disc_req; /* Discovery requests */ | ||
44 | u64 disc_rsp; /* Discovery responses */ | ||
45 | u64 disc_err; /* Discovery error frames */ | ||
46 | u64 disc_unsol; /* Discovery unsolicited */ | ||
47 | u64 disc_timeouts; /* Discovery timeouts */ | ||
48 | u64 disc_fcf_unavail; /* Discovery FCF not avail */ | ||
49 | u64 linksvc_unsupp; /* FIP link service req unsupp. */ | ||
50 | u64 linksvc_err; /* FIP link service req errors */ | ||
51 | u64 logo_req; /* FIP logos received */ | ||
52 | u64 clrvlink_req; /* Clear virtual link requests */ | ||
53 | u64 op_unsupp; /* FIP operation unsupp. */ | ||
54 | u64 untagged; /* FIP untagged frames */ | ||
55 | u64 txf_ucast; /* Tx FCoE unicast frames */ | ||
56 | u64 txf_ucast_vlan; /* Tx FCoE unicast vlan frames */ | ||
57 | u64 txf_ucast_octets; /* Tx FCoE unicast octets */ | ||
58 | u64 txf_mcast; /* Tx FCoE mutlicast frames */ | ||
59 | u64 txf_mcast_vlan; /* Tx FCoE mutlicast vlan frames */ | ||
60 | u64 txf_mcast_octets; /* Tx FCoE multicast octets */ | ||
61 | u64 txf_bcast; /* Tx FCoE broadcast frames */ | ||
62 | u64 txf_bcast_vlan; /* Tx FCoE broadcast vlan frames */ | ||
63 | u64 txf_bcast_octets; /* Tx FCoE broadcast octets */ | ||
64 | u64 txf_timeout; /* Tx timeouts */ | ||
65 | u64 txf_parity_errors; /* Transmit parity err */ | ||
66 | u64 txf_fid_parity_errors; /* Transmit FID parity err */ | ||
67 | u64 rxf_ucast_octets; /* Rx FCoE unicast octets */ | ||
68 | u64 rxf_ucast; /* Rx FCoE unicast frames */ | ||
69 | u64 rxf_ucast_vlan; /* Rx FCoE unicast vlan frames */ | ||
70 | u64 rxf_mcast_octets; /* Rx FCoE multicast octets */ | ||
71 | u64 rxf_mcast; /* Rx FCoE multicast frames */ | ||
72 | u64 rxf_mcast_vlan; /* Rx FCoE multicast vlan frames */ | ||
73 | u64 rxf_bcast_octets; /* Rx FCoE broadcast octets */ | ||
74 | u64 rxf_bcast; /* Rx FCoE broadcast frames */ | ||
75 | u64 rxf_bcast_vlan; /* Rx FCoE broadcast vlan frames */ | ||
76 | }; | ||
77 | |||
78 | /** | ||
79 | * QoS or FCoE stats (fcport stats excluding physical FC port stats) | ||
80 | */ | ||
81 | union bfa_fcport_stats_u { | ||
82 | struct bfa_qos_stats_s fcqos; | ||
83 | struct bfa_fcoe_stats_s fcoe; | ||
84 | }; | ||
85 | |||
86 | #pragma pack() | ||
87 | |||
88 | #endif /* __BFA_DEFS_FCPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_ioc.h b/drivers/scsi/bfa/include/defs/bfa_defs_ioc.h deleted file mode 100644 index add0a05d941d..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_ioc.h +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_IOC_H__ | ||
19 | #define __BFA_DEFS_IOC_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | #include <defs/bfa_defs_types.h> | ||
23 | #include <defs/bfa_defs_version.h> | ||
24 | #include <defs/bfa_defs_adapter.h> | ||
25 | #include <defs/bfa_defs_pm.h> | ||
26 | |||
27 | enum { | ||
28 | BFA_IOC_DRIVER_LEN = 16, | ||
29 | BFA_IOC_CHIP_REV_LEN = 8, | ||
30 | }; | ||
31 | |||
32 | /** | ||
33 | * Driver and firmware versions. | ||
34 | */ | ||
35 | struct bfa_ioc_driver_attr_s { | ||
36 | char driver[BFA_IOC_DRIVER_LEN]; /* driver name */ | ||
37 | char driver_ver[BFA_VERSION_LEN]; /* driver version */ | ||
38 | char fw_ver[BFA_VERSION_LEN]; /* firmware version*/ | ||
39 | char bios_ver[BFA_VERSION_LEN]; /* bios version */ | ||
40 | char efi_ver[BFA_VERSION_LEN]; /* EFI version */ | ||
41 | char ob_ver[BFA_VERSION_LEN]; /* openboot version*/ | ||
42 | }; | ||
43 | |||
44 | /** | ||
45 | * IOC PCI device attributes | ||
46 | */ | ||
47 | struct bfa_ioc_pci_attr_s { | ||
48 | u16 vendor_id; /* PCI vendor ID */ | ||
49 | u16 device_id; /* PCI device ID */ | ||
50 | u16 ssid; /* subsystem ID */ | ||
51 | u16 ssvid; /* subsystem vendor ID */ | ||
52 | u32 pcifn; /* PCI device function */ | ||
53 | u32 rsvd; /* padding */ | ||
54 | u8 chip_rev[BFA_IOC_CHIP_REV_LEN]; /* chip revision */ | ||
55 | }; | ||
56 | |||
57 | /** | ||
58 | * IOC states | ||
59 | */ | ||
60 | enum bfa_ioc_state { | ||
61 | BFA_IOC_RESET = 1, /* IOC is in reset state */ | ||
62 | BFA_IOC_SEMWAIT = 2, /* Waiting for IOC hardware semaphore */ | ||
63 | BFA_IOC_HWINIT = 3, /* IOC hardware is being initialized */ | ||
64 | BFA_IOC_GETATTR = 4, /* IOC is being configured */ | ||
65 | BFA_IOC_OPERATIONAL = 5, /* IOC is operational */ | ||
66 | BFA_IOC_INITFAIL = 6, /* IOC hardware failure */ | ||
67 | BFA_IOC_HBFAIL = 7, /* IOC heart-beat failure */ | ||
68 | BFA_IOC_DISABLING = 8, /* IOC is being disabled */ | ||
69 | BFA_IOC_DISABLED = 9, /* IOC is disabled */ | ||
70 | BFA_IOC_FWMISMATCH = 10, /* IOC firmware different from drivers */ | ||
71 | }; | ||
72 | |||
73 | /** | ||
74 | * IOC firmware stats | ||
75 | */ | ||
76 | struct bfa_fw_ioc_stats_s { | ||
77 | u32 hb_count; | ||
78 | u32 cfg_reqs; | ||
79 | u32 enable_reqs; | ||
80 | u32 disable_reqs; | ||
81 | u32 stats_reqs; | ||
82 | u32 clrstats_reqs; | ||
83 | u32 unknown_reqs; | ||
84 | u32 ic_reqs; /* interrupt coalesce reqs */ | ||
85 | }; | ||
86 | |||
87 | /** | ||
88 | * IOC driver stats | ||
89 | */ | ||
90 | struct bfa_ioc_drv_stats_s { | ||
91 | u32 ioc_isrs; | ||
92 | u32 ioc_enables; | ||
93 | u32 ioc_disables; | ||
94 | u32 ioc_hbfails; | ||
95 | u32 ioc_boots; | ||
96 | u32 stats_tmos; | ||
97 | u32 hb_count; | ||
98 | u32 disable_reqs; | ||
99 | u32 enable_reqs; | ||
100 | u32 disable_replies; | ||
101 | u32 enable_replies; | ||
102 | }; | ||
103 | |||
104 | /** | ||
105 | * IOC statistics | ||
106 | */ | ||
107 | struct bfa_ioc_stats_s { | ||
108 | struct bfa_ioc_drv_stats_s drv_stats; /* driver IOC stats */ | ||
109 | struct bfa_fw_ioc_stats_s fw_stats; /* firmware IOC stats */ | ||
110 | }; | ||
111 | |||
112 | |||
113 | enum bfa_ioc_type_e { | ||
114 | BFA_IOC_TYPE_FC = 1, | ||
115 | BFA_IOC_TYPE_FCoE = 2, | ||
116 | BFA_IOC_TYPE_LL = 3, | ||
117 | }; | ||
118 | |||
119 | /** | ||
120 | * IOC attributes returned in queries | ||
121 | */ | ||
122 | struct bfa_ioc_attr_s { | ||
123 | enum bfa_ioc_type_e ioc_type; | ||
124 | enum bfa_ioc_state state; /* IOC state */ | ||
125 | struct bfa_adapter_attr_s adapter_attr; /* HBA attributes */ | ||
126 | struct bfa_ioc_driver_attr_s driver_attr; /* driver attr */ | ||
127 | struct bfa_ioc_pci_attr_s pci_attr; | ||
128 | u8 port_id; /* port number */ | ||
129 | u8 rsvd[7]; /* 64bit align */ | ||
130 | }; | ||
131 | |||
132 | /** | ||
133 | * BFA IOC level events | ||
134 | */ | ||
135 | enum bfa_ioc_aen_event { | ||
136 | BFA_IOC_AEN_HBGOOD = 1, /* Heart Beat restore event */ | ||
137 | BFA_IOC_AEN_HBFAIL = 2, /* Heart Beat failure event */ | ||
138 | BFA_IOC_AEN_ENABLE = 3, /* IOC enabled event */ | ||
139 | BFA_IOC_AEN_DISABLE = 4, /* IOC disabled event */ | ||
140 | BFA_IOC_AEN_FWMISMATCH = 5, /* IOC firmware mismatch */ | ||
141 | BFA_IOC_AEN_FWCFG_ERROR = 6, /* IOC firmware config error */ | ||
142 | BFA_IOC_AEN_INVALID_VENDOR = 7, | ||
143 | BFA_IOC_AEN_INVALID_NWWN = 8, /* Zero NWWN */ | ||
144 | BFA_IOC_AEN_INVALID_PWWN = 9 /* Zero PWWN */ | ||
145 | |||
146 | }; | ||
147 | |||
148 | /** | ||
149 | * BFA IOC level event data, now just a place holder | ||
150 | */ | ||
151 | struct bfa_ioc_aen_data_s { | ||
152 | wwn_t pwwn; | ||
153 | s16 ioc_type; | ||
154 | mac_t mac; | ||
155 | }; | ||
156 | |||
157 | #endif /* __BFA_DEFS_IOC_H__ */ | ||
158 | |||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_iocfc.h b/drivers/scsi/bfa/include/defs/bfa_defs_iocfc.h deleted file mode 100644 index 31e728a631ed..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_iocfc.h +++ /dev/null | |||
@@ -1,322 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_IOCFC_H__ | ||
19 | #define __BFA_DEFS_IOCFC_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | #include <defs/bfa_defs_types.h> | ||
23 | #include <defs/bfa_defs_version.h> | ||
24 | #include <defs/bfa_defs_adapter.h> | ||
25 | #include <defs/bfa_defs_pm.h> | ||
26 | |||
27 | #define BFA_IOCFC_INTR_DELAY 1125 | ||
28 | #define BFA_IOCFC_INTR_LATENCY 225 | ||
29 | #define BFA_IOCFCOE_INTR_DELAY 25 | ||
30 | #define BFA_IOCFCOE_INTR_LATENCY 5 | ||
31 | |||
32 | /** | ||
33 | * Interrupt coalescing configuration. | ||
34 | */ | ||
35 | struct bfa_iocfc_intr_attr_s { | ||
36 | bfa_boolean_t coalesce; /* enable/disable coalescing */ | ||
37 | u16 latency; /* latency in microseconds */ | ||
38 | u16 delay; /* delay in microseconds */ | ||
39 | }; | ||
40 | |||
41 | /** | ||
42 | * IOC firmware configuraton | ||
43 | */ | ||
44 | struct bfa_iocfc_fwcfg_s { | ||
45 | u16 num_fabrics; /* number of fabrics */ | ||
46 | u16 num_lports; /* number of local lports */ | ||
47 | u16 num_rports; /* number of remote ports */ | ||
48 | u16 num_ioim_reqs; /* number of IO reqs */ | ||
49 | u16 num_tskim_reqs; /* task management requests */ | ||
50 | u16 num_iotm_reqs; /* number of TM IO reqs */ | ||
51 | u16 num_tsktm_reqs; /* TM task management requests*/ | ||
52 | u16 num_fcxp_reqs; /* unassisted FC exchanges */ | ||
53 | u16 num_uf_bufs; /* unsolicited recv buffers */ | ||
54 | u8 num_cqs; | ||
55 | u8 fw_tick_res; /*!< FW clock resolution in ms */ | ||
56 | u8 rsvd[4]; | ||
57 | |||
58 | }; | ||
59 | |||
60 | struct bfa_iocfc_drvcfg_s { | ||
61 | u16 num_reqq_elems; /* number of req queue elements */ | ||
62 | u16 num_rspq_elems; /* number of rsp queue elements */ | ||
63 | u16 num_sgpgs; /* number of total SG pages */ | ||
64 | u16 num_sboot_tgts; /* number of SAN boot targets */ | ||
65 | u16 num_sboot_luns; /* number of SAN boot luns */ | ||
66 | u16 ioc_recover; /* IOC recovery mode */ | ||
67 | u16 min_cfg; /* minimum configuration */ | ||
68 | u16 path_tov; /* device path timeout */ | ||
69 | bfa_boolean_t delay_comp; /* delay completion of | ||
70 | failed inflight IOs */ | ||
71 | u32 rsvd; | ||
72 | }; | ||
73 | /** | ||
74 | * IOC configuration | ||
75 | */ | ||
76 | struct bfa_iocfc_cfg_s { | ||
77 | struct bfa_iocfc_fwcfg_s fwcfg; /* firmware side config */ | ||
78 | struct bfa_iocfc_drvcfg_s drvcfg; /* driver side config */ | ||
79 | }; | ||
80 | |||
81 | /** | ||
82 | * IOC firmware IO stats | ||
83 | */ | ||
84 | struct bfa_fw_io_stats_s { | ||
85 | u32 host_abort; /* IO aborted by host driver*/ | ||
86 | u32 host_cleanup; /* IO clean up by host driver */ | ||
87 | |||
88 | u32 fw_io_timeout; /* IOs timedout */ | ||
89 | u32 fw_frm_parse; /* frame parsed by f/w */ | ||
90 | u32 fw_frm_data; /* fcp_data frame parsed by f/w */ | ||
91 | u32 fw_frm_rsp; /* fcp_rsp frame parsed by f/w */ | ||
92 | u32 fw_frm_xfer_rdy; /* xfer_rdy frame parsed by f/w */ | ||
93 | u32 fw_frm_bls_acc; /* BLS ACC frame parsed by f/w */ | ||
94 | u32 fw_frm_tgt_abort; /* target ABTS parsed by f/w */ | ||
95 | u32 fw_frm_unknown; /* unknown parsed by f/w */ | ||
96 | u32 fw_data_dma; /* f/w DMA'ed the data frame */ | ||
97 | u32 fw_frm_drop; /* f/w drop the frame */ | ||
98 | |||
99 | u32 rec_timeout; /* FW rec timed out */ | ||
100 | u32 error_rec; /* FW sending rec on | ||
101 | * an error condition*/ | ||
102 | u32 wait_for_si; /* FW wait for SI */ | ||
103 | u32 rec_rsp_inval; /* REC rsp invalid */ | ||
104 | u32 seqr_io_abort; /* target does not know cmd so abort */ | ||
105 | u32 seqr_io_retry; /* SEQR failed so retry IO */ | ||
106 | |||
107 | u32 itn_cisc_upd_rsp; /* ITN cisc updated on fcp_rsp */ | ||
108 | u32 itn_cisc_upd_data; /* ITN cisc updated on fcp_data */ | ||
109 | u32 itn_cisc_upd_xfer_rdy; /* ITN cisc updated on fcp_data */ | ||
110 | |||
111 | u32 fcp_data_lost; /* fcp data lost */ | ||
112 | |||
113 | u32 ro_set_in_xfer_rdy; /* Target set RO in Xfer_rdy frame */ | ||
114 | u32 xfer_rdy_ooo_err; /* Out of order Xfer_rdy received */ | ||
115 | u32 xfer_rdy_unknown_err; /* unknown error in xfer_rdy frame */ | ||
116 | |||
117 | u32 io_abort_timeout; /* ABTS timedout */ | ||
118 | u32 sler_initiated; /* SLER initiated */ | ||
119 | |||
120 | u32 unexp_fcp_rsp; /* fcp response in wrong state */ | ||
121 | |||
122 | u32 fcp_rsp_under_run; /* fcp rsp IO underrun */ | ||
123 | u32 fcp_rsp_under_run_wr; /* fcp rsp IO underrun for write */ | ||
124 | u32 fcp_rsp_under_run_err; /* fcp rsp IO underrun error */ | ||
125 | u32 fcp_rsp_resid_inval; /* invalid residue */ | ||
126 | u32 fcp_rsp_over_run; /* fcp rsp IO overrun */ | ||
127 | u32 fcp_rsp_over_run_err; /* fcp rsp IO overrun error */ | ||
128 | u32 fcp_rsp_proto_err; /* protocol error in fcp rsp */ | ||
129 | u32 fcp_rsp_sense_err; /* error in sense info in fcp rsp */ | ||
130 | u32 fcp_conf_req; /* FCP conf requested */ | ||
131 | |||
132 | u32 tgt_aborted_io; /* target initiated abort */ | ||
133 | |||
134 | u32 ioh_edtov_timeout_event;/* IOH edtov timer popped */ | ||
135 | u32 ioh_fcp_rsp_excp_event; /* IOH FCP_RSP exception */ | ||
136 | u32 ioh_fcp_conf_event; /* IOH FCP_CONF */ | ||
137 | u32 ioh_mult_frm_rsp_event; /* IOH multi_frame FCP_RSP */ | ||
138 | u32 ioh_hit_class2_event; /* IOH hit class2 */ | ||
139 | u32 ioh_miss_other_event; /* IOH miss other */ | ||
140 | u32 ioh_seq_cnt_err_event; /* IOH seq cnt error */ | ||
141 | u32 ioh_len_err_event; /* IOH len error - fcp_dl != | ||
142 | * bytes xfered */ | ||
143 | u32 ioh_seq_len_err_event; /* IOH seq len error */ | ||
144 | u32 ioh_data_oor_event; /* Data out of range */ | ||
145 | u32 ioh_ro_ooo_event; /* Relative offset out of range */ | ||
146 | u32 ioh_cpu_owned_event; /* IOH hit -iost owned by f/w */ | ||
147 | u32 ioh_unexp_frame_event; /* unexpected frame recieved | ||
148 | * count */ | ||
149 | u32 ioh_err_int; /* IOH error int during data-phase | ||
150 | * for scsi write | ||
151 | */ | ||
152 | }; | ||
153 | |||
154 | /** | ||
155 | * IOC port firmware stats | ||
156 | */ | ||
157 | |||
158 | struct bfa_fw_port_fpg_stats_s { | ||
159 | u32 intr_evt; | ||
160 | u32 intr; | ||
161 | u32 intr_excess; | ||
162 | u32 intr_cause0; | ||
163 | u32 intr_other; | ||
164 | u32 intr_other_ign; | ||
165 | u32 sig_lost; | ||
166 | u32 sig_regained; | ||
167 | u32 sync_lost; | ||
168 | u32 sync_to; | ||
169 | u32 sync_regained; | ||
170 | u32 div2_overflow; | ||
171 | u32 div2_underflow; | ||
172 | u32 efifo_overflow; | ||
173 | u32 efifo_underflow; | ||
174 | u32 idle_rx; | ||
175 | u32 lrr_rx; | ||
176 | u32 lr_rx; | ||
177 | u32 ols_rx; | ||
178 | u32 nos_rx; | ||
179 | u32 lip_rx; | ||
180 | u32 arbf0_rx; | ||
181 | u32 arb_rx; | ||
182 | u32 mrk_rx; | ||
183 | u32 const_mrk_rx; | ||
184 | u32 prim_unknown; | ||
185 | }; | ||
186 | |||
187 | |||
188 | struct bfa_fw_port_lksm_stats_s { | ||
189 | u32 hwsm_success; /* hwsm state machine success */ | ||
190 | u32 hwsm_fails; /* hwsm fails */ | ||
191 | u32 hwsm_wdtov; /* hwsm timed out */ | ||
192 | u32 swsm_success; /* swsm success */ | ||
193 | u32 swsm_fails; /* swsm fails */ | ||
194 | u32 swsm_wdtov; /* swsm timed out */ | ||
195 | u32 busybufs; /* link init failed due to busybuf */ | ||
196 | u32 buf_waits; /* bufwait state entries */ | ||
197 | u32 link_fails; /* link failures */ | ||
198 | u32 psp_errors; /* primitive sequence protocol errors */ | ||
199 | u32 lr_unexp; /* No. of times LR rx-ed unexpectedly */ | ||
200 | u32 lrr_unexp; /* No. of times LRR rx-ed unexpectedly */ | ||
201 | u32 lr_tx; /* No. of times LR tx started */ | ||
202 | u32 lrr_tx; /* No. of times LRR tx started */ | ||
203 | u32 ols_tx; /* No. of times OLS tx started */ | ||
204 | u32 nos_tx; /* No. of times NOS tx started */ | ||
205 | u32 hwsm_lrr_rx; /* No. of times LRR rx-ed by HWSM */ | ||
206 | u32 hwsm_lr_rx; /* No. of times LR rx-ed by HWSM */ | ||
207 | }; | ||
208 | |||
209 | |||
210 | struct bfa_fw_port_snsm_stats_s { | ||
211 | u32 hwsm_success; /* Successful hwsm terminations */ | ||
212 | u32 hwsm_fails; /* hwsm fail count */ | ||
213 | u32 hwsm_wdtov; /* hwsm timed out */ | ||
214 | u32 swsm_success; /* swsm success */ | ||
215 | u32 swsm_wdtov; /* swsm timed out */ | ||
216 | u32 error_resets; /* error resets initiated by upsm */ | ||
217 | u32 sync_lost; /* Sync loss count */ | ||
218 | u32 sig_lost; /* Signal loss count */ | ||
219 | }; | ||
220 | |||
221 | |||
222 | struct bfa_fw_port_physm_stats_s { | ||
223 | u32 module_inserts; /* Module insert count */ | ||
224 | u32 module_xtracts; /* Module extracts count */ | ||
225 | u32 module_invalids; /* Invalid module inserted count */ | ||
226 | u32 module_read_ign; /* Module validation status ignored */ | ||
227 | u32 laser_faults; /* Laser fault count */ | ||
228 | u32 rsvd; | ||
229 | }; | ||
230 | |||
231 | |||
232 | struct bfa_fw_fip_stats_s { | ||
233 | u32 vlan_req; /* vlan discovery requests */ | ||
234 | u32 vlan_notify; /* vlan notifications */ | ||
235 | u32 vlan_err; /* vlan response error */ | ||
236 | u32 vlan_timeouts; /* vlan disvoery timeouts */ | ||
237 | u32 vlan_invalids; /* invalid vlan in discovery advert. */ | ||
238 | u32 disc_req; /* Discovery solicit requests */ | ||
239 | u32 disc_rsp; /* Discovery solicit response */ | ||
240 | u32 disc_err; /* Discovery advt. parse errors */ | ||
241 | u32 disc_unsol; /* Discovery unsolicited */ | ||
242 | u32 disc_timeouts; /* Discovery timeouts */ | ||
243 | u32 disc_fcf_unavail; /* Discovery FCF Not Avail. */ | ||
244 | u32 linksvc_unsupp; /* Unsupported link service req */ | ||
245 | u32 linksvc_err; /* Parse error in link service req */ | ||
246 | u32 logo_req; /* FIP logos received */ | ||
247 | u32 clrvlink_req; /* Clear virtual link req */ | ||
248 | u32 op_unsupp; /* Unsupported FIP operation */ | ||
249 | u32 untagged; /* Untagged frames (ignored) */ | ||
250 | u32 invalid_version; /*!< Invalid FIP version */ | ||
251 | }; | ||
252 | |||
253 | |||
254 | struct bfa_fw_lps_stats_s { | ||
255 | u32 mac_invalids; /* Invalid mac assigned */ | ||
256 | u32 rsvd; | ||
257 | }; | ||
258 | |||
259 | |||
260 | struct bfa_fw_fcoe_stats_s { | ||
261 | u32 cee_linkups; /* CEE link up count */ | ||
262 | u32 cee_linkdns; /* CEE link down count */ | ||
263 | u32 fip_linkups; /* FIP link up count */ | ||
264 | u32 fip_linkdns; /* FIP link up count */ | ||
265 | u32 fip_fails; /* FIP fail count */ | ||
266 | u32 mac_invalids; /* Invalid mac assigned */ | ||
267 | }; | ||
268 | |||
269 | /** | ||
270 | * IOC firmware FCoE port stats | ||
271 | */ | ||
272 | struct bfa_fw_fcoe_port_stats_s { | ||
273 | struct bfa_fw_fcoe_stats_s fcoe_stats; | ||
274 | struct bfa_fw_fip_stats_s fip_stats; | ||
275 | }; | ||
276 | |||
277 | /** | ||
278 | * IOC firmware FC port stats | ||
279 | */ | ||
280 | struct bfa_fw_fc_port_stats_s { | ||
281 | struct bfa_fw_port_fpg_stats_s fpg_stats; | ||
282 | struct bfa_fw_port_physm_stats_s physm_stats; | ||
283 | struct bfa_fw_port_snsm_stats_s snsm_stats; | ||
284 | struct bfa_fw_port_lksm_stats_s lksm_stats; | ||
285 | }; | ||
286 | |||
287 | /** | ||
288 | * IOC firmware FC port stats | ||
289 | */ | ||
290 | union bfa_fw_port_stats_s { | ||
291 | struct bfa_fw_fc_port_stats_s fc_stats; | ||
292 | struct bfa_fw_fcoe_port_stats_s fcoe_stats; | ||
293 | }; | ||
294 | |||
295 | /** | ||
296 | * IOC firmware stats | ||
297 | */ | ||
298 | struct bfa_fw_stats_s { | ||
299 | struct bfa_fw_ioc_stats_s ioc_stats; | ||
300 | struct bfa_fw_io_stats_s io_stats; | ||
301 | union bfa_fw_port_stats_s port_stats; | ||
302 | }; | ||
303 | |||
304 | /** | ||
305 | * IOC statistics | ||
306 | */ | ||
307 | struct bfa_iocfc_stats_s { | ||
308 | struct bfa_fw_stats_s fw_stats; /* firmware IOC stats */ | ||
309 | }; | ||
310 | |||
311 | /** | ||
312 | * IOC attributes returned in queries | ||
313 | */ | ||
314 | struct bfa_iocfc_attr_s { | ||
315 | struct bfa_iocfc_cfg_s config; /* IOCFC config */ | ||
316 | struct bfa_iocfc_intr_attr_s intr_attr; /* interrupt attr */ | ||
317 | }; | ||
318 | |||
319 | #define BFA_IOCFC_PATHTOV_MAX 60 | ||
320 | #define BFA_IOCFC_QDEPTH_MAX 2000 | ||
321 | |||
322 | #endif /* __BFA_DEFS_IOC_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_ipfc.h b/drivers/scsi/bfa/include/defs/bfa_defs_ipfc.h deleted file mode 100644 index 7cb63ea98f38..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_ipfc.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_IPFC_H__ | ||
18 | #define __BFA_DEFS_IPFC_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | #include <protocol/types.h> | ||
22 | #include <defs/bfa_defs_types.h> | ||
23 | |||
24 | /** | ||
25 | * FCS ip remote port states | ||
26 | */ | ||
27 | enum bfa_iprp_state { | ||
28 | BFA_IPRP_UNINIT = 0, /* PORT is not yet initialized */ | ||
29 | BFA_IPRP_ONLINE = 1, /* process login is complete */ | ||
30 | BFA_IPRP_OFFLINE = 2, /* iprp is offline */ | ||
31 | }; | ||
32 | |||
33 | /** | ||
34 | * FCS remote port statistics | ||
35 | */ | ||
36 | struct bfa_iprp_stats_s { | ||
37 | u32 offlines; | ||
38 | u32 onlines; | ||
39 | u32 rscns; | ||
40 | u32 plogis; | ||
41 | u32 logos; | ||
42 | u32 plogi_timeouts; | ||
43 | u32 plogi_rejects; | ||
44 | }; | ||
45 | |||
46 | /** | ||
47 | * FCS iprp attribute returned in queries | ||
48 | */ | ||
49 | struct bfa_iprp_attr_s { | ||
50 | enum bfa_iprp_state state; | ||
51 | }; | ||
52 | |||
53 | struct bfa_ipfc_stats_s { | ||
54 | u32 arp_sent; | ||
55 | u32 arp_recv; | ||
56 | u32 arp_reply_sent; | ||
57 | u32 arp_reply_recv; | ||
58 | u32 farp_sent; | ||
59 | u32 farp_recv; | ||
60 | u32 farp_reply_sent; | ||
61 | u32 farp_reply_recv; | ||
62 | u32 farp_reject_sent; | ||
63 | u32 farp_reject_recv; | ||
64 | }; | ||
65 | |||
66 | struct bfa_ipfc_attr_s { | ||
67 | bfa_boolean_t enabled; | ||
68 | }; | ||
69 | |||
70 | #endif /* __BFA_DEFS_IPFC_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_itnim.h b/drivers/scsi/bfa/include/defs/bfa_defs_itnim.h deleted file mode 100644 index d77788b3999a..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_itnim.h +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_ITNIM_H__ | ||
18 | #define __BFA_DEFS_ITNIM_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | #include <protocol/types.h> | ||
22 | |||
23 | /** | ||
24 | * FCS itnim states | ||
25 | */ | ||
26 | enum bfa_itnim_state { | ||
27 | BFA_ITNIM_OFFLINE = 0, /* offline */ | ||
28 | BFA_ITNIM_PRLI_SEND = 1, /* prli send */ | ||
29 | BFA_ITNIM_PRLI_SENT = 2, /* prli sent */ | ||
30 | BFA_ITNIM_PRLI_RETRY = 3, /* prli retry */ | ||
31 | BFA_ITNIM_HCB_ONLINE = 4, /* online callback */ | ||
32 | BFA_ITNIM_ONLINE = 5, /* online */ | ||
33 | BFA_ITNIM_HCB_OFFLINE = 6, /* offline callback */ | ||
34 | BFA_ITNIM_INITIATIOR = 7, /* initiator */ | ||
35 | }; | ||
36 | |||
37 | struct bfa_itnim_latency_s { | ||
38 | u32 min; | ||
39 | u32 max; | ||
40 | u32 count; | ||
41 | u32 clock_res; | ||
42 | u32 avg; | ||
43 | u32 rsvd; | ||
44 | }; | ||
45 | |||
46 | struct bfa_itnim_hal_stats_s { | ||
47 | u32 onlines; /* ITN nexus onlines (PRLI done) */ | ||
48 | u32 offlines; /* ITN Nexus offlines */ | ||
49 | u32 creates; /* ITN create requests */ | ||
50 | u32 deletes; /* ITN delete requests */ | ||
51 | u32 create_comps; /* ITN create completions */ | ||
52 | u32 delete_comps; /* ITN delete completions */ | ||
53 | u32 sler_events; /* SLER (sequence level error | ||
54 | * recovery) events */ | ||
55 | u32 ioc_disabled; /* Num IOC disables */ | ||
56 | u32 cleanup_comps; /* ITN cleanup completions */ | ||
57 | u32 tm_cmnds; /* task management(TM) cmnds sent */ | ||
58 | u32 tm_fw_rsps; /* TM cmds firmware responses */ | ||
59 | u32 tm_success; /* TM successes */ | ||
60 | u32 tm_failures; /* TM failures */ | ||
61 | u32 tm_io_comps; /* TM IO completions */ | ||
62 | u32 tm_qresumes; /* TM queue resumes (after waiting | ||
63 | * for resources) | ||
64 | */ | ||
65 | u32 tm_iocdowns; /* TM cmnds affected by IOC down */ | ||
66 | u32 tm_cleanups; /* TM cleanups */ | ||
67 | u32 tm_cleanup_comps; | ||
68 | /* TM cleanup completions */ | ||
69 | u32 ios; /* IO requests */ | ||
70 | u32 io_comps; /* IO completions */ | ||
71 | u64 input_reqs; /* INPUT requests */ | ||
72 | u64 output_reqs; /* OUTPUT requests */ | ||
73 | }; | ||
74 | |||
75 | /** | ||
76 | * FCS remote port statistics | ||
77 | */ | ||
78 | struct bfa_itnim_stats_s { | ||
79 | u32 onlines; /* num rport online */ | ||
80 | u32 offlines; /* num rport offline */ | ||
81 | u32 prli_sent; /* num prli sent out */ | ||
82 | u32 fcxp_alloc_wait;/* num fcxp alloc waits */ | ||
83 | u32 prli_rsp_err; /* num prli rsp errors */ | ||
84 | u32 prli_rsp_acc; /* num prli rsp accepts */ | ||
85 | u32 initiator; /* rport is an initiator */ | ||
86 | u32 prli_rsp_parse_err; /* prli rsp parsing errors */ | ||
87 | u32 prli_rsp_rjt; /* num prli rsp rejects */ | ||
88 | u32 timeout; /* num timeouts detected */ | ||
89 | u32 sler; /* num sler notification from BFA */ | ||
90 | u32 rsvd; | ||
91 | struct bfa_itnim_hal_stats_s hal_stats; | ||
92 | }; | ||
93 | |||
94 | /** | ||
95 | * FCS itnim attributes returned in queries | ||
96 | */ | ||
97 | struct bfa_itnim_attr_s { | ||
98 | enum bfa_itnim_state state; /* FCS itnim state */ | ||
99 | u8 retry; /* data retransmision support */ | ||
100 | u8 task_retry_id; /* task retry ident support */ | ||
101 | u8 rec_support; /* REC supported */ | ||
102 | u8 conf_comp; /* confirmed completion supp */ | ||
103 | struct bfa_itnim_latency_s io_latency; /* IO latency */ | ||
104 | }; | ||
105 | |||
106 | /** | ||
107 | * BFA ITNIM events. | ||
108 | * Arguments below are in BFAL context from Mgmt | ||
109 | * BFA_ITNIM_AEN_NEW: [in]: None [out]: vf_id, lpwwn | ||
110 | * BFA_ITNIM_AEN_DELETE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets), | ||
111 | * [out]: vf_id, ppwwn, lpwwn, rpwwn | ||
112 | * BFA_ITNIM_AEN_ONLINE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets), | ||
113 | * [out]: vf_id, ppwwn, lpwwn, rpwwn | ||
114 | * BFA_ITNIM_AEN_OFFLINE: [in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets), | ||
115 | * [out]: vf_id, ppwwn, lpwwn, rpwwn | ||
116 | * BFA_ITNIM_AEN_DISCONNECT:[in]: vf_id, lpwwn, rpwwn (0 = all fcp4 targets), | ||
117 | * [out]: vf_id, ppwwn, lpwwn, rpwwn | ||
118 | */ | ||
119 | enum bfa_itnim_aen_event { | ||
120 | BFA_ITNIM_AEN_ONLINE = 1, /* Target online */ | ||
121 | BFA_ITNIM_AEN_OFFLINE = 2, /* Target offline */ | ||
122 | BFA_ITNIM_AEN_DISCONNECT = 3, /* Target disconnected */ | ||
123 | }; | ||
124 | |||
125 | /** | ||
126 | * BFA ITNIM event data structure. | ||
127 | */ | ||
128 | struct bfa_itnim_aen_data_s { | ||
129 | u16 vf_id; /* vf_id of the IT nexus */ | ||
130 | u16 rsvd[3]; | ||
131 | wwn_t ppwwn; /* WWN of its physical port */ | ||
132 | wwn_t lpwwn; /* WWN of logical port */ | ||
133 | wwn_t rpwwn; /* WWN of remote(target) port */ | ||
134 | }; | ||
135 | |||
136 | #endif /* __BFA_DEFS_ITNIM_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_led.h b/drivers/scsi/bfa/include/defs/bfa_defs_led.h deleted file mode 100644 index 62039273264e..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_led.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_LED_H__ | ||
19 | #define __BFA_DEFS_LED_H__ | ||
20 | |||
21 | #define BFA_LED_MAX_NUM 3 | ||
22 | |||
23 | enum bfa_led_op { | ||
24 | BFA_LED_OFF = 0, | ||
25 | BFA_LED_ON = 1, | ||
26 | BFA_LED_FLICK = 2, | ||
27 | BFA_LED_BLINK = 3, | ||
28 | }; | ||
29 | |||
30 | enum bfa_led_color { | ||
31 | BFA_LED_GREEN = 0, | ||
32 | BFA_LED_AMBER = 1, | ||
33 | }; | ||
34 | |||
35 | #endif /* __BFA_DEFS_LED_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_lport.h b/drivers/scsi/bfa/include/defs/bfa_defs_lport.h deleted file mode 100644 index 0952a139c47c..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_lport.h +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_LPORT_H__ | ||
19 | #define __BFA_DEFS_LPORT_H__ | ||
20 | |||
21 | #include <defs/bfa_defs_types.h> | ||
22 | #include <defs/bfa_defs_port.h> | ||
23 | |||
24 | /** | ||
25 | * BFA AEN logical port events. | ||
26 | * Arguments below are in BFAL context from Mgmt | ||
27 | * BFA_LPORT_AEN_NEW: [in]: None [out]: vf_id, ppwwn, lpwwn, roles | ||
28 | * BFA_LPORT_AEN_DELETE: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
29 | * BFA_LPORT_AEN_ONLINE: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
30 | * BFA_LPORT_AEN_OFFLINE: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
31 | * BFA_LPORT_AEN_DISCONNECT:[in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
32 | * BFA_LPORT_AEN_NEW_PROP: [in]: None [out]: vf_id, ppwwn. lpwwn, roles | ||
33 | * BFA_LPORT_AEN_DELETE_PROP: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
34 | * BFA_LPORT_AEN_NEW_STANDARD: [in]: None [out]: vf_id, ppwwn. lpwwn, roles | ||
35 | * BFA_LPORT_AEN_DELETE_STANDARD: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
36 | * BFA_LPORT_AEN_NPIV_DUP_WWN: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
37 | * BFA_LPORT_AEN_NPIV_FABRIC_MAX: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
38 | * BFA_LPORT_AEN_NPIV_UNKNOWN: [in]: lpwwn [out]: vf_id, ppwwn. lpwwn, roles | ||
39 | */ | ||
40 | enum bfa_lport_aen_event { | ||
41 | BFA_LPORT_AEN_NEW = 1, /* LPort created event */ | ||
42 | BFA_LPORT_AEN_DELETE = 2, /* LPort deleted event */ | ||
43 | BFA_LPORT_AEN_ONLINE = 3, /* LPort online event */ | ||
44 | BFA_LPORT_AEN_OFFLINE = 4, /* LPort offline event */ | ||
45 | BFA_LPORT_AEN_DISCONNECT = 5, /* LPort disconnect event */ | ||
46 | BFA_LPORT_AEN_NEW_PROP = 6, /* VPort created event */ | ||
47 | BFA_LPORT_AEN_DELETE_PROP = 7, /* VPort deleted event */ | ||
48 | BFA_LPORT_AEN_NEW_STANDARD = 8, /* VPort created event */ | ||
49 | BFA_LPORT_AEN_DELETE_STANDARD = 9, /* VPort deleted event */ | ||
50 | BFA_LPORT_AEN_NPIV_DUP_WWN = 10, /* VPort configured with | ||
51 | * duplicate WWN event | ||
52 | */ | ||
53 | BFA_LPORT_AEN_NPIV_FABRIC_MAX = 11, /* Max NPIV in fabric/fport */ | ||
54 | BFA_LPORT_AEN_NPIV_UNKNOWN = 12, /* Unknown NPIV Error code event */ | ||
55 | }; | ||
56 | |||
57 | /** | ||
58 | * BFA AEN event data structure | ||
59 | */ | ||
60 | struct bfa_lport_aen_data_s { | ||
61 | u16 vf_id; /* vf_id of this logical port */ | ||
62 | s16 roles; /* Logical port mode,IM/TM/IP etc */ | ||
63 | u32 rsvd; | ||
64 | wwn_t ppwwn; /* WWN of its physical port */ | ||
65 | wwn_t lpwwn; /* WWN of this logical port */ | ||
66 | }; | ||
67 | |||
68 | #endif /* __BFA_DEFS_LPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_mfg.h b/drivers/scsi/bfa/include/defs/bfa_defs_mfg.h deleted file mode 100644 index d22fb7909643..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_mfg.h +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_MFG_H__ | ||
18 | #define __BFA_DEFS_MFG_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | |||
22 | /** | ||
23 | * Manufacturing block version | ||
24 | */ | ||
25 | #define BFA_MFG_VERSION 2 | ||
26 | |||
27 | /** | ||
28 | * Manufacturing block encrypted version | ||
29 | */ | ||
30 | #define BFA_MFG_ENC_VER 2 | ||
31 | |||
32 | /** | ||
33 | * Manufacturing block version 1 length | ||
34 | */ | ||
35 | #define BFA_MFG_VER1_LEN 128 | ||
36 | |||
37 | /** | ||
38 | * Manufacturing block header length | ||
39 | */ | ||
40 | #define BFA_MFG_HDR_LEN 4 | ||
41 | |||
42 | /** | ||
43 | * Checksum size | ||
44 | */ | ||
45 | #define BFA_MFG_CHKSUM_SIZE 16 | ||
46 | |||
47 | /** | ||
48 | * Manufacturing block format | ||
49 | */ | ||
50 | #define BFA_MFG_SERIALNUM_SIZE 11 | ||
51 | #define BFA_MFG_PARTNUM_SIZE 14 | ||
52 | #define BFA_MFG_SUPPLIER_ID_SIZE 10 | ||
53 | #define BFA_MFG_SUPPLIER_PARTNUM_SIZE 20 | ||
54 | #define BFA_MFG_SUPPLIER_SERIALNUM_SIZE 20 | ||
55 | #define BFA_MFG_SUPPLIER_REVISION_SIZE 4 | ||
56 | #define STRSZ(_n) (((_n) + 4) & ~3) | ||
57 | |||
58 | /** | ||
59 | * Manufacturing card type | ||
60 | */ | ||
61 | enum { | ||
62 | BFA_MFG_TYPE_CB_MAX = 825, /* Crossbow card type max */ | ||
63 | BFA_MFG_TYPE_FC8P2 = 825, /* 8G 2port FC card */ | ||
64 | BFA_MFG_TYPE_FC8P1 = 815, /* 8G 1port FC card */ | ||
65 | BFA_MFG_TYPE_FC4P2 = 425, /* 4G 2port FC card */ | ||
66 | BFA_MFG_TYPE_FC4P1 = 415, /* 4G 1port FC card */ | ||
67 | BFA_MFG_TYPE_CNA10P2 = 1020, /* 10G 2port CNA card */ | ||
68 | BFA_MFG_TYPE_CNA10P1 = 1010, /* 10G 1port CNA card */ | ||
69 | BFA_MFG_TYPE_JAYHAWK = 804, /* Jayhawk mezz card */ | ||
70 | BFA_MFG_TYPE_WANCHESE = 1007, /* Wanchese mezz card */ | ||
71 | BFA_MFG_TYPE_INVALID = 0, /* Invalid card type */ | ||
72 | }; | ||
73 | |||
74 | #pragma pack(1) | ||
75 | |||
76 | /** | ||
77 | * Card type to port number conversion | ||
78 | */ | ||
79 | #define bfa_mfg_type2port_num(card_type) (((card_type) / 10) % 10) | ||
80 | |||
81 | /** | ||
82 | * Check if Mezz card | ||
83 | */ | ||
84 | #define bfa_mfg_is_mezz(type) (( \ | ||
85 | (type) == BFA_MFG_TYPE_JAYHAWK || \ | ||
86 | (type) == BFA_MFG_TYPE_WANCHESE)) | ||
87 | |||
88 | /** | ||
89 | * Check if card type valid | ||
90 | */ | ||
91 | #define bfa_mfg_is_card_type_valid(type) (( \ | ||
92 | (type) == BFA_MFG_TYPE_FC8P2 || \ | ||
93 | (type) == BFA_MFG_TYPE_FC8P1 || \ | ||
94 | (type) == BFA_MFG_TYPE_FC4P2 || \ | ||
95 | (type) == BFA_MFG_TYPE_FC4P1 || \ | ||
96 | (type) == BFA_MFG_TYPE_CNA10P2 || \ | ||
97 | (type) == BFA_MFG_TYPE_CNA10P1 || \ | ||
98 | bfa_mfg_is_mezz(type))) | ||
99 | |||
100 | /** | ||
101 | * All numerical fields are in big-endian format. | ||
102 | */ | ||
103 | struct bfa_mfg_block_s { | ||
104 | }; | ||
105 | |||
106 | /** | ||
107 | * VPD data length | ||
108 | */ | ||
109 | #define BFA_MFG_VPD_LEN 512 | ||
110 | |||
111 | #define BFA_MFG_VPD_PCI_HDR_OFF 137 | ||
112 | #define BFA_MFG_VPD_PCI_VER_MASK 0x07 /* version mask 3 bits */ | ||
113 | #define BFA_MFG_VPD_PCI_VDR_MASK 0xf8 /* vendor mask 5 bits */ | ||
114 | |||
115 | /** | ||
116 | * VPD vendor tag | ||
117 | */ | ||
118 | enum { | ||
119 | BFA_MFG_VPD_UNKNOWN = 0, /* vendor unknown */ | ||
120 | BFA_MFG_VPD_IBM = 1, /* vendor IBM */ | ||
121 | BFA_MFG_VPD_HP = 2, /* vendor HP */ | ||
122 | BFA_MFG_VPD_DELL = 3, /* vendor DELL */ | ||
123 | BFA_MFG_VPD_PCI_IBM = 0x08, /* PCI VPD IBM */ | ||
124 | BFA_MFG_VPD_PCI_HP = 0x10, /* PCI VPD HP */ | ||
125 | BFA_MFG_VPD_PCI_DELL = 0x20, /* PCI VPD DELL */ | ||
126 | BFA_MFG_VPD_PCI_BRCD = 0xf8, /* PCI VPD Brocade */ | ||
127 | }; | ||
128 | |||
129 | /** | ||
130 | * All numerical fields are in big-endian format. | ||
131 | */ | ||
132 | struct bfa_mfg_vpd_s { | ||
133 | u8 version; /* vpd data version */ | ||
134 | u8 vpd_sig[3]; /* characters 'V', 'P', 'D' */ | ||
135 | u8 chksum; /* u8 checksum */ | ||
136 | u8 vendor; /* vendor */ | ||
137 | u8 len; /* vpd data length excluding header */ | ||
138 | u8 rsv; | ||
139 | u8 data[BFA_MFG_VPD_LEN]; /* vpd data */ | ||
140 | }; | ||
141 | |||
142 | #pragma pack() | ||
143 | |||
144 | #endif /* __BFA_DEFS_MFG_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_pci.h b/drivers/scsi/bfa/include/defs/bfa_defs_pci.h deleted file mode 100644 index ea7d89bbc0bb..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_pci.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_PCI_H__ | ||
19 | #define __BFA_DEFS_PCI_H__ | ||
20 | |||
21 | /** | ||
22 | * PCI device and vendor ID information | ||
23 | */ | ||
24 | enum { | ||
25 | BFA_PCI_VENDOR_ID_BROCADE = 0x1657, | ||
26 | BFA_PCI_DEVICE_ID_FC_8G2P = 0x13, | ||
27 | BFA_PCI_DEVICE_ID_FC_8G1P = 0x17, | ||
28 | BFA_PCI_DEVICE_ID_CT = 0x14, | ||
29 | BFA_PCI_DEVICE_ID_CT_FC = 0x21, | ||
30 | }; | ||
31 | |||
32 | #define bfa_asic_id_ct(devid) \ | ||
33 | ((devid) == BFA_PCI_DEVICE_ID_CT || \ | ||
34 | (devid) == BFA_PCI_DEVICE_ID_CT_FC) | ||
35 | |||
36 | /** | ||
37 | * PCI sub-system device and vendor ID information | ||
38 | */ | ||
39 | enum { | ||
40 | BFA_PCI_FCOE_SSDEVICE_ID = 0x14, | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * Maximum number of device address ranges mapped through different BAR(s) | ||
45 | */ | ||
46 | #define BFA_PCI_ACCESS_RANGES 1 | ||
47 | |||
48 | #endif /* __BFA_DEFS_PCI_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_pm.h b/drivers/scsi/bfa/include/defs/bfa_defs_pm.h deleted file mode 100644 index e8d6d959006e..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_pm.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_PM_H__ | ||
19 | #define __BFA_DEFS_PM_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | |||
23 | /** | ||
24 | * BFA power management device states | ||
25 | */ | ||
26 | enum bfa_pm_ds { | ||
27 | BFA_PM_DS_D0 = 0, /* full power mode */ | ||
28 | BFA_PM_DS_D1 = 1, /* power save state 1 */ | ||
29 | BFA_PM_DS_D2 = 2, /* power save state 2 */ | ||
30 | BFA_PM_DS_D3 = 3, /* power off state */ | ||
31 | }; | ||
32 | |||
33 | #endif /* __BFA_DEFS_PM_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_pom.h b/drivers/scsi/bfa/include/defs/bfa_defs_pom.h deleted file mode 100644 index d9fa278472b7..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_pom.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_POM_H__ | ||
18 | #define __BFA_DEFS_POM_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | #include <defs/bfa_defs_types.h> | ||
22 | |||
23 | /** | ||
24 | * POM health status levels for each attributes. | ||
25 | */ | ||
26 | enum bfa_pom_entry_health { | ||
27 | BFA_POM_HEALTH_NOINFO = 1, /* no information */ | ||
28 | BFA_POM_HEALTH_NORMAL = 2, /* health is normal */ | ||
29 | BFA_POM_HEALTH_WARNING = 3, /* warning level */ | ||
30 | BFA_POM_HEALTH_ALARM = 4, /* alarming level */ | ||
31 | }; | ||
32 | |||
33 | /** | ||
34 | * Reading of temperature/voltage/current/power | ||
35 | */ | ||
36 | struct bfa_pom_entry_s { | ||
37 | enum bfa_pom_entry_health health; /* POM entry health */ | ||
38 | u32 curr_value; /* current value */ | ||
39 | u32 thr_warn_high; /* threshold warning high */ | ||
40 | u32 thr_warn_low; /* threshold warning low */ | ||
41 | u32 thr_alarm_low; /* threshold alaram low */ | ||
42 | u32 thr_alarm_high; /* threshold alarm high */ | ||
43 | }; | ||
44 | |||
45 | /** | ||
46 | * POM attributes | ||
47 | */ | ||
48 | struct bfa_pom_attr_s { | ||
49 | struct bfa_pom_entry_s temperature; /* centigrade */ | ||
50 | struct bfa_pom_entry_s voltage; /* volts */ | ||
51 | struct bfa_pom_entry_s curr; /* milli amps */ | ||
52 | struct bfa_pom_entry_s txpower; /* micro watts */ | ||
53 | struct bfa_pom_entry_s rxpower; /* micro watts */ | ||
54 | }; | ||
55 | |||
56 | #endif /* __BFA_DEFS_POM_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_port.h b/drivers/scsi/bfa/include/defs/bfa_defs_port.h deleted file mode 100644 index ebdf0d1731a4..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_port.h +++ /dev/null | |||
@@ -1,248 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_PORT_H__ | ||
19 | #define __BFA_DEFS_PORT_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | #include <protocol/types.h> | ||
23 | #include <defs/bfa_defs_pport.h> | ||
24 | #include <defs/bfa_defs_ioc.h> | ||
25 | |||
26 | #define BFA_FCS_FABRIC_IPADDR_SZ 16 | ||
27 | |||
28 | /** | ||
29 | * symbolic names for base port/virtual port | ||
30 | */ | ||
31 | #define BFA_SYMNAME_MAXLEN 128 /* vmware/windows uses 128 bytes */ | ||
32 | struct bfa_port_symname_s { | ||
33 | char symname[BFA_SYMNAME_MAXLEN]; | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * Roles of FCS port: | ||
38 | * - FCP IM and FCP TM roles cannot be enabled together for a FCS port | ||
39 | * - Create multiple ports if both IM and TM functions required. | ||
40 | * - Atleast one role must be specified. | ||
41 | */ | ||
42 | enum bfa_port_role { | ||
43 | BFA_PORT_ROLE_FCP_IM = 0x01, /* FCP initiator role */ | ||
44 | BFA_PORT_ROLE_FCP_TM = 0x02, /* FCP target role */ | ||
45 | BFA_PORT_ROLE_FCP_IPFC = 0x04, /* IP over FC role */ | ||
46 | BFA_PORT_ROLE_FCP_MAX = BFA_PORT_ROLE_FCP_IPFC | BFA_PORT_ROLE_FCP_IM | ||
47 | }; | ||
48 | |||
49 | /** | ||
50 | * FCS port configuration. | ||
51 | */ | ||
52 | struct bfa_port_cfg_s { | ||
53 | wwn_t pwwn; /* port wwn */ | ||
54 | wwn_t nwwn; /* node wwn */ | ||
55 | struct bfa_port_symname_s sym_name; /* vm port symbolic name */ | ||
56 | bfa_boolean_t preboot_vp; /* vport created from PBC */ | ||
57 | enum bfa_port_role roles; /* FCS port roles */ | ||
58 | u8 tag[16]; /* opaque tag from application */ | ||
59 | }; | ||
60 | |||
61 | /** | ||
62 | * FCS port states | ||
63 | */ | ||
64 | enum bfa_port_state { | ||
65 | BFA_PORT_UNINIT = 0, /* PORT is not yet initialized */ | ||
66 | BFA_PORT_FDISC = 1, /* FDISC is in progress */ | ||
67 | BFA_PORT_ONLINE = 2, /* login to fabric is complete */ | ||
68 | BFA_PORT_OFFLINE = 3, /* No login to fabric */ | ||
69 | }; | ||
70 | |||
71 | /** | ||
72 | * FCS port type. Required for VmWare. | ||
73 | */ | ||
74 | enum bfa_port_type { | ||
75 | BFA_PORT_TYPE_PHYSICAL = 0, | ||
76 | BFA_PORT_TYPE_VIRTUAL, | ||
77 | }; | ||
78 | |||
79 | /** | ||
80 | * FCS port offline reason. Required for VmWare. | ||
81 | */ | ||
82 | enum bfa_port_offline_reason { | ||
83 | BFA_PORT_OFFLINE_UNKNOWN = 0, | ||
84 | BFA_PORT_OFFLINE_LINKDOWN, | ||
85 | BFA_PORT_OFFLINE_FAB_UNSUPPORTED, /* NPIV not supported by the | ||
86 | * fabric */ | ||
87 | BFA_PORT_OFFLINE_FAB_NORESOURCES, | ||
88 | BFA_PORT_OFFLINE_FAB_LOGOUT, | ||
89 | }; | ||
90 | |||
91 | /** | ||
92 | * FCS lport info. Required for VmWare. | ||
93 | */ | ||
94 | struct bfa_port_info_s { | ||
95 | u8 port_type; /* bfa_port_type_t : physical or | ||
96 | * virtual */ | ||
97 | u8 port_state; /* one of bfa_port_state values */ | ||
98 | u8 offline_reason; /* one of bfa_port_offline_reason_t | ||
99 | * values */ | ||
100 | wwn_t port_wwn; | ||
101 | wwn_t node_wwn; | ||
102 | |||
103 | /* | ||
104 | * following 4 feilds are valid for Physical Ports only | ||
105 | */ | ||
106 | u32 max_vports_supp; /* Max supported vports */ | ||
107 | u32 num_vports_inuse; /* Num of in use vports */ | ||
108 | u32 max_rports_supp; /* Max supported rports */ | ||
109 | u32 num_rports_inuse; /* Num of doscovered rports */ | ||
110 | |||
111 | }; | ||
112 | |||
113 | /** | ||
114 | * FCS port statistics | ||
115 | */ | ||
116 | struct bfa_port_stats_s { | ||
117 | u32 ns_plogi_sent; | ||
118 | u32 ns_plogi_rsp_err; | ||
119 | u32 ns_plogi_acc_err; | ||
120 | u32 ns_plogi_accepts; | ||
121 | u32 ns_rejects; /* NS command rejects */ | ||
122 | u32 ns_plogi_unknown_rsp; | ||
123 | u32 ns_plogi_alloc_wait; | ||
124 | |||
125 | u32 ns_retries; /* NS command retries */ | ||
126 | u32 ns_timeouts; /* NS command timeouts */ | ||
127 | |||
128 | u32 ns_rspnid_sent; | ||
129 | u32 ns_rspnid_accepts; | ||
130 | u32 ns_rspnid_rsp_err; | ||
131 | u32 ns_rspnid_rejects; | ||
132 | u32 ns_rspnid_alloc_wait; | ||
133 | |||
134 | u32 ns_rftid_sent; | ||
135 | u32 ns_rftid_accepts; | ||
136 | u32 ns_rftid_rsp_err; | ||
137 | u32 ns_rftid_rejects; | ||
138 | u32 ns_rftid_alloc_wait; | ||
139 | |||
140 | u32 ns_rffid_sent; | ||
141 | u32 ns_rffid_accepts; | ||
142 | u32 ns_rffid_rsp_err; | ||
143 | u32 ns_rffid_rejects; | ||
144 | u32 ns_rffid_alloc_wait; | ||
145 | |||
146 | u32 ns_gidft_sent; | ||
147 | u32 ns_gidft_accepts; | ||
148 | u32 ns_gidft_rsp_err; | ||
149 | u32 ns_gidft_rejects; | ||
150 | u32 ns_gidft_unknown_rsp; | ||
151 | u32 ns_gidft_alloc_wait; | ||
152 | |||
153 | /* | ||
154 | * Mgmt Server stats | ||
155 | */ | ||
156 | u32 ms_retries; /* MS command retries */ | ||
157 | u32 ms_timeouts; /* MS command timeouts */ | ||
158 | u32 ms_plogi_sent; | ||
159 | u32 ms_plogi_rsp_err; | ||
160 | u32 ms_plogi_acc_err; | ||
161 | u32 ms_plogi_accepts; | ||
162 | u32 ms_rejects; /* MS command rejects */ | ||
163 | u32 ms_plogi_unknown_rsp; | ||
164 | u32 ms_plogi_alloc_wait; | ||
165 | |||
166 | u32 num_rscn; /* Num of RSCN received */ | ||
167 | u32 num_portid_rscn;/* Num portid format RSCN | ||
168 | * received */ | ||
169 | |||
170 | u32 uf_recvs; /* unsolicited recv frames */ | ||
171 | u32 uf_recv_drops; /* dropped received frames */ | ||
172 | |||
173 | u32 rsvd; /* padding for 64 bit alignment */ | ||
174 | }; | ||
175 | |||
176 | /** | ||
177 | * BFA port attribute returned in queries | ||
178 | */ | ||
179 | struct bfa_port_attr_s { | ||
180 | enum bfa_port_state state; /* port state */ | ||
181 | u32 pid; /* port ID */ | ||
182 | struct bfa_port_cfg_s port_cfg; /* port configuration */ | ||
183 | enum bfa_pport_type port_type; /* current topology */ | ||
184 | u32 loopback; /* cable is externally looped back */ | ||
185 | wwn_t fabric_name; /* attached switch's nwwn */ | ||
186 | u8 fabric_ip_addr[BFA_FCS_FABRIC_IPADDR_SZ]; /* attached | ||
187 | * fabric's ip addr */ | ||
188 | struct mac_s fpma_mac; /* Lport's FPMA Mac address */ | ||
189 | u16 authfail; /* auth failed state */ | ||
190 | }; | ||
191 | |||
192 | /** | ||
193 | * BFA physical port Level events | ||
194 | * Arguments below are in BFAL context from Mgmt | ||
195 | * BFA_PORT_AEN_ONLINE: [in]: pwwn [out]: pwwn | ||
196 | * BFA_PORT_AEN_OFFLINE: [in]: pwwn [out]: pwwn | ||
197 | * BFA_PORT_AEN_RLIR: [in]: None [out]: pwwn, rlir_data, rlir_len | ||
198 | * BFA_PORT_AEN_SFP_INSERT: [in]: pwwn [out]: port_id, pwwn | ||
199 | * BFA_PORT_AEN_SFP_REMOVE: [in]: pwwn [out]: port_id, pwwn | ||
200 | * BFA_PORT_AEN_SFP_POM: [in]: pwwn [out]: level, port_id, pwwn | ||
201 | * BFA_PORT_AEN_ENABLE: [in]: pwwn [out]: pwwn | ||
202 | * BFA_PORT_AEN_DISABLE: [in]: pwwn [out]: pwwn | ||
203 | * BFA_PORT_AEN_AUTH_ON: [in]: pwwn [out]: pwwn | ||
204 | * BFA_PORT_AEN_AUTH_OFF: [in]: pwwn [out]: pwwn | ||
205 | * BFA_PORT_AEN_DISCONNECT: [in]: pwwn [out]: pwwn | ||
206 | * BFA_PORT_AEN_QOS_NEG: [in]: pwwn [out]: pwwn | ||
207 | * BFA_PORT_AEN_FABRIC_NAME_CHANGE: [in]: pwwn, [out]: pwwn, fwwn | ||
208 | * | ||
209 | */ | ||
210 | enum bfa_port_aen_event { | ||
211 | BFA_PORT_AEN_ONLINE = 1, /* Physical Port online event */ | ||
212 | BFA_PORT_AEN_OFFLINE = 2, /* Physical Port offline event */ | ||
213 | BFA_PORT_AEN_RLIR = 3, /* RLIR event, not supported */ | ||
214 | BFA_PORT_AEN_SFP_INSERT = 4, /* SFP inserted event */ | ||
215 | BFA_PORT_AEN_SFP_REMOVE = 5, /* SFP removed event */ | ||
216 | BFA_PORT_AEN_SFP_POM = 6, /* SFP POM event */ | ||
217 | BFA_PORT_AEN_ENABLE = 7, /* Physical Port enable event */ | ||
218 | BFA_PORT_AEN_DISABLE = 8, /* Physical Port disable event */ | ||
219 | BFA_PORT_AEN_AUTH_ON = 9, /* Physical Port auth success event */ | ||
220 | BFA_PORT_AEN_AUTH_OFF = 10, /* Physical Port auth fail event */ | ||
221 | BFA_PORT_AEN_DISCONNECT = 11, /* Physical Port disconnect event */ | ||
222 | BFA_PORT_AEN_QOS_NEG = 12, /* Base Port QOS negotiation event */ | ||
223 | BFA_PORT_AEN_FABRIC_NAME_CHANGE = 13, /* Fabric Name/WWN change | ||
224 | * event */ | ||
225 | BFA_PORT_AEN_SFP_ACCESS_ERROR = 14, /* SFP read error event */ | ||
226 | BFA_PORT_AEN_SFP_UNSUPPORT = 15, /* Unsupported SFP event */ | ||
227 | }; | ||
228 | |||
229 | enum bfa_port_aen_sfp_pom { | ||
230 | BFA_PORT_AEN_SFP_POM_GREEN = 1, /* Normal */ | ||
231 | BFA_PORT_AEN_SFP_POM_AMBER = 2, /* Warning */ | ||
232 | BFA_PORT_AEN_SFP_POM_RED = 3, /* Critical */ | ||
233 | BFA_PORT_AEN_SFP_POM_MAX = BFA_PORT_AEN_SFP_POM_RED | ||
234 | }; | ||
235 | |||
236 | struct bfa_port_aen_data_s { | ||
237 | wwn_t pwwn; /* WWN of the physical port */ | ||
238 | wwn_t fwwn; /* WWN of the fabric port */ | ||
239 | s32 phy_port_num; /*! For SFP related events */ | ||
240 | s16 ioc_type; | ||
241 | s16 level; /* Only transitions will | ||
242 | * be informed */ | ||
243 | struct mac_s mac; /* MAC address of the ethernet port, | ||
244 | * applicable to CNA port only */ | ||
245 | s16 rsvd; | ||
246 | }; | ||
247 | |||
248 | #endif /* __BFA_DEFS_PORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h b/drivers/scsi/bfa/include/defs/bfa_defs_pport.h deleted file mode 100644 index 2de675839c2f..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h +++ /dev/null | |||
@@ -1,393 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_PPORT_H__ | ||
19 | #define __BFA_DEFS_PPORT_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | #include <protocol/fc.h> | ||
23 | #include <defs/bfa_defs_types.h> | ||
24 | #include <defs/bfa_defs_qos.h> | ||
25 | #include <cna/pstats/phyport_defs.h> | ||
26 | |||
27 | /* Modify char* port_stt[] in bfal_port.c if a new state was added */ | ||
28 | enum bfa_pport_states { | ||
29 | BFA_PPORT_ST_UNINIT = 1, | ||
30 | BFA_PPORT_ST_ENABLING_QWAIT = 2, | ||
31 | BFA_PPORT_ST_ENABLING = 3, | ||
32 | BFA_PPORT_ST_LINKDOWN = 4, | ||
33 | BFA_PPORT_ST_LINKUP = 5, | ||
34 | BFA_PPORT_ST_DISABLING_QWAIT = 6, | ||
35 | BFA_PPORT_ST_DISABLING = 7, | ||
36 | BFA_PPORT_ST_DISABLED = 8, | ||
37 | BFA_PPORT_ST_STOPPED = 9, | ||
38 | BFA_PPORT_ST_IOCDOWN = 10, | ||
39 | BFA_PPORT_ST_IOCDIS = 11, | ||
40 | BFA_PPORT_ST_FWMISMATCH = 12, | ||
41 | BFA_PPORT_ST_PREBOOT_DISABLED = 13, | ||
42 | BFA_PPORT_ST_MAX_STATE, | ||
43 | }; | ||
44 | |||
45 | /** | ||
46 | * Port speed settings. Each specific speed is a bit field. Use multiple | ||
47 | * bits to specify speeds to be selected for auto-negotiation. | ||
48 | */ | ||
49 | enum bfa_pport_speed { | ||
50 | BFA_PPORT_SPEED_UNKNOWN = 0, | ||
51 | BFA_PPORT_SPEED_1GBPS = 1, | ||
52 | BFA_PPORT_SPEED_2GBPS = 2, | ||
53 | BFA_PPORT_SPEED_4GBPS = 4, | ||
54 | BFA_PPORT_SPEED_8GBPS = 8, | ||
55 | BFA_PPORT_SPEED_10GBPS = 10, | ||
56 | BFA_PPORT_SPEED_AUTO = | ||
57 | (BFA_PPORT_SPEED_1GBPS | BFA_PPORT_SPEED_2GBPS | | ||
58 | BFA_PPORT_SPEED_4GBPS | BFA_PPORT_SPEED_8GBPS), | ||
59 | }; | ||
60 | |||
61 | /** | ||
62 | * Port operational type (in sync with SNIA port type). | ||
63 | */ | ||
64 | enum bfa_pport_type { | ||
65 | BFA_PPORT_TYPE_UNKNOWN = 1, /* port type is unknown */ | ||
66 | BFA_PPORT_TYPE_TRUNKED = 2, /* Trunked mode */ | ||
67 | BFA_PPORT_TYPE_NPORT = 5, /* P2P with switched fabric */ | ||
68 | BFA_PPORT_TYPE_NLPORT = 6, /* public loop */ | ||
69 | BFA_PPORT_TYPE_LPORT = 20, /* private loop */ | ||
70 | BFA_PPORT_TYPE_P2P = 21, /* P2P with no switched fabric */ | ||
71 | BFA_PPORT_TYPE_VPORT = 22, /* NPIV - virtual port */ | ||
72 | }; | ||
73 | |||
74 | /** | ||
75 | * Port topology setting. A port's topology and fabric login status | ||
76 | * determine its operational type. | ||
77 | */ | ||
78 | enum bfa_pport_topology { | ||
79 | BFA_PPORT_TOPOLOGY_NONE = 0, /* No valid topology */ | ||
80 | BFA_PPORT_TOPOLOGY_P2P = 1, /* P2P only */ | ||
81 | BFA_PPORT_TOPOLOGY_LOOP = 2, /* LOOP topology */ | ||
82 | BFA_PPORT_TOPOLOGY_AUTO = 3, /* auto topology selection */ | ||
83 | }; | ||
84 | |||
85 | /** | ||
86 | * Physical port loopback types. | ||
87 | */ | ||
88 | enum bfa_pport_opmode { | ||
89 | BFA_PPORT_OPMODE_NORMAL = 0x00, /* normal non-loopback mode */ | ||
90 | BFA_PPORT_OPMODE_LB_INT = 0x01, /* internal loop back */ | ||
91 | BFA_PPORT_OPMODE_LB_SLW = 0x02, /* serial link wrapback (serdes) */ | ||
92 | BFA_PPORT_OPMODE_LB_EXT = 0x04, /* external loop back (serdes) */ | ||
93 | BFA_PPORT_OPMODE_LB_CBL = 0x08, /* cabled loop back */ | ||
94 | BFA_PPORT_OPMODE_LB_NLINT = 0x20, /* NL_Port internal loopback */ | ||
95 | }; | ||
96 | |||
97 | #define BFA_PPORT_OPMODE_LB_HARD(_mode) \ | ||
98 | ((_mode == BFA_PPORT_OPMODE_LB_INT) || \ | ||
99 | (_mode == BFA_PPORT_OPMODE_LB_SLW) || \ | ||
100 | (_mode == BFA_PPORT_OPMODE_LB_EXT)) | ||
101 | |||
102 | /** | ||
103 | Port State (in sync with SNIA port state). | ||
104 | */ | ||
105 | enum bfa_pport_snia_state { | ||
106 | BFA_PPORT_STATE_UNKNOWN = 1, /* port is not initialized */ | ||
107 | BFA_PPORT_STATE_ONLINE = 2, /* port is ONLINE */ | ||
108 | BFA_PPORT_STATE_DISABLED = 3, /* port is disabled by user */ | ||
109 | BFA_PPORT_STATE_BYPASSED = 4, /* port is bypassed (in LOOP) */ | ||
110 | BFA_PPORT_STATE_DIAG = 5, /* port diagnostics is active */ | ||
111 | BFA_PPORT_STATE_LINKDOWN = 6, /* link is down */ | ||
112 | BFA_PPORT_STATE_LOOPBACK = 8, /* port is looped back */ | ||
113 | }; | ||
114 | |||
115 | /** | ||
116 | * Port link state | ||
117 | */ | ||
118 | enum bfa_pport_linkstate { | ||
119 | BFA_PPORT_LINKUP = 1, /* Physical port/Trunk link up */ | ||
120 | BFA_PPORT_LINKDOWN = 2, /* Physical port/Trunk link down */ | ||
121 | BFA_PPORT_TRUNK_LINKDOWN = 3, /* Trunk link down (new tmaster) */ | ||
122 | }; | ||
123 | |||
124 | /** | ||
125 | * Port link state event | ||
126 | */ | ||
127 | #define bfa_pport_event_t enum bfa_pport_linkstate | ||
128 | |||
129 | /** | ||
130 | * Port link state reason code | ||
131 | */ | ||
132 | enum bfa_pport_linkstate_rsn { | ||
133 | BFA_PPORT_LINKSTATE_RSN_NONE = 0, | ||
134 | BFA_PPORT_LINKSTATE_RSN_DISABLED = 1, | ||
135 | BFA_PPORT_LINKSTATE_RSN_RX_NOS = 2, | ||
136 | BFA_PPORT_LINKSTATE_RSN_RX_OLS = 3, | ||
137 | BFA_PPORT_LINKSTATE_RSN_RX_LIP = 4, | ||
138 | BFA_PPORT_LINKSTATE_RSN_RX_LIPF7 = 5, | ||
139 | BFA_PPORT_LINKSTATE_RSN_SFP_REMOVED = 6, | ||
140 | BFA_PPORT_LINKSTATE_RSN_PORT_FAULT = 7, | ||
141 | BFA_PPORT_LINKSTATE_RSN_RX_LOS = 8, | ||
142 | BFA_PPORT_LINKSTATE_RSN_LOCAL_FAULT = 9, | ||
143 | BFA_PPORT_LINKSTATE_RSN_REMOTE_FAULT = 10, | ||
144 | BFA_PPORT_LINKSTATE_RSN_TIMEOUT = 11, | ||
145 | |||
146 | |||
147 | |||
148 | /* CEE related reason codes/errors */ | ||
149 | CEE_LLDP_INFO_AGED_OUT = 20, | ||
150 | CEE_LLDP_SHUTDOWN_TLV_RCVD = 21, | ||
151 | CEE_PEER_NOT_ADVERTISE_DCBX = 22, | ||
152 | CEE_PEER_NOT_ADVERTISE_PG = 23, | ||
153 | CEE_PEER_NOT_ADVERTISE_PFC = 24, | ||
154 | CEE_PEER_NOT_ADVERTISE_FCOE = 25, | ||
155 | CEE_PG_NOT_COMPATIBLE = 26, | ||
156 | CEE_PFC_NOT_COMPATIBLE = 27, | ||
157 | CEE_FCOE_NOT_COMPATIBLE = 28, | ||
158 | CEE_BAD_PG_RCVD = 29, | ||
159 | CEE_BAD_BW_RCVD = 30, | ||
160 | CEE_BAD_PFC_RCVD = 31, | ||
161 | CEE_BAD_FCOE_PRI_RCVD = 32, | ||
162 | CEE_FCOE_PRI_PFC_OFF = 33, | ||
163 | CEE_DUP_CONTROL_TLV_RCVD = 34, | ||
164 | CEE_DUP_FEAT_TLV_RCVD = 35, | ||
165 | CEE_APPLY_NEW_CFG = 36, /* reason, not an error */ | ||
166 | CEE_PROTOCOL_INIT = 37, /* reason, not an error */ | ||
167 | CEE_PHY_LINK_DOWN = 38, | ||
168 | CEE_LLS_FCOE_ABSENT = 39, | ||
169 | CEE_LLS_FCOE_DOWN = 40 | ||
170 | }; | ||
171 | |||
172 | /** | ||
173 | * Default Target Rate Limiting Speed. | ||
174 | */ | ||
175 | #define BFA_PPORT_DEF_TRL_SPEED BFA_PPORT_SPEED_1GBPS | ||
176 | |||
177 | /** | ||
178 | * Physical port configuration | ||
179 | */ | ||
180 | struct bfa_pport_cfg_s { | ||
181 | u8 topology; /* bfa_pport_topology */ | ||
182 | u8 speed; /* enum bfa_pport_speed */ | ||
183 | u8 trunked; /* trunked or not */ | ||
184 | u8 qos_enabled; /* qos enabled or not */ | ||
185 | u8 trunk_ports; /* bitmap of trunked ports */ | ||
186 | u8 cfg_hardalpa; /* is hard alpa configured */ | ||
187 | u16 maxfrsize; /* maximum frame size */ | ||
188 | u8 hardalpa; /* configured hard alpa */ | ||
189 | u8 rx_bbcredit; /* receive buffer credits */ | ||
190 | u8 tx_bbcredit; /* transmit buffer credits */ | ||
191 | u8 ratelimit; /* ratelimit enabled or not */ | ||
192 | u8 trl_def_speed; /* ratelimit default speed */ | ||
193 | u8 rsvd[3]; | ||
194 | u16 path_tov; /* device path timeout */ | ||
195 | u16 q_depth; /* SCSI Queue depth */ | ||
196 | }; | ||
197 | |||
198 | /** | ||
199 | * Port attribute values. | ||
200 | */ | ||
201 | struct bfa_pport_attr_s { | ||
202 | /* | ||
203 | * Static fields | ||
204 | */ | ||
205 | wwn_t nwwn; /* node wwn */ | ||
206 | wwn_t pwwn; /* port wwn */ | ||
207 | wwn_t factorynwwn; /* factory node wwn */ | ||
208 | wwn_t factorypwwn; /* factory port wwn */ | ||
209 | enum fc_cos cos_supported; /* supported class of services */ | ||
210 | u32 rsvd; | ||
211 | struct fc_symname_s port_symname; /* port symbolic name */ | ||
212 | enum bfa_pport_speed speed_supported; /* supported speeds */ | ||
213 | bfa_boolean_t pbind_enabled; /* Will be set if Persistent binding | ||
214 | * enabled. Relevant only in Windows | ||
215 | */ | ||
216 | |||
217 | /* | ||
218 | * Configured values | ||
219 | */ | ||
220 | struct bfa_pport_cfg_s pport_cfg; /* pport cfg */ | ||
221 | |||
222 | /* | ||
223 | * Dynamic field - info from BFA | ||
224 | */ | ||
225 | enum bfa_pport_states port_state; /* current port state */ | ||
226 | enum bfa_pport_speed speed; /* current speed */ | ||
227 | enum bfa_pport_topology topology; /* current topology */ | ||
228 | bfa_boolean_t beacon; /* current beacon status */ | ||
229 | bfa_boolean_t link_e2e_beacon;/* set if link beacon on */ | ||
230 | bfa_boolean_t plog_enabled; /* set if portlog is enabled*/ | ||
231 | |||
232 | /* | ||
233 | * Dynamic field - info from FCS | ||
234 | */ | ||
235 | u32 pid; /* port ID */ | ||
236 | enum bfa_pport_type port_type; /* current topology */ | ||
237 | u32 loopback; /* external loopback */ | ||
238 | u32 authfail; /* auth fail state */ | ||
239 | u32 rsvd2; /* padding for 64 bit */ | ||
240 | }; | ||
241 | |||
242 | /** | ||
243 | * FC Port statistics. | ||
244 | */ | ||
245 | struct bfa_pport_fc_stats_s { | ||
246 | u64 secs_reset; /* Seconds since stats is reset */ | ||
247 | u64 tx_frames; /* Tx frames */ | ||
248 | u64 tx_words; /* Tx words */ | ||
249 | u64 tx_lip; /* Tx LIP */ | ||
250 | u64 tx_nos; /* Tx NOS */ | ||
251 | u64 tx_ols; /* Tx OLS */ | ||
252 | u64 tx_lr; /* Tx LR */ | ||
253 | u64 tx_lrr; /* Tx LRR */ | ||
254 | u64 rx_frames; /* Rx frames */ | ||
255 | u64 rx_words; /* Rx words */ | ||
256 | u64 lip_count; /* Rx LIP */ | ||
257 | u64 nos_count; /* Rx NOS */ | ||
258 | u64 ols_count; /* Rx OLS */ | ||
259 | u64 lr_count; /* Rx LR */ | ||
260 | u64 lrr_count; /* Rx LRR */ | ||
261 | u64 invalid_crcs; /* Rx CRC err frames */ | ||
262 | u64 invalid_crc_gd_eof; /* Rx CRC err good EOF frames */ | ||
263 | u64 undersized_frm; /* Rx undersized frames */ | ||
264 | u64 oversized_frm; /* Rx oversized frames */ | ||
265 | u64 bad_eof_frm; /* Rx frames with bad EOF */ | ||
266 | u64 error_frames; /* Errored frames */ | ||
267 | u64 dropped_frames; /* Dropped frames */ | ||
268 | u64 link_failures; /* Link Failure (LF) count */ | ||
269 | u64 loss_of_syncs; /* Loss of sync count */ | ||
270 | u64 loss_of_signals;/* Loss of signal count */ | ||
271 | u64 primseq_errs; /* Primitive sequence protocol err. */ | ||
272 | u64 bad_os_count; /* Invalid ordered sets */ | ||
273 | u64 err_enc_out; /* Encoding err nonframe_8b10b */ | ||
274 | u64 err_enc; /* Encoding err frame_8b10b */ | ||
275 | }; | ||
276 | |||
277 | /** | ||
278 | * Eth Port statistics. | ||
279 | */ | ||
280 | struct bfa_pport_eth_stats_s { | ||
281 | u64 secs_reset; /* Seconds since stats is reset */ | ||
282 | u64 frame_64; /* Frames 64 bytes */ | ||
283 | u64 frame_65_127; /* Frames 65-127 bytes */ | ||
284 | u64 frame_128_255; /* Frames 128-255 bytes */ | ||
285 | u64 frame_256_511; /* Frames 256-511 bytes */ | ||
286 | u64 frame_512_1023; /* Frames 512-1023 bytes */ | ||
287 | u64 frame_1024_1518; /* Frames 1024-1518 bytes */ | ||
288 | u64 frame_1519_1522; /* Frames 1519-1522 bytes */ | ||
289 | u64 tx_bytes; /* Tx bytes */ | ||
290 | u64 tx_packets; /* Tx packets */ | ||
291 | u64 tx_mcast_packets; /* Tx multicast packets */ | ||
292 | u64 tx_bcast_packets; /* Tx broadcast packets */ | ||
293 | u64 tx_control_frame; /* Tx control frame */ | ||
294 | u64 tx_drop; /* Tx drops */ | ||
295 | u64 tx_jabber; /* Tx jabber */ | ||
296 | u64 tx_fcs_error; /* Tx FCS error */ | ||
297 | u64 tx_fragments; /* Tx fragments */ | ||
298 | u64 rx_bytes; /* Rx bytes */ | ||
299 | u64 rx_packets; /* Rx packets */ | ||
300 | u64 rx_mcast_packets; /* Rx multicast packets */ | ||
301 | u64 rx_bcast_packets; /* Rx broadcast packets */ | ||
302 | u64 rx_control_frames; /* Rx control frames */ | ||
303 | u64 rx_unknown_opcode; /* Rx unknown opcode */ | ||
304 | u64 rx_drop; /* Rx drops */ | ||
305 | u64 rx_jabber; /* Rx jabber */ | ||
306 | u64 rx_fcs_error; /* Rx FCS errors */ | ||
307 | u64 rx_alignment_error; /* Rx alignment errors */ | ||
308 | u64 rx_frame_length_error; /* Rx frame len errors */ | ||
309 | u64 rx_code_error; /* Rx code errors */ | ||
310 | u64 rx_fragments; /* Rx fragments */ | ||
311 | u64 rx_pause; /* Rx pause */ | ||
312 | u64 rx_zero_pause; /* Rx zero pause */ | ||
313 | u64 tx_pause; /* Tx pause */ | ||
314 | u64 tx_zero_pause; /* Tx zero pause */ | ||
315 | u64 rx_fcoe_pause; /* Rx FCoE pause */ | ||
316 | u64 rx_fcoe_zero_pause; /* Rx FCoE zero pause */ | ||
317 | u64 tx_fcoe_pause; /* Tx FCoE pause */ | ||
318 | u64 tx_fcoe_zero_pause; /* Tx FCoE zero pause */ | ||
319 | }; | ||
320 | |||
321 | /** | ||
322 | * Port statistics. | ||
323 | */ | ||
324 | union bfa_pport_stats_u { | ||
325 | struct bfa_pport_fc_stats_s fc; | ||
326 | struct bfa_pport_eth_stats_s eth; | ||
327 | }; | ||
328 | |||
329 | /** | ||
330 | * Port FCP mappings. | ||
331 | */ | ||
332 | struct bfa_pport_fcpmap_s { | ||
333 | char osdevname[256]; | ||
334 | u32 bus; | ||
335 | u32 target; | ||
336 | u32 oslun; | ||
337 | u32 fcid; | ||
338 | wwn_t nwwn; | ||
339 | wwn_t pwwn; | ||
340 | u64 fcplun; | ||
341 | char luid[256]; | ||
342 | }; | ||
343 | |||
344 | /** | ||
345 | * Port RNI */ | ||
346 | struct bfa_pport_rnid_s { | ||
347 | wwn_t wwn; | ||
348 | u32 unittype; | ||
349 | u32 portid; | ||
350 | u32 attached_nodes_num; | ||
351 | u16 ip_version; | ||
352 | u16 udp_port; | ||
353 | u8 ipaddr[16]; | ||
354 | u16 rsvd; | ||
355 | u16 topologydiscoveryflags; | ||
356 | }; | ||
357 | |||
358 | struct bfa_fcport_fcf_s { | ||
359 | wwn_t name; /* FCF name */ | ||
360 | wwn_t fabric_name; /* Fabric Name */ | ||
361 | u8 fipenabled; /* FIP enabled or not */ | ||
362 | u8 fipfailed; /* FIP failed or not */ | ||
363 | u8 resv[2]; | ||
364 | u8 pri; /* FCF priority */ | ||
365 | u8 version; /* FIP version used */ | ||
366 | u8 available; /* Available for login */ | ||
367 | u8 fka_disabled; /* FKA is disabled */ | ||
368 | u8 maxsz_verified; /* FCoE max size verified */ | ||
369 | u8 fc_map[3]; /* FC map */ | ||
370 | u16 vlan; /* FCoE vlan tag/priority */ | ||
371 | u32 fka_adv_per; /* FIP ka advert. period */ | ||
372 | struct mac_s mac; /* FCF mac */ | ||
373 | }; | ||
374 | |||
375 | /** | ||
376 | * Link state information | ||
377 | */ | ||
378 | struct bfa_pport_link_s { | ||
379 | u8 linkstate; /* Link state bfa_pport_linkstate */ | ||
380 | u8 linkstate_rsn; /* bfa_pport_linkstate_rsn_t */ | ||
381 | u8 topology; /* P2P/LOOP bfa_pport_topology */ | ||
382 | u8 speed; /* Link speed (1/2/4/8 G) */ | ||
383 | u32 linkstate_opt; /* Linkstate optional data (debug) */ | ||
384 | u8 trunked; /* Trunked or not (1 or 0) */ | ||
385 | u8 resvd[3]; | ||
386 | struct bfa_qos_attr_s qos_attr; /* QoS Attributes */ | ||
387 | union { | ||
388 | struct bfa_qos_vc_attr_s qos_vc_attr; /* VC info from ELP */ | ||
389 | struct bfa_fcport_fcf_s fcf; /* FCF information (for FCoE) */ | ||
390 | } vc_fcf; | ||
391 | }; | ||
392 | |||
393 | #endif /* __BFA_DEFS_PPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_qos.h b/drivers/scsi/bfa/include/defs/bfa_defs_qos.h deleted file mode 100644 index aadbacd1d2d7..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_qos.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_QOS_H__ | ||
19 | #define __BFA_DEFS_QOS_H__ | ||
20 | |||
21 | /** | ||
22 | * QoS states | ||
23 | */ | ||
24 | enum bfa_qos_state { | ||
25 | BFA_QOS_ONLINE = 1, /* QoS is online */ | ||
26 | BFA_QOS_OFFLINE = 2, /* QoS is offline */ | ||
27 | }; | ||
28 | |||
29 | |||
30 | /** | ||
31 | * QoS Priority levels. | ||
32 | */ | ||
33 | enum bfa_qos_priority { | ||
34 | BFA_QOS_UNKNOWN = 0, | ||
35 | BFA_QOS_HIGH = 1, /* QoS Priority Level High */ | ||
36 | BFA_QOS_MED = 2, /* QoS Priority Level Medium */ | ||
37 | BFA_QOS_LOW = 3, /* QoS Priority Level Low */ | ||
38 | }; | ||
39 | |||
40 | |||
41 | /** | ||
42 | * QoS bandwidth allocation for each priority level | ||
43 | */ | ||
44 | enum bfa_qos_bw_alloc { | ||
45 | BFA_QOS_BW_HIGH = 60, /* bandwidth allocation for High */ | ||
46 | BFA_QOS_BW_MED = 30, /* bandwidth allocation for Medium */ | ||
47 | BFA_QOS_BW_LOW = 10, /* bandwidth allocation for Low */ | ||
48 | }; | ||
49 | |||
50 | /** | ||
51 | * QoS attribute returned in QoS Query | ||
52 | */ | ||
53 | struct bfa_qos_attr_s { | ||
54 | enum bfa_qos_state state; /* QoS current state */ | ||
55 | u32 total_bb_cr; /* Total BB Credits */ | ||
56 | }; | ||
57 | |||
58 | /** | ||
59 | * These fields should be displayed only from the CLI. | ||
60 | * There will be a separate BFAL API (get_qos_vc_attr ?) | ||
61 | * to retrieve this. | ||
62 | * | ||
63 | */ | ||
64 | #define BFA_QOS_MAX_VC 16 | ||
65 | |||
66 | struct bfa_qos_vc_info_s { | ||
67 | u8 vc_credit; | ||
68 | u8 borrow_credit; | ||
69 | u8 priority; | ||
70 | u8 resvd; | ||
71 | }; | ||
72 | |||
73 | struct bfa_qos_vc_attr_s { | ||
74 | u16 total_vc_count; /* Total VC Count */ | ||
75 | u16 shared_credit; | ||
76 | u32 elp_opmode_flags; | ||
77 | struct bfa_qos_vc_info_s vc_info[BFA_QOS_MAX_VC]; /* as many as | ||
78 | * total_vc_count */ | ||
79 | }; | ||
80 | |||
81 | /** | ||
82 | * QoS statistics | ||
83 | */ | ||
84 | struct bfa_qos_stats_s { | ||
85 | u32 flogi_sent; /* QoS Flogi sent */ | ||
86 | u32 flogi_acc_recvd; /* QoS Flogi Acc received */ | ||
87 | u32 flogi_rjt_recvd; /* QoS Flogi rejects received */ | ||
88 | u32 flogi_retries; /* QoS Flogi retries */ | ||
89 | |||
90 | u32 elp_recvd; /* QoS ELP received */ | ||
91 | u32 elp_accepted; /* QoS ELP Accepted */ | ||
92 | u32 elp_rejected; /* QoS ELP rejected */ | ||
93 | u32 elp_dropped; /* QoS ELP dropped */ | ||
94 | |||
95 | u32 qos_rscn_recvd; /* QoS RSCN received */ | ||
96 | u32 rsvd; /* padding for 64 bit alignment */ | ||
97 | }; | ||
98 | |||
99 | #endif /* __BFA_DEFS_QOS_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_rport.h b/drivers/scsi/bfa/include/defs/bfa_defs_rport.h deleted file mode 100644 index e0af59d6d2f6..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_rport.h +++ /dev/null | |||
@@ -1,199 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_RPORT_H__ | ||
19 | #define __BFA_DEFS_RPORT_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | #include <protocol/types.h> | ||
23 | #include <defs/bfa_defs_pport.h> | ||
24 | #include <defs/bfa_defs_port.h> | ||
25 | #include <defs/bfa_defs_qos.h> | ||
26 | |||
27 | /** | ||
28 | * FCS remote port states | ||
29 | */ | ||
30 | enum bfa_rport_state { | ||
31 | BFA_RPORT_UNINIT = 0, /* PORT is not yet initialized */ | ||
32 | BFA_RPORT_OFFLINE = 1, /* rport is offline */ | ||
33 | BFA_RPORT_PLOGI = 2, /* PLOGI to rport is in progress */ | ||
34 | BFA_RPORT_ONLINE = 3, /* login to rport is complete */ | ||
35 | BFA_RPORT_PLOGI_RETRY = 4, /* retrying login to rport */ | ||
36 | BFA_RPORT_NSQUERY = 5, /* nameserver query */ | ||
37 | BFA_RPORT_ADISC = 6, /* ADISC authentication */ | ||
38 | BFA_RPORT_LOGO = 7, /* logging out with rport */ | ||
39 | BFA_RPORT_LOGORCV = 8, /* handling LOGO from rport */ | ||
40 | BFA_RPORT_NSDISC = 9, /* re-discover rport */ | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * Rport Scsi Function : Initiator/Target. | ||
45 | */ | ||
46 | enum bfa_rport_function { | ||
47 | BFA_RPORT_INITIATOR = 0x01, /* SCSI Initiator */ | ||
48 | BFA_RPORT_TARGET = 0x02, /* SCSI Target */ | ||
49 | }; | ||
50 | |||
51 | /** | ||
52 | * port/node symbolic names for rport | ||
53 | */ | ||
54 | #define BFA_RPORT_SYMNAME_MAXLEN 255 | ||
55 | struct bfa_rport_symname_s { | ||
56 | char symname[BFA_RPORT_SYMNAME_MAXLEN]; | ||
57 | }; | ||
58 | |||
59 | struct bfa_rport_hal_stats_s { | ||
60 | u32 sm_un_cr; /* uninit: create events */ | ||
61 | u32 sm_un_unexp; /* uninit: exception events */ | ||
62 | u32 sm_cr_on; /* created: online events */ | ||
63 | u32 sm_cr_del; /* created: delete events */ | ||
64 | u32 sm_cr_hwf; /* created: IOC down */ | ||
65 | u32 sm_cr_unexp; /* created: exception events */ | ||
66 | u32 sm_fwc_rsp; /* fw create: f/w responses */ | ||
67 | u32 sm_fwc_del; /* fw create: delete events */ | ||
68 | u32 sm_fwc_off; /* fw create: offline events */ | ||
69 | u32 sm_fwc_hwf; /* fw create: IOC down */ | ||
70 | u32 sm_fwc_unexp; /* fw create: exception events*/ | ||
71 | u32 sm_on_off; /* online: offline events */ | ||
72 | u32 sm_on_del; /* online: delete events */ | ||
73 | u32 sm_on_hwf; /* online: IOC down events */ | ||
74 | u32 sm_on_unexp; /* online: exception events */ | ||
75 | u32 sm_fwd_rsp; /* fw delete: fw responses */ | ||
76 | u32 sm_fwd_del; /* fw delete: delete events */ | ||
77 | u32 sm_fwd_hwf; /* fw delete: IOC down events */ | ||
78 | u32 sm_fwd_unexp; /* fw delete: exception events*/ | ||
79 | u32 sm_off_del; /* offline: delete events */ | ||
80 | u32 sm_off_on; /* offline: online events */ | ||
81 | u32 sm_off_hwf; /* offline: IOC down events */ | ||
82 | u32 sm_off_unexp; /* offline: exception events */ | ||
83 | u32 sm_del_fwrsp; /* delete: fw responses */ | ||
84 | u32 sm_del_hwf; /* delete: IOC down events */ | ||
85 | u32 sm_del_unexp; /* delete: exception events */ | ||
86 | u32 sm_delp_fwrsp; /* delete pend: fw responses */ | ||
87 | u32 sm_delp_hwf; /* delete pend: IOC downs */ | ||
88 | u32 sm_delp_unexp; /* delete pend: exceptions */ | ||
89 | u32 sm_offp_fwrsp; /* off-pending: fw responses */ | ||
90 | u32 sm_offp_del; /* off-pending: deletes */ | ||
91 | u32 sm_offp_hwf; /* off-pending: IOC downs */ | ||
92 | u32 sm_offp_unexp; /* off-pending: exceptions */ | ||
93 | u32 sm_iocd_off; /* IOC down: offline events */ | ||
94 | u32 sm_iocd_del; /* IOC down: delete events */ | ||
95 | u32 sm_iocd_on; /* IOC down: online events */ | ||
96 | u32 sm_iocd_unexp; /* IOC down: exceptions */ | ||
97 | u32 rsvd; | ||
98 | }; | ||
99 | |||
100 | /** | ||
101 | * FCS remote port statistics | ||
102 | */ | ||
103 | struct bfa_rport_stats_s { | ||
104 | u32 offlines; /* remote port offline count */ | ||
105 | u32 onlines; /* remote port online count */ | ||
106 | u32 rscns; /* RSCN affecting rport */ | ||
107 | u32 plogis; /* plogis sent */ | ||
108 | u32 plogi_accs; /* plogi accepts */ | ||
109 | u32 plogi_timeouts; /* plogi timeouts */ | ||
110 | u32 plogi_rejects; /* rcvd plogi rejects */ | ||
111 | u32 plogi_failed; /* local failure */ | ||
112 | u32 plogi_rcvd; /* plogis rcvd */ | ||
113 | u32 prli_rcvd; /* inbound PRLIs */ | ||
114 | u32 adisc_rcvd; /* ADISCs received */ | ||
115 | u32 adisc_rejects; /* recvd ADISC rejects */ | ||
116 | u32 adisc_sent; /* ADISC requests sent */ | ||
117 | u32 adisc_accs; /* ADISC accepted by rport */ | ||
118 | u32 adisc_failed; /* ADISC failed (no response) */ | ||
119 | u32 adisc_rejected; /* ADISC rejected by us */ | ||
120 | u32 logos; /* logos sent */ | ||
121 | u32 logo_accs; /* LOGO accepts from rport */ | ||
122 | u32 logo_failed; /* LOGO failures */ | ||
123 | u32 logo_rejected; /* LOGO rejects from rport */ | ||
124 | u32 logo_rcvd; /* LOGO from remote port */ | ||
125 | |||
126 | u32 rpsc_rcvd; /* RPSC received */ | ||
127 | u32 rpsc_rejects; /* recvd RPSC rejects */ | ||
128 | u32 rpsc_sent; /* RPSC requests sent */ | ||
129 | u32 rpsc_accs; /* RPSC accepted by rport */ | ||
130 | u32 rpsc_failed; /* RPSC failed (no response) */ | ||
131 | u32 rpsc_rejected; /* RPSC rejected by us */ | ||
132 | |||
133 | u32 rsvd; | ||
134 | struct bfa_rport_hal_stats_s hal_stats; /* BFA rport stats */ | ||
135 | }; | ||
136 | |||
137 | /** | ||
138 | * Rport's QoS attributes | ||
139 | */ | ||
140 | struct bfa_rport_qos_attr_s { | ||
141 | enum bfa_qos_priority qos_priority; /* rport's QoS priority */ | ||
142 | u32 qos_flow_id; /* QoS flow Id */ | ||
143 | }; | ||
144 | |||
145 | /** | ||
146 | * FCS remote port attributes returned in queries | ||
147 | */ | ||
148 | struct bfa_rport_attr_s { | ||
149 | wwn_t nwwn; /* node wwn */ | ||
150 | wwn_t pwwn; /* port wwn */ | ||
151 | enum fc_cos cos_supported; /* supported class of services */ | ||
152 | u32 pid; /* port ID */ | ||
153 | u32 df_sz; /* Max payload size */ | ||
154 | enum bfa_rport_state state; /* Rport State machine state */ | ||
155 | enum fc_cos fc_cos; /* FC classes of services */ | ||
156 | bfa_boolean_t cisc; /* CISC capable device */ | ||
157 | struct bfa_rport_symname_s symname; /* Symbolic Name */ | ||
158 | enum bfa_rport_function scsi_function; /* Initiator/Target */ | ||
159 | struct bfa_rport_qos_attr_s qos_attr; /* qos attributes */ | ||
160 | enum bfa_pport_speed curr_speed; /* operating speed got from | ||
161 | * RPSC ELS. UNKNOWN, if RPSC | ||
162 | * is not supported */ | ||
163 | bfa_boolean_t trl_enforced; /* TRL enforced ? TRUE/FALSE */ | ||
164 | enum bfa_pport_speed assigned_speed; /* Speed assigned by the user. | ||
165 | * will be used if RPSC is not | ||
166 | * supported by the rport */ | ||
167 | }; | ||
168 | |||
169 | #define bfa_rport_aen_qos_data_t struct bfa_rport_qos_attr_s | ||
170 | |||
171 | /** | ||
172 | * BFA remote port events | ||
173 | * Arguments below are in BFAL context from Mgmt | ||
174 | * BFA_RPORT_AEN_ONLINE: [in]: lpwwn [out]: vf_id, lpwwn, rpwwn | ||
175 | * BFA_RPORT_AEN_OFFLINE: [in]: lpwwn [out]: vf_id, lpwwn, rpwwn | ||
176 | * BFA_RPORT_AEN_DISCONNECT:[in]: lpwwn [out]: vf_id, lpwwn, rpwwn | ||
177 | * BFA_RPORT_AEN_QOS_PRIO: [in]: lpwwn [out]: vf_id, lpwwn, rpwwn, prio | ||
178 | * BFA_RPORT_AEN_QOS_FLOWID:[in]: lpwwn [out]: vf_id, lpwwn, rpwwn, flow_id | ||
179 | */ | ||
180 | enum bfa_rport_aen_event { | ||
181 | BFA_RPORT_AEN_ONLINE = 1, /* RPort online event */ | ||
182 | BFA_RPORT_AEN_OFFLINE = 2, /* RPort offline event */ | ||
183 | BFA_RPORT_AEN_DISCONNECT = 3, /* RPort disconnect event */ | ||
184 | BFA_RPORT_AEN_QOS_PRIO = 4, /* QOS priority change event */ | ||
185 | BFA_RPORT_AEN_QOS_FLOWID = 5, /* QOS flow Id change event */ | ||
186 | }; | ||
187 | |||
188 | struct bfa_rport_aen_data_s { | ||
189 | u16 vf_id; /* vf_id of this logical port */ | ||
190 | u16 rsvd[3]; | ||
191 | wwn_t ppwwn; /* WWN of its physical port */ | ||
192 | wwn_t lpwwn; /* WWN of this logical port */ | ||
193 | wwn_t rpwwn; /* WWN of this remote port */ | ||
194 | union { | ||
195 | bfa_rport_aen_qos_data_t qos; | ||
196 | } priv; | ||
197 | }; | ||
198 | |||
199 | #endif /* __BFA_DEFS_RPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_status.h b/drivers/scsi/bfa/include/defs/bfa_defs_status.h deleted file mode 100644 index 6eb4e62096fc..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_status.h +++ /dev/null | |||
@@ -1,282 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_STATUS_H__ | ||
18 | #define __BFA_DEFS_STATUS_H__ | ||
19 | |||
20 | /** | ||
21 | * API status return values | ||
22 | * | ||
23 | * NOTE: The error msgs are auto generated from the comments. Only singe line | ||
24 | * comments are supported | ||
25 | */ | ||
26 | enum bfa_status { | ||
27 | BFA_STATUS_OK = 0, /* Success */ | ||
28 | BFA_STATUS_FAILED = 1, /* Operation failed */ | ||
29 | BFA_STATUS_EINVAL = 2, /* Invalid params Check input | ||
30 | * parameters */ | ||
31 | BFA_STATUS_ENOMEM = 3, /* Out of resources */ | ||
32 | BFA_STATUS_ENOSYS = 4, /* Function not implemented */ | ||
33 | BFA_STATUS_ETIMER = 5, /* Timer expired - Retry, if | ||
34 | * persists, contact support */ | ||
35 | BFA_STATUS_EPROTOCOL = 6, /* Protocol error */ | ||
36 | BFA_STATUS_ENOFCPORTS = 7, /* No FC ports resources */ | ||
37 | BFA_STATUS_NOFLASH = 8, /* Flash not present */ | ||
38 | BFA_STATUS_BADFLASH = 9, /* Flash is corrupted or bad */ | ||
39 | BFA_STATUS_SFP_UNSUPP = 10, /* Unsupported SFP - Replace SFP */ | ||
40 | BFA_STATUS_UNKNOWN_VFID = 11, /* VF_ID not found */ | ||
41 | BFA_STATUS_DATACORRUPTED = 12, /* Diag returned data corrupted | ||
42 | * contact support */ | ||
43 | BFA_STATUS_DEVBUSY = 13, /* Device busy - Retry operation */ | ||
44 | BFA_STATUS_ABORTED = 14, /* Operation aborted */ | ||
45 | BFA_STATUS_NODEV = 15, /* Dev is not present */ | ||
46 | BFA_STATUS_HDMA_FAILED = 16, /* Host dma failed contact support */ | ||
47 | BFA_STATUS_FLASH_BAD_LEN = 17, /* Flash bad length */ | ||
48 | BFA_STATUS_UNKNOWN_LWWN = 18, /* LPORT PWWN not found */ | ||
49 | BFA_STATUS_UNKNOWN_RWWN = 19, /* RPORT PWWN not found */ | ||
50 | BFA_STATUS_FCPT_LS_RJT = 20, /* Got LS_RJT for FC Pass | ||
51 | * through Req */ | ||
52 | BFA_STATUS_VPORT_EXISTS = 21, /* VPORT already exists */ | ||
53 | BFA_STATUS_VPORT_MAX = 22, /* Reached max VPORT supported | ||
54 | * limit */ | ||
55 | BFA_STATUS_UNSUPP_SPEED = 23, /* Invalid Speed Check speed | ||
56 | * setting */ | ||
57 | BFA_STATUS_INVLD_DFSZ = 24, /* Invalid Max data field size */ | ||
58 | BFA_STATUS_CNFG_FAILED = 25, /* Setting can not be persisted */ | ||
59 | BFA_STATUS_CMD_NOTSUPP = 26, /* Command/API not supported */ | ||
60 | BFA_STATUS_NO_ADAPTER = 27, /* No Brocade Adapter Found */ | ||
61 | BFA_STATUS_LINKDOWN = 28, /* Link is down - Check or replace | ||
62 | * SFP/cable */ | ||
63 | BFA_STATUS_FABRIC_RJT = 29, /* Reject from attached fabric */ | ||
64 | BFA_STATUS_UNKNOWN_VWWN = 30, /* VPORT PWWN not found */ | ||
65 | BFA_STATUS_NSLOGIN_FAILED = 31, /* Nameserver login failed */ | ||
66 | BFA_STATUS_NO_RPORTS = 32, /* No remote ports found */ | ||
67 | BFA_STATUS_NSQUERY_FAILED = 33, /* Nameserver query failed */ | ||
68 | BFA_STATUS_PORT_OFFLINE = 34, /* Port is not online */ | ||
69 | BFA_STATUS_RPORT_OFFLINE = 35, /* RPORT is not online */ | ||
70 | BFA_STATUS_TGTOPEN_FAILED = 36, /* Remote SCSI target open failed */ | ||
71 | BFA_STATUS_BAD_LUNS = 37, /* No valid LUNs found */ | ||
72 | BFA_STATUS_IO_FAILURE = 38, /* SCSI target IO failure */ | ||
73 | BFA_STATUS_NO_FABRIC = 39, /* No switched fabric present */ | ||
74 | BFA_STATUS_EBADF = 40, /* Bad file descriptor */ | ||
75 | BFA_STATUS_EINTR = 41, /* A signal was caught during ioctl */ | ||
76 | BFA_STATUS_EIO = 42, /* I/O error */ | ||
77 | BFA_STATUS_ENOTTY = 43, /* Inappropriate I/O control | ||
78 | * operation */ | ||
79 | BFA_STATUS_ENXIO = 44, /* No such device or address */ | ||
80 | BFA_STATUS_EFOPEN = 45, /* Failed to open file */ | ||
81 | BFA_STATUS_VPORT_WWN_BP = 46, /* WWN is same as base port's WWN */ | ||
82 | BFA_STATUS_PORT_NOT_DISABLED = 47, /* Port not disabled disable port | ||
83 | * first */ | ||
84 | BFA_STATUS_BADFRMHDR = 48, /* Bad frame header */ | ||
85 | BFA_STATUS_BADFRMSZ = 49, /* Bad frame size check and replace | ||
86 | * SFP/cable */ | ||
87 | BFA_STATUS_MISSINGFRM = 50, /* Missing frame check and replace | ||
88 | * SFP/cable or for Mezz card check and | ||
89 | * replace pass through module */ | ||
90 | BFA_STATUS_LINKTIMEOUT = 51, /* Link timeout check and replace | ||
91 | * SFP/cable */ | ||
92 | BFA_STATUS_NO_FCPIM_NEXUS = 52, /* No FCP Nexus exists with the | ||
93 | * rport */ | ||
94 | BFA_STATUS_CHECKSUM_FAIL = 53, /* checksum failure */ | ||
95 | BFA_STATUS_GZME_FAILED = 54, /* Get zone member query failed */ | ||
96 | BFA_STATUS_SCSISTART_REQD = 55, /* SCSI disk require START command */ | ||
97 | BFA_STATUS_IOC_FAILURE = 56, /* IOC failure - Retry, if persists | ||
98 | * contact support */ | ||
99 | BFA_STATUS_INVALID_WWN = 57, /* Invalid WWN */ | ||
100 | BFA_STATUS_MISMATCH = 58, /* Version mismatch */ | ||
101 | BFA_STATUS_IOC_ENABLED = 59, /* IOC is already enabled */ | ||
102 | BFA_STATUS_ADAPTER_ENABLED = 60, /* Adapter is not disabled disable | ||
103 | * adapter first */ | ||
104 | BFA_STATUS_IOC_NON_OP = 61, /* IOC is not operational. Enable IOC | ||
105 | * and if it still fails, | ||
106 | * contact support */ | ||
107 | BFA_STATUS_ADDR_MAP_FAILURE = 62, /* PCI base address not mapped | ||
108 | * in OS */ | ||
109 | BFA_STATUS_SAME_NAME = 63, /* Name exists! use a different | ||
110 | * name */ | ||
111 | BFA_STATUS_PENDING = 64, /* API completes asynchronously */ | ||
112 | BFA_STATUS_8G_SPD = 65, /* Speed setting not valid for | ||
113 | * 8G HBA */ | ||
114 | BFA_STATUS_4G_SPD = 66, /* Speed setting not valid for | ||
115 | * 4G HBA */ | ||
116 | BFA_STATUS_AD_IS_ENABLE = 67, /* Adapter is already enabled */ | ||
117 | BFA_STATUS_EINVAL_TOV = 68, /* Invalid path failover TOV */ | ||
118 | BFA_STATUS_EINVAL_QDEPTH = 69, /* Invalid queue depth value */ | ||
119 | BFA_STATUS_VERSION_FAIL = 70, /* Application/Driver version | ||
120 | * mismatch */ | ||
121 | BFA_STATUS_DIAG_BUSY = 71, /* diag busy */ | ||
122 | BFA_STATUS_BEACON_ON = 72, /* Port Beacon already on */ | ||
123 | BFA_STATUS_BEACON_OFF = 73, /* Port Beacon already off */ | ||
124 | BFA_STATUS_LBEACON_ON = 74, /* Link End-to-End Beacon already | ||
125 | * on */ | ||
126 | BFA_STATUS_LBEACON_OFF = 75, /* Link End-to-End Beacon already | ||
127 | * off */ | ||
128 | BFA_STATUS_PORT_NOT_INITED = 76, /* Port not initialized */ | ||
129 | BFA_STATUS_RPSC_ENABLED = 77, /* Target has a valid speed */ | ||
130 | BFA_STATUS_ENOFSAVE = 78, /* No saved firmware trace */ | ||
131 | BFA_STATUS_BAD_FILE = 79, /* Not a valid Brocade Boot Code | ||
132 | * file */ | ||
133 | BFA_STATUS_RLIM_EN = 80, /* Target rate limiting is already | ||
134 | * enabled */ | ||
135 | BFA_STATUS_RLIM_DIS = 81, /* Target rate limiting is already | ||
136 | * disabled */ | ||
137 | BFA_STATUS_IOC_DISABLED = 82, /* IOC is already disabled */ | ||
138 | BFA_STATUS_ADAPTER_DISABLED = 83, /* Adapter is already disabled */ | ||
139 | BFA_STATUS_BIOS_DISABLED = 84, /* Bios is already disabled */ | ||
140 | BFA_STATUS_AUTH_ENABLED = 85, /* Authentication is already | ||
141 | * enabled */ | ||
142 | BFA_STATUS_AUTH_DISABLED = 86, /* Authentication is already | ||
143 | * disabled */ | ||
144 | BFA_STATUS_ERROR_TRL_ENABLED = 87, /* Target rate limiting is | ||
145 | * enabled */ | ||
146 | BFA_STATUS_ERROR_QOS_ENABLED = 88, /* QoS is enabled */ | ||
147 | BFA_STATUS_NO_SFP_DEV = 89, /* No SFP device check or replace SFP */ | ||
148 | BFA_STATUS_MEMTEST_FAILED = 90, /* Memory test failed contact | ||
149 | * support */ | ||
150 | BFA_STATUS_INVALID_DEVID = 91, /* Invalid device id provided */ | ||
151 | BFA_STATUS_QOS_ENABLED = 92, /* QOS is already enabled */ | ||
152 | BFA_STATUS_QOS_DISABLED = 93, /* QOS is already disabled */ | ||
153 | BFA_STATUS_INCORRECT_DRV_CONFIG = 94, /* Check configuration | ||
154 | * key/value pair */ | ||
155 | BFA_STATUS_REG_FAIL = 95, /* Can't read windows registry */ | ||
156 | BFA_STATUS_IM_INV_CODE = 96, /* Invalid IOCTL code */ | ||
157 | BFA_STATUS_IM_INV_VLAN = 97, /* Invalid VLAN ID */ | ||
158 | BFA_STATUS_IM_INV_ADAPT_NAME = 98, /* Invalid adapter name */ | ||
159 | BFA_STATUS_IM_LOW_RESOURCES = 99, /* Memory allocation failure in | ||
160 | * driver */ | ||
161 | BFA_STATUS_IM_VLANID_IS_PVID = 100, /* Given VLAN id same as PVID */ | ||
162 | BFA_STATUS_IM_VLANID_EXISTS = 101, /* Given VLAN id already exists */ | ||
163 | BFA_STATUS_IM_FW_UPDATE_FAIL = 102, /* Updating firmware with new | ||
164 | * VLAN ID failed */ | ||
165 | BFA_STATUS_PORTLOG_ENABLED = 103, /* Port Log is already enabled */ | ||
166 | BFA_STATUS_PORTLOG_DISABLED = 104, /* Port Log is already disabled */ | ||
167 | BFA_STATUS_FILE_NOT_FOUND = 105, /* Specified file could not be | ||
168 | * found */ | ||
169 | BFA_STATUS_QOS_FC_ONLY = 106, /* QOS can be enabled for FC mode | ||
170 | * only */ | ||
171 | BFA_STATUS_RLIM_FC_ONLY = 107, /* RATELIM can be enabled for FC mode | ||
172 | * only */ | ||
173 | BFA_STATUS_CT_SPD = 108, /* Invalid speed selection for Catapult. */ | ||
174 | BFA_STATUS_LEDTEST_OP = 109, /* LED test is operating */ | ||
175 | BFA_STATUS_CEE_NOT_DN = 110, /* eth port is not at down state, please | ||
176 | * bring down first */ | ||
177 | BFA_STATUS_10G_SPD = 111, /* Speed setting not valid for 10G CNA */ | ||
178 | BFA_STATUS_IM_INV_TEAM_NAME = 112, /* Invalid team name */ | ||
179 | BFA_STATUS_IM_DUP_TEAM_NAME = 113, /* Given team name already | ||
180 | * exists */ | ||
181 | BFA_STATUS_IM_ADAPT_ALREADY_IN_TEAM = 114, /* Given adapter is part | ||
182 | * of another team */ | ||
183 | BFA_STATUS_IM_ADAPT_HAS_VLANS = 115, /* Adapter has VLANs configured. | ||
184 | * Delete all VLANs to become | ||
185 | * part of the team */ | ||
186 | BFA_STATUS_IM_PVID_MISMATCH = 116, /* Mismatching PVIDs configured | ||
187 | * for adapters */ | ||
188 | BFA_STATUS_IM_LINK_SPEED_MISMATCH = 117, /* Mismatching link speeds | ||
189 | * configured for adapters */ | ||
190 | BFA_STATUS_IM_MTU_MISMATCH = 118, /* Mismatching MTUs configured for | ||
191 | * adapters */ | ||
192 | BFA_STATUS_IM_RSS_MISMATCH = 119, /* Mismatching RSS parameters | ||
193 | * configured for adapters */ | ||
194 | BFA_STATUS_IM_HDS_MISMATCH = 120, /* Mismatching HDS parameters | ||
195 | * configured for adapters */ | ||
196 | BFA_STATUS_IM_OFFLOAD_MISMATCH = 121, /* Mismatching offload | ||
197 | * parameters configured for | ||
198 | * adapters */ | ||
199 | BFA_STATUS_IM_PORT_PARAMS = 122, /* Error setting port parameters */ | ||
200 | BFA_STATUS_IM_PORT_NOT_IN_TEAM = 123, /* Port is not part of team */ | ||
201 | BFA_STATUS_IM_CANNOT_REM_PRI = 124, /* Primary adapter cannot be | ||
202 | * removed. Change primary before | ||
203 | * removing */ | ||
204 | BFA_STATUS_IM_MAX_PORTS_REACHED = 125, /* Exceeding maximum ports | ||
205 | * per team */ | ||
206 | BFA_STATUS_IM_LAST_PORT_DELETE = 126, /* Last port in team being | ||
207 | * deleted */ | ||
208 | BFA_STATUS_IM_NO_DRIVER = 127, /* IM driver is not installed */ | ||
209 | BFA_STATUS_IM_MAX_VLANS_REACHED = 128, /* Exceeding maximum VLANs | ||
210 | * per port */ | ||
211 | BFA_STATUS_TOMCAT_SPD_NOT_ALLOWED = 129, /* Bios speed config not | ||
212 | * allowed for CNA */ | ||
213 | BFA_STATUS_NO_MINPORT_DRIVER = 130, /* Miniport driver is not | ||
214 | * loaded */ | ||
215 | BFA_STATUS_CARD_TYPE_MISMATCH = 131, /* Card type mismatch */ | ||
216 | BFA_STATUS_BAD_ASICBLK = 132, /* Bad ASIC block */ | ||
217 | BFA_STATUS_NO_DRIVER = 133, /* Brocade adapter/driver not installed | ||
218 | * or loaded */ | ||
219 | BFA_STATUS_INVALID_MAC = 134, /* Invalid MAC address */ | ||
220 | BFA_STATUS_IM_NO_VLAN = 135, /* No VLANs configured on the adapter */ | ||
221 | BFA_STATUS_IM_ETH_LB_FAILED = 136, /* Ethernet loopback test failed */ | ||
222 | BFA_STATUS_IM_PVID_REMOVE = 137, /* Cannot remove port VLAN (PVID) */ | ||
223 | BFA_STATUS_IM_PVID_EDIT = 138, /* Cannot edit port VLAN (PVID) */ | ||
224 | BFA_STATUS_CNA_NO_BOOT = 139, /* Boot upload not allowed for CNA */ | ||
225 | BFA_STATUS_IM_PVID_NON_ZERO = 140, /* Port VLAN ID (PVID) is Set to | ||
226 | * Non-Zero Value */ | ||
227 | BFA_STATUS_IM_INETCFG_LOCK_FAILED = 141, /* Acquiring Network | ||
228 | * Subsystem Lock Failed.Please | ||
229 | * try after some time */ | ||
230 | BFA_STATUS_IM_GET_INETCFG_FAILED = 142, /* Acquiring Network Subsystem | ||
231 | * handle Failed. Please try | ||
232 | * after some time */ | ||
233 | BFA_STATUS_IM_NOT_BOUND = 143, /* IM driver is not active */ | ||
234 | BFA_STATUS_INSUFFICIENT_PERMS = 144, /* User doesn't have sufficient | ||
235 | * permissions to execute the BCU | ||
236 | * application */ | ||
237 | BFA_STATUS_IM_INV_VLAN_NAME = 145, /* Invalid/Reserved VLAN name | ||
238 | * string. The name is not allowed | ||
239 | * for the normal VLAN */ | ||
240 | BFA_STATUS_CMD_NOTSUPP_CNA = 146, /* Command not supported for CNA */ | ||
241 | BFA_STATUS_IM_PASSTHRU_EDIT = 147, /* Can not edit passthrough VLAN | ||
242 | * id */ | ||
243 | BFA_STATUS_IM_BIND_FAILED = 148, /* IM Driver bind operation | ||
244 | * failed */ | ||
245 | BFA_STATUS_IM_UNBIND_FAILED = 149, /* IM Driver unbind operation | ||
246 | * failed */ | ||
247 | BFA_STATUS_IM_PORT_IN_TEAM = 150, /* Port is already part of the | ||
248 | * team */ | ||
249 | BFA_STATUS_IM_VLAN_NOT_FOUND = 151, /* VLAN ID doesn't exists */ | ||
250 | BFA_STATUS_IM_TEAM_NOT_FOUND = 152, /* Teaming configuration doesn't | ||
251 | * exists */ | ||
252 | BFA_STATUS_IM_TEAM_CFG_NOT_ALLOWED = 153, /* Given settings are not | ||
253 | * allowed for the current | ||
254 | * Teaming mode */ | ||
255 | BFA_STATUS_PBC = 154, /* Operation not allowed for pre-boot | ||
256 | * configuration */ | ||
257 | BFA_STATUS_DEVID_MISSING = 155, /* Boot image is not for the adapter(s) | ||
258 | * installed */ | ||
259 | BFA_STATUS_BAD_FWCFG = 156, /* Bad firmware configuration */ | ||
260 | BFA_STATUS_CREATE_FILE = 157, /* Failed to create temporary file */ | ||
261 | BFA_STATUS_INVALID_VENDOR = 158, /* Invalid switch vendor */ | ||
262 | BFA_STATUS_SFP_NOT_READY = 159, /* SFP info is not ready. Retry */ | ||
263 | BFA_STATUS_NO_TOPOLOGY_FOR_CNA = 160, /* Topology command not | ||
264 | * applicable to CNA */ | ||
265 | BFA_STATUS_BOOT_CODE_UPDATED = 161, /* reboot -- -r is needed after | ||
266 | * boot code updated */ | ||
267 | BFA_STATUS_BOOT_VERSION = 162, /* Boot code version not compatible with | ||
268 | * the driver installed */ | ||
269 | BFA_STATUS_CARDTYPE_MISSING = 163, /* Boot image is not for the | ||
270 | * adapter(s) installed */ | ||
271 | BFA_STATUS_INVALID_CARDTYPE = 164, /* Invalid card type provided */ | ||
272 | BFA_STATUS_MAX_VAL /* Unknown error code */ | ||
273 | }; | ||
274 | #define bfa_status_t enum bfa_status | ||
275 | |||
276 | enum bfa_eproto_status { | ||
277 | BFA_EPROTO_BAD_ACCEPT = 0, | ||
278 | BFA_EPROTO_UNKNOWN_RSP = 1 | ||
279 | }; | ||
280 | #define bfa_eproto_status_t enum bfa_eproto_status | ||
281 | |||
282 | #endif /* __BFA_DEFS_STATUS_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_tin.h b/drivers/scsi/bfa/include/defs/bfa_defs_tin.h deleted file mode 100644 index e05a2db7abed..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_tin.h +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_TIN_H__ | ||
19 | #define __BFA_DEFS_TIN_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | #include <protocol/fc.h> | ||
23 | |||
24 | /** | ||
25 | * FCS tin states | ||
26 | */ | ||
27 | enum bfa_tin_state_e { | ||
28 | BFA_TIN_SM_OFFLINE = 0, /* tin is offline */ | ||
29 | BFA_TIN_SM_WOS_LOGIN = 1, /* Waiting PRLI ACC/RJT from ULP */ | ||
30 | BFA_TIN_SM_WFW_ONLINE = 2, /* Waiting ACK to PRLI ACC from FW */ | ||
31 | BFA_TIN_SM_ONLINE = 3, /* tin login is complete */ | ||
32 | BFA_TIN_SM_WIO_RELOGIN = 4, /* tin relogin is in progress */ | ||
33 | BFA_TIN_SM_WIO_LOGOUT = 5, /* Processing of PRLO req from | ||
34 | * Initiator is in progress | ||
35 | */ | ||
36 | BFA_TIN_SM_WOS_LOGOUT = 6, /* Processing of PRLO req from | ||
37 | * Initiator is in progress | ||
38 | */ | ||
39 | BFA_TIN_SM_WIO_CLEAN = 7, /* Waiting for IO cleanup before tin | ||
40 | * is offline. This can be triggered | ||
41 | * by RPORT LOGO (rcvd/sent) or by | ||
42 | * PRLO (rcvd/sent) | ||
43 | */ | ||
44 | }; | ||
45 | |||
46 | struct bfa_prli_req_s { | ||
47 | struct fchs_s fchs; | ||
48 | struct fc_prli_s prli_payload; | ||
49 | }; | ||
50 | |||
51 | struct bfa_prlo_req_s { | ||
52 | struct fchs_s fchs; | ||
53 | struct fc_prlo_s prlo_payload; | ||
54 | }; | ||
55 | |||
56 | void bfa_tin_send_login_rsp(void *bfa_tin, u32 login_rsp, | ||
57 | struct fc_ls_rjt_s rjt_payload); | ||
58 | void bfa_tin_send_logout_rsp(void *bfa_tin, u32 logout_rsp, | ||
59 | struct fc_ls_rjt_s rjt_payload); | ||
60 | /** | ||
61 | * FCS target port statistics | ||
62 | */ | ||
63 | struct bfa_tin_stats_s { | ||
64 | u32 onlines; /* ITN nexus onlines (PRLI done) */ | ||
65 | u32 offlines; /* ITN Nexus offlines */ | ||
66 | u32 prli_req_parse_err; /* prli req parsing errors */ | ||
67 | u32 prli_rsp_rjt; /* num prli rsp rejects sent */ | ||
68 | u32 prli_rsp_acc; /* num prli rsp accepts sent */ | ||
69 | u32 cleanup_comps; /* ITN cleanup completions */ | ||
70 | }; | ||
71 | |||
72 | /** | ||
73 | * FCS tin attributes returned in queries | ||
74 | */ | ||
75 | struct bfa_tin_attr_s { | ||
76 | enum bfa_tin_state_e state; | ||
77 | u8 seq_retry; /* Sequence retry supported */ | ||
78 | u8 rsvd[3]; | ||
79 | }; | ||
80 | |||
81 | /** | ||
82 | * BFA TIN async event data structure for BFAL | ||
83 | */ | ||
84 | enum bfa_tin_aen_event { | ||
85 | BFA_TIN_AEN_ONLINE = 1, /* Target online */ | ||
86 | BFA_TIN_AEN_OFFLINE = 2, /* Target offline */ | ||
87 | BFA_TIN_AEN_DISCONNECT = 3, /* Target disconnected */ | ||
88 | }; | ||
89 | |||
90 | /** | ||
91 | * BFA TIN event data structure. | ||
92 | */ | ||
93 | struct bfa_tin_aen_data_s { | ||
94 | u16 vf_id; /* vf_id of the IT nexus */ | ||
95 | u16 rsvd[3]; | ||
96 | wwn_t lpwwn; /* WWN of logical port */ | ||
97 | wwn_t rpwwn; /* WWN of remote(target) port */ | ||
98 | }; | ||
99 | |||
100 | /** | ||
101 | * Below APIs are needed from BFA driver | ||
102 | * Move these to BFA driver public header file? | ||
103 | */ | ||
104 | /* TIN rcvd new PRLI & gets bfad_tin_t ptr from driver this callback */ | ||
105 | void *bfad_tin_rcvd_login_req(void *bfad_tm_port, void *bfa_tin, | ||
106 | wwn_t rp_wwn, u32 rp_fcid, | ||
107 | struct bfa_prli_req_s prli_req); | ||
108 | /* TIN rcvd new PRLO */ | ||
109 | void bfad_tin_rcvd_logout_req(void *bfad_tin, wwn_t rp_wwn, u32 rp_fcid, | ||
110 | struct bfa_prlo_req_s prlo_req); | ||
111 | /* TIN is online and ready for IO */ | ||
112 | void bfad_tin_online(void *bfad_tin); | ||
113 | /* TIN is offline and BFA driver can shutdown its upper stack */ | ||
114 | void bfad_tin_offline(void *bfad_tin); | ||
115 | /* TIN does not need this BFA driver tin tag anymore, so can be freed */ | ||
116 | void bfad_tin_res_free(void *bfad_tin); | ||
117 | |||
118 | #endif /* __BFA_DEFS_TIN_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_tsensor.h b/drivers/scsi/bfa/include/defs/bfa_defs_tsensor.h deleted file mode 100644 index ade763dbc8ce..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_tsensor.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_TSENSOR_H__ | ||
19 | #define __BFA_DEFS_TSENSOR_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | #include <defs/bfa_defs_types.h> | ||
23 | |||
24 | /** | ||
25 | * Temperature sensor status values | ||
26 | */ | ||
27 | enum bfa_tsensor_status { | ||
28 | BFA_TSENSOR_STATUS_UNKNOWN = 1, /* unknown status */ | ||
29 | BFA_TSENSOR_STATUS_FAULTY = 2, /* sensor is faulty */ | ||
30 | BFA_TSENSOR_STATUS_BELOW_MIN = 3, /* temperature below mininum */ | ||
31 | BFA_TSENSOR_STATUS_NOMINAL = 4, /* normal temperature */ | ||
32 | BFA_TSENSOR_STATUS_ABOVE_MAX = 5, /* temperature above maximum */ | ||
33 | }; | ||
34 | |||
35 | /** | ||
36 | * Temperature sensor attribute | ||
37 | */ | ||
38 | struct bfa_tsensor_attr_s { | ||
39 | enum bfa_tsensor_status status; /* temperature sensor status */ | ||
40 | u32 value; /* current temperature in celsius */ | ||
41 | }; | ||
42 | |||
43 | #endif /* __BFA_DEFS_TSENSOR_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_types.h b/drivers/scsi/bfa/include/defs/bfa_defs_types.h deleted file mode 100644 index 4348332b107a..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_types.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_TYPES_H__ | ||
18 | #define __BFA_DEFS_TYPES_H__ | ||
19 | |||
20 | #include <bfa_os_inc.h> | ||
21 | |||
22 | enum bfa_boolean { | ||
23 | BFA_FALSE = 0, | ||
24 | BFA_TRUE = 1 | ||
25 | }; | ||
26 | #define bfa_boolean_t enum bfa_boolean | ||
27 | |||
28 | #define BFA_STRING_32 32 | ||
29 | |||
30 | #endif /* __BFA_DEFS_TYPES_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_version.h b/drivers/scsi/bfa/include/defs/bfa_defs_version.h deleted file mode 100644 index f8902a2c9aad..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_version.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __BFA_DEFS_VERSION_H__ | ||
18 | #define __BFA_DEFS_VERSION_H__ | ||
19 | |||
20 | #define BFA_VERSION_LEN 64 | ||
21 | |||
22 | #endif | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_vf.h b/drivers/scsi/bfa/include/defs/bfa_defs_vf.h deleted file mode 100644 index 3235be5e9423..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_vf.h +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_VF_H__ | ||
19 | #define __BFA_DEFS_VF_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | #include <defs/bfa_defs_port.h> | ||
23 | #include <protocol/types.h> | ||
24 | |||
25 | /** | ||
26 | * VF states | ||
27 | */ | ||
28 | enum bfa_vf_state { | ||
29 | BFA_VF_UNINIT = 0, /* fabric is not yet initialized */ | ||
30 | BFA_VF_LINK_DOWN = 1, /* link is down */ | ||
31 | BFA_VF_FLOGI = 2, /* flogi is in progress */ | ||
32 | BFA_VF_AUTH = 3, /* authentication in progress */ | ||
33 | BFA_VF_NOFABRIC = 4, /* fabric is not present */ | ||
34 | BFA_VF_ONLINE = 5, /* login to fabric is complete */ | ||
35 | BFA_VF_EVFP = 6, /* EVFP is in progress */ | ||
36 | BFA_VF_ISOLATED = 7, /* port isolated due to vf_id mismatch */ | ||
37 | }; | ||
38 | |||
39 | /** | ||
40 | * VF statistics | ||
41 | */ | ||
42 | struct bfa_vf_stats_s { | ||
43 | u32 flogi_sent; /* Num FLOGIs sent */ | ||
44 | u32 flogi_rsp_err; /* FLOGI response errors */ | ||
45 | u32 flogi_acc_err; /* FLOGI accept errors */ | ||
46 | u32 flogi_accepts; /* FLOGI accepts received */ | ||
47 | u32 flogi_rejects; /* FLOGI rejects received */ | ||
48 | u32 flogi_unknown_rsp; /* Unknown responses for FLOGI */ | ||
49 | u32 flogi_alloc_wait; /* Allocation waits prior to | ||
50 | * sending FLOGI | ||
51 | */ | ||
52 | u32 flogi_rcvd; /* FLOGIs received */ | ||
53 | u32 flogi_rejected; /* Incoming FLOGIs rejected */ | ||
54 | u32 fabric_onlines; /* Internal fabric online | ||
55 | * notification sent to other | ||
56 | * modules | ||
57 | */ | ||
58 | u32 fabric_offlines; /* Internal fabric offline | ||
59 | * notification sent to other | ||
60 | * modules | ||
61 | */ | ||
62 | u32 resvd; | ||
63 | }; | ||
64 | |||
65 | /** | ||
66 | * VF attributes returned in queries | ||
67 | */ | ||
68 | struct bfa_vf_attr_s { | ||
69 | enum bfa_vf_state state; /* VF state */ | ||
70 | u32 rsvd; | ||
71 | wwn_t fabric_name; /* fabric name */ | ||
72 | }; | ||
73 | |||
74 | #endif /* __BFA_DEFS_VF_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_vport.h b/drivers/scsi/bfa/include/defs/bfa_defs_vport.h deleted file mode 100644 index 9f021f43b3b4..000000000000 --- a/drivers/scsi/bfa/include/defs/bfa_defs_vport.h +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_DEFS_VPORT_H__ | ||
19 | #define __BFA_DEFS_VPORT_H__ | ||
20 | |||
21 | #include <bfa_os_inc.h> | ||
22 | #include <defs/bfa_defs_port.h> | ||
23 | #include <protocol/types.h> | ||
24 | |||
25 | /** | ||
26 | * VPORT states | ||
27 | */ | ||
28 | enum bfa_vport_state { | ||
29 | BFA_FCS_VPORT_UNINIT = 0, | ||
30 | BFA_FCS_VPORT_CREATED = 1, | ||
31 | BFA_FCS_VPORT_OFFLINE = 1, | ||
32 | BFA_FCS_VPORT_FDISC_SEND = 2, | ||
33 | BFA_FCS_VPORT_FDISC = 3, | ||
34 | BFA_FCS_VPORT_FDISC_RETRY = 4, | ||
35 | BFA_FCS_VPORT_ONLINE = 5, | ||
36 | BFA_FCS_VPORT_DELETING = 6, | ||
37 | BFA_FCS_VPORT_CLEANUP = 6, | ||
38 | BFA_FCS_VPORT_LOGO_SEND = 7, | ||
39 | BFA_FCS_VPORT_LOGO = 8, | ||
40 | BFA_FCS_VPORT_ERROR = 9, | ||
41 | BFA_FCS_VPORT_MAX_STATE, | ||
42 | }; | ||
43 | |||
44 | /** | ||
45 | * vport statistics | ||
46 | */ | ||
47 | struct bfa_vport_stats_s { | ||
48 | struct bfa_port_stats_s port_stats; /* base class (port) stats */ | ||
49 | /* | ||
50 | * TODO - remove | ||
51 | */ | ||
52 | |||
53 | u32 fdisc_sent; /* num fdisc sent */ | ||
54 | u32 fdisc_accepts; /* fdisc accepts */ | ||
55 | u32 fdisc_retries; /* fdisc retries */ | ||
56 | u32 fdisc_timeouts; /* fdisc timeouts */ | ||
57 | u32 fdisc_rsp_err; /* fdisc response error */ | ||
58 | u32 fdisc_acc_bad; /* bad fdisc accepts */ | ||
59 | u32 fdisc_rejects; /* fdisc rejects */ | ||
60 | u32 fdisc_unknown_rsp; | ||
61 | /* | ||
62 | *!< fdisc rsp unknown error | ||
63 | */ | ||
64 | u32 fdisc_alloc_wait;/* fdisc req (fcxp)alloc wait */ | ||
65 | |||
66 | u32 logo_alloc_wait;/* logo req (fcxp) alloc wait */ | ||
67 | u32 logo_sent; /* logo sent */ | ||
68 | u32 logo_accepts; /* logo accepts */ | ||
69 | u32 logo_rejects; /* logo rejects */ | ||
70 | u32 logo_rsp_err; /* logo rsp errors */ | ||
71 | u32 logo_unknown_rsp; | ||
72 | /* logo rsp unknown errors */ | ||
73 | |||
74 | u32 fab_no_npiv; /* fabric does not support npiv */ | ||
75 | |||
76 | u32 fab_offline; /* offline events from fab SM */ | ||
77 | u32 fab_online; /* online events from fab SM */ | ||
78 | u32 fab_cleanup; /* cleanup request from fab SM */ | ||
79 | u32 rsvd; | ||
80 | }; | ||
81 | |||
82 | /** | ||
83 | * BFA vport attribute returned in queries | ||
84 | */ | ||
85 | struct bfa_vport_attr_s { | ||
86 | struct bfa_port_attr_s port_attr; /* base class (port) attributes */ | ||
87 | enum bfa_vport_state vport_state; /* vport state */ | ||
88 | u32 rsvd; | ||
89 | }; | ||
90 | |||
91 | #endif /* __BFA_DEFS_VPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcb/bfa_fcb.h b/drivers/scsi/bfa/include/fcb/bfa_fcb.h deleted file mode 100644 index 2963b0bc30e7..000000000000 --- a/drivers/scsi/bfa/include/fcb/bfa_fcb.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcb.h BFA FCS callback interfaces | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCB_H__ | ||
23 | #define __BFA_FCB_H__ | ||
24 | |||
25 | /** | ||
26 | * fcb Main fcs callbacks | ||
27 | */ | ||
28 | |||
29 | void bfa_fcb_exit(struct bfad_s *bfad); | ||
30 | |||
31 | |||
32 | |||
33 | #endif /* __BFA_FCB_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcb/bfa_fcb_fcpim.h b/drivers/scsi/bfa/include/fcb/bfa_fcb_fcpim.h deleted file mode 100644 index 52585d3dd891..000000000000 --- a/drivers/scsi/bfa/include/fcb/bfa_fcb_fcpim.h +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * : bfad_fcpim.h - BFA FCS initiator mode remote port callbacks | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFAD_FCB_FCPIM_H__ | ||
23 | #define __BFAD_FCB_FCPIM_H__ | ||
24 | |||
25 | struct bfad_itnim_s; | ||
26 | |||
27 | /* | ||
28 | * RPIM callbacks | ||
29 | */ | ||
30 | |||
31 | /** | ||
32 | * Memory allocation for remote port instance. Called before PRLI is | ||
33 | * initiated to the remote target port. | ||
34 | * | ||
35 | * @param[in] bfad - driver instance | ||
36 | * @param[out] itnim - FCS remote port (IM) instance | ||
37 | * @param[out] itnim_drv - driver remote port (IM) instance | ||
38 | * | ||
39 | * @return None | ||
40 | */ | ||
41 | void bfa_fcb_itnim_alloc(struct bfad_s *bfad, struct bfa_fcs_itnim_s **itnim, | ||
42 | struct bfad_itnim_s **itnim_drv); | ||
43 | |||
44 | /** | ||
45 | * Free remote port (IM) instance. | ||
46 | * | ||
47 | * @param[in] bfad - driver instance | ||
48 | * @param[in] itnim_drv - driver remote port instance | ||
49 | * | ||
50 | * @return None | ||
51 | */ | ||
52 | void bfa_fcb_itnim_free(struct bfad_s *bfad, | ||
53 | struct bfad_itnim_s *itnim_drv); | ||
54 | |||
55 | /** | ||
56 | * Notification of when login with a remote target device is complete. | ||
57 | * | ||
58 | * @param[in] itnim_drv - driver remote port instance | ||
59 | * | ||
60 | * @return None | ||
61 | */ | ||
62 | void bfa_fcb_itnim_online(struct bfad_itnim_s *itnim_drv); | ||
63 | |||
64 | /** | ||
65 | * Notification when login with the remote device is severed. | ||
66 | * | ||
67 | * @param[in] itnim_drv - driver remote port instance | ||
68 | * | ||
69 | * @return None | ||
70 | */ | ||
71 | void bfa_fcb_itnim_offline(struct bfad_itnim_s *itnim_drv); | ||
72 | |||
73 | void bfa_fcb_itnim_tov(struct bfad_itnim_s *itnim_drv); | ||
74 | |||
75 | #endif /* __BFAD_FCB_FCPIM_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcb/bfa_fcb_port.h b/drivers/scsi/bfa/include/fcb/bfa_fcb_port.h deleted file mode 100644 index 5fd7f986fa32..000000000000 --- a/drivers/scsi/bfa/include/fcb/bfa_fcb_port.h +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcb_port.h BFA FCS virtual port driver interfaces | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCB_PORT_H__ | ||
23 | #define __BFA_FCB_PORT_H__ | ||
24 | |||
25 | #include <fcb/bfa_fcb_vport.h> | ||
26 | /** | ||
27 | * fcs_port_fcb FCS port driver interfaces | ||
28 | */ | ||
29 | |||
30 | /* | ||
31 | * Forward declarations | ||
32 | */ | ||
33 | struct bfad_port_s; | ||
34 | |||
35 | /* | ||
36 | * Callback functions from BFA FCS to driver | ||
37 | */ | ||
38 | |||
39 | /** | ||
40 | * Call from FCS to driver module when a port is instantiated. The port | ||
41 | * can be a base port or a virtual port with in the base fabric or | ||
42 | * a virtual fabric. | ||
43 | * | ||
44 | * On this callback, driver is supposed to create scsi_host, scsi_tgt or | ||
45 | * network interfaces bases on ports personality/roles. | ||
46 | * | ||
47 | * base port of base fabric: vf_drv == NULL && vp_drv == NULL | ||
48 | * vport of base fabric: vf_drv == NULL && vp_drv != NULL | ||
49 | * base port of VF: vf_drv != NULL && vp_drv == NULL | ||
50 | * vport of VF: vf_drv != NULL && vp_drv != NULL | ||
51 | * | ||
52 | * @param[in] bfad - driver instance | ||
53 | * @param[in] port - FCS port instance | ||
54 | * @param[in] roles - port roles: IM, TM, IP | ||
55 | * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF) | ||
56 | * @param[in] vp_drv - vport driver instance, NULL if base port | ||
57 | * | ||
58 | * @return None | ||
59 | */ | ||
60 | struct bfad_port_s *bfa_fcb_port_new(struct bfad_s *bfad, | ||
61 | struct bfa_fcs_port_s *port, | ||
62 | enum bfa_port_role roles, struct bfad_vf_s *vf_drv, | ||
63 | struct bfad_vport_s *vp_drv); | ||
64 | |||
65 | /** | ||
66 | * Call from FCS to driver module when a port is deleted. The port | ||
67 | * can be a base port or a virtual port with in the base fabric or | ||
68 | * a virtual fabric. | ||
69 | * | ||
70 | * @param[in] bfad - driver instance | ||
71 | * @param[in] roles - port roles: IM, TM, IP | ||
72 | * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF) | ||
73 | * @param[in] vp_drv - vport driver instance, NULL if base port | ||
74 | * | ||
75 | * @return None | ||
76 | */ | ||
77 | void bfa_fcb_port_delete(struct bfad_s *bfad, enum bfa_port_role roles, | ||
78 | struct bfad_vf_s *vf_drv, struct bfad_vport_s *vp_drv); | ||
79 | |||
80 | /** | ||
81 | * Notification when port transitions to ONLINE state. | ||
82 | * | ||
83 | * Online notification is a logical link up for the local port. This | ||
84 | * notification is sent after a successfull FLOGI, or a successful | ||
85 | * link initialization in proviate-loop or N2N topologies. | ||
86 | * | ||
87 | * @param[in] bfad - driver instance | ||
88 | * @param[in] roles - port roles: IM, TM, IP | ||
89 | * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF) | ||
90 | * @param[in] vp_drv - vport driver instance, NULL if base port | ||
91 | * | ||
92 | * @return None | ||
93 | */ | ||
94 | void bfa_fcb_port_online(struct bfad_s *bfad, enum bfa_port_role roles, | ||
95 | struct bfad_vf_s *vf_drv, struct bfad_vport_s *vp_drv); | ||
96 | |||
97 | /** | ||
98 | * Notification when port transitions to OFFLINE state. | ||
99 | * | ||
100 | * Offline notification is a logical link down for the local port. | ||
101 | * | ||
102 | * @param[in] bfad - driver instance | ||
103 | * @param[in] roles - port roles: IM, TM, IP | ||
104 | * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF) | ||
105 | * @param[in] vp_drv - vport driver instance, NULL if base port | ||
106 | * | ||
107 | * @return None | ||
108 | */ | ||
109 | void bfa_fcb_port_offline(struct bfad_s *bfad, enum bfa_port_role roles, | ||
110 | struct bfad_vf_s *vf_drv, struct bfad_vport_s *vp_drv); | ||
111 | |||
112 | |||
113 | #endif /* __BFA_FCB_PORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcb/bfa_fcb_rport.h b/drivers/scsi/bfa/include/fcb/bfa_fcb_rport.h deleted file mode 100644 index e0261bb6d1c1..000000000000 --- a/drivers/scsi/bfa/include/fcb/bfa_fcb_rport.h +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcb_rport.h BFA FCS rport driver interfaces | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCB_RPORT_H__ | ||
23 | #define __BFA_FCB_RPORT_H__ | ||
24 | |||
25 | /** | ||
26 | * fcs_rport_fcb Remote port driver interfaces | ||
27 | */ | ||
28 | |||
29 | |||
30 | struct bfad_rport_s; | ||
31 | |||
32 | /* | ||
33 | * Callback functions from BFA FCS to driver | ||
34 | */ | ||
35 | |||
36 | /** | ||
37 | * Completion callback for bfa_fcs_rport_add(). | ||
38 | * | ||
39 | * @param[in] rport_drv - driver instance of rport | ||
40 | * | ||
41 | * @return None | ||
42 | */ | ||
43 | void bfa_fcb_rport_add(struct bfad_rport_s *rport_drv); | ||
44 | |||
45 | /** | ||
46 | * Completion callback for bfa_fcs_rport_remove(). | ||
47 | * | ||
48 | * @param[in] rport_drv - driver instance of rport | ||
49 | * | ||
50 | * @return None | ||
51 | */ | ||
52 | void bfa_fcb_rport_remove(struct bfad_rport_s *rport_drv); | ||
53 | |||
54 | /** | ||
55 | * Call to allocate a rport instance. | ||
56 | * | ||
57 | * @param[in] bfad - driver instance | ||
58 | * @param[out] rport - BFA FCS instance of rport | ||
59 | * @param[out] rport_drv - driver instance of rport | ||
60 | * | ||
61 | * @retval BFA_STATUS_OK - successfully allocated | ||
62 | * @retval BFA_STATUS_ENOMEM - cannot allocate | ||
63 | */ | ||
64 | bfa_status_t bfa_fcb_rport_alloc(struct bfad_s *bfad, | ||
65 | struct bfa_fcs_rport_s **rport, | ||
66 | struct bfad_rport_s **rport_drv); | ||
67 | |||
68 | /** | ||
69 | * Call to free rport memory resources. | ||
70 | * | ||
71 | * @param[in] bfad - driver instance | ||
72 | * @param[in] rport_drv - driver instance of rport | ||
73 | * | ||
74 | * @return None | ||
75 | */ | ||
76 | void bfa_fcb_rport_free(struct bfad_s *bfad, struct bfad_rport_s **rport_drv); | ||
77 | |||
78 | |||
79 | |||
80 | #endif /* __BFA_FCB_RPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcb/bfa_fcb_vf.h b/drivers/scsi/bfa/include/fcb/bfa_fcb_vf.h deleted file mode 100644 index cfd3fac0a4e2..000000000000 --- a/drivers/scsi/bfa/include/fcb/bfa_fcb_vf.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcb_vf.h BFA FCS virtual fabric driver interfaces | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCB_VF_H__ | ||
23 | #define __BFA_FCB_VF_H__ | ||
24 | |||
25 | /** | ||
26 | * fcs_vf_fcb Virtual fabric driver intrefaces | ||
27 | */ | ||
28 | |||
29 | |||
30 | struct bfad_vf_s; | ||
31 | |||
32 | /* | ||
33 | * Callback functions from BFA FCS to driver | ||
34 | */ | ||
35 | |||
36 | /** | ||
37 | * Completion callback for bfa_fcs_vf_stop(). | ||
38 | * | ||
39 | * @param[in] vf_drv - driver instance of vf | ||
40 | * | ||
41 | * @return None | ||
42 | */ | ||
43 | void bfa_fcb_vf_stop(struct bfad_vf_s *vf_drv); | ||
44 | |||
45 | |||
46 | |||
47 | #endif /* __BFA_FCB_VF_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcb/bfa_fcb_vport.h b/drivers/scsi/bfa/include/fcb/bfa_fcb_vport.h deleted file mode 100644 index cfd6ba7c47ec..000000000000 --- a/drivers/scsi/bfa/include/fcb/bfa_fcb_vport.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcb_vport.h BFA FCS virtual port driver interfaces | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCB_VPORT_H__ | ||
23 | #define __BFA_FCB_VPORT_H__ | ||
24 | |||
25 | /** | ||
26 | * fcs_vport_fcb Virtual port driver interfaces | ||
27 | */ | ||
28 | |||
29 | |||
30 | struct bfad_vport_s; | ||
31 | |||
32 | /* | ||
33 | * Callback functions from BFA FCS to driver | ||
34 | */ | ||
35 | |||
36 | /** | ||
37 | * Completion callback for bfa_fcs_vport_delete(). | ||
38 | * | ||
39 | * @param[in] vport_drv - driver instance of vport | ||
40 | * | ||
41 | * @return None | ||
42 | */ | ||
43 | void bfa_fcb_vport_delete(struct bfad_vport_s *vport_drv); | ||
44 | void bfa_fcb_pbc_vport_create(struct bfad_s *bfad, struct bfi_pbc_vport_s); | ||
45 | |||
46 | |||
47 | |||
48 | #endif /* __BFA_FCB_VPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs.h b/drivers/scsi/bfa/include/fcs/bfa_fcs.h deleted file mode 100644 index 54e5b81ab2a3..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs.h +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_FCS_H__ | ||
19 | #define __BFA_FCS_H__ | ||
20 | |||
21 | #include <cs/bfa_debug.h> | ||
22 | #include <defs/bfa_defs_status.h> | ||
23 | #include <defs/bfa_defs_version.h> | ||
24 | #include <bfa.h> | ||
25 | #include <fcs/bfa_fcs_fabric.h> | ||
26 | |||
27 | #define BFA_FCS_OS_STR_LEN 64 | ||
28 | |||
29 | struct bfa_fcs_stats_s { | ||
30 | struct { | ||
31 | u32 untagged; /* untagged receive frames */ | ||
32 | u32 tagged; /* tagged receive frames */ | ||
33 | u32 vfid_unknown; /* VF id is unknown */ | ||
34 | } uf; | ||
35 | }; | ||
36 | |||
37 | struct bfa_fcs_driver_info_s { | ||
38 | u8 version[BFA_VERSION_LEN]; /* Driver Version */ | ||
39 | u8 host_machine_name[BFA_FCS_OS_STR_LEN]; | ||
40 | u8 host_os_name[BFA_FCS_OS_STR_LEN]; /* OS name and version */ | ||
41 | u8 host_os_patch[BFA_FCS_OS_STR_LEN];/* patch or service pack */ | ||
42 | u8 os_device_name[BFA_FCS_OS_STR_LEN]; /* Driver Device Name */ | ||
43 | }; | ||
44 | |||
45 | struct bfa_fcs_s { | ||
46 | struct bfa_s *bfa; /* corresponding BFA bfa instance */ | ||
47 | struct bfad_s *bfad; /* corresponding BDA driver instance */ | ||
48 | struct bfa_log_mod_s *logm; /* driver logging module instance */ | ||
49 | struct bfa_trc_mod_s *trcmod; /* tracing module */ | ||
50 | struct bfa_aen_s *aen; /* aen component */ | ||
51 | bfa_boolean_t vf_enabled; /* VF mode is enabled */ | ||
52 | bfa_boolean_t fdmi_enabled; /*!< FDMI is enabled */ | ||
53 | bfa_boolean_t min_cfg; /* min cfg enabled/disabled */ | ||
54 | u16 port_vfid; /* port default VF ID */ | ||
55 | struct bfa_fcs_driver_info_s driver_info; | ||
56 | struct bfa_fcs_fabric_s fabric; /* base fabric state machine */ | ||
57 | struct bfa_fcs_stats_s stats; /* FCS statistics */ | ||
58 | struct bfa_wc_s wc; /* waiting counter */ | ||
59 | }; | ||
60 | |||
61 | /* | ||
62 | * bfa fcs API functions | ||
63 | */ | ||
64 | void bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa, | ||
65 | struct bfad_s *bfad, bfa_boolean_t min_cfg); | ||
66 | void bfa_fcs_init(struct bfa_fcs_s *fcs); | ||
67 | void bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs, | ||
68 | struct bfa_fcs_driver_info_s *driver_info); | ||
69 | void bfa_fcs_set_fdmi_param(struct bfa_fcs_s *fcs, bfa_boolean_t fdmi_enable); | ||
70 | void bfa_fcs_exit(struct bfa_fcs_s *fcs); | ||
71 | void bfa_fcs_trc_init(struct bfa_fcs_s *fcs, struct bfa_trc_mod_s *trcmod); | ||
72 | void bfa_fcs_log_init(struct bfa_fcs_s *fcs, struct bfa_log_mod_s *logmod); | ||
73 | void bfa_fcs_aen_init(struct bfa_fcs_s *fcs, struct bfa_aen_s *aen); | ||
74 | void bfa_fcs_start(struct bfa_fcs_s *fcs); | ||
75 | |||
76 | #endif /* __BFA_FCS_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_auth.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_auth.h deleted file mode 100644 index 28c4c9ff08b3..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_auth.h +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_FCS_AUTH_H__ | ||
19 | #define __BFA_FCS_AUTH_H__ | ||
20 | |||
21 | struct bfa_fcs_s; | ||
22 | |||
23 | #include <defs/bfa_defs_status.h> | ||
24 | #include <defs/bfa_defs_auth.h> | ||
25 | #include <defs/bfa_defs_vf.h> | ||
26 | #include <cs/bfa_q.h> | ||
27 | #include <cs/bfa_sm.h> | ||
28 | #include <defs/bfa_defs_pport.h> | ||
29 | #include <fcs/bfa_fcs_lport.h> | ||
30 | #include <protocol/fc_sp.h> | ||
31 | |||
32 | struct bfa_fcs_fabric_s; | ||
33 | |||
34 | |||
35 | |||
36 | struct bfa_fcs_auth_s { | ||
37 | bfa_sm_t sm; /* state machine */ | ||
38 | bfa_boolean_t policy; /* authentication enabled/disabled */ | ||
39 | enum bfa_auth_status status; /* authentication status */ | ||
40 | enum auth_rjt_codes rjt_code; /* auth reject status */ | ||
41 | enum auth_rjt_code_exps rjt_code_exp; /* auth reject reason */ | ||
42 | enum bfa_auth_algo algo; /* Authentication algorithm */ | ||
43 | struct bfa_auth_stats_s stats; /* Statistics */ | ||
44 | enum auth_dh_gid group; /* DH(diffie-hellman) Group */ | ||
45 | enum bfa_auth_secretsource source; /* Secret source */ | ||
46 | char secret[BFA_AUTH_SECRET_STRING_LEN]; | ||
47 | /* secret string */ | ||
48 | u8 secret_len; | ||
49 | /* secret string length */ | ||
50 | u8 nretries; | ||
51 | /* number of retries */ | ||
52 | struct bfa_fcs_fabric_s *fabric;/* pointer to fabric */ | ||
53 | u8 sentcode; /* pointer to response data */ | ||
54 | u8 *response; /* pointer to response data */ | ||
55 | struct bfa_timer_s delay_timer; /* delay timer */ | ||
56 | struct bfa_fcxp_s *fcxp; /* pointer to fcxp */ | ||
57 | struct bfa_fcxp_wqe_s fcxp_wqe; | ||
58 | }; | ||
59 | |||
60 | /** | ||
61 | * bfa fcs authentication public functions | ||
62 | */ | ||
63 | bfa_status_t bfa_fcs_auth_get_attr(struct bfa_fcs_s *port, | ||
64 | struct bfa_auth_attr_s *attr); | ||
65 | bfa_status_t bfa_fcs_auth_set_policy(struct bfa_fcs_s *port, | ||
66 | bfa_boolean_t policy); | ||
67 | enum bfa_auth_status bfa_fcs_auth_get_status(struct bfa_fcs_s *port); | ||
68 | bfa_status_t bfa_fcs_auth_set_algo(struct bfa_fcs_s *port, | ||
69 | enum bfa_auth_algo algo); | ||
70 | bfa_status_t bfa_fcs_auth_get_stats(struct bfa_fcs_s *port, | ||
71 | struct bfa_auth_stats_s *stats); | ||
72 | bfa_status_t bfa_fcs_auth_set_dh_group(struct bfa_fcs_s *port, int group); | ||
73 | bfa_status_t bfa_fcs_auth_set_secretstring(struct bfa_fcs_s *port, | ||
74 | char *secret); | ||
75 | bfa_status_t bfa_fcs_auth_set_secretstring_encrypt(struct bfa_fcs_s *port, | ||
76 | u32 secret[], u32 len); | ||
77 | bfa_status_t bfa_fcs_auth_set_secretsource(struct bfa_fcs_s *port, | ||
78 | enum bfa_auth_secretsource src); | ||
79 | bfa_status_t bfa_fcs_auth_reset_stats(struct bfa_fcs_s *port); | ||
80 | bfa_status_t bfa_fcs_auth_reinit(struct bfa_fcs_s *port); | ||
81 | |||
82 | #endif /* __BFA_FCS_AUTH_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_fabric.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_fabric.h deleted file mode 100644 index 08b79d5e46f3..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_fabric.h +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_FCS_FABRIC_H__ | ||
19 | #define __BFA_FCS_FABRIC_H__ | ||
20 | |||
21 | struct bfa_fcs_s; | ||
22 | |||
23 | #include <defs/bfa_defs_status.h> | ||
24 | #include <defs/bfa_defs_vf.h> | ||
25 | #include <cs/bfa_q.h> | ||
26 | #include <cs/bfa_sm.h> | ||
27 | #include <defs/bfa_defs_pport.h> | ||
28 | #include <fcs/bfa_fcs_lport.h> | ||
29 | #include <protocol/fc_sp.h> | ||
30 | #include <fcs/bfa_fcs_auth.h> | ||
31 | |||
32 | /* | ||
33 | * forward declaration | ||
34 | */ | ||
35 | struct bfad_vf_s; | ||
36 | |||
37 | enum bfa_fcs_fabric_type { | ||
38 | BFA_FCS_FABRIC_UNKNOWN = 0, | ||
39 | BFA_FCS_FABRIC_SWITCHED = 1, | ||
40 | BFA_FCS_FABRIC_PLOOP = 2, | ||
41 | BFA_FCS_FABRIC_N2N = 3, | ||
42 | }; | ||
43 | |||
44 | |||
45 | struct bfa_fcs_fabric_s { | ||
46 | struct list_head qe; /* queue element */ | ||
47 | bfa_sm_t sm; /* state machine */ | ||
48 | struct bfa_fcs_s *fcs; /* FCS instance */ | ||
49 | struct bfa_fcs_port_s bport; /* base logical port */ | ||
50 | enum bfa_fcs_fabric_type fab_type; /* fabric type */ | ||
51 | enum bfa_pport_type oper_type; /* current link topology */ | ||
52 | u8 is_vf; /* is virtual fabric? */ | ||
53 | u8 is_npiv; /* is NPIV supported ? */ | ||
54 | u8 is_auth; /* is Security/Auth supported ? */ | ||
55 | u16 bb_credit; /* BB credit from fabric */ | ||
56 | u16 vf_id; /* virtual fabric ID */ | ||
57 | u16 num_vports; /* num vports */ | ||
58 | u16 rsvd; | ||
59 | struct list_head vport_q; /* queue of virtual ports */ | ||
60 | struct list_head vf_q; /* queue of virtual fabrics */ | ||
61 | struct bfad_vf_s *vf_drv; /* driver vf structure */ | ||
62 | struct bfa_timer_s link_timer; /* Link Failure timer. Vport */ | ||
63 | wwn_t fabric_name; /* attached fabric name */ | ||
64 | bfa_boolean_t auth_reqd; /* authentication required */ | ||
65 | struct bfa_timer_s delay_timer; /* delay timer */ | ||
66 | union { | ||
67 | u16 swp_vfid;/* switch port VF id */ | ||
68 | } event_arg; | ||
69 | struct bfa_fcs_auth_s auth; /* authentication config */ | ||
70 | struct bfa_wc_s wc; /* wait counter for delete */ | ||
71 | struct bfa_vf_stats_s stats; /* fabric/vf stats */ | ||
72 | struct bfa_lps_s *lps; /* lport login services */ | ||
73 | u8 fabric_ip_addr[BFA_FCS_FABRIC_IPADDR_SZ]; /* attached | ||
74 | * fabric's ip addr | ||
75 | */ | ||
76 | }; | ||
77 | |||
78 | #define bfa_fcs_fabric_npiv_capable(__f) ((__f)->is_npiv) | ||
79 | #define bfa_fcs_fabric_is_switched(__f) \ | ||
80 | ((__f)->fab_type == BFA_FCS_FABRIC_SWITCHED) | ||
81 | |||
82 | /** | ||
83 | * The design calls for a single implementation of base fabric and vf. | ||
84 | */ | ||
85 | #define bfa_fcs_vf_t struct bfa_fcs_fabric_s | ||
86 | |||
87 | struct bfa_vf_event_s { | ||
88 | u32 undefined; | ||
89 | }; | ||
90 | |||
91 | /** | ||
92 | * bfa fcs vf public functions | ||
93 | */ | ||
94 | bfa_status_t bfa_fcs_vf_mode_enable(struct bfa_fcs_s *fcs, u16 vf_id); | ||
95 | bfa_status_t bfa_fcs_vf_mode_disable(struct bfa_fcs_s *fcs); | ||
96 | bfa_status_t bfa_fcs_vf_create(bfa_fcs_vf_t *vf, struct bfa_fcs_s *fcs, | ||
97 | u16 vf_id, struct bfa_port_cfg_s *port_cfg, | ||
98 | struct bfad_vf_s *vf_drv); | ||
99 | bfa_status_t bfa_fcs_vf_delete(bfa_fcs_vf_t *vf); | ||
100 | void bfa_fcs_vf_start(bfa_fcs_vf_t *vf); | ||
101 | bfa_status_t bfa_fcs_vf_stop(bfa_fcs_vf_t *vf); | ||
102 | void bfa_fcs_vf_list(struct bfa_fcs_s *fcs, u16 *vf_ids, int *nvfs); | ||
103 | void bfa_fcs_vf_list_all(struct bfa_fcs_s *fcs, u16 *vf_ids, int *nvfs); | ||
104 | void bfa_fcs_vf_get_attr(bfa_fcs_vf_t *vf, struct bfa_vf_attr_s *vf_attr); | ||
105 | void bfa_fcs_vf_get_stats(bfa_fcs_vf_t *vf, | ||
106 | struct bfa_vf_stats_s *vf_stats); | ||
107 | void bfa_fcs_vf_clear_stats(bfa_fcs_vf_t *vf); | ||
108 | void bfa_fcs_vf_get_ports(bfa_fcs_vf_t *vf, wwn_t vpwwn[], int *nports); | ||
109 | bfa_fcs_vf_t *bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id); | ||
110 | struct bfad_vf_s *bfa_fcs_vf_get_drv_vf(bfa_fcs_vf_t *vf); | ||
111 | |||
112 | #endif /* __BFA_FCS_FABRIC_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_fcpim.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_fcpim.h deleted file mode 100644 index 9a35ecf5cdf0..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_fcpim.h +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcs_fcpim.h BFA FCS FCP Initiator Mode interfaces/defines. | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCS_FCPIM_H__ | ||
23 | #define __BFA_FCS_FCPIM_H__ | ||
24 | |||
25 | #include <defs/bfa_defs_status.h> | ||
26 | #include <defs/bfa_defs_itnim.h> | ||
27 | #include <fcs/bfa_fcs.h> | ||
28 | #include <fcs/bfa_fcs_rport.h> | ||
29 | #include <fcs/bfa_fcs_lport.h> | ||
30 | #include <bfa_fcpim.h> | ||
31 | |||
32 | /* | ||
33 | * forward declarations | ||
34 | */ | ||
35 | struct bfad_itnim_s; | ||
36 | |||
37 | struct bfa_fcs_itnim_s { | ||
38 | bfa_sm_t sm; /* state machine */ | ||
39 | struct bfa_fcs_rport_s *rport; /* parent remote rport */ | ||
40 | struct bfad_itnim_s *itnim_drv; /* driver peer instance */ | ||
41 | struct bfa_fcs_s *fcs; /* fcs instance */ | ||
42 | struct bfa_timer_s timer; /* timer functions */ | ||
43 | struct bfa_itnim_s *bfa_itnim; /* BFA itnim struct */ | ||
44 | u32 prli_retries; /* max prli retry attempts */ | ||
45 | bfa_boolean_t seq_rec; /* seq recovery support */ | ||
46 | bfa_boolean_t rec_support; /* REC supported */ | ||
47 | bfa_boolean_t conf_comp; /* FCP_CONF support */ | ||
48 | bfa_boolean_t task_retry_id; /* task retry id supp */ | ||
49 | struct bfa_fcxp_wqe_s fcxp_wqe; /* wait qelem for fcxp */ | ||
50 | struct bfa_fcxp_s *fcxp; /* FCXP in use */ | ||
51 | struct bfa_itnim_stats_s stats; /* itn statistics */ | ||
52 | }; | ||
53 | |||
54 | |||
55 | static inline struct bfad_port_s * | ||
56 | bfa_fcs_itnim_get_drvport(struct bfa_fcs_itnim_s *itnim) | ||
57 | { | ||
58 | return itnim->rport->port->bfad_port; | ||
59 | } | ||
60 | |||
61 | |||
62 | static inline struct bfa_fcs_port_s * | ||
63 | bfa_fcs_itnim_get_port(struct bfa_fcs_itnim_s *itnim) | ||
64 | { | ||
65 | return itnim->rport->port; | ||
66 | } | ||
67 | |||
68 | |||
69 | static inline wwn_t | ||
70 | bfa_fcs_itnim_get_nwwn(struct bfa_fcs_itnim_s *itnim) | ||
71 | { | ||
72 | return itnim->rport->nwwn; | ||
73 | } | ||
74 | |||
75 | |||
76 | static inline wwn_t | ||
77 | bfa_fcs_itnim_get_pwwn(struct bfa_fcs_itnim_s *itnim) | ||
78 | { | ||
79 | return itnim->rport->pwwn; | ||
80 | } | ||
81 | |||
82 | |||
83 | static inline u32 | ||
84 | bfa_fcs_itnim_get_fcid(struct bfa_fcs_itnim_s *itnim) | ||
85 | { | ||
86 | return itnim->rport->pid; | ||
87 | } | ||
88 | |||
89 | |||
90 | static inline u32 | ||
91 | bfa_fcs_itnim_get_maxfrsize(struct bfa_fcs_itnim_s *itnim) | ||
92 | { | ||
93 | return itnim->rport->maxfrsize; | ||
94 | } | ||
95 | |||
96 | |||
97 | static inline enum fc_cos | ||
98 | bfa_fcs_itnim_get_cos(struct bfa_fcs_itnim_s *itnim) | ||
99 | { | ||
100 | return itnim->rport->fc_cos; | ||
101 | } | ||
102 | |||
103 | |||
104 | static inline struct bfad_itnim_s * | ||
105 | bfa_fcs_itnim_get_drvitn(struct bfa_fcs_itnim_s *itnim) | ||
106 | { | ||
107 | return itnim->itnim_drv; | ||
108 | } | ||
109 | |||
110 | |||
111 | static inline struct bfa_itnim_s * | ||
112 | bfa_fcs_itnim_get_halitn(struct bfa_fcs_itnim_s *itnim) | ||
113 | { | ||
114 | return itnim->bfa_itnim; | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * bfa fcs FCP Initiator mode API functions | ||
119 | */ | ||
120 | void bfa_fcs_itnim_get_attr(struct bfa_fcs_itnim_s *itnim, | ||
121 | struct bfa_itnim_attr_s *attr); | ||
122 | void bfa_fcs_itnim_get_stats(struct bfa_fcs_itnim_s *itnim, | ||
123 | struct bfa_itnim_stats_s *stats); | ||
124 | struct bfa_fcs_itnim_s *bfa_fcs_itnim_lookup(struct bfa_fcs_port_s *port, | ||
125 | wwn_t rpwwn); | ||
126 | bfa_status_t bfa_fcs_itnim_attr_get(struct bfa_fcs_port_s *port, wwn_t rpwwn, | ||
127 | struct bfa_itnim_attr_s *attr); | ||
128 | bfa_status_t bfa_fcs_itnim_stats_get(struct bfa_fcs_port_s *port, wwn_t rpwwn, | ||
129 | struct bfa_itnim_stats_s *stats); | ||
130 | bfa_status_t bfa_fcs_itnim_stats_clear(struct bfa_fcs_port_s *port, | ||
131 | wwn_t rpwwn); | ||
132 | #endif /* __BFA_FCS_FCPIM_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_fdmi.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_fdmi.h deleted file mode 100644 index 4441fffc9c82..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_fdmi.h +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcs_fdmi.h BFA fcs fdmi module public interface | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCS_FDMI_H__ | ||
23 | #define __BFA_FCS_FDMI_H__ | ||
24 | #include <bfa_os_inc.h> | ||
25 | #include <protocol/fdmi.h> | ||
26 | |||
27 | #define BFA_FCS_FDMI_SUPORTED_SPEEDS (FDMI_TRANS_SPEED_1G | \ | ||
28 | FDMI_TRANS_SPEED_2G | \ | ||
29 | FDMI_TRANS_SPEED_4G | \ | ||
30 | FDMI_TRANS_SPEED_8G) | ||
31 | |||
32 | /* | ||
33 | * HBA Attribute Block : BFA internal representation. Note : Some variable | ||
34 | * sizes have been trimmed to suit BFA For Ex : Model will be "Brocade". Based | ||
35 | * on this the size has been reduced to 16 bytes from the standard's 64 bytes. | ||
36 | */ | ||
37 | struct bfa_fcs_fdmi_hba_attr_s { | ||
38 | wwn_t node_name; | ||
39 | u8 manufacturer[64]; | ||
40 | u8 serial_num[64]; | ||
41 | u8 model[16]; | ||
42 | u8 model_desc[256]; | ||
43 | u8 hw_version[8]; | ||
44 | u8 driver_version[8]; | ||
45 | u8 option_rom_ver[BFA_VERSION_LEN]; | ||
46 | u8 fw_version[8]; | ||
47 | u8 os_name[256]; | ||
48 | u32 max_ct_pyld; | ||
49 | }; | ||
50 | |||
51 | /* | ||
52 | * Port Attribute Block | ||
53 | */ | ||
54 | struct bfa_fcs_fdmi_port_attr_s { | ||
55 | u8 supp_fc4_types[32]; /* supported FC4 types */ | ||
56 | u32 supp_speed; /* supported speed */ | ||
57 | u32 curr_speed; /* current Speed */ | ||
58 | u32 max_frm_size; /* max frame size */ | ||
59 | u8 os_device_name[256]; /* OS device Name */ | ||
60 | u8 host_name[256]; /* host name */ | ||
61 | }; | ||
62 | |||
63 | #endif /* __BFA_FCS_FDMI_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h deleted file mode 100644 index ceaefd3060f4..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_lport.h +++ /dev/null | |||
@@ -1,219 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcs_port.h BFA fcs port module public interface | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCS_PORT_H__ | ||
23 | #define __BFA_FCS_PORT_H__ | ||
24 | |||
25 | #include <defs/bfa_defs_status.h> | ||
26 | #include <defs/bfa_defs_port.h> | ||
27 | #include <defs/bfa_defs_pport.h> | ||
28 | #include <defs/bfa_defs_rport.h> | ||
29 | #include <cs/bfa_q.h> | ||
30 | #include <bfa_svc.h> | ||
31 | #include <cs/bfa_wc.h> | ||
32 | |||
33 | struct bfa_fcs_s; | ||
34 | struct bfa_fcs_fabric_s; | ||
35 | |||
36 | /* | ||
37 | * Maximum Rports supported per port (physical/logical). | ||
38 | */ | ||
39 | #define BFA_FCS_MAX_RPORTS_SUPP 256 /* @todo : tentative value */ | ||
40 | |||
41 | |||
42 | struct bfa_fcs_port_ns_s { | ||
43 | bfa_sm_t sm; /* state machine */ | ||
44 | struct bfa_timer_s timer; | ||
45 | struct bfa_fcs_port_s *port; /* parent port */ | ||
46 | struct bfa_fcxp_s *fcxp; | ||
47 | struct bfa_fcxp_wqe_s fcxp_wqe; | ||
48 | }; | ||
49 | |||
50 | |||
51 | struct bfa_fcs_port_scn_s { | ||
52 | bfa_sm_t sm; /* state machine */ | ||
53 | struct bfa_timer_s timer; | ||
54 | struct bfa_fcs_port_s *port; /* parent port */ | ||
55 | struct bfa_fcxp_s *fcxp; | ||
56 | struct bfa_fcxp_wqe_s fcxp_wqe; | ||
57 | }; | ||
58 | |||
59 | |||
60 | struct bfa_fcs_port_fdmi_s { | ||
61 | bfa_sm_t sm; /* state machine */ | ||
62 | struct bfa_timer_s timer; | ||
63 | struct bfa_fcs_port_ms_s *ms; /* parent ms */ | ||
64 | struct bfa_fcxp_s *fcxp; | ||
65 | struct bfa_fcxp_wqe_s fcxp_wqe; | ||
66 | u8 retry_cnt; /* retry count */ | ||
67 | u8 rsvd[3]; | ||
68 | }; | ||
69 | |||
70 | |||
71 | struct bfa_fcs_port_ms_s { | ||
72 | bfa_sm_t sm; /* state machine */ | ||
73 | struct bfa_timer_s timer; | ||
74 | struct bfa_fcs_port_s *port; /* parent port */ | ||
75 | struct bfa_fcxp_s *fcxp; | ||
76 | struct bfa_fcxp_wqe_s fcxp_wqe; | ||
77 | struct bfa_fcs_port_fdmi_s fdmi; /* FDMI component of MS */ | ||
78 | u8 retry_cnt; /* retry count */ | ||
79 | u8 rsvd[3]; | ||
80 | }; | ||
81 | |||
82 | |||
83 | struct bfa_fcs_port_fab_s { | ||
84 | struct bfa_fcs_port_ns_s ns; /* NS component of port */ | ||
85 | struct bfa_fcs_port_scn_s scn; /* scn component of port */ | ||
86 | struct bfa_fcs_port_ms_s ms; /* MS component of port */ | ||
87 | }; | ||
88 | |||
89 | |||
90 | |||
91 | #define MAX_ALPA_COUNT 127 | ||
92 | |||
93 | struct bfa_fcs_port_loop_s { | ||
94 | u8 num_alpa; /* Num of ALPA entries in the map */ | ||
95 | u8 alpa_pos_map[MAX_ALPA_COUNT]; /* ALPA Positional | ||
96 | *Map */ | ||
97 | struct bfa_fcs_port_s *port; /* parent port */ | ||
98 | }; | ||
99 | |||
100 | |||
101 | |||
102 | struct bfa_fcs_port_n2n_s { | ||
103 | u32 rsvd; | ||
104 | u16 reply_oxid; /* ox_id from the req flogi to be | ||
105 | *used in flogi acc */ | ||
106 | wwn_t rem_port_wwn; /* Attached port's wwn */ | ||
107 | }; | ||
108 | |||
109 | |||
110 | union bfa_fcs_port_topo_u { | ||
111 | struct bfa_fcs_port_fab_s pfab; | ||
112 | struct bfa_fcs_port_loop_s ploop; | ||
113 | struct bfa_fcs_port_n2n_s pn2n; | ||
114 | }; | ||
115 | |||
116 | |||
117 | struct bfa_fcs_port_s { | ||
118 | struct list_head qe; /* used by port/vport */ | ||
119 | bfa_sm_t sm; /* state machine */ | ||
120 | struct bfa_fcs_fabric_s *fabric;/* parent fabric */ | ||
121 | struct bfa_port_cfg_s port_cfg;/* port configuration */ | ||
122 | struct bfa_timer_s link_timer; /* timer for link offline */ | ||
123 | u32 pid:24; /* FC address */ | ||
124 | u8 lp_tag; /* lport tag */ | ||
125 | u16 num_rports; /* Num of r-ports */ | ||
126 | struct list_head rport_q; /* queue of discovered r-ports */ | ||
127 | struct bfa_fcs_s *fcs; /* FCS instance */ | ||
128 | union bfa_fcs_port_topo_u port_topo; /* fabric/loop/n2n details */ | ||
129 | struct bfad_port_s *bfad_port; /* driver peer instance */ | ||
130 | struct bfa_fcs_vport_s *vport; /* NULL for base ports */ | ||
131 | struct bfa_fcxp_s *fcxp; | ||
132 | struct bfa_fcxp_wqe_s fcxp_wqe; | ||
133 | struct bfa_port_stats_s stats; | ||
134 | struct bfa_wc_s wc; /* waiting counter for events */ | ||
135 | }; | ||
136 | |||
137 | #define bfa_fcs_lport_t struct bfa_fcs_port_s | ||
138 | |||
139 | /** | ||
140 | * Symbolic Name related defines | ||
141 | * Total bytes 255. | ||
142 | * Physical Port's symbolic name 128 bytes. | ||
143 | * For Vports, Vport's symbolic name is appended to the Physical port's | ||
144 | * Symbolic Name. | ||
145 | * | ||
146 | * Physical Port's symbolic name Format : (Total 128 bytes) | ||
147 | * Adapter Model number/name : 12 bytes | ||
148 | * Driver Version : 10 bytes | ||
149 | * Host Machine Name : 30 bytes | ||
150 | * Host OS Info : 48 bytes | ||
151 | * Host OS PATCH Info : 16 bytes | ||
152 | * ( remaining 12 bytes reserved to be used for separator) | ||
153 | */ | ||
154 | #define BFA_FCS_PORT_SYMBNAME_SEPARATOR " | " | ||
155 | |||
156 | #define BFA_FCS_PORT_SYMBNAME_MODEL_SZ 12 | ||
157 | #define BFA_FCS_PORT_SYMBNAME_VERSION_SZ 10 | ||
158 | #define BFA_FCS_PORT_SYMBNAME_MACHINENAME_SZ 30 | ||
159 | #define BFA_FCS_PORT_SYMBNAME_OSINFO_SZ 48 | ||
160 | #define BFA_FCS_PORT_SYMBNAME_OSPATCH_SZ 16 | ||
161 | |||
162 | /** | ||
163 | * Get FC port ID for a logical port. | ||
164 | */ | ||
165 | #define bfa_fcs_port_get_fcid(_lport) ((_lport)->pid) | ||
166 | #define bfa_fcs_port_get_pwwn(_lport) ((_lport)->port_cfg.pwwn) | ||
167 | #define bfa_fcs_port_get_nwwn(_lport) ((_lport)->port_cfg.nwwn) | ||
168 | #define bfa_fcs_port_get_psym_name(_lport) ((_lport)->port_cfg.sym_name) | ||
169 | #define bfa_fcs_port_is_initiator(_lport) \ | ||
170 | ((_lport)->port_cfg.roles & BFA_PORT_ROLE_FCP_IM) | ||
171 | #define bfa_fcs_port_is_target(_lport) \ | ||
172 | ((_lport)->port_cfg.roles & BFA_PORT_ROLE_FCP_TM) | ||
173 | #define bfa_fcs_port_get_nrports(_lport) \ | ||
174 | ((_lport) ? (_lport)->num_rports : 0) | ||
175 | |||
176 | static inline struct bfad_port_s * | ||
177 | bfa_fcs_port_get_drvport(struct bfa_fcs_port_s *port) | ||
178 | { | ||
179 | return port->bfad_port; | ||
180 | } | ||
181 | |||
182 | |||
183 | #define bfa_fcs_port_get_opertype(_lport) ((_lport)->fabric->oper_type) | ||
184 | |||
185 | |||
186 | #define bfa_fcs_port_get_fabric_name(_lport) ((_lport)->fabric->fabric_name) | ||
187 | |||
188 | |||
189 | #define bfa_fcs_port_get_fabric_ipaddr(_lport) \ | ||
190 | ((_lport)->fabric->fabric_ip_addr) | ||
191 | |||
192 | /** | ||
193 | * bfa fcs port public functions | ||
194 | */ | ||
195 | void bfa_fcs_cfg_base_port(struct bfa_fcs_s *fcs, | ||
196 | struct bfa_port_cfg_s *port_cfg); | ||
197 | struct bfa_fcs_port_s *bfa_fcs_get_base_port(struct bfa_fcs_s *fcs); | ||
198 | void bfa_fcs_port_get_rports(struct bfa_fcs_port_s *port, | ||
199 | wwn_t rport_wwns[], int *nrports); | ||
200 | |||
201 | wwn_t bfa_fcs_port_get_rport(struct bfa_fcs_port_s *port, wwn_t wwn, | ||
202 | int index, int nrports, bfa_boolean_t bwwn); | ||
203 | |||
204 | struct bfa_fcs_port_s *bfa_fcs_lookup_port(struct bfa_fcs_s *fcs, | ||
205 | u16 vf_id, wwn_t lpwwn); | ||
206 | |||
207 | void bfa_fcs_port_get_info(struct bfa_fcs_port_s *port, | ||
208 | struct bfa_port_info_s *port_info); | ||
209 | void bfa_fcs_port_get_attr(struct bfa_fcs_port_s *port, | ||
210 | struct bfa_port_attr_s *port_attr); | ||
211 | void bfa_fcs_port_get_stats(struct bfa_fcs_port_s *fcs_port, | ||
212 | struct bfa_port_stats_s *port_stats); | ||
213 | void bfa_fcs_port_clear_stats(struct bfa_fcs_port_s *fcs_port); | ||
214 | enum bfa_pport_speed bfa_fcs_port_get_rport_max_speed( | ||
215 | struct bfa_fcs_port_s *port); | ||
216 | void bfa_fcs_port_enable_ipfc_roles(struct bfa_fcs_port_s *fcs_port); | ||
217 | void bfa_fcs_port_disable_ipfc_roles(struct bfa_fcs_port_s *fcs_port); | ||
218 | |||
219 | #endif /* __BFA_FCS_PORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_rport.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_rport.h deleted file mode 100644 index 3027fc6c7722..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_rport.h +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __BFA_FCS_RPORT_H__ | ||
19 | #define __BFA_FCS_RPORT_H__ | ||
20 | |||
21 | #include <defs/bfa_defs_status.h> | ||
22 | #include <cs/bfa_q.h> | ||
23 | #include <fcs/bfa_fcs.h> | ||
24 | #include <defs/bfa_defs_rport.h> | ||
25 | |||
26 | #define BFA_FCS_RPORT_DEF_DEL_TIMEOUT 90 /* in secs */ | ||
27 | /* | ||
28 | * forward declarations | ||
29 | */ | ||
30 | struct bfad_rport_s; | ||
31 | |||
32 | struct bfa_fcs_itnim_s; | ||
33 | struct bfa_fcs_tin_s; | ||
34 | struct bfa_fcs_iprp_s; | ||
35 | |||
36 | /* Rport Features (RPF) */ | ||
37 | struct bfa_fcs_rpf_s { | ||
38 | bfa_sm_t sm; /* state machine */ | ||
39 | struct bfa_fcs_rport_s *rport; /* parent rport */ | ||
40 | struct bfa_timer_s timer; /* general purpose timer */ | ||
41 | struct bfa_fcxp_s *fcxp; /* FCXP needed for discarding */ | ||
42 | struct bfa_fcxp_wqe_s fcxp_wqe; /* fcxp wait queue element */ | ||
43 | int rpsc_retries; /* max RPSC retry attempts */ | ||
44 | enum bfa_pport_speed rpsc_speed; /* Current Speed from RPSC. | ||
45 | * O if RPSC fails */ | ||
46 | enum bfa_pport_speed assigned_speed; /* Speed assigned by the user. | ||
47 | * will be used if RPSC is not | ||
48 | * supported by the rport */ | ||
49 | }; | ||
50 | |||
51 | struct bfa_fcs_rport_s { | ||
52 | struct list_head qe; /* used by port/vport */ | ||
53 | struct bfa_fcs_port_s *port; /* parent FCS port */ | ||
54 | struct bfa_fcs_s *fcs; /* fcs instance */ | ||
55 | struct bfad_rport_s *rp_drv; /* driver peer instance */ | ||
56 | u32 pid; /* port ID of rport */ | ||
57 | u16 maxfrsize; /* maximum frame size */ | ||
58 | u16 reply_oxid; /* OX_ID of inbound requests */ | ||
59 | enum fc_cos fc_cos; /* FC classes of service supp */ | ||
60 | bfa_boolean_t cisc; /* CISC capable device */ | ||
61 | bfa_boolean_t prlo; /* processing prlo or LOGO */ | ||
62 | wwn_t pwwn; /* port wwn of rport */ | ||
63 | wwn_t nwwn; /* node wwn of rport */ | ||
64 | struct bfa_rport_symname_s psym_name; /* port symbolic name */ | ||
65 | bfa_sm_t sm; /* state machine */ | ||
66 | struct bfa_timer_s timer; /* general purpose timer */ | ||
67 | struct bfa_fcs_itnim_s *itnim; /* ITN initiator mode role */ | ||
68 | struct bfa_fcs_tin_s *tin; /* ITN initiator mode role */ | ||
69 | struct bfa_fcs_iprp_s *iprp; /* IP/FC role */ | ||
70 | struct bfa_rport_s *bfa_rport; /* BFA Rport */ | ||
71 | struct bfa_fcxp_s *fcxp; /* FCXP needed for discarding */ | ||
72 | int plogi_retries; /* max plogi retry attempts */ | ||
73 | int ns_retries; /* max NS query retry attempts */ | ||
74 | struct bfa_fcxp_wqe_s fcxp_wqe; /* fcxp wait queue element */ | ||
75 | struct bfa_rport_stats_s stats; /* rport stats */ | ||
76 | enum bfa_rport_function scsi_function; /* Initiator/Target */ | ||
77 | struct bfa_fcs_rpf_s rpf; /* Rport features module */ | ||
78 | }; | ||
79 | |||
80 | static inline struct bfa_rport_s * | ||
81 | bfa_fcs_rport_get_halrport(struct bfa_fcs_rport_s *rport) | ||
82 | { | ||
83 | return rport->bfa_rport; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * bfa fcs rport API functions | ||
88 | */ | ||
89 | bfa_status_t bfa_fcs_rport_add(struct bfa_fcs_port_s *port, wwn_t *pwwn, | ||
90 | struct bfa_fcs_rport_s *rport, | ||
91 | struct bfad_rport_s *rport_drv); | ||
92 | bfa_status_t bfa_fcs_rport_remove(struct bfa_fcs_rport_s *rport); | ||
93 | void bfa_fcs_rport_get_attr(struct bfa_fcs_rport_s *rport, | ||
94 | struct bfa_rport_attr_s *attr); | ||
95 | void bfa_fcs_rport_get_stats(struct bfa_fcs_rport_s *rport, | ||
96 | struct bfa_rport_stats_s *stats); | ||
97 | void bfa_fcs_rport_clear_stats(struct bfa_fcs_rport_s *rport); | ||
98 | struct bfa_fcs_rport_s *bfa_fcs_rport_lookup(struct bfa_fcs_port_s *port, | ||
99 | wwn_t rpwwn); | ||
100 | struct bfa_fcs_rport_s *bfa_fcs_rport_lookup_by_nwwn( | ||
101 | struct bfa_fcs_port_s *port, wwn_t rnwwn); | ||
102 | void bfa_fcs_rport_set_del_timeout(u8 rport_tmo); | ||
103 | void bfa_fcs_rport_set_speed(struct bfa_fcs_rport_s *rport, | ||
104 | enum bfa_pport_speed speed); | ||
105 | #endif /* __BFA_FCS_RPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/fcs/bfa_fcs_vport.h b/drivers/scsi/bfa/include/fcs/bfa_fcs_vport.h deleted file mode 100644 index 0af262430860..000000000000 --- a/drivers/scsi/bfa/include/fcs/bfa_fcs_vport.h +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * bfa_fcs_vport.h BFA fcs vport module public interface | ||
20 | */ | ||
21 | |||
22 | #ifndef __BFA_FCS_VPORT_H__ | ||
23 | #define __BFA_FCS_VPORT_H__ | ||
24 | |||
25 | #include <defs/bfa_defs_status.h> | ||
26 | #include <defs/bfa_defs_port.h> | ||
27 | #include <defs/bfa_defs_vport.h> | ||
28 | #include <fcs/bfa_fcs.h> | ||
29 | #include <fcb/bfa_fcb_vport.h> | ||
30 | |||
31 | struct bfa_fcs_vport_s { | ||
32 | struct list_head qe; /* queue elem */ | ||
33 | bfa_sm_t sm; /* state machine */ | ||
34 | bfa_fcs_lport_t lport; /* logical port */ | ||
35 | struct bfa_timer_s timer; /* general purpose timer */ | ||
36 | struct bfad_vport_s *vport_drv; /* Driver private */ | ||
37 | struct bfa_vport_stats_s vport_stats; /* vport statistics */ | ||
38 | struct bfa_lps_s *lps; /* Lport login service */ | ||
39 | int fdisc_retries; | ||
40 | }; | ||
41 | |||
42 | #define bfa_fcs_vport_get_port(vport) \ | ||
43 | ((struct bfa_fcs_port_s *)(&vport->port)) | ||
44 | |||
45 | /** | ||
46 | * bfa fcs vport public functions | ||
47 | */ | ||
48 | bfa_status_t bfa_fcs_vport_create(struct bfa_fcs_vport_s *vport, | ||
49 | struct bfa_fcs_s *fcs, u16 vf_id, | ||
50 | struct bfa_port_cfg_s *port_cfg, | ||
51 | struct bfad_vport_s *vport_drv); | ||
52 | bfa_status_t bfa_fcs_pbc_vport_create(struct bfa_fcs_vport_s *vport, | ||
53 | struct bfa_fcs_s *fcs, uint16_t vf_id, | ||
54 | struct bfa_port_cfg_s *port_cfg, | ||
55 | struct bfad_vport_s *vport_drv); | ||
56 | bfa_status_t bfa_fcs_vport_delete(struct bfa_fcs_vport_s *vport); | ||
57 | bfa_status_t bfa_fcs_vport_start(struct bfa_fcs_vport_s *vport); | ||
58 | bfa_status_t bfa_fcs_vport_stop(struct bfa_fcs_vport_s *vport); | ||
59 | void bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport, | ||
60 | struct bfa_vport_attr_s *vport_attr); | ||
61 | void bfa_fcs_vport_get_stats(struct bfa_fcs_vport_s *vport, | ||
62 | struct bfa_vport_stats_s *vport_stats); | ||
63 | void bfa_fcs_vport_clr_stats(struct bfa_fcs_vport_s *vport); | ||
64 | struct bfa_fcs_vport_s *bfa_fcs_vport_lookup(struct bfa_fcs_s *fcs, | ||
65 | u16 vf_id, wwn_t vpwwn); | ||
66 | |||
67 | #endif /* __BFA_FCS_VPORT_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/log/bfa_log_fcs.h b/drivers/scsi/bfa/include/log/bfa_log_fcs.h deleted file mode 100644 index b6f5df8827f8..000000000000 --- a/drivers/scsi/bfa/include/log/bfa_log_fcs.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * messages define for FCS Module | ||
20 | */ | ||
21 | #ifndef __BFA_LOG_FCS_H__ | ||
22 | #define __BFA_LOG_FCS_H__ | ||
23 | #include <cs/bfa_log.h> | ||
24 | #define BFA_LOG_FCS_FABRIC_NOSWITCH \ | ||
25 | (((u32) BFA_LOG_FCS_ID << BFA_LOG_MODID_OFFSET) | 1) | ||
26 | #define BFA_LOG_FCS_FABRIC_ISOLATED \ | ||
27 | (((u32) BFA_LOG_FCS_ID << BFA_LOG_MODID_OFFSET) | 2) | ||
28 | #endif | ||
diff --git a/drivers/scsi/bfa/include/log/bfa_log_hal.h b/drivers/scsi/bfa/include/log/bfa_log_hal.h deleted file mode 100644 index 5f8f5e30b9e8..000000000000 --- a/drivers/scsi/bfa/include/log/bfa_log_hal.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for HAL Module */ | ||
19 | #ifndef __BFA_LOG_HAL_H__ | ||
20 | #define __BFA_LOG_HAL_H__ | ||
21 | #include <cs/bfa_log.h> | ||
22 | #define BFA_LOG_HAL_ASSERT \ | ||
23 | (((u32) BFA_LOG_HAL_ID << BFA_LOG_MODID_OFFSET) | 1) | ||
24 | #define BFA_LOG_HAL_HEARTBEAT_FAILURE \ | ||
25 | (((u32) BFA_LOG_HAL_ID << BFA_LOG_MODID_OFFSET) | 2) | ||
26 | #define BFA_LOG_HAL_FCPIM_PARM_INVALID \ | ||
27 | (((u32) BFA_LOG_HAL_ID << BFA_LOG_MODID_OFFSET) | 3) | ||
28 | #define BFA_LOG_HAL_SM_ASSERT \ | ||
29 | (((u32) BFA_LOG_HAL_ID << BFA_LOG_MODID_OFFSET) | 4) | ||
30 | #define BFA_LOG_HAL_DRIVER_ERROR \ | ||
31 | (((u32) BFA_LOG_HAL_ID << BFA_LOG_MODID_OFFSET) | 5) | ||
32 | #define BFA_LOG_HAL_DRIVER_CONFIG_ERROR \ | ||
33 | (((u32) BFA_LOG_HAL_ID << BFA_LOG_MODID_OFFSET) | 6) | ||
34 | #define BFA_LOG_HAL_MBOX_ERROR \ | ||
35 | (((u32) BFA_LOG_HAL_ID << BFA_LOG_MODID_OFFSET) | 7) | ||
36 | #endif | ||
diff --git a/drivers/scsi/bfa/include/log/bfa_log_linux.h b/drivers/scsi/bfa/include/log/bfa_log_linux.h deleted file mode 100644 index 44bc89768bda..000000000000 --- a/drivers/scsi/bfa/include/log/bfa_log_linux.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* messages define for LINUX Module */ | ||
19 | #ifndef __BFA_LOG_LINUX_H__ | ||
20 | #define __BFA_LOG_LINUX_H__ | ||
21 | #include <cs/bfa_log.h> | ||
22 | #define BFA_LOG_LINUX_DEVICE_CLAIMED \ | ||
23 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 1) | ||
24 | #define BFA_LOG_LINUX_HASH_INIT_FAILED \ | ||
25 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 2) | ||
26 | #define BFA_LOG_LINUX_SYSFS_FAILED \ | ||
27 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 3) | ||
28 | #define BFA_LOG_LINUX_MEM_ALLOC_FAILED \ | ||
29 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 4) | ||
30 | #define BFA_LOG_LINUX_DRIVER_REGISTRATION_FAILED \ | ||
31 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 5) | ||
32 | #define BFA_LOG_LINUX_ITNIM_FREE \ | ||
33 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 6) | ||
34 | #define BFA_LOG_LINUX_ITNIM_ONLINE \ | ||
35 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 7) | ||
36 | #define BFA_LOG_LINUX_ITNIM_OFFLINE \ | ||
37 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 8) | ||
38 | #define BFA_LOG_LINUX_SCSI_HOST_FREE \ | ||
39 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 9) | ||
40 | #define BFA_LOG_LINUX_SCSI_ABORT \ | ||
41 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 10) | ||
42 | #define BFA_LOG_LINUX_SCSI_ABORT_COMP \ | ||
43 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 11) | ||
44 | #define BFA_LOG_LINUX_DRIVER_CONFIG_ERROR \ | ||
45 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 12) | ||
46 | #define BFA_LOG_LINUX_BNA_STATE_MACHINE \ | ||
47 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 13) | ||
48 | #define BFA_LOG_LINUX_IOC_ERROR \ | ||
49 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 14) | ||
50 | #define BFA_LOG_LINUX_RESOURCE_ALLOC_ERROR \ | ||
51 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 15) | ||
52 | #define BFA_LOG_LINUX_RING_BUFFER_ERROR \ | ||
53 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 16) | ||
54 | #define BFA_LOG_LINUX_DRIVER_ERROR \ | ||
55 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 17) | ||
56 | #define BFA_LOG_LINUX_DRIVER_INFO \ | ||
57 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 18) | ||
58 | #define BFA_LOG_LINUX_DRIVER_DIAG \ | ||
59 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 19) | ||
60 | #define BFA_LOG_LINUX_DRIVER_AEN \ | ||
61 | (((u32) BFA_LOG_LINUX_ID << BFA_LOG_MODID_OFFSET) | 20) | ||
62 | #endif | ||
diff --git a/drivers/scsi/bfa/include/log/bfa_log_wdrv.h b/drivers/scsi/bfa/include/log/bfa_log_wdrv.h deleted file mode 100644 index 809a95f7afe2..000000000000 --- a/drivers/scsi/bfa/include/log/bfa_log_wdrv.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * messages define for WDRV Module | ||
20 | */ | ||
21 | #ifndef __BFA_LOG_WDRV_H__ | ||
22 | #define __BFA_LOG_WDRV_H__ | ||
23 | #include <cs/bfa_log.h> | ||
24 | #define BFA_LOG_WDRV_IOC_INIT_ERROR \ | ||
25 | (((u32) BFA_LOG_WDRV_ID << BFA_LOG_MODID_OFFSET) | 1) | ||
26 | #define BFA_LOG_WDRV_IOC_INTERNAL_ERROR \ | ||
27 | (((u32) BFA_LOG_WDRV_ID << BFA_LOG_MODID_OFFSET) | 2) | ||
28 | #define BFA_LOG_WDRV_IOC_START_ERROR \ | ||
29 | (((u32) BFA_LOG_WDRV_ID << BFA_LOG_MODID_OFFSET) | 3) | ||
30 | #define BFA_LOG_WDRV_IOC_STOP_ERROR \ | ||
31 | (((u32) BFA_LOG_WDRV_ID << BFA_LOG_MODID_OFFSET) | 4) | ||
32 | #define BFA_LOG_WDRV_INSUFFICIENT_RESOURCES \ | ||
33 | (((u32) BFA_LOG_WDRV_ID << BFA_LOG_MODID_OFFSET) | 5) | ||
34 | #define BFA_LOG_WDRV_BASE_ADDRESS_MAP_ERROR \ | ||
35 | (((u32) BFA_LOG_WDRV_ID << BFA_LOG_MODID_OFFSET) | 6) | ||
36 | #endif | ||
diff --git a/drivers/scsi/bfa/include/protocol/ct.h b/drivers/scsi/bfa/include/protocol/ct.h deleted file mode 100644 index b82540a230c4..000000000000 --- a/drivers/scsi/bfa/include/protocol/ct.h +++ /dev/null | |||
@@ -1,492 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __CT_H__ | ||
19 | #define __CT_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | struct ct_hdr_s{ | ||
26 | u32 rev_id:8; /* Revision of the CT */ | ||
27 | u32 in_id:24; /* Initiator Id */ | ||
28 | u32 gs_type:8; /* Generic service Type */ | ||
29 | u32 gs_sub_type:8; /* Generic service sub type */ | ||
30 | u32 options:8; /* options */ | ||
31 | u32 rsvrd:8; /* reserved */ | ||
32 | u32 cmd_rsp_code:16;/* ct command/response code */ | ||
33 | u32 max_res_size:16;/* maximum/residual size */ | ||
34 | u32 frag_id:8; /* fragment ID */ | ||
35 | u32 reason_code:8; /* reason code */ | ||
36 | u32 exp_code:8; /* explanation code */ | ||
37 | u32 vendor_unq:8; /* vendor unique */ | ||
38 | }; | ||
39 | |||
40 | /* | ||
41 | * defines for the Revision | ||
42 | */ | ||
43 | enum { | ||
44 | CT_GS3_REVISION = 0x01, | ||
45 | }; | ||
46 | |||
47 | /* | ||
48 | * defines for gs_type | ||
49 | */ | ||
50 | enum { | ||
51 | CT_GSTYPE_KEYSERVICE = 0xF7, | ||
52 | CT_GSTYPE_ALIASSERVICE = 0xF8, | ||
53 | CT_GSTYPE_MGMTSERVICE = 0xFA, | ||
54 | CT_GSTYPE_TIMESERVICE = 0xFB, | ||
55 | CT_GSTYPE_DIRSERVICE = 0xFC, | ||
56 | }; | ||
57 | |||
58 | /* | ||
59 | * defines for gs_sub_type for gs type directory service | ||
60 | */ | ||
61 | enum { | ||
62 | CT_GSSUBTYPE_NAMESERVER = 0x02, | ||
63 | }; | ||
64 | |||
65 | /* | ||
66 | * defines for gs_sub_type for gs type management service | ||
67 | */ | ||
68 | enum { | ||
69 | CT_GSSUBTYPE_CFGSERVER = 0x01, | ||
70 | CT_GSSUBTYPE_UNZONED_NS = 0x02, | ||
71 | CT_GSSUBTYPE_ZONESERVER = 0x03, | ||
72 | CT_GSSUBTYPE_LOCKSERVER = 0x04, | ||
73 | CT_GSSUBTYPE_HBA_MGMTSERVER = 0x10, /* for FDMI */ | ||
74 | }; | ||
75 | |||
76 | /* | ||
77 | * defines for CT response code field | ||
78 | */ | ||
79 | enum { | ||
80 | CT_RSP_REJECT = 0x8001, | ||
81 | CT_RSP_ACCEPT = 0x8002, | ||
82 | }; | ||
83 | |||
84 | /* | ||
85 | * definitions for CT reason code | ||
86 | */ | ||
87 | enum { | ||
88 | CT_RSN_INV_CMD = 0x01, | ||
89 | CT_RSN_INV_VER = 0x02, | ||
90 | CT_RSN_LOGIC_ERR = 0x03, | ||
91 | CT_RSN_INV_SIZE = 0x04, | ||
92 | CT_RSN_LOGICAL_BUSY = 0x05, | ||
93 | CT_RSN_PROTO_ERR = 0x07, | ||
94 | CT_RSN_UNABLE_TO_PERF = 0x09, | ||
95 | CT_RSN_NOT_SUPP = 0x0B, | ||
96 | CT_RSN_SERVER_NOT_AVBL = 0x0D, | ||
97 | CT_RSN_SESSION_COULD_NOT_BE_ESTBD = 0x0E, | ||
98 | CT_RSN_VENDOR_SPECIFIC = 0xFF, | ||
99 | |||
100 | }; | ||
101 | |||
102 | /* | ||
103 | * definitions for explanations code for Name server | ||
104 | */ | ||
105 | enum { | ||
106 | CT_NS_EXP_NOADDITIONAL = 0x00, | ||
107 | CT_NS_EXP_ID_NOT_REG = 0x01, | ||
108 | CT_NS_EXP_PN_NOT_REG = 0x02, | ||
109 | CT_NS_EXP_NN_NOT_REG = 0x03, | ||
110 | CT_NS_EXP_CS_NOT_REG = 0x04, | ||
111 | CT_NS_EXP_IPN_NOT_REG = 0x05, | ||
112 | CT_NS_EXP_IPA_NOT_REG = 0x06, | ||
113 | CT_NS_EXP_FT_NOT_REG = 0x07, | ||
114 | CT_NS_EXP_SPN_NOT_REG = 0x08, | ||
115 | CT_NS_EXP_SNN_NOT_REG = 0x09, | ||
116 | CT_NS_EXP_PT_NOT_REG = 0x0A, | ||
117 | CT_NS_EXP_IPP_NOT_REG = 0x0B, | ||
118 | CT_NS_EXP_FPN_NOT_REG = 0x0C, | ||
119 | CT_NS_EXP_HA_NOT_REG = 0x0D, | ||
120 | CT_NS_EXP_FD_NOT_REG = 0x0E, | ||
121 | CT_NS_EXP_FF_NOT_REG = 0x0F, | ||
122 | CT_NS_EXP_ACCESSDENIED = 0x10, | ||
123 | CT_NS_EXP_UNACCEPTABLE_ID = 0x11, | ||
124 | CT_NS_EXP_DATABASEEMPTY = 0x12, | ||
125 | CT_NS_EXP_NOT_REG_IN_SCOPE = 0x13, | ||
126 | CT_NS_EXP_DOM_ID_NOT_PRESENT = 0x14, | ||
127 | CT_NS_EXP_PORT_NUM_NOT_PRESENT = 0x15, | ||
128 | CT_NS_EXP_NO_DEVICE_ATTACHED = 0x16 | ||
129 | }; | ||
130 | |||
131 | /* | ||
132 | * definitions for the explanation code for all servers | ||
133 | */ | ||
134 | enum { | ||
135 | CT_EXP_AUTH_EXCEPTION = 0xF1, | ||
136 | CT_EXP_DB_FULL = 0xF2, | ||
137 | CT_EXP_DB_EMPTY = 0xF3, | ||
138 | CT_EXP_PROCESSING_REQ = 0xF4, | ||
139 | CT_EXP_UNABLE_TO_VERIFY_CONN = 0xF5, | ||
140 | CT_EXP_DEVICES_NOT_IN_CMN_ZONE = 0xF6 | ||
141 | }; | ||
142 | |||
143 | /* | ||
144 | * Command codes for Name server | ||
145 | */ | ||
146 | enum { | ||
147 | GS_GID_PN = 0x0121, /* Get Id on port name */ | ||
148 | GS_GPN_ID = 0x0112, /* Get port name on ID */ | ||
149 | GS_GNN_ID = 0x0113, /* Get node name on ID */ | ||
150 | GS_GID_FT = 0x0171, /* Get Id on FC4 type */ | ||
151 | GS_GSPN_ID = 0x0118, /* Get symbolic PN on ID */ | ||
152 | GS_RFT_ID = 0x0217, /* Register fc4type on ID */ | ||
153 | GS_RSPN_ID = 0x0218, /* Register symbolic PN on ID */ | ||
154 | GS_RPN_ID = 0x0212, /* Register port name */ | ||
155 | GS_RNN_ID = 0x0213, /* Register node name */ | ||
156 | GS_RCS_ID = 0x0214, /* Register class of service */ | ||
157 | GS_RPT_ID = 0x021A, /* Register port type */ | ||
158 | GS_GA_NXT = 0x0100, /* Get all next */ | ||
159 | GS_RFF_ID = 0x021F, /* Register FC4 Feature */ | ||
160 | }; | ||
161 | |||
162 | struct fcgs_id_req_s{ | ||
163 | u32 rsvd:8; | ||
164 | u32 dap:24; /* port identifier */ | ||
165 | }; | ||
166 | #define fcgs_gpnid_req_t struct fcgs_id_req_s | ||
167 | #define fcgs_gnnid_req_t struct fcgs_id_req_s | ||
168 | #define fcgs_gspnid_req_t struct fcgs_id_req_s | ||
169 | |||
170 | struct fcgs_gidpn_req_s{ | ||
171 | wwn_t port_name; /* port wwn */ | ||
172 | }; | ||
173 | |||
174 | struct fcgs_gidpn_resp_s{ | ||
175 | u32 rsvd:8; | ||
176 | u32 dap:24; /* port identifier */ | ||
177 | }; | ||
178 | |||
179 | /** | ||
180 | * RFT_ID | ||
181 | */ | ||
182 | struct fcgs_rftid_req_s { | ||
183 | u32 rsvd:8; | ||
184 | u32 dap:24; /* port identifier */ | ||
185 | u32 fc4_type[8]; /* fc4 types */ | ||
186 | }; | ||
187 | |||
188 | /** | ||
189 | * RFF_ID : Register FC4 features. | ||
190 | */ | ||
191 | |||
192 | #define FC_GS_FCP_FC4_FEATURE_INITIATOR 0x02 | ||
193 | #define FC_GS_FCP_FC4_FEATURE_TARGET 0x01 | ||
194 | |||
195 | struct fcgs_rffid_req_s{ | ||
196 | u32 rsvd:8; | ||
197 | u32 dap:24; /* port identifier */ | ||
198 | u32 rsvd1:16; | ||
199 | u32 fc4ftr_bits:8; /* fc4 feature bits */ | ||
200 | u32 fc4_type:8; /* corresponding FC4 Type */ | ||
201 | }; | ||
202 | |||
203 | /** | ||
204 | * GID_FT Request | ||
205 | */ | ||
206 | struct fcgs_gidft_req_s{ | ||
207 | u8 reserved; | ||
208 | u8 domain_id; /* domain, 0 - all fabric */ | ||
209 | u8 area_id; /* area, 0 - whole domain */ | ||
210 | u8 fc4_type; /* FC_TYPE_FCP for SCSI devices */ | ||
211 | }; /* GID_FT Request */ | ||
212 | |||
213 | /** | ||
214 | * GID_FT Response | ||
215 | */ | ||
216 | struct fcgs_gidft_resp_s { | ||
217 | u8 last:1; /* last port identifier flag */ | ||
218 | u8 reserved:7; | ||
219 | u32 pid:24; /* port identifier */ | ||
220 | }; /* GID_FT Response */ | ||
221 | |||
222 | /** | ||
223 | * RSPN_ID | ||
224 | */ | ||
225 | struct fcgs_rspnid_req_s{ | ||
226 | u32 rsvd:8; | ||
227 | u32 dap:24; /* port identifier */ | ||
228 | u8 spn_len; /* symbolic port name length */ | ||
229 | u8 spn[256]; /* symbolic port name */ | ||
230 | }; | ||
231 | |||
232 | /** | ||
233 | * RPN_ID | ||
234 | */ | ||
235 | struct fcgs_rpnid_req_s{ | ||
236 | u32 rsvd:8; | ||
237 | u32 port_id:24; | ||
238 | wwn_t port_name; | ||
239 | }; | ||
240 | |||
241 | /** | ||
242 | * RNN_ID | ||
243 | */ | ||
244 | struct fcgs_rnnid_req_s{ | ||
245 | u32 rsvd:8; | ||
246 | u32 port_id:24; | ||
247 | wwn_t node_name; | ||
248 | }; | ||
249 | |||
250 | /** | ||
251 | * RCS_ID | ||
252 | */ | ||
253 | struct fcgs_rcsid_req_s{ | ||
254 | u32 rsvd:8; | ||
255 | u32 port_id:24; | ||
256 | u32 cos; | ||
257 | }; | ||
258 | |||
259 | /** | ||
260 | * RPT_ID | ||
261 | */ | ||
262 | struct fcgs_rptid_req_s{ | ||
263 | u32 rsvd:8; | ||
264 | u32 port_id:24; | ||
265 | u32 port_type:8; | ||
266 | u32 rsvd1:24; | ||
267 | }; | ||
268 | |||
269 | /** | ||
270 | * GA_NXT Request | ||
271 | */ | ||
272 | struct fcgs_ganxt_req_s{ | ||
273 | u32 rsvd:8; | ||
274 | u32 port_id:24; | ||
275 | }; | ||
276 | |||
277 | /** | ||
278 | * GA_NXT Response | ||
279 | */ | ||
280 | struct fcgs_ganxt_rsp_s{ | ||
281 | u32 port_type:8; /* Port Type */ | ||
282 | u32 port_id:24; /* Port Identifier */ | ||
283 | wwn_t port_name; /* Port Name */ | ||
284 | u8 spn_len; /* Length of Symbolic Port Name */ | ||
285 | char spn[255]; /* Symbolic Port Name */ | ||
286 | wwn_t node_name; /* Node Name */ | ||
287 | u8 snn_len; /* Length of Symbolic Node Name */ | ||
288 | char snn[255]; /* Symbolic Node Name */ | ||
289 | u8 ipa[8]; /* Initial Process Associator */ | ||
290 | u8 ip[16]; /* IP Address */ | ||
291 | u32 cos; /* Class of Service */ | ||
292 | u32 fc4types[8]; /* FC-4 TYPEs */ | ||
293 | wwn_t fabric_port_name; | ||
294 | /* Fabric Port Name */ | ||
295 | u32 rsvd:8; /* Reserved */ | ||
296 | u32 hard_addr:24; /* Hard Address */ | ||
297 | }; | ||
298 | |||
299 | /* | ||
300 | * Fabric Config Server | ||
301 | */ | ||
302 | |||
303 | /* | ||
304 | * Command codes for Fabric Configuration Server | ||
305 | */ | ||
306 | enum { | ||
307 | GS_FC_GFN_CMD = 0x0114, /* GS FC Get Fabric Name */ | ||
308 | GS_FC_GMAL_CMD = 0x0116, /* GS FC GMAL */ | ||
309 | GS_FC_TRACE_CMD = 0x0400, /* GS FC Trace Route */ | ||
310 | GS_FC_PING_CMD = 0x0401, /* GS FC Ping */ | ||
311 | }; | ||
312 | |||
313 | /* | ||
314 | * Source or Destination Port Tags. | ||
315 | */ | ||
316 | enum { | ||
317 | GS_FTRACE_TAG_NPORT_ID = 1, | ||
318 | GS_FTRACE_TAG_NPORT_NAME = 2, | ||
319 | }; | ||
320 | |||
321 | /* | ||
322 | * Port Value : Could be a Port id or wwn | ||
323 | */ | ||
324 | union fcgs_port_val_u{ | ||
325 | u32 nport_id; | ||
326 | wwn_t nport_wwn; | ||
327 | }; | ||
328 | |||
329 | #define GS_FTRACE_MAX_HOP_COUNT 20 | ||
330 | #define GS_FTRACE_REVISION 1 | ||
331 | |||
332 | /* | ||
333 | * Ftrace Related Structures. | ||
334 | */ | ||
335 | |||
336 | /* | ||
337 | * STR (Switch Trace) Reject Reason Codes. From FC-SW. | ||
338 | */ | ||
339 | enum { | ||
340 | GS_FTRACE_STR_CMD_COMPLETED_SUCC = 0, | ||
341 | GS_FTRACE_STR_CMD_NOT_SUPP_IN_NEXT_SWITCH, | ||
342 | GS_FTRACE_STR_NO_RESP_FROM_NEXT_SWITCH, | ||
343 | GS_FTRACE_STR_MAX_HOP_CNT_REACHED, | ||
344 | GS_FTRACE_STR_SRC_PORT_NOT_FOUND, | ||
345 | GS_FTRACE_STR_DST_PORT_NOT_FOUND, | ||
346 | GS_FTRACE_STR_DEVICES_NOT_IN_COMMON_ZONE, | ||
347 | GS_FTRACE_STR_NO_ROUTE_BW_PORTS, | ||
348 | GS_FTRACE_STR_NO_ADDL_EXPLN, | ||
349 | GS_FTRACE_STR_FABRIC_BUSY, | ||
350 | GS_FTRACE_STR_FABRIC_BUILD_IN_PROGRESS, | ||
351 | GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_START = 0xf0, | ||
352 | GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_END = 0xff, | ||
353 | }; | ||
354 | |||
355 | /* | ||
356 | * Ftrace Request | ||
357 | */ | ||
358 | struct fcgs_ftrace_req_s{ | ||
359 | u32 revision; | ||
360 | u16 src_port_tag; /* Source Port tag */ | ||
361 | u16 src_port_len; /* Source Port len */ | ||
362 | union fcgs_port_val_u src_port_val; /* Source Port value */ | ||
363 | u16 dst_port_tag; /* Destination Port tag */ | ||
364 | u16 dst_port_len; /* Destination Port len */ | ||
365 | union fcgs_port_val_u dst_port_val; /* Destination Port value */ | ||
366 | u32 token; | ||
367 | u8 vendor_id[8]; /* T10 Vendor Identifier */ | ||
368 | u8 vendor_info[8]; /* Vendor specific Info */ | ||
369 | u32 max_hop_cnt; /* Max Hop Count */ | ||
370 | }; | ||
371 | |||
372 | /* | ||
373 | * Path info structure | ||
374 | */ | ||
375 | struct fcgs_ftrace_path_info_s{ | ||
376 | wwn_t switch_name; /* Switch WWN */ | ||
377 | u32 domain_id; | ||
378 | wwn_t ingress_port_name; /* Ingress ports wwn */ | ||
379 | u32 ingress_phys_port_num; /* Ingress ports physical port | ||
380 | * number | ||
381 | */ | ||
382 | wwn_t egress_port_name; /* Ingress ports wwn */ | ||
383 | u32 egress_phys_port_num; /* Ingress ports physical port | ||
384 | * number | ||
385 | */ | ||
386 | }; | ||
387 | |||
388 | /* | ||
389 | * Ftrace Acc Response | ||
390 | */ | ||
391 | struct fcgs_ftrace_resp_s{ | ||
392 | u32 revision; | ||
393 | u32 token; | ||
394 | u8 vendor_id[8]; /* T10 Vendor Identifier */ | ||
395 | u8 vendor_info[8]; /* Vendor specific Info */ | ||
396 | u32 str_rej_reason_code; /* STR Reject Reason Code */ | ||
397 | u32 num_path_info_entries; /* No. of path info entries */ | ||
398 | /* | ||
399 | * path info entry/entries. | ||
400 | */ | ||
401 | struct fcgs_ftrace_path_info_s path_info[1]; | ||
402 | |||
403 | }; | ||
404 | |||
405 | /* | ||
406 | * Fabric Config Server : FCPing | ||
407 | */ | ||
408 | |||
409 | /* | ||
410 | * FC Ping Request | ||
411 | */ | ||
412 | struct fcgs_fcping_req_s{ | ||
413 | u32 revision; | ||
414 | u16 port_tag; | ||
415 | u16 port_len; /* Port len */ | ||
416 | union fcgs_port_val_u port_val; /* Port value */ | ||
417 | u32 token; | ||
418 | }; | ||
419 | |||
420 | /* | ||
421 | * FC Ping Response | ||
422 | */ | ||
423 | struct fcgs_fcping_resp_s{ | ||
424 | u32 token; | ||
425 | }; | ||
426 | |||
427 | /* | ||
428 | * Command codes for zone server query. | ||
429 | */ | ||
430 | enum { | ||
431 | ZS_GZME = 0x0124, /* Get zone member extended */ | ||
432 | }; | ||
433 | |||
434 | /* | ||
435 | * ZS GZME request | ||
436 | */ | ||
437 | #define ZS_GZME_ZNAMELEN 32 | ||
438 | struct zs_gzme_req_s{ | ||
439 | u8 znamelen; | ||
440 | u8 rsvd[3]; | ||
441 | u8 zname[ZS_GZME_ZNAMELEN]; | ||
442 | }; | ||
443 | |||
444 | enum zs_mbr_type{ | ||
445 | ZS_MBR_TYPE_PWWN = 1, | ||
446 | ZS_MBR_TYPE_DOMPORT = 2, | ||
447 | ZS_MBR_TYPE_PORTID = 3, | ||
448 | ZS_MBR_TYPE_NWWN = 4, | ||
449 | }; | ||
450 | |||
451 | struct zs_mbr_wwn_s{ | ||
452 | u8 mbr_type; | ||
453 | u8 rsvd[3]; | ||
454 | wwn_t wwn; | ||
455 | }; | ||
456 | |||
457 | struct zs_query_resp_s{ | ||
458 | u32 nmbrs; /* number of zone members */ | ||
459 | struct zs_mbr_wwn_s mbr[1]; | ||
460 | }; | ||
461 | |||
462 | /* | ||
463 | * GMAL Command ( Get ( interconnect Element) Management Address List) | ||
464 | * To retrieve the IP Address of a Switch. | ||
465 | */ | ||
466 | |||
467 | #define CT_GMAL_RESP_PREFIX_TELNET "telnet://" | ||
468 | #define CT_GMAL_RESP_PREFIX_HTTP "http://" | ||
469 | |||
470 | /* GMAL/GFN request */ | ||
471 | struct fcgs_req_s { | ||
472 | wwn_t wwn; /* PWWN/NWWN */ | ||
473 | }; | ||
474 | |||
475 | #define fcgs_gmal_req_t struct fcgs_req_s | ||
476 | #define fcgs_gfn_req_t struct fcgs_req_s | ||
477 | |||
478 | /* Accept Response to GMAL */ | ||
479 | struct fcgs_gmal_resp_s { | ||
480 | u32 ms_len; /* Num of entries */ | ||
481 | u8 ms_ma[256]; | ||
482 | }; | ||
483 | |||
484 | struct fc_gmal_entry_s { | ||
485 | u8 len; | ||
486 | u8 prefix[7]; /* like "http://" */ | ||
487 | u8 ip_addr[248]; | ||
488 | }; | ||
489 | |||
490 | #pragma pack() | ||
491 | |||
492 | #endif | ||
diff --git a/drivers/scsi/bfa/include/protocol/fc.h b/drivers/scsi/bfa/include/protocol/fc.h deleted file mode 100644 index 436dd7c5643a..000000000000 --- a/drivers/scsi/bfa/include/protocol/fc.h +++ /dev/null | |||
@@ -1,1111 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __FC_H__ | ||
19 | #define __FC_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | /* | ||
26 | * Fibre Channel Header Structure (FCHS) definition | ||
27 | */ | ||
28 | struct fchs_s { | ||
29 | #ifdef __BIGENDIAN | ||
30 | u32 routing:4; /* routing bits */ | ||
31 | u32 cat_info:4; /* category info */ | ||
32 | #else | ||
33 | u32 cat_info:4; /* category info */ | ||
34 | u32 routing:4; /* routing bits */ | ||
35 | #endif | ||
36 | u32 d_id:24; /* destination identifier */ | ||
37 | |||
38 | u32 cs_ctl:8; /* class specific control */ | ||
39 | u32 s_id:24; /* source identifier */ | ||
40 | |||
41 | u32 type:8; /* data structure type */ | ||
42 | u32 f_ctl:24; /* initial frame control */ | ||
43 | |||
44 | u8 seq_id; /* sequence identifier */ | ||
45 | u8 df_ctl; /* data field control */ | ||
46 | u16 seq_cnt; /* sequence count */ | ||
47 | |||
48 | u16 ox_id; /* originator exchange ID */ | ||
49 | u16 rx_id; /* responder exchange ID */ | ||
50 | |||
51 | u32 ro; /* relative offset */ | ||
52 | }; | ||
53 | |||
54 | #define FC_SOF_LEN 4 | ||
55 | #define FC_EOF_LEN 4 | ||
56 | #define FC_CRC_LEN 4 | ||
57 | |||
58 | /* | ||
59 | * Fibre Channel BB_E Header Structure | ||
60 | */ | ||
61 | struct fcbbehs_s { | ||
62 | u16 ver_rsvd; | ||
63 | u32 rsvd[2]; | ||
64 | u32 rsvd__sof; | ||
65 | }; | ||
66 | |||
67 | #define FC_SEQ_ID_MAX 256 | ||
68 | |||
69 | /* | ||
70 | * routing bit definitions | ||
71 | */ | ||
72 | enum { | ||
73 | FC_RTG_FC4_DEV_DATA = 0x0, /* FC-4 Device Data */ | ||
74 | FC_RTG_EXT_LINK = 0x2, /* Extended Link Data */ | ||
75 | FC_RTG_FC4_LINK_DATA = 0x3, /* FC-4 Link Data */ | ||
76 | FC_RTG_VIDEO_DATA = 0x4, /* Video Data */ | ||
77 | FC_RTG_EXT_HDR = 0x5, /* VFT, IFR or Encapsuled */ | ||
78 | FC_RTG_BASIC_LINK = 0x8, /* Basic Link data */ | ||
79 | FC_RTG_LINK_CTRL = 0xC, /* Link Control */ | ||
80 | }; | ||
81 | |||
82 | /* | ||
83 | * information category for extended link data and FC-4 Link Data | ||
84 | */ | ||
85 | enum { | ||
86 | FC_CAT_LD_REQUEST = 0x2, /* Request */ | ||
87 | FC_CAT_LD_REPLY = 0x3, /* Reply */ | ||
88 | FC_CAT_LD_DIAG = 0xF, /* for DIAG use only */ | ||
89 | }; | ||
90 | |||
91 | /* | ||
92 | * information category for extended headers (VFT, IFR or encapsulation) | ||
93 | */ | ||
94 | enum { | ||
95 | FC_CAT_VFT_HDR = 0x0, /* Virtual fabric tagging header */ | ||
96 | FC_CAT_IFR_HDR = 0x1, /* Inter-Fabric routing header */ | ||
97 | FC_CAT_ENC_HDR = 0x2, /* Encapsulation header */ | ||
98 | }; | ||
99 | |||
100 | /* | ||
101 | * information category for FC-4 device data | ||
102 | */ | ||
103 | enum { | ||
104 | FC_CAT_UNCATEG_INFO = 0x0, /* Uncategorized information */ | ||
105 | FC_CAT_SOLICIT_DATA = 0x1, /* Solicited Data */ | ||
106 | FC_CAT_UNSOLICIT_CTRL = 0x2, /* Unsolicited Control */ | ||
107 | FC_CAT_SOLICIT_CTRL = 0x3, /* Solicited Control */ | ||
108 | FC_CAT_UNSOLICIT_DATA = 0x4, /* Unsolicited Data */ | ||
109 | FC_CAT_DATA_DESC = 0x5, /* Data Descriptor */ | ||
110 | FC_CAT_UNSOLICIT_CMD = 0x6, /* Unsolicited Command */ | ||
111 | FC_CAT_CMD_STATUS = 0x7, /* Command Status */ | ||
112 | }; | ||
113 | |||
114 | /* | ||
115 | * information category for Link Control | ||
116 | */ | ||
117 | enum { | ||
118 | FC_CAT_ACK_1 = 0x00, | ||
119 | FC_CAT_ACK_0_N = 0x01, | ||
120 | FC_CAT_P_RJT = 0x02, | ||
121 | FC_CAT_F_RJT = 0x03, | ||
122 | FC_CAT_P_BSY = 0x04, | ||
123 | FC_CAT_F_BSY_DATA = 0x05, | ||
124 | FC_CAT_F_BSY_LINK_CTL = 0x06, | ||
125 | FC_CAT_F_LCR = 0x07, | ||
126 | FC_CAT_NTY = 0x08, | ||
127 | FC_CAT_END = 0x09, | ||
128 | }; | ||
129 | |||
130 | /* | ||
131 | * Type Field Definitions. FC-PH Section 18.5 pg. 165 | ||
132 | */ | ||
133 | enum { | ||
134 | FC_TYPE_BLS = 0x0, /* Basic Link Service */ | ||
135 | FC_TYPE_ELS = 0x1, /* Extended Link Service */ | ||
136 | FC_TYPE_IP = 0x5, /* IP */ | ||
137 | FC_TYPE_FCP = 0x8, /* SCSI-FCP */ | ||
138 | FC_TYPE_GPP = 0x9, /* SCSI_GPP */ | ||
139 | FC_TYPE_SERVICES = 0x20, /* Fibre Channel Services */ | ||
140 | FC_TYPE_FC_FSS = 0x22, /* Fabric Switch Services */ | ||
141 | FC_TYPE_FC_AL = 0x23, /* FC-AL */ | ||
142 | FC_TYPE_FC_SNMP = 0x24, /* FC-SNMP */ | ||
143 | FC_TYPE_MAX = 256, /* 256 FC-4 types */ | ||
144 | }; | ||
145 | |||
146 | struct fc_fc4types_s{ | ||
147 | u8 bits[FC_TYPE_MAX / 8]; | ||
148 | }; | ||
149 | |||
150 | /* | ||
151 | * Frame Control Definitions. FC-PH Table-45. pg. 168 | ||
152 | */ | ||
153 | enum { | ||
154 | FCTL_EC_ORIG = 0x000000, /* exchange originator */ | ||
155 | FCTL_EC_RESP = 0x800000, /* exchange responder */ | ||
156 | FCTL_SEQ_INI = 0x000000, /* sequence initiator */ | ||
157 | FCTL_SEQ_REC = 0x400000, /* sequence recipient */ | ||
158 | FCTL_FS_EXCH = 0x200000, /* first sequence of xchg */ | ||
159 | FCTL_LS_EXCH = 0x100000, /* last sequence of xchg */ | ||
160 | FCTL_END_SEQ = 0x080000, /* last frame of sequence */ | ||
161 | FCTL_SI_XFER = 0x010000, /* seq initiative transfer */ | ||
162 | FCTL_RO_PRESENT = 0x000008, /* relative offset present */ | ||
163 | FCTL_FILLBYTE_MASK = 0x000003 /* , fill byte mask */ | ||
164 | }; | ||
165 | |||
166 | /* | ||
167 | * Fabric Well Known Addresses | ||
168 | */ | ||
169 | enum { | ||
170 | FC_MIN_WELL_KNOWN_ADDR = 0xFFFFF0, | ||
171 | FC_DOMAIN_CONTROLLER_MASK = 0xFFFC00, | ||
172 | FC_ALIAS_SERVER = 0xFFFFF8, | ||
173 | FC_MGMT_SERVER = 0xFFFFFA, | ||
174 | FC_TIME_SERVER = 0xFFFFFB, | ||
175 | FC_NAME_SERVER = 0xFFFFFC, | ||
176 | FC_FABRIC_CONTROLLER = 0xFFFFFD, | ||
177 | FC_FABRIC_PORT = 0xFFFFFE, | ||
178 | FC_BROADCAST_SERVER = 0xFFFFFF | ||
179 | }; | ||
180 | |||
181 | /* | ||
182 | * domain/area/port defines | ||
183 | */ | ||
184 | #define FC_DOMAIN_MASK 0xFF0000 | ||
185 | #define FC_DOMAIN_SHIFT 16 | ||
186 | #define FC_AREA_MASK 0x00FF00 | ||
187 | #define FC_AREA_SHIFT 8 | ||
188 | #define FC_PORT_MASK 0x0000FF | ||
189 | #define FC_PORT_SHIFT 0 | ||
190 | |||
191 | #define FC_GET_DOMAIN(p) (((p) & FC_DOMAIN_MASK) >> FC_DOMAIN_SHIFT) | ||
192 | #define FC_GET_AREA(p) (((p) & FC_AREA_MASK) >> FC_AREA_SHIFT) | ||
193 | #define FC_GET_PORT(p) (((p) & FC_PORT_MASK) >> FC_PORT_SHIFT) | ||
194 | |||
195 | #define FC_DOMAIN_CTRLR(p) (FC_DOMAIN_CONTROLLER_MASK | (FC_GET_DOMAIN(p))) | ||
196 | |||
197 | enum { | ||
198 | FC_RXID_ANY = 0xFFFFU, | ||
199 | }; | ||
200 | |||
201 | /* | ||
202 | * generic ELS command | ||
203 | */ | ||
204 | struct fc_els_cmd_s{ | ||
205 | u32 els_code:8; /* ELS Command Code */ | ||
206 | u32 reserved:24; | ||
207 | }; | ||
208 | |||
209 | /* | ||
210 | * ELS Command Codes. FC-PH Table-75. pg. 223 | ||
211 | */ | ||
212 | enum { | ||
213 | FC_ELS_LS_RJT = 0x1, /* Link Service Reject. */ | ||
214 | FC_ELS_ACC = 0x02, /* Accept */ | ||
215 | FC_ELS_PLOGI = 0x03, /* N_Port Login. */ | ||
216 | FC_ELS_FLOGI = 0x04, /* F_Port Login. */ | ||
217 | FC_ELS_LOGO = 0x05, /* Logout. */ | ||
218 | FC_ELS_ABTX = 0x06, /* Abort Exchange */ | ||
219 | FC_ELS_RES = 0x08, /* Read Exchange status */ | ||
220 | FC_ELS_RSS = 0x09, /* Read sequence status block */ | ||
221 | FC_ELS_RSI = 0x0A, /* Request Sequence Initiative */ | ||
222 | FC_ELS_ESTC = 0x0C, /* Estimate Credit. */ | ||
223 | FC_ELS_RTV = 0x0E, /* Read Timeout Value. */ | ||
224 | FC_ELS_RLS = 0x0F, /* Read Link Status. */ | ||
225 | FC_ELS_ECHO = 0x10, /* Echo */ | ||
226 | FC_ELS_TEST = 0x11, /* Test */ | ||
227 | FC_ELS_RRQ = 0x12, /* Reinstate Recovery Qualifier. */ | ||
228 | FC_ELS_REC = 0x13, /* Add this for TAPE support in FCR */ | ||
229 | FC_ELS_PRLI = 0x20, /* Process Login */ | ||
230 | FC_ELS_PRLO = 0x21, /* Process Logout. */ | ||
231 | FC_ELS_SCN = 0x22, /* State Change Notification. */ | ||
232 | FC_ELS_TPRLO = 0x24, /* Third Party Process Logout. */ | ||
233 | FC_ELS_PDISC = 0x50, /* Discover N_Port Parameters. */ | ||
234 | FC_ELS_FDISC = 0x51, /* Discover F_Port Parameters. */ | ||
235 | FC_ELS_ADISC = 0x52, /* Discover Address. */ | ||
236 | FC_ELS_FAN = 0x60, /* Fabric Address Notification */ | ||
237 | FC_ELS_RSCN = 0x61, /* Reg State Change Notification */ | ||
238 | FC_ELS_SCR = 0x62, /* State Change Registration. */ | ||
239 | FC_ELS_RTIN = 0x77, /* Mangement server request */ | ||
240 | FC_ELS_RNID = 0x78, /* Mangement server request */ | ||
241 | FC_ELS_RLIR = 0x79, /* Registered Link Incident Record */ | ||
242 | |||
243 | FC_ELS_RPSC = 0x7D, /* Report Port Speed Capabilities */ | ||
244 | FC_ELS_QSA = 0x7E, /* Query Security Attributes. Ref FC-SP */ | ||
245 | FC_ELS_E2E_LBEACON = 0x81, | ||
246 | /* End-to-End Link Beacon */ | ||
247 | FC_ELS_AUTH = 0x90, /* Authentication. Ref FC-SP */ | ||
248 | FC_ELS_RFCN = 0x97, /* Request Fabric Change Notification. Ref | ||
249 | *FC-SP */ | ||
250 | |||
251 | }; | ||
252 | |||
253 | /* | ||
254 | * Version numbers for FC-PH standards, | ||
255 | * used in login to indicate what port | ||
256 | * supports. See FC-PH-X table 158. | ||
257 | */ | ||
258 | enum { | ||
259 | FC_PH_VER_4_3 = 0x09, | ||
260 | FC_PH_VER_PH_3 = 0x20, | ||
261 | }; | ||
262 | |||
263 | /* | ||
264 | * PDU size defines | ||
265 | */ | ||
266 | enum { | ||
267 | FC_MIN_PDUSZ = 512, | ||
268 | FC_MAX_PDUSZ = 2112, | ||
269 | }; | ||
270 | |||
271 | /* | ||
272 | * N_Port PLOGI Common Service Parameters. | ||
273 | * FC-PH-x. Figure-76. pg. 308. | ||
274 | */ | ||
275 | struct fc_plogi_csp_s{ | ||
276 | u8 verhi; /* FC-PH high version */ | ||
277 | u8 verlo; /* FC-PH low version */ | ||
278 | u16 bbcred; /* BB_Credit */ | ||
279 | |||
280 | #ifdef __BIGENDIAN | ||
281 | u8 ciro:1, /* continuously increasing RO */ | ||
282 | rro:1, /* random relative offset */ | ||
283 | npiv_supp:1, /* NPIV supported */ | ||
284 | port_type:1, /* N_Port/F_port */ | ||
285 | altbbcred:1, /* alternate BB_Credit */ | ||
286 | resolution:1, /* ms/ns ED_TOV resolution */ | ||
287 | vvl_info:1, /* VVL Info included */ | ||
288 | reserved1:1; | ||
289 | |||
290 | u8 hg_supp:1, | ||
291 | query_dbc:1, | ||
292 | security:1, | ||
293 | sync_cap:1, | ||
294 | r_t_tov:1, | ||
295 | dh_dup_supp:1, | ||
296 | cisc:1, /* continuously increasing seq count */ | ||
297 | payload:1; | ||
298 | #else | ||
299 | u8 reserved2:2, | ||
300 | resolution:1, /* ms/ns ED_TOV resolution */ | ||
301 | altbbcred:1, /* alternate BB_Credit */ | ||
302 | port_type:1, /* N_Port/F_port */ | ||
303 | npiv_supp:1, /* NPIV supported */ | ||
304 | rro:1, /* random relative offset */ | ||
305 | ciro:1; /* continuously increasing RO */ | ||
306 | |||
307 | u8 payload:1, | ||
308 | cisc:1, /* continuously increasing seq count */ | ||
309 | dh_dup_supp:1, | ||
310 | r_t_tov:1, | ||
311 | sync_cap:1, | ||
312 | security:1, | ||
313 | query_dbc:1, | ||
314 | hg_supp:1; | ||
315 | #endif | ||
316 | |||
317 | u16 rxsz; /* recieve data_field size */ | ||
318 | |||
319 | u16 conseq; | ||
320 | u16 ro_bitmap; | ||
321 | |||
322 | u32 e_d_tov; | ||
323 | }; | ||
324 | |||
325 | /* | ||
326 | * N_Port PLOGI Class Specific Parameters. | ||
327 | * FC-PH-x. Figure 78. pg. 318. | ||
328 | */ | ||
329 | struct fc_plogi_clp_s{ | ||
330 | #ifdef __BIGENDIAN | ||
331 | u32 class_valid:1; | ||
332 | u32 intermix:1; /* class intermix supported if set =1. | ||
333 | * valid only for class1. Reserved for | ||
334 | * class2 & class3 | ||
335 | */ | ||
336 | u32 reserved1:2; | ||
337 | u32 sequential:1; | ||
338 | u32 reserved2:3; | ||
339 | #else | ||
340 | u32 reserved2:3; | ||
341 | u32 sequential:1; | ||
342 | u32 reserved1:2; | ||
343 | u32 intermix:1; /* class intermix supported if set =1. | ||
344 | * valid only for class1. Reserved for | ||
345 | * class2 & class3 | ||
346 | */ | ||
347 | u32 class_valid:1; | ||
348 | #endif | ||
349 | |||
350 | u32 reserved3:24; | ||
351 | |||
352 | u32 reserved4:16; | ||
353 | u32 rxsz:16; /* Receive data_field size */ | ||
354 | |||
355 | u32 reserved5:8; | ||
356 | u32 conseq:8; | ||
357 | u32 e2e_credit:16; /* end to end credit */ | ||
358 | |||
359 | u32 reserved7:8; | ||
360 | u32 ospx:8; | ||
361 | u32 reserved8:16; | ||
362 | }; | ||
363 | |||
364 | #define FLOGI_VVL_BRCD 0x42524344 /* ASCII value for each character in | ||
365 | * string "BRCD" */ | ||
366 | |||
367 | /* | ||
368 | * PLOGI els command and reply payload | ||
369 | */ | ||
370 | struct fc_logi_s{ | ||
371 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
372 | struct fc_plogi_csp_s csp; /* common service params */ | ||
373 | wwn_t port_name; | ||
374 | wwn_t node_name; | ||
375 | struct fc_plogi_clp_s class1; /* class 1 service parameters */ | ||
376 | struct fc_plogi_clp_s class2; /* class 2 service parameters */ | ||
377 | struct fc_plogi_clp_s class3; /* class 3 service parameters */ | ||
378 | struct fc_plogi_clp_s class4; /* class 4 service parameters */ | ||
379 | u8 vvl[16]; /* vendor version level */ | ||
380 | }; | ||
381 | |||
382 | /* | ||
383 | * LOGO els command payload | ||
384 | */ | ||
385 | struct fc_logo_s{ | ||
386 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
387 | u32 res1:8; | ||
388 | u32 nport_id:24; /* N_Port identifier of source */ | ||
389 | wwn_t orig_port_name; /* Port name of the LOGO originator */ | ||
390 | }; | ||
391 | |||
392 | /* | ||
393 | * ADISC els command payload | ||
394 | */ | ||
395 | struct fc_adisc_s { | ||
396 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
397 | u32 res1:8; | ||
398 | u32 orig_HA:24; /* originator hard address */ | ||
399 | wwn_t orig_port_name; /* originator port name */ | ||
400 | wwn_t orig_node_name; /* originator node name */ | ||
401 | u32 res2:8; | ||
402 | u32 nport_id:24; /* originator NPortID */ | ||
403 | }; | ||
404 | |||
405 | /* | ||
406 | * Exchange status block | ||
407 | */ | ||
408 | struct fc_exch_status_blk_s{ | ||
409 | u32 oxid:16; | ||
410 | u32 rxid:16; | ||
411 | u32 res1:8; | ||
412 | u32 orig_np:24; /* originator NPortID */ | ||
413 | u32 res2:8; | ||
414 | u32 resp_np:24; /* responder NPortID */ | ||
415 | u32 es_bits; | ||
416 | u32 res3; | ||
417 | /* | ||
418 | * un modified section of the fields | ||
419 | */ | ||
420 | }; | ||
421 | |||
422 | /* | ||
423 | * RES els command payload | ||
424 | */ | ||
425 | struct fc_res_s { | ||
426 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
427 | u32 res1:8; | ||
428 | u32 nport_id:24; /* N_Port identifier of source */ | ||
429 | u32 oxid:16; | ||
430 | u32 rxid:16; | ||
431 | u8 assoc_hdr[32]; | ||
432 | }; | ||
433 | |||
434 | /* | ||
435 | * RES els accept payload | ||
436 | */ | ||
437 | struct fc_res_acc_s{ | ||
438 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
439 | struct fc_exch_status_blk_s fc_exch_blk; /* Exchange status block */ | ||
440 | }; | ||
441 | |||
442 | /* | ||
443 | * REC els command payload | ||
444 | */ | ||
445 | struct fc_rec_s { | ||
446 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
447 | u32 res1:8; | ||
448 | u32 nport_id:24; /* N_Port identifier of source */ | ||
449 | u32 oxid:16; | ||
450 | u32 rxid:16; | ||
451 | }; | ||
452 | |||
453 | #define FC_REC_ESB_OWN_RSP 0x80000000 /* responder owns */ | ||
454 | #define FC_REC_ESB_SI 0x40000000 /* SI is owned */ | ||
455 | #define FC_REC_ESB_COMP 0x20000000 /* exchange is complete */ | ||
456 | #define FC_REC_ESB_ENDCOND_ABN 0x10000000 /* abnormal ending */ | ||
457 | #define FC_REC_ESB_RQACT 0x04000000 /* recovery qual active */ | ||
458 | #define FC_REC_ESB_ERRP_MSK 0x03000000 | ||
459 | #define FC_REC_ESB_OXID_INV 0x00800000 /* invalid OXID */ | ||
460 | #define FC_REC_ESB_RXID_INV 0x00400000 /* invalid RXID */ | ||
461 | #define FC_REC_ESB_PRIO_INUSE 0x00200000 | ||
462 | |||
463 | /* | ||
464 | * REC els accept payload | ||
465 | */ | ||
466 | struct fc_rec_acc_s { | ||
467 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
468 | u32 oxid:16; | ||
469 | u32 rxid:16; | ||
470 | u32 res1:8; | ||
471 | u32 orig_id:24; /* N_Port id of exchange originator */ | ||
472 | u32 res2:8; | ||
473 | u32 resp_id:24; /* N_Port id of exchange responder */ | ||
474 | u32 count; /* data transfer count */ | ||
475 | u32 e_stat; /* exchange status */ | ||
476 | }; | ||
477 | |||
478 | /* | ||
479 | * RSI els payload | ||
480 | */ | ||
481 | struct fc_rsi_s { | ||
482 | struct fc_els_cmd_s els_cmd; | ||
483 | u32 res1:8; | ||
484 | u32 orig_sid:24; | ||
485 | u32 oxid:16; | ||
486 | u32 rxid:16; | ||
487 | }; | ||
488 | |||
489 | /* | ||
490 | * structure for PRLI paramater pages, both request & response | ||
491 | * see FC-PH-X table 113 & 115 for explanation also FCP table 8 | ||
492 | */ | ||
493 | struct fc_prli_params_s{ | ||
494 | u32 reserved:16; | ||
495 | #ifdef __BIGENDIAN | ||
496 | u32 reserved1:5; | ||
497 | u32 rec_support:1; | ||
498 | u32 task_retry_id:1; | ||
499 | u32 retry:1; | ||
500 | |||
501 | u32 confirm:1; | ||
502 | u32 doverlay:1; | ||
503 | u32 initiator:1; | ||
504 | u32 target:1; | ||
505 | u32 cdmix:1; | ||
506 | u32 drmix:1; | ||
507 | u32 rxrdisab:1; | ||
508 | u32 wxrdisab:1; | ||
509 | #else | ||
510 | u32 retry:1; | ||
511 | u32 task_retry_id:1; | ||
512 | u32 rec_support:1; | ||
513 | u32 reserved1:5; | ||
514 | |||
515 | u32 wxrdisab:1; | ||
516 | u32 rxrdisab:1; | ||
517 | u32 drmix:1; | ||
518 | u32 cdmix:1; | ||
519 | u32 target:1; | ||
520 | u32 initiator:1; | ||
521 | u32 doverlay:1; | ||
522 | u32 confirm:1; | ||
523 | #endif | ||
524 | }; | ||
525 | |||
526 | /* | ||
527 | * valid values for rspcode in PRLI ACC payload | ||
528 | */ | ||
529 | enum { | ||
530 | FC_PRLI_ACC_XQTD = 0x1, /* request executed */ | ||
531 | FC_PRLI_ACC_PREDEF_IMG = 0x5, /* predefined image - no prli needed */ | ||
532 | }; | ||
533 | |||
534 | struct fc_prli_params_page_s{ | ||
535 | u32 type:8; | ||
536 | u32 codext:8; | ||
537 | #ifdef __BIGENDIAN | ||
538 | u32 origprocasv:1; | ||
539 | u32 rsppav:1; | ||
540 | u32 imagepair:1; | ||
541 | u32 reserved1:1; | ||
542 | u32 rspcode:4; | ||
543 | #else | ||
544 | u32 rspcode:4; | ||
545 | u32 reserved1:1; | ||
546 | u32 imagepair:1; | ||
547 | u32 rsppav:1; | ||
548 | u32 origprocasv:1; | ||
549 | #endif | ||
550 | u32 reserved2:8; | ||
551 | |||
552 | u32 origprocas; | ||
553 | u32 rspprocas; | ||
554 | struct fc_prli_params_s servparams; | ||
555 | }; | ||
556 | |||
557 | /* | ||
558 | * PRLI request and accept payload, FC-PH-X tables 112 & 114 | ||
559 | */ | ||
560 | struct fc_prli_s{ | ||
561 | u32 command:8; | ||
562 | u32 pglen:8; | ||
563 | u32 pagebytes:16; | ||
564 | struct fc_prli_params_page_s parampage; | ||
565 | }; | ||
566 | |||
567 | /* | ||
568 | * PRLO logout params page | ||
569 | */ | ||
570 | struct fc_prlo_params_page_s{ | ||
571 | u32 type:8; | ||
572 | u32 type_ext:8; | ||
573 | #ifdef __BIGENDIAN | ||
574 | u32 opa_valid:1; /* originator process associator | ||
575 | * valid | ||
576 | */ | ||
577 | u32 rpa_valid:1; /* responder process associator valid */ | ||
578 | u32 res1:14; | ||
579 | #else | ||
580 | u32 res1:14; | ||
581 | u32 rpa_valid:1; /* responder process associator valid */ | ||
582 | u32 opa_valid:1; /* originator process associator | ||
583 | * valid | ||
584 | */ | ||
585 | #endif | ||
586 | u32 orig_process_assc; | ||
587 | u32 resp_process_assc; | ||
588 | |||
589 | u32 res2; | ||
590 | }; | ||
591 | |||
592 | /* | ||
593 | * PRLO els command payload | ||
594 | */ | ||
595 | struct fc_prlo_s{ | ||
596 | u32 command:8; | ||
597 | u32 page_len:8; | ||
598 | u32 payload_len:16; | ||
599 | struct fc_prlo_params_page_s prlo_params[1]; | ||
600 | }; | ||
601 | |||
602 | /* | ||
603 | * PRLO Logout response parameter page | ||
604 | */ | ||
605 | struct fc_prlo_acc_params_page_s{ | ||
606 | u32 type:8; | ||
607 | u32 type_ext:8; | ||
608 | |||
609 | #ifdef __BIGENDIAN | ||
610 | u32 opa_valid:1; /* originator process associator | ||
611 | * valid | ||
612 | */ | ||
613 | u32 rpa_valid:1; /* responder process associator valid */ | ||
614 | u32 res1:14; | ||
615 | #else | ||
616 | u32 res1:14; | ||
617 | u32 rpa_valid:1; /* responder process associator valid */ | ||
618 | u32 opa_valid:1; /* originator process associator | ||
619 | * valid | ||
620 | */ | ||
621 | #endif | ||
622 | u32 orig_process_assc; | ||
623 | u32 resp_process_assc; | ||
624 | |||
625 | u32 fc4type_csp; | ||
626 | }; | ||
627 | |||
628 | /* | ||
629 | * PRLO els command ACC payload | ||
630 | */ | ||
631 | struct fc_prlo_acc_s{ | ||
632 | u32 command:8; | ||
633 | u32 page_len:8; | ||
634 | u32 payload_len:16; | ||
635 | struct fc_prlo_acc_params_page_s prlo_acc_params[1]; | ||
636 | }; | ||
637 | |||
638 | /* | ||
639 | * SCR els command payload | ||
640 | */ | ||
641 | enum { | ||
642 | FC_SCR_REG_FUNC_FABRIC_DETECTED = 0x01, | ||
643 | FC_SCR_REG_FUNC_N_PORT_DETECTED = 0x02, | ||
644 | FC_SCR_REG_FUNC_FULL = 0x03, | ||
645 | FC_SCR_REG_FUNC_CLEAR_REG = 0xFF, | ||
646 | }; | ||
647 | |||
648 | /* SCR VU registrations */ | ||
649 | enum { | ||
650 | FC_VU_SCR_REG_FUNC_FABRIC_NAME_CHANGE = 0x01 | ||
651 | }; | ||
652 | |||
653 | struct fc_scr_s{ | ||
654 | u32 command:8; | ||
655 | u32 res:24; | ||
656 | u32 vu_reg_func:8; /* Vendor Unique Registrations */ | ||
657 | u32 res1:16; | ||
658 | u32 reg_func:8; | ||
659 | }; | ||
660 | |||
661 | /* | ||
662 | * Information category for Basic link data | ||
663 | */ | ||
664 | enum { | ||
665 | FC_CAT_NOP = 0x0, | ||
666 | FC_CAT_ABTS = 0x1, | ||
667 | FC_CAT_RMC = 0x2, | ||
668 | FC_CAT_BA_ACC = 0x4, | ||
669 | FC_CAT_BA_RJT = 0x5, | ||
670 | FC_CAT_PRMT = 0x6, | ||
671 | }; | ||
672 | |||
673 | /* | ||
674 | * LS_RJT els reply payload | ||
675 | */ | ||
676 | struct fc_ls_rjt_s { | ||
677 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
678 | u32 res1:8; | ||
679 | u32 reason_code:8; /* Reason code for reject */ | ||
680 | u32 reason_code_expl:8; /* Reason code explanation */ | ||
681 | u32 vendor_unique:8; /* Vendor specific */ | ||
682 | }; | ||
683 | |||
684 | /* | ||
685 | * LS_RJT reason codes | ||
686 | */ | ||
687 | enum { | ||
688 | FC_LS_RJT_RSN_INV_CMD_CODE = 0x01, | ||
689 | FC_LS_RJT_RSN_LOGICAL_ERROR = 0x03, | ||
690 | FC_LS_RJT_RSN_LOGICAL_BUSY = 0x05, | ||
691 | FC_LS_RJT_RSN_PROTOCOL_ERROR = 0x07, | ||
692 | FC_LS_RJT_RSN_UNABLE_TO_PERF_CMD = 0x09, | ||
693 | FC_LS_RJT_RSN_CMD_NOT_SUPP = 0x0B, | ||
694 | }; | ||
695 | |||
696 | /* | ||
697 | * LS_RJT reason code explanation | ||
698 | */ | ||
699 | enum { | ||
700 | FC_LS_RJT_EXP_NO_ADDL_INFO = 0x00, | ||
701 | FC_LS_RJT_EXP_SPARMS_ERR_OPTIONS = 0x01, | ||
702 | FC_LS_RJT_EXP_SPARMS_ERR_INI_CTL = 0x03, | ||
703 | FC_LS_RJT_EXP_SPARMS_ERR_REC_CTL = 0x05, | ||
704 | FC_LS_RJT_EXP_SPARMS_ERR_RXSZ = 0x07, | ||
705 | FC_LS_RJT_EXP_SPARMS_ERR_CONSEQ = 0x09, | ||
706 | FC_LS_RJT_EXP_SPARMS_ERR_CREDIT = 0x0B, | ||
707 | FC_LS_RJT_EXP_INV_PORT_NAME = 0x0D, | ||
708 | FC_LS_RJT_EXP_INV_NODE_FABRIC_NAME = 0x0E, | ||
709 | FC_LS_RJT_EXP_INV_CSP = 0x0F, | ||
710 | FC_LS_RJT_EXP_INV_ASSOC_HDR = 0x11, | ||
711 | FC_LS_RJT_EXP_ASSOC_HDR_REQD = 0x13, | ||
712 | FC_LS_RJT_EXP_INV_ORIG_S_ID = 0x15, | ||
713 | FC_LS_RJT_EXP_INV_OXID_RXID_COMB = 0x17, | ||
714 | FC_LS_RJT_EXP_CMD_ALREADY_IN_PROG = 0x19, | ||
715 | FC_LS_RJT_EXP_LOGIN_REQUIRED = 0x1E, | ||
716 | FC_LS_RJT_EXP_INVALID_NPORT_ID = 0x1F, | ||
717 | FC_LS_RJT_EXP_INSUFF_RES = 0x29, | ||
718 | FC_LS_RJT_EXP_CMD_NOT_SUPP = 0x2C, | ||
719 | FC_LS_RJT_EXP_INV_PAYLOAD_LEN = 0x2D, | ||
720 | }; | ||
721 | |||
722 | /* | ||
723 | * RRQ els command payload | ||
724 | */ | ||
725 | struct fc_rrq_s{ | ||
726 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | ||
727 | u32 res1:8; | ||
728 | u32 s_id:24; /* exchange originator S_ID */ | ||
729 | |||
730 | u32 ox_id:16; /* originator exchange ID */ | ||
731 | u32 rx_id:16; /* responder exchange ID */ | ||
732 | |||
733 | u32 res2[8]; /* optional association header */ | ||
734 | }; | ||
735 | |||
736 | /* | ||
737 | * ABTS BA_ACC reply payload | ||
738 | */ | ||
739 | struct fc_ba_acc_s{ | ||
740 | u32 seq_id_valid:8; /* set to 0x00 for Abort Exchange */ | ||
741 | u32 seq_id:8; /* invalid for Abort Exchange */ | ||
742 | u32 res2:16; | ||
743 | u32 ox_id:16; /* OX_ID from ABTS frame */ | ||
744 | u32 rx_id:16; /* RX_ID from ABTS frame */ | ||
745 | u32 low_seq_cnt:16; /* set to 0x0000 for Abort Exchange */ | ||
746 | u32 high_seq_cnt:16;/* set to 0xFFFF for Abort Exchange */ | ||
747 | }; | ||
748 | |||
749 | /* | ||
750 | * ABTS BA_RJT reject payload | ||
751 | */ | ||
752 | struct fc_ba_rjt_s{ | ||
753 | u32 res1:8; /* Reserved */ | ||
754 | u32 reason_code:8; /* reason code for reject */ | ||
755 | u32 reason_expl:8; /* reason code explanation */ | ||
756 | u32 vendor_unique:8;/* vendor unique reason code,set to 0 */ | ||
757 | }; | ||
758 | |||
759 | /* | ||
760 | * TPRLO logout parameter page | ||
761 | */ | ||
762 | struct fc_tprlo_params_page_s{ | ||
763 | u32 type:8; | ||
764 | u32 type_ext:8; | ||
765 | |||
766 | #ifdef __BIGENDIAN | ||
767 | u32 opa_valid:1; | ||
768 | u32 rpa_valid:1; | ||
769 | u32 tpo_nport_valid:1; | ||
770 | u32 global_process_logout:1; | ||
771 | u32 res1:12; | ||
772 | #else | ||
773 | u32 res1:12; | ||
774 | u32 global_process_logout:1; | ||
775 | u32 tpo_nport_valid:1; | ||
776 | u32 rpa_valid:1; | ||
777 | u32 opa_valid:1; | ||
778 | #endif | ||
779 | |||
780 | u32 orig_process_assc; | ||
781 | u32 resp_process_assc; | ||
782 | |||
783 | u32 res2:8; | ||
784 | u32 tpo_nport_id; | ||
785 | }; | ||
786 | |||
787 | /* | ||
788 | * TPRLO ELS command payload | ||
789 | */ | ||
790 | struct fc_tprlo_s{ | ||
791 | u32 command:8; | ||
792 | u32 page_len:8; | ||
793 | u32 payload_len:16; | ||
794 | |||
795 | struct fc_tprlo_params_page_s tprlo_params[1]; | ||
796 | }; | ||
797 | |||
798 | enum fc_tprlo_type{ | ||
799 | FC_GLOBAL_LOGO = 1, | ||
800 | FC_TPR_LOGO | ||
801 | }; | ||
802 | |||
803 | /* | ||
804 | * TPRLO els command ACC payload | ||
805 | */ | ||
806 | struct fc_tprlo_acc_s{ | ||
807 | u32 command:8; | ||
808 | u32 page_len:8; | ||
809 | u32 payload_len:16; | ||
810 | struct fc_prlo_acc_params_page_s tprlo_acc_params[1]; | ||
811 | }; | ||
812 | |||
813 | /* | ||
814 | * RSCN els command req payload | ||
815 | */ | ||
816 | #define FC_RSCN_PGLEN 0x4 | ||
817 | |||
818 | enum fc_rscn_format{ | ||
819 | FC_RSCN_FORMAT_PORTID = 0x0, | ||
820 | FC_RSCN_FORMAT_AREA = 0x1, | ||
821 | FC_RSCN_FORMAT_DOMAIN = 0x2, | ||
822 | FC_RSCN_FORMAT_FABRIC = 0x3, | ||
823 | }; | ||
824 | |||
825 | struct fc_rscn_event_s{ | ||
826 | u32 format:2; | ||
827 | u32 qualifier:4; | ||
828 | u32 resvd:2; | ||
829 | u32 portid:24; | ||
830 | }; | ||
831 | |||
832 | struct fc_rscn_pl_s{ | ||
833 | u8 command; | ||
834 | u8 pagelen; | ||
835 | u16 payldlen; | ||
836 | struct fc_rscn_event_s event[1]; | ||
837 | }; | ||
838 | |||
839 | /* | ||
840 | * ECHO els command req payload | ||
841 | */ | ||
842 | struct fc_echo_s { | ||
843 | struct fc_els_cmd_s els_cmd; | ||
844 | }; | ||
845 | |||
846 | /* | ||
847 | * RNID els command | ||
848 | */ | ||
849 | |||
850 | #define RNID_NODEID_DATA_FORMAT_COMMON 0x00 | ||
851 | #define RNID_NODEID_DATA_FORMAT_FCP3 0x08 | ||
852 | #define RNID_NODEID_DATA_FORMAT_DISCOVERY 0xDF | ||
853 | |||
854 | #define RNID_ASSOCIATED_TYPE_UNKNOWN 0x00000001 | ||
855 | #define RNID_ASSOCIATED_TYPE_OTHER 0x00000002 | ||
856 | #define RNID_ASSOCIATED_TYPE_HUB 0x00000003 | ||
857 | #define RNID_ASSOCIATED_TYPE_SWITCH 0x00000004 | ||
858 | #define RNID_ASSOCIATED_TYPE_GATEWAY 0x00000005 | ||
859 | #define RNID_ASSOCIATED_TYPE_STORAGE_DEVICE 0x00000009 | ||
860 | #define RNID_ASSOCIATED_TYPE_HOST 0x0000000A | ||
861 | #define RNID_ASSOCIATED_TYPE_STORAGE_SUBSYSTEM 0x0000000B | ||
862 | #define RNID_ASSOCIATED_TYPE_STORAGE_ACCESS_DEVICE 0x0000000E | ||
863 | #define RNID_ASSOCIATED_TYPE_NAS_SERVER 0x00000011 | ||
864 | #define RNID_ASSOCIATED_TYPE_BRIDGE 0x00000002 | ||
865 | #define RNID_ASSOCIATED_TYPE_VIRTUALIZATION_DEVICE 0x00000003 | ||
866 | #define RNID_ASSOCIATED_TYPE_MULTI_FUNCTION_DEVICE 0x000000FF | ||
867 | |||
868 | /* | ||
869 | * RNID els command payload | ||
870 | */ | ||
871 | struct fc_rnid_cmd_s{ | ||
872 | struct fc_els_cmd_s els_cmd; | ||
873 | u32 node_id_data_format:8; | ||
874 | u32 reserved:24; | ||
875 | }; | ||
876 | |||
877 | /* | ||
878 | * RNID els response payload | ||
879 | */ | ||
880 | |||
881 | struct fc_rnid_common_id_data_s{ | ||
882 | wwn_t port_name; | ||
883 | wwn_t node_name; | ||
884 | }; | ||
885 | |||
886 | struct fc_rnid_general_topology_data_s{ | ||
887 | u32 vendor_unique[4]; | ||
888 | u32 asso_type; | ||
889 | u32 phy_port_num; | ||
890 | u32 num_attached_nodes; | ||
891 | u32 node_mgmt:8; | ||
892 | u32 ip_version:8; | ||
893 | u32 udp_tcp_port_num:16; | ||
894 | u32 ip_address[4]; | ||
895 | u32 reserved:16; | ||
896 | u32 vendor_specific:16; | ||
897 | }; | ||
898 | |||
899 | struct fc_rnid_acc_s{ | ||
900 | struct fc_els_cmd_s els_cmd; | ||
901 | u32 node_id_data_format:8; | ||
902 | u32 common_id_data_length:8; | ||
903 | u32 reserved:8; | ||
904 | u32 specific_id_data_length:8; | ||
905 | struct fc_rnid_common_id_data_s common_id_data; | ||
906 | struct fc_rnid_general_topology_data_s gen_topology_data; | ||
907 | }; | ||
908 | |||
909 | #define RNID_ASSOCIATED_TYPE_UNKNOWN 0x00000001 | ||
910 | #define RNID_ASSOCIATED_TYPE_OTHER 0x00000002 | ||
911 | #define RNID_ASSOCIATED_TYPE_HUB 0x00000003 | ||
912 | #define RNID_ASSOCIATED_TYPE_SWITCH 0x00000004 | ||
913 | #define RNID_ASSOCIATED_TYPE_GATEWAY 0x00000005 | ||
914 | #define RNID_ASSOCIATED_TYPE_STORAGE_DEVICE 0x00000009 | ||
915 | #define RNID_ASSOCIATED_TYPE_HOST 0x0000000A | ||
916 | #define RNID_ASSOCIATED_TYPE_STORAGE_SUBSYSTEM 0x0000000B | ||
917 | #define RNID_ASSOCIATED_TYPE_STORAGE_ACCESS_DEVICE 0x0000000E | ||
918 | #define RNID_ASSOCIATED_TYPE_NAS_SERVER 0x00000011 | ||
919 | #define RNID_ASSOCIATED_TYPE_BRIDGE 0x00000002 | ||
920 | #define RNID_ASSOCIATED_TYPE_VIRTUALIZATION_DEVICE 0x00000003 | ||
921 | #define RNID_ASSOCIATED_TYPE_MULTI_FUNCTION_DEVICE 0x000000FF | ||
922 | |||
923 | enum fc_rpsc_speed_cap{ | ||
924 | RPSC_SPEED_CAP_1G = 0x8000, | ||
925 | RPSC_SPEED_CAP_2G = 0x4000, | ||
926 | RPSC_SPEED_CAP_4G = 0x2000, | ||
927 | RPSC_SPEED_CAP_10G = 0x1000, | ||
928 | RPSC_SPEED_CAP_8G = 0x0800, | ||
929 | RPSC_SPEED_CAP_16G = 0x0400, | ||
930 | |||
931 | RPSC_SPEED_CAP_UNKNOWN = 0x0001, | ||
932 | }; | ||
933 | |||
934 | enum fc_rpsc_op_speed_s{ | ||
935 | RPSC_OP_SPEED_1G = 0x8000, | ||
936 | RPSC_OP_SPEED_2G = 0x4000, | ||
937 | RPSC_OP_SPEED_4G = 0x2000, | ||
938 | RPSC_OP_SPEED_10G = 0x1000, | ||
939 | RPSC_OP_SPEED_8G = 0x0800, | ||
940 | RPSC_OP_SPEED_16G = 0x0400, | ||
941 | |||
942 | RPSC_OP_SPEED_NOT_EST = 0x0001, /*! speed not established */ | ||
943 | }; | ||
944 | |||
945 | struct fc_rpsc_speed_info_s{ | ||
946 | u16 port_speed_cap; /*! see fc_rpsc_speed_cap_t */ | ||
947 | u16 port_op_speed; /*! see fc_rpsc_op_speed_t */ | ||
948 | }; | ||
949 | |||
950 | enum link_e2e_beacon_subcmd{ | ||
951 | LINK_E2E_BEACON_ON = 1, | ||
952 | LINK_E2E_BEACON_OFF = 2 | ||
953 | }; | ||
954 | |||
955 | enum beacon_type{ | ||
956 | BEACON_TYPE_NORMAL = 1, /*! Normal Beaconing. Green */ | ||
957 | BEACON_TYPE_WARN = 2, /*! Warning Beaconing. Yellow/Amber */ | ||
958 | BEACON_TYPE_CRITICAL = 3 /*! Critical Beaconing. Red */ | ||
959 | }; | ||
960 | |||
961 | struct link_e2e_beacon_param_s { | ||
962 | u8 beacon_type; /* Beacon Type. See beacon_type_t */ | ||
963 | u8 beacon_frequency; | ||
964 | /* Beacon frequency. Number of blinks | ||
965 | * per 10 seconds | ||
966 | */ | ||
967 | u16 beacon_duration;/* Beacon duration (in Seconds). The | ||
968 | * command operation should be | ||
969 | * terminated at the end of this | ||
970 | * timeout value. | ||
971 | * | ||
972 | * Ignored if diag_sub_cmd is | ||
973 | * LINK_E2E_BEACON_OFF. | ||
974 | * | ||
975 | * If 0, beaconing will continue till a | ||
976 | * BEACON OFF request is received | ||
977 | */ | ||
978 | }; | ||
979 | |||
980 | /* | ||
981 | * Link E2E beacon request/good response format. For LS_RJTs use fc_ls_rjt_t | ||
982 | */ | ||
983 | struct link_e2e_beacon_req_s{ | ||
984 | u32 ls_code; /*! FC_ELS_E2E_LBEACON in requests * | ||
985 | *or FC_ELS_ACC in good replies */ | ||
986 | u32 ls_sub_cmd; /*! See link_e2e_beacon_subcmd_t */ | ||
987 | struct link_e2e_beacon_param_s beacon_parm; | ||
988 | }; | ||
989 | |||
990 | /** | ||
991 | * If RPSC request is sent to the Domain Controller, the request is for | ||
992 | * all the ports within that domain (TODO - I don't think FOS implements | ||
993 | * this...). | ||
994 | */ | ||
995 | struct fc_rpsc_cmd_s{ | ||
996 | struct fc_els_cmd_s els_cmd; | ||
997 | }; | ||
998 | |||
999 | /* | ||
1000 | * RPSC Acc | ||
1001 | */ | ||
1002 | struct fc_rpsc_acc_s{ | ||
1003 | u32 command:8; | ||
1004 | u32 rsvd:8; | ||
1005 | u32 num_entries:16; | ||
1006 | |||
1007 | struct fc_rpsc_speed_info_s speed_info[1]; | ||
1008 | }; | ||
1009 | |||
1010 | /** | ||
1011 | * If RPSC2 request is sent to the Domain Controller, | ||
1012 | */ | ||
1013 | #define FC_BRCD_TOKEN 0x42524344 | ||
1014 | |||
1015 | struct fc_rpsc2_cmd_s{ | ||
1016 | struct fc_els_cmd_s els_cmd; | ||
1017 | u32 token; | ||
1018 | u16 resvd; | ||
1019 | u16 num_pids; /* Number of pids in the request */ | ||
1020 | struct { | ||
1021 | u32 rsvd1:8; | ||
1022 | u32 pid:24; /* port identifier */ | ||
1023 | } pid_list[1]; | ||
1024 | }; | ||
1025 | |||
1026 | enum fc_rpsc2_port_type{ | ||
1027 | RPSC2_PORT_TYPE_UNKNOWN = 0, | ||
1028 | RPSC2_PORT_TYPE_NPORT = 1, | ||
1029 | RPSC2_PORT_TYPE_NLPORT = 2, | ||
1030 | RPSC2_PORT_TYPE_NPIV_PORT = 0x5f, | ||
1031 | RPSC2_PORT_TYPE_NPORT_TRUNK = 0x6f, | ||
1032 | }; | ||
1033 | |||
1034 | /* | ||
1035 | * RPSC2 portInfo entry structure | ||
1036 | */ | ||
1037 | struct fc_rpsc2_port_info_s{ | ||
1038 | u32 pid; /* PID */ | ||
1039 | u16 resvd1; | ||
1040 | u16 index; /* port number / index */ | ||
1041 | u8 resvd2; | ||
1042 | u8 type; /* port type N/NL/... */ | ||
1043 | u16 speed; /* port Operating Speed */ | ||
1044 | }; | ||
1045 | |||
1046 | /* | ||
1047 | * RPSC2 Accept payload | ||
1048 | */ | ||
1049 | struct fc_rpsc2_acc_s{ | ||
1050 | u8 els_cmd; | ||
1051 | u8 resvd; | ||
1052 | u16 num_pids; /* Number of pids in the request */ | ||
1053 | struct fc_rpsc2_port_info_s port_info[1]; /* port information */ | ||
1054 | }; | ||
1055 | |||
1056 | /** | ||
1057 | * bit fields so that multiple classes can be specified | ||
1058 | */ | ||
1059 | enum fc_cos{ | ||
1060 | FC_CLASS_2 = 0x04, | ||
1061 | FC_CLASS_3 = 0x08, | ||
1062 | FC_CLASS_2_3 = 0x0C, | ||
1063 | }; | ||
1064 | |||
1065 | /* | ||
1066 | * symbolic name | ||
1067 | */ | ||
1068 | struct fc_symname_s{ | ||
1069 | u8 symname[FC_SYMNAME_MAX]; | ||
1070 | }; | ||
1071 | |||
1072 | struct fc_alpabm_s{ | ||
1073 | u8 alpa_bm[FC_ALPA_MAX / 8]; | ||
1074 | }; | ||
1075 | |||
1076 | /* | ||
1077 | * protocol default timeout values | ||
1078 | */ | ||
1079 | #define FC_ED_TOV 2 | ||
1080 | #define FC_REC_TOV (FC_ED_TOV + 1) | ||
1081 | #define FC_RA_TOV 10 | ||
1082 | #define FC_ELS_TOV (2 * FC_RA_TOV) | ||
1083 | #define FC_FCCT_TOV (3 * FC_RA_TOV) | ||
1084 | |||
1085 | /* | ||
1086 | * virtual fabric related defines | ||
1087 | */ | ||
1088 | #define FC_VF_ID_NULL 0 /* must not be used as VF_ID */ | ||
1089 | #define FC_VF_ID_MIN 1 | ||
1090 | #define FC_VF_ID_MAX 0xEFF | ||
1091 | #define FC_VF_ID_CTL 0xFEF /* control VF_ID */ | ||
1092 | |||
1093 | /** | ||
1094 | * Virtual Fabric Tagging header format | ||
1095 | * @caution This is defined only in BIG ENDIAN format. | ||
1096 | */ | ||
1097 | struct fc_vft_s{ | ||
1098 | u32 r_ctl:8; | ||
1099 | u32 ver:2; | ||
1100 | u32 type:4; | ||
1101 | u32 res_a:2; | ||
1102 | u32 priority:3; | ||
1103 | u32 vf_id:12; | ||
1104 | u32 res_b:1; | ||
1105 | u32 hopct:8; | ||
1106 | u32 res_c:24; | ||
1107 | }; | ||
1108 | |||
1109 | #pragma pack() | ||
1110 | |||
1111 | #endif | ||
diff --git a/drivers/scsi/bfa/include/protocol/fc_sp.h b/drivers/scsi/bfa/include/protocol/fc_sp.h deleted file mode 100644 index 55bb0b31d04b..000000000000 --- a/drivers/scsi/bfa/include/protocol/fc_sp.h +++ /dev/null | |||
@@ -1,224 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __FC_SP_H__ | ||
19 | #define __FC_SP_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | enum auth_els_flags{ | ||
26 | FC_AUTH_ELS_MORE_FRAGS_FLAG = 0x80, /*! bit-7. More Fragments | ||
27 | * Follow | ||
28 | */ | ||
29 | FC_AUTH_ELS_CONCAT_FLAG = 0x40, /*! bit-6. Concatenation Flag */ | ||
30 | FC_AUTH_ELS_SEQ_NUM_FLAG = 0x01 /*! bit-0. Sequence Number */ | ||
31 | }; | ||
32 | |||
33 | enum auth_msg_codes{ | ||
34 | FC_AUTH_MC_AUTH_RJT = 0x0A, /*! Auth Reject */ | ||
35 | FC_AUTH_MC_AUTH_NEG = 0x0B, /*! Auth Negotiate */ | ||
36 | FC_AUTH_MC_AUTH_DONE = 0x0C, /*! Auth Done */ | ||
37 | |||
38 | FC_AUTH_MC_DHCHAP_CHAL = 0x10, /*! DHCHAP Challenge */ | ||
39 | FC_AUTH_MC_DHCHAP_REPLY = 0x11, /*! DHCHAP Reply */ | ||
40 | FC_AUTH_MC_DHCHAP_SUCC = 0x12, /*! DHCHAP Success */ | ||
41 | |||
42 | FC_AUTH_MC_FCAP_REQ = 0x13, /*! FCAP Request */ | ||
43 | FC_AUTH_MC_FCAP_ACK = 0x14, /*! FCAP Acknowledge */ | ||
44 | FC_AUTH_MC_FCAP_CONF = 0x15, /*! FCAP Confirm */ | ||
45 | |||
46 | FC_AUTH_MC_FCPAP_INIT = 0x16, /*! FCPAP Init */ | ||
47 | FC_AUTH_MC_FCPAP_ACC = 0x17, /*! FCPAP Accept */ | ||
48 | FC_AUTH_MC_FCPAP_COMP = 0x18, /*! FCPAP Complete */ | ||
49 | |||
50 | FC_AUTH_MC_IKE_SA_INIT = 0x22, /*! IKE SA INIT */ | ||
51 | FC_AUTH_MC_IKE_SA_AUTH = 0x23, /*! IKE SA Auth */ | ||
52 | FC_AUTH_MC_IKE_CREATE_CHILD_SA = 0x24, /*! IKE Create Child SA */ | ||
53 | FC_AUTH_MC_IKE_INFO = 0x25, /*! IKE informational */ | ||
54 | }; | ||
55 | |||
56 | enum auth_proto_version{ | ||
57 | FC_AUTH_PROTO_VER_1 = 1, /*! Protocol Version 1 */ | ||
58 | }; | ||
59 | |||
60 | enum { | ||
61 | FC_AUTH_ELS_COMMAND_CODE = 0x90,/*! Authentication ELS Command code */ | ||
62 | FC_AUTH_PROTO_PARAM_LEN_SZ = 4, /*! Size of Proto Parameter Len Field */ | ||
63 | FC_AUTH_PROTO_PARAM_VAL_SZ = 4, /*! Size of Proto Parameter Val Field */ | ||
64 | FC_MAX_AUTH_SECRET_LEN = 256, | ||
65 | /*! Maximum secret string length */ | ||
66 | FC_AUTH_NUM_USABLE_PROTO_LEN_SZ = 4, | ||
67 | /*! Size of usable protocols field */ | ||
68 | FC_AUTH_RESP_VALUE_LEN_SZ = 4, | ||
69 | /*! Size of response value length */ | ||
70 | FC_MAX_CHAP_KEY_LEN = 256, /*! Maximum md5 digest length */ | ||
71 | FC_MAX_AUTH_RETRIES = 3, /*! Maximum number of retries */ | ||
72 | FC_MD5_DIGEST_LEN = 16, /*! MD5 digest length */ | ||
73 | FC_SHA1_DIGEST_LEN = 20, /*! SHA1 digest length */ | ||
74 | FC_MAX_DHG_SUPPORTED = 1, /*! Maximum DH Groups supported */ | ||
75 | FC_MAX_ALG_SUPPORTED = 1, /*! Maximum algorithms supported */ | ||
76 | FC_MAX_PROTO_SUPPORTED = 1, /*! Maximum protocols supported */ | ||
77 | FC_START_TXN_ID = 2, /*! Starting transaction ID */ | ||
78 | }; | ||
79 | |||
80 | enum auth_proto_id{ | ||
81 | FC_AUTH_PROTO_DHCHAP = 0x00000001, | ||
82 | FC_AUTH_PROTO_FCAP = 0x00000002, | ||
83 | FC_AUTH_PROTO_FCPAP = 0x00000003, | ||
84 | FC_AUTH_PROTO_IKEv2 = 0x00000004, | ||
85 | FC_AUTH_PROTO_IKEv2_AUTH = 0x00000005, | ||
86 | }; | ||
87 | |||
88 | struct auth_name_s{ | ||
89 | u16 name_tag; /*! Name Tag = 1 for Authentication */ | ||
90 | u16 name_len; /*! Name Length = 8 for Authentication | ||
91 | */ | ||
92 | wwn_t name; /*! Name. TODO - is this PWWN */ | ||
93 | }; | ||
94 | |||
95 | |||
96 | enum auth_hash_func{ | ||
97 | FC_AUTH_HASH_FUNC_MD5 = 0x00000005, | ||
98 | FC_AUTH_HASH_FUNC_SHA_1 = 0x00000006, | ||
99 | }; | ||
100 | |||
101 | enum auth_dh_gid{ | ||
102 | FC_AUTH_DH_GID_0_DHG_NULL = 0x00000000, | ||
103 | FC_AUTH_DH_GID_1_DHG_1024 = 0x00000001, | ||
104 | FC_AUTH_DH_GID_2_DHG_1280 = 0x00000002, | ||
105 | FC_AUTH_DH_GID_3_DHG_1536 = 0x00000003, | ||
106 | FC_AUTH_DH_GID_4_DHG_2048 = 0x00000004, | ||
107 | FC_AUTH_DH_GID_6_DHG_3072 = 0x00000006, | ||
108 | FC_AUTH_DH_GID_7_DHG_4096 = 0x00000007, | ||
109 | FC_AUTH_DH_GID_8_DHG_6144 = 0x00000008, | ||
110 | FC_AUTH_DH_GID_9_DHG_8192 = 0x00000009, | ||
111 | }; | ||
112 | |||
113 | struct auth_els_msg_s { | ||
114 | u8 auth_els_code; /* Authentication ELS Code (0x90) */ | ||
115 | u8 auth_els_flag; /* Authentication ELS Flags */ | ||
116 | u8 auth_msg_code; /* Authentication Message Code */ | ||
117 | u8 proto_version; /* Protocol Version */ | ||
118 | u32 msg_len; /* Message Length */ | ||
119 | u32 trans_id; /* Transaction Identifier (T_ID) */ | ||
120 | |||
121 | /* Msg payload follows... */ | ||
122 | }; | ||
123 | |||
124 | |||
125 | enum auth_neg_param_tags { | ||
126 | FC_AUTH_NEG_DHCHAP_HASHLIST = 0x0001, | ||
127 | FC_AUTH_NEG_DHCHAP_DHG_ID_LIST = 0x0002, | ||
128 | }; | ||
129 | |||
130 | |||
131 | struct dhchap_param_format_s { | ||
132 | u16 tag; /*! Parameter Tag. See | ||
133 | * auth_neg_param_tags_t | ||
134 | */ | ||
135 | u16 word_cnt; | ||
136 | |||
137 | /* followed by variable length parameter value... */ | ||
138 | }; | ||
139 | |||
140 | struct auth_proto_params_s { | ||
141 | u32 proto_param_len; | ||
142 | u32 proto_id; | ||
143 | |||
144 | /* | ||
145 | * Followed by variable length Protocol specific parameters. DH-CHAP | ||
146 | * uses dhchap_param_format_t | ||
147 | */ | ||
148 | }; | ||
149 | |||
150 | struct auth_neg_msg_s { | ||
151 | struct auth_name_s auth_ini_name; | ||
152 | u32 usable_auth_protos; | ||
153 | struct auth_proto_params_s proto_params[1]; /*! (1..usable_auth_proto) | ||
154 | * protocol params | ||
155 | */ | ||
156 | }; | ||
157 | |||
158 | struct auth_dh_val_s { | ||
159 | u32 dh_val_len; | ||
160 | u32 dh_val[1]; | ||
161 | }; | ||
162 | |||
163 | struct auth_dhchap_chal_msg_s { | ||
164 | struct auth_els_msg_s hdr; | ||
165 | struct auth_name_s auth_responder_name; /* TODO VRK - is auth_name_t | ||
166 | * type OK? | ||
167 | */ | ||
168 | u32 hash_id; | ||
169 | u32 dh_grp_id; | ||
170 | u32 chal_val_len; | ||
171 | char chal_val[1]; | ||
172 | |||
173 | /* ...followed by variable Challenge length/value and DH length/value */ | ||
174 | }; | ||
175 | |||
176 | |||
177 | enum auth_rjt_codes { | ||
178 | FC_AUTH_RJT_CODE_AUTH_FAILURE = 0x01, | ||
179 | FC_AUTH_RJT_CODE_LOGICAL_ERR = 0x02, | ||
180 | }; | ||
181 | |||
182 | enum auth_rjt_code_exps { | ||
183 | FC_AUTH_CEXP_AUTH_MECH_NOT_USABLE = 0x01, | ||
184 | FC_AUTH_CEXP_DH_GROUP_NOT_USABLE = 0x02, | ||
185 | FC_AUTH_CEXP_HASH_FUNC_NOT_USABLE = 0x03, | ||
186 | FC_AUTH_CEXP_AUTH_XACT_STARTED = 0x04, | ||
187 | FC_AUTH_CEXP_AUTH_FAILED = 0x05, | ||
188 | FC_AUTH_CEXP_INCORRECT_PLD = 0x06, | ||
189 | FC_AUTH_CEXP_INCORRECT_PROTO_MSG = 0x07, | ||
190 | FC_AUTH_CEXP_RESTART_AUTH_PROTO = 0x08, | ||
191 | FC_AUTH_CEXP_AUTH_CONCAT_NOT_SUPP = 0x09, | ||
192 | FC_AUTH_CEXP_PROTO_VER_NOT_SUPP = 0x0A, | ||
193 | }; | ||
194 | |||
195 | enum auth_status { | ||
196 | FC_AUTH_STATE_INPROGRESS = 0, /*! authentication in progress */ | ||
197 | FC_AUTH_STATE_FAILED = 1, /*! authentication failed */ | ||
198 | FC_AUTH_STATE_SUCCESS = 2 /*! authentication successful */ | ||
199 | }; | ||
200 | |||
201 | struct auth_rjt_msg_s { | ||
202 | struct auth_els_msg_s hdr; | ||
203 | u8 reason_code; | ||
204 | u8 reason_code_exp; | ||
205 | u8 rsvd[2]; | ||
206 | }; | ||
207 | |||
208 | |||
209 | struct auth_dhchap_neg_msg_s { | ||
210 | struct auth_els_msg_s hdr; | ||
211 | struct auth_neg_msg_s nego; | ||
212 | }; | ||
213 | |||
214 | struct auth_dhchap_reply_msg_s { | ||
215 | struct auth_els_msg_s hdr; | ||
216 | |||
217 | /* | ||
218 | * followed by response value length & Value + DH Value Length & Value | ||
219 | */ | ||
220 | }; | ||
221 | |||
222 | #pragma pack() | ||
223 | |||
224 | #endif /* __FC_SP_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/protocol/fcp.h b/drivers/scsi/bfa/include/protocol/fcp.h deleted file mode 100644 index 74ea63ce84b7..000000000000 --- a/drivers/scsi/bfa/include/protocol/fcp.h +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __FCPPROTO_H__ | ||
19 | #define __FCPPROTO_H__ | ||
20 | |||
21 | #include <linux/bitops.h> | ||
22 | #include <protocol/scsi.h> | ||
23 | |||
24 | #pragma pack(1) | ||
25 | |||
26 | enum { | ||
27 | FCP_RJT = 0x01000000, /* SRR reject */ | ||
28 | FCP_SRR_ACCEPT = 0x02000000, /* SRR accept */ | ||
29 | FCP_SRR = 0x14000000, /* Sequence Retransmission Request */ | ||
30 | }; | ||
31 | |||
32 | /* | ||
33 | * SRR FC-4 LS payload | ||
34 | */ | ||
35 | struct fc_srr_s{ | ||
36 | u32 ls_cmd; | ||
37 | u32 ox_id:16; /* ox-id */ | ||
38 | u32 rx_id:16; /* rx-id */ | ||
39 | u32 ro; /* relative offset */ | ||
40 | u32 r_ctl:8; /* R_CTL for I.U. */ | ||
41 | u32 res:24; | ||
42 | }; | ||
43 | |||
44 | |||
45 | /* | ||
46 | * FCP_CMND definitions | ||
47 | */ | ||
48 | #define FCP_CMND_CDB_LEN 16 | ||
49 | #define FCP_CMND_LUN_LEN 8 | ||
50 | |||
51 | struct fcp_cmnd_s{ | ||
52 | lun_t lun; /* 64-bit LU number */ | ||
53 | u8 crn; /* command reference number */ | ||
54 | #ifdef __BIGENDIAN | ||
55 | u8 resvd:1, | ||
56 | priority:4, /* FCP-3: SAM-3 priority */ | ||
57 | taskattr:3; /* scsi task attribute */ | ||
58 | #else | ||
59 | u8 taskattr:3, /* scsi task attribute */ | ||
60 | priority:4, /* FCP-3: SAM-3 priority */ | ||
61 | resvd:1; | ||
62 | #endif | ||
63 | u8 tm_flags; /* task management flags */ | ||
64 | #ifdef __BIGENDIAN | ||
65 | u8 addl_cdb_len:6, /* additional CDB length words */ | ||
66 | iodir:2; /* read/write FCP_DATA IUs */ | ||
67 | #else | ||
68 | u8 iodir:2, /* read/write FCP_DATA IUs */ | ||
69 | addl_cdb_len:6; /* additional CDB length */ | ||
70 | #endif | ||
71 | struct scsi_cdb_s cdb; | ||
72 | |||
73 | /* | ||
74 | * !!! additional cdb bytes follows here!!! | ||
75 | */ | ||
76 | u32 fcp_dl; /* bytes to be transferred */ | ||
77 | }; | ||
78 | |||
79 | #define fcp_cmnd_cdb_len(_cmnd) ((_cmnd)->addl_cdb_len * 4 + FCP_CMND_CDB_LEN) | ||
80 | #define fcp_cmnd_fcpdl(_cmnd) ((&(_cmnd)->fcp_dl)[(_cmnd)->addl_cdb_len]) | ||
81 | |||
82 | /* | ||
83 | * fcp_cmnd_t.iodir field values | ||
84 | */ | ||
85 | enum fcp_iodir{ | ||
86 | FCP_IODIR_NONE = 0, | ||
87 | FCP_IODIR_WRITE = 1, | ||
88 | FCP_IODIR_READ = 2, | ||
89 | FCP_IODIR_RW = 3, | ||
90 | }; | ||
91 | |||
92 | /* | ||
93 | * Task attribute field | ||
94 | */ | ||
95 | enum { | ||
96 | FCP_TASK_ATTR_SIMPLE = 0, | ||
97 | FCP_TASK_ATTR_HOQ = 1, | ||
98 | FCP_TASK_ATTR_ORDERED = 2, | ||
99 | FCP_TASK_ATTR_ACA = 4, | ||
100 | FCP_TASK_ATTR_UNTAGGED = 5, /* obsolete in FCP-3 */ | ||
101 | }; | ||
102 | |||
103 | /* | ||
104 | * Task management flags field - only one bit shall be set | ||
105 | */ | ||
106 | enum fcp_tm_cmnd{ | ||
107 | FCP_TM_ABORT_TASK_SET = BIT(1), | ||
108 | FCP_TM_CLEAR_TASK_SET = BIT(2), | ||
109 | FCP_TM_LUN_RESET = BIT(4), | ||
110 | FCP_TM_TARGET_RESET = BIT(5), /* obsolete in FCP-3 */ | ||
111 | FCP_TM_CLEAR_ACA = BIT(6), | ||
112 | }; | ||
113 | |||
114 | /* | ||
115 | * FCP_XFER_RDY IU defines | ||
116 | */ | ||
117 | struct fcp_xfer_rdy_s{ | ||
118 | u32 data_ro; | ||
119 | u32 burst_len; | ||
120 | u32 reserved; | ||
121 | }; | ||
122 | |||
123 | /* | ||
124 | * FCP_RSP residue flags | ||
125 | */ | ||
126 | enum fcp_residue{ | ||
127 | FCP_NO_RESIDUE = 0, /* no residue */ | ||
128 | FCP_RESID_OVER = 1, /* more data left that was not sent */ | ||
129 | FCP_RESID_UNDER = 2, /* less data than requested */ | ||
130 | }; | ||
131 | |||
132 | enum { | ||
133 | FCP_RSPINFO_GOOD = 0, | ||
134 | FCP_RSPINFO_DATALEN_MISMATCH = 1, | ||
135 | FCP_RSPINFO_CMND_INVALID = 2, | ||
136 | FCP_RSPINFO_ROLEN_MISMATCH = 3, | ||
137 | FCP_RSPINFO_TM_NOT_SUPP = 4, | ||
138 | FCP_RSPINFO_TM_FAILED = 5, | ||
139 | }; | ||
140 | |||
141 | struct fcp_rspinfo_s{ | ||
142 | u32 res0:24; | ||
143 | u32 rsp_code:8; /* response code (as above) */ | ||
144 | u32 res1; | ||
145 | }; | ||
146 | |||
147 | struct fcp_resp_s{ | ||
148 | u32 reserved[2]; /* 2 words reserved */ | ||
149 | u16 reserved2; | ||
150 | #ifdef __BIGENDIAN | ||
151 | u8 reserved3:3; | ||
152 | u8 fcp_conf_req:1; /* FCP_CONF is requested */ | ||
153 | u8 resid_flags:2; /* underflow/overflow */ | ||
154 | u8 sns_len_valid:1;/* sense len is valid */ | ||
155 | u8 rsp_len_valid:1;/* response len is valid */ | ||
156 | #else | ||
157 | u8 rsp_len_valid:1;/* response len is valid */ | ||
158 | u8 sns_len_valid:1;/* sense len is valid */ | ||
159 | u8 resid_flags:2; /* underflow/overflow */ | ||
160 | u8 fcp_conf_req:1; /* FCP_CONF is requested */ | ||
161 | u8 reserved3:3; | ||
162 | #endif | ||
163 | u8 scsi_status; /* one byte SCSI status */ | ||
164 | u32 residue; /* residual data bytes */ | ||
165 | u32 sns_len; /* length od sense info */ | ||
166 | u32 rsp_len; /* length of response info */ | ||
167 | }; | ||
168 | |||
169 | #define fcp_snslen(__fcprsp) ((__fcprsp)->sns_len_valid ? \ | ||
170 | (__fcprsp)->sns_len : 0) | ||
171 | #define fcp_rsplen(__fcprsp) ((__fcprsp)->rsp_len_valid ? \ | ||
172 | (__fcprsp)->rsp_len : 0) | ||
173 | #define fcp_rspinfo(__fcprsp) ((struct fcp_rspinfo_s *)((__fcprsp) + 1)) | ||
174 | #define fcp_snsinfo(__fcprsp) (((u8 *)fcp_rspinfo(__fcprsp)) + \ | ||
175 | fcp_rsplen(__fcprsp)) | ||
176 | |||
177 | struct fcp_cmnd_fr_s{ | ||
178 | struct fchs_s fchs; | ||
179 | struct fcp_cmnd_s fcp; | ||
180 | }; | ||
181 | |||
182 | #pragma pack() | ||
183 | |||
184 | #endif | ||
diff --git a/drivers/scsi/bfa/include/protocol/fdmi.h b/drivers/scsi/bfa/include/protocol/fdmi.h deleted file mode 100644 index 6c05c268c71b..000000000000 --- a/drivers/scsi/bfa/include/protocol/fdmi.h +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __FDMI_H__ | ||
19 | #define __FDMI_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | #include <protocol/fc.h> | ||
23 | #include <protocol/ct.h> | ||
24 | |||
25 | #pragma pack(1) | ||
26 | |||
27 | /* | ||
28 | * FDMI Command Codes | ||
29 | */ | ||
30 | #define FDMI_GRHL 0x0100 | ||
31 | #define FDMI_GHAT 0x0101 | ||
32 | #define FDMI_GRPL 0x0102 | ||
33 | #define FDMI_GPAT 0x0110 | ||
34 | #define FDMI_RHBA 0x0200 | ||
35 | #define FDMI_RHAT 0x0201 | ||
36 | #define FDMI_RPRT 0x0210 | ||
37 | #define FDMI_RPA 0x0211 | ||
38 | #define FDMI_DHBA 0x0300 | ||
39 | #define FDMI_DPRT 0x0310 | ||
40 | |||
41 | /* | ||
42 | * FDMI reason codes | ||
43 | */ | ||
44 | #define FDMI_NO_ADDITIONAL_EXP 0x00 | ||
45 | #define FDMI_HBA_ALREADY_REG 0x10 | ||
46 | #define FDMI_HBA_ATTRIB_NOT_REG 0x11 | ||
47 | #define FDMI_HBA_ATTRIB_MULTIPLE 0x12 | ||
48 | #define FDMI_HBA_ATTRIB_LENGTH_INVALID 0x13 | ||
49 | #define FDMI_HBA_ATTRIB_NOT_PRESENT 0x14 | ||
50 | #define FDMI_PORT_ORIG_NOT_IN_LIST 0x15 | ||
51 | #define FDMI_PORT_HBA_NOT_IN_LIST 0x16 | ||
52 | #define FDMI_PORT_ATTRIB_NOT_REG 0x20 | ||
53 | #define FDMI_PORT_NOT_REG 0x21 | ||
54 | #define FDMI_PORT_ATTRIB_MULTIPLE 0x22 | ||
55 | #define FDMI_PORT_ATTRIB_LENGTH_INVALID 0x23 | ||
56 | #define FDMI_PORT_ALREADY_REGISTEREED 0x24 | ||
57 | |||
58 | /* | ||
59 | * FDMI Transmission Speed Mask values | ||
60 | */ | ||
61 | #define FDMI_TRANS_SPEED_1G 0x00000001 | ||
62 | #define FDMI_TRANS_SPEED_2G 0x00000002 | ||
63 | #define FDMI_TRANS_SPEED_10G 0x00000004 | ||
64 | #define FDMI_TRANS_SPEED_4G 0x00000008 | ||
65 | #define FDMI_TRANS_SPEED_8G 0x00000010 | ||
66 | #define FDMI_TRANS_SPEED_16G 0x00000020 | ||
67 | #define FDMI_TRANS_SPEED_UNKNOWN 0x00008000 | ||
68 | |||
69 | /* | ||
70 | * FDMI HBA attribute types | ||
71 | */ | ||
72 | enum fdmi_hba_attribute_type { | ||
73 | FDMI_HBA_ATTRIB_NODENAME = 1, /* 0x0001 */ | ||
74 | FDMI_HBA_ATTRIB_MANUFACTURER, /* 0x0002 */ | ||
75 | FDMI_HBA_ATTRIB_SERIALNUM, /* 0x0003 */ | ||
76 | FDMI_HBA_ATTRIB_MODEL, /* 0x0004 */ | ||
77 | FDMI_HBA_ATTRIB_MODEL_DESC, /* 0x0005 */ | ||
78 | FDMI_HBA_ATTRIB_HW_VERSION, /* 0x0006 */ | ||
79 | FDMI_HBA_ATTRIB_DRIVER_VERSION, /* 0x0007 */ | ||
80 | FDMI_HBA_ATTRIB_ROM_VERSION, /* 0x0008 */ | ||
81 | FDMI_HBA_ATTRIB_FW_VERSION, /* 0x0009 */ | ||
82 | FDMI_HBA_ATTRIB_OS_NAME, /* 0x000A */ | ||
83 | FDMI_HBA_ATTRIB_MAX_CT, /* 0x000B */ | ||
84 | |||
85 | FDMI_HBA_ATTRIB_MAX_TYPE | ||
86 | }; | ||
87 | |||
88 | /* | ||
89 | * FDMI Port attribute types | ||
90 | */ | ||
91 | enum fdmi_port_attribute_type { | ||
92 | FDMI_PORT_ATTRIB_FC4_TYPES = 1, /* 0x0001 */ | ||
93 | FDMI_PORT_ATTRIB_SUPP_SPEED, /* 0x0002 */ | ||
94 | FDMI_PORT_ATTRIB_PORT_SPEED, /* 0x0003 */ | ||
95 | FDMI_PORT_ATTRIB_FRAME_SIZE, /* 0x0004 */ | ||
96 | FDMI_PORT_ATTRIB_DEV_NAME, /* 0x0005 */ | ||
97 | FDMI_PORT_ATTRIB_HOST_NAME, /* 0x0006 */ | ||
98 | |||
99 | FDMI_PORT_ATTR_MAX_TYPE | ||
100 | }; | ||
101 | |||
102 | /* | ||
103 | * FDMI attribute | ||
104 | */ | ||
105 | struct fdmi_attr_s { | ||
106 | u16 type; | ||
107 | u16 len; | ||
108 | u8 value[1]; | ||
109 | }; | ||
110 | |||
111 | /* | ||
112 | * HBA Attribute Block | ||
113 | */ | ||
114 | struct fdmi_hba_attr_s { | ||
115 | u32 attr_count; /* # of attributes */ | ||
116 | struct fdmi_attr_s hba_attr; /* n attributes */ | ||
117 | }; | ||
118 | |||
119 | /* | ||
120 | * Registered Port List | ||
121 | */ | ||
122 | struct fdmi_port_list_s { | ||
123 | u32 num_ports; /* number Of Port Entries */ | ||
124 | wwn_t port_entry; /* one or more */ | ||
125 | }; | ||
126 | |||
127 | /* | ||
128 | * Port Attribute Block | ||
129 | */ | ||
130 | struct fdmi_port_attr_s { | ||
131 | u32 attr_count; /* # of attributes */ | ||
132 | struct fdmi_attr_s port_attr; /* n attributes */ | ||
133 | }; | ||
134 | |||
135 | /* | ||
136 | * FDMI Register HBA Attributes | ||
137 | */ | ||
138 | struct fdmi_rhba_s { | ||
139 | wwn_t hba_id; /* HBA Identifier */ | ||
140 | struct fdmi_port_list_s port_list; /* Registered Port List */ | ||
141 | struct fdmi_hba_attr_s hba_attr_blk; /* HBA attribute block */ | ||
142 | }; | ||
143 | |||
144 | /* | ||
145 | * FDMI Register Port | ||
146 | */ | ||
147 | struct fdmi_rprt_s { | ||
148 | wwn_t hba_id; /* HBA Identifier */ | ||
149 | wwn_t port_name; /* Port wwn */ | ||
150 | struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */ | ||
151 | }; | ||
152 | |||
153 | /* | ||
154 | * FDMI Register Port Attributes | ||
155 | */ | ||
156 | struct fdmi_rpa_s { | ||
157 | wwn_t port_name; /* port wwn */ | ||
158 | struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */ | ||
159 | }; | ||
160 | |||
161 | #pragma pack() | ||
162 | |||
163 | #endif | ||
diff --git a/drivers/scsi/bfa/include/protocol/scsi.h b/drivers/scsi/bfa/include/protocol/scsi.h deleted file mode 100644 index b220e6b4f6e1..000000000000 --- a/drivers/scsi/bfa/include/protocol/scsi.h +++ /dev/null | |||
@@ -1,1648 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __SCSI_H__ | ||
19 | #define __SCSI_H__ | ||
20 | |||
21 | #include <protocol/types.h> | ||
22 | |||
23 | #pragma pack(1) | ||
24 | |||
25 | /* | ||
26 | * generic SCSI cdb definition | ||
27 | */ | ||
28 | #define SCSI_MAX_CDBLEN 16 | ||
29 | struct scsi_cdb_s{ | ||
30 | u8 scsi_cdb[SCSI_MAX_CDBLEN]; | ||
31 | }; | ||
32 | |||
33 | /* | ||
34 | * scsi lun serial number definition | ||
35 | */ | ||
36 | #define SCSI_LUN_SN_LEN 32 | ||
37 | struct scsi_lun_sn_s{ | ||
38 | u8 lun_sn[SCSI_LUN_SN_LEN]; | ||
39 | }; | ||
40 | |||
41 | /* | ||
42 | * SCSI Direct Access Commands | ||
43 | */ | ||
44 | enum { | ||
45 | SCSI_OP_TEST_UNIT_READY = 0x00, | ||
46 | SCSI_OP_REQUEST_SENSE = 0x03, | ||
47 | SCSI_OP_FORMAT_UNIT = 0x04, | ||
48 | SCSI_OP_READ6 = 0x08, | ||
49 | SCSI_OP_WRITE6 = 0x0A, | ||
50 | SCSI_OP_WRITE_FILEMARKS = 0x10, | ||
51 | SCSI_OP_INQUIRY = 0x12, | ||
52 | SCSI_OP_MODE_SELECT6 = 0x15, | ||
53 | SCSI_OP_RESERVE6 = 0x16, | ||
54 | SCSI_OP_RELEASE6 = 0x17, | ||
55 | SCSI_OP_MODE_SENSE6 = 0x1A, | ||
56 | SCSI_OP_START_STOP_UNIT = 0x1B, | ||
57 | SCSI_OP_SEND_DIAGNOSTIC = 0x1D, | ||
58 | SCSI_OP_READ_CAPACITY = 0x25, | ||
59 | SCSI_OP_READ10 = 0x28, | ||
60 | SCSI_OP_WRITE10 = 0x2A, | ||
61 | SCSI_OP_VERIFY10 = 0x2F, | ||
62 | SCSI_OP_READ_DEFECT_DATA = 0x37, | ||
63 | SCSI_OP_LOG_SELECT = 0x4C, | ||
64 | SCSI_OP_LOG_SENSE = 0x4D, | ||
65 | SCSI_OP_MODE_SELECT10 = 0x55, | ||
66 | SCSI_OP_RESERVE10 = 0x56, | ||
67 | SCSI_OP_RELEASE10 = 0x57, | ||
68 | SCSI_OP_MODE_SENSE10 = 0x5A, | ||
69 | SCSI_OP_PER_RESERVE_IN = 0x5E, | ||
70 | SCSI_OP_PER_RESERVE_OUR = 0x5E, | ||
71 | SCSI_OP_READ16 = 0x88, | ||
72 | SCSI_OP_WRITE16 = 0x8A, | ||
73 | SCSI_OP_VERIFY16 = 0x8F, | ||
74 | SCSI_OP_READ_CAPACITY16 = 0x9E, | ||
75 | SCSI_OP_REPORT_LUNS = 0xA0, | ||
76 | SCSI_OP_READ12 = 0xA8, | ||
77 | SCSI_OP_WRITE12 = 0xAA, | ||
78 | SCSI_OP_UNDEF = 0xFF, | ||
79 | }; | ||
80 | |||
81 | /* | ||
82 | * SCSI START_STOP_UNIT command | ||
83 | */ | ||
84 | struct scsi_start_stop_unit_s{ | ||
85 | u8 opcode; | ||
86 | #ifdef __BIGENDIAN | ||
87 | u8 lun:3; | ||
88 | u8 reserved1:4; | ||
89 | u8 immed:1; | ||
90 | #else | ||
91 | u8 immed:1; | ||
92 | u8 reserved1:4; | ||
93 | u8 lun:3; | ||
94 | #endif | ||
95 | u8 reserved2; | ||
96 | u8 reserved3; | ||
97 | #ifdef __BIGENDIAN | ||
98 | u8 power_conditions:4; | ||
99 | u8 reserved4:2; | ||
100 | u8 loEj:1; | ||
101 | u8 start:1; | ||
102 | #else | ||
103 | u8 start:1; | ||
104 | u8 loEj:1; | ||
105 | u8 reserved4:2; | ||
106 | u8 power_conditions:4; | ||
107 | #endif | ||
108 | u8 control; | ||
109 | }; | ||
110 | |||
111 | /* | ||
112 | * SCSI SEND_DIAGNOSTIC command | ||
113 | */ | ||
114 | struct scsi_send_diagnostic_s{ | ||
115 | u8 opcode; | ||
116 | #ifdef __BIGENDIAN | ||
117 | u8 self_test_code:3; | ||
118 | u8 pf:1; | ||
119 | u8 reserved1:1; | ||
120 | u8 self_test:1; | ||
121 | u8 dev_offl:1; | ||
122 | u8 unit_offl:1; | ||
123 | #else | ||
124 | u8 unit_offl:1; | ||
125 | u8 dev_offl:1; | ||
126 | u8 self_test:1; | ||
127 | u8 reserved1:1; | ||
128 | u8 pf:1; | ||
129 | u8 self_test_code:3; | ||
130 | #endif | ||
131 | u8 reserved2; | ||
132 | |||
133 | u8 param_list_length[2]; /* MSB first */ | ||
134 | u8 control; | ||
135 | |||
136 | }; | ||
137 | |||
138 | /* | ||
139 | * SCSI READ10/WRITE10 commands | ||
140 | */ | ||
141 | struct scsi_rw10_s{ | ||
142 | u8 opcode; | ||
143 | #ifdef __BIGENDIAN | ||
144 | u8 lun:3; | ||
145 | u8 dpo:1; /* Disable Page Out */ | ||
146 | u8 fua:1; /* Force Unit Access */ | ||
147 | u8 reserved1:2; | ||
148 | u8 rel_adr:1; /* relative address */ | ||
149 | #else | ||
150 | u8 rel_adr:1; | ||
151 | u8 reserved1:2; | ||
152 | u8 fua:1; | ||
153 | u8 dpo:1; | ||
154 | u8 lun:3; | ||
155 | #endif | ||
156 | u8 lba0; /* logical block address - MSB */ | ||
157 | u8 lba1; | ||
158 | u8 lba2; | ||
159 | u8 lba3; /* LSB */ | ||
160 | u8 reserved3; | ||
161 | u8 xfer_length0; /* transfer length in blocks - MSB */ | ||
162 | u8 xfer_length1; /* LSB */ | ||
163 | u8 control; | ||
164 | }; | ||
165 | |||
166 | #define SCSI_CDB10_GET_LBA(cdb) \ | ||
167 | (((cdb)->lba0 << 24) | ((cdb)->lba1 << 16) | \ | ||
168 | ((cdb)->lba2 << 8) | (cdb)->lba3) | ||
169 | |||
170 | #define SCSI_CDB10_SET_LBA(cdb, lba) { \ | ||
171 | (cdb)->lba0 = lba >> 24; \ | ||
172 | (cdb)->lba1 = (lba >> 16) & 0xFF; \ | ||
173 | (cdb)->lba2 = (lba >> 8) & 0xFF; \ | ||
174 | (cdb)->lba3 = lba & 0xFF; \ | ||
175 | } | ||
176 | |||
177 | #define SCSI_CDB10_GET_TL(cdb) \ | ||
178 | ((cdb)->xfer_length0 << 8 | (cdb)->xfer_length1) | ||
179 | #define SCSI_CDB10_SET_TL(cdb, tl) { \ | ||
180 | (cdb)->xfer_length0 = tl >> 8; \ | ||
181 | (cdb)->xfer_length1 = tl & 0xFF; \ | ||
182 | } | ||
183 | |||
184 | /* | ||
185 | * SCSI READ6/WRITE6 commands | ||
186 | */ | ||
187 | struct scsi_rw6_s{ | ||
188 | u8 opcode; | ||
189 | #ifdef __BIGENDIAN | ||
190 | u8 lun:3; | ||
191 | u8 lba0:5; /* MSb */ | ||
192 | #else | ||
193 | u8 lba0:5; /* MSb */ | ||
194 | u8 lun:3; | ||
195 | #endif | ||
196 | u8 lba1; | ||
197 | u8 lba2; /* LSB */ | ||
198 | u8 xfer_length; | ||
199 | u8 control; | ||
200 | }; | ||
201 | |||
202 | #define SCSI_TAPE_CDB6_GET_TL(cdb) \ | ||
203 | (((cdb)->tl0 << 16) | ((cdb)->tl1 << 8) | (cdb)->tl2) | ||
204 | |||
205 | #define SCSI_TAPE_CDB6_SET_TL(cdb, tl) { \ | ||
206 | (cdb)->tl0 = tl >> 16; \ | ||
207 | (cdb)->tl1 = (tl >> 8) & 0xFF; \ | ||
208 | (cdb)->tl2 = tl & 0xFF; \ | ||
209 | } | ||
210 | |||
211 | /* | ||
212 | * SCSI sequential (TAPE) wrtie command | ||
213 | */ | ||
214 | struct scsi_tape_wr_s{ | ||
215 | u8 opcode; | ||
216 | #ifdef __BIGENDIAN | ||
217 | u8 rsvd:7; | ||
218 | u8 fixed:1; /* MSb */ | ||
219 | #else | ||
220 | u8 fixed:1; /* MSb */ | ||
221 | u8 rsvd:7; | ||
222 | #endif | ||
223 | u8 tl0; /* Msb */ | ||
224 | u8 tl1; | ||
225 | u8 tl2; /* Lsb */ | ||
226 | |||
227 | u8 control; | ||
228 | }; | ||
229 | |||
230 | #define SCSI_CDB6_GET_LBA(cdb) \ | ||
231 | (((cdb)->lba0 << 16) | ((cdb)->lba1 << 8) | (cdb)->lba2) | ||
232 | |||
233 | #define SCSI_CDB6_SET_LBA(cdb, lba) { \ | ||
234 | (cdb)->lba0 = lba >> 16; \ | ||
235 | (cdb)->lba1 = (lba >> 8) & 0xFF; \ | ||
236 | (cdb)->lba2 = lba & 0xFF; \ | ||
237 | } | ||
238 | |||
239 | #define SCSI_CDB6_GET_TL(cdb) ((cdb)->xfer_length) | ||
240 | #define SCSI_CDB6_SET_TL(cdb, tl) { \ | ||
241 | (cdb)->xfer_length = tl; \ | ||
242 | } | ||
243 | |||
244 | /* | ||
245 | * SCSI sense data format | ||
246 | */ | ||
247 | struct scsi_sense_s{ | ||
248 | #ifdef __BIGENDIAN | ||
249 | u8 valid:1; | ||
250 | u8 rsp_code:7; | ||
251 | #else | ||
252 | u8 rsp_code:7; | ||
253 | u8 valid:1; | ||
254 | #endif | ||
255 | u8 seg_num; | ||
256 | #ifdef __BIGENDIAN | ||
257 | u8 file_mark:1; | ||
258 | u8 eom:1; /* end of media */ | ||
259 | u8 ili:1; /* incorrect length indicator */ | ||
260 | u8 reserved:1; | ||
261 | u8 sense_key:4; | ||
262 | #else | ||
263 | u8 sense_key:4; | ||
264 | u8 reserved:1; | ||
265 | u8 ili:1; /* incorrect length indicator */ | ||
266 | u8 eom:1; /* end of media */ | ||
267 | u8 file_mark:1; | ||
268 | #endif | ||
269 | u8 information[4]; /* device-type or command specific info | ||
270 | */ | ||
271 | u8 add_sense_length; | ||
272 | /* additional sense length */ | ||
273 | u8 command_info[4];/* command specific information | ||
274 | */ | ||
275 | u8 asc; /* additional sense code */ | ||
276 | u8 ascq; /* additional sense code qualifier */ | ||
277 | u8 fru_code; /* field replaceable unit code */ | ||
278 | #ifdef __BIGENDIAN | ||
279 | u8 sksv:1; /* sense key specific valid */ | ||
280 | u8 c_d:1; /* command/data bit */ | ||
281 | u8 res1:2; | ||
282 | u8 bpv:1; /* bit pointer valid */ | ||
283 | u8 bpointer:3; /* bit pointer */ | ||
284 | #else | ||
285 | u8 bpointer:3; /* bit pointer */ | ||
286 | u8 bpv:1; /* bit pointer valid */ | ||
287 | u8 res1:2; | ||
288 | u8 c_d:1; /* command/data bit */ | ||
289 | u8 sksv:1; /* sense key specific valid */ | ||
290 | #endif | ||
291 | u8 fpointer[2]; /* field pointer */ | ||
292 | }; | ||
293 | |||
294 | #define SCSI_SENSE_CUR_ERR 0x70 | ||
295 | #define SCSI_SENSE_DEF_ERR 0x71 | ||
296 | |||
297 | /* | ||
298 | * SCSI sense key values | ||
299 | */ | ||
300 | #define SCSI_SK_NO_SENSE 0x0 | ||
301 | #define SCSI_SK_REC_ERR 0x1 /* recovered error */ | ||
302 | #define SCSI_SK_NOT_READY 0x2 | ||
303 | #define SCSI_SK_MED_ERR 0x3 /* medium error */ | ||
304 | #define SCSI_SK_HW_ERR 0x4 /* hardware error */ | ||
305 | #define SCSI_SK_ILLEGAL_REQ 0x5 | ||
306 | #define SCSI_SK_UNIT_ATT 0x6 /* unit attention */ | ||
307 | #define SCSI_SK_DATA_PROTECT 0x7 | ||
308 | #define SCSI_SK_BLANK_CHECK 0x8 | ||
309 | #define SCSI_SK_VENDOR_SPEC 0x9 | ||
310 | #define SCSI_SK_COPY_ABORTED 0xA | ||
311 | #define SCSI_SK_ABORTED_CMND 0xB | ||
312 | #define SCSI_SK_VOL_OVERFLOW 0xD | ||
313 | #define SCSI_SK_MISCOMPARE 0xE | ||
314 | |||
315 | /* | ||
316 | * SCSI additional sense codes | ||
317 | */ | ||
318 | #define SCSI_ASC_NO_ADD_SENSE 0x00 | ||
319 | #define SCSI_ASC_LUN_NOT_READY 0x04 | ||
320 | #define SCSI_ASC_LUN_COMMUNICATION 0x08 | ||
321 | #define SCSI_ASC_WRITE_ERROR 0x0C | ||
322 | #define SCSI_ASC_INVALID_CMND_CODE 0x20 | ||
323 | #define SCSI_ASC_BAD_LBA 0x21 | ||
324 | #define SCSI_ASC_INVALID_FIELD_IN_CDB 0x24 | ||
325 | #define SCSI_ASC_LUN_NOT_SUPPORTED 0x25 | ||
326 | #define SCSI_ASC_LUN_WRITE_PROTECT 0x27 | ||
327 | #define SCSI_ASC_POWERON_BDR 0x29 /* power on reset, bus reset, | ||
328 | * bus device reset | ||
329 | */ | ||
330 | #define SCSI_ASC_PARAMS_CHANGED 0x2A | ||
331 | #define SCSI_ASC_CMND_CLEARED_BY_A_I 0x2F | ||
332 | #define SCSI_ASC_SAVING_PARAM_NOTSUPP 0x39 | ||
333 | #define SCSI_ASC_TOCC 0x3F /* target operating condtions | ||
334 | * changed | ||
335 | */ | ||
336 | #define SCSI_ASC_PARITY_ERROR 0x47 | ||
337 | #define SCSI_ASC_CMND_PHASE_ERROR 0x4A | ||
338 | #define SCSI_ASC_DATA_PHASE_ERROR 0x4B | ||
339 | #define SCSI_ASC_VENDOR_SPEC 0x7F | ||
340 | |||
341 | /* | ||
342 | * SCSI additional sense code qualifiers | ||
343 | */ | ||
344 | #define SCSI_ASCQ_CAUSE_NOT_REPORT 0x00 | ||
345 | #define SCSI_ASCQ_BECOMING_READY 0x01 | ||
346 | #define SCSI_ASCQ_INIT_CMD_REQ 0x02 | ||
347 | #define SCSI_ASCQ_FORMAT_IN_PROGRESS 0x04 | ||
348 | #define SCSI_ASCQ_OPERATION_IN_PROGRESS 0x07 | ||
349 | #define SCSI_ASCQ_SELF_TEST_IN_PROGRESS 0x09 | ||
350 | #define SCSI_ASCQ_WR_UNEXP_UNSOL_DATA 0x0C | ||
351 | #define SCSI_ASCQ_WR_NOTENG_UNSOL_DATA 0x0D | ||
352 | |||
353 | #define SCSI_ASCQ_LBA_OUT_OF_RANGE 0x00 | ||
354 | #define SCSI_ASCQ_INVALID_ELEMENT_ADDR 0x01 | ||
355 | |||
356 | #define SCSI_ASCQ_LUN_WRITE_PROTECTED 0x00 | ||
357 | #define SCSI_ASCQ_LUN_HW_WRITE_PROTECTED 0x01 | ||
358 | #define SCSI_ASCQ_LUN_SW_WRITE_PROTECTED 0x02 | ||
359 | |||
360 | #define SCSI_ASCQ_POR 0x01 /* power on reset */ | ||
361 | #define SCSI_ASCQ_SBR 0x02 /* scsi bus reset */ | ||
362 | #define SCSI_ASCQ_BDR 0x03 /* bus device reset */ | ||
363 | #define SCSI_ASCQ_DIR 0x04 /* device internal reset */ | ||
364 | |||
365 | #define SCSI_ASCQ_MODE_PARAMS_CHANGED 0x01 | ||
366 | #define SCSI_ASCQ_LOG_PARAMS_CHANGED 0x02 | ||
367 | #define SCSI_ASCQ_RESERVATIONS_PREEMPTED 0x03 | ||
368 | #define SCSI_ASCQ_RESERVATIONS_RELEASED 0x04 | ||
369 | #define SCSI_ASCQ_REGISTRATIONS_PREEMPTED 0x05 | ||
370 | |||
371 | #define SCSI_ASCQ_MICROCODE_CHANGED 0x01 | ||
372 | #define SCSI_ASCQ_CHANGED_OPER_COND 0x02 | ||
373 | #define SCSI_ASCQ_INQ_CHANGED 0x03 /* inquiry data changed */ | ||
374 | #define SCSI_ASCQ_DI_CHANGED 0x05 /* device id changed */ | ||
375 | #define SCSI_ASCQ_RL_DATA_CHANGED 0x0E /* report luns data changed */ | ||
376 | |||
377 | #define SCSI_ASCQ_DP_CRC_ERR 0x01 /* data phase crc error */ | ||
378 | #define SCSI_ASCQ_DP_SCSI_PARITY_ERR 0x02 /* data phase scsi parity error | ||
379 | */ | ||
380 | #define SCSI_ASCQ_IU_CRC_ERR 0x03 /* information unit crc error */ | ||
381 | #define SCSI_ASCQ_PROTO_SERV_CRC_ERR 0x05 | ||
382 | |||
383 | #define SCSI_ASCQ_LUN_TIME_OUT 0x01 | ||
384 | |||
385 | /* ------------------------------------------------------------ | ||
386 | * SCSI INQUIRY | ||
387 | * ------------------------------------------------------------*/ | ||
388 | |||
389 | struct scsi_inquiry_s{ | ||
390 | u8 opcode; | ||
391 | #ifdef __BIGENDIAN | ||
392 | u8 lun:3; | ||
393 | u8 reserved1:3; | ||
394 | u8 cmd_dt:1; | ||
395 | u8 evpd:1; | ||
396 | #else | ||
397 | u8 evpd:1; | ||
398 | u8 cmd_dt:1; | ||
399 | u8 reserved1:3; | ||
400 | u8 lun:3; | ||
401 | #endif | ||
402 | u8 page_code; | ||
403 | u8 reserved2; | ||
404 | u8 alloc_length; | ||
405 | u8 control; | ||
406 | }; | ||
407 | |||
408 | struct scsi_inquiry_vendor_s{ | ||
409 | u8 vendor_id[8]; | ||
410 | }; | ||
411 | |||
412 | struct scsi_inquiry_prodid_s{ | ||
413 | u8 product_id[16]; | ||
414 | }; | ||
415 | |||
416 | struct scsi_inquiry_prodrev_s{ | ||
417 | u8 product_rev[4]; | ||
418 | }; | ||
419 | |||
420 | struct scsi_inquiry_data_s{ | ||
421 | #ifdef __BIGENDIAN | ||
422 | u8 peripheral_qual:3; /* peripheral qualifier */ | ||
423 | u8 device_type:5; /* peripheral device type */ | ||
424 | |||
425 | u8 rmb:1; /* removable medium bit */ | ||
426 | u8 device_type_mod:7; /* device type modifier */ | ||
427 | |||
428 | u8 version; | ||
429 | |||
430 | u8 aenc:1; /* async event notification capability | ||
431 | */ | ||
432 | u8 trm_iop:1; /* terminate I/O process */ | ||
433 | u8 norm_aca:1; /* normal ACA supported */ | ||
434 | u8 hi_support:1; /* SCSI-3: supports REPORT LUNS */ | ||
435 | u8 rsp_data_format:4; | ||
436 | |||
437 | u8 additional_len; | ||
438 | u8 sccs:1; | ||
439 | u8 reserved1:7; | ||
440 | |||
441 | u8 reserved2:1; | ||
442 | u8 enc_serv:1; /* enclosure service component */ | ||
443 | u8 reserved3:1; | ||
444 | u8 multi_port:1; /* multi-port device */ | ||
445 | u8 m_chngr:1; /* device in medium transport element */ | ||
446 | u8 ack_req_q:1; /* SIP specific bit */ | ||
447 | u8 addr32:1; /* SIP specific bit */ | ||
448 | u8 addr16:1; /* SIP specific bit */ | ||
449 | |||
450 | u8 rel_adr:1; /* relative address */ | ||
451 | u8 w_bus32:1; | ||
452 | u8 w_bus16:1; | ||
453 | u8 synchronous:1; | ||
454 | u8 linked_commands:1; | ||
455 | u8 trans_dis:1; | ||
456 | u8 cmd_queue:1; /* command queueing supported */ | ||
457 | u8 soft_reset:1; /* soft reset alternative (VS) */ | ||
458 | #else | ||
459 | u8 device_type:5; /* peripheral device type */ | ||
460 | u8 peripheral_qual:3; | ||
461 | /* peripheral qualifier */ | ||
462 | |||
463 | u8 device_type_mod:7; | ||
464 | /* device type modifier */ | ||
465 | u8 rmb:1; /* removable medium bit */ | ||
466 | |||
467 | u8 version; | ||
468 | |||
469 | u8 rsp_data_format:4; | ||
470 | u8 hi_support:1; /* SCSI-3: supports REPORT LUNS */ | ||
471 | u8 norm_aca:1; /* normal ACA supported */ | ||
472 | u8 terminate_iop:1;/* terminate I/O process */ | ||
473 | u8 aenc:1; /* async event notification capability | ||
474 | */ | ||
475 | |||
476 | u8 additional_len; | ||
477 | u8 reserved1:7; | ||
478 | u8 sccs:1; | ||
479 | |||
480 | u8 addr16:1; /* SIP specific bit */ | ||
481 | u8 addr32:1; /* SIP specific bit */ | ||
482 | u8 ack_req_q:1; /* SIP specific bit */ | ||
483 | u8 m_chngr:1; /* device in medium transport element */ | ||
484 | u8 multi_port:1; /* multi-port device */ | ||
485 | u8 reserved3:1; /* TBD - Vendor Specific */ | ||
486 | u8 enc_serv:1; /* enclosure service component */ | ||
487 | u8 reserved2:1; | ||
488 | |||
489 | u8 soft_seset:1; /* soft reset alternative (VS) */ | ||
490 | u8 cmd_queue:1; /* command queueing supported */ | ||
491 | u8 trans_dis:1; | ||
492 | u8 linked_commands:1; | ||
493 | u8 synchronous:1; | ||
494 | u8 w_bus16:1; | ||
495 | u8 w_bus32:1; | ||
496 | u8 rel_adr:1; /* relative address */ | ||
497 | #endif | ||
498 | struct scsi_inquiry_vendor_s vendor_id; | ||
499 | struct scsi_inquiry_prodid_s product_id; | ||
500 | struct scsi_inquiry_prodrev_s product_rev; | ||
501 | u8 vendor_specific[20]; | ||
502 | u8 reserved4[40]; | ||
503 | }; | ||
504 | |||
505 | /* | ||
506 | * inquiry.peripheral_qual field values | ||
507 | */ | ||
508 | #define SCSI_DEVQUAL_DEFAULT 0 | ||
509 | #define SCSI_DEVQUAL_NOT_CONNECTED 1 | ||
510 | #define SCSI_DEVQUAL_NOT_SUPPORTED 3 | ||
511 | |||
512 | /* | ||
513 | * inquiry.device_type field values | ||
514 | */ | ||
515 | #define SCSI_DEVICE_DIRECT_ACCESS 0x00 | ||
516 | #define SCSI_DEVICE_SEQ_ACCESS 0x01 | ||
517 | #define SCSI_DEVICE_ARRAY_CONTROLLER 0x0C | ||
518 | #define SCSI_DEVICE_UNKNOWN 0x1F | ||
519 | |||
520 | /* | ||
521 | * inquiry.version | ||
522 | */ | ||
523 | #define SCSI_VERSION_ANSI_X3131 2 /* ANSI X3.131 SCSI-2 */ | ||
524 | #define SCSI_VERSION_SPC 3 /* SPC (SCSI-3), ANSI X3.301:1997 */ | ||
525 | #define SCSI_VERSION_SPC_2 4 /* SPC-2 */ | ||
526 | |||
527 | /* | ||
528 | * response data format | ||
529 | */ | ||
530 | #define SCSI_RSP_DATA_FORMAT 2 /* SCSI-2 & SPC */ | ||
531 | |||
532 | /* | ||
533 | * SCSI inquiry page codes | ||
534 | */ | ||
535 | #define SCSI_INQ_PAGE_VPD_PAGES 0x00 /* supported vpd pages */ | ||
536 | #define SCSI_INQ_PAGE_USN_PAGE 0x80 /* unit serial number page */ | ||
537 | #define SCSI_INQ_PAGE_DEV_IDENT 0x83 /* device indentification page | ||
538 | */ | ||
539 | #define SCSI_INQ_PAGES_MAX 3 | ||
540 | |||
541 | /* | ||
542 | * supported vital product data pages | ||
543 | */ | ||
544 | struct scsi_inq_page_vpd_pages_s{ | ||
545 | #ifdef __BIGENDIAN | ||
546 | u8 peripheral_qual:3; | ||
547 | u8 device_type:5; | ||
548 | #else | ||
549 | u8 device_type:5; | ||
550 | u8 peripheral_qual:3; | ||
551 | #endif | ||
552 | u8 page_code; | ||
553 | u8 reserved; | ||
554 | u8 page_length; | ||
555 | u8 pages[SCSI_INQ_PAGES_MAX]; | ||
556 | }; | ||
557 | |||
558 | /* | ||
559 | * Unit serial number page | ||
560 | */ | ||
561 | #define SCSI_INQ_USN_LEN 32 | ||
562 | |||
563 | struct scsi_inq_usn_s{ | ||
564 | char usn[SCSI_INQ_USN_LEN]; | ||
565 | }; | ||
566 | |||
567 | struct scsi_inq_page_usn_s{ | ||
568 | #ifdef __BIGENDIAN | ||
569 | u8 peripheral_qual:3; | ||
570 | u8 device_type:5; | ||
571 | #else | ||
572 | u8 device_type:5; | ||
573 | u8 peripheral_qual:3; | ||
574 | #endif | ||
575 | u8 page_code; | ||
576 | u8 reserved1; | ||
577 | u8 page_length; | ||
578 | struct scsi_inq_usn_s usn; | ||
579 | }; | ||
580 | |||
581 | enum { | ||
582 | SCSI_INQ_DIP_CODE_BINARY = 1, /* identifier has binary value */ | ||
583 | SCSI_INQ_DIP_CODE_ASCII = 2, /* identifier has ascii value */ | ||
584 | }; | ||
585 | |||
586 | enum { | ||
587 | SCSI_INQ_DIP_ASSOC_LUN = 0, /* id is associated with device */ | ||
588 | SCSI_INQ_DIP_ASSOC_PORT = 1, /* id is associated with port that | ||
589 | * received the request | ||
590 | */ | ||
591 | }; | ||
592 | |||
593 | enum { | ||
594 | SCSI_INQ_ID_TYPE_VENDOR = 1, | ||
595 | SCSI_INQ_ID_TYPE_IEEE = 2, | ||
596 | SCSI_INQ_ID_TYPE_FC_FS = 3, | ||
597 | SCSI_INQ_ID_TYPE_OTHER = 4, | ||
598 | }; | ||
599 | |||
600 | struct scsi_inq_dip_desc_s{ | ||
601 | #ifdef __BIGENDIAN | ||
602 | u8 res0:4; | ||
603 | u8 code_set:4; | ||
604 | u8 res1:2; | ||
605 | u8 association:2; | ||
606 | u8 id_type:4; | ||
607 | #else | ||
608 | u8 code_set:4; | ||
609 | u8 res0:4; | ||
610 | u8 id_type:4; | ||
611 | u8 association:2; | ||
612 | u8 res1:2; | ||
613 | #endif | ||
614 | u8 res2; | ||
615 | u8 id_len; | ||
616 | struct scsi_lun_sn_s id; | ||
617 | }; | ||
618 | |||
619 | /* | ||
620 | * Device indentification page | ||
621 | */ | ||
622 | struct scsi_inq_page_dev_ident_s{ | ||
623 | #ifdef __BIGENDIAN | ||
624 | u8 peripheral_qual:3; | ||
625 | u8 device_type:5; | ||
626 | #else | ||
627 | u8 device_type:5; | ||
628 | u8 peripheral_qual:3; | ||
629 | #endif | ||
630 | u8 page_code; | ||
631 | u8 reserved1; | ||
632 | u8 page_length; | ||
633 | struct scsi_inq_dip_desc_s desc; | ||
634 | }; | ||
635 | |||
636 | /* ------------------------------------------------------------ | ||
637 | * READ CAPACITY | ||
638 | * ------------------------------------------------------------ | ||
639 | */ | ||
640 | |||
641 | struct scsi_read_capacity_s{ | ||
642 | u8 opcode; | ||
643 | #ifdef __BIGENDIAN | ||
644 | u8 lun:3; | ||
645 | u8 reserved1:4; | ||
646 | u8 rel_adr:1; | ||
647 | #else | ||
648 | u8 rel_adr:1; | ||
649 | u8 reserved1:4; | ||
650 | u8 lun:3; | ||
651 | #endif | ||
652 | u8 lba0; /* MSB */ | ||
653 | u8 lba1; | ||
654 | u8 lba2; | ||
655 | u8 lba3; /* LSB */ | ||
656 | u8 reserved2; | ||
657 | u8 reserved3; | ||
658 | #ifdef __BIGENDIAN | ||
659 | u8 reserved4:7; | ||
660 | u8 pmi:1; /* partial medium indicator */ | ||
661 | #else | ||
662 | u8 pmi:1; /* partial medium indicator */ | ||
663 | u8 reserved4:7; | ||
664 | #endif | ||
665 | u8 control; | ||
666 | }; | ||
667 | |||
668 | struct scsi_read_capacity_data_s{ | ||
669 | u32 max_lba; /* maximum LBA available */ | ||
670 | u32 block_length; /* in bytes */ | ||
671 | }; | ||
672 | |||
673 | struct scsi_read_capacity16_data_s{ | ||
674 | u64 lba; /* maximum LBA available */ | ||
675 | u32 block_length; /* in bytes */ | ||
676 | #ifdef __BIGENDIAN | ||
677 | u8 reserved1:4, | ||
678 | p_type:3, | ||
679 | prot_en:1; | ||
680 | u8 reserved2:4, | ||
681 | lb_pbe:4; /* logical blocks per physical block | ||
682 | * exponent */ | ||
683 | u16 reserved3:2, | ||
684 | lba_align:14; /* lowest aligned logical block | ||
685 | * address */ | ||
686 | #else | ||
687 | u16 lba_align:14, /* lowest aligned logical block | ||
688 | * address */ | ||
689 | reserved3:2; | ||
690 | u8 lb_pbe:4, /* logical blocks per physical block | ||
691 | * exponent */ | ||
692 | reserved2:4; | ||
693 | u8 prot_en:1, | ||
694 | p_type:3, | ||
695 | reserved1:4; | ||
696 | #endif | ||
697 | u64 reserved4; | ||
698 | u64 reserved5; | ||
699 | }; | ||
700 | |||
701 | /* ------------------------------------------------------------ | ||
702 | * REPORT LUNS command | ||
703 | * ------------------------------------------------------------ | ||
704 | */ | ||
705 | |||
706 | struct scsi_report_luns_s{ | ||
707 | u8 opcode; /* A0h - REPORT LUNS opCode */ | ||
708 | u8 reserved1[5]; | ||
709 | u8 alloc_length[4];/* allocation length MSB first */ | ||
710 | u8 reserved2; | ||
711 | u8 control; | ||
712 | }; | ||
713 | |||
714 | #define SCSI_REPORT_LUN_ALLOC_LENGTH(rl) \ | ||
715 | ((rl->alloc_length[0] << 24) | (rl->alloc_length[1] << 16) | \ | ||
716 | (rl->alloc_length[2] << 8) | (rl->alloc_length[3])) | ||
717 | |||
718 | #define SCSI_REPORT_LUNS_SET_ALLOCLEN(rl, alloc_len) { \ | ||
719 | (rl)->alloc_length[0] = (alloc_len) >> 24; \ | ||
720 | (rl)->alloc_length[1] = ((alloc_len) >> 16) & 0xFF; \ | ||
721 | (rl)->alloc_length[2] = ((alloc_len) >> 8) & 0xFF; \ | ||
722 | (rl)->alloc_length[3] = (alloc_len) & 0xFF; \ | ||
723 | } | ||
724 | |||
725 | struct scsi_report_luns_data_s{ | ||
726 | u32 lun_list_length; /* length of LUN list length */ | ||
727 | u32 reserved; | ||
728 | lun_t lun[1]; /* first LUN in lun list */ | ||
729 | }; | ||
730 | |||
731 | /* ------------------------------------------------------------- | ||
732 | * SCSI mode parameters | ||
733 | * ----------------------------------------------------------- | ||
734 | */ | ||
735 | enum { | ||
736 | SCSI_DA_MEDIUM_DEF = 0, /* direct access default medium type */ | ||
737 | SCSI_DA_MEDIUM_SS = 1, /* direct access single sided */ | ||
738 | SCSI_DA_MEDIUM_DS = 2, /* direct access double sided */ | ||
739 | }; | ||
740 | |||
741 | /* | ||
742 | * SCSI Mode Select(6) cdb | ||
743 | */ | ||
744 | struct scsi_mode_select6_s{ | ||
745 | u8 opcode; | ||
746 | #ifdef __BIGENDIAN | ||
747 | u8 reserved1:3; | ||
748 | u8 pf:1; /* page format */ | ||
749 | u8 reserved2:3; | ||
750 | u8 sp:1; /* save pages if set to 1 */ | ||
751 | #else | ||
752 | u8 sp:1; /* save pages if set to 1 */ | ||
753 | u8 reserved2:3; | ||
754 | u8 pf:1; /* page format */ | ||
755 | u8 reserved1:3; | ||
756 | #endif | ||
757 | u8 reserved3[2]; | ||
758 | u8 alloc_len; | ||
759 | u8 control; | ||
760 | }; | ||
761 | |||
762 | /* | ||
763 | * SCSI Mode Select(10) cdb | ||
764 | */ | ||
765 | struct scsi_mode_select10_s{ | ||
766 | u8 opcode; | ||
767 | #ifdef __BIGENDIAN | ||
768 | u8 reserved1:3; | ||
769 | u8 pf:1; /* page format */ | ||
770 | u8 reserved2:3; | ||
771 | u8 sp:1; /* save pages if set to 1 */ | ||
772 | #else | ||
773 | u8 sp:1; /* save pages if set to 1 */ | ||
774 | u8 reserved2:3; | ||
775 | u8 pf:1; /* page format */ | ||
776 | u8 reserved1:3; | ||
777 | #endif | ||
778 | u8 reserved3[5]; | ||
779 | u8 alloc_len_msb; | ||
780 | u8 alloc_len_lsb; | ||
781 | u8 control; | ||
782 | }; | ||
783 | |||
784 | /* | ||
785 | * SCSI Mode Sense(6) cdb | ||
786 | */ | ||
787 | struct scsi_mode_sense6_s{ | ||
788 | u8 opcode; | ||
789 | #ifdef __BIGENDIAN | ||
790 | u8 reserved1:4; | ||
791 | u8 dbd:1; /* disable block discriptors if set to 1 */ | ||
792 | u8 reserved2:3; | ||
793 | |||
794 | u8 pc:2; /* page control */ | ||
795 | u8 page_code:6; | ||
796 | #else | ||
797 | u8 reserved2:3; | ||
798 | u8 dbd:1; /* disable block descriptors if set to 1 */ | ||
799 | u8 reserved1:4; | ||
800 | |||
801 | u8 page_code:6; | ||
802 | u8 pc:2; /* page control */ | ||
803 | #endif | ||
804 | u8 reserved3; | ||
805 | u8 alloc_len; | ||
806 | u8 control; | ||
807 | }; | ||
808 | |||
809 | /* | ||
810 | * SCSI Mode Sense(10) cdb | ||
811 | */ | ||
812 | struct scsi_mode_sense10_s{ | ||
813 | u8 opcode; | ||
814 | #ifdef __BIGENDIAN | ||
815 | u8 reserved1:3; | ||
816 | u8 LLBAA:1; /* long LBA accepted if set to 1 */ | ||
817 | u8 dbd:1; /* disable block descriptors if set | ||
818 | * to 1 | ||
819 | */ | ||
820 | u8 reserved2:3; | ||
821 | |||
822 | u8 pc:2; /* page control */ | ||
823 | u8 page_code:6; | ||
824 | #else | ||
825 | u8 reserved2:3; | ||
826 | u8 dbd:1; /* disable block descriptors if set to | ||
827 | * 1 | ||
828 | */ | ||
829 | u8 LLBAA:1; /* long LBA accepted if set to 1 */ | ||
830 | u8 reserved1:3; | ||
831 | |||
832 | u8 page_code:6; | ||
833 | u8 pc:2; /* page control */ | ||
834 | #endif | ||
835 | u8 reserved3[4]; | ||
836 | u8 alloc_len_msb; | ||
837 | u8 alloc_len_lsb; | ||
838 | u8 control; | ||
839 | }; | ||
840 | |||
841 | #define SCSI_CDB10_GET_AL(cdb) \ | ||
842 | ((cdb)->alloc_len_msb << 8 | (cdb)->alloc_len_lsb) | ||
843 | |||
844 | #define SCSI_CDB10_SET_AL(cdb, al) { \ | ||
845 | (cdb)->alloc_len_msb = al >> 8; \ | ||
846 | (cdb)->alloc_len_lsb = al & 0xFF; \ | ||
847 | } | ||
848 | |||
849 | #define SCSI_CDB6_GET_AL(cdb) ((cdb)->alloc_len) | ||
850 | |||
851 | #define SCSI_CDB6_SET_AL(cdb, al) { \ | ||
852 | (cdb)->alloc_len = al; \ | ||
853 | } | ||
854 | |||
855 | /* | ||
856 | * page control field values | ||
857 | */ | ||
858 | #define SCSI_PC_CURRENT_VALUES 0x0 | ||
859 | #define SCSI_PC_CHANGEABLE_VALUES 0x1 | ||
860 | #define SCSI_PC_DEFAULT_VALUES 0x2 | ||
861 | #define SCSI_PC_SAVED_VALUES 0x3 | ||
862 | |||
863 | /* | ||
864 | * SCSI mode page codes | ||
865 | */ | ||
866 | #define SCSI_MP_VENDOR_SPEC 0x00 | ||
867 | #define SCSI_MP_DISC_RECN 0x02 /* disconnect-reconnect page */ | ||
868 | #define SCSI_MP_FORMAT_DEVICE 0x03 | ||
869 | #define SCSI_MP_RDG 0x04 /* rigid disk geometry page */ | ||
870 | #define SCSI_MP_FDP 0x05 /* flexible disk page */ | ||
871 | #define SCSI_MP_CACHING 0x08 /* caching page */ | ||
872 | #define SCSI_MP_CONTROL 0x0A /* control mode page */ | ||
873 | #define SCSI_MP_MED_TYPES_SUP 0x0B /* medium types supported page */ | ||
874 | #define SCSI_MP_INFO_EXCP_CNTL 0x1C /* informational exception control */ | ||
875 | #define SCSI_MP_ALL 0x3F /* return all pages - mode sense only */ | ||
876 | |||
877 | /* | ||
878 | * mode parameter header | ||
879 | */ | ||
880 | struct scsi_mode_param_header6_s{ | ||
881 | u8 mode_datalen; | ||
882 | u8 medium_type; | ||
883 | |||
884 | /* | ||
885 | * device specific parameters expanded for direct access devices | ||
886 | */ | ||
887 | #ifdef __BIGENDIAN | ||
888 | u32 wp:1; /* write protected */ | ||
889 | u32 reserved1:2; | ||
890 | u32 dpofua:1; /* disable page out + force unit access | ||
891 | */ | ||
892 | u32 reserved2:4; | ||
893 | #else | ||
894 | u32 reserved2:4; | ||
895 | u32 dpofua:1; /* disable page out + force unit access | ||
896 | */ | ||
897 | u32 reserved1:2; | ||
898 | u32 wp:1; /* write protected */ | ||
899 | #endif | ||
900 | |||
901 | u8 block_desclen; | ||
902 | }; | ||
903 | |||
904 | struct scsi_mode_param_header10_s{ | ||
905 | u32 mode_datalen:16; | ||
906 | u32 medium_type:8; | ||
907 | |||
908 | /* | ||
909 | * device specific parameters expanded for direct access devices | ||
910 | */ | ||
911 | #ifdef __BIGENDIAN | ||
912 | u32 wp:1; /* write protected */ | ||
913 | u32 reserved1:2; | ||
914 | u32 dpofua:1; /* disable page out + force unit access | ||
915 | */ | ||
916 | u32 reserved2:4; | ||
917 | #else | ||
918 | u32 reserved2:4; | ||
919 | u32 dpofua:1; /* disable page out + force unit access | ||
920 | */ | ||
921 | u32 reserved1:2; | ||
922 | u32 wp:1; /* write protected */ | ||
923 | #endif | ||
924 | |||
925 | #ifdef __BIGENDIAN | ||
926 | u32 reserved3:7; | ||
927 | u32 longlba:1; | ||
928 | #else | ||
929 | u32 longlba:1; | ||
930 | u32 reserved3:7; | ||
931 | #endif | ||
932 | u32 reserved4:8; | ||
933 | u32 block_desclen:16; | ||
934 | }; | ||
935 | |||
936 | /* | ||
937 | * mode parameter block descriptor | ||
938 | */ | ||
939 | struct scsi_mode_param_desc_s{ | ||
940 | u32 nblks; | ||
941 | u32 density_code:8; | ||
942 | u32 block_length:24; | ||
943 | }; | ||
944 | |||
945 | /* | ||
946 | * Disconnect-reconnect mode page format | ||
947 | */ | ||
948 | struct scsi_mp_disc_recn_s{ | ||
949 | #ifdef __BIGENDIAN | ||
950 | u8 ps:1; | ||
951 | u8 reserved1:1; | ||
952 | u8 page_code:6; | ||
953 | #else | ||
954 | u8 page_code:6; | ||
955 | u8 reserved1:1; | ||
956 | u8 ps:1; | ||
957 | #endif | ||
958 | u8 page_len; | ||
959 | u8 buf_full_ratio; | ||
960 | u8 buf_empty_ratio; | ||
961 | |||
962 | u8 bil_msb; /* bus inactivity limit -MSB */ | ||
963 | u8 bil_lsb; /* bus inactivity limit -LSB */ | ||
964 | |||
965 | u8 dtl_msb; /* disconnect time limit - MSB */ | ||
966 | u8 dtl_lsb; /* disconnect time limit - LSB */ | ||
967 | |||
968 | u8 ctl_msb; /* connect time limit - MSB */ | ||
969 | u8 ctl_lsb; /* connect time limit - LSB */ | ||
970 | |||
971 | u8 max_burst_len_msb; | ||
972 | u8 max_burst_len_lsb; | ||
973 | #ifdef __BIGENDIAN | ||
974 | u8 emdp:1; /* enable modify data pointers */ | ||
975 | u8 fa:3; /* fair arbitration */ | ||
976 | u8 dimm:1; /* disconnect immediate */ | ||
977 | u8 dtdc:3; /* data transfer disconnect control */ | ||
978 | #else | ||
979 | u8 dtdc:3; /* data transfer disconnect control */ | ||
980 | u8 dimm:1; /* disconnect immediate */ | ||
981 | u8 fa:3; /* fair arbitration */ | ||
982 | u8 emdp:1; /* enable modify data pointers */ | ||
983 | #endif | ||
984 | |||
985 | u8 reserved3; | ||
986 | |||
987 | u8 first_burst_len_msb; | ||
988 | u8 first_burst_len_lsb; | ||
989 | }; | ||
990 | |||
991 | /* | ||
992 | * SCSI format device mode page | ||
993 | */ | ||
994 | struct scsi_mp_format_device_s{ | ||
995 | #ifdef __BIGENDIAN | ||
996 | u32 ps:1; | ||
997 | u32 reserved1:1; | ||
998 | u32 page_code:6; | ||
999 | #else | ||
1000 | u32 page_code:6; | ||
1001 | u32 reserved1:1; | ||
1002 | u32 ps:1; | ||
1003 | #endif | ||
1004 | u32 page_len:8; | ||
1005 | u32 tracks_per_zone:16; | ||
1006 | |||
1007 | u32 a_sec_per_zone:16; | ||
1008 | u32 a_tracks_per_zone:16; | ||
1009 | |||
1010 | u32 a_tracks_per_lun:16; /* alternate tracks/lun-MSB */ | ||
1011 | u32 sec_per_track:16; /* sectors/track-MSB */ | ||
1012 | |||
1013 | u32 bytes_per_sector:16; | ||
1014 | u32 interleave:16; | ||
1015 | |||
1016 | u32 tsf:16; /* track skew factor-MSB */ | ||
1017 | u32 csf:16; /* cylinder skew factor-MSB */ | ||
1018 | |||
1019 | #ifdef __BIGENDIAN | ||
1020 | u32 ssec:1; /* soft sector formatting */ | ||
1021 | u32 hsec:1; /* hard sector formatting */ | ||
1022 | u32 rmb:1; /* removable media */ | ||
1023 | u32 surf:1; /* surface */ | ||
1024 | u32 reserved2:4; | ||
1025 | #else | ||
1026 | u32 reserved2:4; | ||
1027 | u32 surf:1; /* surface */ | ||
1028 | u32 rmb:1; /* removable media */ | ||
1029 | u32 hsec:1; /* hard sector formatting */ | ||
1030 | u32 ssec:1; /* soft sector formatting */ | ||
1031 | #endif | ||
1032 | u32 reserved3:24; | ||
1033 | }; | ||
1034 | |||
1035 | /* | ||
1036 | * SCSI rigid disk device geometry page | ||
1037 | */ | ||
1038 | struct scsi_mp_rigid_device_geometry_s{ | ||
1039 | #ifdef __BIGENDIAN | ||
1040 | u32 ps:1; | ||
1041 | u32 reserved1:1; | ||
1042 | u32 page_code:6; | ||
1043 | #else | ||
1044 | u32 page_code:6; | ||
1045 | u32 reserved1:1; | ||
1046 | u32 ps:1; | ||
1047 | #endif | ||
1048 | u32 page_len:8; | ||
1049 | u32 num_cylinders0:8; | ||
1050 | u32 num_cylinders1:8; | ||
1051 | |||
1052 | u32 num_cylinders2:8; | ||
1053 | u32 num_heads:8; | ||
1054 | u32 scwp0:8; | ||
1055 | u32 scwp1:8; | ||
1056 | |||
1057 | u32 scwp2:8; | ||
1058 | u32 scrwc0:8; | ||
1059 | u32 scrwc1:8; | ||
1060 | u32 scrwc2:8; | ||
1061 | |||
1062 | u32 dsr:16; | ||
1063 | u32 lscyl0:8; | ||
1064 | u32 lscyl1:8; | ||
1065 | |||
1066 | u32 lscyl2:8; | ||
1067 | #ifdef __BIGENDIAN | ||
1068 | u32 reserved2:6; | ||
1069 | u32 rpl:2; /* rotational position locking */ | ||
1070 | #else | ||
1071 | u32 rpl:2; /* rotational position locking */ | ||
1072 | u32 reserved2:6; | ||
1073 | #endif | ||
1074 | u32 rot_off:8; | ||
1075 | u32 reserved3:8; | ||
1076 | |||
1077 | u32 med_rot_rate:16; | ||
1078 | u32 reserved4:16; | ||
1079 | }; | ||
1080 | |||
1081 | /* | ||
1082 | * SCSI caching mode page | ||
1083 | */ | ||
1084 | struct scsi_mp_caching_s{ | ||
1085 | #ifdef __BIGENDIAN | ||
1086 | u8 ps:1; | ||
1087 | u8 res1:1; | ||
1088 | u8 page_code:6; | ||
1089 | #else | ||
1090 | u8 page_code:6; | ||
1091 | u8 res1:1; | ||
1092 | u8 ps:1; | ||
1093 | #endif | ||
1094 | u8 page_len; | ||
1095 | #ifdef __BIGENDIAN | ||
1096 | u8 ic:1; /* initiator control */ | ||
1097 | u8 abpf:1; /* abort pre-fetch */ | ||
1098 | u8 cap:1; /* caching analysis permitted */ | ||
1099 | u8 disc:1; /* discontinuity */ | ||
1100 | u8 size:1; /* size enable */ | ||
1101 | u8 wce:1; /* write cache enable */ | ||
1102 | u8 mf:1; /* multiplication factor */ | ||
1103 | u8 rcd:1; /* read cache disable */ | ||
1104 | |||
1105 | u8 drrp:4; /* demand read retention priority */ | ||
1106 | u8 wrp:4; /* write retention priority */ | ||
1107 | #else | ||
1108 | u8 rcd:1; /* read cache disable */ | ||
1109 | u8 mf:1; /* multiplication factor */ | ||
1110 | u8 wce:1; /* write cache enable */ | ||
1111 | u8 size:1; /* size enable */ | ||
1112 | u8 disc:1; /* discontinuity */ | ||
1113 | u8 cap:1; /* caching analysis permitted */ | ||
1114 | u8 abpf:1; /* abort pre-fetch */ | ||
1115 | u8 ic:1; /* initiator control */ | ||
1116 | |||
1117 | u8 wrp:4; /* write retention priority */ | ||
1118 | u8 drrp:4; /* demand read retention priority */ | ||
1119 | #endif | ||
1120 | u8 dptl[2];/* disable pre-fetch transfer length */ | ||
1121 | u8 min_prefetch[2]; | ||
1122 | u8 max_prefetch[2]; | ||
1123 | u8 max_prefetch_limit[2]; | ||
1124 | #ifdef __BIGENDIAN | ||
1125 | u8 fsw:1; /* force sequential write */ | ||
1126 | u8 lbcss:1;/* logical block cache segment size */ | ||
1127 | u8 dra:1; /* disable read ahead */ | ||
1128 | u8 vs:2; /* vendor specific */ | ||
1129 | u8 res2:3; | ||
1130 | #else | ||
1131 | u8 res2:3; | ||
1132 | u8 vs:2; /* vendor specific */ | ||
1133 | u8 dra:1; /* disable read ahead */ | ||
1134 | u8 lbcss:1;/* logical block cache segment size */ | ||
1135 | u8 fsw:1; /* force sequential write */ | ||
1136 | #endif | ||
1137 | u8 num_cache_segs; | ||
1138 | |||
1139 | u8 cache_seg_size[2]; | ||
1140 | u8 res3; | ||
1141 | u8 non_cache_seg_size[3]; | ||
1142 | }; | ||
1143 | |||
1144 | /* | ||
1145 | * SCSI control mode page | ||
1146 | */ | ||
1147 | struct scsi_mp_control_page_s{ | ||
1148 | #ifdef __BIGENDIAN | ||
1149 | u8 ps:1; | ||
1150 | u8 reserved1:1; | ||
1151 | u8 page_code:6; | ||
1152 | #else | ||
1153 | u8 page_code:6; | ||
1154 | u8 reserved1:1; | ||
1155 | u8 ps:1; | ||
1156 | #endif | ||
1157 | u8 page_len; | ||
1158 | #ifdef __BIGENDIAN | ||
1159 | u8 tst:3; /* task set type */ | ||
1160 | u8 reserved3:3; | ||
1161 | u8 gltsd:1; /* global logging target save disable */ | ||
1162 | u8 rlec:1; /* report log exception condition */ | ||
1163 | |||
1164 | u8 qalgo_mod:4; /* queue alogorithm modifier */ | ||
1165 | u8 reserved4:1; | ||
1166 | u8 qerr:2; /* queue error management */ | ||
1167 | u8 dque:1; /* disable queuing */ | ||
1168 | |||
1169 | u8 reserved5:1; | ||
1170 | u8 rac:1; /* report a check */ | ||
1171 | u8 reserved6:2; | ||
1172 | u8 swp:1; /* software write protect */ | ||
1173 | u8 raerp:1; /* ready AER permission */ | ||
1174 | u8 uaaerp:1; /* unit attenstion AER permission */ | ||
1175 | u8 eaerp:1; /* error AER permission */ | ||
1176 | |||
1177 | u8 reserved7:5; | ||
1178 | u8 autoload_mod:3; | ||
1179 | #else | ||
1180 | u8 rlec:1; /* report log exception condition */ | ||
1181 | u8 gltsd:1; /* global logging target save disable */ | ||
1182 | u8 reserved3:3; | ||
1183 | u8 tst:3; /* task set type */ | ||
1184 | |||
1185 | u8 dque:1; /* disable queuing */ | ||
1186 | u8 qerr:2; /* queue error management */ | ||
1187 | u8 reserved4:1; | ||
1188 | u8 qalgo_mod:4; /* queue alogorithm modifier */ | ||
1189 | |||
1190 | u8 eaerp:1; /* error AER permission */ | ||
1191 | u8 uaaerp:1; /* unit attenstion AER permission */ | ||
1192 | u8 raerp:1; /* ready AER permission */ | ||
1193 | u8 swp:1; /* software write protect */ | ||
1194 | u8 reserved6:2; | ||
1195 | u8 rac:1; /* report a check */ | ||
1196 | u8 reserved5:1; | ||
1197 | |||
1198 | u8 autoload_mod:3; | ||
1199 | u8 reserved7:5; | ||
1200 | #endif | ||
1201 | u8 rahp_msb; /* ready AER holdoff period - MSB */ | ||
1202 | u8 rahp_lsb; /* ready AER holdoff period - LSB */ | ||
1203 | |||
1204 | u8 busy_timeout_period_msb; | ||
1205 | u8 busy_timeout_period_lsb; | ||
1206 | |||
1207 | u8 ext_selftest_compl_time_msb; | ||
1208 | u8 ext_selftest_compl_time_lsb; | ||
1209 | }; | ||
1210 | |||
1211 | /* | ||
1212 | * SCSI medium types supported mode page | ||
1213 | */ | ||
1214 | struct scsi_mp_medium_types_sup_s{ | ||
1215 | #ifdef __BIGENDIAN | ||
1216 | u8 ps:1; | ||
1217 | u8 reserved1:1; | ||
1218 | u8 page_code:6; | ||
1219 | #else | ||
1220 | u8 page_code:6; | ||
1221 | u8 reserved1:1; | ||
1222 | u8 ps:1; | ||
1223 | #endif | ||
1224 | u8 page_len; | ||
1225 | |||
1226 | u8 reserved3[2]; | ||
1227 | u8 med_type1_sup; /* medium type one supported */ | ||
1228 | u8 med_type2_sup; /* medium type two supported */ | ||
1229 | u8 med_type3_sup; /* medium type three supported */ | ||
1230 | u8 med_type4_sup; /* medium type four supported */ | ||
1231 | }; | ||
1232 | |||
1233 | /* | ||
1234 | * SCSI informational exception control mode page | ||
1235 | */ | ||
1236 | struct scsi_mp_info_excpt_cntl_s{ | ||
1237 | #ifdef __BIGENDIAN | ||
1238 | u8 ps:1; | ||
1239 | u8 reserved1:1; | ||
1240 | u8 page_code:6; | ||
1241 | #else | ||
1242 | u8 page_code:6; | ||
1243 | u8 reserved1:1; | ||
1244 | u8 ps:1; | ||
1245 | #endif | ||
1246 | u8 page_len; | ||
1247 | #ifdef __BIGENDIAN | ||
1248 | u8 perf:1; /* performance */ | ||
1249 | u8 reserved3:1; | ||
1250 | u8 ebf:1; /* enable background fucntion */ | ||
1251 | u8 ewasc:1; /* enable warning */ | ||
1252 | u8 dexcpt:1; /* disable exception control */ | ||
1253 | u8 test:1; /* enable test device failure | ||
1254 | * notification | ||
1255 | */ | ||
1256 | u8 reserved4:1; | ||
1257 | u8 log_error:1; | ||
1258 | |||
1259 | u8 reserved5:4; | ||
1260 | u8 mrie:4; /* method of reporting info | ||
1261 | * exceptions | ||
1262 | */ | ||
1263 | #else | ||
1264 | u8 log_error:1; | ||
1265 | u8 reserved4:1; | ||
1266 | u8 test:1; /* enable test device failure | ||
1267 | * notification | ||
1268 | */ | ||
1269 | u8 dexcpt:1; /* disable exception control */ | ||
1270 | u8 ewasc:1; /* enable warning */ | ||
1271 | u8 ebf:1; /* enable background fucntion */ | ||
1272 | u8 reserved3:1; | ||
1273 | u8 perf:1; /* performance */ | ||
1274 | |||
1275 | u8 mrie:4; /* method of reporting info | ||
1276 | * exceptions | ||
1277 | */ | ||
1278 | u8 reserved5:4; | ||
1279 | #endif | ||
1280 | u8 interval_timer_msb; | ||
1281 | u8 interval_timer_lsb; | ||
1282 | |||
1283 | u8 report_count_msb; | ||
1284 | u8 report_count_lsb; | ||
1285 | }; | ||
1286 | |||
1287 | /* | ||
1288 | * Methods of reporting informational exceptions | ||
1289 | */ | ||
1290 | #define SCSI_MP_IEC_NO_REPORT 0x0 /* no reporting of exceptions */ | ||
1291 | #define SCSI_MP_IEC_AER 0x1 /* async event reporting */ | ||
1292 | #define SCSI_MP_IEC_UNIT_ATTN 0x2 /* generate unit attenstion */ | ||
1293 | #define SCSI_MO_IEC_COND_REC_ERR 0x3 /* conditionally generate recovered | ||
1294 | * error | ||
1295 | */ | ||
1296 | #define SCSI_MP_IEC_UNCOND_REC_ERR 0x4 /* unconditionally generate recovered | ||
1297 | * error | ||
1298 | */ | ||
1299 | #define SCSI_MP_IEC_NO_SENSE 0x5 /* generate no sense */ | ||
1300 | #define SCSI_MP_IEC_ON_REQUEST 0x6 /* only report exceptions on request */ | ||
1301 | |||
1302 | /* | ||
1303 | * SCSI flexible disk page | ||
1304 | */ | ||
1305 | struct scsi_mp_flexible_disk_s{ | ||
1306 | #ifdef __BIGENDIAN | ||
1307 | u8 ps:1; | ||
1308 | u8 reserved1:1; | ||
1309 | u8 page_code:6; | ||
1310 | #else | ||
1311 | u8 page_code:6; | ||
1312 | u8 reserved1:1; | ||
1313 | u8 ps:1; | ||
1314 | #endif | ||
1315 | u8 page_len; | ||
1316 | |||
1317 | u8 transfer_rate_msb; | ||
1318 | u8 transfer_rate_lsb; | ||
1319 | |||
1320 | u8 num_heads; | ||
1321 | u8 num_sectors; | ||
1322 | |||
1323 | u8 bytes_per_sector_msb; | ||
1324 | u8 bytes_per_sector_lsb; | ||
1325 | |||
1326 | u8 num_cylinders_msb; | ||
1327 | u8 num_cylinders_lsb; | ||
1328 | |||
1329 | u8 sc_wpc_msb; /* starting cylinder-write | ||
1330 | * precompensation msb | ||
1331 | */ | ||
1332 | u8 sc_wpc_lsb; /* starting cylinder-write | ||
1333 | * precompensation lsb | ||
1334 | */ | ||
1335 | u8 sc_rwc_msb; /* starting cylinder-reduced write | ||
1336 | * current msb | ||
1337 | */ | ||
1338 | u8 sc_rwc_lsb; /* starting cylinder-reduced write | ||
1339 | * current lsb | ||
1340 | */ | ||
1341 | |||
1342 | u8 dev_step_rate_msb; | ||
1343 | u8 dev_step_rate_lsb; | ||
1344 | |||
1345 | u8 dev_step_pulse_width; | ||
1346 | |||
1347 | u8 head_sd_msb; /* head settle delay msb */ | ||
1348 | u8 head_sd_lsb; /* head settle delay lsb */ | ||
1349 | |||
1350 | u8 motor_on_delay; | ||
1351 | u8 motor_off_delay; | ||
1352 | #ifdef __BIGENDIAN | ||
1353 | u8 trdy:1; /* true ready bit */ | ||
1354 | u8 ssn:1; /* start sector number bit */ | ||
1355 | u8 mo:1; /* motor on bit */ | ||
1356 | u8 reserved3:5; | ||
1357 | |||
1358 | u8 reserved4:4; | ||
1359 | u8 spc:4; /* step pulse per cylinder */ | ||
1360 | #else | ||
1361 | u8 reserved3:5; | ||
1362 | u8 mo:1; /* motor on bit */ | ||
1363 | u8 ssn:1; /* start sector number bit */ | ||
1364 | u8 trdy:1; /* true ready bit */ | ||
1365 | |||
1366 | u8 spc:4; /* step pulse per cylinder */ | ||
1367 | u8 reserved4:4; | ||
1368 | #endif | ||
1369 | u8 write_comp; | ||
1370 | u8 head_load_delay; | ||
1371 | u8 head_unload_delay; | ||
1372 | #ifdef __BIGENDIAN | ||
1373 | u8 pin34:4; /* pin34 usage */ | ||
1374 | u8 pin2:4; /* pin2 usage */ | ||
1375 | |||
1376 | u8 pin4:4; /* pin4 usage */ | ||
1377 | u8 pin1:4; /* pin1 usage */ | ||
1378 | #else | ||
1379 | u8 pin2:4; /* pin2 usage */ | ||
1380 | u8 pin34:4; /* pin34 usage */ | ||
1381 | |||
1382 | u8 pin1:4; /* pin1 usage */ | ||
1383 | u8 pin4:4; /* pin4 usage */ | ||
1384 | #endif | ||
1385 | u8 med_rot_rate_msb; | ||
1386 | u8 med_rot_rate_lsb; | ||
1387 | |||
1388 | u8 reserved5[2]; | ||
1389 | }; | ||
1390 | |||
1391 | struct scsi_mode_page_format_data6_s{ | ||
1392 | struct scsi_mode_param_header6_s mph; /* mode page header */ | ||
1393 | struct scsi_mode_param_desc_s desc; /* block descriptor */ | ||
1394 | struct scsi_mp_format_device_s format; /* format device data */ | ||
1395 | }; | ||
1396 | |||
1397 | struct scsi_mode_page_format_data10_s{ | ||
1398 | struct scsi_mode_param_header10_s mph; /* mode page header */ | ||
1399 | struct scsi_mode_param_desc_s desc; /* block descriptor */ | ||
1400 | struct scsi_mp_format_device_s format; /* format device data */ | ||
1401 | }; | ||
1402 | |||
1403 | struct scsi_mode_page_rdg_data6_s{ | ||
1404 | struct scsi_mode_param_header6_s mph; /* mode page header */ | ||
1405 | struct scsi_mode_param_desc_s desc; /* block descriptor */ | ||
1406 | struct scsi_mp_rigid_device_geometry_s rdg; | ||
1407 | /* rigid geometry data */ | ||
1408 | }; | ||
1409 | |||
1410 | struct scsi_mode_page_rdg_data10_s{ | ||
1411 | struct scsi_mode_param_header10_s mph; /* mode page header */ | ||
1412 | struct scsi_mode_param_desc_s desc; /* block descriptor */ | ||
1413 | struct scsi_mp_rigid_device_geometry_s rdg; | ||
1414 | /* rigid geometry data */ | ||
1415 | }; | ||
1416 | |||
1417 | struct scsi_mode_page_cache6_s{ | ||
1418 | struct scsi_mode_param_header6_s mph; /* mode page header */ | ||
1419 | struct scsi_mode_param_desc_s desc; /* block descriptor */ | ||
1420 | struct scsi_mp_caching_s cache; /* cache page data */ | ||
1421 | }; | ||
1422 | |||
1423 | struct scsi_mode_page_cache10_s{ | ||
1424 | struct scsi_mode_param_header10_s mph; /* mode page header */ | ||
1425 | struct scsi_mode_param_desc_s desc; /* block descriptor */ | ||
1426 | struct scsi_mp_caching_s cache; /* cache page data */ | ||
1427 | }; | ||
1428 | |||
1429 | /* -------------------------------------------------------------- | ||
1430 | * Format Unit command | ||
1431 | * ------------------------------------------------------------ | ||
1432 | */ | ||
1433 | |||
1434 | /* | ||
1435 | * Format Unit CDB | ||
1436 | */ | ||
1437 | struct scsi_format_unit_s{ | ||
1438 | u8 opcode; | ||
1439 | #ifdef __BIGENDIAN | ||
1440 | u8 res1:3; | ||
1441 | u8 fmtdata:1; /* if set, data out phase has format | ||
1442 | * data | ||
1443 | */ | ||
1444 | u8 cmplst:1; /* if set, defect list is complete */ | ||
1445 | u8 def_list:3; /* format of defect descriptor is | ||
1446 | * fmtdata =1 | ||
1447 | */ | ||
1448 | #else | ||
1449 | u8 def_list:3; /* format of defect descriptor is | ||
1450 | * fmtdata = 1 | ||
1451 | */ | ||
1452 | u8 cmplst:1; /* if set, defect list is complete */ | ||
1453 | u8 fmtdata:1; /* if set, data out phase has format | ||
1454 | * data | ||
1455 | */ | ||
1456 | u8 res1:3; | ||
1457 | #endif | ||
1458 | u8 interleave_msb; | ||
1459 | u8 interleave_lsb; | ||
1460 | u8 vendor_spec; | ||
1461 | u8 control; | ||
1462 | }; | ||
1463 | |||
1464 | /* | ||
1465 | * h | ||
1466 | */ | ||
1467 | struct scsi_reserve6_s{ | ||
1468 | u8 opcode; | ||
1469 | #ifdef __BIGENDIAN | ||
1470 | u8 reserved:3; | ||
1471 | u8 obsolete:4; | ||
1472 | u8 extent:1; | ||
1473 | #else | ||
1474 | u8 extent:1; | ||
1475 | u8 obsolete:4; | ||
1476 | u8 reserved:3; | ||
1477 | #endif | ||
1478 | u8 reservation_id; | ||
1479 | u16 param_list_len; | ||
1480 | u8 control; | ||
1481 | }; | ||
1482 | |||
1483 | /* | ||
1484 | * h | ||
1485 | */ | ||
1486 | struct scsi_release6_s{ | ||
1487 | u8 opcode; | ||
1488 | #ifdef __BIGENDIAN | ||
1489 | u8 reserved1:3; | ||
1490 | u8 obsolete:4; | ||
1491 | u8 extent:1; | ||
1492 | #else | ||
1493 | u8 extent:1; | ||
1494 | u8 obsolete:4; | ||
1495 | u8 reserved1:3; | ||
1496 | #endif | ||
1497 | u8 reservation_id; | ||
1498 | u16 reserved2; | ||
1499 | u8 control; | ||
1500 | }; | ||
1501 | |||
1502 | /* | ||
1503 | * h | ||
1504 | */ | ||
1505 | struct scsi_reserve10_s{ | ||
1506 | u8 opcode; | ||
1507 | #ifdef __BIGENDIAN | ||
1508 | u8 reserved1:3; | ||
1509 | u8 third_party:1; | ||
1510 | u8 reserved2:2; | ||
1511 | u8 long_id:1; | ||
1512 | u8 extent:1; | ||
1513 | #else | ||
1514 | u8 extent:1; | ||
1515 | u8 long_id:1; | ||
1516 | u8 reserved2:2; | ||
1517 | u8 third_party:1; | ||
1518 | u8 reserved1:3; | ||
1519 | #endif | ||
1520 | u8 reservation_id; | ||
1521 | u8 third_pty_dev_id; | ||
1522 | u8 reserved3; | ||
1523 | u8 reserved4; | ||
1524 | u8 reserved5; | ||
1525 | u16 param_list_len; | ||
1526 | u8 control; | ||
1527 | }; | ||
1528 | |||
1529 | struct scsi_release10_s{ | ||
1530 | u8 opcode; | ||
1531 | #ifdef __BIGENDIAN | ||
1532 | u8 reserved1:3; | ||
1533 | u8 third_party:1; | ||
1534 | u8 reserved2:2; | ||
1535 | u8 long_id:1; | ||
1536 | u8 extent:1; | ||
1537 | #else | ||
1538 | u8 extent:1; | ||
1539 | u8 long_id:1; | ||
1540 | u8 reserved2:2; | ||
1541 | u8 third_party:1; | ||
1542 | u8 reserved1:3; | ||
1543 | #endif | ||
1544 | u8 reservation_id; | ||
1545 | u8 third_pty_dev_id; | ||
1546 | u8 reserved3; | ||
1547 | u8 reserved4; | ||
1548 | u8 reserved5; | ||
1549 | u16 param_list_len; | ||
1550 | u8 control; | ||
1551 | }; | ||
1552 | |||
1553 | struct scsi_verify10_s{ | ||
1554 | u8 opcode; | ||
1555 | #ifdef __BIGENDIAN | ||
1556 | u8 lun:3; | ||
1557 | u8 dpo:1; | ||
1558 | u8 reserved:2; | ||
1559 | u8 bytchk:1; | ||
1560 | u8 reladdr:1; | ||
1561 | #else | ||
1562 | u8 reladdr:1; | ||
1563 | u8 bytchk:1; | ||
1564 | u8 reserved:2; | ||
1565 | u8 dpo:1; | ||
1566 | u8 lun:3; | ||
1567 | #endif | ||
1568 | u8 lba0; | ||
1569 | u8 lba1; | ||
1570 | u8 lba2; | ||
1571 | u8 lba3; | ||
1572 | u8 reserved1; | ||
1573 | u8 verification_len0; | ||
1574 | u8 verification_len1; | ||
1575 | u8 control_byte; | ||
1576 | }; | ||
1577 | |||
1578 | struct scsi_request_sense_s{ | ||
1579 | u8 opcode; | ||
1580 | #ifdef __BIGENDIAN | ||
1581 | u8 lun:3; | ||
1582 | u8 reserved:5; | ||
1583 | #else | ||
1584 | u8 reserved:5; | ||
1585 | u8 lun:3; | ||
1586 | #endif | ||
1587 | u8 reserved0; | ||
1588 | u8 reserved1; | ||
1589 | u8 alloc_len; | ||
1590 | u8 control_byte; | ||
1591 | }; | ||
1592 | |||
1593 | /* ------------------------------------------------------------ | ||
1594 | * SCSI status byte values | ||
1595 | * ------------------------------------------------------------ | ||
1596 | */ | ||
1597 | #define SCSI_STATUS_GOOD 0x00 | ||
1598 | #define SCSI_STATUS_CHECK_CONDITION 0x02 | ||
1599 | #define SCSI_STATUS_CONDITION_MET 0x04 | ||
1600 | #define SCSI_STATUS_BUSY 0x08 | ||
1601 | #define SCSI_STATUS_INTERMEDIATE 0x10 | ||
1602 | #define SCSI_STATUS_ICM 0x14 /* intermediate condition met */ | ||
1603 | #define SCSI_STATUS_RESERVATION_CONFLICT 0x18 | ||
1604 | #define SCSI_STATUS_COMMAND_TERMINATED 0x22 | ||
1605 | #define SCSI_STATUS_QUEUE_FULL 0x28 | ||
1606 | #define SCSI_STATUS_ACA_ACTIVE 0x30 | ||
1607 | |||
1608 | #define SCSI_MAX_ALLOC_LEN 0xFF /* maximum allocarion length | ||
1609 | * in CDBs | ||
1610 | */ | ||
1611 | |||
1612 | #define SCSI_OP_WRITE_VERIFY10 0x2E | ||
1613 | #define SCSI_OP_WRITE_VERIFY12 0xAE | ||
1614 | #define SCSI_OP_UNDEF 0xFF | ||
1615 | |||
1616 | /* | ||
1617 | * SCSI WRITE-VERIFY(10) command | ||
1618 | */ | ||
1619 | struct scsi_write_verify10_s{ | ||
1620 | u8 opcode; | ||
1621 | #ifdef __BIGENDIAN | ||
1622 | u8 reserved1:3; | ||
1623 | u8 dpo:1; /* Disable Page Out */ | ||
1624 | u8 reserved2:1; | ||
1625 | u8 ebp:1; /* erse by-pass */ | ||
1626 | u8 bytchk:1; /* byte check */ | ||
1627 | u8 rel_adr:1; /* relative address */ | ||
1628 | #else | ||
1629 | u8 rel_adr:1; /* relative address */ | ||
1630 | u8 bytchk:1; /* byte check */ | ||
1631 | u8 ebp:1; /* erse by-pass */ | ||
1632 | u8 reserved2:1; | ||
1633 | u8 dpo:1; /* Disable Page Out */ | ||
1634 | u8 reserved1:3; | ||
1635 | #endif | ||
1636 | u8 lba0; /* logical block address - MSB */ | ||
1637 | u8 lba1; | ||
1638 | u8 lba2; | ||
1639 | u8 lba3; /* LSB */ | ||
1640 | u8 reserved3; | ||
1641 | u8 xfer_length0; /* transfer length in blocks - MSB */ | ||
1642 | u8 xfer_length1; /* LSB */ | ||
1643 | u8 control; | ||
1644 | }; | ||
1645 | |||
1646 | #pragma pack() | ||
1647 | |||
1648 | #endif /* __SCSI_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/protocol/types.h b/drivers/scsi/bfa/include/protocol/types.h deleted file mode 100644 index 2875a6cced3b..000000000000 --- a/drivers/scsi/bfa/include/protocol/types.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2009 Brocade Communications Systems, Inc. | ||
3 | * All rights reserved | ||
4 | * www.brocade.com | ||
5 | * | ||
6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License (GPL) Version 2 as | ||
10 | * published by the Free Software Foundation | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | /** | ||
19 | * types.h Protocol defined base types | ||
20 | */ | ||
21 | |||
22 | #ifndef __TYPES_H__ | ||
23 | #define __TYPES_H__ | ||
24 | |||
25 | #include <bfa_os_inc.h> | ||
26 | |||
27 | #define wwn_t u64 | ||
28 | #define lun_t u64 | ||
29 | |||
30 | #define WWN_NULL (0) | ||
31 | #define FC_SYMNAME_MAX 256 /* max name server symbolic name size */ | ||
32 | #define FC_ALPA_MAX 128 | ||
33 | |||
34 | #pragma pack(1) | ||
35 | |||
36 | #define MAC_ADDRLEN (6) | ||
37 | struct mac_s { u8 mac[MAC_ADDRLEN]; }; | ||
38 | #define mac_t struct mac_s | ||
39 | |||
40 | #pragma pack() | ||
41 | |||
42 | #endif | ||