diff options
Diffstat (limited to 'sys/dev/ic/gdtvar.h')
-rw-r--r-- | sys/dev/ic/gdtvar.h | 163 |
1 files changed, 1 insertions, 162 deletions
diff --git a/sys/dev/ic/gdtvar.h b/sys/dev/ic/gdtvar.h index ef3e8dc071f..add7ee19dbf 100644 --- a/sys/dev/ic/gdtvar.h +++ b/sys/dev/ic/gdtvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: gdtvar.h,v 1.20 2011/07/08 08:26:41 jsg Exp $ */ +/* $OpenBSD: gdtvar.h,v 1.21 2012/08/15 02:38:14 jsg Exp $ */ /* * Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved. @@ -32,169 +32,8 @@ #define DEVNAME(s) ((s)->sc_dev.dv_xname) #define GDT_CMD_RESERVE 4 /* Internal driver cmd reserve. */ -#define GDT_IOCTL_DUMMY _IOWR('B', 32, struct gdt_dummy) -struct gdt_dummy { - void *cookie; - int x; -}; - #define GDT_SCRATCH_SZ 4096 -#define GDT_IOCTL_GENERAL _IOWR('B', 33, gdt_ucmd_t) /* general IOCTL */ -typedef struct gdt_ucmd { - void *cookie; - u_int16_t io_node; - u_int16_t service; - u_int32_t timeout; - u_int16_t status; - u_int32_t info; - - u_int32_t BoardNode; /* board node (always 0) */ - u_int32_t CommandIndex; /* command number */ - u_int16_t OpCode; /* the command (READ,..) */ - union { - struct { - u_int16_t DeviceNo; /* number of cache drive */ - u_int32_t BlockNo; /* block number */ - u_int32_t BlockCnt; /* block count */ - void *DestAddr; /* data */ - } cache; /* cache service cmd. str. */ - struct { - u_int16_t param_size; /* size of p_param buffer */ - u_int32_t subfunc; /* IOCTL function */ - u_int32_t channel; /* device */ - void *p_param; /* data */ - } ioctl; /* IOCTL command structure */ - struct { - u_int16_t reserved; - u_int32_t direction; /* data direction */ - u_int32_t mdisc_time; /* disc. time (0: no timeout)*/ - u_int32_t mcon_time; /* connect time(0: no to.) */ - void *sdata; /* dest. addr. (if s/g: -1) */ - u_int32_t sdlen; /* data length (bytes) */ - u_int32_t clen; /* SCSI cmd. length(6,10,12) */ - u_int8_t cmd[12]; /* SCSI command */ - u_int8_t target; /* target ID */ - u_int8_t lun; /* LUN */ - u_int8_t bus; /* SCSI bus number */ - u_int8_t priority; /* only 0 used */ - u_int32_t sense_len; /* sense data length */ - void *sense_data; /* sense data addr. */ - u_int32_t link_p; /* linked cmds (not supp.) */ - } raw; /* raw service cmd. struct. */ - } u; - u_int8_t data[GDT_SCRATCH_SZ]; - int complete_flag; - TAILQ_ENTRY(gdt_ucmd) links; -} gdt_ucmd_t; - -#define GDT_IOCTL_DRVERS _IOWR('B', 34, int) /* get driver version */ -typedef struct gdt_drvers { - void *cookie; - int vers; -} gdt_drvers_t; - -#define GDT_IOCTL_CTRTYPE _IOR('B', 35, gdt_ctrt_t) /* get ctr. type */ -typedef struct gdt_ctrt { - void *cookie; - u_int16_t io_node; - u_int16_t oem_id; - u_int16_t type; - u_int32_t info; - u_int8_t access; - u_int8_t remote; - u_int16_t ext_type; - u_int16_t device_id; - u_int16_t sub_device_id; -} gdt_ctrt_t; - -#define GDT_IOCTL_OSVERS _IOR('B', 36, gdt_osv_t) /* get OS version */ -typedef struct gdt_osv { - void *cookie; - u_int8_t oscode; - u_int8_t version; - u_int8_t subversion; - u_int16_t revision; - char name[64]; -} gdt_osv_t; - -#define GDT_IOCTL_CTRCNT _IOR('B', 37, int) /* get ctr. count */ -typedef struct gdt_ctrcnt { - void *cookie; - int cnt; -} gdt_ctrcnt_t; - -#define GDT_IOCTL_EVENT _IOWR('B', 38, gdt_event_t) /* get event */ - -typedef struct { - u_int16_t size; /* size of structure */ - union { - char stream[16]; - struct { - u_int16_t ionode; - u_int16_t service; - u_int32_t index; - } driver; - struct { - u_int16_t ionode; - u_int16_t service; - u_int16_t status; - u_int32_t info; - u_int8_t scsi_coord[3]; - } async; - struct { - u_int16_t ionode; - u_int16_t service; - u_int16_t status; - u_int32_t info; - u_int16_t hostdrive; - u_int8_t scsi_coord[3]; - u_int8_t sense_key; - } sync; - struct { - u_int32_t l1, l2, l3, l4; - } test; - } eu; - u_int32_t severity; - u_int8_t event_string[256]; -} gdt_evt_data; -#define GDT_ES_ASYNC 1 -#define GDT_ES_DRIVER 2 -#define GDT_ES_TEST 3 -#define GDT_ES_SYNC 4 - -/* dvrevt structure */ -typedef struct { - u_int32_t first_stamp; - u_int32_t last_stamp; - u_int16_t same_count; - u_int16_t event_source; - u_int16_t event_idx; - u_int8_t application; - u_int8_t reserved; - gdt_evt_data event_data; -} gdt_evt_str; - -typedef struct gdt_event { - void *cookie; - int erase; - int handle; - gdt_evt_str dvr; -} gdt_event_t; - -#define GDT_IOCTL_STATIST _IOR('B', 39, gdt_statist_t) /* get statistics */ -typedef struct gdt_statist { - void *cookie; - u_int16_t io_count_act; - u_int16_t io_count_max; - u_int16_t req_queue_act; - u_int16_t req_queue_max; - u_int16_t cmd_index_act; - u_int16_t cmd_index_max; - u_int16_t sg_count_act; - u_int16_t sg_count_max; -} gdt_statist_t; - #ifdef _KERNEL /* Debugging */ |