]> git.baikalelectronics.ru Git - kernel.git/commit
target: Fix reporting of supported VPD pages
authorRoland Dreier <roland@purestorage.com>
Tue, 5 Jul 2011 20:34:51 +0000 (13:34 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 22 Jul 2011 09:37:47 +0000 (09:37 +0000)
commit7875e64e9aa476bb5f6acddc58b56128ce965ed6
tree3eec44a2dcec8d389a5363f2d7b0748a904eceae
parentbf4a80cbd81ac79a262a1157e69f0bd26da9c7bf
target: Fix reporting of supported VPD pages

The current handling of VPD page 00h (Supported VPD Pages) for INQUIRY
commands has a couple of problems:

 - The page length field is incorrectly set to 3, so the entry for 86h
   (Extended INQUIRY Data) is ignored since it is in the fourth slot.
 - Even though the code handles pages B0h and B2h, those pages aren't
   mentioned in the Supported VPD Pages list, so eg the Linux SCSI stack
   won't actually try to use them.

Fix these problems and make things more robust to avoid future problems
by moving to a table of supported VPD pages, which means that any added
VPD page support will automatically get reported on page 0.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_cdb.c