Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/zcrypt: rework of debug feature messages

This patch reworks all the debug feature invocations to be
more uniform. All invocations now use the macro with the
level already part of the macro name. All messages now start
with %s filled with __func__ (well there are still some
exceptions), and some message text has been shortened or
reworked.

There is no functional code touched with this patch.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Harald Freudenberger and committed by
Vasily Gorbik
3f74eb5f 3826350e

+116 -117
+37 -35
drivers/s390/crypto/ap_bus.c
··· 725 725 if (bound == apqns) { 726 726 if (!completion_done(&ap_init_apqn_bindings_complete)) { 727 727 complete_all(&ap_init_apqn_bindings_complete); 728 - AP_DBF(DBF_INFO, "%s complete\n", __func__); 728 + AP_DBF_INFO("%s complete\n", __func__); 729 729 } 730 730 ap_send_bindings_complete_uevent(); 731 731 } ··· 786 786 drvres = to_ap_drv(dev->driver)->flags 787 787 & AP_DRIVER_FLAG_DEFAULT; 788 788 if (!!devres != !!drvres) { 789 - AP_DBF_DBG("reprobing queue=%02x.%04x\n", 790 - card, queue); 789 + AP_DBF_DBG("%s reprobing queue=%02x.%04x\n", 790 + __func__, card, queue); 791 791 rc = device_reprobe(dev); 792 792 } 793 793 } ··· 1118 1118 ap_domain_index = domain; 1119 1119 spin_unlock_bh(&ap_domain_lock); 1120 1120 1121 - AP_DBF_INFO("stored new default domain=%d\n", domain); 1121 + AP_DBF_INFO("%s stored new default domain=%d\n", 1122 + __func__, domain); 1122 1123 1123 1124 return count; 1124 1125 } ··· 1434 1433 1435 1434 /* < CEX2A is not supported */ 1436 1435 if (rawtype < AP_DEVICE_TYPE_CEX2A) { 1437 - AP_DBF_WARN("get_comp_type queue=%02x.%04x unsupported type %d\n", 1438 - AP_QID_CARD(qid), AP_QID_QUEUE(qid), rawtype); 1436 + AP_DBF_WARN("%s queue=%02x.%04x unsupported type %d\n", 1437 + __func__, AP_QID_CARD(qid), 1438 + AP_QID_QUEUE(qid), rawtype); 1439 1439 return 0; 1440 1440 } 1441 1441 /* up to CEX7 known and fully supported */ ··· 1460 1458 comp_type = apinfo.cat; 1461 1459 } 1462 1460 if (!comp_type) 1463 - AP_DBF_WARN("get_comp_type queue=%02x.%04x unable to map type %d\n", 1464 - AP_QID_CARD(qid), AP_QID_QUEUE(qid), rawtype); 1461 + AP_DBF_WARN("%s queue=%02x.%04x unable to map type %d\n", 1462 + __func__, AP_QID_CARD(qid), 1463 + AP_QID_QUEUE(qid), rawtype); 1465 1464 else if (comp_type != rawtype) 1466 - AP_DBF_INFO("get_comp_type queue=%02x.%04x map type %d to %d\n", 1467 - AP_QID_CARD(qid), AP_QID_QUEUE(qid), 1465 + AP_DBF_INFO("%s queue=%02x.%04x map type %d to %d\n", 1466 + __func__, AP_QID_CARD(qid), AP_QID_QUEUE(qid), 1468 1467 rawtype, comp_type); 1469 1468 return comp_type; 1470 1469 } ··· 1538 1535 aq = dev ? to_ap_queue(dev) : NULL; 1539 1536 if (!ap_test_config_usage_domain(dom)) { 1540 1537 if (dev) { 1541 - AP_DBF_INFO("%s(%d,%d) not in config any more, rm queue device\n", 1538 + AP_DBF_INFO("%s(%d,%d) not in config anymore, rm queue dev\n", 1542 1539 __func__, ac->id, dom); 1543 1540 device_unregister(dev); 1544 1541 put_device(dev); ··· 1548 1545 /* domain is valid, get info from this APQN */ 1549 1546 if (!ap_queue_info(qid, &type, &func, &depth, &ml, &decfg)) { 1550 1547 if (aq) { 1551 - AP_DBF_INFO( 1552 - "%s(%d,%d) ap_queue_info() not successful, rm queue device\n", 1553 - __func__, ac->id, dom); 1548 + AP_DBF_INFO("%s(%d,%d) queue_info() failed, rm queue dev\n", 1549 + __func__, ac->id, dom); 1554 1550 device_unregister(dev); 1555 1551 put_device(dev); 1556 1552 } ··· 1579 1577 /* get it and thus adjust reference counter */ 1580 1578 get_device(dev); 1581 1579 if (decfg) 1582 - AP_DBF_INFO("%s(%d,%d) new (decfg) queue device created\n", 1580 + AP_DBF_INFO("%s(%d,%d) new (decfg) queue dev created\n", 1583 1581 __func__, ac->id, dom); 1584 1582 else 1585 - AP_DBF_INFO("%s(%d,%d) new queue device created\n", 1583 + AP_DBF_INFO("%s(%d,%d) new queue dev created\n", 1586 1584 __func__, ac->id, dom); 1587 1585 goto put_dev_and_continue; 1588 1586 } ··· 1596 1594 aq->last_err_rc = AP_RESPONSE_DECONFIGURED; 1597 1595 } 1598 1596 spin_unlock_bh(&aq->lock); 1599 - AP_DBF_INFO("%s(%d,%d) queue device config off\n", 1597 + AP_DBF_INFO("%s(%d,%d) queue dev config off\n", 1600 1598 __func__, ac->id, dom); 1601 1599 ap_send_config_uevent(&aq->ap_dev, aq->config); 1602 1600 /* 'receive' pending messages with -EAGAIN */ ··· 1611 1609 aq->sm_state = AP_SM_STATE_RESET_START; 1612 1610 } 1613 1611 spin_unlock_bh(&aq->lock); 1614 - AP_DBF_INFO("%s(%d,%d) queue device config on\n", 1612 + AP_DBF_INFO("%s(%d,%d) queue dev config on\n", 1615 1613 __func__, ac->id, dom); 1616 1614 ap_send_config_uevent(&aq->ap_dev, aq->config); 1617 1615 goto put_dev_and_continue; ··· 1623 1621 ap_flush_queue(aq); 1624 1622 /* re-init (with reset) the queue device */ 1625 1623 ap_queue_init_state(aq); 1626 - AP_DBF_INFO("%s(%d,%d) queue device reinit enforced\n", 1624 + AP_DBF_INFO("%s(%d,%d) queue dev reinit enforced\n", 1627 1625 __func__, ac->id, dom); 1628 1626 goto put_dev_and_continue; 1629 1627 } ··· 1655 1653 /* Adapter not in configuration ? */ 1656 1654 if (!ap_test_config_card_id(ap)) { 1657 1655 if (ac) { 1658 - AP_DBF_INFO("%s(%d) ap not in config any more, rm card and queue devices\n", 1656 + AP_DBF_INFO("%s(%d) ap not in config any more, rm card and queue devs\n", 1659 1657 __func__, ap); 1660 1658 ap_scan_rm_card_dev_and_queue_devs(ac); 1661 1659 put_device(dev); ··· 1680 1678 if (dom > ap_max_domain_id) { 1681 1679 /* Could not find a valid APQN for this adapter */ 1682 1680 if (ac) { 1683 - AP_DBF_INFO( 1684 - "%s(%d) no type info (no APQN found), rm card and queue devices\n", 1685 - __func__, ap); 1681 + AP_DBF_INFO("%s(%d) no type info (no APQN found), rm card and queue devs\n", 1682 + __func__, ap); 1686 1683 ap_scan_rm_card_dev_and_queue_devs(ac); 1687 1684 put_device(dev); 1688 1685 } else { ··· 1693 1692 if (!type) { 1694 1693 /* No apdater type info available, an unusable adapter */ 1695 1694 if (ac) { 1696 - AP_DBF_INFO("%s(%d) no valid type (0) info, rm card and queue devices\n", 1695 + AP_DBF_INFO("%s(%d) no valid type (0) info, rm card and queue devs\n", 1697 1696 __func__, ap); 1698 1697 ap_scan_rm_card_dev_and_queue_devs(ac); 1699 1698 put_device(dev); ··· 1707 1706 if (ac) { 1708 1707 /* Check APQN against existing card device for changes */ 1709 1708 if (ac->raw_hwtype != type) { 1710 - AP_DBF_INFO("%s(%d) hwtype %d changed, rm card and queue devices\n", 1709 + AP_DBF_INFO("%s(%d) hwtype %d changed, rm card and queue devs\n", 1711 1710 __func__, ap, type); 1712 1711 ap_scan_rm_card_dev_and_queue_devs(ac); 1713 1712 put_device(dev); 1714 1713 ac = NULL; 1715 1714 } else if (ac->functions != func) { 1716 - AP_DBF_INFO("%s(%d) functions 0x%08x changed, rm card and queue devices\n", 1715 + AP_DBF_INFO("%s(%d) functions 0x%08x changed, rm card and queue devs\n", 1717 1716 __func__, ap, type); 1718 1717 ap_scan_rm_card_dev_and_queue_devs(ac); 1719 1718 put_device(dev); ··· 1721 1720 } else { 1722 1721 if (decfg && ac->config) { 1723 1722 ac->config = false; 1724 - AP_DBF_INFO("%s(%d) card device config off\n", 1723 + AP_DBF_INFO("%s(%d) card dev config off\n", 1725 1724 __func__, ap); 1726 1725 ap_send_config_uevent(&ac->ap_dev, ac->config); 1727 1726 } 1728 1727 if (!decfg && !ac->config) { 1729 1728 ac->config = true; 1730 - AP_DBF_INFO("%s(%d) card device config on\n", 1729 + AP_DBF_INFO("%s(%d) card dev config on\n", 1731 1730 __func__, ap); 1732 1731 ap_send_config_uevent(&ac->ap_dev, ac->config); 1733 1732 } ··· 1757 1756 if (ac->maxmsgsize > atomic_read(&ap_max_msg_size)) { 1758 1757 atomic_set(&ap_max_msg_size, ac->maxmsgsize); 1759 1758 AP_DBF_INFO("%s(%d) ap_max_msg_size update to %d byte\n", 1760 - __func__, ap, atomic_read(&ap_max_msg_size)); 1759 + __func__, ap, 1760 + atomic_read(&ap_max_msg_size)); 1761 1761 } 1762 1762 /* Register the new card device with AP bus */ 1763 1763 rc = device_register(dev); ··· 1771 1769 /* get it and thus adjust reference counter */ 1772 1770 get_device(dev); 1773 1771 if (decfg) 1774 - AP_DBF_INFO("%s(%d) new (decfg) card device type=%d func=0x%08x created\n", 1772 + AP_DBF_INFO("%s(%d) new (decfg) card dev type=%d func=0x%08x created\n", 1775 1773 __func__, ap, type, func); 1776 1774 else 1777 - AP_DBF_INFO("%s(%d) new card device type=%d func=0x%08x created\n", 1775 + AP_DBF_INFO("%s(%d) new card dev type=%d func=0x%08x created\n", 1778 1776 __func__, ap, type, func); 1779 1777 } 1780 1778 ··· 1812 1810 if (dev) 1813 1811 put_device(dev); 1814 1812 else 1815 - AP_DBF_INFO("no queue device with default domain %d available\n", 1816 - ap_domain_index); 1813 + AP_DBF_INFO("%s no queue device with default domain %d available\n", 1814 + __func__, ap_domain_index); 1817 1815 } 1818 1816 1819 1817 if (atomic64_inc_return(&ap_scan_bus_count) == 1) { 1820 - AP_DBF(DBF_DEBUG, "%s init scan complete\n", __func__); 1818 + AP_DBF_DBG("%s init scan complete\n", __func__); 1821 1819 ap_send_init_scan_done_uevent(); 1822 1820 ap_check_bindings_complete(); 1823 1821 } ··· 1832 1830 1833 1831 static int __init ap_debug_init(void) 1834 1832 { 1835 - ap_dbf_info = debug_register("ap", 1, 1, 1833 + ap_dbf_info = debug_register("ap", 2, 1, 1836 1834 DBF_MAX_SPRINTF_ARGS * sizeof(long)); 1837 1835 debug_register_view(ap_dbf_info, &debug_sprintf_view); 1838 1836 debug_set_level(ap_dbf_info, DBF_ERR);
+1 -1
drivers/s390/crypto/ap_debug.h
··· 16 16 #define RC2ERR(rc) ((rc) ? DBF_ERR : DBF_INFO) 17 17 #define RC2WARN(rc) ((rc) ? DBF_WARN : DBF_INFO) 18 18 19 - #define DBF_MAX_SPRINTF_ARGS 5 19 + #define DBF_MAX_SPRINTF_ARGS 6 20 20 21 21 #define AP_DBF(...) \ 22 22 debug_sprintf_event(ap_dbf_info, ##__VA_ARGS__)
+4 -3
drivers/s390/crypto/ap_queue.c
··· 248 248 249 249 if (aq->requestq_count <= 0) 250 250 return AP_SM_WAIT_NONE; 251 + 251 252 /* Start the next request on the queue. */ 252 253 ap_msg = list_entry(aq->requestq.next, struct ap_message, list); 253 254 #ifdef CONFIG_ZCRYPT_DEBUG ··· 282 281 aq->sm_state = AP_SM_STATE_RESET_WAIT; 283 282 return AP_SM_WAIT_TIMEOUT; 284 283 case AP_RESPONSE_INVALID_DOMAIN: 285 - AP_DBF(DBF_WARN, "AP_RESPONSE_INVALID_DOMAIN on NQAP\n"); 284 + AP_DBF_WARN("%s RESPONSE_INVALID_DOMAIN on NQAP\n", __func__); 286 285 fallthrough; 287 286 case AP_RESPONSE_MESSAGE_TOO_BIG: 288 287 case AP_RESPONSE_REQ_FAC_NOT_INST: ··· 574 573 ap_wait(ap_sm_event(aq, AP_SM_EVENT_POLL)); 575 574 spin_unlock_bh(&aq->lock); 576 575 577 - AP_DBF(DBF_INFO, "reset queue=%02x.%04x triggered by user\n", 578 - AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); 576 + AP_DBF_INFO("%s reset queue=%02x.%04x triggered by user\n", 577 + __func__, AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); 579 578 580 579 return count; 581 580 }
+21 -24
drivers/s390/crypto/zcrypt_api.c
··· 82 82 atomic_set(&zcrypt_rescan_req, 0); 83 83 atomic_inc(&zcrypt_rescan_count); 84 84 ap_bus_force_rescan(); 85 - ZCRYPT_DBF(DBF_INFO, "rescan count=%07d\n", 86 - atomic_inc_return(&zcrypt_rescan_count)); 85 + ZCRYPT_DBF_INFO("%s rescan count=%07d\n", __func__, 86 + atomic_inc_return(&zcrypt_rescan_count)); 87 87 return 1; 88 88 } 89 89 return 0; ··· 341 341 { 342 342 struct zcdn_device *zcdndev = to_zcdn_dev(dev); 343 343 344 - ZCRYPT_DBF(DBF_INFO, "releasing zcdn device %d:%d\n", 345 - MAJOR(dev->devt), MINOR(dev->devt)); 344 + ZCRYPT_DBF_INFO("%s releasing zcdn device %d:%d\n", 345 + __func__, MAJOR(dev->devt), MINOR(dev->devt)); 346 346 347 347 kfree(zcdndev); 348 348 } ··· 407 407 goto unlockout; 408 408 } 409 409 410 - ZCRYPT_DBF(DBF_INFO, "created zcdn device %d:%d\n", 411 - MAJOR(devt), MINOR(devt)); 410 + ZCRYPT_DBF_INFO("%s created zcdn device %d:%d\n", 411 + __func__, MAJOR(devt), MINOR(devt)); 412 412 413 413 unlockout: 414 414 mutex_unlock(&ap_perms_mutex); ··· 550 550 } 551 551 552 552 if (rc) 553 - ZCRYPT_DBF(DBF_WARN, 554 - "ioctl check failed: ioctlnr=0x%04x rc=%d\n", 555 - ioctlnr, rc); 553 + ZCRYPT_DBF_WARN("%s ioctl check failed: ioctlnr=0x%04x rc=%d\n", 554 + __func__, ioctlnr, rc); 556 555 557 556 return rc; 558 557 } ··· 1445 1446 if (rc == -EAGAIN && tr.again_counter >= TRACK_AGAIN_MAX) 1446 1447 rc = -EIO; 1447 1448 if (rc) { 1448 - ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSAMODEXPO rc=%d\n", rc); 1449 + ZCRYPT_DBF_DBG("ioctl ICARSAMODEXPO rc=%d\n", rc); 1449 1450 return rc; 1450 1451 } 1451 1452 return put_user(mex.outputdatalength, &umex->outputdatalength); ··· 1490 1491 if (rc == -EAGAIN && tr.again_counter >= TRACK_AGAIN_MAX) 1491 1492 rc = -EIO; 1492 1493 if (rc) { 1493 - ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSACRT rc=%d\n", rc); 1494 + ZCRYPT_DBF_DBG("ioctl ICARSACRT rc=%d\n", rc); 1494 1495 return rc; 1495 1496 } 1496 1497 return put_user(crt.outputdatalength, &ucrt->outputdatalength); ··· 1508 1509 return -EFAULT; 1509 1510 1510 1511 #ifdef CONFIG_ZCRYPT_DEBUG 1511 - if (xcRB.status & (1U << 31)) { 1512 + if ((xcRB.status & 0x8000FFFF) == 0x80004649 /* 'FI' */) { 1512 1513 if (!capable(CAP_SYS_ADMIN)) 1513 1514 return -EPERM; 1514 1515 tr.fi.cmd = (u16)(xcRB.status >> 16); 1515 1516 } 1516 - xcRB.status &= 0x0000FFFF; 1517 + xcRB.status = 0; 1517 1518 #endif 1518 1519 1519 1520 do { ··· 1535 1536 if (rc == -EAGAIN && tr.again_counter >= TRACK_AGAIN_MAX) 1536 1537 rc = -EIO; 1537 1538 if (rc) 1538 - ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDCPRB rc=%d status=0x%x\n", 1539 - rc, xcRB.status); 1539 + ZCRYPT_DBF_DBG("ioctl ZSENDCPRB rc=%d status=0x%x\n", 1540 + rc, xcRB.status); 1540 1541 if (copy_to_user(uxcRB, &xcRB, sizeof(xcRB))) 1541 1542 return -EFAULT; 1542 1543 return rc; ··· 1581 1582 if (rc == -EAGAIN && tr.again_counter >= TRACK_AGAIN_MAX) 1582 1583 rc = -EIO; 1583 1584 if (rc) 1584 - ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDEP11CPRB rc=%d\n", rc); 1585 + ZCRYPT_DBF_DBG("ioctl ZSENDEP11CPRB rc=%d\n", rc); 1585 1586 if (copy_to_user(uxcrb, &xcrb, sizeof(xcrb))) 1586 1587 return -EFAULT; 1587 1588 return rc; ··· 1708 1709 } 1709 1710 /* unknown ioctl number */ 1710 1711 default: 1711 - ZCRYPT_DBF(DBF_DEBUG, "unknown ioctl 0x%08x\n", cmd); 1712 + ZCRYPT_DBF_DBG("unknown ioctl 0x%08x\n", cmd); 1712 1713 return -ENOIOCTLCMD; 1713 1714 } 1714 1715 } ··· 2047 2048 break; 2048 2049 case -ETIME: 2049 2050 /* timeout */ 2050 - ZCRYPT_DBF(DBF_WARN, 2051 - "%s ap_wait_init_apqn_bindings_complete() returned with ETIME\n", 2052 - __func__); 2051 + ZCRYPT_DBF_WARN("%s ap_wait_init_apqn_bindings_complete()=ETIME\n", 2052 + __func__); 2053 2053 zcrypt_wait_api_state = -ETIME; 2054 2054 break; 2055 2055 default: 2056 2056 /* other failure */ 2057 - ZCRYPT_DBF(DBF_DEBUG, 2058 - "%s ap_wait_init_apqn_bindings_complete() failure rc=%d\n", 2059 - __func__, rc); 2057 + ZCRYPT_DBF_DBG("%s ap_wait_init_apqn_bindings_complete()=%d\n", 2058 + __func__, rc); 2060 2059 break; 2061 2060 } 2062 2061 break; ··· 2076 2079 2077 2080 int __init zcrypt_debug_init(void) 2078 2081 { 2079 - zcrypt_dbf_info = debug_register("zcrypt", 1, 1, 2082 + zcrypt_dbf_info = debug_register("zcrypt", 2, 1, 2080 2083 DBF_MAX_SPRINTF_ARGS * sizeof(long)); 2081 2084 debug_register_view(zcrypt_dbf_info, &debug_sprintf_view); 2082 2085 debug_set_level(zcrypt_dbf_info, DBF_ERR);
+5 -3
drivers/s390/crypto/zcrypt_card.c
··· 76 76 zc->online = online; 77 77 id = zc->card->id; 78 78 79 - ZCRYPT_DBF(DBF_INFO, "card=%02x online=%d\n", id, online); 79 + ZCRYPT_DBF_INFO("%s card=%02x online=%d\n", __func__, id, online); 80 80 81 81 ap_send_online_uevent(&ac->ap_dev, online); 82 82 ··· 189 189 190 190 zc->online = 1; 191 191 192 - ZCRYPT_DBF(DBF_INFO, "card=%02x register online=1\n", zc->card->id); 192 + ZCRYPT_DBF_INFO("%s card=%02x register online=1\n", 193 + __func__, zc->card->id); 193 194 194 195 rc = sysfs_create_group(&zc->card->ap_dev.device.kobj, 195 196 &zcrypt_card_attr_group); ··· 212 211 */ 213 212 void zcrypt_card_unregister(struct zcrypt_card *zc) 214 213 { 215 - ZCRYPT_DBF(DBF_INFO, "card=%02x unregister\n", zc->card->id); 214 + ZCRYPT_DBF_INFO("%s card=%02x unregister\n", 215 + __func__, zc->card->id); 216 216 217 217 spin_lock(&zcrypt_list_lock); 218 218 list_del_init(&zc->list);
+1 -1
drivers/s390/crypto/zcrypt_debug.h
··· 17 17 #define RC2ERR(rc) ((rc) ? DBF_ERR : DBF_INFO) 18 18 #define RC2WARN(rc) ((rc) ? DBF_WARN : DBF_INFO) 19 19 20 - #define DBF_MAX_SPRINTF_ARGS 5 20 + #define DBF_MAX_SPRINTF_ARGS 6 21 21 22 22 #define ZCRYPT_DBF(...) \ 23 23 debug_sprintf_event(zcrypt_dbf_info, ##__VA_ARGS__)
+10 -12
drivers/s390/crypto/zcrypt_error.h
··· 98 98 case REP88_ERROR_MESSAGE_MALFORMD: /* 0x22 */ 99 99 case REP88_ERROR_KEY_TYPE: /* 0x34 */ 100 100 /* RY indicates malformed request */ 101 - ZCRYPT_DBF(DBF_WARN, 102 - "dev=%02x.%04x RY=0x%02x => rc=EINVAL\n", 103 - card, queue, ehdr->reply_code); 101 + ZCRYPT_DBF_WARN("%s dev=%02x.%04x RY=0x%02x => rc=EINVAL\n", 102 + __func__, card, queue, ehdr->reply_code); 104 103 return -EINVAL; 105 104 case REP82_ERROR_MACHINE_FAILURE: /* 0x10 */ 106 105 case REP82_ERROR_MESSAGE_TYPE: /* 0x20 */ ··· 118 119 } __packed * head = reply->msg; 119 120 unsigned int apfs = *((u32 *)head->fmt2.apfs); 120 121 121 - ZCRYPT_DBF(DBF_WARN, 122 - "dev=%02x.%04x RY=0x%02x apfs=0x%x => bus rescan, rc=EAGAIN\n", 123 - card, queue, ehdr->reply_code, apfs); 122 + ZCRYPT_DBF_WARN( 123 + "%s dev=%02x.%04x RY=0x%02x apfs=0x%x => bus rescan, rc=EAGAIN\n", 124 + __func__, card, queue, ehdr->reply_code, apfs); 124 125 } else 125 - ZCRYPT_DBF(DBF_WARN, 126 - "dev=%02x.%04x RY=0x%02x => bus rescan, rc=EAGAIN\n", 127 - card, queue, ehdr->reply_code); 126 + ZCRYPT_DBF_WARN("%s dev=%02x.%04x RY=0x%02x => bus rescan, rc=EAGAIN\n", 127 + __func__, card, queue, 128 + ehdr->reply_code); 128 129 return -EAGAIN; 129 130 default: 130 131 /* Assume request is valid and a retry will be worth it */ 131 - ZCRYPT_DBF(DBF_WARN, 132 - "dev=%02x.%04x RY=0x%02x => rc=EAGAIN\n", 133 - card, queue, ehdr->reply_code); 132 + ZCRYPT_DBF_WARN("%s dev=%02x.%04x RY=0x%02x => rc=EAGAIN\n", 133 + __func__, card, queue, ehdr->reply_code); 134 134 return -EAGAIN; 135 135 } 136 136 }
+8 -10
drivers/s390/crypto/zcrypt_msgtype50.c
··· 369 369 zq->online = 0; 370 370 pr_err("Crypto dev=%02x.%04x code=0x%02x => online=0 rc=EAGAIN\n", 371 371 AP_QID_CARD(zq->queue->qid), 372 - AP_QID_QUEUE(zq->queue->qid), 373 - t80h->code); 374 - ZCRYPT_DBF_ERR("dev=%02x.%04x code=0x%02x => online=0 rc=EAGAIN\n", 375 - AP_QID_CARD(zq->queue->qid), 376 - AP_QID_QUEUE(zq->queue->qid), 377 - t80h->code); 372 + AP_QID_QUEUE(zq->queue->qid), t80h->code); 373 + ZCRYPT_DBF_ERR("%s dev=%02x.%04x code=0x%02x => online=0 rc=EAGAIN\n", 374 + __func__, AP_QID_CARD(zq->queue->qid), 375 + AP_QID_QUEUE(zq->queue->qid), t80h->code); 378 376 ap_send_online_uevent(&zq->queue->ap_dev, zq->online); 379 377 return -EAGAIN; 380 378 } ··· 407 409 AP_QID_CARD(zq->queue->qid), 408 410 AP_QID_QUEUE(zq->queue->qid), 409 411 (int) rtype); 410 - ZCRYPT_DBF_ERR("dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 411 - AP_QID_CARD(zq->queue->qid), 412 - AP_QID_QUEUE(zq->queue->qid), 413 - (int) rtype); 412 + ZCRYPT_DBF_ERR( 413 + "%s dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 414 + __func__, AP_QID_CARD(zq->queue->qid), 415 + AP_QID_QUEUE(zq->queue->qid), (int) rtype); 414 416 ap_send_online_uevent(&zq->queue->ap_dev, zq->online); 415 417 return -EAGAIN; 416 418 }
+20 -20
drivers/s390/crypto/zcrypt_msgtype6.c
··· 649 649 (service_rc == 8 && service_rs == 72) || 650 650 (service_rc == 8 && service_rs == 770) || 651 651 (service_rc == 12 && service_rs == 769)) { 652 - ZCRYPT_DBF_WARN("dev=%02x.%04x rc/rs=%d/%d => rc=EINVAL\n", 653 - AP_QID_CARD(zq->queue->qid), 652 + ZCRYPT_DBF_WARN("%s dev=%02x.%04x rc/rs=%d/%d => rc=EINVAL\n", 653 + __func__, AP_QID_CARD(zq->queue->qid), 654 654 AP_QID_QUEUE(zq->queue->qid), 655 655 (int) service_rc, (int) service_rs); 656 656 return -EINVAL; ··· 660 660 AP_QID_CARD(zq->queue->qid), 661 661 AP_QID_QUEUE(zq->queue->qid), 662 662 (int) service_rc, (int) service_rs); 663 - ZCRYPT_DBF_ERR("dev=%02x.%04x rc/rs=%d/%d => online=0 rc=EAGAIN\n", 664 - AP_QID_CARD(zq->queue->qid), 663 + ZCRYPT_DBF_ERR("%s dev=%02x.%04x rc/rs=%d/%d => online=0 rc=EAGAIN\n", 664 + __func__, AP_QID_CARD(zq->queue->qid), 665 665 AP_QID_QUEUE(zq->queue->qid), 666 666 (int) service_rc, (int) service_rs); 667 667 ap_send_online_uevent(&zq->queue->ap_dev, zq->online); ··· 806 806 AP_QID_CARD(zq->queue->qid), 807 807 AP_QID_QUEUE(zq->queue->qid), 808 808 (int) msg->hdr.type); 809 - ZCRYPT_DBF_ERR("dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 810 - AP_QID_CARD(zq->queue->qid), 811 - AP_QID_QUEUE(zq->queue->qid), 812 - (int) msg->hdr.type); 809 + ZCRYPT_DBF_ERR( 810 + "%s dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 811 + __func__, AP_QID_CARD(zq->queue->qid), 812 + AP_QID_QUEUE(zq->queue->qid), (int) msg->hdr.type); 813 813 ap_send_online_uevent(&zq->queue->ap_dev, zq->online); 814 814 return -EAGAIN; 815 815 } ··· 841 841 AP_QID_CARD(zq->queue->qid), 842 842 AP_QID_QUEUE(zq->queue->qid), 843 843 (int) msg->hdr.type); 844 - ZCRYPT_DBF_ERR("dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 845 - AP_QID_CARD(zq->queue->qid), 846 - AP_QID_QUEUE(zq->queue->qid), 847 - (int) msg->hdr.type); 844 + ZCRYPT_DBF_ERR( 845 + "%s dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 846 + __func__, AP_QID_CARD(zq->queue->qid), 847 + AP_QID_QUEUE(zq->queue->qid), (int) msg->hdr.type); 848 848 ap_send_online_uevent(&zq->queue->ap_dev, zq->online); 849 849 return -EAGAIN; 850 850 } ··· 871 871 AP_QID_CARD(zq->queue->qid), 872 872 AP_QID_QUEUE(zq->queue->qid), 873 873 (int) msg->hdr.type); 874 - ZCRYPT_DBF_ERR("dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 875 - AP_QID_CARD(zq->queue->qid), 876 - AP_QID_QUEUE(zq->queue->qid), 877 - (int) msg->hdr.type); 874 + ZCRYPT_DBF_ERR( 875 + "%s dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 876 + __func__, AP_QID_CARD(zq->queue->qid), 877 + AP_QID_QUEUE(zq->queue->qid), (int) msg->hdr.type); 878 878 ap_send_online_uevent(&zq->queue->ap_dev, zq->online); 879 879 return -EAGAIN; 880 880 } ··· 902 902 AP_QID_CARD(zq->queue->qid), 903 903 AP_QID_QUEUE(zq->queue->qid), 904 904 (int) msg->hdr.type); 905 - ZCRYPT_DBF_ERR("dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 906 - AP_QID_CARD(zq->queue->qid), 907 - AP_QID_QUEUE(zq->queue->qid), 908 - (int) msg->hdr.type); 905 + ZCRYPT_DBF_ERR( 906 + "%s dev=%02x.%04x unknown response type 0x%02x => online=0 rc=EAGAIN\n", 907 + __func__, AP_QID_CARD(zq->queue->qid), 908 + AP_QID_QUEUE(zq->queue->qid), (int) msg->hdr.type); 909 909 ap_send_online_uevent(&zq->queue->ap_dev, zq->online); 910 910 return -EAGAIN; 911 911 }
+9 -8
drivers/s390/crypto/zcrypt_queue.c
··· 65 65 return -EINVAL; 66 66 zq->online = online; 67 67 68 - ZCRYPT_DBF(DBF_INFO, "queue=%02x.%04x online=%d\n", 69 - AP_QID_CARD(zq->queue->qid), 70 - AP_QID_QUEUE(zq->queue->qid), 71 - online); 68 + ZCRYPT_DBF_INFO("%s queue=%02x.%04x online=%d\n", 69 + __func__, AP_QID_CARD(zq->queue->qid), 70 + AP_QID_QUEUE(zq->queue->qid), online); 72 71 73 72 ap_send_online_uevent(&aq->ap_dev, online); 74 73 ··· 174 175 zq->zcard = zc; 175 176 zq->online = 1; /* New devices are online by default. */ 176 177 177 - ZCRYPT_DBF(DBF_INFO, "queue=%02x.%04x register online=1\n", 178 - AP_QID_CARD(zq->queue->qid), AP_QID_QUEUE(zq->queue->qid)); 178 + ZCRYPT_DBF_INFO("%s queue=%02x.%04x register online=1\n", 179 + __func__, AP_QID_CARD(zq->queue->qid), 180 + AP_QID_QUEUE(zq->queue->qid)); 179 181 180 182 list_add_tail(&zq->list, &zc->zqueues); 181 183 spin_unlock(&zcrypt_list_lock); ··· 215 215 { 216 216 struct zcrypt_card *zc; 217 217 218 - ZCRYPT_DBF(DBF_INFO, "queue=%02x.%04x unregister\n", 219 - AP_QID_CARD(zq->queue->qid), AP_QID_QUEUE(zq->queue->qid)); 218 + ZCRYPT_DBF_INFO("%s queue=%02x.%04x unregister\n", 219 + __func__, AP_QID_CARD(zq->queue->qid), 220 + AP_QID_QUEUE(zq->queue->qid)); 220 221 221 222 zc = zq->zcard; 222 223 spin_lock(&zcrypt_list_lock);