Commit Graph

22285 Commits (7d5a015eece8be9186d3613d595643a520555e33)

Author SHA1 Message Date
Henrique de Moraes Holschuh 7d5a015eec ACPI: thinkpad-acpi: update brightness sysfs interface support
Update the brightness sysfs interface (done through the backlight class) to
be in line with the rest of the thinkpad-acpi driver.

This renames the incorrect, un-obvious, and clash-prone name of "ibm" for
the backlight device to a much more fitting and descriptive
"thinkpad_screen".  This is something I wanted to do for quite a while...

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh b616004c70 ACPI: thinkpad-acpi: add sysfs support to the cmos command subdriver
Add sysfs attributes to send ThinkPad CMOS commands.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh eaa7571b2d ACPI: thinkpad-acpi: add a safety net for TPEC fan control mode
The Linux ThinkPad community is not positive that all ThinkPads that do
HFSP EC fan control do implement full-speed and auto modes, some of the
earlier ones supporting HFSP might not.

If the EC ignores the AUTO or FULL-SPEED bits, it will pay attention to the
lower three bits that set the fan level.  And as thinkpad-acpi was leaving
these set to zero, it would stop(!) the fan, which is Not A Good Thing.

So, as a safety net, we now make sure to also set the fan level part of the
HFSP register to speed 7 for full-speed, and a minimum of speed 4 for auto
mode.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh fe98a52ce7 ACPI: thinkpad-acpi: add sysfs support to fan subdriver
Export sysfs attributes to monitor and control the internal thinkpad fan
(some thinkpads have more than one fan, but thinkpad-acpi doesn't support
the second fan yet).  The sysfs interface follows the hwmon design guide
for fan devices.

Also, fix some stray "thermal" files in the fan procfs description that
have been there forever, and officially support "full-speed" as the name
for the PWM-disabled state of the fan controller to keep it in line with
the hwmon interface.  It is much better a name for that mode than the
unobvious "disengaged" anyway.  Change the procfs interface to also accept
full-speed as a fan level, but still report it as disengaged for backwards
compatibility.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh 2c37aa4e22 ACPI: thinkpad-acpi: add sysfs support to the thermal subdriver
Export thinkpad thermal sensors to sysfs, following the hwmon
specification for thermal monitoring sensors.

ThinkPad thermal monitoring is done by the EC.  Sensors can show up or
disappear at runtime when they are inside hotswappable hardware, such as
batteries.  Sensors that are not available return -ENXIO when accessed.

Up to 16 thermal sensors are supported on new firmware (but nobody has
reported a ThinkPad with more than 12 sensors so far), and 8 sensors are
supported on older firmware.  Thermal sensor mapping is model-specific.
Precision varies, it is 1 degree Celcius on new ThinkPads, but higher on
some older models.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh 40ca9fdf8a ACPI: thinkpad-acpi: protect fan and hotkey data structures
Add proper mutex locking to some data structures access subject to races
due to concurrent access of driver functions on the hotkey and fan
subdrivers.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh 7252374a39 ACPI: thinkpad-acpi: add infrastructure for the sysfs device attributes
Add infrastructure to deal with sysfs attributes and grouping, and helpers
for common sysfs parsing.  Switch driver attributes to use them.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh 176750d688 ACPI: thinkpad-acpi: driver sysfs conversion
Add the sysfs attributes for the platform driver.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh 54ae15014c ACPI: thinkpad-acpi: register with the device model
Register thinkpad-acpi platform driver and platform device for the device
model.  Also register the platform device with the hwmon class.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 02:00:27 -04:00
Henrique de Moraes Holschuh 99fba3f817 ACPI: thinkpad-acpi: improve fan watchdog messages
Improve some of the fan watchdog error messages to be a little more
helpful.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh 04cc862c18 ACPI: thinkpad-acpi: cleanup thermal subdriver for sysfs conversion
Clean-up the thermal subdriver for sysfs conversion.  Make thermal_get_*
reentrancy-safe while at it, and add the missing thermal_read_mode variable
to the header file.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh c9bea99c1a ACPI: thinkpad-acpi: clean up CMOS commands subdriver
Some ThinkPad CMOS commands subdriver cleanups, and also rename/promote
cmos_eval to a ACPI helper function, as it is used by many other
subdrivers.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh 83f3472464 ACPI: thinkpad-acpi: cleanup video subdriver
Cleanup video subdriver for sysfs conversion, and properly check
result status of acpi_evalf.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh d6fdd1e91a ACPI: thinkpad-acpi: cleanup bluetooth and wan for sysfs conversion
Prepare bluetooth and wan driver code to be more easily hooked into sysfs
helpers, by separating the procfs logic from the device attribute handling.

