amr(4): Remove unused code.
authorSascha Wildner <saw@online.de>
Tue, 10 Jul 2012 07:23:57 +0000 (09:23 +0200)
committerSascha Wildner <saw@online.de>
Tue, 10 Jul 2012 07:23:57 +0000 (09:23 +0200)
sys/dev/raid/amr/amr.c

index ab945c5..51752b3 100644 (file)
@@ -461,47 +461,6 @@ amr_open(struct dev_open_args *ap)
     return(0);
 }
 
-#ifdef LSI
-static int
-amr_del_ld(struct amr_softc *sc, int drv_no, int status)
-{
-
-    debug_called(1);
-
-    sc->amr_state &= ~AMR_STATE_QUEUE_FRZN;
-    sc->amr_state &= ~AMR_STATE_LD_DELETE;
-    sc->amr_state |= AMR_STATE_REMAP_LD;
-    debug(1, "State Set");
-
-    if (!status) {
-       debug(1, "disk begin destroyed %d",drv_no);
-       if (--amr_disks_registered == 0)
-           cdevsw_remove(&amrddisk_cdevsw);
-       debug(1, "disk begin destroyed success");
-    }
-    return 0;
-}
-
-static int
-amr_prepare_ld_delete(struct amr_softc *sc)
-{
-
-    debug_called(1);
-    if (sc->ld_del_supported == 0)
-       return(ENOIOCTL);
-
-    sc->amr_state |= AMR_STATE_QUEUE_FRZN;
-    sc->amr_state |= AMR_STATE_LD_DELETE;
-
-    /* 5 minutes for the all the commands to be flushed.*/
-    tsleep((void *)&sc->ld_del_supported, PCATCH,"delete_logical_drv",hz * 60 * 1);
-    if ( sc->amr_busyslots )
-       return(ENOIOCTL);
-
-    return 0;
-}
-#endif
-
 /********************************************************************************
  * Accept the last close on the control device.
  */
@@ -874,10 +833,6 @@ amr_ioctl(struct dev_ioctl_args *ap)
            goto out;
        }
        logical_drives_changed = 1;
-#ifdef LSI
-       if ((error = amr_prepare_ld_delete(sc)) != 0)
-           return (error);
-#endif
     }
 
     /* handle inbound data buffer */
@@ -972,10 +927,8 @@ out:
     if (dp != NULL)
        kfree(dp, M_AMR);
 
-#ifndef LSI
     if (logical_drives_changed)
        amr_rescan_drives(dev);
-#endif
 
     return(error);
 }