Commit graph

25190 commits

Author SHA1 Message Date
Matthias Kaehlcke 7e7a2d07b0 [ATM]: Use mutex instead of binary semaphore in idt77252 driver.
Use mutex instead of binary semaphore in idt77252 driver.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-24 16:36:45 -07:00
Linus Torvalds 9539ce2253 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  forcedeth: fix cpu irq mask
  chelsio parenthesis fix
  spidernet: skb used after netif_receive_skb
  meth driver renovation
  remove unnecessary dependency on VIA velocity config
  fix compiler warning in fixed.c
  asix.c - Add Belkin F5D5055 ids
  ucc_geth:trivial fix
  ucc_geth: Fix MODULE_DEVICE_TABLE() duplication
  [PATCH] drivers/net/wireless/libertas/rx.c: fix use-after-free
  [PATCH] drivers/net/wireless/libertas/fw.c: fix use-before-check
  [PATCH] libertas: skb dereferenced after netif_rx
2007-05-24 15:54:17 -07:00
Ayaz Abdulla 096a458c3a forcedeth: fix cpu irq mask
This patch fixes the cpu irq mask define to include the timer irq.
Another flag check was setting up the timer bit in all cases so we
didn't notice the issue.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 18:03:23 -04:00
Mariusz Kozlowski 294cf1b880 chelsio parenthesis fix
Hello,

	Balanance parenthesis in chelsio header file.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/chelsio/suni1x10gexp_regs.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:37:00 -04:00
Florin Malita 93c1d3b790 spidernet: skb used after netif_receive_skb
The stats update code in spider_net_pass_skb_up() is touching the skb
after it's been passed up to the stack. To avoid that, just update the
stats first.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:25:43 -04:00
Ralf Baechle e971290133 meth driver renovation
The meth ethernet driver for the SGI IP32 aka O2 is so far still an old
style driver which does not use the device driver model.  This is now
causing issues with some udev based gadgetry in debian-stable.  Fixed by
converting the meth driver to a platform device.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

--
Fixes since previous patch:

  o Fixed typo in meth_exit_module()
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:20:49 -04:00
Yoichi Yuasa 73815538e6 remove unnecessary dependency on VIA velocity config
Hi,

This patch has removed unnecessary dependency on VIA velocity config.

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:20:49 -04:00
Denver Gingerich 239dc572b8 fix compiler warning in fixed.c
Correct the following compiler warning (and warnings resulting from
the correction):
warning: 'fixed_mdio_register_device' defined but not used

Signed-off-by: Denver Gingerich <denver@ossguy.com>
Cc: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:20:49 -04:00
David Hollis 2ed22bc294 asix.c - Add Belkin F5D5055 ids
(Originally sent to linux-usb-devel)

The attached patch adds the device IDs for the Belkin F5D5055 device.

Reported by Andy Juniper <ajuniper@freeuk.com>

Signed-off-by: David Hollis <dhollis@davehollis.com>

--
David Hollis <dhollis@davehollis.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:20:48 -04:00
Li Yang 66bd23fad8 ucc_geth:trivial fix
Remove redundant includes.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:20:48 -04:00
Li Yang 5bc8d39a47 ucc_geth: Fix MODULE_DEVICE_TABLE() duplication
Fix MODULE_DEVICE_TABLE() duplication in ucc_geth.c and ucc_geth_mii.c
for ucc_geth to be compiled as module.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-24 17:20:48 -04:00
Jeff Garzik c71cd01989 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2007-05-24 17:17:11 -04:00
Michael S. Tsirkin 2dfbfc3712 IPoIB/cm: Drain cq in ipoib_cm_dev_stop()
Since NAPI polling is disabled while ipoib_cm_dev_stop() is running,
ipoib_cm_dev_stop() must poll the CQ itself in order to see the
packets draining.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-24 14:02:40 -07:00
Michael S. Tsirkin 8fd357a6e3 IPoIB/cm: Fix timeout check in ipoib_cm_dev_stop()
time_after() was used backwards, so the timeout occurred immediately.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-24 14:02:39 -07:00
Stefan Roscher 65a2c841d6 IB/ehca: Fix number of send WRs reported for new QP
Due to a typo, the driver was reporting the wrong number of "actual send
WRs" after ehca_create_qp().

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-24 14:02:39 -07:00
Eli Cohen c0be5fb5f8 IB/mlx4: Initialize send queue entry ownership bits
We need to initialize the owner bit of send queue WQEs to hardware 
ownership whenever the QP is modified from reset to init, not just 
when the QP is first allocated.  This avoids having the hardware 
process stale WQEs when the QP is moved to reset but not destroyed and 
then modified to init again. 

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-24 14:02:38 -07:00
Linus Torvalds 900f1d2c87 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] geode: Fix in-place operations and set key
2007-05-24 08:44:44 -07:00
Linus Torvalds 5270f2901d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc: add maintainer for ARM Primecell controller
  mmc: add maintainer for iMX MMC interface
  mmc: Add maintainers for TI OMAP MMC interface
  mmc: mark unmaintained drivers
  mmc: clean up unused parts of block driver
2007-05-24 08:37:52 -07:00
Sumant Patro 05e9ebbefb [SCSI] megaraid_sas: intercept cmd timeout and throttle io
eh_timed_out call back (megasas_reset_timer) is used to throttle io
to the adapter when it is called the first time for a scmd.
The MEGASAS_FW_BUSY flag is set and can_queue reduced to 16.
The can_queue is restored from completion routine in following
two conditions : 5 seconds has elapsed and
the # of outstanding cmds in FW is < 17.

Signed-off-by: Sumant Patro <sumant.patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-24 09:08:27 -05:00
Marcel Holtmann fd184ab428 [Bluetooth] Always send HCI_Reset for Broadcom devices
In case of Broadcom based Bluetooth devices, it is safe to always
send HCI_Reset as first command. This gives the advantage that
all HID Proxy versions will automatically work and don't need any
additional quirks anymore.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2007-05-24 14:26:15 +02:00
Jordan Crouse 761e784673 [CRYPTO] geode: Fix in-place operations and set key
Allow in-place crypto operations.  Also remove the coherent user flag
(we use it automagically now), and by default use the user written
key rather then the HW hidden key - this makes crypto just work without
any special considerations, and thats OK, since its our only usage
model.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-05-24 21:23:24 +10:00
Pierre Ossman 9c9f2d63a7 mmc: clean up unused parts of block driver
Remove dead code and unused structs from the block driver.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-24 06:51:02 +02:00
Andrew Morton d3c8bdfb93 drivers/isdn/hardware/eicon/message.c warning fixes
Squash these:

drivers/isdn/hardware/eicon/message.c: In function 'api_put':
drivers/isdn/hardware/eicon/message.c:536: warning: cast from pointer to integer of different size
drivers/isdn/hardware/eicon/message.c: In function 'plci_free_msg_in_queue':
drivers/isdn/hardware/eicon/message.c:1035: warning: cast to pointer from integer of different size
drivers/isdn/hardware/eicon/message.c: In function 'data_b3_req':
drivers/isdn/hardware/eicon/message.c:3121: warning: cast to pointer from integer of different size
drivers/isdn/hardware/eicon/message.c:3154: warning: cast to pointer from integer of different size
drivers/isdn/hardware/eicon/message.c: In function 'callback':
drivers/isdn/hardware/eicon/message.c:4060: warning: cast to pointer from integer of different size
drivers/isdn/hardware/eicon/message.c: In function 'nl_ind':
drivers/isdn/hardware/eicon/message.c:7137: warning: cast from pointer to integer of different size

Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:15 -07:00
Andrew Morton 241be8d9c4 capifunc warning fixes
squish these:

drivers/isdn/hardware/eicon/capifunc.c: In function 'TransmitBufferSet':
drivers/isdn/hardware/eicon/capifunc.c:192: warning: cast to pointer from integer of different size
drivers/isdn/hardware/eicon/capifunc.c: In function 'TransmitBufferGet':
drivers/isdn/hardware/eicon/capifunc.c:197: warning: cast from pointer to integer of different size
drivers/isdn/hardware/eicon/capifunc.c:198: warning: cast from pointer to integer of different size
drivers/isdn/hardware/eicon/capifunc.c:200: warning: cast from pointer to integer of different size
drivers/isdn/hardware/eicon/capifunc.c: In function 'TransmitBufferFree':
drivers/isdn/hardware/eicon/capifunc.c:205: warning: cast from pointer to integer of different size
drivers/isdn/hardware/eicon/capifunc.c:206: warning: cast from pointer to integer of different size
drivers/isdn/hardware/eicon/capifunc.c: In function 'sendf':
drivers/isdn/hardware/eicon/capifunc.c:304: warning: cast to pointer from integer of different size
drivers/isdn/hardware/eicon/capifunc.c:304: warning: cast to pointer from integer of different size
drivers/isdn/hardware/eicon/capifunc.c:321: warning: cast to pointer from integer of different size

Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:15 -07:00
Imre Deak e5f1b194a9 omap_uwire: SPI_CPHA mode bugfix
The omap_uwire controller driver handles SPI_CPHA incorrectly;
It should mean:

  CPHA=0 ... sample at leading edge of clock
  CPHA=1 ... sample at trailing edge of clock

This bug has been masked by inverse bugs in layered drivers;
and was uncovered by running some of them on non-OMAP hardware.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:15 -07:00
Li Yang 40acc09530 ehci-fsl: fix cache coherency problem on system with large memory
The patch fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=7482.

It sets USB snooping on 4G space for PowerPC platforms without
CONFIG_NOT_COHERENT_CACHE defined.

Reported-by: Stefan Meyer <reyems@telkomsa.net>
Signed-off-by: Li Yang <leoli@freescale.com>
Cc: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:15 -07:00
Eric Sesterhenn / Snakebyte 4acb3e2f97 Off by one in floppy.c
Another coverity patch i forgot to resend, original thread here
http://marc.info/?l=linux-kernel&m=115144559823592&w=2

In case drive == N_DRIVE, we get one past the drive_params array.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:15 -07:00
Nicolas Boichat fa74419bb7 applesmc - sensors patch missing from 2.6.22-rc2
Add name file needed by lm_sensors user-space applications in applesmc
sysfs tree.

Cc: Soeren Sonnenburg <kernel@nn7.de>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:15 -07:00
Alan Stern ae2d990eed HiSax: fix error checking for hisax_register()]
This patch (as875) adds error-checking to the callers of hisax_register().
It also changes an error pathway in that routine, making it return an error
code rather than 0.

This fixes Bugzilla #7960.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Martin Bachem <info@colognechip.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
NeilBrown a778b73ff7 md: fix bug with linear hot-add and elsewhere
Adding a drive to a linear array seems to have stopped working, due to changes
elsewhere in md, and insufficient ongoing testing...

So the patch to make linear hot-add work in the first place introduced a
subtle bug elsewhere that interracts poorly with older version of mdadm.

This fixes it all up.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
NeilBrown ab6085c795 md: don't write more than is required of the last page of a bitmap
It is possible that real data or metadata follows the bitmap without full page
alignment.

So limit the last write to be only the required number of bytes, rounded up to
the hard sector size of the device.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
NeilBrown 787f17feb2 md: avoid overflow in raid0 calculation with large components
If a raid0 has a component device larger than 4TB, and is accessed on a 32bit
machines, then as 'chunk' is unsigned long,

   chunk << chunksize_bits

can overflow (this can be as high as the size of the device in KB).  chunk
itself will not overflow (without triggering a BUG).

So change 'chunk' to be 'sector_t, and get rid of the 'BUG' as it becomes
impossible to hit.

Cc: "Jeff Zheng" <Jeff.Zheng@endace.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
Akinobu Mita 82cd0e8410 i2o: eliminate a peculiar constraint on i2o_max_drivers
There is no reason i2o_max_drivers must be a power of two.  This patch
eliminates such a constraint.

Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
Akinobu Mita be324797d9 i2o: fix notifiers when max_drivers is configured
Maximum number of I2O drivers which could be registered is configurable by
max_drivers module parameter.

But the module parameter is ignored and default value (I2O_MAX_DRIVERS = 8)
is used in the loops to notify all registered drivers.

Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
Akinobu Mita e578e9a1cc i2o: destroy event queue only when drv->event is set
i2o_driver_register() initalizes event queue for driver only when
drv->event is set.  So similarly the event queue should be destroyed only
when drv->event is set in the error path.  Otherwise destroy_workqueue()
will called with NULL.

Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
Jiri Slaby c8511f9490 Misc: phantom, take care of pci posting
phantom, take care of pci posting

thanks to akpm for pointing this out

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
Jiri Slaby c15395c0db phantom: move to unlocked_ioctl
phantom's ioctl is often (4000 times a sec or so) invoked, don't acquire
BKL and block other processes.

Signed-off-by: Jiri Slaby <xslaby@phantom.fi.muni.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
Jiri Slaby 3fcbc72965 Char: cyclades, fix deadlock
An omitted unlock.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:13 -07:00
Sascha Hauer 772dce71f5 imxfb: fix memory hole
info->pseudo_palette was previously kmalloced.  Do not overwrite it afterwards

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:13 -07:00
Sascha Hauer 90e16dddec imxfb: remove ifdefs
Here are some small fixes for the imxfb framebuffer driver:

 - remove ifndef for MX1FS2 platform which is not present in the kernel.
 - REV, CLS, PS and SPL_SPR are only needed with some sharp displays.
   Only setup the corresponding io pins when such a display is connected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:13 -07:00
