aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea
diff options
context:
space:
mode:
authorThomas Klein <osstklei@de.ibm.com>2007-01-22 06:54:20 -0500
committerJeff Garzik <jeff@garzik.org>2007-01-23 00:59:21 -0500
commit7674a588e93c6fa1fde8e452a4c025c49037cb96 (patch)
treeec753e5bb666e5c856b6cccc9fc8845584eacc36 /drivers/net/ehea
parent4e996b32e0585756c335b35980dc68852c33f297 (diff)
ehea: Improved logging of permission issues
Disabled dump of hcall regs on some permission issues and fixed appropriate misleading logmessages Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r--drivers/net/ehea/ehea_main.c16
-rw-r--r--drivers/net/ehea/ehea_phyp.c10
2 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 9486e0a8ec8b..8281b30da32d 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -730,10 +730,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
730 } 730 }
731 } else { 731 } else {
732 if (hret == H_AUTHORITY) { 732 if (hret == H_AUTHORITY) {
733 ehea_info("Hypervisor denied setting port speed. Either" 733 ehea_info("Hypervisor denied setting port speed");
734 " this partition is not authorized to set "
735 "port speed or another partition has modified"
736 " port speed first.");
737 ret = -EPERM; 734 ret = -EPERM;
738 } else { 735 } else {
739 ret = -EIO; 736 ret = -EIO;
@@ -1487,11 +1484,12 @@ out:
1487 1484
1488static void ehea_promiscuous_error(u64 hret, int enable) 1485static void ehea_promiscuous_error(u64 hret, int enable)
1489{ 1486{
1490 ehea_info("Hypervisor denied %sabling promiscuous mode.%s", 1487 if (hret == H_AUTHORITY)
1491 enable == 1 ? "en" : "dis", 1488 ehea_info("Hypervisor denied %sabling promiscuous mode",
1492 hret != H_AUTHORITY ? "" : " Another partition owning a " 1489 enable == 1 ? "en" : "dis");
1493 "logical port on the same physical port might have altered " 1490 else
1494 "promiscuous mode first."); 1491 ehea_error("failed %sabling promiscuous mode",
1492 enable == 1 ? "en" : "dis");
1495} 1493}
1496 1494
1497static void ehea_promiscuous(struct net_device *dev, int enable) 1495static void ehea_promiscuous(struct net_device *dev, int enable)
diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c
index 0cfc2bc1a27b..37716e05e808 100644
--- a/drivers/net/ehea/ehea_phyp.c
+++ b/drivers/net/ehea/ehea_phyp.c
@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode,
94{ 94{
95 long ret; 95 long ret;
96 int i, sleep_msecs; 96 int i, sleep_msecs;
97 u8 cb_cat;
97 98
98 for (i = 0; i < 5; i++) { 99 for (i = 0; i < 5; i++) {
99 ret = plpar_hcall9(opcode, outs, 100 ret = plpar_hcall9(opcode, outs,
@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode,
106 continue; 107 continue;
107 } 108 }
108 109
109 if (ret < H_SUCCESS) 110 cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2);
111
112 if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY)
113 && (opcode == H_MODIFY_HEA_PORT))
114 && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
115 || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
116 && (arg3 == H_PORT_CB7_DUCQPN)))))
110 ehea_error("opcode=%lx ret=%lx" 117 ehea_error("opcode=%lx ret=%lx"
111 " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" 118 " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
112 " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" 119 " arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode,
120 outs[0], outs[1], outs[2], outs[3], 127 outs[0], outs[1], outs[2], outs[3],
121 outs[4], outs[5], outs[6], outs[7], 128 outs[4], outs[5], outs[6], outs[7],
122 outs[8]); 129 outs[8]);
123
124 return ret; 130 return ret;
125 } 131 }
126 132