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

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

Diff for /src/sys/dev/isa/if_lc_isa.c between version 1.9.26.3 and 1.9.26.4

version 1.9.26.3, 2001/11/14 19:14:49 version 1.9.26.4, 2002/01/11 23:39:08
Line 81  lemac_isa_find(sc, ia, attach)
Line 81  lemac_isa_find(sc, ia, attach)
         bus_addr_t msize;          bus_addr_t msize;
         int rv = 0, irq;          int rv = 0, irq;
   
           if (ia->ia_nio < 1)
                   return (0);
           if (ia->ia_niomem < 1)
                   return (0);
           if (ia->ia_nirq < 1)
                   return (0);
   
           if (ISA_DIRECT_CONFIG(ia))
                   return (0);
   
         /*          /*
          * Disallow wildcarded i/o addresses.           * Disallow wildcarded i/o addresses.
          */           */
         if (ia->ia_iobase == IOBASEUNK)          if (ia->ia_io[0].ir_addr == ISACF_PORT_DEFAULT)
                 return 0;                  return 0;
   
         /*          /*
          * Make sure this is a valid LEMAC address.           * Make sure this is a valid LEMAC address.
          */           */
         if (ia->ia_iobase & (LEMAC_IOSIZE - 1))          if (ia->ia_io[0].ir_addr & (LEMAC_IOSIZE - 1))
                 return 0;                  return 0;
   
         sc->sc_iot = ia->ia_iot;          sc->sc_iot = ia->ia_iot;
   
         /*          if (bus_space_map(sc->sc_iot, ia->ia_io[0].ir_addr, LEMAC_IOSIZE, 0,
          * Map the LEMAC's port space for the probe sequence.  
          */  
         ia->ia_iosize = LEMAC_IOSIZE;  
   
         if (bus_space_map(sc->sc_iot, ia->ia_iobase, ia->ia_iosize, 0,  
             &sc->sc_ioh)) {              &sc->sc_ioh)) {
                 if (attach)                  if (attach)
                         printf(": can't map i/o space\n");                          printf(": can't map i/o space\n");
Line 120  lemac_isa_find(sc, ia, attach)
Line 125  lemac_isa_find(sc, ia, attach)
          */           */
         lemac_info_get(sc->sc_iot, sc->sc_ioh, &maddr, &msize, &irq);          lemac_info_get(sc->sc_iot, sc->sc_ioh, &maddr, &msize, &irq);
   
         if (ia->ia_maddr != maddr && ia->ia_maddr != MADDRUNK)          if (ia->ia_iomem[0].ir_addr != ISACF_IOMEM_DEFAULT &&
               ia->ia_iomem[0].ir_addr != maddr)
                 goto outio;                  goto outio;
   
         sc->sc_memt = ia->ia_memt;          sc->sc_memt = ia->ia_memt;
Line 134  lemac_isa_find(sc, ia, attach)
Line 140  lemac_isa_find(sc, ia, attach)
         /*          /*
          * Double-check IRQ configuration.           * Double-check IRQ configuration.
          */           */
         if (ia->ia_irq != irq && ia->ia_irq != IRQUNK)          if (ia->ia_irq[0].ir_irq != ISACF_IRQ_DEFAULT &&
               ia->ia_irq[0].ir_irq != irq)
                 printf("%s: overriding IRQ %d to %d\n", sc->sc_dv.dv_xname,                  printf("%s: overriding IRQ %d to %d\n", sc->sc_dv.dv_xname,
                        ia->ia_irq, irq);                         ia->ia_irq[0].ir_irq, irq);
   
         if (attach) {          if (attach) {
                 sc->sc_ats = shutdownhook_establish(lemac_shutdown, sc);                  sc->sc_ats = shutdownhook_establish(lemac_shutdown, sc);
Line 155  lemac_isa_find(sc, ia, attach)
Line 162  lemac_isa_find(sc, ia, attach)
          */           */
         rv = 1;          rv = 1;
   
         ia->ia_maddr = maddr;          ia->ia_nio = 1;
         ia->ia_msize = msize;          ia->ia_io[0].ir_size = LEMAC_IOSIZE;
         ia->ia_irq = irq;  
           ia->ia_niomem = 1;
           ia->ia_iomem[0].ir_addr = maddr;
           ia->ia_iomem[0].ir_size = msize;
   
           ia->ia_nirq = 1;
           ia->ia_irq[0].ir_irq = irq;
   
           ia->ia_ndrq = 0;
   
         if (rv == 0 || !attach)          if (rv == 0 || !attach)
                 bus_space_unmap(sc->sc_memt, sc->sc_memh, msize);                  bus_space_unmap(sc->sc_memt, sc->sc_memh, msize);

Legend:
Removed from v.1.9.26.3  
changed lines
  Added in v.1.9.26.4

CVSweb <webmaster@jp.NetBSD.org>