Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/cxgbe/t4_main.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 1,366 Lines • ▼ Show 20 Lines | else | ||||
t4_sysctls(sc); | t4_sysctls(sc); | ||||
return (rc); | return (rc); | ||||
} | } | ||||
static int | static int | ||||
t4_child_location_str(device_t bus, device_t dev, char *buf, size_t buflen) | t4_child_location_str(device_t bus, device_t dev, char *buf, size_t buflen) | ||||
{ | { | ||||
struct adapter *sc; | |||||
struct port_info *pi; | struct port_info *pi; | ||||
int i; | |||||
pi = device_get_softc(dev); | sc = device_get_softc(bus); | ||||
buf[0] = '\0'; | |||||
for_each_port(sc, i) { | |||||
pi = sc->port[i]; | |||||
if (pi != NULL && pi->dev == dev) { | |||||
snprintf(buf, buflen, "port=%d", pi->port_id); | snprintf(buf, buflen, "port=%d", pi->port_id); | ||||
break; | |||||
} | |||||
} | |||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
t4_ready(device_t dev) | t4_ready(device_t dev) | ||||
{ | { | ||||
struct adapter *sc; | struct adapter *sc; | ||||
▲ Show 20 Lines • Show All 9,442 Lines • Show Last 20 Lines |