|
@@ -104,7 +104,8 @@ static void pxe_dump_mcast_list ( struct s_PXENV_UNDI_MCAST_ADDRESS *mcast ) {
|
104
|
104
|
unsigned int i;
|
105
|
105
|
|
106
|
106
|
for ( i = 0 ; i < mcast->MCastAddrCount ; i++ ) {
|
107
|
|
- DBG ( " %s", ll_protocol->ntoa ( mcast->McastAddr[i] ) );
|
|
107
|
+ DBGC ( &pxe_netdev, " %s",
|
|
108
|
+ ll_protocol->ntoa ( mcast->McastAddr[i] ) );
|
108
|
109
|
}
|
109
|
110
|
}
|
110
|
111
|
|
|
@@ -113,7 +114,7 @@ static void pxe_dump_mcast_list ( struct s_PXENV_UNDI_MCAST_ADDRESS *mcast ) {
|
113
|
114
|
* Status: working
|
114
|
115
|
*/
|
115
|
116
|
PXENV_EXIT_t pxenv_undi_startup ( struct s_PXENV_UNDI_STARTUP *undi_startup ) {
|
116
|
|
- DBG ( "PXENV_UNDI_STARTUP\n" );
|
|
117
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_STARTUP\n" );
|
117
|
118
|
|
118
|
119
|
undi_startup->Status = PXENV_STATUS_SUCCESS;
|
119
|
120
|
return PXENV_EXIT_SUCCESS;
|
|
@@ -124,7 +125,7 @@ PXENV_EXIT_t pxenv_undi_startup ( struct s_PXENV_UNDI_STARTUP *undi_startup ) {
|
124
|
125
|
* Status: working
|
125
|
126
|
*/
|
126
|
127
|
PXENV_EXIT_t pxenv_undi_cleanup ( struct s_PXENV_UNDI_CLEANUP *undi_cleanup ) {
|
127
|
|
- DBG ( "PXENV_UNDI_CLEANUP\n" );
|
|
128
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_CLEANUP\n" );
|
128
|
129
|
|
129
|
130
|
pxe_netdev_close();
|
130
|
131
|
|
|
@@ -138,8 +139,8 @@ PXENV_EXIT_t pxenv_undi_cleanup ( struct s_PXENV_UNDI_CLEANUP *undi_cleanup ) {
|
138
|
139
|
*/
|
139
|
140
|
PXENV_EXIT_t pxenv_undi_initialize ( struct s_PXENV_UNDI_INITIALIZE
|
140
|
141
|
*undi_initialize ) {
|
141
|
|
- DBG ( "PXENV_UNDI_INITIALIZE protocolini %08x\n",
|
142
|
|
- undi_initialize->ProtocolIni );
|
|
142
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_INITIALIZE protocolini %08x\n",
|
|
143
|
+ undi_initialize->ProtocolIni );
|
143
|
144
|
|
144
|
145
|
undi_initialize->Status = PXENV_STATUS_SUCCESS;
|
145
|
146
|
return PXENV_EXIT_SUCCESS;
|
|
@@ -153,14 +154,14 @@ PXENV_EXIT_t pxenv_undi_reset_adapter ( struct s_PXENV_UNDI_RESET
|
153
|
154
|
*undi_reset_adapter ) {
|
154
|
155
|
int rc;
|
155
|
156
|
|
156
|
|
- DBG ( "PXENV_UNDI_RESET_ADAPTER" );
|
|
157
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_RESET_ADAPTER" );
|
157
|
158
|
pxe_dump_mcast_list ( &undi_reset_adapter->R_Mcast_Buf );
|
158
|
|
- DBG ( "\n" );
|
|
159
|
+ DBGC ( &pxe_netdev, "\n" );
|
159
|
160
|
|
160
|
161
|
pxe_netdev_close();
|
161
|
162
|
if ( ( rc = pxe_netdev_open() ) != 0 ) {
|
162
|
|
- DBG ( "PXENV_UNDI_RESET_ADAPTER could not reopen %s: %s\n",
|
163
|
|
- pxe_netdev->name, strerror ( rc ) );
|
|
163
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_RESET_ADAPTER could not "
|
|
164
|
+ "reopen %s: %s\n", pxe_netdev->name, strerror ( rc ) );
|
164
|
165
|
undi_reset_adapter->Status = PXENV_STATUS ( rc );
|
165
|
166
|
return PXENV_EXIT_FAILURE;
|
166
|
167
|
}
|
|
@@ -175,7 +176,7 @@ PXENV_EXIT_t pxenv_undi_reset_adapter ( struct s_PXENV_UNDI_RESET
|
175
|
176
|
*/
|
176
|
177
|
PXENV_EXIT_t pxenv_undi_shutdown ( struct s_PXENV_UNDI_SHUTDOWN
|
177
|
178
|
*undi_shutdown ) {
|
178
|
|
- DBG ( "PXENV_UNDI_SHUTDOWN\n" );
|
|
179
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_SHUTDOWN\n" );
|
179
|
180
|
|
180
|
181
|
pxe_netdev_close();
|
181
|
182
|
|
|
@@ -190,14 +191,14 @@ PXENV_EXIT_t pxenv_undi_shutdown ( struct s_PXENV_UNDI_SHUTDOWN
|
190
|
191
|
PXENV_EXIT_t pxenv_undi_open ( struct s_PXENV_UNDI_OPEN *undi_open ) {
|
191
|
192
|
int rc;
|
192
|
193
|
|
193
|
|
- DBG ( "PXENV_UNDI_OPEN flag %04x filter %04x",
|
194
|
|
- undi_open->OpenFlag, undi_open->PktFilter );
|
|
194
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_OPEN flag %04x filter %04x",
|
|
195
|
+ undi_open->OpenFlag, undi_open->PktFilter );
|
195
|
196
|
pxe_dump_mcast_list ( &undi_open->R_Mcast_Buf );
|
196
|
|
- DBG ( "\n" );
|
|
197
|
+ DBGC ( &pxe_netdev, "\n" );
|
197
|
198
|
|
198
|
199
|
if ( ( rc = pxe_netdev_open() ) != 0 ) {
|
199
|
|
- DBG ( "PXENV_UNDI_OPEN could not open %s: %s\n",
|
200
|
|
- pxe_netdev->name, strerror ( rc ) );
|
|
200
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_OPEN could not open %s: %s\n",
|
|
201
|
+ pxe_netdev->name, strerror ( rc ) );
|
201
|
202
|
undi_open->Status = PXENV_STATUS ( rc );
|
202
|
203
|
return PXENV_EXIT_FAILURE;
|
203
|
204
|
}
|
|
@@ -211,7 +212,7 @@ PXENV_EXIT_t pxenv_undi_open ( struct s_PXENV_UNDI_OPEN *undi_open ) {
|
211
|
212
|
* Status: working
|
212
|
213
|
*/
|
213
|
214
|
PXENV_EXIT_t pxenv_undi_close ( struct s_PXENV_UNDI_CLOSE *undi_close ) {
|
214
|
|
- DBG ( "PXENV_UNDI_CLOSE\n" );
|
|
215
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_CLOSE\n" );
|
215
|
216
|
|
216
|
217
|
pxe_netdev_close();
|
217
|
218
|
|
|
@@ -236,7 +237,7 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
|
236
|
237
|
unsigned int i;
|
237
|
238
|
int rc;
|
238
|
239
|
|
239
|
|
- DBG2 ( "PXENV_UNDI_TRANSMIT" );
|
|
240
|
+ DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT" );
|
240
|
241
|
|
241
|
242
|
/* Forcibly enable interrupts and freeze receive queue
|
242
|
243
|
* processing at this point, to work around callers that never
|
|
@@ -254,29 +255,32 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
|
254
|
255
|
net_protocol = NULL;
|
255
|
256
|
break;
|
256
|
257
|
default:
|
257
|
|
- DBG2 ( " %02x invalid protocol\n", undi_transmit->Protocol );
|
|
258
|
+ DBGC2 ( &pxe_netdev, " %02x invalid protocol\n",
|
|
259
|
+ undi_transmit->Protocol );
|
258
|
260
|
undi_transmit->Status = PXENV_STATUS_UNDI_INVALID_PARAMETER;
|
259
|
261
|
return PXENV_EXIT_FAILURE;
|
260
|
262
|
}
|
261
|
|
- DBG2 ( " %s", ( net_protocol ? net_protocol->name : "RAW" ) );
|
|
263
|
+ DBGC2 ( &pxe_netdev, " %s",
|
|
264
|
+ ( net_protocol ? net_protocol->name : "RAW" ) );
|
262
|
265
|
|
263
|
266
|
/* Calculate total packet length */
|
264
|
267
|
copy_from_real ( &tbd, undi_transmit->TBD.segment,
|
265
|
268
|
undi_transmit->TBD.offset, sizeof ( tbd ) );
|
266
|
269
|
len = tbd.ImmedLength;
|
267
|
|
- DBG2 ( " %04x:%04x+%x", tbd.Xmit.segment, tbd.Xmit.offset,
|
268
|
|
- tbd.ImmedLength );
|
|
270
|
+ DBGC2 ( &pxe_netdev, " %04x:%04x+%x", tbd.Xmit.segment, tbd.Xmit.offset,
|
|
271
|
+ tbd.ImmedLength );
|
269
|
272
|
for ( i = 0 ; i < tbd.DataBlkCount ; i++ ) {
|
270
|
273
|
datablk = &tbd.DataBlock[i];
|
271
|
274
|
len += datablk->TDDataLen;
|
272
|
|
- DBG2 ( " %04x:%04x+%x", datablk->TDDataPtr.segment,
|
273
|
|
- datablk->TDDataPtr.offset, datablk->TDDataLen );
|
|
275
|
+ DBGC2 ( &pxe_netdev, " %04x:%04x+%x",
|
|
276
|
+ datablk->TDDataPtr.segment, datablk->TDDataPtr.offset,
|
|
277
|
+ datablk->TDDataLen );
|
274
|
278
|
}
|
275
|
279
|
|
276
|
280
|
/* Allocate and fill I/O buffer */
|
277
|
281
|
iobuf = alloc_iob ( MAX_LL_HEADER_LEN + len );
|
278
|
282
|
if ( ! iobuf ) {
|
279
|
|
- DBG2 ( " could not allocate iobuf\n" );
|
|
283
|
+ DBGC2 ( &pxe_netdev, " could not allocate iobuf\n" );
|
280
|
284
|
undi_transmit->Status = PXENV_STATUS_OUT_OF_RESOURCES;
|
281
|
285
|
return PXENV_EXIT_FAILURE;
|
282
|
286
|
}
|
|
@@ -301,18 +305,19 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
|
301
|
305
|
undi_transmit->DestAddr.offset,
|
302
|
306
|
ll_protocol->ll_addr_len );
|
303
|
307
|
ll_dest = destaddr;
|
304
|
|
- DBG2 ( " DEST %s", ll_protocol->ntoa ( ll_dest ) );
|
|
308
|
+ DBGC2 ( &pxe_netdev, " DEST %s",
|
|
309
|
+ ll_protocol->ntoa ( ll_dest ) );
|
305
|
310
|
} else {
|
306
|
311
|
ll_dest = pxe_netdev->ll_broadcast;
|
307
|
|
- DBG2 ( " BCAST" );
|
|
312
|
+ DBGC2 ( &pxe_netdev, " BCAST" );
|
308
|
313
|
}
|
309
|
314
|
|
310
|
315
|
/* Add link-layer header */
|
311
|
316
|
if ( ( rc = ll_protocol->push ( pxe_netdev, iobuf, ll_dest,
|
312
|
317
|
pxe_netdev->ll_addr,
|
313
|
318
|
net_protocol->net_proto ))!=0){
|
314
|
|
- DBG2 ( " could not add link-layer header: %s\n",
|
315
|
|
- strerror ( rc ) );
|
|
319
|
+ DBGC2 ( &pxe_netdev, " could not add link-layer "
|
|
320
|
+ "header: %s\n", strerror ( rc ) );
|
316
|
321
|
free_iob ( iobuf );
|
317
|
322
|
undi_transmit->Status = PXENV_STATUS ( rc );
|
318
|
323
|
return PXENV_EXIT_FAILURE;
|
|
@@ -326,10 +331,10 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
|
326
|
331
|
undi_tx_count++;
|
327
|
332
|
|
328
|
333
|
/* Transmit packet */
|
329
|
|
- DBG2 ( "\n" );
|
|
334
|
+ DBGC2 ( &pxe_netdev, "\n" );
|
330
|
335
|
if ( ( rc = netdev_tx ( pxe_netdev, iobuf ) ) != 0 ) {
|
331
|
|
- DBG2 ( "PXENV_UNDI_TRANSMIT could not transmit: %s\n",
|
332
|
|
- strerror ( rc ) );
|
|
336
|
+ DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT could not transmit: "
|
|
337
|
+ "%s\n", strerror ( rc ) );
|
333
|
338
|
undi_tx_count--;
|
334
|
339
|
undi_transmit->Status = PXENV_STATUS ( rc );
|
335
|
340
|
return PXENV_EXIT_FAILURE;
|
|
@@ -346,9 +351,9 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
|
346
|
351
|
PXENV_EXIT_t
|
347
|
352
|
pxenv_undi_set_mcast_address ( struct s_PXENV_UNDI_SET_MCAST_ADDRESS
|
348
|
353
|
*undi_set_mcast_address ) {
|
349
|
|
- DBG ( "PXENV_UNDI_SET_MCAST_ADDRESS" );
|
|
354
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_SET_MCAST_ADDRESS" );
|
350
|
355
|
pxe_dump_mcast_list ( &undi_set_mcast_address->R_Mcast_Buf );
|
351
|
|
- DBG ( "\n" );
|
|
356
|
+ DBGC ( &pxe_netdev, "\n" );
|
352
|
357
|
|
353
|
358
|
undi_set_mcast_address->Status = PXENV_STATUS_SUCCESS;
|
354
|
359
|
return PXENV_EXIT_SUCCESS;
|
|
@@ -363,14 +368,14 @@ pxenv_undi_set_station_address ( struct s_PXENV_UNDI_SET_STATION_ADDRESS
|
363
|
368
|
*undi_set_station_address ) {
|
364
|
369
|
struct ll_protocol *ll_protocol = pxe_netdev->ll_protocol;
|
365
|
370
|
|
366
|
|
- DBG ( "PXENV_UNDI_SET_STATION_ADDRESS %s",
|
367
|
|
- ll_protocol->ntoa ( undi_set_station_address->StationAddress ) );
|
|
371
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_SET_STATION_ADDRESS %s",
|
|
372
|
+ ll_protocol->ntoa ( undi_set_station_address->StationAddress ) );
|
368
|
373
|
|
369
|
374
|
/* If adapter is open, the change will have no effect; return
|
370
|
375
|
* an error
|
371
|
376
|
*/
|
372
|
377
|
if ( netdev_is_open ( pxe_netdev ) ) {
|
373
|
|
- DBG ( " failed: netdev is open\n" );
|
|
378
|
+ DBGC ( &pxe_netdev, " failed: netdev is open\n" );
|
374
|
379
|
undi_set_station_address->Status =
|
375
|
380
|
PXENV_STATUS_UNDI_INVALID_STATE;
|
376
|
381
|
return PXENV_EXIT_FAILURE;
|
|
@@ -381,7 +386,7 @@ pxenv_undi_set_station_address ( struct s_PXENV_UNDI_SET_STATION_ADDRESS
|
381
|
386
|
&undi_set_station_address->StationAddress,
|
382
|
387
|
ll_protocol->ll_addr_len );
|
383
|
388
|
|
384
|
|
- DBG ( "\n" );
|
|
389
|
+ DBGC ( &pxe_netdev, "\n" );
|
385
|
390
|
undi_set_station_address->Status = PXENV_STATUS_SUCCESS;
|
386
|
391
|
return PXENV_EXIT_SUCCESS;
|
387
|
392
|
}
|
|
@@ -395,8 +400,8 @@ PXENV_EXIT_t
|
395
|
400
|
pxenv_undi_set_packet_filter ( struct s_PXENV_UNDI_SET_PACKET_FILTER
|
396
|
401
|
*undi_set_packet_filter ) {
|
397
|
402
|
|
398
|
|
- DBG ( "PXENV_UNDI_SET_PACKET_FILTER %02x\n",
|
399
|
|
- undi_set_packet_filter->filter );
|
|
403
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_SET_PACKET_FILTER %02x\n",
|
|
404
|
+ undi_set_packet_filter->filter );
|
400
|
405
|
|
401
|
406
|
/* Pretend that we succeeded, otherwise the 3Com DOS UNDI
|
402
|
407
|
* driver refuses to load. (We ignore the filter value in the
|
|
@@ -417,7 +422,7 @@ PXENV_EXIT_t pxenv_undi_get_information ( struct s_PXENV_UNDI_GET_INFORMATION
|
417
|
422
|
struct ll_protocol *ll_protocol = pxe_netdev->ll_protocol;
|
418
|
423
|
size_t ll_addr_len = ll_protocol->ll_addr_len;
|
419
|
424
|
|
420
|
|
- DBG ( "PXENV_UNDI_GET_INFORMATION" );
|
|
425
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION" );
|
421
|
426
|
|
422
|
427
|
undi_get_information->BaseIo = dev->desc.ioaddr;
|
423
|
428
|
undi_get_information->IntNumber =
|
|
@@ -441,10 +446,10 @@ PXENV_EXIT_t pxenv_undi_get_information ( struct s_PXENV_UNDI_GET_INFORMATION
|
441
|
446
|
undi_get_information->RxBufCt = 1;
|
442
|
447
|
undi_get_information->TxBufCt = 1;
|
443
|
448
|
|
444
|
|
- DBG ( " io %04x irq %d mtu %d %s %s\n",
|
445
|
|
- undi_get_information->BaseIo, undi_get_information->IntNumber,
|
446
|
|
- undi_get_information->MaxTranUnit, ll_protocol->name,
|
447
|
|
- ll_protocol->ntoa ( &undi_get_information->CurrentNodeAddress ));
|
|
449
|
+ DBGC ( &pxe_netdev, " io %04x irq %d mtu %d %s %s\n",
|
|
450
|
+ undi_get_information->BaseIo, undi_get_information->IntNumber,
|
|
451
|
+ undi_get_information->MaxTranUnit, ll_protocol->name,
|
|
452
|
+ ll_protocol->ntoa ( &undi_get_information->CurrentNodeAddress ));
|
448
|
453
|
undi_get_information->Status = PXENV_STATUS_SUCCESS;
|
449
|
454
|
return PXENV_EXIT_SUCCESS;
|
450
|
455
|
}
|
|
@@ -455,18 +460,18 @@ PXENV_EXIT_t pxenv_undi_get_information ( struct s_PXENV_UNDI_GET_INFORMATION
|
455
|
460
|
*/
|
456
|
461
|
PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
|
457
|
462
|
*undi_get_statistics ) {
|
458
|
|
- DBG ( "PXENV_UNDI_GET_STATISTICS" );
|
|
463
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATISTICS" );
|
459
|
464
|
|
460
|
465
|
undi_get_statistics->XmtGoodFrames = pxe_netdev->tx_stats.good;
|
461
|
466
|
undi_get_statistics->RcvGoodFrames = pxe_netdev->rx_stats.good;
|
462
|
467
|
undi_get_statistics->RcvCRCErrors = pxe_netdev->rx_stats.bad;
|
463
|
468
|
undi_get_statistics->RcvResourceErrors = pxe_netdev->rx_stats.bad;
|
464
|
469
|
|
465
|
|
- DBG ( " txok %d rxok %d rxcrc %d rxrsrc %d\n",
|
466
|
|
- undi_get_statistics->XmtGoodFrames,
|
467
|
|
- undi_get_statistics->RcvGoodFrames,
|
468
|
|
- undi_get_statistics->RcvCRCErrors,
|
469
|
|
- undi_get_statistics->RcvResourceErrors );
|
|
470
|
+ DBGC ( &pxe_netdev, " txok %d rxok %d rxcrc %d rxrsrc %d\n",
|
|
471
|
+ undi_get_statistics->XmtGoodFrames,
|
|
472
|
+ undi_get_statistics->RcvGoodFrames,
|
|
473
|
+ undi_get_statistics->RcvCRCErrors,
|
|
474
|
+ undi_get_statistics->RcvResourceErrors );
|
470
|
475
|
undi_get_statistics->Status = PXENV_STATUS_SUCCESS;
|
471
|
476
|
return PXENV_EXIT_SUCCESS;
|
472
|
477
|
}
|
|
@@ -477,7 +482,7 @@ PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
|
477
|
482
|
*/
|
478
|
483
|
PXENV_EXIT_t pxenv_undi_clear_statistics ( struct s_PXENV_UNDI_CLEAR_STATISTICS
|
479
|
484
|
*undi_clear_statistics ) {
|
480
|
|
- DBG ( "PXENV_UNDI_CLEAR_STATISTICS\n" );
|
|
485
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_CLEAR_STATISTICS\n" );
|
481
|
486
|
|
482
|
487
|
memset ( &pxe_netdev->tx_stats, 0, sizeof ( pxe_netdev->tx_stats ) );
|
483
|
488
|
memset ( &pxe_netdev->rx_stats, 0, sizeof ( pxe_netdev->rx_stats ) );
|
|
@@ -493,7 +498,7 @@ PXENV_EXIT_t pxenv_undi_clear_statistics ( struct s_PXENV_UNDI_CLEAR_STATISTICS
|
493
|
498
|
*/
|
494
|
499
|
PXENV_EXIT_t pxenv_undi_initiate_diags ( struct s_PXENV_UNDI_INITIATE_DIAGS
|
495
|
500
|
*undi_initiate_diags ) {
|
496
|
|
- DBG ( "PXENV_UNDI_INITIATE_DIAGS failed: unsupported\n" );
|
|
501
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_INITIATE_DIAGS failed: unsupported\n" );
|
497
|
502
|
|
498
|
503
|
undi_initiate_diags->Status = PXENV_STATUS_UNSUPPORTED;
|
499
|
504
|
return PXENV_EXIT_FAILURE;
|
|
@@ -506,7 +511,8 @@ PXENV_EXIT_t pxenv_undi_initiate_diags ( struct s_PXENV_UNDI_INITIATE_DIAGS
|
506
|
511
|
*/
|
507
|
512
|
PXENV_EXIT_t pxenv_undi_force_interrupt ( struct s_PXENV_UNDI_FORCE_INTERRUPT
|
508
|
513
|
*undi_force_interrupt ) {
|
509
|
|
- DBG ( "PXENV_UNDI_FORCE_INTERRUPT failed: unsupported\n" );
|
|
514
|
+ DBGC ( &pxe_netdev,
|
|
515
|
+ "PXENV_UNDI_FORCE_INTERRUPT failed: unsupported\n" );
|
510
|
516
|
|
511
|
517
|
undi_force_interrupt->Status = PXENV_STATUS_UNSUPPORTED;
|
512
|
518
|
return PXENV_EXIT_FAILURE;
|
|
@@ -523,16 +529,17 @@ pxenv_undi_get_mcast_address ( struct s_PXENV_UNDI_GET_MCAST_ADDRESS
|
523
|
529
|
struct in_addr ip = { .s_addr = undi_get_mcast_address->InetAddr };
|
524
|
530
|
int rc;
|
525
|
531
|
|
526
|
|
- DBG ( "PXENV_UNDI_GET_MCAST_ADDRESS %s", inet_ntoa ( ip ) );
|
|
532
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS %s",
|
|
533
|
+ inet_ntoa ( ip ) );
|
527
|
534
|
|
528
|
535
|
if ( ( rc = ll_protocol->mc_hash ( AF_INET, &ip,
|
529
|
536
|
undi_get_mcast_address->MediaAddr ))!=0){
|
530
|
|
- DBG ( " failed: %s\n", strerror ( rc ) );
|
|
537
|
+ DBGC ( &pxe_netdev, " failed: %s\n", strerror ( rc ) );
|
531
|
538
|
undi_get_mcast_address->Status = PXENV_STATUS ( rc );
|
532
|
539
|
return PXENV_EXIT_FAILURE;
|
533
|
540
|
}
|
534
|
|
- DBG ( "=>%s\n",
|
535
|
|
- ll_protocol->ntoa ( undi_get_mcast_address->MediaAddr ) );
|
|
541
|
+ DBGC ( &pxe_netdev, "=>%s\n",
|
|
542
|
+ ll_protocol->ntoa ( undi_get_mcast_address->MediaAddr ) );
|
536
|
543
|
|
537
|
544
|
undi_get_mcast_address->Status = PXENV_STATUS_SUCCESS;
|
538
|
545
|
return PXENV_EXIT_SUCCESS;
|
|
@@ -546,7 +553,7 @@ PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE
|
546
|
553
|
*undi_get_nic_type ) {
|
547
|
554
|
struct device *dev = pxe_netdev->dev;
|
548
|
555
|
|
549
|
|
- DBG ( "PXENV_UNDI_GET_NIC_TYPE" );
|
|
556
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE" );
|
550
|
557
|
|
551
|
558
|
memset ( &undi_get_nic_type->info, 0,
|
552
|
559
|
sizeof ( undi_get_nic_type->info ) );
|
|
@@ -567,13 +574,14 @@ PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE
|
567
|
574
|
* is possible that some NBPs will not provide space
|
568
|
575
|
* for them, and so we must not fill them in.
|
569
|
576
|
*/
|
570
|
|
- DBG ( " PCI %02x:%02x.%x %04x:%04x ('%04x:%04x') %02x%02x%02x "
|
571
|
|
- "rev %02x\n", PCI_BUS ( info->BusDevFunc ),
|
572
|
|
- PCI_SLOT ( info->BusDevFunc ),
|
573
|
|
- PCI_FUNC ( info->BusDevFunc ), info->Vendor_ID,
|
574
|
|
- info->Dev_ID, info->SubVendor_ID, info->SubDevice_ID,
|
575
|
|
- info->Base_Class, info->Sub_Class, info->Prog_Intf,
|
576
|
|
- info->Rev );
|
|
577
|
+ DBGC ( &pxe_netdev, " PCI %02x:%02x.%x %04x:%04x "
|
|
578
|
+ "('%04x:%04x') %02x%02x%02x rev %02x\n",
|
|
579
|
+ PCI_BUS ( info->BusDevFunc ),
|
|
580
|
+ PCI_SLOT ( info->BusDevFunc ),
|
|
581
|
+ PCI_FUNC ( info->BusDevFunc ), info->Vendor_ID,
|
|
582
|
+ info->Dev_ID, info->SubVendor_ID, info->SubDevice_ID,
|
|
583
|
+ info->Base_Class, info->Sub_Class, info->Prog_Intf,
|
|
584
|
+ info->Rev );
|
577
|
585
|
break; }
|
578
|
586
|
case BUS_TYPE_ISAPNP: {
|
579
|
587
|
struct pnp_nic_info *info = &undi_get_nic_type->info.pnp;
|
|
@@ -585,12 +593,12 @@ PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE
|
585
|
593
|
/* Cheat: remaining fields are probably unnecessary,
|
586
|
594
|
* and would require adding extra code to isapnp.c.
|
587
|
595
|
*/
|
588
|
|
- DBG ( " ISAPnP CSN %04x %08x %02x%02x%02x\n",
|
589
|
|
- info->CardSelNum, info->EISA_Dev_ID,
|
590
|
|
- info->Base_Class, info->Sub_Class, info->Prog_Intf );
|
|
596
|
+ DBGC ( &pxe_netdev, " ISAPnP CSN %04x %08x %02x%02x%02x\n",
|
|
597
|
+ info->CardSelNum, info->EISA_Dev_ID,
|
|
598
|
+ info->Base_Class, info->Sub_Class, info->Prog_Intf );
|
591
|
599
|
break; }
|
592
|
600
|
default:
|
593
|
|
- DBG ( " failed: unknown bus type\n" );
|
|
601
|
+ DBGC ( &pxe_netdev, " failed: unknown bus type\n" );
|
594
|
602
|
undi_get_nic_type->Status = PXENV_STATUS_FAILURE;
|
595
|
603
|
return PXENV_EXIT_FAILURE;
|
596
|
604
|
}
|
|
@@ -605,7 +613,7 @@ PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE
|
605
|
613
|
*/
|
606
|
614
|
PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
|
607
|
615
|
*undi_get_iface_info ) {
|
608
|
|
- DBG ( "PXENV_UNDI_GET_IFACE_INFO" );
|
|
616
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_GET_IFACE_INFO" );
|
609
|
617
|
|
610
|
618
|
/* Just hand back some info, doesn't really matter what it is.
|
611
|
619
|
* Most PXE stacks seem to take this approach.
|
|
@@ -622,9 +630,9 @@ PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
|
622
|
630
|
memset ( undi_get_iface_info->Reserved, 0,
|
623
|
631
|
sizeof(undi_get_iface_info->Reserved) );
|
624
|
632
|
|
625
|
|
- DBG ( " %s %dbps flags %08x\n", undi_get_iface_info->IfaceType,
|
626
|
|
- undi_get_iface_info->LinkSpeed,
|
627
|
|
- undi_get_iface_info->ServiceFlags );
|
|
633
|
+ DBGC ( &pxe_netdev, " %s %dbps flags %08x\n",
|
|
634
|
+ undi_get_iface_info->IfaceType, undi_get_iface_info->LinkSpeed,
|
|
635
|
+ undi_get_iface_info->ServiceFlags );
|
628
|
636
|
undi_get_iface_info->Status = PXENV_STATUS_SUCCESS;
|
629
|
637
|
return PXENV_EXIT_SUCCESS;
|
630
|
638
|
}
|
|
@@ -635,7 +643,7 @@ PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
|
635
|
643
|
*/
|
636
|
644
|
PXENV_EXIT_t pxenv_undi_get_state ( struct s_PXENV_UNDI_GET_STATE
|
637
|
645
|
*undi_get_state ) {
|
638
|
|
- DBG ( "PXENV_UNDI_GET_STATE failed: unsupported\n" );
|
|
646
|
+ DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATE failed: unsupported\n" );
|
639
|
647
|
|
640
|
648
|
undi_get_state->Status = PXENV_STATUS_UNSUPPORTED;
|
641
|
649
|
return PXENV_EXIT_FAILURE;
|
|
@@ -658,8 +666,8 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
|
658
|
666
|
unsigned int prottype;
|
659
|
667
|
int rc;
|
660
|
668
|
|
661
|
|
- /* Use coloured debug, since UNDI ISR messages are likely to
|
662
|
|
- * be interspersed amongst other UNDI messages.
|
|
669
|
+ /* Use a different debug colour, since UNDI ISR messages are
|
|
670
|
+ * likely to be interspersed amongst other UNDI messages.
|
663
|
671
|
*/
|
664
|
672
|
DBGC2 ( &pxenv_undi_isr, "PXENV_UNDI_ISR" );
|
665
|
673
|
|