Linux-3.9.5 kernel

Linux-3.9.5 kernel

Postby fvdw » Fri Jun 14, 2013 9:34 pm

I succeeded to compile the latest Linux kernel 3.9.5 for lacier_v2 family, so nwsp2, isp2, 5big2 and 2big2

Currently still doing some testing before releasing it in the firmware

This kernel will not be made available on short notice for nwsp1, isp1 and spd8020 (sorry but I have limited time for this)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Linux-3.9.5 kernel

Postby fvdw » Sat Jun 22, 2013 8:12 am

some problems found with switching to front port usb on the nwsp2 (device mode for usb).
Need to adpat the code because main changes are made in the usb device controller of the kernel
I used in the past fsl-usb2.udc module but that doesn't seem to like the kirkood setups
So i changed over to using mv-udc (the one also used by Lacie firmware to make the switch)
After some trial and error i got that platform integrated in the setup files and the mv-udc module loads fine now.

Code: Select all
root@fvdwsl-nwsp2:/ # dmesg -c
[   96.594914] usbcore: deregistering interface driver usb-storage
[   96.642155] orion-ehci orion-ehci.0: remove, state 1
[   96.647295] usb usb1: USB disconnect, device number 1
[   96.668606] orion-ehci orion-ehci.0: USB bus 1 deregistered
[   96.726030]  switching from usb-host to usb-device mode
[   96.742637] mv_usb_release
[   96.745344]  orion-ehci unregistered
[   96.759333]  mv_udc registered
[   96.762390] init function mv_udc controller finished
[   96.768774]  mv_udc registered
root@fvdwsl-nwsp2:/ #
root@fvdwsl-nwsp2:/ # modprobe mv-udc
root@fvdwsl-nwsp2:/ # dmesg -c
[  142.177389] Driver 'mv-udc'

But when loading g-file-storage it doesn't probe the driver and returns error no such device.
Code: Select all
root@fvdwsl-nwsp2:/ # modprobe g-file-storage file=/share/1000/usb-stor
modprobe: 'g_file_storage.ko': No such device

I cannot (yet) find the reason :thinking
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Linux-3.9.5 kernel

Postby fvdw » Sat Jun 22, 2013 9:26 am

oh , one remark
g_file-storage is no longer supported officially in linux 3.9.5
so i copied the source from 3.7.10 and modified the makefile en kconf files to get it compiled (no errors).
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Linux-3.9.5 kernel

Postby fvdw » Mon Jun 24, 2013 9:57 pm

still struggling
I can get mv-udc loaded
Code: Select all
root@fvdwsl-nwsp2:/ # lsmod
mv_udc 17240 0 - Live 0xbf067000
udc_core 5359 1 mv_udc, Live 0xbf061000
iscsi_tcp 7739 0 - Live 0xbf04c000
libiscsi_tcp 11307 1 iscsi_tcp, Live 0xbf045000
libiscsi 30681 2 iscsi_tcp,libiscsi_tcp, Live 0xbf037000
scsi_transport_iscsi 34596 2 iscsi_tcp,libiscsi, Live 0xbf026000
usblp 9895 0 - Live 0xbf01f000
root@fvdwsl-nwsp2:/ #


