Subversion Repositories HelenOS

Rev

Rev 4163 | Rev 4261 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4163 Rev 4192
Line 33... Line 33...
33
 */
33
 */
34
 
34
 
35
#ifndef __NET_NETIF_DP8390_H__
35
#ifndef __NET_NETIF_DP8390_H__
36
#define __NET_NETIF_DP8390_H__
36
#define __NET_NETIF_DP8390_H__
37
 
37
 
-
 
38
#include "../../structures/packet/packet.h"
-
 
39
 
38
#include "dp8390_port.h"
40
#include "dp8390_port.h"
39
#include "local.h"
41
#include "local.h"
40
 
42
 
41
/*
43
/*
42
dp8390.h
44
dp8390.h
Line 214... Line 216...
214
struct dpeth;
216
struct dpeth;
215
struct iovec_dat;
217
struct iovec_dat;
216
//struct iovec_dat_s;
218
//struct iovec_dat_s;
217
_PROTOTYPE( typedef void (*dp_initf_t), (struct dpeth *dep)     );
219
_PROTOTYPE( typedef void (*dp_initf_t), (struct dpeth *dep)     );
218
_PROTOTYPE( typedef void (*dp_stopf_t), (struct dpeth *dep)     );
220
_PROTOTYPE( typedef void (*dp_stopf_t), (struct dpeth *dep)     );
219
//_PROTOTYPE( typedef void (*dp_user2nicf_t), (struct dpeth *dep,
221
_PROTOTYPE( typedef void (*dp_user2nicf_t), (struct dpeth *dep,
220
//          struct iovec_dat *iovp, vir_bytes offset,
222
            struct iovec_dat *iovp, vir_bytes offset,
221
//          int nic_addr, vir_bytes count)          );
223
            int nic_addr, vir_bytes count)          );
222
//_PROTOTYPE( typedef void (*dp_user2nicf_s_t), (struct dpeth *dep,
224
//_PROTOTYPE( typedef void (*dp_user2nicf_s_t), (struct dpeth *dep,
223
//          struct iovec_dat_s *iovp, vir_bytes offset,
225
//          struct iovec_dat_s *iovp, vir_bytes offset,
224
//          int nic_addr, vir_bytes count)          );
226
//          int nic_addr, vir_bytes count)          );
225
_PROTOTYPE( typedef void (*dp_nic2userf_t), (struct dpeth *dep,
227
_PROTOTYPE( typedef void (*dp_nic2userf_t), (struct dpeth *dep,
226
            int nic_addr, struct iovec_dat *iovp,
228
            int nic_addr, struct iovec_dat *iovp,
Line 234... Line 236...
234
//#endif
236
//#endif
235
_PROTOTYPE( typedef void (*dp_getblock_t), (struct dpeth *dep,
237
_PROTOTYPE( typedef void (*dp_getblock_t), (struct dpeth *dep,
236
        int page, size_t offset, size_t size, void *dst)    );
238
        int page, size_t offset, size_t size, void *dst)    );
237
 
239
 
238
/* iovectors are handled IOVEC_NR entries at a time. */
240
/* iovectors are handled IOVEC_NR entries at a time. */
-
 
241
//#define IOVEC_NR  16
-
 
242
// no vectors allowed
239
#define IOVEC_NR    16
243
#define IOVEC_NR    1
240
 
244
 
241
/*
245
/*
242
typedef int irq_hook_t;
246
typedef int irq_hook_t;
243
*/
247
*/
244
typedef struct iovec_dat
248
typedef struct iovec_dat
245
{
249
{
246
  iovec_t iod_iovec[IOVEC_NR];
250
  iovec_t iod_iovec[IOVEC_NR];
247
  int iod_iovec_s;
251
  int iod_iovec_s;
-
 
252
  // no direct process access
248
  int iod_proc_nr;
253
  int iod_proc_nr;
249
  vir_bytes iod_iovec_addr;
254
  vir_bytes iod_iovec_addr;
250
} iovec_dat_t;
255
} iovec_dat_t;
251
/*
256
/*
252
typedef struct iovec_dat_s
257
typedef struct iovec_dat_s
Line 261... Line 266...
261
#define SENDQ_NR    2   /* Maximum size of the send queue */
266
#define SENDQ_NR    2   /* Maximum size of the send queue */
262
#define SENDQ_PAGES 6   /* 6 * DP_PAGESIZE >= 1514 bytes */
267
#define SENDQ_PAGES 6   /* 6 * DP_PAGESIZE >= 1514 bytes */
263
 
268
 
264
typedef struct dpeth
269
typedef struct dpeth
265
{
270
{
-
 
271
    /* Parent device structure.
-
 
272
     */
-
 
273
    void *      parent;
-
 
274
    /* Packet send queue.
-
 
275
    */
-
 
276
    packet_t    packet_queue;
-
 
277
    int         packet_count;
-
 
278
 
266
    /* The de_base_port field is the starting point of the probe.
279
    /* The de_base_port field is the starting point of the probe.
267
     * The conf routine also fills de_linmem and de_irq. If the probe
280
     * The conf routine also fills de_linmem and de_irq. If the probe
268
     * routine knows the irq and/or memory address because they are
281
     * routine knows the irq and/or memory address because they are
269
     * hardwired in the board, the probe should modify these fields.
282
     * hardwired in the board, the probe should modify these fields.
270
     * Futhermore, the probe routine should also fill in de_initf and
283
     * Futhermore, the probe routine should also fill in de_initf and
Line 323... Line 336...
323
    int de_mode;
336
    int de_mode;
324
    eth_stat_t de_stat;
337
    eth_stat_t de_stat;
325
    iovec_dat_t de_read_iovec;
338
    iovec_dat_t de_read_iovec;
326
//  iovec_dat_s_t de_read_iovec_s;
339
//  iovec_dat_s_t de_read_iovec_s;
327
//  int de_safecopy_read;
340
//  int de_safecopy_read;
328
//  iovec_dat_t de_write_iovec;
341
    iovec_dat_t de_write_iovec;
329
//  iovec_dat_s_t de_write_iovec_s;
342
//  iovec_dat_s_t de_write_iovec_s;
330
    iovec_dat_t de_tmp_iovec;
343
    iovec_dat_t de_tmp_iovec;
331
//  iovec_dat_s_t de_tmp_iovec_s;
344
//  iovec_dat_s_t de_tmp_iovec_s;
332
    vir_bytes de_read_s;
345
    vir_bytes de_read_s;
333
//  int de_client;
346
//  int de_client;
334
//  message de_sendmsg;
347
//  message de_sendmsg;
335
//  dp_user2nicf_t de_user2nicf; 
348
    dp_user2nicf_t de_user2nicf;
336
//  dp_user2nicf_s_t de_user2nicf_s; 
349
//  dp_user2nicf_s_t de_user2nicf_s; 
337
    dp_nic2userf_t de_nic2userf;
350
    dp_nic2userf_t de_nic2userf;
338
//  dp_nic2userf_s_t de_nic2userf_s; 
351
//  dp_nic2userf_s_t de_nic2userf_s; 
339
    dp_getblock_t de_getblockf;
352
    dp_getblock_t de_getblockf;
340
} dpeth_t;
353
} dpeth_t;