Lines Matching full:psc

67     struct pst_softc		*psc;		/* pointer to softc */
90 struct pst_softc *psc;
95 if (!(psc = malloc(sizeof(struct pst_softc),
100 psc->iop = sc;
101 psc->lct = lct;
102 device_set_softc(child, psc);
116 struct pst_softc *psc = device_get_softc(dev);
122 if (!(reply = iop_get_util_params(psc->iop, psc->lct->local_tid,
127 if (!(psc->info = (struct i2o_bsa_device *)
132 bcopy(reply->result, psc->info, sizeof(struct i2o_bsa_device));
135 if (!(reply = iop_get_util_params(psc->iop, psc->lct->local_tid,
146 psc->info->capacity, psc->info->block_size);
153 bioq_init(&psc->queue);
155 psc->disk = disk_alloc();
156 psc->disk->d_name = "pst";
157 psc->disk->d_strategy = pststrategy;
158 psc->disk->d_maxsize = 64 * 1024; /*I2O_SGL_MAX_SEGS * PAGE_SIZE;*/
159 psc->disk->d_drv1 = psc;
160 psc->disk->d_unit = lun;
162 psc->disk->d_sectorsize = psc->info->block_size;
163 psc->disk->d_mediasize = psc->info->capacity;
164 psc->disk->d_fwsectors = 63;
165 psc->disk->d_fwheads = 255;
167 disk_create(psc->disk, DISK_VERSION);
170 (unsigned long long)psc->info->capacity / (1024 * 1024),
171 name, psc->info->capacity/(512*255*63), 255, 63,
172 device_get_nameunit(psc->iop->dev));
182 struct pst_softc *psc = device_get_softc(dev);
188 psc->iop->reg->oqueue_intr_mask = 0xffffffff;
191 mfa = iop_get_mfa(psc->iop);
192 msg = (struct i2o_bsa_cache_flush_message *)(psc->iop->ibase + mfa);
197 msg->target_address = psc->lct->local_tid;
201 if (iop_queue_wait_msg(psc->iop, mfa, (struct i2o_basic_message *)msg))
208 struct pst_softc *psc = bp->bio_disk->d_drv1;
210 mtx_lock(&psc->iop->mtx);
211 bioq_disksort(&psc->queue, bp);
212 pst_start(psc);
213 mtx_unlock(&psc->iop->mtx);
217 pst_start(struct pst_softc *psc)
224 if (psc->iop->outstanding < (I2O_IOP_OUTBOUND_FRAME_COUNT - 1) &&
225 (bp = bioq_first(&psc->queue))) {
226 if ((mfa = iop_get_mfa(psc->iop)) != 0xffffffff) {
227 bioq_remove(&psc->queue, bp);
232 iop_free_mfa(psc->iop, mfa);
235 callout_init_mtx(&request->timeout, &psc->iop->mtx, 0);
236 psc->iop->outstanding++;
237 request->psc = psc;
242 iop_free_mfa(request->psc->iop, request->mfa);
243 psc->iop->outstanding--;
255 struct pst_softc *psc = request->psc;
261 psc->iop->reg->oqueue = mfa;
262 psc->iop->outstanding--;
263 pst_start(psc);
273 (request->psc->iop->ibase + request->mfa);
278 msg->target_address = request->psc->lct->local_tid;
307 request->psc->iop->reg->iqueue = request->mfa;
323 mtx_assert(&request->psc->iop->mtx, MA_OWNED);
324 iop_free_mfa(request->psc->iop, request->mfa);
325 if ((request->mfa = iop_get_mfa(request->psc->iop)) == 0xffffffff) {
328 request->psc->iop->outstanding--;
332 iop_free_mfa(request->psc->iop, request->mfa);
334 request->psc->iop->outstanding--;