• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/arch/s390/include/asm/

Lines Matching refs:scsw

2  *  Helper functions for scsw access.
103 * union scsw - subchannel status word
107 union scsw {
182 * scsw_is_tm - check for transport mode scsw
183 * @scsw: pointer to scsw
185 * Return non-zero if the specified scsw is a transport mode scsw, zero
188 static inline int scsw_is_tm(union scsw *scsw)
190 return css_general_characteristics.fcx && (scsw->tm.x == 1);
194 * scsw_key - return scsw key field
195 * @scsw: pointer to scsw
197 * Return the value of the key field of the specified scsw, regardless of
198 * whether it is a transport mode or command mode scsw.
200 static inline u32 scsw_key(union scsw *scsw)
202 if (scsw_is_tm(scsw))
203 return scsw->tm.key;
205 return scsw->cmd.key;
209 * scsw_eswf - return scsw eswf field
210 * @scsw: pointer to scsw
212 * Return the value of the eswf field of the specified scsw, regardless of
213 * whether it is a transport mode or command mode scsw.
215 static inline u32 scsw_eswf(union scsw *scsw)
217 if (scsw_is_tm(scsw))
218 return scsw->tm.eswf;
220 return scsw->cmd.eswf;
224 * scsw_cc - return scsw cc field
225 * @scsw: pointer to scsw
227 * Return the value of the cc field of the specified scsw, regardless of
228 * whether it is a transport mode or command mode scsw.
230 static inline u32 scsw_cc(union scsw *scsw)
232 if (scsw_is_tm(scsw))
233 return scsw->tm.cc;
235 return scsw->cmd.cc;
239 * scsw_ectl - return scsw ectl field
240 * @scsw: pointer to scsw
242 * Return the value of the ectl field of the specified scsw, regardless of
243 * whether it is a transport mode or command mode scsw.
245 static inline u32 scsw_ectl(union scsw *scsw)
247 if (scsw_is_tm(scsw))
248 return scsw->tm.ectl;
250 return scsw->cmd.ectl;
254 * scsw_pno - return scsw pno field
255 * @scsw: pointer to scsw
257 * Return the value of the pno field of the specified scsw, regardless of
258 * whether it is a transport mode or command mode scsw.
260 static inline u32 scsw_pno(union scsw *scsw)
262 if (scsw_is_tm(scsw))
263 return scsw->tm.pno;
265 return scsw->cmd.pno;
269 * scsw_fctl - return scsw fctl field
270 * @scsw: pointer to scsw
272 * Return the value of the fctl field of the specified scsw, regardless of
273 * whether it is a transport mode or command mode scsw.
275 static inline u32 scsw_fctl(union scsw *scsw)
277 if (scsw_is_tm(scsw))
278 return scsw->tm.fctl;
280 return scsw->cmd.fctl;
284 * scsw_actl - return scsw actl field
285 * @scsw: pointer to scsw
287 * Return the value of the actl field of the specified scsw, regardless of
288 * whether it is a transport mode or command mode scsw.
290 static inline u32 scsw_actl(union scsw *scsw)
292 if (scsw_is_tm(scsw))
293 return scsw->tm.actl;
295 return scsw->cmd.actl;
299 * scsw_stctl - return scsw stctl field
300 * @scsw: pointer to scsw
302 * Return the value of the stctl field of the specified scsw, regardless of
303 * whether it is a transport mode or command mode scsw.
305 static inline u32 scsw_stctl(union scsw *scsw)
307 if (scsw_is_tm(scsw))
308 return scsw->tm.stctl;
310 return scsw->cmd.stctl;
314 * scsw_dstat - return scsw dstat field
315 * @scsw: pointer to scsw
317 * Return the value of the dstat field of the specified scsw, regardless of
318 * whether it is a transport mode or command mode scsw.
320 static inline u32 scsw_dstat(union scsw *scsw)
322 if (scsw_is_tm(scsw))
323 return scsw->tm.dstat;
325 return scsw->cmd.dstat;
329 * scsw_cstat - return scsw cstat field
330 * @scsw: pointer to scsw
332 * Return the value of the cstat field of the specified scsw, regardless of
333 * whether it is a transport mode or command mode scsw.
335 static inline u32 scsw_cstat(union scsw *scsw)
337 if (scsw_is_tm(scsw))
338 return scsw->tm.cstat;
340 return scsw->cmd.cstat;
345 * @scsw: pointer to scsw
347 * Return non-zero if the key field of the specified command mode scsw is
350 static inline int scsw_cmd_is_valid_key(union scsw *scsw)
352 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC);
357 * @scsw: pointer to scsw
359 * Return non-zero if the fctl field of the specified command mode scsw is
362 static inline int scsw_cmd_is_valid_sctl(union scsw *scsw)
364 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC);
369 * @scsw: pointer to scsw
371 * Return non-zero if the eswf field of the specified command mode scsw is
374 static inline int scsw_cmd_is_valid_eswf(union scsw *scsw)
376 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND);
381 * @scsw: pointer to scsw
383 * Return non-zero if the cc field of the specified command mode scsw is
386 static inline int scsw_cmd_is_valid_cc(union scsw *scsw)
388 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) &&
389 (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND);
394 * @scsw: pointer to scsw
396 * Return non-zero if the fmt field of the specified command mode scsw is
399 static inline int scsw_cmd_is_valid_fmt(union scsw *scsw)
401 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC);
406 * @scsw: pointer to scsw
408 * Return non-zero if the pfch field of the specified command mode scsw is
411 static inline int scsw_cmd_is_valid_pfch(union scsw *scsw)
413 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC);
418 * @scsw: pointer to scsw
420 * Return non-zero if the isic field of the specified command mode scsw is
423 static inline int scsw_cmd_is_valid_isic(union scsw *scsw)
425 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC);
430 * @scsw: pointer to scsw
432 * Return non-zero if the alcc field of the specified command mode scsw is
435 static inline int scsw_cmd_is_valid_alcc(union scsw *scsw)
437 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC);
442 * @scsw: pointer to scsw
444 * Return non-zero if the ssi field of the specified command mode scsw is
447 static inline int scsw_cmd_is_valid_ssi(union scsw *scsw)
449 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC);
454 * @scsw: pointer to scsw
456 * Return non-zero if the zcc field of the specified command mode scsw is
459 static inline int scsw_cmd_is_valid_zcc(union scsw *scsw)
461 return (scsw->cmd.fctl & SCSW_FCTL_START_FUNC) &&
462 (scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS);
467 * @scsw: pointer to scsw
469 * Return non-zero if the ectl field of the specified command mode scsw is
472 static inline int scsw_cmd_is_valid_ectl(union scsw *scsw)
474 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) &&
475 !(scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS) &&
476 (scsw->cmd.stctl & SCSW_STCTL_ALERT_STATUS);
481 * @scsw: pointer to scsw
483 * Return non-zero if the pno field of the specified command mode scsw is
486 static inline int scsw_cmd_is_valid_pno(union scsw *scsw)
488 return (scsw->cmd.fctl != 0) &&
489 (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) &&
490 (!(scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS) ||
491 ((scsw->cmd.stctl & SCSW_STCTL_INTER_STATUS) &&
492 (scsw->cmd.actl & SCSW_ACTL_SUSPENDED)));
497 * @scsw: pointer to scsw
499 * Return non-zero if the fctl field of the specified command mode scsw is
502 static inline int scsw_cmd_is_valid_fctl(union scsw *scsw)
510 * @scsw: pointer to scsw
512 * Return non-zero if the actl field of the specified command mode scsw is
515 static inline int scsw_cmd_is_valid_actl(union scsw *scsw)
523 * @scsw: pointer to scsw
525 * Return non-zero if the stctl field of the specified command mode scsw is
528 static inline int scsw_cmd_is_valid_stctl(union scsw *scsw)
536 * @scsw: pointer to scsw
538 * Return non-zero if the dstat field of the specified command mode scsw is
541 static inline int scsw_cmd_is_valid_dstat(union scsw *scsw)
543 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) &&
544 (scsw->cmd.cc != 3);
549 * @scsw: pointer to scsw
551 * Return non-zero if the cstat field of the specified command mode scsw is
554 static inline int scsw_cmd_is_valid_cstat(union scsw *scsw)
556 return (scsw->cmd.stctl & SCSW_STCTL_STATUS_PEND) &&
557 (scsw->cmd.cc != 3);
562 * @scsw: pointer to scsw
564 * Return non-zero if the key field of the specified transport mode scsw is
567 static inline int scsw_tm_is_valid_key(union scsw *scsw)
569 return (scsw->tm.fctl & SCSW_FCTL_START_FUNC);
574 * @scsw: pointer to scsw
576 * Return non-zero if the eswf field of the specified transport mode scsw is
579 static inline int scsw_tm_is_valid_eswf(union scsw *scsw)
581 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND);
586 * @scsw: pointer to scsw
588 * Return non-zero if the cc field of the specified transport mode scsw is
591 static inline int scsw_tm_is_valid_cc(union scsw *scsw)
593 return (scsw->tm.fctl & SCSW_FCTL_START_FUNC) &&
594 (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND);
599 * @scsw: pointer to scsw
601 * Return non-zero if the fmt field of the specified transport mode scsw is
604 static inline int scsw_tm_is_valid_fmt(union scsw *scsw)
611 * @scsw: pointer to scsw
613 * Return non-zero if the x field of the specified transport mode scsw is
616 static inline int scsw_tm_is_valid_x(union scsw *scsw)
623 * @scsw: pointer to scsw
625 * Return non-zero if the q field of the specified transport mode scsw is
628 static inline int scsw_tm_is_valid_q(union scsw *scsw)
635 * @scsw: pointer to scsw
637 * Return non-zero if the ectl field of the specified transport mode scsw is
640 static inline int scsw_tm_is_valid_ectl(union scsw *scsw)
642 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) &&
643 !(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) &&
644 (scsw->tm.stctl & SCSW_STCTL_ALERT_STATUS);
649 * @scsw: pointer to scsw
651 * Return non-zero if the pno field of the specified transport mode scsw is
654 static inline int scsw_tm_is_valid_pno(union scsw *scsw)
656 return (scsw->tm.fctl != 0) &&
657 (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) &&
658 (!(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) ||
659 ((scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) &&
660 (scsw->tm.actl & SCSW_ACTL_SUSPENDED)));
665 * @scsw: pointer to scsw
667 * Return non-zero if the fctl field of the specified transport mode scsw is
670 static inline int scsw_tm_is_valid_fctl(union scsw *scsw)
678 * @scsw: pointer to scsw
680 * Return non-zero if the actl field of the specified transport mode scsw is
683 static inline int scsw_tm_is_valid_actl(union scsw *scsw)
691 * @scsw: pointer to scsw
693 * Return non-zero if the stctl field of the specified transport mode scsw is
696 static inline int scsw_tm_is_valid_stctl(union scsw *scsw)
704 * @scsw: pointer to scsw
706 * Return non-zero if the dstat field of the specified transport mode scsw is
709 static inline int scsw_tm_is_valid_dstat(union scsw *scsw)
711 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) &&
712 (scsw->tm.cc != 3);
717 * @scsw: pointer to scsw
719 * Return non-zero if the cstat field of the specified transport mode scsw is
722 static inline int scsw_tm_is_valid_cstat(union scsw *scsw)
724 return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) &&
725 (scsw->tm.cc != 3);
730 * @scsw: pointer to scsw
732 * Return non-zero if the fcxs field of the specified transport mode scsw is
735 static inline int scsw_tm_is_valid_fcxs(union scsw *scsw)
742 * @scsw: pointer to scsw
744 * Return non-zero if the schxs field of the specified transport mode scsw is
747 static inline int scsw_tm_is_valid_schxs(union scsw *scsw)
749 return (scsw->tm.cstat & (SCHN_STAT_PROG_CHECK |
757 * @scsw: pointer to scsw
759 * Return non-zero if the actl field of the specified scsw is valid,
760 * regardless of whether it is a transport mode or command mode scsw.
763 static inline int scsw_is_valid_actl(union scsw *scsw)
765 if (scsw_is_tm(scsw))
766 return scsw_tm_is_valid_actl(scsw);
768 return scsw_cmd_is_valid_actl(scsw);
773 * @scsw: pointer to scsw
775 * Return non-zero if the cc field of the specified scsw is valid,
776 * regardless of whether it is a transport mode or command mode scsw.
779 static inline int scsw_is_valid_cc(union scsw *scsw)
781 if (scsw_is_tm(scsw))
782 return scsw_tm_is_valid_cc(scsw);
784 return scsw_cmd_is_valid_cc(scsw);
789 * @scsw: pointer to scsw
791 * Return non-zero if the cstat field of the specified scsw is valid,
792 * regardless of whether it is a transport mode or command mode scsw.
795 static inline int scsw_is_valid_cstat(union scsw *scsw)
797 if (scsw_is_tm(scsw))
798 return scsw_tm_is_valid_cstat(scsw);
800 return scsw_cmd_is_valid_cstat(scsw);
805 * @scsw: pointer to scsw
807 * Return non-zero if the dstat field of the specified scsw is valid,
808 * regardless of whether it is a transport mode or command mode scsw.
811 static inline int scsw_is_valid_dstat(union scsw *scsw)
813 if (scsw_is_tm(scsw))
814 return scsw_tm_is_valid_dstat(scsw);
816 return scsw_cmd_is_valid_dstat(scsw);
821 * @scsw: pointer to scsw
823 * Return non-zero if the ectl field of the specified scsw is valid,
824 * regardless of whether it is a transport mode or command mode scsw.
827 static inline int scsw_is_valid_ectl(union scsw *scsw)
829 if (scsw_is_tm(scsw))
830 return scsw_tm_is_valid_ectl(scsw);
832 return scsw_cmd_is_valid_ectl(scsw);
837 * @scsw: pointer to scsw
839 * Return non-zero if the eswf field of the specified scsw is valid,
840 * regardless of whether it is a transport mode or command mode scsw.
843 static inline int scsw_is_valid_eswf(union scsw *scsw)
845 if (scsw_is_tm(scsw))
846 return scsw_tm_is_valid_eswf(scsw);
848 return scsw_cmd_is_valid_eswf(scsw);
853 * @scsw: pointer to scsw
855 * Return non-zero if the fctl field of the specified scsw is valid,
856 * regardless of whether it is a transport mode or command mode scsw.
859 static inline int scsw_is_valid_fctl(union scsw *scsw)
861 if (scsw_is_tm(scsw))
862 return scsw_tm_is_valid_fctl(scsw);
864 return scsw_cmd_is_valid_fctl(scsw);
869 * @scsw: pointer to scsw
871 * Return non-zero if the key field of the specified scsw is valid,
872 * regardless of whether it is a transport mode or command mode scsw.
875 static inline int scsw_is_valid_key(union scsw *scsw)
877 if (scsw_is_tm(scsw))
878 return scsw_tm_is_valid_key(scsw);
880 return scsw_cmd_is_valid_key(scsw);
885 * @scsw: pointer to scsw
887 * Return non-zero if the pno field of the specified scsw is valid,
888 * regardless of whether it is a transport mode or command mode scsw.
891 static inline int scsw_is_valid_pno(union scsw *scsw)
893 if (scsw_is_tm(scsw))
894 return scsw_tm_is_valid_pno(scsw);
896 return scsw_cmd_is_valid_pno(scsw);
901 * @scsw: pointer to scsw
903 * Return non-zero if the stctl field of the specified scsw is valid,
904 * regardless of whether it is a transport mode or command mode scsw.
907 static inline int scsw_is_valid_stctl(union scsw *scsw)
909 if (scsw_is_tm(scsw))
910 return scsw_tm_is_valid_stctl(scsw);
912 return scsw_cmd_is_valid_stctl(scsw);
916 * scsw_cmd_is_solicited - check for solicited scsw
917 * @scsw: pointer to scsw
919 * Return non-zero if the command mode scsw indicates that the associated
922 static inline int scsw_cmd_is_solicited(union scsw *scsw)
924 return (scsw->cmd.cc != 0) || (scsw->cmd.stctl !=
929 * scsw_tm_is_solicited - check for solicited scsw
930 * @scsw: pointer to scsw
932 * Return non-zero if the transport mode scsw indicates that the associated
935 static inline int scsw_tm_is_solicited(union scsw *scsw)
937 return (scsw->tm.cc != 0) || (scsw->tm.stctl !=
942 * scsw_is_solicited - check for solicited scsw
943 * @scsw: pointer to scsw
945 * Return non-zero if the transport or command mode scsw indicates that the
948 static inline int scsw_is_solicited(union scsw *scsw)
950 if (scsw_is_tm(scsw))
951 return scsw_tm_is_solicited(scsw);
953 return scsw_cmd_is_solicited(scsw);