forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/scsi/aic94xx/aic94xx_hwi.c
....@@ -1,27 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Aic94xx SAS/SATA driver hardware interface.
34 *
45 * Copyright (C) 2005 Adaptec, Inc. All rights reserved.
56 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
6
- *
7
- * This file is licensed under GPLv2.
8
- *
9
- * This file is part of the aic94xx driver.
10
- *
11
- * The aic94xx driver is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU General Public License as
13
- * published by the Free Software Foundation; version 2 of the
14
- * License.
15
- *
16
- * The aic94xx driver is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
- * General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with the aic94xx driver; if not, write to the Free Software
23
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
- *
257 */
268
279 #include <linux/pci.h>
....@@ -593,7 +575,7 @@
593575
594576 /**
595577 * asd_init_ctxmem -- initialize context memory
596
- * asd_ha: pointer to host adapter structure
578
+ * @asd_ha: pointer to host adapter structure
597579 *
598580 * This function sets the maximum number of SCBs and
599581 * DDBs which can be used by the sequencer. This is normally
....@@ -1057,14 +1039,13 @@
10571039
10581040 if (ascb) {
10591041 ascb->dma_scb.size = sizeof(struct scb);
1060
- ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
1042
+ ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool,
10611043 gfp_flags,
10621044 &ascb->dma_scb.dma_handle);
10631045 if (!ascb->dma_scb.vaddr) {
10641046 kmem_cache_free(asd_ascb_cache, ascb);
10651047 return NULL;
10661048 }
1067
- memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb));
10681049 asd_init_ascb(asd_ha, ascb);
10691050
10701051 spin_lock_irqsave(&seq->tc_index_lock, flags);
....@@ -1165,7 +1146,6 @@
11651146 /**
11661147 * asd_start_timers -- (add and) start timers of SCBs
11671148 * @list: pointer to struct list_head of the scbs
1168
- * @to: timeout in jiffies
11691149 *
11701150 * If an SCB in the @list has no timer function, assign the default
11711151 * one, then start the timer of the SCB. This function is