Commit Graph

3370 Commits

Author SHA1 Message Date
Jean Delvare da97a5a327 [PATCH] hwmon: hwmon vs i2c, second round (08/11)
Cleanup hwmon-vid a bit, fixing typos, rewording some comments and
reindenting properly at places.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:22 -07:00
Jean Delvare 303760b44a [PATCH] hwmon: hwmon vs i2c, second round (07/11)
The only part left in i2c-sensor is the VRM/VRD/VID handling code.
This is in no way related to i2c, so it doesn't belong there. Move
the code to hwmon, where it belongs.

Note that not all hardware monitoring drivers do VRM/VRD/VID
operations, so less drivers depend on hwmon-vid than there were
depending on i2c-sensor.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:22 -07:00
Jean Delvare f4b5026120 [PATCH] hwmon: hwmon vs i2c, second round (06/11)
The only thing left in i2c-sensor.h are module parameter definition
macros. It's only an extension of what i2c.h offers, and this extension
is not sensors-specific. As a matter of fact, a few non-sensors drivers
use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h
altogether.

Signed-off-by: Jean Delvare <khali@linux-fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:21 -07:00
Jean Delvare 96478ef3f3 [PATCH] hwmon: hwmon vs i2c, second round (05/11)
The i2c_detect function has no more user, delete it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:20 -07:00
Jean Delvare 2ed2dc3c11 [PATCH] hwmon: hwmon vs i2c, second round (04/11)
i2c_probe and i2c_detect now do the exact same thing and operate on
the same data structure, so we can have everyone call i2c_probe.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:20 -07:00
Jean Delvare b78ec31582 [PATCH] hwmon: hwmon vs i2c, second round (03/11)
We now have two identical structures, i2c_address_data in i2c-sensor.h
and i2c_client_address_data in i2c.h. We can kill one of them, I choose
to keep the one in i2c.h as it makes more sense (this structure is not
specific to sensors.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:19 -07:00
Jean Delvare ef8dec5d8b [PATCH] hwmon: hwmon vs i2c, second round (02/11)
The way i2c-sensor handles forced addresses could be optimized. It
defines a structure (i2c_force_data) to associate a module parameter
with a given kind value, but in fact this kind value is always the
index of the structure in each array it is used in. So this additional
value can be omitted, and still be deduced in the code handling these
arrays.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:18 -07:00
Jean Delvare 9fc6adfa9a [PATCH] hwmon: hwmon vs i2c, second round (01/11)
Add support for kind-forced addresses to i2c_probe, like i2c_detect
has for (essentially) hardware monitoring drivers.

Note that this change will slightly increase the size of the drivers
using I2C_CLIENT_INSMOD, with no immediate benefit. This is a
requirement if we want to merge i2c_probe and i2c_detect though, and
seems a reasonable price to pay in comparison with the previous
cleanups which saved much more than that (such as the i2c-isa cleanup
or the i2c address ranges removal.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:18 -07:00
Jean Delvare 5cb802293e [PATCH] hwmon: lm85: trivial cleanups
Remove an unused macro and an outdated comment from the lm85 driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:17 -07:00
Jean Delvare 53ae11b083 [PATCH] hwmon: move SENSORS_LIMIT to hwmon.h
Move SENSORS_LIMIT from i2c-sensor.h to hwmon.h, as it is in no way
related to i2c.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:17 -07:00
Jean Delvare b6d7b3d1b5 [PATCH] I2C: Improve core debugging messages
The debugging messages in i2c-core are more confusing than helpful. Some
lack their trailing newline, some lack a prefix, some are redundant,
some lack precious information. Here is my attempt to introduce some
standardization in there.

I also changed two messages in i2c-dev to make it clear they come from
i2c-dev.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:16 -07:00
Ian Campbell 48edcb65dd [PATCH] I2C: i2c-algo-pca -- gracefully handle a busy bus
I've been running with this patch for a while now, and while I've never
seen it trigger except with buggy hardware I think it is a cleaner way
to handle a busy bus. I had -EBUSY until about 10 minutes ago but -EIO
seems to be what most of the existing algo drivers will return in the
same circumstances.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:15 -07:00
Jean Delvare cdcb192197 [PATCH] I2C: inline i2c_adapter_id
We could inline i2c_adapter_id, as it is really, really short. Doing
so saves a few bytes both in i2c-core and in the drivers using this
function.

                                            before     after      diff
drivers/hwmon/adm1026.ko                     41344     41305       -39
drivers/hwmon/asb100.ko                      27325     27246       -79
drivers/hwmon/gl518sm.ko                     20824     20785       -39
drivers/hwmon/it87.ko                        26419     26380       -39
drivers/hwmon/lm78.ko                        21424     21385       -39
drivers/hwmon/lm85.ko                        41034     40939       -95
drivers/hwmon/w83781d.ko                     39561     39514       -47
drivers/hwmon/w83792d.ko                     32979     32932       -47
drivers/i2c/i2c-core.ko                      24708     24531      -177

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:15 -07:00
Jean Delvare e6cfb3ad72 [PATCH] hwmon: tag super-i/o find functions __init
Super-I/O find functions in hardware monitoring drivers can be tagged
__init as they are only called from functions themselves tagged __init.
Two of them (smsc47b397 and w83627ehf) already do, but the other four
of them (it87, pc87360, smsc47m1 and w83627hf) did not.

This saves a few bytes of memory after the drivers are loaded, 192 in
the case of the it87 driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:15 -07:00
Jean Delvare 7bef559455 [PATCH] I2C: refactor message in i2c_detach_client
We could refactor the error message 34 different i2c drivers print if
i2c_detach_client() fails in this function itself. Saves quite a few
lines of code. Documentation is updated to reflect that change.

Note that this patch should be applied after Rudolf Marek's w83792d
patches.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:14 -07:00
R.Marek@sh.cvut.cz ce785ab460 [PATCH] I2C: W83792D add hwmon class register 2/3
This patch adds registration of hwmon class. Tested with help of i2c-stub.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:13 -07:00
R.Marek@sh.cvut.cz 5563e27d3a [PATCH] I2C: W83792D driver 1/3
I would like to announce support for W83792D chip. This driver was developed
by Winbond Electronics Corp. I added sysfs attributes callbacks infrastructure
plus various code fixes and codingstyle cleanups. I would like to thank Winbond
for supporting free software.

This patch is against 2.6.13rc3 plus hwmon-class and hwmon-split.
Separate patch for documantation and hwmon class register will follow.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Chunhao Huang <DZShen@Winbond.com.tw>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:13 -07:00
Jean Delvare 02ff982c69 [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (8/9)
Kill all uses of i2c_is_isa_adapter except for the hybrid drivers (it87,
lm78, w83781d). The i2c-isa adapter not being registered with the i2c
core anymore, drivers don't have to fear being erroneously attached to
it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:12 -07:00
Jean Delvare 5071860aba [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (7/9)
Kill normal_isa in header files, documentation and all chip drivers, as
it is no more used.

normal_i2c could be renamed to normal, but I decided not to do so at the
moment, so as to limit the number of changes. This might be done later
as part of the i2c_probe/i2c_detect merge.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:12 -07:00
Jean Delvare 4926c0d4de [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (6/9)
Kill all isa-related stuff from i2c_detect, it's not used anymore.

This is one major step in the directiom of merging i2c_probe and
i2c_detect. The last obstacle I can think of is the different way forced
addresses work between sensors and non-sensors i2c drivers. I'll deal
with that in a later patchset.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:11 -07:00
Jean Delvare 2d8672c5a6 [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (5/9)
Call the ISA chip drivers detection function directly instead of relying
on i2c_detect. The net effect is that address lists won't be handled
anymore, but they were mostly useless in the ISA case anyway (pc87360,
smsc47m1, smsc47b397 had already dropped them).

We don't need to handle multiple devices, all we may need is a way to
force a given address instead of the original one (some drivers already
do: sis5595, via686a, w83627hf), and, for drivers supporting multiple
chips, a way to force one given kind. All this may be added later on
demand, but I actually don't think there will be much demand.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:10 -07:00
Jean Delvare 5042c7d752 [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (4/9)
All ISA hardware monitoring drivers (including hybrid drivers) now have
a hard dependency on i2c-isa, so they must select I2C_ISA. As a result,
CONFIG_I2C_ISA doesn't need to be left visible to the user. The good
thing here is that users will stop complaining that some driver doesn't
work just because they forgot to compile or load i2c-isa.

At this point, all drivers are working again and the cleanup phase can
begin.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:10 -07:00
Jean Delvare fde0950903 [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (3/9)
Convert the 10 ISA hardware monitoring drivers (it87, lm78, pc87360,
sis5595, smsc47b397, smsc47m1, via686a, w83627hf, w83627ehf, w83781d) to
explicitely register with i2c-isa. For hybrid drivers (it87, lm78,
w83781d), we now have two separate instances of i2c_driver, one for the
I2C interface of the chip, and one for ISA interface. In the long run,
the one for ISA will be replaced with a different driver type.

At this point, all drivers are working again, except for missing
dependencies in Kconfig.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:09 -07:00
Jean Delvare 400c455eaa [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (2/9)
Convert i2c-isa from a dumb i2c_adapter into a pseudo i2c-core for ISA
hardware monitoring drivers. The isa i2c_adapter is no more registered
with i2c-core, drivers have to explicitely connect to it using the new
i2c_isa_{add,del}_driver interface.

At this point, all ISA chip drivers are useless, because they still
register with i2c-core in the hope i2c-isa is registered there as well,
but it isn't anymore.

The fake bus will be named i2c-9191 in sysfs. This is the number it
already had internally in various places, so it's not exactly new,
except that now the number is seen in userspace as well. This shouldn't
be a problem until someone really has 9192 I2C busses in a given system
;)

The fake bus will no more show in "i2cdetect -l", as it won't be seen by
i2c-dev anymore (not being registered with i2c-core), which is a good
thing, as i2cdetect/i2cdump/i2cset cannot operate on this fake bus
anyway.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:09 -07:00
Jean Delvare efde723fda [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (1/9)
Temporarily export a few structures and functions from i2c-core, because we
will soon need them in i2c-isa.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:09 -07:00
Mark M. Hoffman 943b0830ce [PATCH] I2C hwmon: add hwmon sysfs class to drivers
This patch modifies sensors chip drivers to make use of the new
sysfs class "hwmon".

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:08 -07:00
Mark M. Hoffman 1236441f38 [PATCH] I2C hwmon: hwmon sysfs class
This patch adds the sysfs class "hwmon" for use by hardware monitoring
(sensors) chip drivers.  It also fixes up the related Kconfig/Makefile
bits.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:07 -07:00
Jean Delvare 8dd2d2ca7f [PATCH] hwmon: Document on the W83627EHG chip
Document the fact that the W83627EHG is compatible with the W83627EHF.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:07 -07:00
Jean Delvare 27fe048eb3 [PATCH] hwmon: kill client name lm78-j
Drop the separate client name for the LM78-J chip. This is really
only a later revision of the LM78, with almost no difference and
no difference the driver handles in any case.

This was the only client name that had a dash in it, and special care
had to be taken in libsensors because of it. As we plan to write a new
library soon, I'd like to get rid of this exception before we do.

As a nice side effect, it saves 876 bytes in lm78.ko.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:06 -07:00
Jean Delvare e647ecf15e [PATCH] hwmon: soften lm75 initialization
The LM75 initialization is a bit agressive, it arbitrarily reconfigures
the chip. Make it only change the bit it needs. This is a port from
the 2.4 kernel version of the driver (lm_sensors).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:06 -07:00
bgardner@wabtec.com 17f990c87a [PATCH] I2C: max6875 code cleanup
Remove an unused local variable and change the subclient name.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:06 -07:00
bgardner@wabtec.com a61fc683ae [PATCH] I2C: add kobj_to_i2c_client
Move the inline function kobj_to_i2c_client() from max6875.c to i2c.h.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:05 -07:00
Hans-Frieder Vogt 5033017c26 [PATCH] I2C: cleanup of i2c-nforce2
attached is a small patch that removes unused code from i2c-nforce2 and
adds a single debug message. The patch is against 2.6.13-rc3-mm1.
I have tested the patch with 2.6.13-rc3: compiles cleanly and works as
without the patch (as expected).

Signed-off-by: Hans-Frieder Vogt <hfvogt@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:04 -07:00
Greg Kroah-Hartman a8decc658a [PATCH] I2C: fix max6875 build error
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:04 -07:00
bgardner@wabtec.com bc769ff8f5 [PATCH] I2C: simplify max6875 driver
This is an update to the max6875 driver.
It no longer does any detection, so the address must be forced on module load.
It only makes available the user EEPROM (read-only).

This patch is based off 2.6.13-rc2-mm2.

Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:03 -07:00
Linus Torvalds 67d2c36e90 Merge watchdog driver updates
Automated merge from

	master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

failed due to duplicate different changes to Kconfig file. Manually fixed
up. Hopefully.
2005-09-05 06:00:45 -07:00
Linus Torvalds 94f8c66e5e Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-09-05 05:50:36 -07:00
Dave Airlie 908f9c4850 drm: fix MGA on non AGP systems
Al Viro noticed that MGA wouldn't build on non AGP systems.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-05 21:51:30 +10:00
Dave Airlie f210973bb6 drm: small cleanups
This patch contains the following small cleanups:
- make two needlessly global functions static
- drm_sysfs.c: every file should #include the header with the prototypes
              of the global functions it is offering

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-05 21:33:44 +10:00
Dave Airlie 89625eb186 drm: fix issue with handle lookup for a 0 handle
On 32-bit PPC a 0 handle is valid for AGP space, the 32/64 lookup
doesn't handle 0 correctly.

From: Ben Herrenschmidt <benh@kernel.crashing.org> and Paul Mackerras <paulus@samba.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-05 21:23:23 +10:00
Jeff Garzik d0bd99299b /spare/repo/libata-dev branch 'iomap-try3' 2005-09-05 05:20:33 -04:00
Jeff Garzik 586a4ac509 /spare/repo/libata-dev branch 'master' 2005-09-05 05:16:50 -04:00
Linus Torvalds da1f136c26 Merge master.kernel.org:/home/rmk/linux-2.6-mmc 2005-09-05 00:18:09 -07:00
Linus Torvalds 64c4813d9e Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-09-05 00:17:25 -07:00
Linus Torvalds babf68de58 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-09-05 00:14:47 -07:00
Linus Torvalds e766f1cc59 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-09-05 00:12:58 -07:00
Linus Torvalds 48467641bc Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-09-05 00:11:50 -07:00
Martin Schwidefsky 3863e72414 [PATCH] s390: disconnected 3270 console
Fix reboot with a disconnected 3270 console.

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-09-05 00:06:29 -07:00
Eric Rossman 2dee702fcb [PATCH] s390: crypto driver update
crypto device driver update:

 - Suppress syslog messages for some return codes.

 - Fix incorrect bounds checking in /proc interface.

 - Remove hotplug calls.

 - Remove linux version checks.

 - Remove device workqueue on module unload.

Signed-off-by: Eric Rossman <edrossma@us.ibm.com>
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-09-05 00:06:29 -07:00
Cornelia Huck 4c24da79e2 [PATCH] s390: reIPL fix and extern/static inline
Common i/o layer changes:

- Collect the irb at the correct subchannel when waiting for the clear
  interrupt during subchannel cleaning befor reIPL - don't stop at the first
  interrupt that comes in.

- Change "extern __inline__" to "static inline".

- Remove unneeded qdio includes.

Signed-off-by: Cornelia Huck <cohuck@de.ibm.com>
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-09-05 00:06:28 -07:00
Horst Hummel fd49f41aa0 [PATCH] s390: 64 bit diag250 support
Add support for diag 250 access to dasd devices for 64 bit kernels.  In
addition fix detach/attach for diag disks.  The VM control block needs to get
recreated by a call to mdsk_init_io.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
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-09-05 00:06:27 -07:00
Horst Hummel c6eb7b7703 [PATCH] s390: deadlock in dasd_devmap
Reintroduce a read-only copy of the devmap features in the device struct.
This is necessary to solve a deadlock on the dasd_devmap_lock which is
acquired by dasd_get_features called from the dasd tasklet.  The current
implementation of devmap doesn't allow to call any devmap function from
interrupt or softirq context.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
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-09-05 00:06:26 -07:00
Martin Schwidefsky ae6aa2ea89 [PATCH] s390: machine check handler bugs
The new machine check handler still has a few bugs.

1) The system entry time has to be stored in the machine check handler,

2) the machine check return psw may not be stored at the usual place
   because it might overwrite the return psw of the interrupted context,

3) the return address for the call to s390_handle_mcck in the i/o interrupt
   handler is not correct,

4) the system call cleanup has to take the different save area of the
   machine check handler into account,

5) the machine check handler may not call UPDATE_VTIME before
   CREATE_STACK_FRAME, and

6) the io leave path needs a critical section cleanup to make sure that the
   TIF_MCCK_PENDING bit is really checked before switching back to user space.

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-09-05 00:06:25 -07:00
Michal Schmidt 46dacba52a [PATCH] swsusp: prevent disks from spinning down and up
Stop the disks from spinning down and up on suspend.

Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:16 -07:00
Pavel Machek 583a4e88db [PATCH] fix pm_message_t stuff in -mm tree
This should bits from -mm tree that are affected by pm_message_t
conversion.  [I'm not 100% sure I got all of them, but I certainly got all
the errors on make allyesconfig build, and most of warnings, too.  I'll go
through the buildlog tommorow and fix any remaining bits].

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:16 -07:00
Pavel Machek ca078bae81 [PATCH] swsusp: switch pm_message_t to struct
This adds type-checking to pm_message_t, so that people can't confuse it
with int or u32.  It also allows us to fix "disk yoyo" during suspend (disk
spinning down/up/down).

[We've tried that before; since that cpufreq problems were fixed and I've
tried make allyes config and fixed resulting damage.]

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:16 -07:00
Pavel Machek 829ca9a30a [PATCH] swsusp: fix remaining u32 vs. pm_message_t confusion
Fix remaining bits of u32 vs.  pm_message confusion.  Should not break
anything.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:15 -07:00
Karsten Wiese a1740913ca [PATCH] via vt8237 apic bypass deassertion quirk
The VIA VT8237's IOAPIC sends 'APIC De-Assert Messages' by default, causing
another CPU interrupt when the IRQ pin is de-asserted.  This feature is
switched off by the patch to get rid of doubled ioapic level interrupt
rates.

Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:10 -07:00
Ralf Baechle 59df6bbf38 [PATCH] mips: kludge envdev to build for 64-bit MIPS with 32-bit compat
Extend the compat mode kludgeology in envdev to cover MIPS as well.

Or why we should need something like is_compat_task() ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:08 -07:00
Ralf Baechle 875d43e72b [PATCH] mips: clean up 32/64-bit configuration
Start cleaning 32-bit vs. 64-bit configuration.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:06 -07:00
Yoichi Yuasa 466adc66cf [PATCH] fix warning of TANBAC_TB0219 in drivers/char/Kconfig
$ make menuconfig
scripts/kconfig/mconf arch/i386/Kconfig
drivers/char/Kconfig:847:warning: 'select' used by config symbol
'TANBAC_TB0219' refer to undefined symbol 'PCI_VR41XX'

Here is a patch for this warning fix.

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:04 -07:00
Yoichi Yuasa 63b799f9de [PATCH] mips: add TANBAC VR4131 multichip module
This patch has added TANBAC VR4131 multichip module in arch/mips/Kconfig

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-09-05 00:06:04 -07:00
Ralf Baechle 7901c79982 [PATCH] DEC PMAGB B framebuffer update
Revive HX frame buffer support for 2.6.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:03 -07:00
Ralf Baechle af690a948c [PATCH] DEC PMAG BA frame buffer update
Rewrite PMAG BA frame buffer driver for 2.6.

Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:03 -07:00
Ralf Baechle 61838ffeee [PATCH] DEC PMAG AA framebuffer update
Get it working again.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:06:03 -07:00
Kumar Gala 39cdc4bfb5 [PATCH] ppc32: Cleaned up global namespace of Book-E watchdog variables
Renamed global variables used to convey if the watchdog is enabled and
periodicity of the timer and moved the declarations into a header for these
variables

Signed-off-by: Matt McClintock <msm@freescale.com>
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-09-05 00:05:57 -07:00
Kumar Gala b0531b9b32 [PATCH] cpm_uart: Fix baseaddress for SMC 1 and 2
Base addess register for SMC 1 and 2 are never initialized.  This means
that they will not work unless a bootloader already configured them.

The DPRAM already have space reserved, this patch just makes sure the base
addess register is updated correctly on initialization.

Signed-off-by: Rune Torgersen <runet@innovsys.com>
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-09-05 00:05:56 -07:00
Kumar Gala 638861d54e [PATCH] cpm_uart: use schedule_timeout instead of direct call to schedule
use schedule_timeout instead of direct call to schedule

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
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-09-05 00:05:56 -07:00
Kumar Gala 0d8ba1a979 [PATCH] cpm_uart: Fix 2nd serial port on MPC8560 ADS
The 2nd serial port on the MPC8560 ADS was not being configured correctly
and thus could not be used as a console.  Updated the defconfig for the
board to configure the proper SCC channel for the 2nd serial port.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
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-09-05 00:05:56 -07:00
Kumar Gala a2f40ccd29 [PATCH] ppc32: Added support for the Book-E style Watchdog Timer
PowerPC 40x and Book-E processors support a watchdog timer at the processor
core level.  The timer has implementation dependent timeout frequencies
that can be configured by software.

One the first Watchdog timeout we get a critical exception.  It is left to
board specific code to determine what should happen at this point.  If
nothing is done and another timeout period expires the processor may
attempt to reset the machine.

Command line parameters:
  wdt=0 : disable watchdog (default)
  wdt=1 : enable watchdog

  wdt_period=N : N sets the value of the Watchdog Timer Period.

  The Watchdog Timer Period meaning is implementation specific. Check
  User Manual for the processor for more details.

This patch is based off of work done by Takeharu Kato.

Signed-off-by: Matt McClintock <msm@freescale.com>
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-09-05 00:05:56 -07:00
Martin Hicks c07e02db76 [PATCH] VM: add page_state info to per-node meminfo
Add page_state info to the per-node meminfo file in sysfs.  This is mostly
just for informational purposes.

The lack of this information was brought up recently during a discussion
regarding pagecache clearing, and I put this patch together to test out one
of the suggestions.

It seems like interesting info to have, so I'm submitting the patch.

Signed-off-by: Martin Hicks <mort@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:05:49 -07:00
Marcel Selhorst e8a650150b [PATCH] tpm_infineon: Bugfix in PNPACPI-handling
This patch corrects the PNP-handling inside the tpm-driver
and some minor coding style bugs.
Note: the pci-device and pnp-device mixture is currently necessary,
since the used "tpm"-interface requires a pci-dev in order to register
the driver. This will be fixed within the next iterations.

Signed-off-by: Marcel Selhorst <selhorst@crypto.rub.de>
Cc: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:05:37 -07:00
Michael Krufky e770e85061 [PATCH] dvb: saa7134-dvb must select tda1004x
Please apply this to 2.6.14, and also to 2.6.13.1 -stable.  Without this
patch, users will have to EXPLICITLY select tda1004x in Kconfig.  This
SHOULD be done automatically when saa7134-dvb is selected.  This patch
corrects this problem.

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:05:37 -07:00
Andrew Vasquez 1aab60c25e [SCSI] qla2xxx: Update version number to 8.01.00-k.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:54:06 -05:00
Andrew Vasquez f6ef3b1872 [SCSI] qla2xxx: Stop firmware execution at unintialization time.
On ISP24xx parts, stop execution of firmware during ISP
tear-down.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:57 -05:00
Andrew Vasquez fe74c71f6b [SCSI] qla2xxx: Replace schedule_timeout().
From: Nishanth Aravamudan <nacc@us.ibm.com>

Replace schedule_timeout() with
msleep()/msleep_interruptible() as appropriate, to guarantee the task
delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:52 -05:00
Andrew Vasquez 86cd6baa82 [SCSI] qla2xxx: Remove bad call to fc_remove_host() during probe failure.
fc_remove_host() should only be called after a scsi_host has
been successfully added via scsi_add_host() -- any failures
while qla2xxx probing would result in an incorrect call to
fc_remove_host() during cleanup.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:50 -05:00
Andrew Vasquez afb046e2be [SCSI] qla2xxx: Add host attributes.
Export additional host information via the shost_attrs member in
the scsi_host template.  Attributes include: driver version,
firmware version, ISP serial number, ISP type, ISP product ID,
HBA model name, HBA model description, PCI interconnect
information, and HBA port state.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:42 -05:00
Andrew Vasquez ce7e4af7f5 [SCSI] qla2xxx: Add change_queue_depth/type() API support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:40 -05:00
Andrew Vasquez 131736d34e [SCSI] qla2xxx: Remove redundant call to pci_unmap_sg().
In a corner-case failure where the request-q does not
contain enough entries for a given request, pci_unmap_sg()
would be called twice.  Remove direct call and let the
failure-path logic handle the unmapping.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:28 -05:00
Andrew Vasquez c32c4cb9fb [SCSI] qla2xxx: Remove RISC pause/release barriers during flash manipulation.
Remove unnecessary RISC pause/release barriers during
ISP24xx flash manipulation.  The ISP24xx can arbitrate flash
access requests during RISC executions.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:23 -05:00
Andrew Vasquez 06c22bd13f [SCSI] qla2xxx: Correct LED scheme definition.
Original implementation used an overloaded bit in the EFI
parameters.  The correct bit is BIT_4 of the special_options
section of NVRAM.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:12 -05:00
Andrew Vasquez c00c72ae01 [SCSI] qla2xxx: Simplify redundant target/device reset logic.
Remove redundant qla2x00_target_reset() function in favour of
the equivalent qla2x00_device_reset().  Update callers of
old function.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:10 -05:00
Andrew Vasquez f7d289f62e [SCSI] qla2xxx: Correct domain/area exclusion logic.
In an FL topology, limit port recognition to those devices
not within the same area and domain of the ISP.  The
firmware will recogonize such devices during local-loop
discovery.

Some devices may respond to a PLOGI before they have
completed their fabric login or they may not be a public
device. In this case they will report:

        domain == 00
        area == 00
        alpa == <XX>

which is valid. Exclude such devices from local loop
discovery.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:08 -05:00
Andrew Vasquez cca5335caf [SCSI] qla2xxx: Add FDMI support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:07 -05:00
Andrew Vasquez ad3e0edace [SCSI] qla2xxx: Export class-of-service (COS) information.
Export COS information for the fc_host and fc_remote_port
objects added by the driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:04 -05:00
Andrew Vasquez 7524f9b9e7 [SCSI] qla2xxx: Use dma_get_required_mask() in determining the 'ideal' DMA mask.
In order to efficiently utilise the ISP's IOCB
request-queue, use the dma_get_required_mask() function to
determine the use of command-type 2 or 3 IOCBs when queueing
SCSI commands.  This applies to ISP2[123]xx chips only, as
the ISP24xx uses command-type 7 IOCBs which use 64bit DSDs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:53:02 -05:00
Christoph Hellwig c6678e0cfb [SCSI] fusion: whitespace fixes
Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:51:45 -05:00
Christoph Hellwig 637fa99b86 [SCSI] fusion: endianess fixes
Assorted endianess fixes.  I'll work on full endianess annotations
later.

Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:51:25 -05:00
Christoph Hellwig ccf3b7bd26 [SCSI] fusion: update LSI headers
Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:48:39 -05:00
Christoph Hellwig 69218ee518 [SCSI] fusion: extended config header support
Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:48:06 -05:00
Christoph Hellwig 1ff927306e [SCSI] aic7xxx: remove aiclib.c
#include of C files and macro tricks to rename symbols are evil and just
cause trouble.  Let's doublicate the two functions as they're going to
go away soon enough anyway.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:46:07 -05:00
Mark Haverkamp 77d71d222e [SCSI] aacraid: bad BUG_ON fix
This was noticed by Doug Bazamic and the fix found by Mark Salyzyn at
Adaptec.

There was an error in the BUG_ON() statement that validated the
calculated fib size which can cause the driver to panic.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:46:06 -05:00
Douglas Gilbert deb92b7ee9 [SCSI] sg direct io/mmap oops, st sync
This patch adopts the same solution as proposed by Kai M. in
a post titled: "[PATCH] SCSI tape signed/unsigned fix".
The fix is in a function that the sg driver borrowed from
the st driver so its maintenance is a little easier if
the functions remain the same after the fix.

   - change nr_pages type from unsigned to signed so errors
     from get_user_pages() call are properly handled

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:46:03 -05:00
James Bottomley 07542b8323 This patch fixes in st.c the bug in the signed/unsigned int comparison
reported by Doug Gilbert and fixed by him in sg.c (see [PATCH] sg direct
io/mmap oops). Doug fixed the comparison in sg.c. This fix for st.c does not
touch the comparison but makes both arguments signed to remove the
problem. The new code is adapted from linux/fs/bio.c.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>

Rejections fixed up and

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-09-04 19:45:59 -05:00
Richard Purdie f36598aeca [ARM] 2873/1: PCMCIA soc: Allow access to filesystems on CF at boot time
Patch from Richard Purdie

This change makes the soc pcmcia interfaces available earlier in the
boot process meaning devices like CF microdrives can be used for the
root filesystem.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-03 19:39:25 +01:00
Pierre Ossman 1656fa579e [MMC] support for mmc chip select in wbsd
Use the chip select ios in the wbsd driver.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-03 16:45:49 +01:00
Pierre Ossman 865e9f13c9 [MMC] ios for mmc chip select
Adds a new ios for setting the chip select pin on MMC cards. Needed on
SD controllers which use this pin for other things and therefore cannot
have it pulled high at all times.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-03 16:45:02 +01:00
Sergey Vlasov 9b4e3b13b1 [SERIAL] Fix moxa tty driver name
The moxa driver was named "ttya", which is wrong:
1) Documentation/devices.txt says that the name should be "ttyMX".
2) First 10 ports (ttya0...ttya9) clash with the legacy pty driver.

This patch changes the driver name to "ttyMX".

http://bugme.osdl.org/show_bug.cgi?id=5012

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-03 16:26:49 +01:00
Russell King 30b7a3bc13 [SERIAL] Prefix serial printks with KERN_INFO and pre-format
Pre-format the IO part of the ttyS printks, and prefix them with
KERN_INFO to avoid bootsplash corruption.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-03 15:30:21 +01:00
Chuck Ebbert 1cc7724810 [WATCHDOG] softdog-timer-running-oops.patch
The softdog watchdog timer has a bug that can create an oops:

1.  Load the module without the nowayout option.
2.  Open the driver and close it without writing 'V' before close.
3.  Unload the module.  The timer will continue to run...
4.  Oops happens when timer fires.

Reported Sun, 10 Oct 2004, by Michael Schierl <schierlm@gmx.de>

Fix is easy: always take a reference on the module on open.
Release it only when the device is closed and no timer is running.
Tested on 2.6.13-rc6 using the soft_noboot option.  While the
timer is running and the device is closed, the module use count
stays at 1.  After the timer fires, it drops to 0.  Repeatedly
opening and closing the driver caused no problems.  Please apply.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-03 13:59:46 +02:00
P@Draig Brady 93642ecd46 [WATCHDOG] w83627hf_wdt.c-initialized_bios_bug
Attached is a small update to the w83627hf watchdog driver
to initialise appropriately if it was already initialised
in the BIOS. On tyan motherboards for e.g. you can init
the watchdog to 4 mins, then when the driver is loaded it
sets the watchdog to "seconds" mode, and then machine will
reboot within 4 seconds. So this patch resets the timeout
to the configured value if the watchdog is already running.

Signed-off-by: P@draig Brady <P@draigBrady.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-03 13:58:03 +02:00
Ben Dooks 94f1e9f316 [WATCHDOG] s3c2410 watchdog - replace reboot notifier
Patch from Dimitry Andric <dimitry.andric@tomtom.com>

Change to using platfrom driver's .shutdown method instead
of an reboot notifier

Signed-off-by: Dimitry Andric <dimitry.andric@tomtom.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-03 13:56:06 +02:00
Ben Dooks af4bb822bc [WATCHDOG] s3c2410 watchdog power management
Patch from Dimitry Andric <dimitry.andric@tomtom.com>, updated
by Ben Dooks <ben-linux@fluff.org>. Patch is against 2.6.11-mm2

Add power management support to the s3c2410 watchdog, so that
it is shut-down over suspend, and re-initialised on resume.

Also add Dimitry to the list of authors.

Signed-off-by: Dimitry Andric <dimitry.andric@tomtom.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-03 13:54:16 +02:00
Olaf Hering 2dab3cabc4 [WATCHDOG] correct sysfs name for watchdog devices
While looking for possible candidates for our udev.rules package,
I found a few odd ->name properties. /dev/watchdog has minor 130
according to devices.txt. Since all watchdog drivers use the
misc_register() call, they will end up in /sys/class/misc/$foo.
udev may create the /dev/watchdog node if the driver is loaded.
I dont have such a device, so I cant test it.
The drivers below provide names with spaces and even with / in it.
Not a big deal, but apps may expect /dev/watchdog.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-03 13:51:18 +02:00
Wim Van Sebroeck 09c8a9a0c0 [WATCHDOG] Kconfig+Makefile-clean
Clean the Kconfig+Makefile according to a sorted list
of the drivers of each architecture (and sub-architecture).

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-03 13:46:56 +02:00
Wim Van Sebroeck be3df0f94d [WATCHDOG] Makefile-probe_order-patch
Re-arrange Makefile according to what we want to probe first.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-03 13:15:32 +02:00
Al Viro ebede60741 [SPARC32]: More dependencies fallout
More stuff that got exposed to sparc32 build due to inclusion of
drivers/char/Kconfig in arch/sparc/Kconfig needs to be excluded.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-02 12:20:18 -07:00
Al Viro d70063c463 [ATM]: Fix dereference of uninitialized pointer in zatm
Fixing breakage from [NET]: Kill skb->list - original was
	assign vcc
	do a bunch of stuff using ZATM_VCC(vcc)->pool as common subexpression
Now we do
	int pos = ZATM_VCC(vcc)->pool;
	assign vcc
	do a bunch of stuff
even though vcc is not even initialized when we enter that block...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-02 12:18:03 -07:00
Adrian Bunk d274007461 [SERIAL] crisv10: Remove {,un}register_serial dummies
It seems we can simply kill these dummies with this patch.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-02 16:58:06 +01:00
Linus Torvalds f505380ba7 Merge refs/heads/ieee80211-wifi from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2005-09-02 02:01:35 -07:00
Jeff Garzik 504be3aa09 [wireless hostap] automatically select ieee80211 dependency in Kconfig 2005-09-02 04:44:25 -04:00
Linus Torvalds 138307b475 Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-serial 2005-09-02 00:53:36 -07:00
Linus Torvalds 5d8c397f30 Merge refs/heads/ieee80211-wifi from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2005-09-02 00:48:33 -07:00
Linus Torvalds 44757223cd Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2005-09-02 00:46:53 -07:00
Jesper Juhl 573dbd9596 [CRYPTO]: crypto_free_tfm() callers no longer need to check for NULL
Since the patch to add a NULL short-circuit to crypto_free_tfm() went in,
there's no longer any need for callers of that function to check for NULL.
This patch removes the redundant NULL checks and also a few similar checks
for NULL before calls to kfree() that I ran into while doing the
crypto_free_tfm bits.

I've succesfuly compile tested this patch, and a kernel with the patch 
applied boots and runs just fine.

When I posted the patch to LKML (and other lists/people on Cc) it drew the
following comments :

 J. Bruce Fields commented
  "I've no problem with the auth_gss or nfsv4 bits.--b."

 Sridhar Samudrala said
  "sctp change looks fine."

 Herbert Xu signed off on the patch.

So, I guess this is ready to be dropped into -mm and eventually mainline.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01 17:44:29 -07:00
Herbert Xu eb6f1160dd [CRYPTO]: Use CRYPTO_TFM_REQ_MAY_SLEEP where appropriate
This patch goes through the current users of the crypto layer and sets
CRYPTO_TFM_REQ_MAY_SLEEP at crypto_alloc_tfm() where all crypto operations
are performed in process context.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01 17:43:25 -07:00
David S. Miller 75c80c382f [TG3]: Update driver version and release date.
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01 17:42:23 -07:00
Michael Chan 51b9146869 [TG3]: Minimize locking in TX path.
This is similar to Eric Dumazet's tx_lock patch for tg3 but takes it
one step further to eliminate the tx_lock in the tx_completion path
when the tx queue is not stopped.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01 17:41:28 -07:00
Eric Lemoine 86d9f7f0c9 [SUNGEM]: Fix netpoll bug in Sun GEM Ether driver
From: Eric Lemoine <eric.lemoine@gmail.com>

To me the bug is that __LINK_STATE_RX_SCHED can be set while
__netif_rx_schedule() hasen't be called. Why don't fix it in the
simplest way ? See attached patch (absolutely untested).

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01 17:41:07 -07:00
Geoff Levand 0014c6156f [SUNGEM]: fix minor bug in sungem.h
This changes the Sun Gem Ether driver's tx ring buffer 
length to the proper constant.  Currently TX_RING_SIZE 
and RX_RING_SIZE are equal, so no malfunction occurs.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01 17:40:46 -07:00
Mike Kershaw ff4cc3ac93 [TUNTAP]: Allow setting the linktype of the tap device from userspace
Currently tun/tap only supports the EN10MB ARP type.  For use with
wireless and other networking types it should be possible to set the
ARP type via an ioctl.

Patch v2: Included check that the tap interface is down before changing the
link type out from underneath it

Signed-off-by: Mike Kershaw <dragorn@kismetwireless.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-09-01 17:40:05 -07:00
Jeff Garzik ceeec3dc37 /spare/repo/netdev-2.6 branch 'ieee80211' 2005-09-01 18:02:27 -04:00
Jeff Garzik e3ee3b78f8 /spare/repo/netdev-2.6 branch 'master' 2005-09-01 18:02:01 -04:00
Linus Torvalds 712fbdd333 Merge refs/heads/release from master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-09-01 10:58:18 -07:00
Benjamin Herrenschmidt 8085ce084c [PATCH] Fix PCI ROM mapping
This fixes a problem with pci_map_rom() which doesn't properly
update the ROM BAR value with the address thas allocated for it by the
PCI code. This problem, among other, breaks boot on Mac laptops.

It'ss a new version based on Linus latest one with better error
checking.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-01 10:50:29 -07:00
Adrian Bunk 7eaa414ee8 [PATCH] Add missing select's to DVB_BUDGET_AV
This fixes the following compile error:

	...
	  LD      .tmp_vmlinux1
	drivers/built-in.o: In function `frontend_init':
	budget-av.c:(.text+0xb9448): undefined reference to `tda10046_attach'
	budget-av.c:(.text+0xb9518): undefined reference to `tda10021_attach'
	drivers/built-in.o: In function `philips_tu1216_request_firmware':
	budget-av.c:(.text+0xb937b): undefined reference to `request_firmware'
	make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Johannes Stezenbach <js@linuxtv.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-01 10:43:33 -07:00
Russell King bc49a661e6 [SERIAL] Move serial8250_*_port prototypes to linux/serial_8250.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-01 15:56:26 +01:00
Russell King f8dd49fa05 [SERIAL] mwave is no longer broken
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-01 14:25:45 +01:00
Jouni Malinen fbff868db3 [PATCH] hostap: Fix null pointer dereference in prism2_pccard_card_present()
local->hw_priv was initialized only after the interrupt handler was
registered. This could trigger a NULL pointer dereference in
prism2_pccard_card_present() that assumed that local->hw_priv is always
set (and it should have been). Fix this by setting local->hw_priv before
registering the interrupt handler.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:48:39 -04:00
Michael Ellerman ee05f031ec [PATCH] iseries_veth: Be consistent about driver name, increment version
The iseries_veth driver tells sysfs that it's called 'iseries_veth', but if
you ask it via ethtool it thinks it's called 'veth'. I think this comes from
2.4 when the driver was called 'veth', but it's definitely called
'iseries_veth' now, so fix it.

To make sure we don't do it again define DRV_NAME and use it everywhere.

While we're at it, change the version number to 2.0, to reflect the changes
made in this patch series.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:43:42 -04:00
Michael Ellerman 59f17aebab [PATCH] iseries_veth: Remove studly caps from iseries_veth.c
Having merged iseries_veth.h, let's remove some of the studly caps that came
with it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:43:42 -04:00
Michael Ellerman 642d1a4c36 [PATCH] iseries_veth: Incorporate iseries_veth.h in iseries_veth.c
iseries_veth.h is only used by iseries_veth.c, so merge the former into
the latter.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:43:42 -04:00
Michael Ellerman 07a5c1727d [PATCH] iseries_veth: Add sysfs support for port structs
Also to aid debugging, add sysfs support for iseries_veth's port structures.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:42:46 -04:00
Michael Ellerman 76812d8123 [PATCH] iseries_veth: Add sysfs support for connection structs
To aid in field debugging, add sysfs support for iseries_veth's connection
structures. At the moment this is all read-only, however we could think about
adding write support for some attributes in future.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:42:46 -04:00
Michael Ellerman db5e8718ea [PATCH] iseries_veth: Fix bogus counting of TX errors
There's a number of problems with the way iseries_veth counts TX errors.

Firstly it counts conditions which aren't really errors as TX errors. This
includes if we don't have a connection struct for the other LPAR, or if the
other LPAR is currently down (or just doesn't want to talk to us). Neither
of these should count as TX errors.

Secondly, it counts one TX error for each LPAR that fails to accept the packet.
This can lead to TX error counts higher than the total number of packets sent
through the interface. This is confusing for users.

This patch fixes that behaviour. The non-error conditions are no longer
counted, and we introduce a new and I think saner meaning to the TX counts.

If a packet is successfully transmitted to any LPAR then it is transmitted
and tx_packets is incremented by 1.

If there is an error transmitting a packet to any LPAR then that is counted
as one error, ie. tx_errors is incremented by 1.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:42:45 -04:00
Michael Ellerman e0808494ff [PATCH] iseries_veth: Simplify full-queue handling
The iseries_veth driver often has multiple netdevices sending packets over
a single connection to another LPAR. If the bandwidth to the other LPAR is
exceeded, all the netdevices must have their queues stopped.

The current code achieves this by queueing one incoming skb on the
per-netdevice port structure. When the connection is able to send more packets
we iterate through the port structs and flush any packet that is queued,
as well as restarting the associated netdevice's queue.

This arrangement makes less sense now that we have per-connection TX timers,
rather than the per-netdevice generic TX timer.

The new code simply detects when one of the connections is full, and stops
the queue of all associated netdevices. Then when a packet is acked on that
connection (ie. there is space again) all the queues are woken up.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:42:45 -04:00
Michael Ellerman 24562ffa8b [PATCH] iseries_veth: Add a per-connection ack timer
Currently the iseries_veth driver contravenes the specification in
Documentation/networking/driver.txt, in that if packets are not acked by
the other LPAR they will sit around forever.

This patch adds a per-connection timer which fires if we've had no acks for
five seconds. This is superior to the generic TX timer because it catches
the case of a small number of packets being sent and never acked.

This fixes a bug we were seeing on real systems, where some IPv6 neighbour
discovery packets would not be acked and then prevent the module from being
removed, due to skbs lying around.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:42:45 -04:00
Michael Ellerman 48683d72f8 [PATCH] iseries_veth: Remove TX timeout code
The iseries_veth driver uses the generic TX timeout watchdog, however a better
solution is in the works, so remove this code.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:39:43 -04:00
Michael Ellerman f0c129caa3 [PATCH] iseries_veth: Use kobjects to track lifecycle of connection structs
The iseries_veth driver can attach to multiple vlans, which correspond to
multiple net devices. However there is only 1 connection between each LPAR,
so the connection structure may be shared by multiple net devices.

This makes module removal messy, because we can't deallocate the connections
until we know there are no net devices still using them. The solution is to
use ref counts on the connections, so we can delete them (actually stop) as
soon as the ref count hits zero.

This patch fixes (part of) a bug we were seeing with IPv6 sending probes to
a dead LPAR, which would then hang us forever due to leftover skbs.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:39:43 -04:00
Michael Ellerman ec60beebed [PATCH] iseries_veth: Make init_connection() & destroy_connection() symmetrical
This patch makes veth_init_connection() and veth_destroy_connection()
symmetrical in that they allocate/deallocate the same data.

Currently if there's an error while initialising connections (ie. ENOMEM)
we call veth_module_cleanup(), however this will oops because we call
driver_unregister() before we've called driver_register(). I've never seen
this actually happen though.

So instead we explicitly call veth_destroy_connection() for each connection,
any that have been set up will be deallocated.

We also fix a potential leak if vio_register_driver() fails.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:39:43 -04:00
Michael Ellerman cbf9074cc3 [PATCH] iseries_veth: Only call dma_unmap_single() if dma_map_single() succeeded
The iseries_veth driver unconditionally calls dma_unmap_single() even
when the corresponding dma_map_single() may have failed.

Rework the code a bit to keep the return value from dma_unmap_single()
around, and then check if it's a dma_mapping_error() before we do
the dma_unmap_single().

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:39:43 -04:00
Michael Ellerman b08bd5c0a3 [PATCH] iseries_veth: Replace lock-protected atomic with an ordinary variable
The iseries_veth driver uses atomic ops to manipulate the in_use field of
one of its per-connection structures. However all references to the
flag occur while the connection's lock is held, so the atomic ops aren't
necessary.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:39:43 -04:00
Michael Ellerman d7893ddd1b [PATCH] iseries_veth: Remove redundant message stack lock
The iseries_veth driver keeps a stack of messages for each connection
and a lock to protect the stack. However there is also a per-connection lock
which makes the message stack lock redundant.

Remove the message stack lock and document the fact that callers of the
stack-manipulation functions must hold the connection's lock.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:37:57 -04:00
Michael Ellerman 2a5391a122 [PATCH] iseries_veth: Fix broken promiscuous handling
Due to a logic bug, once promiscuous mode is enabled in the iseries_veth
driver it is never disabled.

The driver keeps two flags, promiscuous and all_mcast which have exactly the
same effect. This is because we only ever receive packets destined for us,
or multicast packets. So consolidate them into one promiscuous flag for
simplicity.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:37:57 -04:00
Michael Ellerman 58c5900bda [PATCH] iseries_veth: Try to avoid pathological reset behaviour
The iseries_veth driver contains a state machine which is used to manage
how connections are setup and neogotiated between LPARs.

If one side of a connection resets for some reason, the two LPARs can get
stuck in a race to re-setup the connection. This can lead to the connection
being declared dead by one or both ends. In practice the connection is
declared dead by one or both ends approximately 8/10 times a connection is
reset, although it is rare for connections to be reset.

(an example here: http://michael.ellerman.id.au/files/misc/veth-trace.html)

The core of the problem is that the end that resets the connection doesn't
wait for the other end to become aware of the reset. So the resetting end
starts setting the connection back up, and then receives a reset from the
other end (which is the response to the initial reset). And so on.

We're severely limited in what we can do to fix this. The protocol between
LPARs is essentially fixed, as we have to interoperate with both OS/400
and old Linux drivers. Which also means we need a fix that only changes the
code on one end.

The only fix I've found given that, is to just blindly sleep for a bit when
resetting the connection, in the hope that the other end will get itself
sorted.  Needless to say I'd love it if someone has a better idea.

This does work, I've so far been unable to get it to break, whereas without
the fix a reset of one end will lead to a dead connection ~8/10 times.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:37:56 -04:00
Michael Ellerman abfda4719c [PATCH] iseries_veth: Remove a FIXME WRT deletion of the ack_timer
The iseries_veth driver has a timer which we use to send acks. When the
connection is reset or stopped we need to delete the timer.

Currently we only call del_timer() when resetting a connection, which means
the timer might run again while the connection is being re-setup. As it turns
out that's ok, because the flags the timer consults have been reset.

It's cleaner though to call del_timer_sync() once we've dropped the lock,
although the timer may still run between us dropping the lock and calling
del_timer_sync(), but as above that's ok.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:37:56 -04:00
Michael Ellerman 61a3c69661 [PATCH] iseries_veth: Cleanup error and debug messages
Currently the iseries_veth driver prints the file name and line number in its
error messages. This isn't very useful for most users, so just print
"iseries_veth: message" instead.

 - convert uses of veth_printk() to veth_debug()/veth_error()/veth_info()
 - make terminology consistent, ie. always refer to LPAR not lpar
 - be consistent about printing return codes as %d not %x
 - make format strings fit in 80 columns

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-31 22:37:56 -04:00
Tony Luck 986632fd70 Auto-update from upstream 2005-08-31 14:19:44 -07:00
Alan Cox 5981d64420 [SERIAL] Convert mwave to use serial8250_(un)?register_port
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-31 22:19:33 +01:00
Sascha Hauer 0f302dc354 [ARM] 2866/1: add i.MX set_mctrl / get_mctrl functions
Patch from Sascha Hauer

This patch adds support for setting and getting RTS / CTS via
set_mtctrl / get_mctrl functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-31 21:48:47 +01:00
Jeff Garzik afc7097f45 [netdrvr de2104x] store PCI bus addresses in unsigned long
BZ# 4475.
2005-08-31 06:11:16 -04:00
Jeff Garzik 1a44935840 [netdrvr tulip] new PCI ID
Noted in BZ# 2960.
2005-08-31 05:48:59 -04:00
Russell King b129a8ccd5 [SERIAL] Clean up and fix tty transmission start/stoping
The start_tx and stop_tx methods were passed a flag to indicate
whether the start/stop was from the tty start/stop callbacks, and
some drivers used this flag to decide whether to ask the UART to
immediately stop transmission (where the UART supports such a
feature.)

There are other cases when we wish this to occur - when CTS is
lowered, or if we change from soft to hard flow control and CTS
is inactive.  In these cases, this flag was false, and we would
allow the transmitter to drain before stopping.

There is really only one case where we want to let the transmitter
drain before disabling, and that's when we run out of characters
to send.

Hence, re-jig the start_tx and stop_tx methods to eliminate this
flag, and introduce new functions for the special "disable and
allow transmitter to drain" case.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-08-31 10:12:14 +01:00
David S. Miller 5843e37e24 [SPARC64]: Use drivers/Kconfig
And move some other stuff into drivers/sbus/char/Kconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-30 21:46:19 -07:00
James Bottomley 61a7afa2c4 [SCSI] embryonic RAID class
The idea behind a RAID class is to provide a uniform interface to all
RAID subsystems (both hardware and software) in the kernel.

To do that, I've made this class a transport class that's entirely
subsystem independent (although the matching routines have to match per
subsystem, as you'll see looking at the code).  I put it in the scsi
subdirectory purely because I needed somewhere to play with it, but it's
not a scsi specific module.

I used a fusion raid card as the test bed for this; with that kind of
card, this is the type of class output you get:

jejb@titanic> ls -l /sys/class/raid_devices/20\:0\:0\:0/
total 0
lrwxrwxrwx  1 root root     0 Aug 16 17:21 component-0 -> ../../../devices/pci0000:80/0000:80:04.0/host20/target20:1:0/20:1:0:0/
lrwxrwxrwx  1 root root     0 Aug 16 17:21 component-1 -> ../../../devices/pci0000:80/0000:80:04.0/host20/target20:1:1/20:1:1:0/
lrwxrwxrwx  1 root root     0 Aug 16 17:21 device -> ../../../devices/pci0000:80/0000:80:04.0/host20/target20:0:0/20:0:0:0/
-r--r--r--  1 root root 16384 Aug 16 17:21 level
-r--r--r--  1 root root 16384 Aug 16 17:21 resync
-r--r--r--  1 root root 16384 Aug 16 17:21 state

So it's really simple: for a SCSI device representing a hardware raid,
it shows the raid level, the array state, the resync % complete (if the
state is resyncing) and the underlying components of the RAID (these are
exposed in fusion on the virtual channel 1).

As you can see, this type of information can be exported by almost
anything, including software raid.

The more difficult trick, of course, is going to be getting it to
perform configuration type actions with writable attributes.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-30 22:48:51 -05:00
James Bottomley 2b7d6a8cb9 [SCSI] attribute container final klist fixes
Since the attribute container deletes from a klist while it's walking
it, it is vulnerable to the problem (and fix) here:

http://marc.theaimsgroup.com/?l=linux-scsi&m=112485448830217

The attached fixes this (but won't compile without the above).

It also fixes the logical reversal in the traversal loop which meant
that we were never actually traversing the loop to hit this bug in the
first place.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-30 22:44:32 -05:00
James Bottomley 53c165e0a6 [SCSI] correct attribute_container list usage
One of the changes in the attribute_container code in the scsi-misc tree
was to add a lock to protect the list of devices per container.  This,
unfortunately, leads to potential scheduling while atomic problems if
there's a sleep in the function called by a trigger.

The correct solution is to use the kernel klist infrastructure instead
which allows lockless traversal of a list.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-30 22:44:20 -05:00
Jeff Garzik 6f10623304 [libata] fix ATAPI-enable typo
Dumb typo spotted by Mark Lord.
2005-08-30 21:52:18 -04:00
Linus Torvalds 6b39374a27 Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git 2005-08-30 11:16:30 -07:00
Ivan Kokshaysky 81d4af1340 [PATCH] x86: pci_assign_unassigned_resources() update
I had some time to think about PCI assign issues in 2.6.13-rc series.

The major problem here is that we call pci_assign_unassigned_resources()
way too early - at subsys_initcall level. Therefore we give no chances
to ACPI and PnP routines (called at fs_initcall level) to reserve their
respective resources properly, as the comments in drivers/pnp/system.c
and drivers/acpi/motherboard.c suggest:

 /**
  * Reserve motherboard resources after PCI claim BARs,
  * but before PCI assign resources for uninitialized PCI devices
  */

So I moved the pci_assign_unassigned_resources() call to
pcibios_assign_resources() (fs_initcall), which should hopefully fix a
lot of problems and make PCIBIOS_MIN_IO tweaks unnecessary.

Other changes:
- remove resource assignment code from pcibios_assign_resources(), since
  it duplicates pci_assign_unassigned_resources() functionality and
  actually does nothing in 2.6.13;
- modify ROM assignment code as per Ben's suggestion: try to use firmware
  settings by default (if PCI_ASSIGN_ROMS is not set);
- set CARDBUS_IO_SIZE back to 4K as it's a wonderful stress test for
  various setups.

Confirmed by Tero Roponen <teanropo@cc.jyu.fi> (who had problems with
the 4kB CardBus IO size previously).

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-30 11:14:48 -07:00
Jeff Garzik ed735ccbef Merge HEAD from /spare/repo/linux-2.6/.git 2005-08-30 13:32:29 -04:00
Tony Luck 288ceb8f14 Auto-update from upstream 2005-08-30 09:30:09 -07:00
Linus Torvalds 3cb904caa9 Merge refs/heads/drm-latest from master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6 2005-08-30 07:45:15 -07:00
Jeff Garzik 374b187357 [libata] update several drivers to use pci_iomap()/pci_iounmap() 2005-08-30 05:42:52 -04:00
Jeff Garzik ea6ba10bbb [libata] __iomem annotations for various drivers 2005-08-30 05:18:18 -04:00
Jeff Garzik e005f01de3 [libata ahci] minor remove/unplug path cleanup
Don't bother calling a hook, to call our own module, to call a helper
than simply calls ionumap().

If you unroll all that convolution, you get a simple kfree()+iounmap()
pair of calls.
2005-08-30 04:18:28 -04:00
Jeff Garzik 1623c81eec [libata] allow ATAPI to be enabled with new atapi_enabled module option
ATAPI is getting close to being ready.  To increase exposure, we enable
the code in the upstream kernel, but default it to off (present
behavior).  Users must pass atapi_enabled=1 as a module option (if
module) or on the kernel command line (if built in) to turn on
discovery of their ATAPI devices.
2005-08-30 03:37:42 -04:00
Linus Torvalds 1fdab81e67 Merge refs/heads/upstream-fixes from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2005-08-29 22:05:21 -07:00
Linus Torvalds a8e4f435d9 Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-08-29 22:04:58 -07:00
Linus Torvalds 8bc2bee26b Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 2005-08-29 21:44:33 -07:00
Andrew Morton 7ef24b69f9 [PATCH] s2io build fix
Damir Perisa <damir.perisa@solnet.ch> reports:

 drivers/net/s2io.h:765: error: invalid lvalue in assignment
 drivers/net/s2io.h:766: error: invalid lvalue in assignment

That's a gcc4 error.  I don't see why the casts are there anyway..

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-30 00:37:35 -04:00
Stephen Rothwell fb120da678 [PATCH] Make MODULE_DEVICE_TABLE work for vio devices
Make MODULE_DEVICE_TABLE work for vio devices.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-08-30 13:31:56 +10:00
Stephen Rothwell 71d276d751 [PATCH] Create vio_bus_ops
Create vio_bus_ops so that we just pass a structure to vio_bus_init
instead of three separate function pointers.

Rearrange vio.h to avoid forward references. vio.h only needs
struct device_node from prom.h so remove the include and just
declare it.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-08-30 13:23:47 +10:00
Michael Chan 73eef4cddb [BNX2]: update version and minor fixes
Update version and add 4 minor fixes, the last 2 were suggested by
Jeff Garzik:

1. check for a valid ethernet address before setting it
2. zero out bp->regview if init_one encounters an error and unmaps
   the IO address. This prevents remove_one from unmapping again.
3. use netif_rx_schedule() instead of hand coding the same.
4. use IRQ_HANDLED and IRQ_NONE.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:10:48 -07:00
Michael Chan c770a65cee [BNX2]: change irq locks to bh locks
Change all locks from spin_lock_irqsave() to spin_lock_bh(). All
places that require spinlocks are in BH context.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:10:43 -07:00
Michael Chan e89bbf1049 [BNX2]: remove atomics in tx
Remove atomic operations in the fast tx path. Expensive atomic
operations were used to keep track of the number of available tx
descriptors. The new code uses the difference between the consumer
and producer index to determine the number of free tx descriptors.

As suggested by Jeff Garzik, the name of the inline function is
changed to all lower case.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:10:38 -07:00
Michael Chan cd339a0ed6 [BNX2]: speedup serdes linkup
This speeds up link-up time on 5706 SerDes if the link partner does
not autoneg, a rather common scenario in blade servers. Some blade
servers use IPMI for keyboard input and it's important to minimize
link disruptions.

The speedup is achieved by shortening the timer to (HZ / 3) during
the transient period right after initiating a SerDes autoneg. If
autoneg does not complete, parallel detect can be done sooner. After
the transient period is over, the timer goes back to its normal HZ
interval.

As suggested by Jeff Garzik, the timer initialization is moved to
bnx2_init_board() from bnx2_open().

An eeprom bit is also added to allow default forced SerDes speed for
even faster link-up time.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:10:34 -07:00
Michael Chan afdc08b9f9 [BNX2]: Fix rtnl deadlock in bnx2_close
This fixes an rtnl deadlock problem when flush_scheduled_work() is
called from bnx2_close(). In rare cases, linkwatch_event() may be on
the workqueue from a previous close of a different device and it will
try to get the rtnl lock which is already held by dev_close().

The fix is to set a flag if we are in the reset task which is run
from the workqueue. bnx2_close() will loop until the flag is cleared.
As suggested by Jeff Garzik, the loop is changed to call msleep(1)
instead of yield() in the original patch.

flush_scheduled_work() is also moved to bnx2_remove_one() before the
netdev is freed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:10:29 -07:00
Jeff Garzik 502c7f1dd5 Merge /spare/repo/linux-2.6/ 2005-08-29 19:06:29 -04:00
Patrick McHardy 066286071d [NETLINK]: Add "groups" argument to netlink_kernel_create
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:01:11 -07:00
Patrick McHardy ac6d439d20 [NETLINK]: Convert netlink users to use group numbers instead of bitmasks
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:00:54 -07:00
Evgeniy Polyakov ad93e266a1 [NETLINK]: w1_int.c: fix default netlink group
w1 does not need to multicast its state to several groups at once,
and upcoming netlink changes will not allow bitmask for groups anyway.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 16:00:29 -07:00
Patrick McHardy a61bbcf28a [NET]: Store skb->timestamp as offset to a base timestamp
Reduces skb size by 8 bytes on 64-bit.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:58:24 -07:00
Peter Hagervall 14ab9b867a [BNX2]: Possible sparse fixes, take two
This patch contains the following possible cleanups/fixes:

- use C99 struct initializers
- make a few arrays and structs static
- remove a few uses of literal 0 as NULL pointer
- use convenience function instead of cast+dereference in bnx2_ioctl()
- remove superfluous casts to u8 * in calls to readl/writel

Signed-off-by: Peter Hagervall <hager@cs.umu.se>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:56:43 -07:00
Marcel Holtmann 0d48d93947 [Bluetooth]: Move packet type into the SKB control buffer
This patch moves the usage of packet type into the SKB control
buffer. After this patch it is now possible to shrink the sk_buff
structure and redefine its pkt_type.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:55:13 -07:00
Victor Fusco 2eb25a6c34 [Bluetooth]: Fix sparse warnings (__nocast type)
This patch fixes the sparse warnings "implicit cast to nocast type"
for the priority or gfp_mask parameters of the memory allocations.

Signed-off-by: Victor Fusco <victor@cetuc.puc-rio.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:55:07 -07:00
Marcel Holtmann 4aa769b997 [Bluetooth]: Update and cleanup of the virtual HCI driver
This patch cleans up the virtual HCI driver. It also adds support for
the dynamic minor device number allocation.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:54:42 -07:00
Michael Chan 087fe256f0 [TG3]: Fix bug in setting a tg3_flag
Found a bug while reviewing the patches the second time.

The TG3_FLAG_TXD_MBOX_HWBUG flag is set after the register access
methods have been determined. This patch fixes it by moving it up before
the various access methods are assigned.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:50:49 -07:00
Michael Chan 15f5a585c6 [TG3]: Eliminate one register write in tg3_restart_ints()
The register write to register 0x68 to restart interrupts is unnecessary
as the interrupt wasn't masked in that register by the irq handler. This
will save one register write in the fast path.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:50:45 -07:00
Michael Chan 6892914fb7 [TG3]: Add indirect register method for 5703 behind ICH
This patch adds the new workaround for 5703 A1/A2 if it is behind
certain ICH bridges. The workaround disables memory and uses config.
cycles only to access all registers. The 5702/03 chips can mistakenly
decode the special cycles from the ICH chipsets as memory write cycles,
causing corruption of register and memory space. Only certain ICH
bridges will drive special cycles with non-zero data during the address
phase which can fall within the 5703's address range. This is not an ICH
bug as the PCI spec allows non-zero address during special cycles.
However, only these ICH bridges are known to drive non-zero addresses
during special cycles.

The indirect_lock is also changed to spin_lock_irqsave from spin_lock_bh
because it is used in irq handler when using the indirect method to
disable interrupts.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:50:42 -07:00
Michael Chan 09ee929ccc [TG3]: Add mailbox read method
This patch adds the mailbox read method and also adds an inline function
tw32_mailbox_f() for mailbox writes that require read flush.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:50:38 -07:00
Michael Chan 1ee582d8e4 [TG3]: Add various register methods
This patch adds various dedicated register read/write methods for the
existing workarounds, including PCIX target workaround, write with read
flush, etc. The chips that require these workarounds will use these
dedicated access functions.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:50:15 -07:00
Michael Chan 2009493065 [TG3]: Add basic register access function pointers
This patch adds the basic function pointers to do register accesses in
the fast path. This was suggested by David Miller. The idea is that
various register access methods for different hardware errata can easily
be implemented with these function pointers and performance will not be
degraded on chips that use normal register access methods.

The various register read write macros (e.g. tw32, tr32, tw32_mailbox)
are redefined to call the function pointers.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:50:12 -07:00
Arnaldo Carvalho de Melo c4365c9235 [RANDOM]: Introduce secure_dccp_sequence_number
Code contributed by Stephen Hemminger.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:49:40 -07:00
Harald Welte 4fdb3bb723 [NETLINK]: Add properly module refcounting for kernel netlink sockets.
- Remove bogus code for compiling netlink as module
- Add module refcounting support for modules implementing a netlink
  protocol
- Add support for autoloading modules that implement a netlink protocol
  as soon as someone opens a socket for that protocol

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:35:08 -07:00
David S. Miller 86e65da9c1 [NET]: Remove explicit initializations of skb->input_dev
Instead, set it in one place, namely the beginning of
netif_receive_skb().

Based upon suggestions from Jamal Hadi Salim.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:33:26 -07:00
David S. Miller f2ccd8fa06 [NET]: Kill skb->real_dev
Bonding just wants the device before the skb_bond()
decapsulation occurs, so simply pass that original
device into packet_type->func() as an argument.

It remains to be seen whether we can use this same
exact thing to get rid of skb->input_dev as well.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:32:25 -07:00
Stephen Hemminger 6f1cf16582 [NET]: Remove HIPPI private from skbuff.h
This removes the private element from skbuff, that is only used by
HIPPI. Instead it uses skb->cb[] to hold the additional data that is
needed in the output path from hard_header to device driver.

PS: The only qdisc that might potentially corrupt this cb[] is if
netem was used over HIPPI. I will take care of that by fixing netem
to use skb->stamp. I don't expect many users of netem over HIPPI

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-08-29 15:31:42 -07:00
David S. Miller 8728b834b2 [NET]: Kill skb->list
Remove the "list" member of struct sk_buff, as it is entirely
redundant.  All SKB list removal callers know which list the
SKB is on, so storing this in sk_buff does nothing other than
taking up some space.

Two tricky bits were SCTP, which I took care of, and two ATM
drivers which Francois Romieu <romieu@fr.zoreil.com> fixed
up.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2005-08-29 15:31:14 -07:00
Tony Luck 95ecc5e5a3 Pull unaligned-snsc_event into release branch 2005-08-29 14:13:49 -07:00
Jeff Garzik 39fbe47377 /spare/repo/netdev-2.6 branch 'chelsio' 2005-08-29 16:53:08 -04:00
Jeff Garzik c1b054d03f Merge /spare/repo/linux-2.6/ 2005-08-29 16:40:27 -04:00
Jeff Garzik 70d374ea99 Merge /spare/repo/linux-2.6/ 2005-08-29 15:59:42 -04:00
Jeff Garzik cfc4692825 /spare/repo/netdev-2.6 branch 'e100' 2005-08-29 15:55:26 -04:00
Jeff Garzik 8aaf226a8e /spare/repo/netdev-2.6 branch 'sis190' 2005-08-29 15:52:56 -04:00
Jeff Garzik 1703ecc7e8 /spare/repo/netdev-2.6 branch 'uli-tulip' 2005-08-29 15:52:42 -04:00
Jeff Garzik aa7e16d6b8 [libata sata_nv] NVIDIA ok'd license change from OSL+GPL to GPL 2005-08-29 15:12:56 -04:00
Al Viro bf4e70e54c [PATCH] missing include in smc-ultra
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-29 10:42:40 -07:00
Al Viro 03ecc6749a [PATCH] missing include in tda80xx
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-29 10:42:39 -07:00
Linus Torvalds a78b3371b6 Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git 2005-08-29 10:36:48 -07:00
Linus Torvalds 9ab7486e44 Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-mmc.git 2005-08-29 10:35:21 -07:00
Linus Torvalds 975f957dc4 Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-serial.git 2005-08-29 10:34:59 -07:00
Linus Torvalds 2321fbd2b8 Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-ucb.git 2005-08-29 10:34:31 -07:00
Linus Torvalds 3d963f5bb1 Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2005-08-29 10:04:37 -07:00
Linus Torvalds 5be1d85c20 Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-08-29 10:03:46 -07:00
Jeff Garzik 2cba582a49 [libata sata_promise] Do not attempt to use SATA phy on PATA controllers 2005-08-29 05:12:30 -04:00
Andy Fleming e13934563d [PATCH] PHY Layer fixup
This patch adds back the code that was taken out, thus re-enabling:

* The PHY Layer to initialize without crashing
* Drivers to actually connect to PHYs
* The entire PHY Control Layer

This patch is used by the gianfar driver, and other drivers which are in
development.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-28 20:28:25 -04:00
Jeff Garzik af36d7f0df [libata] license change, other bits
- changes license of all code from OSL+GPL to plain ole GPL
  - except for NVIDIA, who hasn't yet responded about sata_nv
  - copyright holders were already contacted privately

- adds info in each driver about where hardware/protocol docs may be
  obtained

- where I have made major contributions, updated copyright dates
2005-08-28 20:18:39 -04:00
Kalle Valo a8eef8a222 [PATCH] hostap: Fix null pointer dereference in prism2_pccard_card_present()
With my Buffalo WLI-CF-S11G PC Card kernel oopses every time in
prism2_interrupt() when I try load the hostap module. local->hw_priv is null
during the first call to prism2_interrupt(). It feels like
interrupts are enabled too early, or something.

This patch fixes the symptom, but not the cause.

Signed-off-by: Kalle Valo <Kalle.Valo@iki.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-28 19:25:02 -04:00
Jouni Malinen 6c5b90d2c8 [PATCH] hostap: Fix hash values for product strings
hostap_cs: 0.4.1-kernel (Jouni Malinen <jkmaline@cc.hut.fi>)
pcmcia: hostap_cs: invalid hash for product string "BUFFALO": is 0x1b01a57b,
should be 0x2decece3
pcmcia: see Documentation/pcmcia/devicetable.txt for details
pcmcia: hostap_cs: invalid hash for product string "WLI-CF-S11G": is
0xefd5102a, should be 0x82067c18
pcmcia: see Documentation/pcmcia/devicetable.txt for details

This patch fixes them.

Signed-off-by: Kalle Valo <Kalle.Valo@iki.fi>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-28 19:25:02 -04:00
Jouni Malinen c6e3f95df7 [PATCH] hostap: Update version
Version 0.4.4 of Host AP driver was released, so let's sync the version
number in netdev-2.6 tree.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-08-28 19:25:02 -04:00
Heiko Carstens 20b1730af3 [PATCH] zfcp: bugfix and compile fixes
Bugfix (usage of uninitialized pointer in zfcp_port_dequeue) and compile
fixes for the zfcp device driver.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-28 13:53:48 -07:00
Alexey Dobriyan 7f84f22638 [PATCH] zfcp: fix compilation due to rports changes
struct zfcp_port::scsi_id was removed by commit
  3859f6a248

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-28 10:43:18 -07:00
James Bottomley ba482ef4b1 Merge by hand (conflicts in sr.c) 2005-08-28 11:40:00 -05:00
James Bottomley e514385be2 [SCSI] fix sense buffer length handling problem
The new bio code was incorrectly converted from stack allocated to
kmalloc'd buffer handling.  There are two places where it incorrectly
uses sizeof(*sense) to get the size of the sense buffer.  This
actually produces one, so no sense data was ever getting back, causing
failure in things like disk spin up.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:34:12 -05:00
James Bottomley c9d297c543 [SCSI] fix 3ware raid emulated commands
The 3ware emulated commands all expect they are executing in the
use_sg == 0 case, which isn't true either in the block layer rework or
an SG_IO ioctl.

Fix this by adding the correct kmapping of the first element in the sg
list.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:34:11 -05:00
Christoph Hellwig f189c5cb8d [SCSI] comment cleanup for spi_execute
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:34:10 -05:00
akpm@osdl.org 1ccb48bb16 [SCSI] fix C syntax problem in scsi_lib.c
Older gcc's require variable definitions at the beginning of a block.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:34:09 -05:00
James Bottomley 84743bbcf9 [SCSI] convert ch to use scsi_execute_req
I also tinkered with it's sense recognition routines to make them take
scsi_sense_hdr structures instead of raw sense data.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:34:08 -05:00
James Bottomley 820732b501 [SCSI] convert sr to scsi_execute_req
This follows almost the identical model to sd, except that there's one
ioctl which returns raw sense data, so it had to use scsi_execute()
instead.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:34:07 -05:00
James Bottomley ea73a9f239 [SCSI] convert sd to scsi_execute_req (and update the scsi_execute_req API)
This one removes struct scsi_request entirely from sd.  In the process,
I noticed we have no callers of scsi_wait_req who don't immediately
normalise the sense, so I updated the API to make it take a struct
scsi_sense_hdr instead of simply a big sense buffer.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:33:52 -05:00
James Bottomley 33aa687db9 [SCSI] convert SPI transport class to scsi_execute
This one's slightly more difficult.  The transport class uses
REQ_FAILFAST, so another interface (scsi_execute) had to be invented to
take the extra flag.  Also, the sense functions are shifted around to
allow spi_execute to place data directly into a struct scsi_sense_hdr.
With this change, there's probably a lot of unnecessary sense buffer
allocation going on which we can fix later.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:31:14 -05:00
James Bottomley 1cf72699c1 [SCSI] convert the remaining mid-layer pieces to scsi_execute_req
After this, we just have some drivers, all the ULDs and the SPI
transport class using scsi_wait_req().

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:27:01 -05:00
James Bottomley 7a93aef7fb Merge HEAD from ../scsi-misc-2.6-tmp 2005-08-28 11:18:35 -05:00
Pete Zaitcev 51490c89f9 [SCSI] sr.c: Fix getting wrong size
Here's the problem. Try to do this on 2.6.12:
- Kill udev and HAL
- Insert a CD-ROM into a SCSI or USB CD-ROM drive
- Run dd if=/dev/scd0
- cat /sys/block/sr0/size
- Eject the CD, insert a different one
- Run dd if=/dev/scd0
This is likely to do "access beyond the end of device", if you let it
- cat /sys/block/sr0/size
This shows the size of a previous CD, even though dd was supposed
to revalidate the device.
- Run dd if=/dev/scd0
The second run of dd works correctly!

The bug was introduced in 2.5.31, when Al fixes the recursive opens
in partitioning. Before, the code worked like this:
- Block layer called cdrom_open directly
- cdrom_open called sr_open
- sr_open called check_disk_change
- check_disk_change called sr_media_change
- sr_media_change did cd->needs_disk_change=1
- before returning sr_open tested cd->needs_disk_change
  and called get_sector_size.

In 2.6.12, the check_disk_change is called from cdrom_open only. Thus:
- Block layer calls sr_bd_open
- sr_bd_open calls cdrom_open
- cdrom_open calls sr_open
- sr_open tests cd->needs_disk_change, which wasn't set yet; returns
- cdrom_open calls check_disk_change
- check_disk_change calls sr_media_change
- sr_media_change does cd->needs_disk_change=1, but nobody cares

Acked by: Alexander Viro <aviro@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:14:12 -05:00
Dave C Boutcher 8224bfa84d [SCSI] ibmvscsi timeout fix
This patch fixes a long term borkenness in
ibmvscsi where we were using the wrong timeout
field from the scsi command (and using the
wrong units.)  Now broken by the fact that the
scsi_cmnd timeout field is gone entirely.
This only worked before because all the SCSI
targets assumed that 0 was default.

Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:14:11 -05:00
Adrian Bunk de540a53f2 [SCSI] drivers/scsi/constants.c should include scsi_dbg.h
C files should include the files with the prototypes for their global
functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:14:10 -05:00
Dave C Boutcher be042f240a [SCSI] ibmvscsi eh locking
With the removal of the spinlocking around eh calls, we need to add a
little more locking back in, otherwise we do some naked list
manipulation.

Signed-off-by: Dave Boutcher <boutcher@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:14:08 -05:00
Mark Haverkamp 3b2946cc96 [SCSI] aacraid: Fix aacraid probe breakage (updated)
This patch fixes the bad assumption of the aacraid driver with use_sg.
I used the 3w-xxxx driver fix as a guide for this.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:14:07 -05:00
James Bottomley ebd8bb7647 [SCSI] fix transport class corner case after rework
If your transport class sets the ATTRIBUTE_CONTAINER_NO_CLASSDEVS flag,
then its configure method never gets called.  This patch fixes that so
that the configure method is called with a NULL classdev.

Also remove a spurious inverted comma in the transport_class comments.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 11:14:06 -05:00
James Bottomley 392160335c [SCSI] use scatter lists for all block pc requests and simplify hw handlers
Original From: Mike Christie <michaelc@cs.wisc.edu>

Add scsi_execute_req() as a replacement for scsi_wait_req()

Fixed up various pieces (added REQ_SPECIAL and caught req use after
free)

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 10:46:40 -05:00
James Bottomley 8e6401187e update scsi_wait_req to new format for blk_rq_map_kern()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 10:46:39 -05:00
James Bottomley e537a36d52 [SCSI] use scatter lists for all block pc requests and simplify hw handlers
Here's the proof of concept for this one.  It converts scsi_wait_req to
do correct REQ_BLOCK_PC submission (and works nicely in my setup).

The final goal should be to eliminate struct scsi_request, but that
can't be done until the character submission paths of sg and st are also
modified.

There's some loss of functionality to this: retries are no longer
controllable (except by setting REQ_FASTFAIL) and the wait_req API needs
to be altered, but it looks very nice.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28 10:45:34 -05:00
James Bottomley 31151ba2ce fix mismerge in ll_rw_blk.c 2005-08-28 10:43:07 -05:00
Linus Torvalds 3d52acb342 Merge refs/heads/upstream-fixes from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2005-08-27 18:05:14 -07:00
Paul Mackerras f786648b89 [PATCH] Remove race between con_open and con_close
[ Same race and same patch also by Steven Rostedt <rostedt@goodmis.org> ]

I have a laptop (G3 powerbook) which will pretty reliably hit a race
between con_open and con_close late in the boot process and oops in
vt_ioctl due to tty->driver_data being NULL.

What happens is this: process A opens /dev/tty6; it comes into
con_open() (drivers/char/vt.c) and assign a non-NULL value to
tty->driver_data.  Then process A closes that and concurrently process
B opens /dev/tty6.  Process A gets through con_close() and clears
tty->driver_data, since tty->count == 1.  However, before process A
can decrement tty->count, we switch to process B (e.g. at the
down(&tty_sem) call at drivers/char/tty_io.c line 1626).

So process B gets to run and comes into con_open with tty->count == 2,
as tty->count is incremented (in init_dev) before con_open is called.
Because tty->count != 1, we don't set tty->driver_data.  Then when the
process tries to do anything with that fd, it oopses.

The simple and effective fix for this is to test tty->driver_data
rather than tty->count in con_open.  The testing and setting of
tty->driver_data is serialized with respect to the clearing of
tty->driver_data in con_close by the console_sem.  We can't get a
situation where con_open sees tty->driver_data != NULL and then
con_close on a different fd clears tty->driver_data, because
tty->count is incremented before con_open is called.  Thus this patch
eliminates the race, and in fact with this patch my laptop doesn't
oops.

Signed-off-by: Paul Mackerras <paulus@samba.org>
[ Same patch
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  in http://marc.theaimsgroup.com/?l=linux-kernel&m=112450820432121&w=2 ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-27 18:03:42 -07:00
Andreas Herrmann 3859f6a248 [PATCH] zfcp: add rports to enable scsi_add_device to work again
This patch fixes a severe problem with 2.6.13-rc7.

Due to recent SCSI changes it is not possible to add any LUNs to the zfcp
device driver anymore.  With registration of remote ports this is fixed.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Acked-by: James Bottomley <jejb@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-27 11:22:36 -07:00
Jan Blunck 729d70f5df [PATCH] sg.c: fix a memory leak in devices seq_file implementation
I know that scsi procfs is legacy code but this is a fix for a memory leak.

While reading through sg.c I realized that the implementation of
/proc/scsi/sg/devices with seq_file is leaking memory due to freeing the
pointer returned by the next() iterator method.  Since next() might return
NULL or an error this is wrong.  This patch fixes it through using the
seq_files private field for holding the reference to the iterator object.

Here is a small bash script to trigger the leak. Use slabtop to watch
the size-32 usage grow and grow.

#!/bin/sh

while true; do
	cat /proc/scsi/sg/devices > /dev/null
done

Signed-off-by: Jan Blunck <j.blunck@tu-harburg.de>
Acked-by: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-27 11:22:27 -07:00
Patrick Boettcher 8126fdbc76 [PATCH] fix for race problem in DVB USB drivers (dibusb)
Fixed race between submitting streaming URBs in the driver and starting
the actual transfer in hardware (demodulator and USB controller) which
sometimes lead to garbled data transfers. URBs are now submitted first,
then the transfer is enabled. Dibusb devices and clones are now fully
functional again.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-27 11:03:45 -07:00