Lines Matching refs:fjp
358 struct fcu_obj *fjp; in fdc_bus_ctl() local
403 fjp = fcp->c_unit[FDUNIT(unit)]; in fdc_bus_ctl()
404 fjp->fj_unit = unit; in fdc_bus_ctl()
405 fjp->fj_dip = udip; in fdc_bus_ctl()
406 fjp->fj_ops = &fdc_iops; in fdc_bus_ctl()
407 fjp->fj_fdc = fcp; in fdc_bus_ctl()
408 fjp->fj_iblock = &fcp->c_iblock; in fdc_bus_ctl()
410 ddi_set_driver_private(udip, fjp); in fdc_bus_ctl()
420 fjp = ddi_get_driver_private(udip); in fdc_bus_ctl()
422 fjp->fj_dip = NULL; in fdc_bus_ctl()
493 struct fcu_obj *fjp; in fdc_attach() local
524 for (unit = 0, fjp = (struct fcu_obj *)(fcp+1); in fdc_attach()
526 fcp->c_unit[unit] = fjp++; in fdc_attach()
917 fdc_abort(struct fcu_obj *fjp) in fdc_abort() argument
919 struct fdcntlr *fcp = fjp->fj_fdc; in fdc_abort()
920 int unit = fjp->fj_unit & 3; in fdc_abort()
947 fdc_dkinfo(struct fcu_obj *fjp, struct dk_cinfo *dcp) in fdc_dkinfo() argument
949 struct fdcntlr *fcp = fjp->fj_fdc; in fdc_dkinfo()
959 (void) strncpy((char *)&dcp->dki_dname, ddi_driver_name(fjp->fj_dip), in fdc_dkinfo()
961 dcp->dki_slave = fjp->fj_unit & 3; in fdc_dkinfo()
970 fdc_select(struct fcu_obj *fjp, int funit, int on) in fdc_select() argument
972 struct fdcntlr *fcp = fjp->fj_fdc; in fdc_select()
981 if (fcp->c_curunit != unit || !(fjp->fj_flags & FUNIT_CHAROK)) { in fdc_select()
983 fjp->fj_flags |= FUNIT_CHAROK; in fdc_select()
985 fjp->fj_chars->fdc_transfer_rate, in fdc_select()
986 fjp->fj_drive->fdd_steprate, 40)) in fdc_select()
991 fjp->fj_chars->fdc_transfer_rate, in fdc_select()
992 fjp->fj_drive->fdd_steprate); in fdc_select()
1002 (void) fdc_motorsm(fjp, FMI_STARTCMD, in fdc_select()
1003 fjp->fj_drive->fdd_motoron); in fdc_select()
1007 if (fdcspdchange(fcp, fjp, fjp->fj_attr->fda_rotatespd)) { in fdc_select()
1009 (void) fdc_motorsm(fjp, FMI_RSTARTCMD, 5); in fdc_select()
1028 (void) fdc_motorsm(fjp, FMI_IDLECMD, in fdc_select()
1029 fjp->fj_drive->fdd_motoroff); in fdc_select()
1044 fdgetchng(struct fcu_obj *fjp, int funit) in fdgetchng() argument
1046 if (fdcsense_drv(fjp->fj_fdc, funit & 3)) in fdgetchng()
1048 return (fdcsense_chng(fjp->fj_fdc, funit & 3)); in fdgetchng()
1053 fdresetchng(struct fcu_obj *fjp, int funit) in fdresetchng() argument
1055 struct fdcntlr *fcp = fjp->fj_fdc; in fdresetchng()
1065 return (fdrecalseek(fjp, funit, newcyl, 0)); in fdresetchng()
1073 fdrecalseek(struct fcu_obj *fjp, int funit, int arg, int execflg) in fdrecalseek() argument
1075 struct fdcntlr *fcp = fjp->fj_fdc; in fdrecalseek()
1126 fdrw(struct fcu_obj *fjp, int funit, int rw, int cyl, int head, in fdrw() argument
1129 struct fdcntlr *fcp = fjp->fj_fdc; in fdrw()
1154 encode(sector_size, fjp->fj_chars->fdc_sec_size, in fdrw()
1156 csb->csb_cmd[6] = (uchar_t)max(fjp->fj_chars->fdc_secptrack, sector); in fdrw()
1157 csb->csb_cmd[7] = fjp->fj_attr->fda_gapl; in fdrw()
1246 fdtrkformat(struct fcu_obj *fjp, int funit, int cyl, int head, int filldata) in fdtrkformat() argument
1248 struct fdcntlr *fcp = fjp->fj_fdc; in fdtrkformat()
1268 encode(sector_size, fjp->fj_chars->fdc_sec_size, in fdtrkformat()
1270 csb->csb_cmd[3] = numsctr = fjp->fj_chars->fdc_secptrack; in fdtrkformat()
1271 csb->csb_cmd[4] = fjp->fj_attr->fda_gapf; in fdtrkformat()
1274 csb->csb_npcyl = (uchar_t)(cyl * fjp->fj_chars->fdc_steps); in fdtrkformat()
1315 interleave = fjp->fj_attr->fda_intrlv; in fdtrkformat()
1370 fdrawioctl(struct fcu_obj *fjp, int funit, caddr_t arg) in fdrawioctl() argument
1372 struct fdcntlr *fcp = fjp->fj_fdc; in fdrawioctl()
1413 fjp->fj_chars->fdc_steps; in fdrawioctl()
1626 struct fcu_obj *fjp = fcp->c_unit[unit]; in fdc_quiesce() local
1627 if (fjp->fj_flags & FUNIT_DRVATCH) { in fdc_quiesce()
1823 fdcspdchange(struct fdcntlr *fcp, struct fcu_obj *fjp, int rpm) in fdcspdchange() argument
1832 if (((fcp->c_flags & FCFLG_DSOUT) == 0 && rpm <= fjp->fj_rotspd) || in fdcspdchange()
1833 ((fcp->c_flags & FCFLG_DSOUT) && (fjp->fj_flags & FUNIT_3DMODE) && in fdcspdchange()
1834 rpm > fjp->fj_rotspd)) { in fdcspdchange()
1852 if (rpm > fjp->fj_rotspd) { in fdcspdchange()
1855 (fjp->fj_flags ^ FUNIT_3DMODE); in fdcspdchange()
1857 fjp->fj_flags |= FUNIT_3DMODE; in fdcspdchange()
1861 retcode = fjp->fj_flags & FUNIT_3DMODE; in fdcspdchange()
1862 fjp->fj_flags &= ~FUNIT_3DMODE; in fdcspdchange()
1884 if (rpm > fjp->fj_rotspd) { in fdcspdchange()
1888 (fjp->fj_flags ^ FUNIT_3DMODE); in fdcspdchange()
1890 fjp->fj_flags |= FUNIT_3DMODE; in fdcspdchange()
1895 retcode = fjp->fj_flags & FUNIT_3DMODE; in fdcspdchange()
1896 fjp->fj_flags &= ~FUNIT_3DMODE; in fdcspdchange()
1929 fdc_motorsm(struct fcu_obj *fjp, int input, int timeval) in fdc_motorsm() argument
1931 struct fdcntlr *fcp = fjp->fj_fdc; in fdc_motorsm()
1932 int unit = fjp->fj_unit & 3; in fdc_motorsm()
1950 fcp->c_motort[unit] = timeout(fdmotort, (void *)fjp, in fdc_motorsm()
1958 fjp->fj_flags &= ~FUNIT_3DMODE; in fdc_motorsm()
1986 fcp->c_motort[unit] = timeout(fdmotort, (void *)fjp, in fdc_motorsm()
2005 fcp->c_motort[unit] = timeout(fdmotort, (void *)fjp, in fdc_motorsm()
2012 fcp->c_motort[unit] = timeout(fdmotort, (void *)fjp, in fdc_motorsm()
2027 fcp->c_motort[unit] = timeout(fdmotort, (void *)fjp, in fdc_motorsm()
2045 (int)fjp->fj_unit, input, old_mstate)); in fdc_motorsm()
2049 (int)fjp->fj_unit, input, old_mstate); in fdc_motorsm()
2061 (int)fjp->fj_unit, input, old_mstate, in fdc_motorsm()
2073 struct fcu_obj *fjp = (struct fcu_obj *)arg; in fdmotort() local
2074 struct fdcntlr *fcp = fjp->fj_fdc; in fdmotort()
2076 int unit = fjp->fj_unit & 3; in fdmotort()
2081 mval = fdc_motorsm(fjp, FMI_TIMER, 0); in fdmotort()
2097 (int)fjp->fj_unit)); in fdmotort()
2157 struct fcu_obj *fjp; in fdc_exec() local
2168 fjp = fcp->c_unit[unit]; in fdc_exec()
2175 csb->csb_cmd[2] * fjp->fj_chars->fdc_steps; in fdc_exec()
2197 if (fcp->c_curunit != unit || !(fjp->fj_flags & FUNIT_CHAROK)) { in fdc_exec()
2199 fjp->fj_flags |= FUNIT_CHAROK; in fdc_exec()
2200 if (fjp->fj_chars->fdc_transfer_rate == 417) { in fdc_exec()
2203 fjp->fj_attr->fda_rotatespd = 360; in fdc_exec()
2205 if (fdcspecify(fcp, fjp->fj_chars->fdc_transfer_rate, in fdc_exec()
2206 fjp->fj_drive->fdd_steprate, 40)) in fdc_exec()
2211 fjp->fj_chars->fdc_transfer_rate, in fdc_exec()
2212 fjp->fj_drive->fdd_steprate); in fdc_exec()
2215 if (fdcspdchange(fcp, fjp, fjp->fj_attr->fda_rotatespd)) { in fdc_exec()
2217 (void) fdc_motorsm(fjp, FMI_RSTARTCMD, 5); in fdc_exec()
2250 (void) fdc_motorsm(fjp, FMI_RSTARTCMD, in fdc_exec()
2251 fjp->fj_drive->fdd_motoron); in fdc_exec()
2443 struct fcu_obj *fjp; in fdrecover() local
2453 fjp = fcp->c_unit[unit]; in fdrecover()
2519 if ((fjp->fj_flags & (FUNIT_UNLABELED | FUNIT_LABELOK)) && in fdrecover()
2825 struct fcu_obj *fjp; in fdc_statemach() local
2834 fjp = fcp->c_unit[unit]; in fdc_statemach()
2940 (int)csb->csb_cmd[2] < (fjp->fj_chars->fdc_ncyl - 1)) in fdc_statemach()
3005 (void) fdc_motorsm(fjp, FMI_DELAYCMD, in fdc_statemach()
3006 fjp->fj_drive->fdd_headsettle / 1000); in fdc_statemach()