All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Bandan Das <bsd@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>,
	Greg Kurz <groug@kaod.org>
Subject: Re: [Qemu-devel] [PATCH 0/3] usb-mtp: fix ObjectInfo request handling
Date: Tue, 16 Apr 2019 17:52:17 +0100	[thread overview]
Message-ID: <20190416165217.GV31311@redhat.com> (raw)
In-Reply-To: <jpgwojtoq5r.fsf@linux.bootlegged.copy>

On Tue, Apr 16, 2019 at 12:45:04PM -0400, Bandan Das wrote:
> Daniel P. Berrangé <berrange@redhat.com> writes:
> 
> > On Tue, Apr 16, 2019 at 12:10:16PM -0400, Bandan Das wrote:
> >> Daniel P. Berrangé <berrange@redhat.com> writes:
> >> ...
> >> >> > The store is read only by default. Are you trying something like:
> >> >> >  -device usb-mtp,rootdir=/code/mtpshare,readonly=false ?
> >> >> 
> >> >> Ah ha, I didn't realize I had to enable write support explicitly. Will
> >> >> retry with that.
> >> >
> >> > Even after setting  readonly=false, I still can't get "mtp-sendfile"
> >> > to succeed in a guest.
> >> >
> >> I posted a patch for a bug introduced by a recent commit that made smaller
> >> file sizes return back with a incomplete file transfer.
> >> 
> >> https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg02552.html
> >
> > Yes, I applied that and didn't see any difference in behaviour
> >
> 
> Just noticed the error message you posted:
> 
>     Error sending file.
>     Error 2: PTP Layer error 02ff: send_file_object_info(): Could not send object info.
>     Error 2: Error 02ff: PTP I/O Error
>     ERROR: Could not close session!
> 
> I can't find usb-mtp sending a "I/O error" on an error condition
> for the objectinfo phase. It might be libmtp or even the command itself
> failing for some reason. For incomplete transfer, I just checked, it's
> spitting out the error message correctly as INCOMPLETE_FILE_TRANSFER.
> 
> With libmtp version 1.13 on a FC24 guest, here's the output:
> 
> $ mtp-sendfile test.txt test.img
> libmtp version: 1.1.13
> 
> Device 0 (VID=46f4 and PID=0004) is UNKNOWN in libmtp v1.1.13.
> Please report this VID/PID and the device model to the libmtp development team
> ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
> LIBMTP libusb: Attempt to reset device
> Sending test.txt to test.img
> type: txt, 44
> Sending file...
> Progress: 322 of 322 (100%)
> New file ID: 7
> 
> What guest is this ? I can try to reproduce.

This was Fedora 26, so technically it is end of life, but then so
is your F24 guest :-)

Should really check with a modern guest like Fedora 29 or rawhide.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Bandan Das <bsd@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>, Greg Kurz <groug@kaod.org>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] usb-mtp: fix ObjectInfo request handling
Date: Tue, 16 Apr 2019 17:52:17 +0100	[thread overview]
Message-ID: <20190416165217.GV31311@redhat.com> (raw)
Message-ID: <20190416165217.1S7ArD-MTwwEH2GptHOH2703JGOC2gP1xMIUj58vTLE@z> (raw)
In-Reply-To: <jpgwojtoq5r.fsf@linux.bootlegged.copy>

On Tue, Apr 16, 2019 at 12:45:04PM -0400, Bandan Das wrote:
> Daniel P. Berrangé <berrange@redhat.com> writes:
> 
> > On Tue, Apr 16, 2019 at 12:10:16PM -0400, Bandan Das wrote:
> >> Daniel P. Berrangé <berrange@redhat.com> writes:
> >> ...
> >> >> > The store is read only by default. Are you trying something like:
> >> >> >  -device usb-mtp,rootdir=/code/mtpshare,readonly=false ?
> >> >> 
> >> >> Ah ha, I didn't realize I had to enable write support explicitly. Will
> >> >> retry with that.
> >> >
> >> > Even after setting  readonly=false, I still can't get "mtp-sendfile"
> >> > to succeed in a guest.
> >> >
> >> I posted a patch for a bug introduced by a recent commit that made smaller
> >> file sizes return back with a incomplete file transfer.
> >> 
> >> https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg02552.html
> >
> > Yes, I applied that and didn't see any difference in behaviour
> >
> 
> Just noticed the error message you posted:
> 
>     Error sending file.
>     Error 2: PTP Layer error 02ff: send_file_object_info(): Could not send object info.
>     Error 2: Error 02ff: PTP I/O Error
>     ERROR: Could not close session!
> 
> I can't find usb-mtp sending a "I/O error" on an error condition
> for the objectinfo phase. It might be libmtp or even the command itself
> failing for some reason. For incomplete transfer, I just checked, it's
> spitting out the error message correctly as INCOMPLETE_FILE_TRANSFER.
> 
> With libmtp version 1.13 on a FC24 guest, here's the output:
> 
> $ mtp-sendfile test.txt test.img
> libmtp version: 1.1.13
> 
> Device 0 (VID=46f4 and PID=0004) is UNKNOWN in libmtp v1.1.13.
> Please report this VID/PID and the device model to the libmtp development team
> ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
> LIBMTP libusb: Attempt to reset device
> Sending test.txt to test.img
> type: txt, 44
> Sending file...
> Progress: 322 of 322 (100%)
> New file ID: 7
> 
> What guest is this ? I can try to reproduce.

