|
13 | 13 | * allocated buffer into it.
|
14 | 14 | */
|
15 | 15 | /*
|
16 |
| - * Copyright: (c) 2018 Broadcom. All Rights Reserved. "Broadcom" refers to |
| 16 | + * Copyright: (c) 2018 Broadcom. All Rights Reserved. "Broadcom" refers to |
17 | 17 | * Broadcom Limited and/or its subsidiaries.
|
18 |
| - * |
| 18 | + * |
19 | 19 | * Broadcom Switch Software License
|
20 |
| - * |
21 |
| - * This license governs the use of the accompanying Broadcom software. Your |
22 |
| - * use of the software indicates your acceptance of the terms and conditions |
23 |
| - * of this license. If you do not agree to the terms and conditions of this |
| 20 | + * |
| 21 | + * This license governs the use of the accompanying Broadcom software. Your |
| 22 | + * use of the software indicates your acceptance of the terms and conditions |
| 23 | + * of this license. If you do not agree to the terms and conditions of this |
24 | 24 | * license, do not use the software.
|
25 | 25 | * 1. Definitions
|
26 | 26 | * "Licensor" means any person or entity that distributes its Work.
|
27 |
| - * "Software" means the original work of authorship made available under |
| 27 | + * "Software" means the original work of authorship made available under |
28 | 28 | * this license.
|
29 |
| - * "Work" means the Software and any additions to or derivative works of |
| 29 | + * "Work" means the Software and any additions to or derivative works of |
30 | 30 | * the Software that are made available under this license.
|
31 |
| - * The terms "reproduce," "reproduction," "derivative works," and |
| 31 | + * The terms "reproduce," "reproduction," "derivative works," and |
32 | 32 | * "distribution" have the meaning as provided under U.S. copyright law.
|
33 |
| - * Works, including the Software, are "made available" under this license |
34 |
| - * by including in or with the Work either (a) a copyright notice |
35 |
| - * referencing the applicability of this license to the Work, or (b) a copy |
| 33 | + * Works, including the Software, are "made available" under this license |
| 34 | + * by including in or with the Work either (a) a copyright notice |
| 35 | + * referencing the applicability of this license to the Work, or (b) a copy |
36 | 36 | * of this license.
|
37 | 37 | * 2. Grant of Copyright License
|
38 |
| - * Subject to the terms and conditions of this license, each Licensor |
39 |
| - * grants to you a perpetual, worldwide, non-exclusive, and royalty-free |
40 |
| - * copyright license to reproduce, prepare derivative works of, publicly |
41 |
| - * display, publicly perform, sublicense and distribute its Work and any |
| 38 | + * Subject to the terms and conditions of this license, each Licensor |
| 39 | + * grants to you a perpetual, worldwide, non-exclusive, and royalty-free |
| 40 | + * copyright license to reproduce, prepare derivative works of, publicly |
| 41 | + * display, publicly perform, sublicense and distribute its Work and any |
42 | 42 | * resulting derivative works in any form.
|
43 | 43 | * 3. Grant of Patent License
|
44 |
| - * Subject to the terms and conditions of this license, each Licensor |
45 |
| - * grants to you a perpetual, worldwide, non-exclusive, and royalty-free |
46 |
| - * patent license to make, have made, use, offer to sell, sell, import, and |
47 |
| - * otherwise transfer its Work, in whole or in part. This patent license |
48 |
| - * applies only to the patent claims licensable by Licensor that would be |
49 |
| - * infringed by Licensor's Work (or portion thereof) individually and |
| 44 | + * Subject to the terms and conditions of this license, each Licensor |
| 45 | + * grants to you a perpetual, worldwide, non-exclusive, and royalty-free |
| 46 | + * patent license to make, have made, use, offer to sell, sell, import, and |
| 47 | + * otherwise transfer its Work, in whole or in part. This patent license |
| 48 | + * applies only to the patent claims licensable by Licensor that would be |
| 49 | + * infringed by Licensor's Work (or portion thereof) individually and |
50 | 50 | * excluding any combinations with any other materials or technology.
|
51 |
| - * If you institute patent litigation against any Licensor (including a |
52 |
| - * cross-claim or counterclaim in a lawsuit) to enforce any patents that |
53 |
| - * you allege are infringed by any Work, then your patent license from such |
54 |
| - * Licensor to the Work shall terminate as of the date such litigation is |
| 51 | + * If you institute patent litigation against any Licensor (including a |
| 52 | + * cross-claim or counterclaim in a lawsuit) to enforce any patents that |
| 53 | + * you allege are infringed by any Work, then your patent license from such |
| 54 | + * Licensor to the Work shall terminate as of the date such litigation is |
55 | 55 | * filed.
|
56 | 56 | * 4. Redistribution
|
57 |
| - * You may reproduce or distribute the Work only if (a) you do so under |
58 |
| - * this License, (b) you include a complete copy of this License with your |
59 |
| - * distribution, and (c) you retain without modification any copyright, |
| 57 | + * You may reproduce or distribute the Work only if (a) you do so under |
| 58 | + * this License, (b) you include a complete copy of this License with your |
| 59 | + * distribution, and (c) you retain without modification any copyright, |
60 | 60 | * patent, trademark, or attribution notices that are present in the Work.
|
61 | 61 | * 5. Derivative Works
|
62 |
| - * You may specify that additional or different terms apply to the use, |
63 |
| - * reproduction, and distribution of your derivative works of the Work |
64 |
| - * ("Your Terms") only if (a) Your Terms provide that the limitations of |
65 |
| - * Section 7 apply to your derivative works, and (b) you identify the |
66 |
| - * specific derivative works that are subject to Your Terms. |
67 |
| - * Notwithstanding Your Terms, this license (including the redistribution |
| 62 | + * You may specify that additional or different terms apply to the use, |
| 63 | + * reproduction, and distribution of your derivative works of the Work |
| 64 | + * ("Your Terms") only if (a) Your Terms provide that the limitations of |
| 65 | + * Section 7 apply to your derivative works, and (b) you identify the |
| 66 | + * specific derivative works that are subject to Your Terms. |
| 67 | + * Notwithstanding Your Terms, this license (including the redistribution |
68 | 68 | * requirements in Section 4) will continue to apply to the Work itself.
|
69 | 69 | * 6. Trademarks
|
70 |
| - * This license does not grant any rights to use any Licensor's or its |
71 |
| - * affiliates' names, logos, or trademarks, except as necessary to |
| 70 | + * This license does not grant any rights to use any Licensor's or its |
| 71 | + * affiliates' names, logos, or trademarks, except as necessary to |
72 | 72 | * reproduce the notices described in this license.
|
73 | 73 | * 7. Limitations
|
74 |
| - * Platform. The Work and any derivative works thereof may only be used, or |
| 74 | + * Platform. The Work and any derivative works thereof may only be used, or |
75 | 75 | * intended for use, with a Broadcom switch integrated circuit.
|
76 |
| - * No Reverse Engineering. You will not use the Work to disassemble, |
77 |
| - * reverse engineer, decompile, or attempt to ascertain the underlying |
| 76 | + * No Reverse Engineering. You will not use the Work to disassemble, |
| 77 | + * reverse engineer, decompile, or attempt to ascertain the underlying |
78 | 78 | * technology of a Broadcom switch integrated circuit.
|
79 | 79 | * 8. Termination
|
80 |
| - * If you violate any term of this license, then your rights under this |
81 |
| - * license (including the license grants of Sections 2 and 3) will |
| 80 | + * If you violate any term of this license, then your rights under this |
| 81 | + * license (including the license grants of Sections 2 and 3) will |
82 | 82 | * terminate immediately.
|
83 | 83 | * 9. Disclaimer of Warranty
|
84 |
| - * THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY |
85 |
| - * KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF |
86 |
| - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR |
87 |
| - * NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER |
88 |
| - * THIS LICENSE. SOME STATES' CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN |
| 84 | + * THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 85 | + * KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF |
| 86 | + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR |
| 87 | + * NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER |
| 88 | + * THIS LICENSE. SOME STATES' CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN |
89 | 89 | * IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
90 | 90 | * 10. Limitation of Liability
|
91 |
| - * EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL |
92 |
| - * THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE |
93 |
| - * SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, |
94 |
| - * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF |
95 |
| - * OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK |
96 |
| - * (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, |
97 |
| - * LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER |
98 |
| - * COMMERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF |
| 91 | + * EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL |
| 92 | + * THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE |
| 93 | + * SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, |
| 94 | + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF |
| 95 | + * OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK |
| 96 | + * (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, |
| 97 | + * LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER |
| 98 | + * COMMERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF |
99 | 99 | * THE POSSIBILITY OF SUCH DAMAGES.
|
100 | 100 | */
|
101 | 101 |
|
@@ -284,6 +284,7 @@ bcmpkt_bpool_destroy(int unit)
|
284 | 284 | } else {
|
285 | 285 | bcmdrd_hal_dma_free(unit, bp->mem_size, bp->mem, bp->dma_addr);
|
286 | 286 | }
|
| 287 | + sal_spinlock_destroy(bp->lock); |
287 | 288 | sal_memset(bp, 0, sizeof(*bp));
|
288 | 289 | exit:
|
289 | 290 | SHR_FUNC_EXIT();
|
|
0 commit comments