sbp(4): Sync sbp.h with FreeBSD
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 28 Apr 2013 12:56:24 +0000 (14:56 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 28 Apr 2013 15:32:01 +0000 (17:32 +0200)
* Change u_intXX_t to uintXX_t.

* Change a couple of 'unsigned long's to uint32_t where appropriate.

* Define Logical Unit Reset so it can be used in sbp_targ

Obtained-from: FreeBSD

sys/dev/disk/sbp/sbp.h

index 457138d..48840e9 100644 (file)
@@ -31,8 +31,8 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/sbp.h,v 1.3 2003/12/11 03:42:40 simokawa Exp $
- * $DragonFly: src/sys/dev/disk/sbp/sbp.h,v 1.1 2004/02/05 14:32:53 joerg Exp $
+ * $FreeBSD: head/sys/dev/firewire/sbp.h 190792 2009-04-07 02:33:46Z sbruno $
+ *
  */
 
 #define ORB_NOTIFY     (1 << 31)
 #define END_DEBUG      }
 
 struct ind_ptr {
-       u_int32_t hi,lo;
+       uint32_t hi,lo;
 };
 
 
 #define SBP_RECV_LEN 32
 
 struct sbp_login_res{
-       u_int16_t       len;
-       u_int16_t       id;
-       u_int16_t       res0;
-       u_int16_t       cmd_hi;
-       u_int32_t       cmd_lo;
-       u_int16_t       res1;
-       u_int16_t       recon_hold;
+       uint16_t        len;
+       uint16_t        id;
+       uint16_t        res0;
+       uint16_t        cmd_hi;
+       uint32_t        cmd_lo;
+       uint16_t        res1;
+       uint16_t        recon_hold;
 };
 
 struct sbp_status{
 #if BYTE_ORDER == BIG_ENDIAN
-       u_int8_t        src:2,
+       uint8_t         src:2,
                        resp:2,
                        dead:1,
                        len:3;
 #else
-       u_int8_t        len:3,
+       uint8_t         len:3,
                        dead:1,
                        resp:2,
                        src:2;
 #endif
-       u_int8_t        status;
-       u_int16_t       orb_hi;
-       u_int32_t       orb_lo;
-       u_int32_t       data[6];
+       uint8_t         status;
+       uint16_t        orb_hi;
+       uint32_t        orb_lo;
+       uint32_t        data[6];
 };
 /* src */
 #define SRC_NEXT_EXISTS        0
@@ -121,7 +121,7 @@ struct sbp_status{
 /*   3: Page size not supported */
 /*   4: Access denied */
 #define STATUS_ACCESS_DENY     4
-/*   5: Logical unit not supported */
+#define STATUS_LUR             5
 /*   6: Maximum payload too small */
 /*   7: Reserved for future standardization */
 /*   8: Resource unavailabe */
@@ -159,29 +159,29 @@ struct sbp_cmd_status{
 #define SBP_SFMT_CURR 0
 #define SBP_SFMT_DEFER 1
 #if BYTE_ORDER == BIG_ENDIAN
-       u_int8_t        sfmt:2,
+       uint8_t         sfmt:2,
                        status:6;
-       u_int8_t        valid:1,
+       uint8_t         valid:1,
                        mark:1,
                        eom:1,
                        ill_len:1,
                        s_key:4;
 #else
-       u_int8_t        status:6,
+       uint8_t         status:6,
                        sfmt:2;
-       u_int8_t        s_key:4,
+       uint8_t         s_key:4,
                        ill_len:1,
                        eom:1,
                        mark:1,
                        valid:1;
 #endif
-       u_int8_t        s_code;
-       u_int8_t        s_qlfr;
-       u_int32_t       info;
-       u_int32_t       cdb;
-       u_int8_t        fru;
-       u_int8_t        s_keydep[3];
-       u_int32_t       vend[2];
+       uint8_t         s_code;
+       uint8_t         s_qlfr;
+       uint32_t        info;
+       uint32_t        cdb;
+       uint8_t         fru;
+       uint8_t         s_keydep[3];
+       uint32_t        vend[2];
 };
 
 #define ORB_FUN_NAMES \