]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/scsi/qla1280.c
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / drivers / scsi / qla1280.c
index 6856dfdfa47383d5e41141cccdc3826f2b7fd7bf..832af42130467a5d9eb67a42b7c1a5eaae938274 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /******************************************************************************
 *                  QLOGIC LINUX SOFTWARE
 *
@@ -6,16 +7,6 @@
 * Copyright (C) 2001-2004 Jes Sorensen, Wild Open Source Inc.
 * Copyright (C) 2003-2004 Christoph Hellwig
 *
-* This program is free software; you can redistribute it and/or modify it
-* under the terms of the GNU General Public License as published by the
-* Free Software Foundation; either version 2, or (at your option) any
-* later version.
-*
-* This program is distributed in the hope that it will be useful, but
-* WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* General Public License for more details.
-*
 ******************************************************************************/
 #define QLA1280_VERSION      "3.27.1"
 /*****************************************************************************
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_tcq.h>
 
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-#include <asm/sn/io.h>
-#endif
-
 
 /*
  * Compile time Options:
 
 #define NVRAM_DELAY()                  udelay(500)     /* 2 microseconds */
 
-#if defined(__ia64__) && !defined(ia64_platform_is)
-#define ia64_platform_is(foo)          (!strcmp(x, platform_name))
-#endif
-
-
 #define IS_ISP1040(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020)
 #define IS_ISP1x40(ha) (ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1020 || \
                        ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP1240)
@@ -1436,15 +1418,6 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha)
        ha->flags.reset_active = 0;
        ha->flags.abort_isp_active = 0;
 
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-       if (ia64_platform_is("sn2")) {
-               printk(KERN_INFO "scsi(%li): Enabling SN2 PCI DMA "
-                      "dual channel lockup workaround\n", ha->host_no);
-               ha->flags.use_pci_vchannel = 1;
-               driver_setup.no_nvram = 1;
-       }
-#endif
-
        /* TODO: implement support for the 1040 nvram format */
        if (IS_ISP1040(ha))
                driver_setup.no_nvram = 1;
@@ -2260,13 +2233,6 @@ qla1280_nvram_config(struct scsi_qla_host *ha)
        mb[1] = nv->firmware_feature.f.enable_fast_posting;
        mb[1] |= nv->firmware_feature.f.report_lvd_bus_transition << 1;
        mb[1] |= nv->firmware_feature.f.disable_synchronous_backoff << 5;
-#if defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_SGI_SN2)
-       if (ia64_platform_is("sn2")) {
-               printk(KERN_INFO "scsi(%li): Enabling SN2 PCI DMA "
-                      "workaround\n", ha->host_no);
-               mb[1] |= nv->firmware_feature.f.unused_9 << 9; /* XXX */
-       }
-#endif
        status |= qla1280_mailbox_command(ha, BIT_1 | BIT_0, mb);
 
        /* Retry count and delay. */
@@ -2897,12 +2863,6 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
                                break;
 
                        dma_handle = sg_dma_address(s);
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-                       if (ha->flags.use_pci_vchannel)
-                               sn_pci_set_vchan(ha->pdev,
-                                                (unsigned long *)&dma_handle,
-                                                SCSI_BUS_32(cmd));
-#endif
                        *dword_ptr++ =
                                cpu_to_le32(lower_32_bits(dma_handle));
                        *dword_ptr++ =
@@ -2959,12 +2919,6 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
                                if (cnt == 5)
                                        break;
                                dma_handle = sg_dma_address(s);
-#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
-                               if (ha->flags.use_pci_vchannel)
-                                       sn_pci_set_vchan(ha->pdev,
-                                                        (unsigned long *)&dma_handle,
-                                                        SCSI_BUS_32(cmd));
-#endif
                                *dword_ptr++ =
                                        cpu_to_le32(lower_32_bits(dma_handle));
                                *dword_ptr++ =
@@ -3004,8 +2958,6 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
        sp->flags |= SRB_SENT;
        ha->actthreads++;
        WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index);
-       /* Enforce mmio write ordering; see comment in qla1280_isp_cmd(). */
-       mmiowb();
 
  out:
        if (status)
@@ -3254,8 +3206,6 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
        sp->flags |= SRB_SENT;
        ha->actthreads++;
        WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index);
-       /* Enforce mmio write ordering; see comment in qla1280_isp_cmd(). */
-       mmiowb();
 
 out:
        if (status)
@@ -3367,19 +3317,8 @@ qla1280_isp_cmd(struct scsi_qla_host *ha)
 
        /*
         * Update request index to mailbox4 (Request Queue In).
-        * The mmiowb() ensures that this write is ordered with writes by other
-        * CPUs.  Without the mmiowb(), it is possible for the following:
-        *    CPUA posts write of index 5 to mailbox4
-        *    CPUA releases host lock
-        *    CPUB acquires host lock
-        *    CPUB posts write of index 6 to mailbox4
-        *    On PCI bus, order reverses and write of 6 posts, then index 5,
-        *       causing chip to issue full queue of stale commands
-        * The mmiowb() prevents future writes from crossing the barrier.
-        * See Documentation/driver-api/device-io.rst for more information.
         */
        WRT_REG_WORD(&reg->mailbox4, ha->req_ring_index);
-       mmiowb();
 
        LEAVE("qla1280_isp_cmd");
 }