Do the minor changes needed because of change to ccb_getdev structure.

JKH Trading Stamps applied.

Reviewed by:	gibbs@freebsd.org, ken@freebsd.org
This commit is contained in:
Matt Jacob 2000-01-17 06:27:37 +00:00
parent ab6eec3ad9
commit 10b6172afb
6 changed files with 16 additions and 14 deletions

View File

@ -498,7 +498,8 @@ cdasync(void *callback_arg, u_int32_t code,
cgd = (struct ccb_getdev *)arg;
if ((cgd->pd_type != T_CDROM) && (cgd->pd_type != T_WORM))
if (SID_TYPE(&cgd->inq_data) != T_CDROM
&& SID_TYPE(&cgd->inq_data) != T_WORM)
break;
/*
@ -604,7 +605,7 @@ cdregister(struct cam_periph *periph, void *arg)
* the structure and indicate that we don't have the blocksize
* yet. Unlike other SCSI peripheral drivers, we explicitly set
* the device type here to be CDROM, rather than just ORing in
* cgd->pd_type. This is because this driver can attach to either
* the device type. This is because this driver can attach to either
* CDROM or WORM devices, and we want this peripheral driver to
* show up in the devstat list as a CD peripheral driver, not a
* WORM peripheral driver. WORM drives will also have the WORM
@ -1689,7 +1690,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
scsi_sense_key_text[sense_key],
scsi_sense_desc(asc,ascq,
&cgd.inq_data));
else if (cgd.pd_type == T_CDROM) {
else if (SID_TYPE(&cgd.inq_data) == T_CDROM) {
/*
* We only print out an error for
* CDROM type devices. For WORM

View File

@ -330,7 +330,7 @@ chasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
cgd = (struct ccb_getdev *)arg;
if (cgd->pd_type != T_CHANGER)
if (SID_TYPE(&cgd->inq_data)!= T_CHANGER)
break;
/*
@ -396,7 +396,7 @@ chregister(struct cam_periph *periph, void *arg)
devstat_add_entry(&softc->device_stats, "ch",
periph->unit_number, 0,
DEVSTAT_NO_BLOCKSIZE | DEVSTAT_NO_ORDERED_TAGS,
cgd->pd_type | DEVSTAT_TYPE_IF_SCSI,
SID_TYPE(&cgd->inq_data)| DEVSTAT_TYPE_IF_SCSI,
DEVSTAT_PRIORITY_OTHER);
/* Register the device */

View File

@ -836,7 +836,8 @@ daasync(void *callback_arg, u_int32_t code,
cgd = (struct ccb_getdev *)arg;
if ((cgd->pd_type != T_DIRECT) && (cgd->pd_type != T_OPTICAL))
if (SID_TYPE(&cgd->inq_data) != T_DIRECT
&& SID_TYPE(&cgd->inq_data) != T_OPTICAL)
break;
/*
@ -960,7 +961,7 @@ daregister(struct cam_periph *periph, void *arg)
devstat_add_entry(&softc->device_stats, "da",
periph->unit_number, 0,
DEVSTAT_BS_UNAVAILABLE,
cgd->pd_type | DEVSTAT_TYPE_IF_SCSI,
SID_TYPE(&cgd->inq_data) | DEVSTAT_TYPE_IF_SCSI,
DEVSTAT_PRIORITY_DISK);
/*

View File

@ -314,7 +314,7 @@ passregister(struct cam_periph *periph, void *arg)
bzero(softc, sizeof(*softc));
softc->state = PASS_STATE_NORMAL;
softc->pd_type = cgd->pd_type;
softc->pd_type = SID_TYPE(&cgd->inq_data);
bufq_init(&softc->buf_queue);
periph->softc = softc;
@ -327,7 +327,7 @@ passregister(struct cam_periph *periph, void *arg)
*/
devstat_add_entry(&softc->device_stats, "pass", periph->unit_number,
0, DEVSTAT_NO_BLOCKSIZE | DEVSTAT_NO_ORDERED_TAGS,
cgd->pd_type |
softc->pd_type |
DEVSTAT_TYPE_IF_SCSI |
DEVSTAT_TYPE_PASS,
DEVSTAT_PRIORITY_PASS);

View File

@ -350,7 +350,7 @@ ptctor(struct cam_periph *periph, void *arg)
devstat_add_entry(&softc->device_stats, "pt",
periph->unit_number, 0,
DEVSTAT_NO_BLOCKSIZE,
cgd->pd_type | DEVSTAT_TYPE_IF_SCSI,
SID_TYPE(&cgd->inq_data) | DEVSTAT_TYPE_IF_SCSI,
DEVSTAT_PRIORITY_OTHER);
softc->dev = make_dev(&pt_cdevsw, periph->unit_number, UID_ROOT,
@ -457,7 +457,7 @@ ptasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
cgd = (struct ccb_getdev *)arg;
if (cgd->pd_type != T_PROCESSOR)
if (SID_TYPE(&cgd->inq_data) != T_PROCESSOR)
break;
/*

View File

@ -1309,7 +1309,7 @@ saasync(void *callback_arg, u_int32_t code,
cgd = (struct ccb_getdev *)arg;
if (cgd->pd_type != T_SEQUENTIAL)
if (SID_TYPE(&cgd->inq_data) != T_SEQUENTIAL)
break;
/*
@ -1397,8 +1397,8 @@ saregister(struct cam_periph *periph, void *arg)
* indicate that the blocksize is unavailable right now.
*/
devstat_add_entry(&softc->device_stats, "sa", periph->unit_number, 0,
DEVSTAT_BS_UNAVAILABLE, cgd->pd_type | DEVSTAT_TYPE_IF_SCSI,
DEVSTAT_PRIORITY_TAPE);
DEVSTAT_BS_UNAVAILABLE, SID_TYPE(&cgd->inq_data) |
DEVSTAT_TYPE_IF_SCSI, DEVSTAT_PRIORITY_TAPE);
softc->devs.ctl_dev = make_dev(&sa_cdevsw, SAMINOR(SA_CTLDEV,
periph->unit_number, 0, SA_ATYPE_R), UID_ROOT, GID_OPERATOR,