git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[pandora-kernel.git]
/
drivers
/
staging
/
et131x
/
et1310_phy.c
diff --git
a/drivers/staging/et131x/et1310_phy.c
b/drivers/staging/et131x/et1310_phy.c
index
2798a2f
..
0bcb7fb
100644
(file)
--- a/
drivers/staging/et131x/et1310_phy.c
+++ b/
drivers/staging/et131x/et1310_phy.c
@@
-99,7
+99,7
@@
static void et131x_xcvr_init(struct et131x_adapter *etdev);
/**
* PhyMiRead - Read from the PHY through the MII Interface on the MAC
* @etdev: pointer to our private adapter structure
/**
* PhyMiRead - Read from the PHY through the MII Interface on the MAC
* @etdev: pointer to our private adapter structure
- * @xcvrAddr: the address of the transc
ie
ver
+ * @xcvrAddr: the address of the transc
ei
ver
* @xcvrReg: the register to read
* @value: pointer to a 16-bit value in which the value will be stored
*
* @xcvrReg: the register to read
* @value: pointer to a 16-bit value in which the value will be stored
*
@@
-108,7
+108,7
@@
static void et131x_xcvr_init(struct et131x_adapter *etdev);
int PhyMiRead(struct et131x_adapter *etdev, u8 xcvrAddr,
u8 xcvrReg, u16 *value)
{
int PhyMiRead(struct et131x_adapter *etdev, u8 xcvrAddr,
u8 xcvrReg, u16 *value)
{
- struct
_MAC_t
__iomem *mac = &etdev->regs->mac;
+ struct
mac_regs
__iomem *mac = &etdev->regs->mac;
int status = 0;
u32 delay;
u32 miiAddr;
int status = 0;
u32 delay;
u32 miiAddr;
@@
-176,9
+176,9
@@
int PhyMiRead(struct et131x_adapter *etdev, u8 xcvrAddr,
*/
int MiWrite(struct et131x_adapter *etdev, u8 xcvrReg, u16 value)
{
*/
int MiWrite(struct et131x_adapter *etdev, u8 xcvrReg, u16 value)
{
- struct
_MAC_t
__iomem *mac = &etdev->regs->mac;
+ struct
mac_regs
__iomem *mac = &etdev->regs->mac;
int status = 0;
int status = 0;
- u8 xcvrAddr = etdev->
S
tats.xcvr_addr;
+ u8 xcvrAddr = etdev->
s
tats.xcvr_addr;
u32 delay;
u32 miiAddr;
u32 miiCmd;
u32 delay;
u32 miiAddr;
u32 miiCmd;
@@
-259,8
+259,8
@@
int et131x_xcvr_find(struct et131x_adapter *etdev)
xcvr_id = (u32) ((idr1 << 16) | idr2);
if (idr1 != 0 && idr1 != 0xffff) {
xcvr_id = (u32) ((idr1 << 16) | idr2);
if (idr1 != 0 && idr1 != 0xffff) {
- etdev->
S
tats.xcvr_id = xcvr_id;
- etdev->
S
tats.xcvr_addr = xcvr_addr;
+ etdev->
s
tats.xcvr_id = xcvr_id;
+ etdev->
s
tats.xcvr_addr = xcvr_addr;
return 0;
}
}
return 0;
}
}
@@
-582,7
+582,7
@@
static void et131x_xcvr_init(struct et131x_adapter *etdev)
u16 lcr2;
/* Zero out the adapter structure variable representing BMSR */
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);
MiRead(etdev, (u8) offsetof(struct mi_regs, isr), &isr);
MiRead(etdev, (u8) offsetof(struct mi_regs, imr), &imr);
@@
-590,7
+590,7
@@
static void et131x_xcvr_init(struct et131x_adapter *etdev)
/* Set the link status interrupt only. Bad behavior when link status
* and auto neg are set, we run into a nested interrupt problem
*/
/* Set the link status interrupt only. Bad behavior when link status
* and auto neg are set, we run into a nested interrupt problem
*/
-
imr |= 0x0105;
+ imr |= 0x0105;
MiWrite(etdev, (u8) offsetof(struct mi_regs, imr), imr);
MiWrite(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,
}
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;
{
u8 link_status;
u32 autoneg_status;
@@
-740,8
+740,8
@@
void et131x_Mii_check(struct et131x_adapter *etdev,
u32 polarity;
unsigned long flags;
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
etdev->boot_coma = 20;
/* Update our state variables and indicate the
@@
-750,7
+750,6
@@
void et131x_Mii_check(struct et131x_adapter *etdev,
spin_lock_irqsave(&etdev->Lock, flags);
etdev->MediaState = NETIF_STATUS_MEDIA_CONNECT;
spin_lock_irqsave(&etdev->Lock, flags);
etdev->MediaState = NETIF_STATUS_MEDIA_CONNECT;
- etdev->Flags &= ~fMP_ADAPTER_LINK_DETECTION;
spin_unlock_irqrestore(&etdev->Lock, flags);
spin_unlock_irqrestore(&etdev->Lock, flags);
@@
-780,8
+779,7
@@
void et131x_Mii_check(struct et131x_adapter *etdev,
* Timer expires, we can report disconnected (handled
* in the LinkDetectionDPC).
*/
* Timer expires, we can report disconnected (handled
* in the LinkDetectionDPC).
*/
- if (!(etdev->Flags & fMP_ADAPTER_LINK_DETECTION) ||
- (etdev->MediaState == NETIF_STATUS_MEDIA_DISCONNECT)) {
+ if ((etdev->MediaState == NETIF_STATUS_MEDIA_DISCONNECT)) {
spin_lock_irqsave(&etdev->Lock, flags);
etdev->MediaState =
NETIF_STATUS_MEDIA_DISCONNECT;
spin_lock_irqsave(&etdev->Lock, flags);
etdev->MediaState =
NETIF_STATUS_MEDIA_DISCONNECT;
@@
-822,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,
ET1310_PhyLinkStatus(etdev,
&link_status, &autoneg_status,
&speed, &duplex, &mdi_mdix,