Subversion Repositories shark

Rev

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

Rev Author Line No. Line
1063 tullio 1
 
2 pj 2
/*
1063 tullio 3
 * This program is free software; you can redistribute it and/or modify
4
 * it under the terms of the GNU General Public License as published by
5
 * the Free Software Foundation; either version 2 of the License, or
6
 * (at your option) any later version.
2 pj 7
 *
1063 tullio 8
 * This program is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 * GNU General Public License for more details.
2 pj 12
 *
1063 tullio 13
 * You should have received a copy of the GNU General Public License
14
 * along with this program; if not, write to the Free Software
15
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
2 pj 16
 *
17
 */
18
 
1063 tullio 19
 
2 pj 20
#ifndef __IDEREQ_H__
21
#define __IDEREQ_H__
22
 
23
#include "bqueue.h"
24
#include "glue.h"
80 pj 25
#include "ll/sys/cdefs.h"
2 pj 26
 
80 pj 27
__BEGIN_DECLS
28
 
2 pj 29
#define MAXIDEREQUEST 64
30
 
31
/* -------- */
32
 
33
typedef struct TAGidereq_t {
34
 
35
  request_prologue_t info;
36
 
37
  int next;
38
 
39
  __uint8_t  resetonerror; /*+ request/reply soft reset on error (see code) +*/
40
 
41
  __uint8_t  cmd;
42
  __b_sem_t  wait;
43
  int        result;
44
 
45
  __uint8_t  features;
46
  __uint8_t  cyllow;
47
  __uint8_t  cylhig;
48
  __uint8_t  seccou;
49
  __uint8_t  secnum;
50
  __uint8_t  devhead;
51
 
52
  __uint8_t  *buffer;
53
} idereq_t;
54
 
55
extern idereq_t idereq[];
56
 
57
/* initialization */
58
void init_idereq(void);
59
 
60
/* get a request from the free queue */
61
int get_idereq(void);
62
/* insert a request into the free queue */
63
void free_idereq(int req);
64
 
65
/* insert a request into an ide interface struct */
66
int insert_idereq(int ideif, int drive, int req);
67
/* release a blocked queue of an ide interface*/
68
int releasequeue_idereq(int ideif);
69
 
70
/* get the first request to serve */
71
int first_idereq(int ideif);
72
/* get the actual request that we are serving */
73
int actual_idereq(int ideif);
74
/* remove the request that we have served */
75
int remove_idereq(int ideif);
76
/* remove the request that we have served blocking the queue*/
77
int remove_idereq_blocking(int ideif);
78
 
80 pj 79
__END_DECLS
2 pj 80
#endif