コード例 #1
0
ファイル: dp8390.c プロジェクト: Sciumo/minix
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
static int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the dp8390 driver. */
	dpeth_t *dep;
	long v;

	system_hz = sys_hz();

	if (env_argc < 1) {
		panic("A head which at this time has no name");
	}

	v = 0;
	(void) env_parse("instance", "d", 0, &v, 0, 255);
	de_instance = (int) v;

	dep = &de_state;

	strcpy(dep->de_name, "dp8390#0");
	dep->de_name[7] += de_instance;

	/* Announce we are up! */
	netdriver_announce();

	return(OK);
}
コード例 #2
0
ファイル: rtl8169.c プロジェクト: Ga-vin/MINIX3
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
static int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the rtl8169 driver. */
	long v;

	system_hz = sys_hz();

	v = 0;
	(void) env_parse("instance", "d", 0, &v, 0, 255);
	re_instance = (int) v;

	/* Claim buffer memory now. */
	rl_init_buf(&re_state);

	/* Announce we are up! */
	netdriver_announce();

	return(OK);
}
コード例 #3
0
ファイル: dp.c プロジェクト: Spenser309/CS551
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the dpeth driver. */
  int fkeys, sfkeys;
  long v;

  /* Request function key for debug dumps */
  fkeys = sfkeys = 0; bit_set(sfkeys, 8);
  if ((fkey_map(&fkeys, &sfkeys)) != OK) 
	printf("%s: couldn't program Shift+F8 key (%d)\n", DevName, errno);

  v = 0;
  (void) env_parse("instance", "d", 0, &v, 0, 255);
  de_instance = (int) v;

  /* Announce we are up! */
  netdriver_announce();

  return(OK);
}
コード例 #4
0
ファイル: dec21140A.c プロジェクト: anuragpeshne/minix
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
static int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the DEC 21140A driver. */
  int fkeys, sfkeys;
  long v;

  v = 0;
  (void) env_parse("instance", "d", 0, &v, 0, 255);
  de_instance = (int) v;

  /* Request function key for debug dumps */
  fkeys = sfkeys = 0;
  bit_set(sfkeys, DE_FKEY);
  if ((fkey_map(&fkeys, &sfkeys)) != OK) 
    printf("%s: error using Shift+F%d key(%d)\n", str_DevName, DE_FKEY, errno);

  /* Announce we are up! */
  netdriver_announce();

  return OK;
}
コード例 #5
0
static int
sef_cb_init_fresh(int type, sef_init_info_t *info)
{
	long instance = 0;
	env_parse("instance", "d", 0, &instance, 0, 255);

	if (virtio_net_probe((int)instance) != OK)
		panic("%s: No device found", name);

	if (virtio_net_config() != OK)
		panic("%s: No device found", name);

	if (virtio_net_alloc_bufs() != OK)
		panic("%s: Buffer allocation failed", name);

	virtio_net_init_queues();

	netdriver_announce();

	return(OK);
}
コード例 #6
0
ファイル: atl2.c プロジェクト: ssinghi/minix
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
{
	/* Initialize the atl2 driver.
	 */
	int r, devind;
	long v;
#if ATL2_FKEY
	int fkeys, sfkeys;
#endif

	/* How many matching devices should we skip? */
	v = 0;
	(void) env_parse("instance", "d", 0, &v, 0, 255);
	instance = (int) v;

	/* Try to find a recognized device. */
	devind = atl2_probe(instance);

	if (devind < 0)
		panic("no matching device found");

	/* Initialize the device. */
	atl2_init(devind);

	/* Announce we are up! */
	netdriver_announce();

#if ATL2_FKEY
	/* Register debug dump function key. */
	fkeys = sfkeys = 0;
	bit_set(sfkeys, 11);
	if ((r = fkey_map(&fkeys, &sfkeys)) != OK)
		printf("ATL2: warning, could not map Shift+F11 key (%d)\n", r);
#endif

	return(OK);
}
コード例 #7
0
ファイル: e1000.c プロジェクト: mwilbur/minix
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
{
/* Initialize the e1000 driver. */
    long v;
    int r;

    v = 0;
    (void) env_parse("instance", "d", 0, &v, 0, 255);
    e1000_instance = (int) v;

    /* Clear state. */
    memset(&e1000_state, 0, sizeof(e1000_state));

    /* Perform calibration. */
    if((r = tsc_calibrate()) != OK)
    {
        panic("tsc_calibrate failed: %d", r);
    }

    /* Announce we are up! */
    netdriver_announce();

    return(OK);
}
コード例 #8
0
ファイル: lance.c プロジェクト: AgamAgarwal/minix
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
static int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the lance driver. */
   long v;
#if LANCE_FKEY
   int r, fkeys, sfkeys;
#endif

#if LANCE_FKEY
   fkeys = sfkeys = 0;
   bit_set( sfkeys, 7 );
   if ( (r = fkey_map(&fkeys, &sfkeys)) != OK )
      printf("Warning: lance couldn't observe Shift+F7 key: %d\n",r);
#endif

   v = 0;
   (void) env_parse("instance", "d", 0, &v, 0, 255);
   ec_instance = (int) v;

   /* Announce we are up! */
   netdriver_announce();

   return OK;
}