nfc: Fix RC-S380* needs zero-length packet
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Sat, 4 Feb 2017 01:16:28 +0000 (10:16 +0900)
committerSamuel Ortiz <sameo@linux.intel.com>
Sat, 1 Apr 2017 21:04:30 +0000 (23:04 +0200)
If sent packet size is wMaxPacketSize boundary, this device doesn't
answer. To fix this, we have to send zero-length packet in usb spec.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/port100.c

index 32258525513e41385123b750092d13974db9baa9..382985d3fee03ae46b2396b44a63f735047e1d07 100644 (file)
@@ -1540,6 +1540,7 @@ static int port100_probe(struct usb_interface *interface,
        usb_fill_bulk_urb(dev->out_urb, dev->udev,
                          usb_sndbulkpipe(dev->udev, out_endpoint),
                          NULL, 0, port100_send_complete, dev);
+       dev->out_urb->transfer_flags = URB_ZERO_PACKET;
 
        dev->skb_headroom = PORT100_FRAME_HEADER_LEN +
                            PORT100_COMM_RF_HEAD_MAX_LEN;