Commit 12dcd10f authored by Pat Gefre's avatar Pat Gefre Committed by Tony Luck

[IA64] qla1280.c Mod for Altix I/O add code.

Changes inside CONFIG_IA64_GENERIC CONFIG_IA64_SGI_SN2
Need to include sn/io.h for generic builds (sn_+pci_set_vchan def)
Remove rrb alloc - now done in PROM
Remove endian setting - now done in PROM
Change arg 2 for sn_pci_set_vchan()

Acked-by: Jes Sorenson
Signed-off-by: default avatarPatrick Gefre <pfg@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent eccaedd5
......@@ -364,6 +364,10 @@
#include "sd.h"
#endif
#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
#include <asm/sn/io.h>
#endif
#if LINUX_VERSION_CODE < 0x020407
#error "Kernels older than 2.4.7 are no longer supported"
#endif
......@@ -422,13 +426,6 @@
#define QLA_64BIT_PTR 1
#endif
#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
#include <asm/sn/pci/pciio.h>
/* Ugly hack needed for the virtual channel fix on SN2 */
extern int snia_pcibr_rrb_alloc(struct pci_dev *pci_dev,
int *count_vchan0, int *count_vchan1);
#endif
#ifdef QLA_64BIT_PTR
#define pci_dma_hi32(a) ((a >> 16) >> 16)
#else
......@@ -1762,19 +1759,9 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha)
ha->flags.ints_enabled = 0;
#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
if (ia64_platform_is("sn2")) {
int count1, count2;
int c;
count1 = 3;
count2 = 3;
printk(KERN_INFO "scsi(%li): Enabling SN2 PCI DMA "
"dual channel lockup workaround\n", ha->host_no);
if ((c = snia_pcibr_rrb_alloc(ha->pdev, &count1, &count2)) < 0)
printk(KERN_ERR "scsi(%li): Unable to allocate SN2 "
"virtual DMA channels\n", ha->host_no);
else
ha->flags.use_pci_vchannel = 1;
ha->flags.use_pci_vchannel = 1;
driver_setup.no_nvram = 1;
}
#endif
......@@ -3272,7 +3259,8 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
dma_handle = sg_dma_address(sg);
#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
if (ha->flags.use_pci_vchannel)
sn_pci_set_vchan(ha->pdev, &dma_handle,
sn_pci_set_vchan(ha->pdev,
(unsigned long *)&dma_handle,
SCSI_BUS_32(cmd));
#endif
*dword_ptr++ =
......@@ -3330,7 +3318,8 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
dma_handle = sg_dma_address(sg);
#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
if (ha->flags.use_pci_vchannel)
sn_pci_set_vchan(ha->pdev, &dma_handle,
sn_pci_set_vchan(ha->pdev,
(unsigned long *)&dma_handle,
SCSI_BUS_32(cmd));
#endif
*dword_ptr++ =
......@@ -3364,7 +3353,8 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
sp->saved_dma_handle = dma_handle;
#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2)
if (ha->flags.use_pci_vchannel)
sn_pci_set_vchan(ha->pdev, &dma_handle,
sn_pci_set_vchan(ha->pdev,
(unsigned long *)&dma_handle,
SCSI_BUS_32(cmd));
#endif
*dword_ptr++ = cpu_to_le32(pci_dma_lo32(dma_handle));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment