Commit 99fa7e14 authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman

staging: et131x: Converting et1310_phy.c function and local names from CamelCase

Tested on an ET-131x device.
Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1de13783
......@@ -451,11 +451,11 @@ void config_flow_control(struct et131x_adapter *etdev)
} else {
char remote_pause, remote_async_pause;
ET1310_PhyAccessMiBit(etdev,
TRUEPHY_BIT_READ, 5, 10, &remote_pause);
ET1310_PhyAccessMiBit(etdev,
TRUEPHY_BIT_READ, 5, 11,
&remote_async_pause);
et1310_phy_access_mii_bit(etdev,
TRUEPHY_BIT_READ, 5, 10, &remote_pause);
et1310_phy_access_mii_bit(etdev,
TRUEPHY_BIT_READ, 5, 11,
&remote_async_pause);
if ((remote_pause == TRUEPHY_BIT_SET) &&
(remote_async_pause == TRUEPHY_BIT_SET)) {
......
This diff is collapsed.
......@@ -90,14 +90,14 @@ void EnablePhyComa(struct et131x_adapter *adapter);
void DisablePhyComa(struct et131x_adapter *adapter);
/* et131x_phy.c */
void ET1310_PhyInit(struct et131x_adapter *adapter);
void ET1310_PhyReset(struct et131x_adapter *adapter);
void ET1310_PhyPowerDown(struct et131x_adapter *adapter, bool down);
void ET1310_PhyAdvertise1000BaseT(struct et131x_adapter *adapter,
u16 duplex);
void ET1310_PhyAccessMiBit(struct et131x_adapter *adapter,
u16 action,
u16 regnum, u16 bitnum, u8 *value);
void et1310_phy_init(struct et131x_adapter *adapter);
void et1310_phy_reset(struct et131x_adapter *adapter);
void et1310_phy_power_down(struct et131x_adapter *adapter, bool down);
void et1310_phy_advertise_1000BaseT(struct et131x_adapter *adapter,
u16 duplex);
void et1310_phy_access_mii_bit(struct et131x_adapter *adapter,
u16 action,
u16 regnum, u16 bitnum, u8 *value);
int et131x_xcvr_find(struct et131x_adapter *adapter);
void et131x_setphy_normal(struct et131x_adapter *adapter);
......@@ -105,23 +105,18 @@ void et131x_setphy_normal(struct et131x_adapter *adapter);
/* static inline function does not work because et131x_adapter is not always
* defined
*/
int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr,
int et131x_phy_mii_read(struct et131x_adapter *adapter, u8 xcvrAddr,
u8 xcvrReg, u16 *value);
#define MiRead(adapter, xcvrReg, value) \
PhyMiRead((adapter), (adapter)->stats.xcvr_addr, (xcvrReg), (value))
#define et131x_mii_read(adapter, xcvrReg, value) \
et131x_phy_mii_read((adapter), \
(adapter)->stats.xcvr_addr, \
(xcvrReg), (value))
int32_t MiWrite(struct et131x_adapter *adapter,
int32_t et131x_mii_write(struct et131x_adapter *adapter,
u8 xcvReg, u16 value);
void et131x_Mii_check(struct et131x_adapter *pAdapter,
void et131x_mii_check(struct et131x_adapter *pAdapter,
u16 bmsr, u16 bmsr_ints);
/* This last is not strictly required (the driver could call the TPAL
* version instead), but this sets the adapter up correctly, and calls the
* access routine indirectly. This protects the driver from changes in TPAL.
*/
void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter);
/* et1310_rx.c */
int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter);
void et131x_rx_dma_memory_free(struct et131x_adapter *adapter);
......
......@@ -401,28 +401,28 @@ int et131x_adapter_setup(struct et131x_adapter *etdev)
dev_warn(&etdev->pdev->dev, "Could not find the xcvr\n");
/* Prepare the TRUEPHY library. */
ET1310_PhyInit(etdev);
et1310_phy_init(etdev);
/* Reset the phy now so changes take place */
ET1310_PhyReset(etdev);
et1310_phy_reset(etdev);
/* Power down PHY */
ET1310_PhyPowerDown(etdev, 1);
et1310_phy_power_down(etdev, 1);
/*
* We need to turn off 1000 base half dulplex, the mac does not
* support it. For the 10/100 part, turn off all gig advertisement
*/
if (etdev->pdev->device != ET131X_PCI_DEVICE_ID_FAST)
ET1310_PhyAdvertise1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_FULL);
et1310_phy_advertise_1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_FULL);
else
ET1310_PhyAdvertise1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_NONE);
et1310_phy_advertise_1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_NONE);
/* Power up PHY */
ET1310_PhyPowerDown(etdev, 0);
et1310_phy_power_down(etdev, 0);
et131x_setphy_normal(etdev);
; return status;
return status;
}
/**
......
......@@ -385,11 +385,12 @@ void et131x_isr_handler(struct work_struct *work)
/* Read the PHY ISR to clear the reason for the
* interrupt.
*/
MiRead(etdev, (uint8_t) offsetof(struct mi_regs, isr),
&myisr);
et131x_mii_read(etdev,
(uint8_t) offsetof(struct mi_regs, isr),
&myisr);
if (!etdev->ReplicaPhyLoopbk) {
MiRead(etdev,
et131x_mii_read(etdev,
(uint8_t) offsetof(struct mi_regs, bmsr),
&bmsr_data);
......@@ -397,7 +398,7 @@ void et131x_isr_handler(struct work_struct *work)
etdev->bmsr = bmsr_data;
/* Do all the cable in / cable out stuff */
et131x_Mii_check(etdev, bmsr_data, bmsr_ints);
et131x_mii_check(etdev, bmsr_data, bmsr_ints);
}
}
......
......@@ -221,7 +221,7 @@ int et131x_ioctl_mii(struct net_device *netdev, struct ifreq *reqbuf, int cmd)
if (!capable(CAP_NET_ADMIN))
status = -EPERM;
else
status = MiRead(etdev,
status = et131x_mii_read(etdev,
data->reg_num, &data->val_out);
break;
......@@ -229,7 +229,7 @@ int et131x_ioctl_mii(struct net_device *netdev, struct ifreq *reqbuf, int cmd)
if (!capable(CAP_NET_ADMIN))
status = -EPERM;
else
status = MiWrite(etdev, data->reg_num,
status = et131x_mii_write(etdev, data->reg_num,
data->val_in);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment