dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

11884 Commits

Author SHA1 Message Date
John W. Linville 38bb6b288b [PATCH] via-rhine: revert "change mdelay to msleep and remove from ISR path"
Revert previous patch with subject "change mdelay to msleep and remove
from ISR path".  This patch seems to have caused bigger problems than
it solved, and it didn't solve much of a problem to begin with...

Discussion about backing-out this patch can be found here:

	http://marc.theaimsgroup.com/?l=linux-netdev&m=114321570402396&w=2

The git commit associated w/ the original patch is:

	6ba98d311d

Signed-off-by: John W. Linville <linville@tuxdriver.com
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:14:49 -04:00
Andrew Morton f34ba4e1ed [PATCH] revert "forcedeth: fix multi irq issues"
Revert ebf34c9b6f.  Maybe.  Due to crashes
at shutdown - see http://bugzilla.kernel.org/show_bug.cgi?id=6568.

Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:13:05 -04:00
Linus Torvalds 2f880b65fd 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: Fix posting lists of 256 receive requests for Tavor
  IB/uverbs: Don't leak ref to mm on error path
  IB/srp: Complete correct SCSI commands on device reset
  IB/srp: Get rid of extra scsi_host_put()s if reconnection fails
  IB/srp: Don't wait for disconnection if sending DREQ fails
  IB/mthca: Make fw_cmd_doorbell default to 0
2006-05-19 18:52:59 -07:00
Linus Torvalds ae83e25504 Merge master.kernel.org:/home/rmk/linux-2.6-mmc
* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [ARM] 3531/1: i.MX/MX1 SD/MMC ensure, that clock are stopped before new command and cleanups
2006-05-19 16:42:25 -07:00
Linus Torvalds b0c51b7d65 Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] s3c2410_wdt.c stop watchdog after boot
  [WATCHDOG] i8xx_tco.c - remove support for ICH6 + ICH7
  [WATCHDOG] Documentation/watchdog/watchdog-api.txt - fix watchdog daemon
  [WATCHDOG] sc1200wdt.c printk fix
2006-05-19 16:41:59 -07:00
Randy.Dunlap 78a904b654 [SCSI] ppa: fix for machines with highmem
ppa cannot handle highmem pages, and like imm, which already has
this patch, the device is slow, so performance is not a big issue,
so just force pages to be in low memory (hence mapped).

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-19 16:45:00 -05:00
James Bottomley 4ff42a669a [SCSI] mptspi: reset handler shouldn't be called for other bus protocols
All registered reset callback handlers are called during reset processing.
The mptspi modules has its own reset callback handler, just recently
added for issuing domain validation after host reset.  If either the mptsas or
mptfc driver are loaded, this callback could be called. Thus resulting
in domain validation being issued for sas or fibre end devices.

Fix this by having mptbase.c check the bus type against the driver
type and only call the reset handler if they match (or if it's a
non-bus specific reset handler).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-19 16:43:08 -05:00
Thomas Bogendoerfer c3d8336855 [SCSI] Blacklist entry for HP dat changer
after upgrading our SUN E250 from 2.4 to 2.6 I'm seeing following error
when the HP DDS4 DAT changer gets probed:

scsi: host 1 channel 0 id 5 lun16777216 has a LUN larger than allowed by
the host adapter

The device is connected to a symbios 875 host. I've talked to Willy
about the problem, and he asked me to try to blacklist the device
for reportlun. I did that with the patch below and it solved the
problem. It now gets properly detected:

 target1:0:5: FAST-20 WIDE SCSI 40.0 MB/s ST (50 ns, offset 16)
  Vendor: HP        Model: C5713A            Rev: H307
  Type:   Sequential-Access                  ANSI SCSI revision: 03
 target1:0:5: Beginning Domain Validation
 target1:0:5: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 16)
 target1:0:5: FAST-20 WIDE SCSI 40.0 MB/s ST (50 ns, offset 16)
 target1:0:5: Domain Validation skipping write tests
 target1:0:5: Ending Domain Validation
  Vendor: HP        Model: C5713A            Rev: H307
  Type:   Medium Changer                     ANSI SCSI revision: 03

Signed-off-by: tsbogend@alpha.franken.de
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-19 16:41:20 -05:00
Pavel Pisa 2c171bf134 [ARM] 3531/1: i.MX/MX1 SD/MMC ensure, that clock are stopped before new command and cleanups
Patch from Pavel Pisa

There has been problems that for some paths that clock are not stopped
during new command programming and initiation. Result is issuing
of incorrect command to the card. Some other problems are cleaned too.
Noisy report of known ERRATUM #4 has been suppressed.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-19 21:48:03 +01:00
Michael S. Tsirkin 23f3bc0f2c IB/mthca: Fix posting lists of 256 receive requests for Tavor
If we post a list of length 256 exactly, nreq in doorbell gets set to
256 which is wrong: it should be encoded by 0.  This is because we
only zero it out on the next WR, which may not be there.  The solution
is to ring the doorbell after posting a WQE, not before posting the
next one.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-18 11:37:03 -07:00
Roland Dreier 0cb4fe8d26 IB/uverbs: Don't leak ref to mm on error path
In ib_umem_release_on_close(), if the kmalloc() fails, then a
reference to current->mm will be leaked.  Fix this by adding a mmput()
instead of just returning on kmalloc() failure.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-17 22:20:50 -07:00
Stefan Richter a54c9d30db [PATCH] ohci1394, sbp2: fix "scsi_add_device failed" with PL-3507 based devices
Re-enable posted writes for status FIFO.

Besides bringing back a very minor bandwidth tweak from Linux 2.6.15.x
and older, this also fixes an interoperability regression since 2.6.16:

   http://bugzilla.kernel.org/show_bug.cgi?id=6356
   (sbp2: scsi_add_device failed. IEEE1394 HD is not working anymore.)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Vanei Heidemann <linux@javanei.com.br>
Tested-by: Martin Putzlocher <mputzi@gmx.de> (chip type unconfirmed)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-17 21:32:22 -07:00
Stefan Richter 679c0cd2dd [PATCH] sbp2: add ability to override hardwired blacklist
In case the blacklist with workarounds for device bugs yields a false
positive, the module load parameter can now also be used as an override
instead of an addition to the blacklist.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-17 21:32:22 -07:00
Stefan Richter e9a1c52c7b [PATCH] sbp2: add read_capacity workaround for iPod
Apple decided to copy some USB stupidity over to FireWire.

The sector number returned by iPods from read_capacity is one too many.
This may cause I/O errors, especially if the kernel is configured for EFI
partition support. We use the same workaround as usb-storage but have to
check for different model IDs.

	http://marc.theaimsgroup.com/?t=114233262300001
	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=187409

Acknowledgements:
  Diagnosis and therapy by Mathieu Chouquet-Stringer <ml2news@free.fr>,
  additional data about affected and unaffected Apple hardware from
  Vladimir Kotal, Sander De Graaf, Bryan Olmstead and Hugh Dixon.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-17 21:32:21 -07:00
Stefan Richter 24d3bf884e [PATCH] sbp2: consolidate workarounds
Grand unification of the three types of workarounds we have so far.

The "skip mode page 8" workaround is now limited to devices which
pretend to be of TYPE_DISK instead of TYPE_RBC. This workaround is no
longer enabled for Initio bridges.

Patch update in anticipation of more workarounds:
 - Add module parameter "workarounds".
 - Deprecate parameter "force_inquiry_hack".
 - Compose the blacklist of a compound type for better readability and
   extensibility.
 - Remove a now unused #define.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-17 21:32:21 -07:00
Linus Torvalds 9676489866 Merge git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/netdev-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/netdev-2.6:
  sky2: prevent dual port receiver problems
  x86_64: Check for bad dma address in b44 1GB DMA workaround
  The ixp2000 driver for the enp2611 was developed on a board with
2006-05-17 16:13:25 -07:00
David Woodhouse bc519f30eb [PATCH] bcm43xx: associate on 'ifconfig up'
I still need this hack to work around the fact that softmac doesn't
attempt to associate when we bring the device up...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-17 14:53:19 -04:00
Ishai Rabinovitz 093beac189 IB/srp: Complete correct SCSI commands on device reset
When flushing out queued commands after a successful device reset,
make sure that SRP completes the right commands, instead of calling
scsi_done on the command passed into the device reset handler over and
over.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-17 09:20:48 -07:00
Roland Dreier ec2d720849 IB/srp: Get rid of extra scsi_host_put()s if reconnection fails
If a reconnection attempt fails, then SRP does two scsi_host_put()s.
This is a historical relic from an earlier version of the driver that
took a reference on the scsi_host before trying to reconnect, so get
rid of the extra scsi_host_put().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-17 09:16:03 -07:00
Roland Dreier e65810566f IB/srp: Don't wait for disconnection if sending DREQ fails
Sending a DREQ may fail, for example because the remote target has
already broken the connection.  If so, then SRP should not wait for
the disconnection to complete, because it never will.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-17 09:13:21 -07:00
Roland Dreier 1db76c14d2 IB/mthca: Make fw_cmd_doorbell default to 0
Setting fw_cmd_doorbell allows FW command to be queued using posted
writes instead of requiring polling on a "go" bit, so it should be a
performance boost.  However, the option causes problems with at least
some device/firmware combinations, so set the default to 0 until we
understand what's going on better.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-17 07:48:07 -07:00
Linus Torvalds 0c056c50a6 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/spi-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/spi-2.6:
  [PATCH] SPI: spi_bitbang: clocking fixes
  [PATCH] spi: Update to PXA2xx SPI Driver
  [PATCH] SPI: busnum == 0 needs to work
  [PATCH] SPI: devices can require LSB-first encodings
  [PATCH] SPI: Renamed bitbang_transfer_setup to spi_bitbang_setup_transfer and export it
  [PATCH] SPI: Add David as the SPI subsystem maintainer
  [PATCH] SPI: spi bounce buffer has a minimum length
  [PATCH] SPI: spi whitespace fixes
  [PATCH] SPI: add PXA2xx SSP SPI Driver
  [PATCH] SPI: per-transfer overrides for wordsize and clocking
2006-05-16 15:18:26 -07:00
Linus Torvalds 509b70b677 Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
  [ARM] 3523/1: Serial core pm_state
2006-05-16 15:15:59 -07:00
David Brownell 1e316d7566 [PATCH] SPI: spi_bitbang: clocking fixes
This fixes two problems triggered by the MMC stack updating clocks:

 - SPI masters driver should accept a max clock speed of zero; that's one
   convention for marking idle devices.  (Presumably that helps controllers
   that don't autogate clocks to "off" when not in use.)

 - There are more than 1000 nanoseconds per millisecond; setting the clock
   down to 125 KHz now works properly.

Showing once again that Zero (http://en.wikipedia.org/wiki/Zero) is still
an inexhaustible number of bugs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:58 -07:00
Stephen Street 9708c121c3 [PATCH] spi: Update to PXA2xx SPI Driver
Fix two outstanding issues with the pxa2xx_spi driver:

1) Bad cast in the function u32_writer. Thanks to Henrik Bechmann
2) Adds support for per transfer changes to speed and bits per word

Signed-off-by: Stephen Street <stephen@streetfiresound.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:58 -07:00
David Brownell a020ed7521 [PATCH] SPI: busnum == 0 needs to work
We need to be able to have a "SPI bus 0" matching chip numbering; but
that number was wrongly used to flag dynamic allocation of a bus number.

This patch resolves that issue; now negative numbers trigger dynamic alloc.

