[BACK]Return to satlink.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / isa

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/isa/Attic/satlink.c between version 1.37 and 1.37.4.3

version 1.37, 2008/04/08 20:08:50 version 1.37.4.3, 2009/05/16 10:41:26
Line 15 
Line 15 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software  
  *    must display the following acknowledgement:  
  *      This product includes software developed by the NetBSD  
  *      Foundation, Inc. and its contributors.  
  * 4. Neither the name of The NetBSD Foundation nor the names of its  
  *    contributors may be used to endorse or promote products derived  
  *    from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS   * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Line 100  struct satlink_softc {
Line 93  struct satlink_softc {
  */   */
 #define SATLINK_TIMEOUT         (hz/10)  #define SATLINK_TIMEOUT         (hz/10)
   
 int     satlinkprobe(struct device *, struct cfdata *, void *);  int     satlinkprobe(device_t, cfdata_t, void *);
 void    satlinkattach(struct device *, struct device *, void *);  void    satlinkattach(device_t, device_t, void *);
 void    satlinktimeout(void *);  void    satlinktimeout(void *);
   
 CFATTACH_DECL(satlink, sizeof(struct satlink_softc),  CFATTACH_DECL(satlink, sizeof(struct satlink_softc),
Line 122  const struct cdevsw satlink_cdevsw = {
Line 115  const struct cdevsw satlink_cdevsw = {
 };  };
   
 int  int
 satlinkprobe(struct device *parent, struct cfdata *match,  satlinkprobe(device_t parent, cfdata_t match, void *aux)
     void *aux)  
 {  {
         struct isa_attach_args *ia = aux;          struct isa_attach_args *ia = aux;
         bus_space_tag_t iot = ia->ia_iot;          bus_space_tag_t iot = ia->ia_iot;
Line 166  satlinkprobe(struct device *parent, stru
Line 158  satlinkprobe(struct device *parent, stru
 }  }
   
 void  void
 satlinkattach(struct device *parent, struct device *self, void *aux)  satlinkattach(device_t parent, device_t self, void *aux)
 {  {
         struct satlink_softc *sc = (struct satlink_softc *)self;          struct satlink_softc *sc = (struct satlink_softc *)self;
         struct isa_attach_args *ia = aux;          struct isa_attach_args *ia = aux;
Line 257  satlinkopen(dev_t dev, int flags, int fm
Line 249  satlinkopen(dev_t dev, int flags, int fm
         struct satlink_softc *sc;          struct satlink_softc *sc;
         int error;          int error;
   
         sc = device_lookup(&satlink_cd, minor(dev));          sc = device_lookup_private(&satlink_cd, minor(dev));
   
         if (sc == NULL)          if (sc == NULL)
                 return (ENXIO);                  return (ENXIO);
   
Line 288  int
Line 281  int
 satlinkclose(dev_t dev, int flags, int fmt,  satlinkclose(dev_t dev, int flags, int fmt,
     struct lwp *l)      struct lwp *l)
 {  {
         struct satlink_softc *sc = device_lookup(&satlink_cd, minor(dev));          struct satlink_softc *sc;
         int s;          int s;
   
           sc = device_lookup_private(&satlink_cd, minor(dev));
   
         s = splsoftclock();          s = splsoftclock();
         sc->sc_flags &= ~SATF_ISOPEN;          sc->sc_flags &= ~SATF_ISOPEN;
         splx(s);          splx(s);
Line 302  satlinkclose(dev_t dev, int flags, int f
Line 297  satlinkclose(dev_t dev, int flags, int f
 }  }
   
 int  int
 satlinkread(dev, uio, flags)  satlinkread(dev_t dev, struct uio *uio, int flags)
         dev_t dev;  
         struct uio *uio;  
         int flags;  
 {  {
         struct satlink_softc *sc = device_lookup(&satlink_cd, minor(dev));          struct satlink_softc *sc;
         int error, s, count, sptr;          int error, s, count, sptr;
         int wrapcnt, oresid;          int wrapcnt, oresid;
   
           sc = device_lookup_private(&satlink_cd, minor(dev));
   
         s = splsoftclock();          s = splsoftclock();
   
         /* Wait for data to be available. */          /* Wait for data to be available. */
Line 378  int
Line 372  int
 satlinkioctl(dev_t dev, u_long cmd, void *data, int flags,  satlinkioctl(dev_t dev, u_long cmd, void *data, int flags,
     struct lwp *l)      struct lwp *l)
 {  {
         struct satlink_softc *sc = device_lookup(&satlink_cd, minor(dev));          struct satlink_softc *sc;
   
           sc = device_lookup_private(&satlink_cd, minor(dev));
   
         switch (cmd) {          switch (cmd) {
         case SATIORESET:          case SATIORESET:
Line 400  satlinkioctl(dev_t dev, u_long cmd, void
Line 396  satlinkioctl(dev_t dev, u_long cmd, void
 }  }
   
 int  int
 satlinkpoll(dev, events, l)  satlinkpoll(dev_t dev, int events, struct lwp *l)
         dev_t dev;  
         int events;  
         struct lwp *l;  
 {  {
         struct satlink_softc *sc = device_lookup(&satlink_cd, minor(dev));          struct satlink_softc *sc;
         int s, revents;          int s, revents;
   
           sc = device_lookup_private(&satlink_cd, minor(dev));
   
         revents = events & (POLLOUT | POLLWRNORM);          revents = events & (POLLOUT | POLLWRNORM);
   
         /* Attempt to save some work. */          /* Attempt to save some work. */
Line 461  static const struct filterops satlink_se
Line 456  static const struct filterops satlink_se
 int  int
 satlinkkqfilter(dev_t dev, struct knote *kn)  satlinkkqfilter(dev_t dev, struct knote *kn)
 {  {
         struct satlink_softc *sc = device_lookup(&satlink_cd, minor(dev));          struct satlink_softc *sc;
         struct klist *klist;          struct klist *klist;
         int s;          int s;
   
           sc = device_lookup_private(&satlink_cd, minor(dev));
   
         switch (kn->kn_filter) {          switch (kn->kn_filter) {
         case EVFILT_READ:          case EVFILT_READ:
                 klist = &sc->sc_selq.sel_klist;                  klist = &sc->sc_selq.sel_klist;
Line 490  satlinkkqfilter(dev_t dev, struct knote 
Line 487  satlinkkqfilter(dev_t dev, struct knote 
 }  }
   
 void  void
 satlinktimeout(arg)  satlinktimeout(void *arg)
         void *arg;  
 {  {
         struct satlink_softc *sc = arg;          struct satlink_softc *sc = arg;
         bus_size_t resid;          bus_size_t resid;

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.37.4.3

CVSweb <webmaster@jp.NetBSD.org>