These changes also remove the entries from procfs on notebooks without the
bluetooth/wan hardware installed.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh b86c4722de ACPI: thinkpad-acpi: clean up hotkey subdriver
Cleanup hotkey subdriver code.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh d01320e606 ACPI: thinkpad-acpi: mark acpi helper functions __must_check
Mark acpi_evalf and friends __must_check.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh 8d376cd654 ACPI: thinkpad-acpi: prepare for device model conversion
Prepare the thinkpad-acpi driver for the conversion to the device
model, by renaming variables and doing other glue work that shall
make the later patches much cleaner.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh d8fd94d9f0 ACPI: thinkpad-acpi: use bitfields for module flags
Use a bitfield to hold boolean module-wide flags, to conserve some memory.
It is easy and it is clean, so we do it just for the heck of it even if it
saves very little space.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh 9264117792 ACPI: thinkpad-acpi: use bitfields to hold subdriver flags
Save some memory by using bitfields to hold boolean flags for the
subdrivers.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh 0dcef77c5b ACPI: thinkpad-acpi: improve thinkpad detection
Improve the detection of ThinkPads, so as to reduce the chances of false
positives.

Since this could potentially add false negatives on the very old models,
add a module parameter to force the detection of a thinkpad.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:34 -04:00
Henrique de Moraes Holschuh a5763f2223 ACPI: thinkpad-acpi: uncouple subdriver init from ibms struct
Move the .init method from ibms struct to another struct, and use a list
head to control which subdrivers have been activated.

This allows us to have the subdriver init methods marked __init, saving
quite a lot of .text size, and even a bit of .data size as some data can
now be made __initdata.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh fe08bc4b4f ACPI: thinkpad-acpi: add subdriver debug statements
Add debug messages to the subdriver initialization and exit code.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh 5fba344cfd ACPI: thinkpad-acpi: clean up probing and move init to subdrivers
Move most of the probing code to its own function, and most of the
subdriver-specific init code into subdriver init functions.

This allows us to not define pci_handle unless the dock subdriver is
enabled, as well.

This patch causes a minor userland interface change: if a subdriver doesn't
detect a capability, /proc entries for it are not created anymore (as
opposed to a /proc entry that just returned "unsupported").

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh 132ce09123 ACPI: thinkpad-acpi: add debug mode
Add a debug mode parameter and verbose debug mode Kconfig option.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh f51d1a3984 ACPI: thinkpad-acpi: update fan firmware documentation
Update some stuff in the in-code text describing the ThinkPad fan
firmware.  This patch has no code changes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh efa27145df ACPI: thinkpad-acpi: rename thinkpad constants
Rename all IBMACPI_ constants, now that we are not called ibm-acpi anymore.
Driver-specific constants are now prefixed TPACPI_, ThinkPad firmware
specific ones are now prefixed TP_CMOS_, TP_ACPI_, or TP_EC_.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh 1def7115f0 ACPI: thinkpad-acpi: rename module glue
Rename module init and exit functions, now that we are not called ibm-acpi
anymore.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh 142cfc90f0 ACPI: thinkpad-acpi: rename one stray use of ibm-acpi in a comment
Rename a stray use of ibm-acpi on a comment, no functional changes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:33 -04:00
Henrique de Moraes Holschuh 6700121b53 ACPI: thinkpad-acpi: rename register_ibmacpi_subdriver
Rename register_ibmacpi_subdriver to register_tpacpi_subdriver, as
we are not called ibmacpi anymore.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-21 23:30:32 -04:00
Henrique de Moraes Holschuh 643f12dbb6 ACPI: thinkpad-acpi: cleanup after rename
Cleanup documentation, driver strings and other misc stuff, now that the
driver is named "thinkpad-acpi".

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30 15:35:42 -04:00
Henrique de Moraes Holschuh d903ac5455 ACPI: thinkpad-acpi: add compatibility MODULE_ALIAS entry
Add a ibm_acpi module alias for userpace, so that modprobe ibm_acpi will
still load the correct driver.  This alias can be removed in the future,
probably two years from now if nothing warrants removing it sooner.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30 15:35:42 -04:00
Henrique de Moraes Holschuh 85998248b2 ACPI: thinkpad-acpi: cleanup Kconfig for thinkpad-acpi
Since ibm-acpi was renamed to thinkpad-acpi, rename and update its Kconfig
entries and Kconfig-related symbols accordingly.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30 15:35:42 -04:00
Henrique de Moraes Holschuh f21f85de4b ACPI: ibm-acpi: rename driver to thinkpad-acpi
Rename the ibm-acpi driver to thinkpad-acpi.  ThinkPads are not even made
by IBM anymore, so it is high time to rename the driver...

