[BACK]Return to if_ne_pcmcia.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / pcmcia

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/pcmcia/if_ne_pcmcia.c between version 1.63 and 1.64

version 1.63, 2000/10/17 01:50:40 version 1.64, 2000/11/02 07:04:46
Line 624  again:
Line 624  again:
         }          }
   
         if ((ne_dev->flags & NE2000DVF_AX88190) != 0) {          if ((ne_dev->flags & NE2000DVF_AX88190) != 0) {
                 if (ne_pcmcia_ax88190_set_iobase(psc))                  if (ne_pcmcia_ax88190_set_iobase(psc)) {
                         goto fail_5;                          ++i;
                           goto again;
                   }
                 nsc->sc_type = NE2000_TYPE_AX88190;                  nsc->sc_type = NE2000_TYPE_AX88190;
                 typestr = " (AX88190)";                  typestr = " (AX88190)";
         }          }
Line 829  ne_pcmcia_ax88190_set_iobase(psc)
Line 831  ne_pcmcia_ax88190_set_iobase(psc)
         struct pcmcia_mem_handle pcmh;          struct pcmcia_mem_handle pcmh;
         bus_addr_t offset;          bus_addr_t offset;
         int rv = 1, mwindow;          int rv = 1, mwindow;
           u_int last_liobase, new_liobase;
   
         if (pcmcia_mem_alloc(psc->sc_pf, NE2000_AX88190_LAN_IOSIZE, &pcmh)) {          if (pcmcia_mem_alloc(psc->sc_pf, NE2000_AX88190_LAN_IOSIZE, &pcmh)) {
   #if 0
                 printf("%s: can't alloc mem for LAN iobase\n",                  printf("%s: can't alloc mem for LAN iobase\n",
                     dsc->sc_dev.dv_xname);                      dsc->sc_dev.dv_xname);
   #endif
                 goto fail_1;                  goto fail_1;
         }          }
         if (pcmcia_mem_map(psc->sc_pf, PCMCIA_MEM_ATTR,          if (pcmcia_mem_map(psc->sc_pf, PCMCIA_MEM_ATTR,
Line 843  ne_pcmcia_ax88190_set_iobase(psc)
Line 848  ne_pcmcia_ax88190_set_iobase(psc)
                 goto fail_2;                  goto fail_2;
         }          }
   
           last_liobase = bus_space_read_1(pcmh.memt, pcmh.memh, offset + 0) |
               (bus_space_read_1(pcmh.memt, pcmh.memh, offset + 2) << 8);
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
         printf("%s: LAN iobase 0x%x (0x%x) ->", dsc->sc_dev.dv_xname,          printf("%s: LAN iobase 0x%x (0x%x) ->", dsc->sc_dev.dv_xname,
             bus_space_read_1(pcmh.memt, pcmh.memh, offset + 0) |              last_liobase, (u_int)psc->sc_pcioh.addr);
             bus_space_read_1(pcmh.memt, pcmh.memh, offset + 2) << 8,  
             (u_int)psc->sc_pcioh.addr);  
 #endif  #endif
         bus_space_write_1(pcmh.memt, pcmh.memh, offset,          bus_space_write_1(pcmh.memt, pcmh.memh, offset,
             psc->sc_pcioh.addr & 0xff);              psc->sc_pcioh.addr & 0xff);
         bus_space_write_1(pcmh.memt, pcmh.memh, offset + 2,          bus_space_write_1(pcmh.memt, pcmh.memh, offset + 2,
             psc->sc_pcioh.addr >> 8);              psc->sc_pcioh.addr >> 8);
   
           new_liobase = bus_space_read_1(pcmh.memt, pcmh.memh, offset + 0) |
               (bus_space_read_1(pcmh.memt, pcmh.memh, offset + 2) << 8);
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
         printf(" 0x%x\n", bus_space_read_1(pcmh.memt, pcmh.memh, offset + 0) |          printf(" 0x%x\n", new_liobase);
             bus_space_read_1(pcmh.memt, pcmh.memh, offset + 2) << 8);  
 #endif  #endif
         rv = 0;          if ((last_liobase == psc->sc_pcioh.addr)
               || (last_liobase != new_liobase))
                   rv = 0;
   
         pcmcia_mem_unmap(psc->sc_pf, mwindow);          pcmcia_mem_unmap(psc->sc_pf, mwindow);
  fail_2:   fail_2:

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

CVSweb <webmaster@jp.NetBSD.org>