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
219 * scsw_is_tm - check for transport mode scsw
222 * Return non-zero if the specified scsw is a transport mode scsw, zero
227 return css_general_characteristics.fcx && (scsw->tm.x == 1); in scsw_is_tm()
231 * scsw_key - return scsw key field
240 return scsw->tm.key; in scsw_key()
242 return scsw->cmd.key; in scsw_key()
246 * scsw_eswf - return scsw eswf field
255 return scsw->tm.eswf; in scsw_eswf()
257 return scsw->cmd.eswf; in scsw_eswf()
261 * scsw_cc - return scsw cc field
270 return scsw->tm.cc; in scsw_cc()
272 return scsw->cmd.cc; in scsw_cc()
276 * scsw_ectl - return scsw ectl field
285 return scsw->tm.ectl; in scsw_ectl()
287 return scsw->cmd.ectl; in scsw_ectl()
291 * scsw_pno - return scsw pno field
300 return scsw->tm.pno; in scsw_pno()
302 return scsw->cmd.pno; in scsw_pno()
306 * scsw_fctl - return scsw fctl field
315 return scsw->tm.fctl; in scsw_fctl()
317 return scsw->cmd.fctl; in scsw_fctl()
321 * scsw_actl - return scsw actl field
330 return scsw->tm.actl; in scsw_actl()
332 return scsw->cmd.actl; in scsw_actl()
336 * scsw_stctl - return scsw stctl field
345 return scsw->tm.stctl; in scsw_stctl()
347 return scsw->cmd.stctl; in scsw_stctl()
351 * scsw_dstat - return scsw dstat field
360 return scsw->tm.dstat; in scsw_dstat()
362 return scsw->cmd.dstat; in scsw_dstat()
366 * scsw_cstat - return scsw cstat field
375 return scsw->tm.cstat; in scsw_cstat()
377 return scsw->cmd.cstat; in scsw_cstat()
381 * scsw_cmd_is_valid_key - check key field validity
384 * Return non-zero if the key field of the specified command mode scsw is
385 * valid, zero otherwise.
389 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_key()
393 * scsw_cmd_is_valid_sctl - check sctl field validity
396 * Return non-zero if the sctl field of the specified command mode scsw is
397 * valid, zero otherwise.
401 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_sctl()
405 * scsw_cmd_is_valid_eswf - check eswf field validity
408 * Return non-zero if the eswf field of the specified command mode scsw is
409 * valid, zero otherwise.
413 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND); in scsw_cmd_is_valid_eswf()
417 * scsw_cmd_is_valid_cc - check cc field validity
420 * Return non-zero if the cc field of the specified command mode scsw is
421 * valid, zero otherwise.
425 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) && in scsw_cmd_is_valid_cc()
426 (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND); in scsw_cmd_is_valid_cc()
430 * scsw_cmd_is_valid_fmt - check fmt field validity
433 * Return non-zero if the fmt field of the specified command mode scsw is
434 * valid, zero otherwise.
438 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_fmt()
442 * scsw_cmd_is_valid_pfch - check pfch field validity
445 * Return non-zero if the pfch field of the specified command mode scsw is
446 * valid, zero otherwise.
450 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_pfch()
454 * scsw_cmd_is_valid_isic - check isic field validity
457 * Return non-zero if the isic field of the specified command mode scsw is
458 * valid, zero otherwise.
462 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_isic()
466 * scsw_cmd_is_valid_alcc - check alcc field validity
469 * Return non-zero if the alcc field of the specified command mode scsw is
470 * valid, zero otherwise.
474 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_alcc()
478 * scsw_cmd_is_valid_ssi - check ssi field validity
481 * Return non-zero if the ssi field of the specified command mode scsw is
482 * valid, zero otherwise.
486 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC); in scsw_cmd_is_valid_ssi()
490 * scsw_cmd_is_valid_zcc - check zcc field validity
493 * Return non-zero if the zcc field of the specified command mode scsw is
494 * valid, zero otherwise.
498 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) && in scsw_cmd_is_valid_zcc()
499 (scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS); in scsw_cmd_is_valid_zcc()
503 * scsw_cmd_is_valid_ectl - check ectl field validity
506 * Return non-zero if the ectl field of the specified command mode scsw is
507 * valid, zero otherwise.
511 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_cmd_is_valid_ectl()
512 !(scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS) && in scsw_cmd_is_valid_ectl()
513 (scsw->cmd.stctl & SCSW_STCTL_ALERT_STATUS); in scsw_cmd_is_valid_ectl()
517 * scsw_cmd_is_valid_pno - check pno field validity
520 * Return non-zero if the pno field of the specified command mode scsw is
521 * valid, zero otherwise.
525 return (scsw->cmd.fctl != 0) && in scsw_cmd_is_valid_pno()
526 (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_cmd_is_valid_pno()
527 (!(scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS) || in scsw_cmd_is_valid_pno()
528 (scsw->cmd.actl & SCSW_ACTL_SUSPENDED)); in scsw_cmd_is_valid_pno()
532 * scsw_cmd_is_valid_fctl - check fctl field validity
535 * Return non-zero if the fctl field of the specified command mode scsw is
536 * valid, zero otherwise.
545 * scsw_cmd_is_valid_actl - check actl field validity
548 * Return non-zero if the actl field of the specified command mode scsw is
549 * valid, zero otherwise.
558 * scsw_cmd_is_valid_stctl - check stctl field validity
561 * Return non-zero if the stctl field of the specified command mode scsw is
562 * valid, zero otherwise.
571 * scsw_cmd_is_valid_dstat - check dstat field validity
574 * Return non-zero if the dstat field of the specified command mode scsw is
575 * valid, zero otherwise.
579 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_cmd_is_valid_dstat()
580 (scsw->cmd.cc != 3); in scsw_cmd_is_valid_dstat()
584 * scsw_cmd_is_valid_cstat - check cstat field validity
587 * Return non-zero if the cstat field of the specified command mode scsw is
588 * valid, zero otherwise.
592 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_cmd_is_valid_cstat()
593 (scsw->cmd.cc != 3); in scsw_cmd_is_valid_cstat()
597 * scsw_tm_is_valid_key - check key field validity
600 * Return non-zero if the key field of the specified transport mode scsw is
601 * valid, zero otherwise.
605 return (scsw->tm.fctl & SCSW_FCTL_START_FUNC); in scsw_tm_is_valid_key()
609 * scsw_tm_is_valid_eswf - check eswf field validity
612 * Return non-zero if the eswf field of the specified transport mode scsw is
613 * valid, zero otherwise.
617 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND); in scsw_tm_is_valid_eswf()
621 * scsw_tm_is_valid_cc - check cc field validity
624 * Return non-zero if the cc field of the specified transport mode scsw is
625 * valid, zero otherwise.
629 return (scsw->tm.fctl & SCSW_FCTL_START_FUNC) && in scsw_tm_is_valid_cc()
630 (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND); in scsw_tm_is_valid_cc()
634 * scsw_tm_is_valid_fmt - check fmt field validity
637 * Return non-zero if the fmt field of the specified transport mode scsw is
638 * valid, zero otherwise.
646 * scsw_tm_is_valid_x - check x field validity
649 * Return non-zero if the x field of the specified transport mode scsw is
650 * valid, zero otherwise.
658 * scsw_tm_is_valid_q - check q field validity
661 * Return non-zero if the q field of the specified transport mode scsw is
662 * valid, zero otherwise.
670 * scsw_tm_is_valid_ectl - check ectl field validity
673 * Return non-zero if the ectl field of the specified transport mode scsw is
674 * valid, zero otherwise.
678 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_tm_is_valid_ectl()
679 !(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) && in scsw_tm_is_valid_ectl()
680 (scsw->tm.stctl & SCSW_STCTL_ALERT_STATUS); in scsw_tm_is_valid_ectl()
684 * scsw_tm_is_valid_pno - check pno field validity
687 * Return non-zero if the pno field of the specified transport mode scsw is
688 * valid, zero otherwise.
692 return (scsw->tm.fctl != 0) && in scsw_tm_is_valid_pno()
693 (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_tm_is_valid_pno()
694 (!(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) || in scsw_tm_is_valid_pno()
695 ((scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) && in scsw_tm_is_valid_pno()
696 (scsw->tm.actl & SCSW_ACTL_SUSPENDED))); in scsw_tm_is_valid_pno()
700 * scsw_tm_is_valid_fctl - check fctl field validity
703 * Return non-zero if the fctl field of the specified transport mode scsw is
704 * valid, zero otherwise.
713 * scsw_tm_is_valid_actl - check actl field validity
716 * Return non-zero if the actl field of the specified transport mode scsw is
717 * valid, zero otherwise.
726 * scsw_tm_is_valid_stctl - check stctl field validity
729 * Return non-zero if the stctl field of the specified transport mode scsw is
730 * valid, zero otherwise.
739 * scsw_tm_is_valid_dstat - check dstat field validity
742 * Return non-zero if the dstat field of the specified transport mode scsw is
743 * valid, zero otherwise.
747 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_tm_is_valid_dstat()
748 (scsw->tm.cc != 3); in scsw_tm_is_valid_dstat()
752 * scsw_tm_is_valid_cstat - check cstat field validity
755 * Return non-zero if the cstat field of the specified transport mode scsw is
756 * valid, zero otherwise.
760 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && in scsw_tm_is_valid_cstat()
761 (scsw->tm.cc != 3); in scsw_tm_is_valid_cstat()
765 * scsw_tm_is_valid_fcxs - check fcxs field validity
768 * Return non-zero if the fcxs field of the specified transport mode scsw is
769 * valid, zero otherwise.
777 * scsw_tm_is_valid_schxs - check schxs field validity
780 * Return non-zero if the schxs field of the specified transport mode scsw is
781 * valid, zero otherwise.
785 return (scsw->tm.cstat & (SCHN_STAT_PROG_CHECK | in scsw_tm_is_valid_schxs()
792 * scsw_is_valid_actl - check actl field validity
795 * Return non-zero if the actl field of the specified scsw is valid,
797 * Return zero if the field does not contain a valid value.
808 * scsw_is_valid_cc - check cc field validity
811 * Return non-zero if the cc field of the specified scsw is valid,
813 * Return zero if the field does not contain a valid value.
824 * scsw_is_valid_cstat - check cstat field validity
827 * Return non-zero if the cstat field of the specified scsw is valid,
829 * Return zero if the field does not contain a valid value.
840 * scsw_is_valid_dstat - check dstat field validity
843 * Return non-zero if the dstat field of the specified scsw is valid,
845 * Return zero if the field does not contain a valid value.
856 * scsw_is_valid_ectl - check ectl field validity
859 * Return non-zero if the ectl field of the specified scsw is valid,
861 * Return zero if the field does not contain a valid value.
872 * scsw_is_valid_eswf - check eswf field validity
875 * Return non-zero if the eswf field of the specified scsw is valid,
877 * Return zero if the field does not contain a valid value.
888 * scsw_is_valid_fctl - check fctl field validity
891 * Return non-zero if the fctl field of the specified scsw is valid,
893 * Return zero if the field does not contain a valid value.
904 * scsw_is_valid_key - check key field validity
907 * Return non-zero if the key field of the specified scsw is valid,
909 * Return zero if the field does not contain a valid value.
920 * scsw_is_valid_pno - check pno field validity
923 * Return non-zero if the pno field of the specified scsw is valid,
925 * Return zero if the field does not contain a valid value.
936 * scsw_is_valid_stctl - check stctl field validity
939 * Return non-zero if the stctl field of the specified scsw is valid,
941 * Return zero if the field does not contain a valid value.
952 * scsw_cmd_is_solicited - check for solicited scsw
955 * Return non-zero if the command mode scsw indicates that the associated
956 * status condition is solicited, zero if it is unsolicited.
960 return (scsw->cmd.cc != 0) || (scsw->cmd.stctl != in scsw_cmd_is_solicited()
965 * scsw_tm_is_solicited - check for solicited scsw
968 * Return non-zero if the transport mode scsw indicates that the associated
969 * status condition is solicited, zero if it is unsolicited.
973 return (scsw->tm.cc != 0) || (scsw->tm.stctl != in scsw_tm_is_solicited()
978 * scsw_is_solicited - check for solicited scsw
981 * Return non-zero if the transport or command mode scsw indicates that the
982 * associated status condition is solicited, zero if it is unsolicited.