From: Nicholas Bellinger Date: Thu, 11 Aug 2011 01:41:14 +0000 (-0700) Subject: target: Fix SYNCHRONIZE_CACHE zero LBA + range breakage X-Git-Tag: v3.1-rc4~43^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7abbe7f3e4243e28a9169ee1b8d76f10a6f5d37c;p=pandora-kernel.git target: Fix SYNCHRONIZE_CACHE zero LBA + range breakage This patch fixes a SYNCHRONIZE_CACHE CDB handling bug with IBLOCK/FILEIO backends where transport_cmd_get_valid_sectors() was incorrectly rejecting a zero LBA + range CDB from being processed, and returning CHECK_CONDITION. This includes changing transport_cmd_get_valid_sectors() to return '0' on success and '-EINVAL' on failure (this makes more sense than sectors), and to only check transport_cmd_get_valid_sectors() when a non zero LBA + range SYNCHRONIZE_CACHE operation has been receieved for the non passthrough case. Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed