萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 作業系統 >  >> Linux 教學

Sound Blaster 16 PnP 實戰設定手冊:解決 IRQ 衝突與 3c509 共存

問題背景

新裝 Sound Blaster 16 PnP 音效卡與 3Com 3c509 乙太網路卡在 Linux 2.0.23 (Slackware) 下均無法運作。核心偵測 3c509 時與音效卡裝置衝突,導致網卡也失效。

解決核心:isapnptools 統一配置所有 ISA PnP 裝置

1. 安裝 isapnptools

# 從 Red Hat FTP 或原始碼編譯
tar xzf isapnptools-1.8.tgz
cd isapnptools-1.8
make && make install

2. 產生並編輯 /etc/isapnp.conf

pnpdump > /etc/isapnp.conf
vi /etc/isapnp.conf

關鍵編輯點:

  • 找到 Creative SB16 PnP 卡片區塊 (Serial identifier 開頭)。
  • 邏輯裝置 0 (Audio):設定 IRQ 5, DMA 1 & 5, I/O 0x220, 0x330, 0x388,啟用 (ACT Y)。
  • 邏輯裝置 1 (MPU-401 MIDI):設定 IRQ 10 (避開網卡), I/O 0x300, 0x310,啟用 (ACT Y)。
  • 停用不需要的裝置 (如 Stereo Enhance LD 2)。
  • 確保 3c509 使用的 IRQ 10 / I/O 0x300 不與音效卡衝突 (此案中 3c509 固定用 IRQ 10, I/O 0x300)。

3. 核心重編:聲音與網卡皆設為模組

cd /usr/src/linux
make menuconfig
# Sound card support (M)
#   SB16/AWE32 support (M)
# Network device support (M)
#   3Com 3c509 support (M)
make dep clean modules modules_install
depmod -a

4. 修改啟動腳本:載入順序至關重要

/etc/rc.d/rc.M (Slackware 網路啟動前):

# 設定 ISA PnP 裝置 (在 hostname 設定後、網路啟動前)
/sbin/isapnp /etc/isapnp.conf

/etc/rc.d/rc.inet1 (網路啟動腳本最開頭):

# 載入 3c509 模組 (isapnp 已配置好資源)
/sbin/insmod 3c509

/etc/rc.d/rc.local (最後載入聲音):

/sbin/insmod sound

5. 驗證

# 檢查資源分配
cat /proc/interrupts
cat /proc/ioports
cat /proc/dma

# 測試聲音
cat /dev/urandom > /dev/dsp   # 噪音聲
# 測試網路
ifconfig eth0 up
ping gateway

關鍵經驗總結

  1. isapnp 必須在所有 ISA PnP 驅動模組載入前執行,否則驅動會搶佔/衝突資源。
  2. 將衝突裝置 (聲音、網卡) 都編譯為模組,控制載入順序。
  3. 手工規劃 IRQ/I/O/DMA,不要依賴自動偵測 (特別是舊核心)。
  4. pnpdump 產生的設定檔包含所有可選資源,**務必逐項檢查並啟用適當選項**。

作者:Eric Z. Ayers | 版本 v1.0 (1997-01-14) | 環境:Slackware, Kernel 2.0.23 | 參考:Red Hat PnP 資訊頁 https://www.redhat.com/linux-info/pnp/

copyright © 萬盛學電腦網 all rights reserved