Diff for /src/sys/dev/raid/aac/aac.c between versions 1.9 and 1.10

version 1.9, 2003/11/20 22:07:33 version 1.10, 2004/02/13 01:33:18
Line 44 Line 44
 #include <sys/kthread.h>  #include <sys/kthread.h>
 #include <sys/sysctl.h>  #include <sys/sysctl.h>
 #include <sys/poll.h>  #include <sys/poll.h>
#if __FreeBSD_version >= 500005#if defined(__FreeBSD__) && __FreeBSD_version >= 500005
 #include <sys/selinfo.h>  #include <sys/selinfo.h>
 #else  #else
 #include <sys/select.h>  #include <sys/select.h>
Line 240  aac_attach(struct aac_softc *sc) Line 240  aac_attach(struct aac_softc *sc)
         aac_initq_complete(sc);          aac_initq_complete(sc);
         aac_initq_bio(sc);          aac_initq_bio(sc);
   
#if __FreeBSD_version >= 500005#if defined(__FreeBSD__) && __FreeBSD_version >= 500005
         /*          /*
          * Initialise command-completion task.           * Initialise command-completion task.
          */           */
Line 298  aac_attach(struct aac_softc *sc) Line 298  aac_attach(struct aac_softc *sc)
         unit = device_get_unit(sc->aac_dev);          unit = device_get_unit(sc->aac_dev);
         sc->aac_dev_t = make_dev(&aac_cdevsw, unit, UID_ROOT, GID_WHEEL, 0644,          sc->aac_dev_t = make_dev(&aac_cdevsw, unit, UID_ROOT, GID_WHEEL, 0644,
                                  "aac%d", unit);                                   "aac%d", unit);
#if __FreeBSD_version > 500005#if defined(__FreeBSD__) && __FreeBSD_version > 500005
         (void)make_dev_alias(sc->aac_dev_t, "afa%d", unit);          (void)make_dev_alias(sc->aac_dev_t, "afa%d", unit);
         (void)make_dev_alias(sc->aac_dev_t, "hpn%d", unit);          (void)make_dev_alias(sc->aac_dev_t, "hpn%d", unit);
 #endif  #endif
         sc->aac_dev_t->si_drv1 = sc;          sc->aac_dev_t->si_drv1 = sc;
   
         /* Create the AIF thread */          /* Create the AIF thread */
#if __FreeBSD_version > 500005#if defined(__FreeBSD__) && __FreeBSD_version > 500005
         if (kthread_create((void(*)(void *))aac_host_command, sc,          if (kthread_create((void(*)(void *))aac_host_command, sc,
                            &sc->aifthread, 0, "aac%daif", unit))                             &sc->aifthread, 0, "aac%daif", unit))
 #else  #else
Line 792  aac_host_command(struct aac_softc *sc) Line 792  aac_host_command(struct aac_softc *sc)
         sc->aifflags &= ~AAC_AIFFLAGS_RUNNING;          sc->aifflags &= ~AAC_AIFFLAGS_RUNNING;
         wakeup(sc->aac_dev);          wakeup(sc->aac_dev);
   
#if __FreeBSD_version > 500005#if defined(__FreeBSD__) && __FreeBSD_version > 500005
         mtx_lock(&Giant);          mtx_lock(&Giant);
 #endif  #endif
         kthread_exit();          kthread_exit();
Line 828  aac_host_response(struct aac_softc *sc) Line 828  aac_host_response(struct aac_softc *sc)
         }          }
   
         /* handle completion processing */          /* handle completion processing */
#if __FreeBSD_version >= 500005#if defined(__FreeBSD__) && __FreeBSD_version >= 500005
         taskqueue_enqueue(taskqueue_swi, &sc->aac_task_complete);          taskqueue_enqueue(taskqueue_swi, &sc->aac_task_complete);
 #else  #else
         aac_complete(sc, 0);          aac_complete(sc, 0);

Removed from v.1.9  
changed lines
  Added in v.1.10