aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2008-02-01PCI: drivers/pci/rom.c: #if 0 two functionsAdrian Bunk
This patch #if 0's the following unused global functions: - rom.c: pci_map_rom_copy() - rom.c: pci_remove_rom() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01PCI: make pci_restore_bars() staticAdrian Bunk
This patch makes the needlessly global pci_restore_bars() static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (100 commits) ide: move hwif_register() call out of ide_probe_port() ide: factor out code for tuning devices from ide_probe_port() ide: move handling of I/O resources out of ide_probe_port() ide: make probe_hwif() return an error value ide: use ide_remove_port_from_hwgroup in init_irq() ide: prepare init_irq() for using ide_remove_port_from_hwgroup() ide: factor out code removing port from hwgroup from ide_unregister() ide: I/O resources are released too early in ide_unregister() ide: cleanup ide_system_bus_speed() ide: remove needless zeroing of hwgroup fields from init_irq() ide: remove unused ide_hwgroup_t fields ide_platform: remove struct hwif_prop ide: remove hwif->present manipulations from hwif_init() ide: move wait_hwif_ready() documentation in the right place ide: fix handling of busy I/O resources in probe_hwif() <linux/hdsmart.h> is not used by kernel code ide: don't include <linux/hdsmart.h> ide-floppy: cleanup header ide: update/add my Copyrights ide: delete filenames/versions from comments ...
2008-02-01USB: fix codingstyle issues in include/linux/usb/Greg Kroah-Hartman
Fixes a number of coding style issues in the USB public header files. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: fix codingstyle issues in include/linux/usb.hGreg Kroah-Hartman
No logical code changes were made, but checkpatch.pl is much happier now. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: stop io performed by mos7720 upon close()Oliver Neukum
This fixes a problem where the mos7720 driver will make io to a device from which it has been logically disconnected. It does so by introducing a flag by which the generic usb serial code can signal the subdrivers their disconnection and appropriate locking. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: at91_udc uses generic GPIO calls; minor cleanupDavid Brownell
Various small at91_udc cleanups: - Use generic GPIO calls, not older platform-specific ones - Use gpio_request()/gpio_free() - Use VERBOSE_DEBUG convention, not older VERBOSE - Fix sparse complaint about parameter type (changed to gfp_t) - Add missing newline to some rarely-seen debug messages - Fix some old cleanup bugs on probe() fault paths Also add a mechanism whereby rm9200 gpios can drive the D+ pullup through an inverting transistor, based on a patch from Steve Birtles. Most UDC drivers supporting a GPIO based pullup should probably have such an option, but testing it requries such a board in hand! Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Steve Birtles <arm_kernel_development@micromark.net.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: Export suspend statisticsSarah Sharp
This patch exports two statistics to userspace: /sys/bus/usb/device/.../power/connected_duration /sys/bus/usb/device/.../power/active_duration connected_duration is the total time (in msec) that the device has been connected. active_duration is the total time the device has not been suspended. With these two statistics, tools like PowerTOP can calculate the percentage time that a device is active, i.e. not suspended or auto-suspended. Users can also use the active_duration to check if a device is actually autosuspended. Currently, they can set power/level to auto and power/autosuspend to a positive timeout, but there's no way to know from userspace if a device was actually autosuspended without looking at the dmesg output. These statistics will be useful in creating an automated userspace script to test autosuspend for USB devices. Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usbdevfs_urb: __user annotationMarcin Slusarz
fix warning: drivers/usb/core/devio.c:1226:20: warning: incorrect type in assignment (different address spaces) drivers/usb/core/devio.c:1226:20: expected void *usercontext drivers/usb/core/devio.c:1226:20: got void [noderef] <asn:1>* Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: gadget: pxa2xx_udc supports inverted vbusDmitry Baryshkov
Some boards (like e.g. Tosa) invert the VBUS-detection signal: it's low when a host is supplying VBUS, and high otherwise. Allow specifying whether gpio_vbus value is inverted. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: linux/usb/Kbuild needs only "header-y", not "unifdef-y"Robert P. J. Day
Given that none of the referenced header files test the proprocessor conditional __KERNEL__, there's no point "unifdef"fing them. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usb_serial: clean tty reference in the last closeAristeu Rozanski
When a usb serial adapter is used as console, the usb serial console driver bumps the open_count on the port struct used but doesn't attach a real tty to it (only a fake one temporaly). If this port is opened later using the regular character device interface, the open method won't initialize the port, which is the expected, and will receive a brand new tty struct created by tty layer, which will be stored in port->tty. When the last close is issued, open_count won't be 0 because of the console usage and the port->tty will still contain the old tty value. This is the last ttyUSB<n> close so the allocated tty will be freed by the tty layer. The usb_serial and usb_serial_port are still in use by the console, so port_free() won't be called (serial_close() -> usb_serial_put() -> destroy_serial() -> port_free()), so the scheduled work (port->work, usb_serial_port_work()) will still run. And usb_serial_port_work() does: (...) tty = port->tty; if (!tty) return; tty_wakeup(tty); which causes (manually copied): Faulting instruction address: 0x6b6b6b68 Oops: Kernel access of bad area, sig: 11 [#1] PREEMPT PowerMac Modules linked in: binfmt_misc ipv6 nfs lockd nfs_acl sunrpc dm_snapshot dm_mirror dm_mod hfsplus uinput ams input_polldev genrtc cpufreq_powersave i2c_powermac therm_adt746x snd_aoa_codec_tas snd_aoa_fabric_layout snd_aoa joydev snd_aoa_i2sbus snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc pmac_zilog serial_core evdev ide_cd cdrom snd appletouch soundcore snd_aoa_soundbus bcm43xx firmware_class usbhid ieee80211softmac ff_memless firewire_ohci firewire_core ieee80211 ieee80211_crypt crc_itu_t sungem sungem_phy uninorth_agp agpart ssb NIP: 6b6b6b68 LR: c01b2108 CTR: 6b6b6b6b REGS: c106de80 TRAP: 0400 Not tainted (2.6.24-rc2) MSR: 40009032 <EE,ME,IR,DR> CR: 82004024 XER: 00000000 TASK = c106b4c0[5] 'events/0' THREAD: c106c000 GPR00: 6b6b6b6b c106df30 c106b4c0 c2d613a0 00009032 00000001 00001a00 00000001 GPR08: 00000008 00000000 00000000 c106c000 42004028 00000000 016ffbe0 0171a724 GPR16: 016ffcf4 00240e24 00240e70 016fee68 016ff9a4 c03046c4 c0327f50 c03046fc GPR24: c106b6b9 c106b4c0 c101d610 c106c000 c02160fc c1eac1dc c2d613ac c2d613a0 NIP [6b6b6b68] 0x6b6b6b68 LR [c01b2108] tty_wakeup+0x6c/0x9c Call Trace: [c106df30] [c01b20e8] tty_wakeup+0x4c/0x9c (unreliable) [c106df40] [c0216138] usb_serial_port_work+0x3c/0x78 [c106df50] [c00432e8] run_workqueue+0xc4/0x15c [c106df90] [c0043798] worker_thread+0xa0/0x124 [c106dfd0] [c0048224] kthread+0x48/0x84 [c106dff0] [c00129bc] kernel_thread+0x44/0x60 Instruction dump: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX Slab corruption: size-2048 start=c2d613a0, len=2048 Redzone: 0x9f911029d74e35b/0x9f911029d74e35b. Last user: [<c01b16d8>](release_one_tty+0xbc/0xf4) 050: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b Prev obj: start=c2d60b88, len=2048 Redzone: 0x9f911029d74e35b/0x9f911029d74e35b. Last user: [<c00f30ec>](show_stat+0x410/0x428) 000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b This patch avoids this, clearing port->tty considering if the port is used as serial console or not Signed-off-by: Aristeu Rozanski <arozansk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: add Printer Gadget DriverCraig W. Nadler
G_PRINTER: Adds a USB printer gadget driver for use in printer firmware. This adds a USB printer gadget driver for use in printer firmware. The printer gadget channels data between the USB host and a userspace program driving the print engine. The user space program reads and writes the device file /dev/g_printer to receive or send printer data. It can use ioctl calls to the device file to get or set printer status. Signed-off-by: Craig W. Nadler <craig@nadler.us> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usb-storage: new "lockable" subclass 0x07Alan Stern
This patch (as1011) adds a #define for the newly-created Lockable (i.e., password-protected) subclass 0x07 for USB mass-storage devices. The private ISD200 entry (which had been mapped to subclass 0x07) is moved to 0xf0, which is unlikely to conflict with any official subclass designation. The US_SC_MIN and US_SC_MAX constants aren't used anywhere, so the patch removes them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: Convert from class_device to device for USB coreTony Jones
Convert from class_device to device for drivers/usb/core. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01ide: use ide_remove_port_from_hwgroup in init_irq()Bartlomiej Zolnierkiewicz
There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: remove unused ide_hwgroup_t fieldsBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01<linux/hdsmart.h> is not used by kernel codeBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: don't include <linux/hdsmart.h>Bartlomiej Zolnierkiewicz
IDE doesn't need it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: use ide_build_sglist() and ide_destroy_dmatable() in non-PCI host driversBartlomiej Zolnierkiewicz
* Make ide_build_sglist() and ide_destroy_dmatable() available also when CONFIG_BLK_DEV_IDEDMA_PCI=n. * Use ide_build_sglist() and ide_destroy_dmatable() in {ics,au1xxx-}ide.c and remove no longer needed {ics,au}ide_build_sglist(). There should be no functionality changes caused by this patch. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01au1xxx-ide: use hwif->devBartlomiej Zolnierkiewicz
* Setup hwif->dev in au_ide_probe(). * Use hwif->dev instead of ahwif->dev in auide_build_sglist(), auide_build_dmatable(), auide_dma_end() and auide_ddma_init(). * Remove no longer needed 'dev' field from _auide_hwif type. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_tBartlomiej Zolnierkiewicz
Keep pointer to struct device instead of struct pci_dev in ide_hwif_t. While on it: * Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: add IDE_HFLAG_NO_DSC host flagBartlomiej Zolnierkiewicz
* Add IDE_HFLAG_NO_DSC host flag for hosts that doesn't support DSC overlap. * Set it in aec62xx (for ATP850UF only) and hpt34x host drivers. * Convert ide-tape device driver to check for IDE_HFLAG_NO_DSC flag. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: add IDE_HFLAG_CLEAR_SIMPLEX host flagBartlomiej Zolnierkiewicz
* Rename 'simplex_stat' variable to 'dma_stat' in ide_get_or_set_dma_base(). * Factor out code for forcing host out of "simplex" mode from ide_get_or_set_dma_base() to ide_pci_clear_simplex() helper. * Add IDE_HFLAG_CLEAR_SIMPLEX host flag and set it in alim15x3 (for M5229), amd74xx (for AMD 7409), cmd64x (for CMD643), generic (for Netcell) and serverworks (for CSB5) host drivers. * Make ide_get_or_set_dma_base() test for IDE_HFLAG_CLEAR_SIMPLEX host flag instead of checking dev->device (BTW the code was buggy because it didn't check for dev->vendor, luckily none of these PCI Device IDs was used by some other vendor for PCI IDE controller). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: ide_setup_dma() assumes 8 portsSergei Shtylyov
According to http://marc.info/?l=linux-ide&m=114346138611631, the drivers must always register 8 DMA ports with ide_setup_dma(), so its last argument is not needed. While at it, kill some useless parens in that function... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: add ide_dump_identify() debug helperBartlomiej Zolnierkiewicz
* Add ide_dump_identify() debug helper for dumping raw identify data in the hdparm friendly format (== the identify data can be extracted from dmesg output and passed to hdparm --Istdin). * Dump identify data in ide-probe.c::do_identify() if DEBUG is enabled. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide-cd: move lba_to_msf() and msf_to_lba() to <linux/cdrom.h>Bartlomiej Zolnierkiewicz
* Move lba_to_msf() and msf_to_lba() to <linux/cdrom.h> (use 'u8' type instead of 'byte' while at it). * Remove msf_to_lba() copy from drivers/cdrom/cdrom.c. Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: make wait_drive_not_busy() static againAdrian Bunk
After commit 7267c3377443322588cddaf457cf106839a60463 wait_drive_not_busy() can become static again. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: small ide-scan-pci.c cleanupAdrian Bunk
- ide_scan_pcibus() can become static - instead of ide_scan_pci() we can use ide_scan_pcibus() directly in module_init() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01SUNRPC: spin svc_rqst initialization to its own functionJeff Layton
Move the initialzation in __svc_create_thread that happens prior to thread creation to a new function. Export the function to allow services to have better control over the svc_rqst structs. Also rearrange the rqstp initialization to prevent NULL pointer dereferences in svc_exit_thread in case allocations fail. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01rdma: SVCRMDA Header FileTom Tucker
This file defines the data types used by the SVCRDMA transport module. The principle data structure is the transport specific extension to the svcxprt structure. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Add svc_xprt_names service to replace svc_sock_namesTom Tucker
Create a transport independent version of the svc_sock_names function. The toclose capability of the svc_sock_names service can be implemented using the svc_xprt_find and svc_xprt_close services. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Add svc API that queries for a transport instanceTom Tucker
Add a new svc function that allows a service to query whether a transport instance has already been created. This is used in lockd to determine whether or not a transport needs to be created when a lockd instance is brought up. Specifying 0 for the address family or port is effectively a wild-card, and will result in matching the first transport in the service's list that has a matching class name. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Add /proc/sys/sunrpc/transport filesTom Tucker
Add a file that when read lists the set of registered svc transports. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Add transport hdr size for defer/revisitTom Tucker
Some transports have a header in front of the RPC header. The current defer/revisit processing considers only the iov_len and arg_len to determine how much to back up when saving the original request to revisit. Add a field to the rqstp structure to save the size of the transport header so svc_defer can correctly compute the start of a request. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Move the xprt independent code to the svc_xprt.c fileTom Tucker
This functionally trivial patch moves all of the transport independent functions from the svcsock.c file to the transport independent svc_xprt.c file. In addition the following formatting changes were made: - White space cleanup - Function signatures on single line - The inline directive was removed - Lines over 80 columns were reformatted - The term 'socket' was changed to 'transport' in comments - The SMP comment was moved and updated. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Removing remaining references to rq_sock in rqstpTom Tucker
This functionally empty patch removes rq_sock and unamed union from rqstp structure. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Move the sockaddr information to svc_xprtTom Tucker
This patch moves the transport sockaddr to the svc_xprt structure. Convenience functions are added to set and get the local and remote addresses of a transport from the transport provider as well as determine the length of a sockaddr. A transport is responsible for setting the xpt_local and xpt_remote addresses in the svc_xprt structure as part of transport creation and xpo_accept processing. This cannot be done in a generic way and in fact varies between TCP, UDP and RDMA. A set of xpo_ functions (e.g. getlocalname, getremotename) could have been added but this would have resulted in additional caching and copying of the addresses around. Note that the xpt_local address should also be set on listening endpoints; for TCP/RDMA this is done as part of endpoint creation. For connected transports like TCP and RDMA, the addresses never change and can be set once and copied into the rqstp structure for each request. For UDP, however, the local and remote addresses may change for each request. In this case, the address information is obtained from the UDP recvmsg info and copied into the rqstp structure from there. A svc_xprt_local_port function was also added that returns the local port given a transport. This is used by svc_create_xprt when returning the port associated with a newly created transport, and later when creating a generic find transport service to check if a service is already listening on a given port. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Make deferral processing xprt independentTom Tucker
This patch moves the transport independent sk_deferred list to the svc_xprt structure and updates the svc_deferred_req structure to keep pointers to svc_xprt's directly. The deferral processing code is also moved out of the transport dependent recvfrom functions and into the generic svc_recv path. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Move the authinfo cache to svc_xprt.Tom Tucker
Move the authinfo cache to svc_xprt. This allows both the TCP and RDMA transports to share this logic. A flag bit is used to determine if auth information is to be cached or not. Previously, this code looked at the transport protocol. I've also changed the spin_lock/unlock logic so that a lock is not taken for transports that are not caching auth info. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Remove sk_lastrecvTom Tucker
With the implementation of the new mark and sweep algorithm for shutting down old connections, the sk_lastrecv field is no longer needed. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Change svc_sock_received to svc_xprt_received and export itTom Tucker
All fields touched by svc_sock_received are now transport independent. Change it to use svc_xprt directly. This function is called from transport dependent code, so export it. Update the comment to clearly state the rules for calling this function. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Make svc_send transport neutralTom Tucker
Move the sk_mutex field to the transport independent svc_xprt structure. Now all the fields that svc_send touches are transport neutral. Change the svc_send function to use the transport independent svc_xprt directly instead of the transport dependent svc_sock structure. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Move sk_reserved to svc_xprtTom Tucker
This functionally trivial patch moves the sk_reserved field to the transport independent svc_xprt structure. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Make close transport independentTom Tucker
Move sk_list and sk_ready to svc_xprt. This involves close because these lists are walked by svcs when closing all their transports. So I combined the moving of these lists to svc_xprt with making close transport independent. The svc_force_sock_close has been changed to svc_close_all and takes a list as an argument. This removes some svc internals knowledge from the svcs. This code races with module removal and transport addition. Thanks to Simon Holm Thøgersen for a compile fix. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Simon Holm Thøgersen <odie@cs.aau.dk>
2008-02-01svc: Move sk_server and sk_pool to svc_xprtTom Tucker
This is another incremental change that moves transport independent fields from svc_sock to the svc_xprt structure. The changes should be functionally null. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Move sk_flags to the svc_xprt structureTom Tucker
This functionally trivial change moves the transport independent sk_flags field to the transport independent svc_xprt structure. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Change sk_inuse to a krefTom Tucker
Change the atomic_t reference count to a kref and move it to the transport indepenent svc_xprt structure. Change the reference count wrapper names to be generic. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Change services to use new svc_create_xprt serviceTom Tucker
Modify the various kernel RPC svcs to use the svc_create_xprt service. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-01svc: Add a generic transport svc_create_xprt functionTom Tucker
The svc_create_xprt function is a transport independent version of the svc_makesock function. Since transport instance creation contains transport dependent and independent components, add an xpo_create transport function. The transport implementation of this function allocates the memory for the endpoint, implements the transport dependent initialization logic, and calls svc_xprt_init to initialize the transport independent field (svc_xprt) in it's data structure. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>