summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: composite: dequeue cdev->req before free it in ↵Li Jun2014-07-161-0/+1
| | | | | | | | | | composite_dev_cleanup 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>
* usb: gadget: NCM: Stop RX TCP Bursts getting dropped.Jim Baxter2014-07-101-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>
* usb: gadget: NCM: Add transmit multi-frame.Jim Baxter2014-07-103-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>
* usb: gadget: NCM: RX function support multiple NDPsJim Baxter2014-07-101-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>
* usb: gadget: fix eem_wrap cloned skb logicNathan Sullivan2014-07-101-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>
* usb: gadget: Convert drivers to use module_usb_composite_driver()Tobias Klauser2014-07-1010-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>
* usb: gadget: f_fs: OS descriptors supportAndrzej Pietrasiewicz2014-07-102-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>
* usb: gadget: u_os_desc: helper functions for accessing ext prop bufferAndrzej Pietrasiewicz2014-07-101-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>
* usb: gadget: f_fs: rename descriptor parsing functionsAndrzej Pietrasiewicz2014-07-101-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>
* usb: gadget: net2280: Fix typo on #ifdefRicardo Ribalda Delgado2014-07-101-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>
* usb: gadget: pxa25x_udc: use correct header for gpio devm_ functionsArnd Bergmann2014-07-101-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>
* usb: gadget: s3c2410: Move to clk_prepare_enable/clk_disable_unprepareVasily Khoruzhick2014-06-301-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>
* usb: gadget: FunctionFS: Return -ENOENT instead of -ENODEV when device not ↵Krzysztof Opasiak2014-06-302-3/+3
| | | | | | | | | | | | | | | | found. 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>
* usb: gadget: omap_udc: should not call gadget driver's .unbindPeter Chen2014-06-301-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>
* usb: gadget: net2272: do not need to judge gadget driver's .unbindPeter Chen2014-06-301-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>
* usb: gadget: m66592-udc: should not call gadget driver's .unbindPeter Chen2014-06-301-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>
* usb: gadget: fusb300_udc: should not call gadget driver's .unbindPeter Chen2014-06-301-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>
* usb: gadget: fsl_udc_core: should not call gadget driver's .unbindPeter Chen2014-06-301-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>
* usb: gadget: pxa27x_udc: prepare and unprepare the clockRobert Jarzmik2014-06-301-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>
* usb: gadget: net2280: Use quirks instead of pci idRicardo Ribalda Delgado2014-06-302-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>
* usb: gadget: net2280: Use pr_* functionRicardo Ribalda Delgado2014-06-302-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>
* usb: gadget: net2280: Code CleanupRicardo Ribalda Delgado2014-06-302-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>
* usb: gadget: net2280: Pass checkpacth.pl testRicardo Ribalda Delgado2014-06-302-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>
* usb: gadget: net2280: Refactor queues_showRicardo Ribalda Delgado2014-06-301-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>
* usb: gadget: net2280: Use module_pci_driver macroRicardo Ribalda Delgado2014-06-301-14/+5
| | | | | Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: net2280: Use true/false instead of 1/0Ricardo Ribalda Delgado2014-06-301-4/+4
| | | | | | | For bool variables Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: net2280: Use BIT() macroRicardo Ribalda Delgado2014-06-302-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>
* usb: gadget: net2280: Dont use magic numbersRicardo Ribalda Delgado2014-06-302-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>
* usb: gadget: net2280: Add support for PLX USB338XRicardo Ribalda Delgado2014-06-303-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>
* usb: gadget: r8a66597-udc: delete __init marker for probePeter Chen2014-06-301-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>
* usb: gadget: fusb300_udc: delete __init marker for probePeter Chen2014-06-301-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>
* usb: gadget: m66592-udc: delete __init marker for probePeter Chen2014-06-301-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>
* usb: gadget: lpc32xx: delete __init marker for probePeter Chen2014-06-301-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>
* usb: gadget: fsl_udc_core: delete __init marker for probePeter Chen2014-06-301-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>
* usb: gadget: atmel_usba_udc: delete __init marker for probePeter Chen2014-06-301-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>
* usb: gadget: Use kmemdup instead of kmalloc + memcpyBenoit Taine2014-06-302-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>
* usb: gadget: fsl_qe_udc: Introduce use of managed version of kzallocHimangi Saraogi2014-06-301-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>
* usb: gadget: r8a66597-udc: remove now unused clean_up and clean_up3 label.Ben Dooks2014-06-301-3/+2
| | | | | | | | | With the devm additions, the clean_up and clean_up3 are now not needed or used. Change clean_up3 and make everything use clean_up2 and just remove clean_up. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: use devm_request_irq() to get device irqBen Dooks2014-06-301-4/+2
| | | | | | | | Use the devm_request_irq() call to get the interrupt for the device and have it automatically free on exit. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: use devm_clk_get() to get clockBen Dooks2014-06-301-7/+3
| | | | | | | | Change to using the devm_clk_get() to get the clock and have it automatically freed on exit. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: cleanup error pathBen Dooks2014-06-301-7/+3
| | | | | | | | | With the updates for devm, the cleanup path no longer needs to check for NULL device state, so remove it and return directly if the irq resource missing Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: handle sudmac registers with devm_ioremap_resource()Ben Dooks2014-06-301-12/+3
| | | | | | | | Change the sudmac register handling in the devm_ioremap_resource to use the devm variant. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: use devm_kzalloc() to allocate driver stateBen Dooks2014-06-301-7/+3
| | | | | | | | | | | | Update driver to use devm_kzalloc() to make tracking of resources easier. Also remove the exit point via cleanup as there's no cleanup necessary from this point now. As a note, also removes the error print as the allocation calls produce errors if they do not return memory. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: keep dev as reference to &pdev->devBen Dooks2014-06-301-8/+8
| | | | | | | | | Remove usages of &pdev->dev in the driver probe function with just dev to make the references to it easier to write. Convert all the current users of it to use it. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: r8a66597-udc: use devm_ioremap_resource() for registersBen Dooks2014-06-301-15/+3
| | | | | | trivial patch removing boilerplate clode. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: lpc32xx_udc: Make of_device_id array constJingoo Han2014-06-301-1/+1
| | | | | | | | Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: gr_udc: Make of_device_id array constJingoo Han2014-06-301-1/+1
| | | | | | | | | Make of_device_id array const, because all OF functions handle it as const. Acked-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: pxa25x_udc: use devm_ functionsHimangi Saraogi2014-06-301-51/+22
| | | | | | | | | | | | | This patch introduces the use of devm_request_irq, devm_gpio_request, devm_clk_get etc. instead of the corresponding unmanaged interfaces. The calls to the functions like free_irq to free the allocated resources are removed as they are no longer required. Some labels in the probe function are also done away with and the name of the label err_gpio_pullup is changed to make it less specific to the context. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2014-06-121-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking updates from David Miller: 1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov. 2) Multiqueue support in xen-netback and xen-netfront, from Andrew J Benniston. 3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn Mork. 4) BPF now has a "random" opcode, from Chema Gonzalez. 5) Add more BPF documentation and improve test framework, from Daniel Borkmann. 6) Support TCP fastopen over ipv6, from Daniel Lee. 7) Add software TSO helper functions and use them to support software TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia. 8) Support software TSO in fec driver too, from Nimrod Andy. 9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli. 10) Handle broadcasts more gracefully over macvlan when there are large numbers of interfaces configured, from Herbert Xu. 11) Allow more control over fwmark used for non-socket based responses, from Lorenzo Colitti. 12) Do TCP congestion window limiting based upon measurements, from Neal Cardwell. 13) Support busy polling in SCTP, from Neal Horman. 14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru. 15) Bridge promisc mode handling improvements from Vlad Yasevich. 16) Don't use inetpeer entries to implement ID generation any more, it performs poorly, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits) rtnetlink: fix userspace API breakage for iproute2 < v3.9.0 tcp: fixing TLP's FIN recovery net: fec: Add software TSO support net: fec: Add Scatter/gather support net: fec: Increase buffer descriptor entry number net: fec: Factorize feature setting net: fec: Enable IP header hardware checksum net: fec: Factorize the .xmit transmit function bridge: fix compile error when compiling without IPv6 support bridge: fix smatch warning / potential null pointer dereference via-rhine: fix full-duplex with autoneg disable bnx2x: Enlarge the dorq threshold for VFs bnx2x: Check for UNDI in uncommon branch bnx2x: Fix 1G-baseT link bnx2x: Fix link for KR with swapped polarity lane sctp: Fix sk_ack_backlog wrap-around problem net/core: Add VF link state control policy net/fsl: xgmac_mdio is dependent on OF_MDIO net/fsl: Make xgmac_mdio read error message useful net_sched: drr: warn when qdisc is not work conserving ...
| * net: get rid of SET_ETHTOOL_OPSWilfried Klaebe2014-05-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud