Lines Matching refs:sta
859 static int sta2err(int sta)
863 if (sta==0x00) return (0);
864 if (sta==0x01) return (-604); /* CRC error */
865 if (sta==0x02) return (-602); /* drive not ready */
866 if (sta==0x03) return (-607); /* unknown media */
867 if (sta==0x04) return (-612); /* general failure */
868 if (sta==0x05) return (0);
869 if (sta==0x06) return (-ERR_DISKCHANGE); /* disk change */
870 if (sta==0x0b) return (-612); /* general failure */
871 if (sta==0xff) return (-612); /* general failure */
876 if (sta<=2) return (sta);
877 if (sta==0x05) return (-604); /* CRC error */
878 if (sta==0x06) return (-606); /* seek error */
879 if (sta==0x0d) return (-606); /* seek error */
880 if (sta==0x0e) return (-603); /* unknown command */
881 if (sta==0x14) return (-603); /* unknown command */
882 if (sta==0x0c) return (-611); /* read fault */
883 if (sta==0x0f) return (-611); /* read fault */
884 if (sta==0x10) return (-611); /* read fault */
885 if (sta>=0x16) return (-612); /* general failure */
886 if (sta==0x11) return (-ERR_DISKCHANGE); /* disk change (LCS: removed) */
888 if (sta==0x12) return (-ERR_DISKCHANGE); /* disk change (inserted) */