Page MenuHomeFreeBSD

oce: Simplify probe method
Needs ReviewPublic

Authored by freqlabs on Mar 19 2019, 9:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 28 2023, 3:15 AM
Unknown Object (File)
Nov 9 2023, 8:07 AM
Unknown Object (File)
Nov 7 2023, 10:18 AM
Unknown Object (File)
Nov 7 2023, 8:07 AM
Unknown Object (File)
Nov 5 2023, 6:58 AM
Unknown Object (File)
Nov 1 2023, 6:53 PM
Unknown Object (File)
Oct 6 2023, 9:09 AM
Unknown Object (File)
Oct 6 2023, 6:59 AM
Subscribers

Details

Reviewers
jpaetzel
Summary
  • Use existing struct pci_device_table and related macros for device matching.
  • Put the relevant flags in the static array of supported devices, so we don't need to figure them out separately once we've matched a device.
  • Use snprintf instead of sprintf as an extra safeguard against memory corruption.

No change in functionality.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/dev/oce/oce_if.c
232–244

There's already a PCI structure defined for this: pci_device_table, though to be honest it's under documented.

freqlabs edited the summary of this revision. (Show Details)

Use existing struct pci_device_table and related macros as suggested by @imp