aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-02-09 11:39:45 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-09 12:14:07 -0500
commit95389b86fd07660970a3e6498405d53037c035e9 (patch)
tree6814032c730675fae1958491210840aef5fa15e9 /drivers
parentb4377356450e2358f5f92d34f130d6cb6574bf76 (diff)
[PATCH] osst endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/osst.c8
-rw-r--r--drivers/scsi/osst.h68
2 files changed, 38 insertions, 38 deletions
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 7d2311067903..bd6bbf61adb8 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -521,10 +521,10 @@ static void osst_init_aux(struct osst_tape * STp, int frame_type, int frame_seq_
521 break; 521 break;
522 default: ; /* probably FILL */ 522 default: ; /* probably FILL */
523 } 523 }
524 aux->filemark_cnt = ntohl(STp->filemark_cnt); 524 aux->filemark_cnt = htonl(STp->filemark_cnt);
525 aux->phys_fm = ntohl(0xffffffff); 525 aux->phys_fm = htonl(0xffffffff);
526 aux->last_mark_ppos = ntohl(STp->last_mark_ppos); 526 aux->last_mark_ppos = htonl(STp->last_mark_ppos);
527 aux->last_mark_lbn = ntohl(STp->last_mark_lbn); 527 aux->last_mark_lbn = htonl(STp->last_mark_lbn);
528} 528}
529 529
530/* 530/*
diff --git a/drivers/scsi/osst.h b/drivers/scsi/osst.h
index 1e426f5d0ed8..2cc7b5a1606a 100644
--- a/drivers/scsi/osst.h
+++ b/drivers/scsi/osst.h
@@ -288,11 +288,11 @@ typedef struct {
288#else 288#else
289#error "Please fix <asm/byteorder.h>" 289#error "Please fix <asm/byteorder.h>"
290#endif 290#endif
291 u16 max_speed; /* Maximum speed supported in KBps */ 291 __be16 max_speed; /* Maximum speed supported in KBps */
292 u8 reserved10, reserved11; 292 u8 reserved10, reserved11;
293 u16 ctl; /* Continuous Transfer Limit in blocks */ 293 __be16 ctl; /* Continuous Transfer Limit in blocks */
294 u16 speed; /* Current Speed, in KBps */ 294 __be16 speed; /* Current Speed, in KBps */
295 u16 buffer_size; /* Buffer Size, in 512 bytes */ 295 __be16 buffer_size; /* Buffer Size, in 512 bytes */
296 u8 reserved18, reserved19; 296 u8 reserved18, reserved19;
297} osst_capabilities_page_t; 297} osst_capabilities_page_t;
298 298
@@ -352,8 +352,8 @@ typedef struct {
352 u8 reserved2; 352 u8 reserved2;
353 u8 density; 353 u8 density;
354 u8 reserved3,reserved4; 354 u8 reserved3,reserved4;
355 u16 segtrk; 355 __be16 segtrk;
356 u16 trks; 356 __be16 trks;
357 u8 reserved5,reserved6,reserved7,reserved8,reserved9,reserved10; 357 u8 reserved5,reserved6,reserved7,reserved8,reserved9,reserved10;
358} osst_tape_paramtr_page_t; 358} osst_tape_paramtr_page_t;
359 359
@@ -369,18 +369,18 @@ typedef struct {
369typedef struct os_partition_s { 369typedef struct os_partition_s {
370 __u8 partition_num; 370 __u8 partition_num;
371 __u8 par_desc_ver; 371 __u8 par_desc_ver;
372 __u16 wrt_pass_cntr; 372 __be16 wrt_pass_cntr;
373 __u32 first_frame_ppos; 373 __be32 first_frame_ppos;
374 __u32 last_frame_ppos; 374 __be32 last_frame_ppos;
375 __u32 eod_frame_ppos; 375 __be32 eod_frame_ppos;
376} os_partition_t; 376} os_partition_t;
377 377
378/* 378/*
379 * DAT entry 379 * DAT entry
380 */ 380 */
381typedef struct os_dat_entry_s { 381typedef struct os_dat_entry_s {
382 __u32 blk_sz; 382 __be32 blk_sz;
383 __u16 blk_cnt; 383 __be16 blk_cnt;
384 __u8 flags; 384 __u8 flags;
385 __u8 reserved; 385 __u8 reserved;
386} os_dat_entry_t; 386} os_dat_entry_t;
@@ -412,23 +412,23 @@ typedef struct os_dat_s {
412 * AUX 412 * AUX
413 */ 413 */
414typedef struct os_aux_s { 414typedef struct os_aux_s {
415 __u32 format_id; /* hardware compability AUX is based on */ 415 __be32 format_id; /* hardware compability AUX is based on */
416 char application_sig[4]; /* driver used to write this media */ 416 char application_sig[4]; /* driver used to write this media */
417 __u32 hdwr; /* reserved */ 417 __be32 hdwr; /* reserved */
418 __u32 update_frame_cntr; /* for configuration frame */ 418 __be32 update_frame_cntr; /* for configuration frame */
419 __u8 frame_type; 419 __u8 frame_type;
420 __u8 frame_type_reserved; 420 __u8 frame_type_reserved;
421 __u8 reserved_18_19[2]; 421 __u8 reserved_18_19[2];
422 os_partition_t partition; 422 os_partition_t partition;
423 __u8 reserved_36_43[8]; 423 __u8 reserved_36_43[8];
424 __u32 frame_seq_num; 424 __be32 frame_seq_num;
425 __u32 logical_blk_num_high; 425 __be32 logical_blk_num_high;
426 __u32 logical_blk_num; 426 __be32 logical_blk_num;
427 os_dat_t dat; 427 os_dat_t dat;
428 __u8 reserved188_191[4]; 428 __u8 reserved188_191[4];
429 __u32 filemark_cnt; 429 __be32 filemark_cnt;
430 __u32 phys_fm; 430 __be32 phys_fm;
431 __u32 last_mark_ppos; 431 __be32 last_mark_ppos;
432 __u8 reserved204_223[20]; 432 __u8 reserved204_223[20];
433 433
434 /* 434 /*
@@ -436,8 +436,8 @@ typedef struct os_aux_s {
436 * 436 *
437 * Linux specific fields: 437 * Linux specific fields:
438 */ 438 */
439 __u32 next_mark_ppos; /* when known, points to next marker */ 439 __be32 next_mark_ppos; /* when known, points to next marker */
440 __u32 last_mark_lbn; /* storing log_blk_num of last mark is extends ADR spec */ 440 __be32 last_mark_lbn; /* storing log_blk_num of last mark is extends ADR spec */
441 __u8 linux_specific[24]; 441 __u8 linux_specific[24];
442 442
443 __u8 reserved_256_511[256]; 443 __u8 reserved_256_511[256];
@@ -450,19 +450,19 @@ typedef struct os_fm_tab_s {
450 __u8 reserved_1; 450 __u8 reserved_1;
451 __u8 fm_tab_ent_sz; 451 __u8 fm_tab_ent_sz;
452 __u8 reserved_3; 452 __u8 reserved_3;
453 __u16 fm_tab_ent_cnt; 453 __be16 fm_tab_ent_cnt;
454 __u8 reserved6_15[10]; 454 __u8 reserved6_15[10];
455 __u32 fm_tab_ent[OS_FM_TAB_MAX]; 455 __be32 fm_tab_ent[OS_FM_TAB_MAX];
456} os_fm_tab_t; 456} os_fm_tab_t;
457 457
458typedef struct os_ext_trk_ey_s { 458typedef struct os_ext_trk_ey_s {
459 __u8 et_part_num; 459 __u8 et_part_num;
460 __u8 fmt; 460 __u8 fmt;
461 __u16 fm_tab_off; 461 __be16 fm_tab_off;
462 __u8 reserved4_7[4]; 462 __u8 reserved4_7[4];
463 __u32 last_hlb_hi; 463 __be32 last_hlb_hi;
464 __u32 last_hlb; 464 __be32 last_hlb;
465 __u32 last_pp; 465 __be32 last_pp;
466 __u8 reserved20_31[12]; 466 __u8 reserved20_31[12];
467} os_ext_trk_ey_t; 467} os_ext_trk_ey_t;
468 468
@@ -479,17 +479,17 @@ typedef struct os_header_s {
479 char ident_str[8]; 479 char ident_str[8];
480 __u8 major_rev; 480 __u8 major_rev;
481 __u8 minor_rev; 481 __u8 minor_rev;
482 __u16 ext_trk_tb_off; 482 __be16 ext_trk_tb_off;
483 __u8 reserved12_15[4]; 483 __u8 reserved12_15[4];
484 __u8 pt_par_num; 484 __u8 pt_par_num;
485 __u8 pt_reserved1_3[3]; 485 __u8 pt_reserved1_3[3];
486 os_partition_t partition[16]; 486 os_partition_t partition[16];
487 __u32 cfg_col_width; 487 __be32 cfg_col_width;
488 __u32 dat_col_width; 488 __be32 dat_col_width;
489 __u32 qfa_col_width; 489 __be32 qfa_col_width;
490 __u8 cartridge[16]; 490 __u8 cartridge[16];
491 __u8 reserved304_511[208]; 491 __u8 reserved304_511[208];
492 __u32 old_filemark_list[16680/4]; /* in ADR 1.4 __u8 track_table[16680] */ 492 __be32 old_filemark_list[16680/4]; /* in ADR 1.4 __u8 track_table[16680] */
493 os_ext_trk_tb_t ext_track_tb; 493 os_ext_trk_tb_t ext_track_tb;
494 __u8 reserved17272_17735[464]; 494 __u8 reserved17272_17735[464];
495 os_fm_tab_t dat_fm_tab; 495 os_fm_tab_t dat_fm_tab;