[stgt] [PATCH] MODE_SENSE: add support for mode subpages

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Sat Jul 28 08:12:24 CEST 2012


On Sun, 22 Jul 2012 14:13:22 +1000
Ronnie Sahlberg <ronniesahlberg at gmail.com> wrote:

> Add support for mode subpages.
> Change the modepages from an array of pointers to a linked list
> so that we can store an arbitrary number od mode pages with the same
> page code (but different subpage codes)
> 
> Add a simple modepage with a subpage code 0x0a/0x01 which is the
> ControlExtensions subpage.
> Have TCMOS set to 1 in this subpage.
> This value has the following meaning (SPC):
>     A timestamp changeable by methods outside this standard (TCMOS)
>     bit set to one specifies that the timestamp may
>     be initialized by methods outside the scope of this standard.
> 
> Which sounds appropriate since root or ntpd can change the
> local time on linux without first asking TGTD and SPC for permission first :-)
> 
> Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> ---
>  usr/bs_rdwr.c |   12 +++++++-
>  usr/mmc.c     |    4 ++-
>  usr/sbc.c     |   15 +++++++++--
>  usr/smc.c     |    8 +++--
>  usr/spc.c     |   76 +++++++++++++++++++++++++++++++++++++-------------------
>  usr/spc.h     |    4 ++-
>  usr/ssc.c     |    4 ++-
>  usr/target.c  |    1 +
>  usr/tgtd.h    |    3 +-
>  9 files changed, 89 insertions(+), 38 deletions(-)

Thanks! Looks good. I got one compile warning:

spc.c: In function ‘build_mode_page’:
spc.c:566: warning: ‘hdr_size’ may be used uninitialized in this function


Can you send the updated patch? Please fold the subpage patch into the
updated patch.

Thanks,

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list