Subversion Repositories shark

Rev

Rev 3 | Go to most recent revision | Details | 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"
12
 
13
#define MAXIDEREQUEST 64
14
 
15
/* -------- */
16
 
17
typedef struct TAGidereq_t {
18
 
19
  request_prologue_t info;
20
 
21
  int next;
22
 
23
  __uint8_t  resetonerror; /*+ request/reply soft reset on error (see code) +*/
24
 
25
  __uint8_t  cmd;
26
  __b_sem_t  wait;
27
  int        result;
28
 
29
  __uint8_t  features;
30
  __uint8_t  cyllow;
31
  __uint8_t  cylhig;
32
  __uint8_t  seccou;
33
  __uint8_t  secnum;
34
  __uint8_t  devhead;
35
 
36
  __uint8_t  *buffer;
37
} idereq_t;
38
 
39
extern idereq_t idereq[];
40
 
41
/* initialization */
42
void init_idereq(void);
43
 
44
/* get a request from the free queue */
45
int get_idereq(void);
46
/* insert a request into the free queue */
47
void free_idereq(int req);
48
 
49
/* insert a request into an ide interface struct */
50
int insert_idereq(int ideif, int drive, int req);
51
/* release a blocked queue of an ide interface*/
52
int releasequeue_idereq(int ideif);
53
 
54
/* get the first request to serve */
55
int first_idereq(int ideif);
56
/* get the actual request that we are serving */
57
int actual_idereq(int ideif);
58
/* remove the request that we have served */
59
int remove_idereq(int ideif);
60
/* remove the request that we have served blocking the queue*/
61
int remove_idereq_blocking(int ideif);
62
 
63
#endif