Geert Uytterhoeven 92c4579dbb ps3fb: use FB_SYS_* instead of FB_CFB_*
ps3fb: Use the FB_SYS_* operations instead of the FB_CFB_* operations as the
actual frame buffer memory is part of system RAM

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:13 -07:00
Richard Purdie a01fbbd52e w100fb: fix compile warnings
Fix compile warnings from w100fb.c.  Attribute registration failure doesn't
stop the driver working so just warn about it.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:13 -07:00
Krzysztof Helt 2686ba894b pm3fb: various fixes
- fix 16-bit RGBA 4444 and 5551 modes (use fbset -rgba to set them)
 - kill wmb() after each register write by PM3_SLOW_WRITE_REG
 - kill inaccurate comments (leftovers from skeletonfb.c)
 - kill PCI class restriction, now it is more general and shorter
 - white spaces and other minor fixes and source reducing

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:13 -07:00
Krzysztof Helt 11d1a62c59 pm2fb: RDAC_WR barriers clean up
This patch fixes a possible barriers problem in RDAC_WR functions, then
remove redudant ones.

It also removes one unneeded register load from blitter function().

Signed-off-by: Krzysztof.Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:13 -07:00
Krzysztof Helt 8d74c1fdaa fbdev: cleanup of sparc FB options
This patch puts all SBUS/UPA selection under one option "SBUS/UPA
framebuffers" and moves all sparc specific drivers next to them in one group.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:12 -07:00
Florin Malita 9bea3f29fc spi: potential memleak in spidev_ioctl
'ioc' should be deallocated if __copy_from_user fails (found by Coverity
- CID 1644).

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:12 -07:00
Domen Puncer da90fa8ff6 spi/spidev: check message size before copying
Message size needs to be checked before copying, or bad things could
happen.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:12 -07:00
Domen Puncer 8888735fca mpc52xx_psc_spi: fix it for CONFIG_PPC_MERGE
Fix mpc5200 PSC SPI driver to actually work for CONFIG_PPC_MERGE
 - s/mpc52xx/mpc5200/, as this was changed in device tree some time ago
 - fix spi id detection

The move from 'ppc' to 'powerpc' didn't quite match the latest
kernel.org code.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Acked-by: Dragos Carp <dragos.carp@toptica.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:11 -07:00
Andrew Morton 585a2858b9 ide serverworks warning fixes
gcc-4.3:

drivers/ide/pci/serverworks.c: In function 'svwks_tune_chipset':
drivers/ide/pci/serverworks.c:176: warning: overflow in implicit constant conversion
drivers/ide/pci/serverworks.c:190: warning: overflow in implicit constant conversion
drivers/ide/pci/serverworks.c:211: warning: overflow in implicit constant conversion
drivers/ide/pci/serverworks.c:212: warning: overflow in implicit constant conversion

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-24 02:42:39 +02:00
Junio C Hamano 5a6248cac2 Match DMA blacklist entries between ide-dma.c and libata-core.c
There are a few entries in ata_device_blacklist[] in libata-core.c
marked with HORKAGE_NODMA but are missing from drive_blacklist[]
in ide-dma.c.  This patch makes the lists in sync.

Also remove a duplicated entry for "SanDisk SDP3B-64".

Signed-off-by: Junio C Hamano <junkio@cox.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-24 02:42:38 +02:00
Mika Kukkonen 39c98c4212 Add two missing chipsets to drivers/ide/ide-proc.c
Compiling with '-Wswitch-enum' I noticed following:

  CC      drivers/ide/ide-proc.o
drivers/ide/ide-proc.c: In function ‘proc_ide_read_imodel’:
drivers/ide/ide-proc.c:54: warning: enumeration value ‘ide_etrax100’ not handled in switch
drivers/ide/ide-proc.c:54: warning: enumeration value ‘ide_acorn’ not handled in switch

How about the following patch?

Signed-off-by: Mika Kukkonen <mikukkon@iki.fi>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-24 02:42:38 +02:00
Alan Cox 2074a106f5 ide/pci/serverworks.c: Fix corruption/timeouts with MegaIDE
It turns out from customer reports to Red Hat and some PCI dumps that the
MegaIDE in RAID mode doesn't provide the drive tuning data that the
serverworks driver expects but sometimes does provide something that
fools the code.

For the RAID class case skip the oem setup and don't trust the BIOS data.
We then tune from scratch and this sorts it out. (This has been confirmed
on an afflicted IBM blade)

[libata serverworks.c never trusts the BIOS in the first place so is
accidentally immune]

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-24 02:42:38 +02:00
Henry Su 6c6a2a8d20 add the IDE device ID for ATI SB700
Add the IDE device ID to atiixp_pci_tbl struct in atiixp.c for ATI SB700.

From: Henry Su <henry.su@amd.com>
Signed-off-by: Luugi Marsan <luugi.marsan@amd.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-24 02:42:37 +02:00
Roland Dreier 02d89b8708 IB/mlx4: Don't allocate RQ doorbell if using SRQ
If a QP is attached to a shared receive queue (SRQ), then it doesn't
have a receive queue (RQ).  So don't allocate an RQ doorbell (or map a
doorbell from userspace for userspace QPs) for that QP.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-23 15:16:08 -07:00
Linus Torvalds 641e22e04c 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: (29 commits)
  USB: Add support for Olimex arm-usb-ocd JTAG interface serial port
  USB: Add support for Sierra Wireless Aircard 595U
  USB: ldusb bugfix
  USB: ftdi_sio: Add USB Product Id for OpenDCC
  USB: fix ratelimit call semantics
  USB: handle errors in power/level attribute
  USB: make the autosuspend workqueue thread freezable
  USB: Fix USB OHCI Subvendor for Toshiba Portege 4000
  USB: usblp: Use correct DMA address in case of probe error
  USB: Fix debug output of ark3116
  USB: Onetouch - switch to using input_dev->dev.parent
  USB: don't try to kzalloc 0 bytes
  USB: remove short initial timeout for device descriptor fetch
  USB: Deref URB after usbmon is done with it
  USB: Remove duplicate IDs from option card driver
  USB: auerswald: fix file release handler
  USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning
  USB: set the correct Interrupt interval in usb_bulk_msg
  USB: New device PID for ftdi_sio driver
  USB: remove unneeded WARN_ON
  ...
2007-05-23 08:12:54 -07:00
Linus Torvalds 31f6e1bd3b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ads7846 - SPI_CPHA mode bugfix
  Input: ads7846 - document that it handles tsc2046 too
  Input: input-polldev - add module info
  Input: ucb1x00-ts - remove commented out code
  Input: ucb1400_ts - use sched_setscheduler()
  Input: ALPS - force stream mode
  Input: iforce - minor clean-ups
  Input: iforce - fix force feedback not working
  Input: adbhid - do not access input_dev->private directly
  Input: logips2pp - add type 72 (PS/2 TrackMan Marble)
2007-05-23 08:11:43 -07:00
Kumar Gala 58da10bb3f [POWERPC] Fix Kconfig warning
Fix config warning related to select usage:

drivers/macintosh/Kconfig:117:warning: 'select' used by config symbol 'PMAC_APM_EMU' refers to undefined symbol 'SYS_SUPPORTS_APM_EMULATION'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-23 09:51:46 -05:00
Timur Tabi 90c615bc42 [POWERPC] QE: fix Kconfig 'select' warning with UCC_FAST
The UCC_GETH Kconfig option in drivers/net/Kconfig had a line to select the
UCC_FAST option is arch/powerpc/sysdev/qe_lib/Kconfig, which is only used
on PowerPC builds.  On other architectures, this would generated a warning.
The fix is to have UCC_FAST depend on UCC_GETH.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-23 07:23:55 -05:00
Tony Lindgren fa91d43b91 USB: Add support for Olimex arm-usb-ocd JTAG interface serial port
This patch adds support for the serial port on Olimex arm-usb-ocd
JTAG interface.

The device appears as two serial ports, but the first one is reserved
for the JTAG interface. The JTAG interface can be used with OpenOCD
from userspace. For more information, please see:

http://openocd.berlios.de/web/
http://www.olimex.com/dev/arm-usb-ocd.html

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:51 -07:00
Danny Budik 5b7da8f6ff USB: Add support for Sierra Wireless Aircard 595U
This patch adds support for the newly released Aircard 595U EVDO
modem to the Sierra Wireless driver (sierra.c) in kernel 2.6.21.

I suspect that my mailer may be mangling patches so let me know and
I'll try to resend it.


From: Danny Budik <dbudik@ist-traffic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:51 -07:00
Oliver Neukum 9d33efd9a7 USB: ldusb bugfix
This patch fixes a problem reported with consecutive reads in the ldusb
driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:51 -07:00
Guido Scholz 2adb80e9c5 USB: ftdi_sio: Add USB Product Id for OpenDCC
USB product id registration for the OpenDCC (www.opendcc.de)
model railway central unit. Applies to 2.6.21.1.

Signed-off-by: Guido Scholz <guido.scholz@bayernline.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:51 -07:00
Alan Stern d4b7d8e802 USB: fix ratelimit call semantics
This patch (as910) fixes a ratelimit modification so that the
original error-handling path will be followed even when the log-rate
limitation kicks in.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Alan Stern dd865571d7 USB: handle errors in power/level attribute
This patch (as906) improves the error handling for the USB power/level
attribute file.  If an error occurs, the original power-level settings
will be restored.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Alan Stern 7ed92f1a14 USB: make the autosuspend workqueue thread freezable
This patch (as881b) makes the ksuspend_usb_wq workqueue freezable.  We
don't want a rogue workqueue thread running around, unexpectedly
suspending or resuming USB devices in the middle of a system sleep
transition.

This fixes Bugzilla #8498.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Andrey Borzenkov 8ab5e8c0ca USB: Fix USB OHCI Subvendor for Toshiba Portege 4000
This fixes a bug in an OHCI quirk handler for Portege 4000; the
Subvendor is 0x1179 (PCI_VENDOR_ID_TOSHIBA)
not 0x102f (PCI_VENDOR_ID_TOSHIBA_2)

bugid 8510

00:02.0 USB Controller [0c03]: ALi Corporation USB 1.1 Controller
[10b9:5237] (rev 03) (prog-if 10 [OHCI])
        Subsystem: Toshiba America Info Systems Unknown device [1179:0004]
        Flags: bus master, medium devsel, latency 64, IRQ 11
        Memory at f7eff000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Pete Zaitcev bdc4abdd09 USB: usblp: Use correct DMA address in case of probe error
Looks like the error path had a copy-paste error. The normal exit path
uses correct URB already.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Jan Engelhardt b268f484f9 USB: Fix debug output of ark3116
Fix debug output. Previously, it would output "0xFFFFFFB0" on 32-bit
archs (and probably "0xFFFFFFFFFFFFFFB0" on 64-bits), because buf is
taken as signed char, which is promoted to signed int, while %x always
expects an unsigned int.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Dmitry Torokhov 09b7002d68 USB: Onetouch - switch to using input_dev->dev.parent
In preparation for struct class_device -> struct device input
core conversion, switch to using input_dev->dev.parent when
specifying device position in sysfs tree.

Also, do not access input_dev->private directly, use helpers.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Alan Stern 57a21c1b92 USB: don't try to kzalloc 0 bytes
This patch (as907) prevents us from trying to allocate 0 bytes
when an interface has no endpoint descriptors.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Alan Stern b89ee19ae6 USB: remove short initial timeout for device descriptor fetch
This patch (as905) removes a micro-optimization from the hub port
initialization code.  Previously we had been using a short timeout on
the first attempt the read the device descriptor; now we will use the
standard timeout length.

It's not clear that the short timeout ever provided any benefit.  And
now we know of one case where it actually hurts: The device can't meet
the short timeout and then it gets terminally confused.

This fixes Bugzilla #8444.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Pete Zaitcev d984abc97e USB: Deref URB after usbmon is done with it
I haven't personally run across an oops because of this, but I feel safer
with this fix in place.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Ben Collins 9a03095831 USB: Remove duplicate IDs from option card driver
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Andrew Morton be23edf848 USB: auerswald: fix file release handler
If this down_interruptible() does fail due to signal_pending() then the state
of the driver will get trashed in interesting ways, because userspace cannot
and will not retry the close().

Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Li Yang fcbd963912 USB: fsl_usb2_udc: Fix UMTI_WIDE support and a compile warning
Change PORT_WIDTH bit for UMTI_WIDE mode and fix a compile warning
introduced in last revision.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Alan Stern 8d062b9a35 USB: set the correct Interrupt interval in usb_bulk_msg
This patch (as902) fixes a mistake I introduced into usb_bulk_msg().
usb_fill_int_urb() already does the bit-shifting calculation for
high-speed Interrupt intervals; it shouldn't be done twice.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
2007-05-22 23:45:49 -07:00
Neil \"Superna\" ARMSTRONG 762e92fa17 USB: New device PID for ftdi_sio driver
Hello,

I need to use MaxStream's PKG-U modules which includes a ftdi sio chipset for
usb2serial communication, here are the patches for handling Maxstream's modules.

The VID & PID to use with the open-source driver are provided on the CD-ROM
bundled with the modules.

From: Neil Superna ARMSTRONG <superna@na-prod.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Alan Stern bf87ce5a06 USB: remove unneeded WARN_ON
This patch (as883) removes an out-of-date WARN_ON from the main HCD
endpoint-disable routine.  The warning is triggered whenever an
endpoint is disabled while the root hub is suspended.  In the past
that may not have been legal, but it definitely is legal now.  Merely
unbinding a USB driver will do it.

Furthermore, I've never seen any occurrences of this warning that
really did signal an actual bug or error condition.  At this point it
has outlived its purpose.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2007-05-22 23:45:49 -07:00
Alan Stern ef7f6c7084 USB: more autosuspend timer stuff
This patch (as879) ties up some loose ends from an earlier patch.
These are things I didn't think to include at the time but which
clearly belonged there.

	If an autosuspend fails because driver activity races with
	the autosuspend call, restart the autosuspend timer.

	When a device is resumed by an external request, it counts
	as device activity and should update the last_busy time so
	that the next autoresume won't occur immediately.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Alan Stern 4fe5354f61 EHCI: fix problem with BIOS handoff
This patch (as882) fixes a problem with the EHCI BIOS handoff.  On my
machine, the BIOS configures the controller and the handoff fails,
leaving the controller configured.  During resume-from-disk, this
confuses ehci-hcd into thinking that the controller has not been
tampered with.

The problem is fixed by turning off the Configured Flag whenever a
BIOS handoff is attempted, whether it succeeds or not.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
Oliver Neukum 36433127ae USB: address FIXME in usbnet w.r.t drivers claiming multiple interfaces
This fixes the issue of drivers claiming multiple interfaces. Operations
are stopped as soon as an interface is suspend and resumed only as
all interfaces have been resumed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
David Brownell 4149b72eaa USB: handle more rndis_host oddities
Workaround another device firmware bug, wherein CDC descriptors get
placed in a wrong place never previously observed in the wild.

Fix a bug where a seeming RNDIS device returns a bogus response during
device initialization.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
David Brownell 47f8468e60 USB: fix more ftdi-elan/u132-hcd #include lossage
Partial fix for bogosity in the ftdi-elan and u132-hcd drivers ... these
have no business including with the internals of other drivers, much less
doing so in a broken way!!

A previous patch resolved one build fix, this resolves another...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
Matthew Davidson 64902cbaf1 usb-storage: ignore Sitecom WL-117 USB-WLAN
The Sitecom WL-117 is another "driverless" ZD1211 device where the virtual
windows driver CD must be ejected before the WLAN device appears.

zd1211rw takes care of the ejecting, but usb-storage must be told not to claim
the device.

From: Matthew Davidson <mj.davidson@gmail.com>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
Oliver Neukum deb3d7fff0 USB: remove useless check in mos7840 found by coverity
this useless check should be removed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
Oliver Neukum 5ac43d1fbb USB: fix omninet memory leak found by coverity
the transfer of allocating the descriptor in attach and no longer in open
was incomplete resulting in a memory leak coverity spotted. This fix
is against the patch set you posted.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
Semih Hazar 230ffc8e34 Input: ads7846 - SPI_CPHA mode bugfix
In commit [1] the SPI mode is set to 1, but it should be 0.  As stated
in the commit, ads784x samples the data on the rising edge.  SPI mode 1
samples on the falling edge [2] though.

The root cause of this is a bug in the omap_uwire code, which treats
CPHA=1 incorrectly; so these two bugs cancel each other out on one
of the main regression test platforms for this driver.

[1] kernel.org GIT 7937e86a70
[2] http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:35:12 -04:00
David Brownell bff0de5f59 Input: ads7846 - document that it handles tsc2046 too
The TSC2046 is an updated version of the ADS7846 ... mention that in
the Kconfig helptext and driver source.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:28:40 -04:00
Eric Piel 36bd52a49b Input: input-polldev - add module info
This is required to load it as a module, as GPL-compatible
license is necessary to use workqueues.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:28:03 -04:00
Dmitry Torokhov 1124d5ca7b Input: ucb1x00-ts - remove commented out code
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:24:28 -04:00
Satoru Takeuchi c130bdba58 Input: ucb1400_ts - use sched_setscheduler()
Fix Philips UCB1400 driver to use sched_setscheduler() instead of setting
the fields of task_struct directly.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:24:17 -04:00
Dmitry Torokhov 1e0c5b1275 Input: ALPS - force stream mode
ALPS appears to need SETSTREAM command after reset, otherwise it
does not produce any data. Now that we do not request stream mode
by default individual drivers need to take care of it.

[Jason Riedy <ejr@cs.berkeley.edu> - fix oops]

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:23:35 -04:00
Johann Deneux c0338c1597 Input: iforce - minor clean-ups
Signed-off-by: Johann Deneux <johann.deneux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:23:30 -04:00
Johann Deneux b8691fd225 Input: iforce - fix force feedback not working
Use an interrupt URB to send force-feedback data to the device
instead of a bulk URB. This was broken since 2.6.18.

Signed-off-by: Johann Deneux <johann.deneux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-22 23:19:30 -04:00
Linus Torvalds ad9ddd66c6 Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c-s3c2410: Fix build warning
  i2c-tiny-usb: Fix truncated adapter name
  i2c: Legacy i2c drivers shouldn't issue uevents
2007-05-22 18:15:14 -07:00
Linus Torvalds cdb7532f7b Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix dreamcast build for IRQ changes.
  sh: Fix clock multiplier on SH7722.
  sh: Wire up kdump crash kernel exec in die().
  sh: sr.bl toggling around idle sleep.
  sh: disable genrtc support.
  fs: Kill sh dependency for binfmt_flat.
  sh: Disable psw support for R7785RP.
  sh: Fix page size alignment in __copy_user_page().
  sh: Fix up various compile warnings for SE boards.
  sh: Wire up signalfd/timerfd/eventfd syscalls.
  sh: revert addition of page fault notifiers
  spelling fixes: arch/sh/
  input: hp680_ts compile fixes.
  sh: landisk: Header cleanups.
  sh: landisk: rtc-rs5c313 support.
  sh: Kill off pmb slab cache destructor.
  sh: Fix up psw build rules for r7780rp.
  sh: Shut up compiler warnings in __do_page_fault().
2007-05-22 17:26:18 -07:00
Dave Jones 3d9780b976 [SCSI] fusion: Fix |/|| confusion
There are several cases where the fusion driver uses the logical || to
try to do an arithmetical or ... fix by replacing with |.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: "Moore, Eric" <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 16:09:21 -05:00
Jonathan Corbet edd75ede2d V4L/DVB (5691): Ov7670: reset clkrc in rgb565 mode
A bug in the ov7670 sensor causes it to introduce noise unless the CLKRC
register is rewritten *after* setting the image mode.  Naturally,
resetting CLKRC in this way will cause other modes to fail.  So
carefully poke the register only when indicated.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:16:29 -03:00
Jonathan Corbet 7acf90c70c V4L/DVB (5690): Cafe_ccic: Properly power down the sensor
The proper method for powering down the sensor on OLPC systems has
changed somewhat; in particular, the sensor must be powered down
completely (rather than simply told to power down) or the associated
"camera active" LED will stay on.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:16:27 -03:00
matthieu castet 82c01d3d5a V4L/DVB (5680): Tuner-simple.c fix suport for SECAM with FI1216MF
Allow to use SECAM-BG with the FI1216MF tuner.

The selection is done with the secam=B module argument.

The default behaviour should be the same as before.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:16:25 -03:00
Darrick J. Wong 8fdcf86af6 [SCSI] aic94xx: asd_clear_nexus should fail if the cleared task does not complete
Every so often, the driver will call asd_clear_nexus to clean out a task.
It is supposed to be the case that the CLEAR NEXUS does not go on the done
list until after the task itself has been put on the done list, but for
some reason this doesn't always happen.  Thus, the
wait_for_completion_timeout call times out, and we return success.  This
makes libsas free the task even though the task hasn't completed, leading
to a BUG_ON message from aic94xx_hwi.c around line 341.  We should return
failure from asd_clear_nexus so that libsas tries again; at a bare minimum
it shouldn't be freeing active tasks.  I _think_ this will fix one of
the SCB timeout crash problems (though I've not been able to reproduce
it lately...)

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:12:45 -05:00
James Bottomley f45ffaec2e [SCSI] aic7xxx: fix aicasm build failure with gcc-3.4.6
On Tue, 2007-05-22 at 06:51 -0500, Bob Tracy wrote:
> Second try: originally reported this back on April 17th.  2.6.X
> kernel builds started failing after I upgraded my compiler from
> gcc-3.3.X to gcc-3.4.6:
>
> make -C drivers/scsi/aic7xxx/aicasm
> (...)
> gcc -I/usr/include -I. aicasm.c aicasm_symbol.c aicasm_gram.c aicasm_macro_gram.c aicasm_scan.c aicasm_macro_scan.c -o aicasm -ldb
> aicasm_gram.y:1948: error: conflicting types for 'yyerror'
> aicasm_gram.tab.c:3004: error: previous implicit declaration of 'yyerror' was here
> aicasm_macro_gram.y:162: error: conflicting types for 'mmerror'
> aicasm_macro_gram.tab.c:1196: error: previous implicit declaration of 'mmerror' was here

Fix is to add a prototype for yyerror and mmerror to the relevant files.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:08:59 -05:00
Salyzyn, Mark 1208bab5d0 [SCSI] aacraid: apply commit config for reset_devices flag
Under some conditions associated with the unclean transition to kdump,
the aacraid adapters will view the array as foreign and not export it to
prevent access and data manipulation. The solution is to submit a commit
configuration to export the devices since this is a expected behavior
when transitioning to a kdump kernel.

This patch adds the aacraid.reset_devices flag and when either this or
the global reset_devices flag is set, ensures that a commit config is
issued and extends the startup_timeout if it is set less than 5 minutes.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:08:41 -05:00
Alan Stern 09ff92fea2 [SCSI] sd: fix refcounting regression in suspend/resume routines
This patch (as909) fixes a couple of refcounting errors in the sd
driver's suspend and resume methods.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-22 14:08:24 -05:00
Simon Arlott 4abdcf933f V4L/DVB (5630): Dvb-core: Handle failures to create devices
dvb-core is not started early enough when device drivers that use dvb are
compiled in so dvb_register_device fails (silently) since dvb_class is
NULL, this runs dvb_init using subsys_initcall instead of module_init.

dvb_register_device will now check the return value of class_device_create.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:00:14 -03:00
Manu Abraham a6d7613226 V4L/DVB (5639a): Fix dst usage count
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:00:14 -03:00
Hans Verkuil c74e83a863 V4L/DVB (5670): Adding new fields to v4l2_pix_format broke the ABI, reverted that change
Reverted the change to struct v4l2_pix_format. I completely missed that
this struct was used by existing ioctls so that changing it broke the ABI.
I will have to think of another way of setting the top/left coordinates
but for now this change is reverted to preserve compatibility.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:00:13 -03:00
Mauro Carvalho Chehab bf57ab7ae7 V4L/DVB (5640): Fix: em28xx shouldn't be selecting VIDEO_BUF
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:00:12 -03:00
Mauro Carvalho Chehab d460f857a5 V4L/DVB (5639): Fix Kconfig dependencies for ivtv
ivtv were wrongly marked as dependent of USB.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:00:12 -03:00
Arnaud Patard a1ba15832c i2c-s3c2410: Fix build warning
Fix for the following build warning:
  CC      drivers/i2c/busses/i2c-s3c2410.o
  drivers/i2c/busses/i2c-s3c2410.c: In function 's3c24xx_i2c_probe':
  drivers/i2c/busses/i2c-s3c2410.c:839: warning: format '%ld' expects type 'long int', but argument 4 has type 'resource_size_t'

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-22 19:49:16 +02:00
Jean Delvare 6a7ce82f02 i2c-tiny-usb: Fix truncated adapter name
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Till Harbaum <lists@harbaum.org>
2007-05-22 19:49:16 +02:00
David Brownell de81d2aaeb i2c: Legacy i2c drivers shouldn't issue uevents
Prevent legacy drivers from issuing uevents for device creation/removal,
so that userspace can't cause modprobing loops for them.  This became a
problem for some legacy PC drivers.  I can't easily see it becoming an
issue with I2C legacy drivers, but consistency-in-paranoia seems likely
to be a good thing here.  For usable i2c-level driver model uevents, just
switch to a new-style driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-22 19:49:16 +02:00
Eugene Teo 412e8a0ebf [PATCH] drivers/net/wireless/libertas/rx.c: fix use-after-free
skb could have been freed by then. Also, in libertas_upload_rx_packet(),
skb->protocol is initialized by eth_type_trans().

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-05-22 11:02:29 -04:00
Eugene Teo 596f2d0554 [PATCH] drivers/net/wireless/libertas/fw.c: fix use-before-check
NULL checks should be performed before the dereference.

Spotted by the Coverity checker.

Signed-off-by: Eugene Teo <eteo@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-05-22 11:02:29 -04:00
Florin Malita 3d4bd24b01 [PATCH] libertas: skb dereferenced after netif_rx
In libertas_process_rxed_packet() and process_rxed_802_11_packet() the
skb is dereferenced after being passed to netif_rx (called from
libertas_upload_rx_packet). Spotted by Coverity (1658, 1659).

Also, libertas_upload_rx_packet() unconditionally returns 0 so the error
check is dead code - might as well take it out and change the signature.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-05-22 11:02:29 -04:00
Linus Torvalds d6f2fe98eb Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  Add constant for FCS/CRC length (frame check sequence)
  declance: Remove a dangling spin_unlock_irq() thingy
  e1000: Don't enable polling in open() (was: e1000: assertion hit in e1000_clean(), kernel 2.6.21.1)
2007-05-21 17:45:25 -07:00
Linus Torvalds 04fc5fd39e 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: bump versions
  libata: Trim trailing whitespace
  libata: Kiss post_set_mode goodbye
  ata_piix: clean up
  pata_hpt366: Enable bits are unreliable so don't use them
  libata: Add Seagate STT20000A to DMA blacklist.
  ahci: disable 64bit dma on sb600
2007-05-21 17:44:34 -07:00
Jeff Garzik 8bc3fc470e libata: bump versions
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 20:26:38 -04:00
Jeff Garzik a617c09f6d libata: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 20:14:23 -04:00
Alan Cox bc9a8a7eaa libata: Kiss post_set_mode goodbye
As of the -mm tree we don't have post_set_mode users any more.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 20:00:54 -04:00
Alan Cox 2f91d81db3 ata_piix: clean up
With cable methods in place we don't need a custom error handler for SATA
so get rid of it

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 20:00:47 -04:00
Alan Cox 4349eebf67 pata_hpt366: Enable bits are unreliable so don't use them
Various people had problems with both old and new IDE when hpt366 enable
bits started getting honoured. It turns out they are not reliable so
don't rely on them

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 20:00:43 -04:00
Dave Jones 39f198868d libata: Add Seagate STT20000A to DMA blacklist.
http://bugzilla.kernel.org/show_bug.cgi?id=1044 points out an
additional hard disk that doesn't handle DMA transfers correctly.
This patch is the libata variant of the earlier patch to drivers/ide/

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 20:00:35 -04:00
Tejun Heo c7a42156d9 ahci: disable 64bit dma on sb600
SB600 claims it can do 64bit DMA but it can't.  Disable it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 20:00:25 -04:00
Maciej W. Rozycki f1e9a4eaea declance: Remove a dangling spin_unlock_irq() thingy
The spin_unlock_irq() invocation in lance_start_xmit() has no matching
locking request.  The call is already protected by netif_tx_lock, so
remove the statement.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 19:41:19 -04:00
Auke Kok 3e1657c8ef e1000: Don't enable polling in open() (was: e1000: assertion hit in e1000_clean(), kernel 2.6.21.1)
Herbert Xu wrote:
"netif_poll_enable can only be called if you've previously called
netif_poll_disable.  Otherwise a poll might already be in action
and you may get a crash like this."

Removing the call to netif_poll_enable in e1000_open should fix this issue,
the only other call to netif_poll_enable is in e1000_up() which is only
reached after a device reset or resume.

Bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=8455
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240339

Tested by Doug Chapman <doug.chapman@hp.com>

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-21 19:41:19 -04:00
Linus Torvalds 8aee74c8ee 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/cm: Improve local id allocation
  IPoIB/cm: Fix SRQ WR leak
  IB/ipoib: Fix typos in error messages
  IB/mlx4: Check if SRQ is full when posting receive
  IB/mlx4: Pass send queue sizes from userspace to kernel
  IB/mlx4: Fix check of opcode in mlx4_ib_post_send()
  mlx4_core: Fix array overrun in dump_dev_cap_flags()
  IB/mlx4: Fix RESET to RESET and RESET to ERROR transitions
  IB/mthca: Fix RESET to ERROR transition
  IB/mlx4: Set GRH:HopLimit when sending globally routed MADs
  IB/mthca: Set GRH:HopLimit when building MLX headers
  IB/mlx4: Fix check of max_qp_dest_rdma in modify QP
  IB/mthca: Fix use-after-free on device restart
  IB/ehca: Return proper error code if register_mr fails
  IPoIB: Handle P_Key table reordering
  IB/core: Use start_port() and end_port()
  IB/core: Add helpers for uncached GID and P_Key searches
  IB/ipath: Fix potential deadlock with multicast spinlocks
  IB/core: Free umem when mm is already gone
2007-05-21 16:19:32 -07:00
Michael S. Tsirkin 9f81036c54 IB/cm: Improve local id allocation
The IB CM uses an idr for local id allocations, with a running counter
as start_id.  This fails to generate distinct ids if

1. An id is constantly created and destroyed
2. A chunk of ids just beyond the current next_id value is occupied

This in turn leads to an increased chance of connection request being
mis-detected as a duplicate, sometimes for several retries, until
next_id gets past the block of allocated ids. This has been observed
in practice.

As a fix, remember the last id allocated and start immediately above it.
This also fixes a problem with the old code, where next_id might
overflow and become negative.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-21 13:41:29 -07:00
Michael S. Tsirkin 518b1646f8 IPoIB/cm: Fix SRQ WR leak
SRQ WR leakage has been observed with IPoIB/CM: e.g. flipping ports on
and off will, with time, leak out all WRs and then all connections
will start getting RNR NAKs.  Fix this in the way suggested by spec:
move the QP being destroyed to the error state, wait for "Last WQE
Reached" event and then post WR on a "drain QP" connected to the same
CQ.  Once we observe a completion on the drain QP, it's safe to call
ib_destroy_qp.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-21 13:35:40 -07:00
Michael S. Tsirkin 24bd1e4e32 IB/ipoib: Fix typos in error messages
Trivial error message fixups.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-21 13:29:15 -07:00
Linus Torvalds d07b3c2532 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
  [ARM] spelling fixes
  [ARM] at91_adc parenthesis balance
  [ARM] 4400/1: S3C24XX: Add high-speed MMC device definition
  [ARM] 4399/2: S3C2443: Fix SMDK2443 nand timings
  [ARM] 4398/1: S3C2443: Fix watchdog IRQ number
  [ARM] 4397/1: S3C2443: remove SDI0/1 IRQ ambiguity
  [ARM] 4396/1: S3C2443: Add missing HCLK clocks
  [ARM] 4395/1: S3C24XX: add include of <linux/sysdev.h> to relevant machines
  [ARM] 4388/1: no need for arm/mm mmap range checks for non-mmu
  [ARM] 4387/1: fix /proc/cpuinfo formatting for pre-ARM7 parts
  [ARM] ARMv6: add CPU_HAS_ASID configuration
  [ARM] integrator: fix pci_v3 compile error with DEBUG_LL
  [ARM] gic: Fix gic cascade irq handling
  [ARM] Silence OMAP kernel configuration warning
  [ARM] Update ARM syscalls
  [ARM] 4384/1: S3C2412/13 SPI registers offset correction
  [ARM] 4383/1: iop: fix usage of '__init' and 'inline' in iop files
  [ARM] 4382/1: iop13xx: fix msi support
  [ARM] Remove Integrator/CP SMP platform support
  [ARM] 4378/1: KS8695: Serial driver fix
  ...
