Commit 62ac5aed authored by Miquel van Smoorenburg's avatar Miquel van Smoorenburg Committed by James Bottomley

[SCSI] dpt_i2o: 64 bit support

This is the code to actually support 64 bit platforms. 64 bit
DMA is enabled on both x86_32 PAE and 64 bit platforms.

This code is based in part on the unofficial adaptec 64-bit
dpt_i2o driver update that I got from Mark Salyzyn at Adaptec.
Signed-off-by: default avatarMiquel van Smoorenburg <miquels@cistron.nl>
Acked-by: default avatarMark Salyzyn <Mark_Salyzyn@adaptec.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 67af2b06
...@@ -504,10 +504,9 @@ config SCSI_AIC7XXX_OLD ...@@ -504,10 +504,9 @@ config SCSI_AIC7XXX_OLD
source "drivers/scsi/aic7xxx/Kconfig.aic79xx" source "drivers/scsi/aic7xxx/Kconfig.aic79xx"
source "drivers/scsi/aic94xx/Kconfig" source "drivers/scsi/aic94xx/Kconfig"
# All the I2O code and drivers do not seem to be 64bit safe.
config SCSI_DPT_I2O config SCSI_DPT_I2O
tristate "Adaptec I2O RAID support " tristate "Adaptec I2O RAID support "
depends on !64BIT && SCSI && PCI && VIRT_TO_BUS depends on SCSI && PCI && VIRT_TO_BUS
help help
This driver supports all of Adaptec's I2O based RAID controllers as This driver supports all of Adaptec's I2O based RAID controllers as
well as the DPT SmartRaid V cards. This is an Adaptec maintained well as the DPT SmartRaid V cards. This is an Adaptec maintained
......
...@@ -89,7 +89,7 @@ typedef struct { ...@@ -89,7 +89,7 @@ typedef struct {
int njobs; /* # of jobs sent to HA */ int njobs; /* # of jobs sent to HA */
int qdepth; /* Controller queue depth. */ int qdepth; /* Controller queue depth. */
int wakebase; /* mpx wakeup base index. */ int wakebase; /* mpx wakeup base index. */
uLONG SGsize; /* Scatter/Gather list size. */ uINT SGsize; /* Scatter/Gather list size. */
unsigned heads; /* heads for drives on cntlr. */ unsigned heads; /* heads for drives on cntlr. */
unsigned sectors; /* sectors for drives on cntlr. */ unsigned sectors; /* sectors for drives on cntlr. */
uCHAR do_drive32; /* Flag for Above 16 MB Ability */ uCHAR do_drive32; /* Flag for Above 16 MB Ability */
...@@ -97,8 +97,8 @@ typedef struct { ...@@ -97,8 +97,8 @@ typedef struct {
char idPAL[4]; /* 4 Bytes Of The ID Pal */ char idPAL[4]; /* 4 Bytes Of The ID Pal */
uCHAR primary; /* 1 For Primary, 0 For Secondary */ uCHAR primary; /* 1 For Primary, 0 For Secondary */
uCHAR eataVersion; /* EATA Version */ uCHAR eataVersion; /* EATA Version */
uLONG cpLength; /* EATA Command Packet Length */ uINT cpLength; /* EATA Command Packet Length */
uLONG spLength; /* EATA Status Packet Length */ uINT spLength; /* EATA Status Packet Length */
uCHAR drqNum; /* DRQ Index (0,5,6,7) */ uCHAR drqNum; /* DRQ Index (0,5,6,7) */
uCHAR flag1; /* EATA Flags 1 (Byte 9) */ uCHAR flag1; /* EATA Flags 1 (Byte 9) */
uCHAR flag2; /* EATA Flags 2 (Byte 30) */ uCHAR flag2; /* EATA Flags 2 (Byte 30) */
...@@ -107,23 +107,23 @@ typedef struct { ...@@ -107,23 +107,23 @@ typedef struct {
typedef struct { typedef struct {
uSHORT length; // Remaining length of this uSHORT length; // Remaining length of this
uSHORT drvrHBAnum; // Relative HBA # used by the driver uSHORT drvrHBAnum; // Relative HBA # used by the driver
uLONG baseAddr; // Base I/O address uINT baseAddr; // Base I/O address
uSHORT blinkState; // Blink LED state (0=Not in blink LED) uSHORT blinkState; // Blink LED state (0=Not in blink LED)
uCHAR pciBusNum; // PCI Bus # (Optional) uCHAR pciBusNum; // PCI Bus # (Optional)
uCHAR pciDeviceNum; // PCI Device # (Optional) uCHAR pciDeviceNum; // PCI Device # (Optional)
uSHORT hbaFlags; // Miscellaneous HBA flags uSHORT hbaFlags; // Miscellaneous HBA flags
uSHORT Interrupt; // Interrupt set for this device. uSHORT Interrupt; // Interrupt set for this device.
# if (defined(_DPT_ARC)) # if (defined(_DPT_ARC))
uLONG baseLength; uINT baseLength;
ADAPTER_OBJECT *AdapterObject; ADAPTER_OBJECT *AdapterObject;
LARGE_INTEGER DmaLogicalAddress; LARGE_INTEGER DmaLogicalAddress;
PVOID DmaVirtualAddress; PVOID DmaVirtualAddress;
LARGE_INTEGER ReplyLogicalAddress; LARGE_INTEGER ReplyLogicalAddress;
PVOID ReplyVirtualAddress; PVOID ReplyVirtualAddress;
# else # else
uLONG reserved1; // Reserved for future expansion uINT reserved1; // Reserved for future expansion
uLONG reserved2; // Reserved for future expansion uINT reserved2; // Reserved for future expansion
uLONG reserved3; // Reserved for future expansion uINT reserved3; // Reserved for future expansion
# endif # endif
} drvrHBAinfo_S; } drvrHBAinfo_S;
......
...@@ -33,11 +33,7 @@ ...@@ -33,11 +33,7 @@
/* to make sure we are talking the same size under all OS's */ /* to make sure we are talking the same size under all OS's */
typedef unsigned char sigBYTE; typedef unsigned char sigBYTE;
typedef unsigned short sigWORD; typedef unsigned short sigWORD;
#if (defined(_MULTI_DATAMODEL) && defined(sun) && !defined(_ILP32)) typedef unsigned int sigINT;
typedef uint32_t sigLONG;
#else
typedef unsigned long sigLONG;
#endif
/* /*
* use sigWORDLittleEndian for: * use sigWORDLittleEndian for:
...@@ -300,7 +296,7 @@ typedef struct dpt_sig { ...@@ -300,7 +296,7 @@ typedef struct dpt_sig {
sigBYTE dsFiletype; /* type of file */ sigBYTE dsFiletype; /* type of file */
sigBYTE dsFiletypeFlags; /* flags to specify load type, etc. */ sigBYTE dsFiletypeFlags; /* flags to specify load type, etc. */
sigBYTE dsOEM; /* OEM file was created for */ sigBYTE dsOEM; /* OEM file was created for */
sigLONG dsOS; /* which Operating systems */ sigINT dsOS; /* which Operating systems */
sigWORD dsCapabilities; /* RAID levels, etc. */ sigWORD dsCapabilities; /* RAID levels, etc. */
sigWORD dsDeviceSupp; /* Types of SCSI devices supported */ sigWORD dsDeviceSupp; /* Types of SCSI devices supported */
sigWORD dsAdapterSupp; /* DPT adapter families supported */ sigWORD dsAdapterSupp; /* DPT adapter families supported */
......
...@@ -145,8 +145,8 @@ ...@@ -145,8 +145,8 @@
uCHAR smartROMRevision; uCHAR smartROMRevision;
uSHORT flags; /* See bit definitions above */ uSHORT flags; /* See bit definitions above */
uSHORT conventionalMemSize; /* in KB */ uSHORT conventionalMemSize; /* in KB */
uLONG extendedMemSize; /* in KB */ uINT extendedMemSize; /* in KB */
uLONG osType; /* Same as DPTSIG's definition */ uINT osType; /* Same as DPTSIG's definition */
uCHAR osMajorVersion; uCHAR osMajorVersion;
uCHAR osMinorVersion; /* The OS version */ uCHAR osMinorVersion; /* The OS version */
uCHAR osRevision; uCHAR osRevision;
......
This diff is collapsed.
...@@ -233,6 +233,7 @@ typedef struct _adpt_hba { ...@@ -233,6 +233,7 @@ typedef struct _adpt_hba {
u8 top_scsi_channel; u8 top_scsi_channel;
u8 top_scsi_id; u8 top_scsi_id;
u8 top_scsi_lun; u8 top_scsi_lun;
u8 dma64;
i2o_status_block* status_block; i2o_status_block* status_block;
dma_addr_t status_block_pa; dma_addr_t status_block_pa;
...@@ -252,6 +253,7 @@ typedef struct _adpt_hba { ...@@ -252,6 +253,7 @@ typedef struct _adpt_hba {
void __iomem *FwDebugBLEDflag_P;// Virtual Addr Of FW Debug BLED void __iomem *FwDebugBLEDflag_P;// Virtual Addr Of FW Debug BLED
void __iomem *FwDebugBLEDvalue_P;// Virtual Addr Of FW Debug BLED void __iomem *FwDebugBLEDvalue_P;// Virtual Addr Of FW Debug BLED
u32 FwDebugFlags; u32 FwDebugFlags;
u32 *ioctl_reply_context[4];
} adpt_hba; } adpt_hba;
struct sg_simple_element { struct sg_simple_element {
......
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