aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r--drivers/scsi/scsi_debug.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 3901125455c9..01d11a01ffbf 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -643,6 +643,14 @@ static int inquiry_evpd_b0(unsigned char * arr)
643 return sizeof(vpdb0_data); 643 return sizeof(vpdb0_data);
644} 644}
645 645
646static int inquiry_evpd_b1(unsigned char *arr)
647{
648 memset(arr, 0, 0x3c);
649 arr[0] = 0;
650 arr[1] = 1;
651
652 return 0x3c;
653}
646 654
647#define SDEBUG_LONG_INQ_SZ 96 655#define SDEBUG_LONG_INQ_SZ 96
648#define SDEBUG_MAX_INQ_ARR_SZ 584 656#define SDEBUG_MAX_INQ_ARR_SZ 584
@@ -698,6 +706,7 @@ static int resp_inquiry(struct scsi_cmnd * scp, int target,
698 arr[n++] = 0x88; /* SCSI ports */ 706 arr[n++] = 0x88; /* SCSI ports */
699 arr[n++] = 0x89; /* ATA information */ 707 arr[n++] = 0x89; /* ATA information */
700 arr[n++] = 0xb0; /* Block limits (SBC) */ 708 arr[n++] = 0xb0; /* Block limits (SBC) */
709 arr[n++] = 0xb1; /* Block characteristics (SBC) */
701 arr[3] = n - 4; /* number of supported VPD pages */ 710 arr[3] = n - 4; /* number of supported VPD pages */
702 } else if (0x80 == cmd[2]) { /* unit serial number */ 711 } else if (0x80 == cmd[2]) { /* unit serial number */
703 arr[1] = cmd[2]; /*sanity */ 712 arr[1] = cmd[2]; /*sanity */
@@ -737,6 +746,9 @@ static int resp_inquiry(struct scsi_cmnd * scp, int target,
737 } else if (0xb0 == cmd[2]) { /* Block limits (SBC) */ 746 } else if (0xb0 == cmd[2]) { /* Block limits (SBC) */
738 arr[1] = cmd[2]; /*sanity */ 747 arr[1] = cmd[2]; /*sanity */
739 arr[3] = inquiry_evpd_b0(&arr[4]); 748 arr[3] = inquiry_evpd_b0(&arr[4]);
749 } else if (0xb1 == cmd[2]) { /* Block characteristics (SBC) */
750 arr[1] = cmd[2]; /*sanity */
751 arr[3] = inquiry_evpd_b1(&arr[4]);
740 } else { 752 } else {
741 /* Illegal request, invalid field in cdb */ 753 /* Illegal request, invalid field in cdb */
742 mk_sense_buffer(devip, ILLEGAL_REQUEST, 754 mk_sense_buffer(devip, ILLEGAL_REQUEST,