/* sectors/track */
sgilabel->devparam.bytes = cpu_to_be16(cxt->sector_size);
sgilabel->devparam.ilfact = cpu_to_be16(1);
- sgilabel->devparam.flags = cpu_to_be32(TRACK_FWD|\
- IGNORE_ERRORS|RESEEK);
+ sgilabel->devparam.flags = cpu_to_be32(
+ SGI_DEVPARAM_TRACK_FWD
+ | SGI_DEVPARAM_IGNORE_ERRORS
+ | SGI_DEVPARAM_RESEEK);
sgilabel->devparam.datarate = cpu_to_be32(0);
sgilabel->devparam.retries_on_error = cpu_to_be32(1);
sgilabel->devparam.ms_per_word = cpu_to_be32(0);
#include "bitops.h"
#include "pt-sgi.h"
-/*
- * controller flags
- */
-#define SECTOR_SLIP 0x01
-#define SECTOR_FWD 0x02
-#define TRACK_FWD 0x04
-#define TRACK_MULTIVOL 0x08
-#define IGNORE_ERRORS 0x10
-#define RESEEK 0x20
-#define CMDTAGQ_ENABLE 0x40
-#
/* toggle flags */
#define SGI_FLAG_BOOT 1
#define SGI_FLAG_SWAP 2
uint16_t nsect; /* sectors/tracks in cyl 0 or vol 0 */
uint16_t bytes;
uint16_t ilfact;
- uint32_t flags; /* controller flags */
+ uint32_t flags; /* SGI_DEVPARAM_* controller flags */
uint32_t datarate;
uint32_t retries_on_error;
uint32_t ms_per_word;
uint16_t xylogics_writecont;
} __attribute__((packed));
+enum {
+ SGI_DEVPARAM_SECTOR_SLIP = 0x01,
+ SGI_DEVPARAM_SECTOR_FWD = 0x02,
+ SGI_DEVPARAM_TRACK_FWD = 0x04,
+ SGI_DEVPARAM_TRACK_MULTIVOL = 0x08,
+ SGI_DEVPARAM_IGNORE_ERRORS = 0x10,
+ SGI_DEVPARAM_RESEEK = 0x20,
+ SGI_DEVPARAM_CMDTAGQ_ENABLE = 0x40
+};
+
+
struct sgi_disklabel {
uint32_t magic; /* magic number */
uint16_t root_part_num; /* # root partition */