aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/53c700.c14
-rw-r--r--drivers/scsi/Kconfig1
-rw-r--r--drivers/scsi/a2091.c1
-rw-r--r--drivers/scsi/a3000.c1
-rw-r--r--drivers/scsi/a4000t.c1
-rw-r--r--drivers/scsi/aacraid/Makefile1
-rw-r--r--drivers/scsi/aacraid/aachba.c16
-rw-r--r--drivers/scsi/aacraid/aacraid.h16
-rw-r--r--drivers/scsi/aacraid/commctrl.c16
-rw-r--r--drivers/scsi/aacraid/comminit.c16
-rw-r--r--drivers/scsi/aacraid/commsup.c16
-rw-r--r--drivers/scsi/aacraid/dpcsup.c17
-rw-r--r--drivers/scsi/aacraid/linit.c15
-rw-r--r--drivers/scsi/aacraid/nark.c16
-rw-r--r--drivers/scsi/aacraid/rkt.c16
-rw-r--r--drivers/scsi/aacraid/rx.c16
-rw-r--r--drivers/scsi/aacraid/sa.c16
-rw-r--r--drivers/scsi/aacraid/src.c16
-rw-r--r--drivers/scsi/aha152x.c13
-rw-r--r--drivers/scsi/aha1542.c1
-rw-r--r--drivers/scsi/aic7xxx/Kconfig.aic79xx1
-rw-r--r--drivers/scsi/aic7xxx/Kconfig.aic7xxx1
-rw-r--r--drivers/scsi/am53c974.c1
-rw-r--r--drivers/scsi/arcmsr/Makefile1
-rw-r--r--drivers/scsi/arm/Kconfig1
-rw-r--r--drivers/scsi/arm/arxescsi.c1
-rw-r--r--drivers/scsi/arm/cumana_1.c1
-rw-r--r--drivers/scsi/arm/oak.c1
-rw-r--r--drivers/scsi/atp870u.c1
-rw-r--r--drivers/scsi/be2iscsi/Kconfig1
-rw-r--r--drivers/scsi/be2iscsi/Makefile1
-rw-r--r--drivers/scsi/bnx2fc/Kconfig1
-rw-r--r--drivers/scsi/bnx2fc/Makefile1
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_hwi.c2
-rw-r--r--drivers/scsi/bnx2i/Kconfig1
-rw-r--r--drivers/scsi/bnx2i/Makefile1
-rw-r--r--drivers/scsi/bvme6000_scsi.c1
-rw-r--r--drivers/scsi/ch.c1
-rw-r--r--drivers/scsi/csiostor/Kconfig1
-rw-r--r--drivers/scsi/cxgbi/Kconfig1
-rw-r--r--drivers/scsi/cxgbi/Makefile1
-rw-r--r--drivers/scsi/cxgbi/cxgb3i/Kconfig1
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/Kconfig1
-rw-r--r--drivers/scsi/cxlflash/Kconfig1
-rw-r--r--drivers/scsi/cxlflash/Makefile1
-rw-r--r--drivers/scsi/device_handler/Kconfig1
-rw-r--r--drivers/scsi/device_handler/Makefile1
-rw-r--r--drivers/scsi/device_handler/scsi_dh_emc.c15
-rw-r--r--drivers/scsi/device_handler/scsi_dh_hp_sw.c15
-rw-r--r--drivers/scsi/dmx3191d.c14
-rw-r--r--drivers/scsi/esas2r/Kconfig1
-rw-r--r--drivers/scsi/esas2r/Makefile1
-rw-r--r--drivers/scsi/esp_scsi.c1
-rw-r--r--drivers/scsi/fcoe/Makefile1
-rw-r--r--drivers/scsi/g_NCR5380.c1
-rw-r--r--drivers/scsi/gvp11.c1
-rw-r--r--drivers/scsi/hisi_sas/Kconfig1
-rw-r--r--drivers/scsi/hisi_sas/Makefile1
-rw-r--r--drivers/scsi/hosts.c1
-rw-r--r--drivers/scsi/ibmvscsi/Makefile1
-rw-r--r--drivers/scsi/ibmvscsi_tgt/Makefile1
-rw-r--r--drivers/scsi/imm.c1
-rw-r--r--drivers/scsi/initio.c16
-rw-r--r--drivers/scsi/jazz_esp.c1
-rw-r--r--drivers/scsi/lasi700.c14
-rw-r--r--drivers/scsi/libsas/sas_init.c19
-rw-r--r--drivers/scsi/libsas/sas_internal.h19
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c19
-rw-r--r--drivers/scsi/libsas/sas_task.c1
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c37
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c5
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c84
-rw-r--r--drivers/scsi/lpfc/lpfc_version.h2
-rw-r--r--drivers/scsi/mac53c94.c1
-rw-r--r--drivers/scsi/mac_esp.c1
-rw-r--r--drivers/scsi/mac_scsi.c1
-rw-r--r--drivers/scsi/megaraid/Kconfig.megaraid1
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h14
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c14
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fp.c14
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c14
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.h14
-rw-r--r--drivers/scsi/mesh.c1
-rw-r--r--drivers/scsi/mvme16x_scsi.c1
-rw-r--r--drivers/scsi/myrs.c2
-rw-r--r--drivers/scsi/ncr53c8xx.c14
-rw-r--r--drivers/scsi/ncr53c8xx.h14
-rw-r--r--drivers/scsi/nsp32.c12
-rw-r--r--drivers/scsi/nsp32.h11
-rw-r--r--drivers/scsi/osst.c1
-rw-r--r--drivers/scsi/pcmcia/Kconfig1
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c11
-rw-r--r--drivers/scsi/qedf/Kconfig1
-rw-r--r--drivers/scsi/qedf/Makefile1
-rw-r--r--drivers/scsi/qedi/Kconfig1
-rw-r--r--drivers/scsi/qedi/Makefile1
-rw-r--r--drivers/scsi/qedi/qedi_dbg.c32
-rw-r--r--drivers/scsi/qedi/qedi_iscsi.c4
-rw-r--r--drivers/scsi/qla1280.c11
-rw-r--r--drivers/scsi/qla1280.h11
-rw-r--r--drivers/scsi/qla2xxx/Kconfig1
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c221
-rw-r--r--drivers/scsi/qla4xxx/Kconfig1
-rw-r--r--drivers/scsi/qla4xxx/Makefile1
-rw-r--r--drivers/scsi/qlogicpti.c1
-rw-r--r--drivers/scsi/script_asm.pl15
-rw-r--r--drivers/scsi/scsi.c1
-rw-r--r--drivers/scsi/scsi_debug.c7
-rw-r--r--drivers/scsi/scsi_error.c1
-rw-r--r--drivers/scsi/scsi_ioctl.c1
-rw-r--r--drivers/scsi/scsi_lib.c1
-rw-r--r--drivers/scsi/scsi_pm.c1
-rw-r--r--drivers/scsi/scsi_sysfs.c1
-rw-r--r--drivers/scsi/sd.c4
-rw-r--r--drivers/scsi/sg.c7
-rw-r--r--drivers/scsi/sim710.c15
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c23
-rw-r--r--drivers/scsi/sni_53c710.c14
-rw-r--r--drivers/scsi/sr.c1
-rw-r--r--drivers/scsi/st.c1
-rw-r--r--drivers/scsi/sun3_scsi.c1
-rw-r--r--drivers/scsi/sun3x_esp.c1
-rw-r--r--drivers/scsi/sun_esp.c1
-rw-r--r--drivers/scsi/sym53c8xx_2/Makefile1
-rw-r--r--drivers/scsi/virtio_scsi.c5
-rw-r--r--drivers/scsi/wd33c93.c11
-rw-r--r--drivers/scsi/wd33c93.h12
-rw-r--r--drivers/scsi/wd719x.c1
-rw-r--r--drivers/scsi/zalon.c1
-rw-r--r--drivers/scsi/zorro7xx.c1
130 files changed, 309 insertions, 774 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 16957d7ac414..0068963bb933 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* -*- mode: c; c-basic-offset: 8 -*- */ 2/* -*- mode: c; c-basic-offset: 8 -*- */
2 3
3/* NCR (or Symbios) 53c700 and 53c700-66 Driver 4/* NCR (or Symbios) 53c700 and 53c700-66 Driver
@@ -5,19 +6,6 @@
5 * Copyright (C) 2001 by James.Bottomley@HansenPartnership.com 6 * Copyright (C) 2001 by James.Bottomley@HansenPartnership.com
6**----------------------------------------------------------------------------- 7**-----------------------------------------------------------------------------
7** 8**
8** This program is free software; you can redistribute it and/or modify
9** it under the terms of the GNU General Public License as published by
10** the Free Software Foundation; either version 2 of the License, or
11** (at your option) any later version.
12**
13** This program is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** GNU General Public License for more details.
17**
18** You should have received a copy of the GNU General Public License
19** along with this program; if not, write to the Free Software
20** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21** 9**
22**----------------------------------------------------------------------------- 10**-----------------------------------------------------------------------------
23 */ 11 */
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index d528018e6fa8..61da513fc0ed 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1menu "SCSI device support" 2menu "SCSI device support"
2 3
3config SCSI_MOD 4config SCSI_MOD
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index c96bc7261a42..564b35473672 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1#include <linux/types.h> 2#include <linux/types.h>
2#include <linux/init.h> 3#include <linux/init.h>
3#include <linux/interrupt.h> 4#include <linux/interrupt.h>
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c
index dcf435f312dd..222c77c9621f 100644
--- a/drivers/scsi/a3000.c
+++ b/drivers/scsi/a3000.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1#include <linux/types.h> 2#include <linux/types.h>
2#include <linux/mm.h> 3#include <linux/mm.h>
3#include <linux/ioport.h> 4#include <linux/ioport.h>
diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c
index 66c573093901..5e575afce134 100644
--- a/drivers/scsi/a4000t.c
+++ b/drivers/scsi/a4000t.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux. 3 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
3 * Amiga Technologies A4000T SCSI controller. 4 * Amiga Technologies A4000T SCSI controller.
diff --git a/drivers/scsi/aacraid/Makefile b/drivers/scsi/aacraid/Makefile
index 3893b95b140b..8f0eec682bb6 100644
--- a/drivers/scsi/aacraid/Makefile
+++ b/drivers/scsi/aacraid/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# Adaptec aacraid 2# Adaptec aacraid
2 3
3obj-$(CONFIG_SCSI_AACRAID) := aacraid.o 4obj-$(CONFIG_SCSI_AACRAID) := aacraid.o
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 6085aa087a2f..0ed3f806ace5 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,25 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * aachba.c 14 * aachba.c
28 * 15 *
29 * Abstract: Contains Interfaces to manage IOs. 16 * Abstract: Contains Interfaces to manage IOs.
30 *
31 */ 17 */
32 18
33#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 11fb68d7e60d..3fa03230f6ba 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. <alan@redhat.com> 4 * (c) Copyright 2001 Red Hat Inc. <alan@redhat.com>
@@ -9,25 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * aacraid.h 14 * aacraid.h
28 * 15 *
29 * Abstract: Contains all routines for control of the aacraid driver 16 * Abstract: Contains all routines for control of the aacraid driver
30 *
31 */ 17 */
32 18
33#ifndef _AACRAID_H_ 19#ifndef _AACRAID_H_
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index f0ff40332753..ffe41bc111fc 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,25 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * commctrl.c 14 * commctrl.c
28 * 15 *
29 * Abstract: Contains all routines for control of the AFA comm layer 16 * Abstract: Contains all routines for control of the AFA comm layer
30 *
31 */ 17 */
32 18
33#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index 0dc7b5a4fea2..d4fcfa1e54e0 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,26 +10,11 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * comminit.c 14 * comminit.c
28 * 15 *
29 * Abstract: This supports the initialization of the host adapter commuication interface. 16 * Abstract: This supports the initialization of the host adapter commuication interface.
30 * This is a platform dependent module for the pci cyclone board. 17 * This is a platform dependent module for the pci cyclone board.
31 *
32 */ 18 */
33 19
34#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 78430a7b294c..2142a649e865 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,26 +10,11 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * commsup.c 14 * commsup.c
28 * 15 *
29 * Abstract: Contain all routines that are required for FSA host/adapter 16 * Abstract: Contain all routines that are required for FSA host/adapter
30 * communication. 17 * communication.
31 *
32 */ 18 */
33 19
34#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c
index 40a771dd1c0e..a557aa629827 100644
--- a/drivers/scsi/aacraid/dpcsup.c
+++ b/drivers/scsi/aacraid/dpcsup.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,26 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * dpcsup.c 14 * dpcsup.c
28 * 15 *
29 * Abstract: All DPC processing routines for the cyclone board occur here. 16 * Abstract: All DPC processing routines for the cyclone board occur here.
30 *
31 *
32 */ 17 */
33 18
34#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 8e28a505f7e8..644f7f5c61a2 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,20 +10,6 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * linit.c 14 * linit.c
28 * 15 *
diff --git a/drivers/scsi/aacraid/nark.c b/drivers/scsi/aacraid/nark.c
index c59074e782d6..b5d6b24d6dbd 100644
--- a/drivers/scsi/aacraid/nark.c
+++ b/drivers/scsi/aacraid/nark.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * 4 *
@@ -8,25 +9,10 @@
8 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
9 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com)
10 * 11 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
15 *
16 * This program 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
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; see the file COPYING. If not, write to
23 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * Module Name: 12 * Module Name:
26 * nark.c 13 * nark.c
27 * 14 *
28 * Abstract: Hardware Device Interface for NEMER/ARK 15 * Abstract: Hardware Device Interface for NEMER/ARK
29 *
30 */ 16 */
31 17
32#include <linux/pci.h> 18#include <linux/pci.h>
diff --git a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c
index a1bc5bbf7a34..5f2cede4d477 100644
--- a/drivers/scsi/aacraid/rkt.c
+++ b/drivers/scsi/aacraid/rkt.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,25 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * rkt.c 14 * rkt.c
28 * 15 *
29 * Abstract: Hardware miniport for Drawbridge specific hardware functions. 16 * Abstract: Hardware miniport for Drawbridge specific hardware functions.
30 *
31 */ 17 */
32 18
33#include <linux/blkdev.h> 19#include <linux/blkdev.h>
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index 576cdf9cc120..3dea348bd25d 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,25 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * rx.c 14 * rx.c
28 * 15 *
29 * Abstract: Hardware miniport for Drawbridge specific hardware functions. 16 * Abstract: Hardware miniport for Drawbridge specific hardware functions.
30 *
31 */ 17 */
32 18
33#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c
index efa96c1c6aa3..aa5d7638cade 100644
--- a/drivers/scsi/aacraid/sa.c
+++ b/drivers/scsi/aacraid/sa.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,25 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * sa.c 14 * sa.c
28 * 15 *
29 * Abstract: Drawbridge specific support functions 16 * Abstract: Drawbridge specific support functions
30 *
31 */ 17 */
32 18
33#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index 97bb9e9d201c..3b66e06726c8 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Adaptec AAC series RAID controller driver 3 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. 4 * (c) Copyright 2001 Red Hat Inc.
@@ -9,25 +10,10 @@
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 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 * Module Name: 13 * Module Name:
27 * src.c 14 * src.c
28 * 15 *
29 * Abstract: Hardware Device Interface for PMC SRC based controllers 16 * Abstract: Hardware Device Interface for PMC SRC based controllers
30 *
31 */ 17 */
32 18
33#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index 97872838b983..88c649b3ef61 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -1,18 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* aha152x.c -- Adaptec AHA-152x driver 2/* aha152x.c -- Adaptec AHA-152x driver
2 * Author: Jürgen E. Fischer, fischer@norbit.de 3 * Author: Jürgen E. Fischer, fischer@norbit.de
3 * Copyright 1993-2004 Jürgen E. Fischer 4 * Copyright 1993-2004 Jürgen E. Fischer
4 * 5 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2, or (at your option) any
8 * later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 *
16 * $Id: aha152x.c,v 2.7 2004/01/24 11:42:59 fischer Exp $ 6 * $Id: aha152x.c,v 2.7 2004/01/24 11:42:59 fischer Exp $
17 * 7 *
18 * $Log: aha152x.c,v $ 8 * $Log: aha152x.c,v $
@@ -228,7 +218,6 @@
228 * Revision 0.0 1993/08/14 19:54:25 root 218 * Revision 0.0 1993/08/14 19:54:25 root
229 * empty function bodies; detect() works. 219 * empty function bodies; detect() works.
230 * 220 *
231 *
232 ************************************************************************** 221 **************************************************************************
233 222
234 see Documentation/scsi/aha152x.txt for configuration details 223 see Documentation/scsi/aha152x.txt for configuration details
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index ba7a5725be04..dc5667afeb27 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Driver for Adaptec AHA-1542 SCSI host adapters 3 * Driver for Adaptec AHA-1542 SCSI host adapters
3 * 4 *
diff --git a/drivers/scsi/aic7xxx/Kconfig.aic79xx b/drivers/scsi/aic7xxx/Kconfig.aic79xx
index 3b3d599103f8..16743fb9eead 100644
--- a/drivers/scsi/aic7xxx/Kconfig.aic79xx
+++ b/drivers/scsi/aic7xxx/Kconfig.aic79xx
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# AIC79XX 2.5.X Kernel configuration File. 3# AIC79XX 2.5.X Kernel configuration File.
3# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic79xx#4 $ 4# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic79xx#4 $
diff --git a/drivers/scsi/aic7xxx/Kconfig.aic7xxx b/drivers/scsi/aic7xxx/Kconfig.aic7xxx
index 40fe08a64535..3546b8cc401f 100644
--- a/drivers/scsi/aic7xxx/Kconfig.aic7xxx
+++ b/drivers/scsi/aic7xxx/Kconfig.aic7xxx
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# AIC7XXX and AIC79XX 2.5.X Kernel configuration File. 3# AIC7XXX and AIC79XX 2.5.X Kernel configuration File.
3# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#7 $ 4# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#7 $
diff --git a/drivers/scsi/am53c974.c b/drivers/scsi/am53c974.c
index 27c0a4a937d9..b69edb473295 100644
--- a/drivers/scsi/am53c974.c
+++ b/drivers/scsi/am53c974.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * AMD am53c974 driver. 3 * AMD am53c974 driver.
3 * Copyright (c) 2014 Hannes Reinecke, SUSE Linux GmbH 4 * Copyright (c) 2014 Hannes Reinecke, SUSE Linux GmbH
diff --git a/drivers/scsi/arcmsr/Makefile b/drivers/scsi/arcmsr/Makefile
index 721aced39168..9051f66cae36 100644
--- a/drivers/scsi/arcmsr/Makefile
+++ b/drivers/scsi/arcmsr/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# File: drivers/arcmsr/Makefile 2# File: drivers/arcmsr/Makefile
2# Makefile for the ARECA PCI-X PCI-EXPRESS SATA RAID controllers SCSI driver. 3# Makefile for the ARECA PCI-X PCI-EXPRESS SATA RAID controllers SCSI driver.
3 4
diff --git a/drivers/scsi/arm/Kconfig b/drivers/scsi/arm/Kconfig
index cfd172a439c9..f34badc75196 100644
--- a/drivers/scsi/arm/Kconfig
+++ b/drivers/scsi/arm/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# SCSI driver configuration for Acorn 3# SCSI driver configuration for Acorn
3# 4#
diff --git a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c
index 5e9dd9f34821..591414120754 100644
--- a/drivers/scsi/arm/arxescsi.c
+++ b/drivers/scsi/arm/arxescsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * linux/drivers/scsi/arm/arxescsi.c 3 * linux/drivers/scsi/arm/arxescsi.c
3 * 4 *
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c
index e2d2a81d8e0b..3fd944374631 100644
--- a/drivers/scsi/arm/cumana_1.c
+++ b/drivers/scsi/arm/cumana_1.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Generic Generic NCR5380 driver 3 * Generic Generic NCR5380 driver
3 * 4 *
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c
index 8f2efaab8d46..7c9d361e91a9 100644
--- a/drivers/scsi/arm/oak.c
+++ b/drivers/scsi/arm/oak.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Oak Generic NCR5380 driver 3 * Oak Generic NCR5380 driver
3 * 4 *
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index 446a789cdaf5..e41f0bbdc9fd 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (C) 1997 Wu Ching Chen 3 * Copyright (C) 1997 Wu Ching Chen
3 * 2.1.x update (C) 1998 Krzysztof G. Baranowski 4 * 2.1.x update (C) 1998 Krzysztof G. Baranowski
diff --git a/drivers/scsi/be2iscsi/Kconfig b/drivers/scsi/be2iscsi/Kconfig
index bad5f32e1f67..958c9b46ec78 100644
--- a/drivers/scsi/be2iscsi/Kconfig
+++ b/drivers/scsi/be2iscsi/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config BE2ISCSI 2config BE2ISCSI
2 tristate "Emulex 10Gbps iSCSI - BladeEngine 2" 3 tristate "Emulex 10Gbps iSCSI - BladeEngine 2"
3 depends on PCI && SCSI && NET 4 depends on PCI && SCSI && NET
diff --git a/drivers/scsi/be2iscsi/Makefile b/drivers/scsi/be2iscsi/Makefile
index d0488eaafc25..910885343a75 100644
--- a/drivers/scsi/be2iscsi/Makefile
+++ b/drivers/scsi/be2iscsi/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# Makefile to build the iSCSI driver for Emulex OneConnect. 3# Makefile to build the iSCSI driver for Emulex OneConnect.
3# 4#
diff --git a/drivers/scsi/bnx2fc/Kconfig b/drivers/scsi/bnx2fc/Kconfig
index d401a096dfc7..e0ccb48ec961 100644
--- a/drivers/scsi/bnx2fc/Kconfig
+++ b/drivers/scsi/bnx2fc/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_BNX2X_FCOE 2config SCSI_BNX2X_FCOE
2 tristate "QLogic FCoE offload support" 3 tristate "QLogic FCoE offload support"
3 depends on PCI 4 depends on PCI
diff --git a/drivers/scsi/bnx2fc/Makefile b/drivers/scsi/bnx2fc/Makefile
index 141149e8cdad..1d72e279a97d 100644
--- a/drivers/scsi/bnx2fc/Makefile
+++ b/drivers/scsi/bnx2fc/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_SCSI_BNX2X_FCOE) += bnx2fc.o 2obj-$(CONFIG_SCSI_BNX2X_FCOE) += bnx2fc.o
2 3
3bnx2fc-y := bnx2fc_els.o bnx2fc_fcoe.o bnx2fc_hwi.o bnx2fc_io.o bnx2fc_tgt.o \ 4bnx2fc-y := bnx2fc_els.o bnx2fc_fcoe.o bnx2fc_hwi.o bnx2fc_io.o bnx2fc_tgt.o \
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 19734ec7f42e..747f019fb393 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -830,7 +830,7 @@ ret_err_rqe:
830 ((u64)err_entry->data.err_warn_bitmap_hi << 32) | 830 ((u64)err_entry->data.err_warn_bitmap_hi << 32) |
831 (u64)err_entry->data.err_warn_bitmap_lo; 831 (u64)err_entry->data.err_warn_bitmap_lo;
832 for (i = 0; i < BNX2FC_NUM_ERR_BITS; i++) { 832 for (i = 0; i < BNX2FC_NUM_ERR_BITS; i++) {
833 if (err_warn_bit_map & (u64) (1 << i)) { 833 if (err_warn_bit_map & ((u64)1 << i)) {
834 err_warn = i; 834 err_warn = i;
835 break; 835 break;
836 } 836 }
diff --git a/drivers/scsi/bnx2i/Kconfig b/drivers/scsi/bnx2i/Kconfig
index ba30ff86d581..702dc82c9501 100644
--- a/drivers/scsi/bnx2i/Kconfig
+++ b/drivers/scsi/bnx2i/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_BNX2_ISCSI 2config SCSI_BNX2_ISCSI
2 tristate "QLogic NetXtreme II iSCSI support" 3 tristate "QLogic NetXtreme II iSCSI support"
3 depends on NET 4 depends on NET
diff --git a/drivers/scsi/bnx2i/Makefile b/drivers/scsi/bnx2i/Makefile
index b5802bd2e76a..25378671bb1e 100644
--- a/drivers/scsi/bnx2i/Makefile
+++ b/drivers/scsi/bnx2i/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1bnx2i-y := bnx2i_init.o bnx2i_hwi.o bnx2i_iscsi.o bnx2i_sysfs.o 2bnx2i-y := bnx2i_init.o bnx2i_hwi.o bnx2i_iscsi.o bnx2i_sysfs.o
2 3
3obj-$(CONFIG_SCSI_BNX2_ISCSI) += bnx2i.o 4obj-$(CONFIG_SCSI_BNX2_ISCSI) += bnx2i.o
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
index 0f846ae2f918..8d72b25535c5 100644
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Detection routine for the NCR53c710 based BVME6000 SCSI Controllers for Linux. 3 * Detection routine for the NCR53c710 based BVME6000 SCSI Controllers for Linux.
3 * 4 *
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 1c5051b1c125..5f8153c37f77 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * SCSI Media Changer device driver for Linux 2.6 3 * SCSI Media Changer device driver for Linux 2.6
3 * 4 *
diff --git a/drivers/scsi/csiostor/Kconfig b/drivers/scsi/csiostor/Kconfig
index 7c7e5085968b..c6c03f9e3798 100644
--- a/drivers/scsi/csiostor/Kconfig
+++ b/drivers/scsi/csiostor/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_CHELSIO_FCOE 2config SCSI_CHELSIO_FCOE
2 tristate "Chelsio Communications FCoE support" 3 tristate "Chelsio Communications FCoE support"
3 depends on PCI && SCSI 4 depends on PCI && SCSI
diff --git a/drivers/scsi/cxgbi/Kconfig b/drivers/scsi/cxgbi/Kconfig
index 17eb5d522f42..75f9428a8a14 100644
--- a/drivers/scsi/cxgbi/Kconfig
+++ b/drivers/scsi/cxgbi/Kconfig
@@ -1,2 +1,3 @@
1# SPDX-License-Identifier: GPL-2.0-only
1source "drivers/scsi/cxgbi/cxgb3i/Kconfig" 2source "drivers/scsi/cxgbi/cxgb3i/Kconfig"
2source "drivers/scsi/cxgbi/cxgb4i/Kconfig" 3source "drivers/scsi/cxgbi/cxgb4i/Kconfig"
diff --git a/drivers/scsi/cxgbi/Makefile b/drivers/scsi/cxgbi/Makefile
index f78c9cc460a2..abfd38a26fec 100644
--- a/drivers/scsi/cxgbi/Makefile
+++ b/drivers/scsi/cxgbi/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1ccflags-y += -I $(srctree)/drivers/net/ethernet/chelsio/libcxgb 2ccflags-y += -I $(srctree)/drivers/net/ethernet/chelsio/libcxgb
2 3
3obj-$(CONFIG_SCSI_CXGB3_ISCSI) += libcxgbi.o cxgb3i/ 4obj-$(CONFIG_SCSI_CXGB3_ISCSI) += libcxgbi.o cxgb3i/
diff --git a/drivers/scsi/cxgbi/cxgb3i/Kconfig b/drivers/scsi/cxgbi/cxgb3i/Kconfig
index f68c871b16ca..3e4b644249cb 100644
--- a/drivers/scsi/cxgbi/cxgb3i/Kconfig
+++ b/drivers/scsi/cxgbi/cxgb3i/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_CXGB3_ISCSI 2config SCSI_CXGB3_ISCSI
2 tristate "Chelsio T3 iSCSI support" 3 tristate "Chelsio T3 iSCSI support"
3 depends on PCI && INET && (IPV6 || IPV6=n) 4 depends on PCI && INET && (IPV6 || IPV6=n)
diff --git a/drivers/scsi/cxgbi/cxgb4i/Kconfig b/drivers/scsi/cxgbi/cxgb4i/Kconfig
index f36b76e8e12c..d1f1baba3285 100644
--- a/drivers/scsi/cxgbi/cxgb4i/Kconfig
+++ b/drivers/scsi/cxgbi/cxgb4i/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_CXGB4_ISCSI 2config SCSI_CXGB4_ISCSI
2 tristate "Chelsio T4 iSCSI support" 3 tristate "Chelsio T4 iSCSI support"
3 depends on PCI && INET && (IPV6 || IPV6=n) 4 depends on PCI && INET && (IPV6 || IPV6=n)
diff --git a/drivers/scsi/cxlflash/Kconfig b/drivers/scsi/cxlflash/Kconfig
index f1b17e3efb3f..5533bdcb0458 100644
--- a/drivers/scsi/cxlflash/Kconfig
+++ b/drivers/scsi/cxlflash/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# IBM CXL-attached Flash Accelerator SCSI Driver 3# IBM CXL-attached Flash Accelerator SCSI Driver
3# 4#
diff --git a/drivers/scsi/cxlflash/Makefile b/drivers/scsi/cxlflash/Makefile
index 283377d8f6fb..fd2f0dd9daf9 100644
--- a/drivers/scsi/cxlflash/Makefile
+++ b/drivers/scsi/cxlflash/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_CXLFLASH) += cxlflash.o 2obj-$(CONFIG_CXLFLASH) += cxlflash.o
2cxlflash-y += main.o superpipe.o lunmgt.o vlun.o 3cxlflash-y += main.o superpipe.o lunmgt.o vlun.o
3cxlflash-$(CONFIG_CXL) += cxl_hw.o 4cxlflash-$(CONFIG_CXL) += cxl_hw.o
diff --git a/drivers/scsi/device_handler/Kconfig b/drivers/scsi/device_handler/Kconfig
index 0b331c9c0a8f..368eb94c2456 100644
--- a/drivers/scsi/device_handler/Kconfig
+++ b/drivers/scsi/device_handler/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# SCSI Device Handler configuration 3# SCSI Device Handler configuration
3# 4#
diff --git a/drivers/scsi/device_handler/Makefile b/drivers/scsi/device_handler/Makefile
index 09866c50fbb4..0a603aefd2bb 100644
--- a/drivers/scsi/device_handler/Makefile
+++ b/drivers/scsi/device_handler/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# SCSI Device Handler 3# SCSI Device Handler
3# 4#
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
index bea8e13febb6..caa685cfe3d4 100644
--- a/drivers/scsi/device_handler/scsi_dh_emc.c
+++ b/drivers/scsi/device_handler/scsi_dh_emc.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Target driver for EMC CLARiiON AX/CX-series hardware. 3 * Target driver for EMC CLARiiON AX/CX-series hardware.
3 * Based on code from Lars Marowsky-Bree <lmb@suse.de> 4 * Based on code from Lars Marowsky-Bree <lmb@suse.de>
@@ -5,20 +6,6 @@
5 * 6 *
6 * Copyright (C) 2006 Red Hat, Inc. All rights reserved. 7 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
7 * Copyright (C) 2006 Mike Christie 8 * Copyright (C) 2006 Mike Christie
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 */ 9 */
23#include <linux/slab.h> 10#include <linux/slab.h>
24#include <linux/module.h> 11#include <linux/module.h>
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
index 80129b033855..8acd4bb9fefb 100644
--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Basic HP/COMPAQ MSA 1000 support. This is only needed if your HW cannot be 3 * Basic HP/COMPAQ MSA 1000 support. This is only needed if your HW cannot be
3 * upgraded. 4 * upgraded.
@@ -5,20 +6,6 @@
5 * Copyright (C) 2006 Red Hat, Inc. All rights reserved. 6 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
6 * Copyright (C) 2006 Mike Christie 7 * Copyright (C) 2006 Mike Christie
7 * Copyright (C) 2008 Hannes Reinecke <hare@suse.de> 8 * Copyright (C) 2008 Hannes Reinecke <hare@suse.de>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 */ 9 */
23 10
24#include <linux/slab.h> 11#include <linux/slab.h>
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c
index 8db1cc552932..6df60b31ecb0 100644
--- a/drivers/scsi/dmx3191d.c
+++ b/drivers/scsi/dmx3191d.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 dmx3191d.c - driver for the Domex DMX3191D SCSI card. 3 dmx3191d.c - driver for the Domex DMX3191D SCSI card.
3 Copyright (C) 2000 by Massimo Piccioni <dafastidio@libero.it> 4 Copyright (C) 2000 by Massimo Piccioni <dafastidio@libero.it>
@@ -5,19 +6,6 @@
5 6
6 Based on the generic NCR5380 driver by Drew Eckhardt et al. 7 Based on the generic NCR5380 driver by Drew Eckhardt et al.
7 8
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*/ 9*/
22 10
23#include <linux/init.h> 11#include <linux/init.h>
diff --git a/drivers/scsi/esas2r/Kconfig b/drivers/scsi/esas2r/Kconfig
index 78fdbfd9b4b7..19f6d3029658 100644
--- a/drivers/scsi/esas2r/Kconfig
+++ b/drivers/scsi/esas2r/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_ESAS2R 2config SCSI_ESAS2R
2 tristate "ATTO Technology's ExpressSAS RAID adapter driver" 3 tristate "ATTO Technology's ExpressSAS RAID adapter driver"
3 depends on PCI && SCSI 4 depends on PCI && SCSI
diff --git a/drivers/scsi/esas2r/Makefile b/drivers/scsi/esas2r/Makefile
index c77160b8c8bd..279d9cb3ca69 100644
--- a/drivers/scsi/esas2r/Makefile
+++ b/drivers/scsi/esas2r/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_SCSI_ESAS2R) += esas2r.o 2obj-$(CONFIG_SCSI_ESAS2R) += esas2r.o
2 3
3esas2r-objs := esas2r_log.o esas2r_disc.o esas2r_flash.o esas2r_init.o \ 4esas2r-objs := esas2r_log.o esas2r_disc.o esas2r_flash.o esas2r_init.o \
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 76fd02ccbf49..76e7ca864d6a 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* esp_scsi.c: ESP SCSI driver. 2/* esp_scsi.c: ESP SCSI driver.
2 * 3 *
3 * Copyright (C) 2007 David S. Miller (davem@davemloft.net) 4 * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
diff --git a/drivers/scsi/fcoe/Makefile b/drivers/scsi/fcoe/Makefile
index aed0f5db3668..1183e80a09e7 100644
--- a/drivers/scsi/fcoe/Makefile
+++ b/drivers/scsi/fcoe/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_FCOE) += fcoe.o 2obj-$(CONFIG_FCOE) += fcoe.o
2obj-$(CONFIG_LIBFCOE) += libfcoe.o 3obj-$(CONFIG_LIBFCOE) += libfcoe.o
3 4
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 9cdca0625498..2ab774e62e40 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Generic Generic NCR5380 driver 3 * Generic Generic NCR5380 driver
3 * 4 *
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index d2acd0d826e2..11df0eca0293 100644
--- a/drivers/scsi/gvp11.c
+++ b/drivers/scsi/gvp11.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1#include <linux/types.h> 2#include <linux/types.h>
2#include <linux/init.h> 3#include <linux/init.h>
3#include <linux/interrupt.h> 4#include <linux/interrupt.h>
diff --git a/drivers/scsi/hisi_sas/Kconfig b/drivers/scsi/hisi_sas/Kconfig
index 57183fce70fb..90a17452a50d 100644
--- a/drivers/scsi/hisi_sas/Kconfig
+++ b/drivers/scsi/hisi_sas/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_HISI_SAS 2config SCSI_HISI_SAS
2 tristate "HiSilicon SAS" 3 tristate "HiSilicon SAS"
3 depends on HAS_IOMEM 4 depends on HAS_IOMEM
diff --git a/drivers/scsi/hisi_sas/Makefile b/drivers/scsi/hisi_sas/Makefile
index 24623f228510..742e732cd51d 100644
--- a/drivers/scsi/hisi_sas/Makefile
+++ b/drivers/scsi/hisi_sas/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas_main.o 2obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas_main.o
2obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas_v1_hw.o hisi_sas_v2_hw.o 3obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas_v1_hw.o hisi_sas_v2_hw.o
3obj-$(CONFIG_SCSI_HISI_SAS_PCI) += hisi_sas_v3_hw.o 4obj-$(CONFIG_SCSI_HISI_SAS_PCI) += hisi_sas_v3_hw.o
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index eaf329db3973..ff0d8c6a8d0c 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * hosts.c Copyright (C) 1992 Drew Eckhardt 3 * hosts.c Copyright (C) 1992 Drew Eckhardt
3 * Copyright (C) 1993, 1994, 1995 Eric Youngdale 4 * Copyright (C) 1993, 1994, 1995 Eric Youngdale
diff --git a/drivers/scsi/ibmvscsi/Makefile b/drivers/scsi/ibmvscsi/Makefile
index 3840c64f2966..5eb1cb1a0028 100644
--- a/drivers/scsi/ibmvscsi/Makefile
+++ b/drivers/scsi/ibmvscsi/Makefile
@@ -1,2 +1,3 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsi.o 2obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsi.o
2obj-$(CONFIG_SCSI_IBMVFC) += ibmvfc.o 3obj-$(CONFIG_SCSI_IBMVFC) += ibmvfc.o
diff --git a/drivers/scsi/ibmvscsi_tgt/Makefile b/drivers/scsi/ibmvscsi_tgt/Makefile
index 0c060ce64cb0..cc7a8256dcf8 100644
--- a/drivers/scsi/ibmvscsi_tgt/Makefile
+++ b/drivers/scsi/ibmvscsi_tgt/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_SCSI_IBMVSCSIS) += ibmvscsis.o 2obj-$(CONFIG_SCSI_IBMVSCSIS) += ibmvscsis.o
2 3
3ibmvscsis-y := libsrp.o ibmvscsi_tgt.o 4ibmvscsis-y := libsrp.o ibmvscsi_tgt.o
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 64ae418d29f3..9751309f8b8c 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* imm.c -- low level driver for the IOMEGA MatchMaker 2/* imm.c -- low level driver for the IOMEGA MatchMaker
2 * parallel port SCSI host adapter. 3 * parallel port SCSI host adapter.
3 * 4 *
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index eb2778b5c81b..41fd64c9c8e9 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/************************************************************************** 2/**************************************************************************
2 * Initio 9100 device driver for Linux. 3 * Initio 9100 device driver for Linux.
3 * 4 *
@@ -6,21 +7,6 @@
6 * Copyright (c) 2004 Christoph Hellwig <hch@lst.de> 7 * Copyright (c) 2004 Christoph Hellwig <hch@lst.de>
7 * Copyright (c) 2007 Red Hat 8 * Copyright (c) 2007 Red Hat
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 *
24 ************************************************************************* 10 *************************************************************************
25 * 11 *
26 * DESCRIPTION: 12 * DESCRIPTION:
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index 1ad28262b00a..7f683e42c798 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* jazz_esp.c: ESP front-end for MIPS JAZZ systems. 2/* jazz_esp.c: ESP front-end for MIPS JAZZ systems.
2 * 3 *
3 * Copyright (C) 2007 Thomas Bogendörfer (tsbogend@alpha.frankende) 4 * Copyright (C) 2007 Thomas Bogendörfer (tsbogend@alpha.frankende)
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index dc839279bbd9..abac2f350aee 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* -*- mode: c; c-basic-offset: 8 -*- */ 2/* -*- mode: c; c-basic-offset: 8 -*- */
2 3
3/* PARISC LASI driver for the 53c700 chip 4/* PARISC LASI driver for the 53c700 chip
@@ -5,19 +6,6 @@
5 * Copyright (C) 2001 by James.Bottomley@HansenPartnership.com 6 * Copyright (C) 2001 by James.Bottomley@HansenPartnership.com
6**----------------------------------------------------------------------------- 7**-----------------------------------------------------------------------------
7** 8**
8** This program is free software; you can redistribute it and/or modify
9** it under the terms of the GNU General Public License as published by
10** the Free Software Foundation; either version 2 of the License, or
11** (at your option) any later version.
12**
13** This program is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** GNU General Public License for more details.
17**
18** You should have received a copy of the GNU General Public License
19** along with this program; if not, write to the Free Software
20** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21** 9**
22**----------------------------------------------------------------------------- 10**-----------------------------------------------------------------------------
23 */ 11 */
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c
index 28a460c36c0b..d50810da53a9 100644
--- a/drivers/scsi/libsas/sas_init.c
+++ b/drivers/scsi/libsas/sas_init.c
@@ -1,26 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Serial Attached SCSI (SAS) Transport Layer initialization 3 * Serial Attached SCSI (SAS) Transport Layer initialization
3 * 4 *
4 * Copyright (C) 2005 Adaptec, Inc. All rights reserved. 5 * Copyright (C) 2005 Adaptec, Inc. All rights reserved.
5 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> 6 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
6 *
7 * This file is licensed under GPLv2.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 *
24 */ 7 */
25 8
26#include <linux/module.h> 9#include <linux/module.h>
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h
index 2cdb981cf476..1f1e07e98477 100644
--- a/drivers/scsi/libsas/sas_internal.h
+++ b/drivers/scsi/libsas/sas_internal.h
@@ -1,26 +1,9 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* 2/*
2 * Serial Attached SCSI (SAS) class internal header file 3 * Serial Attached SCSI (SAS) class internal header file
3 * 4 *
4 * Copyright (C) 2005 Adaptec, Inc. All rights reserved. 5 * Copyright (C) 2005 Adaptec, Inc. All rights reserved.
5 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> 6 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
6 *
7 * This file is licensed under GPLv2.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 *
24 */ 7 */
25 8
26#ifndef _SAS_INTERNAL_H_ 9#ifndef _SAS_INTERNAL_H_
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index b775445892af..ede0674d8399 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -1,26 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Serial Attached SCSI (SAS) class SCSI Host glue. 3 * Serial Attached SCSI (SAS) class SCSI Host glue.
3 * 4 *
4 * Copyright (C) 2005 Adaptec, Inc. All rights reserved. 5 * Copyright (C) 2005 Adaptec, Inc. All rights reserved.
5 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> 6 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
6 *
7 * This file is licensed under GPLv2.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 *
24 */ 7 */
25 8
26#include <linux/kthread.h> 9#include <linux/kthread.h>
diff --git a/drivers/scsi/libsas/sas_task.c b/drivers/scsi/libsas/sas_task.c
index c3b9befad4e6..1ded7d85027e 100644
--- a/drivers/scsi/libsas/sas_task.c
+++ b/drivers/scsi/libsas/sas_task.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1 2
2#include "sas_internal.h" 3#include "sas_internal.h"
3 4
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index e9adb3f1961d..d4c65e2109e2 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -176,6 +176,7 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
176 int i; 176 int i;
177 int len = 0; 177 int len = 0;
178 char tmp[LPFC_MAX_NVME_INFO_TMP_LEN] = {0}; 178 char tmp[LPFC_MAX_NVME_INFO_TMP_LEN] = {0};
179 unsigned long iflags = 0;
179 180
180 if (!(vport->cfg_enable_fc4_type & LPFC_ENABLE_NVME)) { 181 if (!(vport->cfg_enable_fc4_type & LPFC_ENABLE_NVME)) {
181 len = scnprintf(buf, PAGE_SIZE, "NVME Disabled\n"); 182 len = scnprintf(buf, PAGE_SIZE, "NVME Disabled\n");
@@ -354,7 +355,7 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
354 phba->sli4_hba.io_xri_max, 355 phba->sli4_hba.io_xri_max,
355 lpfc_sli4_get_els_iocb_cnt(phba)); 356 lpfc_sli4_get_els_iocb_cnt(phba));
356 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE) 357 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
357 goto buffer_done; 358 goto rcu_unlock_buf_done;
358 359
359 /* Port state is only one of two values for now. */ 360 /* Port state is only one of two values for now. */
360 if (localport->port_id) 361 if (localport->port_id)
@@ -370,15 +371,15 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
370 wwn_to_u64(vport->fc_nodename.u.wwn), 371 wwn_to_u64(vport->fc_nodename.u.wwn),
371 localport->port_id, statep); 372 localport->port_id, statep);
372 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE) 373 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
373 goto buffer_done; 374 goto rcu_unlock_buf_done;
374 375
375 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) { 376 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
376 nrport = NULL; 377 nrport = NULL;
377 spin_lock(&vport->phba->hbalock); 378 spin_lock_irqsave(&vport->phba->hbalock, iflags);
378 rport = lpfc_ndlp_get_nrport(ndlp); 379 rport = lpfc_ndlp_get_nrport(ndlp);
379 if (rport) 380 if (rport)
380 nrport = rport->remoteport; 381 nrport = rport->remoteport;
381 spin_unlock(&vport->phba->hbalock); 382 spin_unlock_irqrestore(&vport->phba->hbalock, iflags);
382 if (!nrport) 383 if (!nrport)
383 continue; 384 continue;
384 385
@@ -397,39 +398,39 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
397 398
398 /* Tab in to show lport ownership. */ 399 /* Tab in to show lport ownership. */
399 if (strlcat(buf, "NVME RPORT ", PAGE_SIZE) >= PAGE_SIZE) 400 if (strlcat(buf, "NVME RPORT ", PAGE_SIZE) >= PAGE_SIZE)
400 goto buffer_done; 401 goto rcu_unlock_buf_done;
401 if (phba->brd_no >= 10) { 402 if (phba->brd_no >= 10) {
402 if (strlcat(buf, " ", PAGE_SIZE) >= PAGE_SIZE) 403 if (strlcat(buf, " ", PAGE_SIZE) >= PAGE_SIZE)
403 goto buffer_done; 404 goto rcu_unlock_buf_done;
404 } 405 }
405 406
406 scnprintf(tmp, sizeof(tmp), "WWPN x%llx ", 407 scnprintf(tmp, sizeof(tmp), "WWPN x%llx ",
407 nrport->port_name); 408 nrport->port_name);
408 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE) 409 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
409 goto buffer_done; 410 goto rcu_unlock_buf_done;
410 411
411 scnprintf(tmp, sizeof(tmp), "WWNN x%llx ", 412 scnprintf(tmp, sizeof(tmp), "WWNN x%llx ",
412 nrport->node_name); 413 nrport->node_name);
413 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE) 414 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
414 goto buffer_done; 415 goto rcu_unlock_buf_done;
415 416
416 scnprintf(tmp, sizeof(tmp), "DID x%06x ", 417 scnprintf(tmp, sizeof(tmp), "DID x%06x ",
417 nrport->port_id); 418 nrport->port_id);
418 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE) 419 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
419 goto buffer_done; 420 goto rcu_unlock_buf_done;
420 421
421 /* An NVME rport can have multiple roles. */ 422 /* An NVME rport can have multiple roles. */
422 if (nrport->port_role & FC_PORT_ROLE_NVME_INITIATOR) { 423 if (nrport->port_role & FC_PORT_ROLE_NVME_INITIATOR) {
423 if (strlcat(buf, "INITIATOR ", PAGE_SIZE) >= PAGE_SIZE) 424 if (strlcat(buf, "INITIATOR ", PAGE_SIZE) >= PAGE_SIZE)
424 goto buffer_done; 425 goto rcu_unlock_buf_done;
425 } 426 }
426 if (nrport->port_role & FC_PORT_ROLE_NVME_TARGET) { 427 if (nrport->port_role & FC_PORT_ROLE_NVME_TARGET) {
427 if (strlcat(buf, "TARGET ", PAGE_SIZE) >= PAGE_SIZE) 428 if (strlcat(buf, "TARGET ", PAGE_SIZE) >= PAGE_SIZE)
428 goto buffer_done; 429 goto rcu_unlock_buf_done;
429 } 430 }
430 if (nrport->port_role & FC_PORT_ROLE_NVME_DISCOVERY) { 431 if (nrport->port_role & FC_PORT_ROLE_NVME_DISCOVERY) {
431 if (strlcat(buf, "DISCSRVC ", PAGE_SIZE) >= PAGE_SIZE) 432 if (strlcat(buf, "DISCSRVC ", PAGE_SIZE) >= PAGE_SIZE)
432 goto buffer_done; 433 goto rcu_unlock_buf_done;
433 } 434 }
434 if (nrport->port_role & ~(FC_PORT_ROLE_NVME_INITIATOR | 435 if (nrport->port_role & ~(FC_PORT_ROLE_NVME_INITIATOR |
435 FC_PORT_ROLE_NVME_TARGET | 436 FC_PORT_ROLE_NVME_TARGET |
@@ -437,12 +438,12 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
437 scnprintf(tmp, sizeof(tmp), "UNKNOWN ROLE x%x", 438 scnprintf(tmp, sizeof(tmp), "UNKNOWN ROLE x%x",
438 nrport->port_role); 439 nrport->port_role);
439 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE) 440 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
440 goto buffer_done; 441 goto rcu_unlock_buf_done;
441 } 442 }
442 443
443 scnprintf(tmp, sizeof(tmp), "%s\n", statep); 444 scnprintf(tmp, sizeof(tmp), "%s\n", statep);
444 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE) 445 if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
445 goto buffer_done; 446 goto rcu_unlock_buf_done;
446 } 447 }
447 rcu_read_unlock(); 448 rcu_read_unlock();
448 449
@@ -504,7 +505,13 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
504 atomic_read(&lport->cmpl_fcp_err)); 505 atomic_read(&lport->cmpl_fcp_err));
505 strlcat(buf, tmp, PAGE_SIZE); 506 strlcat(buf, tmp, PAGE_SIZE);
506 507
507buffer_done: 508 /* RCU is already unlocked. */
509 goto buffer_done;
510
511 rcu_unlock_buf_done:
512 rcu_read_unlock();
513
514 buffer_done:
508 len = strnlen(buf, PAGE_SIZE); 515 len = strnlen(buf, PAGE_SIZE);
509 516
510 if (unlikely(len >= (PAGE_SIZE - 1))) { 517 if (unlikely(len >= (PAGE_SIZE - 1))) {
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index c8fb0b455f2a..5ac4f8d76b91 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -7334,7 +7334,10 @@ int
7334lpfc_send_rrq(struct lpfc_hba *phba, struct lpfc_node_rrq *rrq) 7334lpfc_send_rrq(struct lpfc_hba *phba, struct lpfc_node_rrq *rrq)
7335{ 7335{
7336 struct lpfc_nodelist *ndlp = lpfc_findnode_did(rrq->vport, 7336 struct lpfc_nodelist *ndlp = lpfc_findnode_did(rrq->vport,
7337 rrq->nlp_DID); 7337 rrq->nlp_DID);
7338 if (!ndlp)
7339 return 1;
7340
7338 if (lpfc_test_rrq_active(phba, ndlp, rrq->xritag)) 7341 if (lpfc_test_rrq_active(phba, ndlp, rrq->xritag))
7339 return lpfc_issue_els_rrq(rrq->vport, ndlp, 7342 return lpfc_issue_els_rrq(rrq->vport, ndlp,
7340 rrq->nlp_DID, rrq); 7343 rrq->nlp_DID, rrq);
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 2acda188b0dc..d1512e4f9791 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -991,15 +991,14 @@ lpfc_cleanup_vports_rrqs(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
991 * @ndlp: Targets nodelist pointer for this exchange. 991 * @ndlp: Targets nodelist pointer for this exchange.
992 * @xritag the xri in the bitmap to test. 992 * @xritag the xri in the bitmap to test.
993 * 993 *
994 * This function is called with hbalock held. This function 994 * This function returns:
995 * returns 0 = rrq not active for this xri 995 * 0 = rrq not active for this xri
996 * 1 = rrq is valid for this xri. 996 * 1 = rrq is valid for this xri.
997 **/ 997 **/
998int 998int
999lpfc_test_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, 999lpfc_test_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
1000 uint16_t xritag) 1000 uint16_t xritag)
1001{ 1001{
1002 lockdep_assert_held(&phba->hbalock);
1003 if (!ndlp) 1002 if (!ndlp)
1004 return 0; 1003 return 0;
1005 if (!ndlp->active_rrqs_xri_bitmap) 1004 if (!ndlp->active_rrqs_xri_bitmap)
@@ -1102,10 +1101,11 @@ out:
1102 * @phba: Pointer to HBA context object. 1101 * @phba: Pointer to HBA context object.
1103 * @piocb: Pointer to the iocbq. 1102 * @piocb: Pointer to the iocbq.
1104 * 1103 *
1105 * This function is called with the ring lock held. This function 1104 * The driver calls this function with either the nvme ls ring lock
1106 * gets a new driver sglq object from the sglq list. If the 1105 * or the fc els ring lock held depending on the iocb usage. This function
1107 * list is not empty then it is successful, it returns pointer to the newly 1106 * gets a new driver sglq object from the sglq list. If the list is not empty
1108 * allocated sglq object else it returns NULL. 1107 * then it is successful, it returns pointer to the newly allocated sglq
1108 * object else it returns NULL.
1109 **/ 1109 **/
1110static struct lpfc_sglq * 1110static struct lpfc_sglq *
1111__lpfc_sli_get_els_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq) 1111__lpfc_sli_get_els_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq)
@@ -1115,9 +1115,15 @@ __lpfc_sli_get_els_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq)
1115 struct lpfc_sglq *start_sglq = NULL; 1115 struct lpfc_sglq *start_sglq = NULL;
1116 struct lpfc_io_buf *lpfc_cmd; 1116 struct lpfc_io_buf *lpfc_cmd;
1117 struct lpfc_nodelist *ndlp; 1117 struct lpfc_nodelist *ndlp;
1118 struct lpfc_sli_ring *pring = NULL;
1118 int found = 0; 1119 int found = 0;
1119 1120
1120 lockdep_assert_held(&phba->hbalock); 1121 if (piocbq->iocb_flag & LPFC_IO_NVME_LS)
1122 pring = phba->sli4_hba.nvmels_wq->pring;
1123 else
1124 pring = lpfc_phba_elsring(phba);
1125
1126 lockdep_assert_held(&pring->ring_lock);
1121 1127
1122 if (piocbq->iocb_flag & LPFC_IO_FCP) { 1128 if (piocbq->iocb_flag & LPFC_IO_FCP) {
1123 lpfc_cmd = (struct lpfc_io_buf *) piocbq->context1; 1129 lpfc_cmd = (struct lpfc_io_buf *) piocbq->context1;
@@ -1560,7 +1566,8 @@ lpfc_sli_ring_map(struct lpfc_hba *phba)
1560 * @pring: Pointer to driver SLI ring object. 1566 * @pring: Pointer to driver SLI ring object.
1561 * @piocb: Pointer to the driver iocb object. 1567 * @piocb: Pointer to the driver iocb object.
1562 * 1568 *
1563 * This function is called with hbalock held. The function adds the 1569 * The driver calls this function with the hbalock held for SLI3 ports or
1570 * the ring lock held for SLI4 ports. The function adds the
1564 * new iocb to txcmplq of the given ring. This function always returns 1571 * new iocb to txcmplq of the given ring. This function always returns
1565 * 0. If this function is called for ELS ring, this function checks if 1572 * 0. If this function is called for ELS ring, this function checks if
1566 * there is a vport associated with the ELS command. This function also 1573 * there is a vport associated with the ELS command. This function also
@@ -1570,7 +1577,10 @@ static int
1570lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, 1577lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
1571 struct lpfc_iocbq *piocb) 1578 struct lpfc_iocbq *piocb)
1572{ 1579{
1573 lockdep_assert_held(&phba->hbalock); 1580 if (phba->sli_rev == LPFC_SLI_REV4)
1581 lockdep_assert_held(&pring->ring_lock);
1582 else
1583 lockdep_assert_held(&phba->hbalock);
1574 1584
1575 BUG_ON(!piocb); 1585 BUG_ON(!piocb);
1576 1586
@@ -2967,8 +2977,8 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
2967 * 2977 *
2968 * This function looks up the iocb_lookup table to get the command iocb 2978 * This function looks up the iocb_lookup table to get the command iocb
2969 * corresponding to the given response iocb using the iotag of the 2979 * corresponding to the given response iocb using the iotag of the
2970 * response iocb. This function is called with the hbalock held 2980 * response iocb. The driver calls this function with the hbalock held
2971 * for sli3 devices or the ring_lock for sli4 devices. 2981 * for SLI3 ports or the ring lock held for SLI4 ports.
2972 * This function returns the command iocb object if it finds the command 2982 * This function returns the command iocb object if it finds the command
2973 * iocb else returns NULL. 2983 * iocb else returns NULL.
2974 **/ 2984 **/
@@ -2979,8 +2989,15 @@ lpfc_sli_iocbq_lookup(struct lpfc_hba *phba,
2979{ 2989{
2980 struct lpfc_iocbq *cmd_iocb = NULL; 2990 struct lpfc_iocbq *cmd_iocb = NULL;
2981 uint16_t iotag; 2991 uint16_t iotag;
2982 lockdep_assert_held(&phba->hbalock); 2992 spinlock_t *temp_lock = NULL;
2993 unsigned long iflag = 0;
2983 2994
2995 if (phba->sli_rev == LPFC_SLI_REV4)
2996 temp_lock = &pring->ring_lock;
2997 else
2998 temp_lock = &phba->hbalock;
2999
3000 spin_lock_irqsave(temp_lock, iflag);
2984 iotag = prspiocb->iocb.ulpIoTag; 3001 iotag = prspiocb->iocb.ulpIoTag;
2985 3002
2986 if (iotag != 0 && iotag <= phba->sli.last_iotag) { 3003 if (iotag != 0 && iotag <= phba->sli.last_iotag) {
@@ -2990,10 +3007,12 @@ lpfc_sli_iocbq_lookup(struct lpfc_hba *phba,
2990 list_del_init(&cmd_iocb->list); 3007 list_del_init(&cmd_iocb->list);
2991 cmd_iocb->iocb_flag &= ~LPFC_IO_ON_TXCMPLQ; 3008 cmd_iocb->iocb_flag &= ~LPFC_IO_ON_TXCMPLQ;
2992 pring->txcmplq_cnt--; 3009 pring->txcmplq_cnt--;
3010 spin_unlock_irqrestore(temp_lock, iflag);
2993 return cmd_iocb; 3011 return cmd_iocb;
2994 } 3012 }
2995 } 3013 }
2996 3014
3015 spin_unlock_irqrestore(temp_lock, iflag);
2997 lpfc_printf_log(phba, KERN_ERR, LOG_SLI, 3016 lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
2998 "0317 iotag x%x is out of " 3017 "0317 iotag x%x is out of "
2999 "range: max iotag x%x wd0 x%x\n", 3018 "range: max iotag x%x wd0 x%x\n",
@@ -3009,8 +3028,8 @@ lpfc_sli_iocbq_lookup(struct lpfc_hba *phba,
3009 * @iotag: IOCB tag. 3028 * @iotag: IOCB tag.
3010 * 3029 *
3011 * This function looks up the iocb_lookup table to get the command iocb 3030 * This function looks up the iocb_lookup table to get the command iocb
3012 * corresponding to the given iotag. This function is called with the 3031 * corresponding to the given iotag. The driver calls this function with
3013 * hbalock held. 3032 * the ring lock held because this function is an SLI4 port only helper.
3014 * This function returns the command iocb object if it finds the command 3033 * This function returns the command iocb object if it finds the command
3015 * iocb else returns NULL. 3034 * iocb else returns NULL.
3016 **/ 3035 **/
@@ -3019,8 +3038,15 @@ lpfc_sli_iocbq_lookup_by_tag(struct lpfc_hba *phba,
3019 struct lpfc_sli_ring *pring, uint16_t iotag) 3038 struct lpfc_sli_ring *pring, uint16_t iotag)
3020{ 3039{
3021 struct lpfc_iocbq *cmd_iocb = NULL; 3040 struct lpfc_iocbq *cmd_iocb = NULL;
3041 spinlock_t *temp_lock = NULL;
3042 unsigned long iflag = 0;
3022 3043
3023 lockdep_assert_held(&phba->hbalock); 3044 if (phba->sli_rev == LPFC_SLI_REV4)
3045 temp_lock = &pring->ring_lock;
3046 else
3047 temp_lock = &phba->hbalock;
3048
3049 spin_lock_irqsave(temp_lock, iflag);
3024 if (iotag != 0 && iotag <= phba->sli.last_iotag) { 3050 if (iotag != 0 && iotag <= phba->sli.last_iotag) {
3025 cmd_iocb = phba->sli.iocbq_lookup[iotag]; 3051 cmd_iocb = phba->sli.iocbq_lookup[iotag];
3026 if (cmd_iocb->iocb_flag & LPFC_IO_ON_TXCMPLQ) { 3052 if (cmd_iocb->iocb_flag & LPFC_IO_ON_TXCMPLQ) {
@@ -3028,10 +3054,12 @@ lpfc_sli_iocbq_lookup_by_tag(struct lpfc_hba *phba,
3028 list_del_init(&cmd_iocb->list); 3054 list_del_init(&cmd_iocb->list);
3029 cmd_iocb->iocb_flag &= ~LPFC_IO_ON_TXCMPLQ; 3055 cmd_iocb->iocb_flag &= ~LPFC_IO_ON_TXCMPLQ;
3030 pring->txcmplq_cnt--; 3056 pring->txcmplq_cnt--;
3057 spin_unlock_irqrestore(temp_lock, iflag);
3031 return cmd_iocb; 3058 return cmd_iocb;
3032 } 3059 }
3033 } 3060 }
3034 3061
3062 spin_unlock_irqrestore(temp_lock, iflag);
3035 lpfc_printf_log(phba, KERN_ERR, LOG_SLI, 3063 lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
3036 "0372 iotag x%x lookup error: max iotag (x%x) " 3064 "0372 iotag x%x lookup error: max iotag (x%x) "
3037 "iocb_flag x%x\n", 3065 "iocb_flag x%x\n",
@@ -3065,17 +3093,7 @@ lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
3065 int rc = 1; 3093 int rc = 1;
3066 unsigned long iflag; 3094 unsigned long iflag;
3067 3095
3068 /* Based on the iotag field, get the cmd IOCB from the txcmplq */
3069 if (phba->sli_rev == LPFC_SLI_REV4)
3070 spin_lock_irqsave(&pring->ring_lock, iflag);
3071 else
3072 spin_lock_irqsave(&phba->hbalock, iflag);
3073 cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, saveq); 3096 cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, saveq);
3074 if (phba->sli_rev == LPFC_SLI_REV4)
3075 spin_unlock_irqrestore(&pring->ring_lock, iflag);
3076 else
3077 spin_unlock_irqrestore(&phba->hbalock, iflag);
3078
3079 if (cmdiocbp) { 3097 if (cmdiocbp) {
3080 if (cmdiocbp->iocb_cmpl) { 3098 if (cmdiocbp->iocb_cmpl) {
3081 /* 3099 /*
@@ -3406,8 +3424,10 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba *phba,
3406 break; 3424 break;
3407 } 3425 }
3408 3426
3427 spin_unlock_irqrestore(&phba->hbalock, iflag);
3409 cmdiocbq = lpfc_sli_iocbq_lookup(phba, pring, 3428 cmdiocbq = lpfc_sli_iocbq_lookup(phba, pring,
3410 &rspiocbq); 3429 &rspiocbq);
3430 spin_lock_irqsave(&phba->hbalock, iflag);
3411 if (unlikely(!cmdiocbq)) 3431 if (unlikely(!cmdiocbq))
3412 break; 3432 break;
3413 if (cmdiocbq->iocb_flag & LPFC_DRIVER_ABORTED) 3433 if (cmdiocbq->iocb_flag & LPFC_DRIVER_ABORTED)
@@ -3601,9 +3621,12 @@ lpfc_sli_sp_handle_rspiocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
3601 3621
3602 case LPFC_ABORT_IOCB: 3622 case LPFC_ABORT_IOCB:
3603 cmdiocbp = NULL; 3623 cmdiocbp = NULL;
3604 if (irsp->ulpCommand != CMD_XRI_ABORTED_CX) 3624 if (irsp->ulpCommand != CMD_XRI_ABORTED_CX) {
3625 spin_unlock_irqrestore(&phba->hbalock, iflag);
3605 cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, 3626 cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring,
3606 saveq); 3627 saveq);
3628 spin_lock_irqsave(&phba->hbalock, iflag);
3629 }
3607 if (cmdiocbp) { 3630 if (cmdiocbp) {
3608 /* Call the specified completion routine */ 3631 /* Call the specified completion routine */
3609 if (cmdiocbp->iocb_cmpl) { 3632 if (cmdiocbp->iocb_cmpl) {
@@ -12976,13 +12999,11 @@ lpfc_sli4_els_wcqe_to_rspiocbq(struct lpfc_hba *phba,
12976 return NULL; 12999 return NULL;
12977 13000
12978 wcqe = &irspiocbq->cq_event.cqe.wcqe_cmpl; 13001 wcqe = &irspiocbq->cq_event.cqe.wcqe_cmpl;
12979 spin_lock_irqsave(&pring->ring_lock, iflags);
12980 pring->stats.iocb_event++; 13002 pring->stats.iocb_event++;
12981 /* Look up the ELS command IOCB and create pseudo response IOCB */ 13003 /* Look up the ELS command IOCB and create pseudo response IOCB */
12982 cmdiocbq = lpfc_sli_iocbq_lookup_by_tag(phba, pring, 13004 cmdiocbq = lpfc_sli_iocbq_lookup_by_tag(phba, pring,
12983 bf_get(lpfc_wcqe_c_request_tag, wcqe)); 13005 bf_get(lpfc_wcqe_c_request_tag, wcqe));
12984 if (unlikely(!cmdiocbq)) { 13006 if (unlikely(!cmdiocbq)) {
12985 spin_unlock_irqrestore(&pring->ring_lock, iflags);
12986 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, 13007 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
12987 "0386 ELS complete with no corresponding " 13008 "0386 ELS complete with no corresponding "
12988 "cmdiocb: 0x%x 0x%x 0x%x 0x%x\n", 13009 "cmdiocb: 0x%x 0x%x 0x%x 0x%x\n",
@@ -12992,6 +13013,7 @@ lpfc_sli4_els_wcqe_to_rspiocbq(struct lpfc_hba *phba,
12992 return NULL; 13013 return NULL;
12993 } 13014 }
12994 13015
13016 spin_lock_irqsave(&pring->ring_lock, iflags);
12995 /* Put the iocb back on the txcmplq */ 13017 /* Put the iocb back on the txcmplq */
12996 lpfc_sli_ringtxcmpl_put(phba, pring, cmdiocbq); 13018 lpfc_sli_ringtxcmpl_put(phba, pring, cmdiocbq);
12997 spin_unlock_irqrestore(&pring->ring_lock, iflags); 13019 spin_unlock_irqrestore(&pring->ring_lock, iflags);
@@ -13762,9 +13784,9 @@ lpfc_sli4_fp_handle_fcp_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
13762 /* Look up the FCP command IOCB and create pseudo response IOCB */ 13784 /* Look up the FCP command IOCB and create pseudo response IOCB */
13763 spin_lock_irqsave(&pring->ring_lock, iflags); 13785 spin_lock_irqsave(&pring->ring_lock, iflags);
13764 pring->stats.iocb_event++; 13786 pring->stats.iocb_event++;
13787 spin_unlock_irqrestore(&pring->ring_lock, iflags);
13765 cmdiocbq = lpfc_sli_iocbq_lookup_by_tag(phba, pring, 13788 cmdiocbq = lpfc_sli_iocbq_lookup_by_tag(phba, pring,
13766 bf_get(lpfc_wcqe_c_request_tag, wcqe)); 13789 bf_get(lpfc_wcqe_c_request_tag, wcqe));
13767 spin_unlock_irqrestore(&pring->ring_lock, iflags);
13768 if (unlikely(!cmdiocbq)) { 13790 if (unlikely(!cmdiocbq)) {
13769 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, 13791 lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
13770 "0374 FCP complete with no corresponding " 13792 "0374 FCP complete with no corresponding "
diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
index f7d9ef428417..220a932fe943 100644
--- a/drivers/scsi/lpfc/lpfc_version.h
+++ b/drivers/scsi/lpfc/lpfc_version.h
@@ -20,7 +20,7 @@
20 * included with this package. * 20 * included with this package. *
21 *******************************************************************/ 21 *******************************************************************/
22 22
23#define LPFC_DRIVER_VERSION "12.2.0.1" 23#define LPFC_DRIVER_VERSION "12.2.0.2"
24#define LPFC_DRIVER_NAME "lpfc" 24#define LPFC_DRIVER_NAME "lpfc"
25 25
26/* Used for SLI 2/3 */ 26/* Used for SLI 2/3 */
diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c
index c8e6ae98a4a6..35d3e322d6d5 100644
--- a/drivers/scsi/mac53c94.c
+++ b/drivers/scsi/mac53c94.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * SCSI low-level driver for the 53c94 SCSI bus adaptor found 3 * SCSI low-level driver for the 53c94 SCSI bus adaptor found
3 * on Power Macintosh computers, controlling the external SCSI chain. 4 * on Power Macintosh computers, controlling the external SCSI chain.
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index ee741207fd4e..1c78bc10c790 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* mac_esp.c: ESP front-end for Macintosh Quadra systems. 2/* mac_esp.c: ESP front-end for Macintosh Quadra systems.
2 * 3 *
3 * Adapted from jazz_esp.c and the old mac_esp.c. 4 * Adapted from jazz_esp.c and the old mac_esp.c.
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index 8b4b5b1a13d7..dba9517d9553 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Generic Macintosh NCR5380 driver 3 * Generic Macintosh NCR5380 driver
3 * 4 *
diff --git a/drivers/scsi/megaraid/Kconfig.megaraid b/drivers/scsi/megaraid/Kconfig.megaraid
index 17419e30ffc8..e630e41dc843 100644
--- a/drivers/scsi/megaraid/Kconfig.megaraid
+++ b/drivers/scsi/megaraid/Kconfig.megaraid
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config MEGARAID_NEWGEN 2config MEGARAID_NEWGEN
2 bool "LSI Logic New Generation RAID Device Drivers" 3 bool "LSI Logic New Generation RAID Device Drivers"
3 depends on PCI && SCSI 4 depends on PCI && SCSI
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 6fd57f7f0b1e..fe9a785b7b6f 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* 2/*
2 * Linux MegaRAID driver for SAS based RAID controllers 3 * Linux MegaRAID driver for SAS based RAID controllers
3 * 4 *
@@ -5,19 +6,6 @@
5 * Copyright (c) 2013-2016 Avago Technologies 6 * Copyright (c) 2013-2016 Avago Technologies
6 * Copyright (c) 2016-2018 Broadcom Inc. 7 * Copyright (c) 2016-2018 Broadcom Inc.
7 * 8 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * FILE: megaraid_sas.h 9 * FILE: megaraid_sas.h
22 * 10 *
23 * Authors: Broadcom Inc. 11 * Authors: Broadcom Inc.
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 473a120eb75d..3dd1df472dc6 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Linux MegaRAID driver for SAS based RAID controllers 3 * Linux MegaRAID driver for SAS based RAID controllers
3 * 4 *
@@ -5,19 +6,6 @@
5 * Copyright (c) 2013-2016 Avago Technologies 6 * Copyright (c) 2013-2016 Avago Technologies
6 * Copyright (c) 2016-2018 Broadcom Inc. 7 * Copyright (c) 2016-2018 Broadcom Inc.
7 * 8 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * Authors: Broadcom Inc. 9 * Authors: Broadcom Inc.
22 * Sreenivas Bagalkote 10 * Sreenivas Bagalkote
23 * Sumant Patro 11 * Sumant Patro
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index 87c2c0472c8f..12637606c46d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Linux MegaRAID driver for SAS based RAID controllers 3 * Linux MegaRAID driver for SAS based RAID controllers
3 * 4 *
@@ -5,19 +6,6 @@
5 * Copyright (c) 2013-2016 Avago Technologies 6 * Copyright (c) 2013-2016 Avago Technologies
6 * Copyright (c) 2016-2018 Broadcom Inc. 7 * Copyright (c) 2016-2018 Broadcom Inc.
7 * 8 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * FILE: megaraid_sas_fp.c 9 * FILE: megaraid_sas_fp.c
22 * 10 *
23 * Authors: Broadcom Inc. 11 * Authors: Broadcom Inc.
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 6129399c1942..4dfa0685a86c 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Linux MegaRAID driver for SAS based RAID controllers 3 * Linux MegaRAID driver for SAS based RAID controllers
3 * 4 *
@@ -5,19 +6,6 @@
5 * Copyright (c) 2013-2016 Avago Technologies 6 * Copyright (c) 2013-2016 Avago Technologies
6 * Copyright (c) 2016-2018 Broadcom Inc. 7 * Copyright (c) 2016-2018 Broadcom Inc.
7 * 8 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * FILE: megaraid_sas_fusion.c 9 * FILE: megaraid_sas_fusion.c
22 * 10 *
23 * Authors: Broadcom Inc. 11 * Authors: Broadcom Inc.
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h b/drivers/scsi/megaraid/megaraid_sas_fusion.h
index 1481bf029490..7fa73eaca1a8 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* 2/*
2 * Linux MegaRAID driver for SAS based RAID controllers 3 * Linux MegaRAID driver for SAS based RAID controllers
3 * 4 *
@@ -5,19 +6,6 @@
5 * Copyright (c) 2013-2016 Avago Technologies 6 * Copyright (c) 2013-2016 Avago Technologies
6 * Copyright (c) 2016-2018 Broadcom Inc. 7 * Copyright (c) 2016-2018 Broadcom Inc.
7 * 8 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * FILE: megaraid_sas_fusion.h 9 * FILE: megaraid_sas_fusion.h
22 * 10 *
23 * Authors: Broadcom Inc. 11 * Authors: Broadcom Inc.
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
index c9dc7740e9e7..74fb50644678 100644
--- a/drivers/scsi/mesh.c
+++ b/drivers/scsi/mesh.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * SCSI low-level driver for the MESH (Macintosh Enhanced SCSI Hardware) 3 * SCSI low-level driver for the MESH (Macintosh Enhanced SCSI Hardware)
3 * bus adaptor found on Power Macintosh computers. 4 * bus adaptor found on Power Macintosh computers.
diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c
index 050c8c39d7ed..21d638299ab8 100644
--- a/drivers/scsi/mvme16x_scsi.c
+++ b/drivers/scsi/mvme16x_scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Detection routine for the NCR53c710 based MVME16x SCSI Controllers for Linux. 3 * Detection routine for the NCR53c710 based MVME16x SCSI Controllers for Linux.
3 * 4 *
diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index b8d54ef8cf6d..eb0dd566330a 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -818,7 +818,7 @@ static void myrs_log_event(struct myrs_hba *cs, struct myrs_event *ev)
818 unsigned char ev_type, *ev_msg; 818 unsigned char ev_type, *ev_msg;
819 struct Scsi_Host *shost = cs->host; 819 struct Scsi_Host *shost = cs->host;
820 struct scsi_device *sdev; 820 struct scsi_device *sdev;
821 struct scsi_sense_hdr sshdr; 821 struct scsi_sense_hdr sshdr = {0};
822 unsigned char sense_info[4]; 822 unsigned char sense_info[4];
823 unsigned char cmd_specific[4]; 823 unsigned char cmd_specific[4];
824 824
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index 1a236a3dfd51..e6a95498ac0d 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -1,21 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/****************************************************************************** 2/******************************************************************************
2** Device driver for the PCI-SCSI NCR538XX controller family. 3** Device driver for the PCI-SCSI NCR538XX controller family.
3** 4**
4** Copyright (C) 1994 Wolfgang Stanglmeier 5** Copyright (C) 1994 Wolfgang Stanglmeier
5** 6**
6** This program is free software; you can redistribute it and/or modify
7** it under the terms of the GNU General Public License as published by
8** the Free Software Foundation; either version 2 of the License, or
9** (at your option) any later version.
10**
11** This program is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14** GNU General Public License for more details.
15**
16** You should have received a copy of the GNU General Public License
17** along with this program; if not, write to the Free Software
18** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19** 7**
20**----------------------------------------------------------------------------- 8**-----------------------------------------------------------------------------
21** 9**
diff --git a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h
index 02901c54b08b..8326f5f01e07 100644
--- a/drivers/scsi/ncr53c8xx.h
+++ b/drivers/scsi/ncr53c8xx.h
@@ -1,22 +1,10 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/****************************************************************************** 2/******************************************************************************
2** Device driver for the PCI-SCSI NCR538XX controller family. 3** Device driver for the PCI-SCSI NCR538XX controller family.
3** 4**
4** Copyright (C) 1994 Wolfgang Stanglmeier 5** Copyright (C) 1994 Wolfgang Stanglmeier
5** Copyright (C) 1998-2001 Gerard Roudier <groudier@free.fr> 6** Copyright (C) 1998-2001 Gerard Roudier <groudier@free.fr>
6** 7**
7** This program is free software; you can redistribute it and/or modify
8** it under the terms of the GNU General Public License as published by
9** the Free Software Foundation; either version 2 of the License, or
10** (at your option) any later version.
11**
12** This program is distributed in the hope that it will be useful,
13** but WITHOUT ANY WARRANTY; without even the implied warranty of
14** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15** GNU General Public License for more details.
16**
17** You should have received a copy of the GNU General Public License
18** along with this program; if not, write to the Free Software
19** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20** 8**
21**----------------------------------------------------------------------------- 9**-----------------------------------------------------------------------------
22** 10**
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index da4d6e1106c4..70db79254155 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -1,20 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * NinjaSCSI-32Bi Cardbus, NinjaSCSI-32UDE PCI/CardBus SCSI driver 3 * NinjaSCSI-32Bi Cardbus, NinjaSCSI-32UDE PCI/CardBus SCSI driver
3 * Copyright (C) 2001, 2002, 2003 4 * Copyright (C) 2001, 2002, 2003
4 * YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp> 5 * YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
5 * GOTO Masanori <gotom@debian.or.jp>, <gotom@debian.org> 6 * GOTO Masanori <gotom@debian.or.jp>, <gotom@debian.org>
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 *
18 * Revision History: 8 * Revision History:
19 * 1.0: Initial Release. 9 * 1.0: Initial Release.
20 * 1.1: Add /proc SDTR status. 10 * 1.1: Add /proc SDTR status.
diff --git a/drivers/scsi/nsp32.h b/drivers/scsi/nsp32.h
index c0221829069c..ab0726c070f7 100644
--- a/drivers/scsi/nsp32.h
+++ b/drivers/scsi/nsp32.h
@@ -1,16 +1,7 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* 2/*
2 * Workbit NinjaSCSI-32Bi/UDE PCI/CardBus SCSI Host Bus Adapter driver 3 * Workbit NinjaSCSI-32Bi/UDE PCI/CardBus SCSI Host Bus Adapter driver
3 * Basic data header 4 * Basic data header
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14*/ 5*/
15 6
16#ifndef _NSP32_H 7#ifndef _NSP32_H
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 4bad54463eb2..815bb4097c1b 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 SCSI Tape Driver for Linux version 1.1 and newer. See the accompanying 3 SCSI Tape Driver for Linux version 1.1 and newer. See the accompanying
3 file Documentation/scsi/st.txt for more information. 4 file Documentation/scsi/st.txt for more information.
diff --git a/drivers/scsi/pcmcia/Kconfig b/drivers/scsi/pcmcia/Kconfig
index 2d435f105b16..c544f48a1d18 100644
--- a/drivers/scsi/pcmcia/Kconfig
+++ b/drivers/scsi/pcmcia/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# 2#
2# PCMCIA SCSI adapter configuration 3# PCMCIA SCSI adapter configuration
3# 4#
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index d1e98a6ea28f..a366ff1a3959 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2* sym53c500_cs.c Bob Tracy (rct@frus.com) 3* sym53c500_cs.c Bob Tracy (rct@frus.com)
3* 4*
@@ -25,16 +26,6 @@
25* Original by Tom Corner (tcorner@via.at) was adapted from a 26* Original by Tom Corner (tcorner@via.at) was adapted from a
26* driver for the Qlogic SCSI card written by 27* driver for the Qlogic SCSI card written by
27* David Hinds (dhinds@allegro.stanford.edu). 28* David Hinds (dhinds@allegro.stanford.edu).
28*
29* This program is free software; you can redistribute it and/or modify it
30* under the terms of the GNU General Public License as published by the
31* Free Software Foundation; either version 2, or (at your option) any
32* later version.
33*
34* This program is distributed in the hope that it will be useful, but
35* WITHOUT ANY WARRANTY; without even the implied warranty of
36* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37* General Public License for more details.
38*/ 29*/
39 30
40#define SYM53C500_DEBUG 0 31#define SYM53C500_DEBUG 0
diff --git a/drivers/scsi/qedf/Kconfig b/drivers/scsi/qedf/Kconfig
index 943f5ee45807..7cd993be4e57 100644
--- a/drivers/scsi/qedf/Kconfig
+++ b/drivers/scsi/qedf/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config QEDF 2config QEDF
2 tristate "QLogic QEDF 25/40/100Gb FCoE Initiator Driver Support" 3 tristate "QLogic QEDF 25/40/100Gb FCoE Initiator Driver Support"
3 depends on PCI && SCSI 4 depends on PCI && SCSI
diff --git a/drivers/scsi/qedf/Makefile b/drivers/scsi/qedf/Makefile
index 414f2a772a5f..c46287826fb8 100644
--- a/drivers/scsi/qedf/Makefile
+++ b/drivers/scsi/qedf/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_QEDF) := qedf.o 2obj-$(CONFIG_QEDF) := qedf.o
2qedf-y = qedf_dbg.o qedf_main.o qedf_io.o qedf_fip.o \ 3qedf-y = qedf_dbg.o qedf_main.o qedf_io.o qedf_fip.o \
3 qedf_attr.o qedf_els.o drv_scsi_fw_funcs.o drv_fcoe_fw_funcs.o 4 qedf_attr.o qedf_els.o drv_scsi_fw_funcs.o drv_fcoe_fw_funcs.o
diff --git a/drivers/scsi/qedi/Kconfig b/drivers/scsi/qedi/Kconfig
index d1db92d24889..7ab07f3b453f 100644
--- a/drivers/scsi/qedi/Kconfig
+++ b/drivers/scsi/qedi/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config QEDI 2config QEDI
2 tristate "QLogic QEDI 25/40/100Gb iSCSI Initiator Driver Support" 3 tristate "QLogic QEDI 25/40/100Gb iSCSI Initiator Driver Support"
3 depends on PCI && SCSI && UIO 4 depends on PCI && SCSI && UIO
diff --git a/drivers/scsi/qedi/Makefile b/drivers/scsi/qedi/Makefile
index 90a6925577cc..d84eedfd031b 100644
--- a/drivers/scsi/qedi/Makefile
+++ b/drivers/scsi/qedi/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1obj-$(CONFIG_QEDI) := qedi.o 2obj-$(CONFIG_QEDI) := qedi.o
2qedi-y := qedi_main.o qedi_iscsi.o qedi_fw.o qedi_sysfs.o \ 3qedi-y := qedi_main.o qedi_iscsi.o qedi_fw.o qedi_sysfs.o \
3 qedi_dbg.o qedi_fw_api.o 4 qedi_dbg.o qedi_fw_api.o
diff --git a/drivers/scsi/qedi/qedi_dbg.c b/drivers/scsi/qedi/qedi_dbg.c
index 8fd28b056f73..3383314a3882 100644
--- a/drivers/scsi/qedi/qedi_dbg.c
+++ b/drivers/scsi/qedi/qedi_dbg.c
@@ -16,10 +16,6 @@ qedi_dbg_err(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
16{ 16{
17 va_list va; 17 va_list va;
18 struct va_format vaf; 18 struct va_format vaf;
19 char nfunc[32];
20
21 memset(nfunc, 0, sizeof(nfunc));
22 memcpy(nfunc, func, sizeof(nfunc) - 1);
23 19
24 va_start(va, fmt); 20 va_start(va, fmt);
25 21
@@ -28,9 +24,9 @@ qedi_dbg_err(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
28 24
29 if (likely(qedi) && likely(qedi->pdev)) 25 if (likely(qedi) && likely(qedi->pdev))
30 pr_err("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev), 26 pr_err("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev),
31 nfunc, line, qedi->host_no, &vaf); 27 func, line, qedi->host_no, &vaf);
32 else 28 else
33 pr_err("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf); 29 pr_err("[0000:00:00.0]:[%s:%d]: %pV", func, line, &vaf);
34 30
35 va_end(va); 31 va_end(va);
36} 32}
@@ -41,10 +37,6 @@ qedi_dbg_warn(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
41{ 37{
42 va_list va; 38 va_list va;
43 struct va_format vaf; 39 struct va_format vaf;
44 char nfunc[32];
45
46 memset(nfunc, 0, sizeof(nfunc));
47 memcpy(nfunc, func, sizeof(nfunc) - 1);
48 40
49 va_start(va, fmt); 41 va_start(va, fmt);
50 42
@@ -56,9 +48,9 @@ qedi_dbg_warn(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
56 48
57 if (likely(qedi) && likely(qedi->pdev)) 49 if (likely(qedi) && likely(qedi->pdev))
58 pr_warn("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev), 50 pr_warn("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev),
59 nfunc, line, qedi->host_no, &vaf); 51 func, line, qedi->host_no, &vaf);
60 else 52 else
61 pr_warn("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf); 53 pr_warn("[0000:00:00.0]:[%s:%d]: %pV", func, line, &vaf);
62 54
63ret: 55ret:
64 va_end(va); 56 va_end(va);
@@ -70,10 +62,6 @@ qedi_dbg_notice(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
70{ 62{
71 va_list va; 63 va_list va;
72 struct va_format vaf; 64 struct va_format vaf;
73 char nfunc[32];
74
75 memset(nfunc, 0, sizeof(nfunc));
76 memcpy(nfunc, func, sizeof(nfunc) - 1);
77 65
78 va_start(va, fmt); 66 va_start(va, fmt);
79 67
@@ -85,10 +73,10 @@ qedi_dbg_notice(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
85 73
86 if (likely(qedi) && likely(qedi->pdev)) 74 if (likely(qedi) && likely(qedi->pdev))
87 pr_notice("[%s]:[%s:%d]:%d: %pV", 75 pr_notice("[%s]:[%s:%d]:%d: %pV",
88 dev_name(&qedi->pdev->dev), nfunc, line, 76 dev_name(&qedi->pdev->dev), func, line,
89 qedi->host_no, &vaf); 77 qedi->host_no, &vaf);
90 else 78 else
91 pr_notice("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf); 79 pr_notice("[0000:00:00.0]:[%s:%d]: %pV", func, line, &vaf);
92 80
93ret: 81ret:
94 va_end(va); 82 va_end(va);
@@ -100,10 +88,6 @@ qedi_dbg_info(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
100{ 88{
101 va_list va; 89 va_list va;
102 struct va_format vaf; 90 struct va_format vaf;
103 char nfunc[32];
104
105 memset(nfunc, 0, sizeof(nfunc));
106 memcpy(nfunc, func, sizeof(nfunc) - 1);
107 91
108 va_start(va, fmt); 92 va_start(va, fmt);
109 93
@@ -115,9 +99,9 @@ qedi_dbg_info(struct qedi_dbg_ctx *qedi, const char *func, u32 line,
115 99
116 if (likely(qedi) && likely(qedi->pdev)) 100 if (likely(qedi) && likely(qedi->pdev))
117 pr_info("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev), 101 pr_info("[%s]:[%s:%d]:%d: %pV", dev_name(&qedi->pdev->dev),
118 nfunc, line, qedi->host_no, &vaf); 102 func, line, qedi->host_no, &vaf);
119 else 103 else
120 pr_info("[0000:00:00.0]:[%s:%d]: %pV", nfunc, line, &vaf); 104 pr_info("[0000:00:00.0]:[%s:%d]: %pV", func, line, &vaf);
121 105
122ret: 106ret:
123 va_end(va); 107 va_end(va);
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index 615cea4fad56..82153c808b40 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -809,8 +809,6 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
809 struct qedi_endpoint *qedi_ep; 809 struct qedi_endpoint *qedi_ep;
810 struct sockaddr_in *addr; 810 struct sockaddr_in *addr;
811 struct sockaddr_in6 *addr6; 811 struct sockaddr_in6 *addr6;
812 struct qed_dev *cdev = NULL;
813 struct qedi_uio_dev *udev = NULL;
814 struct iscsi_path path_req; 812 struct iscsi_path path_req;
815 u32 msg_type = ISCSI_KEVENT_IF_DOWN; 813 u32 msg_type = ISCSI_KEVENT_IF_DOWN;
816 u32 iscsi_cid = QEDI_CID_RESERVED; 814 u32 iscsi_cid = QEDI_CID_RESERVED;
@@ -830,8 +828,6 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
830 } 828 }
831 829
832 qedi = iscsi_host_priv(shost); 830 qedi = iscsi_host_priv(shost);
833 cdev = qedi->cdev;
834 udev = qedi->udev;
835 831
836 if (test_bit(QEDI_IN_OFFLINE, &qedi->flags) || 832 if (test_bit(QEDI_IN_OFFLINE, &qedi->flags) ||
837 test_bit(QEDI_IN_RECOVERY, &qedi->flags)) { 833 test_bit(QEDI_IN_RECOVERY, &qedi->flags)) {
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 327eff67a1ee..e5760c4a27f0 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/****************************************************************************** 2/******************************************************************************
2* QLOGIC LINUX SOFTWARE 3* QLOGIC LINUX SOFTWARE
3* 4*
@@ -6,16 +7,6 @@
6* Copyright (C) 2001-2004 Jes Sorensen, Wild Open Source Inc. 7* Copyright (C) 2001-2004 Jes Sorensen, Wild Open Source Inc.
7* Copyright (C) 2003-2004 Christoph Hellwig 8* Copyright (C) 2003-2004 Christoph Hellwig
8* 9*
9* This program is free software; you can redistribute it and/or modify it
10* under the terms of the GNU General Public License as published by the
11* Free Software Foundation; either version 2, or (at your option) any
12* later version.
13*
14* This program is distributed in the hope that it will be useful, but
15* WITHOUT ANY WARRANTY; without even the implied warranty of
16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17* General Public License for more details.
18*
19******************************************************************************/ 10******************************************************************************/
20#define QLA1280_VERSION "3.27.1" 11#define QLA1280_VERSION "3.27.1"
21/***************************************************************************** 12/*****************************************************************************
diff --git a/drivers/scsi/qla1280.h b/drivers/scsi/qla1280.h
index 1522aca2c8c8..b496206362a9 100644
--- a/drivers/scsi/qla1280.h
+++ b/drivers/scsi/qla1280.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/****************************************************************************** 2/******************************************************************************
2* QLOGIC LINUX SOFTWARE 3* QLOGIC LINUX SOFTWARE
3* 4*
@@ -5,16 +6,6 @@
5* Copyright (C) 2000 Qlogic Corporation 6* Copyright (C) 2000 Qlogic Corporation
6* (www.qlogic.com) 7* (www.qlogic.com)
7* 8*
8* This program is free software; you can redistribute it and/or modify it
9* under the terms of the GNU General Public License as published by the
10* Free Software Foundation; either version 2, or (at your option) any
11* later version.
12*
13* This program is distributed in the hope that it will be useful, but
14* WITHOUT ANY WARRANTY; without even the implied warranty of
15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16* General Public License for more details.
17*
18******************************************************************************/ 9******************************************************************************/
19 10
20#ifndef _QLA1280_H 11#ifndef _QLA1280_H
diff --git a/drivers/scsi/qla2xxx/Kconfig b/drivers/scsi/qla2xxx/Kconfig
index 036cc3f217b1..764501838e21 100644
--- a/drivers/scsi/qla2xxx/Kconfig
+++ b/drivers/scsi/qla2xxx/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_QLA_FC 2config SCSI_QLA_FC
2 tristate "QLogic QLA2XXX Fibre Channel Support" 3 tristate "QLogic QLA2XXX Fibre Channel Support"
3 depends on PCI && SCSI 4 depends on PCI && SCSI
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index e1c82a0a9745..172ef21827dd 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -6826,6 +6826,78 @@ qla2x00_release_firmware(void)
6826 mutex_unlock(&qla_fw_lock); 6826 mutex_unlock(&qla_fw_lock);
6827} 6827}
6828 6828
6829static void qla_pci_error_cleanup(scsi_qla_host_t *vha)
6830{
6831 struct qla_hw_data *ha = vha->hw;
6832 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
6833 struct qla_qpair *qpair = NULL;
6834 struct scsi_qla_host *vp;
6835 fc_port_t *fcport;
6836 int i;
6837 unsigned long flags;
6838
6839 ha->chip_reset++;
6840
6841 ha->base_qpair->chip_reset = ha->chip_reset;
6842 for (i = 0; i < ha->max_qpairs; i++) {
6843 if (ha->queue_pair_map[i])
6844 ha->queue_pair_map[i]->chip_reset =
6845 ha->base_qpair->chip_reset;
6846 }
6847
6848 /* purge MBox commands */
6849 if (atomic_read(&ha->num_pend_mbx_stage3)) {
6850 clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags);
6851 complete(&ha->mbx_intr_comp);
6852 }
6853
6854 i = 0;
6855
6856 while (atomic_read(&ha->num_pend_mbx_stage3) ||
6857 atomic_read(&ha->num_pend_mbx_stage2) ||
6858 atomic_read(&ha->num_pend_mbx_stage1)) {
6859 msleep(20);
6860 i++;
6861 if (i > 50)
6862 break;
6863 }
6864
6865 ha->flags.purge_mbox = 0;
6866
6867 mutex_lock(&ha->mq_lock);
6868 list_for_each_entry(qpair, &base_vha->qp_list, qp_list_elem)
6869 qpair->online = 0;
6870 mutex_unlock(&ha->mq_lock);
6871
6872 qla2x00_mark_all_devices_lost(vha, 0);
6873
6874 spin_lock_irqsave(&ha->vport_slock, flags);
6875 list_for_each_entry(vp, &ha->vp_list, list) {
6876 atomic_inc(&vp->vref_count);
6877 spin_unlock_irqrestore(&ha->vport_slock, flags);
6878 qla2x00_mark_all_devices_lost(vp, 0);
6879 spin_lock_irqsave(&ha->vport_slock, flags);
6880 atomic_dec(&vp->vref_count);
6881 }
6882 spin_unlock_irqrestore(&ha->vport_slock, flags);
6883
6884 /* Clear all async request states across all VPs. */
6885 list_for_each_entry(fcport, &vha->vp_fcports, list)
6886 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
6887
6888 spin_lock_irqsave(&ha->vport_slock, flags);
6889 list_for_each_entry(vp, &ha->vp_list, list) {
6890 atomic_inc(&vp->vref_count);
6891 spin_unlock_irqrestore(&ha->vport_slock, flags);
6892 list_for_each_entry(fcport, &vp->vp_fcports, list)
6893 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
6894 spin_lock_irqsave(&ha->vport_slock, flags);
6895 atomic_dec(&vp->vref_count);
6896 }
6897 spin_unlock_irqrestore(&ha->vport_slock, flags);
6898}
6899
6900
6829static pci_ers_result_t 6901static pci_ers_result_t
6830qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state) 6902qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
6831{ 6903{
@@ -6851,20 +6923,7 @@ qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
6851 return PCI_ERS_RESULT_CAN_RECOVER; 6923 return PCI_ERS_RESULT_CAN_RECOVER;
6852 case pci_channel_io_frozen: 6924 case pci_channel_io_frozen:
6853 ha->flags.eeh_busy = 1; 6925 ha->flags.eeh_busy = 1;
6854 /* For ISP82XX complete any pending mailbox cmd */ 6926 qla_pci_error_cleanup(vha);
6855 if (IS_QLA82XX(ha)) {
6856 ha->flags.isp82xx_fw_hung = 1;
6857 ql_dbg(ql_dbg_aer, vha, 0x9001, "Pci channel io frozen\n");
6858 qla82xx_clear_pending_mbx(vha);
6859 }
6860 qla2x00_free_irqs(vha);
6861 pci_disable_device(pdev);
6862 /* Return back all IOs */
6863 qla2x00_abort_all_cmds(vha, DID_RESET << 16);
6864 if (ql2xmqsupport || ql2xnvmeenable) {
6865 set_bit(QPAIR_ONLINE_CHECK_NEEDED, &vha->dpc_flags);
6866 qla2xxx_wake_dpc(vha);
6867 }
6868 return PCI_ERS_RESULT_NEED_RESET; 6927 return PCI_ERS_RESULT_NEED_RESET;
6869 case pci_channel_io_perm_failure: 6928 case pci_channel_io_perm_failure:
6870 ha->flags.pci_channel_io_perm_failure = 1; 6929 ha->flags.pci_channel_io_perm_failure = 1;
@@ -6918,122 +6977,14 @@ qla2xxx_pci_mmio_enabled(struct pci_dev *pdev)
6918 return PCI_ERS_RESULT_RECOVERED; 6977 return PCI_ERS_RESULT_RECOVERED;
6919} 6978}
6920 6979
6921static uint32_t
6922qla82xx_error_recovery(scsi_qla_host_t *base_vha)
6923{
6924 uint32_t rval = QLA_FUNCTION_FAILED;
6925 uint32_t drv_active = 0;
6926 struct qla_hw_data *ha = base_vha->hw;
6927 int fn;
6928 struct pci_dev *other_pdev = NULL;
6929
6930 ql_dbg(ql_dbg_aer, base_vha, 0x9006,
6931 "Entered %s.\n", __func__);
6932
6933 set_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags);
6934
6935 if (base_vha->flags.online) {
6936 /* Abort all outstanding commands,
6937 * so as to be requeued later */
6938 qla2x00_abort_isp_cleanup(base_vha);
6939 }
6940
6941
6942 fn = PCI_FUNC(ha->pdev->devfn);
6943 while (fn > 0) {
6944 fn--;
6945 ql_dbg(ql_dbg_aer, base_vha, 0x9007,
6946 "Finding pci device at function = 0x%x.\n", fn);
6947 other_pdev =
6948 pci_get_domain_bus_and_slot(pci_domain_nr(ha->pdev->bus),
6949 ha->pdev->bus->number, PCI_DEVFN(PCI_SLOT(ha->pdev->devfn),
6950 fn));
6951
6952 if (!other_pdev)
6953 continue;
6954 if (atomic_read(&other_pdev->enable_cnt)) {
6955 ql_dbg(ql_dbg_aer, base_vha, 0x9008,
6956 "Found PCI func available and enable at 0x%x.\n",
6957 fn);
6958 pci_dev_put(other_pdev);
6959 break;
6960 }
6961 pci_dev_put(other_pdev);
6962 }
6963
6964 if (!fn) {
6965 /* Reset owner */
6966 ql_dbg(ql_dbg_aer, base_vha, 0x9009,
6967 "This devfn is reset owner = 0x%x.\n",
6968 ha->pdev->devfn);
6969 qla82xx_idc_lock(ha);
6970
6971 qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE,
6972 QLA8XXX_DEV_INITIALIZING);
6973
6974 qla82xx_wr_32(ha, QLA82XX_CRB_DRV_IDC_VERSION,
6975 QLA82XX_IDC_VERSION);
6976
6977 drv_active = qla82xx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE);
6978 ql_dbg(ql_dbg_aer, base_vha, 0x900a,
6979 "drv_active = 0x%x.\n", drv_active);
6980
6981 qla82xx_idc_unlock(ha);
6982 /* Reset if device is not already reset
6983 * drv_active would be 0 if a reset has already been done
6984 */
6985 if (drv_active)
6986 rval = qla82xx_start_firmware(base_vha);
6987 else
6988 rval = QLA_SUCCESS;
6989 qla82xx_idc_lock(ha);
6990
6991 if (rval != QLA_SUCCESS) {
6992 ql_log(ql_log_info, base_vha, 0x900b,
6993 "HW State: FAILED.\n");
6994 qla82xx_clear_drv_active(ha);
6995 qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE,
6996 QLA8XXX_DEV_FAILED);
6997 } else {
6998 ql_log(ql_log_info, base_vha, 0x900c,
6999 "HW State: READY.\n");
7000 qla82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE,
7001 QLA8XXX_DEV_READY);
7002 qla82xx_idc_unlock(ha);
7003 ha->flags.isp82xx_fw_hung = 0;
7004 rval = qla82xx_restart_isp(base_vha);
7005 qla82xx_idc_lock(ha);
7006 /* Clear driver state register */
7007 qla82xx_wr_32(ha, QLA82XX_CRB_DRV_STATE, 0);
7008 qla82xx_set_drv_active(base_vha);
7009 }
7010 qla82xx_idc_unlock(ha);
7011 } else {
7012 ql_dbg(ql_dbg_aer, base_vha, 0x900d,
7013 "This devfn is not reset owner = 0x%x.\n",
7014 ha->pdev->devfn);
7015 if ((qla82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE) ==
7016 QLA8XXX_DEV_READY)) {
7017 ha->flags.isp82xx_fw_hung = 0;
7018 rval = qla82xx_restart_isp(base_vha);
7019 qla82xx_idc_lock(ha);
7020 qla82xx_set_drv_active(base_vha);
7021 qla82xx_idc_unlock(ha);
7022 }
7023 }
7024 clear_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags);
7025
7026 return rval;
7027}
7028
7029static pci_ers_result_t 6980static pci_ers_result_t
7030qla2xxx_pci_slot_reset(struct pci_dev *pdev) 6981qla2xxx_pci_slot_reset(struct pci_dev *pdev)
7031{ 6982{
7032 pci_ers_result_t ret = PCI_ERS_RESULT_DISCONNECT; 6983 pci_ers_result_t ret = PCI_ERS_RESULT_DISCONNECT;
7033 scsi_qla_host_t *base_vha = pci_get_drvdata(pdev); 6984 scsi_qla_host_t *base_vha = pci_get_drvdata(pdev);
7034 struct qla_hw_data *ha = base_vha->hw; 6985 struct qla_hw_data *ha = base_vha->hw;
7035 struct rsp_que *rsp; 6986 int rc;
7036 int rc, retries = 10; 6987 struct qla_qpair *qpair = NULL;
7037 6988
7038 ql_dbg(ql_dbg_aer, base_vha, 0x9004, 6989 ql_dbg(ql_dbg_aer, base_vha, 0x9004,
7039 "Slot Reset.\n"); 6990 "Slot Reset.\n");
@@ -7062,24 +7013,16 @@ qla2xxx_pci_slot_reset(struct pci_dev *pdev)
7062 goto exit_slot_reset; 7013 goto exit_slot_reset;
7063 } 7014 }
7064 7015
7065 rsp = ha->rsp_q_map[0];
7066 if (qla2x00_request_irqs(ha, rsp))
7067 goto exit_slot_reset;
7068 7016
7069 if (ha->isp_ops->pci_config(base_vha)) 7017 if (ha->isp_ops->pci_config(base_vha))
7070 goto exit_slot_reset; 7018 goto exit_slot_reset;
7071 7019
7072 if (IS_QLA82XX(ha)) { 7020 mutex_lock(&ha->mq_lock);
7073 if (qla82xx_error_recovery(base_vha) == QLA_SUCCESS) { 7021 list_for_each_entry(qpair, &base_vha->qp_list, qp_list_elem)
7074 ret = PCI_ERS_RESULT_RECOVERED; 7022 qpair->online = 1;
7075 goto exit_slot_reset; 7023 mutex_unlock(&ha->mq_lock);
7076 } else
7077 goto exit_slot_reset;
7078 }
7079
7080 while (ha->flags.mbox_busy && retries--)
7081 msleep(1000);
7082 7024
7025 base_vha->flags.online = 1;
7083 set_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); 7026 set_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags);
7084 if (ha->isp_ops->abort_isp(base_vha) == QLA_SUCCESS) 7027 if (ha->isp_ops->abort_isp(base_vha) == QLA_SUCCESS)
7085 ret = PCI_ERS_RESULT_RECOVERED; 7028 ret = PCI_ERS_RESULT_RECOVERED;
@@ -7103,13 +7046,13 @@ qla2xxx_pci_resume(struct pci_dev *pdev)
7103 ql_dbg(ql_dbg_aer, base_vha, 0x900f, 7046 ql_dbg(ql_dbg_aer, base_vha, 0x900f,
7104 "pci_resume.\n"); 7047 "pci_resume.\n");
7105 7048
7049 ha->flags.eeh_busy = 0;
7050
7106 ret = qla2x00_wait_for_hba_online(base_vha); 7051 ret = qla2x00_wait_for_hba_online(base_vha);
7107 if (ret != QLA_SUCCESS) { 7052 if (ret != QLA_SUCCESS) {
7108 ql_log(ql_log_fatal, base_vha, 0x9002, 7053 ql_log(ql_log_fatal, base_vha, 0x9002,
7109 "The device failed to resume I/O from slot/link_reset.\n"); 7054 "The device failed to resume I/O from slot/link_reset.\n");
7110 } 7055 }
7111
7112 ha->flags.eeh_busy = 0;
7113} 7056}
7114 7057
7115static void 7058static void
diff --git a/drivers/scsi/qla4xxx/Kconfig b/drivers/scsi/qla4xxx/Kconfig
index e4dc7c733c29..4bdf31b1407a 100644
--- a/drivers/scsi/qla4xxx/Kconfig
+++ b/drivers/scsi/qla4xxx/Kconfig
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1config SCSI_QLA_ISCSI 2config SCSI_QLA_ISCSI
2 tristate "QLogic ISP4XXX and ISP82XX host adapter family support" 3 tristate "QLogic ISP4XXX and ISP82XX host adapter family support"
3 depends on PCI && SCSI && NET 4 depends on PCI && SCSI && NET
diff --git a/drivers/scsi/qla4xxx/Makefile b/drivers/scsi/qla4xxx/Makefile
index 4230977748cf..1f8a9096c744 100644
--- a/drivers/scsi/qla4xxx/Makefile
+++ b/drivers/scsi/qla4xxx/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1qla4xxx-y := ql4_os.o ql4_init.o ql4_mbx.o ql4_iocb.o ql4_isr.o \ 2qla4xxx-y := ql4_os.o ql4_init.o ql4_mbx.o ql4_iocb.o ql4_isr.o \
2 ql4_nx.o ql4_nvram.o ql4_dbg.o ql4_attr.o ql4_bsg.o ql4_83xx.o 3 ql4_nx.o ql4_nvram.o ql4_dbg.o ql4_attr.o ql4_bsg.o ql4_83xx.o
3 4
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 0e22512bd3e4..9335849f6bea 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* qlogicpti.c: Performance Technologies QlogicISP sbus card driver. 2/* qlogicpti.c: Performance Technologies QlogicISP sbus card driver.
2 * 3 *
3 * Copyright (C) 1996, 2006, 2008 David S. Miller (davem@davemloft.net) 4 * Copyright (C) 1996, 2006, 2008 David S. Miller (davem@davemloft.net)
diff --git a/drivers/scsi/script_asm.pl b/drivers/scsi/script_asm.pl
index 7d651d99afcb..0300f4c5562e 100644
--- a/drivers/scsi/script_asm.pl
+++ b/drivers/scsi/script_asm.pl
@@ -1,4 +1,5 @@
1#!/usr/bin/perl -s 1#!/usr/bin/perl -s
2# SPDX-License-Identifier: GPL-2.0-or-later
2 3
3# NCR 53c810 script assembler 4# NCR 53c810 script assembler
4# Sponsored by 5# Sponsored by
@@ -13,20 +14,6 @@
13# Support for 53c710 (via -ncr7x0_family switch) added by Richard 14# Support for 53c710 (via -ncr7x0_family switch) added by Richard
14# Hirst <richard@sleepie.demon.co.uk> - 15th March 1997 15# Hirst <richard@sleepie.demon.co.uk> - 15th March 1997
15# 16#
16# This program is free software; you can redistribute it and/or modify
17# it under the terms of the GNU General Public License as published by
18# the Free Software Foundation; either version 2 of the License, or
19# (at your option) any later version.
20#
21# This program is distributed in the hope that it will be useful,
22# but WITHOUT ANY WARRANTY; without even the implied warranty of
23# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24# GNU General Public License for more details.
25#
26# You should have received a copy of the GNU General Public License
27# along with this program; if not, write to the Free Software
28# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29#
30# TolerANT and SCSI SCRIPTS are registered trademarks of NCR Corporation. 17# TolerANT and SCSI SCRIPTS are registered trademarks of NCR Corporation.
31# 18#
32 19
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 99a7b9f520ae..653d5ea6c5d9 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * scsi.c Copyright (C) 1992 Drew Eckhardt 3 * scsi.c Copyright (C) 1992 Drew Eckhardt
3 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale 4 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 2740a90501a0..d323523f5f9d 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * vvvvvvvvvvvvvvvvvvvvvvv Original vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 3 * vvvvvvvvvvvvvvvvvvvvvvv Original vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
3 * Copyright (C) 1992 Eric Youngdale 4 * Copyright (C) 1992 Eric Youngdale
@@ -8,13 +9,7 @@
8 * 9 *
9 * Copyright (C) 2001 - 2018 Douglas Gilbert 10 * Copyright (C) 2001 - 2018 Douglas Gilbert
10 * 11 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
15 *
16 * For documentation see http://sg.danny.cz/sg/sdebug26.html 12 * For documentation see http://sg.danny.cz/sg/sdebug26.html
17 *
18 */ 13 */
19 14
20 15
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 8e9680572b9f..bfa569facd5b 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * scsi_error.c Copyright (C) 1997 Eric Youngdale 3 * scsi_error.c Copyright (C) 1997 Eric Youngdale
3 * 4 *
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index 840d96fe81bc..57bcd05605bf 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Changes: 3 * Changes:
3 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 08/23/2000 4 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 08/23/2000
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 0916bd6d22b0..65d0a10c76ad 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Copyright (C) 1999 Eric Youngdale 3 * Copyright (C) 1999 Eric Youngdale
3 * Copyright (C) 2014 Christoph Hellwig 4 * Copyright (C) 2014 Christoph Hellwig
diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index 7639df91b110..48ee68059fe6 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * scsi_pm.c Copyright (C) 2010 Alan Stern 3 * scsi_pm.c Copyright (C) 2010 Alan Stern
3 * 4 *
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 3b119ca0cc0c..dbb206c90ecf 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * scsi_sysfs.c 3 * scsi_sysfs.c
3 * 4 *
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index ebc80354714c..a3406bd62391 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * sd.c Copyright (C) 1992 Drew Eckhardt 3 * sd.c Copyright (C) 1992 Drew Eckhardt
3 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale 4 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale
@@ -2571,7 +2572,6 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
2571 int res; 2572 int res;
2572 struct scsi_device *sdp = sdkp->device; 2573 struct scsi_device *sdp = sdkp->device;
2573 struct scsi_mode_data data; 2574 struct scsi_mode_data data;
2574 int disk_ro = get_disk_ro(sdkp->disk);
2575 int old_wp = sdkp->write_prot; 2575 int old_wp = sdkp->write_prot;
2576 2576
2577 set_disk_ro(sdkp->disk, 0); 2577 set_disk_ro(sdkp->disk, 0);
@@ -2612,7 +2612,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
2612 "Test WP failed, assume Write Enabled\n"); 2612 "Test WP failed, assume Write Enabled\n");
2613 } else { 2613 } else {
2614 sdkp->write_prot = ((data.device_specific & 0x80) != 0); 2614 sdkp->write_prot = ((data.device_specific & 0x80) != 0);
2615 set_disk_ro(sdkp->disk, sdkp->write_prot || disk_ro); 2615 set_disk_ro(sdkp->disk, sdkp->write_prot);
2616 if (sdkp->first_scan || old_wp != sdkp->write_prot) { 2616 if (sdkp->first_scan || old_wp != sdkp->write_prot) {
2617 sd_printk(KERN_NOTICE, sdkp, "Write Protect is %s\n", 2617 sd_printk(KERN_NOTICE, sdkp, "Write Protect is %s\n",
2618 sdkp->write_prot ? "on" : "off"); 2618 sdkp->write_prot ? "on" : "off");
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index d3f15319b9b3..cce757506383 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * History: 3 * History:
3 * Started: Aug 9 by Lawrence Foard (entropy@world.std.com), 4 * Started: Aug 9 by Lawrence Foard (entropy@world.std.com),
@@ -8,12 +9,6 @@
8 * Copyright (C) 1992 Lawrence Foard 9 * Copyright (C) 1992 Lawrence Foard
9 * Version 2 and 3 extensions to driver: 10 * Version 2 and 3 extensions to driver:
10 * Copyright (C) 1998 - 2014 Douglas Gilbert 11 * Copyright (C) 1998 - 2014 Douglas Gilbert
11 *
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 */ 12 */
18 13
19static int sg_version_num = 30536; /* 2 digits for each component */ 14static int sg_version_num = 30536; /* 2 digits for each component */
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
index 82ed99848378..22302612e032 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -1,20 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * sim710.c - Copyright (C) 1999 Richard Hirst <richard@sleepie.demon.co.uk> 3 * sim710.c - Copyright (C) 1999 Richard Hirst <richard@sleepie.demon.co.uk>
3 * 4 *
4 *---------------------------------------------------------------------------- 5 *----------------------------------------------------------------------------
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 *---------------------------------------------------------------------------- 6 *----------------------------------------------------------------------------
19 * 7 *
20 * MCA card detection code by Trent McNair. (now deleted) 8 * MCA card detection code by Trent McNair. (now deleted)
@@ -23,7 +11,6 @@
23 * Auto probing of EISA config space from Trevor Hemsley. 11 * Auto probing of EISA config space from Trevor Hemsley.
24 * 12 *
25 * Rewritten to use 53c700.c by James.Bottomley@SteelEye.com 13 * Rewritten to use 53c700.c by James.Bottomley@SteelEye.com
26 *
27 */ 14 */
28 15
29#include <linux/module.h> 16#include <linux/module.h>
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index c26cac819f9e..b17761eafca9 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2755,16 +2755,25 @@ static void pqi_process_raid_io_error(struct pqi_io_request *io_request)
2755 scsi_normalize_sense(error_info->data, 2755 scsi_normalize_sense(error_info->data,
2756 sense_data_length, &sshdr) && 2756 sense_data_length, &sshdr) &&
2757 sshdr.sense_key == HARDWARE_ERROR && 2757 sshdr.sense_key == HARDWARE_ERROR &&
2758 sshdr.asc == 0x3e && 2758 sshdr.asc == 0x3e) {
2759 sshdr.ascq == 0x1) {
2760 struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host); 2759 struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host);
2761 struct pqi_scsi_dev *device = scmd->device->hostdata; 2760 struct pqi_scsi_dev *device = scmd->device->hostdata;
2762 2761
2763 if (printk_ratelimit()) 2762 switch (sshdr.ascq) {
2764 scmd_printk(KERN_ERR, scmd, "received 'logical unit failure' from controller for scsi %d:%d:%d:%d\n", 2763 case 0x1: /* LOGICAL UNIT FAILURE */
2765 ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun); 2764 if (printk_ratelimit())
2766 pqi_take_device_offline(scmd->device, "RAID"); 2765 scmd_printk(KERN_ERR, scmd, "received 'logical unit failure' from controller for scsi %d:%d:%d:%d\n",
2767 host_byte = DID_NO_CONNECT; 2766 ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun);
2767 pqi_take_device_offline(scmd->device, "RAID");
2768 host_byte = DID_NO_CONNECT;
2769 break;
2770
2771 default: /* See http://www.t10.org/lists/asc-num.htm#ASC_3E */
2772 if (printk_ratelimit())
2773 scmd_printk(KERN_ERR, scmd, "received unhandled error %d from controller for scsi %d:%d:%d:%d\n",
2774 sshdr.ascq, ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun);
2775 break;
2776 }
2768 } 2777 }
2769 2778
2770 if (sense_data_length > SCSI_SENSE_BUFFERSIZE) 2779 if (sense_data_length > SCSI_SENSE_BUFFERSIZE)
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c
index 1f9a087daf69..aef4881d8e21 100644
--- a/drivers/scsi/sni_53c710.c
+++ b/drivers/scsi/sni_53c710.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* -*- mode: c; c-basic-offset: 8 -*- */ 2/* -*- mode: c; c-basic-offset: 8 -*- */
2 3
3/* SNI RM driver 4/* SNI RM driver
@@ -5,19 +6,6 @@
5 * Copyright (C) 2001 by James.Bottomley@HansenPartnership.com 6 * Copyright (C) 2001 by James.Bottomley@HansenPartnership.com
6**----------------------------------------------------------------------------- 7**-----------------------------------------------------------------------------
7** 8**
8** This program is free software; you can redistribute it and/or modify
9** it under the terms of the GNU General Public License as published by
10** the Free Software Foundation; either version 2 of the License, or
11** (at your option) any later version.
12**
13** This program is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** GNU General Public License for more details.
17**
18** You should have received a copy of the GNU General Public License
19** along with this program; if not, write to the Free Software
20** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21** 9**
22**----------------------------------------------------------------------------- 10**-----------------------------------------------------------------------------
23 */ 11 */
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index c3f443d5aea8..4664fdf75c0f 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * sr.c Copyright (C) 1992 David Giller 3 * sr.c Copyright (C) 1992 David Giller
3 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale 4 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 3c6a18ad9a87..baada5b50bb1 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 SCSI Tape Driver for Linux version 1.1 and newer. See the accompanying 3 SCSI Tape Driver for Linux version 1.1 and newer. See the accompanying
3 file Documentation/scsi/st.txt for more information. 4 file Documentation/scsi/st.txt for more information.
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index 95a7ea7eefa0..3d80ab67a626 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Sun3 SCSI stuff by Erik Verbruggen (erik@bigmama.xtdnet.nl) 3 * Sun3 SCSI stuff by Erik Verbruggen (erik@bigmama.xtdnet.nl)
3 * 4 *
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c
index c9a55d0f076d..440a73eae647 100644
--- a/drivers/scsi/sun3x_esp.c
+++ b/drivers/scsi/sun3x_esp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* sun3x_esp.c: ESP front-end for Sun3x systems. 2/* sun3x_esp.c: ESP front-end for Sun3x systems.
2 * 3 *
3 * Copyright (C) 2007,2008 Thomas Bogendoerfer (tsbogend@alpha.franken.de) 4 * Copyright (C) 2007,2008 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index c71bd01fef94..964130d2c8a6 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* sun_esp.c: ESP front-end for Sparc SBUS systems. 2/* sun_esp.c: ESP front-end for Sparc SBUS systems.
2 * 3 *
3 * Copyright (C) 2007, 2008 David S. Miller (davem@davemloft.net) 4 * Copyright (C) 2007, 2008 David S. Miller (davem@davemloft.net)
diff --git a/drivers/scsi/sym53c8xx_2/Makefile b/drivers/scsi/sym53c8xx_2/Makefile
index 873e8ced8252..0751e2a0cd82 100644
--- a/drivers/scsi/sym53c8xx_2/Makefile
+++ b/drivers/scsi/sym53c8xx_2/Makefile
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only
1# Makefile for the NCR/SYMBIOS/LSI 53C8XX PCI SCSI controllers driver. 2# Makefile for the NCR/SYMBIOS/LSI 53C8XX PCI SCSI controllers driver.
2 3
3sym53c8xx-objs := sym_fw.o sym_glue.o sym_hipd.o sym_malloc.o sym_nvram.o 4sym53c8xx-objs := sym_fw.o sym_glue.o sym_hipd.o sym_malloc.o sym_nvram.o
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index c47d38bca948..13f1b3b9923a 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Virtio SCSI HBA driver 3 * Virtio SCSI HBA driver
3 * 4 *
@@ -7,10 +8,6 @@
7 * Authors: 8 * Authors:
8 * Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> 9 * Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
9 * Paolo Bonzini <pbonzini@redhat.com> 10 * Paolo Bonzini <pbonzini@redhat.com>
10 *
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
13 *
14 */ 11 */
15 12
16#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 13#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index 74be04f2357c..f965a3ee9ce5 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -1,17 +1,8 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 * Copyright (c) 1996 John Shifflett, GeoLog Consulting 3 * Copyright (c) 1996 John Shifflett, GeoLog Consulting
3 * john@geolog.com 4 * john@geolog.com
4 * jshiffle@netcom.com 5 * jshiffle@netcom.com
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */ 6 */
16 7
17/* 8/*
diff --git a/drivers/scsi/wd33c93.h b/drivers/scsi/wd33c93.h
index 08abe508e9ad..2edec34c5a42 100644
--- a/drivers/scsi/wd33c93.h
+++ b/drivers/scsi/wd33c93.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0-or-later */
1/* 2/*
2 * wd33c93.h - Linux device driver definitions for the 3 * wd33c93.h - Linux device driver definitions for the
3 * Commodore Amiga A2091/590 SCSI controller card 4 * Commodore Amiga A2091/590 SCSI controller card
@@ -7,17 +8,6 @@
7 * Copyright (c) 1996 John Shifflett, GeoLog Consulting 8 * Copyright (c) 1996 John Shifflett, GeoLog Consulting
8 * john@geolog.com 9 * john@geolog.com
9 * jshiffle@netcom.com 10 * jshiffle@netcom.com
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
15 *
16 * This program 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
19 * GNU General Public License for more details.
20 *
21 */ 11 */
22#ifndef WD33C93_H 12#ifndef WD33C93_H
23#define WD33C93_H 13#define WD33C93_H
diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c
index e3310e9488d2..c2f40068f235 100644
--- a/drivers/scsi/wd719x.c
+++ b/drivers/scsi/wd719x.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Driver for Western Digital WD7193, WD7197 and WD7296 SCSI cards 3 * Driver for Western Digital WD7193, WD7197 and WD7296 SCSI cards
3 * Copyright 2013 Ondrej Zary 4 * Copyright 2013 Ondrej Zary
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 4722660958f8..77bce208210e 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Zalon 53c7xx device driver. 3 * Zalon 53c7xx device driver.
3 * By Richard Hirst (rhirst@linuxcare.com) 4 * By Richard Hirst (rhirst@linuxcare.com)
diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c
index aff31991aea9..27b9e2baab1a 100644
--- a/drivers/scsi/zorro7xx.c
+++ b/drivers/scsi/zorro7xx.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-only
1/* 2/*
2 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux. 3 * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
3 * Amiga MacroSystemUS WarpEngine SCSI controller. 4 * Amiga MacroSystemUS WarpEngine SCSI controller.