linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH 5/5] uas: HACK needed for UAS host.
@ 2011-03-07 16:48 Tatyana Brokhman
  2011-03-07 16:52 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Tatyana Brokhman @ 2011-03-07 16:48 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-msm, ablay, Tatyana Brokhman,
	open list:USB GADGET/PERIPH..., open list

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC/PATCH 5/5] uas: HACK needed for UAS host.
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2011-03-07 16:52 UTC (permalink / raw)
  To: Tatyana Brokhman
  Cc: linux-arm-msm, ablay, open list:USB GADGET/PERIPH..., open list

On Mon, Mar 07, 2011 at 06:48:51PM +0200, Tatyana Brokhman wrote:
> REMOVE LATER ON!

Remove what?  The patch or this description?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [RFC/PATCH 5/5] uas: HACK needed for UAS host.
  2011-03-07 16:52 ` Greg KH
@ 2011-03-07 16:56   ` Tanya Brokhman
  0 siblings, 0 replies; 3+ messages in thread
From: Tanya Brokhman @ 2011-03-07 16:56 UTC (permalink / raw)
  To: 'Greg KH'
  Cc: linux-arm-msm, ablay, 'open list:USB GADGET/PERIPH...',
	'open list'

This patch is not for submission, it's a HACK and the bug should be fixed in
another way. I've uploaded it because it's needed at the moment for working
with the UAS gadget driver and the current version of UAS host. I'm working
on resolving this issue with Sarah on another email thread. Just thought
that if someone wishes to use the driver right now this patch will be useful
to him.

Best regards,
Tanya Brokhman
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum


> -----Original Message-----
> From: Greg KH [mailto:gregkh@suse.de]
> Sent: Monday, March 07, 2011 6:52 PM
> To: Tatyana Brokhman
> Cc: linux-arm-msm@vger.kernel.org; ablay@codeaurora.org; open list:USB
> GADGET/PERIPH...; open list
> Subject: Re: [RFC/PATCH 5/5] uas: HACK needed for UAS host.
> 
> On Mon, Mar 07, 2011 at 06:48:51PM +0200, Tatyana Brokhman wrote:
> > REMOVE LATER ON!
> 
> Remove what?  The patch or this description?
> 
> confused,
> 
> greg k-h


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-07 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).