1 
    2 
    3 
    4 
    5 
    6 
    7 
    8 
    9 
   10 
   11 
   12 
   13 
   14 
   15 
   16 
   17 
   18 
   19 
   20 
   21 
   22 
   23 
   24 
   25 
   26 
   27 
   28 
   29 
   30 
   31 
   32 
   33 
   34 #ifndef _RF__RF_DRIVER_H_
   35 #define _RF__RF_DRIVER_H_
   36 
   37 #include "rf_threadstuff.h"
   38 #include "rf_types.h"
   39 
   40 #if     defined(__NetBSD__)
   41 #include "rf_netbsd.h"
   42 #elif   defined(__OpenBSD__)
   43 #include "rf_openbsd.h"
   44 #endif
   45 
   46 #if     _KERNEL
   47 RF_DECLARE_EXTERN_MUTEX(rf_printf_mutex);
   48 int  rf_BootRaidframe(void);
   49 int  rf_UnbootRaidframe(void);
   50 int  rf_Shutdown(RF_Raid_t *);
   51 int  rf_Configure(RF_Raid_t *, RF_Config_t *, RF_AutoConfig_t *);
   52 RF_RaidAccessDesc_t *rf_AllocRaidAccDesc(RF_Raid_t *, RF_IoType_t,
   53         RF_RaidAddr_t, RF_SectorCount_t, caddr_t, void *, RF_DagHeader_t **,
   54         RF_AccessStripeMapHeader_t **, RF_RaidAccessFlags_t,
   55         void (*) (struct buf *), void *, RF_AccessState_t *);
   56 void rf_FreeRaidAccDesc(RF_RaidAccessDesc_t *);
   57 int  rf_DoAccess(RF_Raid_t *, RF_IoType_t, int, RF_RaidAddr_t,
   58         RF_SectorCount_t, caddr_t, void *, RF_DagHeader_t **,
   59         RF_AccessStripeMapHeader_t **, RF_RaidAccessFlags_t,
   60         RF_RaidAccessDesc_t **, void (*) (struct buf *), void *);
   61 int  rf_SetReconfiguredMode(RF_Raid_t *, RF_RowCol_t, RF_RowCol_t);
   62 int  rf_FailDisk(RF_Raid_t *, RF_RowCol_t, RF_RowCol_t, int);
   63 void rf_SignalQuiescenceLock(RF_Raid_t *, RF_RaidReconDesc_t *);
   64 int  rf_SuspendNewRequestsAndWait(RF_Raid_t *);
   65 void rf_ResumeNewRequests(RF_Raid_t *);
   66 void rf_StartThroughputStats(RF_Raid_t *);
   67 void rf_StartUserStats(RF_Raid_t *);
   68 void rf_StopUserStats(RF_Raid_t *);
   69 void rf_UpdateUserStats(RF_Raid_t *, int, int);
   70 void rf_PrintUserStats(RF_Raid_t *);
   71 #endif  
   72 
   73 #endif