audio/libmtp problems with 8.x libusb

Peter Jeremy peterjeremy at acm.org
Wed Feb 3 10:16:43 UTC 2010


I have a MTP-only MP3 player (Samsung YP-T10) which works happily with
FreeBSD 7.x but chokes on FreeBSD 8.x.

As an example, after connecting the MP3 player, running 'mtp-files'
the first time works successfully.  Repeating the command fails (see
below).  I've tried building libmtp-1.0.1 to no avail.

aspire% mtp-files
libmtp version: 0.3.1

PTP: Opening session
PTP_ERROR_IO: Trying again after re-initializing USB interface
PTP: Opening session
LIBMTP PANIC: Could not open session! (Return code 767)
  Try to reset the device.
mtp-files: There has been an error connecting. Exit
aspire% 

'kdump -R' from the relevant parts of the first failed session:

  2744 mtp-files 0.000269 CALL  open(0x281b7b50,O_RDONLY,<unused>0x124)
  2744 mtp-files 0.000032 NAMI  "/dev/usbctl"
  2744 mtp-files 0.000055 RET   open 3
  2744 mtp-files 0.000021 CALL  ioctl(0x3,USB_READ_DIR,0xbfbfe494)
  2744 mtp-files 0.000040 RET   ioctl 0
  2744 mtp-files 0.000083 CALL  open(0xbfbfe5b8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000017 NAMI  "/dev/ugen0.1"
  2744 mtp-files 0.000043 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000035 CALL  open(0xbfbfe5b8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000018 NAMI  "/dev/ugen1.1"
  2744 mtp-files 0.000044 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000023 CALL  open(0xbfbfe5b8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000014 NAMI  "/dev/ugen2.1"
  2744 mtp-files 0.000038 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000021 CALL  open(0xbfbfe5b8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000014 NAMI  "/dev/ugen4.1"
  2744 mtp-files 0.000041 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000025 CALL  open(0xbfbfe5b8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000017 NAMI  "/dev/ugen3.1"
  2744 mtp-files 0.000039 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000023 CALL  open(0xbfbfe5b8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000016 NAMI  "/dev/ugen2.2"
  2744 mtp-files 0.000046 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000023 CALL  open(0xbfbfe5b8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000017 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000063 RET   open 4
  2744 mtp-files 0.000016 CALL  ioctl(0x4,USB_GET_PLUGTIME,0xbfbfe31c)
  2744 mtp-files 0.000021 RET   ioctl 0
  2744 mtp-files 0.000013 CALL  ioctl(0x4,USB_GET_DEVICE_DESC,0xbfbfe30a)
  2744 mtp-files 0.000017 RET   ioctl 0
  2744 mtp-files 0.000025 CALL  ioctl(0x4,USB_GET_DEVICEINFO,0xbfbfe324)
  2744 mtp-files 0.000030 RET   ioctl 0
  2744 mtp-files 0.000031 CALL  close(0x4)
  2744 mtp-files 0.000034 RET   close 0
  2744 mtp-files 0.000021 CALL  ioctl(0x3,USB_READ_DIR,0xbfbfe494)
  2744 mtp-files 0.000020 RET   ioctl 0
  2744 mtp-files 0.000014 CALL  close(0x3)
  2744 mtp-files 0.000018 RET   close 0
  2744 mtp-files 0.000072 CALL  open(0xbfbfe5c8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000019 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000109 RET   open 3
  2744 mtp-files 0.000015 CALL  open(0xbfbfe5c8,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000012 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000046 RET   open 4
  2744 mtp-files 0.000014 CALL  ioctl(0x4,USB_GET_PLUGTIME,0xbfbfe5c4)
  2744 mtp-files 0.000018 RET   ioctl 0
  2744 mtp-files 0.000026 CALL  ioctl(0x3,USB_GET_FULL_DESC,0xbfbfe5dc)
  2744 mtp-files 0.000020 RET   ioctl 0
  2744 mtp-files 0.000014 CALL  ioctl(0x3,USB_GET_FULL_DESC,0xbfbfe5dc)
  2744 mtp-files 0.000017 RET   ioctl 0
  2744 mtp-files 0.000068 CALL  close(0x4)
  2744 mtp-files 0.000028 RET   close 0
  2744 mtp-files 0.000013 CALL  close(0x3)
  2744 mtp-files 0.000023 RET   close 0
  2744 mtp-files 0.000081 CALL  open(0x281b7b50,O_RDONLY,<unused>0x124)
  2744 mtp-files 0.000017 NAMI  "/dev/usbctl"
  2744 mtp-files 0.000039 RET   open 3
  2744 mtp-files 0.000013 CALL  ioctl(0x3,USB_READ_DIR,0xbfbfe3e4)
  2744 mtp-files 0.000018 RET   ioctl 0
  2744 mtp-files 0.000022 CALL  open(0xbfbfe508,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000015 NAMI  "/dev/ugen0.1"
  2744 mtp-files 0.000047 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000023 CALL  open(0xbfbfe508,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000015 NAMI  "/dev/ugen1.1"
  2744 mtp-files 0.000042 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000023 CALL  open(0xbfbfe508,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000016 NAMI  "/dev/ugen2.1"
  2744 mtp-files 0.000038 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000018 CALL  open(0xbfbfe508,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000014 NAMI  "/dev/ugen4.1"
  2744 mtp-files 0.000042 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000022 CALL  open(0xbfbfe508,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000015 NAMI  "/dev/ugen3.1"
  2744 mtp-files 0.000042 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000022 CALL  open(0xbfbfe508,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000015 NAMI  "/dev/ugen2.2"
  2744 mtp-files 0.000065 RET   open -1 errno 13 Permission denied
  2744 mtp-files 0.000022 CALL  open(0xbfbfe508,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000016 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000052 RET   open 4
  2744 mtp-files 0.000013 CALL  ioctl(0x4,USB_GET_PLUGTIME,0xbfbfe26c)
  2744 mtp-files 0.000019 RET   ioctl 0
  2744 mtp-files 0.000013 CALL  ioctl(0x4,USB_GET_DEVICE_DESC,0xbfbfe25a)
  2744 mtp-files 0.000017 RET   ioctl 0
  2744 mtp-files 0.000015 CALL  ioctl(0x4,USB_GET_DEVICEINFO,0xbfbfe274)
  2744 mtp-files 0.000024 RET   ioctl 0
  2744 mtp-files 0.000021 CALL  close(0x4)
  2744 mtp-files 0.000026 RET   close 0
  2744 mtp-files 0.000014 CALL  ioctl(0x3,USB_READ_DIR,0xbfbfe3e4)
  2744 mtp-files 0.000016 RET   ioctl 0
  2744 mtp-files 0.000013 CALL  close(0x3)
  2744 mtp-files 0.000018 RET   close 0
  2744 mtp-files 0.000025 CALL  open(0xbfbfe518,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000016 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000050 RET   open 3
  2744 mtp-files 0.000013 CALL  open(0xbfbfe518,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000016 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000048 RET   open 4
  2744 mtp-files 0.000014 CALL  ioctl(0x4,USB_GET_PLUGTIME,0xbfbfe514)
  2744 mtp-files 0.000017 RET   ioctl 0
  2744 mtp-files 0.000016 CALL  ioctl(0x3,USB_GET_FULL_DESC,0xbfbfe52c)
  2744 mtp-files 0.000017 RET   ioctl 0
  2744 mtp-files 0.000013 CALL  ioctl(0x3,USB_GET_FULL_DESC,0xbfbfe52c)
  2744 mtp-files 0.000018 RET   ioctl 0
  2744 mtp-files 0.000023 CALL  close(0x4)
  2744 mtp-files 0.000024 RET   close 0
  2744 mtp-files 0.000014 CALL  close(0x3)
  2744 mtp-files 0.000022 RET   close 0
  2744 mtp-files 0.000053 CALL  open(0xbfbfe518,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000017 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000054 RET   open 3
  2744 mtp-files 0.000014 CALL  open(0xbfbfe518,O_RDWR,<unused>0x281b7782)
  2744 mtp-files 0.000032 NAMI  "/dev/ugen4.2"
  2744 mtp-files 0.000050 RET   open 4
  2744 mtp-files 0.000013 CALL  ioctl(0x4,USB_GET_PLUGTIME,0xbfbfe514)
  2744 mtp-files 0.000019 RET   ioctl 0
  2744 mtp-files 0.000032 CALL  ioctl(0x4,USB_FS_INIT,0xbfbfe4d4)
  2744 mtp-files 0.000024 RET   ioctl 0
  2744 mtp-files 0.000033 CALL  write(0x2,0xbfbfe040,0x14)
  2744 mtp-files 0.000028 GIO   fd 2 wrote 20 bytes
       "PTP: Opening session"
  2744 mtp-files 0.000013 RET   write 20/0x14
  2744 mtp-files 0.000023 CALL  write(0x2,0x282aa433,0x1)
  2744 mtp-files 0.000020 GIO   fd 2 wrote 1 byte
       "
       "
  2744 mtp-files 0.000012 RET   write 1
  2744 mtp-files 0.000074 CALL  ioctl(0x4,USB_FS_OPEN,0xbfbfe1ec)
  2744 mtp-files 0.000093 RET   ioctl 0
  2744 mtp-files 0.000039 CALL  ioctl(0x4,USB_FS_START,0xbfbfe20b)
  2744 mtp-files 0.000054 RET   ioctl 0
  2744 mtp-files 0.000020 CALL  ioctl(0x4,USB_FS_COMPLETE,0xbfbfe24b)
  2744 mtp-files 0.000018 RET   ioctl -1 errno 16 Device busy
  2744 mtp-files 0.000055 CALL  poll(0xbfbfe25c,0x1,0xffffffff)
  2744 mtp-files 0.000081 RET   poll 1
  2744 mtp-files 0.000013 CALL  ioctl(0x4,USB_FS_COMPLETE,0xbfbfe24b)
  2744 mtp-files 0.000014 RET   ioctl 0
  2744 mtp-files 0.000009 CALL  ioctl(0x4,USB_FS_COMPLETE,0xbfbfe24b)
  2744 mtp-files 0.000011 RET   ioctl -1 errno 16 Device busy
  2744 mtp-files 0.000034 CALL  ioctl(0x4,USB_FS_OPEN,0xbfbfe1ac)
  2744 mtp-files 0.000077 RET   ioctl 0
  2744 mtp-files 0.000014 CALL  ioctl(0x4,USB_FS_START,0xbfbfe1cb)
  2744 mtp-files 0.000018 RET   ioctl 0
  2744 mtp-files 0.000013 CALL  ioctl(0x4,USB_FS_COMPLETE,0xbfbfe20b)
  2744 mtp-files 0.000026 RET   ioctl -1 errno 16 Device busy
  2744 mtp-files 0.000012 CALL  poll(0xbfbfe21c,0x1,0xffffffff)
  2744 mtp-files 9.793643 RET   poll 1
  2744 mtp-files 0.000035 CALL  ioctl(0x4,USB_FS_COMPLETE,0xbfbfe20b)
  2744 mtp-files 0.000015 RET   ioctl 0
  2744 mtp-files 0.000010 CALL  ioctl(0x4,USB_FS_COMPLETE,0xbfbfe20b)
  2744 mtp-files 0.000032 RET   ioctl -1 errno 16 Device busy
  2744 mtp-files 0.000032 CALL  write(0x2,0x280af33c,0x3f)
  2744 mtp-files 0.000025 GIO   fd 2 wrote 63 bytes
       "PTP_ERROR_IO: Trying again after re-initializing USB interface
       "
  2744 mtp-files 0.000014 RET   write 63/0x3f
  2744 mtp-files 0.000027 CALL  ioctl(0x3,USB_DO_REQUEST,0xbfbfe4f8)
  2744 mtp-files 0.000194 RET   ioctl 0
  2744 mtp-files 0.000024 CALL  ioctl(0x3,USB_DO_REQUEST,0xbfbfe4f8)
  2744 mtp-files 0.000224 RET   ioctl 0
  2744 mtp-files 0.000040 CALL  ioctl(0x4,USB_FS_CLEAR_STALL_SYNC,0xbfbfe583)
  2744 mtp-files 0.000201 RET   ioctl 0
  2744 mtp-files 0.000015 CALL  ioctl(0x4,USB_FS_CLEAR_STALL_SYNC,0xbfbfe583)
  2744 mtp-files 0.000106 RET   ioctl 0
  2744 mtp-files 0.000017 CALL  ioctl(0x4,USB_FS_OPEN,0xbfbfe51c)
  2744 mtp-files 0.000095 RET   ioctl 0
  2744 mtp-files 0.000016 CALL  ioctl(0x4,USB_FS_CLEAR_STALL_SYNC,0xbfbfe583)
  2744 mtp-files 0.000127 RET   ioctl 0
  2744 mtp-files 0.000029 CALL  ioctl(0x4,USB_FS_CLEAR_STALL_SYNC,0xbfbfe563)
  2744 mtp-files 0.000091 RET   ioctl 0
  2744 mtp-files 0.000026 CALL  ioctl(0x4,USB_FS_UNINIT,0xbfbfe543)
  2744 mtp-files 0.088636 RET   ioctl 0
  2744 mtp-files 0.000045 CALL  ioctl(0x3,USB_DEVICEENUMERATE,0xbfbfe56c)
  2744 mtp-files 0.000024 RET   ioctl -1 errno 1 Operation not permitted
  2744 mtp-files 0.000045 CALL  ioctl(0x4,USB_FS_UNINIT,0xbfbfe55f)
  2744 mtp-files 0.000017 RET   ioctl -1 errno 22 Invalid argument
  2744 mtp-files 0.000014 CALL  close(0x4)
  2744 mtp-files 0.000032 RET   close 0
  2744 mtp-files 0.000012 CALL  close(0x3)
  2744 mtp-files 0.000021 RET   close 0

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20100203/071f37ee/attachment.pgp


More information about the freebsd-usb mailing list