mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-25 08:13:20 +02:00
backfire: Generic: Clean up output of AR8216 driver. (backport of r20773)
This patch is rather a cosmetic patch. It fixes the following issues: * Demote the unknown device message to debug level to not spam the log. * Fix the version print of the unknown device message. * Output the 'attach' message only when attaching as switch driver, not when attaching as phy driver. * Correctly return NET_RX_DROP when dropping packets. Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@20774 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4703844c5e
commit
f382721827
@ -145,10 +145,10 @@ ar8216_id_chip(struct ar8216_priv *priv)
|
|||||||
case 0x1001:
|
case 0x1001:
|
||||||
return AR8316;
|
return AR8316;
|
||||||
default:
|
default:
|
||||||
printk(KERN_ERR
|
printk(KERN_DEBUG
|
||||||
"ar8216: Unknown Atheros device [ver=%d, rev=%d, phy_id=%04x%04x]\n",
|
"ar8216: Unknown Atheros device [ver=%d, rev=%d, phy_id=%04x%04x]\n",
|
||||||
(int)(val >> AR8216_CTRL_VERSION_S),
|
(int)(id >> AR8216_CTRL_VERSION_S),
|
||||||
(int)(val & AR8216_CTRL_REVISION),
|
(int)(id & AR8216_CTRL_REVISION),
|
||||||
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 2),
|
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 2),
|
||||||
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 3));
|
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 3));
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ recv:
|
|||||||
error:
|
error:
|
||||||
/* no vlan? eat the packet! */
|
/* no vlan? eat the packet! */
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
return 0;
|
return NET_RX_DROP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -646,8 +646,10 @@ ar8216_config_init(struct phy_device *pdev)
|
|||||||
|
|
||||||
priv->chip = ar8216_id_chip(priv);
|
priv->chip = ar8216_id_chip(priv);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: AR%d PHY driver attached.\n",
|
if (pdev->addr == 0)
|
||||||
pdev->attached_dev->name, priv->chip);
|
printk(KERN_INFO "%s: AR%d switch driver attached.\n",
|
||||||
|
pdev->attached_dev->name, priv->chip);
|
||||||
|
|
||||||
|
|
||||||
if (pdev->addr != 0) {
|
if (pdev->addr != 0) {
|
||||||
if (priv->chip == AR8316) {
|
if (priv->chip == AR8316) {
|
||||||
|
Loading…
Reference in New Issue
Block a user