Lines Matching defs:pendp
274 struct sfas_pending *pendp;
292 pendp = dev->sc_xs_free.tqh_first;
293 if (pendp == NULL) {
299 TAILQ_REMOVE(&dev->sc_xs_free, pendp, link);
300 pendp->xs = xs;
308 TAILQ_INSERT_TAIL(&dev->sc_xs_pending, pendp, link);
311 sfas_donextcmd(dev, pendp);
326 sfas_donextcmd(struct sfas_softc *dev, struct sfas_pending *pendp)
337 if (pendp->xs->xs_control & XS_CTL_RESET) {
341 while(!sfasselect(dev, pendp, 0, 0, 0, 0, SFAS_SELECT_K)) {
367 if (pendp->xs->xs_control & XS_CTL_POLL) {
369 sfasicmd(dev, pendp);
370 TAILQ_INSERT_TAIL(&dev->sc_xs_free, pendp, link);
373 sfasgo(dev, pendp);
380 struct sfas_pending *pendp;
405 pendp = dev->sc_xs_pending.tqh_first;
406 while(pendp) {
407 if (!(dev->sc_nexus[pendp->xs->xs_periph->periph_target].flags &
410 pendp = pendp->link.tqe_next;
413 if (pendp != NULL) {
414 TAILQ_REMOVE(&dev->sc_xs_pending, pendp, link);
420 if (pendp)
421 sfas_donextcmd(dev, pendp);
724 sfas_setup_nexus(struct sfas_softc *dev, struct nexus *nexus, struct sfas_pending *pendp, unsigned char *cbuf, int clen, unsigned char *buf, int len, int mode)
728 target = pendp->xs->xs_periph->periph_target;
729 lun = pendp->xs->xs_periph->periph_lun;
744 nexus->xs = pendp->xs;
825 sfasselect(struct sfas_softc *dev, struct sfas_pending *pendp, unsigned char *cbuf, int clen, unsigned char *buf, int len, int mode)
830 nexus = sfas_arbitate_target(dev, pendp->xs->xs_periph->periph_target);
835 sfas_setup_nexus(dev, nexus, pendp, cbuf, clen, buf, len, mode);
838 sfas_select_unit(dev, pendp->xs->xs_periph->periph_target);
844 sfasgo(struct sfas_softc *dev, struct sfas_pending *pendp)
849 buf = pendp->xs->data;
851 if (sfasselect(dev, pendp, (char *)pendp->xs->cmd, pendp->xs->cmdlen,
852 buf, pendp->xs->datalen, SFAS_SELECT_RS)) {
859 TAILQ_INSERT_TAIL(&dev->sc_xs_free, pendp, link);
869 TAILQ_INSERT_HEAD(&dev->sc_xs_pending, pendp, link);
1545 sfasicmd(struct sfas_softc *dev, struct sfas_pending *pendp)
1549 nexus = &dev->sc_nexus[pendp->xs->xs_periph->periph_target];
1551 if (!sfasselect(dev, pendp, (char *)pendp->xs->cmd, pendp->xs->cmdlen,
1552 (char *)pendp->xs->data, pendp->xs->datalen,