On Mon, Jan 20, 2003 at 03:13:45PM +0100, Joerg Schilling wrote:
> >I have a small stupid patch hanging around. Adds definitions for
> >struct scsi_mode_page_1A
> >struct cd_mode_page_0E
> >to scsireg.h. Is it of some interest for the author?
> >Should do no harm, at least.
> 
> Depends on whether it is needed, whether it is correct and complete and
> whether it depends into this file.
I believe it's correct and complete, just because they're few lines, but of
course I may be wrong. I need this in a small project I'm getting around.
Just add these 2 structures somewhere in scsireg.h
<<<<<-----------------------------------------------

#if     defined(_BIT_FIELDS_LTOH)       /* Intel byteorder */

struct scsi_mode_page_1A {              /* Power Condition */
                MP_P_CODE;              /* parsave & pagecode */
        Uchar   p_len;                  /* 0x0A = 10 Bytes */
        Uchar   res;                    /* Byte 2 */
        Ucbit   standby         : 1;    /* Byte 3 */
        Ucbit   idle            : 1;    /* Byte 3 */
        Ucbit   res2            : 6;    /* Byte 3 */
        Uchar   idle_timer[4];          /* Bytes 4-7 */
        Uchar   standby_timer[4];       /* Bytes 8-11 */
};

#else                                   /* Motorola byteorder */

struct scsi_mode_page_1A {              /* Power Condition */
                MP_P_CODE;              /* parsave & pagecode */
        Uchar   p_len;                  /* 0x0A = 10 Bytes */
        Uchar   res;                    /* Byte 2 */
        Ucbit   res2            : 6;    /* Byte 3 */
        Ucbit   idle            : 1;    /* Byte 3 */
        Ucbit   standby         : 1;    /* Byte 3 */
        Uchar   idle_timer[4];          /* Bytes 4-7 */
        Uchar   standby_timer[4];       /* Bytes 8-11 */
};
#endif

#if defined(_BIT_FIELDS_LTOH)   /* Intel byteorder */

struct cd_mode_page_0E {                /* CD Audio control */
                MP_P_CODE;              /* parsave & pagecode */
        Uchar   p_len;                  /* 0x0E = 14 Bytes */
        Ucbit   res             : 1;    /* Byte 2 */
        Ucbit   sotc            : 1;    /* Stop on track crossing, byte 2 */
        Ucbit   immed           : 1;    /* Immediate, byte 2 */
        Ucbit   res2            : 5;    /* Byte 2 */
        Uchar   res3;                   /* Byte 3 */
        Uchar   res4;                   /* Byte 4 */
        Uchar   res5;                   /* Byte 5 */
        Uchar   obs1;                   /* Obsolete (75), byte 6 */
        Uchar   obs2;                   /* Obsolete (75), byte 7 */
        Ucbit   out0_cs         : 4;    /* Output port 0 channel selection, byte 8 */
        Ucbit   res6            : 4;    /* Byte 8 */
        Uchar   out0_vol;               /* Output port 0 volume, byte 9 */
        Ucbit   out1_cs         : 4;    /* Output port 1 channel selection,byte 10 */
        Ucbit   res7            : 4;    /* Byte 10 */
        Uchar   out1_vol;               /* Output port 1 volume,byte 11 */
        Ucbit   out2_cs         : 4;    /* Output port 2 channel selection,byte 12 */
        Ucbit   res8            : 4;    /* Byte 12 */
        Uchar   out2_vol;               /* Output port 2 volume,byte 13 */
        Ucbit   out3_cs         : 4;    /* Output port 3 channel selection,byte 14 */
        Ucbit   res9            : 4;    /* Byte 14 */
        Uchar   out3_vol;               /* Output port 3 volume,byte 15 */
};

#else                           /* Motorola byteorder */

struct cd_mode_page_0E {                /* CD Audio control */
                MP_P_CODE;              /* parsave & pagecode */
        Uchar   p_len;                  /* 0x0E = 14 Bytes */
        Ucbit   res2            : 5;    /* Byte 2 */
        Ucbit   immed           : 1;    /* Immediate, byte 2 */
        Ucbit   sotc            : 1;    /* Stop on track crossing, byte 2 */
        Ucbit   res             : 1;    /* Byte 2 */
        Uchar   res3;                   /* Byte 3 */
        Uchar   res4;                   /* Byte 4 */
        Uchar   res5;                   /* Byte 5 */
        Uchar   obs1;                   /* Obsolete (75), byte 6 */
        Uchar   obs2;                   /* Obsolete (75), byte 7 */
        Ucbit   res6            : 4;    /* Byte 8 */
        Ucbit   out0_cs         : 4;    /* Output port 0 channel selection,byte 8 */
        Uchar   out0_vol;               /* Output port 0 volume,byte 9 */
        Ucbit   res7            : 4;    /* Byte 10 */
        Ucbit   out1_cs         : 4;    /* Output port 1 channel selection,byte 10 */
        Uchar   out1_vol;               /* Output port 1 volume,byte 11 */
        Ucbit   res8            : 4;    /* Byte 12 */
        Ucbit   out2_cs         : 4;    /* Output port 2 channel selection,byte 12 */
        Uchar   out2_vol;               /* Output port 2 volume,byte 13 */
        Ucbit   res9            : 4;    /* Byte 14 */
        Ucbit   out3_cs         : 4;    /* Output port 3 channel selection,byte 14 */
        Uchar   out3_vol;               /* Output port 3 volume,byte 15 */
};

#endif

>>>>----------------------------------------
-- 
        Giuseppe "Cowo" Corbelli ~\/~ My software: http://cowo.yoda2000.net
  -<! Adding features does not necessarily increase functionality --  it just
                makes the manuals thicker. !>-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to