Skip to content

Commit 62ac5ae

Browse files
Miquel van Smoorenburgjejb
authored andcommitted
[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: Miquel van Smoorenburg <miquels@cistron.nl> Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent 67af2b0 commit 62ac5ae

6 files changed

Lines changed: 260 additions & 53 deletions

File tree

‎drivers/scsi/Kconfig‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,9 @@ config SCSI_AIC7XXX_OLD
504504
source "drivers/scsi/aic7xxx/Kconfig.aic79xx"
505505
source "drivers/scsi/aic94xx/Kconfig"
506506

507-
# All the I2O code and drivers do not seem to be 64bit safe.
508507
config SCSI_DPT_I2O
509508
tristate "Adaptec I2O RAID support "
510-
depends on !64BIT && SCSI && PCI && VIRT_TO_BUS
509+
depends on SCSI && PCI && VIRT_TO_BUS
511510
help
512511
This driver supports all of Adaptec's I2O based RAID controllers as
513512
well as the DPT SmartRaid V cards. This is an Adaptec maintained

‎drivers/scsi/dpt/dpti_ioctl.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ typedef struct {
8989
int njobs; /* # of jobs sent to HA */
9090
int qdepth; /* Controller queue depth. */
9191
int wakebase; /* mpx wakeup base index. */
92-
uLONG SGsize; /* Scatter/Gather list size. */
92+
uINT SGsize; /* Scatter/Gather list size. */
9393
unsigned heads; /* heads for drives on cntlr. */
9494
unsigned sectors; /* sectors for drives on cntlr. */
9595
uCHAR do_drive32; /* Flag for Above 16 MB Ability */
9696
uCHAR BusQuiet; /* SCSI Bus Quiet Flag */
9797
char idPAL[4]; /* 4 Bytes Of The ID Pal */
9898
uCHAR primary; /* 1 For Primary, 0 For Secondary */
9999
uCHAR eataVersion; /* EATA Version */
100-
uLONG cpLength; /* EATA Command Packet Length */
101-
uLONG spLength; /* EATA Status Packet Length */
100+
uINT cpLength; /* EATA Command Packet Length */
101+
uINT spLength; /* EATA Status Packet Length */
102102
uCHAR drqNum; /* DRQ Index (0,5,6,7) */
103103
uCHAR flag1; /* EATA Flags 1 (Byte 9) */
104104
uCHAR flag2; /* EATA Flags 2 (Byte 30) */
@@ -107,23 +107,23 @@ typedef struct {
107107
typedef struct {
108108
uSHORT length; // Remaining length of this
109109
uSHORT drvrHBAnum; // Relative HBA # used by the driver
110-
uLONG baseAddr; // Base I/O address
110+
uINT baseAddr; // Base I/O address
111111
uSHORT blinkState; // Blink LED state (0=Not in blink LED)
112112
uCHAR pciBusNum; // PCI Bus # (Optional)
113113
uCHAR pciDeviceNum; // PCI Device # (Optional)
114114
uSHORT hbaFlags; // Miscellaneous HBA flags
115115
uSHORT Interrupt; // Interrupt set for this device.
116116
# if (defined(_DPT_ARC))
117-
uLONG baseLength;
117+
uINT baseLength;
118118
ADAPTER_OBJECT *AdapterObject;
119119
LARGE_INTEGER DmaLogicalAddress;
120120
PVOID DmaVirtualAddress;
121121
LARGE_INTEGER ReplyLogicalAddress;
122122
PVOID ReplyVirtualAddress;
123123
# else
124-
uLONG reserved1; // Reserved for future expansion
125-
uLONG reserved2; // Reserved for future expansion
126-
uLONG reserved3; // Reserved for future expansion
124+
uINT reserved1; // Reserved for future expansion
125+
uINT reserved2; // Reserved for future expansion
126+
uINT reserved3; // Reserved for future expansion
127127
# endif
128128
} drvrHBAinfo_S;
129129

‎drivers/scsi/dpt/dptsig.h‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@
3333
/* to make sure we are talking the same size under all OS's */
3434
typedef unsigned char sigBYTE;
3535
typedef unsigned short sigWORD;
36-
#if (defined(_MULTI_DATAMODEL) && defined(sun) && !defined(_ILP32))
37-
typedef uint32_t sigLONG;
38-
#else
39-
typedef unsigned long sigLONG;
40-
#endif
36+
typedef unsigned int sigINT;
4137

4238
/*
4339
* use sigWORDLittleEndian for:
@@ -300,7 +296,7 @@ typedef struct dpt_sig {
300296
sigBYTE dsFiletype; /* type of file */
301297
sigBYTE dsFiletypeFlags; /* flags to specify load type, etc. */
302298
sigBYTE dsOEM; /* OEM file was created for */
303-
sigLONG dsOS; /* which Operating systems */
299+
sigINT dsOS; /* which Operating systems */
304300
sigWORD dsCapabilities; /* RAID levels, etc. */
305301
sigWORD dsDeviceSupp; /* Types of SCSI devices supported */
306302
sigWORD dsAdapterSupp; /* DPT adapter families supported */

‎drivers/scsi/dpt/sys_info.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@
145145
uCHAR smartROMRevision;
146146
uSHORT flags; /* See bit definitions above */
147147
uSHORT conventionalMemSize; /* in KB */
148-
uLONG extendedMemSize; /* in KB */
149-
uLONG osType; /* Same as DPTSIG's definition */
148+
uINT extendedMemSize; /* in KB */
149+
uINT osType; /* Same as DPTSIG's definition */
150150
uCHAR osMajorVersion;
151151
uCHAR osMinorVersion; /* The OS version */
152152
uCHAR osRevision;

0 commit comments

Comments
 (0)