Re: sdhci_pci.ko fails to load

2016-03-22 Thread Guido Falsi
On 03/21/16 01:54, Ian Lepore wrote:
> On Sun, 2016-03-20 at 23:40 +0100, Jilles Tjoelker wrote:
>> On Sun, Mar 20, 2016 at 04:05:34PM -0600, Ian Lepore wrote:
>>> On Sun, 2016-03-20 at 22:33 +0100, Guido Falsi wrote:
 the full error in dmesg is the same as stated before:
>>
 link_elf_obj: symbol mmc_driver undefined
 linker_load_file: Unsupported file type
>>
 Meybe the symbol is optimized out by the compiler in the module?
>>
>>> I suspect this is caused by my r292180 back in December.  I'm
>>> trying to
>>> figure out if that's the case and if so, how to fix it.
>>
>> I think this is caused by the missing MODULE_DEPEND. The kernel
>> linker
>> only looks for symbols in the ELF objects containing the module
>> itself
>> and its declared dependencies.
>>
>> If mmc is compiled into the main kernel image, this is always
>> satisfied.
>>
> 
> Thanks for the clue about the linker, it would have taken me forever to
> figure that out by flailing around like I was doing.
> 
> Hopefully this is all fixed now with r297127, but I was only able to
> test it on arm systems (I have no x86 with sdhci).
> 

Sorry for the delay, I updated the machine to r297146 and can confirm
the problem is gone.

Thanks you a lot for the quick fix!

-- 
Guido Falsi 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: sdhci_pci.ko fails to load

2016-03-20 Thread Conrad Meyer
Try 'kldload mmc' first.  'sdhci_pci' is missing a MODULE_DEPEND on mmc.

Best,
Conrad

On Sun, Mar 20, 2016 at 2:14 PM, Guido Falsi  wrote:
> Hi,
>
> I've just noticed a regression.
>
> I have been using mmc.ko, mmcsd.ko and sdhci.ko to use the integrated
> SSD card reader on my laptop.
>
> I have actively used it during a trip at the start of December, so I'm
> sure it did work as expected then with a kernel from the end of November.
>
> Today with rr296993 I noticed it was not working, the device was not
> being attached by the kernel.
>
> doing "kldload sdhci_pci" retirns this error:
>
> link_elf_obj: symbol mmc_driver undefined
> linker_load_file: Unsupported file type
>
> I tried with the modules mentioned above already loaded.
>
> Compiling a kernel with the devices statically linked in works as expected.
>
> Is this some kind of regression?
>
> --
> Guido Falsi 
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: sdhci_pci.ko fails to load

2016-03-20 Thread Ian Lepore
On Sun, 2016-03-20 at 23:40 +0100, Jilles Tjoelker wrote:
> On Sun, Mar 20, 2016 at 04:05:34PM -0600, Ian Lepore wrote:
> > On Sun, 2016-03-20 at 22:33 +0100, Guido Falsi wrote:
> > > On 03/20/16 22:21, Guido Falsi wrote:
> > > > On 03/20/16 22:18, Conrad Meyer wrote:
> > > > > Try 'kldload mmc' first.  'sdhci_pci' is missing a
> > > > > MODULE_DEPEND
> > > > > on mmc.
> 
> > > > As I said, when loading sdhci_pci I had already loaded module
> > > > mmc.
> 
> > > > Anyway I'll try that again just to make sure, maybe I missed it
> > > > and
> > > > thought I had it loaded.
> 
> > > > I'll followup shortly.
> 
> > > I confirm that I had already loaded mmc.ko.
> 
> > [snip]
> > > the full error in dmesg is the same as stated before:
> 
> > > link_elf_obj: symbol mmc_driver undefined
> > > linker_load_file: Unsupported file type
> 
> > > Meybe the symbol is optimized out by the compiler in the module?
> 
> > I suspect this is caused by my r292180 back in December.  I'm
> > trying to
> > figure out if that's the case and if so, how to fix it.
> 
> I think this is caused by the missing MODULE_DEPEND. The kernel
> linker
> only looks for symbols in the ELF objects containing the module
> itself
> and its declared dependencies.
> 
> If mmc is compiled into the main kernel image, this is always
> satisfied.
> 

Thanks for the clue about the linker, it would have taken me forever to
figure that out by flailing around like I was doing.

