Page MenuHomeFreeBSD

D19399.id54513.diff
No OneTemporary

D19399.id54513.diff

Index: sys/dev/cxgbe/t4_main.c
===================================================================
--- sys/dev/cxgbe/t4_main.c
+++ sys/dev/cxgbe/t4_main.c
@@ -1372,10 +1372,19 @@
static int
t4_child_location_str(device_t bus, device_t dev, char *buf, size_t buflen)
{
+ struct adapter *sc;
struct port_info *pi;
+ int i;
- pi = device_get_softc(dev);
- snprintf(buf, buflen, "port=%d", pi->port_id);
+ 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);
+ break;
+ }
+ }
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 26, 5:13 AM (22 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37269198
Default Alt Text
D19399.id54513.diff (629 B)

Event Timeline