Loading drivers/usb/gadget/function/f_gsi.c +25 −16 Original line number Diff line number Diff line Loading @@ -1449,27 +1449,36 @@ static long gsi_ctrl_dev_ioctl(struct file *fp, unsigned int cmd, break; } if (gsi->prot_id != USB_PROT_GPS_CTRL) { if (gsi->d_port.in_channel_handle == -EINVAL && gsi->d_port.out_channel_handle == -EINVAL) { ret = -EAGAIN; break; } info.ph_ep_info.ep_type = GSI_MBIM_DATA_EP_TYPE_HSUSB; info.ph_ep_info.peripheral_iface_id = gsi->data_id; } else { info.ph_ep_info.ep_type = GSI_MBIM_DATA_EP_TYPE_HSUSB; info.ph_ep_info.peripheral_iface_id = gsi->ctrl_id; } log_event_dbg("%s: prot id :%d ep_type:%d intf:%d", __func__, gsi->prot_id, info.ph_ep_info.ep_type, info.ph_ep_info.peripheral_iface_id); if (gsi->prot_id != USB_PROT_GPS_CTRL) { info.ipa_ep_pair.cons_pipe_num = (gsi->prot_id == USB_PROT_DIAG_IPA || gsi->prot_id == USB_PROT_DPL_ETHER) ? -1 : gsi->d_port.out_channel_handle; info.ipa_ep_pair.prod_pipe_num = gsi->d_port.in_channel_handle; info.ipa_ep_pair.prod_pipe_num = gsi->d_port.in_channel_handle; log_event_dbg("%s: prot id :%d ep_type:%d intf:%d", __func__, gsi->prot_id, info.ph_ep_info.ep_type, info.ph_ep_info.peripheral_iface_id); log_event_dbg("%s: ipa_cons_idx:%d ipa_prod_idx:%d", __func__, info.ipa_ep_pair.cons_pipe_num, __func__, info.ipa_ep_pair.cons_pipe_num, info.ipa_ep_pair.prod_pipe_num); } ret = copy_to_user((void __user *)arg, &info, sizeof(info)); Loading drivers/usb/gadget/function/f_gsi.h +5 −4 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ static enum usb_prot_id name_to_prot_id(const char *name) #define LOG2_STATUS_INTERVAL_MSEC 5 #define MAX_NOTIFY_SIZE sizeof(struct usb_cdc_notification) #define GPS_MAX_NOTIFY_SIZE 64 /* rmnet device descriptors */ Loading Loading @@ -1451,7 +1452,7 @@ static struct usb_endpoint_descriptor gps_fs_notify_desc = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(MAX_NOTIFY_SIZE), .wMaxPacketSize = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, }; Loading @@ -1467,7 +1468,7 @@ static struct usb_endpoint_descriptor gps_hs_notify_desc = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(MAX_NOTIFY_SIZE), .wMaxPacketSize = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, }; Loading @@ -1483,7 +1484,7 @@ static struct usb_endpoint_descriptor gps_ss_notify_desc = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(MAX_NOTIFY_SIZE), .wMaxPacketSize = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, }; Loading @@ -1494,7 +1495,7 @@ static struct usb_ss_ep_comp_descriptor gps_ss_notify_comp_desc = { /* the following 3 values can be tweaked if necessary */ /* .bMaxBurst = 0, */ /* .bmAttributes = 0, */ .wBytesPerInterval = cpu_to_le16(MAX_NOTIFY_SIZE), .wBytesPerInterval = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), }; static struct usb_descriptor_header *gps_ss_function[] = { Loading Loading
drivers/usb/gadget/function/f_gsi.c +25 −16 Original line number Diff line number Diff line Loading @@ -1449,27 +1449,36 @@ static long gsi_ctrl_dev_ioctl(struct file *fp, unsigned int cmd, break; } if (gsi->prot_id != USB_PROT_GPS_CTRL) { if (gsi->d_port.in_channel_handle == -EINVAL && gsi->d_port.out_channel_handle == -EINVAL) { ret = -EAGAIN; break; } info.ph_ep_info.ep_type = GSI_MBIM_DATA_EP_TYPE_HSUSB; info.ph_ep_info.peripheral_iface_id = gsi->data_id; } else { info.ph_ep_info.ep_type = GSI_MBIM_DATA_EP_TYPE_HSUSB; info.ph_ep_info.peripheral_iface_id = gsi->ctrl_id; } log_event_dbg("%s: prot id :%d ep_type:%d intf:%d", __func__, gsi->prot_id, info.ph_ep_info.ep_type, info.ph_ep_info.peripheral_iface_id); if (gsi->prot_id != USB_PROT_GPS_CTRL) { info.ipa_ep_pair.cons_pipe_num = (gsi->prot_id == USB_PROT_DIAG_IPA || gsi->prot_id == USB_PROT_DPL_ETHER) ? -1 : gsi->d_port.out_channel_handle; info.ipa_ep_pair.prod_pipe_num = gsi->d_port.in_channel_handle; info.ipa_ep_pair.prod_pipe_num = gsi->d_port.in_channel_handle; log_event_dbg("%s: prot id :%d ep_type:%d intf:%d", __func__, gsi->prot_id, info.ph_ep_info.ep_type, info.ph_ep_info.peripheral_iface_id); log_event_dbg("%s: ipa_cons_idx:%d ipa_prod_idx:%d", __func__, info.ipa_ep_pair.cons_pipe_num, __func__, info.ipa_ep_pair.cons_pipe_num, info.ipa_ep_pair.prod_pipe_num); } ret = copy_to_user((void __user *)arg, &info, sizeof(info)); Loading
drivers/usb/gadget/function/f_gsi.h +5 −4 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ static enum usb_prot_id name_to_prot_id(const char *name) #define LOG2_STATUS_INTERVAL_MSEC 5 #define MAX_NOTIFY_SIZE sizeof(struct usb_cdc_notification) #define GPS_MAX_NOTIFY_SIZE 64 /* rmnet device descriptors */ Loading Loading @@ -1451,7 +1452,7 @@ static struct usb_endpoint_descriptor gps_fs_notify_desc = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(MAX_NOTIFY_SIZE), .wMaxPacketSize = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), .bInterval = 1 << LOG2_STATUS_INTERVAL_MSEC, }; Loading @@ -1467,7 +1468,7 @@ static struct usb_endpoint_descriptor gps_hs_notify_desc = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(MAX_NOTIFY_SIZE), .wMaxPacketSize = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, }; Loading @@ -1483,7 +1484,7 @@ static struct usb_endpoint_descriptor gps_ss_notify_desc = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = cpu_to_le16(MAX_NOTIFY_SIZE), .wMaxPacketSize = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), .bInterval = LOG2_STATUS_INTERVAL_MSEC + 4, }; Loading @@ -1494,7 +1495,7 @@ static struct usb_ss_ep_comp_descriptor gps_ss_notify_comp_desc = { /* the following 3 values can be tweaked if necessary */ /* .bMaxBurst = 0, */ /* .bmAttributes = 0, */ .wBytesPerInterval = cpu_to_le16(MAX_NOTIFY_SIZE), .wBytesPerInterval = cpu_to_le16(GPS_MAX_NOTIFY_SIZE), }; static struct usb_descriptor_header *gps_ss_function[] = { Loading