Commit 1b51f242 authored by James Bottomley's avatar James Bottomley

gdth driver update to 3.04

From: 	Leubner, Achim <Achim_Leubner@adaptec.com>

- Support for drives > 2 TB implemented
- 64-bit DMA support depending on the controller firmware version implemented
- Some important bug fixes made
parent b3701e0e
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -2,7 +2,7 @@
#define _GDTH_IOCTL_H
/* gdth_ioctl.h
* $Id: gdth_ioctl.h,v 1.11 2003/02/27 14:59:03 achim Exp $
* $Id: gdth_ioctl.h,v 1.14 2004/02/19 15:43:15 achim Exp $
*/
/* IOCTLs */
......@@ -35,7 +35,9 @@
/* typedefs */
#ifdef __KERNEL__
typedef u32 ulong32;
typedef u64 ulong64;
#endif
#define PACKED __attribute__((packed))
/* scatter/gather element */
......@@ -44,6 +46,12 @@ typedef struct {
ulong32 sg_len; /* length */
} PACKED gdth_sg_str;
/* scatter/gather element - 64bit addresses */
typedef struct {
ulong64 sg_ptr; /* address */
ulong32 sg_len; /* length */
} PACKED gdth_sg64_str;
/* command structure */
typedef struct {
ulong32 BoardNode; /* board node (always 0) */
......@@ -58,18 +66,26 @@ typedef struct {
ulong32 sg_canz; /* s/g element count */
gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */
} PACKED cache; /* cache service cmd. str. */
struct {
ushort DeviceNo; /* number of cache drive */
ulong64 BlockNo; /* block number */
ulong32 BlockCnt; /* block count */
ulong64 DestAddr; /* dest. addr. (if s/g: -1) */
ulong32 sg_canz; /* s/g element count */
gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */
} PACKED cache64; /* cache service cmd. str. */
struct {
ushort param_size; /* size of p_param buffer */
ulong32 subfunc; /* IOCTL function */
ulong32 channel; /* device */
ulong32 p_param; /* buffer */
ulong64 p_param; /* buffer */
} PACKED ioctl; /* IOCTL command structure */
struct {
ushort reserved;
union {
struct {
ulong32 msg_handle; /* message handle */
ulong32 msg_addr; /* message buffer address */
ulong64 msg_addr; /* message buffer address */
} PACKED msg;
unchar data[12]; /* buffer for rtc data, ... */
} su;
......@@ -93,6 +109,24 @@ typedef struct {
ulong32 sg_ranz; /* s/g element count */
gdth_sg_str sg_lst[GDTH_MAXSG]; /* s/g list */
} PACKED raw; /* raw service cmd. struct. */
struct {
ushort reserved;
ulong32 direction; /* data direction */
ulong32 mdisc_time; /* disc. time (0: no timeout)*/
ulong32 mcon_time; /* connect time(0: no to.) */
ulong64 sdata; /* dest. addr. (if s/g: -1) */
ulong32 sdlen; /* data length (bytes) */
ulong32 clen; /* SCSI cmd. length(6,..,16) */
unchar cmd[16]; /* SCSI command */
unchar target; /* target ID */
unchar lun; /* LUN */
unchar bus; /* SCSI bus number */
unchar priority; /* only 0 used */
ulong32 sense_len; /* sense data length */
ulong64 sense_data; /* sense data addr. */
ulong32 sg_ranz; /* s/g element count */
gdth_sg64_str sg_lst[GDTH_MAXSG]; /* s/g list */
} PACKED raw64; /* raw service cmd. struct. */
} u;
/* additional variables */
unchar Service; /* controller service */
......@@ -236,7 +270,6 @@ typedef struct {
} gdth_iord_str;
#endif
#ifdef GDTH_IOCTL_CHRDEV
/* GDTIOCTL_GENERAL */
typedef struct {
ushort ionode; /* controller number */
......@@ -310,6 +343,5 @@ typedef struct {
ushort number; /* bus/host drive number */
ushort status; /* status */
} gdth_ioctl_reset;
#endif
#endif
This diff is collapsed.
......@@ -2,42 +2,31 @@
#define _GDTH_PROC_H
/* gdth_proc.h
* $Id: gdth_proc.h,v 1.14 2003/08/27 11:37:35 achim Exp $
* $Id: gdth_proc.h,v 1.16 2004/01/14 13:09:01 achim Exp $
*/
static int gdth_set_info(char *buffer,int length,int hanum,int busnum);
static int gdth_get_info(char *buffer,char **start,off_t offset,
int length,int hanum,int busnum);
static int gdth_set_info(char *buffer,int length,struct Scsi_Host *host,
int hanum,int busnum);
static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
struct Scsi_Host *host,int hanum,int busnum);
#if LINUX_VERSION_CODE >= 0x020503
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
static void gdth_do_req(Scsi_Request *srp, gdth_cmd_str *cmd,
char *cmnd, int timeout);
static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Request *scp);
#ifdef GDTH_IOCTL_PROC
static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Request *scp);
#endif
#elif LINUX_VERSION_CODE >= 0x020322
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
static void gdth_do_cmd(Scsi_Cmnd *scp, gdth_cmd_str *cmd,
char *cmnd, int timeout);
static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Cmnd *scp);
#ifdef GDTH_IOCTL_PROC
static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Cmnd *scp);
#endif
#else
static void gdth_do_cmd(Scsi_Cmnd *scp, gdth_cmd_str *cmd,
char *cmnd, int timeout);
static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Cmnd scp);
#ifdef GDTH_IOCTL_PROC
static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Cmnd scp);
#endif
#endif
static char *gdth_ioctl_alloc(int hanum, int size, int scratch,
ulong32 *paddr);
static void gdth_ioctl_free(int hanum, int size, char *buf, ulong32 paddr);
#ifdef GDTH_IOCTL_PROC
static int gdth_ioctl_check_bin(int hanum, ushort size);
#endif
ulong64 *paddr);
static void gdth_ioctl_free(int hanum, int size, char *buf, ulong64 paddr);
static void gdth_wait_completion(int hanum, int busnum, int id);
static void gdth_stop_timeout(int hanum, int busnum, int id);
static void gdth_start_timeout(int hanum, int busnum, int id);
......
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