瀏覽代碼

Cleaner separation of find_t509_device/fill_t509_device.

tags/v0.9.3
Michael Brown 19 年之前
父節點
當前提交
c7694a5322
共有 1 個文件被更改,包括 11 次插入4 次删除
  1. 11
    4
      src/drivers/net/3c509.c

+ 11
- 4
src/drivers/net/3c509.c 查看文件

@@ -120,6 +120,17 @@ static inline int fill_t509_device ( struct t509_device *t509 ) {
120 120
 	int i;
121 121
 	uint16_t iobase;
122 122
 
123
+	/*
124
+	 * We need an ID port, if we don't already have one.
125
+	 *
126
+	 */
127
+	if ( ! t509->id_port ) {
128
+		if ( ! find_id_port ( t509 ) ) {
129
+			DBG ( "No ID port available for contention select\n" );
130
+			return 0;
131
+		}
132
+	}
133
+
123 134
 	/* 
124 135
 	 * If this is the start of the scan, clear all tag registers.
125 136
 	 * Otherwise, tell already-found NICs not to respond.
@@ -173,10 +184,6 @@ static inline int find_t509_device ( struct t509_device *t509,
173 184
 	if ( t509->magic != t509_magic ) {
174 185
 		memset ( t509, 0, sizeof ( *t509 ) );
175 186
 		t509->magic = t509_magic;
176
-		if ( ! find_id_port ( t509 ) ) {
177
-			DBG ( "No ID port available for contention select\n" );
178
-			return 0;
179
-		}
180 187
 	}
181 188
 
182 189
 	/* Find the next t509 device */

Loading…
取消
儲存