Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2775689ybl; Mon, 19 Aug 2019 07:22:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqpgU/FSB1wcZfapTi4D/zohoXViam3bRIBBi811dlgFzH5ps9AOUTjoW0tmhxasJn+6UZ X-Received: by 2002:aa7:842f:: with SMTP id q15mr24219066pfn.250.1566224548194; Mon, 19 Aug 2019 07:22:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566224548; cv=none; d=google.com; s=arc-20160816; b=wRIfnEYadZ7s6QAy8fCmcbQCBid2SROhHlqlXVo+fPVCv/CBPC1Uer+pGhoi7jIi1i 0ywmbUHBk2BUylkbL1+4xzTqRaInjKQFj/6JhVIkXcQv+yio9lzIqKKN9WULMnHVnqud sI+zFycg8YsVuqZEEJwTH0Blf0WNRlq/RaOdXT//bhs03EX8tt0ErJiNezfqMbuB4I// 1hi4WQRkBpfCcNIGDadgO//Zp9ChEZa+F+b1PBiAcyueUyEG6CFBPsKaT/1zFXIrVuGc v6tXg5hK3Beb8nt2zAxtPAnGL9N/PVAUyM8cR1Qqs/FyJdCsBKeKChEFYYSh/R+oTK+4 jyUQ== 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=yPJJXP36l7hAe2jawapeTZDV7K7FQk+3uGc1wjgffqM=; b=tyhcr7IHdzkZA5mwxjUAJtq7vYyOJkjkKTuTuvLKkhSulDn16LgSOKHU/isA4N5t8v vJdrQQPwDZ6D8js7NiVivZ28Pm8jaW6vOYlSS6xUgfIAy3O49d890ArOdCaMUEezTUmV z74T5PkAfp/cKe0vXT6cUQz6qFMYuROO9N/UWEtilfpH8cIp+cTX9kQKM29gwXP30orI +YTka3AvkmpEoUgvpil394NbOMwuEQ8zJTJWk63QHdiJ0paSjF7lz3IHtxsmUmp16EYY 66xaCdf2MyvFz5H7d8J5m2hGx0h9x7eJQEUlPBx0P54cMtRaP+dmZW/q4zLIpbW5BVGp /A3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22si9894850pli.255.2019.08.19.07.22.11; Mon, 19 Aug 2019 07:22:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbfHSOTq (ORCPT + 99 others); Mon, 19 Aug 2019 10:19:46 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:43298 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726028AbfHSOTp (ORCPT ); Mon, 19 Aug 2019 10:19:45 -0400 Received: (qmail 2806 invoked by uid 2102); 19 Aug 2019 10:19:44 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 19 Aug 2019 10:19:44 -0400 Date: Mon, 19 Aug 2019 10:19:44 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Roger Quadros cc: Pawel Laszczak , , , , , , , , , , , Subject: Re: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver. In-Reply-To: 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 Mon, 19 Aug 2019, Roger Quadros wrote: > On 15/08/2019 17:39, Alan Stern wrote: > > On Thu, 15 Aug 2019, Roger Quadros wrote: > > > >> Felipe & Alan, > >> > >> On 21/07/2019 21:32, Pawel Laszczak wrote: > >>> This patch introduce new Cadence USBSS DRD driver to linux kernel. > >>> > >>> The Cadence USBSS DRD Controller is a highly configurable IP Core which > >>> can be instantiated as Dual-Role Device (DRD), Peripheral Only and > >>> Host Only (XHCI)configurations. > >>> > >>> The current driver has been validated with FPGA burned. We have support > >>> for PCIe bus, which is used on FPGA prototyping. > >>> > >>> The host side of USBSS-DRD controller is compliance with XHCI > >>> specification, so it works with standard XHCI Linux driver. > >> > >> While testing this driver I encountered the following issue if I do the following. > >> > >> 1) USB port is "otg" and nothing connected so it is in IDLE mode to begin with. > >> i.e. HCD & UDC not registered. > >> > >> 2) Load mass storage gadget with backing medium. > >> > modprobe g_mass_storage file=lun stall=0 > >> > >> [ 28.172142] udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers > >> > >> 3) Connect port to PC host ... > >> [ 30.786313] Mass Storage Function, version: 2009/09/11 > >> [ 30.791455] LUN: removable file: (no medium) > >> [ 31.039497] lun0: unable to open backing file: 500M.bin > >> Is opening the backing file from irq_thread_fn the issue here? > >> If yes, how to resolve this? > > > > I would guess that it probably is related to that. > > > > In any case, the backing filename should be an explicit complete path. > > Who knows what the current directory will be when the actual open call > > takes place? > > This seems to be the case. It works fine with complete path. > > Do we need to care about this in the mass storage gadget or just > rely on the user to provide the full path? I think it's okay to rely on the user to provide the full path. Alan Stern