Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168348876
D58875.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58875.diff
View Options
diff --git a/sys/dev/apple_bce/apple_bce_vhci.c b/sys/dev/apple_bce/apple_bce_vhci.c
--- a/sys/dev/apple_bce/apple_bce_vhci.c
+++ b/sys/dev/apple_bce/apple_bce_vhci.c
@@ -1007,8 +1007,12 @@
USB_BUS_LOCK(&vhci->sc_bus);
if (error == 0) {
+ uint16_t changed, old_status;
+
port_status = (uint32_t)reply.param2;
+ old_status = vhci->sc_port_status[port];
+
vhci->sc_port_status[port] = 0;
if (vhci->sc_port_power[port])
vhci->sc_port_status[port] |=
@@ -1025,8 +1029,24 @@
if (port_status & BCE_VHCI_PORT_OVERCURRENT)
vhci->sc_port_status[port] |=
UPS_OVERCURRENT_INDICATOR;
+
+ changed = old_status ^ vhci->sc_port_status[port];
+
+ if (changed & UPS_CURRENT_CONNECT_STATUS)
+ vhci->sc_port_change[port] |=
+ UPS_C_CONNECT_STATUS;
+ if (changed & UPS_PORT_ENABLED)
+ vhci->sc_port_change[port] |=
+ UPS_C_PORT_ENABLED;
+ if (changed & UPS_SUSPEND)
+ vhci->sc_port_change[port] |=
+ UPS_C_SUSPEND;
+ if (changed & UPS_OVERCURRENT_INDICATOR)
+ vhci->sc_port_change[port] |=
+ UPS_C_OVERCURRENT_INDICATOR;
+ } else {
+ vhci->sc_port_change[port] |= UPS_C_CONNECT_STATUS;
}
- vhci->sc_port_change[port] |= UPS_C_CONNECT_STATUS;
USB_BUS_UNLOCK(&vhci->sc_bus);
}
@@ -4102,6 +4122,8 @@
UPS_HIGH_SPEED;
vhci->sc_port_change[index - 1] |=
UPS_C_PORT_RESET;
+ vhci->sc_port_change[index - 1] &=
+ ~UPS_C_CONNECT_STATUS;
} else {
device_printf(vhci->sc_dev,
"port %d reset failed: %d\n",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 28, 5:44 PM (17 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36867531
Default Alt Text
D58875.diff (1 KB)
Attached To
Mode
D58875: apple_bce: fix C_CONNECT_STATUS during port reset
Attached
Detach File
Event Timeline
Log In to Comment