The name thinkpad-acpi was used sometime ago by a thinkpad-specific hotkey
driver by Erik Rigtorp, around the 2.6.8-2.6.10 time frame.  The driver
apparently never got merged into mainline (it did make some trips through
-mm).  ibm-acpi was merged soon after, making its debut in 2.6.10.

The reuse of the thinkpad-acpi name shouldn't be a problem as far as user
confusion goes, as Erik's thinkpad-acpi apparently didn't get widespread
use in the Linux ThinkPad community and most hits for thinkpad-acpi in
google point to ibm-acpi anyway.

Erik, if you read this, please consider the reuse of the thinkpad-acpi name
as a compliment to your effort to make ThinkPads more useful to all of us.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30 15:35:41 -04:00
Henrique de Moraes Holschuh 3ede41c718 ACPI: ibm-acpi: move driver to drivers/misc hierarchy
ibm-acpi is not an ACPICA driver, so move it to drivers/misc as per Len
Brown's request.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:55 -04:00
Henrique de Moraes Holschuh a62bc916cf ACPI: ibm-acpi: update copyright notice
Update copyright and license info on the source code comments.  No
functional changes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh 56b6aeb058 ACPI: ibm-acpi: organize code
Shuffle code around to better organize the driver code inside the
ibm-acpi.c file.

This patch adds no functional changes.  It is pure fluff that will make me
a bit more productive.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh 1406cdd176 ACPI: ibm-acpi: add header file
Add a (private) header file for ibm-acpi, and move type definitions and
ThinkPad driver constants to the new header file.

This patch has no functional changes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh e062e03438 ACPI: ibm-acpi: rename some identifiers
Rename some identifiers so that they are more in tune with the rest of the
driver code, or less generic.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Henrique de Moraes Holschuh 837ca6ddb4 ACPI: ibm-acpi: kill trailing whitespace
I shall protect the ibm-acpi city against the invasion of the barbarian
blanks!  To the unforgiving jaws of sed s/[[:blank:]]\+$// they go!

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-25 23:37:54 -04:00
Michael Krufky f5ae29e284 [PATCH] cx88-dvb: fix nxt200x rf input switching
After dvb tuner refactoring, the pllbuff has been altered such that the pll
address is now stored in buf[0].  Instead of sending buf to set_pll_input,
we should send buf+1.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Ivan Andrewjeski <ivan@fiero-gt.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-24 16:49:22 -07:00
Ralf Baechle 8fb303c7f1 [MIPS] SB1250: Fix bugs/warnings by creative use of volatile.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-24 17:01:50 +00:00
Linus Torvalds cad6a84a39 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: fix oops on "modprobe -r ohci1394" after network class_device conversion
2007-03-23 11:02:45 -07:00
Linus Torvalds 0ab602e5bc Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  [netdrvr] ewrk3: correct card detection bug
  cxgb3 - fix white spaces in drivers/net/Kconfig
  myri10ge: update driver version to 1.3.0-1.226
  myri10ge: fix management of >4kB allocated pages
  myri10ge: update wcfifo and intr_coal_delay default values
  myri10ge: Serverworks HT2100 provides aligned PCIe completion
  mv643xx_eth: add mv643xx_eth_shutdown function
  SAA9730: Fix large pile of warnings
  Revert "ucc_geth: returns NETDEV_TX_BUSY when BD ring is full"
  cxgb3 - T3B2 pcie config space
  cxgb3 - Fix potential MAC hang
  cxgb3 - Auto-load FW if mismatch detected
  cxgb3 - fix ethtool cmd on multiple queues port
  Fix return code in pci-skeleton.c
  skge: use per-port phy locking
  skge: mask irqs when device down
  skge: deadlock on tx timeout
  [PATCH] airo: Fix an error path memory leak
  [PATCH] bcm43xx: MANUALWLAN fixes
