mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 15:40:56 +07:00
ssb: provide phy address for Gigabit Ethernet driver
Add a function to provide the phy address which should be used to the Gigabit Ethernet driver connected to ssb. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ead2402cb4
commit
4bcef89f0c
@ -108,6 +108,16 @@ static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get the device phy address */
|
||||
static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev)
|
||||
{
|
||||
struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
||||
return dev->dev->bus->sprom.et0phyaddr;
|
||||
}
|
||||
|
||||
extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev,
|
||||
struct pci_dev *pdev);
|
||||
extern int ssb_gige_map_irq(struct ssb_device *sdev,
|
||||
@ -174,6 +184,10 @@ static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SSB_DRIVER_GIGE */
|
||||
#endif /* LINUX_SSB_DRIVER_GIGE_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user