aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2005-06-23[PATCH] remove duplicate get_dentry functions in various placesChristoph Hellwig1-12/+1
Various filesystem drivers have grown a get_dentry() function that's a duplicate of lookup_one_len, except that it doesn't take a maximum length argument and doesn't check for \0 or / in the passed in filename. Switch all these places to use lookup_one_len. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Greg KH <greg@kroah.com> Cc: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] add check to /proc/devices read routinesNeil Horman1-2/+10
Patch to add check to get_chrdev_list and get_blkdev_list to prevent reads of /proc/devices from spilling over the provided page if more than 4096 bytes of string data are generated from all the registered character and block devices in a system Signed-off-by: Neil Horman <nhorman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] optimise loop driver a bitNick Piggin1-43/+38
Looks like locking can be optimised quite a lot. Increase lock widths slightly so lo_lock is taken fewer times per request. Also it was quite trivial to cover lo_pending with that lock, and remove the atomic requirement. This also makes memory ordering explicitly correct, which is nice (not that I particularly saw any mem ordering bugs). Test was reading 4 250MB files in parallel on ext2-on-tmpfs filesystem (1K block size, 4K page size). System is 2 socket Xeon with HT (4 thread). intel:/home/npiggin# umount /dev/loop0 ; mount /dev/loop0 /mnt/loop ; /usr/bin/time ./mtloop.sh Before: 0.24user 5.51system 0:02.84elapsed 202%CPU (0avgtext+0avgdata 0maxresident)k 0.19user 5.52system 0:02.88elapsed 198%CPU (0avgtext+0avgdata 0maxresident)k 0.19user 5.57system 0:02.89elapsed 198%CPU (0avgtext+0avgdata 0maxresident)k 0.22user 5.51system 0:02.90elapsed 197%CPU (0avgtext+0avgdata 0maxresident)k 0.19user 5.44system 0:02.91elapsed 193%CPU (0avgtext+0avgdata 0maxresident)k After: 0.07user 2.34system 0:01.68elapsed 143%CPU (0avgtext+0avgdata 0maxresident)k 0.06user 2.37system 0:01.68elapsed 144%CPU (0avgtext+0avgdata 0maxresident)k 0.06user 2.39system 0:01.68elapsed 145%CPU (0avgtext+0avgdata 0maxresident)k 0.06user 2.36system 0:01.68elapsed 144%CPU (0avgtext+0avgdata 0maxresident)k 0.06user 2.42system 0:01.68elapsed 147%CPU (0avgtext+0avgdata 0maxresident)k Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] create a kstrdup library functionPaulo Marques2-24/+8
This patch creates a new kstrdup library function and changes the "local" implementations in several places to use this function. Most of the changes come from the sound and net subsystems. The sound part had already been acknowledged by Takashi Iwai and the net part by David S. Miller. I left UML alone for now because I would need more time to read the code carefully before making changes there. Signed-off-by: Paulo Marques <pmarques@grupopie.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] blk: unplug laterNick Piggin1-1/+1
get_request_wait needn't unplug the device immediately. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] blk: branch hintsNick Piggin1-6/+6
Sprinkle around a few branch hints in the block layer. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] blk: no memory barrierNick Piggin1-1/+0
This memory barrier is not needed because the waitqueue will only get waiters on it in the following situations: rq->count has exceeded the threshold - however all manipulations of ->count are performed under the runqueue lock, and so we will correctly pick up any waiter. Memory allocation for the request fails. In this case, there is no additional help provided by the memory barrier. We are guaranteed to eventually wake up waiters because the request allocation mempool guarantees that if the mem allocation for a request fails, there must be some requests in flight. They will wake up waiters when they are retired. Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] blk: cleanup generic tag support error messagesTejun Heo1-5/+13
Add KERN_ERR and __FUNCTION__ to generic tag error messages, and add a comment in blk_queue_end_tag() which explains the silent failure path. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] blk: remove BLK_TAGS_{PER_LONG|MASK}Tejun Heo1-2/+2
Replace BLK_TAGS_PER_LONG with BITS_PER_LONG and remove unused BLK_TAGS_MASK. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] blk: remove blk_queue_tag->real_max_depth optimizationTejun Heo1-25/+10
blk_queue_tag->real_max_depth was used to optimize out unnecessary allocations/frees on tag resize. However, the whole thing was very broken - tag_map was never allocated to real_max_depth resulting in access beyond the end of the map, bits in [max_depth..real_max_depth] were set when initializing a map and copied when resizing resulting in pre-occupied tags. As the gain of the optimization is very small, well, almost nill, remove the whole thing. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] blk: use find_first_zero_bit() in blk_queue_start_tag()Tejun Heo1-9/+4
blk_queue_start_tag() hand-coded searching for the first zero bit in the tag map. Replace it with find_first_zero_bit(). With this patch, blk_queue_star_tag() doesn't need to fill remains of tag map with 1, thus allowing it to work properly with the next remove_real_max_depth patch. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] NUMA aware block device control structure allocationChristoph Lameter6-20/+50
Patch to allocate the control structures for for ide devices on the node of the device itself (for NUMA systems). The patch depends on the Slab API change patch by Manfred and me (in mm) and the pcidev_to_node patch that I posted today. Does some realignment too. Signed-off-by: Justin M. Forbes <jmforbes@linuxtx.org> Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Pravin Shelar <pravin@calsoftinc.com> Signed-off-by: Shobhit Dayal <shobhit@calsoftinc.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23Merge 'misc-fixes' branch of ↵Linus Torvalds1-0/+1
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2005-06-23e1000: fix spinlock bugMitch Williams1-0/+1
This patch fixes an obvious and nasty bug where we could exit the transmit routine while holding tx_lock. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
2005-06-22Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds2-5/+4
2005-06-22[PATCH] driver core: Fix up the device_attach() error handling in ↵Greg Kroah-Hartman1-3/+2
bus_add_device() Don't error out if something "bad" happens when trying to bind a driver to a device. We want the sysfs attributes to be present for later when we try to tear down the device. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-22[PATCH] USB: fix hid core to return proper error code from probeStelian Pop1-2/+2
Drivers need to return -ENODEV when they can't bind to a device. Anything else stops the "bind a device to a driver" search. From: Stelian Pop <stelian@popies.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-22[LTPC]: Replace schedule_timeout() with ssleep()/msleep()Nishanth Aravamudan1-4/+2
Use ssleep() / msleep() [as appropriate] instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: Maximilian Attems <janitor@sternwelten.at> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-22Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6Linus Torvalds109-1173/+5013
2005-06-21[PATCH] I2C: fix ds1374 buildAndrew Morton1-2/+0
Not all architectures implement asm/rtc.h Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: w83781d: remove non-i2c sensor chipsJean Delvare1-51/+21
This patch removes the support for the W83697HF and W83627THF chips from the w83781d driver. These chips have no I2C/SMBus interface and are better supported by the Super-I/O-based w83627hf driver. Documentation was updated to reflect the support drop. Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: fix up ds1374.c driver so it will build.Greg KH1-4/+0
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Add support for Maxim/Dallas DS1374 Real-Time Clock Chip (1/2)Randy Vinson3-0/+278
Add support for Maxim/Dallas DS1374 Real-Time Clock Chip This change adds support for the Maxim/Dallas DS1374 RTC chip. This chip is an I2C-based RTC that maintains a simple 32-bit binary seconds count with battery backup support. Signed-off-by: Randy Vinson <rvinson@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: add new pca9539 driverbgardner@wabtec.com3-0/+203
This is an i2c driver for the Philips PCA9539 (16 bit I/O port). It uses the new i2c-sysfs interfaces. The patch includes documentation. It depends on the patch that renames "i2c-sysfs.h" to "hwmon-sysfs.h" Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: rename i2c-sysfs.h to hwmon-sysfs.hJean Delvare5-5/+5
This patch renames the new linux/i2c-sysfs.h header file to linux/hwmon-sysfs.h. This names seems to be more appropriate since this file defines macros and structures not related to i2c but to hardware monitoring drivers. The patch also updates the five hardware monitoring driver which include that header file already. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] max6875: new i2c device driverBGardner@Wabtec.com3-0/+486
This patch adds support for the MAX6875/MAX6874 chips. Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: drivers/i2c/chips/it87.c: use dynamic sysfs callbacksJean Delvare1-204/+183
This patch modifies the it87 hardware monitoring driver to take benefit of the new sysfs callback features introduced by Yani Ioannou, making the code much clearer and the resulting driver significantly smaller. From: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: lm63 uses new sysfs callbacksJean Delvare1-120/+137
I updated the lm63 hardware monitoring driver to take benefit of Yani Ioannou's new sysfs callback capabilities. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: lm83 uses new sysfs callbacksJean Delvare1-80/+77
I updated the lm83 hardware monitoring driver to take benefit of Yani Ioannou's new sysfs callback capabilities. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: lm90 uses new sysfs callbacksJean Delvare1-117/+147
I updated the lm90 hardware monitoring driver to take benefit of Yani Ioannou's new sysfs callback capabilities. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: pcf8574 driver cleanupJean Delvare1-4/+2
I found a possible cleanup in the pcf8574 driver. We don't need to store the read value in our private data structure, as we then never use it again. I asked Aurelien and he is fine with the change. Please apply, thanks. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: KConfig update - some EXPERIMENTAL removalR.Marek@sh.cvut.cz2-23/+23
Following patch removes EXPERIMENTAL flag from some of I2C bus and chip drivers. It is removed when the driver is in kernel at least from 2.6.3 and I generally think there is no problem with it. Also this patch adds SiS 745 to help option of sis96x and it also fixes nForce2 driver entry to reflect current state. Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: add i2c driver for TPS6501xDavid Brownell3-2/+1093
This adds an I2C driver for the TPS6501x series of power management chips. It's used on many OMAP based boards, and this driver has been widely used in the Linux-OMAP trees over the last year or so. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] i2c: Race fix for i2c-mpc.cSylvain Munaut1-6/+8
i2c: Race fix for i2c-mpc.c The problem was that the clock speed and driver data is initialized after the i2c adapter was added. This caused the i2c bus to start working at a wrong speed. (Mostly noticable on the second bus on mpc5200) With this patch we've tried to keep the i2c adapter working perfectly all the time it is included in the system. Initialize before added, Remove garbage after deleleted. Submitted-by: Asier Llano Palacios Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Spelling fixes for drivers/i2c/i2c-dev.cTobias Klauser1-1/+1
This patch fixes a misspelling in a comment section. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Spelling fixes for drivers/i2c/i2c-core.cTobias Klauser1-1/+1
This patch fixes a misspelling in a comment section. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Spelling fixes for drivers/i2c/busses/i2c-parport.cTobias Klauser1-1/+1
This patch fixes a double "the" in a comment section. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Spelling fixes for drivers/i2c/algos/i2c-algo-pca.cTobias Klauser1-2/+2
This patch fixes the some misspellings and a trailing whitespace in the comments. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: fix up some sysfs device attribute file parametersGreg Kroah-Hartman3-34/+61
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Kill another macro abuse in via686aJean Delvare1-13/+10
This patch kills another macro abuse in the via686a hardware monitoring driver. Using a macro just to alias an array is quite useless, isn't it? Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: chips/Kconfig correctionsJean Delvare1-3/+6
Here are some corrections for drivers/i2c/chips/Kconfig. Signed-off-by: Alexey Fisher <fishor@gmx.net> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: driver adm1021: remove die_codeGrant Coady1-8/+0
This patch removes die_code from adm1021 as nothing within the driver uses it. Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Coding style cleanups to via686aJean Delvare1-136/+140
The via686a hardware monitoring driver has infamous coding style at the moment. I'd like to clean up the mess before I start working on other changes to this driver. Is the following patch acceptable? No code change, only coding style (indentation, alignments, trailing white space, a few parentheses and a typo). Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Kill common macro abuse in chip driversJean Delvare5-14/+5
This patch kills a common macro abuse in i2c chip drivers: defining ALARMS_FROM_REG returning its argument unchanged. Dropping the macro makes the code somewhat more readable IMHO. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: include of jiffies.h for some i2c driversDominik Hackl2-0/+2
This patch includes jiffies.h in two i2c drivers. (jiffies.h is needed for the time_after function.) Signed-off-by: Dominik Hackl <dominik@hackl.dhs.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: adm9240 driver cleanupGrant Coady1-2/+5
This patch adds an info print of detected VRM stolen from Sebastian Witt's atxp1 sriver. ADM9240 already has vrm accessor removed. Write no-op and whitespace fixes removed :) Couple of comments changed, tested on 2.6.11.9. Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: sysfs names: rename to cpu0_vid, take 3Grant Coady2-1/+8
This small patch changes two drivers, adm1025 and adm1026, to report vid as cpu0_vid sysfs name as used by the other drivers. Added duplicated names and six month warning for old names to be removed as requested. Compile tested. Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Setting w83627hf fan divisor 128 fails.Grant Coady2-2/+2
Jarkko Lavinen provided patch to fix: "couldn't set the divisor 128 through fan1_div sysfs entry even though the chip supports it and setting divisors 1..64 worked. This was due to POWER_TO_REG() only checking 2's powers 0 till 5 but not 6." This patch applies that fix to w83627hf and w83781d drivers. Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: remove <linux/delay.h> from via686aGrant Coady1-1/+0
In my cross-reference checking of sysfs names, the via686a needs special case treatment as it the only driver expands S_IWUSR to 00200 with gcc -E. (00200 is the correct value for S_IWUSR). This is caused by the driver including <linux/delay.h>, it compiles fine without that header but I am unable to test drive the change. Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Remove redundancy from i2c-core.cJean Delvare1-44/+20
Call i2c_transfer() from i2c_master_send() and i2c_master_recv() to avoid the redundant code that was in all three functions. It also removes unnecessary debug statements as suggested by Jean Delvare. This is important for the non-blocking interfaces because they will have to handle a non-blocking interface in this area. Having it in one place greatly simplifies the changes. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Allow for sharing of the interrupt line for i2c-mpc.cKumar Gala1-2/+2
I2C-MPC: Allow for sharing of the interrupt line On the MPC8548 devices we have multiple I2C-MPC buses however they are on the same interrupt line. Made request_irq pass SA_SHIRQ now so the second bus can register for the same IRQ. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] Spelling fixes for drivers/i2c.Steven Cole11-19/+19
Here are some spelling corrections for drivers/i2c. occured -> occurred intialization -> initialization Everytime -> Every time transfering -> transferring relevent -> relevant continous -> continuous neccessary -> necessary explicitely -> explicitly Celcius -> Celsius differenciate -> differentiate Signed-off-by: Steven Cole <elenstev@mesatop.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Add support for the LPC47M15x and LPC47M192 chips to smsc47m1Jean Delvare2-5/+7
This simple patch adds support for the SMSC LPC47M15x and LPC47M192 chips to the smsc47m1 hardware monitoring driver. These chips are compatible with the other ones already supported by the driver, so I see no reason not to support them, especially when the Linux 2.4 version of the driver does already. I also modified the info printks to name the chips by their real name. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Fix bugs in the new w83627ehf driverJean Delvare1-1/+1
These are the fixes for the bug you spotted in my new w83627ehf driver: - Explicit division by 0. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: New hardware monitoring driver: w83627ehfJean Delvare3-0/+854
This is a new hardware monitoring driver, w83627ehf, which supports the Winbond W83627EHF Super-I/O chip. The driver is not complete, but already usable. It only implements fan speed and temperature monitoring, while the chip also supports voltage inputs with VID, PWM output and temperature sensor selection. I have no more time to work on this, but anyone with supported hardware could add the missing functionalities later. This driver is largely derived from the w83627hf driver. Thanks to Leon Moonen and Steve Cliffe for tesing the preliminary versions of my driver and reporting the problems they encountered. Thanks to Grant Coady for noticing and fixing various corner cases in the fan management. This third version of the driver hopefully addresses all the issues the original version had. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: add new hardware monitor driver: adm9240Grant Coady3-0/+780
Completion of Michiel Rook's port of adm9240 to 2.6 with addition of auto fan clock divider based on Jean Delvare's algorithm, and replaces scaling macros with static inlines. Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: #include <linux/config.h> cleanupJean Delvare2-10/+0
Hi Alexey, > Files that don't use CONFIG_* stuff shouldn't include config.h > Files that use CONFIG_* stuff should include config.h > > It's that simple. ;-) I agree. This won't change anything though, as all drivers include either device.h or module.h, which in turn include config.h. But you are still correct, so I approve your patch. For completeness, I would propose the following on top of your own patch: i2c bus drivers do not need to define DEBUG themselves, as the Kconfig system takes care of it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: drivers/i2c/*: #include <linux/config.h> cleanupAlexey Dobriyan56-55/+1
Files that don't use CONFIG_* stuff shouldn't include config.h Files that use CONFIG_* stuff should include config.h It's that simple. ;-) Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] ds1337: export ds1337_do_commandLadislav Michl1-0/+2
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] ds1337 driver works also with ds1339 chipLadislav Michl2-3/+3
On Wed, May 04, 2005 at 12:07:11PM +0200, Jean Delvare wrote: > Additionally, I would welcome an additional patch documenting the fact > that the ds1337 driver will work fine with the Dallas DS1339 real-time > clock chip. Document the fact that ds1337 driver works also with DS1339 real-time clock chip. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: ds1337: search by bus numberLadislav Michl1-5/+2
Chip is searched by bus number rather than its own proprietary id. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: ds1337: i2c_transfer() checkingLadislav Michl1-12/+9
i2c_transfer returns number of sucessfully transfered messages. Change error checking to accordingly. (ds1337_set_datetime never returned sucess) Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: ds1337: Make time format consistent with other RTC driversLadislav Michl1-7/+6
Make time format consistent with other RTC drivers. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: ds1337 3/4Ladislav Michl1-17/+8
dev_{dbg,err} functions should print client's device name. data->id can be dropped from message, because device is determined by bus it hangs on (it has fixed address). Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: ds1337 2/4Ladislav Michl1-14/+14
Use correct macros to convert between bdc and bin. See linux/bcd.h Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: ds1337 1/4Ladislav Michl1-5/+3
Use i2c_transfer to send message, so we get proper bus locking. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: mark all functions static in atxp1 driverGreg K-H1-6/+6
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: add new atxp1 driverSebastian Witt3-0/+375
Adds support for the Attansic ATXP1 I2C device, found on some x86 plattforms to change CPU and other voltages. Depends on the previous i2c-vid.h patch. Signed-off-by: Sebastian Witt <se.witt@gmx.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: rtc8564.c remove duplicate includeClemens Koller1-1/+0
[PATCH] I2C rtc8564.c remove duplicate include Trivial fix: removes duplicate include line. Signed-off-by: Clemens Koller <clemens.koller@anagramm.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] I2C: Merge unused address lists in some video driversJean Delvare10-60/+40
On top of my previous patch which removes the use of address ranges in video i2c drivers, this one can save an additional few bytes of memory. Most of these drivers which do not use I2C_CLIENT_INSMOD initialize the unused address lists in a less than optimal way. This patch simply optimizes this, by using a single one-element list instead of 3 different lists with two elements each. This saves an average 63 bytes on these drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> diff -ruN linux-2.6.12-rc1-bk5.orig/drivers/media/video/adv7170.c linux-2.6.12-rc1-bk5/drivers/media/video/adv7170.c
2005-06-21[PATCH] I2C: Kill address ranges in non-sensors i2c chip driversJean Delvare31-131/+15
Some months ago, you killed the address ranges mechanism from all sensors i2c chip drivers (both the module parameters and the in-code address lists). I think it was a very good move, as the ranges can easily be replaced by individual addresses, and this allowed for significant cleanups in the i2c core (let alone the impressive size shrink for all these drivers). Unfortunately you did not do the same for non-sensors i2c chip drivers. These need the address ranges even less, so we could get rid of the ranges here as well for another significant i2c core cleanup. Here comes a patch which does just that. Since the process is exactly the same as what you did for the other drivers set already, I did not split this one in parts. A documentation update is included. The change saves 308 bytes in the i2c core, and an average 1382 bytes for chip drivers which use I2C_CLIENT_INSMOD, 126 bytes for those which do not. This change is required if we want to merge the sensors and non-sensors i2c code (and we want to do this). Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/Documentation/i2c/writing-clients ===================================================================
2005-06-21[PATCH] w1: fix compiler warningsEvgeniy Polyakov1-0/+1
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
2005-06-21[PATCH] w1: reconnect feature.Evgeniy Polyakov5-25/+67
I've created reconnect feature - if on start there are no registered families all new devices will have defailt family, later when driver for appropriate family is loaded, slaves, which were faound earlier, will still have defult family instead of right one. Reconnect feature will force control thread to run through all master devices and all slaves found and search for slaves with default family id and try to reconnect them. It does not store newly registered family and does not check only those slaves which have reg_num.family the same as being registered one - all slaves with default family are reconnected. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1: Adds a default family so that new slave families will show up in ↵Evgeniy Polyakov1-12/+27
sysfs. Adds a default family so that new slave families will show up in sysfs. Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1: Adds a sysfs entry (w1_master_search) that allows you to ↵Evgeniy Polyakov3-1/+51
disable/enable periodic searches. Adds a sysfs entry (w1_master_search) that allows you to disable/enable periodic searches. Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1: Added the triplet w1 master method and changes w1_search() to ↵Evgeniy Polyakov4-94/+175
use it. Adds the triplet w1 master method and changes w1_search() to use it. Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1: Cleans up usage of touch_bit/w1_read_bit/w1_write_bit.Evgeniy Polyakov3-12/+70
Cleans up usage of touch_bit/w1_read_bit/w1_write_bit. Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1_therm: removed duplicated family id.Evgeniy Polyakov1-5/+1
We can access family id through w1_family structure. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
2005-06-21[PATCH] w1: fix build issuesGreg Kroah-Hartman1-16/+0
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1: new family structure.Evgeniy Polyakov5-33/+2
Removed some fields which are not required. First step for writing operations. Now only read and read name remain. Patch depends on w1 cleanups patch. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1: cleanups.Evgeniy Polyakov14-256/+171
- white space changes. - list_for_each_entry/list_for_each_entry_safe and reverse changes. - small coding style changes. - removed redundant NULL checks. - use attribute group and macros instead of direct device attributes. Patch is havily based on work from Adrian Bunk and Dmitry Torokhov, thanks guys. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1_smem: support for new simple rom family [0x81 id].Evgeniy Polyakov2-5/+24
Support for new simple rom family [0x81 id]. It is the same as existing 0x01 family, which is used in ds9490* w1 adapters. Patch is on top of new-thermal-sensor-families patch. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] w1_therm: support for ds18b20, ds1822 thermal sensors.Evgeniy Polyakov2-11/+85
Support for ds18b20, ds1822 thermal sensors. Based on code from Tiziano M_ller <tm@dev-zero.ch>. Patch is against 2.6.12-rc2 and should be applied without problems on top of any later kernels since w1_therm driver was not changed. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-21[PATCH] md: remove unneeded NULL checks before kfreeJesper Juhl7-32/+17
This patch removes some unneeded checks of pointers being NULL before calling kfree() on them. kfree() handles NULL pointers just fine, checking first is pointless. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: make sure md/bitmap doesn't try to write a page with active ↵NeilBrown1-30/+38
writeback Due to the use of write-behind, it is possible for md to write a page to the bitmap file that is still completing writeback. This is not allowed. With this patch, we detect those cases and either force a sync write, or back off and try later, as appropriate. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] Two small fixes for md verion-1 superblocks.NeilBrown1-1/+1
1/ Must typecast int to (sector_t) before inverting or we might not invert enough bits. 2/ When "bitmap_offset" was added to mdp_superblock_1, we didn't increase the count of words-used (96 to 100). Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: allow md to update multiple superblocks in parallel.NeilBrown1-37/+48
currently, md updates all superblocks (one on each device) in series. It waits for one write to complete before starting the next. This isn't a big problem as superblock updates don't happen that often. However it is neater to do it in parallel, and if the drives in the array have gone to "sleep" after a period of idleness, then waking them is parallel is faster (and someone else should be worrying about power drain). Futher, we will need parallel superblock updates for a future patch which keeps the intent-logging bitmap near the superblock. Also remove the silly code that retired superblock updates 100 times. This simply never made sense. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: allow md intent bitmap to be stored near the superblock.NeilBrown2-28/+144
This provides an alternate to storing the bitmap in a separate file. The bitmap can be stored at a given offset from the superblock. Obviously the creator of the array must make sure this doesn't intersect with data.... After is good for version-0.90 superblocks. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: fix deadlock due to md thread processing delayed requests.NeilBrown5-37/+21
Before completing a 'write' the md superblock might need to be updated. This is best done by the md_thread. The current code schedules this up and queues the write request for later handling by the md_thread. However some personalities (Raid5/raid6) will deadlock if the md_thread tries to submit requests to its own array. So this patch changes things so the processes submitting the request waits for the superblock to be written and then submits the request itself. This fixes a recently-created deadlock in raid5/raid6 Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: optimise reconstruction when re-adding a recently failed drive.NeilBrown2-17/+61
When an array is degraded, bit in the intent-bitmap are never cleared. So if a recently failed drive is re-added, we only need to reconstruct the block that are still reflected in the bitmap. This patch adds support for this re-adding. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: initialise sync_blocks in raid1 resyncNeilBrown1-0/+1
Otherwise it could have a random value and might BUG. This fixes a BUG during resync problem in raid1 introduced by the bitmap-based-intent-loggin patches. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: fix bug when raid1 attempts a partial reconstruct.NeilBrown1-7/+10
The logic here is wrong. if fullsync is 0, it WILL BUG. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: raid1 support for bitmap intent loggingNeilBrown1-28/+154
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: don't skip bitmap pages due to lack of bit that we just cleared.NeilBrown1-18/+17
When looking for pages that need cleaning we skip pages that don't have BITMAP_PAGE_CLEAN set. But if it is the 'current' page we will have cleared that bit ourselves, so skipping it is wrong. So: move the 'skip this page' inside 'if page != lastpage'. Also fold call of file_page_offset into the one place where the value (bit) is used. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: enable the bitmap write-back daemon and wait for it.NeilBrown1-66/+53
Currently we don't wait for updates to the bitmap to be flushed to disk properly. The infrastructure all there, but it isn't being used.... A separate kernel thread (bitmap_writeback_daemon) is needed to wait for each page as we cannot get callbacks when a page write completes. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: check return value of write_page, rather than ignore itNeilBrown1-6/+7
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: improve debug-printing of bitmap superblock.NeilBrown1-10/+10
- report sync_size properly - need /2 to convert sectors to KB - move everything over 2 spaces to allow proper spelling of "events cleared". Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md printk fixakpm@osdl.org1-1/+2
A u64 is not an unsigned long long. On power4 it is `long', and printk warns. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: make sure md bitmap is cleared on a clean start.NeilBrown1-15/+12
As the array-wide clean bit (in the superblock) is set more agressively than the bits in the bitmap are cleared, it is possible to have an array which is clean despite there being bits set in the bitmap. These bits will currently never get cleared, as they can only be cleared by a resync pass, which never happens. No, when reading bits from disk, be aware of whether the whole array is known to be in sync, and act accordingly. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: minor code rearrangement in bitmap_init_from_diskNeilBrown1-8/+8
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: print correct pid for newly created bitmap-writeback-daemon.NeilBrown1-1/+1
The debugging message printed the wrong pid, which didn't help remove bugs.... Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: call bitmap_daemon_work regularlyNeilBrown1-1/+2
bitmap_daemon_work clears bits in the bitmap for blocks that haven't been written to for a while. It needs to be called regularly to make sure the bitmap doesn't endup full of ones .... but it wasn't. So call it from the increasingly-inaptly-named md_check_recovery Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: a couple of tidyups relating to the bitmap file.NeilBrown2-13/+6
1/ When init from disk, it is a BUG if there is nowhere to init from, 2/ use seq_path to print path in /proc/mdstat Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: optimised resync using Bitmap based intent loggingNeilBrown3-15/+1679
With this patch, the intent to write to some block in the array can be logged to a bitmap file. Each bit represents some number of sectors and is set before any update happens, and only cleared when all writes relating to all sectors are complete. After an unclean shutdown, information in this bitmap can be used to optimise resync - only sectors which could be out-of-sync need to be updated. Also if a drive is removed and then added back into an array, the recovery can make use of the bitmap to optimise reconstruction. This is not implemented in this patch. Currently the bitmap is stored in a file which must (obviously) be stored on a separate device. The patch only provided infrastructure. It does not update any personalities to bitmap intent logging. Md arrays can still be used with no bitmap file. This patch has minimal impact on such arrays. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: improve the interface to sync_requestNeilBrown5-29/+45
1/ change the return value (which is number-of-sectors synced) from 'int' to 'sector_t'. The number of sectors is usually easily small enough to fit in an int, but if resync needs to abort, it may want to return the total number of remaining sectors, which could be large. Also errors cannot be returned as negative numbers now, so use 0 instead 2/ Add a 'skipped' return parameter to allow the array to report that it skipped the sectors. This allows md to take this into account in the speed calculations. Currently there is no important skipping, but the bitmap-based-resync that is coming will use this. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: improve locking on 'safemode' and move superblock writesNeilBrown5-20/+74
When md marks the superblock dirty before a write, it calls generic_make_request (to write the superblock) from within generic_make_request (to write the first dirty block), which could cause problems later. With this patch, the superblock write is always done by the helper thread, and write request are delayed until that write completes. Also, the locking around marking the array dirty and writing the superblock is improved to avoid possible races. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: merge md_enter_safemode into md_check_recoveryNeilBrown5-38/+24
md_enter_safemode checks if it is time to mark the md superblock as 'clean'. i.e. if all writes have completed and a suitable delay has passed. This is currently called from md_handle_safemode which in-turn is called (almost) every time md_check_recovery is called, and from the end of md_do_sync which causes the mddev->thread to run, which will always call md_check_recovery as well. So it doesn't need to be a separate function and fits quite well into md_check_recovery. The "almost" is because multipathd calls md_check_recovery but not md_handle_safemode. This is OK because the code from md_enter_safemode is a no-op if mddev->safemode == 0, which it always is for a multipathd (providing we don't allow it to be set to 2 on a signal...) Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: make sure recovery happens when add_new_disk is used for hot_addNeilBrown1-0/+2
Currently if add_new_disk is used to hot-add a drive to a degraded array, recovery doesn't start ... because we didn't tell it to. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] md: cause md/raid1 to "repack" working devices when number of drives ↵NeilBrown1-5/+19
is changed i.e. missing or failed drives are moved to the end of the list. The means a 3 drive md array with the first drive missing can be shrunk to a two drive array. Currently that isn't possible. Also, the "last_used" device number might be out-of-range after the number of devices is reduced, so we set it to 0. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] fbdev: fill in the access_align field.James Simmons6-2/+6
Several drivers miss filling in the access_align field. So this patch has them fill it in. Signed-off-by: James Simmons <jsimmons@www.infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] fbdev: stack reductionJames Simmons5-39/+24
Shrink the stack when calling the drawing alignment functions. Signed-off-by: James Simmons <jsimmons@www.infradead.org> Cc: "Antonino A. Daplas" <adaplas@hotpop.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] New framebuffer fonts + updated 12x22 font availableJurriaan6-817/+10053
Improve the fonts for use with the framebuffer. I've added all the characters marked 'FIXME' in the sun12x22 font and created a 10x18 font (based on the sun12x22 font) and a 7x14 font (based on the vga8x16 font). This patch is non-intrusive, no options are enabled by default so most users won't notice a thing. I am placing my changes under the GPL, however, I've not seen any copyright notices on the sun12x22 font and the vga8x16 font which I derived my new fonts from so I don't know what the copyright status is. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] Framebuffer driver for Arc LCD boardJaya Kumar3-0/+701
Add support for the Arc monochrome LCD board. The board uses KS108 controllers to drive individual 64x64 LCD matrices. The board can be paneled in a variety of setups such as 2x1=128x64, 4x4=256x256 and so on. The board/host interface is through GPIO. Signed-off-by: Jaya Kumar <jayalk@intworks.biz> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: <linux-fbdev-devel@lists.sourceforge.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] intelfb: fix accel detection when changing video modesSylvain Meyer1-2/+2
Changed the tests in intelfb_set_par to check also the parameter var.accel_flags. If null, do nothing about ring buffers. Now, the DirectFB i830 driver could nicely work even if intelfb is hw accelerated. Just change the /etc/fb.modes file to disable console hw acceleration when starting a DirectFB app. Signed-off-by: Sylvain Meyer <sylvain.meyer@worldonline.fr> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] intelfb: Add voffset option to avoid conficts with Xorg i810 driverSylvain Meyer1-4/+12
- Add voffset option to avoid conficts with Xorg i810 driver Signed-off-by: Sylvain Meyer <sylvain.meyer@worldonline.fr> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] VGA to fbcon fix.James Simmons1-4/+13
Currently when going from vgacon to fbcon the VT screenbuffer are often different sizes. In the case when they are different sizes a new VT screenbuffer is allocated and the contents are copied into the new buffer. Currently the amount copied from VGA text memory to the new screenbuf is the size of the framebuffer console. If the framebuffer console new VT screen buffer is greater than the VGA text memory size then we get some of the VGA BIOS contents as well. This patch will only allow you to copy up to the size of VGA text memory now. The rest is filled with erase characters. Initial patch by Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: James Simmons <jsimmons@www.infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] pm3fb typo fixAlexey Dobriyan1-1/+1
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] fbdev: iomove removalJames Simmons3-74/+9
Since no one is using the inbuf, outbuf of struct fb_pixmap I removed their use in the framebuffer console. The idea is instead move the pixmap functionality below the accelerated functions intead of on top as the way it is now. If there is no objection please apply. This is against Linus latestr GIT tree. Thank you. Signed-off-by: James Simmons <jsimmons@www.infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] intelfbdrv naming fixAndrew Morton1-1/+1
Can't use this fancy name, because it's used to generate a sysfs filename: kobject_register failed for Intel(R) 830M/845G/852GM/855GM/865G/915G Framebuffer Driver (-13) [<c01bf8e3>] kobject_register+0x43/0x70 [<c022dfe2>] bus_add_driver+0x52/0xa0 [<c01c8c10>] pci_device_shutdown+0x0/0x20 [<c01c8d71>] pci_register_driver+0x61/0x80 [<c0387099>] intelfb_init+0x59/0x70 [<c03787cc>] do_initcalls+0x2c/0xc0 [<c0159025>] kern_mount+0x15/0x17 [<c01002a0>] init+0x0/0x100 [<c01002ca>] init+0x2a/0x100 [<c0100f58>] kernel_thread_helper+0x0/0x18 [<c0100f5d>] kernel_thread_helper+0x5/0x18 Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] some vesafb fixesGerd Knorr1-4/+4
Fix the size passed to release_mem_region in an error path. Also adjust the message printed when vesafb cannot load; the comment there already says this must not be fatal, so the message should also not mention the word 'abort' otherwise indicating a problem to worry about in the log. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Gerd Knorr <kraxel@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] s1d13xxxfb linkage fixAndrew Morton1-1/+1
s1d13xxxfb_remove() is referenced from s1d13xxxfb_probe(), which is marked __devinit(). So s1d13xxxfb_remove() cannot be marked __devexit. Does this all make sense? Clearly the __devexit section will still be in core when the __devinit code is run, if the driver was loaded as a module. But I suppose that if the driver is statically linked, the __devexit section might be dropped early in boot. Still, we wouldn't drop __devexit prior to initcall completion, at which point the __devinit code has all been run anyway. verdict: this code was legal and made sense. Is this a generic problem, or an arm-specific problem? UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o Cc: Russell King <rmk@arm.linux.org.uk> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] Bring back Tux on Chips 65550 framebufferKeenan Pepper1-3/+0
I don't see any reason why the framebuffer should need to be cleared, and it makes Tux vanish. Cc: <linux-fbdev-devel@lists.sourceforge.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ibmasm driver: fix race in command refcount logicMax Asbock6-13/+51
This patch fixes a race in the command reference counting logic by putting spinlocks around kobject_put() in the command_put function. - Also added debug messages. - Changed a memcpy to memcpy_fromio since we are reading from io space. Signed-off-by: Max Asbock <masbock@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ibmasm driver: redesign handling of remote control eventsMax Asbock6-269/+449
This patch rewrites the handling of remote control events. Rather than making them available from a special file in the ibmasmfs, now the events from the RSA card get translated into kernel input events and injected into the input subsystem. The driver now will generate two /dev/input/eventX nodes -- one for the keyboard and one for the mouse. The mouse node generates absolute events more like a touch pad than a mouse. Signed-off-by: Vernon Mauery <vernux@us.ibm.com> Signed-off-by: Max Asbock <masbock@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ibmasm driver: correctly wake up sleeping threadsMax Asbock3-14/+40
Due to my incomplete understanding of the wait_event_interruptible() function threads waiting for service processor events were not woken up. This patch fixes that problem. Signed-off-by: Max Asbock <masbock@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ibmasm driver: fix command buffer sizeMax Asbock1-1/+1
First of a series of patches for the ibmasm driver. (that is the driver for the IBM xSeries RSA service processor) To summarize what they do: [1] change a #define for the buffer size for commands [2] Fix a bug where threads in the event handling code calling wait_event_interruptible() weren't woken up as expected. [3] Redesigned how remote mouse and keyboard events received by the driver are handled. [4] Fixed a race in the command reference counting logic. This patch: - change a #define for the buffer size for commands Signed-off-by: Max Asbock <masbock@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] s390: cio max channels checksCornelia Huck1-3/+3
Fix max channel check in cio_ignore display function. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] m32r: Remove include/asm-m32r/m32102peri.hHirokazu Takata1-2/+2
This patch removes an obsolete header file include/asm-m32r/m32102peri.h. In this header, there are some undesirable single character types, like V. And the header is almost no longer used. Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org> Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] m32r: Update m32r_cfc.[ch] to support Mappi-III platformHirokazu Takata3-38/+33
This patch is for the M32R CF/PCMCIA drivers to support a new platform, Mappi-III evaluation board. Signed-off-by: Mamoru Sakugawa <sakugawa@linux-m32r.org> Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ioc4: PCI bus speed detectionBrent Casavant3-14/+147
Several hardware features of SGI's IOC4 I/O controller chip require timing-related driver calculations dependent upon the PCI bus speed. This patch enables the core IOC4 driver code to detect the actual bus speed and store a value that can later be used by the IOC4 subdrivers as needed. Signed-off-by: Brent Casavant <bcasavan@sgi.com> Acked-by: Pat Gefre <pfg@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ioc4: CONFIG splitBrent Casavant7-5/+36
The SGI IOC4 I/O controller chip drivers are currently all configured by CONFIG_BLK_DEV_SGIIOC4. This is undesirable as not all IOC4 hardware features are needed by all systems. This patch adds two configuration variables, CONFIG_SGI_IOC4 for core IOC4 driver support (see patch 1/3 in this series for further explanation) and CONFIG_SERIAL_SGI_IOC4 to independently enable serial port support. Signed-off-by: Brent Casavant <bcasavan@sgi.com> Acked-by: Pat Gefre <pfg@sgi.com> Acked-by: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ioc4: Core driver rewriteBrent Casavant3-215/+416
This series of patches reworks the configuration and internal structure of the SGI IOC4 I/O controller device drivers. These changes are motivated by several factors: - The IOC4 chip PCI resources are of mixed use between functions (i.e. multiple functions are handled in the same address range, sometimes within the same register), muddling resource ownership and initialization issues. Centralizing this ownership in a core driver is desirable. - The IOC4 chip implements multiple functions (serial, IDE, others not yet implemented in the mainline kernel) but is not a multifunction PCI device. In order to properly handle device addition and removal as well as module insertion and deletion, an intermediary IOC4-specific driver layer is needed to handle these operations cleanly. - All IOC4 drivers are currently enabled by a single CONFIG value. As not all systems need all IOC4 functions, it is desireable to enable these drivers independently. - The current IOC4 core driver will trigger loading of all function-level drivers, as it makes direct calls to them. This situation should be reversed (i.e. function-level drivers cause loading of core driver) in order to maintain a clear and least-surprise driver loading model. - IOC4 hardware design necessitates some driver-level dependency on the PCI bus clock speed. Current code assumes a 66MHz bus, but the speed should be autodetected and appropriate compensation taken. This patch series effects the above changes by a newly and better designed IOC4 core driver with which the function-level drivers can register and deregister themselves upon module insertion/removal. By tracking these modules, device addition/removal is also handled properly. PCI resource management and ownership issues are centralized in this core driver, and IOC4-wide configuration actions such as bus speed detection are also handled in this core driver. This patch: The SGI IOC4 I/O controller chip implements multiple functions, though it is not a multi-function PCI device. Additionally, various PCI resources of the IOC4 are shared by multiple hardware functions, and thus resource ownership by driver is not clearly delineated. Due to the current driver design, all core and subordinate drivers must be loaded, or none, which is undesirable if not all IOC4 hardware features are being used. This patch reorganizes the IOC4 drivers so that the core driver provides a subdriver registration service. Through appropriate callbacks the subdrivers can now handle device addition and removal, as well as module insertion and deletion (though the IOC4 IDE driver requires further work before module deletion will work). The core driver now takes care of allocating PCI resources and data which must be shared between subdrivers, to clearly delineate module ownership of these items. Signed-off-by: Brent Casavant <bcasavan@sgi.com> Acked-by: Pat Gefre <pfg@sgi.com Acked-by: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] mips: add vr41xx gpio supportYoichi Yuasa3-0/+748
Add vr41xx gpio support. Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] ppc64 iSeries: allow build with no PCIStephen Rothwell2-5/+5
This patch allows iSeries to build with CONFIG_PCI=n. This is useful for partitions that have only virtual I/O. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] cpm_uart: Route SCC2 pins for the STx GP3 boardMatt Porter1-0/+9
Adds SCC2 pin routing specific to the GP3 board. Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] 3c59x: remove superfluous vortex_debug test from boomerang_start_xmit()John W. Linville1-3/+2
Remove the superfluous test of "if (vortex_debug > 3)" inside the "if (vortex_debug > 6)" clause early in boomerang_start_xmit. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] node local per-cpu-pagesChristoph Lameter1-1/+1
This patch modifies the way pagesets in struct zone are managed. Each zone has a per-cpu array of pagesets. So any particular CPU has some memory in each zone structure which belongs to itself. Even if that CPU is not local to that zone. So the patch relocates the pagesets for each cpu to the node that is nearest to the cpu instead of allocating the pagesets in the (possibly remote) target zone. This means that the operations to manage pages on remote zone can be done with information available locally. We play a macro trick so that non-NUMA pmachines avoid the additional pointer chase on the page allocator fastpath. AIM7 benchmark on a 32 CPU SGI Altix w/o patches: Tasks jobs/min jti jobs/min/task real cpu 1 484.68 100 484.6769 12.01 1.97 Fri Mar 25 11:01:42 2005 100 27140.46 89 271.4046 21.44 148.71 Fri Mar 25 11:02:04 2005 200 30792.02 82 153.9601 37.80 296.72 Fri Mar 25 11:02:42 2005 300 32209.27 81 107.3642 54.21 451.34 Fri Mar 25 11:03:37 2005 400 34962.83 78 87.4071 66.59 588.97 Fri Mar 25 11:04:44 2005 500 31676.92 75 63.3538 91.87 742.71 Fri Mar 25 11:06:16 2005 600 36032.69 73 60.0545 96.91 885.44 Fri Mar 25 11:07:54 2005 700 35540.43 77 50.7720 114.63 1024.28 Fri Mar 25 11:09:49 2005 800 33906.70 74 42.3834 137.32 1181.65 Fri Mar 25 11:12:06 2005 900 34120.67 73 37.9119 153.51 1325.26 Fri Mar 25 11:14:41 2005 1000 34802.37 74 34.8024 167.23 1465.26 Fri Mar 25 11:17:28 2005 with slab API changes and pageset patch: Tasks jobs/min jti jobs/min/task real cpu 1 485.00 100 485.0000 12.00 1.96 Fri Mar 25 11:46:18 2005 100 28000.96 89 280.0096 20.79 150.45 Fri Mar 25 11:46:39 2005 200 32285.80 79 161.4290 36.05 293.37 Fri Mar 25 11:47:16 2005 300 40424.15 84 134.7472 43.19 438.42 Fri Mar 25 11:47:59 2005 400 39155.01 79 97.8875 59.46 590.05 Fri Mar 25 11:48:59 2005 500 37881.25 82 75.7625 76.82 730.19 Fri Mar 25 11:50:16 2005 600 39083.14 78 65.1386 89.35 872.79 Fri Mar 25 11:51:46 2005 700 38627.83 77 55.1826 105.47 1022.46 Fri Mar 25 11:53:32 2005 800 39631.94 78 49.5399 117.48 1169.94 Fri Mar 25 11:55:30 2005 900 36903.70 79 41.0041 141.94 1310.78 Fri Mar 25 11:57:53 2005 1000 36201.23 77 36.2012 160.77 1458.31 Fri Mar 25 12:00:34 2005 Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Shobhit Dayal <shobhit@calsoftinc.com> Signed-off-by: Shai Fultheim <Shai@Scalex86.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] smp_processor_id() cleanupIngo Molnar3-4/+4
This patch implements a number of smp_processor_id() cleanup ideas that Arjan van de Ven and I came up with. The previous __smp_processor_id/_smp_processor_id/smp_processor_id API spaghetti was hard to follow both on the implementational and on the usage side. Some of the complexity arose from picking wrong names, some of the complexity comes from the fact that not all architectures defined __smp_processor_id. In the new code, there are two externally visible symbols: - smp_processor_id(): debug variant. - raw_smp_processor_id(): nondebug variant. Replaces all existing uses of _smp_processor_id() and __smp_processor_id(). Defined by every SMP architecture in include/asm-*/smp.h. There is one new internal symbol, dependent on DEBUG_PREEMPT: - debug_smp_processor_id(): internal debug variant, mapped to smp_processor_id(). Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new lib/smp_processor_id.c file. All related comments got updated and/or clarified. I have build/boot tested the following 8 .config combinations on x86: {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT} I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT. (Other architectures are untested, but should work just fine.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] coverity: ipmi: avoid overrun of ipmi_interfaces[]Zaur Kambarov1-1/+1
Fix overrun of static array "ipmi_interfaces" of size 4 at position 4 with index variable "if_num". Definitions involved: 297 #define MAX_IPMI_INTERFACES 4 298 static ipmi_smi_t ipmi_interfaces[MAX_IPMI_INTERFACES]; Signed-off-by: Zaur Kambarov <zkambarov@coverity.com> Cc: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] megaraid build fixbobl1-1/+1
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-20Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds178-2128/+2153
2005-06-20[PATCH] PCI: fix show_modalias() function due to attribute changeGreg Kroah-Hartman1-1/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] USB: fix show_modalias() function due to attribute changeGreg Kroah-Hartman1-1/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver core: Don't "lose" devices on suspend on failureBenjamin Herrenschmidt1-1/+12
I think we need this patch or we might "lose" devices to the dpm_irq_off list if a failure occurs during the suspend process. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] I2C: drivers/i2c/chips/adm1026.c: use dynamic sysfs callbacksYani Ioannou1-283/+241
Finally (phew!) this patch demonstrates how to adapt the adm1026 to take advantage of the new callbacks, and the i2c-sysfs.h defined structure/macros. Most of the other sensor/hwmon drivers could be updated in the same way. The odd few exceptions (bmcsensors for example) however might be better off with their own custom attribute structure. Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/usb/input/aiptek.c - ↵Yani Ioannou14-93/+93
drivers/zorro/zorro-sysfs.c: update device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/s390/net/qeth_sys.c - ↵Yani Ioannou17-122/+122
drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/char/raw3270.c - drivers/net/netiucv.c: update ↵Yani Ioannou11-89/+89
device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/i2c/chips/w83781d.c - ↵Yani Ioannou24-99/+100
drivers/s390/block/dcssblk.c: update device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/i2c/chips/pc87360.c - w83627hf.c: update device ↵Yani Ioannou8-115/+115
attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/i2c/chips/lm77.c - max1619.c: update device ↵Yani Ioannou9-113/+113
attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/i2c/chips/adm1031.c - lm75.c: update device ↵Yani Ioannou10-109/+109
attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update ↵Yani Ioannou12-90/+90
device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver core: change device_attribute callbacksYani Ioannou1-2/+2
This patch adds the device_attribute paramerter to the device_attribute store and show sysfs callback functions, and passes a reference to the attribute when the callbacks are called. Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] driver core: fix error handling in bus_add_deviceHannes Reinecke2-6/+10
The error handling in bus_add_device() and device_attach() is simply non-existing. This patch propagates any error from device_attach to the upper layers to allow for a proper recovery. From: Hannes Reinecke <hare@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver core: unregister_node() for hotplug useKeiichiro Tokunaga1-2/+18
This adds a generic function 'unregister_node()'. It is used to remove objects of a node going away for hotplug. All the devices on the node must be unregistered before calling this function. Signed-off-by: Keiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> diff -puN drivers/base/node.c~numa_hp_base drivers/base/node.c
2005-06-20[PATCH] usbcore: Don't call device_release_driver recursivelyAlan Stern1-2/+8
This patch fixes usb_driver_release_interface() to make it avoid calling device_release_driver() recursively, i.e., when invoked from within the disconnect routine for the same device. The patch applies to your "driver" tree. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] driver core: Fix races in driver_detach()Alan Stern1-13/+38
This patch is intended for your "driver" tree. It fixes several subtle races in driver_detach() and device_release_driver() in the driver-model core. The major change is to use klist_remove() rather than klist_del() when taking a device off its driver's list. There's no other way to guarantee that the list pointers will be updated before some other driver binds to the device. For this to work driver_detach() can't use a klist iterator, so the loop over the devices must be written out in full. In addition the patch protects against the possibility that, when a driver and a device are unregistered at the same time, one may be unloaded from memory before the other is finished using it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] usb: klist_node_attached() fixPatrick Mochel1-1/+1
The original code looks like this: /* if interface was already added, bind now; else let * the future device_add() bind it, bypassing probe() */ if (!list_empty (&dev->bus_list)) device_bind_driver(dev); IOW, it's checking to see if the device is attached to the bus or not and binding the driver if it is. It's checking the device's bus list, which will only appear empty when the device has been initialized, but not added. It depends way too much on the driver model internals, but it seems to be the only way to do the weird crap they want to do with interfaces. When I converted it to use klists, I accidentally inverted the logic, which led to bad things happening. This patch returns the check to its orginal value. From: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/usb/core/usb.c ===================================================================
2005-06-20[PATCH] Fix typo in scdrv_init()Jason Uhlenkott1-1/+1
Fix a typo in scdrv_init() which was breaking the build for SGI sn2. Signed-off-by: Jason Uhlenkott <jasonuhl@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver Core: fix bk-driver-core kills ppc64Patrick Mochel1-68/+74
There's no check to see if the device is already bound to a driver, which could do bad things. The first thing to go wrong is that it will try to match a driver with a device already bound to one. In some cases (it appears with USB with drivers/usb/core/usb.c::usb_match_id()), some drivers will match a device based on the class type, so it would be common (especially for HID devices) to match a device that is already bound. The fun comes when ->probe() is called, it fails, then driver_probe_device() does this: dev->driver = NULL; Later on, that pointer could be be dereferenced without checking and cause hell to break loose. This problem could be nasty. It's very hardware dependent, since some devices could have a different set of matching qualifiers than others. Now, I don't quite see exactly where/how you were getting that crash. You're dereferencing bad memory, but I'm not sure which pointer was bad and where it came from, but it could have come from a couple of different places. The patch below will hopefully fix it all up for you. It's against 2.6.12-rc2-mm1, and does the following: - Move logic to driver_probe_device() and comments uncommon returns: 1 - If device is bound 0 - If device not bound, and no error error - If there was an error. - Move locking to caller of that function, since we want to lock a device for the entire time we're trying to bind it to a driver (to prevent against a driver being loaded at the same time). - Update __device_attach() and __driver_attach() to do that locking. - Check if device is already bound in __driver_attach() - Update the converse device_release_driver() so it locks the device around all of the operations. - Mark driver_probe_device() as static and remove export. It's an internal function, it should stay that way, and there are no other callers. If there is ever a need to export it, we can audit it as necessary. Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-06-20[PATCH] Driver core: Fix up the driver and device iterators to be quietergregkh@suse.de1-13/+19
Also stops looping over the lists when a match is found. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de
2005-06-20[PATCH] use device_for_each_child() to properly access child devices.long1-74/+65
On Friday, March 25, 2005 8:47 PM Greg KH wrote: >Here's a fix for pci express. For some reason I don't think they are >using the driver model properly here, but I could be wrong... Thanks for making the changes. However, changes in functions: void pcie_port_device_remove(struct pci_dev *dev) and static int remove_iter(struct device *dev, void *data) are not correct. Please use the patch, which is based on kernel 2.6.12-rc1, below for a fix for these. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Use device_for_each_child() to unregister devices in ↵gregkh@suse.de1-5/+6
nodemgr_remove_host_dev() Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
2005-06-20[PATCH] USB: fix build warning in usb core as pointed out by Andrew.gregkh@suse.de1-1/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/usb/core/usb.c ===================================================================
2005-06-20[PATCH] driver core: change export symbol for driver_for_each_device()gregkh@suse.de1-1/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: linux-2.6.12-rc2/drivers/base/driver.c ===================================================================
2005-06-20[PATCH] Fix up bogus comment.mochel@digitalimplant.org1-2/+1
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> diff -Nru a/drivers/base/driver.c b/drivers/base/driver.c
2005-06-20[PATCH] Use a klist for device child lists.mochel@digitalimplant.org1-15/+15
- Use klist iterator in device_for_each_child(), making it safe to use for removing devices. - Remove unused list_to_dev() function. - Kills all usage of devices_subsys.rwsem. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] use device_for_each_child() to properly access child devices.gregkh@suse.de1-6/+10
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Use device_for_each_child() to unregister devices in ↵mochel@digitalimplant.org1-5/+9
scsi_remove_target(). Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/scsi/scsi_sysfs.c ===================================================================
2005-06-20[PATCH] Call klist_del() instead of klist_remove().mochel@digitalimplant.org1-1/+1
- Can't wait on removing the current item in the list (the positive refcount *because* we are using it causes it to deadlock). Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Remove struct device::driver_list.mochel@digitalimplant.org1-1/+0
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Remove struct device::bus_list.mochel@digitalimplant.org1-1/+0
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Fix up bus code and remove use of rwsem.mochel@digitalimplant.org1-12/+0
- Don't add devices to bus's embedded kset, since it's not used by anyone anymore. - Don't need to take the bus rwsem when calling {device,driver}_attach(), since those functions use the klists and the klists' spinlocks. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on ↵mochel@digitalimplant.org1-2/+2
lists that will go away. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/usb/core/usb.c ===================================================================
2005-06-20[PATCH] Use bus_for_each_{dev,drv} for driver binding.mochel@digitalimplant.org1-33/+39
- Now possible, since the lists are locked using the klist lock and not the global rwsem. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Remove the unused device_find().mochel@digitalimplant.org1-19/+0
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Add a klist to struct device_driver for the devices bound to it.mochel@digitalimplant.org3-28/+35
- Use it in driver_for_each_device() instead of the regular list_head and stop using the bus's rwsem for protection. - Use driver_for_each_device() in driver_detach() so we don't deadlock on the bus's rwsem. - Remove ->devices. - Move klist access and sysfs link access out from under device's semaphore, since they're synchronized through other means. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Add a klist to struct bus_type for its drivers.mochel@digitalimplant.org1-29/+23
- Use it in bus_for_each_drv(). - Use the klist spinlock instead of the bus rwsem. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Add a klist to struct bus_type for its devices.mochel@digitalimplant.org1-30/+24
- Use it for bus_for_each_dev(). - Use the klist spinlock instead of the bus rwsem. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Use driver_for_each_device() instead of manually walking list.mochel@digitalimplant.org1-18/+23
Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/usb/core/usb.c ===================================================================
2005-06-20[PATCH] Use driver_for_each_device() in drivers/pnp/driver.c instead of ↵mochel@digitalimplant.org1-4/+8
manually walking list. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> diff -Nru a/drivers/pnp/driver.c b/drivers/pnp/driver.c
2005-06-20[PATCH] Add driver_for_each_device().mochel@digitalimplant.org1-0/+35
Now there's an iterator for accessing each device bound to a driver. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: linux-2.6.12-rc2/drivers/base/driver.c ===================================================================
2005-06-20[PATCH] Move device/driver code to drivers/base/dd.cmochel@digitalimplant.org4-183/+203
This relocates the driver binding/unbinding code to drivers/base/dd.c. This is done for two reasons: One, it's not code related to the bus_type itself; it uses some from that, some from devices, and some from drivers. And Two, it will make it easier to do some of the upcoming lock removal on that code.. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Add a semaphore to struct device to synchronize calls to its driver.mochel@digitalimplant.org4-6/+20
This adds a per-device semaphore that is taken before every call from the core to a driver method. This prevents e.g. simultaneous calls to the ->suspend() or ->resume() and ->probe() or ->release(), potentially saving a whole lot of headaches. It also moves us a step closer to removing the bus rwsem, since it protects the fields in struct device that are modified by the core. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] fix up ipmi code after class_simple.c removalAndrew Morton1-7/+7
Cc: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] class: remove class_simple code, as no one in the tree is using it ↵gregkh@suse.de2-200/+1
anymore. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] class: add kerneldoc for the new class functions.gregkh@suse.de1-0/+43
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] USB: trivial error path fixMark M. Hoffman1-0/+1
Trivial fix to USB class-creation error path; please apply. Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] class: convert drivers/* to use the new class api instead of ↵gregkh@suse.de9-53/+51
class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] class: convert drivers/scsi/* to use the new class api instead of ↵gregkh@suse.de3-25/+27
class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] class: convert drivers/ieee1394/* to use the new class api instead ↵gregkh@suse.de5-15/+16
of class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] class: convert drivers/char/* to use the new class api instead of ↵gregkh@suse.de14-103/+103
class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] class: convert drivers/block/* to use the new class api instead of ↵gregkh@suse.de3-22/+22
class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] USB: move the usb hcd code to use the new class code.gregkh@suse.de3-44/+37
This moves a kref into the main hcd structure, which detaches it from the class device structure. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] INPUT: move to use the new class code, instead of class_simplegregkh@suse.de5-24/+28
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] tty: move to use the new class code, instead of class_simplegregkh@suse.de1-8/+8
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] CLASS: move a "simple" class logic into the class core.gregkh@suse.de1-11/+134
One step on improving the class api so that it can not be used incorrectly. This also fixes the module owner issue with the dev files that happened when the devt logic moved to the class core. Based on a patch originally written by Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] sysfs: (rest) if show/store is missing return -EIODmitry Torokhov5-8/+8
sysfs: fix the rest of the kernel so if an attribute doesn't implement show or store method read/write will return -EIO instead of 0 or -EINVAL or -EPERM. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] sysfs: (driver/block) if show/store is missing return -EIODmitry Torokhov5-9/+9
sysfs: fix drivers/block so if an attribute doesn't implement show or store method read/write will return -EIO instead of 0 or -EINVAL. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>