Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Linux contribution topics: Fixes for large driver
Search
K. Hayashi
March 19, 2026
Technology
21
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Linux contribution topics: Fixes for large driver
Linux Technical Jamboree Ep.II #9 (Lightning Talk)
K. Hayashi
March 19, 2026
More Decks by K. Hayashi
See All by K. Hayashi
汎用 IP ドライバ移植の罠 - Implementation of IP driver to SoC
khayash1
0
54
QEMU/arm64+Xen で domU Zephyr をマルチ起動
khayash1
0
180
Case Study: Linux kernel contribution and LTS following ~1つの修正パッチが24 個のstable パッチになった話~
khayash1
0
29
Other Decks in Technology
See All in Technology
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
950
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
160
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
340
Getting Started with Google Antigravity
glaforge
0
310
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
880
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
270
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
140
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
230
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
260
Running Kotlin + Quarkus with Lambda
nealle
1
3.8k
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
Balancing Empowerment & Direction
lara
6
1.3k
The Cost Of JavaScript in 2023
addyosmani
55
10k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Technical Leadership for Architectural Decision Making
baasie
3
600
BBQ
matthewcrist
90
10k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Transcript
Linux contribution topics: Fixes for large driver Embedded SW Engineer/OpenSource
Contributer K.Hayashi ( khayash1) 2026/03/19 Japan Technical Jamboree Episode II ep.9 ~「正当な修正」vs「歴史の維持」~
About me 2026/03/19
Linux stmmac driver (drivers/net/ethernet/stmicro/stmmac/) • STMicro の ethernet IP 向けドライバ
• しかし実体は Synopsys dwmac IP + vendor glue • ARM / RISC-V SoC を含め、非常に多くの SoC ベンダが利用 結果として • IP 世代が混在 (10M~100G+) • capability を持つ IP / 持たない IP が混在 • devicetree 記述の癖もベンダごとに違う Overview 2026/03/19 vendor glue Synopsys dwmac pcs phy net ethernet stmmac stmmac は一見 vendor driver だが 実は巨大な共通基盤 pcs phy First commit から 15年以上
What was wrong? 2026/03/19 FIFO サイズ を devicetree の property
で指定 ⇒ HW に実装されたサイズ で制約 しかし実装では… • 無条件に devicetree で指定された値を サイズ値として使用 • 実際の HW 実装サイズ値を超えても 黙って動く(または不定動作) 設定ミスが ドライバでは検出されない gmac0: ethernet@e0800000 { compatible = "snps,dwxgmac-2.10", "snps,dwxgmac"; reg = <0xe0800000 0x8000>; interrupt-parent = <&vic1>; interrupts = <24 23 22>; interrupt-names = "macirq", "eth_wake_irq", "eth_lpi"; mac-address = [000000000000]; max-frame-size = <3800>; phy-mode = "gmii"; snps,multicast-filter-bins = <256>; snps,perfect-filter-entries = <128>; rx-fifo-depth = <16384>; tx-fifo-depth = <16384>; clocks = <&clock>; clock-names = "stmmaceth"; snps,axi-config = <&stmmac_axi_setup>; snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; ... }; From: Documentation/devicetree/bindings/net/snps,dwmac.yaml rx-fifo-depth = <16384>; tx-fifo-depth = <16384>;
Patch #1 – Clamp to HW capability 2026/03/19 パッチ内容 [devicetree
指定値] > [HW 実装サイズ値] → 警告 + 上限に固定 対応コミット 044f2fba Limit FIFO size by hardware capability 受け入れられた理由 • 後方互換性を壊さない (動いていたものは動く) • 追加ログで異常を可視化 mainline 的に有用な修正 tx-fifo-size = 16384 cap = 8192 tx-fifo-size = 8192
Patch #2 – Error if not specified 2026/03/19 課題 “FIFO
サイズが未指定” かつ “HW 実装サイズ値も取れない” → 正しい初期化が不可能 対応内容 上記の課題であればエラー → 設計思想としては正しい 対応コミット 8865d226 Specify hardware capability value when FIFO size isn't specified 不定な状態のまま黙って動かすべきではないので修正 しかし… tx-fifo-size = N/A cap = ?? ERROR
Issues – revert 2026/03/19 問題発覚 古い dwmac IP はそもそも HW
実装サイズ値を持たない FIFO サイズは固定値で動作していた (devicetree 値は無視) 結果 今まで動いていた SoC がエラー終了で起動できなくなるとの報告 → 後方互換性の破壊 → すぐに Revert 発動 Revert 2a64c963 Revert "Specify hardware capability value when FIFO size isn’t specified" 「正しさ」より「壊さないこと」が優先される 誰もその問題仕様に気づいてなかったので、 のちに議論の種に
Lessons learned 2026/03/19 評価 対応 パッチ ほぼ安全 警告 + 上限固定
#1 互換性次第 エラー終了 #2 mainline kernel では • 「正しくないから止める」のではなく「既存のものは止めない」を優先 • 「知らない仕様」前提で動いているものは、未だに隠れている それをあぶり出して伝えるのも contriubution 特に SoC 共通ドライバ では顕著
Summary 2026/03/19 stmmac は ”STmicro のドライバ” ではなくSoC 業界の共通基盤 ドライバ改善は三つ巴の構図 •
設計:分からないならエラーにすべき • 歴史:分からない IP が普通にあった • 現実:それで動いている環境が存在する ⇒ どれも否定できない Mainline の判断は「正しさ」よりも「互換性重視」 ⇒ Revert は失敗ではなく、「隠れていた仕様」が見えた 巨大ドライバを直すということは 「仕様を直す」ことではなく「バランスを取る」こと