1 /* $NetBSD: rf_driver.h,v 1.16 2005/12/11 12:23:37 christos Exp $ */
6 * Copyright (c) 1996 Carnegie-Mellon University.
11 * Permission to use, copy, modify and distribute this software and
12 * its documentation is hereby granted, provided that both the copyright
13 * notice and this permission notice appear in all copies of the
14 * software, derivative works or modified versions, and any portions
15 * thereof, and that both notices appear in supporting documentation.
17 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
18 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
19 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
21 * Carnegie Mellon requests users of this software to return to
23 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
24 * School of Computer Science
25 * Carnegie Mellon University
26 * Pittsburgh PA 15213-3890
28 * any improvements or extensions that they make and grant Carnegie the
29 * rights to redistribute these changes.
32 #ifndef _RF__RF_DRIVER_H_
33 #define _RF__RF_DRIVER_H_
35 #include <dev/raidframe/raidframevar.h>
37 #include "rf_threadstuff.h"
38 #include "rf_netbsd.h"
40 #ifndef RF_RETRY_THRESHOLD
41 #define RF_RETRY_THRESHOLD 5
44 RF_DECLARE_EXTERN_MUTEX(rf_printf_mutex
)
45 int rf_BootRaidframe(void);
46 int rf_UnbootRaidframe(void);
47 int rf_Shutdown(RF_Raid_t
*);
48 int rf_Configure(RF_Raid_t
*, RF_Config_t
*, RF_AutoConfig_t
*);
49 RF_RaidAccessDesc_t
*rf_AllocRaidAccDesc(RF_Raid_t
*, RF_IoType_t
,
50 RF_RaidAddr_t
, RF_SectorCount_t
,
53 const RF_AccessState_t
*);
54 void rf_FreeRaidAccDesc(RF_RaidAccessDesc_t
*);
55 int rf_DoAccess(RF_Raid_t
*, RF_IoType_t
, int, RF_RaidAddr_t
,
56 RF_SectorCount_t
, void *, struct buf
*,
57 RF_RaidAccessFlags_t
);
59 int rf_SetReconfiguredMode(RF_Raid_t
*, RF_RowCol_t
, RF_RowCol_t
);
61 int rf_FailDisk(RF_Raid_t
*, RF_RowCol_t
, int);
62 void rf_SignalQuiescenceLock(RF_Raid_t
*);
63 int rf_SuspendNewRequestsAndWait(RF_Raid_t
*);
64 void rf_ResumeNewRequests(RF_Raid_t
*);
66 #endif /* !_RF__RF_DRIVER_H_ */