]> Git Repo - linux.git/blobdiff - drivers/usb/core/hub.h
drm/xe/xe2: Update SVG state handling
[linux.git] / drivers / usb / core / hub.h
index 37897afd1b64989e801953a025f3a18941521220..43ce21c96a511455b17bea7274354a743b54af10 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/usb.h>
 #include <linux/usb/ch11.h>
 #include <linux/usb/hcd.h>
+#include <linux/usb/typec.h>
 #include "usb.h"
 
 struct usb_hub {
@@ -82,6 +83,7 @@ struct usb_hub {
  * @dev: generic device interface
  * @port_owner: port's owner
  * @peer: related usb2 and usb3 ports (share the same connector)
+ * @connector: USB Type-C connector
  * @req: default pm qos request for hubs without port power control
  * @connect_type: port's connect type
  * @state: device state of the usb device attached to the port
@@ -100,6 +102,7 @@ struct usb_port {
        struct device dev;
        struct usb_dev_state *port_owner;
        struct usb_port *peer;
+       struct typec_connector *connector;
        struct dev_pm_qos_request *req;
        enum usb_port_connect_type connect_type;
        enum usb_device_state state;
@@ -153,7 +156,7 @@ static inline int hub_is_superspeedplus(struct usb_device *hdev)
 {
        return (hdev->descriptor.bDeviceProtocol == USB_HUB_PR_SS &&
                le16_to_cpu(hdev->descriptor.bcdUSB) >= 0x0310 &&
-               hdev->bos->ssp_cap);
+               hdev->bos && hdev->bos->ssp_cap);
 }
 
 static inline unsigned hub_power_on_good_delay(struct usb_hub *hub)
This page took 0.035638 seconds and 4 git commands to generate.