1 --- a/drivers/net/ethernet/toshiba/ps3_gelic_net.c 2012-01-26 01:39:32.000000000 +0100
2 +++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.c 2012-01-31 20:54:24.798382231 +0100
3 @@ -1671,12 +1671,75 @@
5 struct gelic_card *card;
6 struct net_device *netdev;
7 + u64 lpar_id, laid, hwconfig, eurus_lpar_access, junk;
10 pr_debug("%s: called\n", __func__);
12 udbg_shutdown_ps3gelic();
15 + * Check for eurus control interface and disable it when it is enabled.
16 + * NB: it must be done before opening the gelic device else it will not work.
19 + result = lv1_get_logical_partition_id(&lpar_id);
21 + goto open_hv_device;
23 + result = lv1_read_repository_node(1,
24 + 0x0000000073730000ul /* ss */,
25 + 0x6c61696400000000ul /* laid */,
29 + if (result || (laid != 0x1070000002000001ul))
30 + goto open_hv_device;
32 + result = lv1_read_repository_node(1,
33 + 0x0000000073797300ul /* sys */,
34 + 0x6877000000000000ul /* hw */,
35 + 0x636f6e6669670000ul /* config */,
38 + if (result || !(hwconfig & 0x40000ul))
39 + goto open_hv_device;
41 + result = lv1_read_repository_node(1,
42 + 0x00000000696f7300ul /* ios */,
43 + 0x6e65740000000000ul /* net */,
44 + 0x6575727573000000ul /* eurus */,
45 + 0x6c70617200000000ul /* lpar */,
46 + &eurus_lpar_access, &junk);
48 + goto open_hv_device;
50 + if (!(eurus_lpar_access & (1ul << lpar_id))) {
51 + dev_info(&dev->core, "%s: eurus control interface is already disabled\n",
53 + goto open_hv_device;
55 + dev_info(&dev->core, "%s: eurus control interface is enabled\n",
59 + eurus_lpar_access &= ~(1ul << lpar_id);
61 + result = lv1_write_repository_node(1,
62 + 0x00000000696f7300ul /* ios */,
63 + 0x6e65740000000000ul /* net */,
64 + 0x6575727573000000ul /* eurus */,
65 + 0x6c70617200000000ul /* lpar */,
66 + eurus_lpar_access, junk);
68 + dev_info(&dev->core, "%s: eurus control interface could not be disabled\n",
71 + dev_info(&dev->core, "%s: eurus control interface was disabled\n",
76 result = ps3_open_hv_device(dev);