30 Jun, 2005
5 commits
-
Use klist_del() instead of klist_remove() when unregistering devices.
This will prevent a deadlock when executing a recursive unregister using
device_for_each_child().Signed-off-by Patrick Mochel
Signed-off-by: Greg Kroah-Hartman -
No one was looking at the return value of bus_rescan_devices, and it
really wasn't anything that anyone in the kernel would ever care about.
So change it which enabled some counting code to be removed also.Signed-off-by: Greg Kroah-Hartman
-
This adds a single file, "bind", to the sysfs directory of every driver
registered with the driver core. To bind a device to a driver, write
the bus id of the device you wish to bind to that specific driver to the
"bind" file (remember to not add a trailing \n). If that bus id matches
a device on that bus, and it does not currently have a driver bound to
it, the probe sequence will be initiated with that driver and device.Note, this requires that the driver itself be willing and able to accept
that device (usually through a device id type table). This patch does
not make it possible to override the driver's id table.Signed-off-by: Greg Kroah-Hartman
-
This adds a single file, "unbind", to the sysfs directory of every
device that is currently bound to a driver. To unbind the driver from
the device, write anything to this file and they will be disconnected
from each other.Signed-off-by: Greg Kroah-Hartman
-
Add bus_find_device() and driver_find_device() which allow searching for a
device in the bus's resp. the driver's klist and obtain a reference on it.Signed-off-by: Cornelia Huck
Signed-off-by: Greg Kroah-Hartman
29 Jun, 2005
35 commits
-
get_request is now expected to be holding on to queue_lock, with interrupts
disabled, when it returns NULL; but one path forgot that, causing all kinds
of nastiness under swap load - badness backtraces, strange failures, BUGs.Signed-off-by: Hugh Dickins
Signed-off-by: Linus Torvalds -
Ok, a lot of things were pending after the 2.6.12 release, let's try to
start calming things down again. -
This crept in with the resync-to-mainline. Nothing uses 802.11-crypt in
mainline, so we can safely comment it out for now.Signed-off-by: Jeff Garzik
Signed-off-by: Linus Torvalds -
This patch adds the SiS 760 ID to the amd64-agp driver, so that agpgart can be
used on Athlon64 boards based on this chip.Signed-off-by: Daniel Drake
Signed-off-by: Dave Jones
Signed-off-by: Linus Torvalds -
Something reverted most of the arch/sparc/Kconfig changes, leaving
arch/sparc/ unconfigurable. This patch re-removes the parts made redundant
by drivers/Kconfig in addition to a mysterious, spurious second instance of
source "mm/Kconfig". cvs strikes again?Signed-off-by: William Irwin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Corrections to Documentation/Submitting{Drivers,Patches}
- update LANANA info.
- fix some typos
- update 2.2 kernel maintainer info.
- update 'dontdiff' info.
- update URLs for patch scripts
- add Trivial Patch Monkey URL
- add more references for submitting patchesSigned-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
New cards included.
V4L1 api renamed. Message included informing it is obsoleted by V4L2 API.
V4L2 api included.
Mark all 7135 cards as 7133.Signed-off-by: Luc Saillard .
Signed-off-by: Nickolay V Shmyrev
Signed-off-by: Hermann Pitton
Signed-off-by: Michael Krufky
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add Philips Webcam format.
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Luc Saillard .
Signed-off-by: Nickolay V Shmyrev
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
* bttv-driver.c, bttvp.h:
- New bttv module params:
- uv_ratio : allow a ratio of saturation between u and v. If you
have a ratio of 40 and a saturation of 100, usat will be 80 and
vstat 120. Useful to correct a bad color balance.
- full_luma_range : provide a better contrast in using the full
range 0-253 of values instead of 16-253.
- coring : to have a better black level.
- radio range is now defined on tuner-core.c. Cleaning up.* bttvp.h:
- Fix gcc 4.0 compilation
Signed-off-by: Jorik Jonker
Signed-off-by: Sylvain Meyer
Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Nickolay V Shmyrev
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
*tuner-core.c:
- some tuner_info msgs will be generated only if insmod opt
tuner_debug enabled.
- Implemented tuner-core support for VIDIO_S_TUNER to allow
changing mono/stereo mode
- Remove unneeded config options.
- I2C_CLIENT_MULTI option removed.
- support for Philips FMD12ME hybrid tuner
- allow to initialize with another tuner
- Move PHILIPS_FMD initialization code to set_type function,* tda8290:
- Fix dumb error in tda8290 tunning.
- Radio tuner uses high-precision step instead of 62.5 KHz.*tea5767.c:
- tuner_info msgs will be generated only if insmod tuner option
tuner_debug enabled.
- some cleanups for better reading.
- Radio tuner uses high-precision step instead of 62.5 KHz.
- Changing radio mode stereo/mono for tea5767 working.*tuner-simple.c:
- TNF9533-D/IF UHF fixup.
- Radio tuners now uses high-precision step instead of 62.5 KHz.*mt20xx.c:
- Radio tuner uses high-precision step instead of 62.5 KHz.*tda9887.c:
- tab and blank spaces corrections.Signed-off-by: Mauro Carvalho Chehab
Signed-off-by: Gerd Knorr
Signed-off-by: Nickolay V Shmyrev
Signed-off-by: Hartmut Hackmann
Signed-off-by: Michael Krufky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch updates maintainer info for BTTV and V4L.
Signed-off-by: Mauro Carvalho Chehab
Acked-by: Gerd Knorr
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Anyone reporting a stuck IRQ should try these options. Its effectiveness
varies we've found in the Fedora case. Quite a few systems with misdescribed
IRQ routing just work when you use irqpoll. It also fixes up the VIA systems
although thats now fixed with the VIA quirk (which we could just make default
as its what Redmond OS does but Linus didn't like it historically).A small number of systems have jammed IRQ sources or misdescribes that cause
an IRQ that we have no handler registered anywhere for. In those cases it
doesn't help.Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Currently in ext3 block reservation code, the global filesystem reservation
tree lock (rsv_block) is hold during the process of searching for a space
to make a new reservation window, including while scaning the block bitmap
to verify if the avalible window has a free block. Holding the lock during
bitmap scan is unnecessary and could possibly cause scalability issue and
latency issues.This patch tries to address this by dropping the lock before scan the
bitmap. Before that we need to reserve the open window in case someone
else is targetting at the same window. Question was should we reserve the
whole free reservable space or just the window size we need. Reserve the
whole free reservable space will possibly force other threads which
intended to do block allocation nearby move to another block group(cause
bad layout). In this patch, we just reserve the desired size before drop
the lock and scan the block bitmap. This patch fixed a ext3 reservation
latency issue seen on a cvs check out test. Patch is tested with many fsx,
tiobench, dbench and untar a kernel test.Signed-Off-By: Mingming Cao
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
get_io_context needlessly turned off interrupts and checked for racing io
context creations. Both of which aren't needed, because the io context can
only be created while in process context of the current process.Also, split the function in 2. A light version, current_io_context does not
elevate the reference count specifically, but can be used when in process
context, because the process holds a reference itself.Signed-off-by: Nick Piggin
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change around locking a bit for a result of 1-2 less spin lock unlock pairs in
request submission paths.Signed-off-by: Nick Piggin
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In the case where the request is not able to be merged by the elevator, don't
retake the lock and retry the merge mechanism after allocating a new request.Instead assume that the chance of a merge remains slim, and now that we've
done most of the work allocating a request we may as well just go with it.Also be rid of the GFP_ATOMIC allocation: we've got working mempools for the
block layer now, so let's save atomic memory for things like networking.Lastly, in get_request_wait, do an initial get_request call before going into
the waitqueue. This is reported to help efficiency.Signed-off-by: Nick Piggin
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We add a check of the return value of tty_ldisc_ref(), which
is checked 7 out of 8 times, e.g.:149 ld = tty_ldisc_ref(tty);
150 if (ld != NULL) {
151 if (ld->set_termios)
152 (ld->set_termios)(tty, &old_termios);
153 tty_ldisc_deref(ld);
154 }This defect was found automatically by Coverity Prevent, a static analysis
tool.(akpm: presumably `ld' is never NULL. Oh well)
Signed-off-by: Zaur Kambarov
Cc: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The return value of "match_int" is checked 27 out of 28 times
In lib/parser.c
142 /**
143 * match_int: - scan a decimal representation of an integer from a substring_t
144 * @s: substring_t to be scanned
145 * @result: resulting integer on success
146 *
147 * Description: Attempts to parse the &substring_t @s as a decimal integer. On
148 * success, sets @result to the integer represented by the string and returns 0.
149 * Returns either -ENOMEM or -EINVAL on failure.
150 */
151 int match_int(substring_t *s, int *result)
152 {
153 return match_number(s, result, 0);
154 }Signed-off-by: Zaur Kambarov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
"dir" was dereferenced before null check
Signed-off-by: Zaur Kambarov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We fix the check in 1084, which was
1084 if (addr->channel > IPMI_NUM_CHANNELS) {
1085 spin_lock_irqsave(&intf->counter_lock, flags);
1086 intf->sent_invalid_commands++;
1087 spin_unlock_irqrestore(&intf->counter_lock, flags);
1088 rv = -EINVAL;
1089 goto out_err;
1090 }addr->channel is used in
1092 if (intf->channels[addr->channel].medium
Definitions involved:
221 struct ipmi_channel channels[IPMI_MAX_CHANNELS];
134 #define IPMI_MAX_CHANNELS 8
In /linux-2.6.12-rc6/include/linux/ipmi.h
148 #define IPMI_NUM_CHANNELS 0x10Signed-off-by: Zaur Kambarov
Cc: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The check in
627 BUG_ON(index > SG_MEMPOOL_NR);
with SG_MEMPOOL_NR defined in
32 #define SG_MEMPOOL_NR (sizeof(scsi_sg_pools)/sizeof(struct scsi_host_sg_pool))
was not sufficient.
sgp, set in
629 sgp = scsi_sg_pools + index;
is dereferenced in
630 mempool_free(sgl, sgp->pool);
Signed-off-by: Zaur Kambarov
Cc:
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Variable "c" was declared as an unsigned int, but used in:
125 for (i=0 ; (c=read(fd, buf, sizeof(buf)))>0 ; i+=c )
126 if (write(1, buf, c) != c)
127 die("Write call failed");(akpm: read() can return -1. If it does, we fill the disk up with garbage).
Signed-off-by: Zaur Kambarov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch for usb_ch9.h includes linux/types.h instead of asm/types.h so that
__le16 and so on is explicitly defined. It also cleans up non standard //
comment.Signed-off-by: GOTO Masanori
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch lets i2c-dev.h include linux/compiler.h so that __user is defined.
Signed-off-by: GOTO Masanori
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch cleans up asm-ppc64/byteorder.h to enable ___arch__swab16 and
___arch__swab32 which are marked TODO currently. It removes ___arch__swab64
because ppc64 does not have short instruction combinations for swab64, the
recent gcc generates enough smart code that is equivalent to hand assembled
code under my tests.Signed-off-by: GOTO Masanori
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In the case of buffered AIO, in the aio retry path (aio_run_iocb), when the
retry method returns EIOCBRETRY the kicked iocb is added to the context run
list but is never queued onto the work queue. The request therefore is
never completed.This patch fixes that by adding the appropriate call to aio_queue_work in
aio_run_aiocb so that subsequent retries will be handled by the aio worker
thread.Signed-off-by: Sébastien Dugué
Acked-by: Benjamin LaHaise
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Looks like it sneaked back with the NFS ACL merge..
Signed-off-by: Christoph Hellwig
Cc: Trond Myklebust
Cc: Neil Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch makes some needlessly global code static.
Signed-off-by: Adrian Bunk
Signed-off-by: Armin Schindler
Signed-off-by: Karsten Keil
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Pekka Enberg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In file included from drivers/media/dvb/ttpci/av7110_hw.c:38:
include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
In file included from drivers/media/dvb/ttpci/av7110_v4l.c:36:
include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
In file included from drivers/media/dvb/ttpci/av7110_av.c:37:
include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
drivers/isdn/icn/icn.c:719:4: warning: #warning TODO test headroom or use skb->nb to flag ACK
In file included from drivers/media/dvb/ttpci/av7110_ca.c:39:
include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return type
In file included from drivers/media/dvb/ttpci/av7110.c:41:
include/linux/byteorder/swabb.h:96: warning: type qualifiers ignored on function return type
include/linux/byteorder/swabb.h:110: warning: type qualifiers ignored on function return typeDoes declaring a function to return a const value actually mean something to
gcc?Dunno. Kill it and replace sone `__inline__'s with `inline' too.
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
drivers/isdn/hisax/hfc4s8s_l1.c:317: warning: type qualifiers ignored on function return type
drivers/isdn/hisax/hfc4s8s_l1.c:329: warning: type qualifiers ignored on function return typeSigned-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Avoid race occurs when some process have open file descriptor for class
device attributes and already firmware allocated memory are freed. Don't
allow negative loading timeout.Signed-off-by: Stanislaw W. Gruszka
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This code uses the x86 (non-AMD-ELAN) value of CLOCK_TICK_RATE instead of
CLOCK_TICK_RATE itself, which is wrong for other archs.Signed-off-by: Emmanuel Colbus
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds