Browse Source

t5x9 code relies on nic->ioaddr being set

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
13137a4d61
1 changed files with 11 additions and 7 deletions
  1. 11
    7
      src/drivers/net/3c509.c

+ 11
- 7
src/drivers/net/3c509.c View File

124
 		outb ( 0xff, t509_id_port );
124
 		outb ( 0xff, t509_id_port );
125
 		if ( inb ( t509_id_port ) & 0x01 ) {
125
 		if ( inb ( t509_id_port ) & 0x01 ) {
126
 			/* Found a suitable port */
126
 			/* Found a suitable port */
127
-			DBG ( "T509 using ID port at %hx\n", t509_id_port );
127
+			DBG ( "T509 using ID port at %04x\n", t509_id_port );
128
 			return 0;
128
 			return 0;
129
 		}
129
 		}
130
 	}
130
 	}
186
 	int rc;
186
 	int rc;
187
 
187
 
188
 	/* Find a suitable ID port */
188
 	/* Find a suitable ID port */
189
-	if ( ( rc = t509_find_id_port () ) != 0 )
189
+	if ( ( rc = t509_find_id_port() ) != 0 )
190
 		return rc;
190
 		return rc;
191
 
191
 
192
 	while ( 1 ) {
192
 	while ( 1 ) {
196
 		 */
196
 		 */
197
 
197
 
198
 		/* Send the ID sequence */
198
 		/* Send the ID sequence */
199
-		t509_send_id_sequence ();
199
+		t509_send_id_sequence();
200
 
200
 
201
 		/* First time through, reset all tags.  On subsequent
201
 		/* First time through, reset all tags.  On subsequent
202
 		 * iterations, kill off any already-tagged cards
202
 		 * iterations, kill off any already-tagged cards
204
 		if ( t509_max_tag == 0 ) {
204
 		if ( t509_max_tag == 0 ) {
205
 			t509_reset_tag();
205
 			t509_reset_tag();
206
 		} else {
206
 		} else {
207
-			t509_select_tag(0);
207
+			t509_select_tag ( 0 );
208
 		}
208
 		}
209
 	
209
 	
210
 		/* Read the manufacturer ID, to see if there are any
210
 		/* Read the manufacturer ID, to see if there are any
274
  * The ISA probe function
274
  * The ISA probe function
275
  *
275
  *
276
  */
276
  */
277
-static int legacy_t509_probe ( struct nic *nic, void *t509 ) {
278
-	
277
+static int legacy_t509_probe ( struct nic *nic, void *hwdev ) {
278
+	struct t509_device *t509 = hwdev;
279
+
279
 	/* We could change t509->ioaddr if we wanted to */
280
 	/* We could change t509->ioaddr if we wanted to */
280
 	activate_t509_device ( t509 );
281
 	activate_t509_device ( t509 );
282
+	nic->ioaddr = t509->ioaddr;
281
 
283
 
282
 	/* Hand off to generic t5x9 probe routine */
284
 	/* Hand off to generic t5x9 probe routine */
283
 	return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK );
285
 	return t5x9_probe ( nic, ISA_PROD_ID ( PROD_ID ), ISA_PROD_ID_MASK );
284
 }
286
 }
285
 
287
 
286
-static void legacy_t509_disable ( struct nic *nic, void *t509 ) {
288
+static void legacy_t509_disable ( struct nic *nic, void *hwdev ) {
289
+	struct t509_device *t509 = hwdev;
290
+
287
 	t5x9_disable ( nic );
291
 	t5x9_disable ( nic );
288
 	deactivate_t509_device ( t509 );
292
 	deactivate_t509_device ( t509 );
289
 }
293
 }

Loading…
Cancel
Save