summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
AgeCommit message (Collapse)Author
2016-12-25ktime: Cleanup ktime_set() usageThomas Gleixner
ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds
This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-21Merge branch 'scsi-target-for-v4.10' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux Pull scsi target cleanups from Bart Van Assche: "The changes here are: - a few small bug fixes for the iSCSI and user space target drivers. - minimize the target build time by about 30% by rearranging #include directives - fix the second argument passed to percpu_ida_alloc() - reduce the number of false positive warnings reported by sparse These patches pass Wu Fengguang's build bot tests and also the linux-next tests" * 'scsi-target-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bvanassche/linux: iscsi-target: Return error if unable to add network portal target: Fix spelling mistake and unwrap multi-line text target/iscsi: Fix double free in lio_target_tiqn_addtpg() target/user: Fix use-after-free of tcmu_cmds if they are expired target: Minimize #include directives target/user: Add an #include directive cxgbit: Add an #include directive ibmvscsi_tgt: Add two #include directives sbp-target: Add an #include directive qla2xxx: Add an #include directive configfs: Minimize #include directives usb: gadget: Fix second argument of percpu_ida_alloc() sbp-target: Fix second argument of percpu_ida_alloc() target/user: Fix a data type in tcmu_queue_cmd() target: Use NULL instead of 0 to represent a pointer
2016-12-16Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs updates from Al Viro: - more ->d_init() stuff (work.dcache) - pathname resolution cleanups (work.namei) - a few missing iov_iter primitives - copy_from_iter_full() and friends. Either copy the full requested amount, advance the iterator and return true, or fail, return false and do _not_ advance the iterator. Quite a few open-coded callers converted (and became more readable and harder to fuck up that way) (work.iov_iter) - several assorted patches, the big one being logfs removal * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: logfs: remove from tree vfs: fix put_compat_statfs64() does not handle errors namei: fold should_follow_link() with the step into not-followed link namei: pass both WALK_GET and WALK_MORE to should_follow_link() namei: invert WALK_PUT logics namei: shift interpretation of LOOKUP_FOLLOW inside should_follow_link() namei: saner calling conventions for mountpoint_last() namei.c: get rid of user_path_parent() switch getfrag callbacks to ..._full() primitives make skb_add_data,{_nocache}() and skb_copy_to_page_nocache() advance only on success [iov_iter] new primitives - copy_from_iter_full() and friends don't open-code file_inode() ceph: switch to use of ->d_init() ceph: unify dentry_operations instances lustre: switch to use of ->d_init()
2016-12-14idr: add ida_is_emptyMatthew Wilcox
Two of the USB Gadgets were poking around in the internals of struct ida in order to determine if it is empty. Add the appropriate abstraction. Link: http://lkml.kernel.org/r/1480369871-5271-63-git-send-email-mawilcox@linuxonhyperv.com Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: Konstantin Khlebnikov <koct9i@gmail.com> Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Felipe Balbi <balbi@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-14Merge tag 'configfs-for-4.10' of git://git.infradead.org/users/hch/configfsLinus Torvalds
Pull configfs update from Christoph Hellwig: "Just one simple change from Andrzej to drop the pointless return value from the ->drop_link method" * tag 'configfs-for-4.10' of git://git.infradead.org/users/hch/configfs: fs: configfs: don't return anything from drop_link
2016-12-13Merge tag 'usb-4.10-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here's the big set of USB/PHY patches for 4.10-rc1. A number of new drivers are here in this set of changes. We have a new USB controller type "mtu3", a new usb-serial driver, and the usual churn in the gadget subsystem and the xhci host controller driver, along with a few other new small drivers added. And lots of little other changes all over the USB and PHY driver tree. Full details are in the shortlog All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (309 commits) USB: serial: option: add dlink dwm-158 USB: serial: option: add support for Telit LE922A PIDs 0x1040, 0x1041 USB: OHCI: nxp: fix code warnings USB: OHCI: nxp: remove useless extern declaration USB: OHCI: at91: remove useless extern declaration usb: misc: rio500: fix result type for error message usb: mtu3: fix U3 port link issue usb: mtu3: enable auto switch from U3 to U2 usbip: fix warning in vhci_hcd_probe/lockdep_init_map usb: core: usbport: Use proper LED API to fix potential crash usbip: add missing compile time generated files to .gitignore usb: hcd.h: construct hub class request constants from simpler constants USB: OHCI: ohci-pxa27x: remove useless functions USB: OHCI: omap: remove useless extern declaration USB: OHCI: ohci-omap: remove useless functions USB: OHCI: ohci-s3c2410: remove useless functions USB: cdc-acm: add device id for GW Instek AFG-125 fsl/usb: Workarourd for USB erratum-A005697 usb: hub: Wait for connection to be reestablished after port reset usbip: vudc: Refactor init_vudc_hw() to be more obvious ...
2016-12-09usb: gadget: Fix second argument of percpu_ida_alloc()Bart Van Assche
Pass a task state as second argument to percpu_ida_alloc(). Fixes: commit 71e7ae8e1fb2 ("usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Nicholas Bellinger <nab@linux-iscsi.org> Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-12-05[iov_iter] new primitives - copy_from_iter_full() and friendsAl Viro
copy_from_iter_full(), copy_from_iter_full_nocache() and csum_and_copy_from_iter_full() - counterparts of copy_from_iter() et.al., advancing iterator only in case of successful full copy and returning whether it had been successful or not. Convert some obvious users. *NOTE* - do not blindly assume that something is a good candidate for those unless you are sure that not advancing iov_iter in failure case is the right thing in this case. Anything that does short read/short write kind of stuff (or is in a loop, etc.) is unlikely to be a good one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-12-01fs: configfs: don't return anything from drop_linkAndrzej Pietrasiewicz
Documentation/filesystems/configfs/configfs.txt says: "When unlink(2) is called on the symbolic link, the source item is notified via the ->drop_link() method. Like the ->drop_item() method, this is a void function and cannot return failure." The ->drop_item() is indeed a void function, the ->drop_link() is actually not. This, together with the fact that the value of ->drop_link() is silently ignored suggests, that it is the ->drop_link() return type that should be corrected and changed to void. This patch changes drop_link() signature and all its users. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> [hch: reverted reformatting of some code] Signed-off-by: Christoph Hellwig <hch@lst.de>
2016-11-28Merge 4.9-rc7 into usb-nextGreg Kroah-Hartman
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
udplite conflict is resolved by taking what 'net-next' did which removed the backlog receive method assignment, since it is no longer necessary. Two entries were added to the non-priv ethtool operations switch statement, one in 'net' and one in 'net-next, so simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-18Merge tag 'usb-for-v4.10' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.10 merge window One big merge this time with a total of 166 non-merge commits. Most of the work, by far, is on dwc2 this time (68.2%) with dwc3 a far second (22.5%). The remaining 9.3% are scattered on gadget drivers. The most important changes for dwc2 are the peripheral side DMA support implemented by Synopsys folks and support for the new IOT dwc2 compatible core from Synopsys. In dwc3 land we have support for high-bandwidth, high-speed isochronous endpoints and some non-critical fixes for large scatter lists. Apart from these, we have our usual set of cleanups, non-critical fixes, etc.
2016-11-18usb: gadget: serial: fix possible Oops caused by calling kthread_stop(NULL)Felix Hädicke
Add check for NULL before calling kthread_stop(). There were cases in which gserial_console_exit() was called, but the console thread was not started. This resulted in an invalid kthread_stop(NULL) call. Without this, the following Oops may occur: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 IP: [<ffffffffb3ca1166>] kthread_stop+0x16/0x110 ... CPU: 2 PID: 853 Comm: rmmod Not tainted 4.9.0-rc5 #3 Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z77 Extreme3, BIOS P1.50 07/11/2013 task: ffff880419f6a100 task.stack: ffffc90002e8c000 RIP: 0010:[<ffffffffb3ca1166>] [<ffffffffb3ca1166>] kthread_stop+0x16/0x110 RSP: 0018:ffffc90002e8fdb0 EFLAGS: 00010286 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000246 RDI: 0000000000000000 RBP: ffffc90002e8fdc8 R08: 0000000000000000 R09: 0000000000000001 R10: 000000000000019d R11: 000000000000001f R12: 0000000000000000 R13: ffff88041b8d8400 R14: 0000000000000001 R15: 000055fd59f5a1e0 FS: 00007f82500be700(0000) GS:ffff88042f280000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000041bee2000 CR4: 00000000001406e0 Stack: 0000000000000000 ffffffffc0b8e720 ffff88041b8d8400 ffffc90002e8fdf0 ffffffffc0b8bb52 ffff88041a106300 0000000000000001 ffff880419fc2ea8 ffffc90002e8fe08 ffffffffc0aed749 ffffffffc0aef600 ffffc90002e8fe20 Call Trace: [<ffffffffc0b8bb52>] gserial_free_line+0x72/0xb0 [u_serial] [<ffffffffc0aed749>] acm_free_instance+0x19/0x30 [usb_f_acm] [<ffffffffc0b01b40>] usb_put_function_instance+0x20/0x30 [libcomposite] [<ffffffffc04a603b>] gs_unbind+0x3b/0x70 [g_serial] [<ffffffffc0b018d1>] __composite_unbind+0x61/0xb0 [libcomposite] [<ffffffffc0b01933>] composite_unbind+0x13/0x20 [libcomposite] [<ffffffffc08ef1ad>] usb_gadget_remove_driver+0x3d/0x90 [udc_core] [<ffffffffc08ef26e>] usb_gadget_unregister_driver+0x6e/0xc0 [udc_core] [<ffffffffc0aff6d2>] usb_composite_unregister+0x12/0x20 [libcomposite] [<ffffffffc04a6268>] cleanup+0x10/0xda8 [g_serial] [<ffffffffb3d0c0c2>] SyS_delete_module+0x192/0x270 [<ffffffffb3c032a0>] ? exit_to_usermode_loop+0x90/0xb0 [<ffffffffb4228a3b>] entry_SYSCALL_64_fastpath+0x1e/0xad Code: 89 c6 e8 6e ff ff ff 48 89 df e8 06 bd fd ff 5b 5d c3 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 49 89 fc 53 0f 1f 44 00 00 <f0> 41 ff 44 24 18 4c 89 e7 e8 bc f1 ff ff 48 85 c0 48 89 c3 74 RIP [<ffffffffb3ca1166>] kthread_stop+0x16/0x110 RSP <ffffc90002e8fdb0> CR2: 0000000000000018 ---[ end trace 5b3336a407e1698c ]--- Signed-off-by: Felix Hädicke <felixhaedicke@web.de> Tested-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-18usb: gadget: Fix checkpatch error for bracesAnson Jacob
Fix error message by checkpath.pl open brace '{' following struct/enum go on the same line Patch applied by running fix inplace capability of checkpatch: checkpatch.pl -f *.[ch] --types OPEN_BRACE --fix-inplace Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-18usb: gadget: f_uac2: fix error handling at afunc_bindPeter Chen
The current error handling flow uses incorrect goto label, fix it Cc: <stable@vger.kernel.org> Fixes: d12a8727171c ("usb: gadget: function: Remove redundant usb_free_all_descriptors") Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-18usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match()Felix Hädicke
Properly check the return code of ffs_func_revmap_intf() and ffs_func_revmap_ep() for a non-negative value. Instead of checking the return code, the comparison was performed for the last parameter of the function calls, because of wrong parenthesis. This also fixes the following static checker warning: drivers/usb/gadget/function/f_fs.c:3152 ffs_func_req_match() warn: always true condition '(((creq->wIndex)) >= 0) => (0-u16max >= 0)' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felix Hädicke <felixhaedicke@web.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Several cases of bug fixes in 'net' overlapping other changes in 'net-next-. Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-14Merge 4.9-rc5 into usb-nextGreg Kroah-Hartman
We want/need the USB fixes in here as well, for testing and merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-08usb: gadget: f_hid add super speed supportJanusz Dziedzic
Add super speed descriptors to f_hid. Signed-off-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-08usb: gadget: mv_u3d: mv_u3d_start_queue() refactoringAlexey Khoroshilov
The patch improves readability of mv_u3d_start_queue() by rearranging its code with two semantic modifications: - assignment zero to ep->processing if usb_gadget_map_request() fails; - propagation of error code from mv_u3d_req_to_trb() instead of hardcoded -ENOMEM. Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-08usb: gadget: mv_u3d: add check for dma mapping errorAlexey Khoroshilov
mv_u3d_req_to_trb() does not check for dma mapping errors. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: NCM: differentiate consumed packets from dropped packetsTorsten Polle
dev_kfree_skb_any() is used to free packets that are dropped by the network stack. Therefore the function should not be used for packets that have been successfully processed by the network stack. Instead dev_consume_skb_any() has to be used for such consumed packets. This separation helps to identify dropped packets. Signed-off-by: Torsten Polle <tpolle@de.adit-jv.com> Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: u_ether: link socket buffers to the device for received packetsTorsten Polle
Socket buffers should be linked to the (network) device that allocated the buffers. __netdev_alloc_skb performs this task. Signed-off-by: Torsten Polle <tpolle@de.adit-jv.com> Signed-off-by: Jim Baxter <jim_baxter@mentor.com> Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: NCM: link socket buffers to the device for tx packetsTorsten Polle
Socket buffers should be linked to the (network) device that allocated the buffers. Signed-off-by: Torsten Polle <tpolle@de.adit-jv.com> Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: f_fs: use complete() instead complete_all()Daniel Wagner
There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context reinit_completion() usb_esp_queue() wait_for_completion_interruptible() ffs_ep0_complete() complete() Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Cc: Felipe Balbi <balbi@kernel.org> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: Convert pr_warning to pr_warnJoe Perches
Use the more common logging mechanism. Miscellanea: o Realign multiline statements o Coalesce format Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: composite: use kasprintf() instead of open coding itJuergen Gross
Let's not reimplement generic kernel helpers, instead call kasprintf(). [ felipe.balbi@linux.intel.com: better commit log ] Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: mv: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: fsl: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Li Yang <leoli@freescale.com> Cc: <linuxppc-dev@lists.ozlabs.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: s3c2410: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: net2280: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: net2272: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: dummy: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: bdc: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Ashwini Pahuja <ashwini.linux@gmail.com> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: atmel: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: composite: remove unnecessary & operationFelipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: mv_udc: make use of new usb_endpoint_maxp_mult()Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult()Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: fusb300: make use of new usb_endpoint_maxp_mult()Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult()Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Li Yang <leoli@freescale.com> Cc: <linuxppc-dev@lists.ozlabs.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: dummy: make use of new usb_endpoint_maxp_mult()Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: bdc: make use of new usb_endpoint_maxp_mult()Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Ashwini Pahuja <ashwini.linux@gmail.com> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-03usb: gadget: udc: atmel: make use of new usb_endpoint_maxp_mult()Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-11-01usb: gadget: u_ether: remove interrupt throttlingFelipe Balbi
According to Dave Miller "the networking stack has a hard requirement that all SKBs which are transmitted must have their completion signalled in a fininte amount of time. This is because, until the SKB is freed by the driver, it holds onto socket, netfilter, and other subsystem resources." In summary, this means that using TX IRQ throttling for the networking gadgets is, at least, complex and we should avoid it for the time being. Cc: <stable@vger.kernel.org> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Suggested-by: David Miller <davem@davemloft.net> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-10-31usb: gadget: composite: always set ep->mult to a sensible valueFelipe Balbi
ep->mult is supposed to be set to Isochronous and Interrupt Endapoint's multiplier value. This value is computed from different places depending on the link speed. If we're dealing with HighSpeed, then it's part of bits [12:11] of wMaxPacketSize. This case wasn't taken into consideration before. While at that, also make sure the ep->mult defaults to one so drivers can use it unconditionally and assume they'll never multiply ep->maxpacket to zero. Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-10-31usb: gadget: composite: correctly initialize ep->maxpacketFelipe Balbi
usb_endpoint_maxp() returns wMaxPacketSize in its raw form. Without taking into consideration that it also contains other bits reserved for isochronous endpoints. This patch fixes one occasion where this is a problem by making sure that we initialize ep->maxpacket only with lower 10 bits of the value returned by usb_endpoint_maxp(). Note that seperate patches will be necessary to audit all call sites of usb_endpoint_maxp() and make sure that usb_endpoint_maxp() only returns lower 10 bits of wMaxPacketSize. Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-10-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Mostly simple overlapping changes. For example, David Ahern's adjacency list revamp in 'net-next' conflicted with an adjacency list traversal bug fix in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-30Merge 4.9-rc3 into usb-nextGreg Kroah-Hartman
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-24usb: Convert pr_warning to pr_warnJoe Perches
Use the more common logging mechanism. Miscellanea: o Realign multiline statements o Coalesce format Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>