diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 15:55:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 15:55:29 -0400 |
commit | 424a6f6ef990b7e9f56f6627bfc6c46b493faeb4 (patch) | |
tree | 0028356ed8003495fbbe1f716f359e3c8ebc35b6 /drivers/scsi/scsi_debug.c | |
parent | 1ab142d499294b844ecc81e8004db4ce029b0b61 (diff) | |
parent | cd8df932d894f3128c884e3ae1b2b484540513db (diff) |
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
SCSI updates from James Bottomley:
"The update includes the usual assortment of driver updates (lpfc,
qla2xxx, qla4xxx, bfa, bnx2fc, bnx2i, isci, fcoe, hpsa) plus a huge
amount of infrastructure work in the SAS library and transport class
as well as an iSCSI update. There's also a new SCSI based virtio
driver."
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (177 commits)
[SCSI] qla4xxx: Update driver version to 5.02.00-k15
[SCSI] qla4xxx: trivial cleanup
[SCSI] qla4xxx: Fix sparse warning
[SCSI] qla4xxx: Add support for multiple session per host.
[SCSI] qla4xxx: Export CHAP index as sysfs attribute
[SCSI] scsi_transport: Export CHAP index as sysfs attribute
[SCSI] qla4xxx: Add support to display CHAP list and delete CHAP entry
[SCSI] iscsi_transport: Add support to display CHAP list and delete CHAP entry
[SCSI] pm8001: fix endian issue with code optimization.
[SCSI] pm8001: Fix possible racing condition.
[SCSI] pm8001: Fix bogus interrupt state flag issue.
[SCSI] ipr: update PCI ID definitions for new adapters
[SCSI] qla2xxx: handle default case in qla2x00_request_firmware()
[SCSI] isci: improvements in driver unloading routine
[SCSI] isci: improve phy event warnings
[SCSI] isci: debug, provide state-enum-to-string conversions
[SCSI] scsi_transport_sas: 'enable' phys on reset
[SCSI] libsas: don't recover end devices attached to disabled phys
[SCSI] libsas: fixup target_port_protocols for expanders that don't report sata
[SCSI] libsas: set attached device type and target protocols for local phys
...
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 68da6c092f65..591856131c4e 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -126,6 +126,7 @@ static const char * scsi_debug_version_date = "20100324"; | |||
126 | #define SCSI_DEBUG_OPT_TRANSPORT_ERR 16 | 126 | #define SCSI_DEBUG_OPT_TRANSPORT_ERR 16 |
127 | #define SCSI_DEBUG_OPT_DIF_ERR 32 | 127 | #define SCSI_DEBUG_OPT_DIF_ERR 32 |
128 | #define SCSI_DEBUG_OPT_DIX_ERR 64 | 128 | #define SCSI_DEBUG_OPT_DIX_ERR 64 |
129 | #define SCSI_DEBUG_OPT_MAC_TIMEOUT 128 | ||
129 | /* When "every_nth" > 0 then modulo "every_nth" commands: | 130 | /* When "every_nth" > 0 then modulo "every_nth" commands: |
130 | * - a no response is simulated if SCSI_DEBUG_OPT_TIMEOUT is set | 131 | * - a no response is simulated if SCSI_DEBUG_OPT_TIMEOUT is set |
131 | * - a RECOVERED_ERROR is simulated on successful read and write | 132 | * - a RECOVERED_ERROR is simulated on successful read and write |
@@ -2220,7 +2221,7 @@ static int resp_get_lba_status(struct scsi_cmnd * scmd, | |||
2220 | mapped = map_state(lba, &num); | 2221 | mapped = map_state(lba, &num); |
2221 | 2222 | ||
2222 | memset(arr, 0, SDEBUG_GET_LBA_STATUS_LEN); | 2223 | memset(arr, 0, SDEBUG_GET_LBA_STATUS_LEN); |
2223 | put_unaligned_be32(16, &arr[0]); /* Parameter Data Length */ | 2224 | put_unaligned_be32(20, &arr[0]); /* Parameter Data Length */ |
2224 | put_unaligned_be64(lba, &arr[8]); /* LBA */ | 2225 | put_unaligned_be64(lba, &arr[8]); /* LBA */ |
2225 | put_unaligned_be32(num, &arr[16]); /* Number of blocks */ | 2226 | put_unaligned_be32(num, &arr[16]); /* Number of blocks */ |
2226 | arr[20] = !mapped; /* mapped = 0, unmapped = 1 */ | 2227 | arr[20] = !mapped; /* mapped = 0, unmapped = 1 */ |
@@ -3615,6 +3616,9 @@ int scsi_debug_queuecommand_lck(struct scsi_cmnd *SCpnt, done_funct_t done) | |||
3615 | scsi_debug_every_nth = -1; | 3616 | scsi_debug_every_nth = -1; |
3616 | if (SCSI_DEBUG_OPT_TIMEOUT & scsi_debug_opts) | 3617 | if (SCSI_DEBUG_OPT_TIMEOUT & scsi_debug_opts) |
3617 | return 0; /* ignore command causing timeout */ | 3618 | return 0; /* ignore command causing timeout */ |
3619 | else if (SCSI_DEBUG_OPT_MAC_TIMEOUT & scsi_debug_opts && | ||
3620 | scsi_medium_access_command(SCpnt)) | ||
3621 | return 0; /* time out reads and writes */ | ||
3618 | else if (SCSI_DEBUG_OPT_RECOVERED_ERR & scsi_debug_opts) | 3622 | else if (SCSI_DEBUG_OPT_RECOVERED_ERR & scsi_debug_opts) |
3619 | inj_recovered = 1; /* to reads and writes below */ | 3623 | inj_recovered = 1; /* to reads and writes below */ |
3620 | else if (SCSI_DEBUG_OPT_TRANSPORT_ERR & scsi_debug_opts) | 3624 | else if (SCSI_DEBUG_OPT_TRANSPORT_ERR & scsi_debug_opts) |