Skip to content

Kernel Module Loading Failure After Adding Code to ad9361_dig_tune_tx #3002

@takecareYata

Description

@takecareYata

I added the following code inside the ad9361_dig_tune_tx function in the ad9361_conv.c file( the petalinux version is 2023.1):

for (chan = 0; chan < num_chan; chan++) {
    saved_chan_ctrl0[chan] = axiadc_read(st, ADI_REG_CHAN_CNTRL(chan));
    axiadc_write(st, ADI_REG_CHAN_CNTRL(chan),
        ADI_FORMAT_SIGNEXT | ADI_FORMAT_ENABLE |
        ADI_ENABLE | ADI_IQCOR_ENB);
    axiadc_set_pnsel(st, chan, ADC_PN_CUSTOM);
    saved_chan_ctrl6[chan] = axiadc_read(st, 0x4414 + (chan) * 0x40);

    saved_dsel[chan] = axiadc_read(st, 0x4418 + (chan) * 0x40);
    axiadc_write(st, 0x4418 + (chan) * 0x40, 9);
    axiadc_write(st, 0x4414 + (chan) * 0x40, 0); /* !IQCOR_ENB */
    axiadc_write(st, 0x4044, 1);
}

/* ====================================================== */
do {
    ret = ad9361_dig_tune_delay(phy, max_freq, flags, true);
    if (ret == 0)
        break;

    retry_count++;
    dev_warn(&phy->spi->dev,
             "TX Digital Tune failed (attempt %d/%d)\n",
             retry_count, max_retries);

} while (ret == -EIO && retry_count < max_retries);
/* ====================================================== */

if (flags & DO_ODELAY)
    ad9361_dig_tune_iodelay(phy, true);

The kernel module that worked before the modification now fails to operate, outputting the message: insmod: ERROR: could not insert module /opt/swarm/netdev.ko: Unknown symbol in module.

Could this issue be caused by the newly added code, or is it another problem? I'd appreciate some help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions