diff options
author | pirzyk <pirzyk@FreeBSD.org> | 2002-10-18 04:53:46 +0000 |
---|---|---|
committer | pirzyk <pirzyk@FreeBSD.org> | 2002-10-18 04:53:46 +0000 |
commit | 998ebed49d4b71d2956b4a0134cf8691953e1b56 (patch) | |
tree | ced2b2cd0b76b0918301640ee79207cf629fd881 /sys | |
parent | 3bf0e96c4943c0e7ac50159ee6d46cf05033db6d (diff) | |
download | FreeBSD-src-998ebed49d4b71d2956b4a0134cf8691953e1b56.zip FreeBSD-src-998ebed49d4b71d2956b4a0134cf8691953e1b56.tar.gz |
Backout my previous "brain cramp" commit.
Requested by: Most developers
Apologies to: Most developers, with special note to <ken@kdm.org>
Collabroation in the future with: Kenneth D. Merry <ken@kdm.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 1881198fc..a7af9ba 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -2632,7 +2632,7 @@ cdreadsubchannel(struct cam_periph *periph, u_int32_t mode, static int cdgetmode(struct cam_periph *periph, struct cd_mode_data *data, u_int32_t page) { - struct scsi_mode_sense_10 *scsi_cmd; + struct scsi_mode_sense_6 *scsi_cmd; struct ccb_scsiio *csio; union ccb *ccb; int error; @@ -2650,16 +2650,15 @@ cdgetmode(struct cam_periph *periph, struct cd_mode_data *data, u_int32_t page) /* data_ptr */ (u_int8_t *)data, /* dxfer_len */ sizeof(*data), /* sense_len */ SSD_FULL_SIZE, - sizeof(struct scsi_mode_sense_10), + sizeof(struct scsi_mode_sense_6), /* timeout */ 50000); - scsi_cmd = (struct scsi_mode_sense_10 *)&csio->cdb_io.cdb_bytes; + scsi_cmd = (struct scsi_mode_sense_6 *)&csio->cdb_io.cdb_bytes; bzero (scsi_cmd, sizeof(*scsi_cmd)); scsi_cmd->page = page; - scsi_cmd->length[0] = (sizeof(*data)) >> 8; - scsi_cmd->length[1] = (sizeof(*data)) & 0xff; - scsi_cmd->opcode = MODE_SENSE_10; + scsi_cmd->length = sizeof(*data) & 0xff; + scsi_cmd->opcode = MODE_SENSE; error = cdrunccb(ccb, cderror, /*cam_flags*/CAM_RETRY_SELTO, /*sense_flags*/SF_RETRY_UA); @@ -2672,7 +2671,7 @@ cdgetmode(struct cam_periph *periph, struct cd_mode_data *data, u_int32_t page) static int cdsetmode(struct cam_periph *periph, struct cd_mode_data *data) { - struct scsi_mode_select_10 *scsi_cmd; + struct scsi_mode_select_6 *scsi_cmd; struct ccb_scsiio *csio; union ccb *ccb; int error; @@ -2691,16 +2690,15 @@ cdsetmode(struct cam_periph *periph, struct cd_mode_data *data) /* data_ptr */ (u_int8_t *)data, /* dxfer_len */ sizeof(*data), /* sense_len */ SSD_FULL_SIZE, - sizeof(struct scsi_mode_select_10), + sizeof(struct scsi_mode_select_6), /* timeout */ 50000); - scsi_cmd = (struct scsi_mode_select_10 *)&csio->cdb_io.cdb_bytes; + scsi_cmd = (struct scsi_mode_select_6 *)&csio->cdb_io.cdb_bytes; bzero(scsi_cmd, sizeof(*scsi_cmd)); scsi_cmd->opcode = MODE_SELECT; scsi_cmd->byte2 |= SMS_PF; - scsi_cmd->length[0] = (sizeof(*data)) >> 8; - scsi_cmd->length[1] = (sizeof(*data)) & 0xff; + scsi_cmd->length = sizeof(*data) & 0xff; data->header.data_length = 0; /* * SONY drives do not allow a mode select with a medium_type |