Several small bug-fixes for cdns3 and cdnsp driver
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDaZUZmFxRG/wNThrSFkpgVDWcbsFAmECS4kACgkQSFkpgVDW cbtHIggAncAYLpf66mdiF/+uxXEIZ9wWRnB5E26o70Wpx+tFohtn/Qf9p5LWRB1y NXDRXzf5l6pokyfzovbbw68ONEuMX8Vh5w/93Zrk1TuDmVN3cx/Tk6D7LUdVr0ZU q1GHU21+sRV4a6UzXi6ByJKSukYYebncxYosuI6JzkeQpixq5mJW0/5J483qIKHK F/BrdPpy+J27g8xBZRlBiG1jXhRKMiYx8++dLvUlsOMez4VLxfEz3IOlvsebMxW4 6TI6l1URPiIgoDgC7utOLWclgHFsMHVZiFjtqm8zznrEaxO9zeqsmzZYjm2a/+8u FjAG9KZ5lIsgOf0Mx6vRxOL5aVSZPg== =2upV -----END PGP SIGNATURE----- Merge tag 'usb-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Several small bug-fixes for cdns3 and cdnsp driver * tag 'usb-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdnsp: Fix the IMAN_IE_SET and IMAN_IE_CLEAR macro usb: cdnsp: Fixed issue with ZLP usb: cdnsp: Fix incorrect supported maximum speed usb: cdns3: Fixed incorrect gadget state
This commit is contained in:
commit
a154c43b95
|
@ -731,6 +731,7 @@ static int cdns3_gadget_ep0_queue(struct usb_ep *ep,
|
|||
request->actual = 0;
|
||||
priv_dev->status_completion_no_call = true;
|
||||
priv_dev->pending_status_request = request;
|
||||
usb_gadget_set_state(&priv_dev->gadget, USB_STATE_CONFIGURED);
|
||||
spin_unlock_irqrestore(&priv_dev->lock, flags);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1882,7 +1882,7 @@ static int __cdnsp_gadget_init(struct cdns *cdns)
|
|||
pdev->gadget.name = "cdnsp-gadget";
|
||||
pdev->gadget.speed = USB_SPEED_UNKNOWN;
|
||||
pdev->gadget.sg_supported = 1;
|
||||
pdev->gadget.max_speed = USB_SPEED_SUPER_PLUS;
|
||||
pdev->gadget.max_speed = max_speed;
|
||||
pdev->gadget.lpm_capable = 1;
|
||||
|
||||
pdev->setup_buf = kzalloc(CDNSP_EP0_SETUP_SIZE, GFP_KERNEL);
|
||||
|
|
|
@ -383,8 +383,8 @@ struct cdnsp_intr_reg {
|
|||
#define IMAN_IE BIT(1)
|
||||
#define IMAN_IP BIT(0)
|
||||
/* bits 2:31 need to be preserved */
|
||||
#define IMAN_IE_SET(p) (((p) & IMAN_IE) | 0x2)
|
||||
#define IMAN_IE_CLEAR(p) (((p) & IMAN_IE) & ~(0x2))
|
||||
#define IMAN_IE_SET(p) ((p) | IMAN_IE)
|
||||
#define IMAN_IE_CLEAR(p) ((p) & ~IMAN_IE)
|
||||
|
||||
/* IMOD - Interrupter Moderation Register - irq_control bitmasks. */
|
||||
/*
|
||||
|
|
|
@ -1932,15 +1932,13 @@ int cdnsp_queue_bulk_tx(struct cdnsp_device *pdev, struct cdnsp_request *preq)
|
|||
}
|
||||
|
||||
if (enqd_len + trb_buff_len >= full_len) {
|
||||
if (need_zero_pkt && zero_len_trb) {
|
||||
zero_len_trb = true;
|
||||
} else {
|
||||
field &= ~TRB_CHAIN;
|
||||
field |= TRB_IOC;
|
||||
more_trbs_coming = false;
|
||||
need_zero_pkt = false;
|
||||
preq->td.last_trb = ring->enqueue;
|
||||
}
|
||||
if (need_zero_pkt)
|
||||
zero_len_trb = !zero_len_trb;
|
||||
|
||||
field &= ~TRB_CHAIN;
|
||||
field |= TRB_IOC;
|
||||
more_trbs_coming = false;
|
||||
preq->td.last_trb = ring->enqueue;
|
||||
}
|
||||
|
||||
/* Only set interrupt on short packet for OUT endpoints. */
|
||||
|
@ -1955,7 +1953,7 @@ int cdnsp_queue_bulk_tx(struct cdnsp_device *pdev, struct cdnsp_request *preq)
|
|||
length_field = TRB_LEN(trb_buff_len) | TRB_TD_SIZE(remainder) |
|
||||
TRB_INTR_TARGET(0);
|
||||
|
||||
cdnsp_queue_trb(pdev, ring, more_trbs_coming | need_zero_pkt,
|
||||
cdnsp_queue_trb(pdev, ring, more_trbs_coming | zero_len_trb,
|
||||
lower_32_bits(send_addr),
|
||||
upper_32_bits(send_addr),
|
||||
length_field,
|
||||
|
|
Loading…
Reference in New Issue