diff options
Diffstat (limited to 'drivers/net/ethernet/sun/niu.c')
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 6023949be3b..a0bdf077946 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -8054,10 +8054,8 @@ static int niu_pci_eeprom_read16_swp(struct niu *np, u32 off) | |||
8054 | return val; | 8054 | return val; |
8055 | } | 8055 | } |
8056 | 8056 | ||
8057 | static int niu_pci_vpd_get_propname(struct niu *np, | 8057 | static int niu_pci_vpd_get_propname(struct niu *np, u32 off, char *namebuf, |
8058 | u32 off, | 8058 | int namebuf_len) |
8059 | char *namebuf, | ||
8060 | int namebuf_len) | ||
8061 | { | 8059 | { |
8062 | int i; | 8060 | int i; |
8063 | 8061 | ||
@@ -8102,8 +8100,7 @@ static void niu_vpd_parse_version(struct niu *np) | |||
8102 | } | 8100 | } |
8103 | 8101 | ||
8104 | /* ESPC_PIO_EN_ENABLE must be set */ | 8102 | /* ESPC_PIO_EN_ENABLE must be set */ |
8105 | static int niu_pci_vpd_scan_props(struct niu *np, | 8103 | static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end) |
8106 | u32 start, u32 end) | ||
8107 | { | 8104 | { |
8108 | unsigned int found_mask = 0; | 8105 | unsigned int found_mask = 0; |
8109 | #define FOUND_MASK_MODEL 0x00000001 | 8106 | #define FOUND_MASK_MODEL 0x00000001 |
@@ -8279,8 +8276,7 @@ static u32 niu_pci_vpd_offset(struct niu *np) | |||
8279 | return 0; | 8276 | return 0; |
8280 | } | 8277 | } |
8281 | 8278 | ||
8282 | static int niu_phy_type_prop_decode(struct niu *np, | 8279 | static int niu_phy_type_prop_decode(struct niu *np, const char *phy_prop) |
8283 | const char *phy_prop) | ||
8284 | { | 8280 | { |
8285 | if (!strcmp(phy_prop, "mif")) { | 8281 | if (!strcmp(phy_prop, "mif")) { |
8286 | /* 1G copper, MII */ | 8282 | /* 1G copper, MII */ |
@@ -8572,10 +8568,8 @@ static int niu_get_and_validate_port(struct niu *np) | |||
8572 | return 0; | 8568 | return 0; |
8573 | } | 8569 | } |
8574 | 8570 | ||
8575 | static int phy_record(struct niu_parent *parent, | 8571 | static int phy_record(struct niu_parent *parent, struct phy_probe_info *p, |
8576 | struct phy_probe_info *p, | 8572 | int dev_id_1, int dev_id_2, u8 phy_port, int type) |
8577 | int dev_id_1, int dev_id_2, u8 phy_port, | ||
8578 | int type) | ||
8579 | { | 8573 | { |
8580 | u32 id = (dev_id_1 << 16) | dev_id_2; | 8574 | u32 id = (dev_id_1 << 16) | dev_id_2; |
8581 | u8 idx; | 8575 | u8 idx; |
@@ -8670,7 +8664,7 @@ static void niu_n2_divide_channels(struct niu_parent *parent) | |||
8670 | } | 8664 | } |
8671 | 8665 | ||
8672 | static void niu_divide_channels(struct niu_parent *parent, | 8666 | static void niu_divide_channels(struct niu_parent *parent, |
8673 | int num_10g, int num_1g) | 8667 | int num_10g, int num_1g) |
8674 | { | 8668 | { |
8675 | int num_ports = parent->num_ports; | 8669 | int num_ports = parent->num_ports; |
8676 | int rx_chans_per_10g, rx_chans_per_1g; | 8670 | int rx_chans_per_10g, rx_chans_per_1g; |
@@ -8732,7 +8726,7 @@ static void niu_divide_channels(struct niu_parent *parent, | |||
8732 | } | 8726 | } |
8733 | 8727 | ||
8734 | static void niu_divide_rdc_groups(struct niu_parent *parent, | 8728 | static void niu_divide_rdc_groups(struct niu_parent *parent, |
8735 | int num_10g, int num_1g) | 8729 | int num_10g, int num_1g) |
8736 | { | 8730 | { |
8737 | int i, num_ports = parent->num_ports; | 8731 | int i, num_ports = parent->num_ports; |
8738 | int rdc_group, rdc_groups_per_port; | 8732 | int rdc_group, rdc_groups_per_port; |
@@ -8776,9 +8770,8 @@ static void niu_divide_rdc_groups(struct niu_parent *parent, | |||
8776 | } | 8770 | } |
8777 | } | 8771 | } |
8778 | 8772 | ||
8779 | static int fill_phy_probe_info(struct niu *np, | 8773 | static int fill_phy_probe_info(struct niu *np, struct niu_parent *parent, |
8780 | struct niu_parent *parent, | 8774 | struct phy_probe_info *info) |
8781 | struct phy_probe_info *info) | ||
8782 | { | 8775 | { |
8783 | unsigned long flags; | 8776 | unsigned long flags; |
8784 | int port, err; | 8777 | int port, err; |
@@ -9480,8 +9473,7 @@ static struct device_attribute niu_parent_attributes[] = { | |||
9480 | }; | 9473 | }; |
9481 | 9474 | ||
9482 | static struct niu_parent *niu_new_parent(struct niu *np, | 9475 | static struct niu_parent *niu_new_parent(struct niu *np, |
9483 | union niu_parent_id *id, | 9476 | union niu_parent_id *id, u8 ptype) |
9484 | u8 ptype) | ||
9485 | { | 9477 | { |
9486 | struct platform_device *plat_dev; | 9478 | struct platform_device *plat_dev; |
9487 | struct niu_parent *p; | 9479 | struct niu_parent *p; |
@@ -9545,8 +9537,7 @@ fail_unregister: | |||
9545 | } | 9537 | } |
9546 | 9538 | ||
9547 | static struct niu_parent *niu_get_parent(struct niu *np, | 9539 | static struct niu_parent *niu_get_parent(struct niu *np, |
9548 | union niu_parent_id *id, | 9540 | union niu_parent_id *id, u8 ptype) |
9549 | u8 ptype) | ||
9550 | { | 9541 | { |
9551 | struct niu_parent *p, *tmp; | 9542 | struct niu_parent *p, *tmp; |
9552 | int port = np->port; | 9543 | int port = np->port; |
@@ -9670,10 +9661,10 @@ static void niu_driver_version(void) | |||
9670 | pr_info("%s", version); | 9661 | pr_info("%s", version); |
9671 | } | 9662 | } |
9672 | 9663 | ||
9673 | static struct net_device *niu_alloc_and_init( | 9664 | static struct net_device *niu_alloc_and_init(struct device *gen_dev, |
9674 | struct device *gen_dev, struct pci_dev *pdev, | 9665 | struct pci_dev *pdev, |
9675 | struct platform_device *op, const struct niu_ops *ops, | 9666 | struct platform_device *op, |
9676 | u8 port) | 9667 | const struct niu_ops *ops, u8 port) |
9677 | { | 9668 | { |
9678 | struct net_device *dev; | 9669 | struct net_device *dev; |
9679 | struct niu *np; | 9670 | struct niu *np; |
@@ -9757,7 +9748,7 @@ static void niu_set_basic_features(struct net_device *dev) | |||
9757 | } | 9748 | } |
9758 | 9749 | ||
9759 | static int niu_pci_init_one(struct pci_dev *pdev, | 9750 | static int niu_pci_init_one(struct pci_dev *pdev, |
9760 | const struct pci_device_id *ent) | 9751 | const struct pci_device_id *ent) |
9761 | { | 9752 | { |
9762 | union niu_parent_id parent_id; | 9753 | union niu_parent_id parent_id; |
9763 | struct net_device *dev; | 9754 | struct net_device *dev; |