- fixed warnings, produced by Haiku version of gcc;
- space-based indentations replaced with tab-based ones; - USB_v3.h removed - now use system USB interface descriptions; - a bit of cleanup; git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18783 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2db0303fdc
commit
9bb1a5cd57
@ -1,37 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by Siarzhuk Zharski <imker@gmx.li>
|
||||
* Distributed under the terms of the BSD License.
|
||||
/**
|
||||
*
|
||||
* TODO: description
|
||||
*
|
||||
* This file is a part of USB SCSI CAM for Haiku OS.
|
||||
* May be used under terms of the MIT License
|
||||
*
|
||||
* Author(s):
|
||||
* Siarzhuk Zharski <imker@gmx.li>
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/** definitions that should be in system headers but ... */
|
||||
|
||||
#ifndef _USB_DEFS_H_
|
||||
#define _USB_DEFS_H_
|
||||
#define _USB_DEFS_H_
|
||||
|
||||
#define USB_EP_ATTR_CONTROL 0x00
|
||||
#define USB_EP_ATTR_ISOCHRONOUS 0x01
|
||||
#define USB_EP_ATTR_BULK 0x02
|
||||
#define USB_EP_ATTR_INTERRUPT 0x03
|
||||
#define USB_EP_ATTR_MASK 0x03
|
||||
// TODO: Shouldn't it be declared in system USB headers?
|
||||
#define USB_EP_ATTR_CONTROL 0x00
|
||||
#define USB_EP_ATTR_ISOCHRONOUS 0x01
|
||||
#define USB_EP_ATTR_BULK 0x02
|
||||
#define USB_EP_ATTR_INTERRUPT 0x03
|
||||
#define USB_EP_ATTR_MASK 0x03
|
||||
|
||||
#define USB_EP_ADDR_DIR_IN 0x80
|
||||
#define USB_EP_ADDR_DIR_OUT 0x00
|
||||
#define USB_EP_ADDR_DIR_IN 0x80
|
||||
#define USB_EP_ADDR_DIR_OUT 0x00
|
||||
|
||||
/*USB device class/subclass/protocl definitions*/
|
||||
#define USB_DEV_CLASS_MASS 0x08
|
||||
#define USB_DEV_CLASS_MASS 0x08
|
||||
|
||||
#define USB_DEV_SUBCLASS_RBC 0x01
|
||||
#define USB_DEV_SUBCLASS_SFF8020I 0x02
|
||||
#define USB_DEV_SUBCLASS_QIC157 0x03
|
||||
#define USB_DEV_SUBCLASS_UFI 0x04
|
||||
#define USB_DEV_SUBCLASS_SFF8070I 0x05
|
||||
#define USB_DEV_SUBCLASS_SCSI 0x06
|
||||
#define USB_DEV_SUBCLASS_RBC 0x01
|
||||
#define USB_DEV_SUBCLASS_SFF8020I 0x02
|
||||
#define USB_DEV_SUBCLASS_QIC157 0x03
|
||||
#define USB_DEV_SUBCLASS_UFI 0x04
|
||||
#define USB_DEV_SUBCLASS_SFF8070I 0x05
|
||||
#define USB_DEV_SUBCLASS_SCSI 0x06
|
||||
|
||||
#define USB_DEV_PROTOCOL_CBI 0x00
|
||||
#define USB_DEV_PROTOCOL_CB 0x01
|
||||
#define USB_DEV_PROTOCOL_BULK 0x50
|
||||
#define USB_DEV_PROTOCOL_CBI 0x00
|
||||
#define USB_DEV_PROTOCOL_CB 0x01
|
||||
#define USB_DEV_PROTOCOL_BULK 0x50
|
||||
|
||||
//TODO: And this was in old v3 stack what now ???
|
||||
#define B_DEV_STALLED 0x8000a015 /* some "forgotten" error */
|
||||
|
||||
#endif /*_USB_DEFS_H_*/
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,72 +1,79 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2005 by Siarzhuk Zharski <imker@gmx.li>
|
||||
* Distributed under the terms of the BSD License.
|
||||
/**
|
||||
*
|
||||
* TODO: description
|
||||
*
|
||||
* This file is a part of USB SCSI CAM for Haiku OS.
|
||||
* May be used under terms of the MIT License
|
||||
*
|
||||
* Author(s):
|
||||
* Siarzhuk Zharski <imker@gmx.li>
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _USB_SCSI_H_
|
||||
#define _USB_SCSI_H_
|
||||
#define _USB_SCSI_H_
|
||||
|
||||
#ifndef _OS_H
|
||||
#include <OS.h>
|
||||
#include <OS.h>
|
||||
#endif //_OS_H
|
||||
|
||||
#ifndef _USB_V3_H
|
||||
#include "USB_v3.h"
|
||||
#endif /* _USB_V3_H */
|
||||
#ifndef _USB_V3_H_
|
||||
#include <USB3.h>
|
||||
#endif /* _USB_V3_H_ */
|
||||
|
||||
#ifndef _CAM_H
|
||||
#include <CAM.h>
|
||||
#include <CAM.h>
|
||||
#endif /*_CAM_H*/
|
||||
|
||||
#define MODULE_NAME "usb_scsi"
|
||||
|
||||
|
||||
#define CONTROLLER_SCSI_BUS 0x00 /* Narrow SCSI bus. Use PI_* to alter this*/
|
||||
#define MAX_DEVICES_COUNT 0x07 /* simulate Narrow SCSI bus - 8 devices*/
|
||||
#define CONTROLLER_SCSI_ID 0x07 /* "controller" SCSI ID */
|
||||
#define MAX_LUNS_COUNT 0x08
|
||||
#define MAX_DEVICES_COUNT 0x07 /* simulate Narrow SCSI bus - 8 devices*/
|
||||
#define CONTROLLER_SCSI_ID 0x07 /* "controller" SCSI ID */
|
||||
#define MAX_LUNS_COUNT 0x08
|
||||
|
||||
/* transport protocol definitions - are not bitmasks */
|
||||
#define PROTO_NONE 0x00000000
|
||||
#define PROTO_BULK_ONLY 0x00000001
|
||||
#define PROTO_CB 0x00000002
|
||||
#define PROTO_CBI 0x00000003
|
||||
#define PROTO_NONE 0x00000000
|
||||
#define PROTO_BULK_ONLY 0x00000001
|
||||
#define PROTO_CB 0x00000002
|
||||
#define PROTO_CBI 0x00000003
|
||||
|
||||
#define PROTO_VENDOR 0x0000000e
|
||||
#define PROTO_MASK 0x0000000f
|
||||
#define PROTO_VENDOR 0x0000000e
|
||||
#define PROTO_MASK 0x0000000f
|
||||
|
||||
#define PROTO(__value) ((__value) & PROTO_MASK)
|
||||
|
||||
/* command set definitions - are not bitmasks */
|
||||
#define CMDSET_NONE 0x00000000
|
||||
#define CMDSET_SCSI 0x00000010
|
||||
#define CMDSET_UFI 0x00000020
|
||||
#define CMDSET_ATAPI 0x00000030
|
||||
#define CMDSET_RBC 0x00000040
|
||||
#define CMDSET_QIC157 0x00000050
|
||||
|
||||
/* command set definitions - are not bitmasks */
|
||||
#define CMDSET_NONE 0x00000000
|
||||
#define CMDSET_SCSI 0x00000010
|
||||
#define CMDSET_UFI 0x00000020
|
||||
#define CMDSET_ATAPI 0x00000030
|
||||
#define CMDSET_RBC 0x00000040
|
||||
#define CMDSET_QIC157 0x00000050
|
||||
|
||||
#define CMDSET_VENDOR 0x000000e0
|
||||
#define CMDSET_MASK 0x000000f0
|
||||
#define CMDSET_VENDOR 0x000000e0
|
||||
#define CMDSET_MASK 0x000000f0
|
||||
|
||||
#define CMDSET(__value)((__value) & CMDSET_MASK)
|
||||
|
||||
#define HAS_SET(__mask, __flag) \
|
||||
(((__mask) & __flag) == (__flag))
|
||||
(((__mask) & __flag) == (__flag))
|
||||
|
||||
/* fixes - bitmasked */
|
||||
#define FIX_NO_GETMAXLUN 0x00000100
|
||||
#define FIX_FORCE_RW_TO_6 0x00000200
|
||||
#define FIX_NO_TEST_UNIT 0x00000400
|
||||
#define FIX_NO_INQUIRY 0x00000800
|
||||
#define FIX_TRANS_TEST_UNIT 0x00001000
|
||||
#define FIX_NO_PREVENT_MEDIA 0x00002000
|
||||
#define FIX_FORCE_MS_TO_10 0x00004000
|
||||
#define FIX_FORCE_READ_ONLY 0x00008000
|
||||
#define FIX_NO_GETMAXLUN 0x00000100
|
||||
#define FIX_FORCE_RW_TO_6 0x00000200
|
||||
#define FIX_NO_TEST_UNIT 0x00000400
|
||||
#define FIX_NO_INQUIRY 0x00000800
|
||||
#define FIX_TRANS_TEST_UNIT 0x00001000
|
||||
#define FIX_NO_PREVENT_MEDIA 0x00002000
|
||||
#define FIX_FORCE_MS_TO_10 0x00004000
|
||||
#define FIX_FORCE_READ_ONLY 0x00008000
|
||||
|
||||
#define FIX_NONE 0x00000000
|
||||
#define FIX_MASK 0x000fff00
|
||||
#define FIX_NONE 0x00000000
|
||||
#define FIX_MASK 0x000fff00
|
||||
|
||||
#define HAS_FIXES(__value, __fix) \
|
||||
HAS_SET((__value), (__fix))
|
||||
HAS_SET((__value), (__fix))
|
||||
|
||||
#endif /*_USB_SCSI_H_*/
|
||||
|
||||
#endif /*_USB_SCSI_H_*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user