Lines Matching refs:dev

67 static buf_t *pcata_lblk_alloc(dev_t dev);
178 "%c%d: %s block %ld mapped to %ld dev %lx\n",
261 dev_t dev,
280 if (pcata_getinfo(NULL, DDI_INFO_DEVT2INSTANCE, (void *)dev,
382 status = pcata_lbl_ioctl(dev, cmd, arg, flag);
407 info->dki_partition = LPART(dev);
557 status = physio(pcata_strategy, bp, dev, rw, pcata_min, &auio);
584 pcata_lbl_ioctl(dev_t dev, int cmd, intptr_t arg, int flag)
593 if (pcata_getinfo(NULL, DDI_INFO_DEVT2INSTANCE, (void *)dev,
614 if (pcata_update_vtoc(softp, dev))
755 if (pcata_write_dskvtoc(softp, dev, &unitp->lbl, &vtoc))
765 if (pcata_write_dskvtoc(softp, dev, &unitp->lbl, &vtoc))
775 if (pcata_write_dskvtoc(softp, dev, &unitp->lbl, &vtoc))
788 register dev_t dev = *dev_p;
796 "dev_p=%p dev=%x flag=%x otyp=%x cred_p=%p\n",
797 (void *)dev_p, (int)dev, flag, otyp, (void *)cred_p);
820 LPART(dev), softp->blk_open, softp->chr_open,
821 softp->lyr_open[LPART(dev)]);
831 if ((softp->chr_open & (1 << LPART(dev))) ||
832 (softp->blk_open & (1 << LPART(dev))) ||
833 (softp->lyr_open[LPART(dev)])) {
841 softp->blk_open |= (1 << LPART(dev));
844 softp->chr_open |= (1 << LPART(dev));
847 softp->lyr_open[LPART(dev)]++;
863 pcata_close(dev_t dev, int flag, int otyp, cred_t *cred_p)
872 cmn_err(CE_CONT, "_close: dev=%x flag=%x otyp=%x cred_p=%p\n",
873 (int)dev, flag, otyp, (void *)cred_p);
876 if (pcata_getinfo(NULL, DDI_INFO_DEVT2INSTANCE, (void *) dev,
886 LPART(dev), softp->blk_open, softp->chr_open,
887 softp->lyr_open[LPART(dev)]);
895 softp->blk_open &= ~(1 << LPART(dev));
898 softp->chr_open &= ~(1 << LPART(dev));
901 softp->lyr_open[LPART(dev)]--;
913 for (i = 0; i < LPART(dev); i++) {
914 if (softp->lyr_open[LPART(dev)] != 0)
940 dev_t dev;
948 dev = makedevice(getmajor(fdiskbp->b_edev),
951 if ((bp = pcata_lblk_alloc(dev)) == NULL)
976 pcata_update_vtoc(ata_soft_t *softp, dev_t dev)
987 dev = makedevice(getmajor(dev),
990 if ((bp = pcata_lblk_alloc(dev)) == NULL)
994 * The dev is passed here for use later by the dsklbl_rdvtoc()
1010 pcata_lblk_alloc(dev_t dev)
1028 bp->b_edev = dev;
1029 bp->b_dev = cmpdev(dev);
1040 pcata_write_dskvtoc(ata_soft_t *softp, dev_t dev, dsk_label_t *lblp,
1046 dev = makedevice(getmajor(dev),
1049 if ((bp = pcata_lblk_alloc(dev)) == NULL)
1053 cmn_err(CE_CONT, "_write_dskvtoc: edev = %lx dev = %x\n",
1059 bp->b_edev = dev; /* used by probe_for_card() */
1179 pcata_prop_op(dev_t dev, dev_info_t *dip, ddi_prop_op_t prop_op,
1194 if ((dev == DDI_DEV_T_ANY) || (softp == NULL) ||
1197 return (ddi_prop_op(dev, dip, prop_op, mod_flags,
1201 nblocks64 = (ulong_t)unitp->lbl.pmap[LPART(dev)].p_size;
1203 return (ddi_prop_op_nblocks(dev, dip, prop_op, mod_flags,