forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/scsi/advansys.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters
34 *
....@@ -6,11 +7,6 @@
67 * Copyright (c) 2007 Matthew Wilcox <matthew@wil.cx>
78 * Copyright (c) 2014 Hannes Reinecke <hare@suse.de>
89 * All Rights Reserved.
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (at your option) any later version.
1410 */
1511
1612 /*
....@@ -320,7 +316,7 @@
320316 ushort queue_cnt;
321317 ushort entry_to_copy;
322318 ushort res;
323
- ASC_SG_LIST sg_list[0];
319
+ ASC_SG_LIST sg_list[];
324320 } ASC_SG_HEAD;
325321
326322 typedef struct asc_scsi_q {
....@@ -3192,8 +3188,8 @@
31923188 shost->sg_tablesize, shost->cmd_per_lun);
31933189
31943190 seq_printf(m,
3195
- " unchecked_isa_dma %d, use_clustering %d\n",
3196
- shost->unchecked_isa_dma, shost->use_clustering);
3191
+ " unchecked_isa_dma %d\n",
3192
+ shost->unchecked_isa_dma);
31973193
31983194 seq_printf(m,
31993195 " flags 0x%x, last_reset 0x%lx, jiffies 0x%lx, asc_n_io_port 0x%x\n",
....@@ -5949,7 +5945,6 @@
59495945 static void adv_isr_callback(ADV_DVC_VAR *adv_dvc_varp, ADV_SCSI_REQ_Q *scsiqp)
59505946 {
59515947 struct asc_board *boardp = adv_dvc_varp->drv_ptr;
5952
- u32 srb_tag;
59535948 adv_req_t *reqp;
59545949 adv_sgblk_t *sgblkp;
59555950 struct scsi_cmnd *scp;
....@@ -5965,7 +5960,6 @@
59655960 * completed. The adv_req_t structure actually contains the
59665961 * completed ADV_SCSI_REQ_Q structure.
59675962 */
5968
- srb_tag = le32_to_cpu(scsiqp->srb_tag);
59695963 scp = scsi_host_find_tag(boardp->shost, scsiqp->srb_tag);
59705964
59715965 ASC_DBG(1, "scp 0x%p\n", scp);
....@@ -6448,7 +6442,7 @@
64486442 sdtr_data =
64496443 AscCalSDTRData(asc_dvc, ext_msg.xfer_period,
64506444 ext_msg.req_ack_offset);
6451
- if ((sdtr_data == 0xFF)) {
6445
+ if (sdtr_data == 0xFF) {
64526446
64536447 q_cntl |= QC_MSG_OUT;
64546448 asc_dvc->init_sdtr &= ~target_id;
....@@ -7716,7 +7710,7 @@
77167710 sg_block->sg_ptr = 0L; /* Last ADV_SG_BLOCK in list. */
77177711 return ADV_SUCCESS;
77187712 }
7719
- slp++;
7713
+ slp = sg_next(slp);
77207714 }
77217715 sg_block->sg_cnt = NO_OF_SG_PER_BLOCK;
77227716 prev_sg_block = sg_block;
....@@ -10810,14 +10804,6 @@
1081010804 * for non-ISA adapters.
1081110805 */
1081210806 .unchecked_isa_dma = true,
10813
- /*
10814
- * All adapters controlled by this driver are capable of large
10815
- * scatter-gather lists. According to the mid-level SCSI documentation
10816
- * this obviates any performance gain provided by setting
10817
- * 'use_clustering'. But empirically while CPU utilization is increased
10818
- * by enabling clustering, I/O throughput increases as well.
10819
- */
10820
- .use_clustering = ENABLE_CLUSTERING,
1082110807 };
1082210808
1082310809 static int advansys_wide_init_chip(struct Scsi_Host *shost)