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 730 } 731 731 } else { 732 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."); 733 + ehea_info("Hypervisor denied setting port speed"); 737 734 ret = -EPERM; 738 735 } else { 739 736 ret = -EIO; ··· 1484 1487 1485 1488 static void ehea_promiscuous_error(u64 hret, int enable) 1486 1489 { 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."); 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"); 1492 1496 } 1493 1497 1494 1498 static void ehea_promiscuous(struct net_device *dev, int enable)
+8 -2
drivers/net/ehea/ehea_phyp.c
··· 94 94 { 95 95 long ret; 96 96 int i, sleep_msecs; 97 + u8 cb_cat; 97 98 98 99 for (i = 0; i < 5; i++) { 99 100 ret = plpar_hcall9(opcode, outs, ··· 107 106 continue; 108 107 } 109 108 110 - if (ret < H_SUCCESS) 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))))) 111 116 ehea_error("opcode=%lx ret=%lx" 112 117 " arg1=%lx arg2=%lx arg3=%lx arg4=%lx" 113 118 " arg5=%lx arg6=%lx arg7=%lx arg8=%lx" ··· 127 120 outs[0], outs[1], outs[2], outs[3], 128 121 outs[4], outs[5], outs[6], outs[7], 129 122 outs[8]); 130 - 131 123 return ret; 132 124 } 133 125