1 /*
2 ** *************************************************************************
3 **
4 **
5 ** R C L A N M T L . H $Revision: 6 $
6 **
7 **
8 ** RedCreek I2O LAN Message Transport Layer header file.
9 **
10 ** ---------------------------------------------------------------------
11 ** --- Copyright (c) 1997-1999, RedCreek Communications Inc. ---
12 ** --- All rights reserved. ---
13 ** ---------------------------------------------------------------------
14 **
15 ** File Description:
16 **
17 ** Header file for host I2O (Intelligent I/O) LAN message transport layer
18 ** API and data types.
19 **
20 ** This program is free software; you can redistribute it and/or modify
21 ** it under the terms of the GNU General Public License as published by
22 ** the Free Software Foundation; either version 2 of the License, or
23 ** (at your option) any later version.
24
25 ** This program is distributed in the hope that it will be useful,
26 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
27 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ** GNU General Public License for more details.
29
30 ** You should have received a copy of the GNU General Public License
31 ** along with this program; if not, write to the Free Software
32 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 **
34 ** *************************************************************************
35 */
36
37 #ifndef RCLANMTL_H
38 #define RCLANMTL_H
39
40 /* Linux specific includes */
41 #include <asm/types.h>
42 #define kprintf printk
43 #ifdef RC_LINUX_MODULE /* linux modules need non-library version of string functions */
44 #include <linux/string.h>
45 #else
46 #include <string.h>
47 #endif
48
49 /* PCI/45 Configuration space values */
50 #define RC_PCI45_VENDOR_ID 0x4916
51 #define RC_PCI45_DEVICE_ID 0x1960
52
53
54 /* RedCreek API function return values */
55 #define RC_RTN_NO_ERROR 0
56 #define RC_RTN_I2O_NOT_INIT 1
57 #define RC_RTN_FREE_Q_EMPTY 2
58 #define RC_RTN_TCB_ERROR 3
59 #define RC_RTN_TRANSACTION_ERROR 4
60 #define RC_RTN_ADAPTER_ALREADY_INIT 5
61 #define RC_RTN_MALLOC_ERROR 6
62 #define RC_RTN_ADPTR_NOT_REGISTERED 7
63 #define RC_RTN_MSG_REPLY_TIMEOUT 8
64 #define RC_RTN_NO_I2O_STATUS 9
65 #define RC_RTN_NO_FIRM_VER 10
66 #define RC_RTN_NO_LINK_SPEED 11
67
68 /* Driver capability flags */
69 #define WARM_REBOOT_CAPABLE 0x01
70
71 /* scalar data types */
72 typedef __u8 U8;
73 typedef __u16 U16;
74 typedef __u32 U32;
75 typedef __u8* PU8;
76 typedef __u16* PU16;
77 typedef __u32* PU32;
78 typedef unsigned long BF;
79 typedef int RC_RETURN;
80
81
82 /*
83 ** type PFNWAITCALLBACK
84 **
85 ** pointer to void function - type used for WaitCallback in some functions
86 */
87 typedef void (*PFNWAITCALLBACK)(void); /* void argument avoids compiler complaint */
88
89 /*
90 ** type PFNTXCALLBACK
91 **
92 ** Pointer to user's transmit callback function. This user function is
93 ** called from RCProcI2OMsgQ() when packet have been transmitted from buffers
94 ** given in the RCI2OSendPacket() function. BufferContext is a pointer to
95 ** an array of 32 bit context values. These are the values the user assigned
96 ** and passed in the TCB to the RCI2OSendPacket() function. PcktCount
97 ** indicates the number of buffer context values in the BufferContext[] array.
98 ** The User's TransmitCallbackFunction should recover (put back in free queue)
99 ** the packet buffers associated with the buffer context values.
100 */
101 typedef void (*PFNTXCALLBACK)(U32 Status,
102 U16 PcktCount,
103 PU32 BufferContext,
104 U16 AdaterID);
105
106 /*
107 ** type PFNRXCALLBACK
108 **
109 ** Pointer to user's receive callback function. This user function
110 ** is called from RCProcI2OMsgQ() when packets have been received into
111 ** previously posted packet buffers throught the RCPostRecvBuffers() function.
112 ** The received callback function should process the Packet Descriptor Block
113 ** pointed to by PacketDescBlock. See Packet Decription Block below.
114 */
115 typedef void (*PFNRXCALLBACK)(U32 Status,
116 U8 PktCount,
117 U32 BucketsRemain,
118 PU32 PacketDescBlock,
119 U16 AdapterID);
120
121 /*
122 ** type PFNCALLBACK
123 **
124 ** Pointer to user's generic callback function. This user function
125 ** can be passed to LANReset or LANShutdown and is called when the
126 ** the reset or shutdown is complete.
127 ** Param1 and Param2 are invalid for LANReset and LANShutdown.
128 */
129 typedef void (*PFNCALLBACK)(U32 Status,
130 U32 Param1,
131 U32 Param2,
132 U16 AdapterID);
133
134 /*
135 ** Status - Transmit and Receive callback status word
136 **
137 ** A 32 bit Status is returned to the TX and RX callback functions. This value
138 ** contains both the reply status and the detailed status as follows:
139 **
140 ** 32 24 16 0
141 ** +------+------+------------+
142 ** | Reply| | Detailed |
143 ** |Status| 0 | Status |
144 ** +------+------+------------+
145 **
146 ** Reply Status and Detailed Status of zero indicates No Errors.
147 */
148 /* reply message status defines */
149 #define I2O_REPLY_STATUS_SUCCESS 0x00
150 #define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER 0x02
151 #define I2O_REPLY_STATUS_TRANSACTION_ERROR 0x0A
152
153
154 /* DetailedStatusCode defines */
155 #define I2O_LAN_DSC_SUCCESS 0x0000
156 #define I2O_LAN_DSC_DEVICE_FAILURE 0x0001
157 #define I2O_LAN_DSC_DESTINATION_NOT_FOUND 0x0002
158 #define I2O_LAN_DSC_TRANSMIT_ERROR 0x0003
159 #define I2O_LAN_DSC_TRANSMIT_ABORTED 0x0004
160 #define I2O_LAN_DSC_RECEIVE_ERROR 0x0005
161 #define I2O_LAN_DSC_RECEIVE_ABORTED 0x0006
162 #define I2O_LAN_DSC_DMA_ERROR 0x0007
163 #define I2O_LAN_DSC_BAD_PACKET_DETECTED 0x0008
164 #define I2O_LAN_DSC_OUT_OF_MEMORY 0x0009
165 #define I2O_LAN_DSC_BUCKET_OVERRUN 0x000A
166 #define I2O_LAN_DSC_IOP_INTERNAL_ERROR 0x000B
167 #define I2O_LAN_DSC_CANCELED 0x000C
168 #define I2O_LAN_DSC_INVALID_TRANSACTION_CONTEXT 0x000D
169 #define I2O_LAN_DSC_DESTINATION_ADDRESS_DETECTED 0x000E
170 #define I2O_LAN_DSC_DESTINATION_ADDRESS_OMITTED 0x000F
171 #define I2O_LAN_DSC_PARTIAL_PACKET_RETURNED 0x0010
172
173
174 /*
175 ** Packet Description Block (Received packets)
176 **
177 ** A pointer to this block structure is returned to the ReceiveCallback
178 ** function. It contains the list of packet buffers which have either been
179 ** filled with a packet or returned to host due to a LANReset function.
180 ** Currently there will only be one packet per receive bucket (buffer) posted.
181 **
182 ** 32 24 0
183 ** +-----------------------+ -\
184 ** | Buffer 1 Context | \
185 ** +-----------------------+ \
186 ** | 0xC0000000 | / First Bucket Descriptor
187 ** +-----+-----------------+ /
188 ** | 0 | packet 1 length | /
189 ** +-----------------------+ -\
190 ** | Buffer 2 Context | \
191 ** +-----------------------+ \
192 ** | 0xC0000000 | / Second Bucket Descriptor
193 ** +-----+-----------------+ /
194 ** | 0 | packet 2 length | /
195 ** +-----+-----------------+ -
196 ** | ... | ----- more bucket descriptors
197 ** +-----------------------+ -\
198 ** | Buffer n Context | \
199 ** +-----------------------+ \
200 ** | 0xC0000000 | / Last Bucket Descriptor
201 ** +-----+-----------------+ /
202 ** | 0 | packet n length | /
203 ** +-----+-----------------+ -
204 **
205 ** Buffer Context values are those given to adapter in the TCB on calls to
206 ** RCPostRecvBuffers().
207 **
208 */
209
210
211
212 /*
213 ** Transaction Control Block (TCB) structure
214 **
215 ** A structure like this is filled in by the user and passed by reference to
216 ** RCI2OSendPacket() and RCPostRecvBuffers() functions. Minimum size is five
217 ** 32-bit words for one buffer with one segment descriptor.
218 ** MAX_NMBR_POST_BUFFERS_PER_MSG defines the maximum single segment buffers
219 ** that can be described in a given TCB.
220 **
221 ** 32 0
222 ** +-----------------------+
223 ** | Buffer Count | Number of buffers in the TCB
224 ** +-----------------------+
225 ** | Buffer 1 Context | first buffer reference
226 ** +-----------------------+
227 ** | Buffer 1 Seg Count | number of segments in buffer
228 ** +-----------------------+
229 ** | Buffer 1 Seg Desc 1 | first segment descriptor (size, physical address)
230 ** +-----------------------+
231 ** | ... | more segment descriptors (size, physical address)
232 ** +-----------------------+
233 ** | Buffer 1 Seg Desc n | last segment descriptor (size, physical address)
234 ** +-----------------------+
235 ** | Buffer 2 Context | second buffer reference
236 ** +-----------------------+
237 ** | Buffer 2 Seg Count | number of segments in buffer
238 ** +-----------------------+
239 ** | Buffer 2 Seg Desc 1 | segment descriptor (size, physical address)
240 ** +-----------------------+
241 ** | ... | more segment descriptors (size, physical address)
242 ** +-----------------------+
243 ** | Buffer 2 Seg Desc n |
244 ** +-----------------------+
245 ** | ... | more buffer descriptor blocks ...
246 ** +-----------------------+
247 ** | Buffer n Context |
248 ** +-----------------------+
249 ** | Buffer n Seg Count |
250 ** +-----------------------+
251 ** | Buffer n Seg Desc 1 |
252 ** +-----------------------+
253 ** | ... |
254 ** +-----------------------+
255 ** | Buffer n Seg Desc n |
256 ** +-----------------------+
257 **
258 **
259 ** A TCB for one contigous packet buffer would look like the following:
260 **
261 ** 32 0
262 ** +-----------------------+
263 ** | 1 | one buffer in the TCB
264 ** +-----------------------+
265 ** | <user's Context> | user's buffer reference
266 ** +-----------------------+
267 ** | 1 | one segment buffer
268 ** +-----------------------+ _
269 ** | <buffer size> | size \
270 ** +-----------------------+ \ segment descriptor
271 ** | <physical address> | physical address of buffer /
272 ** +-----------------------+ _/
273 **
274 */
275
276 /* Buffer Segment Descriptor */
277 typedef struct
278 {
279 U32 size;
280 U32 phyAddress;
281 }
282 BSD, *PBSD;
283
284 typedef PU32 PRCTCB;
285 /*
286 ** -------------------------------------------------------------------------
287 ** Exported functions comprising the API to the LAN I2O message transport layer
288 ** -------------------------------------------------------------------------
289 */
290
291
292 /*
293 ** InitRCI2OMsgLayer()
294 **
295 ** Called once prior to using the I2O LAN message transport layer. User
296 ** provides both the physical and virual address of a locked page buffer
297 ** that is used as a private buffer for the RedCreek I2O message
298 ** transport layer. This buffer must be a contigous memory block of a
299 ** minimum of 16K bytes and long word aligned. The user also must provide
300 ** the base address of the RedCreek PCI adapter assigned by BIOS or operating
301 ** system. The user provided value AdapterID is a zero based index of the
302 ** Ravlin 45/PCI adapter. This interface number is used in all subsequent API
303 ** calls to identify which adpapter for which the function is intended.
304 ** Up to sixteen interfaces are supported with this API.
305 **
306 ** Inputs: AdapterID - interface number from 0 to 15
307 ** pciBaseAddr - virual base address of PCI (set by BIOS)
308 ** p_msgbuf - virual address to private message block (min. 16K)
309 ** p_phymsgbuf - physical address of private message block
310 ** TransmitCallbackFunction - address of user's TX callback function
311 ** ReceiveCallbackFunction - address of user's RX callback function
312 **
313 */
314 RC_RETURN RCInitI2OMsgLayer(U16 AdapterID, U32 pciBaseAddr,
315 PU8 p_msgbuf, PU8 p_phymsgbuf,
316 PFNTXCALLBACK TransmitCallbackFunction,
317 PFNRXCALLBACK ReceiveCallbackFunction,
318 PFNCALLBACK RebootCallbackFunction);
319
320 /*
321 ** RCSetRavlinIPandMask()
322 **
323 ** Set the Ravlin 45/PCI cards IP address and network mask.
324 **
325 ** IP address and mask must be in network byte order.
326 ** For example, IP address 1.2.3.4 and mask 255.255.255.0 would be
327 ** 0x04030201 and 0x00FFFFFF on a little endian machine.
328 **
329 */
330 RC_RETURN RCSetRavlinIPandMask(U16 AdapterID, U32 ipAddr, U32 netMask);
331
332
333 /*
334 ** =========================================================================
335 ** RCGetRavlinIPandMask()
336 **
337 ** get the IP address and MASK from the card
338 **
339 ** =========================================================================
340 */
341 RC_RETURN
342 RCGetRavlinIPandMask(U16 AdapterID, PU32 pIpAddr, PU32 pNetMask,
343 PFNWAITCALLBACK WaitCallback);
344
345 /*
346 ** RCProcI2OMsgQ()
347 **
348 ** Called from user's polling loop or Interrupt Service Routine for a PCI
349 ** interrupt from the RedCreek PCI adapter. User responsible for determining
350 ** and hooking the PCI interrupt. This function will call the registered
351 ** callback functions, TransmitCallbackFunction or ReceiveCallbackFunction,
352 ** if a TX or RX transaction has completed.
353 */
354 void RCProcI2OMsgQ(U16 AdapterID);
355
356
357 /*
358 ** Disable and Enable I2O interrupts. I2O interrupts are enabled at Init time
359 ** but can be disabled and re-enabled through these two function calls.
360 ** Packets will still be put into any posted recieved buffers and packets will
361 ** be sent through RCI2OSendPacket() functions. Disabling I2O interrupts
362 ** will prevent hardware interrupt to host even though the outbound I2O msg
363 ** queue is not emtpy.
364 */
365 RC_RETURN RCEnableI2OInterrupts(U16 adapterID);
366 RC_RETURN RCDisableI2OInterrupts(U16 AdapterID);
367
368
369 /*
370 ** RCPostRecvBuffers()
371 **
372 ** Post user's page locked buffers for use by the PCI adapter to
373 ** return ethernet packets received from the LAN. Transaction Control Block,
374 ** provided by user, contains buffer descriptor(s) which includes a buffer
375 ** context number along with buffer size and physical address. See TCB above.
376 ** The buffer context and actual packet length are returned to the
377 ** ReceiveCallbackFunction when packets have been received. Buffers posted
378 ** to the RedCreek adapter are considered owned by the adapter until the
379 ** context is return to user through the ReceiveCallbackFunction.
380 */
381 RC_RETURN RCPostRecvBuffers(U16 AdapterID, PRCTCB pTransactionCtrlBlock);
382 #define MAX_NMBR_POST_BUFFERS_PER_MSG 32
383
384 /*
385 ** RCI2OSendPacket()
386 **
387 ** Send user's ethernet packet from a locked page buffer.
388 ** Packet must have full MAC header, however without a CRC.
389 ** Initiator context is a user provided value that is returned
390 ** to the TransmitCallbackFunction when packet buffer is free.
391 ** Transmit buffer are considered owned by the adapter until context's
392 ** returned to user through the TransmitCallbackFunction.
393 */
394 RC_RETURN RCI2OSendPacket(U16 AdapterID,
395 U32 context,
396 PRCTCB pTransactionCtrlBlock);
397
398
399 /* Ethernet Link Statistics structure */
400 typedef struct tag_RC_link_stats
401 {
402 U32 TX_good; /* good transmit frames */
403 U32 TX_maxcol; /* frames not TX due to MAX collisions */
404 U32 TX_latecol; /* frames not TX due to late collisions */
405 U32 TX_urun; /* frames not TX due to DMA underrun */
406 U32 TX_crs; /* frames TX with lost carrier sense */
407 U32 TX_def; /* frames deferred due to activity on link */
408 U32 TX_singlecol; /* frames TX with one and only on collision */
409 U32 TX_multcol; /* frames TX with more than one collision */
410 U32 TX_totcol; /* total collisions detected during TX */
411 U32 Rcv_good; /* good frames received */
412 U32 Rcv_CRCerr; /* frames RX and discarded with CRC errors */
413 U32 Rcv_alignerr; /* frames RX with alignment and CRC errors */
414 U32 Rcv_reserr; /* good frames discarded due to no RX buffer */
415 U32 Rcv_orun; /* RX frames lost due to FIFO overrun */
416 U32 Rcv_cdt; /* RX frames with collision during RX */
417 U32 Rcv_runt; /* RX frames shorter than 64 bytes */
418 }
419 RCLINKSTATS, *P_RCLINKSTATS;
420
421 /*
422 ** RCGetLinkStatistics()
423 **
424 ** Returns link statistics in user's structure at address StatsReturnAddr
425 ** If given, not NULL, the function WaitCallback is called during the wait
426 ** loop while waiting for the adapter to respond.
427 */
428 RC_RETURN RCGetLinkStatistics(U16 AdapterID,
429 P_RCLINKSTATS StatsReturnAddr,
430 PFNWAITCALLBACK WaitCallback);
431
432 /*
433 ** RCGetLinkStatus()
434 **
435 ** Return link status, up or down, to user's location addressed by ReturnAddr.
436 ** If given, not NULL, the function WaitCallback is called during the wait
437 ** loop while waiting for the adapter to respond.
438 */
439 RC_RETURN RCGetLinkStatus(U16 AdapterID,
440 PU32 pReturnStatus,
441 PFNWAITCALLBACK WaitCallback);
442
443 /* Link Status defines - value returned in pReturnStatus */
444 #define RC_LAN_LINK_STATUS_DOWN 0
445 #define RC_LAN_LINK_STATUS_UP 1
446
447 /*
448 ** RCGetMAC()
449 **
450 ** Get the current MAC address assigned to user. RedCreek Ravlin 45/PCI
451 ** has two MAC addresses. One which is private to the PCI Card, and
452 ** another MAC which is given to the user as its link layer MAC address. The
453 ** adapter runs in promiscous mode because of the dual address requirement.
454 ** The MAC address is returned to the unsigned char array pointer to by mac.
455 */
456 RC_RETURN RCGetMAC(U16 AdapterID, PU8 mac, PFNWAITCALLBACK WaitCallback);
457
458 /*
459 ** RCSetMAC()
460 **
461 ** Set a new user port MAC address. This address will be returned on
462 ** subsequent RCGetMAC() calls.
463 */
464 RC_RETURN RCSetMAC(U16 AdapterID, PU8 mac);
465
466 /*
467 ** RCSetLinkSpeed()
468 **
469 ** set adapter's link speed based on given input code.
470 */
471 RC_RETURN RCSetLinkSpeed(U16 AdapterID, U16 LinkSpeedCode);
472 /* Set link speed codes */
473 #define LNK_SPD_AUTO_NEG_NWAY 0
474 #define LNK_SPD_100MB_FULL 1
475 #define LNK_SPD_100MB_HALF 2
476 #define LNK_SPD_10MB_FULL 3
477 #define LNK_SPD_10MB_HALF 4
478
479
480
481
482 /*
483 ** RCGetLinkSpeed()
484 **
485 ** Return link speed code.
486 */
487 /* Return link speed codes */
488 #define LNK_SPD_UNKNOWN 0
489 #define LNK_SPD_100MB_FULL 1
490 #define LNK_SPD_100MB_HALF 2
491 #define LNK_SPD_10MB_FULL 3
492 #define LNK_SPD_10MB_HALF 4
493
494 RC_RETURN
495 RCGetLinkSpeed(U16 AdapterID, PU32 pLinkSpeedCode, PFNWAITCALLBACK WaitCallback);
496 /*
497 ** =========================================================================
498 ** RCSetPromiscuousMode(U16 AdapterID, U16 Mode)
499 **
500 ** Defined values for Mode:
501 ** 0 - turn off promiscuous mode
502 ** 1 - turn on promiscuous mode
503 **
504 ** =========================================================================
505 */
506 #define PROMISCUOUS_MODE_OFF 0
507 #define PROMISCUOUS_MODE_ON 1
508 RC_RETURN
509 RCSetPromiscuousMode(U16 AdapterID, U16 Mode);
510 /*
511 ** =========================================================================
512 ** RCGetPromiscuousMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback)
513 **
514 ** get promiscuous mode setting
515 **
516 ** Possible return values placed in pMode:
517 ** 0 = promisuous mode not set
518 ** 1 = promisuous mode is set
519 **
520 ** =========================================================================
521 */
522 RC_RETURN
523 RCGetPromiscuousMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback);
524
525 /*
526 ** =========================================================================
527 ** RCSetBroadcastMode(U16 AdapterID, U16 Mode)
528 **
529 ** Defined values for Mode:
530 ** 0 - turn off promiscuous mode
531 ** 1 - turn on promiscuous mode
532 **
533 ** =========================================================================
534 */
535 #define BROADCAST_MODE_OFF 0
536 #define BROADCAST_MODE_ON 1
537 RC_RETURN
538 RCSetBroadcastMode(U16 AdapterID, U16 Mode);
539 /*
540 ** =========================================================================
541 ** RCGetBroadcastMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback)
542 **
543 ** get broadcast mode setting
544 **
545 ** Possible return values placed in pMode:
546 ** 0 = broadcast mode not set
547 ** 1 = broadcast mode is set
548 **
549 ** =========================================================================
550 */
551 RC_RETURN
552 RCGetBroadcastMode(U16 AdapterID, PU32 pMode, PFNWAITCALLBACK WaitCallback);
553 /*
554 ** =========================================================================
555 ** RCReportDriverCapability(U16 AdapterID, U32 capability)
556 **
557 ** Currently defined bits:
558 ** WARM_REBOOT_CAPABLE 0x01
559 **
560 ** =========================================================================
561 */
562 RC_RETURN
563 RCReportDriverCapability(U16 AdapterID, U32 capability);
564
565 /*
566 ** RCGetFirmwareVer()
567 **
568 ** Return firmware version in the form "SoftwareVersion : Bt BootVersion"
569 **
570 ** WARNING: user's space pointed to by pFirmString should be at least 60 bytes.
571 */
572 RC_RETURN
573 RCGetFirmwareVer(U16 AdapterID, PU8 pFirmString, PFNWAITCALLBACK WaitCallback);
574
575 /*
576 ** ----------------------------------------------
577 ** LAN adapter Reset and Shutdown functions
578 ** ----------------------------------------------
579 */
580 /* resource flag bit assignments for RCResetLANCard() & RCShutdownLANCard() */
581 #define RC_RESOURCE_RETURN_POSTED_RX_BUCKETS 0x0001
582 #define RC_RESOURCE_RETURN_PEND_TX_BUFFERS 0x0002
583
584 /*
585 ** RCResetLANCard()
586 **
587 ** Reset LAN card operation. Causes a software reset of the ethernet
588 ** controller and restarts the command and receive units. Depending on
589 ** the ResourceFlags given, the buffers are either returned to the
590 ** host with reply status of I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER and
591 ** detailed status of I2O_LAN_DSC_CANCELED (new receive buffers must be
592 ** posted after issuing this) OR the buffers are kept and reused by
593 ** the ethernet controller. If CallbackFunction is not NULL, the function
594 ** will be called when the reset is complete. If the CallbackFunction is
595 ** NULL,a 1 will be put into the ReturnAddr after waiting for the reset
596 ** to complete (please disable I2O interrupts during this method).
597 ** Any outstanding transmit or receive buffers that are complete will be
598 ** returned via the normal reply messages before the requested resource
599 ** buffers are returned.
600 ** A call to RCPostRecvBuffers() is needed to return the ethernet to full
601 ** operation if the receive buffers were returned during LANReset.
602 ** Note: The IOP status is not affected by a LAN reset.
603 */
604 RC_RETURN RCResetLANCard(U16 AdapterID, U16 ResourceFlags, PU32 ReturnAddr, PFNCALLBACK CallbackFunction);
605
606
607 /*
608 ** RCShutdownLANCard()
609 **
610 ** Shutdown LAN card operation and put into an idle (suspended) state.
611 ** The LAN card is restarted with RCResetLANCard() function.
612 ** Depending on the ResourceFlags given, the buffers are either returned
613 ** to the host with reply status of I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER
614 ** and detailed status of I2O_LAN_DSC_CANCELED (new receive buffers must be
615 ** posted after issuing this) OR the buffers are kept and reused by
616 ** the ethernet controller. If CallbackFunction is not NULL, the function
617 ** will be called when the reset is complete. If the CallbackFunction is
618 ** NULL,a 1 will be put into the ReturnAddr after waiting for the reset
619 ** to complete (please disable I2O interrupts during this method).
620 ** Any outstanding transmit or receive buffers that are complete will be
621 ** returned via the normal reply messages before the requested resource
622 ** buffers are returned.
623 ** Note: The IOP status is not affected by a LAN shutdown.
624 */
625 RC_RETURN
626 RCShutdownLANCard(U16 AdapterID, U16 ResourceFlags, PU32 ReturnAddr, PFNCALLBACK CallbackFunction);
627
628 /*
629 ** RCResetIOP();
630 ** Initializes IOPState to I2O_IOP_STATE_RESET.
631 ** Stops access to outbound message Q.
632 ** Discards any outstanding transmit or posted receive buffers.
633 ** Clears outbound message Q.
634 */
635 RC_RETURN
636 RCResetIOP(U16 AdapterID);
637
638 #endif /* RCLANMTL_H */
639
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.