Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c24814f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge branch 'for-greg' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

* 'for-greg' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
  usb: musb: omap2430: minor cleanups.
  usb: dwc3: unmap the proper number of sg entries
  usb: musb: fix shutdown while usb gadget is in use
  usb: gadget: f_mass_storage: Use "bool" instead of "int" in fsg_module_parameters
  usb: gadget: check for streams only for SS udcs
  usb: gadget: fsl_udc: fix the usage of udc->max_ep
  drivers: usb: otg: Fix dependencies for some OTG drivers
  usb: renesas: silence uninitialized variable report in usbhsg_recip_run_handle()
  usb: gadget: SS Isoc endpoints use comp_desc->bMaxBurst too
  usb: gadget: storage: endian fix
  usb: dwc3: ep0: fix compile warning
  usb: musb: davinci: fix build breakage
  usb: gadget: langwell: don't call gadget's disconnect()
  usb: gadget: langwell: drop langwell_otg support
  usb: otg: kill langwell_otg driver
  usb: dwc3: ep0: tidy up Pending Request handling
parents 074cc735 b30b3c60
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
		struct dwc3_request *req)
{
	struct dwc3		*dwc = dep->dwc;
	u32			type;
	int			ret = 0;

	req->request.actual	= 0;
@@ -149,20 +148,14 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,

		direction = !!(dep->flags & DWC3_EP0_DIR_IN);

		if (dwc->ep0state == EP0_STATUS_PHASE) {
			type = dwc->three_stage_setup
				? DWC3_TRBCTL_CONTROL_STATUS3
				: DWC3_TRBCTL_CONTROL_STATUS2;
		} else if (dwc->ep0state == EP0_DATA_PHASE) {
			type = DWC3_TRBCTL_CONTROL_DATA;
		} else {
			/* should never happen */
			WARN_ON(1);
		if (dwc->ep0state != EP0_DATA_PHASE) {
			dev_WARN(dwc->dev, "Unexpected pending request\n");
			return 0;
		}

		ret = dwc3_ep0_start_trans(dwc, direction,
				req->request.dma, req->request.length, type);
				req->request.dma, req->request.length,
				DWC3_TRBCTL_CONTROL_DATA);
		dep->flags &= ~(DWC3_EP_PENDING_REQUEST |
				DWC3_EP0_DIR_IN);
	} else if (dwc->delayed_status) {
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void dwc3_unmap_buffer_from_dma(struct dwc3_request *req)
	if (req->request.num_mapped_sgs) {
		req->request.dma = DMA_ADDR_INVALID;
		dma_unmap_sg(dwc->dev, req->request.sg,
				req->request.num_sgs,
				req->request.num_mapped_sgs,
				req->direction ? DMA_TO_DEVICE
				: DMA_FROM_DEVICE);

+3 −4
Original line number Diff line number Diff line
@@ -175,13 +175,12 @@ ep_found:
	_ep->comp_desc = comp_desc;
	if (g->speed == USB_SPEED_SUPER) {
		switch (usb_endpoint_type(_ep->desc)) {
		case USB_ENDPOINT_XFER_BULK:
		case USB_ENDPOINT_XFER_INT:
			_ep->maxburst = comp_desc->bMaxBurst;
			break;
		case USB_ENDPOINT_XFER_ISOC:
			/* mult: bits 1:0 of bmAttributes */
			_ep->mult = comp_desc->bmAttributes & 0x3;
		case USB_ENDPOINT_XFER_BULK:
		case USB_ENDPOINT_XFER_INT:
			_ep->maxburst = comp_desc->bMaxBurst;
			break;
		default:
			/* Do nothing for control endpoints */
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ ep_matches (
	 * descriptor and see if the EP matches it
	 */
	if (usb_endpoint_xfer_bulk(desc)) {
		if (ep_comp) {
		if (ep_comp && gadget->max_speed >= USB_SPEED_SUPER) {
			num_req_streams = ep_comp->bmAttributes & 0x1f;
			if (num_req_streams > ep->max_streams)
				return 0;
+5 −5
Original line number Diff line number Diff line
@@ -3123,15 +3123,15 @@ fsg_add(struct usb_composite_dev *cdev, struct usb_configuration *c,

struct fsg_module_parameters {
	char		*file[FSG_MAX_LUNS];
	int		ro[FSG_MAX_LUNS];
	int		removable[FSG_MAX_LUNS];
	int		cdrom[FSG_MAX_LUNS];
	int		nofua[FSG_MAX_LUNS];
	bool		ro[FSG_MAX_LUNS];
	bool		removable[FSG_MAX_LUNS];
	bool		cdrom[FSG_MAX_LUNS];
	bool		nofua[FSG_MAX_LUNS];

	unsigned int	file_count, ro_count, removable_count, cdrom_count;
	unsigned int	nofua_count;
	unsigned int	luns;	/* nluns */
	int		stall;	/* can_stall */
	bool		stall;	/* can_stall */
};

#define _FSG_MODULE_PARAM_ARRAY(prefix, params, name, type, desc)	\
Loading