[PATCH] bcm43xx: fix some stuff, add a few missing mmiowb(), remove dead code.

This may workaround the XMIT ERRORs some people are getting.

Signed-off-by: Michael Buesch <mbuesch@freenet.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Michael Buesch
2006-03-12 19:44:29 +01:00
کامیت شده توسط John W. Linville
والد 7ce942d0ff
کامیت 73733847be
6فایلهای تغییر یافته به همراه164 افزوده شده و 184 حذف شده

مشاهده پرونده

@@ -312,20 +312,22 @@ const u16 bcm43xx_ilt_sigmasqr2[BCM43xx_ILT_SIGMASQR_SIZE] = {
/**** Helper functions to access the device Internal Lookup Tables ****/
void bcm43xx_ilt_write16(struct bcm43xx_private *bcm, u16 offset, u16 val)
void bcm43xx_ilt_write(struct bcm43xx_private *bcm, u16 offset, u16 val)
{
if ( bcm->current_core->phy->type == BCM43xx_PHYTYPE_A ) {
if (bcm->current_core->phy->type == BCM43xx_PHYTYPE_A) {
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_CTRL, offset);
mmiowb();
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_DATA1, val);
} else {
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_CTRL, offset);
mmiowb();
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_DATA1, val);
}
}
u16 bcm43xx_ilt_read16(struct bcm43xx_private *bcm, u16 offset)
u16 bcm43xx_ilt_read(struct bcm43xx_private *bcm, u16 offset)
{
if ( bcm->current_core->phy->type == BCM43xx_PHYTYPE_A ) {
if (bcm->current_core->phy->type == BCM43xx_PHYTYPE_A) {
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_CTRL, offset);
return bcm43xx_phy_read(bcm, BCM43xx_PHY_ILT_A_DATA1);
} else {
@@ -333,35 +335,3 @@ u16 bcm43xx_ilt_read16(struct bcm43xx_private *bcm, u16 offset)
return bcm43xx_phy_read(bcm, BCM43xx_PHY_ILT_G_DATA1);
}
}
void bcm43xx_ilt_write32(struct bcm43xx_private *bcm, u16 offset, u32 val)
{
if ( bcm->current_core->phy->type == BCM43xx_PHYTYPE_A ) {
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_CTRL, offset);
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_DATA2, (u16)(val >> 16));
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_DATA1, (u16)(val & 0x0000FFFF));
} else {
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_CTRL, offset);
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_DATA2, (u16)(val >> 16));
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_DATA1, (u16)(val & 0x0000FFFF));
}
}
u32 bcm43xx_ilt_read32(struct bcm43xx_private *bcm, u16 offset)
{
u32 ret;
if ( bcm->current_core->phy->type == BCM43xx_PHYTYPE_A ) {
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_CTRL, offset);
ret = bcm43xx_phy_read(bcm, BCM43xx_PHY_ILT_A_DATA2);
ret <<= 16;
ret |= bcm43xx_phy_read(bcm, BCM43xx_PHY_ILT_A_DATA1);
} else {
bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_CTRL, offset);
ret = bcm43xx_phy_read(bcm, BCM43xx_PHY_ILT_G_DATA2);
ret <<= 16;
ret |= bcm43xx_phy_read(bcm, BCM43xx_PHY_ILT_G_DATA1);
}
return ret;
}