PN7462 USB mass storage error on linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7462 USB mass storage error on linux

5,460 Views
sergioa
Contributor III
Hello i'm having problem with this chip on linux . Do you how what could be the problem?
Thanks in advance 
# uname -a
Linux 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[  458.126954] usb 2-1.5: USB disconnect, device number 4
[  461.139567] usb 2-1.5: new full-speed USB device number 5 using ehci-pci
[  466.211480] usb 2-1.5: device descriptor read/64, error -110
[  466.409878] usb 2-1.5: New USB device found, idVendor=1fc9, idProduct=0117
[  466.409883] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  466.409885] usb 2-1.5: Product: PN7462AU
[  466.409887] usb 2-1.5: Manufacturer: NXP
[  466.410242] usb-storage 2-1.5:1.0: USB Mass Storage device detected
[  466.410554] scsi host8: usb-storage 2-1.5:1.0
[  467.408435] scsi 8:0:0:0: Direct-Access     NXP      PN7462AU         1.00 PQ: 0 ANSI: 0
[  467.409159] sd 8:0:0:0: Attached scsi generic sg3 type 0
[  467.409731] sd 8:0:0:0: [sdc] 327 512-byte logical blocks: (167 kB/164 KiB)
[  467.410477] sd 8:0:0:0: [sdc] Write Protect is off
[  467.410480] sd 8:0:0:0: [sdc] Mode Sense: 00 00 00 00
[  467.411104] sd 8:0:0:0: [sdc] Asking for cache data failed
[  467.411109] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[  467.424360]  sdc:
[  467.427726] sd 8:0:0:0: [sdc] Attached SCSI removable disk
[  467.499083] sd 8:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  467.499090] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  467.499092] blk_update_request: I/O error, dev sdc, sector 0
[  467.569617] sd 8:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  467.569624] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 02 00 00 06 00
[  467.569627] blk_update_request: I/O error, dev sdc, sector 2
[  467.569630] buffer_io_error: 8 callbacks suppressed
[  467.569632] Buffer I/O error on dev sdc, logical block 2, async page read
[  467.569635] Buffer I/O error on dev sdc, logical block 3, async page read
[  467.569637] Buffer I/O error on dev sdc, logical block 4, async page read
[  467.569638] Buffer I/O error on dev sdc, logical block 5, async page read
[  467.569640] Buffer I/O error on dev sdc, logical block 6, async page read
[  467.569641] Buffer I/O error on dev sdc, logical block 7, async page read
[  467.639813] sd 8:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  467.639821] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[  467.639825] blk_update_request: I/O error, dev sdc, sector 4
[  467.639829] Buffer I/O error on dev sdc, logical block 4, async page read
[  467.639832] Buffer I/O error on dev sdc, logical block 5, async page read
[  467.639834] Buffer I/O error on dev sdc, logical block 6, async page read
[  467.639836] Buffer I/O error on dev sdc, logical block 7, async page read
[  467.685813] sd 8:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  467.685820] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 06 00 00 02 00
[  467.685823] blk_update_request: I/O error, dev sdc, sector 6
[  467.756523] sd 8:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  467.756530] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 1a 00 00 06 00
0 Kudos
14 Replies

4,269 Views
NickMa
Contributor II
0 Kudos

4,263 Views
thiago_machado
Contributor III

So I'm trying to update the firmware thru the primary bootloader. In this post the seek option is 03 (seek=03), so it updates the EEPROM. What would be the equivalent seek option to update the flash memory?

Tags (1)
0 Kudos

4,213 Views
thiago_machado
Contributor III

 I was able to see the PN7412 as a mass storage device in UBUNTU 20. We are using a i.MX 8M Nano in our project, and the main goal is to update the PN7412 thru the i.MX USB bus. I couldn't manage to make it work on i.MX with the same steps listed here. I'm sending the dmesg output in the attachments. You guys have any idea what might be missing?

0 Kudos

4,198 Views
NickMa
Contributor II

A little bit more info plz.

  • has the pn7412 already been recognized as /dev/sdX ?
    • If yes, what happens when you mount it
  • dmesg output?