It also updates the how-to-write-a-controller-driver overview to mention
this stuff.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:57 -07:00
David Brownell ccf77cc4af [PATCH] SPI: devices can require LSB-first encodings
Add spi_device hook for LSB-first word encoding, and update all the
(in-tree) controller drivers to reject such devices.  Eventually,
some controller drivers will be updated to support lsb-first encodings
on the wire; no current drivers need this.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:57 -07:00
Kumar Gala ff9f4771b5 [PATCH] SPI: Renamed bitbang_transfer_setup to spi_bitbang_setup_transfer and export it
Renamed bitbang_transfer_setup to follow convention of other exported symbols
from spi-bitbang.  Exported spi_bitbang_setup_transfer to allow users of
spi-bitbang to use the function in their own setup_transfer.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:57 -07:00
David Brownell a9948b6194 [PATCH] SPI: spi bounce buffer has a minimum length
Make sure that spi_write_then_read() can always handle at least 32 bytes
of transfer (total, both directions), minimizing one portability issue.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:57 -07:00
Stephen Street e0c9905e87 [PATCH] SPI: add PXA2xx SSP SPI Driver
This driver turns a PXA2xx synchronous serial port (SSP) into a SPI master
controller (see Documentation/spi/spi_summary).  The driver has the following
features:

- Support for any PXA2xx SSP
- SSP PIO and SSP DMA data transfers.
- External and Internal (SSPFRM) chip selects.
- Per slave device (chip) configuration.
- Full suspend, freeze, resume support.

Signed-off-by: Stephen Street <stephen@streetfiresound.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:56 -07:00
Imre Deak 4cff33f94f [PATCH] SPI: per-transfer overrides for wordsize and clocking
Some protocols (like one for some bitmap displays) require different clock
speed or word size settings for each transfer in an SPI message. This adds
those parameters to struct spi_transfer.  They are to be used when they are
nonzero; otherwise the defaults from spi_device are to be used.

The patch also adds a setup_transfer callback to spi_bitbang, uses it for
messages that use those overrides, and implements it so that the pure
bitbanging code can help resolve any questions about how it should work.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-16 14:33:56 -07:00
Andi Kleen 639b421b91 [PATCH] x86_64: Check for bad dma address in b44 1GB DMA workaround
Needed for interaction with the nommu code in x86-64 which
will return bad_dma_address if the address exceeds dma_mask.

Cc: netdev@vger.kernel.org
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-16 07:59:31 -07:00
Andrew Victor 1281e36027 [ARM] 3523/1: Serial core pm_state
Patch from Andrew Victor

The serial_core already manages the power state of the UARTs, and
therefore it shouldn't suspend a UART which was previously suspended.

This patch modifies serial_core only call the UART-specific
power-management function if the PM state is actually changing.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-16 11:28:49 +01:00
Ben Dooks 655516c80c [WATCHDOG] s3c2410_wdt.c stop watchdog after boot
If the s3c2410 watchdog timer is not enabled by
the driver at startup, ensure that it is stopped
in-case the boot process has enabled it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-05-15 21:38:14 +02:00
Wim Van Sebroeck 03a8e359cf [WATCHDOG] i8xx_tco.c - remove support for ICH6 + ICH7
Temporary remove support for ICH6 + ICH7. In these newer TCO's
the watchdog timer has changed: the TCO_TMR register is not at
the TCOBASE+0x1 offset, but changed it's place to TCOBASE+0x12
and became 10 bit long [0:9]. (Kernel BUG 6031).

ICH6 + ICH7 support will be added in a new driver. Code is
under test.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-05-15 21:37:58 +02:00
Dave Jones 7071e522a5 [WATCHDOG] sc1200wdt.c printk fix
Fix printk output.

sc1200wdt: build 20020303<3>sc1200wdt: io parameter must be specified

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-05-15 21:37:36 +02:00
Stephen Hemminger 843a46f423 sky2: prevent dual port receiver problems
When both ports are receiving simultaneously, the receive logic gets confused
and may pass up a packet before it is full. This causes hangs, and IP will see
lots of garbage packets. There is even the potential for data corruption if
a later arriving packet DMA's into freed memory.

It looks like a hardware bug because status arrives for a packet but no
data is there. Until this bug is worked out, block the user from bringing
up both ports at once.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-15 12:35:01 -07:00
Andi Kleen de54bc0f00 x86_64: Check for bad dma address in b44 1GB DMA workaround
Needed for interaction with the nommu code in x86-64 which
will return bad_dma_address if the address exceeds dma_mask.

Cc: netdev@vger.kernel.org

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-15 12:26:00 -07:00
Lennert Buytenhek 1ea739a5f9 The ixp2000 driver for the enp2611 was developed on a board with
three gigabit ports, but some enp2611 models only have two ports
(and only one onboard PM3386.)  The current driver assumes there
are always three ports and so it doesn't work on the two-port
version of the board at all.

This patch adds a bit of logic to the enp2611 driver to limit the
number of ports to 2 if the second PM3386 isn't detected.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-15 12:25:29 -07:00
Andrew Morton c4694c76ce [PATCH] dl2k needs dma-mapping.h
On alpha:

drivers/net/dl2k.c: In function `rio_free_tx':
drivers/net/dl2k.c:768: error: `DMA_48BIT_MASK' undeclared (first use in this function)
drivers/net/dl2k.c:768: error: (Each undeclared identifier is reported only once
drivers/net/dl2k.c:768: error: for each function it appears in.)
drivers/net/dl2k.c: In function `receive_packet':
drivers/net/dl2k.c:896: error: `DMA_48BIT_MASK' undeclared (first use in this function)
drivers/net/dl2k.c: In function `rio_close':
drivers/net/dl2k.c:1803: error: `DMA_48BIT_MASK' undeclared (first use in this function)

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:58 -07:00
Thomas Kleffel 264a341231 [PATCH] ide_cs: Add IBM microdrive to known IDs
Add the IBM microdrive to the known PCMCIA IDs for ide_cs.

Signed-off-by: Thomas Kleffel <tk@maintech.de>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:58 -07:00
Alexey Dobriyan bfe2e9349f [PATCH] gigaset: endian fix
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:57 -07:00
Carl-Daniel Hailfinger ce007ea597 [PATCH] smbus unhiding kills thermal management
Do not enable the SMBus device on Asus boards if suspend is used.  We do
not reenable the device on resume, leading to all sorts of undesirable
effects, the worst being a total fan failure after resume on Samsung P35
laptop.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:57 -07:00
Daniel Walker bb53a76116 [PATCH] tpm_register_hardware gcc 4.1 warning fix
drivers/char/tpm/tpm.c: In function 'tpm_register_hardware':
drivers/char/tpm/tpm.c:1157: warning: assignment from incompatible pointer type

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:57 -07:00
Alan Cox 655fdeab80 [PATCH] Final rio polish
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:57 -07:00
Kylene Jo Hall 2a7362f52a [PATCH] tpm: fix constant
Fix the constant used for the base address when it cannot be determined
from ACPI.  It was off by one order of magnitude.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:57 -07:00
Richard Purdie 3dc7b82ea7 [PATCH] LED: Fix sysfs store function error handling
Fix the error handling of some LED _store functions.  This corrects them to
return -EINVAL if the value is not numeric with an optional byte of trailing
whitespace.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:56 -07:00
Richard Purdie 68673afd44 [PATCH] Backlight/LCD Class: Fix sysfs _store error handling
The backlight and LCD class _store functions currently accept values like "34
some random strings" without error.  This corrects them to return -EINVAL if
the value is not numeric with an optional byte of trailing whitespace.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:56 -07:00
Richard Purdie a8d2e7d952 [PATCH] LED: Improve Kconfig information
Improve the NEW_LEDS Kconfig information to say what it does as well as what
it doesn't.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:56 -07:00
Greg Smith 698d070746 [PATCH] s390: lcs incorrect test
While debugging why our LCS emulator is having some problems I noticed the
following weirdness in drivers/s390/net/lcs.c routine lcs_irq.  The `if'
statement is always true since SCHN_STAT_PCI is defined as 0x80.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:55 -07:00
Chris Wedgwood a7b862f663 [PATCH] VIA quirk fixup, additional PCI IDs
An earlier commit (75cf7456dd) changed an
overly-zealous PCI quirk to only poke those VIA devices that need it.
However, some PCI devices were not included in what I hope is now the full
list.  Consequently we're failing to run the quirk on all machines which need
it, causing IRQ routing failures.

This should I hope correct this.

Thanks to Masoud Sharbiani <masouds@masoud.ir> for pointing this out
and testing the fix.

Signed-off-by: Chris Wedgwood <cw@f00f.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:55 -07:00
Benjamin Herrenschmidt 73d5858809 [PATCH] pcmcia Oopses fixes
Fix some NULL dereferences in the pcmcia code when using old userland
tools.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:54 -07:00
Kylene Jo Hall 9458513660 [PATCH] tpm: update module dependencies
The TIS driver is dependent upon information from the ACPI table for device
discovery thus it compiles but does no actual work without this dependency.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:54 -07:00
Stefan Schweizer 90d5ede598 [PATCH] Fix capi reload by unregistering the correct major
I am having the bug FATAL: Error inserting capi ([..]/capi.ko): Device or
resource busy when I try to reload capi after loading it.  in dmesg:
capi20: unable to get major 68

Fix the issue which is caused by setting the major to zero when registering
the chrdev succeeded.

(akpm: this means that we can again not use `major=0' (dynamic major
allocation) for this driver).

Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:54 -07:00
Jeff Garzik 8d4ee71ff6 Merge branch 'max-sect' into upstream 2006-05-15 11:27:47 -04:00
Jeff Garzik efa6e7e9d4 Merge branch 'for-jeff' of git://htj.dyndns.org/libata-tj into tejun-merge 2006-05-15 11:26:53 -04:00
Jeff Garzik 5006ecc2d5 Merge branch 'master' into upstream 2006-05-15 11:26:03 -04:00
Tejun Heo aee10a03eb [PATCH] sata_sil24: implement NCQ support
Implement NCQ support.  Sil24 has 31 command slots and all of them are
used for NCQ command queueing.  libata guarantees that no other
command is in progress when it issues an internal command, so always
use tag 0 for internal commands.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:56 +09:00
Tejun Heo 12fad3f965 [PATCH] ahci: implement NCQ suppport
Implement NCQ support.

Original implementation is from Jens Axboe.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:55 +09:00
Tejun Heo a9764c2bb5 [PATCH] ahci: kill pp->cmd_tbl_sg
With NCQ, there are multiple sg tables, so pp->cmd_tbl_sg doesn't cut
it.  Directly calculate sg table address from pp->cmd_tbl.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:53 +09:00
Tejun Heo 979db803b8 [PATCH] ahci: add HOST_CAP_NCQ constant
Add HOST_CAP_NCQ.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:52 +09:00
Tejun Heo dd410ff129 [PATCH] ahci: clean up AHCI constants in preparation for NCQ
* Rename CMD_TBL_HDR to CMD_TBL_HDR_SZ as it's size not offset.

* Define MAX_CMDS and CMD_SZ and use them in calculation of other
  constants.

* Define CMD_TBL_AR_SZ as product of CMD_TBL_SZ and MAX_CMDS, and use
  it when calculating PRIV_DMA_SZ.

* CMD_SLOT_SZ is also dependent on MAX_CMDS but hasn't been changed
  because I didn't want to change the value used by the original code
  (32 commands).  Later NCQ change will bump MAX_CMDS to 32 anyway and
  the hard coded 32 can be changed to MAX_CMDS then.

* Reorder HOST_CAP_* flags.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:50 +09:00
Tejun Heo a6e6ce8e8d [PATCH] libata-ncq: implement NCQ device configuration
Now that all NCQ related stuff are in place, implement NCQ device
configuration and bump ATA_MAX_QUEUE to 32 thus activating NCQ
support.

Original implementation is from Jens Axboe.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:48 +09:00
Tejun Heo e8ee84518c [PATCH] libata-ncq: update EH to handle NCQ
Update EH to handle NCQ.  ata_eh_autopsy() is updated to call
ata_eh_analyze_ncq_error() which reads log page 10h on NCQ device
error and updates eh_context accordingly.  ata_eh_report() is updated
to report SActive.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:46 +09:00
Tejun Heo 3dc1d88193 [PATCH] libata-ncq: implement NCQ command translation and exclusion
This patch implements NCQ command translation and exclusion.  Note
that NCQ commands don't use ata_rwcmd_protocol() to choose ATA
command.  This is because, unlike non-NCQ RW commands, NCQ commands
can only be used for NCQ protocol and FUA handling is done with a flag
rather than separate command.

