Changeset 20774


Ignore:
Timestamp:
2010-04-10T13:47:33+02:00 (7 years ago)
Author:
juhosg
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/target/linux/generic-2.6/files/drivers/net/phy/ar8216.c

    r20762 r20774  
    146146                return AR8316; 
    147147        default: 
    148                 printk(KERN_ERR 
     148                printk(KERN_DEBUG 
    149149                        "ar8216: Unknown Atheros device [ver=%d, rev=%d, phy_id=%04x%04x]\n", 
    150                         (int)(val >> AR8216_CTRL_VERSION_S), 
    151                         (int)(val & AR8216_CTRL_REVISION), 
     150                        (int)(id >> AR8216_CTRL_VERSION_S), 
     151                        (int)(id & AR8216_CTRL_REVISION), 
    152152                        priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 2), 
    153153                        priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 3)); 
     
    298298        /* no vlan? eat the packet! */ 
    299299        dev_kfree_skb_any(skb); 
    300         return 0; 
     300        return NET_RX_DROP; 
    301301} 
    302302 
     
    647647        priv->chip = ar8216_id_chip(priv); 
    648648 
    649         printk(KERN_INFO "%s: AR%d PHY driver attached.\n", 
    650                 pdev->attached_dev->name, priv->chip); 
     649        if (pdev->addr == 0) 
     650                printk(KERN_INFO "%s: AR%d switch driver attached.\n", 
     651                        pdev->attached_dev->name, priv->chip); 
     652 
    651653 
    652654        if (pdev->addr != 0) { 
Note: See TracChangeset for help on using the changeset viewer.