Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751718AbbBRMHP (ORCPT ); Wed, 18 Feb 2015 07:07:15 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:42047 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbbBRMHM (ORCPT ); Wed, 18 Feb 2015 07:07:12 -0500 From: Pali =?utf-8?q?Roh=C3=A1r?= To: Ivaylo Dimitrov Subject: Re: [PATCH] usb: gadget: nokia: Add mass storage driver to g_nokia Date: Wed, 18 Feb 2015 13:07:07 +0100 User-Agent: KMail/1.13.7 (Linux/3.13.0-45-generic; KDE/4.14.2; x86_64; ; ) Cc: balbi@ti.com, "Greg Kroah-Hartman" , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Pavel Machek , Sebastian Reichel , Aaro Koskinen References: <1422698010-2907-1-git-send-email-pali.rohar@gmail.com> <54D6530D.7070100@gmail.com> <54D65A91.6010605@gmail.com> In-Reply-To: <54D65A91.6010605@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1510349.nXvjMYQkry"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201502181307.07802@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7359 Lines: 169 --nextPart1510349.nXvjMYQkry Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Saturday 07 February 2015 19:33:53 Ivaylo Dimitrov wrote: > Hi, >=20 > On 7.02.2015 20:01, Ivaylo Dimitrov wrote: > > On 2.02.2015 21:14, Felipe Balbi wrote: > >> On Mon, Feb 02, 2015 at 08:07:51PM +0100, Pali Roh=C3=A1r wrote: > >>> On Monday 02 February 2015 20:01:11 Felipe Balbi wrote: > >>>> Hi, > >>>>=20 > >>>> On Mon, Feb 02, 2015 at 07:58:59PM +0100, Pali Roh=C3=A1r=20 wrote: > >>>>> On Monday 02 February 2015 19:54:58 Felipe Balbi wrote: > >>>>>> Hi, > >>>>>>=20 > >>>>>> On Sat, Jan 31, 2015 at 10:53:30AM +0100, Pali Roh=C3=A1r=20 wrote: > >>>>>>> This patch adds removable mass storage support to > >>>>>>> g_nokia gadget (for N900). It means that at runtime > >>>>>>> block device can be exported or unexported. So it does > >>>>>>> not export anything by default and thus allows to use > >>>>>>> MyDocs partition as before... > >>>>>>>=20 > >>>>>>> Signed-off-by: Pali Roh=C3=A1r > >>>>>>=20 > >>>>>> thanks, but no thanks. Build your own using configfs. > >>>>>=20 > >>>>> But it needs some userspace interaction right? > >>>>> Then its not possible for nfsboot. > >>>>=20 > >>>> oh, right... you're using nfsboot through g_nokia. Hmm, > >>>> sounds like you need initramfs. > >>>=20 > >>> Also compiling usb gadgets as external .ko modules is > >>> broken. So I cannot use configfs, when I compile g_nokia > >>> even if I use initramfs... > >>=20 > >> yeah, there are people working on that and some patches > >> already flying around for it. Meanwhile, you can make it > >> built-in and use initramfs to add mass_storage through > >> configfs to g_nokia, no issues. > >=20 > > Bellow is the bactrace of the crash when g_nokia is > > modprobed. Any hint on where to look for is appreciated. > >=20 > > <0>[ 33.751983] Kernel panic - not syncing: Fatal > > exception =C3=BF=C3=BFT!19\00]\00]<6>[ 59.570159] bq2415x-charger > > 2-006b: automode enabled <1>[ 59.597534] [bf286014] > > *pgd=3D8eda8811, *pte=3D00000000, *ppte=3D00000000 <6>[ =20 > > 59.609405] bq2415x-charger 2-006b: driver registered <0>[ =20 > > 59.640472] Internal error: Oops: 80000007 [#1] PREEMPT ARM > > <4>[ 59.650421] Modules linked in: ipv6(+) > > bq2415x_charger(+) g_mass_storage usb_f_mass_storage > > libcomposite configfs uinput adp1653 ad5820 et8ek8 smiaregs > > hsi_char radio_platform_si4713 joydev omap_ssi_port > > wl1251_spi wl1251 rx51_battery mac80211 isp1704_charger > > smc91x mii cfg80211 si4713 v4l2_common crc7 videodev > > tsc2005 media tsl2563 twl4030_vibra ff_memless > > lis3lv02d_i2c lis3lv02d omap_ssi input_polldev hsi > > twl4030_wdt omap_wdt rtc_twl leds_lp5523 leds_lp55xx_common > > <4>[ 59.715332] CPU: 0 PID: 13 Comm: kworker/0:1 Not > > tainted 3.19.0-rc5+ #2 > > <4>[ 59.726501] Hardware name: Nokia RX-51 board > > <4>[ 59.735168] Workqueue: events usb_gadget_work > > <4>[ 59.743896] task: cf8ab900 ti: cf992000 task.ti: > > cf992000 <4>[ 59.753692] PC is at 0xbf286014 > > <4>[ 59.761108] LR is at > > try_get_usb_function_instance+0x90/0x9c [libcomposite] > > <4>[ 59.772613] pc : [] lr : [] =20 > > psr: 80000113 <4>[ 59.772613] sp : cf993e50 ip : > > 0000001c fp : 00000000 <4>[ 59.793060] r10: 00000000 r9 > > : 00000000 r8 : cfcad600 <4>[ 59.802581] r7 : cedaab80=20 > > r6 : 00000000 r5 : bf28444c r4 : cedaab80 > > <4>[ 59.813476] r3 : cedd8f38 r2 : 00000001 r1 : > > 00000000 r0 : cedd8f04 > > <4>[ 59.824310] Flags: Nzcv IRQs on FIQs on Mode SVC_32 > > ISA ARM Segment kernel > > <4>[ 59.836090] Control: 10c5387d Table: 8e970019 DAC: > > 00000015 <0>[ 59.846252] Process kworker/0:1 (pid: 13, > > stack limit =3D 0xcf992238) <0>[ 59.857086] Stack: > > (0xcf993e50 to 0xcf994000) <0>[ 59.865814] 3e40: =20 > > c03fb2d8 bf266e68 cf1fdf00 > > c015d0dc > > <0>[ 59.878723] 3e60: 92000000 00001000 00000000 c015d8d8 > > 00001000 00000000 c03fb2d8 bf266e68 > > <0>[ 59.891693] 3e80: 00000000 00000001 00000000 c00f58f8 > > cf801c80 cedaab80 cf03b0b8 cedaac00 > > <0>[ 59.904663] 3ea0: bf284424 c015d980 00000000 bf266e68 > > 00000000 cedaab80 bf28444c 00000000 > > <0>[ 59.917572] 3ec0: cf03b0b8 cfcad600 00000000 bf263dd8 > > cf03b0b8 bf28444c cf03b0b8 cf1fea00 > > <0>[ 59.930450] 3ee0: c0620cd8 bf28444c c0609868 cfcad600 > > 00000000 00000000 00000000 c02c5478 > > <0>[ 59.943420] 3f00: bf284470 c0620cd8 c0606ff8 c02c5f54 > > cf98d080 bf284470 c0606ff8 c0047288 > > <0>[ 59.956390] 3f20: cf98d080 bf284470 00000001 cf98d080 > > c0606ff8 c0607008 c0609868 cf98d098 > > <0>[ 59.969360] 3f40: 00000008 00000000 00000000 c00477ec > > cf98a580 00000000 cf98d080 c00474c4 > > <0>[ 59.982330] 3f60: 00000000 00000000 00000000 c004b148 > > 22000000 00000000 11880000 cf98d080 > > <0>[ 59.995208] 3f80: 00000000 cf993f84 cf993f84 00000000 > > cf993f90 cf993f90 cf993fac cf98a580 > > <0>[ 60.008026] 3fa0: c004b07c 00000000 00000000 c000e058 > > 00000000 00000000 00000000 00000000 > > <0>[ 60.020782] 3fc0: 00000000 00000000 00000000 00000000 > > 00000000 00000000 00000000 00000000 > > <0>[ 60.033355] 3fe0: 00000000 00000000 00000000 00000000 > > 00000013 00000000 40000500 04000401 > > <4>[ 60.045867] [] > > (try_get_usb_function_instance [libcomposite]) from > > [] (__kernfs_create_file+0x7c/0xa0) <4>[ =20 > > 60.065155] [] (__kernfs_create_file) from > > [] (sysfs_add_file_mode_ns+0x134/0x1ac) > > <4>[ 60.082977] [] (sysfs_add_file_mode_ns) from > > [] (sysfs_create_file_ns+0x30/0x44) > > <4>[ 60.100952] [] (sysfs_create_file_ns) from > > [] (0xcedaab80) > > <0>[ 60.112884] Code: bad PC value > > <6>[ 60.210144] NET: Registered protocol family 10 > > <6>[ 60.671600] bq27x00-battery 2-0055: support ver. 1.2.0 > > enabled <6>[ 60.832885] bq27x00-battery 2-0055: battery > > is not calibrated! ignoring capacity values > > <6>[ 63.788269] Adding 786428k swap on /dev/mmcblk0p3.=20 > > Priority:-1 extents:1 across:786428k SS > > <5>[ 64.057617] random: nonblocking pool is initialized > > <6>[ 64.554016] NET: Registered protocol family 35 > > <4>[ 65.667510] ---[ end trace 85b8d26ec312a8c1 ]--- > >=20 > >=20 > > Regards, > > Ivo >=20 > Removing __init from nokia_bind declaration makes g_nokia > working again. I guess someone who knows better than me that > sections magic should take it from here. >=20 > Ivo No, it is not working on my devices. kernel does not crash, but=20 usb communication does not work. all usb networking packets are=20 lost. =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart1510349.nXvjMYQkry Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlTkgGsACgkQi/DJPQPkQ1IegQCeId7oFBDJjUP6ra48e4Xb68M9 WBMAniJmVtueRAtiuAdsbsxbrUP5e7Pm =TjmA -----END PGP SIGNATURE----- --nextPart1510349.nXvjMYQkry-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/