/* Check whether a PCI device is a SSB Gigabit Ethernet core. */ externbool pdev_is_ssb_gige_core(struct pci_dev *pdev);
/* Convert a pci_dev pointer to a ssb_gige pointer. */ staticinlinestruct ssb_gige * pdev_to_ssb_gige(struct pci_dev *pdev)
{ if (!pdev_is_ssb_gige_core(pdev)) return NULL; return container_of(pdev->bus->ops, struct ssb_gige, pci_ops);
}
/* Returns whether the PHY is connected by an RGMII bus. */ staticinlinebool ssb_gige_is_rgmii(struct pci_dev *pdev)
{ struct ssb_gige *dev = pdev_to_ssb_gige(pdev); return (dev ? dev->has_rgmii : 0);
}
/* Returns whether we have a Roboswitch. */ staticinlinebool ssb_gige_have_roboswitch(struct pci_dev *pdev)
{ struct ssb_gige *dev = pdev_to_ssb_gige(pdev); if (dev) return !!(dev->dev->bus->sprom.boardflags_lo &
SSB_GIGE_BFL_ROBOSWITCH); returnfalse;
}
/* Returns whether we can only do one DMA at once. */ staticinlinebool ssb_gige_one_dma_at_once(struct pci_dev *pdev)
{ struct ssb_gige *dev = pdev_to_ssb_gige(pdev); if (dev) return ((dev->dev->bus->chip_id == 0x4785) &&
(dev->dev->bus->chip_rev < 2)); returnfalse;
}
/* Returns whether we must flush posted writes. */ staticinlinebool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
{ struct ssb_gige *dev = pdev_to_ssb_gige(pdev); if (dev) return (dev->dev->bus->chip_id == 0x4785); returnfalse;
}
/* Get the device MAC address */ staticinlineint ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
{ struct ssb_gige *dev = pdev_to_ssb_gige(pdev); if (!dev) return -ENODEV;
/* The GigE driver is not a standalone module, because we don't have support
* for unregistering the driver. So we could not unload the module anyway. */ externint ssb_gige_init(void); staticinlinevoid ssb_gige_exit(void)
{ /* Currently we can not unregister the GigE driver,
* because we can not unregister the PCI bridge. */
BUG();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.