4,179 Views
thiago_machado
Contributor III

Thanks for the quick response!

Yes, the PN is recognized as sdX device. You'll find dmesg outuput in the attachments. The first part of it consists of the output when I configure the PN as mass storage device, and the second is the output when I try to mount it.

0 Kudos

4,159 Views
NickMa
Contributor II

I cant see the any of the

  • usb-storage quirks settings nor any
  • idVendor=1fc9, idProduct=0117 part

Please `cat /proc/cmdline` which should at lease contain the following:

loglevel=7 usb-storage.quirks=1fc9:0117:r,n,m

Please also check your `lsusb` for the existence of `Bus XXX Device YYY: ID 1fc9:0117`, which should be there in DWL and Standard mode.

The whole reset->release into DWL mode (note, that I do NOT mount it during the whole process)  looks as following:

[ 269.610460] usb 2-1: USB disconnect, device number 2
[ 270.812429] usb 2-1: new full-speed USB device number 3 using ci_hdrc
[ 286.082866] usb 2-1: device descriptor read/64, error -110
[ 286.479713] usb 2-1: New USB device found, idVendor=1fc9, idProduct=0117, bcdDevice= 1.00
[ 286.499292] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 286.516311] usb 2-1: Product: PN7462AU
[ 286.536847] usb 2-1: Manufacturer: NXP
[ 286.595152] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 286.663492] usb-storage 2-1:1.0: Quirks match for vid 1fc9 pid 0117: 20
[ 286.684864] scsi host0: usb-storage 2-1:1.0
[ 287.916726] scsi 0:0:0:0: Direct-Access NXP PN7462AU 1.00 PQ: 0 ANSI: 0
[ 288.116634] sd 0:0:0:0: [sda] 327 512-byte logical blocks: (167 kB/164 KiB)
[ 288.153578] sd 0:0:0:0: [sda] Write Protect is off
[ 288.197216] sd 0:0:0:0: [sda] Asking for cache data failed
[ 288.217109] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 288.487685] sda:
[ 288.696497] sd 0:0:0:0: [sda] Attached SCSI removable disk

4,147 Views
thiago_machado
Contributor III

Here's my output  'cat /proc/cmdline' after 'modprobe usb-storage quirks=1fc9:0117:r,n,m':

Ubuntu 20:

BOOT_IMAGE=/boot/vmlinuz-5.8.0-48-generic root=UUID=3e766fc0-f3ad-4c5e-9e6f-8210e216fb59 ro quiet splash vt.handoff=7

i.MX 8M:

console=ttymxc1,115200 root=/dev/mmcblk2p2 rootwait rw

Bellow the lsusb output:

Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0bda:5538 Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 003: ID 27c6:538d Shenzhen Goodix Technology Co.,Ltd. FingerPrint
Bus 001 Device 009: ID 413c:2113 Dell Computer Corp.
Bus 001 Device 012: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 011: ID 1fc9:000c NXP Semiconductors USB2.0 Hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 007: ID 8087:0aaa Intel Corp.
Bus 001 Device 019: ID 1fc9:0117 NXP Semiconductors PN7462AU
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As you can see, the linux recognizes the PN7412 when I put it in DWL Mode, but I cannot access it's content still. The mounting attempt was just to observe the kernel output. I'm not mounting it in order to have access. Last week I was able to access it following the step mentioned on PN7462-updating-EEPROM-on-linux/m-p/739807 but didn't have the same outcome in i.MX 8M. And right now, I cannot reproduce it no longer on Ubuntu 20 as well.

0 Kudos

4,109 Views
NickMa
Contributor II

'cat /proc/cmdline' outputs the kernel boot args - you won't find it at your dev host after remounting.

And at your imx side you pass the quirks's in different ways to the usb-storage driver:

  1. IF you have dynamic kmodule loading on (i.e. `lsmod` shows you something) you can pass it the same way as with ubuntu
  2. IF all your kmodules are linked into the kernel (i.e. no `lsmod` output) IMHO the only option is to pass it via the kernel bootargs. E.g. with u-boot extend the quirks string to the env var `setenv bootargs  <OLD-CONTENT> quirks=1fetc.`
