.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Adaptec AAC series RAID controller driver |
---|
3 | 4 | * (c) Copyright 2001 Red Hat Inc. |
---|
.. | .. |
---|
9 | 10 | * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) |
---|
10 | 11 | * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) |
---|
11 | 12 | * |
---|
12 | | - * This program is free software; you can redistribute it and/or modify |
---|
13 | | - * it under the terms of the GNU General Public License as published by |
---|
14 | | - * the Free Software Foundation; either version 2, or (at your option) |
---|
15 | | - * any later version. |
---|
16 | | - * |
---|
17 | | - * This program is distributed in the hope that it will be useful, |
---|
18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
20 | | - * GNU General Public License for more details. |
---|
21 | | - * |
---|
22 | | - * You should have received a copy of the GNU General Public License |
---|
23 | | - * along with this program; see the file COPYING. If not, write to |
---|
24 | | - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
25 | | - * |
---|
26 | 13 | * Module Name: |
---|
27 | 14 | * src.c |
---|
28 | 15 | * |
---|
29 | 16 | * Abstract: Hardware Device Interface for PMC SRC based controllers |
---|
30 | | - * |
---|
31 | 17 | */ |
---|
32 | 18 | |
---|
33 | 19 | #include <linux/kernel.h> |
---|
.. | .. |
---|
106 | 92 | spin_lock_irqsave(&dev->sync_fib->event_lock, sflags); |
---|
107 | 93 | if (dev->sync_fib->flags & FIB_CONTEXT_FLAG_WAIT) { |
---|
108 | 94 | dev->management_fib_count--; |
---|
109 | | - up(&dev->sync_fib->event_wait); |
---|
| 95 | + complete(&dev->sync_fib->event_wait); |
---|
110 | 96 | } |
---|
111 | 97 | spin_unlock_irqrestore(&dev->sync_fib->event_lock, |
---|
112 | 98 | sflags); |
---|
.. | .. |
---|
205 | 191 | * @dev: Adapter |
---|
206 | 192 | * @command: Command to execute |
---|
207 | 193 | * @p1: first parameter |
---|
208 | | - * @ret: adapter status |
---|
| 194 | + * @p2: second parameter |
---|
| 195 | + * @p3: third parameter |
---|
| 196 | + * @p4: forth parameter |
---|
| 197 | + * @p5: fifth parameter |
---|
| 198 | + * @p6: sixth parameter |
---|
| 199 | + * @status: adapter status |
---|
| 200 | + * @r1: first return value |
---|
| 201 | + * @r2: second return valu |
---|
| 202 | + * @r3: third return value |
---|
| 203 | + * @r4: forth return value |
---|
209 | 204 | * |
---|
210 | 205 | * This routine will send a synchronous command to the adapter and wait |
---|
211 | 206 | * for its completion. |
---|
.. | .. |
---|
616 | 611 | |
---|
617 | 612 | /** |
---|
618 | 613 | * aac_src_ioremap |
---|
| 614 | + * @dev: device ioremap |
---|
619 | 615 | * @size: mapping resize request |
---|
620 | 616 | * |
---|
621 | 617 | */ |
---|
.. | .. |
---|
646 | 642 | |
---|
647 | 643 | /** |
---|
648 | 644 | * aac_srcv_ioremap |
---|
| 645 | + * @dev: device ioremap |
---|
649 | 646 | * @size: mapping resize request |
---|
650 | 647 | * |
---|
651 | 648 | */ |
---|
.. | .. |
---|
747 | 744 | return ctrl_up; |
---|
748 | 745 | } |
---|
749 | 746 | |
---|
| 747 | +static void aac_src_drop_io(struct aac_dev *dev) |
---|
| 748 | +{ |
---|
| 749 | + if (!dev->soft_reset_support) |
---|
| 750 | + return; |
---|
| 751 | + |
---|
| 752 | + aac_adapter_sync_cmd(dev, DROP_IO, |
---|
| 753 | + 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL); |
---|
| 754 | +} |
---|
| 755 | + |
---|
750 | 756 | static void aac_notify_fw_of_iop_reset(struct aac_dev *dev) |
---|
751 | 757 | { |
---|
752 | 758 | aac_adapter_sync_cmd(dev, IOP_RESET_ALWAYS, 0, 0, 0, 0, 0, 0, NULL, |
---|
753 | 759 | NULL, NULL, NULL, NULL); |
---|
| 760 | + aac_src_drop_io(dev); |
---|
754 | 761 | } |
---|
755 | 762 | |
---|
756 | 763 | static void aac_send_iop_reset(struct aac_dev *dev) |
---|
.. | .. |
---|
1157 | 1164 | dev_err(&dev->pdev->dev, "%s: %s status = %d", __func__, |
---|
1158 | 1165 | state_str[state], rc); |
---|
1159 | 1166 | |
---|
1160 | | -return rc; |
---|
| 1167 | + return rc; |
---|
1161 | 1168 | } |
---|
1162 | 1169 | /** |
---|
1163 | 1170 | * aac_srcv_init - initialize an SRCv card |
---|