On Sat, 8 Aug 2009, Marc Balmer wrote:
But the calculated value of *_select_len is actually passed to
routine scsipi_mode_select() a little bit later on, so we still
need the calculated value.
why cant sizeof be used there, too?
It actually controls amount of data that is sent to the device.
Most devices have 0 bytes for st->page_0_size but some have 12 bytes.
The attached patch revision includes the change to use sizeof() in
the calls to memset(), adds a KASSERT when loading the quirk data to
ensure that the st->page_0_size is not larger than MAX_PAGE_0_SIZE,
and adds the necessary quirk for my tape drive.