Bug #1767

Bug #1450: Illumos should be buildable with GCC4

sd returns incorrect Q sub-channel data

Added by Rich Lowe over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2011-11-11
Priority:Normal Due date:
Assignee:Rich Lowe % Done:

100%

Category:kernel Spent time: -
Target version:-
Difficulty:Bite-size Tags:

Description

Underneath the CDROMSUBCHNL ioctl, in sr_read_subchannel, sd(7D) does

diff --git a/usr/src/uts/common/io/scsi/targets/sd.c b/usr/src/uts/common/io/scsi/targets/sd.c
index eb5146c..b330a50 100644
--- a/usr/src/uts/common/io/scsi/targets/sd.c
+++ usr/src/uts/common/io/scsi/targets/sd.c
@@ -27696,7 +27696,7 @@ sr_read_subchannel(dev_t dev, caddr_t data, int flag)

     /* Process the returned Q sub-channel data */
     subchnl->cdsc_audiostatus = buffer[1];
    subchnl->cdsc_adr    = (buffer[5] & 0xF0) >> 4;
     subchnl->cdsc_ctrl    = (buffer[5] & 0x0F);
     subchnl->cdsc_trk    = buffer[6];
     subchnl->cdsc_ind    = buffer[7];

The ADR and CTRL fields are each 4 bits of the same byte. We need to shift the ADR down 4 to avoid the cdsc_adr field being constant 0.

History

Updated by Rich Lowe over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Resolved in r13520 fd89fd56f8d7

Also available in: Atom PDF