aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-08-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-1/+2
Pull networking updates from David Miller: "Highlights: 1) Steady transitioning of the BPF instructure to a generic spot so all kernel subsystems can make use of it, from Alexei Starovoitov. 2) SFC driver supports busy polling, from Alexandre Rames. 3) Take advantage of hash table in UDP multicast delivery, from David Held. 4) Lighten locking, in particular by getting rid of the LRU lists, in inet frag handling. From Florian Westphal. 5) Add support for various RFC6458 control messages in SCTP, from Geir Ola Vaagland. 6) Allow to filter bridge forwarding database dumps by device, from Jamal Hadi Salim. 7) virtio-net also now supports busy polling, from Jason Wang. 8) Some low level optimization tweaks in pktgen from Jesper Dangaard Brouer. 9) Add support for ipv6 address generation modes, so that userland can have some input into the process. From Jiri Pirko. 10) Consolidate common TCP connection request code in ipv4 and ipv6, from Octavian Purdila. 11) New ARP packet logger in netfilter, from Pablo Neira Ayuso. 12) Generic resizable RCU hash table, with intial users in netlink and nftables. From Thomas Graf. 13) Maintain a name assignment type so that userspace can see where a network device name came from (enumerated by kernel, assigned explicitly by userspace, etc.) From Tom Gundersen. 14) Automatic flow label generation on transmit in ipv6, from Tom Herbert. 15) New packet timestamping facilities from Willem de Bruijn, meant to assist in measuring latencies going into/out-of the packet scheduler, latency from TCP data transmission to ACK, etc" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1536 commits) cxgb4 : Disable recursive mailbox commands when enabling vi net: reduce USB network driver config options. tg3: Modify tg3_tso_bug() to handle multiple TX rings amd-xgbe: Perform phy connect/disconnect at dev open/stop amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask net: sun4i-emac: fix memory leak on bad packet sctp: fix possible seqlock seadlock in sctp_packet_transmit() Revert "net: phy: Set the driver when registering an MDIO bus device" cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine team: Simplify return path of team_newlink bridge: Update outdated comment on promiscuous mode net-timestamp: ACK timestamp for bytestreams net-timestamp: TCP timestamping net-timestamp: SCHED timestamp on entering packet scheduler net-timestamp: add key to disambiguate concurrent datagrams net-timestamp: move timestamp flags out of sk_flags net-timestamp: extend SCM_TIMESTAMPING ancillary data struct cxgb4i : Move stray CPL definitions to cxgb4 driver tcp: reduce spurious retransmits due to transient SACK reneging qlcnic: Initialize dcbnl_ops before register_netdev ...
2014-07-21Merge tag 'usb-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-nextGreg Kroah-Hartman122-4607/+6091
Felipe writes: usb: patches for v3.17 merge window Surprisingly enough, while a big set of patches, the majority is composed of cleanups (using devm_*, fixing sparse errors, moving code around, adding const, etc). The highlights are addition of new support for PLX USB338x devices, and support for USB 2.0-only configurations of the DWC3 IP core. Signed-of-by: Felipe Balbi <balbi@ti.com>
2014-07-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller7-28/+43
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-16usb: gadget: f_rndis: fix interface id for OS descriptorsAndrzej Pietrasiewicz1-0/+4
f->os_desc_table[0].if_id is zero by default. If the actual id happens to be different then no Feature Descriptors will be returned to the host for this interface, so assign if_id as soon as it is known. Cc: <stable@vger.kernel.org> # v3.16 Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: f_uac2: Fix pcm sample size selectionSebastian Reimers1-2/+22
The pcm playback and capture sample size format was fixed SNDRV_PCM_FMTBIT_S16_LE. This patch respects also 16, 24 and 32 bit p_ssize and c_ssize values. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sebastian Reimers <sebastian.reimers@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: udc: fsl_mxc_udc: fix sparse errorFelipe Balbi2-0/+5
No functional changes, just fixing one easy to spot sparse error. While fixing that sparse error, I had to add two includes to a header to avoid a build error. Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: udc: net2280: fix sparse errorFelipe Balbi1-1/+1
No functional changes, just fixing one easy to spot sparse error. Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: udc: fsl_udc_core: fix sparse errorsFelipe Balbi1-4/+8
No functional changes, just fixing some easy to spot sparse errors. Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: Gadget directory cleanup - group usb functionsAndrzej Pietrasiewicz48-29/+36
The drivers/usb/gadget directory contains many files. Files which are related can be distributed into separate directories. This patch moves the USB functions implementations into a separate directory. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: Gadget directory cleanup - group UDC driversAndrzej Pietrasiewicz51-399/+420
The drivers/usb/gadget directory contains many files. Files which are related can be distributed into separate directories. This patch moves the UDC drivers into a separate directory. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: Gadget directory cleanup - group legacy gadgetsAndrzej Pietrasiewicz23-501/+521
The drivers/usb/gadget directory contains many files. Files which are related can be distributed into separate directories. This patch moves the legacy gadgets (i.e. those not using configfs) into a separate directory. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-16usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanupLi Jun1-0/+1
This patch try to dequeue the cdev->req to guarantee the request is not queued before free it. Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-15net: set name_assign_type in alloc_netdev()Tom Gundersen1-1/+2
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert all users to pass NET_NAME_UNKNOWN. Coccinelle patch: @@ expression sizeof_priv, name, setup, txqs, rxqs, count; @@ ( -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs) +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs) | -alloc_netdev_mq(sizeof_priv, name, setup, count) +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count) | -alloc_netdev(sizeof_priv, name, setup) +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup) ) v9: move comments here from the wrong commit Signed-off-by: Tom Gundersen <teg@jklm.no> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-10usb: gadget: NCM: Stop RX TCP Bursts getting dropped.Jim Baxter1-7/+8
This fixes a problem with dropped packets over 16k CDC-NCM when the connection is being heavily used. The issue was that the extracted frames cloned from the received frame were consuming more memory than necessary resulting in the truesize being ~32KB instead of ~2KB, this meant there was a high chance of reaching the sk_rcvbuf limit. Signed-off-by: Jim Baxter <jim_baxter@mentor.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: NCM: Add transmit multi-frame.Jim Baxter3-87/+269
This adds multi-frame support to the NCM NTB's for the gadget driver. This allows multiple network packets to be put inside a single USB NTB with a maximum size of 16kB. It has a time out of 300ms to ensure that smaller number of packets still maintain a normal latency. Also the .fp_index and .next_fp_index have been changed to .ndp_index and .next_ndp_index to match the latest CDC-NCM specification and help with maintenance. Results transmitting from gadget to host. Before the change: TCP_STREAM Throughput (10^6bits/sec): 22.72 UDP_STREAM Throughput (10^6bits/sec): 25.94 Latency: netperf -H 192.168.1.101 -v2 -l 50 -t TCP_RR -- -r 16384,16384 Trans. RoundTrip Throughput Rate Latency 10^6bits/s per sec usec/Tran Outbound 100.83 9918.116 13.215 After the change: TCP_STREAM Throughput (10^6bits/sec): 124.26 UDP_STREAM Throughput (10^6bits/sec): 227.48 Latency: netperf -H 192.168.1.101 -v2 -l 50 -t TCP_RR -- -r 16384,16384 Trans. RoundTrip Throughput Rate Latency 10^6bits/s per sec usec/Tran Outbound 156.80 6377.730 20.552 Signed-off-by: Jim Baxter <jim_baxter@mentor.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: NCM: RX function support multiple NDPsJim Baxter1-68/+78
The NDP was ignoring the wNextNdpIndex in the NDP which means that NTBs containing multiple NDPs would have missed frames. Signed-off-by: Jim Baxter <jim_baxter@mentor.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: fix eem_wrap cloned skb logicNathan Sullivan1-12/+10
Even if the skb is cloned, we still need a ZLP or USB will stall. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> Acked-by: Brad Mouring <brad.mouring@ni.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: Convert drivers to use module_usb_composite_driver()Tobias Klauser10-120/+15
Use the module_usb_composite_driver() macro where applicable to eliminate the module_init/module_exit boilerplate in USB gadget composite drivers. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: f_fs: OS descriptors supportAndrzej Pietrasiewicz2-8/+340
Add support for OS descriptors. The new format of descriptors is used, because the "flags" field is required for extensions. os_count gives the number of OSDesc[] elements. The format of descriptors is given in include/uapi/linux/usb/functionfs.h. For extended properties descriptor the usb_ext_prop_desc structure covers only a part of a descriptor, because the wPropertyNameLength is unknown up front. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: u_os_desc: helper functions for accessing ext prop bufferAndrzej Pietrasiewicz1-13/+46
Provide helper functions to get pointers to particular locations within a buffer holding an extended properties descriptor. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: f_fs: rename descriptor parsing functionsAndrzej Pietrasiewicz1-3/+4
ffs_do_desc() handles one descriptor, while ffs_do_descs() handles a number of descriptors. The tho names are so similar that it causes confusion. Rename to reflect their purpose better. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: net2280: Fix typo on #ifdefRicardo Ribalda Delgado1-1/+1
Commit e56e69cc0ff4 ("usb: gadget: net2280: Use pr_* function") includes a editing mistake on one of the #ifdef. This patch fixes it. Reported-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: gadget: pxa25x_udc: use correct header for gpio devm_ functionsArnd Bergmann1-1/+1
commit c63d2225e7be ("usb: gadget: pxa25x_udc: use devm_ functions") introduced the use of devm_gpio_request in this driver, but did not correctly include the header file declaring this function, which causes a build failure. This changes pxa25x_udc to include linux/gpio.h instead of asm/gpio.h to fix this. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Himangi Saraogi <himangi774@gmail.com> Cc: Julia Lawall <julia.lawall@lip6.fr> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-09USB: gadget: Fixed a few typos in commentsMickael Maison1-2/+2
Signed-off-by: Mickael Maison <mickael.maison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-30usb: gadget: s3c2410: Move to clk_prepare_enable/clk_disable_unprepareVasily Khoruzhick1-4/+4
Use clk_prepare_enable/clk_disable_unprepare to make the driver work properly with common clock framework. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: FunctionFS: Return -ENOENT instead of -ENODEV when device not found.Krzysztof Opasiak2-3/+3
Syscall mount returns -ENODEV error if requested FS type has not been found. Returning the same error from FFS mount callback makes value returned to userspace misleading. Other file systems returns -ENOENT if requested device has not been found. Adjust FFS to this convention to make error codes meaningfull. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: omap_udc: should not call gadget driver's .unbindPeter Chen1-4/+1
It has already been covered by udc core Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2272: do not need to judge gadget driver's .unbindPeter Chen1-1/+1
It has already been covered by udc core, besides, we do not need unbind at .udc_start Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: m66592-udc: should not call gadget driver's .unbindPeter Chen1-2/+0
It has already been covered by udc core Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: fusb300_udc: should not call gadget driver's .unbindPeter Chen1-2/+0
It has already been covered by udc core Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: fsl_udc_core: should not call gadget driver's .unbindPeter Chen1-1/+0
It has already been covered by udc core Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: pxa27x_udc: prepare and unprepare the clockRobert Jarzmik1-0/+6
Add clock prepare and unprepare as required by clock framework. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Use quirks instead of pci idRicardo Ribalda Delgado2-40/+49
Use of quirks improve readability and will be easier to add new devices to this driver. Suggested-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Use pr_* functionRicardo Ribalda Delgado2-86/+71
Driver was using custom functions WARNING, ERROR, DEBUG, instead of pr_err, pr_dgb... New ep_* macros have been created that use standard pr_* functions. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Code CleanupRicardo Ribalda Delgado2-81/+78
- Move logical continuations to end of line - Improve spacing Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Pass checkpacth.pl testRicardo Ribalda Delgado2-607/+602
Fix Code Style using checkpatch.pl criteria Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Refactor queues_showRicardo Ribalda Delgado1-9/+1
Replace a long and ugly expresion with an already available function. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Use module_pci_driver macroRicardo Ribalda Delgado1-14/+5
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Use true/false instead of 1/0Ricardo Ribalda Delgado1-4/+4
For bool variables Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Use BIT() macroRicardo Ribalda Delgado2-319/+318
Improves readability of the code Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Dont use magic numbersRicardo Ribalda Delgado2-33/+36
Instead of using magic numbers use #defines Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: net2280: Add support for PLX USB338XRicardo Ribalda Delgado3-98/+1152
This patch adds support for the PLX USB3380 and USB3382. This driver is based on the driver from the manufacturer. Since USB338X is register compatible with NET2280, I thought that it would be better to include this hardware into net2280 driver. Manufacturer's driver only supported the USB33X, did not follow the Kernel Style and contain some trivial errors. This patch has tried to address this issues. This patch has only been tested on USB338x hardware, but the merge has been done trying to not affect the behaviour of NET2280. Tested-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: r8a66597-udc: delete __init marker for probePeter Chen1-2/+2
The probe function may be probed deferal and called after .init section has freed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: fusb300_udc: delete __init marker for probePeter Chen1-1/+1
The probe function may be probed deferal and called after .init section has freed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: m66592-udc: delete __init marker for probePeter Chen1-1/+1
The probe function may be probed deferal and called after .init section has freed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: lpc32xx: delete __init marker for probePeter Chen1-1/+1
The probe function may be probed deferal and called after .init section has freed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: fsl_udc_core: delete __init marker for probePeter Chen1-3/+3
The probe function may be probed deferal and called after .init section has freed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: atmel_usba_udc: delete __init marker for probePeter Chen1-1/+1
The probe function may be probed deferal and called after .init section has freed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: Use kmemdup instead of kmalloc + memcpyBenoit Taine2-5/+2
This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/memdup.cocci Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: gadget: fsl_qe_udc: Introduce use of managed version of kzallocHimangi Saraogi1-12/+7
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, the unnecesary labels are removed and some labels are renamed to preserve ordering. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>