[SCSI] sd: use REQ_PM in sd's runtime suspend operation
With the introduction of REQ_PM, modify sd's runtime suspend operation functions to use that flag so that the operations to put the device into runtime suspended state(i.e. sync cache and stop device) will not affect its runtime PM status. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:

committed by
James Bottomley

parent
b8d4a5bf6a
commit
9b21493c45
@@ -276,11 +276,10 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
}
|
||||
EXPORT_SYMBOL(scsi_execute);
|
||||
|
||||
|
||||
int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
int scsi_execute_req_flags(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
int data_direction, void *buffer, unsigned bufflen,
|
||||
struct scsi_sense_hdr *sshdr, int timeout, int retries,
|
||||
int *resid)
|
||||
int *resid, int flags)
|
||||
{
|
||||
char *sense = NULL;
|
||||
int result;
|
||||
@@ -291,14 +290,14 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
return DRIVER_ERROR << 24;
|
||||
}
|
||||
result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen,
|
||||
sense, timeout, retries, 0, resid);
|
||||
sense, timeout, retries, flags, resid);
|
||||
if (sshdr)
|
||||
scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr);
|
||||
|
||||
kfree(sense);
|
||||
return result;
|
||||
}
|
||||
EXPORT_SYMBOL(scsi_execute_req);
|
||||
EXPORT_SYMBOL(scsi_execute_req_flags);
|
||||
|
||||
/*
|
||||
* Function: scsi_init_cmd_errh()
|
||||
|
Reference in New Issue
Block a user