This was Fedora 26, so technically it is end of life, but then so
is your F24 guest :-)

Should really check with a modern guest like Fedora 29 or rawhide.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


  reply	other threads:[~2019-04-16 16:52 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 15:45 [Qemu-devel] [PATCH 0/3] usb-mtp: fix ObjectInfo request handling Daniel P. Berrangé
2019-04-15 15:45 ` Daniel P. Berrangé
2019-04-15 15:45 ` [Qemu-devel] [PATCH 1/3] usb-mtp: fix string length for filename when writing metadata Daniel P. Berrangé
2019-04-15 15:45   ` Daniel P. Berrangé
2019-04-15 17:02   ` Bandan Das
2019-04-15 17:02     ` Bandan Das
2019-04-15 15:45 ` [Qemu-devel] [PATCH 2/3] usb-mtp: fix bounds check for guest provided filename Daniel P. Berrangé
2019-04-15 15:45   ` Daniel P. Berrangé
2019-04-16 19:41   ` Bandan Das
2019-04-16 19:41     ` Bandan Das
2019-04-15 15:45 ` [Qemu-devel] [PATCH 3/3] usb-mtp: fix alignment of access of ObjectInfo filename field Daniel P. Berrangé
2019-04-15 15:45   ` Daniel P. Berrangé
2019-04-15 16:52 ` [Qemu-devel] [PATCH 0/3] usb-mtp: fix ObjectInfo request handling Bandan Das
2019-04-15 16:52   ` Bandan Das
2019-04-15 16:54   ` Daniel P. Berrangé
2019-04-15 16:54     ` Daniel P. Berrangé
2019-04-16  8:40     ` Daniel P. Berrangé
2019-04-16  8:40       ` Daniel P. Berrangé
2019-04-16 16:10       ` Bandan Das
2019-04-16 16:10         ` Bandan Das
2019-04-16 16:12         ` Daniel P. Berrangé
2019-04-16 16:12           ` Daniel P. Berrangé
2019-04-16 16:45           ` Bandan Das
2019-04-16 16:45             ` Bandan Das
2019-04-16 16:52             ` Daniel P. Berrangé [this message]
2019-04-16 16:52               ` Daniel P. Berrangé
2019-04-16 17:20               ` Bandan Das
2019-04-16 17:20                 ` Bandan Das
2019-04-15 17:09 ` [Qemu-devel] [PATCH for-4.0? " Eric Blake
2019-04-15 17:09   ` Eric Blake
2019-04-15 17:18   ` Peter Maydell
2019-04-15 17:18     ` Peter Maydell
2019-04-16  8:48     ` Daniel P. Berrangé
2019-04-16  8:48       ` Daniel P. Berrangé
2019-04-16 13:35 ` [Qemu-devel] [PATCH " Peter Maydell
2019-04-16 13:35   ` Peter Maydell
2019-04-16 17:27   ` Peter Maydell
2019-04-16 17:27     ` Peter Maydell
2019-04-16 19:33     ` Peter Maydell
2019-04-16 19:33       ` Peter Maydell
2019-04-16 22:27       ` Peter Maydell
2019-04-16 22:27         ` Peter Maydell
2019-04-17  8:27         ` Gerd Hoffmann
2019-04-17  8:27           ` Gerd Hoffmann

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=20190416165217.GV31311@redhat.com \
    --to=berrange@redhat.com \
    --cc=bsd@redhat.com \
    --cc=groug@kaod.org \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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.