Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112208
b: refs/heads/master
c: 78e4689
h: refs/heads/master
v: v3
  • Loading branch information
Divy Le Ray authored and David S. Miller committed Oct 9, 2008
1 parent 85c6a3a commit 0cd4d24
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c26376112fb4b8dfea42069b602c03d53366052
refs/heads/master: 78e4689e908adc8334272756c32c9218d1967408
20 changes: 12 additions & 8 deletions trunk/drivers/net/cxgb3/ael1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ static struct cphy_ops ael1002_ops = {
.power_down = ael1002_power_down,
};

void t3_ael1002_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
int t3_ael1002_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
{
cphy_init(phy, adapter, phy_addr, &ael1002_ops, mdio_ops);
ael100x_txon(phy);
return 0;
}

static int ael1006_reset(struct cphy *phy, int wait)
Expand Down Expand Up @@ -174,11 +175,12 @@ static struct cphy_ops ael1006_ops = {
.power_down = ael1006_power_down,
};

void t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
int t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
{
cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops);
ael100x_txon(phy);
return 0;
}

static struct cphy_ops qt2045_ops = {
Expand All @@ -191,8 +193,8 @@ static struct cphy_ops qt2045_ops = {
.power_down = ael1006_power_down,
};

void t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
int t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
{
unsigned int stat;

Expand All @@ -205,6 +207,7 @@ void t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter,
if (!phy_addr && !mdio_read(phy, MDIO_DEV_PMA_PMD, MII_BMSR, &stat) &&
stat == 0xffff)
phy->addr = 1;
return 0;
}

static int xaui_direct_reset(struct cphy *phy, int wait)
Expand Down Expand Up @@ -250,8 +253,9 @@ static struct cphy_ops xaui_direct_ops = {
.power_down = xaui_direct_power_down,
};

void t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
{
cphy_init(phy, adapter, phy_addr, &xaui_direct_ops, mdio_ops);
return 0;
}
24 changes: 12 additions & 12 deletions trunk/drivers/net/cxgb3/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ struct adapter_info {
};

struct port_type_info {
void (*phy_prep)(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *ops);
int (*phy_prep)(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *ops);
unsigned int caps;
const char *desc;
};
Expand Down Expand Up @@ -776,14 +776,14 @@ int t3_sge_read_rspq(struct adapter *adapter, unsigned int id, u32 data[4]);
int t3_sge_cqcntxt_op(struct adapter *adapter, unsigned int id, unsigned int op,
unsigned int credits);

void t3_vsc8211_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
void t3_ael1002_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
void t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
void t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter, int phy_addr,
const struct mdio_ops *mdio_ops);
void t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
int t3_vsc8211_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
int t3_ael1002_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
int t3_ael1006_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
int t3_qt2045_phy_prep(struct cphy *phy, struct adapter *adapter, int phy_addr,
const struct mdio_ops *mdio_ops);
int t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops);
#endif /* __CHELSIO_COMMON_H */
15 changes: 10 additions & 5 deletions trunk/drivers/net/cxgb3/t3_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3626,8 +3626,11 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
++j;

p->port_type = &port_types[adapter->params.vpd.port_type[j]];
p->port_type->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
ai->mdio_ops);
ret = p->port_type->phy_prep(&p->phy, adapter,
ai->phy_base_addr + j,
ai->mdio_ops);
if (ret)
return ret;
mac_prep(&p->mac, adapter, j);
++j;

Expand Down Expand Up @@ -3674,9 +3677,11 @@ int t3_replay_prep_adapter(struct adapter *adapter)
while (!adapter->params.vpd.port_type[j])
++j;

p->port_type->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
ai->mdio_ops);

ret = p->port_type->phy_prep(&p->phy, adapter,
ai->phy_base_addr + j,
ai->mdio_ops);
if (ret)
return ret;
p->phy.ops->power_down(&p->phy, 1);
++j;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/cxgb3/vsc8211.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ static struct cphy_ops vsc8211_ops = {
.power_down = vsc8211_power_down,
};

void t3_vsc8211_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
int t3_vsc8211_phy_prep(struct cphy *phy, struct adapter *adapter,
int phy_addr, const struct mdio_ops *mdio_ops)
{
cphy_init(phy, adapter, phy_addr, &vsc8211_ops, mdio_ops);
return 0;
}

0 comments on commit 0cd4d24

Please sign in to comment.