Lines Matching refs:adpt

48 int emac_sgmii_init(struct emac_adapter *adpt)
50 if (!(adpt->phy.sgmii_ops && adpt->phy.sgmii_ops->init))
53 return adpt->phy.sgmii_ops->init(adpt);
56 int emac_sgmii_open(struct emac_adapter *adpt)
58 if (!(adpt->phy.sgmii_ops && adpt->phy.sgmii_ops->open))
61 return adpt->phy.sgmii_ops->open(adpt);
64 void emac_sgmii_close(struct emac_adapter *adpt)
66 if (!(adpt->phy.sgmii_ops && adpt->phy.sgmii_ops->close))
69 adpt->phy.sgmii_ops->close(adpt);
72 int emac_sgmii_link_change(struct emac_adapter *adpt, bool link_state)
74 if (!(adpt->phy.sgmii_ops && adpt->phy.sgmii_ops->link_change))
77 return adpt->phy.sgmii_ops->link_change(adpt, link_state);
80 void emac_sgmii_reset(struct emac_adapter *adpt)
82 if (!(adpt->phy.sgmii_ops && adpt->phy.sgmii_ops->reset))
85 adpt->phy.sgmii_ops->reset(adpt);
89 static void emac_sgmii_link_init(struct emac_adapter *adpt)
91 struct emac_sgmii *phy = &adpt->phy;
103 static int emac_sgmii_irq_clear(struct emac_adapter *adpt, u8 irq_bits)
105 struct emac_sgmii *phy = &adpt->phy;
122 adpt->netdev->name, status, irq_bits);
141 struct emac_adapter *adpt = data;
142 struct emac_sgmii *phy = &adpt->phy;
165 schedule_work(&adpt->work_thread);
173 if (emac_sgmii_irq_clear(adpt, status))
174 schedule_work(&adpt->work_thread);
179 static void emac_sgmii_reset_prepare(struct emac_adapter *adpt)
181 struct emac_sgmii *phy = &adpt->phy;
198 static void emac_sgmii_common_reset(struct emac_adapter *adpt)
202 emac_sgmii_reset_prepare(adpt);
203 emac_sgmii_link_init(adpt);
205 ret = emac_sgmii_init(adpt);
207 netdev_err(adpt->netdev,
212 static int emac_sgmii_common_open(struct emac_adapter *adpt)
214 struct emac_sgmii *sgmii = &adpt->phy;
219 ret = emac_sgmii_irq_clear(adpt, 0xff);
225 "emac-sgmii", adpt);
227 netdev_err(adpt->netdev,
236 static void emac_sgmii_common_close(struct emac_adapter *adpt)
238 struct emac_sgmii *sgmii = &adpt->phy;
242 free_irq(sgmii->irq, adpt);
246 static int emac_sgmii_common_link_change(struct emac_adapter *adpt, bool linkup)
248 struct emac_sgmii *sgmii = &adpt->phy;
253 ret = emac_sgmii_irq_clear(adpt, 0xff);
349 int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt)
352 struct emac_sgmii *phy = &adpt->phy;
418 ret = emac_sgmii_init(adpt);
422 emac_sgmii_link_init(adpt);