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>

authored by Thomas Klein and committed by Jeff Garzik 7674a588 4e996b32

+15 -11
+7 -9
drivers/net/ehea/ehea_main.c
··· 730 } 731 } else { 732 if (hret == H_AUTHORITY) { 733 - ehea_info("Hypervisor denied setting port speed. Either" 734 - " this partition is not authorized to set " 735 - "port speed or another partition has modified" 736 - " port speed first."); 737 ret = -EPERM; 738 } else { 739 ret = -EIO; ··· 1484 1485 static void ehea_promiscuous_error(u64 hret, int enable) 1486 { 1487 - ehea_info("Hypervisor denied %sabling promiscuous mode.%s", 1488 - enable == 1 ? "en" : "dis", 1489 - hret != H_AUTHORITY ? "" : " Another partition owning a " 1490 - "logical port on the same physical port might have altered " 1491 - "promiscuous mode first."); 1492 } 1493 1494 static void ehea_promiscuous(struct net_device *dev, int enable)
··· 730 } 731 } else { 732 if (hret == H_AUTHORITY) { 733 + ehea_info("Hypervisor denied setting port speed"); 734 ret = -EPERM; 735 } else { 736 ret = -EIO; ··· 1487 1488 static void ehea_promiscuous_error(u64 hret, int enable) 1489 { 1490 + if (hret == H_AUTHORITY) 1491 + ehea_info("Hypervisor denied %sabling promiscuous mode", 1492 + enable == 1 ? "en" : "dis"); 1493 + else 1494 + ehea_error("failed %sabling promiscuous mode", 1495 + enable == 1 ? "en" : "dis"); 1496 } 1497 1498 static void ehea_promiscuous(struct net_device *dev, int enable)
+8 -2
drivers/net/ehea/ehea_phyp.c
··· 94 { 95 long ret; 96 int i, sleep_msecs; 97 98 for (i = 0; i < 5; i++) { 99 ret = plpar_hcall9(opcode, outs, ··· 107 continue; 108 } 109 110 - if (ret < H_SUCCESS) 111 ehea_error("opcode=%lx ret=%lx" 112 " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" 113 " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" ··· 127 outs[0], outs[1], outs[2], outs[3], 128 outs[4], outs[5], outs[6], outs[7], 129 outs[8]); 130 - 131 return ret; 132 } 133
··· 94 { 95 long ret; 96 int i, sleep_msecs; 97 + u8 cb_cat; 98 99 for (i = 0; i < 5; i++) { 100 ret = plpar_hcall9(opcode, outs, ··· 106 continue; 107 } 108 109 + cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2); 110 + 111 + if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY) 112 + && (opcode == H_MODIFY_HEA_PORT)) 113 + && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO) 114 + || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7) 115 + && (arg3 == H_PORT_CB7_DUCQPN))))) 116 ehea_error("opcode=%lx ret=%lx" 117 " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" 118 " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" ··· 120 outs[0], outs[1], outs[2], outs[3], 121 outs[4], outs[5], outs[6], outs[7], 122 outs[8]); 123 return ret; 124 } 125