Commit f4e7ddb6 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by James Bottomley

[PATCH] kill obsolete typedefs and wrappers from tmscsim

Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent f51608c8
This diff is collapsed.
This diff is collapsed.
...@@ -29,215 +29,167 @@ typedef u16 USHORT; /* 16 bits */ ...@@ -29,215 +29,167 @@ typedef u16 USHORT; /* 16 bits */
typedef u32 UINT; /* 32 bits */ typedef u32 UINT; /* 32 bits */
typedef unsigned long ULONG; /* 32/64 bits */ typedef unsigned long ULONG; /* 32/64 bits */
typedef UCHAR *PUCHAR;
typedef USHORT *PUSHORT;
typedef UINT *PUINT;
typedef ULONG *PULONG;
typedef Scsi_Host_Template *PSHT;
typedef struct Scsi_Host *PSH;
typedef Scsi_Device *PSCSIDEV;
typedef Scsi_Cmnd *PSCSICMD;
typedef void *PVOID;
typedef struct scatterlist *PSGL, SGL;
/*;-----------------------------------------------------------------------*/
typedef struct _SyncMsg
{
UCHAR ExtendMsg;
UCHAR ExtMsgLen;
UCHAR SyncXferReq;
UCHAR Period;
UCHAR ReqOffset;
} SyncMsg;
/*;-----------------------------------------------------------------------*/
typedef struct _Capacity
{
ULONG BlockCount;
ULONG BlockLength;
} Capacity;
/*;-----------------------------------------------------------------------*/
typedef struct _SGentry
{
ULONG SGXferDataPtr;
ULONG SGXferDataLen;
} SGentry;
typedef struct _SGentry1
{
ULONG SGXLen;
ULONG SGXPtr;
} SGentry1, *PSGE;
/* /*
;----------------------------------------------------------------------- ;-----------------------------------------------------------------------
; SCSI Request Block ; SCSI Request Block
;----------------------------------------------------------------------- ;-----------------------------------------------------------------------
*/ */
struct _SRB struct dc390_srb
{ {
//UCHAR CmdBlock[12]; //u8 CmdBlock[12];
struct _SRB *pNextSRB; struct dc390_srb *pNextSRB;
struct _DCB *pSRBDCB; struct dc390_dcb *pSRBDCB;
PSCSICMD pcmd; struct scsi_cmnd *pcmd;
PSGL pSegmentList; struct scatterlist *pSegmentList;
/* 0x10: */ /* 0x10: */
SGL Segmentx; /* make a one entry of S/G list table */ struct scatterlist Segmentx; /* make a one entry of S/G list table */
/* 0x1c: */ /* 0x1c: */
ULONG SGBusAddr; /*;a segment starting address as seen by AM53C974A*/ unsigned long SGBusAddr; /*;a segment starting address as seen by AM53C974A*/
ULONG SGToBeXferLen; /*; to be xfer length */ unsigned long SGToBeXferLen; /*; to be xfer length */
ULONG TotalXferredLen; unsigned long TotalXferredLen;
ULONG SavedTotXLen; unsigned long SavedTotXLen;
UINT SRBState; u32 SRBState;
/* 0x30: */ /* 0x30: */
UCHAR SRBStatus; u8 SRBStatus;
UCHAR SRBFlag; /*; b0-AutoReqSense,b6-Read,b7-write */ u8 SRBFlag; /*; b0-AutoReqSense,b6-Read,b7-write */
/*; b4-settimeout,b5-Residual valid */ /*; b4-settimeout,b5-Residual valid */
UCHAR AdaptStatus; u8 AdaptStatus;
UCHAR TargetStatus; u8 TargetStatus;
UCHAR ScsiPhase; u8 ScsiPhase;
UCHAR TagNumber; u8 TagNumber;
UCHAR SGIndex; u8 SGIndex;
UCHAR SGcount; u8 SGcount;
/* 0x38: */ /* 0x38: */
UCHAR MsgCnt; u8 MsgCnt;
UCHAR EndMessage; u8 EndMessage;
UCHAR RetryCnt; u8 RetryCnt;
UCHAR SavedSGCount; u8 SavedSGCount;
ULONG Saved_Ptr; unsigned long Saved_Ptr;
/* 0x40: */ /* 0x40: */
UCHAR MsgInBuf[6]; u8 MsgInBuf[6];
UCHAR MsgOutBuf[6]; u8 MsgOutBuf[6];
//UCHAR IORBFlag; /*;81h-Reset, 2-retry */ //u8 IORBFlag; /*;81h-Reset, 2-retry */
/* 0x4c: */ /* 0x4c: */
}; };
typedef struct _SRB DC390_SRB, *PSRB;
/* /*
;----------------------------------------------------------------------- ;-----------------------------------------------------------------------
; Device Control Block ; Device Control Block
;----------------------------------------------------------------------- ;-----------------------------------------------------------------------
*/ */
struct _DCB struct dc390_dcb
{ {
struct _DCB *pNextDCB; struct dc390_dcb *pNextDCB;
struct _ACB *pDCBACB; struct dc390_acb *pDCBACB;
/* Aborted Commands */
//PSCSICMD AboIORBhead;
//PSCSICMD AboIORBtail;
//ULONG AboIORBcnt;
/* 0x08: */ /* 0x08: */
/* Queued SRBs */ /* Queued SRBs */
PSRB pWaitingSRB; struct dc390_srb *pWaitingSRB;
PSRB pWaitLast; struct dc390_srb *pWaitLast;
PSRB pGoingSRB; struct dc390_srb *pGoingSRB;
PSRB pGoingLast; struct dc390_srb *pGoingLast;
PSRB pActiveSRB; struct dc390_srb *pActiveSRB;
UCHAR WaitSRBCnt; /* Not used */ u8 WaitSRBCnt; /* Not used */
UCHAR GoingSRBCnt; u8 GoingSRBCnt;
UCHAR DevType; u8 DevType;
UCHAR MaxCommand; u8 MaxCommand;
/* 0x20: */ /* 0x20: */
UINT TagMask; u32 TagMask;
UCHAR TargetID; /*; SCSI Target ID (SCSI Only) */ u8 TargetID; /*; SCSI Target ID (SCSI Only) */
UCHAR TargetLUN; /*; SCSI Log. Unit (SCSI Only) */ u8 TargetLUN; /*; SCSI Log. Unit (SCSI Only) */
UCHAR DevMode; u8 DevMode;
UCHAR DCBFlag; u8 DCBFlag;
UCHAR CtrlR1; u8 CtrlR1;
UCHAR CtrlR3; u8 CtrlR3;
UCHAR CtrlR4; u8 CtrlR4;
UCHAR Inquiry7; u8 Inquiry7;
/* 0x2c: */ /* 0x2c: */
UCHAR SyncMode; /*; 0:async mode */ u8 SyncMode; /*; 0:async mode */
UCHAR NegoPeriod; /*;for nego. */ u8 NegoPeriod; /*;for nego. */
UCHAR SyncPeriod; /*;for reg. */ u8 SyncPeriod; /*;for reg. */
UCHAR SyncOffset; /*;for reg. and nego.(low nibble) */ u8 SyncOffset; /*;for reg. and nego.(low nibble) */
/* 0x30:*/ /* 0x30:*/
//UCHAR InqDataBuf[8]; //u8 InqDataBuf[8];
//UCHAR CapacityBuf[8]; //u8 CapacityBuf[8];
///* 0x40: */ ///* 0x40: */
}; };
typedef struct _DCB DC390_DCB, *PDCB;
/* /*
;----------------------------------------------------------------------- ;-----------------------------------------------------------------------
; Adapter Control Block ; Adapter Control Block
;----------------------------------------------------------------------- ;-----------------------------------------------------------------------
*/ */
struct _ACB struct dc390_acb
{ {
PSH pScsiHost; struct Scsi_Host *pScsiHost;
struct _ACB *pNextACB; struct dc390_acb *pNextACB;
USHORT IOPortBase; u16 IOPortBase;
UCHAR IRQLevel; u8 IRQLevel;
UCHAR status; u8 status;
UCHAR SRBCount; u8 SRBCount;
UCHAR AdapterIndex; /*; nth Adapter this driver */ u8 AdapterIndex; /*; nth Adapter this driver */
UCHAR DCBCnt; u8 DCBCnt;
UCHAR TagMaxNum; u8 TagMaxNum;
UCHAR ACBFlag; u8 ACBFlag;
UCHAR Gmode2; u8 Gmode2;
UCHAR scan_devices; u8 scan_devices;
PDCB pLinkDCB; struct dc390_dcb *pLinkDCB;
PDCB pLastDCB; struct dc390_dcb *pLastDCB;
PDCB pDCBRunRobin; struct dc390_dcb *pDCBRunRobin;
PDCB pActiveDCB; struct dc390_dcb *pActiveDCB;
PSRB pFreeSRB; struct dc390_srb *pFreeSRB;
PSRB pTmpSRB; struct dc390_srb *pTmpSRB;
UCHAR msgin123[4]; u8 msgin123[4];
UCHAR DCBmap[MAX_SCSI_ID]; u8 DCBmap[MAX_SCSI_ID];
UCHAR Connected; u8 Connected;
UCHAR pad; u8 pad;
#if defined(USE_SPINLOCKS) && USE_SPINLOCKS > 1 && (defined(CONFIG_SMP) || DEBUG_SPINLOCKS > 0) #if defined(USE_SPINLOCKS) && USE_SPINLOCKS > 1 && (defined(CONFIG_SMP) || DEBUG_SPINLOCKS > 0)
spinlock_t lock; spinlock_t lock;
#endif #endif
UCHAR sel_timeout; u8 sel_timeout;
UCHAR glitch_cfg; u8 glitch_cfg;
UCHAR MsgLen; u8 MsgLen;
UCHAR Ignore_IRQ; /* Not used */ u8 Ignore_IRQ; /* Not used */
PDEVDECL1; /* Pointer to PCI cfg. space */ struct pci_dev *pdev;
ULONG Cmds; unsigned long Cmds;
UINT SelLost; u32 SelLost;
UINT SelConn; u32 SelConn;
UINT CmdInQ; u32 CmdInQ;
UINT CmdOutOfSRB; u32 CmdOutOfSRB;
struct timer_list Waiting_Timer; struct timer_list Waiting_Timer;
DC390_SRB TmpSRB; struct dc390_srb TmpSRB;
DC390_SRB SRB_array[MAX_SRB_CNT]; /* 50 SRBs */ struct dc390_srb SRB_array[MAX_SRB_CNT]; /* 50 SRBs */
}; };
typedef struct _ACB DC390_ACB, *PACB;
/*;-----------------------------------------------------------------------*/ /*;-----------------------------------------------------------------------*/
...@@ -402,17 +354,17 @@ typedef struct { ...@@ -402,17 +354,17 @@ typedef struct {
typedef struct _SCSIInqData { /* INQUIRY */ typedef struct _SCSIInqData { /* INQUIRY */
UCHAR DevType; /* Periph Qualifier & Periph Dev Type*/ u8 DevType; /* Periph Qualifier & Periph Dev Type*/
UCHAR RMB_TypeMod; /* rem media bit & Dev Type Modifier */ u8 RMB_TypeMod; /* rem media bit & Dev Type Modifier */
UCHAR Vers; /* ISO, ECMA, & ANSI versions */ u8 Vers; /* ISO, ECMA, & ANSI versions */
UCHAR RDF; /* AEN, TRMIOP, & response data format*/ u8 RDF; /* AEN, TRMIOP, & response data format*/
UCHAR AddLen; /* length of additional data */ u8 AddLen; /* length of additional data */
UCHAR Res1; /* reserved */ u8 Res1; /* reserved */
UCHAR Res2; /* reserved */ u8 Res2; /* reserved */
UCHAR Flags; /* RelADr,Wbus32,Wbus16,Sync,etc. */ u8 Flags; /* RelADr,Wbus32,Wbus16,Sync,etc. */
UCHAR VendorID[8]; /* Vendor Identification */ u8 VendorID[8]; /* Vendor Identification */
UCHAR ProductID[16]; /* Product Identification */ u8 ProductID[16]; /* Product Identification */
UCHAR ProductRev[4]; /* Product Revision */ u8 ProductRev[4]; /* Product Revision */
} SCSI_INQDATA, *PSCSI_INQDATA; } SCSI_INQDATA, *PSCSI_INQDATA;
...@@ -461,10 +413,10 @@ typedef struct _SCSIInqData { /* INQUIRY */ ...@@ -461,10 +413,10 @@ typedef struct _SCSIInqData { /* INQUIRY */
*/ */
typedef struct _EEprom typedef struct _EEprom
{ {
UCHAR EE_MODE1; u8 EE_MODE1;
UCHAR EE_SPEED; u8 EE_SPEED;
UCHAR xx1; u8 xx1;
UCHAR xx2; u8 xx2;
} EEprom, *PEEprom; } EEprom, *PEEprom;
#define REAL_EE_ADAPT_SCSI_ID 64 #define REAL_EE_ADAPT_SCSI_ID 64
...@@ -676,7 +628,7 @@ UCHAR xx2; ...@@ -676,7 +628,7 @@ UCHAR xx2;
(inb (pACB->IOPortBase + (address))) (inb (pACB->IOPortBase + (address)))
#define DC390_read8_(address, base) \ #define DC390_read8_(address, base) \
(inb ((USHORT)(base) + (address))) (inb ((u16)(base) + (address)))
#define DC390_read16(address) \ #define DC390_read16(address) \
(inw (pACB->IOPortBase + (address))) (inw (pACB->IOPortBase + (address)))
...@@ -688,7 +640,7 @@ UCHAR xx2; ...@@ -688,7 +640,7 @@ UCHAR xx2;
outb ((value), pACB->IOPortBase + (address)) outb ((value), pACB->IOPortBase + (address))
#define DC390_write8_(address,value,base) \ #define DC390_write8_(address,value,base) \
outb ((value), (USHORT)(base) + (address)) outb ((value), (u16)(base) + (address))
#define DC390_write16(address,value) \ #define DC390_write16(address,value) \
outw ((value), pACB->IOPortBase + (address)) outw ((value), pACB->IOPortBase + (address))
......
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