/* * vpo_probe() */ static int vpo_probe(device_t dev) { device_t ppbus = device_get_parent(dev); struct vpo_data *vpo; int error; vpo = DEVTOSOFTC(dev); vpo->vpo_dev = dev; /* check ZIP before ZIP+ or imm_probe() will send controls to * the printer or whatelse connected to the port */ ppb_lock(ppbus); if ((error = vpoio_probe(dev, &vpo->vpo_io)) == 0) { vpo->vpo_isplus = 0; device_set_desc(dev, "Iomega VPI0 Parallel to SCSI interface"); } else if ((error = imm_probe(dev, &vpo->vpo_io)) == 0) { vpo->vpo_isplus = 1; device_set_desc(dev, "Iomega Matchmaker Parallel to SCSI interface"); } else { ppb_unlock(ppbus); return (error); } ppb_unlock(ppbus); return (0); }
/* * vpo_probe() */ static int vpo_probe(device_t dev) { struct vpo_data *vpo; int error; vpo = DEVTOSOFTC(dev); bzero(vpo, sizeof(struct vpo_data)); /* vpo dependent initialisation */ vpo->vpo_unit = device_get_unit(dev); /* low level probe */ vpoio_set_unit(&vpo->vpo_io, vpo->vpo_unit); /* check ZIP before ZIP+ or imm_probe() will send controls to * the printer or whatelse connected to the port */ if ((error = vpoio_probe(dev, &vpo->vpo_io)) == 0) { vpo->vpo_isplus = 0; device_set_desc(dev, "Iomega VPI0 Parallel to SCSI interface"); } else if ((error = imm_probe(dev, &vpo->vpo_io)) == 0) { vpo->vpo_isplus = 1; device_set_desc(dev, "Iomega Matchmaker Parallel to SCSI interface"); } else { return (error); } return (0); }