9-STABLE: Chelsio t4nex0: failed to pre-process config file: 2.

Navdeep Parhar nparhar at gmail.com
Mon Jun 3 04:32:01 UTC 2013


On Mon, Jun 03, 2013 at 04:04:31AM +0000, John wrote:
> ----- Alfred Perlstein's Original Message -----
> > This looks like the result of forgetting to include the actual
> > firmware in the kernel config and/or the firmware device itself.
> > 
> > Can you check if you've included all the needed extra modules in the
> > kernel config such as firmware(4) and the module for the card
> > firmware itself?
> 
>    Thank you for the hint. I tracked down t4fw_cfg via the Makefile
> in the modules area.
> 
>    However, I'm not actually sure how it works at this point. When I
> kldload if_cxgbe and check for t4fw_cfg it does not appear to be
> loaded (kldstat -v | grep t4).

The contents of t4fw_cfg are needed only during driver attach and this
KLD is automatically loaded and then unloaded by the firmware(9)
subsystem.

> 
>    Moving on, adding t4fw_cfg_load to loader.conf we end up with:
> 
> Id Refs Address            Size     Name
>  1   17 0xffffffff80200000 15652a8  kernel
>  2    1 0xffffffff81766000 4820     coretemp.ko
>  3    1 0xffffffff8176b000 797b0    t4fw_cfg.ko
>  4    1 0xffffffff817e5000 45b38    if_cxgbe.ko
>  5    1 0xffffffff8182b000 11b78    ipmi.ko
>  6    2 0xffffffff8183d000 2a30     smbus.ko
> 
>    and everything seems to work. I think this is worth a patch
> to the man page at least:

The patch makes sense.  Please commit it (or let me know and I'll do
it for you.)

Regards,
Navdeep

> 
> --- cxgbe.4.orig	2012-09-13 08:57:44.000000000 -0400
> +++ cxgbe.4	2012-09-13 08:59:43.000000000 -0400
> @@ -46,9 +46,10 @@
>  .Ed
>  .Pp
>  To load the driver as a
> -module at boot time, place the following line in
> +module at boot time, place the following lines in
>  .Xr loader.conf 5 :
>  .Bd -literal -offset indent
> +t4fw_cfg_load="YES"
>  if_cxgbe_load="YES"
>  .Ed
>  .Sh DESCRIPTION
> 
>    Thoughts?
> 
> Cheers,
> John
> 
> > A trick you can use is to run "kldstat" after loading the module,
> > you'll see which additional modules were needed for the device to
> > work.  Unfortunately the kernel can't autoload those modules while
> > booting.
> > 
> > I'm not sure if loader(8) picks up the deps either.
> > 
> > -Alfred
> > 
> > 
> > On 6/2/13 6:22 PM, John wrote:
> > >Hi Folks,
> > >
> > >    I have a pair of Chelsio T4 cards installed in a new HP DL380
> > >system. The driver does not load at boot time, failing with the
> > >message:
> > >
> > >t4nex0: failed to pre-process config file: 2.
> > >
> > >    After the system has finished booting, if I then issue a
> > >'kldload if_cxgbe' command, the driver loads correctly. Note,
> > >the driver loads correctly from the command prompt with or
> > >without the if_cxgbe_load in /boot/loader.conf.
> > >
> > >    The message is coming from t4_main.c:partition_resources().
> > >I don't see anything obvious that would cause this:
> > >
> > >         rc = cfg ? upload_config_file(sc, cfg, &mtype, &maddr) : ENOENT;
> > >         if (rc != 0) {
> > >                 mtype = FW_MEMTYPE_CF_FLASH;
> > >                 maddr = t4_flash_cfg_addr(sc);
> > >         }
> > >         bzero(&caps, sizeof(caps));
> > >         caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
> > >             F_FW_CMD_REQUEST | F_FW_CMD_READ);
> > >         caps.cfvalid_to_len16 = htobe32(F_FW_CAPS_CONFIG_CMD_CFVALID |
> > >             V_FW_CAPS_CONFIG_CMD_MEMTYPE_CF(mtype) |
> > >             V_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(maddr >> 16) | FW_LEN16(caps));
> > >         rc = -t4_wr_mbox(sc, sc->mbox, &caps, sizeof(caps), &caps);
> > >         if (rc != 0) {
> > >                 device_printf(sc->dev,
> > >                     "failed to pre-process config file: %d.\n", rc);
> > >                 return (rc);
> > >         }
> > >
> > >    Has anyone run into this?
> > >
> > >Thanks,
> > >John
> > >
> > >ps: And the output from loading the driver module by hand:
> > >
> > >t4nex0: <Chelsio T440-CR> mem 0xf7cc0000-0xf7cfffff,0xf7000000-0xf77fffff,0xf6ff0000-0xf6ff1fff irq 26 at device 0.4 on pci7
> > >t4nex0: installing firmware 1.8.4.0 on card.
> > >cxgbe0: <port 0> on t4nex0
> > >cxgbe0: Ethernet address: 00:07:43:11:e9:00
> > >cxgbe0: 16 txq, 8 rxq
> > >cxgbe1: <port 1> on t4nex0
> > >cxgbe1: Ethernet address: 00:07:43:11:e9:08
> > >cxgbe1: 16 txq, 8 rxq
> > >cxgbe2: <port 2> on t4nex0
> > >cxgbe2: Ethernet address: 00:07:43:11:e9:10
> > >cxgbe2: 16 txq, 8 rxq
> > >cxgbe3: <port 3> on t4nex0
> > >cxgbe3: Ethernet address: 00:07:43:11:e9:18
> > >cxgbe3: 16 txq, 8 rxq
> > >t4nex0: PCIe x8, 4 ports, 34 MSI-X interrupts, 101 eq, 33 iq
> > >t4nex1: <Chelsio T440-CR> mem 0xfbcc0000-0xfbcfffff,0xfb000000-0xfb7fffff,0xfaff0000-0xfaff1fff irq 58 at device 0.4 on pci36
> > >t4nex1: installing firmware 1.8.4.0 on card.
> > >cxgbe4: <port 0> on t4nex1
> > >cxgbe4: Ethernet address: 00:07:43:11:e6:a0
> > >cxgbe4: 16 txq, 8 rxq
> > >cxgbe5: <port 1> on t4nex1
> > >cxgbe5: Ethernet address: 00:07:43:11:e6:a8
> > >cxgbe5: 16 txq, 8 rxq
> > >cxgbe6: <port 2> on t4nex1
> > >cxgbe6: Ethernet address: 00:07:43:11:e6:b0
> > >cxgbe6: 16 txq, 8 rxq
> > >cxgbe7: <port 3> on t4nex1
> > >cxgbe7: Ethernet address: 00:07:43:11:e6:b8
> > >cxgbe7: 16 txq, 8 rxq
> > >t4nex1: PCIe x8, 4 ports, 34 MSI-X interrupts, 101 eq, 33 iq
> > >
> > >
> > >
> > >
> > >_______________________________________________
> > >freebsd-net at freebsd.org mailing list
> > >http://lists.freebsd.org/mailman/listinfo/freebsd-net
> > >To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
> > >
> > 
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list