Lines Matching +full:non +full:- +full:zero

1 /* SPDX-License-Identifier: GPL-2.0 */
17 * struct cmd_scsw - command-mode subchannel status word
24 * @isic: initial-status interruption control
25 * @alcc: address-limit checking control
26 * @ssi: suppress-suspended interruption
27 * @zcc: zero condition code
63 * struct tm_scsw - transport-mode subchannel status word
68 * @x: IRB-format control
69 * @q: interrogate-complete
79 * @schxs: subchannel-extended status
105 * struct eadm_scsw - subchannel status word for eadm subchannels
135 * union scsw - subchannel status word
136 * @cmd: command-mode SCSW
137 * @tm: transport-mode SCSW
224 * scsw_is_tm - check for transport mode scsw
227 * Return non-zero if the specified scsw is a transport mode scsw, zero
232 return css_general_characteristics.fcx && (scsw->tm.x == 1); in scsw_is_tm()
236 * scsw_key - return scsw key field
245 return scsw->tm.key; in scsw_key()
247 return scsw->cmd.key; in scsw_key()
251 * scsw_eswf - return scsw eswf field
260 return scsw->tm.eswf; in scsw_eswf()
262 return scsw->cmd.eswf; in scsw_eswf()
266 * scsw_cc - return scsw cc field
275 return scsw->tm.cc; in scsw_cc()
277 return scsw->cmd.cc; in scsw_cc()
281 * scsw_ectl - return scsw ectl field
290 return scsw->tm.ectl; in scsw_ectl()
292 return scsw->cmd.ectl; in scsw_ectl()
296 * scsw_pno - return scsw pno field
305 return scsw->tm.pno; in scsw_pno()
307 return scsw->cmd.pno; in scsw_pno()
311 * scsw_fctl - return scsw fctl field
320 return scsw->tm.fctl; in scsw_fctl()
322 return scsw->cmd.fctl; in scsw_fctl()
326 * scsw_actl - return scsw actl field
335 return scsw->tm.actl; in scsw_actl()
337 return scsw->cmd.actl; in scsw_actl()
341 * scsw_stctl - return scsw stctl field
350 return scsw->tm.stctl; in scsw_stctl()
352 return scsw->cmd.stctl; in scsw_stctl()
356 * scsw_dstat - return scsw dstat field
365 return scsw->tm.dstat; in scsw_dstat()
367 return scsw->cmd.dstat; in scsw_dstat()
371 * scsw_cstat - return scsw cstat field
380 return scsw->tm.cstat; in scsw_cstat()
382 return scsw->cmd.cstat; in scsw_cstat()
386 * scsw_cmd_is_valid_key - check key field validity
389 * Return non-zero if the key field of the specified command mode scsw is
390 * valid, zero otherwise.
394 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_key()
398 * scsw_cmd_is_valid_sctl - check sctl field validity
401 * Return non-zero if the sctl field of the specified command mode scsw is
402 * valid, zero otherwise.
406 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_sctl()
410 * scsw_cmd_is_valid_eswf - check eswf field validity
413 * Return non-zero if the eswf field of the specified command mode scsw is
414 * valid, zero otherwise.
418 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND); in scsw_cmd_is_valid_eswf()
422 * scsw_cmd_is_valid_cc - check cc field validity
425 * Return non-zero if the cc field of the specified command mode scsw is
426 * valid, zero otherwise.
430 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) && in scsw_cmd_is_valid_cc()
431 (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND); in scsw_cmd_is_valid_cc()
435 * scsw_cmd_is_valid_fmt - check fmt field validity
438 * Return non-zero if the fmt field of the specified command mode scsw is
439 * valid, zero otherwise.
443 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_fmt()
447 * scsw_cmd_is_valid_pfch - check pfch field validity
450 * Return non-zero if the pfch field of the specified command mode scsw is
451 * valid, zero otherwise.
455 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_pfch()
459 * scsw_cmd_is_valid_isic - check isic field validity
462 * Return non-zero if the isic field of the specified command mode scsw is
463 * valid, zero otherwise.
467 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_isic()
471 * scsw_cmd_is_valid_alcc - check alcc field validity
474 * Return non-zero if the alcc field of the specified command mode scsw is
475 * valid, zero otherwise.
479 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_alcc()
483 * scsw_cmd_is_valid_ssi - check ssi field validity
486 * Return non-zero if the ssi field of the specified command mode scsw is
487 * valid, zero otherwise.
491 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_ssi()
495 * scsw_cmd_is_valid_zcc - check zcc field validity
498 * Return non-zero if the zcc field of the specified command mode scsw is
499 * valid, zero otherwise.
503 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) && in scsw_cmd_is_valid_zcc()
504 (scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS); in scsw_cmd_is_valid_zcc()
508 * scsw_cmd_is_valid_ectl - check ectl field validity
511 * Return non-zero if the ectl field of the specified command mode scsw is
512 * valid, zero otherwise.
517 if (!(scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND)) in scsw_cmd_is_valid_ectl()
521 if (!(scsw->cmd.stctl & SCSW_STCTL_ALERT_STATUS)) in scsw_cmd_is_valid_ectl()
527 if (scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS) in scsw_cmd_is_valid_ectl()
534 * scsw_cmd_is_valid_pno - check pno field validity
537 * Return non-zero if the pno field of the specified command mode scsw is
538 * valid, zero otherwise.
543 if (!scsw->cmd.fctl) in scsw_cmd_is_valid_pno()
547 if (!(scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND)) in scsw_cmd_is_valid_pno()
553 if (!(scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS)) in scsw_cmd_is_valid_pno()
557 if (scsw->cmd.actl & SCSW_ACTL_SUSPENDED) in scsw_cmd_is_valid_pno()
564 * scsw_cmd_is_valid_fctl - check fctl field validity
567 * Return non-zero if the fctl field of the specified command mode scsw is
568 * valid, zero otherwise.
577 * scsw_cmd_is_valid_actl - check actl field validity
580 * Return non-zero if the actl field of the specified command mode scsw is
581 * valid, zero otherwise.
590 * scsw_cmd_is_valid_stctl - check stctl field validity
593 * Return non-zero if the stctl field of the specified command mode scsw is
594 * valid, zero otherwise.
603 * scsw_cmd_is_valid_dstat - check dstat field validity
606 * Return non-zero if the dstat field of the specified command mode scsw is
607 * valid, zero otherwise.
611 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_cmd_is_valid_dstat()
612 (scsw->cmd.cc != 3); in scsw_cmd_is_valid_dstat()
616 * scsw_cmd_is_valid_cstat - check cstat field validity
619 * Return non-zero if the cstat field of the specified command mode scsw is
620 * valid, zero otherwise.
624 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_cmd_is_valid_cstat()
625 (scsw->cmd.cc != 3); in scsw_cmd_is_valid_cstat()
629 * scsw_tm_is_valid_key - check key field validity
632 * Return non-zero if the key field of the specified transport mode scsw is
633 * valid, zero otherwise.
637 return (scsw->tm.fctl & SCSW_FCTL_START_FUNC); in scsw_tm_is_valid_key()
641 * scsw_tm_is_valid_eswf - check eswf field validity
644 * Return non-zero if the eswf field of the specified transport mode scsw is
645 * valid, zero otherwise.
649 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND); in scsw_tm_is_valid_eswf()
653 * scsw_tm_is_valid_cc - check cc field validity
656 * Return non-zero if the cc field of the specified transport mode scsw is
657 * valid, zero otherwise.
661 return (scsw->tm.fctl & SCSW_FCTL_START_FUNC) && in scsw_tm_is_valid_cc()
662 (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND); in scsw_tm_is_valid_cc()
666 * scsw_tm_is_valid_fmt - check fmt field validity
669 * Return non-zero if the fmt field of the specified transport mode scsw is
670 * valid, zero otherwise.
678 * scsw_tm_is_valid_x - check x field validity
681 * Return non-zero if the x field of the specified transport mode scsw is
682 * valid, zero otherwise.
690 * scsw_tm_is_valid_q - check q field validity
693 * Return non-zero if the q field of the specified transport mode scsw is
694 * valid, zero otherwise.
702 * scsw_tm_is_valid_ectl - check ectl field validity
705 * Return non-zero if the ectl field of the specified transport mode scsw is
706 * valid, zero otherwise.
711 if (!(scsw->tm.stctl & SCSW_STCTL_STATUS_PEND)) in scsw_tm_is_valid_ectl()
715 if (!(scsw->tm.stctl & SCSW_STCTL_ALERT_STATUS)) in scsw_tm_is_valid_ectl()
721 if (scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) in scsw_tm_is_valid_ectl()
728 * scsw_tm_is_valid_pno - check pno field validity
731 * Return non-zero if the pno field of the specified transport mode scsw is
732 * valid, zero otherwise.
737 if (!scsw->tm.fctl) in scsw_tm_is_valid_pno()
741 if (!(scsw->tm.stctl & SCSW_STCTL_STATUS_PEND)) in scsw_tm_is_valid_pno()
747 if (!(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS)) in scsw_tm_is_valid_pno()
751 if (scsw->tm.actl & SCSW_ACTL_SUSPENDED) in scsw_tm_is_valid_pno()
758 * scsw_tm_is_valid_fctl - check fctl field validity
761 * Return non-zero if the fctl field of the specified transport mode scsw is
762 * valid, zero otherwise.
771 * scsw_tm_is_valid_actl - check actl field validity
774 * Return non-zero if the actl field of the specified transport mode scsw is
775 * valid, zero otherwise.
784 * scsw_tm_is_valid_stctl - check stctl field validity
787 * Return non-zero if the stctl field of the specified transport mode scsw is
788 * valid, zero otherwise.
797 * scsw_tm_is_valid_dstat - check dstat field validity
800 * Return non-zero if the dstat field of the specified transport mode scsw is
801 * valid, zero otherwise.
805 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_tm_is_valid_dstat()
806 (scsw->tm.cc != 3); in scsw_tm_is_valid_dstat()
810 * scsw_tm_is_valid_cstat - check cstat field validity
813 * Return non-zero if the cstat field of the specified transport mode scsw is
814 * valid, zero otherwise.
818 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_tm_is_valid_cstat()
819 (scsw->tm.cc != 3); in scsw_tm_is_valid_cstat()
823 * scsw_tm_is_valid_fcxs - check fcxs field validity
826 * Return non-zero if the fcxs field of the specified transport mode scsw is
827 * valid, zero otherwise.
835 * scsw_tm_is_valid_schxs - check schxs field validity
838 * Return non-zero if the schxs field of the specified transport mode scsw is
839 * valid, zero otherwise.
843 return (scsw->tm.cstat & (SCHN_STAT_PROG_CHECK | in scsw_tm_is_valid_schxs()
850 * scsw_is_valid_actl - check actl field validity
853 * Return non-zero if the actl field of the specified scsw is valid,
855 * Return zero if the field does not contain a valid value.
866 * scsw_is_valid_cc - check cc field validity
869 * Return non-zero if the cc field of the specified scsw is valid,
871 * Return zero if the field does not contain a valid value.
882 * scsw_is_valid_cstat - check cstat field validity
885 * Return non-zero if the cstat field of the specified scsw is valid,
887 * Return zero if the field does not contain a valid value.
898 * scsw_is_valid_dstat - check dstat field validity
901 * Return non-zero if the dstat field of the specified scsw is valid,
903 * Return zero if the field does not contain a valid value.
914 * scsw_is_valid_ectl - check ectl field validity
917 * Return non-zero if the ectl field of the specified scsw is valid,
919 * Return zero if the field does not contain a valid value.
930 * scsw_is_valid_eswf - check eswf field validity
933 * Return non-zero if the eswf field of the specified scsw is valid,
935 * Return zero if the field does not contain a valid value.
946 * scsw_is_valid_fctl - check fctl field validity
949 * Return non-zero if the fctl field of the specified scsw is valid,
951 * Return zero if the field does not contain a valid value.
962 * scsw_is_valid_key - check key field validity
965 * Return non-zero if the key field of the specified scsw is valid,
967 * Return zero if the field does not contain a valid value.
978 * scsw_is_valid_pno - check pno field validity
981 * Return non-zero if the pno field of the specified scsw is valid,
983 * Return zero if the field does not contain a valid value.
994 * scsw_is_valid_stctl - check stctl field validity
997 * Return non-zero if the stctl field of the specified scsw is valid,
999 * Return zero if the field does not contain a valid value.
1010 * scsw_cmd_is_solicited - check for solicited scsw
1013 * Return non-zero if the command mode scsw indicates that the associated
1014 * status condition is solicited, zero if it is unsolicited.
1018 return (scsw->cmd.cc != 0) || (scsw->cmd.stctl != in scsw_cmd_is_solicited()
1023 * scsw_tm_is_solicited - check for solicited scsw
1026 * Return non-zero if the transport mode scsw indicates that the associated
1027 * status condition is solicited, zero if it is unsolicited.
1031 return (scsw->tm.cc != 0) || (scsw->tm.stctl != in scsw_tm_is_solicited()
1036 * scsw_is_solicited - check for solicited scsw
1039 * Return non-zero if the transport or command mode scsw indicates that the
1040 * associated status condition is solicited, zero if it is unsolicited.