TW201118559A - Test method for resetting network interface card - Google Patents

Test method for resetting network interface card Download PDF

Info

Publication number
TW201118559A
TW201118559A TW98140884A TW98140884A TW201118559A TW 201118559 A TW201118559 A TW 201118559A TW 98140884 A TW98140884 A TW 98140884A TW 98140884 A TW98140884 A TW 98140884A TW 201118559 A TW201118559 A TW 201118559A
Authority
TW
Taiwan
Prior art keywords
network card
nic
test method
reset
card
Prior art date
Application number
TW98140884A
Other languages
Chinese (zh)
Inventor
Xian-Guang Song
Tom Chen
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to TW98140884A priority Critical patent/TW201118559A/en
Publication of TW201118559A publication Critical patent/TW201118559A/en

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

A test method for resetting a Network Interface Card (NIC) is adapted to a NIC connected with a Peripheral Component Interconnect (PCI) bus. The test method includes the steps of disabling the NIC to be used, obtaining a device node of the PCI bus corresponding to the NIC, storing configuration space data of the device node as original data, finding the upstream PCI bridge node corresponding to the NIC device node, resetting the NIC through the PCI bridge, restoring the configuration space data to the NIC according to the original data, starting the NIC to initiate; reading at least one register of the NIC, checking whether or not the value of the NIC register is correct, and outputting a checking result.

Description

201118559 六、發明說明·· ‘ 【發明所屬之技術領域】 本發明係關於-種網卡重置的測試方法,特別是__種將網卡 整體進行重置的測試方法。 【先前技術】 、科技發展至今,現代人的生活已經齡離獨網路。而無論 疋連接計算機祕到網際網路(Intemet),或是建構區域網路 (L〇Cal Area Intemet,LAN),網卡(Netw〇rk ⑽如㈤, 耽,又稱網路配接卡)都是最必須的。網卡為計算機系統之間的 貝枓通訊提供實體連接,每一.台欲接入網路的計算機系統都得要 安裳網卡。市面上絕大多數的筆記型電腦、桌上型電腦或是饲服 器均内建有網卡,足見其普及性。 正由於網卡是計算機中極為重要絲本設備,網卡的故障 會辟運行的計算機系統的網路功能;若是重要飼服器的網卡發 ^故H至會影響·_路的正常運行。目此網卡的製造薇 商在將產品出貨前,均需對每—個網卡進行嚴格的測試。其中對 ,網卡之硬體的核心部件測試時’對網卡進行重置(細)操作 疋不可或缺的測試項目之一。 傳統的重置測試方法係依據網卡的個別的規袼操作網卡的多 個控制暫存$ (咖⑽r_ter),以將網卡中對應的部件重置。 ^於並不疋所有的部件都有對應的控制暫存器,所以重置操作可 …、法’函蓋所有的核心料。再者,由㈣統的重置測試方法需 201118559 康不同里號之網卡的侧的規格進行操作,故測試程序的程式 碼不通用。如此—來,測試程序需針對每—種型號的網卡,參照 規格說明書編冑程式碼,十分費工且程柄亦不易維護。 此外,控制暫存器會同時被測試程序以及網卡内部的韌體操 作因此才木作控制暫存器時必須與勤體進行協調,以免測試程式 以及早刃體同時操作時造成數據不一致或是重置操作失敗。但這種 做法必須大量且非常繁瑣地操作控制暫存器,不但耗費時間,而 • 且容易出錯。 綜上所述’傳統_卡重置職方法具有賴不完全、測試 用程式碼不通用於各種網卡魏,以及操作上複雜費時甚至容易 出錯的問題。 【發明内容】 為了解决上述的問題,本發明提供一種網卡重置的測試方 法,適用於一網卡(Network Interface Card,NIC),網卡與一周201118559 VI. INSTRUCTIONS·· ‘Technical Fields According to the Invention The present invention relates to a test method for network card reset, and in particular to a test method for resetting a network card as a whole. [Prior Art] Since the development of science and technology, the life of modern people has been separated from the Internet. Whether it's connecting the computer to the Internet, or building a local area network (L〇Cal Area Intemet, LAN), the network card (Netw〇rk (10) such as (5), 耽, also known as the network adapter card) It is the most necessary. The network card provides a physical connection for the Bessie communication between the computer systems, and each computer system that wants to access the network has to have an NIC. Most of the notebook computers, desktop computers or food servers on the market have built-in network cards, which shows their popularity. Just because the network card is a very important computer device in the computer, the failure of the network card will open up the network function of the running computer system; if the network card of the important feeding device is issued, the H will affect the normal operation of the road. For the manufacture of the NIC, Weishang must conduct rigorous testing on each NIC before shipping the product. Among them, when testing the core components of the hardware of the network card, the reset (fine) operation of the network card is one of the indispensable test items. The traditional reset test method is based on the individual rules of the network card to operate the NIC's multiple control temporary storage $ (coffee (10) r_ter) to reset the corresponding components in the network card. ^ Not all components have corresponding control registers, so the reset operation can be used to cover all core materials. Furthermore, the reset test method of (4) is required to operate on the side of the network card of the 201118559 Kang, and the code of the test program is not common. In this way, the test program needs to be compiled for each type of network card with reference to the specification. It is very labor-intensive and the handle is not easy to maintain. In addition, the control register will be tested by both the test program and the firmware inside the network card. Therefore, it is necessary to coordinate with the mobile body when controlling the register, so as to avoid data inconsistency or heavy when the test program and the early blade are operated simultaneously. The setup operation failed. However, this practice requires a large and very cumbersome operation of the control register, which is time consuming and error prone. In summary, the 'traditional_card replacement method is not complete, the test code is not available for various network cards, and the operation is complicated, time-consuming and even error-prone. SUMMARY OF THE INVENTION In order to solve the above problems, the present invention provides a test method for network card reset, which is applicable to a network interface card (NIC), a network card and a week.