NCQ enabled device will have queue depth larger than one but no two
non-NCQ commands can be issued simultaneously, neither can a non-NCQ
command and NCQ commands.  This patch makes ata_scsi_translate()
return SCSI_MLQUEUE_DEVICE_BUSY if such exclusion is necessary.  SCSI
midlayer will retry the command later.

As SCSI midlayer always retries once a command completes, this doesn't
incur unnecessary delays and as most commands will be NCQ ones for NCQ
device, so the overhead should be negligible.

Initial implementation is from Jens Axboe and using
SCSI_MLQUEUE_DEVICE_BUSY for exclusion is suggested by Jeff Garzik.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:45 +09:00
Tejun Heo dedaf2b036 [PATCH] libata-ncq: implement ap->qc_active, ap->sactive and complete helper
Add ap->qc_active and ap->sactive, mask of all active qcs and libata's
view of the SActive register, respectively.  Also, implement
ata_qc_complete_multiple() which takes new qc_active mask and complete
multiple qcs according to the mask.

These will be used to track NCQ commands and complete them.  The
distinction between ap->qc_active and ap->sactive is also useful for
later PM implementation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:43 +09:00
Tejun Heo 6cec4a3943 [PATCH] libata-ncq: rename ap->qactive to ap->qc_allocated
Rename ap->qactive to ap->qc_allocated.  This is to accomodate
addition of ap->qc_active, mask of active qcs.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:41 +09:00
Tejun Heo 2115ea94a2 [PATCH] libata-ncq: pass ata_scsi_translate() return value to SCSI midlayer
ata_scsi_translate() will need to return SCSI_ML_QUEUE_DEVICE_BUSY to
achieve exlusion between NCQ and non-NCQ commands or among non-NCQ
commands.  Pass its return value upward to SCSI midlayer.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 21:03:39 +09:00
Tejun Heo c17ea20d9a [PATCH] libata: fix irq-pio merge
* kill ata_poll_qc_complete() and implement/use ata_hsm_qc_complete()
  which completes qcs in new EH compliant manner from HSM

* don't print error message from ata_hsm_move().  it's responsibility
  of EH.

* kill ATA_FLAG_NOINTR usage in bmdma EH

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:59:29 +09:00
Tejun Heo 12436c30f4 Merge branch 'irq-pio'
Conflicts:

	drivers/scsi/libata-core.c
	include/linux/libata.h
2006-05-15 20:59:15 +09:00
Tejun Heo 88ce7550c3 [PATCH] sata_sil24: convert to new EH
Convert sata_sil24 to new EH.

* When port is frozen, IRQ for the port is masked.

* sil24_softreset() doesn't need to mangle with IRQ mask anymore.
  libata ensures that the port is frozen during reset.

* Only turn on interrupts which are handled by interrupt handler and
  EH.  As we don't handle SDB notify yet, turn it off. DEV_XCHG and
  UNK_FIS are handled by EH and thus turned on.

* sil24_softreset() usually fails to recover the port after DEV_XCHG.
  ATA_PORT_HARDRESET is used as recovery action for DEV_XCHG.

* sil24 may be invoked without any active command.  e.g. DEV_XCHG irq
  occuring while no qc in progress still triggers EH and will reset
  the port and revalidate attached device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:32 +09:00
Tejun Heo 2a3917a8bb [PATCH] ahci: add PIOS interim interrupt handling
During multiblock PIO, multiple PIOS interrupts are generated before
qc compltion.  Current code prints unnecessary message for such cases.
This is exposed when new EH slows down attached device into PIO mode.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:30 +09:00
Tejun Heo 78cd52d02f [PATCH] ahci: convert to new EH
Convert AHCI to new EH.  Unfortunately, ICH7 AHCI reacts badly if IRQ
mask is diddled during operation.  So, freezing is implemented by
unconditionally clearing interrupt conditions while frozen.

* Interrupts are categorized according to required action.
  e.g. Connection status or unknown FIS error requires freezing the
  port while TF or HBUS_DATA don't.

* Only CONNECT (reflects SErr.X) interrupt is taken into account not
  PHYRDY (SErr.N), as CONNECT is better cue for starting EH.

* AHCI may be invoked without any active command.  e.g. CONNECT irq
  occuring while no qc in progress still triggers EH and will reset
  the port and revalidate attached device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:29 +09:00
Tejun Heo f6aae27ed0 [PATCH] sata_sil: convert to new EH
Convert sata_sil to new EH.  As these controllers have hardware
interrupt mask and are known to have screaming interrupts issues, use
hardware IRQ masking for freezing.  sil_freeze() masks interrupts for
the port and sil_thaw() unmasks them.  As ports are automatically
frozen before probing reset, there is no need to initialize interrupt
masks sil_init_onde().  Remove related code.

Other than freezing, sata_sil uses stock BMDMA EH routines.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:27 +09:00
Tejun Heo 3f037db0ba [PATCH] ata_piix: convert to new EH
ata_piix can use stock BMDMA EH routines.  Convert to new EH.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:25 +09:00
Tejun Heo 6d97dbd72d [PATCH] libata-eh: implement BMDMA EH
Implement stock BMDMA error handling methods.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:24 +09:00
Tejun Heo 022bdb075b [PATCH] libata-eh: implement new EH
Implement new EH.  The exported interface is ata_do_eh() which is to
be called from ->error_handler and performs the following steps to
recover the failed port.

ata_eh_autopsy() : analyze SError/TF, determine the cause of failure
		   and required recovery actions and record it in
		   ap->eh_context
ata_eh_report()	 : report the failure to user
ata_eh_recover() : perform recovery actions described in ap->eh_context
ata_eh_finish()	 : finish failed qcs

LLDDs can customize error handling by modifying eh_context before
calling ata_do_eh() or, if necessary, doing so inbetween each major
steps by calling each step explicitly.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:22 +09:00
Tejun Heo f3e81b19aa [PATCH] libata-eh: implement ata_eh_info and ata_eh_context
struct ata_eh_info serves as the communication channel between
execution path and EH.  Execution path describes detected error
condition in ap->eh_info and EH recovers the port using it.  To avoid
missing error conditions detected during EH, EH makes its own copy of
eh_info and clears it on entry allowing error info to accumulate
during EH.

Most EH states including EH's copy of eh_info are stored in
ap->eh_context (struct ata_eh_context) which is owned by EH and thus
doesn't require any synchronization to access and alter.  This
standardized context makes it easy to integrate various parts of EH
and extend EH to handle multiple links (for PM).

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:21 +09:00
Tejun Heo 0c247c559c [PATCH] libata-eh: implement dev->ering
This patch implements ata_ering and uses it to define dev->ering.

ata_ering is a ring buffer which records libata errors - whether a
command was for normar IO request, err_mask and timestamp.  Errors are
recorded per-device in dev->ering.  This will be used by EH to
determine recovery actions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:19 +09:00
Tejun Heo 246619da30 [PATCH] libata-eh-fw: update SCSI command completion path for new EH
SCSI command completion path used to do some part of EH including
printing messages and obtaining sense data.  With new EH, all these
are responsibilities of the EH, update SCSI command completion path to
reflect this.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:16 +09:00
Tejun Heo d95a717f57 [PATCH] libata-eh-fw: update ata_exec_internal() for new EH
Update ata_exec_internal() such that it uses new EH framework.
->post_internal_cmd() is always invoked regardless of completion
status.  Also, when ata_exec_internal() detects a timeout condition
and new EH is in place, it freezes the port as timeout for normal
commands would do.

Note that ata_port_flush_task() is called regardless of
wait_for_completion status.  This is necessary as exceptions unrelated
to the qc can abort the qc, in which case PIO task could still be
running after the wait for completion returns.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:14 +09:00
Tejun Heo ad9e276244 [PATCH] libata-eh-fw: update ata_scsi_error() for new EH
Update ata_scsi_error() for new EH.  ata_scsi_error() is responsible
for claiming timed out qcs and invoking ->error_handler in safe and
synchronized manner.  As the state of the controller is unknown if a
qc has timed out, the port is frozen in such cases.

Note that ata_scsi_timed_out() isn't used for new EH.  This is because
a timed out qc cannot be claimed by EH without freezing the port and
freezing the port in ata_scsi_timed_out() results in unnecessary
abortion of other active qcs.  ata_scsi_timed_out() can be removed
once all drivers are converted to new EH.

While at it, add 'TODO: kill' comments to old EH functions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:12 +09:00
Tejun Heo dafadcde8d [PATCH] libata-eh-fw: implement new EH scheduling from PIO
PIO executes without holding host_set lock, so it cannot be
synchronized using the same mechanism as interrupt driven execution.
port_task framework makes sure that EH is not entered until PIO task
is flushed, so PIO task can be sure the qc in progress won't go away
underneath it.  One thing it cannot be sure of is whether the qc has
already been scheduled for EH by another exception condition while
host_set lock was released.

This patch makes ata_poll_qc-complete() handle such conditions
properly and make it freeze the port if HSM violation is detected
during PIO execution.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:11 +09:00
Tejun Heo e318049949 [PATCH] libata-eh-fw: implement freeze/thaw
Freezing is performed atomic w.r.t. host_set->lock and once frozen
LLDD is not allowed to access the port or any qc on it.  Also, libata
makes sure that no new qc gets issued to a frozen port.

A frozen port is thawed after a reset operation completes
successfully, so reset methods must do its job while the port is
frozen.  During initialization all ports get frozen before requesting
IRQ, so reset methods are always invoked on a frozen port.

Optional ->freeze and ->thaw operations notify LLDD that the port is
being frozen and thawed, respectively.  LLDD can disable/enable
hardware interrupt in these callbacks if the controller's IRQ mask can
be changed dynamically.  If the controller doesn't allow such
operation, LLDD can check for frozen state in the interrupt handler
and ack/clear interrupts unconditionally while frozen.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:09 +09:00
Tejun Heo 7b70fc0398 [PATCH] libata-eh-fw: implement ata_port_schedule_eh() and ata_port_abort()
ata_port_schedule_eh() directly schedules EH for @ap without
associated qc.  Once EH scheduled, no further qc is allowed and EH
kicks in as soon as all currently active qc's are drained.

ata_port_abort() schedules all currently active commands for EH by
qc_completing them with ATA_QCFLAG_FAILED set.  If ata_port_abort()
doesn't find any qc to abort, it directly schedule EH using
ata_port_schedule_eh().

These two functions provide ways to invoke EH for conditions which
aren't directly related to any specfic qc.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:07 +09:00
Tejun Heo f686bcb807 [PATCH] libata-eh-fw: implement new EH scheduling via error completion
There are several ways a qc can get schedule for EH in new EH.  This
patch implements one of them - completing a qc with ATA_QCFLAG_FAILED
set or with non-zero qc->err_mask.  ALL such qc's are examined by EH.

New EH schedules a qc for EH from completion iff ->error_handler is
implemented, qc is marked as failed or qc->err_mask is non-zero and
the command is not an internal command (internal cmd is handled via
->post_internal_cmd).  The EH scheduling itself is performed by asking
SCSI midlayer to schedule EH for the specified scmd.

For drivers implementing old-EH, nothing changes.  As this change
makes ata_qc_complete() rather large, it's not inlined anymore and
__ata_qc_complete() is exported to other parts of libata for later
use.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:05 +09:00
Tejun Heo f69499f42c [PATCH] libata-eh-fw: update ata_qc_from_tag() to enforce normal/EH qc ownership
New EH framework has clear distinction about who owns a qc.  Every qc
starts owned by normal execution path - PIO, interrupt or whatever.
When an exception condition occurs which affects the qc, the qc gets
scheduled for EH.  Note that some events (say, link lost and regained,
command timeout) may schedule qc's which are not directly related but
could have been affected for EH too.  Scheduling for EH is atomic
w.r.t. ap->host_set->lock and once schedule for EH, normal execution
path is not allowed to access the qc in whatever way.  (PIO
synchronization acts a bit different and will be dealt with later)

