aboutsummaryrefslogtreecommitdiff
path: root/arch/um/drivers
AgeCommit message (Collapse)AuthorFilesLines
2009-04-02uml: fix compile error from net_device_ops conversionMiklos Szeredi1-1/+1
Fix the following compile error: arch/um/drivers/net_kern.c: In function 'uml_inetaddr_event': arch/um/drivers/net_kern.c:760: error: 'struct net_device' has no member named 'open' This was introduced by commit 8bb95b39, "uml: convert network device to netdevice ops". Signed-off-by: Miklos Szeredi <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: David S. Miller <[email protected]> Cc: Jeff Dike <[email protected]> Reviewed-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01ubd_kern: make it 'struct hd_driveid'-freeBartlomiej Zolnierkiewicz1-6/+6
* Change ubd_id in ubd_ioctl() from 'struct hd_driveid *id' to 'u16 *id' and update driver accordingly. * Include <linux/ata.h> directly instead of through <linux/hdreg.h>. There should be no functional changes caused by this patch. Cc: Jeff Dike <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
2009-04-01uml: remove useless commentsWANG Cong5-50/+0
These comments are useless now, remove them. Signed-off-by: WANG Cong <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-01ubd: stop defintining MAJOR_NRChristoph Hellwig1-9/+8
MAJOR_NR isn't needed anymore since very early 2.5 kernels. [[email protected]: coding-style fixes] Signed-off-by: Christoph Hellwig <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-03-27uml: convert network device to netdevice opsStephen Hemminger1-7/+13
Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-03-27uml: convert network device to internal network device statsStephen Hemminger1-13/+6
Convert the UML network device to use internal network device stats. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-02-20uml: fix vde network backend in user mode linuxLuca Bigliardi1-3/+3
* Replace kmalloc() with uml_kmalloc() (fix build failure) * Remove unnecessary UM_KERN_INFO in printk() (don't display '<6>' while printing info) Signed-off-by: Luca Bigliardi <[email protected]> Cc: Jiri Kosina <[email protected]> Reviewed-by: WANG Cong <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-12-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6Linus Torvalds7-23/+18
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits) net: Allow dependancies of FDDI & Tokenring to be modular. igb: Fix build warning when DCA is disabled. net: Fix warning fallout from recent NAPI interface changes. gro: Fix potential use after free sfc: If AN is enabled, always read speed/duplex from the AN advertising bits sfc: When disabling the NIC, close the device rather than unregistering it sfc: SFT9001: Add cable diagnostics sfc: Add support for multiple PHY self-tests sfc: Merge top-level functions for self-tests sfc: Clean up PHY mode management in loopback self-test sfc: Fix unreliable link detection in some loopback modes sfc: Generate unique names for per-NIC workqueues 802.3ad: use standard ethhdr instead of ad_header 802.3ad: generalize out mac address initializer 802.3ad: initialize ports LACPDU from const initializer 802.3ad: remove typedef around ad_system 802.3ad: turn ports is_individual into a bool 802.3ad: turn ports is_enabled into a bool 802.3ad: make ntt bool ixgbe: Fix set_ringparam in ixgbe to use the same memory pools. ... Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due to the conversion to %pI (in this networking merge) and the addition of doing IPv6 addresses (from the earlier merge of CIFS).
2008-12-25Merge branch 'next' into for-linusJames Morris1-1/+2
2008-12-15Merge branch 'master' of ↵David S. Miller1-1/+3
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/e1000e/ich8lan.c
2008-12-10uml: boot broken due to buffer overrunBalbir Singh1-1/+3
mconsole_init() passed 256 bytes as length in os_create_unix_socket, while the sizeof UNIX_PATH_MAX is 108. This patch fixes that problem and avoids a big overrun bug reported on UML bootup. sockaddr_un.sun_path is UNIX_PATH_MAX long which causes the problem. Reported-by: Vikas K Managutte <[email protected]> Reported-by: Sarvesh Kumar Lal Das <[email protected]> Signed-off-by: Balbir Singh <[email protected]> Reviewed-by: Pekka Enberg <[email protected]> Reviewed-by: WANG Cong <[email protected]> Cc: Jeff Dike <[email protected]> Cc: <[email protected]> [please check with Jeff] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-12-04um: Kill directly reference of netdev->privWang Chen7-17/+17
Simply replace netdev->priv with netdev_priv(). Signed-off-by: Wang Chen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-11-14CRED: Pass credentials through dentry_open()David Howells1-1/+2
Pass credentials through dentry_open() so that the COW creds patch can have SELinux's flush_unauthorized_files() pass the appropriate creds back to itself when it opens its null chardev. The security_dentry_open() call also now takes a creds pointer, as does the dentry_open hook in struct security_operations. Signed-off-by: David Howells <[email protected]> Acked-by: James Morris <[email protected]> Signed-off-by: James Morris <[email protected]>
2008-10-27net: convert more to %pMJohannes Berg1-6/+1
A number of places still use %02x:...:%02x because it's in debug statements or for no real reason. Make a few of them use %pM. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-10-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdevLinus Torvalds1-10/+9
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits) [PATCH] kill the rest of struct file propagation in block ioctls [PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET [PATCH] get rid of blkdev_locked_ioctl() [PATCH] get rid of blkdev_driver_ioctl() [PATCH] sanitize blkdev_get() and friends [PATCH] remember mode of reiserfs journal [PATCH] propagate mode through swsusp_close() [PATCH] propagate mode through open_bdev_excl/close_bdev_excl [PATCH] pass fmode_t to blkdev_put() [PATCH] kill the unused bsize on the send side of /dev/loop [PATCH] trim file propagation in block/compat_ioctl.c [PATCH] end of methods switch: remove the old ones [PATCH] switch sr [PATCH] switch sd [PATCH] switch ide-scsi [PATCH] switch tape_block [PATCH] switch dcssblk [PATCH] switch dasd [PATCH] switch mtd_blkdevs [PATCH] switch mmc ...
2008-10-22x86, um: get rid of arch/um/os symlinkAl Viro1-0/+1
we can get DEV_NULL defined for arch/um/drivers/null.c in less convoluted ways, TYVM... Signed-off-by: Al Viro <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2008-10-21[PATCH] switch ubdAl Viro1-13/+12
ubd_ioctl() doesn't need BKL, so unlocked_ioctl() it becomes... Signed-off-by: Al Viro <[email protected]>
2008-10-21[PATCH] beginning of methods conversionAl Viro1-3/+3
To keep the size of changesets sane we split the switch by drivers; to keep the damn thing bisectable we do the following: 1) rename the affected methods, add ones with correct prototypes, make (few) callers handle both. That's this changeset. 2) for each driver convert to new methods. *ALL* drivers are converted in this series. 3) kill the old (renamed) methods. Note that it _is_ a flagday; all in-tree drivers are converted and by the end of this series no trace of old methods remain. The only reason why we do that this way is to keep the damn thing bisectable and allow per-driver debugging if anything goes wrong. New methods: open(bdev, mode) release(disk, mode) ioctl(bdev, mode, cmd, arg) /* Called without BKL */ compat_ioctl(bdev, mode, cmd, arg) locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */ Signed-off-by: Al Viro <[email protected]>
2008-10-13uml: small cleanups and note bugs to be dealt with by uml authors...Alan Cox1-0/+2
Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-30uml: fix tty-related build errorWANG Cong1-13/+1
/home/wangcong/Projects/linux-2.6/arch/um/drivers/line.c: In function `line_write_interrupt': /home/wangcong/Projects/linux-2.6/arch/um/drivers/line.c:366: error: `struct tty_ldisc' has no member named `write_wakeup' /home/wangcong/Projects/linux-2.6/arch/um/drivers/line.c:367: error: `struct tty_ldisc' has no member named `write_wakeup' Signed-off-by: WANG Cong <[email protected]> Cc: Jeff Dike <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-14Merge commit 'v2.6.26' into bkl-removalJonathan Corbet2-2/+1
2008-07-02uml-random: BKL pushdownArnd Bergmann1-0/+3
Signed-off-by: Arnd Bergmann <[email protected]>
2008-07-02uml-mmapper: BKL pushdownArnd Bergmann1-0/+2
Signed-off-by: Arnd Bergmann <[email protected]>
2008-07-02uml-harddog: BKL pushdownArnd Bergmann1-0/+3
Signed-off-by: Arnd Bergmann <[email protected]>
2008-06-06uml: remove a duplicate includeHuang Weiyi1-1/+0
Removed duplicated include file "kern_util.h" in arch/um/drivers/ubd_kern.c. Signed-off-by: Huang Weiyi <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-21missed kmalloc() in pcap_user.cAl Viro1-1/+1
Signed-off-by: Al Viro <[email protected]> Acked-by: Jeff Dike <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-13uml: style fixes in the random driverJeff Dike1-38/+41
Give random.c a style workover while I'm changing it. Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-13uml: random driver fixesJeff Dike1-4/+37
The random driver would essentially hang if the host's /dev/random returned -EAGAIN. There was a test of need_resched followed by a schedule inside the loop, but that didn't help and it's the wrong way to work anyway. The right way is to ask for an interrupt when there is input available from the host and handle it then rather than polling. Now, when the host's /dev/random returns -EAGAIN, the driver asks for a wakeup when there's randomness available again and sleeps. The interrupt routine just wakes up whatever processes are sleeping on host_read_wait. There is an atomic_t, host_sleep_count, which counts the number of processes waiting for randomness. When this reaches zero, the interrupt is disabled. An added complication is that async I/O notification was only recently added to /dev/random (by me), so essentially all hosts will lack it. So, we use the sigio workaround here, which is to have a separate thread poll on the descriptor and send an interrupt when there is input on it. This mechanism is activated when a process gets -EAGAIN (activating this multiple times is harmless, if a bit wasteful) and deactivated by the last process still waiting. The module name was changed from "random" to "hw_random" in order for udev to recognize it. The sigio workaround needed some changes. sigio_broken was added for cases when we know that async notification doesn't work. This is now called from maybe_sigio_broken, which deals with pts devices. Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-13uml: use DIV_ROUND_UPJiri Olsa1-2/+2
I just saw similar patches in the janitor kernel's list, and spotted place it fits. Signed-off-by: Jiri Olsa <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Cc: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-13uml: fix build when SLOB is enabledJeff Dike11-11/+13
Reintroduce uml_kmalloc for the benefit of UML libc code. The previous tactic of declaring __kmalloc so it could be called directly from the libc side of the house turned out to be getting too intimate with slab, and it doesn't work with slob. So, the uml_kmalloc wrapper is back. It calls kmalloc or whatever that translates into, and libc code calls it. kfree is left alone since that still works, leaving a somewhat inconsistent API. Signed-off-by: Jeff Dike <[email protected]> Cc: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-13uml: fix errno returnJohann Felix Soden1-1/+1
Error returns are negative. Signed-off-by: Johann Felix Soden <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Cc: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-08uml: fix inconsistence due to tty_operation changeWANG Cong1-2/+2
'put_char' of 'struct tty_operations' has changed from 'void' into 'int'. This can also shut up compiler warnings. Cc: Jeff Dike <[email protected]> Signed-off-by: WANG Cong <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-28uml: clean up arch/um/drivers/ubd_kern.cWANG Cong1-195/+190
Make some global functions and variables static. And remove some useless declarations for local functions, since we just need to move their definitions ahead. [[email protected]: checkpatch cleanups] Signed-off-by: WANG Cong <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-28uml: make several things staticWANG Cong3-7/+7
Make several things static, because they no longer need to be global. Acked-by: Jeff Dike <[email protected]> Signed-off-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-28uml: make three functions staticWANG Cong3-3/+3
Make the following three functions static, since they don't need to be global. arch/um/drivers/mcast_kern.c::mcast_setup() arch/um/drivers/mconsole_user.c::mconsole_reply_v0() arch/um/drivers/port_user.c::port_pre_exec() Acked-by: Jeff Dike <[email protected]> Signed-off-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-28uml: remove a useless functionWANG Cong1-13/+0
arch/um/drivers/chan_kern.c::chan_out_fd() is not used by anyone. Remove it. Acked-by: Jeff Dike <[email protected]> Signed-off-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-28uml: make a function staticWANG Cong1-1/+1
arch/um/drivers/chan_kern.c::open_chan() can become static. Acked-by: Jeff Dike <[email protected]> Signed-off-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-28uml: replace remaining __FUNCTION__ occurrencesHarvey Harrison1-1/+1
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-03-26[UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_listPatrick McHardy1-5/+1
IFF_ALLMULTI is an indication from the network stack to the driver to disable multicast filters, drivers should never set it directly. Since the UML networking device doesn't have any filtering capabilites, it doesn't the set_multicast_list function at all, it is kept so userspace can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-02-23uml: fix helper_wait calls in watchdogJohann Felix Soden1-2/+2
In commit 1aa351a308d2c3ddb92b6cc45083fc54271d0010 ("uml: tidy helper code") the arguments of helper_wait() were changed. The adaptation of harddog_user.c was forgotten, so this errors occur: /arch/um/drivers/harddog_user.c: In function 'start_watchdog': /arch/um/drivers/harddog_user.c:82: error: too many arguments to function 'helper_wait' /arch/um/drivers/harddog_user.c:89: error: too many arguments to function 'helper_wait' Signed-off-by: Johann Felix Soden <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-14Embed a struct path into struct nameidata instead of nd->{dentry,mnt}Jan Blunck1-3/+3
This is the central patch of a cleanup series. In most cases there is no good reason why someone would want to use a dentry for itself. This series reflects that fact and embeds a struct path into nameidata. Together with the other patches of this series - it enforced the correct order of getting/releasing the reference count on <dentry,vfsmount> pairs - it prepares the VFS for stacking support since it is essential to have a struct path in every place where the stack can be traversed - it reduces the overall code size: without patch series: text data bss dec hex filename 5321639 858418 715768 6895825 6938d1 vmlinux with patch series: text data bss dec hex filename 5320026 858418 715768 6894212 693284 vmlinux This patch: Switch from nd->{dentry,mnt} to nd->path.{dentry,mnt} everywhere. [[email protected]: coding-style fixes] [[email protected]: fix cifs] [[email protected]: fix smack] Signed-off-by: Jan Blunck <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]> Acked-by: Christoph Hellwig <[email protected]> Cc: Al Viro <[email protected]> Cc: Casey Schaufler <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: make mconsole_stack namespace-awareJeff Dike1-17/+18
Also fixed the include syntax while I was there. Signed-off-by: Jeff Dike <[email protected]> Cc: Pavel Emelyanov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: port mutex conversionDaniel Walker1-3/+4
The port_sem is already used as a mutex since it's using DECLARE_MUTEX(), but the underlying construct is still a semaphore .. This patch switches it over to a struct mutex. Signed-off-by: Daniel Walker <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: mconsole mutex conversionDaniel Walker1-3/+4
The plug_mem_mutex is already used as a mutex since it's using DECLARE_MUTEX(), but the underlying construct is still a semaphore .. This patch switches it over to a struct mutex. Signed-off-by: Daniel Walker <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: use of a public MAC is a warning, not an errorJeff Dike1-5/+4
Downgrade one of the MAC validity checks. If it's one that could be possibly assigned to a physical NIC, then nothing will break. So, emit a warning in this case, but keep the requested MAC. Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: fix infinite mconsole loopKarol Swietlicki1-1/+3
This patch takes care of a problem with the stopping code. The function inside the while condition returns 0 to signify a problem. A problem could be for example a bad command or a bad version of the mconsole client. A bad command would terminate the stopping loop and resume the kernel. This is a problem. A better solution is to make the loop infinite and don't leave it until we are explicitly told to. Signed-off-by: Karol Swietlicki <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: DEBUG_SHIRQ fixesJeff Dike2-4/+12
A couple more DEBUG_SHIRQ fixes. The previous mconsole blocking fix exposed the lack of O_NONBLOCK on the mconsole socket. Also, winch_interrupt started crashing because it is called at irq free time and it tries to dereference tty->driver_data, which has already been set to NULL. I added some error cleanup in mconsole_init while I was there. Cc: "Karol Swietlicki" <[email protected]> Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: remove fakehdJeff Dike1-16/+4
The fakehd switch lost its implementation at some point. Since no one is screaming for it, we might as well remove it. Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: SMP locking commentaryJeff Dike1-1/+6
Add some more commentary about various pieces of global data not needing locking. Also got rid of unmap_physmem since that is no longer used. Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-05uml: tidy helper codeJeff Dike3-3/+3
Style fixes to arch/um/os/helper.c and tidying up the breakpoint fix a bit. helper.c gets all the usual style fixes - updated copyright all printks get severities Also - errval changes to err in helper_child fixed an obsolete comment run_helper was killing a child process which is guaranteed to be dead or dying anyway Removed the nohang and pname arguments from helper_wait and fixed the declaration and callers. nohang was used only in the slirp driver and I don't think it was needed. I think pname was a bit of overkill in putting out an error message when something goes wrong. Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>