ixp4xx: add support for linux 3.10
[openwrt.git] / target / linux / brcm47xx / patches-3.8 / 700-ssb-gigabit-ethernet-driver.patch
index cdbae5f8725ce05f89830f0a5c960852ffb9c998..fc868c00da3e01bb56e506c5478a094ff240c75c 100644 (file)
  #define PCI_DEVICE_ID_TIGON3_5751     0x1677
  #define PCI_DEVICE_ID_TIGON3_5715     0x1678
  #define PCI_DEVICE_ID_TIGON3_5715S    0x1679
---- a/include/linux/ssb/ssb_driver_gige.h
-+++ b/include/linux/ssb/ssb_driver_gige.h
-@@ -97,21 +97,16 @@ static inline bool ssb_gige_must_flush_p
-       return 0;
- }
--#ifdef CONFIG_BCM47XX
--#include <bcm47xx_nvram.h>
- /* Get the device MAC address */
--static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
--{
--      char buf[20];
--      if (bcm47xx_nvram_getenv("et0macaddr", buf, sizeof(buf)) < 0)
--              return;
--      bcm47xx_nvram_parse_macaddr(buf, macaddr);
--}
--#else
--static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
-+static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
- {
-+      struct ssb_gige *dev = pdev_to_ssb_gige(pdev);
-+      if (!dev)
-+              return -ENODEV;
-+
-+      memcpy(macaddr, dev->dev->bus->sprom.et0mac, 6);
-+      return 0;
- }
--#endif
- extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev,
-                                         struct pci_dev *pdev);
-@@ -175,6 +170,10 @@ static inline bool ssb_gige_must_flush_p
- {
-       return 0;
- }
-+static inline int ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
-+{
-+      return -ENODEV;
-+}
- #endif /* CONFIG_SSB_DRIVER_GIGE */
- #endif /* LINUX_SSB_DRIVER_GIGE_H_ */