[BACK]Return to if_ef.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_ef.c between version 1.30 and 1.31

version 1.30, 2009/05/12 09:10:15 version 1.31, 2011/06/03 16:28:40
Line 472  ef_match(device_t parent, cfdata_t cf, v
Line 472  ef_match(device_t parent, cfdata_t cf, v
 void  void
 ef_attach(device_t parent, device_t self, void *aux)  ef_attach(device_t parent, device_t self, void *aux)
 {  {
         struct ef_softc *esc = (void *)self;          struct ef_softc *esc = device_private(self);
         struct ie_softc *sc = &esc->sc_ie;          struct ie_softc *sc = &esc->sc_ie;
         struct isa_attach_args *ia = aux;          struct isa_attach_args *ia = aux;
         bus_space_tag_t iot = ia->ia_iot;          bus_space_tag_t iot = ia->ia_iot;
Line 484  ef_attach(device_t parent, device_t self
Line 484  ef_attach(device_t parent, device_t self
         bus_space_handle_t ioh, memh;          bus_space_handle_t ioh, memh;
         u_int8_t ethaddr[ETHER_ADDR_LEN];          u_int8_t ethaddr[ETHER_ADDR_LEN];
   
           sc->sc_dev = self;
         sc->hwinit = ef_hwinit;          sc->hwinit = ef_hwinit;
         sc->hwreset = ef_reset;          sc->hwreset = ef_reset;
         sc->chan_attn = ef_atten;          sc->chan_attn = ef_atten;
Line 518  ef_attach(device_t parent, device_t self
Line 519  ef_attach(device_t parent, device_t self
         }          }
   
         if (bus == NULL)          if (bus == NULL)
                 panic("%s: Can't find parent bus!", device_xname(&sc->sc_dev));                  panic("%s: Can't find parent bus!", device_xname(self));
   
   
         /* If the bus hasn't been transitioned to the RUN state, do so now */          /* If the bus hasn't been transitioned to the RUN state, do so now */
         if (bus->bus_state == 1) {          if (bus->bus_state == 1) {
                 if (bus_space_map(iot, ELINK_ID_PORT, 1, 0, &ioh) != 0) {                  if (bus_space_map(iot, ELINK_ID_PORT, 1, 0, &ioh) != 0) {
                         DPRINTF(("\n%s: Can't map Elink ID port!\n",                          DPRINTF(("\n%s: Can't map Elink ID port!\n",
                                 device_xname(&sc->sc_dev)));                                  device_xname(self)));
                         return;                          return;
                 }                  }
   
Line 542  ef_attach(device_t parent, device_t self
Line 543  ef_attach(device_t parent, device_t self
                           ia->ia_io[0].ir_size, 0, &ioh) != 0) {                            ia->ia_io[0].ir_size, 0, &ioh) != 0) {
   
                 DPRINTF(("\n%s: can't map i/o space 0x%x-0x%x\n",                  DPRINTF(("\n%s: can't map i/o space 0x%x-0x%x\n",
                           device_xname(&sc->sc_dev), ia->ia_io[0].ir_addr,                            device_xname(self), ia->ia_io[0].ir_addr,
                           ia->ia_io[0].ir_addr + ia->ia_io[0].ir_size - 1));                            ia->ia_io[0].ir_addr + ia->ia_io[0].ir_size - 1));
                 return;                  return;
         }          }
Line 554  ef_attach(device_t parent, device_t self
Line 555  ef_attach(device_t parent, device_t self
                           ia->ia_iomem[0].ir_size, 0, &memh) != 0) {                            ia->ia_iomem[0].ir_size, 0, &memh) != 0) {
   
                 DPRINTF(("\n%s: can't map iomem space 0x%x-0x%x\n",                  DPRINTF(("\n%s: can't map iomem space 0x%x-0x%x\n",
                         device_xname(&sc->sc_dev), ia->ia_maddr,                          device_xname(self), ia->ia_maddr,
                         ia->ia_maddr + ia->ia_msize - 1));                          ia->ia_maddr + ia->ia_msize - 1));
                 bus_space_unmap(ia->ia_iot, ioh, ia->ia_io[0].ir_size);                  bus_space_unmap(ia->ia_iot, ioh, ia->ia_io[0].ir_size);
                 return;                  return;
Line 592  ef_attach(device_t parent, device_t self
Line 593  ef_attach(device_t parent, device_t self
                           BUS_SPACE_BARRIER_WRITE);                            BUS_SPACE_BARRIER_WRITE);
         if (!i82586_proberam(sc)) {          if (!i82586_proberam(sc)) {
                 DPRINTF(("\n%s: can't talk to i82586!\n",                  DPRINTF(("\n%s: can't talk to i82586!\n",
                         device_xname(&sc->sc_dev)));                          device_xname(self)));
                 bus_space_unmap(ia->ia_iot, ioh, ia->ia_io[0].ir_size);                  bus_space_unmap(ia->ia_iot, ioh, ia->ia_io[0].ir_size);
                 bus_space_unmap(ia->ia_memt, memh, ia->ia_iomem[0].ir_size);                  bus_space_unmap(ia->ia_memt, memh, ia->ia_iomem[0].ir_size);
                 return;                  return;
Line 644  ef_attach(device_t parent, device_t self
Line 645  ef_attach(device_t parent, device_t self
             IST_EDGE, IPL_NET, i82586_intr, sc);              IST_EDGE, IPL_NET, i82586_intr, sc);
         if (esc->sc_ih == NULL) {          if (esc->sc_ih == NULL) {
                 DPRINTF(("\n%s: can't establish interrupt\n",                  DPRINTF(("\n%s: can't establish interrupt\n",
                         device_xname(&sc->sc_dev)));                          device_xname(self)));
         }          }
 }  }
   
Line 669  ef_port_check(bus_space_tag_t iot, bus_s
Line 670  ef_port_check(bus_space_tag_t iot, bus_s
         return 1;          return 1;
 }  }
   
 CFATTACH_DECL(ef, sizeof(struct ef_softc),  CFATTACH_DECL_NEW(ef, sizeof(struct ef_softc),
     ef_match, ef_attach, NULL, NULL);      ef_match, ef_attach, NULL, NULL);
   

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

CVSweb <webmaster@jp.NetBSD.org>