/* * Copyright (C) 2003-2008 Takahiro Hirofuchi * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ #ifndef __USBIP_STUB_H #define __USBIP_STUB_H #include #include #include #include #include #include #define STUB_BUSID_OTHER 0 #define STUB_BUSID_REMOV 1 #define STUB_BUSID_ADDED 2 #define STUB_BUSID_ALLOC 3 struct stub_device { struct usb_device *udev; struct usbip_device ud; __u32 devid; /* * stub_priv preserves private data of each urb. * It is allocated as stub_priv_cache and assigned to urb->context. * * stub_priv is always linked to any one of 3 lists; * priv_init: linked to this until the comletion of a urb. * priv_tx : linked to this after the completion of a urb. * priv_free: linked to this after the sending of the result. * * Any of these list operations should be locked by priv_lock. */ spinlock_t priv_lock; struct list_head priv_init; struct list_head priv_tx; struct list_head priv_free; /* see comments for unlinking in stub_rx.c */ struct list_head unlink_tx; struct list_head unlink_free; wait_queue_head_t tx_waitq; }; /* private data into urb->priv */ struct stub_priv { unsigned long seqnum; struct list_head list; struct stub_device *sdev; struct urb *urb; int unlinking; }; struct stub_unlink { unsigned long seqnum; struct list_head list; __u32 status; }; /* same as SYSFS_BUS_ID_SIZE */ #define BUSID_SIZE 32 struct bus_id_priv { char name[BUSID_SIZE]; char status; int interf_count; struct stub_device *sdev; struct usb_device *udev; char shutdown_busid; }; /* stub_priv is allocated from stub_priv_cache */ extern struct kmem_cache *stub_priv_cache; /* stub_dev.c */ extern struct usb_device_driver stub_driver; /* stub_main.c */ struct bus_id_priv *get_busid_priv(const char *busid); int del_match_busid(char *busid); void stub_device_cleanup_urbs(struct stub_device *sdev); /* stub_rx.c */ int stub_rx_loop(void *data); /* stub_tx.c */ void stub_enqueue_ret_unlink(struct stub_device *sdev, __u32 seqnum, __u32 status); void stub_complete(struct urb *urb); int stub_tx_loop(void *data); #endif /* __USBIP_STUB_H */ on
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 13:49:57 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 13:49:57 -0800
commit5645688f9d0d5a32f030f9c5429e1a58bedca23b (patch)
tree0b576ba953fb26d521c6b8c3364848acb00ceef3 /Documentation
parent4ade5b2268b9ff05e48a9cb99689c4fd15fbe9c3 (diff)
parent53938ee427bf27525a63721b7e25d86b8f31f161 (diff)
Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 asm updates from Ingo Molnar: "The main changes in this development cycle were: - a large number of call stack dumping/printing improvements: higher robustness, better cross-context dumping, improved output, etc. (Josh Poimboeuf) - vDSO getcpu() performance improvement for future Intel CPUs with the RDPID instruction (Andy Lutomirski) - add two new Intel AVX512 features and the CPUID support infrastructure for it: AVX512IFMA and AVX512VBMI. (Gayatri Kammela, He Chen) - more copy-user unification (Borislav Petkov) - entry code assembly macro simplifications (Alexander Kuleshov) - vDSO C/R support improvements (Dmitry Safonov) - misc fixes and cleanups (Borislav Petkov, Paul Bolle)" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits) scripts/decode_stacktrace.sh: Fix address line detection on x86 x86/boot/64: Use defines for page size x86/dumpstack: Make stack name tags more comprehensible selftests/x86: Add test_vdso to test getcpu() x86/vdso: Use RDPID in preference to LSL when available x86/dumpstack: Handle NULL stack pointer in show_trace_log_lvl() x86/cpufeatures: Enable new AVX512 cpu features x86/cpuid: Provide get_scattered_cpuid_leaf() x86/cpuid: Cleanup cpuid_regs definitions x86/copy_user: Unify the code by removing the 64-bit asm _copy_*_user() variants x86/unwind: Ensure stack grows down x86/vdso: Set vDSO pointer only after success x86/prctl/uapi: Remove #ifdef for CHECKPOINT_RESTORE x86/unwind: Detect bad stack return address x86/dumpstack: Warn on stack recursion x86/unwind: Warn on bad frame pointer x86/decoder: Use stderr if insn sanity test fails x86/decoder: Use stdout if insn decoder test is successful mm/page_alloc: Remove kernel address exposure in free_reserved_area() x86/dumpstack: Remove raw stack dump ...
Diffstat (limited to 'Documentation')