Roland Dreier d4b2b86719 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>
2012-11-06 20:55:46 -08:00
..
2012-10-15 14:45:51 -04:00
2012-10-02 17:26:42 -07:00
2012-10-07 20:55:16 +09:00
2012-10-24 16:58:53 +02:00
2012-10-26 02:20:36 -04:00
2012-10-07 17:29:24 +09:00
2012-10-10 20:15:24 +09:00
2012-11-02 21:58:09 -04:00
2012-10-17 15:53:03 -05:00
2012-10-09 16:11:46 +09:00
2012-10-10 20:15:24 +09:00
2012-10-18 17:50:08 +02:00
2012-10-28 11:13:54 -07:00
2012-10-26 10:25:31 -07:00
2012-11-02 13:26:11 -07:00
2012-10-01 12:09:59 -07:00
2012-11-02 13:26:11 -07:00
2012-10-01 18:46:13 -07:00
2012-10-16 18:07:12 -07:00