Commit 7674a588 authored by Thomas Klein's avatar Thomas Klein Committed by Jeff Garzik

ehea: Improved logging of permission issues

Disabled dump of hcall regs on some permission issues and
fixed appropriate misleading logmessages
Signed-off-by: default avatarThomas Klein <tklein@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 4e996b32
...@@ -730,10 +730,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed) ...@@ -730,10 +730,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
} }
} else { } else {
if (hret == H_AUTHORITY) { if (hret == H_AUTHORITY) {
ehea_info("Hypervisor denied setting port speed. Either" ehea_info("Hypervisor denied setting port speed");
" this partition is not authorized to set "
"port speed or another partition has modified"
" port speed first.");
ret = -EPERM; ret = -EPERM;
} else { } else {
ret = -EIO; ret = -EIO;
...@@ -1487,11 +1484,12 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) ...@@ -1487,11 +1484,12 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa)
static void ehea_promiscuous_error(u64 hret, int enable) static void ehea_promiscuous_error(u64 hret, int enable)
{ {
ehea_info("Hypervisor denied %sabling promiscuous mode.%s", if (hret == H_AUTHORITY)
enable == 1 ? "en" : "dis", ehea_info("Hypervisor denied %sabling promiscuous mode",
hret != H_AUTHORITY ? "" : " Another partition owning a " enable == 1 ? "en" : "dis");
"logical port on the same physical port might have altered " else
"promiscuous mode first."); ehea_error("failed %sabling promiscuous mode",
enable == 1 ? "en" : "dis");
} }
static void ehea_promiscuous(struct net_device *dev, int enable) static void ehea_promiscuous(struct net_device *dev, int enable)
......
...@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode, ...@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode,
{ {
long ret; long ret;
int i, sleep_msecs; int i, sleep_msecs;
u8 cb_cat;
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
ret = plpar_hcall9(opcode, outs, ret = plpar_hcall9(opcode, outs,
...@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode, ...@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode,
continue; continue;
} }
if (ret < H_SUCCESS) cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2);
if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY)
&& (opcode == H_MODIFY_HEA_PORT))
&& (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
|| (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
&& (arg3 == H_PORT_CB7_DUCQPN)))))
ehea_error("opcode=%lx ret=%lx" ehea_error("opcode=%lx ret=%lx"
" arg1=%lx arg2=%lx arg3=%lx arg4=%lx" " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
" arg5=%lx arg6=%lx arg7=%lx arg8=%lx" " arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
...@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode, ...@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode,
outs[0], outs[1], outs[2], outs[3], outs[0], outs[1], outs[2], outs[3],
outs[4], outs[5], outs[6], outs[7], outs[4], outs[5], outs[6], outs[7],
outs[8]); outs[8]);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment