Subversion Repositories shark

Rev

Rev 3 | Rev 1063 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/*
2
 *
3
 *
4
 *
5
 */
6
 
7
#ifndef __IDEREQ_H__
8
#define __IDEREQ_H__
9
 
10
#include "bqueue.h"
11
#include "glue.h"
80 pj 12
#include "ll/sys/cdefs.h"
2 pj 13
 
80 pj 14
__BEGIN_DECLS
15
 
2 pj 16
#define MAXIDEREQUEST 64
17
 
18
/* -------- */
19
 
20
typedef struct TAGidereq_t {
21
 
22
  request_prologue_t info;
23
 
24
  int next;
25
 
26
  __uint8_t  resetonerror; /*+ request/reply soft reset on error (see code) +*/
27
 
28
  __uint8_t  cmd;
29
  __b_sem_t  wait;
30
  int        result;
31
 
32
  __uint8_t  features;
33
  __uint8_t  cyllow;
34
  __uint8_t  cylhig;
35
  __uint8_t  seccou;
36
  __uint8_t  secnum;
37
  __uint8_t  devhead;
38
 
39
  __uint8_t  *buffer;
40
} idereq_t;
41
 
42
extern idereq_t idereq[];
43
 
44
/* initialization */
45
void init_idereq(void);
46
 
47
/* get a request from the free queue */
48
int get_idereq(void);
49
/* insert a request into the free queue */
50
void free_idereq(int req);
51
 
52
/* insert a request into an ide interface struct */
53
int insert_idereq(int ideif, int drive, int req);
54
/* release a blocked queue of an ide interface*/
55
int releasequeue_idereq(int ideif);
56
 
57
/* get the first request to serve */
58
int first_idereq(int ideif);
59
/* get the actual request that we are serving */
60
int actual_idereq(int ideif);
61
/* remove the request that we have served */
62
int remove_idereq(int ideif);
63
/* remove the request that we have served blocking the queue*/
64
int remove_idereq_blocking(int ideif);
65
 
80 pj 66
__END_DECLS
2 pj 67
#endif