This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: eth0 and eth1 issue

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hello Team ,

I have two ETHERNET interface on my board ,one is native and the other is USB .Both are running fine if both the LAN cables are connected in static mode . But If i remove eth0 lan cable then eth1 also stops to work . In dhcp mode I am not facing this problem. This specific issue i am getting with yocto generated root-file system in debian if lan is not connected the static ip configured for eth0 in interfaces file doesnot come up and in this case eth1 works fine again. can you tell me which script in debian is handling this situation or how can i do the same in my yocto built.

with regards ,

pranav

  • Hi,

    Can you share your dts file & also which Processor SDK Linux version are you using?
    Could you provide the dmesg output?

    Best Regards,
    Yordan
  • Hey Yordan,
    This is my dts configuration for native eth and usb eth and i am using a yocto generated rootfs and kernel.



    cpsw_default: cpsw_default {
    pinctrl-single,pins = <
    /* Slave 1 */
    0x108 (PIN_INPUT | MUX_MODE0) /* mii1_col.mii1_col */
    0x10c (PIN_INPUT | MUX_MODE0) /* mii1_crs.mii1_crs */
    0x110 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxerr.mii1_rxerr */
    0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
    0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */
    0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
    0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
    0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
    0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
    0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_txclk.mii1_txclk */
    0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */
    0x134 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */
    0x138 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */
    0x13c (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */
    0x140 (PIN_INPUT_PULLUP | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */
    >;
    };

    cpsw_sleep: cpsw_sleep {
    pinctrl-single,pins = <
    /* Slave 1 reset value */
    0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    >;
    };

    davinci_mdio_default: davinci_mdio_default {
    pinctrl-single,pins = <
    /* MDIO */
    0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
    0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
    >;
    };

    davinci_mdio_sleep: davinci_mdio_sleep {
    pinctrl-single,pins = <
    /* MDIO reset value */
    0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
    0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
    >;
    };

    &mac {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&cpsw_default>;
    pinctrl-1 = <&cpsw_sleep>;
    status = "okay";
    };

    &davinci_mdio {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&davinci_mdio_default>;
    pinctrl-1 = <&davinci_mdio_sleep>;
    status = "okay";
    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <4>;
    phy-mode = "mii";
    };

    &usb {
    status = "okay";
    };

    &usb_ctrl_mod {
    status = "okay";
    };

    &usb0_phy {
    status = "okay";
    };

    &usb1_phy {
    status = "okay";
    };

    &usb0 {
    status = "okay";
    dr_mode = "host";
    };

    &usb1 {
    status = "okay";
    dr_mode = "host";
    };
  • Hi,

    What you've shared seems correct. I am not sure how the debian filesystem works (I haven't tested it).
    What I'd recommend is check you've correctly set up the static IPs of your eth interfaces. One way to that is described here:
    e2e.ti.com/.../731565
    Have a look at the above discussion & the training liked in it and see if you're correctly setting up your static IPs.

    Best Regards,
    Yordan
  • Hey Yordan,

    How can we route the data to specific ip interface either to eth0 or to eth1 when both are in static ip configuration and are connected to the same subnet.

    With regards ,
    Pranav
  • Hi Pranav,

    As per the training that Yordan point you to, having two interfaces on the same subnet will not work. The training goes into how the kernel network stack is going to respond to the ARP process, this does not really involve the interface drivers. You will need to assign the two separate interfaces to different subnets, here is an example if I understand your topology correctly:

    eth0 192.168.1.1 - subnet 1
    usb0 192.168.2.1 - subnet 2

    Best Regards,
    Schuyler