• (Peripheral Component Interconnect bus > PCI bUS)相連。網卡重置的測試方法包括:禁用網卡;取得PCI 匯流排中與網卡對應的一設備節點;將設備節點具有的一配置空 間(configuration space)數據紀錄為一原始數據;取得匯流 排中與設備節點於對應的一代^橋接器;藉由ρα橋接器重置與 網卡;依據原始數據’設定設備節點的配置空間數據;啟用網 卡,使得網卡初始化;讀取網卡所具有的至少—個網卡暫存哭的 值;判斷網卡暫存器的值是否正確;以及輸出判斷結果。W 201118559 根據本發明之-實猶例,網卡重置的測試綠可卸除對鹿 網卡的網卡鶴程相制網卡。而纽關卡使得網卡初^ 的步驟之前,網卡重置_試方法可重新掛载網卡驅動程柯網 卡。 根據本發明之-實施範例,在藉由ρα橋接器重置網卡所屬 的設備節麟,網卡即自騎人__狀態她)或一輪 詢狀態(pdUng state)。網卡重置的測試方法並於網卡仍處於偵 測狀態或是輪離態時,雜縣數據來奴設鮮點的配置空 間數據。而為了藉由PCW接器重置網卡,網卡重置的測試方法 可先藉由PCI橋接器的一連結控制暫存器(link c〇_咖如) =禁能(disable)連接PCI橋接器與網卡的一子ρα匯流排;並 藉由連結控制暫存时新致能(enable)與網卡相連的子⑽匯流 排。 此外’配置空間數據可包括一基本位址暫存器㈤记施觀 吻咖)網卡暫存器則可儲存—媒介存取控制層(MediaAccess Control layer - MAC layer)^« > - Physical Layer)« . 或是-直接記鐘存取(DircetMemQlyAeeess,dma)數據。 根據本發日H闕狀網卡重置_試方法操作相連於網 卡之PCI橋接器,以將整個網卡作為—體進行重置。網卡重置的 別試方法私查至少—網铸存器是否恢復為預設值,以判斷網 卡在重置之後是否恢復正常運作。基於上述方法僅需操作Μ橋 接器即可重置各種型號的_卡’亦不須謹慎地與網卡驅動程式周 201118559 解轉統_卡重制試方法之測妨完全、測試用程 的問題^用於各種網卡型號,以及操作上複雜費時甚至容易出錯 【實施方式】 以下在實財式巾詳細敘述本侧之詳細概以及優點,並 :谷足以使任㈣習_技藝者了解本翻之技軸容並據以實 施,且根據本說明書所揭露之内容、申請專利範圍及圖式,任何 熟習相關技藝者可輕易地理解本發明相關之目的及優點。 .根據本發明之—實施範例提供一種網卡重置的測試方法,透 〜祠卡相連的一 PCI匯流排,將網卡整體全部進行重置盘檢 驗。請同時參考「第1圖」,其係為根據本發明-實施範例, 卡之連接示意圖。由「第1圖」可以見悉,一中央處理器2_CI 匯流排22相連,而PCI匯流排22透過一 ρα橋接器μ與一⑽ 子匯流排28树。藉由PCI匯流排22、ρα橋接器μ以及扣 子匯流排28 ’ t央處理器2()與網卡26以及_pc以置25相連。 中央處理1120可以是被配置於—個筆記型電腦、桌上型電腦 或是伺服器等計算機系統之中央處理單元(Μ㈣W㈣ _)。此計算機系統能透過網卡26與網際網路或是區域網路相 連。犯匯流排22連接計算機系統中主機板上的中央處理器2〇 和外部設備,而藉由PCI匯流排22與中央處理器2〇相連的外部 設備即稱為PCI設備(也就是PCI裳置25)。 本說明書令雖仙ra為例,但於說明書中所述之ρα亦包 201118559 含PCI的後續標準’即快捷周邊組件互聯標準(Peripherai• (Peripheral Component Interconnect bus > PCI bUS) is connected. The test method of the network card reset includes: disabling the network card; obtaining a device node corresponding to the network card in the PCI bus; recording a configuration space data of the device node as a raw data; obtaining the bus node and the device node In the corresponding generation of bridges; reset and network card by ρα bridge; set the configuration space data of the device node according to the original data; enable the network card to initialize the network card; read at least one network card temporarily stored in the network card to cry The value of the network card register is determined to be correct; and the judgment result is output. W 201118559 According to the present invention, the test of the network card reset green can be removed from the network card of the deer network card. And the new level card makes the network card initial ^ step, the network card reset _ test method can re-mount the network card driver Cheng Ke network card. According to an embodiment of the present invention, the device node to which the network card belongs is reset by the ρα bridge, the network card is the self-ridden __ state, or a polling state (pdUng state). The test method for NIC resetting is to configure the space data of the fresh point when the NIC is still in the detection state or the wheeled state. In order to reset the network card by the PCW connector, the test method of the network card reset can first connect to the PCI bridge through a link control register of the PCI bridge (link c〇_咖如)=disable (disable) A child ρα busbar of the network card; and a sub- (10) busbar connected to the network card by a new enable by controlling the temporary storage. In addition, the 'configuration space data can include a basic address register (5), and the network card register can be stored - Media Access Control layer - MAC layer ^« > - Physical Layer) « . Or - Direct clock access (DircetMemQlyAeeess, dma) data. According to the H-shaped network card reset_test method of the present day, the PCI bridge connected to the network card is operated to reset the entire network card as a body. The NIC reset method is privately checked at least—whether the net castor is restored to the default value to determine whether the NIC is restored to normal operation after the reset. Based on the above method, you only need to operate the bridge to reset the various models of the _ card. You don't have to be cautious with the NIC driver week 201118559. The _ card re-test method is completely tested and tested. ^ It is used for various network card models, and it is complicated, time-consuming and even error-prone. [Embodiment] The details and advantages of this side are described in detail in the real-life style towel, and the valley is sufficient for the artist to understand the technique. The related objects and advantages of the present invention can be readily understood by those skilled in the art in light of the disclosure and the scope of the disclosure. According to an embodiment of the present invention, a test method for network card reset is provided, in which a whole network card is subjected to a reset disk check through a PCI bus connected to the Leica. Please also refer to "FIG. 1", which is a schematic diagram of the connection of the card according to the present invention. As can be seen from "Fig. 1", a central processing unit 2_CI bus bar 22 is connected, and the PCI bus bar 22 is connected through a ρα bridge μ and a (10) sub-bus bar 28 tree. The PCI bus bar 22, the ρα bridge μ, and the button bus 28' processor 2 are connected to the network card 26 and the _pc. The central processing unit 1120 can be a central processing unit (Μ(4)W(4)_)) that is configured in a computer system such as a notebook computer, a desktop computer, or a server. The computer system can be connected to the Internet or a regional network via the network card 26. The bus bar 22 is connected to the central processing unit 2 and the external device on the motherboard in the computer system, and the external device connected to the central processing unit 2 via the PCI bus 22 is called a PCI device (that is, the PCI device 25). ). This manual makes the example of ra, but the ρα described in the manual also includes the subsequent standard of PCI, which is the same as the standard of the peripheral components (Peripherai).

Component Interconnect Express,PCIe 或稱 PCI-E)。由於 PCIe 是 基於現有的PCI系統而具有向下相容性,因此,當將PCI更換為 PCIe時,只需修改物理層之硬體而無須修改系統上的軟體就可將 現有PCI系統轉換為pCIe。此外,ρα匯流排22係指連接於中央 處理器.20之主匯流排。 PCI橋接态24係用.以連接不同段的匯流排,更詳細的說,pci 橋接器24連接作為主匯流排之ρα匯流排22以及其餘的ρα子 匯流排28。除了網卡26之外,PCI裝置25另可以例如是音效卡 或顯示卡等擴充卡,或是直接配置放在主板上的集成電路。如「第 1圖」所示,網卡.26藉由PCI橋接器24a.以及PCI子匯流排.28a 掛載於PCI匯流排22上,而PCI裝置25藉由PCI橋接器24b以 及PCI子麗流排28b掛戴於PCI匯流排22上。 請同時參照「第2圖」,其係為根據本發明一實施範例之網卡 之方塊示意圖。由「第'2圖.」可以見悉,網卡26包括一物理層 (Physical lgyer ’ PHY lqyer)模姐261、一物理層媒介獨立介面 (PHY Media Independent Interface » PHY ΜΠ ) 262 ' 一 媒介存取 控制層(Media Access Control lqyer,MAC layer)模組 265、一媒 介存取控制層端媒介獨立介面(MAC ΜΠ) 266、一邏輯鏈結控制Component Interconnect Express, PCIe or PCI-E). Since PCIe is backward compatible based on the existing PCI system, when the PCI is replaced with PCIe, the existing PCI system can be converted to pCIe by modifying the hardware of the physical layer without modifying the software on the system. . Further, the ρα bus bar 22 is referred to as a main bus bar connected to the central processing unit .20. The PCI bridge state 24 is used to connect the busbars of different segments. In more detail, the pci bridge 24 is connected as the ρα bus bar 22 of the main bus bar and the remaining ρα sub-bus bar 28. In addition to the network card 26, the PCI device 25 may be, for example, an expansion card such as a sound card or a display card, or an integrated circuit directly disposed on the main board. As shown in Fig. 1, the network card .26 is mounted on the PCI busbar 22 via the PCI bridge 24a. and the PCI sub-busbar .28a, and the PCI device 25 is connected to the PCI bridge 24b and the PCI sub-stream. Row 28b is hung on PCI busbar 22. Please also refer to "Fig. 2" which is a block diagram of a network card according to an embodiment of the present invention. As can be seen from "Fig. 2", the network card 26 includes a physical layer (Physical lgyer 'PHY lqyer) 261, a physical layer media independent interface (PHY Media Independent Interface » PHY ΜΠ) 262 'a media access Control layer (Media Access Control lqyer, MAC layer) module 265, a media access control layer end media independent interface (MAC ΜΠ) 266, a logical link control

層(Logical Link Control layer,LLC layer)模組 267 以及一 PCI 介面269。 網卡26屬於計算機網路開放式通信系統互聯參考模型(〇pen 201118559A Logical Link Control Layer (LLC layer) module 267 and a PCI interface 269. NIC 26 belongs to the computer network open communication system interconnection reference model (〇pen 201118559

System Interconnection Reference Modd,〇SI 模型)的物理層以及 貧料連結層(Data Link Layer)。物理層模組261係處理0SI模型 中最低一層,也就是物理層的訊號。物理層模組261可包括物理 編解碼層(PCS)、其他介質相關層(PMA,pMD,_〗)以及隔 離變壓器電路等。 媒介存取控制層模組265以及邏輯鏈結控制層模組267則分 別處理osi模型中資料連結層之媒介存取控制層(MAC層)以及 邏輯鏈結控制層的訊號。其中媒介存取控制層模組265中可包括 微處理器、内建記憶體和直接記憶體存取(1)以以]^^111〇1^八(;沈%, DMA)控制器等等。 此外,物理層模組261與媒介存取控制層模組265以及邏輯 鏈結控制層模k 267之間,則透過物理層媒介獨立介面脱以及 媒介存取控制層模組(MAC画)265進行溝通。ρα介面269則 用以使網卡26與PCI子匯流排28進行溝通。 接下來明參照.「第3圖」,其係為根據本發明一實施範例之網 卡重置的測試方法之執行流程示意圖。纟「第3圖」可以見悉, 網卡重置的測試方法可包括步驟S3():禁用網卡26 ;步驟s32 : 取得PCI ®流排22中與網卡26相對應的一設備節點 ;步驟S34 : 將設備節點具有的—配置空間數據紀錄為一原始數據;步驟幻6 : 取得PCI匯流排22中與設備節點於對應的pci橋接器24a :步驟 S38 ·藉由PCI橋接$ 24a重置網卡26 ;步驟_ :依據原始數據, 設定設備節點的配置空隨據;步驟S42 :啟用網卡%,使得網 201118559 =始化;步驟S44:讀取網卡26所具有㈣ 她—及步概 先^驟S30,在嶋統中禁_卡%,以避免其他程 ^用網卡26而進行與網卡26之間的數據傳輸。較佳的是,網 的測妨法可藉由_、統暫停或卸除網卡26的-網卡驅 動程序。卸除網卡驅動程序的做法可以徹底避免其他程序誤用網 卡26,以避免進行重置職時受到不必要的干擾。 接著於步驟S32掃描PCI匯流排.22,以取得ρα匯流排a 中與、,周卡26相對應的設備節點的識別褐㈤)。—個ρα裳置μ 對應至J-個没備節點;而根據本發明之—實施範例,網卡%具 有複數個雜槔且每—個連鱗對應於—個設備節點。 網卡重置的測試方法掃描所有的Ρα裝置25,並藉由每一個扣 裝置25具有的一 PCI功能位址(pciFuneti〇nAddress)或是一廠 商/設備/功能辨識碼(Vender/Device/Function Π)).找出與網卡% 對應的至少一個設備節點。網卡重置的測試方法並得到與網卡 對應的設備節點的ID,以便在後續的步驟對此設備節點進行處理。 取得與網卡26對應之設備節點後,於步驟S34保存備節點 所具有的配置空間數據作為原始數據,以便於重置網卡%後重新 配置網卡26之用。設備節點之配置空間數據係為基本輸入輪出系 統(BasicInput/OutputSystem,BIOS)給網卡 26 的位址映射。兴 例來說’於PCI3.0標準中,配置空間數據可包括PC][裝置仍、 »·Ι| 201118559 =之廠商/設備/功能m以及六個基本位址暫存器(肠施ess :g:S)相卡26 (及其連接埠)所具有的資本資料。較佳的 .4轉配置m數射财基本她暫存H的值作為 原始數據。 “;ッ驟S36,根據pCI規範以及設備節點的資訊,取得 與PCI匯流排22相連的PCI橋接器財,哪-個PCI橋接器24 細卡%相連。而如「第1圖」所示,網卡26係掛載於PCB橋 接斋24a之下。找到與網卡26相連之PCI橋接ϋ 24a後,網卡重 置的測試方法亦取得PCI橋接器⑽之ω以利後續對PCI橋接器 24a進行處理。 取得網卡26對應的PCI橋接器池之後,於步驟⑽中,網 卡重置的測試方法藉由操作連接於PCI橋接If 2½ # PCI子匯流 排撕’將整個網卡26重置。根據本發明之一實施範例,網卡重 置的測試方法藉由操作PCI橋接器24a的—連結控制暫存器〇址 control reglster)重置網卡26。連結控制暫存器係控制^連接 規格參數’且依據PCI標準藉由連結控制暫存器將ρα子匯流排 8a⑽b (disable)之後再致能(enable),便會觸發網卡%的重 置訊號,而將網卡26整體重置。 射26被重置之後硬體的數據(例如各種暫存器以及指標值) 均變為無效’且網卡26内存的數據可能僅為亂數而無法使用。此 時網卡26即自動進入一摘測狀態㈤⑽伽e)或一輪詢狀態 (pollmg state),爛卡重置的測試方法係當網卡%處於偵測狀 「 广· η 201118559 態或輪詢狀態時進行步驟S40。也就是說,網卡重置的測試方法不 待作業系統將網卡26重新配置(即網卡26進入配置狀態, configuration state) ’便依據原始數據重新配置設備節點的配置空 間數據。換句話說,於步驟S40中,網卡重置的測試方法恢復網 卡26,即網卡26之所有連接埠的基本位址暫存器。 接著於步驟S42,網卡重置的測試方法啟用網卡26,使得網 卡26初始化。較佳的是,網卡重置的測試方法令作業系統重新將 網卡驅動程序掛載予網卡26,以啟用網卡26。如此一來,網卡% 重新被初触為可贿肖,簡卡% _的糾轉存器的 數據也應恢復為預設值(default value )。 於步驟S44,網卡重置的測試方法讀取網卡%的至少一侧 卡暫存器驗,藉峨_卡暫存㈣值衫酬預設值來判斷 重置後_卡26是否運作正常。網卡暫存器可以是儲存與讀^ 層相關之一媒介存取控制層數據,例如RX Packet Buffer Size Register。網卡暫存器亦可以是儲存與物理層相關之一物理声數 據’例如PHY Control Register。此外,網卡暫存器令可以是儲存 與DMA相關之一直接記憶體存取數據,例如黯丁X加触 Control Register 〇 最後於步驟S46中’確認於步驟撕所讀取之網卡暫存哭的 值是否與NIC D缝et (規格書)中所制定的預設值相同^相 同’則可輸出例如「正確」作為測試結果;反之,若網卡暫存哭 的值並無恢復域設值,射輪出「失敗」作為峨結果。口。 12 201118559The physical layer of the System Interconnection Reference Modd, 〇SI model) and the Data Link Layer. The physical layer module 261 processes the lowest layer in the 0SI model, that is, the signal of the physical layer. The physical layer module 261 may include a physical codec layer (PCS), other media related layers (PMA, pMD, _), and an isolation transformer circuit. The medium access control layer module 265 and the logical link control layer module 267 respectively process the signals of the medium access control layer (MAC layer) and the logical link control layer of the data link layer in the osi model. The medium access control layer module 265 may include a microprocessor, a built-in memory, and a direct memory access (1) to control the ^^^111〇1^8 ((%), DMA) controller, etc. . In addition, between the physical layer module 261 and the medium access control layer module 265 and the logical link control layer module k 267, the physical layer medium independent interface and the medium access control layer module (MAC drawing) 265 are performed. communication. The ρα interface 269 is used to communicate the network card 26 with the PCI sub-bus 28 . Next, reference is made to "Fig. 3", which is a flow chart showing the execution of a test method for network card reset according to an embodiment of the present invention. As shown in FIG. 3, the test method of the network card reset may include step S3(): disabling the network card 26; step s32: obtaining a device node corresponding to the network card 26 in the PCI® flow line 22; step S34: Recording the configuration data of the device node as a raw data; Step 6: Obtaining the pci bridge 24a corresponding to the device node in the PCI bus 22: Step S38: Resetting the network card 26 by PCI bridge $24a; Step _: setting the configuration of the device node according to the original data; step S42: enabling the network card %, so that the network 201118559 = initialization; step S44: reading the network card 26 has (4) her - and step S3, The card_% is disabled in the system to avoid data transmission between the network card 26 and the network card 26. Preferably, the method of detecting the network can suspend or remove the network card driver of the network card 26 by means of _. Removing the NIC driver completely prevents other programs from misusing the NIC 26 to avoid unnecessary interference during the reset job. Next, in step S32, the PCI bus bar .22 is scanned to obtain the identification brown (five) of the device node corresponding to the week card 26 in the ρα bus bar a. A ρα skirt μ corresponds to a J-node node; and according to an embodiment of the invention, the network card % has a plurality of comma and each squama corresponds to a device node. The NIC reset test method scans all Ρα devices 25 and has a PCI function address (pciFuneti〇nAddress) or a vendor/device/function identification code (Vender/Device/Function Π) that each button device 25 has. )). Find at least one device node corresponding to the NIC %. The test method of the network card reset and obtain the ID of the device node corresponding to the network card, so as to process the device node in a subsequent step. After the device node corresponding to the network card 26 is obtained, the configuration space data of the standby node is saved as the original data in step S34, so that the network card 26 is reconfigured after the network card % is reset. The configuration space data of the device node is the address mapping of the basic input wheeling system (Basic Input/Output System, BIOS) to the network card 26. For example, in the PCI3.0 standard, the configuration space data can include PC] [Device still, »·Ι| 201118559 = manufacturer/device/function m and six basic address registers (intestines ess: g:S) Capital information of phase card 26 (and its ports). The preferred .4 turn configuration m number is basically the value of her temporary H as the original data. In step S36, according to the pCI specification and the information of the device node, the PCI bridge connected to the PCI bus 22 is obtained, and which PCI bridge 24 is connected to the thin card %. As shown in FIG. The network card 26 is mounted under the PCB bridge 24a. After finding the PCI bridge ϋ 24a connected to the network card 26, the test method of the network card reset also obtains the ω of the PCI bridge (10) to facilitate subsequent processing of the PCI bridge 24a. After obtaining the PCI bridge pool corresponding to the network card 26, in step (10), the network card reset test method resets the entire network card 26 by operating the connection to the PCI bridge If 21⁄2 # PCI sub-stream tearing. According to an embodiment of the present invention, the test method of the network card resets the network card 26 by operating the connection control register address of the PCI bridge 24a. The connection control register system controls the connection specification parameter 'and the enablement of the ρα sub-bus bar 8a(10)b (disable) according to the PCI standard by the connection control register, triggers the NIC % reset signal, The network card 26 is reset as a whole. After the shot 26 is reset, the hardware data (for example, various registers and index values) become invalid. The data stored in the network card 26 may be unusable and cannot be used. At this time, the network card 26 automatically enters a measurement state (5) (10) gamma) or a polling state (pollmg state), and the test method of the bad card reset is when the network card % is in the detection state "wide η 201118559 state or polling state" Step S40 is performed. That is to say, the test method of the network card reset does not wait for the operating system to reconfigure the network card 26 (ie, the network card 26 enters the configuration state, configuration state), and then reconfigures the configuration space data of the device node according to the original data. In other words In step S40, the test method of the network card reset recovers the network card 26, that is, the basic address register of all the ports of the network card 26. Then, in step S42, the test method of the network card reset enables the network card 26, so that the network card 26 is initialized. Preferably, the test method of the network card reset causes the operating system to remount the network card driver to the network card 26 to enable the network card 26. As a result, the network card % is newly touched as a bribe, and the card is %_ The data of the rectification memory should also be restored to the default value. In step S44, the test method of the network card reset reads at least one side of the network card % of the card register In the test, the default value of the _ card temporary storage (four) value is used to judge whether the _ card 26 is working properly after the reset. The NIC register can be one of the media access control layer data related to the storage and read layer, such as RX. Packet Buffer Size Register. The network card register may also store physical sound data related to the physical layer, such as a PHY Control Register. In addition, the network card register may store one of the direct memory access data associated with the DMA. For example, the Kenting X touches the Control Register, and finally in step S46, it is confirmed whether the value of the network card temporary crying read in the step tearing is the same as the preset value set in the NIC D stitchet (Specification). Then, for example, "correct" can be output as the test result; on the other hand, if the value of the network card temporary crying does not restore the domain setting value, the round "failed" as a result. mouth. 12 201118559

_卡進繼細目,地㈣的情 況下,疋否具有無須錄啟動計算機系統就㈣復正常工作时 力。根據本發明之實施制之網卡重置_财絲作相連於網 卡之Ρα橋接器,以將整個網卡作為一體進行重置。因此僅需操 作ra橋接器即可重置各種型號的網卡,亦可全面性地測試到網 卡被重置後的狀況4外,本網卡重置的測試方法亦不須謹慎地 與網卡驅動程式周旋,操作流程被大幅簡化。因此本發明所提供 找卡重置_試方法可解決傳統_卡重置測試方法之測試不 完全、測試職式碼不_於各細卡魏,以及操作上複雜費 時甚至容易出錯的問題。 雖然本發明以刖述之較佳實施例揭露如上,然其並非用以限 疋本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍 内,虽可作些許之更動與潤飾,因此本發明之專利保護範圍須視 本說明書所附之申請專利範圍所界定者為準。 【圖式簡單說明】 第1圖係為根據本發明一實施範例之網卡之連接示意圖; 第2圖係為根據本發明一實施範例之網卡之方塊示意圖;以 及 第3圖係為根據本發明一實施範例之網卡重置的測試方法之 執行流程示意圖。 【主要元件符號說明】 20 中央處理器 13 201118559 22 PCI匯流排 24、24a、24b PCI橋接器 25 PCI裝置 26 網卡 261 物理(PHY)層模組 262 PHY層端媒介獨立介面 265 媒介存取控制(MAC)層模組 266 MAC層端媒介獨立介面 267 邏輯鏈結控制(LLC)層模組 269 PCI介面 28、28a、28b PCI子匯流排_ card into the details, in the case of the ground (4), does not have the need to record the start of the computer system (4) to resume normal working hours. The network card reset according to the implementation of the present invention is connected to the Ρα bridge of the network card to reset the entire network card as a whole. Therefore, only need to operate the ra bridge to reset various types of network cards, and also comprehensively test the situation after the network card is reset. 4, the test method of the network card reset does not need to be carefully handled with the network card driver. The operation process has been greatly simplified. Therefore, the card resetting method provided by the present invention can solve the problem that the traditional _ card reset test method is incomplete, the test job code is not _ in each fine card, and the operation is complicated, time consuming, and even error-prone. Although the present invention has been described above with reference to the preferred embodiments thereof, it is not intended to limit the invention, and may be modified and modified without departing from the spirit and scope of the invention. Therefore, the scope of patent protection of the present invention is defined by the scope of the claims appended hereto. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram of a network card connection according to an embodiment of the present invention; FIG. 2 is a block diagram of a network card according to an embodiment of the present invention; and FIG. 3 is a diagram according to the present invention. A schematic diagram of the execution flow of the test method for the network card reset of the implementation example. [Main component symbol description] 20 CPU 13 201118559 22 PCI bus 24, 24a, 24b PCI bridge 25 PCI device 26 NIC 261 Physical (PHY) layer module 262 PHY layer end media independent interface 265 Media access control ( MAC) layer module 266 MAC layer end media independent interface 267 Logical chain control (LLC) layer module 269 PCI interface 28, 28a, 28b PCI sub-bus

Claims (1)

201118559 七、申請專利範圍: 1. 一種網卡重置的測試方法,適用於一網卡,該網卡係與一周邊 、且件互和才示準匯流排(perjpherai Component Interconnect bus, PCIbus)相連,該網卡重置的測試方法包括: 禁用該網卡; 取得該PCI ®流排中與該網卡對應的一設備節點; 將該设備節點具有的一配置空間數據紀錄為一原始數據; 取知該PCI匯流排中與該設備節點對應的一 ρα橋接器; 藉由該PCI橋接器重置該網卡; 依據該縣數據,設定該設備節點的該配置空間數據; 啟用該網卡,使得該網卡初始化; 讀取該網卡所具有的至少—網卡暫存㈣值; 判斷該網卡暫存器的值是否正確;以及 輸出一判斷結果。 2. 如申請專利_1所述之網卡重置_試方法,其中該禁用該 網卡的步驟係包括: 卸除對應該網卡的一網卡驅動程序。 3. 如申請專利範圍2所述 網卡重置的測試方法,其中該啟用言 網卡,使得該網卡初始化的步驟之前,另包括: 掛載該網卡驅動程序予該網卡。 4. 如申請專利範圍1所述 卡重置的測試方法,其中該配置3 間數據包括一基本位址暫存器。 15 201118559 5.如申請糊翻丨所叙網卡重_慘以 扣橋接器重置該網卡所屬的該設備節點後,該網卡#^ 詢狀態,並進行該依據該原始數據,設 即點的該配置空間數據的步驟。 6’如申請專利範圍1所述之 吻橋接_該_另包括:、财心其中該藉由該 藉由該ρα橋接器的一連結控制暫存,禁能一子匯流 排’該伽匯流排連接該PCI橋接器與該網卡;以及 藉由該連結控制暫存器重新致能與該網卡相連的該子 匯流排。 存器卡細測試方法,其働卡暫 9., 16201118559 VII. Patent application scope: 1. A test method for network card reset, which is applicable to a network card. The network card is connected to a peripheral and parallel device (perjpherai Component Interconnect bus (PCIbus). The network card is heavy. The test method includes: disabling the network card; obtaining a device node corresponding to the network card in the PCI® stream; recording a configuration space data of the device node as a raw data; and learning the PCI bus a ρα bridge corresponding to the device node; resetting the network card by the PCI bridge; setting the configuration space data of the device node according to the county data; enabling the network card to initialize the network card; reading the network card At least - the network card temporary storage (four) value; determine whether the value of the network card register is correct; and output a judgment result. 2. The network card reset_test method as claimed in claim 1, wherein the step of disabling the network card comprises: dismounting a network card driver corresponding to the network card. 3. The test method of the network card reset according to claim 2, wherein the step of enabling the network card to initialize the network card further comprises: mounting the network card driver to the network card. 4. The test method of card reset according to claim 1, wherein the configuration data comprises a basic address register. 15 201118559 5. If the application card is reset, the NIC will reset the status of the device node to which the NIC belongs, and the NIC will check the status and set the point based on the original data. The steps to configure spatial data. 6', as described in claim 1, the bridge of the kiss _ the other includes:, the financial center, by the connection of the ρα bridge, the temporary storage, disable a sub-bus, the gamma bus Connecting the PCI bridge to the network card; and re-enabling the sub-bus bar connected to the network card by the link control register. Memory card fine test method, its Leica temporary 9., 16
TW98140884A 2009-11-30 2009-11-30 Test method for resetting network interface card TW201118559A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98140884A TW201118559A (en) 2009-11-30 2009-11-30 Test method for resetting network interface card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98140884A TW201118559A (en) 2009-11-30 2009-11-30 Test method for resetting network interface card

Publications (1)

Publication Number Publication Date
TW201118559A true TW201118559A (en) 2011-06-01

Family

ID=44935720

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98140884A TW201118559A (en) 2009-11-30 2009-11-30 Test method for resetting network interface card

Country Status (1)

Country Link
TW (1) TW201118559A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681497A (en) * 2018-05-22 2018-10-19 天津市英贝特航天科技有限公司 A kind of cpci bus test device and method
CN110896366A (en) * 2019-05-14 2020-03-20 研祥智能科技股份有限公司 Network card function testing method and device of multi-network card equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681497A (en) * 2018-05-22 2018-10-19 天津市英贝特航天科技有限公司 A kind of cpci bus test device and method
CN110896366A (en) * 2019-05-14 2020-03-20 研祥智能科技股份有限公司 Network card function testing method and device of multi-network card equipment and storage medium
CN110896366B (en) * 2019-05-14 2021-08-13 研祥智能科技股份有限公司 Network card function testing method and device of multi-network card equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6360588B2 (en) Dynamic PCIE switch relocation system and method
CN107423169B (en) Method and system for testing high speed peripheral device interconnection equipment
TWI631466B (en) System and method for chassis management
US7809869B2 (en) Throttling a point-to-point, serial input/output expansion subsystem within a computing system
US8386654B2 (en) System and method for transforming PCIe SR-IOV functions to appear as legacy functions
US9979627B2 (en) Systems and methods for bare-metal network topology discovery
US7610483B2 (en) System and method to accelerate identification of hardware platform classes
US7694029B2 (en) Detecting miscabling in a storage area network
TWI334543B (en) Method of scheduling tasks in computer systems architectures, apparatus for implementing task scheduling, and computing system
US20140032641A1 (en) Virtual intelligent platform management interface for hardware components
US6611912B1 (en) Method and apparatus having a system BIOS write configuration data of a riser card to a controller configuration space when connecting the riser card to a motherboard
US6643714B1 (en) Modification and use of configuration memory used during operation of a serial bus
US9965405B2 (en) Initial enumeration of empty endpoint slots using endpoint emulation
US8775712B2 (en) Bus connecting device for connecting host with external device
US10642678B1 (en) PCI/PCIe-non-compliance-vulnerability detection apparatus and method
US10762029B2 (en) Electronic apparatus and detection method using the same
US20070294430A1 (en) Generating a device address persistent across different instantiations of an electronic device
TWI742323B (en) Method for detecting a server
CN110830563A (en) Master-slave architecture server and information reading and writing method thereof
TWI553490B (en) Method and system for remote system configuration management and non-transitory computer-readable storage medium
TW201118559A (en) Test method for resetting network interface card
TWI840849B (en) Computing system, computer-implemented method, and computer-program product
US11467780B1 (en) System and method for automatic identification and bios configuration of drives in a backplane
CN102082715A (en) Testing method of network interface card reset
Intel