Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1978300ybz; Thu, 30 Apr 2020 08:44:26 -0700 (PDT) X-Google-Smtp-Source: APiQypJ7P6+pgJUhk1rDVJ0dvFJDbDBOQji8AqxKRC4hw1H3f/WsOociLdZMQ6ar1xGONC3Z+udH X-Received: by 2002:a17:906:9a1:: with SMTP id q1mr3238168eje.296.1588261465972; Thu, 30 Apr 2020 08:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588261465; cv=none; d=google.com; s=arc-20160816; b=ol8aaLVQ6iQb/p4LzJ/kvAazVSkZpXqNNq/70HPntQvwmKSHQxE3z+DrUE0b1ux6fO XeJ6Ashy0YS+HJoMS89n5sETKprA+OmEin3cNLy4Y51obXi+k2sJckZKeTobqHDAjsaF 28zQGjR33hptlLL1hElGbfoxCbnTlPTqnMldMIw6yDHaO7mnoKaSSWj7JIjP2UhbA5SJ lmhyfc7yYJcHIHE3iVzuL5t8TFto4ZaZVuDk+GMeiA3IxyrAlSE3IkbsbNO14knRftAj HTRqjXPMgUFgJjZ/JZaLo8nTOvm5hESX0nzvCUa5Mke00pY/+WV+HmCCvrXX2ipNGR3m srBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=R1jBE6ovv16M9DyJbqNdatkgOQK4aNeLyBG43g/xLsQ=; b=yPG+//kGqzqBRKiCnL5MlUdwqU5Obc+Dx5SmPylpfu4io4LTVQOU0YceVzqsyNGhj/ C9f4XwZZJToP3ZwKu3fL41eBZpOBvTKJkGqqCcfh04yhDSsgcW/+tvaM4c1oZxITl7W0 mlUw1pUTy0IdhfhqD8mkiZnz6nZO5/EuebeHIl/X3XQwZxcrHmfndnarS9xXZhrIrCVF JzR0/QsjnDDs/0OxalkNUWnt/t10MVb3cASC/unyzyIzC7uZxt6Lb7txkeDirxv+nNdD FYZu4BmRKthoG8DatErpIfhei+6pugl+5M6wsKqY8uTF7xw6zP93k3ojc55eu9P1UM9e rA2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with SMTP id u4si5634301edo.126.2020.04.30.08.44.02; Thu, 30 Apr 2020 08:44:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727894AbgD3Pl7 (ORCPT + 99 others); Thu, 30 Apr 2020 11:41:59 -0400 Received: from netrider.rowland.org ([192.131.102.5]:39373 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726745AbgD3Pl6 (ORCPT ); Thu, 30 Apr 2020 11:41:58 -0400 Received: (qmail 4742 invoked by uid 500); 30 Apr 2020 11:41:57 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 30 Apr 2020 11:41:57 -0400 Date: Thu, 30 Apr 2020 11:41:57 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Vladimir Stankovic cc: gregkh@linuxfoundation.org, , , Subject: Re: [External] Re: [PATCH v5 5/8] usb: mausb_host: Introduce PAL processing In-Reply-To: <32cc80c0-c2ff-440c-7505-e848aba782d8@displaylink.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 30 Apr 2020, Vladimir Stankovic wrote: > On 30.4.20. 17:18, Alan Stern wrote: > > On Thu, 30 Apr 2020, Vladimir Stankovic wrote: > > > >> On 26.4.20. 22:56, Alan Stern wrote: > >>> On Sun, 26 Apr 2020, Vladimir Stankovic wrote: > >>> > >>>> On 26.4.20. 16:31, Alan Stern wrote: > >>>>> On Sun, 26 Apr 2020, Vladimir Stankovic wrote: > >>>>> > >>>>>> On 26.4.20. 02:32, Alan Stern wrote: > >>>>>>> On Sat, 25 Apr 2020 vladimir.stankovic@displaylink.com wrote: > >>>>>>> > >>>>>>>> Protocol adaptation layer (PAL) implementation has been added to > >>>>>>>> introduce MA-USB structures and logic. > >>>>>>>> > >>>>>>>> Signed-off-by: Vladimir Stankovic > >>>>>>> > >>>>>>> ... > >>>>>>> > >>>>>>>> + /* > >>>>>>>> + * Masking URB_SHORT_NOT_OK flag as SCSI driver is adding it where it > >>>>>>>> + * should not, so it is breaking the USB drive on the linux > >>>>>>>> + */ > >>>>>>>> + urb->transfer_flags &= ~URB_SHORT_NOT_OK; > > > > ... > > Also, what makes you think the driver is setting the SHORT_NOT_OK flag > > at the wrong time? In fact, how can there be a wrong time? > > SHORT_NOT_OK is a valid flag to use with any control or bulk URB. > > > > Alan Stern > > > The comment is clearly wrong - as mentioned earlier, this fix was added in early > development phase and I guess that implementer was not clear on how the particular > flag was added. Investigation is ongoing around proper fix for this. > > Anyhow, it is a usb-storage driver related to this - here is usb-related log snippet: > > usb 3-1.1.2: new high-speed USB device number 5 using mausb_host_hcd_dev > usb 3-1.1.2: New USB device found, idVendor=0951, idProduct=1666 > usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 > usb 3-1.1.2: Product: DataTraveler 3.0 > usb 3-1.1.2: Manufacturer: Kingston > usb 3-1.1.2: SerialNumber: 0C9D9210E304E311095E087A > usb-storage 3-1.1.2:1.0: USB Mass Storage device detected > scsi host3: usb-storage 3-1.1.2:1.0 > scsi 3:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6 > Attached scsi generic sg2 type 0 > [sdb] 30277632 512-byte logical blocks: (15.5 GB/14.4 GiB) > > As can be seen, USB flash attached to remote device is properly enumerated via > MA USB. Without the fix, usb driver is not able to read USB descriptors, ending > up in USB storage not being accessible. That's strange, considering that the SHORT_NOT_OK flag doesn't get set when the system is reading the device's USB descriptors. Alan Stern