ドライバは入手出来たけど、まだ動かず...

多分、ネットワークをバイパスする部分をソフトウェア的に設定変えてやらんといけないじゃないかという線が濃厚です。

[From 【人柱】バイパス機能付きのNICを手に入れてみた、が... | Hardware - Soukaku's HENA-CHOKO Blog]

ということで、色々と探し回ったけど、「ドライバ類がやっぱりメーカに頼まなくちゃいけないのかなぁ〜」という流れになって、メーカサイトにある登録フォームで登録をしてみたら、日本の代理店からメールが来たでざるよ。


オークションで手に入れたものなので「なんか申し訳ないなぁ...」と思いつつ、厚かましくも「ドライバを手に入れられるか」を返信してみたら、なんとドライバの入手方法を知らせていただけたのですよ!(ありがたや、ありがたや)

で、早速ドキュメントとドライバのアーカイブを入手。
ドライバのアーカイブをkernel 3.2で動いているサーバ(これにNIAGARA 2265を挿している)で展開して、makeしてみたのだけど、

soukaku@nexus01:~/N2265/niagara2265_r12$ make
make -C /lib/modules/3.2.0-1-amd64/build/ SUBDIRS=/home/soukaku/N2265/niagara2265_r12 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-1-amd64'
  CC [M]  /home/soukaku/N2265/niagara2265_r12/n2265.o
In file included from /home/soukaku/N2265/niagara2265_r12/e1000_osdep.h:43:0,
                 from /home/soukaku/N2265/niagara2265_r12/e1000_hw.h:36,
                 from /home/soukaku/N2265/niagara2265_r12/n2265.c:9:
/home/soukaku/N2265/niagara2265_r12/kcompat.h:628:2: error: redeclaration of enumerator 'NETIF_MSG_DRV'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2240:2: note: previous definition of 'NETIF_MSG_DRV' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:629:2: error: redeclaration of enumerator 'NETIF_MSG_PROBE'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2241:2: note: previous definition of 'NETIF_MSG_PROBE' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:630:2: error: redeclaration of enumerator 'NETIF_MSG_LINK'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2242:2: note: previous definition of 'NETIF_MSG_LINK' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:631:2: error: redeclaration of enumerator 'NETIF_MSG_TIMER'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2243:2: note: previous definition of 'NETIF_MSG_TIMER' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:632:2: error: redeclaration of enumerator 'NETIF_MSG_IFDOWN'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2244:2: note: previous definition of 'NETIF_MSG_IFDOWN' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:633:2: error: redeclaration of enumerator 'NETIF_MSG_IFUP'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2245:2: note: previous definition of 'NETIF_MSG_IFUP' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:634:2: error: redeclaration of enumerator 'NETIF_MSG_RX_ERR'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2246:2: note: previous definition of 'NETIF_MSG_RX_ERR' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:635:2: error: redeclaration of enumerator 'NETIF_MSG_TX_ERR'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2247:2: note: previous definition of 'NETIF_MSG_TX_ERR' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:636:2: error: redeclaration of enumerator 'NETIF_MSG_TX_QUEUED'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2248:2: note: previous definition of 'NETIF_MSG_TX_QUEUED' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:637:2: error: redeclaration of enumerator 'NETIF_MSG_INTR'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2249:2: note: previous definition of 'NETIF_MSG_INTR' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:638:2: error: redeclaration of enumerator 'NETIF_MSG_TX_DONE'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2250:2: note: previous definition of 'NETIF_MSG_TX_DONE' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:639:2: error: redeclaration of enumerator 'NETIF_MSG_RX_STATUS'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2251:2: note: previous definition of 'NETIF_MSG_RX_STATUS' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:640:2: error: redeclaration of enumerator 'NETIF_MSG_PKTDATA'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2252:2: note: previous definition of 'NETIF_MSG_PKTDATA' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:641:2: error: redeclaration of enumerator 'NETIF_MSG_HW'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2253:2: note: previous definition of 'NETIF_MSG_HW' was here
/home/soukaku/N2265/niagara2265_r12/kcompat.h:642:2: error: redeclaration of enumerator 'NETIF_MSG_WOL'
/usr/src/linux-headers-3.2.0-1-common/include/linux/netdevice.h:2254:2: note: previous definition of 'NETIF_MSG_WOL' was here
/home/soukaku/N2265/niagara2265_r12/n2265.c:85:0: warning: "K26" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
/home/soukaku/N2265/niagara2265_r12/n2265.c:161:3: error: unknown field 'ioctl' specified in initializer
/home/soukaku/N2265/niagara2265_r12/n2265.c:161:3: warning: initialization from incompatible pointer type [enabled by default]
/home/soukaku/N2265/niagara2265_r12/n2265.c:161:3: warning: (near initialization for 'n2265_fops.aio_read') [enabled by default]
/home/soukaku/N2265/niagara2265_r12/n2265.c: In function 'n2265_exit':
/home/soukaku/N2265/niagara2265_r12/n2265.c:1869:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/soukaku/N2265/niagara2265_r12/n2265.c: In function 'n2265_ioctl':
/home/soukaku/N2265/niagara2265_r12/n2265.c:1915:18: warning: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result [-Wunused-result]
/home/soukaku/N2265/niagara2265_r12/n2265.c:2173:16: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result [-Wunused-result]
make[4]: *** [/home/soukaku/N2265/niagara2265_r12/n2265.o] Error 1
make[3]: *** [_module_/home/soukaku/N2265/niagara2265_r12] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-1-amd64'
make: *** [default] Error 2

盛大にメッセージ吐いて、Errorで終了。ダメなのか...。orz
Makefileを見てみると、カーネルバージョンの判定結果を変数に突っ込んでる処理があったりするので、kernelのバージョンに依存するような気が。(実際ドキュメントには、kernel2.4でのmakeは2.4用のMakefileを使うように書いてある。)

とりあえず、kernel 2.6のsqueezeのVMがあったので、そこでmake出来るか試してみたら、こちらはすんなりOK。

debian:~/niagara2265_r12# make
make -C /lib/modules/2.6.32-5-686/build/ SUBDIRS=/root/niagara2265_r12 modules
make[1]: ディレクトリ `/usr/src/linux-headers-2.6.32-5-686' に入ります
  CC [M]  /root/niagara2265_r12/n2265.o
/root/niagara2265_r12/n2265.c: In function 'n2265_ioctl':
/root/niagara2265_r12/n2265.c:1915: warning: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result
/root/niagara2265_r12/n2265.c:2173: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/niagara2265_r12/n2265.mod.o
  LD [M]  /root/niagara2265_r12/n2265.ko
make[1]: ディレクトリ `/usr/src/linux-headers-2.6.32-5-686' から出ます
gcc -Wall -o n2265_util n2265_util.c
debian:~/niagara2265_r12# 

ちなみに、CentOS 6.0のVMも準備して、こちらでも試してみたところ、コレも問題なし。
#ということで、仕事で使えそうなのは判ったので、それはそれで収穫ではある。

う〜ん、手軽にやるなら、kernelを2.6系に戻してあげればいいのは判るんだけどねぇ。出来れば3系のカーネルで使いたいよねぇ...。
ということで、まだまだ悪あがきは続きます。
#実働確認するにしても、家には遊んでる機材ないし、PCIeの挿せる機材なんざ会社無いしなぁ...。

トラックバック(1)

Soukaku's HENA-CHOKO Blog - その後のNiagara (2012年5月21日 22:16)

前につぶやいたとおりなんだけど、仕事のネタ用に借りて簡単な評価をしてみたら、わりと使えそうな感じ。 仕事で借りた評価機材は、動いたでござるよ。うふふ。 N... 続きを読む

コメントする