diff options
Diffstat (limited to 'drivers/target/target_core_pscsi.c')
-rw-r--r-- | drivers/target/target_core_pscsi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index d64c3ffdb52e..f2a11414366d 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -34,8 +34,6 @@ #include "target_core_internal.h" #include "target_core_pscsi.h" -#define ISPRINT(a) ((a >= ' ') && (a <= '~')) - static inline struct pscsi_dev_virt *PSCSI_DEV(struct se_device *dev) { return container_of(dev, struct pscsi_dev_virt, dev); @@ -620,8 +618,9 @@ static void pscsi_complete_cmd(struct se_cmd *cmd, u8 scsi_status, unsigned char *buf; buf = transport_kmap_data_sg(cmd); - if (!buf) + if (!buf) { ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ + } if (cdb[0] == MODE_SENSE_10) { if (!(buf[3] & 0x80)) @@ -1047,7 +1046,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status) int result = scsi_req(req)->result; u8 scsi_status = status_byte(result) << 1; - if (scsi_status) { + if (scsi_status != SAM_STAT_GOOD) { pr_debug("PSCSI Status Byte exception at cmd: %p CDB:" " 0x%02x Result: 0x%08x\n", cmd, pt->pscsi_cdb[0], result); |