This patch make ata_qc_from_tag() check whether a qc is active and
owned by normal path before returning it.  If conditions don't match,
NULL is returned and thus access to the qc is denied.
__ata_qc_from_tag() is the original ata_qc_from_tag() and is used by
libata core/EH layers to access inactive/failed qc's.

This change is applied only if the associated LLDD implements new EH
as indicated by non-NULL ->error_handler

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:03 +09:00
Tejun Heo 2ab7db1ff1 [PATCH] libata-eh-fw: use special reserved tag and qc for internal commands
New EH may issue internal commands to recover from error while failed
qc's are still hanging around.  To allow such usage, reserve tag
ATA_MAX_QUEUE-1 for internal command.  This also makes it easy to tell
whether a qc is for internal command or not.  ata_tag_internal() test
implements this test.

To avoid breaking existing drivers, ata_exec_internal() uses
ATA_TAG_INTERNAL only for drivers which implement ->error_handler.
For drivers using old EH, tag 0 is used.  Note that this makes
ata_tag_internal() test valid only when ->error_handler is
implemented.  This is okay as drivers on old EH should not and does
not have any reason to use ata_tag_internal().

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:02 +09:00
Tejun Heo dc2b351586 [PATCH] libata-eh-fw: clear SError in ata_std_postreset()
Clear SError in ata_std_postreset().  This is to clear SError bits
which get set during reset.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:58:00 +09:00
Tejun Heo f15a1dafed [PATCH] libata: use ATA printk helpers
Use ATA printk helpers.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:56 +09:00
Tejun Heo 3373efd89d [PATCH] libata: use dev->ap
Use dev->ap where possible and eliminate superflous @ap from functions
and structures.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:53 +09:00
Tejun Heo 38d87234d6 [PATCH] libata: add dev->ap
Add dev->ap which points back to the port the device belongs to.  This
makes it unnecessary to pass @ap for silly reasons (e.g. printks).
Also, this change is necessary to accomodate later PM support which
will introduce ATA link inbetween port and device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:51 +09:00
Tejun Heo 81952c5497 [PATCH] libata: use new SCR and on/offline functions
Use new SCR and on/offline functions.  Note that for LLDD which know
it implements SCR callbacks, SCR functions are guaranteed to succeed
and ata_port_online() == !ata_port_offline().

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:47 +09:00
Tejun Heo 34bf21704c [PATCH] libata: implement new SCR handling and port on/offline functions
Implement ata_scr_{valid|read|write|write_flush}() and
ata_port_{online|offline}().  These functions replace
scr_{read|write}() and sata_dev_present().

Major difference between between the new SCR functions and the old
ones is that the new ones have a way to signal error to the caller.
This makes handling SCR-available and SCR-unavailable cases in the
same path easier.  Also, it eases later PM implementation where SCR
access can fail due to various reasons.

ata_port_{online|offline}() functions return 1 only when they are
affirmitive of the condition.  e.g.  if SCR is unaccessible or
presence cannot be determined for other reasons, these functions
return 0.  So, ata_port_online() != !ata_port_offline().  This
distinction is useful in many exception handling cases.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:46 +09:00
Tejun Heo 838df6284c [PATCH] libata: init ap->cbl to ATA_CBL_SATA early
Init ap->cbl to ATA_CBL_SATA in ata_host_init().  This is necessary
for soon-to-follow SCR handling function changes.  LLDDs are free to
change ap->cbl during probing.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:44 +09:00
Tejun Heo ce5f7f3d0c [PATCH] sata_sil24: update TF image only when necessary
Update TF image (pp->tf) only when necessary.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:42 +09:00
Tejun Heo e61e067227 [PATCH] libata: implement qc->result_tf
Add qc->result_tf and ATA_QCFLAG_RESULT_TF.  This moves the
responsibility of loading result TF from post-compltion path to qc
execution path.  qc->result_tf is loaded if explicitly requested or
the qc failsa.  This allows more efficient completion implementation
and correct handling of result TF for controllers which don't have
global TF representation such as sil3124/32.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:40 +09:00
Tejun Heo 96bd39ec29 [PATCH] libata: remove postreset handling from ata_do_reset()
Make ata_do_reset() deal only with reset.  postreset is now the
responsibility of the caller.  This is simpler and eases later
prereset addition.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:38 +09:00
Tejun Heo 3adcebb2b5 [PATCH] libata: move ->set_mode() handling into ata_set_mode()
Move ->set_mode() handlng into ata_set_mode().

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:37 +09:00
Tejun Heo fe635c7e91 [PATCH] libata: use preallocated buffers
It's not a very good idea to allocate memory during EH.  Use
statically allocated buffer for dev->id[] and add 512byte buffer
ap->sector_buf.  This buffer is owned by EH (or probing) and to be
used as temporary buffer for various purposes (IDENTIFY, NCQ log page
10h, PM GSCR block).

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:35 +09:00
Tejun Heo 158693031d [PATCH] libata: hold host_set lock while finishing internal qc
Hold host_set lock while finishing internal qc.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:33 +09:00
Tejun Heo 7401abf2f4 [PATCH] libata: clear ap->active_tag atomically w.r.t. command completion
ap->active_tag was cleared in ata_qc_free().  This left ap->active_tag
dangling after ata_qc_complete().  Spurious interrupts inbetween could
incorrectly access the qc.  Clear active_tag in ata_qc_complete().
This change is necessary for later EH changes.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:32 +09:00
Tejun Heo f8c2c4202d [PATCH] libata: fix ->phy_reset class code handling in ata_bus_probe()
ata_bus_probe() doesn't clear dev->class after ->phy_reset().  This
can result in falsely enabled devices if probing fails.  Clear
dev->class to ATA_DEV_UNKNOWN after fetching it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:30 +09:00
Tejun Heo e23befe901 [PATCH] libata: unexport ata_scsi_error()
While moving ata_scsi_error() from LLDD sht to libata transportt,
EXPORT_SYMBOL_GPL() entry was left out.  Kill it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:27 +09:00
Tejun Heo e4fac92ae7 [PATCH] ahci: hardreset classification fix
AHCI calls ata_dev_classify() even when no device is attached which
results in false class code.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:25 +09:00
Tejun Heo 3c567b7d11 [PATCH] libata: rename ata_down_sata_spd_limit() and friends
Rename ata_down_sata_spd_limit() and friends to sata_down_spd_limit()
and likewise for simplicity & consistency.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:23 +09:00
Tejun Heo c44078c03f [PATCH] libata: silly fix in ata_scsi_start_stop_xlat()
Don't directly access &qc->tf when tf == &qc->tf.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:21 +09:00
Tejun Heo ee7863bc68 [PATCH] SCSI: implement shost->host_eh_scheduled
libata needs to invoke EH without scmd.  This patch adds
shost->host_eh_scheduled to implement such behavior.

Currently the only user of this feature is libata and no general
interface is defined.  This patch simply adds handling for
host_eh_scheduled where needed and exports scsi_eh_wakeup() to
modules.  The rest is upto libata.  This is the result of the
following discussion.

http://thread.gmane.org/gmane.linux.scsi/23853/focus=9760

In short, SCSI host is not supposed to know about exceptions unrelated
to specific device or command.  Such exceptions should be handled by
transport layer proper.  However, the distinction is not essential to
ATA and libata is planning to depart from SCSI, so, for the time
being, libata will be using SCSI EH to handle such exceptions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:20 +09:00
Luben Tuikov 89f48c4d67 [PATCH] SCSI: Introduce scsi_req_abort_cmd (REPOST)
Introduce scsi_req_abort_cmd(struct scsi_cmnd *).
This function requests that SCSI Core start recovery for the
command by deleting the timer and adding the command to the eh
queue.  It can be called by either LLDDs or SCSI Core.  LLDDs who
implement their own error recovery MAY ignore the timeout event if
they generated scsi_req_abort_cmd.

First post:
http://marc.theaimsgroup.com/?l=linux-scsi&m=113833937421677&w=2

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-15 20:57:18 +09:00
Ingo Molnar 8a2ae70a9b V4L/DVB (3965): Fix CONFIG_VIDEO_VIVI=y build bug
CONFIG_VIDEO_VIVI depends on CONFIG_VIDEO_BUF.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:25 -03:00
Adrian Bunk 68a26aecb3 V4L/DVB (3964): Bt8xx/bttv-cards.c: fix off-by-one errors
This patch fixes two off-by-one errors spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:23 -03:00
Andrew Morton 1095136dee V4L/DVB (3914): Vivi build fix
drivers/media/video/vivi.c: In function `vivi_map_sg':
drivers/media/video/vivi.c:799: error: `DMA_NONE' undeclared (first use in this function)
drivers/media/video/vivi.c:799: error: (Each undeclared identifier is reported only once
drivers/media/video/vivi.c:799: error: for each function it appears in.)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:21 -03:00
Andrew Morton 765bf9770f V4L/DVB (3912): Sparc32 vivi fix
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:18 -03:00
Rusty Scott dd31d5ac73 V4L/DVB (3829): Fix frequency values in the ranges structures of the LG TDVS H06xF tuners
Frequency range values in the current driver for the LG TDVS H06xF tuners
appear to have been a transposing of the 5 in the mid range 160-455 instead
of 165-450.
This patch corrects the pll programming for these tuners as per the datasheet.

Signed-off-by: Rusty Scott <rustys@ieee.org>
Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:16 -03:00
Mikhail Gusarov 7bbbc0a28e V4L/DVB (3826): Saa7134: Missing 'break' in Terratec Cinergy 400 TV initialization
There is a missing break in card initialization function. Might screw
up initialization of Terratec Cinergy 400 TV.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:14 -03:00
Hans Verkuil 7d16eaa3d0 V4L/DVB (3825): Remove broken 'fast firmware load' from cx25840.
The fast firmware load hack in cx25840 uses private data. In fact, it
breaks pvrusb2 and doesn't work at all with ivtv. It is a unsafe
implementation and so it is removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:12 -03:00
Michael Krufky 5691c84739 V4L/DVB (3819): Cxusb-bluebird: bug-fix: power down corrupts frontend
This patch prevents a bug where the frontend is unable to tune after waking
from powered down state. Now, the device remains powered on until it is
disconnected, just like the windows driver. It seems that the bluebird
firmware is unable to successfully handle tuning after a powered down state.
This patch fixes all of the FusionHDTV Bluebird USB2 devices. The Medion
MD95700 will still behave as before, since it was unaffected by this bug.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:11 -03:00
Hans Verkuil 7157e2b6ff V4L/DVB (3813): Add support for TCL M2523_5N_E tuner.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:10 -03:00
Yeasah Pell 70047f9cca V4L/DVB (3804): Tweak bandselect setup fox cx24123
*) Allow forcing the bandselect value with a module parameter to 
facilitate determining the correct bandselect frequencies.
*) Changes the bandselect frequency thresholds based on experiments 
with the above parameter in conjunction with the values in the spec.

Signed-off-by: Yeasah Pell <yeasah at schwide.net>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:08 -03:00
Yeasah Pell 0e4558ab4a V4L/DVB (3803): Various correctness fixes to tuning.
*) Sets an additional tuner parameter (demodulator sample gain) that 
wasn't being set before.
*) Removes the low symbol rate tuner parameter tweaks in the previous 
patch -- it appears those tweaks are not necessary with the demodulator 
sample gain set correctly.
*) Cleanup and document the demodulator register initialization sequence.
*) Change set_fec routine to disable FEC auto scan when a specific code 
rate is selected.
*) Remove error message when reported FEC is invalid (which happens 
sometimes when the card has no signal)

Signed-off-by: Yeasah Pell <yeasah at schwide.net>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:07 -03:00
Yeasah Pell dce1dfc2a5 V4L/DVB (3797): Always wait for diseqc queue to become ready before transmitting a diseqc message
The previous DISEQC code didn't wait, so it was unreliable

