]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.drivers/lpfc-8.2.8.14-update
Disable build of xen kernel.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / lpfc-8.2.8.14-update
1 From: Jamie Wellnitz <jamie.wellnitz@emulex.com>
2 Subject: Disable MSI by default in lpfc driver
3 References: bnc#477843
4
5 Update lpfc from 8.2.8.13 to 8.2.8.14
6
7 We (Emulex) have seen too many MSI/MSI-X issues to be comfortable at this
8 stage, so we've decided to revert lpfc to using INTx interrupts by default and
9 allowing MSI or MSI-X to be enabled with the lpfc_use_msi driver parameter.
10
11 We will also include a change to only test MSI-X and MSI interrupts in the
12 interrupt method failback logic. This way, lpfc will not fail port
13 initialization if the first few INTx interrupts are slow to arrive. Lpfc will
14 still verify MSI/MSI-X interrupts are actually delivered before continuing port
15 initialization.
16
17 Signed-off-by: Hannes Reinecke <hare@suse.de>
18
19 --
20 diff -urpN a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
21 --- a/drivers/scsi/lpfc/lpfc_attr.c 2009-02-19 17:49:17.668021000 -0500
22 +++ b/drivers/scsi/lpfc/lpfc_attr.c 2009-02-19 17:49:17.761982000 -0500
23 @@ -3080,12 +3080,12 @@ LPFC_ATTR_RW(poll_tmo, 10, 1, 255,
24 /*
25 # lpfc_use_msi: Use MSI (Message Signaled Interrupts) in systems that
26 # support this feature
27 -# 0 = MSI disabled
28 +# 0 = MSI disabled (default)
29 # 1 = MSI enabled
30 -# 2 = MSI-X enabled (default)
31 -# Value range is [0,2]. Default value is 2.
32 +# 2 = MSI-X enabled
33 +# Value range is [0,2]. Default value is 0.
34 */
35 -LPFC_ATTR_R(use_msi, 2, 0, 2, "Use Message Signaled Interrupts (1) or "
36 +LPFC_ATTR_R(use_msi, 0, 0, 2, "Use Message Signaled Interrupts (1) or "
37 "MSI-X (2), if possible");
38
39 /*
40 diff -urpN a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
41 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c 2009-02-19 17:49:17.697993000 -0500
42 +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c 2009-02-19 17:49:17.792982000 -0500
43 @@ -2246,9 +2246,13 @@ lpfc_unreg_all_rpis(struct lpfc_vport *v
44 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
45 mbox->context1 = NULL;
46 rc = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
47 - if (rc == MBX_NOT_FINISHED) {
48 + if (rc != MBX_TIMEOUT)
49 mempool_free(mbox, phba->mbox_mem_pool);
50 - }
51 +
52 + if ((rc == MBX_TIMEOUT) || (rc == MBX_NOT_FINISHED))
53 + lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_VPORT,
54 + "1836 Could not issue "
55 + "unreg_login(all_rpis) status %d\n", rc);
56 }
57 }
58
59 @@ -2266,12 +2270,14 @@ lpfc_unreg_default_rpis(struct lpfc_vpor
60 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
61 mbox->context1 = NULL;
62 rc = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
63 - if (rc == MBX_NOT_FINISHED) {
64 + if (rc != MBX_TIMEOUT)
65 + mempool_free(mbox, phba->mbox_mem_pool);
66 +
67 + if ((rc == MBX_TIMEOUT) || (rc == MBX_NOT_FINISHED))
68 lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_VPORT,
69 "1815 Could not issue "
70 - "unreg_did (default rpis)\n");
71 - mempool_free(mbox, phba->mbox_mem_pool);
72 - }
73 + "unreg_did (default rpis) status %d\n",
74 + rc);
75 }
76 }
77
78 diff -urpN a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
79 --- a/drivers/scsi/lpfc/lpfc_init.c 2009-02-19 17:49:17.710980000 -0500
80 +++ b/drivers/scsi/lpfc/lpfc_init.c 2009-02-19 17:49:17.817984000 -0500
81 @@ -1355,7 +1355,8 @@ lpfc_get_hba_model_desc(struct lpfc_hba
82 m = (typeof(m)){"LPe11000", max_speed, "PCIe"};
83 break;
84 case PCI_DEVICE_ID_ZEPHYR_DCSP:
85 - m = (typeof(m)){"LPe11002-SP", max_speed, "PCIe"};
86 + m = (typeof(m)){"LP2105", max_speed, "PCIe"};
87 + GE = 1;
88 break;
89 case PCI_DEVICE_ID_ZMID:
90 m = (typeof(m)){"LPe1150", max_speed, "PCIe"};
91 @@ -2954,8 +2955,9 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
92
93 /* Wait 50ms for the interrupts of previous mailbox commands */
94 msleep(50);
95 - /* Check active interrupts received */
96 - if (phba->sli.slistat.sli_intr > LPFC_INTR_THRESHOLD) {
97 + /* Check active interrupts received only for MSI/MSI-X */
98 + if (phba->sli.slistat.sli_intr > LPFC_INTR_THRESHOLD ||
99 + intr_mode == 0) {
100 /* Log the current active interrupt mode */
101 phba->intr_mode = intr_mode;
102 lpfc_log_intr_mode(phba, intr_mode);
103 @@ -2965,13 +2967,6 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
104 "0451 Configure interrupt mode (%d) "
105 "failed active interrupt test.\n",
106 intr_mode);
107 - if (intr_mode == 0) {
108 - lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
109 - "0479 Failed to enable "
110 - "interrupt.\n");
111 - error = -ENODEV;
112 - goto out_remove_device;
113 - }
114 /* Stop HBA SLI setups */
115 lpfc_stop_port(phba);
116 /* Disable the current interrupt mode */
117 diff -urpN a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
118 --- a/drivers/scsi/lpfc/lpfc_sli.c 2009-02-19 17:49:17.741980000 -0500
119 +++ b/drivers/scsi/lpfc/lpfc_sli.c 2009-02-19 17:49:17.845982000 -0500
120 @@ -4031,6 +4031,7 @@ lpfc_sli_async_event_handler(struct lpfc
121 uint16_t temp;
122 struct temp_event temp_event_data;
123 struct Scsi_Host *shost;
124 + uint32_t *iocb_w;
125
126 icmd = &iocbq->iocb;
127 evt_code = icmd->un.asyncstat.evt_code;
128 @@ -4038,13 +4039,23 @@ lpfc_sli_async_event_handler(struct lpfc
129
130 if ((evt_code != ASYNC_TEMP_WARN) &&
131 (evt_code != ASYNC_TEMP_SAFE)) {
132 + iocb_w = (uint32_t *) icmd;
133 lpfc_printf_log(phba,
134 KERN_ERR,
135 LOG_SLI,
136 "0346 Ring %d handler: unexpected ASYNC_STATUS"
137 - " evt_code 0x%x\n",
138 + " evt_code 0x%x \n"
139 + "W0 0x%08x W1 0x%08x W2 0x%08x W3 0x%08x\n"
140 + "W4 0x%08x W5 0x%08x W6 0x%08x W7 0x%08x\n"
141 + "W8 0x%08x W9 0x%08x W10 0x%08x W11 0x%08x\n"
142 + "W12 0x%08x W13 0x%08x W14 0x%08x W15 0x%08x\n",
143 pring->ringno,
144 - icmd->un.asyncstat.evt_code);
145 + icmd->un.asyncstat.evt_code,
146 + iocb_w[0], iocb_w[1], iocb_w[2], iocb_w[3],
147 + iocb_w[4], iocb_w[5], iocb_w[6], iocb_w[7],
148 + iocb_w[8], iocb_w[9], iocb_w[10], iocb_w[11],
149 + iocb_w[12], iocb_w[13], iocb_w[14], iocb_w[15]);
150 +
151 return;
152 }
153 temp_event_data.data = (uint32_t)temp;
154 diff -urpN a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
155 --- a/drivers/scsi/lpfc/lpfc_version.h 2009-02-19 17:49:17.744980000 -0500
156 +++ b/drivers/scsi/lpfc/lpfc_version.h 2009-02-19 17:49:17.848982000 -0500
157 @@ -18,7 +18,7 @@
158 * included with this package. *
159 *******************************************************************/
160
161 -#define LPFC_DRIVER_VERSION "8.2.8.13"
162 +#define LPFC_DRIVER_VERSION "8.2.8.14"
163
164 #define LPFC_DRIVER_NAME "lpfc"
165 #define LPFC_SP_DRIVER_HANDLER_NAME "lpfc:sp"