Micha Nelissen wrote:Alexandre Bounine wrote:vendor switch/**
+ * rio_em_set_ops- Sets Error Managment operations for a particular
+ * @rdev: RIO deviceShouldn't any RIO device be able to support error management, not just
+ *
+ * Searches the RIO EM ops table for known switch types. If the vid
+ * and did match a switch table entry, then set the em_init() and
+ * em_handle() ops to the table entry values.
switches?
Only if a device reports this capability by having Error Management
Extended Features block.
Ideally, we have to provide default handler for every such device (I am
planning it for some future updates). It should be the same as for
routing operations - if the standard feature exists, it has to be used
unless something else takes over.
For now I keep all port-write messages from end-points serviced by their
individual drivers. One of reasons for this: the EM PW message format
+ if (port->ops->pwenable)Maybe this can be done by switch->init function?
+ port->ops->pwenable(port, enable);
+}
+
This is not per-switch function. This function enables mport to receive
incoming PW messages. Per-switch PW enable is done in switch->init as
for Tsi57x.
hopcount,+ rio_mport_write_config_32(mport, destid,+ rdev->phys_efptr +This doesn't work for the 568; but the 568 has no special handling?
+ RIO_PORT_N_ACK_STS_CSR(portnum),
+ RIO_PORT_N_ACK_CLEAR);
Tsi568 will not send EM PW message. Tsi568 PWs are disabled in its
em_init().
tsi57x_em_handler);+DECLARE_RIO_EM_OPS(RIO_VID_TUNDRA, RIO_DID_TSI578, tsi57x_em_init,Why not declare these along with the other ops?
Because the EM extensions is a separate capability. It is not guaranteed
to be in every switch.