From: Tatyana Brokhman <tlinder@codeaurora.org>
To: gregkh@suse.de
Cc: linux-arm-msm@vger.kernel.org, ablay@codeaurora.org,
Tatyana Brokhman <tlinder@codeaurora.org>,
"open list:USB GADGET/PERIPH..." <linux-usb@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: [RFC/PATCH 5/5] uas: HACK needed for UAS host.
Date: Mon, 7 Mar 2011 18:48:51 +0200 [thread overview]
Message-ID: <1299516532-28866-1-git-send-email-tlinder@codeaurora.org> (raw)
REMOVE LATER ON!
In today's UAS host driver MODE SENSE command isn't handled correctly.
Each time after power up there is a unit attention condition of
RESET_OCCURRED that needs to be cleared (= acknowledged by the
host) by the MODE SENSE command.
Due to the above this patch resets the RESET_OCCURRED unit attention.
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
diff --git a/drivers/usb/gadget/uasp_cmdiu.c b/drivers/usb/gadget/uasp_cmdiu.c
index 4df3d98..51eb132 100644
--- a/drivers/usb/gadget/uasp_cmdiu.c
+++ b/drivers/usb/gadget/uasp_cmdiu.c
@@ -83,6 +83,13 @@ static __u32 check_cmdiu(struct uasp_dev *udev,
curlun->lun->unit_attention_data = SS_NO_SENSE;
return ua_data;
}
+ /* HACK!!! REMOVE!!! */
+ if (curlun->lun->unit_attention_data == SS_RESET_OCCURRED &&
+ cmdiu->cdb[0] == INQUIRY) {
+ curlun->lun->unit_attention_data = SS_NO_SENSE;
+ DBG(udev->ucommon->common, "check_cmdiu() - "
+ "HACK!!! RESETTING unit attention condition\n");
+ }
}
if (curlun && !(curlun->lun->filp) && needs_medium) {
--
1.7.0.4
--
Sent by a Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
WARNING: multiple messages have this Message-ID (diff)
From: Tatyana Brokhman <tlinder@codeaurora.org>
To: gregkh@suse.de
Cc: linux-arm-msm@vger.kernel.org, ablay@codeaurora.org,
Tatyana Brokhman <tlinder@codeaurora.org>,
linux-usb@vger.kernel.org (open list:USB GADGET/PERIPH...),
linux-kernel@vger.kernel.org (open list)
Subject: [RFC/PATCH 5/5] uas: HACK needed for UAS host.
Date: Mon, 7 Mar 2011 18:48:51 +0200 [thread overview]
Message-ID: <1299516532-28866-1-git-send-email-tlinder@codeaurora.org> (raw)
REMOVE LATER ON!
In today's UAS host driver MODE SENSE command isn't handled correctly.
Each time after power up there is a unit attention condition of
RESET_OCCURRED that needs to be cleared (= acknowledged by the
host) by the MODE SENSE command.
Due to the above this patch resets the RESET_OCCURRED unit attention.
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
diff --git a/drivers/usb/gadget/uasp_cmdiu.c b/drivers/usb/gadget/uasp_cmdiu.c
index 4df3d98..51eb132 100644
--- a/drivers/usb/gadget/uasp_cmdiu.c
+++ b/drivers/usb/gadget/uasp_cmdiu.c
@@ -83,6 +83,13 @@ static __u32 check_cmdiu(struct uasp_dev *udev,
curlun->lun->unit_attention_data = SS_NO_SENSE;
return ua_data;
}
+ /* HACK!!! REMOVE!!! */
+ if (curlun->lun->unit_attention_data == SS_RESET_OCCURRED &&
+ cmdiu->cdb[0] == INQUIRY) {
+ curlun->lun->unit_attention_data = SS_NO_SENSE;
+ DBG(udev->ucommon->common, "check_cmdiu() - "
+ "HACK!!! RESETTING unit attention condition\n");
+ }
}
if (curlun && !(curlun->lun->filp) && needs_medium) {
--
1.7.0.4
--
Sent by a Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next reply other threads:[~2011-03-07 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 16:48 Tatyana Brokhman [this message]
2011-03-07 16:48 ` [RFC/PATCH 5/5] uas: HACK needed for UAS host Tatyana Brokhman
2011-03-07 16:52 ` Greg KH
2011-03-07 16:56 ` Tanya Brokhman
2011-03-07 16:56 ` Tanya Brokhman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1299516532-28866-1-git-send-email-tlinder@codeaurora.org \
--to=tlinder@codeaurora.org \
--cc=ablay@codeaurora.org \
--cc=gregkh@suse.de \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.