]> Git Repo - linux.git/commit - drivers/target/target_core_spc.c
target: Fix incorrect starting offset after MODE_SENSE refactoring
authorNicholas Bellinger <[email protected]>
Fri, 2 Nov 2012 01:43:03 +0000 (18:43 -0700)
committerNicholas Bellinger <[email protected]>
Wed, 7 Nov 2012 04:55:46 +0000 (20:55 -0800)
commitfecae40abb1ae9218bdbaa8b8e30bfb5ae43f522
tree3f804933534a773ff86664a81352ecf5bd4df868
parent3a3c5e4a672c5cd61cbdcedcd027312577f9ab7c
target: Fix incorrect starting offset after MODE_SENSE refactoring

This patch fixes a new off-by-one bug in the hardcoded starting offset of
spc_emulate_modesense() code that causes BLOCK DESCRIPTOR to be incorrectly
written within the MEDIUM TYPE buffer area of the mode parameter header.

According to spc4r30, Section 7.5.4, BLOCK DESCRIPTOR for MODE_SENSE_10
starts at byte 3, and BLOCK_DESCRIPTOR for MODE_SENSE (6) starts at byte 2.

(roland: add MODE DATA LENGTH + MEDIUM TYPE offset comment)

Cc: Roland Dreier <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Douglas Gilbert <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
drivers/target/target_core_spc.c
This page took 0.044887 seconds and 4 git commands to generate.