aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/capi/capidrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/capi/capidrv.c')
-rw-r--r--drivers/isdn/capi/capidrv.c195
1 files changed, 195 insertions, 0 deletions
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
index cc9f1927a322..fd6d28f3fc36 100644
--- a/drivers/isdn/capi/capidrv.c
+++ b/drivers/isdn/capi/capidrv.c
@@ -763,6 +763,201 @@ static inline int new_bchan(capidrv_contr *card)
763} 763}
764 764
765/* ------------------------------------------------------------------- */ 765/* ------------------------------------------------------------------- */
766static char *capi_info2str(u16 reason)
767{
768#ifndef CONFIG_ISDN_CAPI_CAPIDRV_VERBOSE
769 return "..";
770#else
771 switch (reason) {
772
773/*-- informative values (corresponding message was processed) -----*/
774 case 0x0001:
775 return "NCPI not supported by current protocol, NCPI ignored";
776 case 0x0002:
777 return "Flags not supported by current protocol, flags ignored";
778 case 0x0003:
779 return "Alert already sent by another application";
780
781/*-- error information concerning CAPI_REGISTER -----*/
782 case 0x1001:
783 return "Too many applications";
784 case 0x1002:
785 return "Logical block size too small, must be at least 128 Bytes";
786 case 0x1003:
787 return "Buffer exceeds 64 kByte";
788 case 0x1004:
789 return "Message buffer size too small, must be at least 1024 Bytes";
790 case 0x1005:
791 return "Max. number of logical connections not supported";
792 case 0x1006:
793 return "Reserved";
794 case 0x1007:
795 return "The message could not be accepted because of an internal busy condition";
796 case 0x1008:
797 return "OS resource error (no memory ?)";
798 case 0x1009:
799 return "CAPI not installed";
800 case 0x100A:
801 return "Controller does not support external equipment";
802 case 0x100B:
803 return "Controller does only support external equipment";
804
805/*-- error information concerning message exchange functions -----*/
806 case 0x1101:
807 return "Illegal application number";
808 case 0x1102:
809 return "Illegal command or subcommand or message length less than 12 bytes";
810 case 0x1103:
811 return "The message could not be accepted because of a queue full condition !! The error code does not imply that CAPI cannot receive messages directed to another controller, PLCI or NCCI";
812 case 0x1104:
813 return "Queue is empty";
814 case 0x1105:
815 return "Queue overflow, a message was lost !! This indicates a configuration error. The only recovery from this error is to perform a CAPI_RELEASE";
816 case 0x1106:
817 return "Unknown notification parameter";
818 case 0x1107:
819 return "The Message could not be accepted because of an internal busy condition";
820 case 0x1108:
821 return "OS Resource error (no memory ?)";
822 case 0x1109:
823 return "CAPI not installed";
824 case 0x110A:
825 return "Controller does not support external equipment";
826 case 0x110B:
827 return "Controller does only support external equipment";
828
829/*-- error information concerning resource / coding problems -----*/
830 case 0x2001:
831 return "Message not supported in current state";
832 case 0x2002:
833 return "Illegal Controller / PLCI / NCCI";
834 case 0x2003:
835 return "Out of PLCI";
836 case 0x2004:
837 return "Out of NCCI";
838 case 0x2005:
839 return "Out of LISTEN";
840 case 0x2006:
841 return "Out of FAX resources (protocol T.30)";
842 case 0x2007:
843 return "Illegal message parameter coding";
844
845/*-- error information concerning requested services -----*/
846 case 0x3001:
847 return "B1 protocol not supported";
848 case 0x3002:
849 return "B2 protocol not supported";
850 case 0x3003:
851 return "B3 protocol not supported";
852 case 0x3004:
853 return "B1 protocol parameter not supported";
854 case 0x3005:
855 return "B2 protocol parameter not supported";
856 case 0x3006:
857 return "B3 protocol parameter not supported";
858 case 0x3007:
859 return "B protocol combination not supported";
860 case 0x3008:
861 return "NCPI not supported";
862 case 0x3009:
863 return "CIP Value unknown";
864 case 0x300A:
865 return "Flags not supported (reserved bits)";
866 case 0x300B:
867 return "Facility not supported";
868 case 0x300C:
869 return "Data length not supported by current protocol";
870 case 0x300D:
871 return "Reset procedure not supported by current protocol";
872
873/*-- informations about the clearing of a physical connection -----*/
874 case 0x3301:
875 return "Protocol error layer 1 (broken line or B-channel removed by signalling protocol)";
876 case 0x3302:
877 return "Protocol error layer 2";
878 case 0x3303:
879 return "Protocol error layer 3";
880 case 0x3304:
881 return "Another application got that call";
882/*-- T.30 specific reasons -----*/
883 case 0x3311:
884 return "Connecting not successful (remote station is no FAX G3 machine)";
885 case 0x3312:
886 return "Connecting not successful (training error)";
887 case 0x3313:
888 return "Disconnected before transfer (remote station does not support transfer mode, e.g. resolution)";
889 case 0x3314:
890 return "Disconnected during transfer (remote abort)";
891 case 0x3315:
892 return "Disconnected during transfer (remote procedure error, e.g. unsuccessful repetition of T.30 commands)";
893 case 0x3316:
894 return "Disconnected during transfer (local tx data underrun)";
895 case 0x3317:
896 return "Disconnected during transfer (local rx data overflow)";
897 case 0x3318:
898 return "Disconnected during transfer (local abort)";
899 case 0x3319:
900 return "Illegal parameter coding (e.g. SFF coding error)";
901
902/*-- disconnect causes from the network according to ETS 300 102-1/Q.931 -----*/
903 case 0x3481: return "Unallocated (unassigned) number";
904 case 0x3482: return "No route to specified transit network";
905 case 0x3483: return "No route to destination";
906 case 0x3486: return "Channel unacceptable";
907 case 0x3487:
908 return "Call awarded and being delivered in an established channel";
909 case 0x3490: return "Normal call clearing";
910 case 0x3491: return "User busy";
911 case 0x3492: return "No user responding";
912 case 0x3493: return "No answer from user (user alerted)";
913 case 0x3495: return "Call rejected";
914 case 0x3496: return "Number changed";
915 case 0x349A: return "Non-selected user clearing";
916 case 0x349B: return "Destination out of order";
917 case 0x349C: return "Invalid number format";
918 case 0x349D: return "Facility rejected";
919 case 0x349E: return "Response to STATUS ENQUIRY";
920 case 0x349F: return "Normal, unspecified";
921 case 0x34A2: return "No circuit / channel available";
922 case 0x34A6: return "Network out of order";
923 case 0x34A9: return "Temporary failure";
924 case 0x34AA: return "Switching equipment congestion";
925 case 0x34AB: return "Access information discarded";
926 case 0x34AC: return "Requested circuit / channel not available";
927 case 0x34AF: return "Resources unavailable, unspecified";
928 case 0x34B1: return "Quality of service unavailable";
929 case 0x34B2: return "Requested facility not subscribed";
930 case 0x34B9: return "Bearer capability not authorized";
931 case 0x34BA: return "Bearer capability not presently available";
932 case 0x34BF: return "Service or option not available, unspecified";
933 case 0x34C1: return "Bearer capability not implemented";
934 case 0x34C2: return "Channel type not implemented";
935 case 0x34C5: return "Requested facility not implemented";
936 case 0x34C6: return "Only restricted digital information bearer capability is available";
937 case 0x34CF: return "Service or option not implemented, unspecified";
938 case 0x34D1: return "Invalid call reference value";
939 case 0x34D2: return "Identified channel does not exist";
940 case 0x34D3: return "A suspended call exists, but this call identity does not";
941 case 0x34D4: return "Call identity in use";
942 case 0x34D5: return "No call suspended";
943 case 0x34D6: return "Call having the requested call identity has been cleared";
944 case 0x34D8: return "Incompatible destination";
945 case 0x34DB: return "Invalid transit network selection";
946 case 0x34DF: return "Invalid message, unspecified";
947 case 0x34E0: return "Mandatory information element is missing";
948 case 0x34E1: return "Message type non-existent or not implemented";
949 case 0x34E2: return "Message not compatible with call state or message type non-existent or not implemented";
950 case 0x34E3: return "Information element non-existent or not implemented";
951 case 0x34E4: return "Invalid information element contents";
952 case 0x34E5: return "Message not compatible with call state";
953 case 0x34E6: return "Recovery on timer expiry";
954 case 0x34EF: return "Protocol error, unspecified";
955 case 0x34FF: return "Interworking, unspecified";
956
957 default: return "No additional information";
958 }
959#endif
960}
766 961
767static void handle_controller(_cmsg *cmsg) 962static void handle_controller(_cmsg *cmsg)
768{ 963{