mirror of https://gitee.com/openkylin/linux.git
tulip/eeprom.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available Convert printks to pr_<level> where not Coalesce format strings Change print formats with %d.dx to %0dx Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dde7c8ef16
commit
e9cd1cbcda
|
@ -161,15 +161,15 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
|
|||
if (ee_data[0] == 0xff) {
|
||||
if (last_mediatable) {
|
||||
controller_index++;
|
||||
printk(KERN_INFO "%s: Controller %d of multiport board.\n",
|
||||
dev->name, controller_index);
|
||||
dev_info(&dev->dev,
|
||||
"Controller %d of multiport board\n",
|
||||
controller_index);
|
||||
tp->mtable = last_mediatable;
|
||||
ee_data = last_ee_data;
|
||||
goto subsequent_board;
|
||||
} else
|
||||
printk(KERN_INFO "%s: Missing EEPROM, this interface may "
|
||||
"not work correctly!\n",
|
||||
dev->name);
|
||||
dev_info(&dev->dev,
|
||||
"Missing EEPROM, this interface may not work correctly!\n");
|
||||
return;
|
||||
}
|
||||
/* Do a fix-up based on the vendor half of the station address prefix. */
|
||||
|
@ -181,16 +181,15 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
|
|||
i++; /* An Accton EN1207, not an outlaw Maxtech. */
|
||||
memcpy(ee_data + 26, eeprom_fixups[i].newtable,
|
||||
sizeof(eeprom_fixups[i].newtable));
|
||||
printk(KERN_INFO "%s: Old format EEPROM on '%s' board. Using"
|
||||
" substitute media control info.\n",
|
||||
dev->name, eeprom_fixups[i].name);
|
||||
dev_info(&dev->dev,
|
||||
"Old format EEPROM on '%s' board. Using substitute media control info\n",
|
||||
eeprom_fixups[i].name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (eeprom_fixups[i].name == NULL) { /* No fixup found. */
|
||||
printk(KERN_INFO "%s: Old style EEPROM with no media selection "
|
||||
"information.\n",
|
||||
dev->name);
|
||||
dev_info(&dev->dev,
|
||||
"Old style EEPROM with no media selection information\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +217,8 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
|
|||
/* there is no phy information, don't even try to build mtable */
|
||||
if (count == 0) {
|
||||
if (tulip_debug > 0)
|
||||
printk(KERN_WARNING "%s: no phy info, aborting mtable build\n", dev->name);
|
||||
dev_warn(&dev->dev,
|
||||
"no phy info, aborting mtable build\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
|
|||
mtable->has_nonmii = mtable->has_mii = mtable->has_reset = 0;
|
||||
mtable->csr15dir = mtable->csr15val = 0;
|
||||
|
||||
printk(KERN_INFO "%s: EEPROM default media type %s.\n", dev->name,
|
||||
dev_info(&dev->dev, "EEPROM default media type %s\n",
|
||||
media & 0x0800 ? "Autosense" : medianame[media & MEDIA_MASK]);
|
||||
for (i = 0; i < count; i++) {
|
||||
struct medialeaf *leaf = &mtable->mleaf[i];
|
||||
|
@ -298,14 +298,15 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
|
|||
}
|
||||
if (tulip_debug > 1 && leaf->media == 11) {
|
||||
unsigned char *bp = leaf->leafdata;
|
||||
printk(KERN_INFO "%s: MII interface PHY %d, setup/reset "
|
||||
"sequences %d/%d long, capabilities %2.2x %2.2x.\n",
|
||||
dev->name, bp[0], bp[1], bp[2 + bp[1]*2],
|
||||
bp[5 + bp[2 + bp[1]*2]*2], bp[4 + bp[2 + bp[1]*2]*2]);
|
||||
dev_info(&dev->dev,
|
||||
"MII interface PHY %d, setup/reset sequences %d/%d long, capabilities %02x %02x\n",
|
||||
bp[0], bp[1], bp[2 + bp[1]*2],
|
||||
bp[5 + bp[2 + bp[1]*2]*2],
|
||||
bp[4 + bp[2 + bp[1]*2]*2]);
|
||||
}
|
||||
printk(KERN_INFO "%s: Index #%d - Media %s (#%d) described "
|
||||
"by a %s (%d) block.\n",
|
||||
dev->name, i, medianame[leaf->media & 15], leaf->media,
|
||||
dev_info(&dev->dev,
|
||||
"Index #%d - Media %s (#%d) described by a %s (%d) block\n",
|
||||
i, medianame[leaf->media & 15], leaf->media,
|
||||
leaf->type < ARRAY_SIZE(block_name) ? block_name[leaf->type] : "<unknown>",
|
||||
leaf->type);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue