Skip to content

Fix TX queue overflow, improve PHY initialization and cleanup in bdx driver #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cgaudin
Copy link

@cgaudin cgaudin commented May 20, 2025

This PR addresses several issues and improvements in the bdx driver:

  • Fix TX queue overflow
    Correct handling of nr_frags in bdx_tx_transmit() to properly account for additional fragments added for short packets (< 60 bytes), preventing priv->tx_level overflow warnings.

  • Fix PHY initialization
    Corrected the bdx_phy_init() function to detect and register PHY devices with MDIO bus different from 1.

  • Fix driver removal warning about IRQ
    Fixed IRQ cleanup routines to prevent warning during driver unload.

These changes increase driver stability and hardware compatibility, especially for PHY handling and TX packet transmission with short packets.

the nr_frags variable after adding a fragment for short packets (<60 bytes).
This fix increments nr_frags accordingly to keep tx_level consistant, preventing
overflow warnings.

The pci_free_irq_vectors() function does not free individual IRQs and leaves procfs
entries behind causing wanrings about non-empty directories.Consequently, free_irq()
has been added so that driver removal does not complaint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant