]>
Commit | Line | Data |
---|---|---|
dd585302 | 1 | Nothing here for now, move along... |
debfe244 AM |
2 | commit c695793b52216ad6a11ce952fc8d29f3a9d0c7cd |
3 | Author: Balsundar P <balsundar.p@microsemi.com> | |
4 | Date: Tue Oct 15 11:52:04 2019 +0530 | |
5 | ||
6 | scsi: aacraid: bump version | |
7 | ||
8 | Bump version to 50877. | |
9 | ||
10 | Link: https://lore.kernel.org/r/1571120524-6037-8-git-send-email-balsundar.p@microsemi.com | |
11 | Signed-off-by: Balsundar P <balsundar.p@microsemi.com> | |
12 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
13 | ||
14 | diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h | |
15 | index 17a4e8b8bd00..e3e4ecbea726 100644 | |
16 | --- a/drivers/scsi/aacraid/aacraid.h | |
17 | +++ b/drivers/scsi/aacraid/aacraid.h | |
18 | @@ -85,7 +85,7 @@ enum { | |
19 | #define PMC_GLOBAL_INT_BIT0 0x00000001 | |
20 | ||
21 | #ifndef AAC_DRIVER_BUILD | |
22 | -# define AAC_DRIVER_BUILD 50877 | |
23 | +# define AAC_DRIVER_BUILD 50983 | |
24 | # define AAC_DRIVER_BRANCH "-custom" | |
25 | #endif | |
26 | #define MAXIMUM_NUM_CONTAINERS 32 | |
27 | ||
28 | commit 26c54d0ec25c186329d845ad1beb9d3dde586af9 | |
29 | Author: Balsundar P <balsundar.p@microsemi.com> | |
30 | Date: Tue Oct 15 11:52:03 2019 +0530 | |
31 | ||
32 | scsi: aacraid: send AIF request post IOP RESET | |
33 | ||
34 | After IOP reset completion, AIF request command is not issued to the | |
35 | controller. Driver schedules a worker thread to issue a AIF request command | |
36 | after IOP reset completion. | |
37 | ||
38 | [mkp: fix zeroday warning] | |
39 | ||
40 | Link: https://lore.kernel.org/r/1571120524-6037-7-git-send-email-balsundar.p@microsemi.com | |
41 | Acked-by: Balsundar P < Balsundar.P@microchip.com> | |
42 | Signed-off-by: Balsundar P <balsundar.p@microsemi.com> | |
43 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
44 | ||
45 | diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h | |
46 | index f76a33cb0259..17a4e8b8bd00 100644 | |
47 | --- a/drivers/scsi/aacraid/aacraid.h | |
48 | +++ b/drivers/scsi/aacraid/aacraid.h | |
49 | @@ -1330,7 +1330,7 @@ struct fib { | |
50 | #define AAC_DEVTYPE_ARC_RAW 2 | |
51 | #define AAC_DEVTYPE_NATIVE_RAW 3 | |
52 | ||
53 | -#define AAC_SAFW_RESCAN_DELAY (10 * HZ) | |
54 | +#define AAC_RESCAN_DELAY (10 * HZ) | |
55 | ||
56 | struct aac_hba_map_info { | |
57 | __le32 rmw_nexus; /* nexus for native HBA devices */ | |
58 | @@ -1603,6 +1603,7 @@ struct aac_dev | |
59 | struct fsa_dev_info *fsa_dev; | |
60 | struct task_struct *thread; | |
61 | struct delayed_work safw_rescan_work; | |
62 | + struct delayed_work src_reinit_aif_worker; | |
63 | int cardtype; | |
64 | /* | |
65 | *This lock will protect the two 32-bit | |
66 | @@ -2647,7 +2648,12 @@ int aac_scan_host(struct aac_dev *dev); | |
67 | ||
68 | static inline void aac_schedule_safw_scan_worker(struct aac_dev *dev) | |
69 | { | |
70 | - schedule_delayed_work(&dev->safw_rescan_work, AAC_SAFW_RESCAN_DELAY); | |
71 | + schedule_delayed_work(&dev->safw_rescan_work, AAC_RESCAN_DELAY); | |
72 | +} | |
73 | + | |
74 | +static inline void aac_schedule_src_reinit_aif_worker(struct aac_dev *dev) | |
75 | +{ | |
76 | + schedule_delayed_work(&dev->src_reinit_aif_worker, AAC_RESCAN_DELAY); | |
77 | } | |
78 | ||
79 | static inline void aac_safw_rescan_worker(struct work_struct *work) | |
80 | @@ -2661,10 +2667,10 @@ static inline void aac_safw_rescan_worker(struct work_struct *work) | |
81 | aac_scan_host(dev); | |
82 | } | |
83 | ||
84 | -static inline void aac_cancel_safw_rescan_worker(struct aac_dev *dev) | |
85 | +static inline void aac_cancel_rescan_worker(struct aac_dev *dev) | |
86 | { | |
87 | - if (dev->sa_firmware) | |
88 | - cancel_delayed_work_sync(&dev->safw_rescan_work); | |
89 | + cancel_delayed_work_sync(&dev->safw_rescan_work); | |
90 | + cancel_delayed_work_sync(&dev->src_reinit_aif_worker); | |
91 | } | |
92 | ||
93 | /* SCp.phase values */ | |
94 | @@ -2674,6 +2680,7 @@ static inline void aac_cancel_safw_rescan_worker(struct aac_dev *dev) | |
95 | #define AAC_OWNER_FIRMWARE 0x106 | |
96 | ||
97 | void aac_safw_rescan_worker(struct work_struct *work); | |
98 | +void aac_src_reinit_aif_worker(struct work_struct *work); | |
99 | int aac_acquire_irq(struct aac_dev *dev); | |
100 | void aac_free_irq(struct aac_dev *dev); | |
101 | int aac_setup_safw_adapter(struct aac_dev *dev); | |
102 | @@ -2731,6 +2738,7 @@ int aac_probe_container(struct aac_dev *dev, int cid); | |
103 | int _aac_rx_init(struct aac_dev *dev); | |
104 | int aac_rx_select_comm(struct aac_dev *dev, int comm); | |
105 | int aac_rx_deliver_producer(struct fib * fib); | |
106 | +void aac_reinit_aif(struct aac_dev *aac, unsigned int index); | |
107 | ||
108 | static inline int aac_is_src(struct aac_dev *dev) | |
109 | { | |
110 | diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c | |
111 | index 3f268f669cc3..5a8a999606ea 100644 | |
112 | --- a/drivers/scsi/aacraid/commsup.c | |
113 | +++ b/drivers/scsi/aacraid/commsup.c | |
114 | @@ -1464,6 +1464,14 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr) | |
115 | } | |
116 | } | |
117 | ||
118 | +static void aac_schedule_bus_scan(struct aac_dev *aac) | |
119 | +{ | |
120 | + if (aac->sa_firmware) | |
121 | + aac_schedule_safw_scan_worker(aac); | |
122 | + else | |
123 | + aac_schedule_src_reinit_aif_worker(aac); | |
124 | +} | |
125 | + | |
126 | static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) | |
127 | { | |
128 | int index, quirks; | |
129 | @@ -1639,7 +1647,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) | |
130 | */ | |
131 | if (!retval && !is_kdump_kernel()) { | |
132 | dev_info(&aac->pdev->dev, "Scheduling bus rescan\n"); | |
133 | - aac_schedule_safw_scan_worker(aac); | |
134 | + aac_schedule_bus_scan(aac); | |
135 | } | |
136 | ||
137 | if (jafo) { | |
138 | @@ -1960,6 +1968,16 @@ int aac_scan_host(struct aac_dev *dev) | |
139 | return rcode; | |
140 | } | |
141 | ||
142 | +void aac_src_reinit_aif_worker(struct work_struct *work) | |
143 | +{ | |
144 | + struct aac_dev *dev = container_of(to_delayed_work(work), | |
145 | + struct aac_dev, src_reinit_aif_worker); | |
146 | + | |
147 | + wait_event(dev->scsi_host_ptr->host_wait, | |
148 | + !scsi_host_in_recovery(dev->scsi_host_ptr)); | |
149 | + aac_reinit_aif(dev, dev->cardtype); | |
150 | +} | |
151 | + | |
152 | /** | |
153 | * aac_handle_sa_aif Handle a message from the firmware | |
154 | * @dev: Which adapter this fib is from | |
155 | diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c | |
156 | index 55a55c56fea9..ee6bc2f9b80a 100644 | |
157 | --- a/drivers/scsi/aacraid/linit.c | |
158 | +++ b/drivers/scsi/aacraid/linit.c | |
159 | @@ -1593,6 +1593,19 @@ static void aac_init_char(void) | |
160 | } | |
161 | } | |
162 | ||
163 | +void aac_reinit_aif(struct aac_dev *aac, unsigned int index) | |
164 | +{ | |
165 | + /* | |
166 | + * Firmware may send a AIF messages very early and the Driver may have | |
167 | + * ignored as it is not fully ready to process the messages. Send | |
168 | + * AIF to firmware so that if there are any unprocessed events they | |
169 | + * can be processed now. | |
170 | + */ | |
171 | + if (aac_drivers[index].quirks & AAC_QUIRK_SRC) | |
172 | + aac_intr_normal(aac, 0, 2, 0, NULL); | |
173 | + | |
174 | +} | |
175 | + | |
176 | static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |
177 | { | |
178 | unsigned index = id->driver_data; | |
179 | @@ -1690,6 +1703,8 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |
180 | mutex_init(&aac->scan_mutex); | |
181 | ||
182 | INIT_DELAYED_WORK(&aac->safw_rescan_work, aac_safw_rescan_worker); | |
183 | + INIT_DELAYED_WORK(&aac->src_reinit_aif_worker, | |
184 | + aac_src_reinit_aif_worker); | |
185 | /* | |
186 | * Map in the registers from the adapter. | |
187 | */ | |
188 | @@ -1880,7 +1895,7 @@ static int aac_suspend(struct pci_dev *pdev, pm_message_t state) | |
189 | struct aac_dev *aac = (struct aac_dev *)shost->hostdata; | |
190 | ||
191 | scsi_block_requests(shost); | |
192 | - aac_cancel_safw_rescan_worker(aac); | |
193 | + aac_cancel_rescan_worker(aac); | |
194 | aac_send_shutdown(aac); | |
195 | ||
196 | aac_release_resources(aac); | |
197 | @@ -1939,7 +1954,7 @@ static void aac_remove_one(struct pci_dev *pdev) | |
198 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | |
199 | struct aac_dev *aac = (struct aac_dev *)shost->hostdata; | |
200 | ||
201 | - aac_cancel_safw_rescan_worker(aac); | |
202 | + aac_cancel_rescan_worker(aac); | |
203 | scsi_remove_host(shost); | |
204 | ||
205 | __aac_shutdown(aac); | |
206 | @@ -1997,7 +2012,7 @@ static pci_ers_result_t aac_pci_error_detected(struct pci_dev *pdev, | |
207 | aac->handle_pci_error = 1; | |
208 | ||
209 | scsi_block_requests(aac->scsi_host_ptr); | |
210 | - aac_cancel_safw_rescan_worker(aac); | |
211 | + aac_cancel_rescan_worker(aac); | |
212 | aac_flush_ios(aac); | |
213 | aac_release_resources(aac); | |
214 | ||
215 | ||
216 | commit 572ee53a9badf62f3973d66f6475f9ce69720a25 | |
217 | Author: Balsundar P <balsundar.p@microsemi.com> | |
218 | Date: Tue Oct 15 11:52:02 2019 +0530 | |
219 | ||
220 | scsi: aacraid: check adapter health | |
221 | ||
222 | Currently driver waits for the command IOCTL from the firmware and if the | |
223 | firmware enters nonresponsive state, the driver doesn't respond till the | |
224 | firmware is responsive again. | |
225 | ||
226 | Check that firmware is alive, otherwise return -EBUSY. | |
227 | ||
228 | [mkp: clarified commit desc] | |
229 | ||
230 | Link: https://lore.kernel.org/r/1571120524-6037-6-git-send-email-balsundar.p@microsemi.com | |
231 | Signed-off-by: Balsundar P <balsundar.p@microsemi.com> | |
232 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
233 | ||
234 | diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c | |
235 | index 40f78509ca94..55a55c56fea9 100644 | |
236 | --- a/drivers/scsi/aacraid/linit.c | |
237 | +++ b/drivers/scsi/aacraid/linit.c | |
238 | @@ -612,9 +612,13 @@ static struct device_attribute *aac_dev_attrs[] = { | |
239 | static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd, | |
240 | void __user *arg) | |
241 | { | |
242 | + int retval; | |
243 | struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; | |
244 | if (!capable(CAP_SYS_RAWIO)) | |
245 | return -EPERM; | |
246 | + retval = aac_adapter_check_health(dev); | |
247 | + if (retval) | |
248 | + return -EBUSY; | |
249 | return aac_do_ioctl(dev, cmd, arg); | |
250 | } | |
251 | ||
252 | ||
253 | commit e2fd90dd2ed87bdcfdfb640f06da48fd23efa080 | |
254 | Author: Balsundar P <balsundar.p@microsemi.com> | |
255 | Date: Tue Oct 15 11:52:01 2019 +0530 | |
256 | ||
257 | scsi: aacraid: setting different timeout for src and thor | |
258 | ||
259 | Set 180 second timeout for thor and 60 seconds for src controllers. | |
260 | ||
261 | Link: https://lore.kernel.org/r/1571120524-6037-5-git-send-email-balsundar.p@microsemi.com | |
262 | Signed-off-by: Balsundar P <balsundar.p@microsemi.com> | |
263 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
264 | ||
265 | diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c | |
266 | index 2388143d59f5..e36608ce937a 100644 | |
267 | --- a/drivers/scsi/aacraid/aachba.c | |
268 | +++ b/drivers/scsi/aacraid/aachba.c | |
269 | @@ -1477,6 +1477,7 @@ static struct aac_srb * aac_scsi_common(struct fib * fib, struct scsi_cmnd * cmd | |
270 | struct aac_srb * srbcmd; | |
271 | u32 flag; | |
272 | u32 timeout; | |
273 | + struct aac_dev *dev = fib->dev; | |
274 | ||
275 | aac_fib_init(fib); | |
276 | switch(cmd->sc_data_direction){ | |
277 | @@ -1503,7 +1504,7 @@ static struct aac_srb * aac_scsi_common(struct fib * fib, struct scsi_cmnd * cmd | |
278 | srbcmd->flags = cpu_to_le32(flag); | |
279 | timeout = cmd->request->timeout/HZ; | |
280 | if (timeout == 0) | |
281 | - timeout = 1; | |
282 | + timeout = (dev->sa_firmware ? AAC_SA_TIMEOUT : AAC_ARC_TIMEOUT); | |
283 | srbcmd->timeout = cpu_to_le32(timeout); // timeout in seconds | |
284 | srbcmd->retry_limit = 0; /* Obsolete parameter */ | |
285 | srbcmd->cdb_size = cpu_to_le32(cmd->cmd_len); | |
286 | diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h | |
287 | index 3fdd4583cbb5..f76a33cb0259 100644 | |
288 | --- a/drivers/scsi/aacraid/aacraid.h | |
289 | +++ b/drivers/scsi/aacraid/aacraid.h | |
290 | @@ -108,6 +108,8 @@ enum { | |
291 | #define AAC_BUS_TARGET_LOOP (AAC_MAX_BUSES * AAC_MAX_TARGETS) | |
292 | #define AAC_MAX_NATIVE_SIZE 2048 | |
293 | #define FW_ERROR_BUFFER_SIZE 512 | |
294 | +#define AAC_SA_TIMEOUT 180 | |
295 | +#define AAC_ARC_TIMEOUT 60 | |
296 | ||
297 | #define get_bus_number(x) (x/AAC_MAX_TARGETS) | |
298 | #define get_target_number(x) (x%AAC_MAX_TARGETS) | |
299 | diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c | |
300 | index 4a858789e6c5..40f78509ca94 100644 | |
301 | --- a/drivers/scsi/aacraid/linit.c | |
302 | +++ b/drivers/scsi/aacraid/linit.c | |
303 | @@ -391,6 +391,7 @@ static int aac_slave_configure(struct scsi_device *sdev) | |
304 | int chn, tid; | |
305 | unsigned int depth = 0; | |
306 | unsigned int set_timeout = 0; | |
307 | + int timeout = 0; | |
308 | bool set_qd_dev_type = false; | |
309 | u8 devtype = 0; | |
310 | ||
311 | @@ -483,10 +484,13 @@ static int aac_slave_configure(struct scsi_device *sdev) | |
312 | ||
313 | /* | |
314 | * Firmware has an individual device recovery time typically | |
315 | - * of 35 seconds, give us a margin. | |
316 | + * of 35 seconds, give us a margin. Thor devices can take longer in | |
317 | + * error recovery, hence different value. | |
318 | */ | |
319 | - if (set_timeout && sdev->request_queue->rq_timeout < (45 * HZ)) | |
320 | - blk_queue_rq_timeout(sdev->request_queue, 45*HZ); | |
321 | + if (set_timeout) { | |
322 | + timeout = aac->sa_firmware ? AAC_SA_TIMEOUT : AAC_ARC_TIMEOUT; | |
323 | + blk_queue_rq_timeout(sdev->request_queue, timeout * HZ); | |
324 | + } | |
325 | ||
326 | if (depth > 256) | |
327 | depth = 256; | |
328 | ||
329 | commit c02a3342bad32baa9be201da39d3809b74f92239 | |
330 | Author: Balsundar P <balsundar.p@microsemi.com> | |
331 | Date: Tue Oct 15 11:52:00 2019 +0530 | |
332 | ||
333 | scsi: aacraid: fixed firmware assert issue | |
334 | ||
335 | Before issuing IOP reset, INTX mode is selected. This is triggering MSGU | |
336 | lockup and ended in basecode assert. Use DROP_IO command when IOP reset is | |
337 | sent in preparation for interrupt mode switch. | |
338 | ||
339 | Link: https://lore.kernel.org/r/1571120524-6037-4-git-send-email-balsundar.p@microsemi.com | |
340 | Signed-off-by: Balsundar P <balsundar.p@microsemi.com> | |
341 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
342 | ||
343 | diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h | |
344 | index 3fa03230f6ba..3fdd4583cbb5 100644 | |
345 | --- a/drivers/scsi/aacraid/aacraid.h | |
346 | +++ b/drivers/scsi/aacraid/aacraid.h | |
347 | @@ -1673,6 +1673,7 @@ struct aac_dev | |
348 | u8 adapter_shutdown; | |
349 | u32 handle_pci_error; | |
350 | bool init_reset; | |
351 | + u8 soft_reset_support; | |
352 | }; | |
353 | ||
354 | #define aac_adapter_interrupt(dev) \ | |
355 | diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c | |
356 | index d4fcfa1e54e0..f75878d773cf 100644 | |
357 | --- a/drivers/scsi/aacraid/comminit.c | |
358 | +++ b/drivers/scsi/aacraid/comminit.c | |
359 | @@ -571,6 +571,11 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) | |
360 | else | |
361 | dev->sa_firmware = 0; | |
362 | ||
363 | + if (status[4] & le32_to_cpu(AAC_EXTOPT_SOFT_RESET)) | |
364 | + dev->soft_reset_support = 1; | |
365 | + else | |
366 | + dev->soft_reset_support = 0; | |
367 | + | |
368 | if ((dev->comm_interface == AAC_COMM_MESSAGE) && | |
369 | (status[2] > dev->base_size)) { | |
370 | aac_adapter_ioremap(dev, 0); | |
371 | diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c | |
372 | index 3b66e06726c8..787ec9baebb0 100644 | |
373 | --- a/drivers/scsi/aacraid/src.c | |
374 | +++ b/drivers/scsi/aacraid/src.c | |
375 | @@ -733,10 +733,20 @@ static bool aac_is_ctrl_up_and_running(struct aac_dev *dev) | |
376 | return ctrl_up; | |
377 | } | |
378 | ||
379 | +static void aac_src_drop_io(struct aac_dev *dev) | |
380 | +{ | |
381 | + if (!dev->soft_reset_support) | |
382 | + return; | |
383 | + | |
384 | + aac_adapter_sync_cmd(dev, DROP_IO, | |
385 | + 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL); | |
386 | +} | |
387 | + | |
388 | static void aac_notify_fw_of_iop_reset(struct aac_dev *dev) | |
389 | { | |
390 | aac_adapter_sync_cmd(dev, IOP_RESET_ALWAYS, 0, 0, 0, 0, 0, 0, NULL, | |
391 | NULL, NULL, NULL, NULL); | |
392 | + aac_src_drop_io(dev); | |
393 | } | |
394 | ||
395 | static void aac_send_iop_reset(struct aac_dev *dev) | |
396 | ||
397 | commit f2244c1b35e5302070af4c729db0b0e9eb8350c9 | |
398 | Author: Balsundar P <balsundar.p@microsemi.com> | |
399 | Date: Tue Oct 15 11:51:59 2019 +0530 | |
400 | ||
401 | scsi: aacraid: fixed IO reporting error | |
402 | ||
403 | The problem is the driver detects FastResponse bit set and saves it to | |
404 | Fib's flags to not check IO response status, but it never clears it for | |
405 | next IO. Hence the next IO will pick up FastResponse bit to not check | |
406 | the IO response status and fail to report any type IO error to kernel | |
407 | ||
408 | Link: https://lore.kernel.org/r/1571120524-6037-3-git-send-email-balsundar.p@microsemi.com | |
409 | Signed-off-by: Balsundar P <balsundar.p@microsemi.com> | |
410 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
411 | ||
412 | diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c | |
413 | index 2142a649e865..3f268f669cc3 100644 | |
414 | --- a/drivers/scsi/aacraid/commsup.c | |
415 | +++ b/drivers/scsi/aacraid/commsup.c | |
416 | @@ -232,6 +232,7 @@ struct fib *aac_fib_alloc_tag(struct aac_dev *dev, struct scsi_cmnd *scmd) | |
417 | fibptr->type = FSAFS_NTC_FIB_CONTEXT; | |
418 | fibptr->callback_data = NULL; | |
419 | fibptr->callback = NULL; | |
420 | + fibptr->flags = 0; | |
421 | ||
422 | return fibptr; | |
423 | } | |
424 | ||
62def0fc AM |
425 | ; https://lkml.org/lkml/2019/7/10/244 |
426 | diff -ur linux-5.3/drivers/scsi/aacraid.org/aacraid.h linux-5.3/drivers/scsi/aacraid/aacraid.h | |
427 | --- linux-5.3/drivers/scsi/aacraid.org/aacraid.h 2019-11-01 22:42:37.011469816 +0100 | |
428 | +++ linux-5.3/drivers/scsi/aacraid/aacraid.h 2019-11-04 09:29:51.321486211 +0100 | |
429 | @@ -2740,17 +2740,6 @@ | |
430 | int aac_rx_deliver_producer(struct fib * fib); | |
431 | void aac_reinit_aif(struct aac_dev *aac, unsigned int index); | |
432 | ||
433 | -static inline int aac_is_src(struct aac_dev *dev) | |
434 | -{ | |
435 | - u16 device = dev->pdev->device; | |
436 | - | |
437 | - if (device == PMC_DEVICE_S6 || | |
438 | - device == PMC_DEVICE_S7 || | |
439 | - device == PMC_DEVICE_S8) | |
440 | - return 1; | |
441 | - return 0; | |
442 | -} | |
443 | - | |
444 | static inline int aac_supports_2T(struct aac_dev *dev) | |
445 | { | |
446 | return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64); | |
447 | diff -ur linux-5.3/drivers/scsi/aacraid.org/comminit.c linux-5.3/drivers/scsi/aacraid/comminit.c | |
448 | --- linux-5.3/drivers/scsi/aacraid.org/comminit.c 2019-11-01 22:42:37.014803249 +0100 | |
449 | +++ linux-5.3/drivers/scsi/aacraid/comminit.c 2019-11-04 09:29:51.321486211 +0100 | |
450 | @@ -41,8 +41,11 @@ | |
451 | { | |
452 | u32 status = 0; | |
453 | ||
454 | - if (aac_is_src(dev)) | |
455 | + if (dev->pdev->device == PMC_DEVICE_S6 || | |
456 | + dev->pdev->device == PMC_DEVICE_S7 || | |
457 | + dev->pdev->device == PMC_DEVICE_S8) { | |
458 | status = src_readl(dev, MUnit.OMR); | |
459 | + } | |
460 | return (status & AAC_INT_MODE_MSIX); | |
461 | } | |
462 | ||
463 | @@ -349,7 +352,8 @@ | |
464 | /* FIB should be freed only after getting the response from the F/W */ | |
465 | if (status != -ERESTARTSYS) | |
466 | aac_fib_free(fibctx); | |
467 | - if (aac_is_src(dev) && | |
468 | + if ((dev->pdev->device == PMC_DEVICE_S7 || | |
469 | + dev->pdev->device == PMC_DEVICE_S8) && | |
470 | dev->msi_enabled) | |
471 | aac_set_intx_mode(dev); | |
472 | return status; | |
473 | @@ -610,7 +614,8 @@ | |
474 | dev->max_fib_size = status[1] & 0xFFE0; | |
475 | host->sg_tablesize = status[2] >> 16; | |
476 | dev->sg_tablesize = status[2] & 0xFFFF; | |
477 | - if (aac_is_src(dev)) { | |
478 | + if (dev->pdev->device == PMC_DEVICE_S7 || | |
479 | + dev->pdev->device == PMC_DEVICE_S8) { | |
480 | if (host->can_queue > (status[3] >> 16) - | |
481 | AAC_NUM_MGT_FIB) | |
482 | host->can_queue = (status[3] >> 16) - | |
483 | @@ -629,7 +634,9 @@ | |
484 | pr_warn("numacb=%d ignored\n", numacb); | |
485 | } | |
486 | ||
487 | - if (aac_is_src(dev)) | |
488 | + if (dev->pdev->device == PMC_DEVICE_S6 || | |
489 | + dev->pdev->device == PMC_DEVICE_S7 || | |
490 | + dev->pdev->device == PMC_DEVICE_S8) | |
491 | aac_define_int_mode(dev); | |
492 | /* | |
493 | * Ok now init the communication subsystem | |
494 | diff -ur linux-5.3/drivers/scsi/aacraid.org/commsup.c linux-5.3/drivers/scsi/aacraid/commsup.c | |
495 | --- linux-5.3/drivers/scsi/aacraid.org/commsup.c 2019-11-01 22:42:37.014803249 +0100 | |
496 | +++ linux-5.3/drivers/scsi/aacraid/commsup.c 2019-11-04 09:29:51.321486211 +0100 | |
497 | @@ -2593,7 +2593,9 @@ | |
498 | { | |
499 | int i; | |
500 | ||
501 | - if (aac_is_src(dev)) { | |
502 | + if (dev->pdev->device == PMC_DEVICE_S6 || | |
503 | + dev->pdev->device == PMC_DEVICE_S7 || | |
504 | + dev->pdev->device == PMC_DEVICE_S8) { | |
505 | if (dev->max_msix > 1) { | |
506 | for (i = 0; i < dev->max_msix; i++) | |
507 | free_irq(pci_irq_vector(dev->pdev, i), | |
508 | diff -ur linux-5.3/drivers/scsi/aacraid.org/linit.c linux-5.3/drivers/scsi/aacraid/linit.c | |
509 | --- linux-5.3/drivers/scsi/aacraid.org/linit.c 2019-11-01 22:42:37.011469816 +0100 | |
510 | +++ linux-5.3/drivers/scsi/aacraid/linit.c 2019-11-04 09:29:51.321486211 +0100 | |
511 | @@ -1567,8 +1567,9 @@ | |
512 | aac_send_shutdown(aac); | |
513 | ||
514 | aac_adapter_disable_int(aac); | |
515 | - | |
516 | - if (aac_is_src(aac)) { | |
517 | + if (aac->pdev->device == PMC_DEVICE_S6 || | |
518 | + aac->pdev->device == PMC_DEVICE_S7 || | |
519 | + aac->pdev->device == PMC_DEVICE_S8) { | |
520 | if (aac->max_msix > 1) { | |
521 | for (i = 0; i < aac->max_msix; i++) { | |
522 | free_irq(pci_irq_vector(aac->pdev, i), | |
523 | @@ -1858,7 +1859,8 @@ | |
524 | aac_adapter_enable_int(dev); | |
525 | ||
526 | ||
527 | - if (aac_is_src(dev)) | |
528 | + if (dev->pdev->device == PMC_DEVICE_S7 || | |
529 | + dev->pdev->device == PMC_DEVICE_S8) | |
530 | aac_define_int_mode(dev); | |
531 | ||
532 | if (dev->msi_enabled) |