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

version 1.9, 2004/05/13 23:49:19 version 1.10, 2004/05/19 22:52:48
Line 200  twe_attach(device_t dev) Line 200  twe_attach(device_t dev)
     struct twe_softc    *sc;      struct twe_softc    *sc;
     int                 rid, error;      int                 rid, error;
     u_int32_t           command;      u_int32_t           command;
       dev_t               xdev;
   
     debug_called(4);      debug_called(4);
   
Line 310  twe_attach(device_t dev) Line 311  twe_attach(device_t dev)
     /*      /*
      * Create the control device.       * Create the control device.
      */       */
    sc->twe_dev_t = make_dev(&twe_cdevsw, device_get_unit(sc->twe_dev), UID_ROOT, GID_OPERATOR,    cdevsw_add(&twe_cdevsw, -1, device_get_unit(sc->twe_dev));
                             S_IRUSR | S_IWUSR, "twe%d", device_get_unit(sc->twe_dev));    xdev = make_dev(&twe_cdevsw, device_get_unit(sc->twe_dev), 
    sc->twe_dev_t->si_drv1 = sc;                            UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR, 
                             "twe%d", device_get_unit(sc->twe_dev));
     xdev->si_drv1 = sc;
 
     /*      /*
      * Schedule ourselves to bring the controller up once interrupts are available.       * Schedule ourselves to bring the controller up once interrupts are available.
      * This isn't strictly necessary, since we disable interrupts while probing the       * This isn't strictly necessary, since we disable interrupts while probing the
Line 364  twe_free(struct twe_softc *sc) Line 368  twe_free(struct twe_softc *sc)
     if (sc->twe_io != NULL)      if (sc->twe_io != NULL)
         bus_release_resource(sc->twe_dev, SYS_RES_IOPORT, TWE_IO_CONFIG_REG, sc->twe_io);          bus_release_resource(sc->twe_dev, SYS_RES_IOPORT, TWE_IO_CONFIG_REG, sc->twe_io);
   
    /* destroy control device */    cdevsw_remove(&twe_cdevsw, -1, device_get_unit(sc->twe_dev));
    if (sc->twe_dev_t != (dev_t)NULL) 
        destroy_dev(sc->twe_dev_t); 
   
     sysctl_ctx_free(&sc->sysctl_ctx);      sysctl_ctx_free(&sc->sysctl_ctx);
 }  }
Line 727  twed_strategy(twe_bio *bp) Line 729  twed_strategy(twe_bio *bp)
  * System crashdump support   * System crashdump support
  */   */
 int  int
twed_dump(dev_t dev)twed_dump(dev_t dev, u_int count, u_int blkno, u_int secsize)
 {  {
     struct twed_softc   *twed_sc = (struct twed_softc *)dev->si_drv1;      struct twed_softc   *twed_sc = (struct twed_softc *)dev->si_drv1;
     struct twe_softc    *twe_sc  = (struct twe_softc *)twed_sc->twed_controller;      struct twe_softc    *twe_sc  = (struct twe_softc *)twed_sc->twed_controller;
     u_int               count, blkno, secsize;  
     vm_paddr_t          addr = 0;      vm_paddr_t          addr = 0;
     long                blkcnt;      long                blkcnt;
     int                 dumppages = MAXDUMPPGS;      int                 dumppages = MAXDUMPPGS;
     int                 error;      int                 error;
     int                 i;      int                 i;
   
     if ((error = disk_dumpcheck(dev, &count, &blkno, &secsize)))  
         return(error);  
   
     if (!twed_sc || !twe_sc)      if (!twed_sc || !twe_sc)
         return(ENXIO);          return(ENXIO);
   

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