Lines Matching +full:reset +full:- +full:synchronized

1 // SPDX-License-Identifier: GPL-2.0-or-later
48 return -EINVAL; in idtg3_route_add_entry()
54 /* Use broadcast register to update all per-port tables */ in idtg3_route_add_entry()
70 return -EINVAL; in idtg3_route_add_entry()
86 return -EINVAL; in idtg3_route_get_entry()
101 return -EINVAL; in idtg3_route_get_entry()
143 return -EINVAL; in idtg3_route_clr_table()
157 * This routine performs device-specific initialization only.
166 pr_debug("RIO: %s [%d:%d]\n", __func__, rdev->destid, rdev->hopcount); in idtg3_em_init()
171 /* Disable port-write event notifications during initialization */ in idtg3_em_init()
172 rio_write_config_32(rdev, rdev->em_efptr + RIO_EM_PW_TX_CTRL, in idtg3_em_init()
175 /* Configure Port-Write notifications for hot-swap events */ in idtg3_em_init()
176 tmp = RIO_GET_TOTAL_PORTS(rdev->swpinfo); in idtg3_em_init()
187 rdev->em_efptr + RIO_EM_PN_ERR_DETECT(i), 0); in idtg3_em_init()
191 rdev->em_efptr + RIO_EM_PN_ERRRATE_EN(i), in idtg3_em_init()
193 /* Enable port-write generation on events */ in idtg3_em_init()
199 /* Set Port-Write destination port */ in idtg3_em_init()
200 tmp = RIO_GET_PORT_NUM(rdev->swpinfo); in idtg3_em_init()
204 /* Enable sending port-write event notifications */ in idtg3_em_init()
205 rio_write_config_32(rdev, rdev->em_efptr + RIO_EM_PW_TX_CTRL, 0); in idtg3_em_init()
209 rdev->phys_efptr + RIO_PORT_LINKTO_CTL_CSR, 0x8e << 8); in idtg3_em_init()
215 * idtg3_em_handler - device-specific error handler
217 * If the link is down (PORT_UNINIT) does nothing - this is considered
220 * If the link is up (PORT_OK) - situation is handled as *new* device insertion.
221 * In this case ERR_STOP bits are cleared by issuing soft reset command to the
222 * reporting port. Inbound and outbound ackIDs are cleared by the reset as well.
223 * This way the port is synchronized with freshly inserted device (assuming it
224 * was reset/powered-up on insertion).
245 * Request port soft reset to clear errors if they present. in idtg3_em_handler()
246 * Inbound and outbound ackIDs will be 0 after reset. in idtg3_em_handler()
274 spin_lock(&rdev->rswitch->lock); in idtg3_probe()
276 if (rdev->rswitch->ops) { in idtg3_probe()
277 spin_unlock(&rdev->rswitch->lock); in idtg3_probe()
278 return -EINVAL; in idtg3_probe()
281 rdev->rswitch->ops = &idtg3_switch_ops; in idtg3_probe()
283 if (rdev->do_enum) { in idtg3_probe()
285 * enumeration/discovery process (see rio-scan.c) uses 8-bit in idtg3_probe()
291 spin_unlock(&rdev->rswitch->lock); in idtg3_probe()
299 spin_lock(&rdev->rswitch->lock); in idtg3_remove()
300 if (rdev->rswitch->ops == &idtg3_switch_ops) in idtg3_remove()
301 rdev->rswitch->ops = NULL; in idtg3_remove()
302 spin_unlock(&rdev->rswitch->lock); in idtg3_remove()
307 * is cleared. Use shutdown notification to disable generation of port-write
317 if (!rdev->do_enum) in idtg3_shutdown()
323 i = RIO_GET_PORT_NUM(rdev->swpinfo); in idtg3_shutdown()
325 /* Check port-write destination port */ in idtg3_shutdown()
329 /* Disable sending port-write event notifications if PW destID in idtg3_shutdown()
332 rio_read_config_32(rdev, rdev->em_efptr + RIO_EM_PW_TGT_DEVID, &rval); in idtg3_shutdown()
339 if (rdev->net->hport->host_deviceid == destid) { in idtg3_shutdown()
341 rdev->em_efptr + RIO_EM_PW_TX_CTRL, 0); in idtg3_shutdown()