1993-05-20 07:46:09 +04:00
|
|
|
/*
|
1994-01-11 20:19:37 +03:00
|
|
|
* $Id: sddefs.h,v 1.5 1994/01/11 17:22:04 mycroft Exp $
|
1993-05-20 07:46:09 +04:00
|
|
|
*/
|
1993-04-12 12:19:28 +04:00
|
|
|
|
|
|
|
struct sd_data {
|
|
|
|
int flags;
|
|
|
|
#define SDVALID 0x02 /* PARAMS LOADED */
|
|
|
|
#define SDINIT 0x04 /* device has been init'd */
|
|
|
|
#define SDWAIT 0x08 /* device has someone waiting */
|
|
|
|
#define SDHAVELABEL 0x10 /* have read the label */
|
1993-05-21 03:12:53 +04:00
|
|
|
#define SDDOSPART 0x20 /* Have read host-dependent partition table */
|
1993-04-12 12:19:28 +04:00
|
|
|
#define SDWRITEPROT 0x40 /* Device in readonly mode (S/W)*/
|
|
|
|
struct scsi_switch *sc_sw; /* address of scsi low level switch */
|
|
|
|
struct scsi_xfer *freexfer; /* chain of free ones */
|
|
|
|
struct buf sdbuf;
|
|
|
|
int formatting; /* format lock */
|
|
|
|
int ctlr; /* so they know which one we want */
|
|
|
|
int targ; /* our scsi target ID */
|
|
|
|
int lu; /* out scsi lu */
|
|
|
|
long int ad_info; /* info about the adapter */
|
|
|
|
int cmdscount; /* cmds allowed outstanding by board*/
|
|
|
|
int wlabel; /* label is writable */
|
|
|
|
struct disk_parms {
|
|
|
|
u_char heads; /* Number of heads */
|
|
|
|
u_short cyls; /* Number of cylinders */
|
|
|
|
u_char sectors; /* Number of sectors/track */
|
|
|
|
u_short secsiz; /* Number of bytes/sector */
|
|
|
|
u_long disksize; /* total number sectors */
|
|
|
|
} params;
|
1993-05-21 03:12:53 +04:00
|
|
|
unsigned int sd_start_of_unix; /* unix vs host-dependent partitions */
|
1993-04-12 12:19:28 +04:00
|
|
|
struct disklabel disklabel;
|
1993-05-21 03:12:53 +04:00
|
|
|
struct cpu_disklabel cpudisklabel;
|
1993-04-12 12:19:28 +04:00
|
|
|
int partflags[MAXPARTITIONS]; /* per partition flags */
|
|
|
|
#define SDOPEN 0x01
|
|
|
|
int openparts; /* one bit for each open partition */
|
|
|
|
int blockwait;
|
|
|
|
};
|
|
|
|
|
1993-05-04 12:27:29 +04:00
|
|
|
int sdattach(int, struct scsi_switch *, int, int *);
|
1993-04-12 12:19:28 +04:00
|
|
|
int sdopen(int);
|
|
|
|
struct scsi_xfer *sd_get_xs(int, int);
|
|
|
|
void sd_free_xs(int, struct scsi_xfer *, int);
|
|
|
|
void sdminphys(struct buf *);
|
1994-01-11 20:19:37 +03:00
|
|
|
void sdstrategy(struct buf *);
|
1993-04-12 12:19:28 +04:00
|
|
|
void sdstart(int);
|
|
|
|
int sd_done(int, struct scsi_xfer *);
|
|
|
|
int sdioctl(dev_t, int, caddr_t, int);
|
|
|
|
int sdgetdisklabel(u_char);
|
|
|
|
int sd_size(int, int);
|
|
|
|
int sd_test_unit_ready(int, int);
|
|
|
|
void sd_dump();
|
|
|
|
int sdsize(dev_t);
|
|
|
|
int sd_interpret_sense(int, struct scsi_xfer *);
|
|
|
|
int sd_scsi_cmd(int, struct scsi_generic *, int, u_char *, int, int, int);
|
|
|
|
int sd_close(dev_t);
|
|
|
|
int sd_get_parms(int, int);
|
|
|
|
int sd_reassign_blocks(int, int);
|
|
|
|
int sd_start_unit(int, int);
|
|
|
|
int sd_prevent(int, int, int);
|