Modify

Opened 10 years ago

Closed 10 years ago

Last modified 22 months ago

#596 closed defect (fixed)

AR7 devices with only one ethernet port. Patch to "003-net_driver_cpmac.patch"

Reported by: frop Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: Cc:

Description

Source: http://forum.openwrt.org/viewtopic.php?pid=25212#p25212

Reading throught the forum i've found this patch for enable ethernet on AR7 devices with only one eth port (like mine Dlink DSL-502t). I know, it seem just a dirty hack, but can this patch be integrated in some better way?

Index: target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch
===================================================================
--- target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch     (revision 3946)
+++ target/linux/ar7-2.4/patches/003-net_driver_cpmac.patch     (working copy)
@@ -3187,7 +3187,7 @@
 +       * replace the default MACRO. */
 +      {
 +          char *mac_port = prom_getenv("MAC_PORT"); /* Internal: 0, External: 1 */
-+          if(!mac_port || (0 != strcmp(mac_port, "0"))) {
++          if(0) /*(!mac_port || (0 != strcmp(mac_port, "0")))*/ {
 +              printk("Using the MAC with external PHY\n");
 +              cfg_start_link_speed = _CPMDIO_NOPHY;
 +              cpmac_max_frame_size = CPMAC_MAX_FRAME_SIZE + 4;
@@ -11249,7 +11249,7 @@
 +        }
 +
 +        //if(phy_sel == auto_detect_cpmac_phy())
-+        if(!mac_port || (0 != strcmp(mac_port, "0")))
++        if(0) /*(!mac_port || (0 != strcmp(mac_port, "0"))) */
 +        {
 +            printk("Using the MAC with external PHY\n");
 +            psp_config_add("cpmdio", s3, psp_config_strlen(s3), en_compile);

Attachments (0)

Change History (4)

comment:1 Changed 10 years ago by kaloz

  • Milestone set to 2.0

comment:2 Changed 10 years ago by frop

digging the forum again i've finded this:

http://forum.openwrt.org/viewtopic.php?pid=11389#p11389

basically, in the devices that uses Internal PHY, a new ADAM2 environment var should be added (always, if firmware can read it):

setenv MAC_PORT 0

this should makes the patch unuseful. I've not tryed it, but it makes sense to me.
(for example, adding a var "setenv modulation DGMT", change the modulation used by DSL chip, from default MultiMode to DGMT).

comment:3 Changed 10 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in [4279]

comment:4 Changed 22 months ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.