Signed-off-by: Yeasah Pell <yeasah at schwide.net>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:05 -03:00
Mauro Carvalho Chehab caf970e09c V4L/DVB (3796): Add several debug messages to cx24123 code
Current debug messages at cx24123 are next to useless, since they don't
print the values sent/read to registers. With this patch, debug=1 will
show comprehensive messages. debug=2 will show also read/write operations
at I2C bus.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-05-12 19:55:04 -03:00
Vadim Catana a74b51fca9 V4L/DVB (3795): Fix for CX24123 & low symbol rates
- fixed the reception of channels with low symbol rates.
  ( The VGA1 and VGA2 offsets recommended by cx24109 docs for
  symbol rates from 1 to 5 MSps do not work. I changed them
  to values found experimentally. The charge pump current
  and FILTUNE voltage are now set to values recommended in
  the docs. This improves reception for symbol rates < 15 MSps.
  The values written in the SYSSymbolRate registers are calculated
  with better precision. )
		     
- fixed the cx24123_get_fec() function. It was returning the values
  for DCII mode.
- removed some unused variables

Signed-off-by: Vadim Catana <skystar at moldova.cc>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:02 -03:00
Michael Krufky 3a63fc4bfd V4L/DVB (3792): Kbuild: DVB_BT8XX must select DVB_ZL10353
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:00 -03:00
Eric Sesterhenn 7c908fbb01 V4L/DVB (3790): Use after free in drivers/media/video/em28xx/em28xx-video.c
In several places we use dev->devno right after we kfree() dev.  This fixes
coverity bug id #1065

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:59 -03:00
Mauro Carvalho Chehab b37492be25 V4L/DVB (3788): Fix compilation with V4L1_COMPAT
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:58 -03:00
Mauro Carvalho Chehab 4fff598fc7 V4L/DVB (3782): Removed uneeded stuff from pwc Makefile
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:56 -03:00
Mauro Carvalho Chehab c1d1ea9e0f V4L/DVB (3775): Add VIVI Kconfig stuff
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:54 -03:00
Mauro Carvalho Chehab cd41e28e2d V4L/DVB (3774): Create V4L1 config options
V4L1 API is depreciated and should be removed soon from kernel. This patch
adds two new options, one to disable V4L1 drivers, and another to disable
V4L1 compat module. This way, it would be easy to check what still depends
on V4L1 stuff, allowing also to test if app works fine with V4L2 only support.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:53 -03:00
Jose Alberto Reguero ea76ce526e V4L/DVB (3767): Pvr350 tv out (saa7127)
Witout this patch tv out don't work properly with my pvr350 card.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:52 -03:00
Duncan Sands bba3ad76a8 V4L/DVB (3766): Correct buffer size calculations in cx88-core.c
The computation in cx88_risc_buffer suffers from the mistake:
a non-zero padding value can cause more page borders to be crossed,
leading to big buffer over-runs.  
This patch changes the additive constant from 3 + 4 to 4
It also changees the constant in cx88_risc_databuffer from 3 + 4 to 2,
because 2 dwords are the correct vaule.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:50 -03:00
Trent Piepho 9175b8544f V4L/DVB (3763): Bug fix: Wrong tuner was used pcHDTV HD-3000 card
It looks like the HD3000 was prototyped with the 7610 tuner when
the driver was developed, but the cards appear to have always shipped
with the 7612 tuner and the driver was never adjusted for it.
The definition needs to be corrected.
- The HD-3000 was prototyped with a Thomson DTT7610,
  but production versions used a DTT7612 tuner.
- This patch changes both dvb-pll settings and V4L tuner type.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:49 -03:00
Mauro Carvalho Chehab f1de3e7c5c V4L/DVB (3745): Fix a bug at pluto2 Makefile
When pluto2 were selected, all other module dependencies were
just discarded.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:47 -03:00
Andrew de Quincey a064fad337 V4L/DVB (3743): Fix some more potential oopses
Spotted a couple more places where it fails to check if
dvb_register_adapter() fails.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:46 -03:00
Andrew de Quincey 6445401673 V4L/DVB (3742): Set tone/voltage again if the frontend was reinitialised
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:44 -03:00
Andrew de Quincey 71a8dffb07 V4L/DVB (3740): Fix oops in budget-av with CI
Now that the CI code reinitialises the frontend, need to move the CI
initialisation to after the frontend init in order to ensure the frontend is
always in a good state. Fixes an oops caused by the frontend being NULL as
well.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:43 -03:00
Sergey Vlasov 7a766f9ddd V4L/DVB (3738): Saa7134: Fix oops with disable_ir=1
When disable_ir=1 parameter is used, or when saa7134_input_init1()
fails for any other reason, dev->remote will remain NULL, and the
driver will oops in saa7134_hwinit2().  Therefore dev->remote must be
checked before dereferencing.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:41 -03:00
Michael Krufky a7286033f9 V4L/DVB (3731): Kbuild: drivers/media/video/bt8xx: remove $(src) from include path
- replaced '$(src)/..' with 'drivers/media/video'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:40 -03:00
Andrew de Quincey 96b194c12e V4L/DVB (3726): Fix TT budget-ci 1.1 CI slots
It turns out the firmware on the TT budget-ci 1.1 slots doesn't generate
interrupts. This patch adds support for this using polling mode on these
slots.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:38 -03:00
Andrew de Quincey f47f4763cd V4L/DVB (3725): Fix mutex in dvb_register_device to work.
This mutex is meant to stop two devices getting the same ID. dvbdev_get_free_id() 
scans the list of already allocated devices to find a free id.
Unfortunately, since the mutex is unlocked before the card is added to the
above list, it is still possible for two of them to get the same id.
Its debatable whether this mutex lock is actually needed, but I'm unwilling
to just remove it in case something does depend on it.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:37 -03:00
Duncan Sands 3203f94a25 V4L/DVB (3704): Fix some errors on bttv_risc_overlay
There are tree mistakes on bttv_risc_overlay.
1) When skip_odd is true, the number of lines for which
instructions are written is (height+1)/2, not height/2.
2) This occurs when clipping: the number of instruction bytes
written can be as much as 8 + 12*nclips, not 8 + 8*nclips, as
currently estimated.
3) Coverity check were wrong with nskips=0, since it means that
it can clipped at most one line.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:35 -03:00
Linus Torvalds 18552b8f22 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NEIGH]: Fix IP-over-ATM and ARP interaction.
  [TG3]: ethtool always report port is TP.
2006-05-12 15:39:32 -07:00
Linus Torvalds faa88df860 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Fix warning on prom_getproperty in openprom.c
  [SPARC]: Handle UNWIND_INFO properly.
  [SPARC64]: Update defconfig.
  [SPARC]: show device name in /proc/dvma_map
  [SPARC]: Remove duplicate symbol exports
2006-05-12 15:26:29 -07:00
Sean Hefty 1b52fa98ed IB: refcount race fixes
Fix race condition during destruction calls to avoid possibility of
accessing object after it has been freed.  Instead of waking up a wait
queue directly, which is susceptible to a race where the object is
freed between the reference count going to 0 and the wake_up(), use a
completion to wait in the function doing the freeing.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-12 14:57:52 -07:00
Roland Dreier 6f4bb3d820 IB/ipath: Properly terminate PCI ID table
The ipath driver's table of PCI IDs needs a { 0, } entry at the end.
This makes all of the device aliases visible to userspace so hotplug
loads the module for all supported devices.  Without the patch,
modinfo ipath_core only shows:

    alias:          pci:v00001FC1d0000000Dsv*sd*bc*sc*i*

instead of the correct:

    alias:          pci:v00001FC1d00000010sv*sd*bc*sc*i*
    alias:          pci:v00001FC1d0000000Dsv*sd*bc*sc*i*

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
2006-05-12 14:57:52 -07:00
Martin Habets 586152560a [SPARC]: Fix warning on prom_getproperty in openprom.c
Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-12 12:53:59 -07:00
Karsten Keil ef34814426 [TG3]: ethtool always report port is TP.
Even with fiber cards ethtool reports that the connected port is TP,
the patch fix this.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-12 12:49:08 -07:00
Linus Torvalds be1fd94fd6 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6:
  [PATCH] scx200_acb: Fix for the CS5535 errata
  [PATCH] scx200_acb: Fix resource name use after free
  [PATCH] scx200_acb: Fix return on init error
2006-05-12 12:14:52 -07:00
Linus Torvalds 0d38eddab9 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:
  [PATCH] USB: fix omninet driver bug
  [PATCH] USB: add ark3116 usb to serial driver
  [PATCH] usbserial: Fixes leak in serial_open() error path.
  [PATCH] usbserial: Fixes use-after-free in serial_open().
  [PATCH] USB: Emagic USB firmware loading fixes
  [PATCH] USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklist
  [PATCH] USB: Add Sieraa Wireless 580 evdo card to airprime.c
  [PATCH] USB: ftdi_sio: add device id for ACT Solutions HomePro ZWave interface
  [PATCH] USB: ftdi_sio: Add support for HCG HF Dual ISO RFID Reader
  [PATCH] USB: ub oops in block_uevent
  [PATCH] USB: usbcore: don't check the device's power source
  [PATCH] USB: fix OHCI PM regression
  [PATCH] USB: pegasus fixes (logstorm, suspend)
  [PATCH] USBATM: fix modinfo output
  [PATCH] USBATM: change the default speedtouch iso altsetting
  [PATCH] USB: fix bug in ohci-hcd.c ohci_restart()
2006-05-12 12:14:19 -07:00
Greg Kroah-Hartman df3fccb14a [PATCH] USB: fix omninet driver bug
I introduced this way back in 2.6.13 when adding the port lock logic.
This device talks out through different "ports" all at the same time, so
the lock logic was wrong, preventing any data from ever being sent
properly.

Thanks a lot to Bernhard Reiter <bernhard@intevation.de> for being
patient and helping with debugging this.

Cc: Bernhard Reiter <bernhard@intevation.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12 11:58:10 -07:00
Greg Kroah-Hartman 815ddc99dd [PATCH] USB: add ark3116 usb to serial driver
Based on Simon's original driver, with some minor code cleanups and
tidying by me.

Cc: Simon Schulz <simon@auctionant.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12 11:58:09 -07:00
Luiz Fernando Capitulino 71a84163ca [PATCH] usbserial: Fixes leak in serial_open() error path.
If serial_open() fails at the port assignment or mutex_lock_interruptible()
is interrupted, the 'serial' object will never be freed.

We should call kref_put() when those errors happens.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12 11:58:09 -07:00
Luiz Fernando Capitulino 704936a25b [PATCH] usbserial: Fixes use-after-free in serial_open().
If the device is disconnected while serial_open() is executing and
either try_module_get() or the device specific open function fails, the
kref_put() call in the 'bailout_kref_put' label will free the memory
pointed out by 'port'.

The subsequent dereferences in the 'bailout_kref_put' label will be
invalid.

The fix is just to assure kref_put() is called after any 'port' usage.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12 11:58:09 -07:00
Monty 16c23f7d88 [PATCH] USB: Emagic USB firmware loading fixes
It's become apparent as machines get faster that the emagic kernel firmware
loaders (based on the ezusb loader) have a reset race.  a 400MHz TiBook
never tripped it, but a 2GHz Pentium M seems to hit it about 30% of the
time.  The bug is seen as a hung USB box and the kernel error:

drivers/usb/misc/emi62.c: emi62_load_firmware - error loading firmware:
error = -110

The patch below inserts a delay after deasserting reset to allow the box to
settle before a new command is issued.  This affects only device startup.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12 11:58:09 -07:00
Olaf Hering 332bbf6138 [PATCH] USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklist
After recent changes, the USB keyboard as shipped with IBM pSeries systems
does not work anymore, unless the keyboard is replugged after reboot.
Adding this model to the blacklist fixes it.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12 11:58:09 -07:00
Ken Brush b68f7de02a [PATCH] USB: Add Sieraa Wireless 580 evdo card to airprime.c
This adds the Sierra Wireless card to airprime.c.

I tested this on my laptop.

