mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
au1000-eth: change multi-line comments style
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d0e7cb5d40
commit
dc99839cf6
@ -229,11 +229,15 @@ static void au1000_mdio_write(struct net_device *dev, int phy_addr,
|
|||||||
static int au1000_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
|
static int au1000_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum)
|
||||||
{
|
{
|
||||||
/* WARNING: bus->phy_map[phy_addr].attached_dev == dev does
|
/* WARNING: bus->phy_map[phy_addr].attached_dev == dev does
|
||||||
* _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */
|
* _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus)
|
||||||
|
*/
|
||||||
struct net_device *const dev = bus->priv;
|
struct net_device *const dev = bus->priv;
|
||||||
|
|
||||||
au1000_enable_mac(dev, 0); /* make sure the MAC associated with this
|
/* make sure the MAC associated with this
|
||||||
* mii_bus is enabled */
|
* mii_bus is enabled
|
||||||
|
*/
|
||||||
|
au1000_enable_mac(dev, 0);
|
||||||
|
|
||||||
return au1000_mdio_read(dev, phy_addr, regnum);
|
return au1000_mdio_read(dev, phy_addr, regnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,8 +246,11 @@ static int au1000_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,
|
|||||||
{
|
{
|
||||||
struct net_device *const dev = bus->priv;
|
struct net_device *const dev = bus->priv;
|
||||||
|
|
||||||
au1000_enable_mac(dev, 0); /* make sure the MAC associated with this
|
/* make sure the MAC associated with this
|
||||||
* mii_bus is enabled */
|
* mii_bus is enabled
|
||||||
|
*/
|
||||||
|
au1000_enable_mac(dev, 0);
|
||||||
|
|
||||||
au1000_mdio_write(dev, phy_addr, regnum, value);
|
au1000_mdio_write(dev, phy_addr, regnum, value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -252,8 +259,11 @@ static int au1000_mdiobus_reset(struct mii_bus *bus)
|
|||||||
{
|
{
|
||||||
struct net_device *const dev = bus->priv;
|
struct net_device *const dev = bus->priv;
|
||||||
|
|
||||||
au1000_enable_mac(dev, 0); /* make sure the MAC associated with this
|
/* make sure the MAC associated with this
|
||||||
* mii_bus is enabled */
|
* mii_bus is enabled
|
||||||
|
*/
|
||||||
|
au1000_enable_mac(dev, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,7 +390,8 @@ static int au1000_mii_probe(struct net_device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* find the first (lowest address) PHY
|
/* find the first (lowest address) PHY
|
||||||
* on the current MAC's MII bus */
|
* on the current MAC's MII bus
|
||||||
|
*/
|
||||||
for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++)
|
for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++)
|
||||||
if (aup->mii_bus->phy_map[phy_addr]) {
|
if (aup->mii_bus->phy_map[phy_addr]) {
|
||||||
phydev = aup->mii_bus->phy_map[phy_addr];
|
phydev = aup->mii_bus->phy_map[phy_addr];
|
||||||
@ -774,7 +785,8 @@ static void au1000_update_tx_stats(struct net_device *dev, u32 status)
|
|||||||
if (!aup->phy_dev || (DUPLEX_FULL == aup->phy_dev->duplex)) {
|
if (!aup->phy_dev || (DUPLEX_FULL == aup->phy_dev->duplex)) {
|
||||||
if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
|
if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
|
||||||
/* any other tx errors are only valid
|
/* any other tx errors are only valid
|
||||||
* in half duplex mode */
|
* in half duplex mode
|
||||||
|
*/
|
||||||
ps->tx_errors++;
|
ps->tx_errors++;
|
||||||
ps->tx_aborted_errors++;
|
ps->tx_aborted_errors++;
|
||||||
}
|
}
|
||||||
@ -1068,8 +1080,9 @@ static int __devinit au1000_probe(struct platform_device *pdev)
|
|||||||
aup->msg_enable = (au1000_debug < 4 ?
|
aup->msg_enable = (au1000_debug < 4 ?
|
||||||
AU1000_DEF_MSG_ENABLE : au1000_debug);
|
AU1000_DEF_MSG_ENABLE : au1000_debug);
|
||||||
|
|
||||||
/* Allocate the data buffers */
|
/* Allocate the data buffers
|
||||||
/* Snooping works fine with eth on all au1xxx */
|
* Snooping works fine with eth on all au1xxx
|
||||||
|
*/
|
||||||
aup->vaddr = (u32)dma_alloc_noncoherent(NULL, MAX_BUF_SIZE *
|
aup->vaddr = (u32)dma_alloc_noncoherent(NULL, MAX_BUF_SIZE *
|
||||||
(NUM_TX_BUFFS + NUM_RX_BUFFS),
|
(NUM_TX_BUFFS + NUM_RX_BUFFS),
|
||||||
&aup->dma_addr, 0);
|
&aup->dma_addr, 0);
|
||||||
@ -1226,7 +1239,8 @@ err_out:
|
|||||||
mdiobus_unregister(aup->mii_bus);
|
mdiobus_unregister(aup->mii_bus);
|
||||||
|
|
||||||
/* here we should have a valid dev plus aup-> register addresses
|
/* here we should have a valid dev plus aup-> register addresses
|
||||||
* so we can reset the mac properly.*/
|
* so we can reset the mac properly.
|
||||||
|
*/
|
||||||
au1000_reset_mac(dev);
|
au1000_reset_mac(dev);
|
||||||
|
|
||||||
for (i = 0; i < NUM_RX_DMA; i++) {
|
for (i = 0; i < NUM_RX_DMA; i++) {
|
||||||
|
@ -100,7 +100,8 @@ struct au1000_private {
|
|||||||
int mac_id;
|
int mac_id;
|
||||||
|
|
||||||
int mac_enabled; /* whether MAC is currently enabled and running
|
int mac_enabled; /* whether MAC is currently enabled and running
|
||||||
(req. for mdio) */
|
* (req. for mdio)
|
||||||
|
*/
|
||||||
|
|
||||||
int old_link; /* used by au1000_adjust_link */
|
int old_link; /* used by au1000_adjust_link */
|
||||||
int old_speed;
|
int old_speed;
|
||||||
@ -119,7 +120,8 @@ struct au1000_private {
|
|||||||
int phy_irq;
|
int phy_irq;
|
||||||
|
|
||||||
/* These variables are just for quick access
|
/* These variables are just for quick access
|
||||||
* to certain regs addresses. */
|
* to certain regs addresses.
|
||||||
|
*/
|
||||||
struct mac_reg *mac; /* mac registers */
|
struct mac_reg *mac; /* mac registers */
|
||||||
u32 *enable; /* address of MAC Enable Register */
|
u32 *enable; /* address of MAC Enable Register */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user