From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D5FE921952CEB for ; Wed, 31 May 2017 08:52:17 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2017 08:53:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,424,1493708400"; d="scan'208";a="1136592764" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 31 May 2017 08:53:17 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 31 May 2017 08:53:16 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.37]) by FMSMSX114.amr.corp.intel.com ([10.18.116.8]) with mapi id 14.03.0319.002; Wed, 31 May 2017 08:53:16 -0700 From: "Carsey, Jaben" To: GN Keshava , "edk2-devel@lists.01.org" Thread-Topic: [edk2] Unmount and mount a mass storage from shell Thread-Index: AQHS1RwdthTk75hN/0y87VsvPFYro6IFM/tQgAFicQCABm9zoIABQyYAgABYXcA= Date: Wed, 31 May 2017 15:53:15 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTVlNzM1Y2YtNzhhZS00NTAwLTk3OTYtY2Q5N2Q1ZTA0OWNiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlhsNUdubzRTdit5WFlVXC9MWmZNYVdzTzBCODdNcURRcmtvSUNHVkRvUHpBPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: Unmount and mount a mass storage from shell X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 15:52:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Keshava, After you remove and replug it, I think you need to do "connect -r" to recu= rsively reconnect drivers, then do the "map -r" to generate a new mapping. = =20 Reconnecting drivers is standard user behavior after plug in a USB device. = It is not expected to happen automatically. -Jaben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > GN Keshava > Sent: Tuesday, May 30, 2017 8:35 PM > To: Carsey, Jaben ; edk2-devel@lists.01.org > Subject: Re: [edk2] Unmount and mount a mass storage from shell > Importance: High >=20 > Hi Jaben, >=20 > Thanks a lot for your input. >=20 > As I have mentioned in previous mail, I'm facing an issue now, that, If I > reconnect my client device, the mass storage is not able to mount again > automatically. > Here is few more details. Expecting some help on this : >=20 > I connect the the client device to UEFI host. I get the mass storage > successfully. (device is listed as Mass storage in devices command) > The client device also has serial CDC functionality (It is Linux CDC > gadget, which will enumerate as both Mass storage (FAT32) and CDC serial > com port). > To use serial port, I have developed a custom serial driver. I use VID PI= D > of the device in this custom driver to bind the driver to the device. I > load this driver, and I get serial port (It is listed in sermode command) > Now I refresh the mapping using map -r. Still I get the mass storage of > device, and I'm able to access it correctly. > Now I disconnect the client from host (UEFI) by unplugging the device. > When I connect the device again, I'm not able to get Mass storage if i ru= n > map -r. But serial port will start to work fine again. >=20 > If I run devices command, it is not shown as mass storage. but as linux > gadget. > Now if I use disconnect command, and followed by connect command to this > device with mass storage driver, I'm able to mount the mass storage and u= se > it. > The issue is present if I load my serial driver, which uses device's VID > PID. If I unload this driver and do the unplug-plug, I'm able to get mass > storage automatically.. >=20 > What could be the issue? Is there any way to solve this? >=20 > (sorry for long post, it's difficult to explain otherwise) >=20 > Thanks again. > Regards, > Keshava >=20 > On Tue, 30 May 2017 at 20:56 Carsey, Jaben > wrote: >=20 > > I think that you will always need to inform the UEFI Shell of the chang= e. > > It is not designed to automatically do detection of > added/removed/changed > > devices. > > > > > > > > I think that your solution to use the code from mount makes the most > sense. > > > > > > > > -Jaben > > > > > > > > *From:* GN Keshava [mailto:keshava.gn@gmail.com] > > *Sent:* Thursday, May 25, 2017 11:02 PM > > *To:* Carsey, Jaben ; edk2-devel@lists.01.org > > *Subject:* Re: [edk2] Unmount and mount a mass storage from shell > > *Importance:* High > > > > > > > > Hi Jaben, Thanks a lot for input. My necessity for unmount-mount is tha= t, > > the USB client is a Linux storage gadget, which needs to be remounted t= o > > get the updated/new files created by Linux. Anyhow, now I'm doing this > > programmatically by copying mount command code from older shell. :) > > > > > > > > One more issue is that, after Linux updates some file (on client side, > > Linux will mount the same partition, save some file, and then umount th= e > > partition. Then if i remount the partition on Host side, when host is > > windows, i will get updated files) I will manually remove and connect t= he > > cable (MS device), UEFI is not able to detect the MS itself. (This issu= e > > observed, regardless of remount. This issue is not there on windows 10 > > host). > > > > Can you give some pointers on this? > > > > > > > > Thanks a lot, Jaben. > > > > > > > > Regards, > > > > Keshava > > > > > > > > On Thu, 25 May 2017 at 21:26 Carsey, Jaben > wrote: > > > > You can "disconnect" the driver > > You can do "map -d" to delete a mapping > > > > I am unsure what your goals are for mount/unmount > > > > -Jaben > > > > > -----Original Message----- > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf O= f > > > GN Keshava > > > Sent: Wednesday, May 24, 2017 10:59 PM > > > To: edk2-devel@lists.01.org > > > Subject: [edk2] Unmount and mount a mass storage from shell > > > Importance: High > > > > > > How can I unmount and mount a mass storage fs from UEFI shell? > > > > > > In older EFI shells, I can do with "mount" command. But it just does > > > "mapping" in newer shell. It doesn't actually remounting the device. > > > > > > Please help. > > > > > > thanks > > > _______________________________________________ > > > edk2-devel mailing list > > > edk2-devel@lists.01.org > > > https://lists.01.org/mailman/listinfo/edk2-devel > > > > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel