Commit Graph

19679 Commits (9fab2d8b75a4084e91f1dcb4e55368406fe53010)

Author SHA1 Message Date
Thomas Hellstrom 7f02d687b4 [AGPGART] Fix PCI-posting flush typo.
Unfortunately there was a typo in one of the patches I sent,
(The one now committed to the agpgart tree).
It may cause a bus error on i810 type hardware.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-28 22:24:45 -05:00
Michael Holzheu aa77015c4e [S390] cio: fix stsch_reset.
Copy inline assembly of stsch and add "memory" to clobber list in order
to prevent gcc from optimizing away the checking of the global variable
"pgm_check_occured".

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-28 00:35:36 +01:00
Melissa Howland 524a237e45 [S390] Change max. buffer size for monwriter device.
Reduce the max. buffer size for the monwriter device to prevent a
possible problem with the z/VM monitor service.

Signed-off-by: Melissa Howland <melissah@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-28 00:35:25 +01:00
Jean Delvare 69f7e75a9d V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging
reference to .init.text: from .text between 'cx88_card_setup'
(at offset 0x68c) and 'cx88_risc_field'
Caused by leadtek_eeprom() being declared __devinit and called from
a non-devinit context.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:23:58 -02:00
Alexey Dobriyan 70bdd9c83a V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&"
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:23:41 -02:00
Mauro Carvalho Chehab 0b778a56e3 V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1
include/media/ir-common.h:78: error: field 'work' has incomplete type
drivers/media/common/ir-functions.c: In function 'ir_rc5_timer_end':
drivers/media/common/ir-functions.c:301: error: 'jiffies' undeclared (first use in this function)
drivers/media/common/ir-functions.c:301: error: (Each undeclared identifier is reported only once)
drivers/media/common/ir-functions.c:301: error: for each function it appears in.)
drivers/media/common/ir-functions.c:347: error: 'HZ' undeclared (first use in this function)

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:46 -02:00
David Brownell 9a2816c1c4 V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch
- CAFE_CCIC needs to depend on PCI, else "allyesconfig" breaks
   on systems without PCI
- em28xx-video can't udelay(2500) else "allyesconfig" breaks
   on systems that refuse to spin that long (I saw it on ARM)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:41 -02:00
Akinobu Mita 5f1693fe82 V4L/DVB (4997): Bttv: delete duplicated ioremap()
ioremap() is called twice to same resource.
The returen value of first one is not error-checked.
second one is complely ignored.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:21 -02:00
Akinobu Mita 2582140035 V4L/DVB (4996): Msp3400: fix kthread_run error check
The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:16 -02:00
Akinobu Mita 054afee473 V4L/DVB (4995): Vivi: fix kthread_run() error check
The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:12 -02:00
Akinobu Mita 72f678c301 V4L/DVB (4994): Vivi: fix use after free in list_for_each()
Freeing data including list_head in list_for_each() is not safe.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:07 -02:00
Stephan Berberig b331daa03c V4L/DVB (4992): Fix typo in saa7134-dvb.c
Fix a typo (use_frontent -> use_frontend) in saa7134-dvb.c.

Signed-off-by: Stephan Berberig <s.berberig@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:20:00 -02:00
Adrian Bunk d4f60baf78 V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference
We shouldn't dereference "cam" when we already know it's NULL.
Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:56 -02:00
Amit Choudhary d82d418a3a V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak
Free previously allocated memory (in array elements) if kmalloc() returns
NULL in submit_urbs().

Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:51 -02:00
Hans Verkuil 83aaf13c5b V4L/DVB (4984): LOG_STATUS should show the real temporal filter value.
The temporal filter is forced off when scaling. The VIDIOC_LOG_STATUS
handler still showed the old temporal filter. It is now consistent with
the real temporal filter value.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:42 -02:00
Hans Verkuil 12b896e436 V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting.
Change the code to unconditionally turn off the temporal filter when scaling.
If the window is not full screen the filter will introduce a nasty ghosting
effect.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:38 -02:00
Hans Verkuil b331def2d3 V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400.
The wrong matrix was used when an external input was selected instead of
the tuner input. The rxsubchans field was also not initialized to STEREO
for an external input. And finally the msp34xxg_detect_stereo() should
not try to detect stereo for an external input, that code is for the
tuner input only.
Together these bugs made it hit 'n miss whether you ever got stereo out
of the msp3400 for an external input.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:32 -02:00
Mauro Carvalho Chehab 315eb962d2 V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working
On cx88 driver, sampling rate should be at chroma subcarrier freq (FSC).
However, driver were programming wrong values for PAL/60, PAL/Nc and
NTSC 4.43. This patch do the proper calculation. It also calculates
htotal, hdelay and hactive constants, according with the sampling
rate.
It is tested with PAL/60 by Piotr Maksymuk and Olivier. Also tested with
the already-supported standards.

Test is still required for PAL/Nc.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:26 -02:00
Dwaine Garden ed00b41dc8 V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected
- SYSFS: Replaced all to_video_device(cd), video_device_create_file,
  video_device_remove_file and add the proper checks at create_file
- Converted old norm values to V4L2 ones.
- Robustness on sysfs hue/contrast/saturation queries.
  Additional check in order to return 0 if the driver is not opened.
- Whitespace cleanups in usbvision-cards.c

This patch merges two fixes by Thierry MERLE and Mauro Chehab, and adds
additional checks.

Signed-off-by: Dwaine Garden<DwaineGarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:21 -02:00
Michael Krufky 5ef35be42d V4L/DVB (4973): Dvb-core: fix printk type warning
dvb_net.c: In function 'dvb_net_ule':
dvb_net.c:628: warning: format '%#lx' expects type 'long unsigned int', but argument 3 has type 'u32'
dvb_net.c:628: warning: format '%#lx' expects type 'long unsigned int', but argument 4 has type 'u32'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:15 -02:00
Ang Way Chuang dedcefb085 V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems
CRC-32 checking during ULE decapsulation always failed on x86_64 systems due
to the size of a variable used to store CRC. This bug was discovered on
Fedora Core 6 with kernel-2.6.18-1.2849. The i386 counterpart has no such
problem. This patch has been tested on 64-bit system as well as 32-bit system.

Signed-off-by: Ang Way Chuang <wcang@nrg.cs.usm.my>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:10 -02:00
Thierry MERLE 38284ba361 V4L/DVB (4970): Usbvision memory fixes
- fix decompression buffer allocation not done at first driver open
- simplification of USB sbuf allocation (use of usb_buffer_alloc)
- replaced vmalloc by vmalloc_32 (for homogeneity)
- add of saa7111 (i2cAddr=0x48) detection printout in attach_inform

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:19:04 -02:00
Hans Verkuil 3a4456a073 V4L/DVB (4968): Add PAL-60 support for cx2584x.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:18:59 -02:00
Hans Verkuil e71ced1a5d V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:18:54 -02:00
audetto@tiscali.it 2485eb0a55 V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette
Consistent handling of VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422

Signed-off-by: Andrea A Odetti <audetto@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 14:18:50 -02:00
Mauro Carvalho Chehab c626846147 V4L/DVB (4960): Removal of unused code from usbvision-i2c.c
i2c_adap is almost not used. This patch removes it, cleaning the i2c support,
and improving driver understanding.
Thanks to Thierry Merle for testing it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:25 -02:00
Adrian Bunk 0a0ceadebd V4L/DVB (4959): Usbvision: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global functions static
- remove the unused EXPORT_SYMBOL's

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:25 -02:00
Ralf Baechle bee8a44ecb V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS
Both use __SC.  Since __* is sort of private namespace I've choosen to fix
this in the driver.  For consistency I decieded to also change __UNSC to
UNSC.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:24 -02:00
Mario Rossi 6ccd60172e V4L/DVB (4956): [NOVA-T-USB2] Put remote-debugging in the right place
This patch removes unnecessary (and misleading) debug
output (it printed the values of the keys in the table up to the value
of the key pressed).

Signed-off-by: Mario Rossi <mariofutire@googlemail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:24 -02:00
Mario Rossi a821e990e4 V4L/DVB (4955): Fix autosearch index
After rewriting the driver the wrong autosearch index was used when
COFDM-parameter needed to be detected.
Thanks to Mario Rossi who found it.

Signed-off-by: Mario Rossi <mariofutire@googlemail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27 10:23:24 -02:00
Francois Romieu 81f4e6c190 r8169: extraneous Cmd{Tx/Rx}Enb write
Checked in Realtek's driver, this one has no business being there.
The driver still works but there is a noticeable performance drop.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2006-12-26 23:28:02 +01:00
Ayaz Abdulla 87046e5062 forcedeth: modified comment header
This patch removes comment that forcedeth is not supported by NVIDIA.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:50:57 -05:00
Amit S. Kale bd56c6b15e NetXen: Reducing ring sizes for IOMMU issue.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:39 -05:00
Amit S. Kale ed33ebe464 NetXen: Fix for PPC machines.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    2 +-
 netxen_nic_init.c |   12 ++++++------
 netxen_nic_main.c |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:39 -05:00
Amit S. Kale 6c58664416 NetXen: work queue fixes.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    3 +--
 netxen_nic_init.c |    2 +-
 netxen_nic_main.c |   15 +++++++--------
 3 files changed, 9 insertions(+), 11 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:46:05 -05:00
Amit S. Kale d2378e8972 NetXen: Link status message correction for quad port cards.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic_isr.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:26 -05:00
Amit S. Kale a379cb3c13 NetXen: Multiple adapter fix.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

 netxen_nic.h      |    3 +--
 netxen_nic_main.c |   12 ------------
 2 files changed, 1 insertion(+), 14 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:26 -05:00
Amit S. Kale c75e86b47f NetXen: Using correct CHECKSUM flag.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_hw.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Amit S. Kale b0d541dbb9 NetXen: driver reload fix for newer firmware.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_main.c |    7 +++++++
 1 files changed, 7 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Amit S. Kale 0d39073484 NetXen: Adding new device ids.
Signed-off-by: Amit S. Kale <amitkale@netxen.com>

netxen_nic_main.c |    2 ++
 1 files changed, 2 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:45:25 -05:00
Hynek Petrak 3e65bb94a9 PHY probe not working properly for ibm_emac (PPC4xx)
I have a system with AMCC PowerPC 405EP and PHY Intel LXT971A.  Linux
2.6.18.3 is not able to detect the PHY ID correctly.  The PHY ID
detected is 0, but should be 0x1d.

This is because phy_read() (__emac_mdio_read() resp.) from
drivers/net/ibm_emac/ibm_emac_core.c might return -ETIMEDOUT or
-EREMOTEIO on error.  This is ignored inside the

int mii_phy_probe(struct mii_phy *phy, int address)
from drivers/net/ibm_emac/ibm_emac_phy.c

as the return value is assigned to an u32 variable.

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:41:08 -05:00
Yan Burman ebf5112ca7 ep93xx: some minor cleanups to the ep93xx eth driver
Small cleanup in the Cirrus Logic EP93xx ethernet driver: Check for NULL
pointer before dereferencing it instead of after.  Remove unreferenced
variable.

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:41:08 -05:00
Jeff Garzik 3a960f7e35 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-12-26 16:38:31 -05:00
Stephen Hemminger aed2cec45c sky2: phy power down needs PCI config write enabled
In order to change PCI registers (via the iomap'd window),
it needs to be enabled; this wasn't being done in sky2_phy_power
the function that turns on/off power to the PHY.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Stephen Hemminger 44ade17824 sky2: power management/MSI workaround
MSI doesn't work properly on resume on many platforms because the
BIOS goes and changes it back to INTx mode after the sky2 driver has
restored in resume.

It is really a bug in the base power management resume code, and
this workaround is temporary until the change to PM code works it's way
through the release process.  The PM fix is non-trivial since it needs
to change when non-boot CPU's are enabled.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Stephen Hemminger 25d82d7a2f sky2: dual port NAPI problem
Shutting down port 0 disables the NAPI poll used by both ports.
The long term fix will be to separate NAPI object from net device
until then just reenable if needed.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:36:42 -05:00
Randy Dunlap ce9f7fe3c3 via-velocity uses INET interfaces
via-velocity doesn't build when CONFIG_INET=n:

drivers/built-in.o: In function `velocity_unregister_notifier':
via-velocity.c:(.text+0xe9b46): undefined reference to `unregister_inetaddr_notifier'
drivers/built-in.o: In function `velocity_init_module':
via-velocity.c:(.init.text+0xa027): undefined reference to `register_inetaddr_notifier'

I wanted to make this change in drivers/net/Kconfig, but
this isn't legal kconfig language:

 config VIA_VELOCITY
        tristate "VIA Velocity support"
        depends on NET_PCI && PCI
+       depends on INET if PM
        select CRC32
        select CRC_CCITT
        select MII

so fix it in via-velocity.c instead.
Builds with all 4 combinations of CONFIG_NET & CONFIG_PM.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Herbert Xu 683a2aa339 e1000: Do not truncate TSO TCP header with 82544 workaround
The e1000 driver has a workaround for 82544 on PCI-X where if the
terminating byte of a buffer is at addresses 0-3 mod 8, then 4 bytes
are shaved off it and defered to a new segment.  This is due to an
erratum that could otherwise cause TX hangs.

Unfortunately this breaks TSO because it may cause the TCP header to
be split over two segments which itself causes TX hangs.  The solution
is to pull 4 bytes of data up from the next segment rather than pushing
4 bytes off.  This ensures the TCP header remains in one piece and
works around the PCI-X hang.

This patch is based on one from Jesse Brandeburg.

This bug has been trigered by both CONFIG_DEBUG_SLAB as well as Xen.

Note that the only reason we don't see this normally is because the
TCP stack starts writing from the end, i.e., it writes the TCP header
first then slaps on the IP header, etc.  So the end of the TCP header
(skb->tail - 1 here) is always aligned correctly.

Had we made the start of the IP header (e.g., IPv6) 8-byte aligned
instead, this would happen for normal TCP traffic as well.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 1a63e846a4 myri10ge: handle failures in suspend and resume
On suspend, handle pci_set_power_state errors, and on resume
handle failures in pci_resume_state().

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 83f6e15245 myri10ge: no need to save MSI and PCIe state in the driver
The PCI MSI and express state are already saved and restored by the
current versions of pci_save_state/pci_restore_state.
Therefore it is no longer necessary for the driver to do it.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 3621cec5b5 myri10ge: make msi configurable at runtime through sysfs
Now that IRQ are requested is called on open() and freed on close(),
we can safely switch from/to MSI without unloading the module.

We are guaranteed to correctly free IRQ even if the sysfs file got
written in the meantime since the MSI initialization is stored in
mgp->msi_enabled.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin df30a740e4 myri10ge: move request_irq to myri10ge_open
Request IRQ in myri10ge_open() and free in close() instead of probe()
and remove() to eliminate potential race between the watchdog and the
interrupt handler. Additionaly, the interrupt handler won't get called
on shared irq anymore when the interface is down.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Brice Goglin 7adda30c82 myri10ge: match number of save_state and restore
Since pci_save_state() pushes MSI and PCIe states on a kind of stack,
myri10ge saving the state in advance for parity recovery will push the
state again on the stack on suspend. This leads to some memory leak.
We add a couple additional calls to save_state and restore_state so
that we don't leak anymore.

For the future, we are thinking of a better way to recover from parity
error without using pci_save_state().

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:28:20 -05:00
Francois Romieu a27993f3d9 r8169: use the broken_parity_status field in pci_dev
The former option is removed and platform code can now specify the
expected behavior.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:24:11 -05:00
Francois Romieu d15e9c4d9a netpoll: drivers must not enable IRQ unconditionally in their NAPI handler
net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of a driver which
supports netpoll.

b57bd06655 fixed the issue for the
8139too.c driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:24:11 -05:00
Stephen Hemminger 92104e9480 netxen: remove private ioctl
The netxen driver includes a private ioctl that provides access
to functionality that is already available in other ways. The PCI
layer has application access hooks (see setpci), and the statistics
are available in ethtool/netstats.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 16:17:36 -05:00
Jesse Brandeburg 79f3d3996f [PATCH] e1000: No-delay link detection at interface up
Currently after an interface up, the link state is detected 2 seconds later
when the first watchdog timer runs. This patch changes that by triggering
the hardware to generate a link-change interrupt from the up() function
instead. This has the result that the link state gets detected immediately
and without races. This has the potential to speed up booting since a normal
distribution boot process waits for a link before DHCP is attempted.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jeff Garzik 15e376b4ee e1000: 3 new driver stats for managability testing
Add 3 extra packet redirect counters for tracking purposes to make sure
we can test that all packets arrive properly.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>,
rewritten to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jesse Brandeburg 1f753861d2 [PATCH] e1000: Make the copybreak value a module parameter
Allow the user to vary the size that copybreak works. Currently cb is enabled
for packets < 256 bytes, but various tests indicate that this should be
configurable for specific use cases. In addition, this parameter allows us
to force never/always during testing to get full and predictable coverage of
both code paths.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Bruce Allan 018ea44ef1 [PATCH] e1000: Fix PBA allocation calculations
Assign the PBA to be large enough to contain at least 2 jumbo frames on
all adapters. This dramatically increases performance on several adapters
and fixes TX performance degradation issues where the PBA was misallocated
in the old algorithm.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jesse Brandeburg d89b6c6750 [PATCH] e1000: narrow down the scope of the tipg timer tweak
the driver has (ancient) code for messing with TIPG from the 82542 days.
Unfortunately this code was running on our current adapters and setting
TIPG for fiber to be +1 over the copper value.  This caused 1.45Mpps
to be sent instead of 1.487Mpps.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jeff Kirsher c3813ae661 [PATCH] e1000: fix ethtool reported bus type for older adapters
For older adapters we know that they are of the PCI bus type, so we can
just set this.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Bruce Allan 83cd827977 [PATCH] e1000: fix to set the new max frame size before resetting the adapter
This bugfix makes sure that the driver data reflects the full new situation
before the adapter is reinitialized.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jeff Garzik bb8e3311ef e1000: workaround for the ESB2 NIC RX unit issue
In rare occasions, ESB2 systems would end up started without the RX
unit being turned on. Add a check that runs post-init to work around
this issue.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>,
rewritten to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:30 -05:00
Jesse Brandeburg 72f3ab7462 [PATCH] e1000: disable TSO on the 82544 with slab debugging
CONFIG_DEBUG_SLAB changes alignments of the data structures the slab
allocators return. These break certain workarounds for TSO on the 82544.
Since DEBUG_SLAB is relatively rare and not used for performance sensitive
cases, the simplest fix is to disable TSO in this special situation.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:29 -05:00
Jesse Brandeburg 3d5460a0ba [PATCH] e1000: Fix Wake-on-Lan with forced gigabit speed
If the user has forced gigabit speed, phy power management must be disabled;
otherwise the NIC would try to negotiate to a linkspeed of 10/100 mbit on
shutdown, which would lead to a total loss of link. This loss of link breaks
Wake-on-Lan and IPMI.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:29 -05:00
Jeff Garzik 0fccd0e9e3 e1000: consolidate managability enabling/disabling
Several bugs existed in how we handle manageability issues all
over the driver.  This patch consolidates all the managability
release and init code in two single functions and call them from
appropriate locations. This fixes several BMC packet redirect issues
and powerup/down hiccups.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>, rewritten
to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:29 -05:00
Jeff Garzik 167fb28416 e1000: omit stats for broken counter in 82543
The 82543 chip does not count tx_carrier_errors properly in FD mode;
report zeros instead of garbage.

Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>, rewritten
to use feature flags by me.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Jeff Garzik bd2371ebcc e1000: For sanity, reformat e1000_set_mac_type(), struct e1000_hw[_stats]
Makes future changes a bit more readable.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Jesse Brandeburg 2b65326e67 [PATCH] e1000: dynamic itr: take TSO and jumbo into account
The dynamic interrupt rate control patches omitted proper counting
for jumbo's and TSO resulting in suboptimal interrupt mitigation strategies.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Jesse Brandeburg 7d16e65ba5 [PATCH] e1000: The user-supplied itr setting needs the lower 2 bits masked off
The lower 2 bits of a user-supplied itr setting (via ethtool) need to be
masked off: These lower two bits are used as control bits.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-26 15:51:28 -05:00
Eric Anholt c41e0deb50 [AGPGART] fix detection of aperture size versus GTT size on G965
On the G965, the GTT size may be larger than is required to cover the
aperture.  (In fact, on all hardware we've seen, the GTT is 512KB to the
aperture's 256MB).  A previous commit forced the aperture size to 512MB on
G965 to match GTT, which would likely result in hangs at best if users
tried to rely on agpgart's aperture size information.  Instead, we use the
resource length for the aperture size and the system's reported GTT size
when available for the GTT size.

Because the MSAC registers which had been read for aperture size detection
on i9xx chips just cause a change in the resource size, we can use generic
code for aperture detection on all i9xx.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 23:12:22 -05:00
Venkatesh Pallipadi 8edc59d939 [CPUFREQ] Bug fix for acpi-cpufreq and cpufreq_stats oops on frequency change notification
Fixes the oops in cpufreq_stats with acpi_cpufreq driver.  The issue was
that the frequency was reported as 0 in acpi-cpufreq.c.  The bug is due to
different indicies for freq_table and ACPI perf table.

Also adds a check in cpufreq_stats to check for error return from
freq_table_get_index() and avoid using the error return value.

Patch fixes the issue reported at
http://www.ussg.iu.edu/hypermail/linux/kernel/0611.2/0629.html
and also other similar issue here
http://bugme.osdl.org/show_bug.cgi?id=7383 comment 53

Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 22:45:41 -05:00
Thomas Hellstrom 5aa80c7226 [AGPGART] Remove unnecessary flushes when inserting and removing pages.
This patch is to speed up flipping of pages in and out of the AGP aperture as
needed by the new drm memory manager.

A number of global cache flushes are removed as well as some PCI posting flushes.
The following guidelines have been used:

1) Memory that is only mapped uncached and that has been subject to a global
cache flush after the mapping was changed to uncached does not need any more
cache flushes. Neither before binding to the aperture nor after unbinding.

2) Only do one PCI posting flush after a sequence of writes modifying page
entries in the GATT.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 22:44:09 -05:00
Linus Torvalds 18ed1c0513 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (68 commits)
  ACPI: replace kmalloc+memset with kzalloc
  ACPI: Add support for acpi_load_table/acpi_unload_table_id
  fbdev: update after backlight argument change
  ACPI: video: Add dev argument for backlight_device_register
  ACPI: Implement acpi_video_get_next_level()
  ACPI: Kconfig - depend on PM rather than selecting it
  ACPI: fix NULL check in drivers/acpi/osl.c
  ACPI: make drivers/acpi/ec.c:ec_ecdt static
  ACPI: prevent processor module from loading on failures
  ACPI: fix single linked list manipulation
  ACPI: ibm_acpi: allow clean removal
  ACPI: fix git automerge failure
  ACPI: ibm_acpi: respond to workqueue update
  ACPI: dock: add uevent to indicate change in device status
  ACPI: ec: Lindent once again
  ACPI: ec: Change #define to enums there possible.
  ACPI: ec: Style changes.
  ACPI: ec: Acquire Global Lock under EC mutex.
  ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.
  ACPI: ec: Rename gpe_bit to gpe
  ...
2006-12-22 18:46:56 -08:00
Marcel Holtmann dab6df6308 [PATCH] Call init_timer() for ISDN PPP CCP reset state timer
The function isdn_ppp_ccp_reset_alloc_state() sets ->timer.function
and ->timer.data and later on calls add_timer() with no init_timer()
ever done.

Noted by Al Viro.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 14:31:24 -08:00
Adrian Bunk 1f8a5fb80e [ATM] drivers/atm/fore200e.c: Cleanups.
This patch contains the following transformations from custom functions
to standard kernel version:
- fore200e_kmalloc() -> kzalloc()
- fore200e_kfree() -> kfree()
- fore200e_swap() -> cpu_to_be32()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-22 11:12:00 -08:00
Adrian Bunk 52a9107130 [ATM]: Remove dead ATM_TNETA1570 option.
This patch removes the unconverted ATM_TNETA1570 option that also lacks
any code in the kernel.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-22 11:11:59 -08:00
Peter Korsgaard e21654a756 [PATCH] serial/uartlite: Only enable port if request_port succeeded
The uartlite driver used to always enable the port even if request_port
failed causing havoc. This patch fixes it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 09:58:48 -08:00
Ingo Molnar 0888f06ac9 [PATCH] sched: fix bad missed wakeups in the i386, x86_64, ia64, ACPI and APM idle code
Fernando Lopez-Lezcano reported frequent scheduling latencies and audio
xruns starting at the 2.6.18-rt kernel, and those problems persisted all
until current -rt kernels. The latencies were serious and unjustified by
system load, often in the milliseconds range.

After a patient and heroic multi-month effort of Fernando, where he
tested dozens of kernels, tried various configs, boot options,
test-patches of mine and provided latency traces of those incidents, the
following 'smoking gun' trace was captured by him:

                 _------=> CPU#
                / _-----=> irqs-off
               | / _----=> need-resched
               || / _---=> hardirq/softirq
               ||| / _--=> preempt-depth
               |||| /
               |||||     delay
   cmd     pid ||||| time  |   caller
      \   /    |||||   \   |   /
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (try_to_wake_up)
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup <<...>-5856> (37 0)
  IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (c01262ba 0 0)
  IRQ_19-1479  1D..1    0us : resched_task (try_to_wake_up)
  IRQ_19-1479  1D..1    0us : __spin_unlock_irqrestore (try_to_wake_up)
  ...
  <idle>-0     1...1   11us!: default_idle (cpu_idle)
  ...
  <idle>-0     0Dn.1  602us : smp_apic_timer_interrupt (c0103baf 1 0)
  ...
   <...>-5856  0D..2  618us : __switch_to (__schedule)
   <...>-5856  0D..2  618us : __schedule <<idle>-0> (20 162)
   <...>-5856  0D..2  619us : __spin_unlock_irq (__schedule)
   <...>-5856  0...1  619us : trace_stop_sched_switched (__schedule)
   <...>-5856  0D..1  619us : trace_stop_sched_switched <<...>-5856> (37 0)

what is visible in this trace is that CPU#1 ran try_to_wake_up() for
PID:5856, it placed PID:5856 on CPU#0's runqueue and ran resched_task()
for CPU#0. But it decided to not send an IPI that no CPU - due to
TS_POLLING. But CPU#0 never woke up after its NEED_RESCHED bit was set,
and only rescheduled to PID:5856 upon the next lapic timer IRQ. The
result was a 600+ usecs latency and a missed wakeup!

the bug turned out to be an idle-wakeup bug introduced into the mainline
kernel this summer via an optimization in the x86_64 tree:

    commit 495ab9c045
    Author: Andi Kleen <ak@suse.de>
    Date:   Mon Jun 26 13:59:11 2006 +0200

    [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status

    During some profiling I noticed that default_idle causes a lot of
    memory traffic. I think that is caused by the atomic operations
    to clear/set the polling flag in thread_info. There is actually
    no reason to make this atomic - only the idle thread does it
    to itself, other CPUs only read it. So I moved it into ti->status.

the problem is this type of change:

        if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
-               clear_thread_flag(TIF_POLLING_NRFLAG);
+               current_thread_info()->status &= ~TS_POLLING;
                smp_mb__after_clear_bit();
                while (!need_resched()) {
                        local_irq_disable();

this changes clear_thread_flag() to an explicit clearing of TS_POLLING.
clear_thread_flag() is defined as:

        clear_bit(flag, &ti->flags);

and clear_bit() is a LOCK-ed atomic instruction on all x86 platforms:

  static inline void clear_bit(int nr, volatile unsigned long * addr)
  {
          __asm__ __volatile__( LOCK_PREFIX
                  "btrl %1,%0"

hence smp_mb__after_clear_bit() is defined as a simple compile barrier:

  #define smp_mb__after_clear_bit()       barrier()

but the explicit TS_POLLING clearing introduced by the patch:

+               current_thread_info()->status &= ~TS_POLLING;

is not an atomic op! So the clearing of the TS_POLLING bit is freely
reorderable with the reading of the NEED_RESCHED bit - and both now
reside in different memory addresses.

CPU idle wakeup very much depends on ordered memory ops, the clearing of
the TS_POLLING flag must always be done before we test need_resched()
and hit the idle instruction(s). [Symmetrically, the wakeup code needs
to set NEED_RESCHED before it tests the TS_POLLING flag, so memory
ordering is paramount.]

Fernando's dual-core Athlon64 system has a sufficiently advanced memory
ordering model so that it triggered this scenario very often.

( And it also turned out that the reason why these latencies never
  triggered on my testsystems is that i routinely use idle=poll, which
  was the only idle variant not affected by this bug. )

The fix is to change the smp_mb__after_clear_bit() to an smp_mb(), to
act as an absolute barrier between the TS_POLLING write and the
NEED_RESCHED read. This affects almost all idling methods (default,
ACPI, APM), on all 3 x86 architectures: i386, x86_64, ia64.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
Ben Dooks 6d3a25f1fb [PATCH] fix s3c24xx gpio driver (include linux/workqueue.h)
The general gpio driver includes seem to now depend on having
<linux/workqueue.h> included before they are.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
NeilBrown 3f9d7b0d81 [PATCH] md: fix a few problems with the interface (sysfs and ioctl) to md
While developing more functionality in mdadm I found some bugs in md...

- When we remove a device from an inactive array (write 'remove' to
  the 'state' sysfs file - see 'state_store') would should not
  update the superblock information - as we may not have
  read and processed it all properly yet.

- initialise all raid_disk entries to '-1' else the 'slot sysfs file
  will claim '0' for all devices in an array before the array is
  started.

- all '\n' not to be present at the end of words written to
  sysfs files

- when we use SET_ARRAY_INFO to set the md metadata version,
  set the flag to say that there is persistant metadata.

- allow GET_BITMAP_FILE to be called on an array that hasn't
  been started yet.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
Andrew Morton fe0e5c4d94 [PATCH] increase CARDBUS_MEM_SIZE
Linus sayeth:

Google knows everything, and finds, on MS own site no less:

  "Windows 2000 default resources:

   One 4K memory window

   One 2 MB memory window

   Two 256-byte I/O windows"

which is clearly utterly bogus and insufficient. But Microsoft apparently
realized this, and:

  "Windows XP default resources:

   Because one memory window of 4K and one window of 2 MB are not
   sufficient for CardBus controllers in many configurations, Windows XP
   allocates larger memory windows to CardBus controllers where possible.
   However, resource windows are static (that is, the operating system
   does not dynamically allocate larger memory windows if new devices
   appear.) Under Windows XP, CardBus controllers will be assigned the
   following resources:

   One 4K memory window, as in Windows 2000

   64 MB memory, if that amount of memory is available. If 64 MB is not
   available the controller will receive 32 MB; if 32 MB is not available,
   the controller will receive 16 MB; if 16 MB is not available, the
   bridge will receive 8 MB; and so on down to a minimum assignment of 1
   MB in configurations where memory is too constrained for the operating
   system to provide a larger window.

   Two 256-byte I/O windows"

So I think we have our answer. Windows uses one 4k window, and one 64MB
window. And they are no more dynamic than we are (we _could_ try to do it
dynamically, but let's face it, it's fairly painful to dynamically expand
PCI bus resources - you may need to reprogram everything up to the root,
so it would be absolutely crazy to do that unless you have some serious
masochistic tendencies).

So let's just increase our default value to 64M too.

Cc: Markus Rechberger <mrechberger@gmail.com>
Cc: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:51 -08:00
Paul Mackerras 31fccf7fe4 [PATCH] gxt4500: Fix colormap and PLL setting, support GXT6000P
This fixes some bugs in the gxt4500 framebuffer driver, and adds support
for GXT6000P cards.

First, I had the red and blue channels swapped in the colormap update code,
resulting in penguins' noses and feet turning blue (though the penguins
weren't actually shivering :).

Secondly, the code that calculated the values to put in the PLL that
generates the pixel clock wasn't observing some constraints that I wasn't
originally aware of, but am now that I have some documentation on the chip.

The GXT6000P is essentially identical from software's point of view, except
for a different reference clock for the PLL, and the addition of a geometry
engine (which this driver doesn't use).

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:50 -08:00
Akinobu Mita 5e40508e5f [PATCH] tlclk: delete unnecessary sysfs_remove_group
It is unnecessary and invalid to call sysfs_remove_group() after
sysfs_create_group() failure.

Cc: Sebastien Bouchard <sebastien.bouchard@ca.kontron.com>
Cc: Mark Gross <mark.gross@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:50 -08:00
Ed L. Cashin 19900cdee2 [PATCH] fix aoe without scatter-gather [Bug 7662]
Fix a bug that only appears when AoE goes over a network card that does not
support scatter-gather.  The headers in the linear part of the skb appeared
to be larger than they really were, resulting in data that was offset by 24
bytes.

This patch eliminates the offset data on cards that don't support
scatter-gather or have had scatter-gather turned off.  There remains an
unrelated issue that I'll address in a separate email.

Fixes bugzilla #7662

Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com>
Cc: <stable@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: <boddingt@optusnet.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:49 -08:00
Andrew Morton ef8142a525 [PATCH] smc911 workqueue fixes
Teach this driver about the workqueue changes.

Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:48 -08:00
Vitaly Wool 9b6d2efed2 [PATCH] smc911x: fix netpoll compilation faliure
Fix the compilation failure for smc911x.c when NET_POLL_CONTROLLER is set.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:48 -08:00
Randy Dunlap af9997e426 [PATCH] fix kernel-doc warnings in 2.6.20-rc1
Fix kernel-doc warnings in 2.6.20-rc1.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:47 -08:00
Andrew Morton 533ffc289d [PATCH] rtc warning fix
drivers/char/rtc.c:116: warning: 'hpet_rtc_interrupt' defined but not used

Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:47 -08:00
Avi Kivity 0b76e20b27 [PATCH] KVM: API versioning
Add compile-time and run-time API versioning.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Michael Riepe 0f8e3d365a [PATCH] KVM: Handle p5 mce msrs
This allows plan9 to get a little further booting.

Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Michael Riepe abacf8dff9 [PATCH] KVM: Force real-mode cs limit to 64K
This allows opensolaris to boot on kvm/intel.

Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Michael Riepe bf591b24d0 [PATCH] KVM: Do not export unsupported msrs to userspace
Some msrs, such as MSR_STAR, are not available on all processors.  Exporting
them causes qemu to try to fetch them, which will fail.

So, check all msrs for validity at module load time.

Signed-off-by: Michael Riepe <michael@mr511.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Avi Kivity 2c26495710 [PATCH] KVM: Use more traditional error handling in kvm_mmu_init()
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Avi Kivity 36241b8c7c [PATCH] KVM: AMD SVM: Save and restore the floating point unit state
Fixes sf bug 1614113 (segfaults in nbench).

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
Avi Kivity 0e859cacb0 [PATCH] KVM: AMD SVM: handle MSR_STAR in 32-bit mode
This is necessary for linux guests.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:46 -08:00
James Morris 5aacf0ca41 [PATCH] KVM: add valid_vcpu() helper
Consolidate the logic for checking whether a vcpu index is valid.  Also, use
likely(), as a valid value should be the overwhelmingly common case.

Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:45 -08:00
Linus Torvalds 4604096768 Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] block: document io scheduler allow_merge_fn hook
  [PATCH] cfq-iosched: don't allow sync merges across queues
  [PATCH] Fixup blk_rq_unmap_user() API
  [PATCH] __blk_rq_unmap_user() fails to return error
  [PATCH] __blk_rq_map_user() doesn't need to grab the queue_lock
  [PATCH] Remove queue merging hooks
  [PATCH] ->nr_sectors and ->hard_nr_sectors are not used for BLOCK_PC requests
  [PATCH] cciss: fix XFER_READ/XFER_WRITE in do_cciss_request
  [PATCH] cciss: set default raid level when reading geometry fails
2006-12-21 00:03:38 -08:00
Linus Torvalds 8df8bb4adf Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] sata_svw, sata_vsc: kill iomem warnings
  [PATCH] libata: take scmd->cmd_len into account when translating SCSI commands
  [PATCH] libata: kill @cdb argument from xlat methods
  [PATCH] libata: clean up variable name usage in xlat related functions
  [libata] Move some PCI IDs from sata_nv to ahci
  [libata] pata_via: suspend/resume support fix
  [libata] pata_cs5530: suspend/resume support tweak
2006-12-21 00:02:35 -08:00
Linus Torvalds 28cb5ccd30 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  Driver core: proper prototype for drivers/base/init.c:driver_init()
  kobject: kobject_uevent() returns manageable value
  kref refcnt and false positives
2006-12-21 00:02:03 -08:00
Linus Torvalds de9b2fccb6 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (22 commits)
  acpiphp: Link-time error for PCI Hotplug
  shpchp: cleanup shpchp.h
  shpchp: remove shpchprm_get_physical_slot_number
  shpchp: cleanup struct controller
  shpchp: remove unnecessary struct php_ctlr
  PCI: ATI sb600 sata quirk
  PCI legacy resource fix
  PCI: don't export device IDs to userspace
  PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
  PCI: Fix multiple problems with VIA hardware
  PCI: Only check the HT capability bits in mpic.c
  PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c
  PCI: Add #defines for Hypertransport MSI fields
  PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c
  PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities
  PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()
  pci: Introduce pci_find_present
  PCI: pcieport-driver: remove invalid warning message
  rpaphp: compiler warning cleanup
  PCI quirks: remove redundant check
  ...
2006-12-21 00:01:47 -08:00
Linus Torvalds fb34d203d0 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (34 commits)
  USB Storage: remove duplicate Nokia entry in unusual_devs.h
  [PATCH] bluetooth: add support for another Kensington dongle
  [PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
  [PATCH] USB: Nokia E70 is an unusual device
  USB: fix to usbfs_snoop logging of user defined control urbs
  USB: at91_udc: Additional checks
  USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver()
  USB: at91_udc: allow drivers that support high speed
  USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
  USB: at91_udc, misc fixes
  USB: at91 udc, support at91sam926x addresses
  USB: OHCI support for PNX8550
  USB: ohci handles hardware faults during root port resets
  USB: ohci at91 warning fix
  USB: ohci whitespace/comment fixups
  USB: MAINTAINERS update, EHCI and OHCI
  USB: gadget driver unbind() is optional; section fixes; misc
  UHCI: module parameter to ignore overcurrent changes
  USB: Nokia E70 is an unusual device
  USB AUERSWALD: replace kmalloc+memset with kzalloc
  ...
2006-12-21 00:01:06 -08:00
Linus Torvalds 5576d187a0 Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix register save area alignment for swapcontext syscall
  [POWERPC] Fix PCI device channel state initialization
  [POWERPC] Update MTD OF documentation
  [POWERPC] Probe Efika platform before CHRP.
  [POWERPC] Fix build of cell zImage.initrd
  [POWERPC] iSeries: fix CONFIG_VIOPATH dependency
  [POWERPC] iSeries: fix viocons init
  [POWERPC] iSeries: fix viocd init
  [POWERPC] iSeries: fix iseries_veth init
  [POWERPC] iSeries: fix viotape init
  [POWERPC] iSeries: fix viodasd init
  [POWERPC] Workaround oldworld OF bug with IRQs & P2P bridges
  [POWERPC] powerpc: add scanning of ebc bus to of_platform
  [POWERPC] spufs: fix assignment of node numbers
  [POWERPC] cell: Fix spufs with "new style" device-tree
  [POWERPC] cell: Enable spider workarounds on all PCI buses
  [POWERPC] cell: add forward struct declarations to spu.h
  [POWERPC] cell: update cell_defconfig
2006-12-20 23:59:36 -08:00
Linus Torvalds ee2fae03d6 Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: Stop defining pci_pretty_name
  drm: r128: comment aligment with drm git
  drm: make kernel context switch same as for drm git tree.
  drm: fixup comment header style
  drm: savage: compat fix from drm git.
  drm: Unify radeon offset checking.
  i915_vblank_tasklet: Try harder to avoid tearing.
  DRM: handle pci_enable_device failure
  drm: fix return value check
2006-12-20 23:59:07 -08:00
Linus Torvalds eb2112fbcf Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (29 commits)
  [ARM] 4062/1: S3C24XX: Anubis and Osiris shuld have CONFIG_PM_SIMTEC
  [ARM] 4060/1: update several ARM defconfigs
  [ARM] 4061/1: xsc3: change of maintainer
  [ARM] 4059/1: VR1000: fix LED3's platform device number
  [ARM] 4022/1: iop13xx: generic irq fixups
  [ARM] 4015/1: s3c2410 cpu ifdefs
  [ARM] 4057/1: ixp23xx: unconditionally enable hardware coherency
  [ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup
  [ARM] 4055/1: iop13xx: fix phys_io/io_pg_offst for iq81340mc/sc
  [ARM] 4054/1: ep93xx: add HWCAP_CRUNCH
  [ARM] 4052/1: S3C24XX: Fix PM in arch/arm/mach-s3c2410/Kconfig
  [ARM] Fix warnings from asm/system.h
  [ARM] 4051/1: S3C24XX: clean includes in S3C2440 and S3C2442 support
  [ARM] 4050/1: S3C24XX: remove old changelogs in arch/arm/mach-s3c2410
  [ARM] 4049/1: S3C24XX: fix sparse warning due to upf_t in regs-serial.h
  [ARM] 4048/1: S3C24XX: make s3c2410_pm_resume() static
  [ARM] 4046/1: S3C24XX: fix sparse errors arch/arm/mach-s3c2410
  [ARM] 4045/1: S3C24XX: remove old VA for non-shared areas
  [ARM] 4044/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2442-clock.c
  [ARM] 4043/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2440-clock.c
  ...
2006-12-20 23:54:23 -08:00
Burman Yan 36bcbec7ce ACPI: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 16:54:54 -05:00
Greg Kroah-Hartman c305290503 USB Storage: remove duplicate Nokia entry in unusual_devs.h
How many times are we going to merge this entry...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:46:03 -08:00
Jeff Garzik 850a9d8a8b [libata] sata_svw, sata_vsc: kill iomem warnings
Now that iomap merge is close to reality, and since the warnings and
issue have been around so long, we don't need a reminder on every build
that libata needs to be converted over to iomap.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:37:04 -05:00
Olivier Galibert 71c83515f2 [PATCH] bluetooth: add support for another Kensington dongle
Add the stupid sco fixup quirk to yet another Broadcom/Kensington device.

Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:29 -08:00
Eric Smith 11e82730cc [PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
Add USB vendor/device IDs for Novatel Wireless S720 and U720 CDMA/EV-DO
modems to airprime.c.

Signed-off-by: Eric Smith <eric@brouhaha.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:18 -08:00
Andrew Morton a5176b7897 [PATCH] USB: Nokia E70 is an unusual device
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508

When the Nokia E70 Phone is plugged in to the USB port, I get:

end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000

The fix is to add these lines to drivers/usb/storage/unusual_devs.h:

Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:04 -08:00
Tejun Heo 2e5704f63e [PATCH] libata: take scmd->cmd_len into account when translating SCSI commands
libata depended on SCSI command to have the correct length when
tranlating it into an ATA command.  This generally worked for commands
issued by SCSI HLD but user could issue arbitrary broken command using
sg interface.

Also, when building ATAPI command, full command size was always
copied.  Because some ATAPI devices needs bytes after CDB cleared, if
upper layer doesn't clear bytes after CDB, such devices will
malfunction.  This necessiated recent clear-garbage-after-CDB fix in
sg interfaces.  However, scsi_execute() isn't fixed yet and HL-DT-ST
DVD-RAM GSA-H30N malfunctions on initialization commands issued from
SCSI.

This patch makes xlat functions always consider SCSI cmd_len.  Each
translation function checks for proper cmd_len and ATAPI translaation
clears bytes after CDB.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:26:26 -05:00
Tejun Heo ad706991f4 [PATCH] libata: kill @cdb argument from xlat methods
xlat function will be updated to consider qc->scsicmd->cmd_len and
many xlat functions deference qc->scsicmd already.  It doesn't make
sense to pass qc->scsicmd->cmnd as @cdb separately.  Kill the
argument.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:26:26 -05:00
Tejun Heo 542b1444c5 [PATCH] libata: clean up variable name usage in xlat related functions
Variable names in xlat functions are quite confusing now.  'scsicmd'
is used for CDB while qc->scsicmd points to struct scsi_cmnd while
'cmd' is used for struct scsi_cmnd.

This patch cleans up variable names in xlat functions such that 'scmd'
is used for struct scsi_cmnd and 'cdb' for CDB.  Also, 'scmd' local
variable is added if qc->scsicmd is used multiple times.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:26:26 -05:00
Peer Chen 6fbf5ba461 [libata] Move some PCI IDs from sata_nv to ahci
The content of memory map io of BAR5 have been change from MCP65 then
sata_nv can't work fine on the platform based on MCP65 and MCP67, so move
their IDs from sata_nv.c to ahci.c.

Signed-off-by: Peer Chen <pchen@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 14:18:00 -05:00
Adrian Bunk 1f21782e63 Driver core: proper prototype for drivers/base/init.c:driver_init()
Add a prototype for driver_init() in include/linux/device.h.

Also remove a static function of the same name in drivers/acpi/ibm_acpi.c to
ibm_acpi_driver_init() to fix the namespace collision.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:56:45 -08:00
Kristen Carlson Accardi 031f30d2bc acpiphp: Link-time error for PCI Hotplug
I'm seeing:
 `acpiphp_glue_exit' referenced in section `.init.text' of
drivers/built-in.o: defined in discarded section `.exit.text' of
drivers/built-in.o

when trying to compile an IA64 kernel with PCI hotplug enabled.

I suggest this patch:

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 8352e04eb4 shpchp: cleanup shpchp.h
This patch cleans up shpchp.h.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 6f39be2e05 shpchp: remove shpchprm_get_physical_slot_number
This patch removes unnecessary shpchprm_get_physical_slot_number()
function.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 227b84c77f shpchp: cleanup struct controller
This patch removes unused/unnecessary members from struct controller.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Kenji Kaneshige 0abe68ce24 shpchp: remove unnecessary struct php_ctlr
The struct php_ctlr seems to be only for complicating codes. This
patch removes struct php_ctlr and related codes.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Conke Hu ab17443a3d PCI: ATI sb600 sata quirk
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:44 -08:00
Ralf Baechle fb0f2b40fa PCI legacy resource fix
Since commit 368c73d4f6 the kernel will try
to update the non-writeable BAR registers 0..3 of PIIX4 IDE adapters if
pci_assign_unassigned_resources() is used to do full resource assignment of
the bus.  This fails because in the PIIX4 these BAR registers have
implicitly assumed values and read back as zero; it used to work because
the kernel used to just write zero to that register the read back value did
match what was written.

The fix is a new resource flag IORESOURCE_PCI_FIXED used to mark a resource
as non-movable.  This will also be useful to keep other import system
resources from being moved around - for example system consoles on PCI
busses.

[akpm@osdl.org: cleanup]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Jesper Juhl 9ac0ce8596 PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.
pci_get_slot() may return NULL if nothing was found.  quirk_nvidia_ck804()
does not check the value returned from pci_get_slot(), so it may end up
causing a NULL pointer deref.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Alan Cox 1597cacbe3 PCI: Fix multiple problems with VIA hardware
This patch is designed to fix:
- Disk eating corruptor on KT7 after resume from RAM
- VIA IRQ handling
- VIA fixups for bus lockups after resume from RAM

The core of this is to add a table of resume fixups run at resume time.
We need to do this for a variety of boards and features, but particularly
we need to do this to get various critical VIA fixups done on resume.

The second part of the problem is to handle VIA IRQ number rules which
are a bit odd and need special handling for PIC interrupts. Various
patches broke various boxes and while this one may not be perfect
(hopefully it is) it ensures the workaround is applied to the right
devices only.

From: Jean Delvare <khali@linux-fr.org>

Now that PCI quirks are replayed on software resume, we can safely
re-enable the Asus SMBus unhiding quirk even when software suspend support
is enabled.

[akpm@osdl.org: fix const warning]
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Michael Ellerman 7a380507c4 PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c
Use pci_find_ht_capability() in drivers/pci/quirks.c.

I'm pretty sure the logic is unchanged here, but someone please eye-ball it
for me. I've changed the message to be a little shorter, it's now:

PCI: Found (enabled|disabled) HT MSI mapping on xxxx:xx:xx.x

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:43 -08:00
Michael Ellerman 120a50df45 PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c
Use pci_find_ht_capability() in drivers/pci/htirq.c

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Michael Ellerman 687d5fe3dc PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities
There are already several places in the kernel that want to search a PCI
device for a given Hypertransport capability. Although this is possible
using pci_find_capability() etc., it makes sense to encapsulate that
logic in a helper - pci_find_ht_capability().

To cater for searching exhaustively for a capability, we also provide
pci_find_next_ht_capability().

We also need to cater for the fact that the HT capability fields may be
either 3 or 5 bits wide. pci_find_ht_capability() deals with this for you,
but callers using the #defines directly must handle that themselves.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Michael Ellerman d3bac118fb PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()
The current implementation of __pci_bus_find_cap() does two things,
first it determines the start of the capability chain for the device,
and then it trys to find the requested capability.

Split these out, so that we can use the two parts independantly in
a subsequent patch. Externally visible behaviour should be unchanged.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Alan Cox d86f90f991 pci: Introduce pci_find_present
This works like pci_dev_present but instead of returning boolean returns
the matching pci_device_id entry.  This makes it much more useful.  Code
bloat is basically nil as the old boolean function is rewritten in terms of
the new one.

This will be used by the updated VIA PCI quirks for one

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Kenji Kaneshige 83e42bcdd3 PCI: pcieport-driver: remove invalid warning message
The following warning message should not be displayed for devices
which don't use an interrupt pin.

    pcie_portdrv_probe->Dev[XXXX:XXXX] has invalid IRQ. Check vendor BIOS

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Linas Vepstas f1e79092d9 rpaphp: compiler warning cleanup
This janitorial patch removes the following annoying
compile-time message:

drivers/pci/hotplug/rpaphp_slot.c:57: warning: ignoring return
value of sfs_create_file declared with attribute warn_unused_result

It also fixes a typo, removes some misc crud.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Rose <johnrose@us.ibm.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
David Rientjes 0c875c2864 PCI quirks: remove redundant check
Removes redundant check for dev->subordinate; if it is NULL, the function
returns before the patch-affected code region.

Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Acked-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:42 -08:00
Russell King 7461b60afa PCI: use /sys/bus/pci/drivers/<driver>/new_id first
Unfortunately, the .../new_id feature does not work with the 8250_pci
driver.

The reason for this comes down to the way .../new_id is implemented.
When PCI tries to match a driver to a device, it checks the modules
static device ID tables _before_ checking the dynamic new_id tables.

When a driver is capable of matching by ID, and falls back to matching
by class (as 8250_pci does), this makes it absolutely impossible to
specify a board by ID, and as such the correct driver_data value to
use with it.

Let's say you have a serial board with vendor 0x1234 and device 0x5678.
It's class is set to PCI_CLASS_COMMUNICATION_SERIAL.

On boot, this card is matched to the 8250_pci driver, which tries to
probe it because it matched using the class entry.  The driver finds
that it is unable to automatically detect the correct settings to use,
so it returns -ENODEV.

You know that the information the driver needs is to match this card
using a device_data value of '7'.  So you echo 1234 5678 0 0 0 0 7
into new_id.

The kernel attempts to re-bind 8250_pci to this device.  However,
because it scans the PCI driver tables, it _again_ matches the class
entry which has the wrong device_data.  It fails.

End of story.  You can't support the card without rebuilding the
kernel (or writing a specific PCI probe module to support it.)

So, can we make new_id override the driver-internal PCI ID tables?
IOW, like this:


From: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:41 -08:00
Chris Frey df251b8bfc USB: fix to usbfs_snoop logging of user defined control urbs
When sending CONTROL URB's using the usual CONTROL ioctl, logging works
fine, but when sending them via SUBMITURB, like VMWare does, the
control fields are not logged.  This patch fixes that.

I didn't see any major changes to devio.c recently, so this patch should apply
cleanly to even the latest kernel.  I can resubmit if it doesn't.

From: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:28 -08:00
Wojtek Kaniewski bfb7fb79e9 USB: at91_udc: Additional checks
This patch performs additional checks in at91_udc, just in case of
some spurious interrupts or device enumeration.

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Wojtek Kaniewski 943c441948 USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver()
This patch zeroes some variables when usb_gadget_register_driver()
fails. gadgetfs does a dummy registration to get the name of the USB
driver and then waits for user-land driver. If someone plugs the cable
in the meantime, bad things happen, because at91_udc has been left in
inconsistent state.

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Wojtek Kaniewski bc92c32aa2 USB: at91_udc: allow drivers that support high speed
This patch allows gadget drivers that support high speed (e.g. gadgetfs)
to work properly with at91_udc.

Fix suggested by Milan Svoboda in
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=115822184711817

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Tony Olech 4b87361d49 USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
ELAN's U132 is a USB to CardBus OHCI controller adapter,
    designed specifically for CardBus 3G data cards to
    function in machines without a CardBus slot.
The "ftdi-elan" module is a USB client driver, that detects
    a supported CardBus OHCI controller plugged into the
    U132 adapter and thereafter provides the conduit for
    for access by the "u132-hcd" module.
The "u132-hcd" module is a (cut-down OHCI) host controller
    that supports a single OHCI function of the CardBus 
    card inserted into the U132 adapter.

The problem with the initial implementation is that when
the CardBus card inserted into the U132 adapter has multiple
functions (and a CardBus card can support up to 4 functions),
it was the first function that was arbitrarily choosen.

The first batch of 3G cards tested, like the Merlin Qualcomm
V620, have two functions each supporting a seperate USB OHCI
host controller, of which it was that first function that is
wired up to the 3G modem.

Then along comes the Vodafone Mobile Connect 3G/GPRS data card,
aka "Option GT 3G Quad" as printed on it's rear or "Option N.V.
GlobeTrotter Fusion Quad Lite" as read with "lspci -v". And it
has the meaningful functionality in the second CardBus function.

That presents a problem because it was the "ftdi-elan" module
alone that knows how to communicate to the embedded CardBus slot
and the "u132-hcd" module alone that knows how to access the
pcmcia configuration and CardBus accessible memory space. And
of course, the information about attached (internally hardwired)
devices is contained within USB configuration embedded somewhere
within the CardBus card.

If only the "u132-hcd" module probe() interface could return a
result code that propagated back to the instigating function
platform_device_register() then the "ftdi-elan" module could
try an alternative CardBus function.     However in spite of
the recent changes to the drivers/base/ routines that moved 
device_attach() from bus_add_device() to bus_attach_device()
both of those routines lose the "failed to attach" 0 result
code and thus the calling routine, namely device_add() is
incapable of propaging the "failed to attach" condition back
to platform_device_add() and consequently back to the caller
of platform_device_register()

Experiments show that patching bus_attach_device() to return
ENODEV fails with the kernel locking up very early during
boot. But, however, if the patch is restricted to calls from
platform_device_add() then it does seem to work.

Unfortunately, until the kernel's drivers/base is properly
modified to propagate -ENODEV back to the caller of
platform_device_register(), it is necessary to "fix" the
"ftdi-elan" module by importing knowledge from the 
"u132-hcd" module. This is the reason for the duplicated
functionality introduced in this patch.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor 29ba4b533b USB: at91_udc, misc fixes
This is an update to the AT91 USB Device (Gadget) driver.

Adds support for the Atmel AT91SAM9260 and AT91SAM9261 processors.  The
only difference is how they handle the pullup pin.
[Patch from Patrice Vilchez]

Need to clear any pending USB Device interrupts before registering the
interrupt handler.  The bootloader might have been using the USB Device
port.   [Patch from Peer Georgi]

VBUS detection is handled by a GPIO interrupt which only triggers on a
change. Is is therefore necessary to read the current VBUS state
explicitly at startup.  [Patch from Peer Georgi]


Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor ffd3326bf6 USB: at91 udc, support at91sam926x addresses
This is an update to the AT91 USB Device (Gadget) driver.

The base I/O address provided in the platform_device resources is now
ioremap()'ed instead of using a statically mapped memory area.  This
helps portability to the newer AT91sam926x processors.

The major change is that we now have to pass a 'struct at91_udc'
parameter to at91_udp_read() and at91_udp_write().

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Vitaly Wool 5151d04068 USB: OHCI support for PNX8550
OHCI HCD (Host Controller Driver) for USB. Bus Glue for PNX8550.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Takamasa Ohtake 23d10a9e37 USB: ohci handles hardware faults during root port resets
I have found a problem where the root_port_reset() goes into an infinite
loop and stalls the kernel.

This happens when a hardware fault inside the machine occurs during a small
timing window.  In case of USB device connection, if a USB device responds to
hcd_submit_urb(), and later the controller fails before root_port_reset(),
root_port_reset() will loop infinitely because ohci_readl() will always
return "-1".  Such a failure can include ejecting a CardBus OHCI controller.

The probability of this problem is low, but it will increase if PnP type
usage is frequent.  The attached patch can solve this problem and I believe
that it is better to fix this problem.

Signed-off-by: Takamasa Ohtake <ohtake-txa@necst.nec.co.jp>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor ee269d98a9 USB: ohci at91 warning fix
Remove a warning about an unused variable in the OHCI bus glue for at91.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
David Brownell dd9048af41 USB: ohci whitespace/comment fixups
This is an OHCI cleanup patch ... it removes a lot of erroneous whitespace
(space before tab, at end of line) as well as the obsolete inline changelog.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
David Brownell 6bea476cf6 USB: gadget driver unbind() is optional; section fixes; misc
Allow gadget drivers to omit the unbind() method.  When they're
statically linked, that's an appropriate memory saving tweak.

Similarly, provide consistent/simpler handling for a should-not-happen
error case:  removing a peripheral controller driver when a gadget
driver is still loaded.  Such code dates back to early versions of the
first implementation of the gadget API, and has never been triggered.

Includes relevant section annotation fixs for gmidi.c, file_storage.c,
and serial.c; we don't yet have an "init or exit" annotation.  Also
some whitespace fixes in gmidi.c (space at EOL, before tabs, etc).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Alan Stern 5f8364b7d6 UHCI: module parameter to ignore overcurrent changes
Certain boards seem to like to issue false overcurrent notifications,
for example on ports that don't have anything connected to them.  This
looks like a hardware error, at the level of noise to those ports'
overcurrent input signals (or non-debounced VBUS comparators).  This
surfaces to users as truly massive amounts of syslog spam from khubd
(which is appropriate for real hardware problems, except for the
volume from multiple ports).

Using this new "ignore_oc" flag helps such systems work more sanely,
by preventing such indications from getting to khubd (and spamming
syslog).  The downside is of course that true overcurrent errors will
be masked; they'll appear as spontaneous disconnects, without the
diagnostics that will let users troubleshoot issues like
short-circuited cables.  In addition, controllers with no devices
attached will be forced to poll for new devices rather than relying on
interrupts, since each overcurrent event would generate a new
interrupt.

This patch (as826) is essentially a copy of David Brownell's ignore_oc
patch for ehci-hcd, ported to uhci-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Andrew Morton fe1ec341df USB: Nokia E70 is an unusual device
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508

When the Nokia E70 Phone is plugged in to the USB port, I get:

end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000

The fix is to add these lines to drivers/usb/storage/unusual_devs.h:

Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Burman Yan 66eb2e93b9 USB AUERSWALD: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Ping Cheng 071e0a2aee USB: fix Wacom Intuos3 4x6 bugs
Fixes Intuos3 4x6 bugs

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Johann Wilhelm ab19589055 usb-gsm-driver: Added VendorId and ProductId for Huawei E220 USB Modem
Added VendorId and ProductId for Huawei E220 USB Modem

Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Johann Wilhelm 16c76865df usb-storage: Ignore the virtual cd-drive of the Huawei E220 USB Modem
This prevents the kernel from detecting the virtual cd-drive with the
Windows drivers.

Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Petko Manolov 5859271ebd USB: rtl8150 new device id
This one adds another vendor ID to rtl8150 driver.  Please apply.


Signed-off-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Jeff Garzik abc9404bb0 USB: fix ohci.h over-use warnings
When u132-hcd is built, it includes local header ohci.h, which appears
to have been intended only for use by ohci-hcd.

This throws warnings about functions which are defined and not used.
The warnings thrown are because three small functions are implemented in
the header, but not declared 'inline', a rather strange affair.

Since these functions are small, let's go ahead and define them as
'inline', just like the inline functions surrounding them.  This makes
things more consistent, and kills the warnings.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
David Clare c2585d9625 USB: Prevent the funsoft serial device from entering raw mode
Added a device specific ioctl function to prevent the disabling of canonical
mode.  EINVAL is returned for any TCSETSF ioctl that doesn't have ICANON set.
This patch is for 2.6.17 or later kernels.

When "hwinfo --modem" is executed it opens the funsoft USB serial device and
disables canonical mode.  The device is kept this way until hwininfo has
finished probing any modems on a system.  The funsoft device expects to be
running in canonical mode.  Switching the device to raw mode can cause
incomplete data packets and device timeouts.

Signed-off-by: David Clare <david@funsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Johannes Hoelzl e05998d50d Add Baltech Reader ID to CP2101 driver
this patch adds the Baltech Reader ID to the list of USB IDs in the
CP2101 driver.

From: Johannes Hoelzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Oliver Neukum 8e42266965 USB: mutexification of usblp
this patch:
- converts usblp fully to mutex
- makes sleeping interruptible where EINTR can be returned anyway

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Alan b1cff285ae usb serial: Eliminate bogus ioctl code
Several drivers have bogus ioctl code that tries unneccessarily to
override the standard processing. In the three cases here the actual code
is not only wrong but also not required as they implement the proper
set_termios method as well.

Remove the junk.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Oliver Neukum 337445313f USB: removing ifdefed code from gl620a
as David has objected to the patch against the gl620a driver,
here's a patch implementing David' suggestion of removing the incomplete
ifdefed code from the gl620a driver.


Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2006-12-20 10:13:23 -08:00
Jan Capek ec434e9b43 USB: ftdi_sio - MachX product ID added
below is a patch for the ftdi_sio driver to include a new device ID for
CCS MachX PIC programmer.


From: Jan Capek <jan@ccsinfo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Eagle Jones 87f28bde94 USB: airprime: add device id for dell wireless 5500 hsdpa card
Added the device id (0x413c, 0x8115) for the Dell wireless HSDPA 5500,
which is a rebranded Novatel EU730.

Signed-off-by: Eagle Jones <eagle@newdream.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Oliver Neukum 96ca014d53 USB: fix transvibrator disconnect race
in disconnect you set the interface's private data to NULL. In your IO
methods you unconditionally follow the pointer into never never land.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Sean Young 6a7255e1df USB: Fix oops in PhidgetServo
The PhidgetServo causes an Oops when any of its sysfs attributes are read
or written too, making the driver useless.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:22 -08:00
Andrew Morton 73720861d2 [libata] pata_via: suspend/resume support fix
Make this array static so it doesn't have to be built at runtime.

Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 13:09:10 -05:00
Andrew Morton 0153260a1e [libata] pata_cs5530: suspend/resume support tweak
side-effectful-expression-within-assert give me the creeps.

Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-20 13:03:11 -05:00
Len Brown 5b7b411955 Pull sgi into test branch 2006-12-20 02:53:27 -05:00
Len Brown 9774f33841 merge linus into test branch 2006-12-20 02:53:13 -05:00
Len Brown 3be11c8f4f Pull bugfix into test branch 2006-12-20 02:52:50 -05:00
Len Brown 706b75ddbe Pull ec into test branch 2006-12-20 02:52:33 -05:00
Len Brown 40b20c257a Pull platform-drivers into test branch 2006-12-20 02:52:17 -05:00
John Keller 0f0fe1a08a ACPI: Add support for acpi_load_table/acpi_unload_table_id
Make acpi_load_table() available for use by removing it from the #ifdef
ACPI_FUTURE_USAGE.

Also add a new routine used to unload an ACPI table of a given type and "id" -
acpi_unload_table_id().  The implementation of this new routine was almost a
direct copy of existing routine acpi_unload_table() - only difference being
that it only removes a specific table id instead of ALL tables of a given
type.  The SN hotplug driver (sgi_hotplug.c) now uses both of these interfaces
to dynamically load and unload SSDT ACPI tables.

Also, a few other ACPI routines now used by the SN hotplug driver are exported
(since the driver can be a loadable module):

 acpi_ns_map_handle_to_node
 acpi_ns_convert_entry_to_handle
 acpi_ns_get_next_node

Signed-off-by: Aaron Young <ayoung@sgi.com>
Cc: Greg KH <greg@kroah.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 01:51:14 -05:00
James Simmons a8274d57af fbdev: update after backlight argument change
Update the frambuffer drivers to the backlight_device_registers changes.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Cc: Luming Yu <Luming.yu@intel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 01:43:42 -05:00
Yu Luming 519ab5f2be ACPI: video: Add dev argument for backlight_device_register
This patch set adds generic abstract layer support for acpi video driver to
have generic user interface to control backlight and output switch control by
leveraging the existing backlight sysfs class driver, and by adding a new
video output sysfs class driver.

This patch:

Add dev argument for backlight_device_register to link the class device to
real device object.  The platform specific driver should find a way to get the
real device object for their video device.

[akpm@osdl.org: build fix]
[akpm@osdl.org: fix msi-laptop.c]
Signed-off-by: Luming Yu <Luming.yu@intel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 01:42:19 -05:00
Thomas Tuttle f4715189df ACPI: Implement acpi_video_get_next_level()
acpi_video_get_next_level was supposed to implement an algorithm to select
a new brightness level based on the old brightness level of an ACPI video
device, but it simply says "/* Fix me */" and returns the current
brightness.

This patch implements acpi_video_get_next_level properly.  It had to change
a few constants at the top of the file because they were (apparently)
wrong, but it appears to work on my Dell Inspiron e1405 (with BIOS A05
only--BIOS A04 doesn't seem to send ACPI video hotkey events).

[akpm@osdl.org: cleanups]
Signed-off-by: Thomas Tuttle <linux-kernel@ttuttle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 01:38:38 -05:00
Andrew Morton 6796a1204c ACPI: Kconfig - depend on PM rather than selecting it
Make ACPI depend on PM rather than selecting it.
Otherwise it's a nightmare working out why CONFIG_PM keeps getting set.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 01:36:29 -05:00
Adrian Bunk a6fdbf90b9 ACPI: fix NULL check in drivers/acpi/osl.c
Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 01:27:57 -05:00
Adrian Bunk a854e08a5a ACPI: make drivers/acpi/ec.c:ec_ecdt static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 00:44:39 -05:00
Stephen Rothwell 94c8f9f974 [POWERPC] iSeries: fix viocons init
Only initialise viocons on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:48 +11:00
Stephen Rothwell 31c72ad0d1 [POWERPC] iSeries: fix viocd init
Only initialise viocd on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:48 +11:00
Stephen Rothwell 687d18abed [POWERPC] iSeries: fix iseries_veth init
Only initialise iseries_veth on legacy iSeries.
Make the init and exit routines static.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:48 +11:00
Stephen Rothwell fd38451f15 [POWERPC] iSeries: fix viotape init
Only initialise viotape on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:47 +11:00
Stephen Rothwell fb8b500784 [POWERPC] iSeries: fix viodasd init
Don't initialise viodasd except on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:47 +11:00
Akinobu Mita 83822fc9e6 ACPI: prevent processor module from loading on failures
Make loading processor.ko fail when an error happens.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 00:33:07 -05:00
Akinobu Mita f10bb2544b ACPI: fix single linked list manipulation
Fix single linked list manipulation for sub_driver.  If the remving entry
is not on the head of the sub_driver list, it goes into infinate loop.

Though that infinite loop doesn't happen.  Because the only user of
acpi_pci_register_dirver() is acpiphp.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 00:30:48 -05:00
Alexey Starikovskiy 4afaf54b3b ACPI: ibm_acpi: allow clean removal
Allow clean removal by setting notify_installed in the right place.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-19 23:07:39 -05:00
Ulrich Kunitz 4d1feabcbf [PATCH] zd1211rw: Call ieee80211_rx in tasklet
The driver called ieee80211_rx in hardware interrupt context.  This has
been against the intention of the ieee80211_rx function.  It caused a bug
in the crypto routines used by WPA.  This patch calls ieee80211_rx in a
tasklet.

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-19 16:09:59 -05:00
Linus Torvalds f238085415 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  [PATCH] Generic HID layer - update MAINTAINERS
  input/hid: Supporting more keys from the HUT Consumer Page
  [PATCH] Generic HID layer - build: USB_HID should select HID
2006-12-19 10:32:40 -08:00
Jens Axboe 8e5cfc45e7 [PATCH] Fixup blk_rq_unmap_user() API
The blk_rq_unmap_user() API is not very nice. It expects the caller to
know that rq->bio has to be reset to the original bio, and it will
silently do nothing if that is not done. Instead make it explicit that
we need to pass in the first bio, by expecting a bio argument.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-12-19 11:12:46 +01:00
Jens Axboe 1aa4f24fe9 [PATCH] Remove queue merging hooks
We have full flexibility of merging parameters now, so we can remove the
hooks that define back/front/request merge strategies. Nobody is using
them anymore.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-12-19 08:33:11 +01:00
Jens Axboe 2985259b0e [PATCH] ->nr_sectors and ->hard_nr_sectors are not used for BLOCK_PC requests
It's a file system thing, for block requests the only size used in the
io paths is ->data_len as it is in bytes, not sectors.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-12-19 08:27:31 +01:00
Jean Delvare f9841a8d60 drm: Stop defining pci_pretty_name
drm drivers no longer use pci_pretty_name so we can stop defining it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-19 18:04:33 +11:00
Dave Airlie 83a9e29b0f drm: r128: comment aligment with drm git
Align some r128 license comments

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-19 17:56:14 +11:00
Dave Airlie 0c4dd906a2 drm: make kernel context switch same as for drm git tree.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-19 17:49:44 +11:00
Dave Airlie 94bb598e6b drm: fixup comment header style
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-19 17:49:08 +11:00
Eric Anholt 183b4aeefa drm: savage: compat fix from drm git.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-19 17:20:02 +11:00
Gabriel Mansi d5cb8d38cd [AGPGART] K8M890 support for amd-k8.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-18 19:13:54 -05:00
Mike Miller a52de245ef [PATCH] cciss: fix XFER_READ/XFER_WRITE in do_cciss_request
This patch fixes a stupid bug. Sometime during the 2tb enhancement I ended up
replacing the macros XFER_READ and XFER_WRITE with h->cciss_read and
h->cciss_write respectively. It seemed to work somehow at least on x86_64 and
ia64. I don't know how. But people started complaining about command timeouts
on older controllers like the 64xx series and only on ia32. This resolves the
issue reproduced in our lab. Please consider this for inclusion.

Thanks,
mikem

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-12-18 11:00:14 +01:00
Mike Miller 89f97ad189 [PATCH] cciss: set default raid level when reading geometry fails
This patch sets a default raid level on a volume that either does not support
reading the geometry or reports an invalid geometry for whatever reason. We
were always setting some values for heads and sectors but never set a raid
level. This caused lots of problems on some buggy firmware. Please consider
this for inclusion.

Thanks,
mikem

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-12-18 10:59:39 +01:00
Evgeniy Polyakov a240d9f1d8 [CONNECTOR]: Replace delayed work with usual work queue.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-18 01:53:58 -08:00
Evgeniy Polyakov d8172d822f [CONNECTOR]: Fix compilation breakage introduced recently.
Linus has changed work queue structure and has not tested it with
connector compiled in, his changes break the build.

Attached patch fixes compilation error.

Patch is against commit 99f5e97181.

Thanks to Toralf Förster for pointing this out.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:24 -08:00
Michael Chan 749494bad9 [TG3]: Update version and reldate.
Update version to 3.71.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:23 -08:00
Michael Chan 60189ddff0 [TG3]: Power down/up 5906 PHY correctly.
The 5906 PHY requires a special register bit to power down and up the
PHY.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:22 -08:00
Michael Chan c49a1561ee [TG3]: Fix race condition when calling register_netdev().
Hot-plug scripts can call tg3_open() as soon as register_netdev() is
called in tg3_init_one().  We need to call pci_set_drvdata() before
register_netdev(), and netif_carrier_off() needs to be moved to
tg3_open() to avoid race conditions.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:20 -08:00
Michael Chan 24fcad6b3c [TG3]: Assign tp->link_config.orig_* values.
tp->link_config.orig_* values must be assigned during
tg3_set_settings() because these values will be used to setup the
link speed during tg3_open().  Without these assignments, the link
speed settings will be all messed by if tg3_set_settings() is called
when the device is down.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:19 -08:00
Michael Chan 6634292be4 [BNX2]: Fix minor loopback problem.
Use the configured MAC address instead of the permanent MAC address
for loopback frames.

Update version to 1.5.2.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:17 -08:00
Michael Chan 6a13add1e1 [BNX2]: Fix bug in bnx2_nvram_write().
Length was not calculated correctly if the NVRAM offset is on a non-
aligned offset.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:16 -08:00
Michael Chan faac9c4b75 [BNX2]: Fix panic in bnx2_tx_int().
There was an off-by-one bug in bnx2_tx_avail().  If the tx ring is
completely full, the producer and consumer indices may be apart by
256 even though the ring size is only 255.  One entry in the ring is
unused and must be properly accounted for when calculating the number
of available entries.  The bug caused the tx ring entries to be
reused by mistake, overwriting active entries, and ultimately causing
it to crash.

This bug rarely occurs because the tx ring is rarely completely full.
We always stop when there is less than MAX_SKB_FRAGS entries available
in the ring.

Thanks to Corey Kovacs <cjk@techma.com> and Andy Gospodarek
<agospoda@redhat.com> for reporting the problem and helping to collect
debug information.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:15 -08:00
Yan Burman bd2b334378 [TG3]: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 21:59:06 -08:00
Linus Torvalds e25db641c0 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] longhaul compile fix.
  [CPUFREQ] Advise not to use longhaul on VIA C7.
  [CPUFREQ] set policy->curfreq on initialization
  [CPUFREQ] Trivial cleanup for acpi read/write port in acpi-cpufreq.c
  [CPUFREQ] fixes typo in cpufreq.c
2006-12-17 19:08:11 -08:00
Pavel Machek 2343217fb7 [ARM] 4035/1: fix collie compilation
Thanks to Al Viro, here's fix to 2.6.20-rc1-git, so that collie
compiles, again. It was broken by INIT_WORK changes.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-12-17 23:37:47 +00:00
Richard Purdie 46a34d6890 [ARM] 4034/1: pxafb: Fix compile errors
Fix pxafb compile failures when CONFIG_FB_PXA_PARAMETERS is enabled
after recent structure changes.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-12-17 23:37:45 +00:00
Fabrice Knevez 9bc83dcff8 [SUNKBD]: Fix sunkbd_enable(sunkbd, 0); obvious.
"sunkbd_enable(sunkbd, 0);" has no effect. Adding "sunkbd->enabled =
enable" in sunkbd_enable (obvious)

Signed-off-by: Fabrice Knevez <nuxdoors@cegetel.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-17 14:06:58 -08:00
Al Viro 2bb71b5a44 [PATCH] m68k trivial build fixes
amikbd: missing declaration
sun3_NCR5380: more work_struct mess
sun3_NCR5380: cast is not an lvalue

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-17 10:21:53 -08:00
Linus Torvalds c7ef259bfb Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mthca: Use DEFINE_MUTEX() instead of mutex_init()
  IB/mthca: Add HCA profile module parameters
  IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
  IB: Fix ib_dma_alloc_coherent() wrapper
2006-12-16 13:23:45 -08:00
Alan 5c9a76118d [PATCH] pata_via: Cable detect error
The UDMA66 VIA hardware has no controller side cable detect bits we can
use. This patch minimally fixes the problem by reporting unknown in this
case and using drive side detection.

The old drivers/ide code does some additional tricks but those aren't
appropriate now we are in -rc.

Without this update UDMA66 via controllers run slowly. They don't fail so
it's a borderline call whether this is -rc material or not.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:46:21 -05:00
Alan 2bfc3611bd [PATCH] Fix help text for CONFIG_ATA_PIIX
> Thanks for clarifying Bill, and sorry Alan. ata_piix does indeed work
> correctly. The help text is a bit confusing:
>
> config ATA_PIIX
>         tristate "Intel PIIX/ICH SATA support"
>         depends on PCI
>         help
>           This option enables support for ICH5/6/7/8 Serial ATA.
>           If PATA support was enabled previously, this enables
>           support for select Intel PIIX/ICH PATA host controllers.

New help text

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:46:21 -05:00
Ira Snyder 0457882fed [PATCH] initializer entry defined twice in pata_rz1000
This removes the extra definition of the .error_handler member
in the pata_rz1000 driver.

Signed-off-by: Ira W. Snyder <kernel@irasnyder.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:45:28 -05:00
Akinobu Mita 9825d73ceb [PATCH] ata: fix platform_device_register_simple() error check
The return value of platform_device_register_simple() should be checked
by IS_ERR().

Cc: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:45:28 -05:00
Tejun Heo 551c012d7e [PATCH] ahci: do not mangle saved HOST_CAP while resetting controller
Do not mangle with HOST_CAP while resetting controller.  The code is
there for a historical reason.  The mangling breaks controller feature
detection and 0 PORTS_IMPL workaround code.

This problem was spotted by Manoj Kasichainula.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Manoj Kasichainula <manoj@io.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:13:29 -05:00
Tejun Heo 33480a0ede [PATCH] libata: don't initialize sg in ata_exec_internal() if DMA_NONE (take #2)
Calling sg_init_one() with NULL buf causes oops on certain
configurations.  Don't initialize sg in ata_exec_internal() if
DMA_NONE and make the function complain if @buf is NULL when dma_dir
isn't DMA_NONE.  While at it, fix comment.

The problem is discovered and initial patch was submitted by Arnd
Bergmann.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:13:22 -05:00
Jeff Garzik c10340aca2 [libata] sata_svw: Disable ATAPI DMA on current boards (errata workaround)
Current Broadcom/Serverworks SATA boards (including Apple K2 SATA)
have problems with ATAPI DMA, so it is disabled.  ATAPI PIO, ATA PIO,
and ATA DMA continue to work just fine.

Acked-by: Anantha Subramanyam <ananth@broadcom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:12:50 -05:00
Jeff Garzik da02d2a16e [libata] use kmap_atomic(KM_IRQ0) in SCSI simulator
We are inside spin_lock_irqsave().  quoth akpm's debug facility:

 [  231.948000] SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB)
 [  232.232000] ata1.00: configured for UDMA/33
 [  232.404000] WARNING (1) at arch/i386/mm/highmem.c:47 kmap_atomic()
 [  232.404000]  [<c01162e6>] kmap_atomic+0xa9/0x1ab
 [  232.404000]  [<c0242c81>] ata_scsi_rbuf_get+0x1c/0x30
 [  232.404000]  [<c0242caf>] ata_scsi_rbuf_fill+0x1a/0x87
 [  232.404000]  [<c0243ab2>] ata_scsiop_mode_sense+0x0/0x309
 [  232.404000]  [<c01729d5>] end_bio_bh_io_sync+0x0/0x37
 [  232.404000]  [<c02311c6>] scsi_done+0x0/0x16
 [  232.404000]  [<c02311c6>] scsi_done+0x0/0x16
 [  232.404000]  [<c0242dcc>] ata_scsi_simulate+0xb0/0x13f
[...]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:12:36 -05:00
Tejun Heo fae07dc389 [PATCH] ata_piix: use piix_host_stop() in ich_pata_ops
piix_init_one() allocates host private data which should be freed by
piix_host_stop().  ich_pata_ops wasn't converted to piix_host_stop()
while merging, leaking 4 bytes on driver detach.  Fix it.

This was spotted using Kmemleak by Catalin Marinas.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Catalin Marinas <catalin.marinas@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:12:29 -05:00
Jason Gaston f98b6573f1 [PATCH] ata_piix: IDE mode SATA patch for Intel ICH9
This updated patch adds the Intel ICH9 IDE mode SATA controller DID's.

Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Acked-by: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-16 10:12:15 -05:00
Len Brown cece901481 Pull style into test branch
Conflicts:

	drivers/acpi/button.c
	drivers/acpi/ec.c
	drivers/acpi/osl.c
	drivers/acpi/sbs.c
2006-12-16 01:04:27 -05:00
Len Brown cfee47f99b Pull bugfix into test branch
Conflicts:

	kernel/power/disk.c
2006-12-16 01:01:18 -05:00
Len Brown 463e7c7cf9 Pull trivial into test branch
Conflicts:

	drivers/acpi/ec.c
2006-12-16 00:45:07 -05:00
Len Brown 25c68a33b7 ACPI: ibm_acpi: respond to workqueue update
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-16 00:39:50 -05:00
Len Brown 6bfe5c9d6f Pull platform-drivers into test branch 2006-12-16 00:34:18 -05:00
Len Brown b361735043 Pull button into test branch 2006-12-16 00:34:00 -05:00
Len Brown fb7665544d Pull dock into test branch 2006-12-16 00:33:45 -05:00
Len Brown 678f2b7df2 Pull ec into test branch 2006-12-16 00:32:42 -05:00
Roland Dreier 0b0df6f207 IB/mthca: Use DEFINE_MUTEX() instead of mutex_init()
mthca_device_mutex() can be initialized automatically with
DEFINE_MUTEX() rather than explicitly calling mutex_init().  This
saves a bit of text and shrinks the source by a line, so we may as
well do it....

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-12-15 20:55:28 -08:00
Leonid Arsh 82da703ee6 IB/mthca: Add HCA profile module parameters
Add module parameters that enable settting some of the HCA
profile values, such as the number of QPs, CQs, etc.

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Moni Shoua <monis@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-12-15 20:46:31 -08:00
Roland Dreier bf628dc22a IB/srp: Fix FMR mapping for 32-bit kernels and addresses above 4G
struct srp_device.fmr_page_mask was unsigned long, which means that
the top part of addresses above 4G was being chopped off on 32-bit
architectures.  Of course nothing good happens when data from SRP
targets is DMAed to the wrong place.

Fix this by changing fmr_page_mask to u64, to match the addresses
actually used by IB devices.

Thanks to Brian Cain <Brian.Cain@ge.com> and David McMillen
<davem@systemfabricworks.com> for help diagnosing the bug and testing
the fix.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-12-15 14:01:49 -08:00
Stefan Bader e42734e270 [S390] cio: css_register_subchannel race.
Asynchronous probe can release memory of a subchannel before
css_get_ssd_info is called. To fix this call css_get_ssd_info
before registering with driver core.

Signed-off-by: Stefan Bader <shbader@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15 17:18:30 +01:00
Michael Holzheu a45e14148f [S390] Fix reboot hang on LPARs
Reboot hangs on LPARs without diag308 support. The reason for this is,
that before the reboot is done, the channel subsystem is shut down.
During the reset on each possible subchannel a "store subchannel" is
done. This operation can end in a program check interruption, if the
specified subchannel set is not implemented by the hardware. During
the reset, currently we do not have a program check handler, which
leads to the described kernel bug. We install now a new program check
handler for the reboot code to fix this problem.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15 17:18:22 +01:00
Christian Borntraeger b3c14d0bfd [S390] sclp_cpi module license.
sclp_cpi is GPL. Make the module not taint the kernel

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15 17:18:20 +01:00
Ralph Wuerthner 13e742babd [S390] zcrypt: module unload fixes.
Add code to reset all queues for a domain and add missing tasklet_kill
call to ap bus module exit code.

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15 17:18:17 +01:00
Ursula Braun 028cf917b2 [S390] Hipersocket multicast queue: make sure outbound handler is called
A HiperSocket multicast queue works asynchronously. When sending
buffers, the buffer state change from PRIMED to EMPTY may happen
delayed. Reschedule the checking for changes in the outbound queue,
if there are still PRIMED buffers.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15 17:18:14 +01:00
=?utf-8?q?Michel_D=C3=A4nzer?= 1d6bb8e51d drm: Unify radeon offset checking.
Replace r300_check_offset() with generic radeon_check_offset(), which doesn't
reject valid offsets when the framebuffer area is at the very end of the card's
32 bit address space. Make radeon_check_and_fixup_offset() use
radeon_check_offset() as well.

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=7697 .
2006-12-15 18:54:35 +11:00
Kristen Carlson Accardi 8ea86e0ba7 ACPI: dock: add uevent to indicate change in device status
Send a uevent to indicate a device change whenever we dock or
undock, so that userspace may now check the dock status via sysfs.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Holger Macht <hmacht@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-14 17:16:06 -05:00
Florian Festi 1c1e40b5ad input/hid: Supporting more keys from the HUT Consumer Page
On USB keyboards lots of hot/internet keys are not working. This patch
adds support for a number of keys from the USB HID Usage Table
(http://www.usb.org/developers/devclass_docs/Hut1_12.pdf).

It also adds several new key codes. Most of them are used on real world
keyboards I know. I added some others (KEY_+ EDITOR, GRAPHICSEDITOR, DATABASE,
NEWS, VOICEMAIL, VIDEOPHONE) to avoid "holes".

I also added KEY_ZOOMRESET as it is possible to have a inet keyboard and a
remote control  in parallel and it makes sense to have them behave differently.

Signed-off-by: Florian Festi <ffesti@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2006-12-14 13:37:24 +01:00
Jiri Kosina e3a0dd7ced [PATCH] Generic HID layer - build: USB_HID should select HID
Let CONFIG_USB_HID imply CONFIG_HID. Making it only dependent might confuse
users to choose CONFIG_HID, but no particular HID transport drivers.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2006-12-14 13:37:23 +01:00
Scott Wood 6eefd34fdc Driver core: Make platform_device_add_data accept a const pointer
platform_device_add_data() makes a copy of the data that is given to it,
and thus the parameter can be const.  This removes a warning when data
from get_property() on powerpc is handed to platform_device_add_data(),
as get_property() returns a const pointer.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13 15:38:46 -08:00
Andrew Morton c63e07834b Driver core: "platform_driver_probe() can save codespace": save codespace
This function can be __init

Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13 15:38:45 -08:00
Akinobu Mita 44c53c4ff0 driver core: delete virtual directory on class_unregister()
Class virtual directory is created as the need arises.
But it is not deleted when the class is unregistered.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-13 15:38:45 -08:00
Russell King 1fb8cacc19 [PATCH] Add support for Korenix 16C950-based PCI cards
This adds initial support to 8250-pci for the Korenix Jetcard PCI serial
cards.  The JC12xx cards are standard RS232-based serial cards utilising
the Oxford 16C950 device.

The JC14xx are RS422/RS485-based cards, but in order for these to be
supported natively, we will need additional tweaks to the 8250 layers so
we can specify some values for the 950's registers.  Hence, these two
entries are commented out.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:18:11 -08:00
Linus Torvalds 5faad62026 Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] Fixup cciss error handling
  [PATCH] Allow as-iosched to be unloaded
  [PATCH 2/2] cciss: remove calls to pci_disable_device
  [PATCH 1/2] cciss: map out more memory for config table
  [PATCH] Propagate down request sync flag

Resolve trivial whitespace conflict in drivers/block/cciss.c manually.
2006-12-13 09:15:34 -08:00