Lines Matching defs:rdev
161 idtg3_em_init(struct rio_dev *rdev)
166 pr_debug("RIO: %s [%d:%d]\n", __func__, rdev->destid, rdev->hopcount);
169 rio_write_config_32(rdev, RIO_EM_DEV_INT_EN, 0);
172 rio_write_config_32(rdev, rdev->em_efptr + RIO_EM_PW_TX_CTRL,
176 tmp = RIO_GET_TOTAL_PORTS(rdev->swpinfo);
179 rio_read_config_32(rdev,
180 RIO_DEV_PORT_N_ERR_STS_CSR(rdev, i),
186 rio_write_config_32(rdev,
187 rdev->em_efptr + RIO_EM_PN_ERR_DETECT(i), 0);
190 rio_write_config_32(rdev,
191 rdev->em_efptr + RIO_EM_PN_ERRRATE_EN(i),
194 rio_write_config_32(rdev, RIO_PLM_SPx_PW_EN(i),
200 tmp = RIO_GET_PORT_NUM(rdev->swpinfo);
201 rio_write_config_32(rdev, RIO_PW_ROUTE, 1 << tmp);
205 rio_write_config_32(rdev, rdev->em_efptr + RIO_EM_PW_TX_CTRL, 0);
208 rio_write_config_32(rdev,
209 rdev->phys_efptr + RIO_PORT_LINKTO_CTL_CSR, 0x8e << 8);
231 idtg3_em_handler(struct rio_dev *rdev, u8 pnum)
236 rio_read_config_32(rdev,
237 RIO_DEV_PORT_N_ERR_STS_CSR(rdev, pnum),
250 rio_read_config_32(rdev, RIO_PLM_SPx_IMP_SPEC_CTL(pnum), &rval);
251 rio_write_config_32(rdev, RIO_PLM_SPx_IMP_SPEC_CTL(pnum),
254 rio_write_config_32(rdev, RIO_PLM_SPx_IMP_SPEC_CTL(pnum), rval);
270 static int idtg3_probe(struct rio_dev *rdev, const struct rio_device_id *id)
272 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev));
274 spin_lock(&rdev->rswitch->lock);
276 if (rdev->rswitch->ops) {
277 spin_unlock(&rdev->rswitch->lock);
281 rdev->rswitch->ops = &idtg3_switch_ops;
283 if (rdev->do_enum) {
288 rio_write_config_32(rdev, 0x5000 + RIO_BC_RT_CTL_CSR, 0);
291 spin_unlock(&rdev->rswitch->lock);
296 static void idtg3_remove(struct rio_dev *rdev)
298 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev));
299 spin_lock(&rdev->rswitch->lock);
300 if (rdev->rswitch->ops == &idtg3_switch_ops)
301 rdev->rswitch->ops = NULL;
302 spin_unlock(&rdev->rswitch->lock);
310 static void idtg3_shutdown(struct rio_dev *rdev)
317 if (!rdev->do_enum)
320 pr_debug("RIO: %s(%s)\n", __func__, rio_name(rdev));
322 rio_read_config_32(rdev, RIO_PW_ROUTE, &rval);
323 i = RIO_GET_PORT_NUM(rdev->swpinfo);
332 rio_read_config_32(rdev, rdev->em_efptr + RIO_EM_PW_TGT_DEVID, &rval);
339 if (rdev->net->hport->host_deviceid == destid) {
340 rio_write_config_32(rdev,
341 rdev->em_efptr + RIO_EM_PW_TX_CTRL, 0);
343 __func__, rio_name(rdev));