]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.drivers/lpfc-8.2.8.10-update
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / lpfc-8.2.8.10-update
1 Subject: Emulex 8.2.8.10 driver patches for SLE11
2 From: Jamie Wellnitz <jamie.wellnitz@emulex.com>
3 References: bnc#460775
4
5 Changes from 8.2.8.9 to 8.2.8.10:
6
7 * Changed version number to 8.2.8.10
8 * Fix crash during driver load when authentication is enabled (CR 86652 86677)
9
10
11 Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
12 Signed-off-by: Hannes Reinecke <hare@suse.de>
13 --
14 diff -urpN a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
15 --- a/drivers/scsi/lpfc/lpfc_attr.c 2008-12-16 16:01:42.260089000 -0500
16 +++ b/drivers/scsi/lpfc/lpfc_attr.c 2008-12-16 16:01:42.586088000 -0500
17 @@ -4303,7 +4303,7 @@ lpfc_get_host_port_state(struct Scsi_Hos
18 fc_host_port_state(shost) = FC_PORTSTATE_OFFLINE;
19 else {
20 if ((vport->cfg_enable_auth) &&
21 - (lpfc_security_service_state == SECURITY_OFFLINE)) {
22 + (vport->security_service_state == SECURITY_OFFLINE)) {
23 fc_host_port_state(shost) = FC_PORTSTATE_ERROR;
24 spin_unlock_irq(shost->host_lock);
25 return;
26 diff -urpN a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h
27 --- a/drivers/scsi/lpfc/lpfc_crtn.h 2008-12-16 16:01:42.285088000 -0500
28 +++ b/drivers/scsi/lpfc/lpfc_crtn.h 2008-12-16 16:01:42.606088000 -0500
29 @@ -295,7 +295,7 @@ int lpfc_get_instance(void);
30 void lpfc_host_attrib_init(struct Scsi_Host *);
31
32 int lpfc_selective_reset(struct lpfc_hba *);
33 -int lpfc_security_wait(struct lpfc_hba *);
34 +int lpfc_security_wait(struct lpfc_vport *);
35 int lpfc_get_security_enabled(struct Scsi_Host *);
36 void lpfc_security_service_online(struct Scsi_Host *);
37 void lpfc_security_service_offline(struct Scsi_Host *);
38 @@ -318,7 +318,6 @@ extern void lpfc_debugfs_slow_ring_trc(s
39 uint32_t, uint32_t);
40 extern struct lpfc_hbq_init *lpfc_hbq_defs[];
41
42 -extern uint8_t lpfc_security_service_state;
43 extern spinlock_t fc_security_user_lock;
44 extern struct list_head fc_security_user_list;
45 extern int fc_service_state;
46 diff -urpN a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
47 --- a/drivers/scsi/lpfc/lpfc_els.c 2008-12-16 16:01:42.345090000 -0500
48 +++ b/drivers/scsi/lpfc/lpfc_els.c 2008-12-16 16:01:42.652088000 -0500
49 @@ -945,7 +945,7 @@ lpfc_initial_flogi(struct lpfc_vport *vp
50 struct lpfc_nodelist *ndlp;
51
52 if ((vport->cfg_enable_auth) &&
53 - (lpfc_security_service_state == SECURITY_OFFLINE))
54 + (vport->security_service_state == SECURITY_OFFLINE))
55 return 1;
56
57 vport->port_state = LPFC_FLOGI;
58 @@ -1000,7 +1000,7 @@ lpfc_initial_fdisc(struct lpfc_vport *vp
59 struct lpfc_nodelist *ndlp;
60
61 if (vport->cfg_enable_auth) {
62 - if (lpfc_security_wait(phba)) {
63 + if (lpfc_security_wait(vport)) {
64 lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
65 "1049 Authentication is enabled but "
66 "authentication service is not "
67 diff -urpN a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
68 --- a/drivers/scsi/lpfc/lpfc.h 2008-12-16 16:01:42.366088000 -0500
69 +++ b/drivers/scsi/lpfc/lpfc.h 2008-12-16 16:01:42.656088000 -0500
70 @@ -478,6 +478,7 @@ struct lpfc_vport {
71 struct list_head sc_users;
72 struct work_struct sc_online_work;
73 struct work_struct sc_offline_work;
74 + uint8_t security_service_state;
75
76 /* Vport Config Parameters */
77 uint32_t cfg_scan_down;
78 diff -urpN a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
79 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c 2008-12-16 16:01:42.378088000 -0500
80 +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c 2008-12-16 16:01:42.668088000 -0500
81 @@ -1010,7 +1010,7 @@ lpfc_mbx_cmpl_local_config_link(struct l
82 * LPFC_FLOGI while waiting for FLOGI cmpl
83 */
84 if ((vport->cfg_enable_auth) &&
85 - (lpfc_security_service_state == SECURITY_OFFLINE))
86 + (vport->security_service_state == SECURITY_OFFLINE))
87 lpfc_issue_clear_la(phba, vport);
88 else if (vport->port_state != LPFC_FLOGI)
89 lpfc_initial_flogi(vport);
90 diff -urpN a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
91 --- a/drivers/scsi/lpfc/lpfc_init.c 2008-12-16 16:01:42.403088000 -0500
92 +++ b/drivers/scsi/lpfc/lpfc_init.c 2008-12-16 16:01:42.693090000 -0500
93 @@ -549,14 +549,9 @@ lpfc_config_port_post(struct lpfc_hba *p
94 mempool_free(pmb, phba->mbox_mem_pool);
95 }
96
97 - if (vport->cfg_enable_auth) {
98 - if (lpfc_security_service_state == SECURITY_OFFLINE) {
99 - lpfc_printf_log(vport->phba, KERN_ERR, LOG_SECURITY,
100 - "1000 Authentication is enabled but "
101 - "authentication service is not running\n");
102 + if (vport->cfg_enable_auth &&
103 + vport->security_service_state == SECURITY_OFFLINE)
104 vport->auth.auth_mode = FC_AUTHMODE_UNKNOWN;
105 - }
106 - }
107
108 /* Allocate new MBOX buffer, will be freed in mbox compl */
109 pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
110 @@ -2124,6 +2119,7 @@ lpfc_create_port(struct lpfc_hba *phba,
111 INIT_WORK(&vport->sc_offline_work, lpfc_fc_sc_security_offline);
112 INIT_LIST_HEAD(&vport->sc_users);
113 INIT_LIST_HEAD(&vport->sc_response_wait_queue);
114 + vport->security_service_state = SECURITY_OFFLINE;
115
116 spin_lock_irq(&phba->hbalock);
117 list_add_tail(&vport->listentry, &phba->port_list);
118 @@ -2904,19 +2900,6 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
119
120 shost = lpfc_shost_from_vport(vport);
121
122 - if ((lpfc_get_security_enabled)(shost)) {
123 - unsigned long flags;
124 - spin_lock_irqsave(&fc_security_user_lock, flags);
125 - list_add_tail(&vport->sc_users, &fc_security_user_list);
126 - spin_unlock_irqrestore(&fc_security_user_lock, flags);
127 - if (fc_service_state == FC_SC_SERVICESTATE_ONLINE) {
128 - lpfc_fc_queue_security_work(vport,
129 - &vport->sc_online_work);
130 - }
131 - /* Triggers fcauthd to register if it is running */
132 - fc_host_post_event(shost, fc_get_event_number(),
133 - FCH_EVT_PORT_ONLINE, shost->host_no);
134 - }
135 phba->pport = vport;
136 lpfc_debugfs_initialize(vport);
137
138 @@ -2990,6 +2973,15 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
139 }
140 }
141
142 + if ((lpfc_get_security_enabled)(shost)) {
143 + unsigned long flags;
144 + spin_lock_irqsave(&fc_security_user_lock, flags);
145 + list_add_tail(&vport->sc_users, &fc_security_user_list);
146 + spin_unlock_irqrestore(&fc_security_user_lock, flags);
147 + /* Triggers fcauthd to register if it is running */
148 + fc_host_post_event(shost, fc_get_event_number(),
149 + FCH_EVT_PORT_ONLINE, shost->host_no);
150 + }
151 /*
152 * hba setup may have changed the hba_queue_depth so we need to adjust
153 * the value of can_queue.
154 diff -urpN a/drivers/scsi/lpfc/lpfc_security.c b/drivers/scsi/lpfc/lpfc_security.c
155 --- a/drivers/scsi/lpfc/lpfc_security.c 2008-12-16 16:01:42.464088000 -0500
156 +++ b/drivers/scsi/lpfc/lpfc_security.c 2008-12-16 16:01:42.808089000 -0500
157 @@ -36,14 +36,12 @@
158 #include "lpfc_auth_access.h"
159 #include "lpfc_vport.h"
160
161 -uint8_t lpfc_security_service_state = SECURITY_OFFLINE;
162 -
163 void
164 lpfc_security_service_online(struct Scsi_Host *shost)
165 {
166 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
167
168 - lpfc_security_service_state = SECURITY_ONLINE;
169 + vport->security_service_state = SECURITY_ONLINE;
170 if (vport->cfg_enable_auth &&
171 vport->auth.auth_mode == FC_AUTHMODE_UNKNOWN)
172 lpfc_selective_reset(vport->phba);
173 @@ -52,7 +50,9 @@ lpfc_security_service_online(struct Scsi
174 void
175 lpfc_security_service_offline(struct Scsi_Host *shost)
176 {
177 - lpfc_security_service_state = SECURITY_OFFLINE;
178 + struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
179 +
180 + vport->security_service_state = SECURITY_OFFLINE;
181 }
182
183 void
184 @@ -185,21 +185,21 @@ lpfc_get_security_enabled(struct Scsi_Ho
185 }
186
187 int
188 -lpfc_security_wait(struct lpfc_hba *phba)
189 +lpfc_security_wait(struct lpfc_vport *vport)
190 {
191 int i = 0;
192 - if (lpfc_security_service_state == SECURITY_ONLINE)
193 + if (vport->security_service_state == SECURITY_ONLINE)
194 return 0;
195 - lpfc_printf_log(phba, KERN_WARNING, LOG_SECURITY,
196 + lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
197 "1058 Waiting for authentication service...\n");
198 - while (lpfc_security_service_state == SECURITY_OFFLINE) {
199 + while (vport->security_service_state == SECURITY_OFFLINE) {
200 i++;
201 if (i > SECURITY_WAIT_TMO * 2)
202 return -ETIMEDOUT;
203 /* Delay for half of a second */
204 msleep(500);
205 }
206 - lpfc_printf_log(phba, KERN_WARNING, LOG_SECURITY,
207 + lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
208 "1059 Authentication service online.\n");
209 return 0;
210 }
211 @@ -310,7 +310,7 @@ lpfc_get_auth_config(struct lpfc_nodelis
212 auth_req.remote_wwpn = AUTH_FABRIC_WWN;
213 else
214 auth_req.remote_wwpn = wwn_to_u64(rwwn->u.wwn);
215 - if (lpfc_security_service_state == SECURITY_OFFLINE) {
216 + if (vport->security_service_state == SECURITY_OFFLINE) {
217 lpfc_printf_vlog(vport, KERN_ERR, LOG_SECURITY,
218 "1053 Start Authentication: "
219 "Security service offline.\n");
220 diff -urpN a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
221 --- a/drivers/scsi/lpfc/lpfc_version.h 2008-12-16 16:01:42.512089000 -0500
222 +++ b/drivers/scsi/lpfc/lpfc_version.h 2008-12-16 16:01:42.835094000 -0500
223 @@ -18,7 +18,7 @@
224 * included with this package. *
225 *******************************************************************/
226
227 -#define LPFC_DRIVER_VERSION "8.2.8.9"
228 +#define LPFC_DRIVER_VERSION "8.2.8.10"
229
230 #define LPFC_DRIVER_NAME "lpfc"
231 #define LPFC_SP_DRIVER_HANDLER_NAME "lpfc:sp"