[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 0/3] xen/arm: omap5: PV USB driver issue
On Tue, Jan 21, 2014 at 06:53:14PM +0200, Alexander Savchenko wrote: > Hi, > > Could someone advice on the issue I am facing? > > I am trying to run PV USB on omap5uevm (omap5-panda) board. > > I use latest drivers for PV USB from Nathanael server: > http://members.iinet.net.au/~nathanael/0001-pvusb-driver.linux-next.patch > I think Konrad actually has the Xen PVUSB drivers in his git tree, and it has some extra patches compared to nathanaels's version (iirc).. -- Pasi > I have applied it to k3.8(dom0) with some patches for USB HCD, usbback drivers > (attached) and run on Xen 4.4.0-rc2. > > I am facing an issue with USB_STORAGE: > USB storage inited and mounted on domU over PV USB drivers. > But I only can copy files on USB storage with small sizes(no more than > ~100-500 kBytes). > Then USB storage falls to infinite loop > (leds on USB storage blinking all the time, more than needing for copy) > and then after few seconds dom0 disconnected usb device. > > Dom0, DomU use k3.8. > > I observed that usb-storage uses some scsi requests(from domU) which pass > directly to hardware, I think this is a problem. > > So, I applied PV SCSI drivers from > http://git.kernel.org/cgit/linux/kernel/git/konrad/xen.git/log/?id=refs/heads/devel/xen-scsi.v1.0 > to k3.8. > > Then I inited PV USB & PV SCSI with scripts vusb-start.sh and vscsi-start.sh > accordingly. > But I still facing issue with this. > > Dom0 log: > [ 0.000000] Booting Linux on physical CPU 0x0 > [ 0.000000] Linux version 3.8.13-53079-g8f32ae6 (x0187394@uglx0187394) > (gcc version 4.7 (GCC) ) #55 Tue Jan 21 18:01:39 EET 2014 > [ 0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=10c5387d > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache > [ 0.000000] Machine: OMAP5 Panda board, model: TI OMAP5 uEVM board > [ 0.000000] bootconsole [earlycon0] enabled > [ 0.000000] Memory policy: ECC disabled, Data cache writeback > [ 0.000000] On node 0 totalpages: 65280 > [ 0.000000] free_area_init_node: node 0, pgdat c3d639f0, node_mem_map > c428e000 > [ 0.000000] Normal zone: 512 pages used for memmap > [ 0.000000] Normal zone: 0 pages reserved > [ 0.000000] Normal zone: 64768 pages, LIFO batch:15 > [ 0.000000] psci: probing function IDs from device-tree > [ 0.000000] OMAP5432 ES2.0 > [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 > [ 0.000000] pcpu-alloc: [0] 0 > [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total > pages: 64768 > [ 0.000000] Kernel command line: console=hvc0 earlyprintk > [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes) > [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) > [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) > [ 0.000000] __ex_table already sorted, skipping sort > [ 0.000000] Memory: 255MB = 255MB total > [ 0.000000] Memory: 190640k/190640k available, 71504k reserved, 0K highmem > [ 0.000000] Virtual kernel memory layout: > [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) > [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) > [ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB) > [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) > [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) > [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) > [ 0.000000] .text : 0xc0008000 - 0xc0493748 (4654 kB) > [ 0.000000] .init : 0xc0494000 - 0xc3cfa29c (57753 kB) > [ 0.000000] .data : 0xc3cfc000 - 0xc3d64660 ( 418 kB) > [ 0.000000] .bss : 0xc3d64660 - 0xc428d634 (5284 kB) > [ 0.000000] NR_IRQS:16 nr_irqs:16 16 > [ 0.000000] Architected local timer running at 6.14MHz (virt). > [ 0.000000] Switching to timer-based delay loop > [ 0.000000] sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps > every 3489660920ms > [ 0.000000] Console: colour dummy device 80x30 > [ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., > Ingo Molnar > [ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8 > [ 0.000000] ... MAX_LOCK_DEPTH: 48 > [ 0.000000] ... MAX_LOCKDEP_KEYS: 8191 > [ 0.000000] ... CLASSHASH_SIZE: 4096 > [ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384 > [ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768 > [ 0.000000] ... CHAINHASH_SIZE: 16384 > [ 0.000000] memory used by lock dependency info: 3695 kB > [ 0.000000] per task-struct memory footprint: 1152 bytes > [ 0.046875] Calibrating delay loop (skipped), value calculated using timer > frequency.. 12.30 BogoMIPS (lpj=48000) > [ 0.054687] pid_max: default: 32768 minimum: 301 > [ 0.054687] Security Framework initialized > [ 0.062500] Mount-cache hash table entries: 512 > [ 0.070312] CPU: Testing write buffer coherency: ok > [ 0.078125] Setting up static identity map for 0xd0334e00 - 0xd0334e58 > [ 0.085937] devtmpfs: initialized > [ 0.093750] Xen 4.4 support found, events_irq=31 gnttab_frame_pfn=4b000 > [ 0.101562] xen:grant_table: Grant tables using version 1 layout. > [ 0.101562] Grant table initialized > [ 0.109375] omap_hwmod: aess: _wait_target_disable failed > [ 0.132812] omap_hwmod: dss_dispc: cannot be enabled for reset (3) > [ 0.140625] omap_hwmod: dss_dsi1_a: cannot be enabled for reset (3) > [ 0.148437] omap_hwmod: dss_dsi1_b: cannot be enabled for reset (3) > [ 0.156250] omap_hwmod: dss_dsi1_c: cannot be enabled for reset (3) > [ 0.164062] omap_hwmod: dss_hdmi: cannot be enabled for reset (3) > [ 0.171875] omap_hwmod: dss_rfbi: cannot be enabled for reset (3) > [ 0.234375] pinctrl core: initialized pinctrl subsystem > [ 0.242187] regulator-dummy: no parameters > [ 0.242187] NET: Registered protocol family 16 > [ 0.250000] Xen: initializing cpu0 > [ 0.250000] DMA: preallocated 256 KiB pool for atomic coherent allocations > [ 0.257812] xen:swiotlb_xen: Warning: only able to allocate 8 MB for > software IO TLB > [ 0.265625] software IO TLB [mem 0xde000000-0xde800000] (8MB) mapped at > [ce000000-ce7fffff] > [ 0.281250] gpiochip_add: registered GPIOs 0 to 31 on device: gpio > [ 0.281250] OMAP GPIO hardware version 0.1 > [ 0.289062] gpiochip_add: registered GPIOs 32 to 63 on device: gpio > [ 0.289062] gpiochip_add: registered GPIOs 64 to 95 on device: gpio > [ 0.296875] OMAP DMA hardware revision 0.0 > [ 0.304687] pinctrl-single 4a002840.pinmux: 219 pins at pa fc002840 size > 438 > [ 0.312500] pinctrl-single 4ae0c840.pinmux: 28 pins at pa fce0c840 size 56 > [ 0.335937] bio: create slab <bio-0> at 0 > [ 0.343750] xen:balloon: Initialising balloon driver > [ 0.343750] of_get_named_gpio_flags exited with status 80 > [ 0.343750] hsusb2_reset: 3300 mV > [ 0.351562] of_get_named_gpio_flags exited with status 79 > [ 0.351562] hsusb3_reset: 3300 mV > [ 0.351562] SCSI subsystem initialized > [ 0.359375] libata version 3.00 loaded. > [ 0.359375] usbcore: registered new interface driver usbfs > [ 0.367187] usbcore: registered new interface driver hub > [ 0.367187] usbcore: registered new device driver usb > [ 0.375000] Switching to clocksource arch_sys_counter > [ 0.414062] NET: Registered protocol family 2 > [ 0.414062] TCP established hash table entries: 2048 (order: 2, 16384 > bytes) > [ 0.421875] TCP bind hash table entries: 2048 (order: 4, 73728 bytes) > [ 0.429687] TCP: Hash tables configured (established 2048 bind 2048) > [ 0.437500] TCP: reno registered > [ 0.437500] UDP hash table entries: 256 (order: 2, 20480 bytes) > [ 0.445312] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes) > [ 0.453125] NET: Registered protocol family 1 > [ 0.679687] NetWinder Floating Point Emulator V0.97 (double precision) > [ 0.687500] VFS: Disk quotas dquot_6.5.2 > [ 0.695312] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) > [ 0.703125] msgmni has been set to 372 > [ 0.710937] io scheduler noop registered > [ 0.718750] io scheduler deadline registered > [ 0.718750] io scheduler cfq registered (default) > [ 0.726562] xen:xen_evtchn: Event-channel device installed > [ 0.742187] console [hvc0] enabled, bootconsole disabled > [ 0.765625] brd: module loaded > [ 0.781250] loop: module loaded > [ 0.789062] ahci ahci.0.auto: can't get clock > [ 0.789062] ahci ahci.0.auto: SATA PLL_STATUS = 0x00018041 > [ 0.796875] ahci ahci.0.auto: forcing PORTS_IMPL to 0x1 > [ 0.804687] ahci ahci.0.auto: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 > impl platform mode > [ 0.812500] ahci ahci.0.auto: flags: 64bit ncq sntf pm led clo only pmp > pio slum part ccc apst > [ 0.820312] scsi0 : ahci_platform > [ 0.828125] ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a1401ff] port > 0x100 irq 86 > [ 0.835937] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver > [ 0.843750] ehci-omap: OMAP-EHCI Host Controller driver > [ 0.859375] ehci-omap 4a064c00.ehci: EHCI Host Controller > [ 0.867187] ehci-omap 4a064c00.ehci: new USB bus registered, assigned bus > number 1 > [ 0.875000] ehci-omap 4a064c00.ehci: irq 109, io mem 0x4a064c00 > [ 0.898437] ehci-omap 4a064c00.ehci: USB 2.0 started, EHCI 1.00 > [ 0.898437] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 > [ 0.906250] usb usb1: New USB device strings: Mfr=3, Product=2, > SerialNumber=1 > [ 0.914062] usb usb1: Product: EHCI Host Controller > [ 0.921875] usb usb1: Manufacturer: Linux 3.8.13-53079-g8f32ae6 ehci_hcd > [ 0.929687] usb usb1: SerialNumber: 4a064c00.ehci > [ 0.937500] hub 1-0:1.0: USB hub found > [ 0.937500] hub 1-0:1.0: 3 ports detected > [ 1.085937] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver > [ 1.085937] ohci-omap3 4a064800.ohci: OMAP3 OHCI Host Controller > [ 1.093750] ohci-omap3 4a064800.ohci: new USB bus registered, assigned bus > number 2 > [ 1.101562] ohci-omap3 4a064800.ohci: irq 108, io mem 0x4a064800 > [ 1.187500] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001 > [ 1.195312] usb usb2: New USB device strings: Mfr=3, Product=2, > SerialNumber=1 > [ 1.203125] usb usb2: Product: OMAP3 OHCI Host Controller > [ 1.210937] usb usb2: Manufacturer: Linux 3.8.13-53079-g8f32ae6 ohci_hcd > [ 1.210937] usb usb2: SerialNumber: 4a064800.ohci > [ 1.218750] ata1: SATA link down (SStatus 0 SControl 300) > [ 1.226562] hub 2-0:1.0: USB hub found > [ 1.226562] hub 2-0:1.0: 3 ports detected > [ 1.359375] usb 1-2: new high-speed USB device number 2 using ehci-omap > [ 1.515625] usb 1-2: New USB device found, idVendor=0424, idProduct=3503 > [ 1.515625] usb 1-2: New USB device strings: Mfr=0, Product=0, > SerialNumber=0 > [ 1.531250] hub 1-2:1.0: USB hub found > [ 1.531250] hub 1-2:1.0: 3 ports detected > [ 1.664062] usb 1-3: new high-speed USB device number 3 using ehci-omap > [ 1.820312] usb 1-3: New USB device found, idVendor=0424, idProduct=9730 > [ 1.820312] usb 1-3: New USB device strings: Mfr=0, Product=0, > SerialNumber=0 > [ 1.835937] usbcore: registered new interface driver usbback > [ 1.843750] Initializing USB Mass Storage driver... > [ 1.843750] usbcore: registered new interface driver usb-storage > [ 1.851562] USB Mass Storage support registered. > [ 1.859375] i2c /dev entries driver > [ 1.859375] usbcore: registered new interface driver usbhid > [ 1.867187] usbhid: USB HID core driver > [ 1.875000] TCP: cubic registered > [ 1.875000] Initializing XFRM netlink socket > [ 1.882812] NET: Registered protocol family 17 > [ 1.882812] NET: Registered protocol family 15 > [ 1.890625] VFP support v0.3: implementor 41 architecture 4 part 30 > variant f rev 0 > [ 1.898437] mux: Failed to setup hwmod io irq -22 > [ 1.898437] Power Management for TI OMAP4PLUS devices. > [ 1.906250] ThumbEE CPU extension supported. > [ 1.914062] Registering SWP/SWPB emulation handler > [ 1.921875] devtmpfs: mounted > [ 1.968750] Freeing init memory: 57752K > # ./vusb-start.sh 1 0 > [ 9.289062] xen-usbback:urb-ring-ref 8, conn-ring-ref 9, event-channel 3 > # ./vscsi-start.sh 1 0 > # echo 1-2.1:1:0:1 > /sys/bus/usb/drivers/usbback/new_vport > > [ 40.796875] usb 1-2.1: new high-speed USB device number 4 using ehci-omap > [ 40.914062] usb 1-2.1: New USB device found, idVendor=8564, idProduct=1000 > [ 40.921875] usb 1-2.1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 40.929687] usb 1-2.1: Product: Mass Storage Device > [ 40.929687] usb 1-2.1: Manufacturer: JetFlash > [ 40.937500] usb 1-2.1: SerialNumber: 54S44YGYMT2ZM7XO > > DomU log: > 0.710937] console [hvc0] enabled, bootconsole disabled > [ 0.718750] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 104) is a > OMAP UART0 > [ 0.718750] omap_uart 4806c000.serial: did not get pins for uart1 error: > -19 > [ 0.718750] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 105) is a > OMAP UART1 > [ 0.718750] omap_uart 4806e000.serial: did not get pins for uart3 error: > -19 > [ 0.718750] 4806e000.serial: ttyO3 at MMIO 0x4806e000 (irq = 102) is a > OMAP UART3 > [ 0.718750] 48066000.serial: ttyO4 at MMIO 0x48066000 (irq = 137) is a > OMAP UART4 > [ 0.726562] omap_uart 48068000.serial: did not get pins for uart5 error: > -19 > [ 0.726562] 48068000.serial: ttyO5 at MMIO 0x48068000 (irq = 138) is a > OMAP UART5 > [ 0.726562] [drm] Initialized drm 1.1.0 20060810 > [ 0.742187] brd: module loaded > [ 0.757812] loop: module loaded > [ 0.757812] omap2_mcspi 48098000.spi: pins are not configured from the > driver > [ 0.765625] Initialising Xen virtual ethernet driver. > [ 0.765625] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver > [ 0.765625] ehci-platform: EHCI generic platform driver > [ 0.765625] vusb vusb-0: Xen USB2.0 Virtual Host Controller > [ 0.765625] vusb vusb-0: new USB bus registered, assigned bus number 1 > [ 0.765625] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 > [ 0.765625] usb usb1: New USB device strings: Mfr=3, Product=2, > SerialNumber=1 > [ 0.765625] usb usb1: Product: Xen USB2.0 Virtual Host Controller > [ 0.765625] usb usb1: Manufacturer: Linux 3.8.13-53079-g8f32ae6 xen_hcd > [ 0.765625] usb usb1: SerialNumber: vusb-0 > [ 0.773437] hub 1-0:1.0: USB hub found > [ 0.773437] hub 1-0:1.0: 8 ports detected > [ 0.773437] Initializing USB Mass Storage driver... > [ 0.773437] usbcore: registered new interface driver usb-storage > [ 0.773437] USB Mass Storage support registered. > [ 0.773437] mousedev: PS/2 mouse device common for all mice > [ 0.781250] usbcore: registered new interface driver usbhid > [ 0.781250] usbhid: USB HID core driver > [ 0.789062] TCP: cubic registered > [ 0.789062] Initializing XFRM netlink socket > [ 0.789062] NET: Registered protocol family 17 > [ 0.789062] NET: Registered protocol family 15 > [ 0.789062] VFP support v0.3: implementor 41 architecture 4 part 30 > variant f rev 0 > [ 0.789062] mux: Failed to setup hwmod io irq -22 > [ 0.789062] ThumbEE CPU extension supported. > [ 0.789062] Registering SWP/SWPB emulation handler > [ 0.789062] dmm 4e000000.dmm: initialized all PAT entries > [ 0.804687] /home/x0187394/work/xen/kernel_dom0/drivers/rtc/hctosys.c: > unable to open rtc device (rtc0) > [ 0.804687] devtmpfs: mounted > [ 0.812500] Freeing init memory: 6044K > > Please press Enter to activate this console. > [ 6.500000] scsi0 : Xen SCSI frontend driver > > / # [ 40.796875] usb 1-2.1: new high-speed USB device number 4 using > ehci-omap > [ 40.914062] usb 1-2.1: New USB device found, idVendor=8564, idProduct=1000 > [ 40.921875] usb 1-2.1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 40.929687] usb 1-2.1: Product: Mass Storage Device > [ 40.929687] usb 1-2.1: Manufacturer: JetFlash > [ 40.937500] usb 1-2.1: SerialNumber: 54S44YGYMT2ZM7XO > [ 32.703125] usb 1-1: new high-speed USB device number 2 using vusb > (XEN) mm.c:1176:d0 gnttab_mark_dirty not implemented yet > [ 32.875000] usb 1-1: New USB device found, idVendor=8564, idProduct=1000 > [ 32.875000] usb 1-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > [ 32.875000] usb 1-1: Product: Mass Storage Device > [ 32.875000] usb 1-1: Manufacturer: JetFlash > [ 32.875000] usb 1-1: SerialNumber: 54S44YGYMT2ZM7XO > [ 32.906250] scsi1 : usb-storage 1-1:1.0 > [ 34.117187] scsi 1:0:0:0: Direct-Access JetFlash Transcend 8GB 1100 > PQ: 0 ANSI: 4 > [ 34.132812] sd 1:0:0:0: [sda] 15826944 512-byte logical blocks: (8.10 > GB/7.54 GiB) > [ 34.140625] sd 1:0:0:0: [sda] Write Protect is off > [ 34.140625] sd 1:0:0:0: [sda] Mode Sense: 00 f1 7f ff *<--this data may > changed on different boots* > [ 34.156250] sd 1:0:0:0: [sda] Asking for cache data failed > [ 34.156250] sd 1:0:0:0: [sda] Assuming drive cache: write through > [ 34.179687] sd 1:0:0:0: [sda] Asking for cache data failed > [ 34.179687] sd 1:0:0:0: [sda] Assuming drive cache: write through > [ 34.195312] sda: sda1 > [ 34.203125] sd 1:0:0:0: [sda] Asking for cache data failed > [ 34.203125] sd 1:0:0:0: [sda] Assuming drive cache: write through > [ 34.203125] sd 1:0:0:0: [sda] Attached SCSI removable disk > > # lsusb > Bus 001 Device 002: ID 8564:1000 > Bus 001 Device 001: ID 1d6b:0002 > > But it looks like scsi requests from usb-storage still passing directly to > hardware > instead of passing through PV SCSI. > > Could smb tell me how to init PV SCSI and PV USB correctly? > > Regards, > Alexander > > Alexander Savchenko (2): > usbback: Add new features > HACK: usb:core:hcd: Do not remapping self dma addresses > > Nathanael Rensen (1): > pvusb drivers > > drivers/usb/core/hcd.c | 1 + > drivers/usb/host/Kconfig | 23 + > drivers/usb/host/Makefile | 2 + > drivers/usb/host/xen-usbback/Makefile | 3 + > drivers/usb/host/xen-usbback/common.h | 170 ++++ > drivers/usb/host/xen-usbback/usbback.c | 1272 +++++++++++++++++++++++ > drivers/usb/host/xen-usbback/usbdev.c | 402 ++++++++ > drivers/usb/host/xen-usbback/xenbus.c | 482 +++++++++ > drivers/usb/host/xen-usbfront.c | 1739 > ++++++++++++++++++++++++++++++++ > include/xen/interface/io/usbif.h | 150 +++ > 10 files changed, 4244 insertions(+) > create mode 100644 drivers/usb/host/xen-usbback/Makefile > create mode 100644 drivers/usb/host/xen-usbback/common.h > create mode 100644 drivers/usb/host/xen-usbback/usbback.c > create mode 100644 drivers/usb/host/xen-usbback/usbdev.c > create mode 100644 drivers/usb/host/xen-usbback/xenbus.c > create mode 100644 drivers/usb/host/xen-usbfront.c > create mode 100644 include/xen/interface/io/usbif.h > > -- > 1.7.9.5 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |