)]}'
{
  "commit": "e84665c9cb4db963393fafad6fefe5efdd7e4a09",
  "tree": "545c4a2a63a77b853e3f34609d86b346fe61baf4",
  "parents": [
    "076d3e10a54caa2c148de5732c126c7a31381d48"
  ],
  "author": {
    "name": "Lennert Buytenhek",
    "email": "buytenh@wantstofly.org",
    "time": "Fri Mar 20 09:52:09 2009 +0000"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Sat Mar 21 19:06:54 2009 -0700"
  },
  "message": "dsa: add switch chip cascading support\n\nThe initial version of the DSA driver only supported a single switch\nchip per network interface, while DSA-capable switch chips can be\ninterconnected to form a tree of switch chips.  This patch adds support\nfor multiple switch chips on a network interface.\n\nAn example topology for a 16-port device with an embedded CPU is as\nfollows:\n\n\t+-----+          +--------+       +--------+\n\t|     |eth0    10| switch |9    10| switch |\n\t| CPU +----------+        +-------+        |\n\t|     |          | chip 0 |       | chip 1 |\n\t+-----+          +---++---+       +---++---+\n\t                     ||               ||\n\t                     ||               ||\n\t                     ||1000baseT      ||1000baseT\n\t                     ||ports 1-8      ||ports 9-16\n\nThis requires a couple of interdependent changes in the DSA layer:\n\n- The dsa platform driver data needs to be extended: there is still\n  only one netdevice per DSA driver instance (eth0 in the example\n  above), but each of the switch chips in the tree needs its own\n  mii_bus device pointer, MII management bus address, and port name\n  array. (include/net/dsa.h)  The existing in-tree dsa users need\n  some small changes to deal with this. (arch/arm)\n\n- The DSA and Ethertype DSA tagging modules need to be extended to\n  use the DSA device ID field on receive and demultiplex the packet\n  accordingly, and fill in the DSA device ID field on transmit\n  according to which switch chip the packet is heading to.\n  (net/dsa/tag_{dsa,edsa}.c)\n\n- The concept of \"CPU port\", which is the switch chip port that the\n  CPU is connected to (port 10 on switch chip 0 in the example), needs\n  to be extended with the concept of \"upstream port\", which is the\n  port on the switch chip that will bring us one hop closer to the CPU\n  (port 10 for both switch chips in the example above).\n\n- The dsa platform data needs to specify which ports on which switch\n  chips are links to other switch chips, so that we can enable DSA\n  tagging mode on them.  (For inter-switch links, we always use\n  non-EtherType DSA tagging, since it has lower overhead.  The CPU\n  link uses dsa or edsa tagging depending on what the \u0027root\u0027 switch\n  chip supports.)  This is done by specifying \"dsa\" for the given\n  port in the port array.\n\n- The dsa platform data needs to be extended with information on via\n  which port to reach any given switch chip from any given switch chip.\n  This info is specified via the per-switch chip data struct -\u003ertable[]\n  array, which gives the nexthop ports for each of the other switches\n  in the tree.\n\nFor the example topology above, the dsa platform data would look\nsomething like this:\n\n\tstatic struct dsa_chip_data sw[2] \u003d {\n\t\t{\n\t\t\t.mii_bus\t\u003d \u0026foo,\n\t\t\t.sw_addr\t\u003d 1,\n\t\t\t.port_names[0]\t\u003d \"p1\",\n\t\t\t.port_names[1]\t\u003d \"p2\",\n\t\t\t.port_names[2]\t\u003d \"p3\",\n\t\t\t.port_names[3]\t\u003d \"p4\",\n\t\t\t.port_names[4]\t\u003d \"p5\",\n\t\t\t.port_names[5]\t\u003d \"p6\",\n\t\t\t.port_names[6]\t\u003d \"p7\",\n\t\t\t.port_names[7]\t\u003d \"p8\",\n\t\t\t.port_names[9]\t\u003d \"dsa\",\n\t\t\t.port_names[10]\t\u003d \"cpu\",\n\t\t\t.rtable\t\t\u003d (s8 []){ -1, 9, },\n\t\t}, {\n\t\t\t.mii_bus\t\u003d \u0026foo,\n\t\t\t.sw_addr\t\u003d 2,\n\t\t\t.port_names[0]\t\u003d \"p9\",\n\t\t\t.port_names[1]\t\u003d \"p10\",\n\t\t\t.port_names[2]\t\u003d \"p11\",\n\t\t\t.port_names[3]\t\u003d \"p12\",\n\t\t\t.port_names[4]\t\u003d \"p13\",\n\t\t\t.port_names[5]\t\u003d \"p14\",\n\t\t\t.port_names[6]\t\u003d \"p15\",\n\t\t\t.port_names[7]\t\u003d \"p16\",\n\t\t\t.port_names[10]\t\u003d \"dsa\",\n\t\t\t.rtable\t\t\u003d (s8 []){ 10, -1, },\n\t\t},\n\t},\n\n\tstatic struct dsa_platform_data pd \u003d {\n\t\t.netdev\t\t\u003d \u0026foo,\n\t\t.nr_switches\t\u003d 2,\n\t\t.sw\t\t\u003d sw,\n\t};\n\nSigned-off-by: Lennert Buytenhek \u003cbuytenh@marvell.com\u003e\nTested-by: Gary Thomas \u003cgary@mlbassoc.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b3404b7775b318d9beef5e617d9b3ac5e1cd405f",
      "old_mode": 33188,
      "old_path": "arch/arm/mach-kirkwood/common.c",
      "new_id": "0d2074f51a593ff0e6294889b4ba26a0fa57fd07",
      "new_mode": 33188,
      "new_path": "arch/arm/mach-kirkwood/common.c"
    },
    {
      "type": "modify",
      "old_id": "9a0e905d10cd04e6841f8dc7f5cc7bb6c57fa705",
      "old_mode": 33188,
      "old_path": "arch/arm/mach-kirkwood/rd88f6281-setup.c",
      "new_id": "e1c0516c4df376cff50a40cf310be2cfb69d563e",
      "new_mode": 33188,
      "new_path": "arch/arm/mach-kirkwood/rd88f6281-setup.c"
    },
    {
      "type": "modify",
      "old_id": "0a623379789f03c4603cc43f33ebabcb2a8759b4",
      "old_mode": 33188,
      "old_path": "arch/arm/mach-orion5x/common.c",
      "new_id": "a4ecf625981ecb2887d87dd5b42f054e4e16fdc0",
      "new_mode": 33188,
      "new_path": "arch/arm/mach-orion5x/common.c"
    },
    {
      "type": "modify",
      "old_id": "15f53235ee302dbff7c9615fbc746c250982105b",
      "old_mode": 33188,
      "old_path": "arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c",
      "new_id": "9c1ca41730ba4fc00d248029dedfb0d7bc8d8417",
      "new_mode": 33188,
      "new_path": "arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c"
    },
    {
      "type": "modify",
      "old_id": "8ad3934399d4fab8680fd0cc994305f4363925ee",
      "old_mode": 33188,
      "old_path": "arch/arm/mach-orion5x/rd88f5181l-ge-setup.c",
      "new_id": "ee1399ff0cedbe38aab1f8a4ff82dbdb921158be",
      "new_mode": 33188,
      "new_path": "arch/arm/mach-orion5x/rd88f5181l-ge-setup.c"
    },
    {
      "type": "modify",
      "old_id": "262e25e4dace484fa826ddf60f8f226f1bf0bef6",
      "old_mode": 33188,
      "old_path": "arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c",
      "new_id": "7737cf9a8f5046a80911cd80b70a3f506d6fc057",
      "new_mode": 33188,
      "new_path": "arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c"
    },
    {
      "type": "modify",
      "old_id": "cc8f8920086505fb963efc6c232f617ed1082855",
      "old_mode": 33188,
      "old_path": "arch/arm/mach-orion5x/wrt350n-v2-setup.c",
      "new_id": "1b4ad9d5e2ebeedeab6804e47b52651cc3e6c74e",
      "new_mode": 33188,
      "new_path": "arch/arm/mach-orion5x/wrt350n-v2-setup.c"
    },
    {
      "type": "modify",
      "old_id": "52e97bfca5a1e5e83a2641c287c4ec3db88a990e",
      "old_mode": 33188,
      "old_path": "include/net/dsa.h",
      "new_id": "839f768f9e35c6ac175ff03d42b694839f7fd49a",
      "new_mode": 33188,
      "new_path": "include/net/dsa.h"
    },
    {
      "type": "modify",
      "old_id": "33e99462023abccab58c8807d1bb7f57962b7ebc",
      "old_mode": 33188,
      "old_path": "net/dsa/dsa.c",
      "new_id": "71489f69a42c1e38f59b5c61dfe6c2d2b557242d",
      "new_mode": 33188,
      "new_path": "net/dsa/dsa.c"
    },
    {
      "type": "modify",
      "old_id": "7063378a1ebf04559eadc46b3e2e42b89764c4bf",
      "old_mode": 33188,
      "old_path": "net/dsa/dsa_priv.h",
      "new_id": "41055f33d28a0e8141748613b5e9be71976de7de",
      "new_mode": 33188,
      "new_path": "net/dsa/dsa_priv.h"
    },
    {
      "type": "modify",
      "old_id": "85081ae9fe8915b13cde725d9c6064ba0d49a348",
      "old_mode": 33188,
      "old_path": "net/dsa/mv88e6060.c",
      "new_id": "83277f463af76c0a611ff312d3f39a1020584830",
      "new_mode": 33188,
      "new_path": "net/dsa/mv88e6060.c"
    },
    {
      "type": "modify",
      "old_id": "1003187222146c2a7708258369c7a30d15243762",
      "old_mode": 33188,
      "old_path": "net/dsa/mv88e6123_61_65.c",
      "new_id": "52faaa21a4d927e1a943840b01e2c85bb20464b9",
      "new_mode": 33188,
      "new_path": "net/dsa/mv88e6123_61_65.c"
    },
    {
      "type": "modify",
      "old_id": "002995721ecf7501771a51adc17150b15fe28574",
      "old_mode": 33188,
      "old_path": "net/dsa/mv88e6131.c",
      "new_id": "bb2b41bc854e4d7d98afb08bdd3892d4145ed375",
      "new_mode": 33188,
      "new_path": "net/dsa/mv88e6131.c"
    },
    {
      "type": "modify",
      "old_id": "99114e5b32e45eb1a7dcf07293d2fc81b3521d1b",
      "old_mode": 33188,
      "old_path": "net/dsa/slave.c",
      "new_id": "ed131181215dc3d8cb642101ca3f958116c74d80",
      "new_mode": 33188,
      "new_path": "net/dsa/slave.c"
    },
    {
      "type": "modify",
      "old_id": "0b8a91ddff44d82fbac9c7b9a5996b5aaf9b1750",
      "old_mode": 33188,
      "old_path": "net/dsa/tag_dsa.c",
      "new_id": "8fa25bafe6ca299aae59d61c08d0236a268a4166",
      "new_mode": 33188,
      "new_path": "net/dsa/tag_dsa.c"
    },
    {
      "type": "modify",
      "old_id": "16fcb6d196d431f1ab044c887135af3c7af67e7e",
      "old_mode": 33188,
      "old_path": "net/dsa/tag_edsa.c",
      "new_id": "815607bd286f03bfdb1d45b3c18adc92b9ebe83b",
      "new_mode": 33188,
      "new_path": "net/dsa/tag_edsa.c"
    },
    {
      "type": "modify",
      "old_id": "a6d959da678478eda1d888e66b1bf05e258dbc04",
      "old_mode": 33188,
      "old_path": "net/dsa/tag_trailer.c",
      "new_id": "1c3e30c38b86e69728d7c521f3ea020f874c20c0",
      "new_mode": 33188,
      "new_path": "net/dsa/tag_trailer.c"
    }
  ]
}