Signed-off-by: Ken Brush <ken@cgi101.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12 11:58:08 -07:00
Linus Torvalds 2bf9d6d0f2 Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] 8250: add locking to console write function
  [SERIAL] Remove unconditional enable of TX irq for console
  [SERIAL] 8250: set divisor register correctly for AMD Alchemy SoC uart
  [SERIAL] AMD Alchemy UART: claim memory range
  [SERIAL] Clean up serial locking when obtaining a reference to a port
2006-05-11 15:46:42 -07:00
Linus Torvalds 6572b2064a Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET_SCHED]: HFSC: fix thinko in hfsc_adjust_levels()
  [IPV6]: skb leakage in inet6_csk_xmit
  [BRIDGE]: Do sysfs registration inside rtnl.
  [NET]: Do sysfs registration as part of register_netdevice.
  [TG3]: Fix possible NULL deref in tg3_run_loopback().
  [NET] linkwatch: Handle jiffies wrap-around
  [IRDA]: Switching to a workqueue for the SIR work
  [IRDA]: smsc-ircc: Minimal hotplug support.
  [IRDA]: Removing unused EXPORT_SYMBOLs
  [IRDA]: New maintainer.
  [NET]: Make netdev_chain a raw notifier.
  [IPV4]: ip_options_fragment() has no effect on fragmentation
  [NET]: Add missing operstates documentation.
