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

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

Diff for /src/sys/dev/scsipi/scsiconf.c between version 1.207.2.7 and 1.207.2.8

version 1.207.2.7, 2005/03/04 16:50:33 version 1.207.2.8, 2005/11/10 14:07:47
Line 101  static int scsibusdetach(struct device *
Line 101  static int scsibusdetach(struct device *
 static int      scsibusrescan(struct device *, const char *, const int *);  static int      scsibusrescan(struct device *, const char *, const int *);
 static void     scsidevdetached(struct device *, struct device *);  static void     scsidevdetached(struct device *, struct device *);
   
 static int      scsibussubmatch(struct device *, struct cfdata *,  
                     const locdesc_t *, void *);  
   
 CFATTACH_DECL2(scsibus, sizeof(struct scsibus_softc),  CFATTACH_DECL2(scsibus, sizeof(struct scsibus_softc),
     scsibusmatch, scsibusattach, scsibusdetach, scsibusactivate,      scsibusmatch, scsibusattach, scsibusdetach, scsibusactivate,
     scsibusrescan, scsidevdetached);      scsibusrescan, scsidevdetached);
Line 243  scsibus_config(struct scsipi_channel *ch
Line 240  scsibus_config(struct scsipi_channel *ch
 }  }
   
 static int  static int
 scsibussubmatch(struct device *parent, struct cfdata *cf,  
         const locdesc_t *ldesc, void *aux)  
 {  
   
         if (cf->cf_loc[SCSIBUSCF_TARGET] != SCSIBUSCF_TARGET_DEFAULT &&  
             cf->cf_loc[SCSIBUSCF_TARGET] != ldesc->locs[0])  
                 return (0);  
         if (cf->cf_loc[SCSIBUSCF_LUN] != SCSIBUSCF_LUN_DEFAULT &&  
             cf->cf_loc[SCSIBUSCF_LUN] != ldesc->locs[1])  
                 return (0);  
         return (config_match(parent, cf, aux));  
 }  
   
 static int  
 scsibusactivate(struct device *self, enum devact act)  scsibusactivate(struct device *self, enum devact act)
 {  {
         struct scsibus_softc *sc = (void *) self;          struct scsibus_softc *sc = (void *) self;
Line 735  scsi_probe_device(struct scsibus_softc *
Line 718  scsi_probe_device(struct scsibus_softc *
         struct scsipi_channel *chan = sc->sc_channel;          struct scsipi_channel *chan = sc->sc_channel;
         struct scsipi_periph *periph;          struct scsipi_periph *periph;
         struct scsipi_inquiry_data inqbuf;          struct scsipi_inquiry_data inqbuf;
         struct scsi_quirk_inquiry_pattern *finger;          const struct scsi_quirk_inquiry_pattern *finger;
         int checkdtype, priority, docontinue, quirks;          int checkdtype, priority, docontinue, quirks;
         struct scsipibus_attach_args sa;          struct scsipibus_attach_args sa;
         struct cfdata *cf;          struct cfdata *cf;
         int help[3];          int locs[SCSIBUSCF_NLOCS];
         locdesc_t *locd = (void *)&help;  
         struct device *chld;          struct device *chld;
   
         /*          /*
Line 876  scsi_probe_device(struct scsibus_softc *
Line 858  scsi_probe_device(struct scsibus_softc *
         sa.scsipi_info.scsi_version = inqbuf.version;          sa.scsipi_info.scsi_version = inqbuf.version;
         sa.sa_inqptr = &inqbuf;          sa.sa_inqptr = &inqbuf;
   
         finger = (struct scsi_quirk_inquiry_pattern *)scsipi_inqmatch(          finger = scsipi_inqmatch(
             &sa.sa_inqbuf, (caddr_t)scsi_quirk_patterns,              &sa.sa_inqbuf, scsi_quirk_patterns,
             sizeof(scsi_quirk_patterns)/sizeof(scsi_quirk_patterns[0]),              sizeof(scsi_quirk_patterns)/sizeof(scsi_quirk_patterns[0]),
             sizeof(scsi_quirk_patterns[0]), &priority);              sizeof(scsi_quirk_patterns[0]), &priority);
   
Line 954  scsi_probe_device(struct scsibus_softc *
Line 936  scsi_probe_device(struct scsibus_softc *
         if ((periph->periph_quirks & PQUIRK_NOLUNS) == 0)          if ((periph->periph_quirks & PQUIRK_NOLUNS) == 0)
                 docontinue = 1;                  docontinue = 1;
   
         locd->len = 2;          locs[SCSIBUSCF_TARGET] = target;
         locd->locs[0] = target;          locs[SCSIBUSCF_LUN] = lun;
         locd->locs[1] = lun;  
   
         if ((cf = config_search_loc(scsibussubmatch, &sc->sc_dev,          if ((cf = config_search_loc(config_stdsubmatch, &sc->sc_dev,
              "scsibus", locd, &sa)) != NULL) {               "scsibus", locs, &sa)) != NULL) {
                 scsipi_insert_periph(chan, periph);                  scsipi_insert_periph(chan, periph);
                 /*                  /*
                  * XXX Can't assign periph_dev here, because we'll                   * XXX Can't assign periph_dev here, because we'll
                  * XXX need it before config_attach() returns.  Must                   * XXX need it before config_attach() returns.  Must
                  * XXX assign it in periph driver.                   * XXX assign it in periph driver.
                  */                   */
                 chld = config_attach_loc(&sc->sc_dev, cf, locd, &sa,                  chld = config_attach_loc(&sc->sc_dev, cf, locs, &sa,
                                          scsibusprint);                                           scsibusprint);
         } else {          } else {
                 scsibusprint(&sa, sc->sc_dev.dv_xname);                  scsibusprint(&sa, sc->sc_dev.dv_xname);

Legend:
Removed from v.1.207.2.7  
changed lines
  Added in v.1.207.2.8

CVSweb <webmaster@jp.NetBSD.org>