Re: Minor bug in SCSI definition
On 13.11.2014 05:44, NGie Cooper wrote: > On Wed, Nov 12, 2014 at 7:30 PM, Rang, Anton wrote: >> Coverity found an issue in this area which I tracked down to the incorrect >> definition patched below. >> >> The SID_QUAL macro is (((inq_data)->device & 0xE0) >> 5) which extracts the >> peripheral qualifier. >> Per SCSI-2 (draft 10L) table 46, the vendor-specific values are "1XXb". >> >> This probably affects almost nobody, but it will clear up a couple of >> Coverity warnings. >> >> Anton >> >> Index: sys/cam/scsi/scsi_all.h >> === >> --- sys/cam/scsi/scsi_all.h (revision 274352) >> +++ sys/cam/scsi/scsi_all.h (working copy) >> @@ -1817,7 +1817,7 @@ >> * reserved for >> this peripheral >> * qualifier. >> */ >> -#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & >> 0x08) != 0) >> +#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & >> 0x04) != 0) >>u_int8_t dev_qual2; >> #define SID_QUAL2 0x7F >> #define SID_LU_CONG0x40 > > CCing ken@/mav@/scottl@ -- thanks! Looks good to me. Committed it to head at r274477. Thank you! -- Alexander Motin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Minor bug in SCSI definition
On Wed, Nov 12, 2014 at 7:30 PM, Rang, Anton wrote: > Coverity found an issue in this area which I tracked down to the incorrect > definition patched below. > > The SID_QUAL macro is (((inq_data)->device & 0xE0) >> 5) which extracts the > peripheral qualifier. > Per SCSI-2 (draft 10L) table 46, the vendor-specific values are "1XXb". > > This probably affects almost nobody, but it will clear up a couple of > Coverity warnings. > > Anton > > Index: sys/cam/scsi/scsi_all.h > === > --- sys/cam/scsi/scsi_all.h (revision 274352) > +++ sys/cam/scsi/scsi_all.h (working copy) > @@ -1817,7 +1817,7 @@ > * reserved for > this peripheral > * qualifier. > */ > -#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & > 0x08) != 0) > +#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & > 0x04) != 0) >u_int8_t dev_qual2; > #define SID_QUAL2 0x7F > #define SID_LU_CONG0x40 CCing ken@/mav@/scottl@ -- thanks! ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Minor bug in SCSI definition
Coverity found an issue in this area which I tracked down to the incorrect definition patched below. The SID_QUAL macro is (((inq_data)->device & 0xE0) >> 5) which extracts the peripheral qualifier. Per SCSI-2 (draft 10L) table 46, the vendor-specific values are "1XXb". This probably affects almost nobody, but it will clear up a couple of Coverity warnings. Anton Index: sys/cam/scsi/scsi_all.h === --- sys/cam/scsi/scsi_all.h (revision 274352) +++ sys/cam/scsi/scsi_all.h (working copy) @@ -1817,7 +1817,7 @@ * reserved for this peripheral * qualifier. */ -#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & 0x08) != 0) +#define SID_QUAL_IS_VENDOR_UNIQUE(inq_data) ((SID_QUAL(inq_data) & 0x04) != 0) u_int8_t dev_qual2; #define SID_QUAL2 0x7F #define SID_LU_CONG0x40 ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"