2006-05-11 15:35:54 -07:00
Linus Torvalds f7a014af2d Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (25 commits)
  [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc
  [SCSI] lpfc 8.1.6 : Fix Data Corruption in Bus Reset Path
  [SCSI] mptspi: revalidate negotiation parameters after host reset and resume
  [SCSI] srp.h: avoid padding of structs
  [SCSI] ibmvscsi: fix leak when failing to send srp event
  [SCSI] qla2xxx: Correct eh_abort recovery logic.
  [SCSI] megaraid_{mm,mbox}: fix a bug in reset handler
  [SCSI] fusion - bug fix stack overflow in mptbase
  [SCSI] scsi: Add IBM 2104-DU3 to blist
  [SCSI] Fix DVD burning issues.
  [SCSI] SCSI: aic7xxx_osm_pci resource leak fix.
  [SCSI] - fusion - mptfc bug fix's to prevent deadlock situations
  [SCSI] mptfusion: bug fix's for raid components adding/deleting
  [SCSI] aic7xxx: ahc_pci_write_config() fix
  [SCSI] megaraid: unused variable
  [SCSI] qla2xxx: only free_irq() after request_irq() succeeds
  [SCSI] Overrun in drivers/scsi/sim710.c
  [SCSI] lpfc 8.1.5 : Change version number to 8.1.5
  [SCSI] lpfc 8.1.5 : Misc small fixes
  [SCSI] lpfc 8.1.5 : Additional fixes to LOGO, PLOGI, and RSCN processing
  ...
2006-05-11 15:34:33 -07:00
Linus Torvalds 0e44dc3837 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mthca: FMR ioremap fix
  IPoIB: Free child interfaces properly
  IB/mthca: Fix race in reference counting
  IB/srp: Fix tracking of pending requests during error handling
  IB: Fix display of 4-bit port counters in sysfs
2006-05-10 15:37:47 -07:00
Michael S. Tsirkin ce477ae4f8 IB/mthca: FMR ioremap fix
Addresses for ioremap must be calculated off of pci_resource_start;
we can't directly use the bus address as seen by the HCA.  Fix the
code that remaps device memory for FMR access.

Based on patch by Klaus Smolin.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-10 15:16:57 -07:00
Linus Torvalds 6314410dd1 Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6
* 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6:
  sis900: phy for FoxCon motherboard
  dl2k: use DMA_48BIT_MASK constant
  phy: mdiobus_register(): initialize all phy_map entries
  sky2: ifdown kills irq mask
2006-05-10 14:59:29 -07:00
James Cameron d8e95e52a9 sis900: phy for FoxCon motherboard
661FX7MI-S motherboard which uses the SiS 661FX chipset.  The patch adds
an entry to mii_chip_info for the transceiver.

The PHY ids were found using the sis900_c_122.diff patch from
http://brownhat.org/sis900.html but that patch didn't solve the problem,
because the PHY at address 1 was already being chosen.

Without my patch, when bursts of packets arrive from other hosts on a
LAN, the interface dropped one roughly 10% of the time, causing
retransmits.  There were fifth second pauses in refresh of large xterms,
and it made Netrek suck.  I can provide further test data.

Workaround in lieu of patch is to use mii-tool to advertise
100baseTx-HD, then force renegotiation.

I wasn't able to identify the actual transceiver, so the description
field is a guess.

This patch is similar to Artur Skawina's patch:
http://marc.theaimsgroup.com/?l=linux-netdev&m=114297516729079&w=2

I'm not sure, but I wonder if it means the default behaviour should be
changed, so as to better handle future transceivers.

Diff is against 2.6.16.13.

Signed-off-by: James Cameron <james.cameron@hp.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:04:52 -07:00
Francois Romieu 4c1b46226c dl2k: use DMA_48BIT_MASK constant
Typo will be harder with this one.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:04:22 -07:00
Herbert Valerio Riedel 64b1c2b42b phy: mdiobus_register(): initialize all phy_map entries
make sure phy_map entries whose PHY address is masked are initialized
to NULL, given that other code (such as mdiobus_unregister for
instance) assumes that non-NULL phy_map entries are allocated
phy_devices

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:03:57 -07:00
Stephen Hemminger f4ea431bb7 sky2: ifdown kills irq mask
Bringing down a port also masks off the status and other IRQ's
needed for device to function due to missing paren's.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:03:41 -07:00
Harald Welte 7fc5b1e3a1 [Cardman 40x0] Fix udev device creation
This patch corrects the order of the calls to register_chrdev() and
pcmcia_register_driver().  Now udev correctly creates userspace device
files /dev/cmmN and /dev/cmxN respectively.

Based on an earlier patch by Jan Niehusmann <jan@gondor.com>.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-10 13:46:02 -07:00
mdr@sgi.com 6dd727da92 [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc
A race condition exists in mptfc between the thread registering a device
with the fc transport and the scan work generated by the transport.
This race existed prior to the application of the mptfc bug fix patch.

mptfc_register_dev() calls fc_remote_port_add() with the FC_RPORT_ROLE_TARGET
bit set in the rport ids passed to the function.  Having this bit set causes
fc_remote_port_add() to schedule a scan of the device.

This scan can execute before mptfc_register_dev() can fill in the dd_data
in the rport structure.  When this happens, mptfc_target_alloc() will fail
because dd_data is null.

Attached is a patch which fixes the problem.  The patch changes the rport ids
passed to fc_remote_port_add() to not have the TARGET bit set.  This prevents
the scan from being scheduled.  After mptfc_register_dev() fills in the rport
dd_data field, fc_remote_port_rolechg() is called, changing the role of the
rport to TARGET.  Thus, the scan is scheduled after dd_data is filled
in which prevents the failure in mptfc_target_alloc().

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-10 09:54:42 -05:00
Jesper Juhl a50bb7b9af [TG3]: Fix possible NULL deref in tg3_run_loopback().
tg3_run_loopback doesn't check that dev_alloc_skb() returns anything
useful.

Even if dev_alloc_skb() fails to return an skb to us we'll happily go
on and assume it did, so we risk dereferencing a NULL pointer.  Much
better to fail gracefully by returning -ENOMEM than crashing here.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-09 23:14:35 -07:00
Roland Dreier 5941d079f2 IPoIB: Free child interfaces properly
When deleting a child interface with a non-default P_Key via
/sys/class/net/ibX/delete_child, the interface must be freed with
free_netdev() (rather than kfree() on the private data).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-09 22:54:59 -07:00
Christoph Hellwig 788252e661 [IRDA]: Switching to a workqueue for the SIR work
Since sir_kthread.c pretty much duplicates the workqueue
functionality, we'd better switch.  The SIR fsm has been merged into
sir_dev.c and thus sir_kthread.c is deleted.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-09 15:27:04 -07:00
David Brownell d94c77b9b5 [IRDA]: smsc-ircc: Minimal hotplug support.
Minimal PNP hotplug support for the smsc-ircc2 driver.  A modular
driver will be modprobed via hotplug, but still bypasses driver model
probing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-09 15:26:11 -07:00
Jordan Crouse 95563d343f [PATCH] scx200_acb: Fix for the CS5535 errata
This is a fix for the CS5535 errata 111:

When the SMBus controller tries to access a non-existing device, it sets
the NEGACK bit, SMBus I/O offset 01h[4], to 1 after it detects no
acknowledge at the ninth clock.  The specification states that the bit
can be cleared by writing a 1 to it, but under certain circumstances it
is possible for this bit to not clear.

Writing a 0 to the bit resets the internal state machine and clears the
issue.

Since all writable bits in ACBST are W1C bits (write-one-to-clear) the
second write doesn't affect any other logic except the buggy NEGACK
state machine. The second write clears an internal register which is
responsible for "overwriting" the NEGACK bit in ACBST.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-09 13:04:21 -07:00
Jean Delvare b33d0798e6 [PATCH] scx200_acb: Fix resource name use after free
We can't pass a string on the stack to request_region. As soon as we
leave the function that stack is gone and the string is lost. Let's
use the same string we identify the i2c_adapter with instead, it's
more simple, more consistent, and just works.

This is the second half of fix to bug #6445.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-09 13:04:21 -07:00
Jean Delvare 6f9c296388 [PATCH] scx200_acb: Fix return on init error
The scx200_acb driver shouldn't return failure after initialization
if it successfully registered at least one i2c_adapter, else we are
leaking resources. The driver was OK in that respect up to 2.6.16, a
recent change broke it.

This is part of the fix to bug #6445.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-09 13:04:21 -07:00
Roland Dreier a3285aa4ee IB/mthca: Fix race in reference counting
Fix races in in destroying various objects.  If a destroy routine
waits for an object to become free by doing

	wait_event(&obj->wait, !atomic_read(&obj->refcount));
	/* now clean up and destroy the object */

and another place drops a reference to the object by doing

	if (atomic_dec_and_test(&obj->refcount))
		wake_up(&obj->wait);

then this is susceptible to a race where the wait_event() and final
freeing of the object occur between the atomic_dec_and_test() and the
wake_up().  And this is a use-after-free, since wake_up() will be
called on part of the already-freed object.

Fix this in mthca by replacing the atomic_t refcounts with plain old
integers protected by a spinlock.  This makes it possible to do the
decrement of the reference count and the wake_up() so that it appears
as a single atomic operation to the code waiting on the wait queue.

While touching this code, also simplify mthca_cq_clean(): the CQ being
cleaned cannot go away, because it still has a QP attached to it.  So
there's no reason to be paranoid and look up the CQ by number; it's
perfectly safe to use the pointer that the callers already have.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-09 10:50:29 -07:00
Roland Dreier d945e1df28 IB/srp: Fix tracking of pending requests during error handling
If a SCSI abort completes, or the command completes successfully, then
the driver must remove the command from its queue of pending
commands.  Similarly, if a device reset succeeds, then all commands
queued for the given device must be removed from the queue.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-09 10:50:28 -07:00
Ralph Campbell d8b9f23b23 IB: Fix display of 4-bit port counters in sysfs
The code to display local_link_integrity_errors and
excessive_buffer_overrun_errors in
/sys/class/infiniband/<hca>/ports/<n>/counters/
uses the wrong shift to extract the 4 bit values.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-09 10:50:28 -07:00
Razvan Gavril 72a9f95842 [PATCH] USB: ftdi_sio: add device id for ACT Solutions HomePro ZWave interface
Signed-off-by: Razvan Gavril <razvan.g@plutohome.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:56 -07:00
Ian Abbott 20a0f47e18 [PATCH] USB: ftdi_sio: Add support for HCG HF Dual ISO RFID Reader
This patch adds support for ACG Identification Technologies GmbH's HF
Dual ISO Reader (an RFID tag reader) to the ftdi_sio driver's device ID
table.  The product ID was supplied by anotonios (anton at goto10 dot
org) on the ftdi-usb-sio-devel list and subsequently verified by myself
(Ian Abbott).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:55 -07:00
Pete Zaitcev 77ef6c4d6e [PATCH] USB: ub oops in block_uevent
In kernel 2.6.16, if a mounted storage device is removed, an oops happens
because ub supplies an interface device (and kobject) to the block layer,
but neglects to pin it. And apparently, the block layer expects its users
to pin device structures.

The code in ub was broken this way for years. But the bug was exposed only
by 2.6.16 when it started to call block_uevent on close, which traverses
device structures (kobjects actually).

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:55 -07:00
Alan Stern 436f5762bc [PATCH] USB: usbcore: don't check the device's power source
The choose_configuration() routine contains code the determine the
device's power source, so that configurations requiring external power
can be ruled out if the device is running on bus power.  Unfortunately
it turns out that some devices have errors in their config descriptors
and other devices don't like the GET_DEVICE_STATUS request.

Since that information wasn't used for anything else, this patch (as673)
removes the code, leaving only a comment.  It fixes bugzilla entry
#6448.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:55 -07:00
David Brownell db4cefaaea [PATCH] USB: fix OHCI PM regression
This fixes a small regression in USB controller power usage for many
OHCI controllers, notably including every non-PCI version of OHCI:  on
those systems, the runtime autosuspend mechanism is no longer enabled.

The change moves to saner defaults.  All root hubs are expected to handle
remote wakeup (and hence autosuspend), although drivers for buggy silicon
may override that default.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:55 -07:00
David Brownell 7e713b8256 [PATCH] USB: pegasus fixes (logstorm, suspend)
Teach "pegasus" to handle a few of the disconnect fault paths
without hundreds of usless syslog messages.

Handle the carrier check workqueue entry even if the driver has
not been opened.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:55 -07:00
Duncan Sands 6275cdfa0f [PATCH] USBATM: fix modinfo output
Because of the way stringify works, using an expression
like 64 * 1024 for UDSL_MAX_BUF_SIZE results in 64 * 1024
turning up in the modinfo output instead of 65536.  So use
65536 directly (this was the only way I found of fixing this).

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:54 -07:00
Duncan Sands 67c752b41a [PATCH] USBATM: change the default speedtouch iso altsetting
The maximum possible bandwidth for a speedtouch modem is about 7Mbaud.
You can only get this by using isochronous urbs (enable_isoc=1) and
altsetting 3.  With the current default altsetting of 2, the modem
maxes out at about 4Mbaud.  So change the default altsetting to 3
when using isochronous urbs.  It would be nice to base the altsetting
on the detected line speed, but that's hard given the current design.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:54 -07:00
David Brownell 839ab1d4ce [PATCH] USB: fix bug in ohci-hcd.c ohci_restart()
A loop on a power-lost resume path used the wrong index.
I suspect khubd has been working around such bugs.
Noticed by Andreas Mohr <andi@rhlx01.fht-esslingen.de>.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:54 -07:00
Stephen Hemminger 23aee82e75 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2006-05-08 16:01:20 -07:00
Jens Osterkamp 8ec9345965 spidernet: enable support for bcm5461 ethernet phy
A newer board revision changed the type of ethernet phy.
Moreover, this generalizes the way that a phy gets switched
into fiber mode when autodetection is not available.

Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:01:12 -07:00
Jens Osterkamp b636d17a3b spidernet: introduce new setting
We found a new chip setting that we need in order
to make the driver work more reliable.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:01:11 -07:00
Sergei Shtylyov aedc0e520e Fix RTL8019AS init for Toshiba RBTX49xx boards
Ensure that 8-bit mode is selected for the on-board Realtek RTL8019AS chip
on Toshiba RBHMA4x00, get rid of the duplicate #ifdef's when setting
ei_status.word16.
    The chip's datasheet says that the PSTOP register shouldn't exceed 0x60 in
8-bit mode -- ensure this too.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:58 -07:00
Herbert Valerio Riedel 8cd35da094 au1000_eth.c: use ether_crc() from <linux/crc32.h>
since the au1000 driver already selects the CRC32 routines, simply replace
the internal ether_crc() implementation with the semantically equivalent
one from <linux/crc32.h>

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:47 -07:00
Stephen Hemminger 6d4b0f617d sky2: version 1.3
Update version number, to track changes.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:28 -07:00
Stephen Hemminger ed6d32c7a9 Add more support for the Yukon Ultra chip found in dual core centino laptops.
The newest Yukon Ultra chipset's require more special tweaks.
They seem to be like the Yukon XL chipsets. This code is transliterated
from the latest SysKonnect driver; I don't have any Ultra hardware.

Signed-off-by: Stephe Hemminger <shemminger@osdl.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger 72cb852920 sky2: synchronize irq on remove
Need to make sure interrupt is not racing with unregister of
network device.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger e71ebd7327 sky2: dont write status ring
It is more efficient not to write the status ring from the
processor and just read the active portion.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger 01bd75645f sky2: edge triggered workaround enhancement
Need to make the edge-triggered workaround timer faster to get marginally
better peformance. The test_and_set_bit in schedule_prep() acts as a barrier
already. Make it a module parameter so that laptops who are concerned
about power can set it to 0; and user's stuck with broken BIOS's
can turn the driver into pure polling.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger cb5d954730 sky2: use mask instead of modulo operation
Gcc isn't smart enough to know that it can do a modulo
operation with power of 2 constant by doing a mask.
So add macro to do it for us.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger f55925d7eb sky2: tx ring index mask fix
Mask for transmit ring status was picking up bits from the
unused sync ring.  They were always zero, so far...
Also, make sure to remind self not to make tx ring too big.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:25 -07:00
Stephen Hemminger 1e5f1283a2 sky2: status irq hang fix
The status interrupt flag should be cleared before processing,
not afterwards to avoid race. Need to process in poll routine
even if no new interrupt status. This is a normal occurrence when
more than 64 frames (NAPI weight) are processed in one poll routine.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:24 -07:00
Stephen Hemminger d324031245 sky2: backout NAPI reschedule
This is a backout of earlier patch.

The whole rescheduling hack was a bad idea. It doesn't really solve
the problem and it makes the code more complicated for no good reason.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:23 -07:00
Andi Kleen 6810b548b2 [PATCH] x86_64: Move ondemand timer into own work queue
Taking the cpu hotplug semaphore in a normal events workqueue
is unsafe because other tasks can wait for any workqueues with
it hold. This results in a deadlock.

Move the DBS timer into its own work queue which is not
affected by other work queue flushes to avoid this.

Has been acked by Venkatesh.

Cc: venkatesh.pallipadi@intel.com
Cc: cpufreq@lists.linux.org.uk
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-08 09:34:56 -07:00
Linus Torvalds 96b8eaa14a Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IRDA] irda-usb: use NULL instead of 0
  [IPV4]: Remove likely in ip_rcv_finish()
  [NET]: Create netdev attribute_groups with class_device_add
  [CLASS DEVICE]: add attribute_group creation
2006-05-08 09:11:10 -07:00
Linus Torvalds bed7a56033 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: Do not overwrite makefile as anohter user
  kbuild: drivers/video/logo/ - fix ident glitch
  kbuild: fix gen_initramfs_list.sh
  kbuild modpost - relax driver data name
  kbuild: removing .tmp_versions considered harmful
  kbuild: fix modpost segfault for 64bit mipsel kernel
2006-05-08 09:10:44 -07:00
Randy Dunlap 0eb1bd210d [IRDA] irda-usb: use NULL instead of 0
Use NULL instead of 0 for a null pointer value (sparse warning):

drivers/net/irda/irda-usb.c:1781:30: warning: Using plain integer as NULL pointer

Also, correct timeout argument to use milliseconds instead of jiffies.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-06 18:34:10 -07:00
Stephen Hemminger 1498221d51 [CLASS DEVICE]: add attribute_group creation
Extend the support of attribute groups in class_device's to allow
groups to be created as part of the registration process. This allows
network device's to avoid race between registration and creating
groups.

Note that unlike attributes that are a property of the class object,
the groups are a property of the class_device object. This is done
because there are different types of network devices (wireless for
example).

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-06 17:55:11 -07:00
Russell King f12267011d [ARM] rtc-sa1100: fix compiler warnings and error cleanup
Fix:
drivers/rtc/rtc-sa1100.c: In function `sa1100_rtc_proc':
drivers/rtc/rtc-sa1100.c:298: warning: unsigned int format, long unsigned int arg (arg 3)

and arrange for sa1100_rtc_open() to pass the devid to free_irq()
rather than NULL.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-06 11:29:21 +01:00
David Woodhouse 178e0cc5ff [PATCH] bcm43xx: Fix access to non-existent PHY registers
Fix the conditions under which we poke at the APHY registers in
bcm43xx_phy_initg() to avoid a machine check on chips where they don't
exist.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Michael Buesch 869aaab181 [PATCH] bcm43xx: Fix array overrun in bcm43xx_geo_init
The problem here is that the bcm34xx driver and the ieee80211
stack do not agree on what channels are possible for 802.11a.
The ieee80211 stack only wants channels between 34 and 165, while
the bcm43xx driver accepts anything from 0 to 200. I made the
bcm43xx driver comply with the ieee80211 stack expectations, by
using the proper constants.

Signed-off-by: Jean Delvare <jdelvare@suse.de>

[mb]: Reduce stack usage by kzalloc-ing ieee80211_geo

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Stefano Brivio f9f7b9602e [PATCH] bcm43xx: check for valid MAC address in SPROM
Check for valid MAC address in SPROM fields instead of relying on
PHY type while setting the MAC address in the networking subsystem,
as some devices have multiple PHYs.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Michael Buesch 5b4b9775a0 [PATCH] bcm43xx: fix iwmode crash when down
This fixes a crash when

	iwconfig ethX mode foo

is done before

	ifconfig ethX up

or after

	ifconfig ethX down

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-05 16:55:23 -04:00
Linus Torvalds d98550e334 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [PATCH] powerpc: Use the ibm,pa-features property if available
  powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses
  [PATCH] ppc32 CPM_UART: fixes and improvements
  [PATCH] ppc32 CPM_UART: Fixed break send on SCC
  [PATCH] powerpc/kprobes: fix singlestep out-of-line
  [PATCH] powerpc/pseries: avoid crash in PCI code if mem system not up
2006-05-04 15:09:52 -07:00
Linus Torvalds f9cc8475e7 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3490/1: i.MX: move uart resources to board files
  [ARM] 3488/1: make icedcc_putc do the right thing
  [ARM] 3487/1: IXP4xx: Support non-PCI systems
  [ARM] 3486/1: Mark memory as clobbered by the ARM _syscallX() macros
2006-05-04 14:52:43 -07:00
Linus Torvalds 6fc56ccfe4 Merge master.kernel.org:/home/rmk/linux-2.6-mmc
* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [MMC] Move set_ios debugging into mmc.c
  [MMC] Correct mmc_request_done comments
  [MMC] PXA: reduce the number of lines PXAMCI debug uses
  [MMC] PXA and i.MX: don't avoid sending stop command on error
  [MMC] extend data timeout for writes
  [ARM] 3485/1: i.MX: MX1 SD/MMC fix of unintentional double start possibility
2006-05-04 14:52:27 -07:00
Linus Torvalds 936ef1d48a Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [DECNET]: Fix level1 router hello
  [TCP]: Fix sock_orphan dead lock
  [ROSE]: Eleminate HZ from ROSE kernel interfaces
  [NETROM]: Eleminate HZ from NET/ROM kernel interfaces
  [AX.25]: Eleminate HZ from AX.25 kernel interfaces
  [ROSE]: Fix routing table locking in rose_remove_neigh.
  [AX.25]: Move AX.25 symbol exports
  [HAMRADIO]: Remove remaining SET_MODULE_OWNER calls from hamradio drivers.
  [AX25, ROSE]: Remove useless SET_MODULE_OWNER calls.
  [AX.25]: Spelling fix
  [ROSE]: Remove useless prototype for rose_remove_neigh().
  [NETFILTER]: x_tables: don't use __copy_{from,to}_user on unchecked memory in compat layer
  [NETFILTER]: H.323 helper: Change author's email address
  [NETFILTER]: NAT: silence unused variable warnings with CONFIG_XFRM=n
  [NETFILTER]: H.323 helper: fix use of uninitialized data
  [NETFILTER]: H.323 helper: fix endless loop caused by invalid TPKT len
2006-05-04 13:25:19 -04:00
Russell King 920e70c5c6 [MMC] Move set_ios debugging into mmc.c
Rather than having every driver duplicate the set_ios debugging,
provide a single version in mmc.c which can be expanded as we
add additional functionality.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-04 18:22:51 +01:00
Sascha Hauer 5b80234435 [ARM] 3490/1: i.MX: move uart resources to board files
Patch from Sascha Hauer

This patch moves the i.MX uart resources and the gpio pin setup to the
board files. This allows the boards to decide how many internal uarts
are connected to the outside world and whether they use rts/cts or
not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-04 14:07:42 +01:00
Russell King fe10c6abea [MMC] Correct mmc_request_done comments
mmc_request_done should be called at the end of handling a request, not
between the data and initial command parts of the request.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-04 13:51:45 +01:00
Ralf Baechle DL5RB 3ab33dcc82 [HAMRADIO]: Remove remaining SET_MODULE_OWNER calls from hamradio drivers.
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-03 23:24:35 -07:00
Brent Casavant 8683dc9990 [PATCH] Altix: correct ioc4 port order
Currently loading the ioc3 as a module will cause the ports to be numbered
in reverse order.  This mod maintains the proper order of cards for port
numbering.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Cc: Pat Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-03 20:05:41 -07:00
mark gross 96941026a5 [PATCH] EDAC Coexistence with BIOS
Address the issue of EDAC/BIOS coexistence for the e752x chip-sets.

We have found a problem where the BIOS will start the system with the error
registers (dev0:fun1) hidden and assuming it has exclusive access to them.
The edac driver violates this assumption.

The workaround this patch offers is to honor the hidden-ness as an
indication that it is not safe to use those registers.

Signed-off-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-03 20:05:41 -07:00
James Smart 0b18ac42aa [SCSI] lpfc 8.1.6 : Fix Data Corruption in Bus Reset Path
This patch updates the lpfc driver to revision 8.1.6, which includes
the following changes:

 - Fix data corruption in SCSI BUS reset path, due to reusing
   the same request structure for each target.
 - Change version number to 8.1.6

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-03 12:12:39 -05:00
Eric Moore 6e1cad0276 [SCSI] mptspi: revalidate negotiation parameters after host reset and resume
This is a bug fix for mptspi driver, where after a host reset or
resume, we revalidate the negotiation parameters for all devices.
This bug was introduced when the driver was ported to use the spi
transport layer.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-03 12:11:51 -05:00
Vitaly Bordug 6e1976961c [PATCH] ppc32 CPM_UART: fixes and improvements
A number of small issues are fixed, and added the header file, missed from the
original series. With this, driver should be pretty stable as tested among
both platform-device-driven and "old way" boards. Also added missing GPL
statement , and updated year field on existing ones to reflect
code update.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-05-03 23:06:44 +10:00
Vitaly Bordug 61f5657c50 [PATCH] ppc32 CPM_UART: Fixed break send on SCC
SCC uart sends a break sequence each time it is stopped with the
CPM_CR_STOP_TX command. That means that each time an application closes the
serial device, a break is transmitted. To fix this, graceful tx stop is
issued for SCC.

Signed-off-by: David Jander <david.jander@protonic.nl>
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-05-03 23:06:43 +10:00
Ayaz Abdulla ebf34c9b6f forcedeth: fix multi irq issues
This patch fixes the issues with multiple irqs.

I am resending based on feedback. I decoupled the dma mask for
consistent memory and fixed leak with multiple irq in error path.

Thanks to Manfred for catching the spin lock problem.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
2006-05-02 15:26:06 -04:00
Craig Brind 3e0d167a6b [PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards
Fixes Rhine I cards disclosing fragments of previously transmitted frames
in new transmissions.

Before transmission, any socket buffer (skb) shorter than the ethernet
minimum length of 60 bytes was zero-padded.  On Rhine I cards the data can
later be copied into an aligned transmission buffer without copying this
padding.  This resulted in the transmission of the frame with the extra
bytes beyond the provided content leaking the previous contents of this
buffer on to the network.

Now zero-padding is repeated in the local aligned buffer if one is used.

Following a suggestion from the via-rhine maintainer, no attempt is made
here to avoid the duplicated effort of padding the skb if it is known that
an aligned buffer will definitely be used.  This is to make the change
"obviously correct" and allow it to be applied to a stable kernel if
necessary.  There is no change to the flow of control and the changes are
only to the Rhine I code path.

The patch has run on an in-service Rhine-I host without incident.  Frames
shorter than 60 bytes are now correctly zero-padded when captured on a
separate host.  I see no unusual stats reported by ifconfig, and no unusual
log messages.

Signed-off-by: Craig Brind <craigbrind@gmail.com>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-02 15:21:52 -04:00
Olaf Hering b0b8dab288 [PATCH] mv643xx_eth: provide sysfs class device symlink
On Sat, Mar 11, Olaf Hering wrote:
> Why is the /sys/class/net/eth0/device symlink not created for the
> mv643xx_eth driver? Does this work for other platform device drivers?
> Seems to work for the ps2 keyboard at least.

The SET_NETDEV_DEV has to be done before a call to register_netdev.  With
the new patch below, the device symlink for the platform device was
created.  Unfortunately, after the 4 ls commands, the network connection
died.  No idea if the box crashed or if something else broke, lost remote
access.

Provide sysfs 'device' in /class/net/ethN Also, set module owner field,
like pcnet32 driver does.

Signed-off-by: Olaf Hering <olh@suse.de>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-02 15:18:54 -04:00
Russell King d78e9079af [MMC] PXA: reduce the number of lines PXAMCI debug uses
There's no reason for the PXAMCI debug code to print so many lines - it
causes the kernel buffer to overflow when trying to debug this driver.
Remove some debug messages which are duplicated by core code, and
combine other messages, resulting in fewer characters written to the
kernel log.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-02 20:18:53 +01:00
Russell King 58741e8b36 [MMC] PXA and i.MX: don't avoid sending stop command on error
Always send a stop command at the end of a data transfer.  If we avoid
sending the stop command, some cards remain in data transfer mode, and
refuse to accept further read/write commands.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-02 20:02:39 +01:00
Russell King 37be4e7809 [MMC] extend data timeout for writes
The CSD contains a "read2write factor" which determines the multiplier to
be applied to the read timeout to obtain the write timeout.  We were
ignoring this parameter, resulting in the possibility for writes being
timed out too early.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-02 17:24:59 +01:00
Russell King d8a5a8d7cc [SERIAL] 8250: add locking to console write function
x86 SMP breaks as a result of the previous change, we have no real
option other than to add locking to the 8250 console write function.
If an oops is in progress, try to acquire the lock.  If we fail to
do so, continue anyway.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-02 16:04:29 +01:00
Linus Torvalds cf105601df Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ipath: tidy up white space in a few files
  IB/ipath: fix label name in interrupt handler
  IB/ipath: improve sparse annotation
  IB/ipath: simplify IB timer usage
  IB/ipath: simplify RC send posting
  IB/ipath: prevent hardware from being accessed during reset
  IB/ipath: fix verbs registration
  IB/ipath: change handling of PIO buffers
  IB/ipath: iterate over correct number of ports during reset
  IB/ipath: set up 32-bit DMA mask if 64-bit setup fails
  IB/ipath: fix race with exposing reset file
  IB/mthca: Fix offset in query_gid method
2006-05-01 18:26:31 -07:00
Atsushi Nemoto f3537ea7b9 [PATCH] genrtc: fix read on 64-bit platforms
Fix genrtc's read() routine for 64-bit platforms.  Current gen_rtc_read()
stores 64bit integer and returns 8 even if an user tried to read a 32bit
integer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 18:17:47 -07:00
Atsushi Nemoto 3418ff7611 [PATCH] RTC: rtc-dev tweak for 64-bit kernel
Make rtc-dev work well on 64-bit platforms with 32-bit userland.  On those
platforms, users might try to read 32-bit integer value.  This patch make
rtc-dev's read() work well for both "int" and "long" size.  This tweak is came
from genrtc driver.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 18:17:46 -07:00
Heiko Carstens 022e4fc0fb [PATCH] s390: fix ipd handling
As pointed out by Paulo Marques <pmarques@grupopie.com> MAX_IPD_TIME is by
a factor of ten too small.  Since this means that we allow ten times more
IPDs in the intended time frame this could result in a cpu check stop of a
physical cpu.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 18:17:46 -07:00
Pat Gefre 2c43630fb0 [PATCH] Altix: correct ioc3 port order
Currently loading the ioc3 as a module will cause the ports to be numbered
in reverse order.  This mod maintains the proper order of cards for port
numbering.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 18:17:45 -07:00
NeilBrown 5e7dd2ab6b [PATCH] md: Fix 'rdev->nr_pending' count when retrying barrier requests
When retrying a failed BIO_RW_BARRIER request, we need to keep the reference
in ->nr_pending over the whole retry.  Currently, we only hold the reference
if the failed request is the *last* one to finish - which is silly, because it
would normally be the first to finish.

So move the rdev_dec_pending call up into the didn't-fail branch.  As the rdev
isn't used in the later code, calling rdev_dec_pending earlier doesn't hurt.

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-05-01 18:17:42 -07:00
NeilBrown 62de608da0 [PATCH] md: Improve detection of lack of barrier support in raid1
Move the test for 'do barrier work' down a bit so that if the first write to a
raid1 is a BIO_RW_BARRIER write, the checking done by superblock writes will
cause the right thing to happen.

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-05-01 18:17:42 -07:00
NeilBrown bea2771871 [PATCH] md: Change ENOTSUPP to EOPNOTSUPP
Because that is what you get if a BIO_RW_BARRIER isn't supported!

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-05-01 18:17:42 -07:00
NeilBrown e0a33270ed [PATCH] md: Fixed refcounting/locking when attempting read error correction in raid10
We need to hold a reference to rdevs while reading and writing to attempt to
correct read errors.  This reference must be taken under an rcu lock.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 18:17:42 -07:00
NeilBrown df30d0f4ca [PATCH] md: Avoid oops when attempting to fix read errors on raid10
We should add to the counter for the rdev *after* checking if the rdev is
NULL!!!

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 18:17:42 -07:00
Bastian Blank 235acec78e [PATCH] s390: make qeth buildable
Signed-off-by: Bastian Blank <bastian@waldi.eu.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 18:17:42 -07:00
Bryan O'Sullivan f6f0413e10 IB/ipath: tidy up white space in a few files
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-01 12:14:23 -07:00
Bryan O'Sullivan d562a5ae69 IB/ipath: fix label name in interrupt handler
Names that are the opposite of their intended meanings are not so helpful.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-01 12:14:22 -07:00
Bryan O'Sullivan ae15f540cc IB/ipath: improve sparse annotation
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-01 12:14:21 -07:00
Bryan O'Sullivan 9b2017f1e1 IB/ipath: simplify IB timer usage
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-01 12:14:21 -07:00
Bryan O'Sullivan 76f0dd141b IB/ipath: simplify RC send posting
Remove some unnecessarily complicated tests.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-01 12:14:20 -07:00
Bryan O'Sullivan c71c30dcba IB/ipath: prevent hardware from being accessed during reset
The reset code now turns off the PRESENT flag during a reset, so that
other code won't attempt to access a device that's in mid-reset.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-01 12:14:16 -07:00
Bryan O'Sullivan fccea66364 IB/ipath: fix verbs registration
Remember when the verbs layer unregisters from the lower-level code.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-01 12:14:15 -07:00