[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
95ea36275f
commit
0795af5729
228 changed files with 1875 additions and 1952 deletions
|
|
@ -177,6 +177,7 @@ el2_probe1(struct net_device *dev, int ioaddr)
|
|||
int i, iobase_reg, membase_reg, saved_406, wordlength, retval;
|
||||
static unsigned version_printed;
|
||||
unsigned long vendor_id;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (!request_region(ioaddr, EL2_IO_EXTENT, DRV_NAME))
|
||||
return -EBUSY;
|
||||
|
|
@ -226,7 +227,8 @@ el2_probe1(struct net_device *dev, int ioaddr)
|
|||
|
||||
/* Retrieve and print the ethernet address. */
|
||||
for (i = 0; i < 6; i++)
|
||||
printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i));
|
||||
dev->dev_addr[i] = inb(ioaddr + i);
|
||||
printk("%s", print_mac(mac, dev->dev_addr));
|
||||
|
||||
/* Map the 8390 back into the window. */
|
||||
outb(ECNTRL_THIN, ioaddr + 0x406);
|
||||
|
|
|
|||
|
|
@ -1386,6 +1386,7 @@ static int __init elplus_setup(struct net_device *dev)
|
|||
unsigned long timeout;
|
||||
unsigned long cookie = 0;
|
||||
int err = -ENODEV;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
/*
|
||||
* setup adapter structure
|
||||
|
|
@ -1521,11 +1522,10 @@ static int __init elplus_setup(struct net_device *dev)
|
|||
/*
|
||||
* print remainder of startup message
|
||||
*/
|
||||
printk(KERN_INFO "%s: 3c505 at %#lx, irq %d, dma %d, ",
|
||||
dev->name, dev->base_addr, dev->irq, dev->dma);
|
||||
printk("addr %02x:%02x:%02x:%02x:%02x:%02x, ",
|
||||
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
|
||||
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
|
||||
printk(KERN_INFO "%s: 3c505 at %#lx, irq %d, dma %d, "
|
||||
"addr %s, ",
|
||||
dev->name, dev->base_addr, dev->irq, dev->dma,
|
||||
print_mac(mac, dev->dev_addr));
|
||||
|
||||
/*
|
||||
* read more information from the adapter
|
||||
|
|
|
|||
|
|
@ -357,6 +357,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
|
|||
static unsigned char init_ID_done, version_printed;
|
||||
int i, irq, irqval, retval;
|
||||
struct net_local *lp;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (init_ID_done == 0) {
|
||||
ushort lrs_state = 0xff;
|
||||
|
|
@ -402,10 +403,9 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
|
|||
dev->base_addr = ioaddr;
|
||||
|
||||
outb(0x01, ioaddr + MISC_CTRL);
|
||||
for (i = 0; i < 6; i++) {
|
||||
for (i = 0; i < 6; i++)
|
||||
dev->dev_addr[i] = inb(ioaddr + i);
|
||||
printk(" %02x", dev->dev_addr[i]);
|
||||
}
|
||||
printk(" %s", print_mac(mac, dev->dev_addr));
|
||||
|
||||
if (mem_start)
|
||||
net_debug = mem_start & 7;
|
||||
|
|
|
|||
|
|
@ -313,8 +313,9 @@ static int nopnp;
|
|||
static int __init el3_common_init(struct net_device *dev)
|
||||
{
|
||||
struct el3_private *lp = netdev_priv(dev);
|
||||
short i;
|
||||
int err;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
|
||||
|
||||
spin_lock_init(&lp->lock);
|
||||
|
||||
|
|
@ -346,17 +347,10 @@ static int __init el3_common_init(struct net_device *dev)
|
|||
return err;
|
||||
}
|
||||
|
||||
{
|
||||
const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
|
||||
printk("%s: 3c5x9 found at %#3.3lx, %s port, address ",
|
||||
dev->name, dev->base_addr,
|
||||
if_names[(dev->if_port & 0x03)]);
|
||||
}
|
||||
|
||||
/* Read in the station address. */
|
||||
for (i = 0; i < 6; i++)
|
||||
printk(" %2.2x", dev->dev_addr[i]);
|
||||
printk(", IRQ %d.\n", dev->irq);
|
||||
printk(KERN_INFO "%s: 3c5x9 found at %#3.3lx, %s port, "
|
||||
"address %s, IRQ %d.\n",
|
||||
dev->name, dev->base_addr, if_names[(dev->if_port & 0x03)],
|
||||
print_mac(mac, dev->dev_addr), dev->irq);
|
||||
|
||||
if (el3_debug > 0)
|
||||
printk(KERN_INFO "%s", version);
|
||||
|
|
|
|||
|
|
@ -569,6 +569,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
|
|||
unsigned int eeprom[0x40], checksum = 0; /* EEPROM contents */
|
||||
int i;
|
||||
int irq;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (idev) {
|
||||
irq = pnp_irq(idev, 0);
|
||||
|
|
@ -630,8 +631,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
|
|||
checksum = (checksum ^ (checksum >> 8)) & 0xff;
|
||||
if (checksum != 0x00)
|
||||
printk(" ***INVALID CHECKSUM %4.4x*** ", checksum);
|
||||
for (i = 0; i < 6; i++)
|
||||
printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
|
||||
printk(" %s", print_mac(mac, dev->dev_addr));
|
||||
if (eeprom[16] == 0x11c7) { /* Corkscrew */
|
||||
if (request_dma(dev->dma, "3c515")) {
|
||||
printk(", DMA %d allocation failed", dev->dma);
|
||||
|
|
|
|||
|
|
@ -383,8 +383,8 @@ void alloc586(struct net_device *dev)
|
|||
static int elmc_getinfo(char *buf, int slot, void *d)
|
||||
{
|
||||
int len = 0;
|
||||
struct net_device *dev = (struct net_device *) d;
|
||||
int i;
|
||||
struct net_device *dev = d;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (dev == NULL)
|
||||
return len;
|
||||
|
|
@ -399,12 +399,8 @@ static int elmc_getinfo(char *buf, int slot, void *d)
|
|||
len += sprintf(buf + len, "Transceiver: %s\n", dev->if_port ?
|
||||
"External" : "Internal");
|
||||
len += sprintf(buf + len, "Device: %s\n", dev->name);
|
||||
len += sprintf(buf + len, "Hardware Address:");
|
||||
for (i = 0; i < 6; i++) {
|
||||
len += sprintf(buf + len, " %02x", dev->dev_addr[i]);
|
||||
}
|
||||
buf[len++] = '\n';
|
||||
buf[len] = 0;
|
||||
len += sprintf(buf + len, "Hardware Address: %s\n",
|
||||
print_mac(mac, dev->dev_addr));
|
||||
|
||||
return len;
|
||||
} /* elmc_getinfo() */
|
||||
|
|
@ -422,6 +418,7 @@ static int __init do_elmc_probe(struct net_device *dev)
|
|||
unsigned int size = 0;
|
||||
int retval;
|
||||
struct priv *pr = dev->priv;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (MCA_bus == 0) {
|
||||
return -ENODEV;
|
||||
|
|
@ -544,12 +541,11 @@ static int __init do_elmc_probe(struct net_device *dev)
|
|||
|
||||
/* The hardware address for the 3c523 is stored in the first six
|
||||
bytes of the IO address. */
|
||||
printk(KERN_INFO "%s: hardware address ", dev->name);
|
||||
for (i = 0; i < 6; i++) {
|
||||
for (i = 0; i < 6; i++)
|
||||
dev->dev_addr[i] = inb(dev->base_addr + i);
|
||||
printk(" %02x", dev->dev_addr[i]);
|
||||
}
|
||||
printk("\n");
|
||||
|
||||
printk(KERN_INFO "%s: hardware address %s\n",
|
||||
dev->name, print_mac(mac, dev->dev_addr));
|
||||
|
||||
dev->open = &elmc_open;
|
||||
dev->stop = &elmc_close;
|
||||
|
|
|
|||
|
|
@ -336,6 +336,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
|
|||
"82586 initialisation failure",
|
||||
"Adapter list configuration error"
|
||||
};
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
/* Time to play MCA games */
|
||||
|
||||
|
|
@ -396,17 +397,17 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
|
|||
* Go PROM browsing
|
||||
*/
|
||||
|
||||
printk("%s: Address ", dev->name);
|
||||
|
||||
/* Retrieve and print the ethernet address. */
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
mca_write_pos(slot, 6, i+12);
|
||||
mca_write_pos(slot, 7, 0);
|
||||
|
||||
printk(" %2.2x", dev->dev_addr[i] = mca_read_pos(slot,3));
|
||||
dev->dev_addr[i] = mca_read_pos(slot,3);
|
||||
}
|
||||
|
||||
printk("%s: Address %s", dev->name, print_mac(mac, dev->dev_addr));
|
||||
|
||||
mca_write_pos(slot, 6, 0);
|
||||
mca_write_pos(slot, 7, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -1014,6 +1014,7 @@ static int __devinit vortex_probe1(struct device *gendev,
|
|||
char *print_name = "3c59x";
|
||||
struct pci_dev *pdev = NULL;
|
||||
struct eisa_device *edev = NULL;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (!printed_version) {
|
||||
printk (version);
|
||||
|
|
@ -1205,10 +1206,8 @@ static int __devinit vortex_probe1(struct device *gendev,
|
|||
for (i = 0; i < 3; i++)
|
||||
((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]);
|
||||
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
|
||||
if (print_info) {
|
||||
for (i = 0; i < 6; i++)
|
||||
printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
|
||||
}
|
||||
if (print_info)
|
||||
printk(" %s", print_mac(mac, dev->dev_addr));
|
||||
/* Unfortunately an all zero eeprom passes the checksum and this
|
||||
gets found in the wild in failure cases. Crypto is hard 8) */
|
||||
if (!is_valid_ether_addr(dev->dev_addr)) {
|
||||
|
|
|
|||
|
|
@ -1823,6 +1823,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
void __iomem *regs;
|
||||
resource_size_t pciaddr;
|
||||
unsigned int addr_len, i, pci_using_dac;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
#ifndef MODULE
|
||||
static int version_printed;
|
||||
|
|
@ -1964,13 +1965,10 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
goto err_out_iomap;
|
||||
|
||||
printk (KERN_INFO "%s: RTL-8139C+ at 0x%lx, "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x, "
|
||||
"IRQ %d\n",
|
||||
"%s, IRQ %d\n",
|
||||
dev->name,
|
||||
dev->base_addr,
|
||||
dev->dev_addr[0], dev->dev_addr[1],
|
||||
dev->dev_addr[2], dev->dev_addr[3],
|
||||
dev->dev_addr[4], dev->dev_addr[5],
|
||||
print_mac(mac, dev->dev_addr),
|
||||
dev->irq);
|
||||
|
||||
pci_set_drvdata(pdev, dev);
|
||||
|
|
|
|||
|
|
@ -926,6 +926,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
int i, addr_len, option;
|
||||
void __iomem *ioaddr;
|
||||
static int board_idx = -1;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
assert (pdev != NULL);
|
||||
assert (ent != NULL);
|
||||
|
|
@ -1017,14 +1018,11 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
|||
pci_set_drvdata (pdev, dev);
|
||||
|
||||
printk (KERN_INFO "%s: %s at 0x%lx, "
|
||||
"%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "
|
||||
"IRQ %d\n",
|
||||
"%s, IRQ %d\n",
|
||||
dev->name,
|
||||
board_info[ent->driver_data].name,
|
||||
dev->base_addr,
|
||||
dev->dev_addr[0], dev->dev_addr[1],
|
||||
dev->dev_addr[2], dev->dev_addr[3],
|
||||
dev->dev_addr[4], dev->dev_addr[5],
|
||||
print_mac(mac, dev->dev_addr),
|
||||
dev->irq);
|
||||
|
||||
printk (KERN_DEBUG "%s: Identified 8139 chip type '%s'\n",
|
||||
|
|
|
|||
|
|
@ -1116,15 +1116,12 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
|
||||
static void print_eth(unsigned char *add, char *str)
|
||||
{
|
||||
int i;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
DECLARE_MAC_BUF(mac2);
|
||||
|
||||
printk(KERN_DEBUG "i596 0x%p, ", add);
|
||||
for (i = 0; i < 6; i++)
|
||||
printk(" %02X", add[i + 6]);
|
||||
printk(" -->");
|
||||
for (i = 0; i < 6; i++)
|
||||
printk(" %02X", add[i]);
|
||||
printk(" %02X%02X, %s\n", add[12], add[13], str);
|
||||
printk(KERN_DEBUG "i596 0x%p, %s --> %s %02X%02X, %s\n",
|
||||
add, print_mac(mac, add + 6), print_mac(mac2, add),
|
||||
add[12], add[13], str);
|
||||
}
|
||||
|
||||
static int io = 0x300;
|
||||
|
|
@ -1539,6 +1536,7 @@ static void set_multicast_list(struct net_device *dev)
|
|||
struct dev_mc_list *dmi;
|
||||
unsigned char *cp;
|
||||
struct mc_cmd *cmd;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (wait_cfg(dev, &lp->mc_cmd.cmd, 1000, "multicast list change request timed out"))
|
||||
return;
|
||||
|
|
@ -1549,8 +1547,8 @@ static void set_multicast_list(struct net_device *dev)
|
|||
for (dmi = dev->mc_list; cnt && dmi != NULL; dmi = dmi->next, cnt--, cp += 6) {
|
||||
memcpy(cp, dmi->dmi_addr, 6);
|
||||
if (i596_debug > 1)
|
||||
DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
dev->name, cp[0],cp[1],cp[2],cp[3],cp[4],cp[5]));
|
||||
DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %s\n",
|
||||
dev->name, print_mac(mac, cp)));
|
||||
}
|
||||
i596_add_cmd(dev, &cmd->cmd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -716,6 +716,7 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
|
|||
unsigned long board, base_addr, mem_start;
|
||||
struct resource *r1, *r2;
|
||||
int err;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
board = z->resource.start;
|
||||
base_addr = board+A2065_LANCE;
|
||||
|
|
@ -792,9 +793,8 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
|
|||
zorro_set_drvdata(z, dev);
|
||||
|
||||
printk(KERN_INFO "%s: A2065 at 0x%08lx, Ethernet Address "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, board,
|
||||
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
|
||||
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
|
||||
"%s\n", dev->name, board,
|
||||
print_mac(mac, dev->dev_addr));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ out:
|
|||
static int __init ac_probe1(int ioaddr, struct net_device *dev)
|
||||
{
|
||||
int i, retval;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (!request_region(ioaddr, AC_IO_EXTENT, DRV_NAME))
|
||||
return -EBUSY;
|
||||
|
|
@ -167,10 +168,11 @@ static int __init ac_probe1(int ioaddr, struct net_device *dev)
|
|||
inb(ioaddr + AC_ID_PORT + 2), inb(ioaddr + AC_ID_PORT + 3));
|
||||
#endif
|
||||
|
||||
printk("AC3200 in EISA slot %d, node", ioaddr/0x1000);
|
||||
for(i = 0; i < 6; i++)
|
||||
printk(" %02x", dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i));
|
||||
for (i = 0; i < 6; i++)
|
||||
dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i);
|
||||
|
||||
printk(KERN_DEBUG "AC3200 in EISA slot %d, node %s",
|
||||
ioaddr/0x1000, print_mac(mac, dev->dev_addr));
|
||||
#if 0
|
||||
/* Check the vendor ID/prefix. Redundant after checking the EISA ID */
|
||||
if (inb(ioaddr + AC_SA_PROM + 0) != AC_ADDR0
|
||||
|
|
|
|||
|
|
@ -893,6 +893,7 @@ static int __devinit ace_init(struct net_device *dev)
|
|||
int board_idx, ecode = 0;
|
||||
short i;
|
||||
unsigned char cache_size;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
ap = netdev_priv(dev);
|
||||
regs = ap->regs;
|
||||
|
|
@ -1012,10 +1013,6 @@ static int __devinit ace_init(struct net_device *dev)
|
|||
writel(mac1, ®s->MacAddrHi);
|
||||
writel(mac2, ®s->MacAddrLo);
|
||||
|
||||
printk("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
(mac1 >> 8) & 0xff, mac1 & 0xff, (mac2 >> 24) &0xff,
|
||||
(mac2 >> 16) & 0xff, (mac2 >> 8) & 0xff, mac2 & 0xff);
|
||||
|
||||
dev->dev_addr[0] = (mac1 >> 8) & 0xff;
|
||||
dev->dev_addr[1] = mac1 & 0xff;
|
||||
dev->dev_addr[2] = (mac2 >> 24) & 0xff;
|
||||
|
|
@ -1023,6 +1020,8 @@ static int __devinit ace_init(struct net_device *dev)
|
|||
dev->dev_addr[4] = (mac2 >> 8) & 0xff;
|
||||
dev->dev_addr[5] = mac2 & 0xff;
|
||||
|
||||
printk("MAC: %s\n", print_mac(mac, dev->dev_addr));
|
||||
|
||||
/*
|
||||
* Looks like this is necessary to deal with on all architectures,
|
||||
* even this %$#%$# N440BX Intel based thing doesn't get it right.
|
||||
|
|
|
|||
|
|
@ -1934,6 +1934,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
|
|||
unsigned long reg_addr,reg_len;
|
||||
struct amd8111e_priv* lp;
|
||||
struct net_device* dev;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
err = pci_enable_device(pdev);
|
||||
if(err){
|
||||
|
|
@ -2006,7 +2007,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
|
|||
|
||||
/* Initializing MAC address */
|
||||
for(i = 0; i < ETH_ADDR_LEN; i++)
|
||||
dev->dev_addr[i] =readb(lp->mmio + PADR + i);
|
||||
dev->dev_addr[i] = readb(lp->mmio + PADR + i);
|
||||
|
||||
/* Setting user defined parametrs */
|
||||
lp->ext_phy_option = speed_duplex[card_idx];
|
||||
|
|
@ -2075,11 +2076,10 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
|
|||
/* display driver and device information */
|
||||
|
||||
chip_version = (readl(lp->mmio + CHIPID) & 0xf0000000)>>28;
|
||||
printk(KERN_INFO "%s: AMD-8111e Driver Version: %s\n", dev->name,MODULE_VERS);
|
||||
printk(KERN_INFO "%s: [ Rev %x ] PCI 10/100BaseT Ethernet ", dev->name, chip_version);
|
||||
for (i = 0; i < 6; i++)
|
||||
printk("%2.2x%c",dev->dev_addr[i],i == 5 ? ' ' : ':');
|
||||
printk( "\n");
|
||||
printk(KERN_INFO "%s: AMD-8111e Driver Version: %s\n",
|
||||
dev->name,MODULE_VERS);
|
||||
printk(KERN_INFO "%s: [ Rev %x ] PCI 10/100BaseT Ethernet %s\n",
|
||||
dev->name, chip_version, print_mac(mac, dev->dev_addr));
|
||||
if (lp->ext_phy_id)
|
||||
printk(KERN_INFO "%s: Found MII PHY ID 0x%08x at address 0x%02x\n",
|
||||
dev->name, lp->ext_phy_id, lp->ext_phy_addr);
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
|
|||
int neX000, ctron;
|
||||
#endif
|
||||
static unsigned version_printed;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (ei_debug && version_printed++ == 0)
|
||||
printk(version);
|
||||
|
|
@ -316,12 +317,12 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
|
|||
i = request_irq(dev->irq, apne_interrupt, IRQF_SHARED, DRV_NAME, dev);
|
||||
if (i) return i;
|
||||
|
||||
for(i = 0; i < ETHER_ADDR_LEN; i++) {
|
||||
printk(" %2.2x", SA_prom[i]);
|
||||
for(i = 0; i < ETHER_ADDR_LEN; i++)
|
||||
dev->dev_addr[i] = SA_prom[i];
|
||||
}
|
||||
|
||||
printk("\n%s: %s found.\n", dev->name, name);
|
||||
printk(" %s\n", print_mac(mac, dev->dev_addr));
|
||||
|
||||
printk("%s: %s found.\n", dev->name, name);
|
||||
|
||||
ei_status.name = name;
|
||||
ei_status.tx_start_page = start_page;
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ static int __devinit ariadne_init_one(struct zorro_dev *z,
|
|||
struct net_device *dev;
|
||||
struct ariadne_private *priv;
|
||||
int err;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960");
|
||||
if (!r1)
|
||||
|
|
@ -216,9 +217,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z,
|
|||
zorro_set_drvdata(z, dev);
|
||||
|
||||
printk(KERN_INFO "%s: Ariadne at 0x%08lx, Ethernet Address "
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, board,
|
||||
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
|
||||
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
|
||||
"%s\n", dev->name, board,
|
||||
print_mac(mac, dev->dev_addr));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -614,21 +614,17 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
/* Fill in a Tx ring entry */
|
||||
|
||||
#if 0
|
||||
printk(KERN_DEBUG "TX pkt type 0x%04x from ", ((u_short *)skb->data)[6]);
|
||||
{
|
||||
int i;
|
||||
u_char *ptr = &((u_char *)skb->data)[6];
|
||||
for (i = 0; i < 6; i++)
|
||||
printk("%02x", ptr[i]);
|
||||
}
|
||||
printk(" to ");
|
||||
{
|
||||
int i;
|
||||
u_char *ptr = (u_char *)skb->data;
|
||||
for (i = 0; i < 6; i++)
|
||||
printk("%02x", ptr[i]);
|
||||
}
|
||||
printk(" data 0x%08x len %d\n", (int)skb->data, (int)skb->len);
|
||||
{
|
||||
DECLARE_MAC_BUF(mac);
|
||||
DECLARE_MAC_BUF(mac2);
|
||||
|
||||
printk(KERN_DEBUG "TX pkt type 0x%04x from %s to %s "
|
||||
" data 0x%08x len %d\n",
|
||||
((u_short *)skb->data)[6],
|
||||
print_mac(mac, ((const u8 *)skb->data)+6),
|
||||
print_mac(mac, (const u8 *)skb->data),
|
||||
(int)skb->data, (int)skb->len);
|
||||
}
|
||||
#endif
|
||||
|
||||
local_irq_save(flags);
|
||||
|
|
@ -748,22 +744,22 @@ static int ariadne_rx(struct net_device *dev)
|
|||
skb_copy_to_linear_data(skb, (char *)priv->rx_buff[entry], pkt_len);
|
||||
skb->protocol=eth_type_trans(skb,dev);
|
||||
#if 0
|
||||
{
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
printk(KERN_DEBUG "RX pkt type 0x%04x from ",
|
||||
((u_short *)skb->data)[6]);
|
||||
{
|
||||
int i;
|
||||
u_char *ptr = &((u_char *)skb->data)[6];
|
||||
for (i = 0; i < 6; i++)
|
||||
printk("%02x", ptr[i]);
|
||||
printk("%s", print_mac(mac, ptr));
|
||||
}
|
||||
printk(" to ");
|
||||
{
|
||||
int i;
|
||||
u_char *ptr = (u_char *)skb->data;
|
||||
for (i = 0; i < 6; i++)
|
||||
printk("%02x", ptr[i]);
|
||||
printk("%s", print_mac(mac, ptr));
|
||||
}
|
||||
printk(" data 0x%08x len %d\n", (int)skb->data, (int)skb->len);
|
||||
}
|
||||
#endif
|
||||
|
||||
netif_rx(skb);
|
||||
|
|
|
|||
|
|
@ -741,12 +741,10 @@ static int __init am79c961_probe(struct platform_device *pdev)
|
|||
|
||||
ret = register_netdev(dev);
|
||||
if (ret == 0) {
|
||||
printk(KERN_INFO "%s: ether address ", dev->name);
|
||||
|
||||
/* Retrive and print the ethernet address. */
|
||||
for (i = 0; i < 6; i++)
|
||||
printk (i == 5 ? "%02x\n" : "%02x:", dev->dev_addr[i]);
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
printk(KERN_INFO "%s: ether address %s\n",
|
||||
dev->name, print_mac(mac, dev->dev_addr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -485,6 +485,7 @@ static void update_mac_address(struct net_device *dev)
|
|||
static int set_mac_address(struct net_device *dev, void* addr)
|
||||
{
|
||||
struct sockaddr *address = addr;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
if (!is_valid_ether_addr(address->sa_data))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
|
@ -492,9 +493,8 @@ static int set_mac_address(struct net_device *dev, void* addr)
|
|||
memcpy(dev->dev_addr, address->sa_data, dev->addr_len);
|
||||
update_mac_address(dev);
|
||||
|
||||
printk("%s: Setting MAC address to %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name,
|
||||
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
|
||||
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
|
||||
printk("%s: Setting MAC address to %s\n", dev->name,
|
||||
print_mac(mac, dev->dev_addr));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -979,6 +979,7 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
|
|||
struct at91_private *lp;
|
||||
unsigned int val;
|
||||
int res;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
dev = alloc_etherdev(sizeof(struct at91_private));
|
||||
if (!dev)
|
||||
|
|
@ -1081,12 +1082,11 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
|
|||
}
|
||||
|
||||
/* Display ethernet banner */
|
||||
printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%02x:%02x:%02x:%02x:%02x:%02x)\n",
|
||||
dev->name, (uint) dev->base_addr, dev->irq,
|
||||
at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_SPD ? "100-" : "10-",
|
||||
at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_FD ? "FullDuplex" : "HalfDuplex",
|
||||
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
|
||||
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
|
||||
printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%s)\n",
|
||||
dev->name, (uint) dev->base_addr, dev->irq,
|
||||
at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_SPD ? "100-" : "10-",
|
||||
at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_FD ? "FullDuplex" : "HalfDuplex",
|
||||
print_mac(mac, dev->dev_addr));
|
||||
if ((phy_type == MII_DM9161_ID) || (lp->phy_type == MII_DM9161A_ID))
|
||||
printk(KERN_INFO "%s: Davicom 9161 PHY %s\n", dev->name, (lp->phy_media == PORT_FIBRE) ? "(Fiber)" : "(Copper)");
|
||||
else if (phy_type == MII_LXT971A_ID)
|
||||
|
|
|
|||
|
|
@ -996,6 +996,7 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
|
|||
{
|
||||
struct net_device *dev;
|
||||
int i, ret = 0;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
ether1_banner();
|
||||
|
||||
|
|
@ -1043,12 +1044,9 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
|
|||
if (ret)
|
||||
goto free;
|
||||
|
||||
printk(KERN_INFO "%s: ether1 in slot %d, ",
|
||||
dev->name, ec->slot_no);
|
||||
printk(KERN_INFO "%s: ether1 in slot %d, %s\n",
|
||||
dev->name, ec->slot_no, print_mac(mac, dev->dev_addr));
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
printk ("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
|
||||
|
||||
ecard_set_drvdata(ec, dev);
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue