All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] ARM: Keystone: Fix USB Mass storage on K2E
@ 2016-08-17 12:05 ` Roger Quadros
  0 siblings, 0 replies; 22+ messages in thread
From: Roger Quadros @ 2016-08-17 12:05 UTC (permalink / raw)
  To: linux, ssantosh
  Cc: grygorii.strashko, linux-arm-kernel, linux-usb, linux-kernel,
	Roger Quadros

Hi,

USB mass storage devices lock up on K2E or any Keystone2 system with more than
2GB RAM. Test case:

1) Plug in USB pen drive
2) mount
	udisks --mount /dev/sda1
Mounted /org/freedesktop/UDisks/devices/sda at /media/PENDRIVE

3) write to medium
	cp blobs/1M.bin /media/PENDRIVE

4) flush to medium
	sync

Things lock up here with the following message within a minute.

[  103.440996] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  103.449083] xhci-hcd xhci-hcd.0.auto: Assuming host is dying, halting host.
[  103.456064] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  103.461619] usb 1-1: USB disconnect, device number 2
[  103.511036] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[  103.519210] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 07 cf 28 00 00 f0 00
[  103.526785] blk_update_request: I/O error, dev sda, sector 511784
[  103.533093] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[  103.541285] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 07 d0 18 00 00 f0 00
[  103.548854] blk_update_request: I/O error, dev sda, sector 512024
removing file
[  103.558340] VFS: busy inodes on changed media or resized disk sda
[  103.569007] FAT-fs (sda): Directory bread(block 30640) failed
[  103.574778] FAT-fs (sda): Directory bread(block 30641) failed
[  103.580554] FAT-fs (sda): Directory bread(block 30642) failed
[  103.586361] FAT-fs (sda): Directory bread(block 30643) failed
[  103.592134] FAT-fs (sda): Directory bread(block 30644) failed
[  103.597915] FAT-fs (sda): Directory bread(block 30645) failed
[  103.604012] FAT-fs (sda): Directory bread(block 30646) failed
[  103.610197] FAT-fs (sda): Directory bread(block 30647) failed

On Keystone2, DMA can happen only in the first 2 GB of RAM.
The culprit is an incorrect dma_max_pfn() which results in bounce buffers to
be set outside the DMA'ble area in the SCSI layer in scsi_calculate_bounce_limit().
XHCI controller tries to accesses these non DMA'ble regions which causes the lock-up.
This is explained further in the patch.

cheers,
-roger

Roger Quadros (1):
  ARM: dma: fix dma_max_pfn()

 arch/arm/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-09-28  8:46 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 12:05 [PATCH 0/1] ARM: Keystone: Fix USB Mass storage on K2E Roger Quadros
2016-08-17 12:05 ` Roger Quadros
2016-08-17 12:05 ` [PATCH 1/1] ARM: dma: fix dma_max_pfn() Roger Quadros
2016-08-17 12:05   ` Roger Quadros
2016-08-18 14:24   ` Russell King - ARM Linux
2016-08-18 14:24     ` Russell King - ARM Linux
2016-08-18 16:55     ` Santosh Shilimkar
2016-08-18 16:55       ` Santosh Shilimkar
2016-08-18 23:07       ` Russell King - ARM Linux
2016-08-18 23:07         ` Russell King - ARM Linux
2016-08-19  2:01         ` Santosh Shilimkar
2016-08-19  2:01           ` Santosh Shilimkar
2016-08-19  7:30           ` Roger Quadros
2016-08-19  7:30             ` Roger Quadros
2016-08-19 16:38             ` Santosh Shilimkar
2016-08-19 16:38               ` Santosh Shilimkar
2016-09-12 11:38               ` Roger Quadros
2016-09-12 11:38                 ` Roger Quadros
2016-09-28  7:53                 ` Roger Quadros
2016-09-28  7:53                   ` Roger Quadros
2016-09-28  8:46                   ` Russell King - ARM Linux
2016-09-28  8:46                     ` Russell King - ARM Linux

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.