staging: et131x: Remove typedefs from et1310_phy.h
PATCH 1/1 staging: et131x: Remove typedefs from et1310_phy.h
Fixes the associated checkpatch warnings.
Tested with ifconfig/general use of a device (Agere Systems ET-131x PCI-E Ethernet Controller (rev 02)).
Signed-off-by Mark Einon <[email protected]>
--- drivers/staging/et131x/et1310_phy.c | 15 ++-- drivers/staging/et131x/et1310_phy.h | 169 +++++++++++-------------------- drivers/staging/et131x/et131x.h | 2 +- drivers/staging/et131x/et131x_adapter.h | 2 +- drivers/staging/et131x/et131x_initpci.c | 4 +- drivers/staging/et131x/et131x_isr.c | 12 +- 6 files changed, 76 insertions(+), 128 deletions(-)
drivers/staging/et131x/et1310_phy.c +8 -7
@@ -582,7 +582,7 @@ static void et131x_xcvr_init(struct et131x_adapter *etdev)u16 lcr2;/* Zero out the adapter structure variable representing BMSR */ - etdev->Bmsr.value =0 ; + etdev->bmsr =0 ;MiRead (etdev, (u8 ) offsetof(struct mi_regs , isr), &isr);MiRead (etdev, (u8 ) offsetof(struct mi_regs , imr), &imr);
@@ -729,7 +729,7 @@ static void et131x_xcvr_init(struct et131x_adapter *etdev) }void et131x_Mii_check (struct et131x_adapter *etdev, -MI_BMSR_t bmsr,MI_BMSR_t bmsr_ints) +u16 bmsr,u16 bmsr_ints) {u8 link_status;u32 autoneg_status;
@@ -740,8 +740,8 @@ void et131x_Mii_check(struct et131x_adapter *etdev,u32 polarity;unsigned long flags; -if (bmsr_ints.bits.link_status) { -if (bmsr.bits.link_status) { +if (bmsr_ints &MI_BMSR_LINK_STATUS ) { +if (bmsr &MI_BMSR_LINK_STATUS ) { etdev->boot_coma =20 ;/* Update our state variables and indicate the
@@ -820,9 +820,10 @@ void et131x_Mii_check(struct et131x_adapter *etdev, } } -if (bmsr_ints.bits.auto_neg_complete || - (etdev->AiForceDpx ==3 && bmsr_ints.bits.link_status)) { -if (bmsr.bits.auto_neg_complete || etdev->AiForceDpx ==3 ) { +if ((bmsr_ints &MI_BMSR_AUTO_NEG_COMPLETE ) || + (etdev->AiForceDpx ==3 && (bmsr_ints &MI_BMSR_LINK_STATUS ))) { +if ((bmsr &MI_BMSR_AUTO_NEG_COMPLETE ) || + etdev->AiForceDpx ==3 ) { ET1310_PhyLinkStatus(etdev, &link_status, &autoneg_status, &speed, &duplex, &mdi_mdix,
drivers/staging/et131x/et1310_phy.h +58 -111
198 lines not on this page · raw message
drivers/staging/et131x/et131x.h +1 -1
@@ -113,7 +113,7 @@ int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr,int32_t MiWrite (struct et131x_adapter *adapter,u8 xcvReg,u16 value);void et131x_Mii_check (struct et131x_adapter *pAdapter, -MI_BMSR_t bmsr,MI_BMSR_t bmsr_ints); +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
drivers/staging/et131x/et131x_adapter.h +1 -1
@@ -222,7 +222,7 @@ struct et131x_adapter {u32 CachedMaskValue;/* Xcvr status at last poll */ -MI_BMSR_t Bmsr; +u16 bmsr;/* Tx Memory Variables */ struct tx_ring tx_ring;
drivers/staging/et131x/et131x_initpci.c +2 -2
@@ -274,14 +274,14 @@ void et131x_error_timer_handler(unsigned long data)dev_err (&etdev->pdev->dev,"No interrupts, in PHY coma, pm_csr = 0x%x\n" , pm_csr); -if (!etdev->Bmsr.bits.link_status && +if (!(etdev->bmsr &MI_BMSR_LINK_STATUS ) && etdev->RegistryPhyComa && etdev->boot_coma <11 ) { etdev->boot_coma++; }if (etdev->boot_coma ==10 ) { -if (!etdev->Bmsr.bits.link_status +if (!(etdev->bmsr &MI_BMSR_LINK_STATUS ) && etdev->RegistryPhyComa) {if ((pm_csr &ET_PM_PHY_SW_COMA ) ==0 ) {/* NOTE - This was originally a 'sync with
drivers/staging/et131x/et131x_isr.c +6 -6
@@ -365,7 +365,8 @@ void et131x_isr_handler(struct work_struct *work)/* Handle the PHY interrupt */ if (status &ET_INTR_PHY ) {u32 pm_csr; -MI_BMSR_t BmsrInts, BmsrData; +u16 bmsr_ints; +u16 bmsr_data;u16 myisr;/* If we are in coma mode when we get this interrupt,
@@ -390,14 +391,13 @@ void et131x_isr_handler(struct work_struct *work)if (!etdev->ReplicaPhyLoopbk) {MiRead (etdev, (uint8_t ) offsetof(struct mi_regs , bmsr), - &BmsrData.value); + &bmsr_data); - BmsrInts.value = - etdev->Bmsr.value ^ BmsrData.value; - etdev->Bmsr.value = BmsrData.value; + bmsr_ints = etdev->bmsr ^ bmsr_data; + etdev->bmsr = bmsr_data;/* Do all the cable in / cable out stuff */ -et131x_Mii_check (etdev, BmsrData, BmsrInts); +et131x_Mii_check (etdev, bmsr_data, bmsr_ints); } }
Signature · 1 line
1.7.4.4