From mid@auk.cx Mon Dec 13 05:43:26 1999 Date: Mon, 13 Dec 1999 05:32:55 +0000 (UTC) From: Adam Fritzler Subject: Re: tm380tr on madge smart 16/4 pci ringnode The MAC address is stored in the EEPROM. The board does work just fine with the tms380tr driver, except for the (fairly minor) MAC address problem. I don't know how Madge attached the eeprom (I'm still waiting on cards from Magde so I can figure this out). But I do know how to fake it. In tms380tr_read_addr(), you'll want to comment out the code thats there and just do this: static void tms380tr_read_addr(struct net_device *dev, unsigned char *Address) { Address[0] = 0x00; /* replace with your MAC, or this one... */ Address[1] = 0x55; Address[2] = 0x00; Address[3] = 0x71; Address[4] = 0x2a; Address[5] = 0xed; return; } In tms380tr_init_opb(), you can tell the driver what address to set the card to (this should really be made into an laa= option like the ibmtr driver has). It looks something like this... /* Add the 'struct net_device *dev' parameter! (to prototype too!) */ static void tms380tr_init_opb(struct net_local *tp, struct net_device *dev) { unsigned long Addr; unsigned short RplSize = RPL_SIZE; unsigned short TplSize = TPL_SIZE; unsigned short BufferSize = BUFFER_SIZE; int i; tp->ocpl.OPENOptions = 0; tp->ocpl.OPENOptions |= ENABLE_FULL_DUPLEX_SELECTION; tp->ocpl.FullDuplex = 0; tp->ocpl.FullDuplex |= OPEN_FULL_DUPLEX_OFF; /* Set Node Address manually -- ADD THIS PART */ for (i=0;i<6;i++) tp->ocpl.NodeAddr[i] = ((unsigned char *)dev->dev_addr)[i]; /* Fixme: If mac address setable: * for (i=0; iVam->ocpl.NodeAddr[i] = mac->CurrentAddress[i]; */ tp->ocpl.GroupAddr = 0; tp->ocpl.FunctAddr = 0; /* ... */ } Additionally, change the call in tms380tr_chipset_init() to be tms380tr_init_opb(tp, dev). It needs the net_device to get the address from. Change those parts, and you should end up with the address you put in tms380tr_read_addr(). Should. I wrote the above without actually testing anything, so no guarentees. I know its possible (its been done before). I think I will in the next version of the driver (which will have some relatively major changes), add an laa= module option or something so that it can be specified. Of course, I also expect to have a Madge card to test with by then, so real support of those cards should be there. af --- Adam Fritzler { mid@auk.cx, afritz@iname.com} http://www.auk.cx/~mid/ "You may call me Lor." -- Lor