[PATCH 13/15] ssc: add variable-length block write support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 usr/bs_ssc.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/usr/bs_ssc.c b/usr/bs_ssc.c
index 134c670..a7084d0 100644
--- a/usr/bs_ssc.c
+++ b/usr/bs_ssc.c
@@ -496,16 +496,14 @@ static void tape_rdwr_request(struct scsi_cmd *cmd)
 		count = get_unaligned_be24(&cmd->scb[2]);
 		length = scsi_get_out_length(cmd);
 
-		if (!fixed) { /* Until supported */
-			sense_data_build(cmd, ILLEGAL_REQUEST,
-						ASC_INVALID_FIELD_IN_CDB);
-			result = SAM_STAT_CHECK_CONDITION;
-			break;
+		if (!fixed) {
+			block_length = length;
+			count = 1;
 		}
 
 		for (i = 0, ret = 0; i < count; i++) {
 			if (append_blk(cmd, buf, block_length,
-					block_length, BLK_UNCOMPRESS_DATA)) {
+				       block_length, BLK_UNCOMPRESS_DATA)) {
 				sense_data_build(cmd, MEDIUM_ERROR,
 						ASC_WRITE_ERROR);
 				result = SAM_STAT_CHECK_CONDITION;
-- 
1.5.6.5

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

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux