Searched hist:d4b2b867 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/target/ |
H A D | target_core_spc.c | d4b2b867 Wed Oct 31 11:16:48 CDT 2012 Roland Dreier <roland@purestorage.com> target: Refactor MODE SENSE emulation
Convert spc_emulate_modesense() to use a table of mode pages, rather than a switch statement. This makes it possible to add more pages sanely -- in particular we no longer need to make sure we keep the 0x3f (return all mode pages) case in sync.
While we're touching this code, make our MODE SENSE emulation a bit better in a couple of ways: - When the initiator passes PC == 1 asking for changeable values, return all 0s to show we don't support setting anything. - Return a block descriptor for disk devices.
(nab: fix up device attribute references to use dev->dev_attrib in for-next code)
Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> d4b2b867 Wed Oct 31 11:16:48 CDT 2012 Roland Dreier <roland@purestorage.com> target: Refactor MODE SENSE emulation Convert spc_emulate_modesense() to use a table of mode pages, rather than a switch statement. This makes it possible to add more pages sanely -- in particular we no longer need to make sure we keep the 0x3f (return all mode pages) case in sync. While we're touching this code, make our MODE SENSE emulation a bit better in a couple of ways: - When the initiator passes PC == 1 asking for changeable values, return all 0s to show we don't support setting anything. - Return a block descriptor for disk devices. (nab: fix up device attribute references to use dev->dev_attrib in for-next code) Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
|