aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 1c75646f9689..1c7d993fa8ad 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -26,13 +26,13 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27 27
28#include <scsi/scsi.h> 28#include <scsi/scsi.h>
29#include <scsi/scsi_cmnd.h>
29#include <scsi/scsi_dbg.h> 30#include <scsi/scsi_dbg.h>
30#include <scsi/scsi_device.h> 31#include <scsi/scsi_device.h>
31#include <scsi/scsi_eh.h> 32#include <scsi/scsi_eh.h>
32#include <scsi/scsi_transport.h> 33#include <scsi/scsi_transport.h>
33#include <scsi/scsi_host.h> 34#include <scsi/scsi_host.h>
34#include <scsi/scsi_ioctl.h> 35#include <scsi/scsi_ioctl.h>
35#include <scsi/scsi_request.h>
36 36
37#include "scsi_priv.h" 37#include "scsi_priv.h"
38#include "scsi_logging.h" 38#include "scsi_logging.h"
@@ -452,7 +452,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
452 (sdev->lun << 5 & 0xe0); 452 (sdev->lun << 5 & 0xe0);
453 453
454 shost->eh_action = &done; 454 shost->eh_action = &done;
455 scmd->request->rq_status = RQ_SCSI_BUSY;
456 455
457 spin_lock_irqsave(shost->host_lock, flags); 456 spin_lock_irqsave(shost->host_lock, flags);
458 scsi_log_send(scmd); 457 scsi_log_send(scmd);
@@ -461,7 +460,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
461 460
462 timeleft = wait_for_completion_timeout(&done, timeout); 461 timeleft = wait_for_completion_timeout(&done, timeout);
463 462
464 scmd->request->rq_status = RQ_SCSI_DONE;
465 shost->eh_action = NULL; 463 shost->eh_action = NULL;
466 464
467 scsi_log_completion(scmd, SUCCESS); 465 scsi_log_completion(scmd, SUCCESS);
@@ -1657,7 +1655,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
1657 1655
1658 scmd->request = &req; 1656 scmd->request = &req;
1659 memset(&scmd->eh_timeout, 0, sizeof(scmd->eh_timeout)); 1657 memset(&scmd->eh_timeout, 0, sizeof(scmd->eh_timeout));
1660 scmd->request->rq_status = RQ_SCSI_BUSY;
1661 1658
1662 memset(&scmd->cmnd, '\0', sizeof(scmd->cmnd)); 1659 memset(&scmd->cmnd, '\0', sizeof(scmd->cmnd));
1663 1660
@@ -1671,8 +1668,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
1671 scmd->cmd_len = 0; 1668 scmd->cmd_len = 0;
1672 1669
1673 scmd->sc_data_direction = DMA_BIDIRECTIONAL; 1670 scmd->sc_data_direction = DMA_BIDIRECTIONAL;
1674 scmd->sc_request = NULL;
1675 scmd->sc_magic = SCSI_CMND_MAGIC;
1676 1671
1677 init_timer(&scmd->eh_timeout); 1672 init_timer(&scmd->eh_timeout);
1678 1673
@@ -1769,14 +1764,6 @@ int scsi_normalize_sense(const u8 *sense_buffer, int sb_len,
1769} 1764}
1770EXPORT_SYMBOL(scsi_normalize_sense); 1765EXPORT_SYMBOL(scsi_normalize_sense);
1771 1766
1772int scsi_request_normalize_sense(struct scsi_request *sreq,
1773 struct scsi_sense_hdr *sshdr)
1774{
1775 return scsi_normalize_sense(sreq->sr_sense_buffer,
1776 sizeof(sreq->sr_sense_buffer), sshdr);
1777}
1778EXPORT_SYMBOL(scsi_request_normalize_sense);
1779
1780int scsi_command_normalize_sense(struct scsi_cmnd *cmd, 1767int scsi_command_normalize_sense(struct scsi_cmnd *cmd,
1781 struct scsi_sense_hdr *sshdr) 1768 struct scsi_sense_hdr *sshdr)
1782{ 1769{