2007-05-21 10:00:22 -07:00
Bryan Wu 88b4036934 Blackfin SPI: cleanup according to David Brownell's review
a) platorm_driver_probe(...) instead of platform_driver_register(&driver);
b) set bfin_spi_enable and bfin_spi_disable static
c) Why is the width flag a u32?
d) maybe use dev_dbg() instead of pr_debug()

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:50:24 -07:00
Mike Frysinger 2ac5ee4738 Blackfin serial driver: implement support for ignoring parity/break errors
properly setting up and respecting the read_status_mask / ignore_status_mask fields of the serial core

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:50:23 -07:00
Aubrey Li 5c4e472b0a Blackfin serial driver: fix overhead issue
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:50:23 -07:00
Alexey Dobriyan e8edc6e03a Detach sched.h from mm.h
First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
	alpha alpha-up
	arm
	i386 i386-up i386-defconfig i386-allnoconfig
	ia64 ia64-up
	m68k
	mips
	parisc parisc-up
	powerpc powerpc-up
	s390 s390-up
	sparc sparc-up
	sparc64 sparc64-up
	um-x86_64
	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:18:19 -07:00
Paul Mundt 69d87daa18 sh: disable genrtc support.
sh never had support for this, so remove the option entirely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-21 14:34:04 +09:00
Roland Dreier 56a8c8b6ac IB/mlx4: Check if SRQ is full when posting receive
Make mlx4_post_srq_recv() fail if the SRQ is full (head == tail).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-20 20:19:24 -07:00
Eli Cohen 2446304dd6 IB/mlx4: Pass send queue sizes from userspace to kernel
Pass the number of WQEs for the send queue and their size from userspace
to the kernel to avoid having to keep the QP size calculations in sync 
between the kernel driver and libmlx4.  This fixes a bug seen with the 
current mlx4_ib driver and current libmlx4 caused by a difference in the 
calculated sizes for SQ WQEs.  Also, this gives more flexibility for 
userspace to experiment with using multiple WQE BBs for a single SQ WQE.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-20 10:18:04 -07:00
Roland Dreier 59b0ed1212 IB/mlx4: Fix check of opcode in mlx4_ib_post_send()
wr->opcode is invalid if it's >= ARRAY_SIZE(mlx4_ib_opcode), not just
strictly >.

This was spotted by the Coverity checker (CID 1643).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:58 -07:00
Roland Dreier 23c15c21d3 mlx4_core: Fix array overrun in dump_dev_cap_flags()
Don't overrun fname[] array when decoding device flags.

This was spotted by the Coverity checker (CID 1642).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:57 -07:00
Michael S. Tsirkin 65adfa911a IB/mlx4: Fix RESET to RESET and RESET to ERROR transitions
According to the IB spec, a QP can be moved from RESET back to RESET
or to the ERROR state, but mlx4 firmware does not support this and
returns an error if we try.  Fix the RESET to RESET transition by
just returning 0 without doing anything, and fix RESET to ERROR by
moving the QP from RESET to INIT with dummy parameters and then
transitioning from INIT to ERROR.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:57 -07:00
Michael S. Tsirkin b18aad7150 IB/mthca: Fix RESET to ERROR transition
According to the IB spec, a QP can be moved from RESET to the ERROR 
state, but mthca firmware does not support this and returns an error if 
we try.  Work around this FW limitation by moving the QP from RESET to
INIT with dummy parameters and then transitioning from INIT to ERROR.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:57 -07:00
Roland Dreier 1526130351 IB/mlx4: Set GRH:HopLimit when sending globally routed MADs
This is the same issue discovered in mthca by Rolf Manderscheid
<rvm@obsidianresearch.com>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:57 -07:00
Rolf Manderscheid 3f37cae694 IB/mthca: Set GRH:HopLimit when building MLX headers
Global CM packets used by rmda_cm were being sent with a GRH:hopLimit
of zero, causing them to be dropped by the router.  The problem is a
missing initialization of the hop_limit field in mthca_read_ah(),
which was called by build_mlx_header() when sending a MAD on QP1.

Signed-off-by: Rolf Manderscheid <rvm@obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:56 -07:00
Eli Cohen 1f8f7b7a7b IB/mlx4: Fix check of max_qp_dest_rdma in modify QP
max_qp_dest_rdma is already in natural units - no need to shift.  This
was discovered by a test that deliberately requests more outstanding
atomic operation than the device supports.

Found by Sagi Rotem at Mellanox.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:56 -07:00
Ali Ayoub de57c9f102 IB/mthca: Fix use-after-free on device restart
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:56 -07:00
Hoang-Nam Nguyen bd5a6ccc0e IB/ehca: Return proper error code if register_mr fails
Set the return code of ehca_register_mr() to ENOMEM if the corresponding
firmware call fails due to out of resources.  Some other error codes
were explicitly mapped to EINVAL -- just remove those cases so they
get mapped to the default case, which already returns EINVAL anyway.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:54 -07:00
Yosef Etigin 26bbf13ce1 IPoIB: Handle P_Key table reordering
SM reconfiguration or failover possibly causes a shuffling of the values
in the P_Key table. Right now, IPoIB only queries for the P_Key index
once when it creates the device QP, and hence there are problems if the
index of a P_Key value changes.  Fix this by using the PKEY_CHANGE event
to trigger a recheck of the P_Key index.

Signed-off-by: Yosef Etigin <yosefe@voltaire.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:54 -07:00
Roland Dreier 1af4c435f3 IB/core: Use start_port() and end_port()
Clean up ib_query_port() and ib_modify_port() slightly by using the 
just-added start_port() and end_port() helpers.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:54 -07:00
Yosef Etigin 5eb620c81c IB/core: Add helpers for uncached GID and P_Key searches
Add ib_find_gid() and ib_find_pkey() functions that use uncached device
queries.  The calls might block but the returns are always up-to-date.
Cache P_Key and GID table lengths in core to avoid extra port info queries.

Signed-off-by: Yosef Etigin <yosefe@voltaire.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:53 -07:00