1 /* 2 * Copyright 2008, Axel Dörfler, axeld@pinc-software.de. 3 * Copyright 2003, Thomas Kurschel. All rights reserved. 4 * Distributed under the terms of the MIT License. 5 */ 6 #ifndef _SCSI_CD_H 7 #define _SCSI_CD_H 8 9 10 #include <device_manager.h> 11 #include <scsi_periph.h> 12 #include <scsi.h> 13 14 #include "dma_resources.h" 15 #include "IORequest.h" 16 17 18 struct IOCache; 19 struct IOScheduler; 20 21 22 #define SCSI_CD_DRIVER_MODULE_NAME "drivers/disk/scsi/scsi_cd/driver_v1" 23 #define SCSI_CD_DEVICE_MODULE_NAME "drivers/disk/scsi/scsi_cd/device_v1" 24 25 26 struct cd_driver_info { 27 device_node* node; 28 ::scsi_periph_device scsi_periph_device; 29 ::scsi_device scsi_device; 30 scsi_device_interface* scsi; 31 IOScheduler* io_scheduler; 32 DMAResource* dma_resource; 33 34 uint64 capacity; 35 uint64 original_capacity; 36 uint32 block_size; 37 uint32 physical_block_size; 38 39 bool removable; 40 uint8 device_type; 41 }; 42 43 struct cd_handle { 44 ::scsi_periph_handle scsi_periph_handle; 45 cd_driver_info* info; 46 }; 47 48 #endif // _SCSI_CD_H 49