Hopefully this is all fixed now with r297127, but I was only able to
test it on arm systems (I have no x86 with sdhci).

-- Ian
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: sdhci_pci.ko fails to load

2016-03-20 Thread Jilles Tjoelker
On Sun, Mar 20, 2016 at 04:05:34PM -0600, Ian Lepore wrote:
> On Sun, 2016-03-20 at 22:33 +0100, Guido Falsi wrote:
> > On 03/20/16 22:21, Guido Falsi wrote:
> > > On 03/20/16 22:18, Conrad Meyer wrote:
> > > > Try 'kldload mmc' first.  'sdhci_pci' is missing a MODULE_DEPEND
> > > > on mmc.

> > > As I said, when loading sdhci_pci I had already loaded module mmc.

> > > Anyway I'll try that again just to make sure, maybe I missed it and
> > > thought I had it loaded.

> > > I'll followup shortly.

> > I confirm that I had already loaded mmc.ko.

> [snip]
> > the full error in dmesg is the same as stated before:

> > link_elf_obj: symbol mmc_driver undefined
> > linker_load_file: Unsupported file type

> > Meybe the symbol is optimized out by the compiler in the module?

> I suspect this is caused by my r292180 back in December.  I'm trying to
> figure out if that's the case and if so, how to fix it.

I think this is caused by the missing MODULE_DEPEND. The kernel linker
only looks for symbols in the ELF objects containing the module itself
and its declared dependencies.

If mmc is compiled into the main kernel image, this is always satisfied.

-- 
Jilles Tjoelker
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: sdhci_pci.ko fails to load

2016-03-20 Thread Ian Lepore
On Sun, 2016-03-20 at 22:33 +0100, Guido Falsi wrote:
> On 03/20/16 22:21, Guido Falsi wrote:
> > On 03/20/16 22:18, Conrad Meyer wrote:
> > > Try 'kldload mmc' first.  'sdhci_pci' is missing a MODULE_DEPEND
> > > on mmc.
> > > 
> > 
> > As I said, when loading sdhci_pci I had already loaded module mmc.
> > 
> > Anyway I'll try that again just to make sure, maybe I missed it and
> > thought I had it loaded.
> > 
> > I'll followup shortly.
> > 
> 
> I confirm that I had already loaded mmc.ko.
> 
> Here's a session log:
> 
> Script started on Sun Mar 20 22:24:37 2016
> root@tommy:~ [0]# kldstat
> 
> Id Refs AddressSize Name
>  1   94 0x8020 d3b488   kernel
>  21 0x80f3d000 2d1ee8   zfs.ko
>  32 0x8120f000 a3c8 opensolaris.ko
>  41 0x81421000 635a tmpfs.ko
>  51 0x81428000 781b if_lagg.ko
>  61 0x8143 241b if_tun.ko
>  71 0x81433000 2266 if_gif.ko
>  81 0x81436000 24a3 if_tap.ko
>  91 0x81439000 be11 msdosfs.ko
> 102 0x81445000 5f59 cd9660.ko
> 111 0x8144b000 249  cd9660_iconv.ko
> 121 0x8144c000 3140 libiconv.ko
> 131 0x8145 32fd procfs.ko
> 141 0x81454000 3ccd pseudofs.ko
> 151 0x81458000 53b2 mmc.ko
> 161 0x8145e000 4274 sdhci.ko
> 171 0x81463000 1b10 mmcsd.ko
> 181 0x81465000 23ca sysvmsg.ko
> 191 0x81468000 302b sysvsem.ko
> 201 0x8146c000 2136 sysvshm.ko
> 211 0x8146f000 cfa  coretemp.ko
> 222 0x8147 3ac49sound.ko
> 231 0x814ab000 2282fsnd_hda.ko
> 241 0x814ce000 39fc autofs.ko
> 253 0x814d2000 aafd agp.ko
> 261 0x814dd000 8e60 fuse.ko
> 273 0x814e6000 45ee8vboxdrv.ko
> 282 0x8152c000 2a0f vboxnetflt.ko
> 292 0x8152f000 9506 netgraph.ko
> 301 0x81539000 150b ng_ether.ko
> 311 0x8153b000 3f86 vboxnetadp.ko
> 321 0x8153f000 8b936i915kms.ko
> 331 0x815cb000 4c8e1drm2.ko
> 344 0x81618000 1ca0 iicbus.ko
> 351 0x8161a000 ecb  iic.ko
> 361 0x8161b000 1663 iicbb.ko
> root@tommy:~ [0]# kldload sdhci_pci
> 
> kldload: an error occurred while loading the module. Please check
> dmesg(8) for more details.
> root@tommy:~ [1]# exit
> 
> Script done on Sun Mar 20 22:25:01 2016
> 
> the full error in dmesg is the same as stated before:
> 
> link_elf_obj: symbol mmc_driver undefined
> linker_load_file: Unsupported file type
> 
> Meybe the symbol is optimized out by the compiler in the module?
> 