but when loading it, it gives an error in kernel output, when checking dmesg
Code: Select all
[  131.182184] ------------[ cut here ]------------
[  131.186815] WARNING: at arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0x104/0x208()
[  131.194923] Modules linked in: mv_udc(+) udc_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi usblp [last unloaded: ehci_hcd]
[  131.207193] [<c00184ac>] (unwind_backtrace+0x0/0xe4) from [<c0021490>] (warn_slowpath_common+0x4c/0x68)
[  131.216608] [<c0021490>] (warn_slowpath_common+0x4c/0x68) from [<c00214c4>] (warn_slowpath_null+0x18/0x1c)
[  131.226271] [<c00214c4>] (warn_slowpath_null+0x18/0x1c) from [<c001a3b4>] (__arm_ioremap_pfn_caller+0x104/0x208)
[  131.236442] [<c001a3b4>] (__arm_ioremap_pfn_caller+0x104/0x208) from [<c001a518>] (__arm_ioremap_caller+0x50/0x54)
[  131.246778] [<c001a518>] (__arm_ioremap_caller+0x50/0x54) from [<c001a0c0>] (__arm_ioremap+0x14/0x1c)
[  131.255991] [<c001a0c0>] (__arm_ioremap+0x14/0x1c) from [<c02b6c3c>] (devm_ioremap+0x3c/0x6c)
[  131.264536] [<c02b6c3c>] (devm_ioremap+0x3c/0x6c) from [<bf059024>] (mv_udc_probe+0x108/0x7e4 [mv_udc])
[  131.273940] [<bf059024>] (mv_udc_probe+0x108/0x7e4 [mv_udc]) from [<c02f3620>                    ] (platform_drv_probe+0x14/0x18)
[  131.283843] [<c02f3620>] (platform_drv_probe+0x14/0x18) from [<c02f26cc>] (dr                    iver_probe_device+0xbc/0x1e4)
[  131.293482] [<c02f26cc>] (driver_probe_device+0xbc/0x1e4) from [<c02f2854>] ( __driver_attach+0x60/0x84)
[  131.302873] [<c02f2854>] (__driver_attach+0x60/0x84) from [<c02f10d8>] (bus_for_each_dev+0x50/0x84)
[  131.311916] [<c02f10d8>] (bus_for_each_dev+0x50/0x84) from [<c02f1e70>] (bus_add_driver+0xa8/0x20c)
[  131.320933] [<c02f1e70>] (bus_add_driver+0xa8/0x20c) from [<c02f2bc0>] (driver_register+0xac/0x140)
[  131.329969] [<c02f2bc0>] (driver_register+0xac/0x140) from [<c000857c>] (do_one_initcall+0x9c/0x174)
[  131.339287] [<c000857c>] (do_one_initcall+0x9c/0x174) from [<c0058020>] (load_module+0x17fc/0x1a84)
[  131.348347] [<c0058020>] (load_module+0x17fc/0x1a84) from [<c0058370>] (sys_init_module+0xc8/0xcc)
[  131.357308] [<c0058370>] (sys_init_module+0xc8/0xcc) from [<c00123c0>] (ret_fast_syscall+0x0/0x2c)
[  131.366245] ---[ end trace 9ca95e6e55626617 ]---
[  131.370850] mv-udc mv-udc: failed to map I/O memory
[  131.375740] mv-udc: probe of mv-udc failed with error -16


this is the code where it fails
Code: Select all
   r = platform_get_resource_byname(udc->dev, IORESOURCE_IRQ, "capregs");
   if (r == NULL) {
      dev_err(&pdev->dev, "no I/O memory resource defined\n");
      return -ENODEV;
   }
   udc->cap_regs = (struct mv_cap_regs __iomem *)
      devm_ioremap(&pdev->dev, r->start, resource_size(r));
   if (udc->cap_regs == NULL) {
      dev_err(&pdev->dev, "failed to map I/O memory\n");
      return -EBUSY;
   }


when registering the platform it uses this definition for platform (copied from GPL 2.2.8)
here P_used_kirkwood_otg = udc->dev
Code: Select all
  p_used_kirkwood_otg->resource[0].start = (KIRKWOOD_REGS_PHYS_BASE | (USB_PHYS_BASE + 0x100));
  p_used_kirkwood_otg->resource[0].end = ((KIRKWOOD_REGS_PHYS_BASE | (USB_PHYS_BASE + 0x100)) + 4096);
  p_used_kirkwood_otg->resource[0].flags = IORESOURCE_MEM;
  p_used_kirkwood_otg->resource[0].name = "phyregs";
  p_used_kirkwood_otg->resource[1].start = IRQ_KIRKWOOD_USB;
  p_used_kirkwood_otg->resource[1].end = IRQ_KIRKWOOD_USB;
  p_used_kirkwood_otg->resource[1].flags = IORESOURCE_IRQ;
  p_used_kirkwood_otg->resource[1].name = "capregs";
  p_used_kirkwood_otg->dev.dma_mask = kmalloc(sizeof(u64), GFP_KERNEL);
  *p_used_kirkwood_otg->dev.dma_mask = MV_USB_DMA_MASK;
  p_used_kirkwood_otg->dev.coherent_dma_mask  = ~0;


something must be wrong in the resource definition :scratch
any help is appreciated
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands


Return to Development

Who is online

Users browsing this forum: No registered users and 14 guests