0 Kudos

4,333 Views
thiago_machado
Contributor III

I'm facing the same issue. The problem happens when the PN7462 is configured as a USB MSD Interface.

The UM108833, section 8.10 is used as reference. I can connect to this device in windows 10 by selecting a generic mass storage device driver. It has a single fat32 partition that I can read and write to. But in Libux is not possible. 

Could you guys tell what package or driver is needed to see the same behaviour on Linux? 

0 Kudos

4,584 Views
sergioa
Contributor III

Hello someone can help me with this issue?.

thanks

0 Kudos

4,584 Views
anthonypapillon
Contributor I

I have the same issue.

kernel: [ 5388.525610] usb 1-1.4: new full-speed USB device number 21 using dwc_otg
rsyslogd-2007: action 'action 17' suspended, next retry is Wed Sep 27 13:22:53 2017 [try http://www.rsyslog.com/e/2007 ]
kernel: [ 5403.605616] usb 1-1.4: device descriptor read/64, error -110
kernel: [ 5403.819889] usb 1-1.4: New USB device found, idVendor=1fc9, idProduct=0117
kernel: [ 5403.819911] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
kernel: [ 5403.819924] usb 1-1.4: Product: PN7462AU
kernel: [ 5403.819936] usb 1-1.4: Manufacturer: NXP
kernel: [ 5403.820865] usb-storage 1-1.4:1.0: USB Mass Storage device detected
kernel: [ 5403.822243] scsi host14: usb-storage 1-1.4:1.0
kernel: [ 5404.819252] scsi 14:0:0:0: Direct-Access     NXP      PN7462AU         1.00 PQ: 0 ANSI: 0
kernel: [ 5404.820193] sd 14:0:0:0: Attached scsi generic sg0 type 0
kernel: [ 5404.828753] sd 14:0:0:0: [sdb] 327 512-byte logical blocks: (167 kB/164 KiB)
kernel: [ 5404.831829] sd 14:0:0:0: [sdb] Write Protect is off
kernel: [ 5404.831852] sd 14:0:0:0: [sdb] Mode Sense: 00 00 00 00
kernel: [ 5404.834798] sd 14:0:0:0: [sdb] Asking for cache data failed
kernel: [ 5404.834814] sd 14:0:0:0: [sdb] Assuming drive cache: write through
kernel: [ 5404.891952]  sdb:
kernel: [ 5404.915357] sd 14:0:0:0: [sdb] Attached SCSI removable disk
kernel: [ 5405.153810] sd 14:0:0:0: [sdb] UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
kernel: [ 5405.153837] sd 14:0:0:0: [sdb] CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
kernel: [ 5405.153847] blk_update_request: I/O error, dev sdb, sector 0
kernel: [ 5405.378086] sd 14:0:0:0: [sdb] UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
kernel: [ 5405.378113] sd 14:0:0:0: [sdb] CDB: opcode=0x28 28 00 00 00 00 02 00 00 06 00
kernel: [ 5405.378123] blk_update_request: I/O error, dev sdb, sector 2
kernel: [ 5405.378132] Buffer I/O error on dev sdb, logical block 2, async page read
kernel: [ 5405.378140] Buffer I/O error on dev sdb, logical block 3, async page read
kernel: [ 5405.378149] Buffer I/O error on dev sdb, logical block 4, async page read
kernel: [ 5405.378156] Buffer I/O error on dev sdb, logical block 5, async page read
kernel: [ 5405.378164] Buffer I/O error on dev sdb, logical block 6, async page read
kernel: [ 5405.378172] Buffer I/O error on dev sdb, logical block 7, async page read
0 Kudos

4,584 Views
sergioa
Contributor III

Hello I did the secuence to run primary bootloader and when the mass store device is enable this error appeared.

thanks

0 Kudos

4,585 Views
jimmychan
NXP TechSupport
NXP TechSupport

could you tell me more details what is the step to reproduce this error?

0 Kudos