Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -451,9 +451,9 @@ void config_flow_control(struct et131x_adapter *etdev)
	} else {
		char remote_pause, remote_async_pause;

		ET1310_PhyAccessMiBit(etdev,
		et1310_phy_access_mii_bit(etdev,
				TRUEPHY_BIT_READ, 5, 10, &remote_pause);
		ET1310_PhyAccessMiBit(etdev,
		et1310_phy_access_mii_bit(etdev,
				TRUEPHY_BIT_READ, 5, 11,
				&remote_async_pause);

+200 −202

File changed.

Preview size limit exceeded, changes collapsed.

+15 −20
Original line number Diff line number Diff line
@@ -90,12 +90,12 @@ 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,
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_PhyAccessMiBit(struct et131x_adapter *adapter,
void et1310_phy_access_mii_bit(struct et131x_adapter *adapter,
			       u16 action,
			       u16 regnum, u16 bitnum, u8 *value);

@@ -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);
+7 −7
Original line number Diff line number Diff line
@@ -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;
}

/**
+5 −4
Original line number Diff line number Diff line
@@ -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),
			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);
			}
		}

Loading