/[dynamips]/upstream/dynamips-0.2.7-RC2/dev_c7200_eth.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.7-RC2/dev_c7200_eth.c

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

upstream/dynamips-0.2.7-RC1/dev_c7200_eth.c revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC upstream/dynamips-0.2.7-RC2/dev_c7200_eth.c revision 8 by dpavlin, Sat Oct 6 16:24:54 2007 UTC
# Line 60  static int dev_c7200_iocard_init(c7200_t Line 60  static int dev_c7200_iocard_init(c7200_t
60     data = dev_dec21140_init(router->vm,name,     data = dev_dec21140_init(router->vm,name,
61                              router->pa_bay[pa_bay].pci_map,                              router->pa_bay[pa_bay].pci_map,
62                              router->npe_driver->dec21140_pci_dev,                              router->npe_driver->dec21140_pci_dev,
63                              C7200_NETIO_IRQ);                              c7200_net_irq_for_slot_port(pa_bay,0));
64     if (!data) return(-1);     if (!data) return(-1);
65    
66     /* Store device info into the router structure */     /* Store device info into the router structure */
# Line 119  static int dev_c7200_pa_fe_tx_init(c7200 Line 119  static int dev_c7200_pa_fe_tx_init(c7200
119    
120     /* Create the DEC21140 chip */     /* Create the DEC21140 chip */
121     data = dev_dec21140_init(router->vm,name,router->pa_bay[pa_bay].pci_map,0,     data = dev_dec21140_init(router->vm,name,router->pa_bay[pa_bay].pci_map,0,
122                              C7200_NETIO_IRQ);                              c7200_net_irq_for_slot_port(pa_bay,0));
123     if (!data) return(-1);     if (!data) return(-1);
124    
125     /* Store device info into the router structure */     /* Store device info into the router structure */
# Line 277  static int dev_c7200_pa_2fe_tx_init(c720 Line 277  static int dev_c7200_pa_2fe_tx_init(c720
277     for(i=0;i<data->nr_port;i++) {     for(i=0;i<data->nr_port;i++) {
278        data->port[i] = dev_i8254x_init(router->vm,name,0,        data->port[i] = dev_i8254x_init(router->vm,name,0,
279                                        router->pa_bay[pa_bay].pci_map,i,                                        router->pa_bay[pa_bay].pci_map,i,
280                                        C7200_NETIO_IRQ);                                        c7200_net_irq_for_slot_port(pa_bay,i));
281     }     }
282    
283     /* Store device info into the router structure */     /* Store device info into the router structure */
# Line 323  static int dev_c7200_pa_ge_init(c7200_t Line 323  static int dev_c7200_pa_ge_init(c7200_t
323     /* Create the Intel i8254x chip */     /* Create the Intel i8254x chip */
324     data->port[0] = dev_i8254x_init(router->vm,name,0,     data->port[0] = dev_i8254x_init(router->vm,name,0,
325                                     router->pa_bay[pa_bay].pci_map,0,                                     router->pa_bay[pa_bay].pci_map,0,
326                                     C7200_NETIO_IRQ);                                     c7200_net_irq_for_slot_port(pa_bay,0));
327    
328     /* Store device info into the router structure */     /* Store device info into the router structure */
329     return(c7200_pa_set_drvinfo(router,pa_bay,data));     return(c7200_pa_set_drvinfo(router,pa_bay,data));
# Line 385  static int dev_c7200_iocard_2fe_init(c72 Line 385  static int dev_c7200_iocard_2fe_init(c72
385     /* Port Fa0/0 is on PCI Device 1 */     /* Port Fa0/0 is on PCI Device 1 */
386     data->port[0] = dev_i8254x_init(router->vm,name,0,     data->port[0] = dev_i8254x_init(router->vm,name,0,
387                                     router->pa_bay[pa_bay].pci_map,1,                                     router->pa_bay[pa_bay].pci_map,1,
388                                     C7200_NETIO_IRQ);                                     c7200_net_irq_for_slot_port(pa_bay,1));
389    
390     /* Port Fa0/1 is on PCI Device 0 */     /* Port Fa0/1 is on PCI Device 0 */
391     data->port[1] = dev_i8254x_init(router->vm,name,0,     data->port[1] = dev_i8254x_init(router->vm,name,0,
392                                     router->pa_bay[pa_bay].pci_map,0,                                     router->pa_bay[pa_bay].pci_map,0,
393                                     C7200_NETIO_IRQ);                                     c7200_net_irq_for_slot_port(pa_bay,0));
394    
395       if (!data->port[0] || !data->port[1]) {
396          dev_i8254x_remove(data->port[0]);
397          dev_i8254x_remove(data->port[1]);
398          free(data);
399          return(-1);
400       }
401    
402     /* Store device info into the router structure */     /* Store device info into the router structure */
403     return(c7200_pa_set_drvinfo(router,pa_bay,data));     return(c7200_pa_set_drvinfo(router,pa_bay,data));
# Line 455  static int dev_c7200_iocard_ge_e_init(c7 Line 462  static int dev_c7200_iocard_ge_e_init(c7
462     /* Port Gi0/0 is on PCI Device 1 */     /* Port Gi0/0 is on PCI Device 1 */
463     data->port[0] = dev_i8254x_init(router->vm,name,0,     data->port[0] = dev_i8254x_init(router->vm,name,0,
464                                     router->pa_bay[pa_bay].pci_map,1,                                     router->pa_bay[pa_bay].pci_map,1,
465                                     C7200_NETIO_IRQ);                                     c7200_net_irq_for_slot_port(pa_bay,1));
466    
467     /* Port e0/0 is on PCI Device 0 */     /* Port e0/0 is on PCI Device 0 */
468     data->port[1] = dev_i8254x_init(router->vm,name,0,     data->port[1] = dev_i8254x_init(router->vm,name,0,
469                                     router->pa_bay[pa_bay].pci_map,0,                                     router->pa_bay[pa_bay].pci_map,0,
470                                     C7200_NETIO_IRQ);                                     c7200_net_irq_for_slot_port(pa_bay,0));
471    
472     /* Store device info into the router structure */     /* Store device info into the router structure */
473     return(c7200_pa_set_drvinfo(router,pa_bay,data));     return(c7200_pa_set_drvinfo(router,pa_bay,data));
# Line 513  static int dev_c7200_pa_4e_init(c7200_t Line 520  static int dev_c7200_pa_4e_init(c7200_t
520     for(i=0;i<data->nr_port;i++) {     for(i=0;i<data->nr_port;i++) {
521        data->port[i] = dev_am79c971_init(router->vm,name,AM79C971_TYPE_10BASE_T,        data->port[i] = dev_am79c971_init(router->vm,name,AM79C971_TYPE_10BASE_T,
522                                          router->pa_bay[pa_bay].pci_map,i,                                          router->pa_bay[pa_bay].pci_map,i,
523                                          C7200_NETIO_IRQ);                                          c7200_net_irq_for_slot_port(pa_bay,i));
524     }     }
525    
526     /* Store device info into the router structure */     /* Store device info into the router structure */
# Line 547  static int dev_c7200_pa_8e_init(c7200_t Line 554  static int dev_c7200_pa_8e_init(c7200_t
554     for(i=0;i<data->nr_port;i++) {     for(i=0;i<data->nr_port;i++) {
555        data->port[i] = dev_am79c971_init(router->vm,name,AM79C971_TYPE_10BASE_T,        data->port[i] = dev_am79c971_init(router->vm,name,AM79C971_TYPE_10BASE_T,
556                                          router->pa_bay[pa_bay].pci_map,i,                                          router->pa_bay[pa_bay].pci_map,i,
557                                          C7200_NETIO_IRQ);                                          c7200_net_irq_for_slot_port(pa_bay,i));
558     }     }
559    
560     /* Store device info into the router structure */     /* Store device info into the router structure */

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26