The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/scd/scdvar.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * $FreeBSD$
    3  */
    4 
    5 struct scd_mbx {
    6         short           retry;
    7         short           nblk;
    8         int             sz;
    9         u_long          skip;
   10         struct bio *    bp;
   11         short           count;
   12 };
   13 
   14 struct scd_data {
   15         char                    double_speed;
   16         char *                  name;
   17         short                   flags;
   18         int                     blksize;
   19         u_long                  disksize;
   20         int                     openflag;
   21         struct {
   22                 unsigned int    adr :4;
   23                 unsigned int    ctl :4; /* xcdplayer needs this */
   24                 unsigned char   start_msf[3];
   25         } toc[MAX_TRACKS];
   26         short                   first_track;
   27         short                   last_track;
   28         struct  ioc_play_msf    last_play;
   29 
   30         short                   audio_status;
   31         struct bio_queue_head   head;        /* head of bio queue */
   32         struct scd_mbx          mbx;
   33 };
   34 
   35 struct scd_softc {
   36         device_t                dev;
   37         struct cdev *scd_dev_t;
   38         int                     debug;
   39 
   40         struct resource *       port;
   41         int                     port_rid;
   42         int                     port_type;
   43         bus_space_tag_t         port_bst;
   44         bus_space_handle_t      port_bsh;
   45 
   46         struct mtx              mtx;
   47 
   48         struct callout_handle   ch;
   49         int                     ch_state;
   50         struct scd_mbx *        ch_mbxsave;
   51 
   52         struct scd_data         data;
   53 };
   54 
   55 #define SCD_LOCK(_sc)           splx(&(_sc)->mtx
   56 #define SCD_UNLOCK(_sc)         splx(&(_sc)->mtx
   57 
   58 #define SCD_READ(_sc, _reg) \
   59         bus_space_read_1(_sc->port_bst, _sc->port_bsh, _reg)
   60 #define SCD_READ_MULTI(_sc, _reg, _addr, _count) \
   61         bus_space_read_multi_1(_sc->port_bst, _sc->port_bsh, _reg, _addr, _count)
   62 #define SCD_WRITE(_sc, _reg, _val) \
   63         bus_space_write_1(_sc->port_bst, _sc->port_bsh, _reg, _val)
   64 
   65 int     scd_probe       (struct scd_softc *);
   66 int     scd_attach      (struct scd_softc *);

Cache object: fae2c5032daf8fb2fc94676074d9d946


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.