Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/nlm/dev/sec/nlmrsa.c
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | |||||
static void xlp_free_cmd_params(struct xlp_rsa_command *cmd); | static void xlp_free_cmd_params(struct xlp_rsa_command *cmd); | ||||
static int xlp_rsa_inp2hwformat(uint8_t *src, uint8_t *dst, | static int xlp_rsa_inp2hwformat(uint8_t *src, uint8_t *dst, | ||||
uint32_t paramsize, uint8_t result); | uint32_t paramsize, uint8_t result); | ||||
static int xlp_rsa_probe(device_t); | static int xlp_rsa_probe(device_t); | ||||
static int xlp_rsa_attach(device_t); | static int xlp_rsa_attach(device_t); | ||||
static int xlp_rsa_detach(device_t); | static int xlp_rsa_detach(device_t); | ||||
struct pci_device_table xlp_rsa_devs[] = { | |||||
{PCI_VENDOR_NETLOGIC, PCI_DEVICE_ID_NLM_RSA} | |||||
}; | |||||
static device_method_t xlp_rsa_methods[] = { | static device_method_t xlp_rsa_methods[] = { | ||||
/* device interface */ | /* device interface */ | ||||
DEVMETHOD(device_probe, xlp_rsa_probe), | DEVMETHOD(device_probe, xlp_rsa_probe), | ||||
DEVMETHOD(device_attach, xlp_rsa_attach), | DEVMETHOD(device_attach, xlp_rsa_attach), | ||||
DEVMETHOD(device_detach, xlp_rsa_detach), | DEVMETHOD(device_detach, xlp_rsa_detach), | ||||
/* bus interface */ | /* bus interface */ | ||||
DEVMETHOD(bus_print_child, bus_generic_print_child), | DEVMETHOD(bus_print_child, bus_generic_print_child), | ||||
Show All 10 Lines | |||||
static driver_t xlp_rsa_driver = { | static driver_t xlp_rsa_driver = { | ||||
"nlmrsa", | "nlmrsa", | ||||
xlp_rsa_methods, | xlp_rsa_methods, | ||||
sizeof(struct xlp_rsa_softc) | sizeof(struct xlp_rsa_softc) | ||||
}; | }; | ||||
static devclass_t xlp_rsa_devclass; | static devclass_t xlp_rsa_devclass; | ||||
DRIVER_MODULE(nlmrsa, pci, xlp_rsa_driver, xlp_rsa_devclass, 0, 0); | DRIVER_MODULE(nlmrsa, pci, xlp_rsa_driver, xlp_rsa_devclass, 0, 0); | ||||
PCI_PNP_INFO(xlp_rsa_devs); | |||||
MODULE_DEPEND(nlmrsa, crypto, 1, 1, 1); | MODULE_DEPEND(nlmrsa, crypto, 1, 1, 1); | ||||
#ifdef NLM_RSA_DEBUG | #ifdef NLM_RSA_DEBUG | ||||
static void | static void | ||||
print_krp_params(struct cryptkop *krp) | print_krp_params(struct cryptkop *krp) | ||||
{ | { | ||||
int i; | int i; | ||||
▲ Show 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | nlm_xlprsaecc_msgring_handler(int vc, int size, int code, int src_id, | ||||
xlp_free_cmd_params(cmd); | xlp_free_cmd_params(cmd); | ||||
} | } | ||||
static int | static int | ||||
xlp_rsa_probe(device_t dev) | xlp_rsa_probe(device_t dev) | ||||
{ | { | ||||
struct xlp_rsa_softc *sc; | struct xlp_rsa_softc *sc; | ||||
const struct pci_device_table *xlprsad; | |||||
if (pci_get_vendor(dev) == PCI_VENDOR_NETLOGIC && | xlprsad = PCI_MATCH(dev, xlp_rsa_devs); | ||||
pci_get_device(dev) == PCI_DEVICE_ID_NLM_RSA) { | if (xlprsad == NULL) | ||||
return (ENXIO); | |||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
return (BUS_PROBE_DEFAULT); | return (BUS_PROBE_DEFAULT); | ||||
} | |||||
return (ENXIO); | |||||
} | } | ||||
/* | /* | ||||
* Attach an interface that successfully probed. | * Attach an interface that successfully probed. | ||||
*/ | */ | ||||
static int | static int | ||||
xlp_rsa_attach(device_t dev) | xlp_rsa_attach(device_t dev) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |