diff -rc2p grub/netboot/tg3.c grub-tg3/netboot/tg3.c
*** grub/netboot/tg3.c	2003-11-26 13:37:39.000000000 +0000
--- grub-tg3/netboot/tg3.c	2003-11-26 13:42:22.000000000 +0000
***************
*** 15,21 ****
  #include "pci.h"
  #include "timer.h"
! #include "string.h"
  #include "tg3.h"
  
  #define SUPPORT_COPPER_PHY  1
  #define SUPPORT_FIBER_PHY   1
--- 15,24 ----
  #include "pci.h"
  #include "timer.h"
! //#include "string.h"
! #define TG3_VLAN_TAG_USED 0
! 
  #include "tg3.h"
  
+ 
  #define SUPPORT_COPPER_PHY  1
  #define SUPPORT_FIBER_PHY   1
*************** static int tg3_get_invariants(struct tg3
*** 2795,2799 ****
  static int  tg3_get_device_address(struct tg3 *tp)
  {
! 	struct nic *nic = tp->nic;
  	uint32_t hi, lo, mac_offset;
  
--- 2798,2802 ----
  static int  tg3_get_device_address(struct tg3 *tp)
  {
! 	struct nic *anic = tp->nic;
  	uint32_t hi, lo, mac_offset;
  
*************** static int  tg3_get_device_address(struc
*** 2806,2827 ****
  	tg3_read_mem(NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi);
  	if ((hi >> 16) == 0x484b) {
! 		nic->node_addr[0] = (hi >>  8) & 0xff;
! 		nic->node_addr[1] = (hi >>  0) & 0xff;
  
  		tg3_read_mem(NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo);
! 		nic->node_addr[2] = (lo >> 24) & 0xff;
! 		nic->node_addr[3] = (lo >> 16) & 0xff;
! 		nic->node_addr[4] = (lo >>  8) & 0xff;
! 		nic->node_addr[5] = (lo >>  0) & 0xff;
  	}
  	/* Next, try NVRAM. */
  	else if (!tg3_nvram_read(tp, mac_offset + 0, &hi) &&
  		 !tg3_nvram_read(tp, mac_offset + 4, &lo)) {
! 		nic->node_addr[0] = ((hi >> 16) & 0xff);
! 		nic->node_addr[1] = ((hi >> 24) & 0xff);
! 		nic->node_addr[2] = ((lo >>  0) & 0xff);
! 		nic->node_addr[3] = ((lo >>  8) & 0xff);
! 		nic->node_addr[4] = ((lo >> 16) & 0xff);
! 		nic->node_addr[5] = ((lo >> 24) & 0xff);
  	}
  	/* Finally just fetch it out of the MAC control regs. */
--- 2809,2830 ----
  	tg3_read_mem(NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi);
  	if ((hi >> 16) == 0x484b) {
! 		anic->node_addr[0] = (hi >>  8) & 0xff;
! 		anic->node_addr[1] = (hi >>  0) & 0xff;
  
  		tg3_read_mem(NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo);
! 		anic->node_addr[2] = (lo >> 24) & 0xff;
! 		anic->node_addr[3] = (lo >> 16) & 0xff;
! 		anic->node_addr[4] = (lo >>  8) & 0xff;
! 		anic->node_addr[5] = (lo >>  0) & 0xff;
  	}
  	/* Next, try NVRAM. */
  	else if (!tg3_nvram_read(tp, mac_offset + 0, &hi) &&
  		 !tg3_nvram_read(tp, mac_offset + 4, &lo)) {
! 		anic->node_addr[0] = ((hi >> 16) & 0xff);
! 		anic->node_addr[1] = ((hi >> 24) & 0xff);
! 		anic->node_addr[2] = ((lo >>  0) & 0xff);
! 		anic->node_addr[3] = ((lo >>  8) & 0xff);
! 		anic->node_addr[4] = ((lo >> 16) & 0xff);
! 		anic->node_addr[5] = ((lo >> 24) & 0xff);
  	}
  	/* Finally just fetch it out of the MAC control regs. */
*************** static int  tg3_get_device_address(struc
*** 2830,2839 ****
  		lo = tr32(MAC_ADDR_0_LOW);
  
! 		nic->node_addr[5] = lo & 0xff;
! 		nic->node_addr[4] = (lo >> 8) & 0xff;
! 		nic->node_addr[3] = (lo >> 16) & 0xff;
! 		nic->node_addr[2] = (lo >> 24) & 0xff;
! 		nic->node_addr[1] = hi & 0xff;
! 		nic->node_addr[0] = (hi >> 8) & 0xff;
  	}
  
--- 2833,2842 ----
  		lo = tr32(MAC_ADDR_0_LOW);
  
! 		anic->node_addr[5] = lo & 0xff;
! 		anic->node_addr[4] = (lo >> 8) & 0xff;
! 		anic->node_addr[3] = (lo >> 16) & 0xff;
! 		anic->node_addr[2] = (lo >> 24) & 0xff;
! 		anic->node_addr[1] = hi & 0xff;
! 		anic->node_addr[0] = (hi >> 8) & 0xff;
  	}
  
*************** static void tg3_ack_irqs(struct tg3 *tp)
*** 2974,2982 ****
  }
  
! static int tg3_poll(struct nic *nic)
  {
  	/* return true if there's an ethernet packet ready to read */
! 	/* nic->packet should contain data on return */
! 	/* nic->packetlen should contain length of data */
  
  	struct tg3 *tp = &tg3;
--- 2977,2985 ----
  }
  
! static int tg3_poll(struct nic *anic)
  {
  	/* return true if there's an ethernet packet ready to read */
! 	/* anic->packet should contain data on return */
! 	/* anic->packetlen should contain length of data */
  
  	struct tg3 *tp = &tg3;
*************** static int tg3_poll(struct nic *nic)
*** 2992,2997 ****
  			len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */
  			
! 			nic->packetlen = len;
! 			memcpy(nic->packet, bus_to_virt(desc->addr_lo), len);
  			result = 1;
  		}
--- 2995,3000 ----
  			len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */
  			
! 			anic->packetlen = len;
! 			memcpy(anic->packet, bus_to_virt(desc->addr_lo), len);
  			result = 1;
  		}
*************** static void tg3_set_txd(struct tg3 *tp, 
*** 3030,3034 ****
  }
  
! static void tg3_transmit(struct nic *nic, const char *dst_addr,
  	unsigned int type, unsigned int size, const char *packet)
  {
--- 3033,3037 ----
  }
  
! static void tg3_transmit(struct nic *anic, const char *dst_addr,
  	unsigned int type, unsigned int size, const char *packet)
  {
*************** static void tg3_transmit(struct nic *nic
*** 3068,3072 ****
  	/* Copy the packet to the our local buffer */
  	memcpy(&frame[frame_idx].dst_addr, dst_addr, ETH_ALEN);
! 	memcpy(&frame[frame_idx].src_addr, nic->node_addr, ETH_ALEN);
  	frame[frame_idx].type = htons(type);
  	memset(&frame[frame_idx].data, 0, sizeof(frame[frame_idx].data));
--- 3071,3075 ----
  	/* Copy the packet to the our local buffer */
  	memcpy(&frame[frame_idx].dst_addr, dst_addr, ETH_ALEN);
! 	memcpy(&frame[frame_idx].src_addr, anic->node_addr, ETH_ALEN);
  	frame[frame_idx].type = htons(type);
  	memset(&frame[frame_idx].data, 0, sizeof(frame[frame_idx].data));
*************** You should omit the last argument struct
*** 3120,3124 ****
  static int tg3_probe(struct dev *dev, struct pci_device *pdev)
  {
! 	struct nic *nic = (struct nic *)dev;
  	struct tg3 *tp = &tg3;
  	unsigned long tg3reg_base, tg3reg_len;
--- 3123,3127 ----
  static int tg3_probe(struct dev *dev, struct pci_device *pdev)
  {
! 	struct nic *anic = (struct nic *)dev;
  	struct tg3 *tp = &tg3;
  	unsigned long tg3reg_base, tg3reg_len;
*************** static int tg3_probe(struct dev *dev, st
*** 3146,3150 ****
  
  	tp->pdev       = pdev;
! 	tp->nic        = nic;
  	tp->pm_cap     = pm_cap;
  	tp->rx_mode    = 0;
--- 3149,3153 ----
  
  	tp->pdev       = pdev;
! 	tp->nic        = anic;
  	tp->pm_cap     = pm_cap;
  	tp->rx_mode    = 0;
*************** static int tg3_probe(struct dev *dev, st
*** 3193,3197 ****
  		goto err_out_iounmap;
  	}
! 	printf("Ethernet addr: %!\n", nic->node_addr);
  
  	tg3_setup_dma(tp);
--- 3196,3200 ----
  		goto err_out_iounmap;
  	}
! 	printf("Ethernet addr: %!\n", anic->node_addr);
  
  	tg3_setup_dma(tp);
*************** static int tg3_probe(struct dev *dev, st
*** 3232,3237 ****
  
  	dev->disable  = tg3_disable;
! 	nic->poll     = tg3_poll;
! 	nic->transmit = tg3_transmit;
  	return 1;
  
--- 3235,3240 ----
  
  	dev->disable  = tg3_disable;
! 	anic->poll     = tg3_poll;
! 	anic->transmit = tg3_transmit;
  	return 1;
  
