xref: /haiku/src/add-ons/kernel/drivers/disk/scsi/scsi_disk/scsi_disk.h (revision 079eccf655ba39812b421ae1b87a727d41b50354)
1 /*
2  * Copyright 2008, Axel Dörfler, axeld@pinc-software.de.
3  * Copyright 2002/03, Thomas Kurschel. All rights reserved.
4  * Distributed under the terms of the MIT License.
5  */
6 #ifndef _SCSI_DISK_H
7 #define _SCSI_DISK_H
8 
9 
10 #include <block_io.h>
11 #include <device_manager.h>
12 #include <scsi.h>
13 #include <scsi_periph.h>
14 
15 
16 #define SCSI_DISK_MODULE_NAME "drivers/disk/scsi/scsi_dsk/driver_v1"
17 
18 
19 // must start as block_device_cookie
20 typedef struct das_device_info {
21 	device_node *node;
22 	::scsi_periph_device scsi_periph_device;
23 	::scsi_device scsi_device;
24 	scsi_device_interface *scsi;
25 	::block_io_device block_io_device;
26 
27 	uint64 capacity;
28 	uint32 block_size;
29 
30 	bool removable;			// true, if device is removable
31 } das_device_info;
32 
33 typedef struct das_handle_info {
34 	::scsi_periph_handle scsi_periph_handle;
35 	das_device_info *device;
36 } das_handle_info;
37 
38 #endif	/* _SCSI_DISK_H */
39