Bug #1450: Illumos should be buildable with GCC4
pmcs should set (now) reserved INQUIRY device type modifier to 0
|Assignee:||Rich Lowe||% Done:||
|Category:||driver - device drivers|
pmcs(7D) contains code like this:
inqp = (struct scsi_inquiry *)rp; inqp->inq_qual = (LE_16(id->word0) & 0x80) ? 0x80 : 0;
This is a no-op, as the inq_qual field is only 7 bits, and GCC4 warns about
this (GCC3 optimizes it to constant 0 silently, Studio does neither). Note
that despite being described in comments as "device type qualifier", this is
actually referred to as "device type modifier" by everyone else.
These bits of byte1 are marked reserved in draft SPC-4 6.4.2, SPC-3 6.4.2,
and SPC-2 7.3.4, they're also unused by the system, except that format(1M)
will display them if set.
As such, we should just assign a constant 0 to this field directly, rather
than via the convoluted manner we do now.
|related to illumos gate - Bug #1655: ata erroneously treats inq_qual as DPQ||New||2011-10-15|
Updated by Rich Lowe over 3 years ago
- Status changed from New to In Progress
Actually, since we're claiming SPC-3 (inq_ansi = 5), and response format 2 (inq_rdf = 2) this field should be 0 in general, and its status in other standards (that is, those other than the one we are stating) are immaterial.