소스 검색

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…
취소
저장