2007-03-23 11:01:41 -07:00
Guido Guenther cee9e8c5cb [PATCH] rivafb: fix initial brightness
This is the rivafb equivalent of 238576e12f.
It fixes rivafb having a default backlight brightness of 0 (no picture at
all) on a PBook 6,1.

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23 11:01:22 -07:00
Danny Kukawka 6149dd5cfa [PATCH] add Fujitsu Siemens Tablet PC devices to 8250_pnp.c
Adds device ids of two Fujitsu Siemens Tablet PCs to pnp_dev_table

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23 11:01:22 -07:00
Thomas Gleixner e585bef815 [PATCH] i386: add command line option "local_apic_timer_c2_ok"
It turned out that it is almost impossible to trust ACPI, BIOS & Co.
regarding the C states. This was the reason to switch the local apic
timer off in C2 state already. OTOH there are sane and well behaving
systems, which get punished by that decision.

Allow the user to confirm that the local apic timer is trustworthy in C2
state. This keeps the default behaviour on the safe side.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23 10:21:02 -07:00
Linus Torvalds 296d93cd02 Revert "ACPI: Only use IPI on known broken machines (AMD, Dothan/BaniasPentium M)"
This reverts commit 25496caec1, which
broke bootup on at least Ingo's ThinkPad T60.  Need to figure out
exactly what is wrong before we can re-do the logic.

Requested-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-23 08:03:47 -07:00
Stefan Richter 7a9eeb2fa1 ieee1394: fix oops on "modprobe -r ohci1394" after network class_device conversion
The networking subsystem has been converted from class_device to device
but ieee1394 hasn't.  This results in a 100% reproducible NULL pointer
dereference if the ohci1394 driver module is unloaded while the eth1394
module is still loaded.
http://lkml.org/lkml/2006/11/16/147
http://lkml.org/lkml/2007/3/14/4

This is a regression in 2.6.21-rc1.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Ismail Dönmez <ismail@pardus.org.tr>
2007-03-23 10:55:25 +01:00
Jeff Garzik 991b5557f7 [netdrvr] ewrk3: correct card detection bug
Arwin Vosselman pointed out:
> The ewrk3-driver doesn't function with 2.6.16-kernels (used 2.6.16.41 for
> my tests). Cards will never be detected due to this bug.
>
> drivers/net/ewrks3.c:
> Line 417 reads:
>
> if (nicsr == (CSR_TXD | CSR_RXD))
>
> that should be:
>
> if (nicsr != (CSR_TXD | CSR_RXD))
>
> Comparison with the same line in v2.4 shows why:
>
> 2.4:
> if (nicsr == (CSR_TXD | CSR_RXD)){
>
> blah, blah
> ==========
> 2.6:
> if (nicsr == (CSR_TXD | CSR_RXD))
>     return -ENXIO;
>
> blah, blah
> ==========
>
> blah,blah will not, but should, be executed in 2.6 with a card being present.
>
> The fix mentioned above solves this bug.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-23 02:03:29 -04:00
Jeff Garzik 604119a4b2 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into tmp 2007-03-23 01:51:20 -04:00