Date: Fri, 23 Mar 2012 14:47:36 -0700 From: Chuck Tuffli <chuck@tuffli.net> To: freebsd-scsi <freebsd-scsi@freebsd.org> Subject: INQUIRY additional length question Message-ID: <CAM0tzX0iVa%2Bj0VeMzzanOGN0=S9FypPn2zEYwHCYV2%2BnmuSZKw@mail.gmail.com>
index | next in thread | raw e-mail
I'm staring at a trace in which an array is sending back inquiry data with the additional length set to 0xBC, but CAM is sending a subsequent inquiry with length 0xC2. My expectation was the length should have been (additional length + 4) or 0xC0. Poking around, it looks like the SID_ADDITIONAL_LENGTH() macro is calculating this as: additional_length + __offsetof(additional_length) + 1 == 0xBC + 4 + 1 = 0xC1 This value is then round up to 0xC2 in probestart() with a comment about some SPI devices not liking odd lengths. All of this seems fine to me except the '+ 1' in the macro. Should that really be there? ---chuckhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM0tzX0iVa%2Bj0VeMzzanOGN0=S9FypPn2zEYwHCYV2%2BnmuSZKw>