I suspect this is caused by my r292180 back in December.  I'm trying to
figure out if that's the case and if so, how to fix it.

-- Ian

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: sdhci_pci.ko fails to load

2016-03-20 Thread Guido Falsi
On 03/20/16 22:21, Guido Falsi wrote:
> On 03/20/16 22:18, Conrad Meyer wrote:
>> Try 'kldload mmc' first.  'sdhci_pci' is missing a MODULE_DEPEND on mmc.
>>
> 
> As I said, when loading sdhci_pci I had already loaded module mmc.
> 
> Anyway I'll try that again just to make sure, maybe I missed it and
> thought I had it loaded.
> 
> I'll followup shortly.
> 

I confirm that I had already loaded mmc.ko.

Here's a session log:

Script started on Sun Mar 20 22:24:37 2016
root@tommy:~ [0]# kldstat

Id Refs AddressSize Name
 1   94 0x8020 d3b488   kernel
 21 0x80f3d000 2d1ee8   zfs.ko
 32 0x8120f000 a3c8 opensolaris.ko
 41 0x81421000 635a tmpfs.ko
 51 0x81428000 781b if_lagg.ko
 61 0x8143 241b if_tun.ko
 71 0x81433000 2266 if_gif.ko
 81 0x81436000 24a3 if_tap.ko
 91 0x81439000 be11 msdosfs.ko
102 0x81445000 5f59 cd9660.ko
111 0x8144b000 249  cd9660_iconv.ko
121 0x8144c000 3140 libiconv.ko
131 0x8145 32fd procfs.ko
141 0x81454000 3ccd pseudofs.ko
151 0x81458000 53b2 mmc.ko
161 0x8145e000 4274 sdhci.ko
171 0x81463000 1b10 mmcsd.ko
181 0x81465000 23ca sysvmsg.ko
191 0x81468000 302b sysvsem.ko
201 0x8146c000 2136 sysvshm.ko
211 0x8146f000 cfa  coretemp.ko
222 0x8147 3ac49sound.ko
231 0x814ab000 2282fsnd_hda.ko
241 0x814ce000 39fc autofs.ko
253 0x814d2000 aafd agp.ko
261 0x814dd000 8e60 fuse.ko
273 0x814e6000 45ee8vboxdrv.ko
282 0x8152c000 2a0f vboxnetflt.ko
292 0x8152f000 9506 netgraph.ko
301 0x81539000 150b ng_ether.ko
311 0x8153b000 3f86 vboxnetadp.ko
321 0x8153f000 8b936i915kms.ko
331 0x815cb000 4c8e1drm2.ko
344 0x81618000 1ca0 iicbus.ko
351 0x8161a000 ecb  iic.ko
361 0x8161b000 1663 iicbb.ko
root@tommy:~ [0]# kldload sdhci_pci

kldload: an error occurred while loading the module. Please check
dmesg(8) for more details.
root@tommy:~ [1]# exit

Script done on Sun Mar 20 22:25:01 2016

the full error in dmesg is the same as stated before:

link_elf_obj: symbol mmc_driver undefined
linker_load_file: Unsupported file type

Meybe the symbol is optimized out by the compiler in the module?

-- 
Guido Falsi 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: sdhci_pci.ko fails to load

2016-03-20 Thread Guido Falsi
On 03/20/16 22:18, Conrad Meyer wrote:
> Try 'kldload mmc' first.  'sdhci_pci' is missing a MODULE_DEPEND on mmc.
> 

As I said, when loading sdhci_pci I had already loaded module mmc.

Anyway I'll try that again just to make sure, maybe I missed it and
thought I had it loaded.

I'll followup shortly.

-- 
Guido Falsi 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"