platform: msm_shared: Fix the retrival of sense buffer
When a SCSI command fails, the reponse contains the
sense request. We need to parse the response to get
the sense buffer instead of sending a additional
sense request command which would then return data
that is not useful.
Change-Id: I95b7174978068209d1b5ed4b3fb7d3669a04c3af
diff --git a/platform/msm_shared/dme.c b/platform/msm_shared/dme.c
index 61efb47..431672b 100644
--- a/platform/msm_shared/dme.c
+++ b/platform/msm_shared/dme.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -137,7 +137,7 @@
req_upiu.idn = query->idn;
req_upiu.trans_type = UPIU_TYPE_QUERY_REQ;
req_upiu.dd = UTRD_NO_DATA_TRANSFER;
- req_upiu.resp_ptr = (struct upiu_basic_hdr *) &resp_upiu;
+ req_upiu.resp_ptr = (struct upiu_basic_resp_hdr *) &resp_upiu;
req_upiu.resp_len = sizeof(resp_upiu);
req_upiu.resp_data_ptr = query->buf;
req_upiu.timeout_msecs = UTP_GENERIC_CMD_TIMEOUT;
@@ -430,7 +430,7 @@
int dme_send_nop_query(struct ufs_dev *dev)
{
struct upiu_req_build_type req_upiu;
- struct upiu_basic_hdr resp_upiu;
+ struct upiu_basic_resp_hdr resp_upiu;
int ret;
unsigned try_again;