Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
bb28b994
Commit
bb28b994
authored
14 years ago
by
Florian Fainelli
Browse files
Options
Downloads
Patches
Plain Diff
cleanup the cpmac phy mask, patch from Ben Witten
SVN-Revision: 22770
parent
1e5f5ff8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
target/linux/ar7/patches-2.6.32/971-cpmac_cleanup.patch
+48
-0
48 additions, 0 deletions
target/linux/ar7/patches-2.6.32/971-cpmac_cleanup.patch
with
48 additions
and
0 deletions
target/linux/ar7/patches-2.6.32/971-cpmac_cleanup.patch
0 → 100644
+
48
−
0
View file @
bb28b994
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -33,7 +33,6 @@
#include <linux/skbuff.h>
#include <linux/mii.h>
#include <linux/phy.h>
-#include <linux/phy_fixed.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <asm/gpio.h>
@@ -1104,8 +1103,6 @@
static const struct net_device_ops cpmac
.ndo_set_mac_address = eth_mac_addr,
};
-static int external_switch;
-
static int __devinit cpmac_probe(struct platform_device *pdev)
{
int rc, phy_id;
@@ -1127,10 +1124,8 @@
static int __devinit cpmac_probe(struct
}
if (phy_id == PHY_MAX_ADDR) {
- //This probably wont work as no fixed bus anymore.
- dev_err(&pdev->dev, "no PHY present, falling back to switch mode\n");
- strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
- phy_id = pdev->id;
+ dev_err(&pdev->dev, "no PHY present\n");
+ return -ENODEV;
}
dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
@@ -1258,14 +1253,8 @@
int __devinit cpmac_init(void)
else
msleep(10);
- mask &= 0x7fffffff;
- if (mask & (mask - 1)) {
- external_switch = 1;
- mask = 0;
- }
-
cpmac_mii->phy_mask = ar7_is_titan()? ~(mask | 0x80000000 | 0x40000000):
- ~(mask | 0x80000001);
+ ~(mask | 0x80000000);
snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "1");
res = mdiobus_register(cpmac_mii);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment