/[gxemul]/trunk/src/devices/dev_le.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 /trunk/src/devices/dev_le.c

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

revision 19 by dpavlin, Mon Oct 8 16:19:11 2007 UTC revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_le.c,v 1.44 2005/10/26 14:37:04 debug Exp $   *  $Id: dev_le.c,v 1.46 2005/11/13 00:14:09 debug Exp $
29   *     *  
30   *  LANCE ethernet, as used in DECstations.   *  LANCE ethernet, as used in DECstations.
31   *   *
# Line 801  void dev_le_init(struct machine *machine Line 801  void dev_le_init(struct machine *machine
801          /*  ROM (including the MAC address):  */          /*  ROM (including the MAC address):  */
802          net_generate_unique_mac(machine, &d->rom[0]);          net_generate_unique_mac(machine, &d->rom[0]);
803    
         /*  
          *  NOTE:  According to the Lance documentation, the low order bit of  
          *  a physical MAC address should be clear.  However, NetBSD and  
          *  Linux drop packets if the _first_ byte's lowest bit is not zero.  
          */  
         d->rom[0] &= ~1;  
         d->rom[5] &= ~1;  
   
804          /*  Copies of the MAC address and a test pattern:  */          /*  Copies of the MAC address and a test pattern:  */
805          d->rom[10] = d->rom[21] = d->rom[5];          d->rom[10] = d->rom[21] = d->rom[5];
806          d->rom[11] = d->rom[20] = d->rom[4];          d->rom[11] = d->rom[20] = d->rom[4];
# Line 825  void dev_le_init(struct machine *machine Line 817  void dev_le_init(struct machine *machine
817    
818          memory_device_register(mem, "le_sram", baseaddr,          memory_device_register(mem, "le_sram", baseaddr,
819              SRAM_SIZE, dev_le_sram_access, (void *)d,              SRAM_SIZE, dev_le_sram_access, (void *)d,
820              MEM_DYNTRANS_OK | MEM_DYNTRANS_WRITE_OK              DM_DYNTRANS_OK | DM_DYNTRANS_WRITE_OK
821              | MEM_READING_HAS_NO_SIDE_EFFECTS, d->sram);              | DM_READS_HAVE_NO_SIDE_EFFECTS, d->sram);
822    
823          name2 = malloc(nlen);          name2 = malloc(nlen);
824          if (name2 == NULL) {          if (name2 == NULL) {
# Line 837  void dev_le_init(struct machine *machine Line 829  void dev_le_init(struct machine *machine
829              d->rom[0], d->rom[1], d->rom[2], d->rom[3], d->rom[4], d->rom[5]);              d->rom[0], d->rom[1], d->rom[2], d->rom[3], d->rom[4], d->rom[5]);
830    
831          memory_device_register(mem, name2, baseaddr + 0x100000,          memory_device_register(mem, name2, baseaddr + 0x100000,
832              len - 0x100000, dev_le_access, (void *)d, MEM_DEFAULT, NULL);              len - 0x100000, dev_le_access, (void *)d, DM_DEFAULT, NULL);
833    
834          machine_add_tickfunction(machine, dev_le_tick, d, LE_TICK_SHIFT);          machine_add_tickfunction(machine, dev_le_tick, d, LE_TICK_SHIFT);
835    

Legend:
Removed from v.19  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26