- 02 1月, 2017 1 次提交
-
-
由 Vincent Pelletier 提交于
When FUNCTIONFS_EVENTFD flag is set, __ffs_data_got_descs reads a 32bits, little-endian value right after the fixed structure header, and passes it to eventfd_ctx_fdget. Document this. Also, rephrase a comment to be affirmative about the role of string descriptor at index 0. Ref: USB 2.0 spec paragraph "9.6.7 String", and also checked to still be current in USB 3.0 spec paragraph "9.6.9 String". Signed-off-by: NVincent Pelletier <plr.vincent@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 26 12月, 2016 1 次提交
-
-
由 Thomas 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: NThomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
-
- 15 12月, 2016 1 次提交
-
-
由 Matthew 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.comSigned-off-by: NMatthew Wilcox <willy@linux.intel.com> Acked-by: NKonstantin Khlebnikov <koct9i@gmail.com> Tested-by: NKirill 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: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 10 12月, 2016 1 次提交
-
-
由 Bart Van Assche 提交于
Pass a task state as second argument to percpu_ida_alloc(). Fixes: commit 71e7ae8e ("usb-gadget/tcm: Conversion to percpu_ida tag pre-allocation") Signed-off-by: NBart 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>
-
- 06 12月, 2016 1 次提交
-
-
由 Al 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: NAl Viro <viro@zeniv.linux.org.uk>
-
- 01 12月, 2016 1 次提交
-
-
由 Andrzej 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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> [hch: reverted reformatting of some code] Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 18 11月, 2016 4 次提交
-
-
由 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: NFelix Hädicke <felixhaedicke@web.de> Tested-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Anson 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: NAnson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Peter Chen 提交于
The current error handling flow uses incorrect goto label, fix it Cc: <stable@vger.kernel.org> Fixes: d12a8727 ("usb: gadget: function: Remove redundant usb_free_all_descriptors") Signed-off-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 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: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NFelix Hädicke <felixhaedicke@web.de> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 08 11月, 2016 1 次提交
-
-
由 Janusz Dziedzic 提交于
Add super speed descriptors to f_hid. Signed-off-by: NJanusz Dziedzic <januszx.dziedzic@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 03 11月, 2016 5 次提交
-
-
由 Torsten 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: NTorsten Polle <tpolle@de.adit-jv.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Torsten Polle 提交于
Socket buffers should be linked to the (network) device that allocated the buffers. __netdev_alloc_skb performs this task. Signed-off-by: NTorsten Polle <tpolle@de.adit-jv.com> Signed-off-by: NJim Baxter <jim_baxter@mentor.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Torsten Polle 提交于
Socket buffers should be linked to the (network) device that allocated the buffers. Signed-off-by: NTorsten Polle <tpolle@de.adit-jv.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 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: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NDaniel 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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Joe Perches 提交于
Use the more common logging mechanism. Miscellanea: o Realign multiline statements o Coalesce format Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 01 11月, 2016 1 次提交
-
-
由 Felipe 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: NVille Syrjälä <ville.syrjala@linux.intel.com> Tested-by: NVille Syrjälä <ville.syrjala@linux.intel.com> Suggested-by: NDavid Miller <davem@davemloft.net> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 31 10月, 2016 1 次提交
-
-
由 Felipe 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: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 24 10月, 2016 1 次提交
-
-
由 Joe Perches 提交于
Use the more common logging mechanism. Miscellanea: o Realign multiline statements o Coalesce format Signed-off-by: NJoe Perches <joe@perches.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 21 10月, 2016 1 次提交
-
-
由 Jarod Wilson 提交于
firewire-net: - set min/max_mtu - remove fwnet_change_mtu nes: - set max_mtu - clean up nes_netdev_change_mtu xpnet: - set min/max_mtu - remove xpnet_dev_change_mtu hippi: - set min/max_mtu - remove hippi_change_mtu batman-adv: - set max_mtu - remove batadv_interface_change_mtu - initialization is a little async, not 100% certain that max_mtu is set in the optimal place, don't have hardware to test with rionet: - set min/max_mtu - remove rionet_change_mtu slip: - set min/max_mtu - streamline sl_change_mtu um/net_kern: - remove pointless ndo_change_mtu hsi/clients/ssi_protocol: - use core MTU range checking - remove now redundant ssip_pn_set_mtu ipoib: - set a default max MTU value - Note: ipoib's actual max MTU can vary, depending on if the device is in connected mode or not, so we'll just set the max_mtu value to the max possible, and let the ndo_change_mtu function continue to validate any new MTU change requests with checks for CM or not. Note that ipoib has no min_mtu set, and thus, the network core's mtu > 0 check is the only lower bounds here. mptlan: - use net core MTU range checking - remove now redundant mpt_lan_change_mtu fddi: - min_mtu = 21, max_mtu = 4470 - remove now redundant fddi_change_mtu (including export) fjes: - min_mtu = 8192, max_mtu = 65536 - The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to get past the core net MTU range checks so fjes_change_mtu can validate a new MTU against what it supports (see fjes_support_mtu in fjes_hw.c) hsr: - min_mtu = 0 (calls ether_setup, max_mtu is 1500) f_phonet: - min_mtu = 6, max_mtu = 65541 u_ether: - min_mtu = 14, max_mtu = 15412 phonet/pep-gprs: - min_mtu = 576, max_mtu = 65530 - remove redundant gprs_set_mtu CC: netdev@vger.kernel.org CC: linux-rdma@vger.kernel.org CC: Stefan Richter <stefanr@s5r6.in-berlin.de> CC: Faisal Latif <faisal.latif@intel.com> CC: linux-rdma@vger.kernel.org CC: Cliff Whickman <cpw@sgi.com> CC: Robin Holt <robinmholt@gmail.com> CC: Jes Sorensen <jes@trained-monkey.org> CC: Marek Lindner <mareklindner@neomailbox.ch> CC: Simon Wunderlich <sw@simonwunderlich.de> CC: Antonio Quartulli <a@unstable.cc> CC: Sathya Prakash <sathya.prakash@broadcom.com> CC: Chaitra P B <chaitra.basappa@broadcom.com> CC: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com> CC: MPT-FusionLinux.pdl@broadcom.com CC: Sebastian Reichel <sre@kernel.org> CC: Felipe Balbi <balbi@kernel.org> CC: Arvid Brodin <arvid.brodin@alten.se> CC: Remi Denis-Courmont <courmisch@gmail.com> Signed-off-by: NJarod Wilson <jarod@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 17 10月, 2016 3 次提交
-
-
由 Michal Nazarewicz 提交于
ffs_func_eps_disable is called from atomic context so it cannot sleep thus cannot grab a mutex. Change the handling of epfile->read_buffer to use non-sleeping synchronisation method. Reported-by: NChen Yu <chenyu56@huawei.com> Signed-off-by: NMichał Nazarewicz <mina86@mina86.com> Fixes: 9353afbb ("buffer data from ‘oversized’ OUT requests") Tested-by: NJohn Stultz <john.stultz@linaro.org> Tested-by: NChen Yu <chenyu56@huawei.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Michal Nazarewicz 提交于
epfile->ep is protected by ffs->eps_lock (not epfile->mutex) so clear it while holding the spin lock. Tested-by: NJohn Stultz <john.stultz@linaro.org> Tested-by: NChen Yu <chenyu56@huawei.com> Signed-off-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
If we don't guarantee that we will always get an interrupt at least when we're queueing our very last request, we could fall into situation where we queue every request with 'no_interrupt' set. This will cause the link to get stuck. The behavior above has been triggered with g_ether and dwc3. Cc: <stable@vger.kernel.org> Reported-by: NVille Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 28 9月, 2016 1 次提交
-
-
由 Deepa Dinamani 提交于
CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_time() instead. CURRENT_TIME is also not y2038 safe. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_time(). Also, current_time() will be transitioned along with vfs to be y2038 safe. Note that whenever a single call to current_time() is used to change timestamps in different inodes, it is because they share the same time granularity. Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NFelipe Balbi <balbi@kernel.org> Acked-by: NSteven Whitehouse <swhiteho@redhat.com> Acked-by: NRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Acked-by: NDavid Sterba <dsterba@suse.com> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 19 9月, 2016 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
This reverts commit c9ffc787 as it was reported to be broken. Cc: Felipe Balbi <felipe.balbi@linux.intel.com> Cc: Jim Baxter <jim_baxter@mentor.com> Cc: Harish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 9月, 2016 3 次提交
-
-
由 Harish Jenny K N 提交于
This commit incorporates findings from https://lkml.org/lkml/2016/4/25/594 The function has been modified to make sure we hold the dev lock when accessing the net device pointer. Acked-by: NJim Baxter <jim_baxter@mentor.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Harish Jenny K N 提交于
dev->port_usb is checked for null pointer previously, so dev->port_usb might be null during no zlp check, fix it by adding null pointer check. Acked-by: NJim Baxter <jim_baxter@mentor.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Colin Ian King 提交于
the if statement in lb_modinit is unnecessary so we can totally remove the variable ret and just return the return value from the call to usb_function_register. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 08 9月, 2016 1 次提交
-
-
由 Jim Baxter 提交于
The struct ffs_data::private_data has a pointer to ffs_dev stored in it during the ffs_fs_mount() function however it is not cleared when the ffs_dev is freed later which causes the ffs_closed function to crash with "Unable to handle kernel NULL pointer dereference" error when using the data in ffs_data::private_data. This clears this pointer during the ffs_free_dev clean up function. Signed-off-by: NJim Baxter <jim_baxter@mentor.com> Signed-off-by: NJiada Wang <jiada_wang@mentor.com> Signed-off-by: NHarish Jenny K N <harish_kandiga@mentor.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 06 9月, 2016 1 次提交
-
-
由 Colin Ian King 提交于
An earlier fix partially fixed the null pointer dereference on skb->len by moving the assignment of len after the check on skb being non-null, however it failed to remove the erroneous dereference when assigning len. Correctly fix this by removing the initialisation of len as was originally intended. Fixes: 70237dc8 ("usb: gadget: function: f_eem: socket buffer may be NULL") Acked-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 31 8月, 2016 3 次提交
-
-
由 Petr Cvek 提交于
Some UVC commands require additional data (non zero uvc->event_length). Add usb_ep_queue() call, so uvc_function_ep0_complete() can be called and send received data to the userspace. Signed-off-by: NPetr Cvek <petr.cvek@tul.cz> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Yoshihiro Shimoda 提交于
This patch adds to support no_skb_reserve function to improve performance for some platforms. About the detail, please refer to the commit log of "quirk_avoids_skb_reserve" in include/linux/usb/gadget.h. Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Yoshihiro Shimoda 提交于
This patch adds a flag "no_skb_reserve" in struct eth_dev. So, if a peripheral driver sets the quirk_avoids_skb_reserve flag, upper network gadget drivers (e.g. f_ncm.c) can avoid skb_reserve() calling using the flag as well. Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 25 8月, 2016 7 次提交
-
-
由 Felipe F. Tonello 提交于
Use gadget's framework allocation function instead of directly calling usb_ep_alloc_request(). Signed-off-by: NFelipe F. Tonello <eu@felipetonello.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe F. Tonello 提交于
We should always use free_ep_req() when allocating requests with alloc_ep_req(). Signed-off-by: NFelipe F. Tonello <eu@felipetonello.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe F. Tonello 提交于
The default_length parameter of alloc_ep_req was not really necessary and gadget drivers would almost always create an inline function to pass the same value to len and default_len. This patch removes that parameter and updates all calls to alloc_ep_req() to use the new API. Signed-off-by: NFelipe F. Tonello <eu@felipetonello.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felix Hädicke 提交于
Introduces a new FunctionFS descriptor flag named FUNCTIONFS_CONFIG0_SETUP. When this flag is enabled, FunctionFS userspace drivers can process non-standard control requests in configuration 0. Signed-off-by: NFelix Hädicke <felixhaedicke@web.de> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felix Hädicke 提交于
It can sometimes be necessary for gadget drivers to process non-standard control requests, which host devices can send without having sent USB_REQ_SET_CONFIGURATION. Therefore, the req_match() usb_function method is enhanced with the new parameter "config0". When a USB configuration is active, this parameter is false. When a non-core control request is processed in composite_setup(), without an active configuration, req_match() of the USB functions of all available configurations which implement this function, is called with config0=true. Then the control request gets processed by the first usb_function instance whose req_match() returns true. Signed-off-by: NFelix Hädicke <felixhaedicke@web.de> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felix Hädicke 提交于
Introduces a new FunctionFS descriptor flag named FUNCTIONFS_ALL_CTRL_RECIP. When this flag is enabled, control requests, which are not explicitly directed to an interface or endpoint, can be handled. This allows FunctionFS userspace drivers to process non-standard control requests. Signed-off-by: NFelix Hädicke <felixhaedicke@web.de> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Johannes Berg 提交于
Even if the /dev/hidg* chardev is automatically created, one has to guess which one belongs to which function. In the case of multiple HID functions, or maybe even multiple peripherals, this becomes difficult. Add the dev (with major and minor number) to configfs to allow looking up (or even creating) the right device node for each function. This file is read-only. Signed-off-by: NJohannes Berg <johannes@sipsolutions.net> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-