/[dynamips]/upstream/dynamips-0.2.6-RC3/dev_c3600_serial.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/dynamips-0.2.6-RC3/dev_c3600_serial.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.5/dev_c3600_serial.c revision 1 by dpavlin, Sat Oct 6 16:01:44 2007 UTC upstream/dynamips-0.2.6-RC3/dev_c3600_serial.c revision 4 by dpavlin, Sat Oct 6 16:06:49 2007 UTC
# Line 26  Line 26 
26  /* NM-4T                                                                  */  /* NM-4T                                                                  */
27  /* ====================================================================== */  /* ====================================================================== */
28    
 /* NM-4T: 4 Serial Network Module EEPROM */  
 static m_uint16_t eeprom_c3600_nm_4t_data[64] = {  
    0x0154, 0x0101, 0x009D, 0x2D64, 0x5009, 0x0A02, 0x0000, 0x0000,  
    0x5800, 0x0000, 0x9811, 0x0300, 0x0005, 0xFFFF, 0xFFFF, 0xFFFF,  
 };  
   
 static const struct c3600_eeprom eeprom_c3600_nm_4t = {  
    "NM-4T", eeprom_c3600_nm_4t_data, sizeof(eeprom_c3600_nm_4t_data)/2,  
 };  
   
29  /*  /*
30   * dev_c3600_nm_4t_init()   * dev_c3600_nm_4t_init()
31   *   *
32   * Add a PA-4T network module into specified slot.   * Add a NM-4T network module into specified slot.
33   */   */
34  int dev_c3600_nm_4t_init(c3600_t *router,char *name,u_int nm_bay)  int dev_c3600_nm_4t_init(c3600_t *router,char *name,u_int nm_bay)
35  {  {
# Line 47  int dev_c3600_nm_4t_init(c3600_t *router Line 37  int dev_c3600_nm_4t_init(c3600_t *router
37     struct mueslix_data *data;     struct mueslix_data *data;
38    
39     /* Set the EEPROM */     /* Set the EEPROM */
40     c3600_nm_set_eeprom(router,nm_bay,&eeprom_c3600_nm_4t);     c3600_nm_set_eeprom(router,nm_bay,cisco_eeprom_find_nm("NM-4T"));
41    
42     /* Get PCI bus info about this bay */     /* Get PCI bus info about this bay */
43     bay_info = c3600_nm_get_bay_info(c3600_chassis_get_id(router),nm_bay);     bay_info = c3600_nm_get_bay_info(c3600_chassis_get_id(router),nm_bay);
44    
45     if (!bay_info) {     if (!bay_info) {
46        fprintf(stderr,"%s: unable to get info for PA bay %u\n",name,nm_bay);        fprintf(stderr,"%s: unable to get info for NM bay %u\n",name,nm_bay);
47        return(-1);        return(-1);
48     }     }
49    
# Line 68  int dev_c3600_nm_4t_init(c3600_t *router Line 58  int dev_c3600_nm_4t_init(c3600_t *router
58     return(c3600_nm_set_drvinfo(router,nm_bay,data));     return(c3600_nm_set_drvinfo(router,nm_bay,data));
59  }  }
60    
61  /* Remove a PA-4T+ from the specified slot */  /* Remove a NM-4T from the specified slot */
62  int dev_c3600_nm_4t_shutdown(c3600_t *router,u_int nm_bay)  int dev_c3600_nm_4t_shutdown(c3600_t *router,u_int nm_bay)
63  {  {
64     struct c3600_nm_bay *bay;     struct c3600_nm_bay *bay;
# Line 113  struct c3600_nm_driver dev_c3600_nm_4t_d Line 103  struct c3600_nm_driver dev_c3600_nm_4t_d
103     dev_c3600_nm_4t_shutdown,     dev_c3600_nm_4t_shutdown,
104     dev_c3600_nm_4t_set_nio,     dev_c3600_nm_4t_set_nio,
105     dev_c3600_nm_4t_unset_nio,     dev_c3600_nm_4t_unset_nio,
106       NULL,
107  };  };

Legend:
Removed from v.1  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26