Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/netif/dp8390/ne2000.c

    r7922dea re0854e3  
    8181static int test_16(dpeth_t *dep, int pos, uint8_t *pat);
    8282
     83/** Stops the NE2000 network interface.
     84 *  @param[in,out] dep The network interface structure.
     85 */
     86static void ne_stop(dpeth_t *dep);
     87
     88/** Initializes the NE2000 network interface.
     89 *  @param[in,out] dep The network interface structure.
     90 */
     91void ne_init(struct dpeth *dep);
     92
    8393int ne_probe(dpeth_t *dep)
    8494{
     
    126136               
    127137                if (dep->de_16bit) {
    128                         loc1 = NE2000_START;
    129                         loc2 = NE2000_START + NE2000_SIZE - 4;
    130                         f = test_16;
     138                        loc1= NE2000_START;
     139                        loc2= NE2000_START + NE2000_SIZE - 4;
     140                        f= test_16;
    131141                } else {
    132                         loc1 = NE1000_START;
    133                         loc2 = NE1000_START + NE1000_SIZE - 4;
    134                         f = test_8;
     142                        loc1= NE1000_START;
     143                        loc2= NE1000_START + NE1000_SIZE - 4;
     144                        f= test_8;
    135145                }
    136146               
     
    139149                    f(dep, loc2, pat0) && f(dep, loc2, pat1) &&
    140150                    f(dep, loc2, pat2) && f(dep, loc2, pat3)) {
     151                        dep->de_initf = ne_init;
     152                        dep->de_stopf = ne_stop;
    141153                        return 1;
    142154                }
     
    146158}
    147159
    148 /** Initializes the NE2000 network interface.
    149  *
    150  *  @param[in,out] dep The network interface structure.
    151  *
    152  */
    153160void ne_init(dpeth_t *dep)
    154161{
     
    199206        dep->de_stoppage = dep->de_offset_page + dep->de_ramsize / DP_PAGESIZE;
    200207       
    201         printf("Novell NE%d000 ethernet card at I/O address "
     208        printf("%s: Novell NE%d000 ethernet card at I/O address "
    202209            "%#lx, memory size %#lx, irq %d\n",
    203             dep->de_16bit ? 2 : 1, dep->de_base_port, dep->de_ramsize,
    204             dep->de_irq);
     210            dep->de_name, dep->de_16bit ? 2 : 1,
     211            dep->de_base_port, dep->de_ramsize, dep->de_irq);
    205212}
    206213
     
    228235       
    229236        if (i == N) {
    230                 printf("NE1000 remote DMA test failed\n");
     237                printf("%s: NE1000 remote DMA test failed\n", dep->de_name);
    231238                return 0;
    232239        }
     
    267274       
    268275        if (i == N) {
    269                 printf("NE2000 remote DMA test failed\n");
     276                printf("%s: NE2000 remote DMA test failed\n", dep->de_name);
    270277                return 0;
    271278        }
     
    283290}
    284291
    285 /** Stop the NE2000 network interface.
    286  *
    287  *  @param[in,out] dep The network interface structure.
    288  *
    289  */
    290 void ne_stop(dpeth_t *dep)
     292static void ne_stop(dpeth_t *dep)
    291293{
    292294        /* Reset the ethernet card */
Note: See TracChangeset for help on using the changeset viewer.