SCCS-vsn: sys/vax/vax/mscp.c 1.3
SCCS-vsn: sys/vax/vax/mscpvar.h 1.2
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)mscp.c 1.2 (Berkeley) %G%
+ * @(#)mscp.c 1.3 (Berkeley) %G%
#include "buf.h"
#include "errno.h"
#include "dkstat.h"
#include "buf.h"
#include "errno.h"
#include "dkstat.h"
+#include "ioctl.h"
+#include "disklabel.h"
#include "syslog.h"
#include "../vaxuba/ubavar.h"
#include "syslog.h"
#include "../vaxuba/ubavar.h"
goto out;
case MSCP_FAILED: /* no luck */
goto out;
case MSCP_FAILED: /* no luck */
- harderr(bp, drivename);
+ diskerr(bp, drivename, "hard error",
+ LOG_PRINTF, -1, &md->md_lab[ui->ui_unit]);
mscp_printevent(mp);
bp->b_flags |= B_ERROR;
bp->b_error = EIO;
mscp_printevent(mp);
bp->b_flags |= B_ERROR;
bp->b_error = EIO;
else
scm = cdc->cdc_submsgs[sc];
}
else
scm = cdc->cdc_submsgs[sc];
}
- printf("%s (%s) (code %d, subcode %d)\n", cm, scm, c, sc);
+ printf(" %s (%s) (code %d, subcode %d)\n", cm, scm, c, sc);
#define BADCODE(h) (codemsg[(unsigned)(h) >> 28])
#define BADLBN(h) ((h) & 0xfffffff)
#define BADCODE(h) (codemsg[(unsigned)(h) >> 28])
#define BADLBN(h) ((h) & 0xfffffff)
- printf("%s%d: %s error datagram%s: ", name, ctlr,
+ printf("%s%d: %s error datagram%s:", name, ctlr,
issoft ? "soft" : "hard",
mp->mscp_flags & M_LF_CONT ? " (continuing)" : "");
switch (mp->mscp_format & 0377) {
issoft ? "soft" : "hard",
mp->mscp_flags & M_LF_CONT ? " (continuing)" : "");
switch (mp->mscp_format & 0377) {
break;
case M_FM_BUSADDR: /* host memory access error */
break;
case M_FM_BUSADDR: /* host memory access error */
- printf("memory addr 0x%x: ", mp->mscp_erd.erd_busaddr);
+ printf(" memory addr 0x%x:", mp->mscp_erd.erd_busaddr);
break;
case M_FM_DISKTRN:
break;
case M_FM_DISKTRN:
- printf("unit %d: level %d retry %d, %s %d: ",
+ printf(" unit %d: level %d retry %d, %s %d:",
mp->mscp_unit,
mp->mscp_erd.erd_level, mp->mscp_erd.erd_retry,
BADCODE(mp->mscp_erd.erd_hdr),
mp->mscp_unit,
mp->mscp_erd.erd_level, mp->mscp_erd.erd_retry,
BADCODE(mp->mscp_erd.erd_hdr),
- printf("unit %d: %s %d: ", mp->mscp_unit,
+ printf(" unit %d: %s %d:", mp->mscp_unit,
BADCODE(mp->mscp_erd.erd_hdr),
BADLBN(mp->mscp_erd.erd_hdr));
break;
case M_FM_SMLDSK:
BADCODE(mp->mscp_erd.erd_hdr),
BADLBN(mp->mscp_erd.erd_hdr));
break;
case M_FM_SMLDSK:
- printf("unit %d: small disk error, cyl %d: ",
+ printf(" unit %d: small disk error, cyl %d:",
mp->mscp_unit, mp->mscp_erd.erd_sdecyl);
break;
default:
mp->mscp_unit, mp->mscp_erd.erd_sdecyl);
break;
default:
- printf("unit %d: unknown error, format 0x%x: ",
+ printf(" unit %d: unknown error, format 0x%x:",
mp->mscp_unit, mp->mscp_format);
}
mscp_printevent(mp);
mp->mscp_unit, mp->mscp_format);
}
mscp_printevent(mp);
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)mscpvar.h 1.1 (Berkeley) %G%
+ * @(#)mscpvar.h 1.2 (Berkeley) %G%
int md_nunits; /* total number drives (all ctlrs) */
int md_unitshift; /* device number to unit: >> count */
struct buf *md_utab; /* pointer to device queues */
int md_nunits; /* total number drives (all ctlrs) */
int md_unitshift; /* device number to unit: >> count */
struct buf *md_utab; /* pointer to device queues */
+ struct disklabel *md_lab; /* pointer to devicee disklabels */
struct uba_device **md_dinfo; /* pointer to device info */
int (*md_dgram)(); /* error datagram */
int (*md_ctlrdone)(); /* controller operation complete */
struct uba_device **md_dinfo; /* pointer to device info */
int (*md_dgram)(); /* error datagram */
int (*md_ctlrdone)(); /* controller operation complete */