1
0
Fork 0
Commit Graph

12482 Commits (6c5240ae7f48c83fcaa8e24fa63e7eb09aba5651)

Author SHA1 Message Date
Chris Leech 0bbd5f4e97 [I/OAT]: Driver for the Intel(R) I/OAT DMA engine
Adds a new ioatdma driver

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-17 21:18:46 -07:00
Chris Leech c13c8260da [I/OAT]: DMA memcpy subsystem
Provides an API for offloading memory copies to DMA devices

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-17 21:18:43 -07:00
Roland Dreier 9ead190bfd IB/uverbs: Don't serialize with ib_uverbs_idr_mutex
Currently, all userspace verbs operations that call into the kernel
are serialized by ib_uverbs_idr_mutex.  This can be a scalability
issue for some workloads, especially for devices driven by the ipath
driver, which needs to call into the kernel even for datapath
operations.

Fix this by adding reference counts to the userspace objects, and then
converting ib_uverbs_idr_mutex into a spinlock that only protects the
idrs long enough to take a reference on the object being looked up.
Because remove operations may fail, we have to do a slightly funky
two-step deletion, which is described in the comments at the top of
uverbs_cmd.c.

This also still leaves ib_uverbs_idr_lock as a single lock that is
possibly subject to contention.  However, the lock hold time will only
be a single idr operation, so multiple threads should still be able to
make progress, even if ib_uverbs_idr_lock is being ping-ponged.

Surprisingly, these changes even shrink the object code:

add/remove: 23/5 grow/shrink: 4/21 up/down: 633/-693 (-60)

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:44:49 -07:00
Roland Dreier c93b6fbaa9 IB/mthca: Make all device methods truly reentrant
Documentation/infiniband/core_locking.txt says:

  All of the methods in struct ib_device exported by a low-level
  driver must be fully reentrant.  The low-level driver is required to
  perform all synchronization necessary to maintain consistency, even
  if multiple function calls using the same object are run
  simultaneously.

However, mthca's modify_qp, modify_srq and resize_cq methods are
currently not reentrant.  Add a mutex to the QP, SRQ and CQ structures
so that these calls can be properly serialized.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:41 -07:00
Roland Dreier c9c5d9feef IB/mthca: Fix memory leak on modify_qp error paths
Some error paths after the mthca_alloc_mailbox() call in mthca_modify_qp()
just do a "return -EINVAL" without freeing the mailbox.  Convert these
returns to "goto out" to avoid leaking the mailbox storage.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:41 -07:00
Roland Dreier 3463175d6e IB/uverbs: Factor out common idr code
Factor out common code for adding a userspace object to an idr into a
function idr_add_uobj().  This shrinks both the source and object code:

add/remove: 1/0 grow/shrink: 0/6 up/down: 57/-220 (-163)
function                                     old     new   delta
idr_add_uobj                                   -      57     +57
ib_uverbs_create_ah                          543     512     -31
ib_uverbs_create_srq                         662     630     -32
ib_uverbs_reg_mr                             737     699     -38
ib_uverbs_create_cq                          639     600     -39
ib_uverbs_alloc_pd                           485     446     -39
ib_uverbs_create_qp                         1020     979     -41

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:40 -07:00
Roland Dreier 92b1582268 IB/uverbs: Don't decrement usecnt on error paths
In error paths when destroying an object, uverbs should not decrement
associated objects' usecnt, since ib_dereg_mr(), ib_destroy_qp(),
etc. already do that.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:40 -07:00
Ganapathi CH 77f76013e3 IB/uverbs: Release lock on error path
If ibdev->alloc_ucontext() fails then ib_uverbs_get_context() does not
unlock file->mutex before returning error.

Signed-off by: Ganapathi CH <cganapathi@novell.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:40 -07:00
Sean Hefty ca222c6b2c IB/cm: Use address handle helpers
Use new ib_init_ah_from_wc() and ib_init_ah_from_path() helper
functions to clean up the IB CM.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:40 -07:00
Sean Hefty 6d969a471b IB/sa: Add ib_init_ah_from_path()
Add a call to initialize address handle attributes given a path record.
This is used by the CM, and would be useful for users of UD QPs.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:39 -07:00
Sean Hefty 4e00d69454 IB: Add ib_init_ah_from_wc()
Add a function to initialize address handle attributes from a work
completion.  This functionality is duplicated by both verbs and the CM.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:39 -07:00
Sean Hefty 75af908851 IB/ucm: Get rid of duplicate P_Key parameter
The P_Key is provided into a SIDR REQ in two places, once as a
parameter, and again in the path record.  Remove the P_Key as a
parameter and always use the one given in the path record.

This change has no practical effect on ABI functionality.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:39 -07:00
Ishai Rabinovitz 526b4caa0a IB/srp: Factor out common request reset code
Misc cleanups in ib_srp:
1) I think that it is more efficient to move the req entries from req_list
   to free_list in srp_reconnect_target (rather than rebuild the free_list).
   (In any case this code is shorter).
2) This allows us to reuse code in srp_reset_device and srp_reconnect_target
   and call a new function srp_reset_req.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:38 -07:00
Ramachandra K 0c0450db31 IB/srp: Support SRP rev. 10 targets
There has been a change in the format of port identifiers between
revision 10 of the SRP specification and the current revision 16A.

Revision 10 specifies port identifier format as

  lower 8 bytes :  GUID   upper 8 bytes :  Extension

Whereas revision 16A specifies it as 

 lower 8 bytes :  Extension  upper 8 bytes :  GUID

There are older targets (e.g. SilverStorm Virtual Fibre Channel
Bridge) which conform to revision 10 of the SRP specification.

The I/O class of revision 10 is 0xFF00 and the I/O class of revision
16A is 0x0100.

For supporting older targets, this patch:

1) Adds a new optional target creation parameter "io_class". Default
   value of io_class is 0x0100 (i.e. revision 16A)
2) Uses the correct port identifier format for targets with IO class
   of 0xFF00 (i.e. conforming to revision 10)

Signed-off-by: Ramachandra K <rkuchimanchi@silverstorm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:38 -07:00
Or Gerlitz 6c8c1aa25d IB/fmr: Use device's max_map_map_per_fmr attribute in FMR pool.
When creating a FMR pool, query the IB device and use the returned
max_map_map_per_fmr attribute as for the max number of FMR remaps. If
the device does not suport querying this attribute, use the original
IB_FMR_MAX_REMAPS (32) default.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:37 -07:00
Or Gerlitz d4cb0784fd IB/mthca: Fill in max_map_per_fmr device attribute
Report the true max_map_per_fmr value from mthca_query_device(),
taking into account the change in FMR remapping introduced by the
Sinai performance optimization.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:37 -07:00
Roland Dreier 6eddb5cb90 IB/ipath: Add client reregister event generation
Generate a client reregister event instead of a LID change event when
client reregister bit is set.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:37 -07:00
Leonid Arsh 12bbb2b7be IB/mthca: Add client reregister event generation
Change the mthca snoop of MADs that set PortInfo to check if the SM
has set the client reregister bit, and if it has, generate a client
reregister event.  If the bit is not set, just generate a LID change
event as usual.

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:36 -07:00
Leonid Arsh da2ab62ab5 IB: Move struct port_info from ipath to <rdma/ib_smi.h>
Move ipath's struct port_info into <rdma/ib_smi.h>, so that it can be
used by mthca to implement client reregister support.

Remove the __attribute__((packed)) because all the members of the struct
are naturally aligned anyway.

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:36 -07:00
Leonid Arsh 508e434123 IPoIB: Handle client reregister events
Handle client reregister events by treating them just like LID or
SM changes -- flush all cached paths and rejoin multicast groups.

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:36 -07:00
Jack Morgenstein 37c22a7721 IPoIB: Fix kernel unaligned access on ia64
Fix misaligned access faults on ia64: never cast a misaligned
neighbour->ha + 4 pointer to union ib_gid type; pass a void * pointer
instead.  The memcpy was being optimized to use full word accesses
because the compiler thought that union ib_gid is always aligned.

The cast in IPOIB_GID_ARG is safe, since it is fixed to access each
byte separately.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:35 -07:00
Roland Dreier 31c02e2157 IPoIB: Avoid using stale last_send counter when reaping AHs
The comparisons of priv->tx_tail to ah->last_send in ipoib_free_ah()
and ipoib_post_receive() are slightly unsafe, because priv->tx_lock is
not held and hence a stale value of ah->last_send might be used, which
would lead to freeing an AH before the driver was really done with it.
The simple way to fix this is to the optimization of early free from
ipoib_free_ah() and unconditionally queue AHs for reaping, and then
take priv->tx_lock in __ipoib_reap_ah().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:34 -07:00
Jack Morgenstein 9874e74655 IB/mad: Check GID/LID when matching requests
Check GID/LID for requester side when searching for request which
matches received response.  This is in order to guarantee uniqueness
if the same TID is used when requesting via multiple source LIDs (when
LMC is not zero).  Use ports' cached LMC to perform the check.

Further, do not perform LID check for direct-routed packets, since
the permissive LID makes a proper check impossible.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:34 -07:00
Jack Morgenstein 6fb9cdbf2c IB: Add caching of ports' LMC
Add an LMC cache to struct ib_device, and add a function
ib_get_cached_lmc() to query the cache.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:34 -07:00
Michael S. Tsirkin 856c256f88 IB/cm: remove unneeded flush_workqueue
destroy_workqueue() already does flush_workqueue().

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
2006-06-17 20:37:33 -07:00
Sean Hefty 4be10c1e6d IB/ucm: convert semaphore to mutex
Convert semaphore in ib_ucm_file to a real mutex.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:33 -07:00
Roland Dreier 6bfa24fa3e IB/srp: Get rid of "Target has req_lim 0" messages
It's perfectly valid for a connection to an SRP target to have a
request limit of 0, so get rid of the message about it, which can spam
kernel logs even with printk_ratelimit().  Keep a count of such events
in a "zero_req_lim" SCSI host attribute instead, so someone who cares
can look at the statistics.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:33 -07:00
Ishai Rabinovitz b7ac4ab497 IB/srp: Handle DREQ events from CM
Handle IB_CM_DREQ_ERROR and IB_CM_DREQ_RECEIVED events from the CM,
instead of just printing "Unhandled CM event".  In the case of
DREQ_ERROR, just ignore the event -- a TIMEWAIT_EXIT will be generated
also.  For DREQ_RECEIVED, send a DREP in response to shut the
connection down cleanly.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:32 -07:00
Vu Pham 74b0a15b5e IB/srp: Allow sg_tablesize to be adjusted
Make the sg_tablesize used by SRP adjustable at module load time via a
module parameter.  Calculate the corresponding IU length required to
support this.

Signed-off-by: Vu Pham <vu@mellanox.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:32 -07:00
Vu Pham 52fb2b50c4 IB/srp: Allow cmd_per_lun to be set per target port
Allow userspace to throttle traffic on a given connection to a target
port by adding "max_cmd_per_lun=xyz" to lower the cmd_per_lun value
set for that scsi_host.

Signed-off-by: Vu Pham <vu@mellanox.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:31 -07:00
Ishai Rabinovitz 0c5b395239 IB/srp: Clean up loop in srp_remove_one()
Interrupts will always be enabled in srp_remove_one(), so
spin_lock_irq() can be used instead of spin_lock_irqsave().
Also, the loop takes target->scsi_host->host_lock, so target->state
can just be set to SRP_TARGET_REMOVED witout testing the old value.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:31 -07:00
Roland Dreier 403a496fd4 IB: Make needlessly global ib_mad_cache static
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:31 -07:00
Matthew Wilcox b3589fd490 IB/srp: Change target_mutex to a spinlock
The SRP driver never sleeps while holding target_mutex, and it's just
used to protect some simple list operations, so hold times will be
short.  So just convert it to a spinlock, which is smaller and faster.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:30 -07:00
Matthew Wilcox 549c5fc2c8 IB/srp: Get rid of unneeded use of list_for_each_entry_safe()
list_for_each_entry_safe() is used in one place where the list isn't
modified.  So just change it to list_for_each_entry().

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:30 -07:00
Matthew Wilcox 1962a4a1e4 IB/srp: Use SCAN_WILD_CARD from SCSI headers
SCAN_WILD_CARD is indeed available from <scsi/scsi.h>, which is
already included.  So get rid of private hack.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:30 -07:00
Roland Dreier e9cd59418f IB/mthca: Convert FW commands to use wait_for_completion_timeout()
The kernel has had wait_for_completion_timeout() for a long time now.
mthca should use it to handle FW commands timing out, instead of
implementing the same thing in a much more complicated way by using
wait_for_completion() along with a timer that does complete().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:30 -07:00
Roland Dreier f5358a172f IB/srp: Use FMRs to map gather/scatter lists
Create an SRP FMR pool on HCAs that support FMRs, and use FMRs to map
gather/scatter lists that have more than one entry into a single
memory region that appears virtually contiguous to the SRP target
(which is the RDMA initiator).

This patch bails out on FMR mapping for SCSI commands where the
gather/scatter list cannot be mapped into a single FMR because there
are sub-page-sized entries in middle of the list.  An unaligned
start or end of the list is OK.

Based on a patch by Vu Pham <vuhuong@mellanox.com>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:29 -07:00
Michael S. Tsirkin a26026c122 IB/mthca: Remove dead code
Kill some dead code in mthca_eq.c

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:29 -07:00
Sean Hefty e51060f08a IB: IP address based RDMA connection manager
Kernel connection management agent over InfiniBand that connects based
on IP addresses.  The agent defines a generic RDMA connection
abstraction to support clients wanting to connect over different RDMA
devices.

The agent also handles RDMA device hotplug events on behalf of clients.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:29 -07:00
Sean Hefty 7025fcd36b IB: address translation to map IP toIB addresses (GIDs)
Add an address translation service that maps IP addresses to
InfiniBand GID addresses using IPoIB.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:28 -07:00
Sean Hefty 6e61d04f2d IB/cm: Match connection requests based on private data
Extend matching connection requests to listens in the InfiniBand CM to
include private data checks.

This allows applications to listen on the same service identifier,
with private data directing the request to the appropriate application.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:28 -07:00
Sean Hefty 6a9af2e18a IB: common handling for marshalling parameters to/from userspace
Provide common handling for marshalling data between userspace clients
and kernel InfiniBand drivers.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:27 -07:00
Michael S. Tsirkin 4e56ea794e IB/mthca: memfree completion with error FW bug workaround
Memfree firmware is in rare cases reporting WQE index == base - 1 in
receive completion with error, instead of (rq size - 1); base is 0 in
mthca.  Here is a patch to avoid kernel crash and report a correct WR
id in this case.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:20 -07:00
Michael S. Tsirkin 13aa6ecb47 IB/mthca: restore missing PCI registers after reset
mthca does not restore the following PCI-X/PCI Express registers after reset:
  PCI-X device: PCI-X command register
  PCI-X bridge: upstream and downstream split transaction registers
  PCI Express : PCI Express device control and link control registers

This causes instability and/or bad performance on systems where one of
these registers is set to a non-default value by BIOS.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:37:00 -07:00
Stephen Hemminger 88d113601c [PATCH] sky2: netconsole suspend/resume interaction
A couple of fixes that should prevent crashes when using netconsole and
suspend/resume. First, netconsole poll routine shouldn't run unless the
device is up; second, the NAPI poll should be disabled during suspend.

This is only an issue on sky2, because it has to have one NAPI poll
routine for both ports on dual port boards. Normal drivers use
netif_rx_schedule_prep and that checks for netif_running.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-17 10:52:12 -07:00
Jens Axboe 16070428d3 [PATCH] fix cdrom open
Some time ago the cdrom open routine was changed so that we call the
driver's open routine before checking to see if it is read only.  However,
if we discovered that a read write open was not possible and the open
flags required a writable open, we just returned -EROFS without calling
the driver's release routine.   This seems to work for most cdrom drivers,
but breaks the Powerpc iSeries virtual cdrom rather badly.

This just inserts the release call in the error path to balance the call
to "->open()" done by "open_for_data()".

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-17 10:44:26 -07:00
Pedro Alejandro López-Valencia 1668b19f75 sundance: PCI ID for ip100a
Patch provided by Pedro Alejandro López-Valencia in
http://bugzilla.kernel.org/show_bug.cgi?id=6691

The patch is derived from IC+ GPL'ed rework of sundance driver
available at http://www.icplus.com.tw/pp-IP100A.html

Patch closes http://bugzilla.kernel.org/show_bug.cgi?id=5858 as well.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Pedro Alejandro López-Valencia <palopezv@gmail.com>
2006-06-15 23:02:00 +02:00
Zhu Yi 89c318ed39 [PATCH] ipw2200 locking fix
Well, this is not 100% if when the card fires two consecutive
interrupts. Though unlikely, it's better to protect early than seeing
some "weird" bugs one day. I proposed attached patch. If you can help to
test, that will be appreciated (I cannot see the lockdep warning on my
box somehow).

Cc: Frederik Deweerdt <deweerdt@free.fr>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:14 -04:00
Jiri Slaby 12a3768792 [PATCH] pci: bcm43xx avoid pci_find_device
bcm43xx avoid pci_find_device

Change pci_find_device to safer pci_get_device with support for more
devices.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:13 -04:00
Michael Buesch 91769e7dd9 [PATCH] bcm43xx: preemptible periodic work
Make the heavy periodic work preemptible to avoid disabling
local IRQs for several msecs.

Signed-off-by: Michael Buesch <mb@buesch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:13 -04:00
Michael Buesch 78ff56a06e [PATCH] bcm43xx: redesign locking
Redesign the bcm43xx locking.
This is pre-work to get a preemptible periodic work handler.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-15 15:48:13 -04:00
David Woodhouse 21c8db9eff [MTD] Restore MTD_ROM and MTD_RAM types
Let's not attempt the abolition of mtd->type until/unless it's properly
thought through. And certainly, let's not do it by halves.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-14 21:39:48 +01:00
Artem B. Bityutskiy 783ed81ff3 [MTD] assume mtd->writesize is 1 for NOR flashes
Signed-off-by: Artem B. Bityitskiy
2006-06-14 19:53:44 +04:00
Jeff Garzik b5ed7639c9 Merge branch 'master' into upstream 2006-06-13 20:29:04 -04:00
Stephen Hemminger eb35cf60e4 [PATCH] sky2: stop/start hardware idle timer on suspend/resume
The resume bug was caused not by an early interrupt but because the idle
timeout was not being stopped on suspend.  Also disable hardware IRQ's
on suspend.  Will need to revisit this with hotplug?

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-13 13:16:41 -07:00
Stephen Hemminger 8ab8fca207 [PATCH] sky2: save/restore base hardware irq during suspend/resume
The hardware should be fully shut off during suspend, and the base
irq mask restored during resume.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-13 13:16:41 -07:00
Stephen Hemminger 26ec43f132 [PATCH] sky2: fix hotplug detect during poll
If the poll routine detects no hardware available, it needs to dequeue
it self from the network poll list. Linus didn't understand NAPI.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-13 13:16:41 -07:00
Stephen Hemminger f05267e7de [PATCH] sky2: don't hard code number of ports
It is cleaner, to not loop over both ports if only one exists.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-13 13:16:41 -07:00
Stephen Hemminger 2ccc99b7b7 [PATCH] sky2: set_power_state should be void
The set power state function is cleaner if it doesn't return anything.
The only caller that could fail is in suspend() and it can check the argument
there.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-13 13:16:40 -07:00
John W. Linville 76df73ff90 Merge branch 'from-linus' into upstream 2006-06-13 15:38:11 -04:00
Ben Collins 7136b8073f eth1394: replace __constant_htons by htons
...and __constant_ntohs, __constant_ntohl, __constant_cpu_to_be32 too
where possible.  Htons and friends are resolved to constants in these
places anyway.  Also fix an endianess glitch in a log message, spotted
by Alexey Dobriyan.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:16:25 -04:00
Ben Collins 2c4b69bd7b ieee1394: adjust code formatting in highlevel.c
Replace spaces by tabulators, wrap lines at 80 columns, delete some
blank lines and superfluous braces.  Collapse some if()-within-if()
constructs.  Replace a literal CSR address by its preprocessor constant.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:16:16 -04:00
Ben Collins 445151932e ieee1394: hl_irqs_lock is taken in hardware interrupt context
ohci1394 and pcilynx call highlevel_host_reset from their hardware
interrupt handler (via hpsb_selfid_complete).  Therefore all readers and
writers of hl_irqs_lock have to disable interrupts.  Reported by Jiri
Slaby and J. A. Magallon.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:16:01 -04:00
Ben Collins f654240f33 ieee1394_core: switch to kthread API
This gets also rid of the MODPOST warning "drivers/ieee1394/ieee1394.o -
Section mismatch: reference to .exit.text: from .smp_locks after '' (at
offset 0x18)".

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:15:50 -04:00
Ben Collins dd082c6705 ieee1394: sbp2: Kconfig fix
We only support x86 and ppc, due to the use of bus_to_virt() and friends.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:15:40 -04:00
Ben Collins 6737231ead ieee1394: add preprocessor constant for invalid csr address
Replace occurrences of the magic value ~(u64)0 for invalid
CSR address spaces by a named constant for better readability.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:15:31 -04:00
Ben Collins e269d27679 sbp2: fix deregistration of status fifo address space
The proper designator of an invalid CSR address is ~(u64)0, not (u64)0.
Use the correct value in initialization and deregistration.
Also, scsi_id->sbp2_lun does not need to be initialized twice.
(scsi_id was kzalloc'd.)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:15:20 -04:00
Ben Collins 02f4213fc4 [PATCH] eth1394: endian fixes
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:15:11 -04:00
Ben Collins b21efb59c5 Fix broken suspend/resume in ohci1394
I've been experimenting to track down the cause of suspend/resume problems
on my Compaq Presario X1050 laptop:

http://bugzilla.kernel.org/show_bug.cgi?id=6075

Essentially the ACPI Embedded Controller and keyboard controller would
get into a bizarre, confused state after resume.

I found that unloading the ohci1394 module before suspend and reloading it
after resume made the problem go away.  Diffing the dmesg output from
resume, with and without the module loaded, I found that with the module
loaded I was missing these:

PM: Writing back config space on device 0000:02:00.0 at offset 1. (Was 2100080, writing 2100007)
PM: Writing back config space on device 0000:02:00.0 at offset 3. (Was 0, writing 8008)
PM: Writing back config space on device 0000:02:00.0 at offset 4. (Was 0, writing 90200000)
PM: Writing back config space on device 0000:02:00.0 at offset 5. (Was 1, writing 2401)
PM: Writing back config space on device 0000:02:00.0 at offset f. (Was 20000100, writing 2000010a)

The default PCI driver performs the pci_restore_state when no driver is
loaded for the device.  When the ohci1394 driver is loaded, it is supposed
to do this, however it appears not to do so.

I created the patch below and tested it, and it appears to resolve the
suspend problems I was having with the module loaded.  I only added in the
pci_save_state and pci_restore_state - however, though I know little of
this hardware, surely the driver should really be doing more than this when
suspending and resuming?  Currently it does almost nothing, what if there
are commands in progress, etc?

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Ben Collins <bcollins@debian.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:15:03 -04:00
Ben Collins 05db5055b1 sbp2: use __attribute__((packed)) for on-the-wire structures
It seems to have worked without the attribute during all the years
just because sizes of all struct members are multiples of 32 bits.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:14:47 -04:00
Ben Collins bccbccdbf8 sbp2: provide helptext for CONFIG_IEEE1394_SBP2_PHYS_DMA and mark it experimental
It appears I will not get it fixed overnight.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:14:36 -04:00
Ben Collins fd23ade80e sbp2: fix S800 transfers if phys_dma is off
If sbp2 is forced to move data via ARM handler, the maximum packet size
allowed for S800 transfers exceeds ohci1394's buffer size on platforms
where PAGE_SIZE is 4096.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:14:14 -04:00
Ben Collins 40ae6c5e88 sbp2: remove ohci1394 specific constant
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:13:49 -04:00
Ben Collins fa9b73997c ohci1394: make phys_dma parameter read-only
Being able to switch physical DMA on and off at run time would be a nice
feature but a PITA to support by highlevel drivers and userspace apps.
Therefore allow it only to be set when the driver is being loaded.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:13:42 -04:00
Ben Collins 4611ed3803 ohci1394: set address range properties
This patch supplies the API extension introduced by patch
"ieee1394: extend lowlevel API for address range properties"
with proper addresses.

Like in patch ''ohci1394, sbp2: fix "scsi_add_device failed"
with PL-3507 based devices'', 1 TeraByte is chosen as physical
upper bound.  This leaves a window for the middle address range.
This choice is only relevant for adapters which actually have a
programmable pysical upper bound register.  (Only ALi and
Fujitsu adapters are known for this.  Most adapters have a fixed
bound at 4 GB.)  The middle address range is suitable for posted
writes.

AFAIK, PCILynx does not support physical DMA nor posted writes,
therefore no equivalent change in the pcilynx driver is necessary.
There is also a driver for GP2Lynx, although not in mainline Linux.
I assume this hardware does not support these OHCI features either.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:13:32 -04:00
Ben Collins 8aef63ff03 ieee1394: extend lowlevel API for address range properties
Host adapter hardware imposes certain restrictions and features on
address ranges.  Instead of hard-wire such ranges into the ieee1394
core or even into protocol drivers, let lowlevel drivers specify
these ranges via struct hpsb_host.

Patch "ohci1394: set address range properties" must be applied too,
else hpsb_allocate_and_register_addrspace() won't work properly.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:13:21 -04:00
Ben Collins 20f4578156 sbp2: log number of supported concurrent logins
Since this is useful information, promote it from a debug macro to
a regular log message.  The message appears only if the user set
exclusive_login=0, therefore won't clutter the logs in normal use.
Also update the comment on exclusive_login.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:13:11 -04:00
Ben Collins fe42b05a99 sbp2: remove manipulation of inquiry response
This code became ineffective a few Linux releases ago and is not
required anyway.

Note from Christoph Hellwig: scsi_cmnd.request_buffer is always a
scatterlist these days.  Checking random bites into it and then
mangling the data in sbp2_check_sbp2_response will cause really bad
memory corruption when you're not lucky enough to have the check not
trigger by luck.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:12:59 -04:00
Ben Collins eaf88450d2 ieee1394: save RAM by using a single tlabel for broadcast transactions
Since broadcast transactions are already complete when the request has
been sent, the same transaction label can be reused all over again, see
IEEE 1394 7.3.2.5 and 6.2.4.3.  Therefore we can reduce the footprint
of struct hpsb_host by the size of one struct hpsb_tlabel_pool.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:12:49 -04:00
Ben Collins 647dcb5fae ieee1394: support for slow links or slow 1394b phy ports
Add support for the following types of hardware:
 + nodes that have a link speed < PHY speed
 + 1394b PHYs that are less than S800 capable
 + 1394b/1394a adapter cable between two 1394b PHYs
Also, S1600 and S3200 are now supported if IEEE1394_SPEED_MAX is raised.

A probing function is added to nodemgr's config ROM fetching routine
which adjusts the allowable speed if an access problem was encountered.
Pros and Cons of the approach:
 + minimum code footprint to support this less widely used hardware
 + nearly no overhead for unaffected hardware
 - ineffective before nodemgr began to read the ROM of affected nodes
 - ineffective if ieee1394 is loaded with disable_nodemgr=1
The speed map CSRs which are published to the bus are not touched by the
patch.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Hakan Ardo <hakan@debian.org>
Cc: Calculex <linux@calculex.com>
Cc: Robert J. Kosinski <robk@cmcherald.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:12:37 -04:00
Ben Collins 57fdb58fa5 ieee1394/ohci1394: CycleTooLong interrupt management
This patch modifies the ohci1394.c file to enable and manage the "cycle too
long" interrupt.
If this interrupt occurs, the "LinkControl.CycleMaster" bit of the host
controller is reseted. This implies, that the host controller does not send
"cycle start" packet anymore freezing then the isochronous communication.
The management of the interrupt added by the patch is that when the interrupt
occurs, the OHCI irq handler prints a kernel log warning and then sets the
"LinkControl.CycleMaster" bit again resuming the isochronous communication.

Signed-off-by: Jean-Baptiste Mur <jeanbaptiste@maunakeatech.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:12:21 -04:00
Ben Collins 7597028a83 raw1394: fix whitespace after x86_64 compat patch
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:12:10 -04:00
Ben Collins fa7614de60 From: Arjan van de Ven <arjan@infradead.org>
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Ben Collins <bcollins@debian.org>
Cc: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:11:07 -04:00
Ben Collins 4b9a334703 sbp2: make TSB42AA9 workaround specific to Momobay CX-1
The workarounds are not required for DViCO Momobay FX-3A and AFAIR not
for Momobay CX-2. These contain an TSB42AA9A but feature the same
firmware_revision value as the older DViCO Momobay CX-1.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 18:10:18 -04:00
Ben Collins ff34d3bddf ohci1394: Remove superfluous call to free_dma_rcv_ctx,
spotted by Adrian Bunk. Also remove some superfluous comments.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 17:53:31 -04:00
Ben Collins 9bb2bcdb4b ieee1394: speed up of dma_region_sync_for_cpu
when attempting to find the 'last' part of the dma region continue the
search from where we left off, instead of starting the search over.

Signed-off-by: Jim Westfall <jwestfall@surrealistic.net>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 17:52:59 -04:00
Ben Collins f54b1bdff1 video1394: be quiet
When working with multiple cameras and intensive applications, our logs
get flooded with video1394 information which isn't of much interest.

Any objections to demoting these messages to debug messages?

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-12 17:52:16 -04:00
Andrew Morton e474c66b1c [MMC] sdhci truncated pointer fix
On 64-bit machines, we just lost the uppermost 32 bits.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-06-12 22:10:22 +01:00
Linus Torvalds 37b0d1dedc Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] Fix Integrator and Versatile interrupt initialisation
  [ARM] 3546/1: PATCH: subtle lost interrupts bug on i.MX
  [ARM] 3547/1: PXA-OHCI: Allow platforms to specify a power budget
  [ARM] Fix Neponset IRQ handling
2006-06-12 13:45:41 -07:00
Linus Torvalds d374c1c128 [sky2] Fix sky2 network driver suspend/resume
This fixes two independent problems: it would not save the PCI state on
suspend (and thus try to resume a nonexistent state on resume), and
while shut off, if an interrupt happened on the same shared irq, the irq
handler would react very badly to the interrupt status being an invalid
all-ones state.

Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-12 12:53:27 -07:00
Mark Haverkamp 821499a824 [SCSI] aacraid: Fix return code interpretation
Received from Mark Salyzyn

clear_user return is 0 for success, the code fragment is written to
assume that it is the count of the number of bytes zero'd.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-12 14:47:55 -05:00
James Bottomley c5943d36ae [SCSI] scsi_transport_sas: fix panic in sas_free_rphy
This is a hold over from the end device/expander conversion.  Apparently
the rphy list pointer is never initialised, so list_del() on the
uninitialised pointer can panic the system

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-12 10:38:51 -05:00
Linus Torvalds 0e838b72d5 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] sata_mv: grab host lock inside eng_timeout
2006-06-12 07:47:04 -07:00
Paul Mackerras 7a0c58d051 Merge branch 'merge' 2006-06-12 17:53:34 +10:00
Paul Mackerras 289a1e995e [PATCH] Fix for the PPTP hangs that have been reported
People have been reporting that PPP connections over ptys, such as
used with PPTP, will hang randomly when transferring large amounts of
data, for instance in http://bugzilla.kernel.org/show_bug.cgi?id=6530.
I have managed to reproduce the problem, and the patch below fixes the
actual cause.

The problem is not in fact in ppp_async.c but in n_tty.c.  What
happens is that when pptp reads from the pty, we call read_chan() in
drivers/char/n_tty.c on the master side of the pty.  That copies all
the characters out of its buffer to userspace and then calls
check_unthrottle(), which calls the pty unthrottle routine, which
calls tty_wakeup on the slave side, which calls ppp_asynctty_wakeup,
which calls tasklet_schedule.  So far so good.  Since we are in
process context, the tasklet runs immediately and calls
ppp_async_process(), which calls ppp_async_push, which calls the
tty->driver->write function to send some more output.

However, tty->driver->write() returns zero, because the master
tty->receive_room is still zero.  We haven't returned from
check_unthrottle() yet, and read_chan() only updates tty->receive_room
_after_ calling check_unthrottle.  That means that the driver->write
call in ppp_async_process() returns 0.  That would be fine if we were
going to get a subsequent wakeup call, but we aren't (we just had it,
and the buffer is now empty).

The solution is for n_tty.c to update tty->receive_room _before_
calling the driver unthrottle routine.  The patch below does this.
With this patch I was able to transfer a 900MB file over a PPTP
connection (taking about 25 minutes), whereas without the patch the
connection would always stall in under a minute.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-11 20:40:39 -07:00
Herbert Valerio Riedel 0638dec01e [PATCH] net: au1000_eth: PHY framework conversion
convert au1000_eth driver to use PHY framework and garbage collected
functions and identifiers that became unused/obsolete in the process

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 23:19:00 -04:00
Mark Lord 2f9719b61e [PATCH] sata_mv: grab host lock inside eng_timeout
Bug fix:  mv_eng_timeout() calls mv_err_intr() without first grabbing the host lock,
which can lead to all sorts of interesting scenarios.

This whole error-handling portion of sata_mv is nasty (and will get fixed for
the new EH stuff), but for now this patch will help keep it on life-support.

Signed-off-by:  Mark Lord <liml@rtr.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 23:03:18 -04:00
Yu, Luming 8b8c8d280a [PATCH] PCI: reverse pci config space restore order
According to Intel ICH spec, there are several rules that Base Address
should be programmed before IOSE  (PCICMD register ) enabled.

For example ICH7:

12.1.3  SATA : the base address register for the bus master register
               should be programmed before this bit is set.

11.1.3:  PCICMD (USB): The base address register for USB should be
                       programmed before this bit is set.
....

To make sure kernel code follow this rule , and prevent unnecessary
confusion. I proposal this patch.

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-11 14:02:27 -07:00
Dave Jones 04d9c1a110 [PATCH] PCI: Improve PCI config space writeback
At least one laptop blew up on resume from suspend with a black screen due
to a lack of this patch.  By only writing back config space that is
different, we minimise the possibility of accidents like this.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-11 14:02:27 -07:00
Jean Delvare 8d92bc2270 [PATCH] PCI: Error handling on PCI device resume
We currently don't handle errors properly when resuming a PCI device:
* In pci_default_resume() we capture the error code returned by
  pci_enable_device() but don't pass it up to the caller.
  Introduced by commit 95a629657d
* In pci_resume_device(), the errors possibly returned by the driver's
  .resume method or by the generic pci_default_resume() function are
  ignored.

This patch fixes both issues.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-11 14:02:27 -07:00
Randy Dunlap 96e672c79f [PATCH] 3c5zz ethernet: fix section warnings
Priority: not critical; makes init code discardable.

Fix section mismatch warnings:
WARNING: drivers/net/3c501.o - Section mismatch: reference to .init.text:el1_probe from .text between 'init_module' (at offset 0x812) and 'cleanup_module'
WARNING: drivers/net/3c503.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x661) and 'cleanup_card'
WARNING: drivers/net/3c505.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x228d) and 'cleanup_module'
WARNING: drivers/net/3c507.o - Section mismatch: reference to .init.text:el16_probe from .text between 'init_module' (at offset 0xa99) and 'cleanup_module'
WARNING: drivers/net/3c523.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x12e7) and 'cleanup_module'
WARNING: drivers/net/3c527.o - Section mismatch: reference to .init.text:mc32_probe from .text between 'init_module' (at offset 0xd8d) and 'cleanup_module'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 12:16:01 -04:00
Randy Dunlap a2bd2ec8d1 [PATCH] smc ethernet: fix section mismatch warnings
Priority: not critical; makes init code discardable.
Removes one duplicate assignment.

Fix section mismatch warnings:
WARNING: drivers/net/smc-ultra.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x369) and 'cleanup_card'
WARNING: drivers/net/smc-ultra32.o - Section mismatch: reference to .init.text:ultra32_probe from .text between 'init_module' (at offset 0x254) and 'cleanup_module'
WARNING: drivers/net/smc9194.o - Section mismatch: reference to .init.text:smc_init from .text between 'init_module' (at offset 0x997) and 'cleanup_module'
WARNING: drivers/net/smc9194.o - Section mismatch: reference to .init.data: from .data between 'smcdev.0' (at offset 0x44) and '__param_str_io'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 12:16:01 -04:00
Randy Dunlap 29f9f6d234 [PATCH] hp ethernet: fix section mismatches
Priority: not critical; makes init code discardable.

Fix section mismatch warnings:
WARNING: drivers/net/hp-plus.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x387) and 'cleanup_card'
WARNING: drivers/net/hp.o - Section mismatch: reference to .init.data: from .text between 'hp_init_card' (at offset 0x310) and 'init_module'
WARNING: drivers/net/hp.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x367) and 'cleanup_card'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 12:16:01 -04:00
Randy.Dunlap 5d1f16c6c4 [PATCH] Section mismatch in drivers/net/ne.o during modpost
On Sat, 10 Jun 2006 14:11:42 +0200 (MEST) Mikael Pettersson wrote:

> While compiling 2.6.17-rc6 for a 486 with an NE2000 ISA ethernet card, I got:
>
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x158) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x176) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x183) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x1ea) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x251) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x266) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x29b) and 'ne_block_input'
>
> Not sure how serious this is; the driver seems to work fine later on.

Doesn't look serious.  init_module() is not __init, but it calls
some __init functions and touches some __initdata.

BTW, I would be happy to see some consistent results from modpost
section checking.  I don't see all of these warnings (I see only 1)
when using gcc 3.3.6.  What gcc version are you using?
Does that matter?  (not directed at anyone in particular)

Patch below fixes it for me.  Please test/report.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 12:16:01 -04:00
Linas Vepstas 282f33c986 [PATCH] e1000: prevent statistics from getting garbled during reset
If a PCI bus error/fault triggers a PCI bus reset, attempts to get the
ethernet packet count statistics from the hardware will fail, returning
garbage data upstream.  This patch skips statistics data collection if the
PCI device is not on the bus.

This patch presumes that an earlier patch,
[PATCH] PCI Error Recovery: e1000 network device driver
has already been applied.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: John Ronciak <john.ronciak@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 10:35:15 -04:00
Andrew Morton b89fa8b6d7 [PATCH] smc911x Kconfig fix
In file included from drivers/net/smc911x.c:84:
drivers/net/smc911x.h:46:9: warning: "SMC_USE_16BIT" is not defined
drivers/net/smc911x.h:60:9: warning: "SMC_USE_32BIT" is not defined
drivers/net/smc911x.h:73:10: warning: "SMC_USE_PXA_DMA" is not defined
drivers/net/smc911x.c: In function `smc911x_reset':
drivers/net/smc911x.c:247: warning: implicit declaration of function `SMC_inl'
drivers/net/smc911x.c:249: warning: implicit declaration of function `SMC_outl'

Cc: Dustin McIntire <dustin@sensoria.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 10:34:40 -04:00
Ayaz Abdulla c99ce7ee75 [PATCH] forcedeth: new device ids
This patch contains new device ids for forcedeth ethernet.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:16 -04:00
Ayaz Abdulla ebe611a483 [PATCH] forcedeth config: version
This patch bumps up the version number for config support.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:16 -04:00
Ayaz Abdulla 69fe3fd7b1 [PATCH] forcedeth config: module parameters
This patch adds (and modifies) module parameter support.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:16 -04:00
Ayaz Abdulla 9589c77a0d [PATCH] forcedeth config: diagnostics
This patch adds support for diagnostic tests through ethtool support.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:16 -04:00
Ayaz Abdulla 7a1854b797 [PATCH] forcedeth config: move functions
This patch moves a few functions (no logic change) so that the next
patch has these functions defined.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:16 -04:00
Ayaz Abdulla 52da35789c [PATCH] forcedeth config: statistics
This patch exposes hardware statistic counters through ethtool support.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:16 -04:00
Ayaz Abdulla 5ed2616f62 [PATCH] forcedeth config: csum
This patch allows for configurable rx and tx checksum offloads through
ethtool support.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:15 -04:00
Ayaz Abdulla c42d9df932 [PATCH] forcedeth config: wol
This patch fixes configuration bugs when modifying wol settings.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:15 -04:00
Ayaz Abdulla f9430a015a [PATCH] forcedeth config: phy
This patch fixes configuration bugs when modifying phy settings.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:15 -04:00
Ayaz Abdulla b6d0773fa7 [PATCH] forcedeth config: flow control
This patch allows for configurable flow control through ethtool support.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:15 -04:00
Ayaz Abdulla eafa59f6bc [PATCH] forcedeth config: ring sizes
This patch allows for configurable ring size through ethtool support.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:15 -04:00
Ayaz Abdulla 6a78814f6c [PATCH] forcedeth config: tso cleanup
There are a series of patches for configuration support in forcedeth and
one patch for device ids.

This patch is a cleanup of the a previous TSO patch.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-11 09:25:15 -04:00
Paul Mackerras 6218a761bb powerpc: add context.vdso_base for 32-bit too
This adds a vdso_base element to the mm_context_t for 32-bit compiles
(both for ARCH=powerpc and ARCH=ppc).  This fixes the compile errors
that have been reported in arch/powerpc/kernel/signal_32.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-06-11 14:15:17 +10:00
Christoph Hellwig 8d7feac3c7 [SCSI] remove RQ_SCSI_* flags
The RQ_SCSI_* flags are a vestiage of a long past history.  The EH code
still sets them but we never make use of that information.  The other
users is pluto.c which never had a chance to work but needs to be kept
compiling to keep Davem happy, so copy over the definition there.

We could probably get rid of RQ_ACTIVE/RQ_INACTIVE aswell with some
work, there's only two more or less bogus looking uses in ubd and scsi.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 16:25:21 -05:00
Christoph Hellwig beb4048750 [SCSI] remove scsi_request infrastructure
With Achim patch the last user (gdth) is switched away from scsi_request
so we an kill it now.  Also disables some code in i2o_scsi that was
broken since the sg driver stopped using scsi_requests.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 16:24:40 -05:00
Michael Reed 1951d099df [SCSI] mptfusion: change driver revision to 3.03.10
Bump driver version number to reflect addition of various
fibre channel patches.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 16:02:21 -05:00
Michael Reed d6be06c84d [SCSI] mptfc: abort of board reset leaves port dead requiring reboot
The driver uses msleep_interruptible() in the code path responsible
for resetting the card's ports via the lsiutil command.  If a
<ctrl-c> is received during the reset it can leave a port in such
a state that the only way to regain its use is to reboot the system.
Changing from msleep_interruptible() to msleep() corrects the problem.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 16:01:52 -05:00
Michael Reed 419835e285 [SCSI] mptfc: fix fibre channel infinite request/response loop
While doing board reset testing I was able to put the system in
an infinite request/response loop between the scsi layer and
mptscsih_qcmd() by aborting the reset.  This patch installs
a "SETUP RESET" handler which calls fc_remote_port_delete()
for all registered rports.  This blocks the target which
prevents the loop.  Additionally, should the reset fail to
complete, the transport will now terminate i/o to the target.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 16:00:03 -05:00
Michael Reed ca2f938efe [SCSI] mptfc: set fibre channel fw target missing timers to one second
The fibre channel firmware provides a timer which is similar in purpose
to the fibre channel transport's device loss timer.  The effect of this
timer is to extend the total time that a target will be missing beyond
the value associated with the transport's timer.  This patch changes
the firmware timer to a default of one second which significantly reduces
the lag between when a target goes missing and the notification of the
fibre channel transport.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 15:59:19 -05:00
Michael Reed 80d3ac77a8 [SCSI] mptfusion: move fc event/reset handling to mptfc
Move fibre channel event and reset handling to mptfc.  This will
result in fewer changes over time that need to be applied to
either mptbase.c or mptscsih.c.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 15:58:37 -05:00
James Bottomley f0cd91a68a Merge ../linux-2.6 2006-06-10 13:47:26 -05:00
Linus Torvalds 1f4d4a7e8f 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:
  [SPARC64]: Avoid JBUS errors on some Niagara systems.
  [FUSION]: Fix mptspi.c build with CONFIG_PM not set.
  [TG3]: Handle Sun onboard tg3 chips more correctly.
  [SPARC64]: Dump local cpu registers in sun4v_log_error()
2006-06-10 11:03:51 -07:00
Milton Miller 938473b246 [PATCH] powerpc: console_initcall ordering issues
From: Milton Miller <miltonm@bga.com>

The add_preferred_console call in rtas_console.c was not causing the
console to be selected.  It turns out that the add_preferred_console was
being called after the hvc_console driver was registered.  It only works
when it is called before the console driver is registered.

Reorder hvc_console.o after the hvc_console drivers to allow the selection
during console_initcall processing.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-10 11:02:05 -07:00
Markus Lidel 57a62fed87 [PATCH] I2O: Bugfixes to get I2O working again
From: Markus Lidel <Markus.Lidel@shadowconnect.com>

- Fixed locking of struct i2o_exec_wait in Executive-OSM

- Removed LCT Notify in i2o_exec_probe() which caused freeing memory and
  accessing freed memory during first enumeration of I2O devices

- Added missing locking in i2o_exec_lct_notify()

- removed put_device() of I2O controller in i2o_iop_remove() which caused
  the controller structure get freed to early

- Fixed size of mempool in i2o_iop_alloc()

- Fixed access to freed memory in i2o_msg_get()

See http://bugzilla.kernel.org/show_bug.cgi?id=6561

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-10 11:02:05 -07:00
Andrew Morton a913f50706 [PATCH] powernow-k8 crash workaround
From: Andrew Morton <akpm@osdl.org>

Work around the oops reported in
http://bugzilla.kernel.org/show_bug.cgi?id=6478.

Thanks to Ralf Hildebrandt <ralf.hildebrandt@charite.de> for testing and
reporting.

Acked-by: Dave Jones <davej@codemonkey.org.uk>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-10 11:02:05 -07:00
James Bottomley 60eef25701 [SCSI] spi transport: don't allow dt to be set on SE or HVD buses
This is really just a belt and braces test.  The standards require
disks to respond DT not capable on a non-LVD bus ... however, not all
disks follow the standards ...

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 10:51:23 -05:00
James Bottomley b2d8bfe185 [SCSI] aic7xxx: expose the bus setting to sysfs
Read the transciever register and display in the host transport
properties.  I'm still not entirely sure what this does for multiple
transciever adapters (like some 160 ones) however, I suspect it
displays the transciever state of the switchable bus segment.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 10:49:07 -05:00
Tobias Klauser 6391a11375 [SCSI] drivers/scsi: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of the macro.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 10:45:30 -05:00
Guennadi Liakhovetski 9dc399de08 [SCSI] Remove last page_address from dc395x.c
Dynamically map scattergather buffer instead of using page_address().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 10:38:24 -05:00
HighPoint Linux Team ede1e6f8b4 [SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
HighPoint RocketRAID 3220/3320 series 8 channel PCI-X SATA RAID Host
Adapters.

Fixes from original submission:

Merge Andrew Morton's patches:
- Provide locking for global list
- Fix debug printks
- uninline function with multiple callsites
- coding style fixups
- remove unneeded casts of void*
- kfree(NULL) is legal
- Don't "succeed" if register_chrdev() failed - otherwise we'll later
  unregister a not-registered chrdev.
- Don't return from hptiop_do_ioctl() with the spinlock held.
- uninline __hpt_do_ioctl()

Update for Arjan van de Ven's comments:
- put all asm/ includes after the linux/ ones
- replace mdelay with msleep
- add pci posting flush
- do not set pci command reqister in map_pci_bar
- do not try merging sg elements in hptiop_buildsgl()
- remove unused outstandingcommands member from hba structure
- remove unimplemented hptiop_abort() handler
- remove typedef u32 hpt_id_t

Other updates:
- fix endianess

Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 10:36:13 -05:00
Leubner, Achim cbd5f69b98 [SCSI] remove the scsi_request interface from the gdth driver
Initial pass at converting the gdth driver away from the scsi_request
interface so that the request interface can be removed post 2.6.18
without breaking gdth.  Based on changes from Christoph Hellwig
<hch@lst.de>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 10:24:40 -05:00
Tom "spot" Callaway c29ca9d181 [FUSION]: Fix mptspi.c build with CONFIG_PM not set.
Signed-off-by: Tom "spot" Callaway <tcallawa@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-09 17:01:48 -07:00
David Woodhouse f9068876f5 [MTD NAND] Fix s3c2410 NAND driver so it at least _looks_ like it compiles
Fix the control bit handling so it even looks like it might work, too.
Bad tglx. No biscuit.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-10 00:53:16 +01:00
David S. Miller f49639e643 [TG3]: Handle Sun onboard tg3 chips more correctly.
Get rid of all the SUN_570X logic and instead:

1) Make sure MEMARB_ENABLE is set when we probe the SRAM
   for config information.  If that is off we will get
   timeouts.

2) Always try to sync with the firmware, if there is no
   firmware running do not treat it as an error and instead
   just report it the first time we notice this condition.

3) If there is no valid SRAM signature, assume the device
   is onboard by setting TG3_FLAG_EEPROM_WRITE_PROT.

Update driver version and release date.

With help from Michael Chan and Fabio Massimo Di Nitto.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-09 12:03:51 -07:00
Andrew Morton f24ff6bf8c [MTD] Prepare physmap for 64-bit-resources
Fallout from the incoming 64-bit-resource stuff:

drivers/mtd/maps/physmap.c: In function 'physmap_flash_probe':
drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long
unsigned int', but argument 2 has type 'resource_size_t'
drivers/mtd/maps/physmap.c:94: warning: format '%.8lx' expects type 'long
unsigned int', but argument 3 has type 'resource_size_t'

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-09 15:12:34 +01:00
Michael Ellerman 6b81e80049 [PATCH] powerpc: Cleanup hvc_rtas.c a little
A few cleanups in hvc_rtas.c:
 1. Remove unused RTASCONS_PUT_ATTEMPTS
 2. Remove unused rtascons_put_delay.
 3. Use i as a loop counter like everyone else on earth.
 4. Remove pointless variables, eg. x = foo; if (x) return something_else;
 5. Whitespace cleanups and formatting.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-06-09 21:24:20 +10:00
Michael Ellerman b53744612f [PATCH] powerpc: Make rtas console _much_ faster
Currently the hvc_rtas driver is painfully slow to use. Our "benchmark" is
ls -R /etc, which spits out about 27866 characters. The theoretical maximum
speed would be about 2.2 seconds, the current code takes ~50 seconds.

The core of the problem is that sometimes when the tty layer asks us to push
characters the firmware isn't able to handle some or all of them, and so
returns an error. The current code sees this and just returns to the tty code
with the buffer half sent.

The khvcd thread will eventually wake up and try to push more characters, which
will usually work because by then the firmware's had time to make room. But
the khvcd thread only wakes up every 10 milliseconds, which isn't fast enough.

So change the khvcd thread logic so that if there's an incomplete write we
yield() and then immediately try writing again. Doing so makes POLL_QUICK and
POLL_WRITE synonymous, so remove POLL_QUICK.

With this patch our "benchmark" takes ~2.8 seconds.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-06-09 21:24:18 +10:00
Andrew Morton 81c2466915 [AGPGART] alpha-agp warning fix
drivers/char/agp/alpha-agp.c:138: warning: initialization from incompatible pointer type
drivers/char/agp/alpha-agp.c:139: warning: initialization from incompatible pointer type

Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-08 22:41:17 -04:00
Andrew Morton b07cd5181f [AGPGART] uninorth-agp warning fixes
drivers/char/agp/uninorth-agp.c: In function `agp_uninorth_suspend':
drivers/char/agp/uninorth-agp.c:332: warning: cast to pointer from integer of different size
drivers/char/agp/uninorth-agp.c: In function `agp_uninorth_resume':
drivers/char/agp/uninorth-agp.c:354: warning: cast from pointer to integer of different size

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-08 22:41:16 -04:00
Linus Torvalds 128e6ced24 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  e1000: remove risky prefetch on next_skb->data
  e1000: fix ethtool test irq alloc as "probe"
  [PATCH] bcm43xx: add DMA rx poll workaround to DMA4
2006-06-08 15:16:35 -07:00
Malcom Parsons 26e780e8ef [PATCH] fbcon: fix limited scroll in SCROLL_PAN_REDRAW mode
From: Malcom Parsons <malcolm.parsons@gmail.com>

When scrolling up in SCROLL_PAN_REDRAW mode with a large limited scroll
region, the bottom few lines have to be redrawn.  Without this patch, the
wrong text is drawn into these lines, corrupting the display.

Observed in 2.6.14 when running an IRC client in the Nintendo DS linux
port.

I haven't tested if scrolling down has the same problem.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-08 15:12:21 -07:00
Richard Purdie 0c27c5d5b9 [ARM] 3547/1: PXA-OHCI: Allow platforms to specify a power budget
Patch from Richard Purdie

Add a power budget variable to the PXA OHCI platform data and add a
default value for the spitz platform(s) which prevents known failures
with certain USB devices.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-06-08 22:44:07 +01:00
Jeff Garzik cac925a4aa Merge branch 'upstream' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into tmp 2006-06-08 15:56:17 -04:00
Jeff Garzik bcd618e4ea Merge branch 'upstream-fixes' into upstream
Conflicts:

	drivers/net/e1000/e1000_ethtool.c
2006-06-08 15:55:45 -04:00
Jeff Garzik cb15f81beb Merge branch 'upstream-fixes' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into upstream-fixes 2006-06-08 15:49:36 -04:00
Jeff Garzik ba9b28d19a Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream 2006-06-08 15:48:25 -04:00
Jeff Garzik 862fc81b62 Merge branch 'upstream-fixes' into upstream 2006-06-08 15:46:38 -04:00
Jeff Garzik 2e84abe742 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-06-08 15:46:27 -04:00
Stephen Hemminger 987024ca9e [PATCH] skge: version 1.6
Update version string.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-08 15:44:54 -04:00
Stephen Hemminger 631ae320a4 [PATCH] skge: dont allow bad hardware address from ROM
Sometimes boards don't reset properly, and the address read out of the
EEPROM is zero. Stop the insanity before the device gets registered.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-08 15:44:54 -04:00
Stephen Hemminger 7c442fa17e [PATCH] skge: transmit complete via IRQ not NAPI
The transmit side code has a number of ring problems that caused some
of the Bugzilla reports. Rather than trying to fix the details, it is safer
to rewrite the code that handles transmit completion and freeing.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-08 15:44:54 -04:00
Stephen Hemminger 9db96479b4 [PATCH] skge: TX low water mark definition
Consolidate all usage of ring low water mark to one value.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-08 15:44:54 -04:00
Stephen Hemminger d85b514fd9 [PATCH] skge: use workq for PHY handling
Since accessing the PHY can take 100's of usecs, use a work queue to
allow spinning in outside of soft/hard irq.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-08 15:44:54 -04:00
Brice Goglin b10c066823 [PATCH] myri10ge update
The following patch updates the myri10ge to 1.0.0, with the following changes:
* Switch to dma_alloc_coherent API.
* Avoid PCI burst when writing the firmware on chipset with unaligned completions.
* Use ethtool_op_set_tx_hw_csum instead of ethtool_op_set_tx_csum.
* Include linux/dma-mapping.h to bring DMA_32/64BIT_MASK on all architectures
  (was missing at least on alpha).
* Some typo and warning fixes.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew J. Gallatin <gallatin@myri.com>

 drivers/net/myri10ge/myri10ge.c |   57 +++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 20 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-06-08 15:25:22 -04:00
Jeff Garzik d15a88fc21 Merge branch 'master' into upstream 2006-06-08 15:24:46 -04:00
Auke Kok 9026729bfe e1000: add PCI Error Recovery
Various PCI bus errors can be signaled by newer PCI controllers.
This patch adds the PCI error recovery callbacks to the intel gigabit
ethernet e1000 device driver. The patch has been tested, and appears
to work well.

Signed-off-by: Linas Vepstas <linas@linas.org>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-06-08 09:30:24 -07:00
Auke Kok 2cc304923d e100: add PCI Error Recovery
Various PCI bus errors can be signaled by newer PCI controllers.  This
patch adds the PCI error recovery callbacks to the intel ethernet e100
device driver. The patch has been tested, and appears to work well.

Signed-off-by: Linas Vepstas <linas@linas.org>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-06-08 09:30:18 -07:00
Auke Kok 24f476eeec e1000: remove risky prefetch on next_skb->data
It was brought to our attention that the prefetches break e1000 traffic
on xscale/arm architectures.  Remove them for now.  We'll let them
stay in mm for a while, or find a better solution to enable.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-06-08 09:28:47 -07:00
Auke Kok b9b6e78b11 e1000: fix ethtool test irq alloc as "probe"
New code added in 2.6.17 caused setup_irq to print a warning when
running ethtool -t eth0 offline.

This test marks the request_irq call made by this test as a "probe"
to see if the interrupt is shared or not.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-06-08 09:28:38 -07:00
Dennis Munsie 72109368de Removed hard coded EDID buffer size.
Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-06-07 18:53:38 +10:00
Christoph Hellwig 5d5ff44fe6 [SCSI] fix up request buffer reference in various scsi drivers
Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their
queuecommand functions.  Those fields are internal storage for the
midlayer only and are used to restore the original payload after
request_buffer and request_bufflen have been overwritten for EH.  Using
the buffer and bufflen fields means they do very broken things in error
handling.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-06 11:07:25 -04:00
Sumant Patro e4a082c7c1 [SCSI] megaraid_sas: switch fw_outstanding to an atomic_t
This patch( originally submitted by Christoph Hellwig) removes
instance_lock and changes fw_outstanding variable data type to
atomic_t.

Signed-off-by: Sumant Patro <Sumant.Patro@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-06 10:57:18 -04:00
Linus Torvalds ff3ea47c62 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:
  [BRIDGE]: fix locking and memory leak in br_add_bridge
  [IRDA]: Missing allocation result check in irlap_change_speed().
  [PPPOE]: Missing result check in __pppoe_xmit().
  [NET]: Eliminate unused /proc/sys/net/ethernet
  [NETCONSOLE]: Clean up initcall warning.
  [TCP]: Avoid skb_pull if possible when trimming head
2006-06-05 16:59:46 -07:00
Linus Torvalds 2f9c3c2c24 Merge master.kernel.org:/home/rmk/linux-2.6-mmc
* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [MMC] Prevent au1xmmc.c breakage on non-Au1200 Alchemy
  [MMC] Add maintainers entry for MMC subsystem
2006-06-05 16:22:43 -07:00
Mike Christie f70e9c5f91 [SCSI] iscsi: update version to 1.0-595
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-05 19:13:16 -04:00
Mike Christie 3219e52941 [SCSI] iscsi: fix writepsace race
We can race and misset the suspend bit if iscsi_write_space is
called then iscsi_send returns with a failure indicating
there is no space.

To handle this this patch returns a error upwards allowing xmitworker
to decide if we need to try and transmit again. For the no
write space case xmitworker will not retry, and instead
let iscsi_write_space queue it back up if needed (this relies
on the work queue code to properly requeue us if needed).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-05 19:12:25 -04:00
Mike Christie 040515f53c [SCSI] iscsi: return task found during search
from davidw@netapp.com:

remove task type should return a task on success.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-05 19:11:43 -04:00
Mike Christie 994442e807 [SCSI] iscsi: fix run list corruption
from davidw@netapp.com:

We must grab the session lock when modifying the running lists.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-05 19:11:18 -04:00
Mike Christie 67a611149b [SCSI] iscsi: don't switch states when just cleaning up
If recovery failed or we are in recovery only overwrite the state
if we are going to terminate the session or if we logged back in.

STOP_CONN_SUSPEND and conn_cnt are not used. We only support
a single connection session ATM, so cleanup that code while
we are working around it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-05 19:10:45 -04:00
Florin Malita 9bc18091a5 [PPPOE]: Missing result check in __pppoe_xmit().
skb_clone() may fail, we should check the result.

Coverity CID: 1215.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-05 15:34:33 -07:00
Matt Mackall 92cd6eeea6 [NETCONSOLE]: Clean up initcall warning.
From: Matt Mackall <mpm@selenic.com>

netconsole is being wrong here.  If it wasn't enabled there's no error.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-05 15:04:37 -07:00
Pavel Machek 5c601d0c94 [PATCH] wireless: move zd1201 where it belongs
zd1201 is wifi adapter, yet it is hiding in drivers/usb/net where
noone can find it. This moves Kconfig/Makefile zd1201 to the right
place.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05 16:13:30 -04:00
Jason Lunz ff7562aaec [PATCH] bcm43xx: quiet down log spam from set_security
The debug logging in bcm43xx_ieee80211_set_security() is pretty noisy.
Make it more silent.

Signed-off-by: Jason Lunz <lunz@falooley.org>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05 15:53:10 -04:00
Pavel Machek 2a80634031 [PATCH] usb wifi: zd1201 cleanups
Cleanup coding style and other small stuff in zd1201. No real code
changes.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05 15:34:18 -04:00
John W. Linville f6882a0688 Merge branch 'upstream-fixes' into upstream 2006-06-05 15:31:57 -04:00
Linus Torvalds 364212e0df Merge master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6:
  [PATCH] pcmcia: fix zeroing of cm4000_cs.c data
  [PATCH] pcmcia: missing pcmcia_get_socket() result check
2006-06-05 12:30:28 -07:00
Andrew Morton 2d7b20c188 [PATCH] m48t86: ia64 build fix
From: Andrew Morton <akpm@osdl.org>

drivers/rtc/rtc-m48t86.c: In function `m48t86_rtc_read_time':
drivers/rtc/rtc-m48t86.c:51: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:55: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:56: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:57: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:58: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:60: error: structure has no member named `ia64_mv'

readb() and writeb() are macros on ia64.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05 12:29:17 -07:00
Rune Torgersen 67f672f61b [PATCH] sata_sil24: SII3124 sata driver endian problem
From: "Rune Torgersen" <runet@innovsys.com>

Fix an endian issue in the sil24 driver.

Signed-off-by: Rune Torgersen <runet@innovsys.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05 12:29:17 -07:00
Stefan Richter 829a1985e7 [PATCH] sbp2: fix check of return value of hpsb_allocate_and_register_addrspace()
From: Stefan Richter <stefanr@s5r6.in-berlin.de>

I added a failure check in patch "sbp2: variable status FIFO address (fix
login timeout)" --- alas for a wrong error value.  This is a bug since
Linux 2.6.16.  Leads to NULL pointer dereference if the call failed, and
bogus failure handling if call succeeded.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: <stable@kernel.org>
Cc: Ben Collins <bcollins@debian.org>
Cc: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05 12:29:16 -07:00
Zachary Amsden 0674d594ad [PATCH] Implement get / set tso for forcedeth driver
From: Zachary Amsden <zach@vmware.com>

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05 12:29:16 -07:00
Peter Oberparleiter 4ae9538dd0 [PATCH] s390: cio non-unique path group ids
From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>

The path grouping can fail due to non-unique pathgroup-IDs.  The source for
the CPU-ID part of the ID was incorrectly specified on 64 bit systems.
Additionally, the length of the ID was too large due to incorrect data packing
declaration.  Fix CPU-ID lowcore address and add missing packing declaration.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05 12:29:16 -07:00
Cornelia Huck e0ec574987 [PATCH] s390: irb memcpy argument swap
From: Cornelia Huck <cornelia.huck@de.ibm.com>

Swapped memcpy arguments in ccw_device_irq() when doing basic sense after
unsolicited interrupt.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05 12:29:15 -07:00
Florin Malita 6f25891073 [PATCH] nmclan_cs: dereferencing skb after netif_rx()
From: Florin Malita <fmalita@gmail.com>

The skb may be gone after netif_rx(), we can't use 'skb->len' to update the
stats.  'pkt_len' should work instead.

Coverity CID: 911.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-05 12:29:15 -07:00
Michael Buesch ea9a771959 [PATCH] bcm43xx: add DMA rx poll workaround to DMA4
Also add the Poll RX DMA Memory workaround to the DMA4
(xmitstatus) path.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-06-05 15:28:56 -04:00
John W. Linville dea58b80f2 Merge branch 'from-linus' into upstream 2006-06-05 14:42:27 -04:00
Eli Cohen 959eb39297 IPoIB: Fix AH leak at interface down
When ipoib_stop() is called it first calls netif_stop_queue() to stop
the kernel from passing more packets to the network driver. However,
the completion handler may call netif_wake_queue() re-enabling packet
transfer.

This might result in leaks (we see AH leaks which we think can be
attributed to this bug) as new packets get posted while the interface
is going down.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-05 09:51:36 -07:00
Jan Beulich b10eec2246 [CPUFREQ] cpufreq core {d,}printk adjustments
Remove KERN_* suffixes from some cpufreq driver's dprintk-s.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-04 19:47:38 -04:00
Ralf Baechle 092d01e260 [MMC] Prevent au1xmmc.c breakage on non-Au1200 Alchemy
The driver is selectable on other than Au1200 Alchemy systems but won't
build nor work - there is no MMC hw.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-06-04 17:40:58 +01:00
Linus Torvalds 672c6108a5 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:
  [SCSI] scsi_lib.c: properly count the number of pages in scsi_req_map_sg()
  [SCSI] scsi_transport_sas: make write attrs writeable
  [SCSI] scsi_transport_sas; fix user_scan
  [SCSI] ppa: fix for machines with highmem
  [SCSI] mptspi: reset handler shouldn't be called for other bus protocols
  [SCSI] Blacklist entry for HP dat changer
2006-06-03 09:12:50 -07:00
Dominik Brodowski 2b0dd802ba [PATCH] pcmcia: fix zeroing of cm4000_cs.c data
Fix the incorrect calculation of how much to zero out in struct cm4000_dev
on device initialization.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-06-02 00:57:31 +02:00
Florin Malita 1617406a76 [PATCH] pcmcia: missing pcmcia_get_socket() result check
The result of pcmcia_get_socket() may be NULL but ds_event() uses it
without checking.

Coverity CID: 436.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-06-02 00:56:17 +02:00
Bryan Holty f52359622f [SCSI] scsi_lib.c: properly count the number of pages in scsi_req_map_sg()
The calculation of nr_pages in scsi_req_map_sg() doesn't account for
the fact that the first page could have an offset that pushes the end
of the buffer onto a new page.

Signed-off-by: Bryan Holty <lgeek@frontiernet.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-01 09:16:55 -05:00
Paul Mackerras c029cc66cb Merge branch 'merge' 2006-06-01 19:05:23 +10:00
NeilBrown c331eb04b9 [PATCH] md: Fix badness in sysfs_notify caused by md_new_event
From: NeilBrown <neilb@suse.de>

If an error is reported by a drive in a RAID array (which is done via
bi_end_io - in interrupt context), we call md_error and md_new_event which
calls sysfs_notify.  However sysfs_notify grabs a mutex and so cannot be
called in interrupt context.

This patch just creates a variant of md_new_event which avoids the sysfs
call, and uses that.  A better fix for later is to arrange for the event to
be called from user-context.

Note: avoiding the sysfs call isn't a problem as an error will not, by
itself, modify the sync_action attribute.  (We do still need to
wake_up(&md_event_waiters) as an error by itself will modify /proc/mdstat).

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-31 16:27:11 -07:00
Jeremy Higdon a835fa798d [PATCH] sgiioc4: use mmio ops instead of port io
From: Jeremy Higdon <jeremy@sgi.com>

This patch fixes a bug in sgiioc4 where it was using the default IDE port
I/O operations instead of MMIO.

The IDE part of the IOC4 chip uses MMIO to map the chip registers.
Unfortunately, the sgiioc4 driver uses the default port IO operations,
which happens to have worked for the past few years.  That's about to
change, however, thus this change from inX/outX to readX/writeX.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-31 16:27:11 -07:00
Martin Michlmayr 8fd66ab852 [PATCH] maxinefb: Fix compilation error
From: Martin Michlmayr <tbm@cyrius.com>

Fix the following compilation error:

CC      drivers/video/maxinefb.o
drivers/video/maxinefb.c:58: warning: initializer-string for array of chars is too long
drivers/video/maxinefb.c:58: warning: (near initialization for \u2018maxinefb_fix.id\u2019)
drivers/video/maxinefb.c:110: error: unknown field \u2018fb_get_fix\u2019 specified in initializer
drivers/video/maxinefb.c:110: error: \u2018gen_get_fix\u2019 undeclared here (not in a function)
drivers/video/maxinefb.c:111: error: unknown field \u2018fb_get_var\u2019 specified in initializer
drivers/video/maxinefb.c:111: error: \u2018gen_get_var\u2019 undeclared here (not in a function)
make[2]: *** [drivers/video/maxinefb.o] Error 1

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-31 16:27:11 -07:00
Rodolfo Giometti c05b7f3d12 [PATCH] au1100fb: Fix compilation
From: Rodolfo Giometti <giometti@linux.it>

Fix the following warning on compilation:

drivers/video/au1100fb.c: In function `au1100fb_fb_setcolreg':
drivers/video/au1100fb.c:219: warning: ISO C90 forbids mixed declarations and code
drivers/video/au1100fb.c: In function `au1100fb_fb_pan_display':
drivers/video/au1100fb.c:321: warning: ISO C90 forbids mixed declarations and code
drivers/video/au1100fb.c: In function `au1100fb_fb_mmap':
drivers/video/au1100fb.c:387: warning: ISO C90 forbids mixed declarations and code
drivers/video/au1100fb.c: In function `au1100fb_drv_probe':
drivers/video/au1100fb.c:471: warning: unsigned int format, long unsigned int arg (arg 2)
drivers/video/au1100fb.c: At top level:
drivers/video/au1100fb.c:617: warning: initialization from incompatible pointer type
drivers/video/au1100fb.c:618: warning: initialization from incompatible pointer type

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-31 16:27:11 -07:00
Andrew Morton 760f1fce03 [PATCH] revert "swsusp add check for suspension of X controlled devices"
From: Andrew Morton <akpm@osdl.org>

Revert commit ff4da2e262.

It broke APM suspend, probably because APM doesn't switch back to a VT
when suspending.

Tracked down by Matt Mackall <mpm@selenic.com>

Rafael sayeth:
  "It only fixed the theoretical issue that a quick-handed user could
   switch to X after processes have been frozen and before the devices
   are suspended.

   With the current userland suspend tools it shouldn't be necessary."

Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-31 16:27:11 -07:00
Corey Minyard d61a3ead26 [PATCH] IPMI: reserve I/O ports separately
From: Corey Minyard <minyard@acm.org>

This patch is pretty important to get in for IPMI, new systems have been
changing the way ACPI and IPMI interact, and this works around the problems
for now.  This is a temporary fix until we get proper ACPI handling in
IPMI.

Fixed releasing already-allocated regions when a later request fails, and
forward-ported it to HEAD.

Some BIOSes reserve disjoint I/O regions in their ACPI tables for the IPMI
controller.  This causes problems when trying to register the entire I/O
region.  Therefore we must register each I/O port separately.

Signed-off-by: Jordan Hargrave <Jordan_Hargrave@dell.com>
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-31 16:27:10 -07:00
Seiji Munetoh 44d7aff035 [PATCH] tpm: more bios log parsing fixes
From: Seiji Munetoh <seiji.munetoh@gmail.com>

Change the binary output format to actual ACPI TCPA log structure since the
current format does not contain all event-data information that need to
verify the PCRs in TPM.  tpm_binary_bios_measurements_show() uses
get_event_name() to convert the binary event-data to ascii format, and puts
them as binary.  However, to verify the PCRs, the event-data must be a
actual binary event-data used by SHA1 calc.  in BIOS.

So, I think actual ACPI TCPA log is good for this binary output format.
That way, any userland tools easily parse this data with reference to TCG
PC specification.

Signed-off-by: Seiji Munetoh <seiji.munetoh@gmail.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-31 16:27:10 -07:00
Seiji Munetoh de66a695be [PATCH] tpm: bios log parsing fixes
From: Seiji Munetoh <seiji.munetoh@gmail.com>

Fix "tcpa_pc_event" misalignment between enum, strings and TCG PC spec and
output of the event which contains a hash data.

Signed-off-by: Seiji Munetoh <seiji.munetoh@gmail.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-31 16:27:10 -07:00
David Hollister 308af9290a [PATCH] fbcon: fix scrollback with logo issue immediately after boot
From: David Hollister <david.hollister@amd.com>

After the system boots with the logo, if the first action is a scrollback, the
screen may become garbled.  This patch ensures that the softback_curr value is
updated along with softback_in following the scrollback.

Signed-off-by: David Hollister <david.hollister@amd.com>
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Cc: "Antonino A. Daplas" <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-31 16:27:10 -07:00
Vivek Goyal 9bf0a28c9a [SCSI] kdump: mpt fusion driver initialization failure fix
MPT fusion driver initialization fails while second kernel is booting,
after a system crash (if kdump kernel is configured).  Oops message is
pasted below.

*****************************************************************************
Fusion MPT base driver 3.03.08
Copyright (c) 1999-2005 LSI Logic Corporation
Fusion MPT SAS Host driver 3.03.08 ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] -> GSI 5 (level, low) -> IRQ 5
mptbase: Initiating ioc0 bringup
BUG: unable to handle kernel paging request at virtual address 00002608
 printing eip:
c11782fd
*pde = 00000000
Oops: 0000 [#1]
Modules linked in:
CPU:    0
EIP:    0060:[<c11782fd>]    Not tainted VLI
EFLAGS: 00010046   (2.6.17-rc1-16M #2)
EIP is at mptscsih_io_done+0x27/0x3a3
eax: c4fed000   ebx: c4fed000   ecx: 00002600   edx: 00000298
esi: c11782d6   edi: 00002600   ebp: 00000000   esp: c1332f74
ds: 007b   es: 007b   ss: 0068
Process swapper (pid: 0, threadinfo=c1332000 task=c128f9c0) Stack: <0>0000006c 00000020 00000298 00002600 c4fed000 c4fed000 c11782d6 0000260 0
       00000000 c1172c49 c4fed000 c1305b40 00000005 00000000 c1172d75 c48877e0
       c1029687 00000000 c1307fb8 00000000 c1305a00 00000001 00000000 c1307fb8
Call Trace:
 <c11782d6> mptscsih_io_done+0x0/0x3a3   <c1172c49> mpt_turbo_reply+0xbb/0xd3
 <c1172d75> mpt_interrupt+0x22/0x2b   <c1029687> misrouted_irq+0x63/0xcb
 <c10297b3> note_interrupt+0x43/0x98   <c10292f9> __do_IRQ+0x68/0x8f
 <c1003fac> do_IRQ+0x36/0x4e
 =======================
 <c1002aa6> common_interrupt+0x1a/0x20   <c1001150> mwait_idle+0x1a/0x2a
 <c10010bf> cpu_idle+0x40/0x5c   <c1308610> start_kernel+0x17a/0x17c Code: 5e 5f 5d c3 55 89 cd 57 56 53 83 ec 14 89 54 24 0c 89 44 24 10 8b 90 cc 00  00 00 8b 4c 24 0c 81 c2 98 02 00 00 85 ed 89 54 24 08 <0f> b7 79 08 89 fe 74 04  0f b7 75 08 66 39 f7 75 0d 8b 44 24 0c
*******************************************************************************

o Kdump capture kernel boot fails during initialization of MPT fusion driver.
  (LSI Logic / Symbios Logic SAS1064E PCI-Express Fusion-MPT SAS (rev 01))

o Problem is easily reproducible, if system crashed while some disk activity
  like cp operation was going on.

o After a system crash, devices are not shutdown and capture kernel starts
  booting while skipping BIOS. Hence underlying device is left in operational
  state. In this case scsi contoller was left with interrupt line asserted
  reply FIFO was not empty. When driver starts initializing in the second
  kernel, it receives the interrupt the moment request_irq() is called.
  Interrupt handler, reads the message from reply FIFO and tries to access
  the associated message frame and panics, as in the new kernel's context
  that message frame is not valid at all.

o In this scenario, probably we should delay the request_irq() call. First
  bring up the IOC, reset it if needed and then should register for irq.

o I have tested the patch with SAS1064E and 53c1030 controllers.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Acked-by: "Moore, Eric Dean" <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-31 10:33:49 -05:00
Dave Jones 01af2fac9e [AGPGART] Remove pointless initialisation in intel-agp
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 18:22:07 -04:00
Dave Jones 89197e34ea [AGPGART] Remove pointless code from agp_generic_create_gatt_table()
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 18:19:39 -04:00
Dave Jones 484944a5b0 [CPUFREQ] Remove more freq_table reinitialisations.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 18:09:31 -04:00
Dave Jones 5557976ca9 [CPUFREQ] Fix another redundant initialisation in freq_table
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 17:59:48 -04:00
Dave Jones 355eb31801 [CPUFREQ] Remove duplicate assignment in freq_table
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 17:58:41 -04:00
Dave Jones 511e9ee170 [CPUFREQ] CodingStyle nits in cpufreq_stats.c
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 17:57:14 -04:00
Linus Torvalds e60a48f5ab Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] VIA PT880 Ultra support.
  [AGPGART] Fix Nforce3 suspend on amd64.
  [AGPGART] Enable SIS AGP driver on x86-64 for EM64T systems
2006-05-30 11:54:32 -07:00
Joern Engel 73c619ea0e [MTD] Disconnect struct mtd_info from ABI
mtdchar.c direcly copied part of struct mtd_info to userspace, thereby
implicitly making it part of the ABI.  With this patch, struct
mtd_info is independent of the ABI and can have its fields removed,
reordered, etc.

Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30 14:25:35 +02:00
Joern Engel 92cbfdcc36 [MTD] replace MTD_RAM with MTD_GENERIC_TYPE
Ram devices get the extra capability of MTD_NO_ERASE - not requiring
an explicit erase before writing to it.  Currently only mtdblock uses
this capability.  Rest of the patch is a simple text replacement.

Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30 14:25:24 +02:00
Joern Engel e369d62e92 [MTD] replace MTD_ROM with MTD_GENERIC_TYPE
No mtd user should ever check for the device type.  Instead, device features
should be checked by the flags - if at all.
As a first step towards type removal, change MTD_ROM into MTD_GENERIC_TYPE.

Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30 14:25:17 +02:00
Joern Engel e1219724be [MTD] remove a forgotten MTD_XIP
MTD_XIP definition was removed in an earlier patch.  This invocation
was left by mistake.

Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-30 14:25:05 +02:00
Andrew Morton 7e9a0bb00c [MTD] Fix build warnings (and debug build error) in nand_base.c
drivers/mtd/nand/nand_base.c: In function 'nand_transfer_oob':
drivers/mtd/nand/nand_base.c:909: warning: comparison of distinct pointer types lacks a cast
drivers/mtd/nand/nand_base.c: In function 'nand_do_read_oob':
drivers/mtd/nand/nand_base.c:1097: error: 'len' undeclared (first use in this function)
drivers/mtd/nand/nand_base.c:1097: error: (Each undeclared identifier is reported only once
drivers/mtd/nand/nand_base.c:1097: error: for each function it appears in.)
drivers/mtd/nand/nand_base.c: In function 'nand_fill_oob':
drivers/mtd/nand/nand_base.c:1411: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-30 09:06:41 +01:00
Kenan Esau 47ce56edb8 Input: psmouse - DMI updates for lifebook protocol
Added different lifebook-versions and the CF-18 to the corresponding
dmi-table.

Signed-off-by: Kenan Esau <kenan.esau@conan.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-05-29 23:31:12 -04:00
Richard Purdie ed8f9e2f04 Input: change from numbered to named switches
Remove the numbered SW_* entries from the input system and assign names
to the existing users.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-05-29 23:31:03 -04:00
Yotam Medini d2f4012f15 Input: alps - fix old protocol decoding
Correct touchpad left & right keys assignments for ALPS_OLDPROTO
that were swapped. Old protocol is used on UMAX ActionBook-530T
notebook.

Signed-off-by: Yotam Medini <yotam.medini@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-05-29 23:30:36 -04:00
masc@theaterzentrum.at e107b8ee7e Input: wistron - add support for AOpen Barebook 1559as
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-05-29 23:29:36 -04:00
Zbigniew Luszpinski 4f8b05efec Input: psmouse - add detection of Logitech TrackMan Wheel trackball
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-05-29 23:29:19 -04:00
Jesper Juhl 7363cfc866 Input: sidewinder - fix memory leak
In sw_connect we leak 'buf' and 'idbuf' when we do not leave via one of
the fail* labels. This was spotted by the coverity checker.

Patch is compile tested only due to lack of hardware.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-05-29 23:28:05 -04:00
Thomas Gleixner f1a28c0284 [MTD] NAND Expose the new raw mode function and status info to userspace
The raw read/write access to NAND (without ECC) has been changed in the
NAND rework. Expose the new way - setting the file mode via ioctl - to
userspace. Also allow to read out the ecc statistics information so userspace
tools can see that bitflips happened and whether errors where correctable
or not. Also expose the number of bad blocks for the partition, so nandwrite
can check if the data fits into the parition before writing to it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-30 00:37:34 +02:00
Thomas Gleixner 9a1fcdfd4b [MTD] NAND Signal that a bitflip was corrected by ECC
Return -EUCLEAN on read when a bitflip was detected and corrected, so the
clients can react and eventually copy the affected block to a spare one.
Make all in kernel users aware of the change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29 15:06:51 +02:00
Thomas Gleixner 8593fbc68b [MTD] Rework the out of band handling completely
Hopefully the last iteration on this!

The handling of out of band data on NAND was accompanied by tons of fruitless
discussions and halfarsed patches to make it work for a particular
problem. Sufficiently annoyed by I all those "I know it better" mails and the
resonable amount of discarded "it solves my problem" patches, I finally decided
to go for the big rework. After removing the _ecc variants of mtd read/write
functions the solution to satisfy the various requirements was to refactor the
read/write _oob functions in mtd.

The major change is that read/write_oob now takes a pointer to an operation
descriptor structure "struct mtd_oob_ops".instead of having a function with at
least seven arguments.

read/write_oob which should probably renamed to a more descriptive name, can do
the following tasks:

- read/write out of band data
- read/write data content and out of band data
- read/write raw data content and out of band data (ecc disabled)

struct mtd_oob_ops has a mode field, which determines the oob handling mode.

Aside of the MTD_OOB_RAW mode, which is intended to be especially for
diagnostic purposes and some internal functions e.g. bad block table creation,
the other two modes are for mtd clients:

MTD_OOB_PLACE puts/gets the given oob data exactly to/from the place which is
described by the ooboffs and ooblen fields of the mtd_oob_ops strcuture. It's
up to the caller to make sure that the byte positions are not used by the ECC
placement algorithms.

MTD_OOB_AUTO puts/gets the given oob data automaticaly to/from the places in
the out of band area which are described by the oobfree tuples in the ecclayout
data structre which is associated to the devicee.

The decision whether data plus oob or oob only handling is done depends on the
setting of the datbuf member of the data structure. When datbuf == NULL then
the internal read/write_oob functions are selected, otherwise the read/write
data routines are invoked.

Tested on a few platforms with all variants. Please be aware of possible
regressions for your particular device / application scenario

Disclaimer: Any whining will be ignored from those who just contributed "hot
air blurb" and never sat down to tackle the underlying problem of the mess in
the NAND driver grown over time and the big chunk of work to fix up the
existing users. The problem was not the holiness of the existing MTD
interfaces. The problems was the lack of time to go for the big overhaul. It's
easy to add more mess to the existing one, but it takes alot of effort to go
for a real solution.

Improvements and bugfixes are welcome!

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29 15:06:51 +02:00
Thomas Gleixner f4a43cfcec [MTD] Remove silly MTD_WRITE/READ macros
Most of those macros are unused and the used ones just obfuscate
the code. Remove them and fixup all users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29 15:06:50 +02:00
Thomas Gleixner 5bd34c091a [MTD] NAND Replace oobinfo by ecclayout
The nand_oobinfo structure is not fitting the newer error correction
demands anymore. Replace it by struct nand_ecclayout and fixup the users
all over the place. Keep the nand_oobinfo based ioctl for user space
compability reasons.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29 15:06:50 +02:00
Thomas Gleixner ff268fb879 [MTD] NAND Consolidate oobinfo handling
The info structure for out of band data was copied into
the mtd structure. Make it a pointer and remove the ability
to set it from userspace. The position of ecc bytes is
defined by the hardware and should not be changed by software.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29 15:06:49 +02:00
Thomas Gleixner 8be834f762 [MTD] NAND Fix platform structure and NDFC driver
The platform structure was lacking an oobinfo field.
The NDFC driver had some remains from another tree.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-29 15:06:49 +02:00
Andrew Morton 19676ff0a6 [MTD] Fix debug printk format warning in m25p80 SPI chip driver, again.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-29 11:33:33 +01:00
David Woodhouse 33280eac70 [MTD] AMD Geode NAND support can depend on X86_32; we won't see it on x86_64
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-29 11:24:29 +01:00
Dennis Munsie 7a532c69c3 intelfb: use regular modedb table instead of VESA
intelfb driver -- use the regular modedb table instead of the VESA modedb
table.  Ideally, the 9xx stride patch should be applied first, since there
are modes in the VESA table that won't work without that patch.

Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-29 18:58:09 +10:00
Antonino A. Daplas 56e004e543 intelfb: use firmware EDID for mode database
Use firmware EDID for the driver's private mode database.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Cc: Sylvain Meyer <sylvain.meyer@worldonline.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-29 18:49:08 +10:00
Dave Airlie 080a416802 Revert "intelfb driver -- use the regular modedb table instead of the VESA"
This reverts 2c47430a03 commit.
This conflicts with a patch in -mm from Antonino reapply later.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-29 18:45:19 +10:00
Eric Hustvedt 65eb2f97db intelfb: int option fix
Fix integer option parsing in the intelfb driver. The macro wasn't
accounting for the equal sign past the option name. As a result,
the vram option always returned 0.

Signed-off-by: Eric Hustvedt <ehustvedt@cecropia.com>
Signed-off-by: Dennis Munsie <dmunsie@cecropia.com
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-29 18:38:55 +10:00
Linus Torvalds d9ec5ad24c Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] the latest consensus libata resume fix
2006-05-28 16:35:52 -07:00
Jeff Garzik b53471711f Merge branch 'velocity' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into upstream 2006-05-28 16:35:13 -04:00
Mark Lord 0737ac895a [PATCH] the latest consensus libata resume fix
Okay, just to sum things up.

This forces libata to wait for up to 2 seconds for BUSY|DRQ to clear
on resume before continuing.

[jgarzik adds...]  During testing we never saw DRQ asserted, but
nonetheless (a) this works and (b) testing for DRQ won't hurt.

Signed-off-by:  Mark Lord <liml@rtr.ca>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-28 16:32:08 -04:00
Hannes Reinecke 2b89dad0c7 [SCSI] audit drivers for incorrect max_id use
max_id now means the maximum number of ids on the bus, which means it
is one greater than the largest possible id number.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 13:07:41 -04:00
Amit Arora 091686d3b5 [SCSI] Return -EINVAL when "id == max_id" in scsi_scan_host_selected()
The scsi_scan_host_selected() should return -EINVAL when the id is equal
to the max_id. Currently it uses ">" when comparing with max_id, and
hence leaves the border case when "id==max_id".
The channel and lun have values valid from 0 up to,
and including, max_channel or max_lun. But, the valid values for id
range from 0 to max_id-1. This patch fixes the problem.

Signed-off-by: Amit Arora <aarora@in.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 13:01:23 -04:00
Andreas Herrmann 93ef588735 [SCSI] zfcp: bump up version number
Bump up version number, skip "4.6.0" because this might
clash with zfcp version in certain distros.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:50:45 -04:00
Andreas Herrmann 338151e066 [SCSI] zfcp: make use of fc_remote_port_delete when target port is unavailable
If zfcp's port erp fails we now call fc_remote_port_delete. This helps
to avoid offlined scsi devices if scsi commands time out due to path
failures. When an adapter erp fails we call fc_remote_port_delete for
all ports on that adapter.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:50:17 -04:00
Ralph Wuerthner 75bfc2837b [SCSI] zfcp: evaluate plogi payload to set maxframe_size, supported_classes of rports
Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:45:15 -04:00
Ralph Wuerthner b7a52fa7ff [SCSI] zfcp: print bit error threshold data human readable
Replace hex dump of bit error threshold data by log message showing
bit error threshold data human readable.

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:43:59 -04:00
Andreas Herrmann 06506d00ec [SCSI] zfcp: (cleanup) removed superfluous macros, struct members, typedefs
Removed some macros, struct members and typedefs which were
unused or not necessary.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:43:33 -04:00
Andreas Herrmann ec4081c6ba [SCSI] zfcp: (cleanup) kmalloc/kzalloc replacement
Replace kmalloc/memset by kzalloc or kcalloc.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:42:52 -04:00
Andreas Herrmann ca3271b402 [SCSI] zfcp: (cleanup) remove useless comments
Removed some useless comments.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:38:15 -04:00
Andreas Herrmann 4a9d2d8bf9 [SCSI] zfcp: (cleanup) shortened copyright and author information
Copyright update, shortened file headers, shortened author information.

Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-05-28 12:36:02 -04:00
Jay Cliburn 83055d46e5 via-velocity: allow MTU size less than 1500 bytes
Change the minimum allowable MTU size from 1500 bytes to 64 bytes.

Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
2006-05-27 21:26:13 +02:00
Linus Torvalds 371858568e 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: fix RTC/NVRAM accesses on Maple
  [PATCH] ppc32 CPM_UART: various fixes for pq2 uart users
  [PATCH] powerpc: linuxppc64.org no more
2006-05-27 09:40:40 -07:00
Dave Airlie f728377f67 sync modesetting code with X.org
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-27 18:56:02 +10:00
Dave Airlie c9daa873c3 intelfb: align with changes from my X driver.
This just realigns the PLL calculation routines with the ones from my X.org
driver.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-27 18:44:02 +10:00
Dennis Munsie 2c47430a03 intelfb driver -- use the regular modedb table instead of the VESA
modedb table.  Ideally, the 9xx stride patch should be applied first, since
there are modes in the VESA table that won't work without that patch.

Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-27 18:33:35 +10:00
Eric Hustvedt 1aecb39309 Adds support for 256MB aperture on 945 chipsets to the intelfb driver
and corrects calculation of stolen memory overhead.

Signed-off-by: Eric Hustvedt <ehustvedt@cecropia.com>
Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-27 18:30:00 +10:00
Dennis Munsie df7df8ab7b intelfb -- uses stride alignment of 64 on the 9xx chipsets.
Signed-off-by: Dennis Munsie <dmunsie@cecropia.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-05-27 18:17:52 +10:00
Al Viro 92af11cdec [PATCH] missing readb/readw in rio
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:27:23 -04:00
Al Viro 0645819196 [PATCH] copy_to_user() from iomem is a bad thing
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:27:15 -04:00
Al Viro 6bc540e69a [PATCH] forgotten swap of copyout() arguments
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:27:06 -04:00
Al Viro 1bf087194f [PATCH] handling rio MEMDUMP
it copies data _from_ iomem, so it should be rio_memcpy_fromio(), not
->Copy().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:26:58 -04:00
Al Viro ae5b28a5bb [PATCH] fix rio_copy_to_card() for OLDPCI case
It replaced old rio_pcicopy().  That puppy did _not_ do readb() (unlike
rio_memcpy_toio()) and current implementation is simply broken - readb(NULL)
is never a valid thing to do.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:26:49 -04:00
Al Viro bfa6b7bb35 [PATCH] uses of ->Copy() in rioroute are bogus
... there we are building a command in normal memory; it will be
copied to iomem (by ->Copy()) later.  Use memcpy()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:26:40 -04:00
Al Viro c7c0d0a10f [PATCH] bogus order of copy_from_user() arguments
... aka "somebody forgot to swap arguments when converting from copyin()"

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:26:32 -04:00
Al Viro 38d0d001b9 [PATCH] rio ->Copy() expects the sourse as first argument
... so conversion from rio_pcicopy() to rio_copy_to_card() had broken the
damn thing.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:26:23 -04:00
Al Viro d886cb586f [PATCH] trivial annotations in rio
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-05-27 02:26:14 -04:00
Jeff Garzik 983f27d37d Merge branch 'upstream-fixes' into upstream
Conflicts:

	drivers/s390/net/ctctty.c
2006-05-26 22:01:26 -04:00
Jeff Garzik e82b0f2cc2 [netdrvr s/390] trim trailing whitespace
Previous fix patches added a bunch of trailing whitespace,
which git-applymbox complained loudly about.
2006-05-26 21:58:38 -04:00
Klaus Wacker 74ef872c8f [PATCH] s390: lcs driver bug fixes and improvements [2/2]
This is the second lcs driver patch containing the rest of lcs fixes.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:57:45 -04:00
Klaus Wacker 27eb5ac8f0 [PATCH] s390: lcs driver bug fixes and improvements [1/2]
Several problems occured with lcs device driver:
	 - device not operational anymore after cable pull/plug-in.
       	 - unpredictable results occured, e.g. kernel panic
	   using cards of type QD8F.
	 - STOPLAN and delete multicast address command
           were not proper recognized by OSA card under heavy network workload.
       	 - channel/device error checks missing in interrupt handler.
	To fix all problems at once recovery of lcs devices has been improved.
	missing error checks in lcs interrupt handler has been added.
	Once a hardware problem occurs lcs will recover the device now properly.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:57:45 -04:00
Ursula Braun ba1aa084d6 [PATCH] s390: qeth driver fixes
From: Frank Blaschka <Frank.Blaschka@de.ibm.com>
From: Frank Pavlic <fpavlic@de.ibm.com>

        - fix fake_ll during initial device bringup. fake_ll was
	  not active after first start of the device.
	  Problem only occured when qeth was built without IPV6 support.
        - avoid skb usage after invocation of qeth_flush_buffers,
	  because skb might already be freed.
        - remove yet another useless netif_wake_queue in
	  qeth_softsetup_ipv6 since this function is only called
	  when device is going online. In this case card->state will
	  never be in state UP. So let the net_device queue down .

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:56:41 -04:00
Ursula Braun b85e1fa196 [PATCH] s390: qeth driver fixes
From: Frank Pavlic <fpavlic@de.ibm.com>

	- correct checking of sscanf-%n value in qeth_string_to_ipaddr().
	- don't use netif_stop_queue outside the hard_start_xmit routine.
	  Rather use netif_tx_disable.
	- don't call qeth_netdev_init on a recovery.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:56:40 -04:00
Cornelia Huck 7401a4670f [PATCH] s390: minor fix in cu3088
In case of a parse error for the cu3088 group attribute,
return -EINVAL instead of count.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:56:40 -04:00
Yoichi Yuasa de1e938e54 [PATCH] r8169: add new PCI ID
Hi,

This patch add new PCI ID for r8169 driver.
RTL8110SBL has this PCI ID.

Please aply.

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:47:15 -04:00
Jeff Garzik f3b197ac26 [netdrvr] trim trailing whitespace: 8139*.c, epic100, forcedeth, tulip/* 2006-05-26 21:39:03 -04:00
Ayaz Abdulla eb91f61b22 [PATCH] forcedeth: add support for flow control
This patch adds flow control support for tx and rx pause frames in
forcedeth.

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

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:37:54 -04:00
Jens Osterkamp 48cf270e45 [PATCH] spidernet: replace whitespaces by tabs
The original patch was using whitespaces instead of tabs.

Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:33:58 -04:00
Jeff Garzik f29cb26c43 Merge branch 'upstream-fixes' into upstream 2006-05-26 21:33:55 -04:00
Don Fry a24b163b7c [PATCH] pcnet32: remove incorrect pcnet32_free_ring
During a code scan for another change I discovered that this call to
pcnet32_free_ring must be removed.  If the open fails due to a lack of
memory all the ring structures are removed via the call to free_ring
and a subsequent call to open will dereference a null pointer in
pcnet32_init_ring.

Please apply to 2.6.17.

Signed-off-by:  Don Fry <brazilnut@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:33:18 -04:00
Auke Kok 80871e63e4 e1000: add shutdown handler back to fix WOL
Someone was waaay too aggressive and removed e1000's reboot notifier
instead of porting it to the new way of the shutdown handler.  This change
broke wake on lan.  Add the shutdown handler back in using the same method
as e100 uses.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>

(cherry picked from c653e6351e commit)
2006-05-26 21:31:56 -04:00
Alexey Dobriyan 6082823632 [PATCH] e1000: endian fixes
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Ronciak, John" <john.ronciak@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:29:09 -04:00
Jeff Garzik cbc696a5fa Merge branch 'upstream-fixes' into upstream 2006-05-26 21:26:34 -04:00
Jeff Garzik 8fc29ba65b Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-05-26 21:26:22 -04:00
Thomas Gleixner ba0251fe87 [MTD] NAND Consolidate references and add back default name setting
We have a type pointer. Make use of it instead of the error prone nand_ids[i]
reference.

The NAND driver used to set default name settings from the chip ID
string for the device. The feature got lost during the rework. Add it back.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-27 01:02:13 +02:00
Thomas Gleixner cca3b837bb [MTD] NAND simplify nand_chip_select
nCE setting can be done when the first command is issued to the device.
We keep the deselect functionality as it makes sense to deassert nCE
when the device becomes idle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-27 00:47:18 +02:00
Linus Torvalds ecd68853b8 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]: dev.c comment fixes
  [IPV6] ROUTE: Don't try less preferred routes for on-link routes.
  [IRDA]: *_DONGLE should depend on IRTTY_SIR
  [MAINTAINERS]: Add entry for netem
2006-05-26 15:13:33 -07:00
David Woodhouse 29da9cea46 [MTD] Fix thinko in nand_write_page_hwecc()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-26 23:05:44 +01:00
John W. Linville b1141f6d5d Merge branch 'upstream-fixes' into upstream 2006-05-26 16:12:24 -04:00
Randy Dunlap 4541a5db0b [PATCH] arlan: fix section mismatch warnings
Fix section mismatch warnings:
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.init.text:arlan_probe from .text between 'init_module' (at offset
0x3526) and 'cleanup_module'
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.init.text:init_arlan_proc from .text between 'init_module' (at offset
0x3539) and 'cleanup_module'
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.exit.text:cleanup_arlan_proc from .text between 'cleanup_module' (at
offset 0x356c) and 'arlan_diagnostic_info_string'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-26 16:11:56 -04:00
Randy Dunlap 53072d68cc [PATCH] wavelan: fix section mismatch
Fix section mismatch warning:
WARNING: drivers/net/wireless/wavelan.o - Section mismatch: reference to
.init.text: from .text between 'init_module' (at offset 0x371e) and
'cleanup_module'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-26 16:11:56 -04:00
John W. Linville f587fb74b2 Merge branch 'from-linus' into upstream 2006-05-26 16:06:58 -04:00
Kylene Jo Hall 087377a430 [PATCH] tpm: fix bug for TPM on ThinkPad T60 and Z60
The TPM chip on the ThinkPad T60 and Z60 machines is returning 0xFFFF for
the vendor ID which is a check the driver made to double check it was
actually talking to the memory mapped space of a TPM.  This patch removes
the check since it isn't absolutely necessary and was causing device
discovery to fail on these machines.

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-26 11:55:47 -07:00
Randy Dunlap 5d5daa162a [PATCH] scx200_acb: fix section mismatch warning
WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference to
.init.text: from .text after 'scx200_add_cs553x' (at offset 0x528)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Ben Dooks ac88bcff2f [PATCH] s3c24xx: fix spi driver with CONFIG_PM
Fix compile bug with the S3C24XX SPI driver when CONFIG_PM is set.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
David Brownell 9084533e79 [PATCH] ads7846 conversion accuracy
This improves accuracy of the touchscreen and hwmon sensor readings,
addressing an issue noted by Imre Deak: there's an extra bit written before
the sample (12 bits) gets written out.

It also catches up to various comments, and makes the /proc/interrupts
entry sensible again.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Imre Deak <imre.deak@nokia.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Neil Brown c71d48877e [PATCH] Unlock md devices when stopping them on reboot.
otherwise we get nasty messages about locks not being released.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:52:11 -07:00
Linus Torvalds 309c68cc17 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 to SRQ for Tavor
2006-05-26 11:51:08 -07:00
Thomas Gleixner f75e5097ef [MTD] NAND modularize write function
Modularize the write function and reorganaize the internal buffer
management. Remove obsolete chip options and fixup all affected
users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-26 18:52:08 +02:00
Auke Kok d3f464b538 ixgb: update version, dates
increase the year dates to 2006 and bump the version to 1.0.109-k2

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:38:10 -07:00
Auke Kok 25a9f2f154 ixgb: remove changelog
same as e1000 - remove the changelog from the driver code itself.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:36:03 -07:00
Auke Kok 25943071b4 ixgb: replace netdev->priv with netdev_priv()
fix netdev->priv ==> netdev_priv(netdev)

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:35:57 -07:00
Auke Kok 235949d162 ixgb: remove inlines, allow compiler to choose
deinline a few large functions as to allow the compiler to pick.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:35:52 -07:00
Auke Kok 3352a3b20c ixgb: remove lock access in the fast path
This mimics a change made in the e1000 driver that imitates a slick
tg3 way of avoiding grabbing the lock around restarting the tx queue.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:35:47 -07:00
Auke Kok 3f3dc0dd20 ixgb: allocate only buffersize needed
In order to help correct window size growth, use the MFS register
to limit the packet sizes received and allocate only the buffer
size necessary

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>

index 0905a82..84a8064 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -574,9 +574,8 @@ ixgb_sw_init(struct ixgb_adapter *adapte
 	hw->subsystem_vendor_id = pdev->subsystem_vendor;
 	hw->subsystem_id = pdev->subsystem_device;

-	adapter->rx_buffer_len = IXGB_RXBUFFER_2048;
-
 	hw->max_frame_size = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH;
+	adapter->rx_buffer_len = hw->max_frame_size;

 	if((hw->device_id == IXGB_DEVICE_ID_82597EX)
 	   || (hw->device_id == IXGB_DEVICE_ID_82597EX_CX4)
@@ -820,21 +819,14 @@ ixgb_setup_rctl(struct ixgb_adapter *ada

 	rctl |= IXGB_RCTL_SECRC;

-	switch (adapter->rx_buffer_len) {
-	case IXGB_RXBUFFER_2048:
-	default:
+	if (adapter->rx_buffer_len <= IXGB_RXBUFFER_2048)
 		rctl |= IXGB_RCTL_BSIZE_2048;
-		break;
-	case IXGB_RXBUFFER_4096:
+	else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_4096)
 		rctl |= IXGB_RCTL_BSIZE_4096;
-		break;
-	case IXGB_RXBUFFER_8192:
+	else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_8192)
 		rctl |= IXGB_RCTL_BSIZE_8192;
-		break;
-	case IXGB_RXBUFFER_16384:
+	else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_16384)
 		rctl |= IXGB_RCTL_BSIZE_16384;
-		break;
-	}

 	IXGB_WRITE_REG(&adapter->hw, RCTL, rctl);
 }
@@ -1551,25 +1543,12 @@ ixgb_change_mtu(struct net_device *netde
 		DPRINTK(PROBE, ERR, "Invalid MTU setting %d\n", new_mtu);
 		return -EINVAL;
 	}
-
-	if((max_frame <= IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH)
-	   || (max_frame <= IXGB_RXBUFFER_2048)) {
-		adapter->rx_buffer_len = IXGB_RXBUFFER_2048;
-
-	} else if(max_frame <= IXGB_RXBUFFER_4096) {
-		adapter->rx_buffer_len = IXGB_RXBUFFER_4096;

-	} else if(max_frame <= IXGB_RXBUFFER_8192) {
-		adapter->rx_buffer_len = IXGB_RXBUFFER_8192;
+	adapter->rx_buffer_len = max_frame;

-	} else {
-		adapter->rx_buffer_len = IXGB_RXBUFFER_16384;
-	}
-
 	netdev->mtu = new_mtu;
-
-	if(old_max_frame != max_frame && netif_running(netdev)) {

+	if ((old_max_frame != max_frame) && netif_running(netdev)) {
 		ixgb_down(adapter, TRUE);
 		ixgb_up(adapter);
 	}
2006-05-26 09:35:43 -07:00
Auke Kok 989316ddfe ixgb: revert an unwanted fix regarding tso/descriptors
There seemed to be another bug introduced as well as a performance hit
with the addtion of the sentinel descriptor workaround.  Removal of
this workaround appears to prevent the hang.  We'll take a risk
and remove it, as we had never seen the originally reported bug
under linux.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:35:38 -07:00
Auke Kok 8556f0d189 ixgb: fix interface losing macaddr on ifdn/up
user contributed fix for LAA across down/up, from tonychung00@users.sf.net.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:35:32 -07:00
Auke Kok e59d16965c ixgb: fix smp polling race condition
Moved interrupt masking to before requesting the interrupt from the OS.
Moved interrupt enable to after netif_poll_enable.  This fixes a racy
BUG() where polling would be running on another CPU at the same time
that netif_poll_enable would run.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-26 09:35:28 -07:00
Vitaly Bordug 8e30a9a299 [PATCH] ppc32 CPM_UART: various fixes for pq2 uart users
This fixes various odd things that missed update together with cpm_uart
platform_device move. Unified resources names, restructurisation, etc.
Also, addressed issue with recent phys/virt translation rework. Being
cache-coherent, CPM2's do alloc_bootmem() for the console stuff, and it was
used to treat console buffer descriptor mapping 1:1 (as in CPM1 case),
which is definitely wrong.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-05-26 22:38:56 +10:00
David Woodhouse e4d222ff18 [MTD] Remove PCI dependency for Geode CS553[56] NAND controller.
PCI is faked on these devices by SMM traps. Don't depend on that --
check for the chipset directly instead.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-26 02:06:27 +01:00
Samuel Ortiz 56bc348ce8 [IRDA]: *_DONGLE should depend on IRTTY_SIR
If a SIR dongle is built in the kernel while IRTTY_SIR is built
as a module, kernel compilation will fail.
Thus, the SIR dongle config should depend on the IRTTY_SIR.

Closes kernel bug# 6512
(http://bugzilla.kernel.org/show_bug.cgi?id=6512)

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-25 16:17:53 -07:00
Auke Kok a24e2513c2 ixgb: increment version to 1.0.104-k4
Increment the driver version to 1.0.104-k4

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-25 13:24:27 -07:00
Auke Kok 6b900bb4bc ixgb: use rx copybreak/skb recycle
o use rx copybreak/skb recycle

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-25 13:24:21 -07:00
Auke Kok 1dfdd7df21 ixgb: add performance enhancements to the buffer_info struct
o modify the rx refill logic and tail bump
o add counter for failures

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-25 13:24:17 -07:00
David Woodhouse c5b553cc2c [MTD] Fix NAND_VERIFY_WRITE case to build with tglx's recent changes
Bad tglx. No biscuit.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-25 13:25:17 +01:00
Thomas Gleixner 8546ac4f84 [MTD] Remove the only useless readv implementation
Removing readv from struct mtd_info broke block2mtd. Remove the
reference and the useless default implementation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25 12:53:47 +01:00
Thomas Gleixner f5bbdacc41 [MTD] NAND Modularize read function
Split the core of the read function out and implement
seperate handling functions for software and hardware
ECC.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25 12:45:27 +01:00
Thomas Gleixner 7314e9e7d5 [MTD] NAND Cleanup oob functions
Cleanup the code in the oob related functions and
make use of the new NO_READRDY flag.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25 12:45:27 +01:00
Thomas Gleixner 7a30601b3a [MTD] NAND Introduce NAND_NO_READRDY option
The nand driver has a superflous read ready / command
delay in the read functions. This was added to handle
chips which have an automatic read forward. Newer
chips do not have this functionality anymore. Add this
option to avoid the delay / I/O operation. Mark all
large page chips with the new option flag.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25 12:45:26 +01:00
Thomas Gleixner 04bbd0eafb [MTD] NAND Initialize controller lock and wq only once
The lock simplifying patch did not move the lock and waitqueue
initialization into the controller allocation patch.
This reinitializes waitqueue and spinlocks also for driver
supplied controller stuctures. Move it into the allocation path.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-25 12:45:26 +01:00
Jean Delvare 4f3a151a11 [PATCH] V4L/DVB (4045): Fixes recursive dependency for I2C
Mixing "depends on I2C" and "select I2C" within the media subsystem
leads to the following problem:
Warning! Found recursive dependency: I2C DVB_BUDGET DVB_BUDGET_PATCH
DVB_AV7110 VIDEO_SAA7146_VV VIDEO_SAA7146 I2C

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-24 18:48:28 -07:00
Thomas Gleixner 12efdde313 [MTD] NAND fix cmd_ctrl breakage
The cmd_ctrl rework lacks some state transition flags.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-24 23:45:24 +01:00
Thomas Gleixner ace4dfee56 [MTD] NAND coding style and namespace cleanup
Cleanup the functions which are not going to change in the
next steps.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-24 23:45:24 +01:00
Michael S. Tsirkin ab28b171ea IB/mthca: Fix posting lists of 256 receive requests to SRQ for Tavor
If we post a list of length exactly a multiple of 256, 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.

This is the same bug that we just fixed for QPs with non-shared RQ.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-24 13:43:37 -07:00
Linus Torvalds da8bacf6d5 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/ipath: deref correct pointer when using kernel SMA
  IB/ipath: fix null deref during rdma ops
  IB/ipath: register as IB device owner
  IB/ipath: enable PE800 receive interrupts on user ports
  IB/ipath: enable GPIO interrupt on HT-460
  IB/ipath: fix NULL dereference during cleanup
  IB/ipath: replace uses of LIST_POISON
  IB/ipath: fix reporting of driver version to userspace
  IB/ipath: don't modify QP if changes fail
  IB/ipath: fix spinlock recursion bug
2006-05-24 08:55:12 -07:00
Linus Torvalds 2786545410 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] libata: add pio flush for via atapi (was: Re: TR: ASUS A8V Deluxe, x86_64)
2006-05-24 08:36:31 -07:00
Linus Torvalds b8bba261e0 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  [PATCH] sky2: fix jumbo packet support
2006-05-24 08:36:03 -07:00
Pierre Ossman 51c4032740 [MMC] Fix premature use of md->disk
md->disk was being used in a debug message before it was allocated.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-24 08:35:31 -07:00
David Woodhouse 66643de455 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	include/asm-powerpc/unistd.h
	include/asm-sparc/unistd.h
	include/asm-sparc64/unistd.h

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-24 09:22:21 +01:00
Herbert Valerio Riedel c9e055ac4f [PATCH] phy: new SMSC LAN83C185 PHY driver
new SMSC LAN83C185 10BaseT/100BaseTX PHY driver for the PHY subsystem

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 02:51:33 -04:00
Albert Lee bb31a8faa2 [PATCH] libata: add pio flush for via atapi (was: Re: TR: ASUS A8V Deluxe, x86_64)
Backport the "pio flush" from the libata major update to 2.6.17 for via atapi.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 01:43:53 -04:00
Jeff Garzik d7fbeba60b [netdrvr ibmlana, ibmveth] trim trailing whitespace 2006-05-24 01:31:14 -04:00
Santiago Leon 860f242eb5 [PATCH] ibmveth change buffer pools dynamically
This patch provides a sysfs interface to change some properties of the
ibmveth buffer pools (size of the buffers, number of buffers per pool,
and whether a pool is active).  Ethernet drivers use ethtool to provide
this type of functionality.  However, the buffers in the ibmveth driver
can have an arbitrary size (not only regular, mini, and jumbo which are
the only sizes that ethtool can change), and also ibmveth can have an
arbitrary number of buffer pools

Under heavy load we have seen dropped packets which obviously kills TCP
performance.  We have created several fixes that mitigate this issue,
but we definitely need a way of changing the number of buffers for an
adapter dynamically.  Also, changing the size of the buffers allows
users to change the MTU to something big (bigger than a jumbo frame)
greatly improving performance on partition to partition transfers.

The patch creates directories pool1...pool4 in the device directory in
sysfs, each with files: num, size, and active (which default to the
values in the mainline version).

Comments and suggestions are welcome...
--
Santiago A. Leon
Power Linux Development
IBM Linux Technology Center

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 01:30:37 -04:00
Adrian Bunk 7b32a31289 [PATCH] drivers/net/s2io.c: make bus_speed[] static
On Mon, May 15, 2006 at 12:56:37AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.17-rc3-mm1:
>...
>  git-netdev-all.patch
>...
>  git trees
>...

This patch makes the needlessly global bus_speed[] static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 01:28:14 -04:00
Jeff Garzik 75ac6ae818 Merge branch 'upstream-fixes' into upstream 2006-05-24 01:28:05 -04:00
Stephen Hemminger a1433ac4ab [PATCH] sky2: fix jumbo packet support
The truncate threshold calculation to prevent receiver from getting stuck
was incorrect, and it didn't take into account the upper limit on bits
in the register so the jumbo packet support was broken.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 00:36:09 -04:00
Jeff Garzik db21e578e5 Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream 2006-05-24 00:29:57 -04:00
Jeff Garzik 6ed14254cb [netdrvr pcnet_cs, myri] trim trailing whitespace 2006-05-24 00:28:37 -04:00
Marcin Juszkiewicz cf393ebed0 [PATCH] pcnet_cs: Add TRENDnet TE-CF100 ethernet adapter ID
Add TRENDnet TE-CF100 ethernet adapter to pcnet_cs list.

product info: "Fast Ethernet", "CF Size PC Card", "1.0", ""
 manfid: 0x0149, 0xc1ab

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>

 drivers/net/pcmcia/pcnet_cs.c |    2 ++
 1 file changed, 2 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 00:27:31 -04:00
Brice Goglin 0da34b6dfe [PATCH] Add Myri-10G Ethernet driver
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew J. Gallatin <gallatin@myri.com>

 drivers/net/Kconfig                            |   17
 drivers/net/Makefile                           |    1
 drivers/net/myri10ge/Makefile                  |    5
 drivers/net/myri10ge/myri10ge.c                | 2851 +++++++++++++++
 drivers/net/myri10ge/myri10ge_mcp.h            |  205 +
 drivers/net/myri10ge/myri10ge_mcp_gen_header.h |   58
 include/linux/pci_ids.h                        |    1
 7 files changed, 3138 insertions(+)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 00:27:31 -04:00
Brice Goglin 3a720d726a [PATCH] Revive pci_find_ext_capability
This patch revives pci_find_ext_capability (has been disabled a couple month
ago since it was not used anywhere. See http://lkml.org/lkml/2006/1/20/247).
It will now be used by the myri10ge driver.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew J. Gallatin <gallatin@myri.com>

 drivers/pci/pci.c   |    3 +--
 include/linux/pci.h |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-24 00:27:31 -04:00
Jeff Garzik d99ef36ed7 Merge branch 'master' into upstream 2006-05-24 00:27:05 -04:00
Thomas Gleixner d470a97c70 [MTD] NAND LED support cleanup
Move the define out of the middle of the code and add an
appropriate comment.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 23:48:57 +02:00
Thomas Gleixner cad74f2c38 [MTD] NAND remove write_byte/word function from nand_chip
The previous change of the command / hardware control allows to
remove the write_byte/word functions completely, as their only
user were nand_command and nand_command_lp.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 23:28:48 +02:00
Thomas Gleixner 7abd3ef987 [MTD] Refactor NAND hwcontrol to cmd_ctrl
The hwcontrol function enforced a step by step state machine
for any kind of hardware chip access. Let the hardware driver
know which control bits are set and inform it about a change
of the control lines. Let the hardware driver write out the
command and address bytes directly. This gives a peformance
advantage for address bus controlled chips and simplifies the
quirks in the hardware drivers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 23:25:53 +02:00
Jeff Garzik bdad69b23c Merge branch 'e1000-7.0.38-k4' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into upstream 2006-05-23 17:21:33 -04:00
Jeff Garzik 9528454f9c Merge branch 'master' into upstream 2006-05-23 17:20:58 -04:00
Auke Kok 440c052d6f e1000: bump version to 7.0.38-k4
Signed-off-by: Auke Kok <auke.jan.h.kok@intel.com>
2006-05-23 13:36:19 -07:00
Auke Kok fdf35d3c49 e1000: remove changelog in driver
This honours the request to remove the changelog in the driver code.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-05-23 13:36:14 -07:00
Auke Kok a1943b5a79 e1000: Fix date string in Makefile
I forgot to update the date string in the Makefile last time.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-05-23 13:36:10 -07:00
Auke Kok 76c224bc9f e1000: remove leading and trailing whitespace.
Some leading and trailing whitespace made it into the driver code here.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-05-23 13:36:06 -07:00
Auke Kok a42a507cd3 e1000: remove backslash r debug printfs
This removes unwanted characters in the debug output that should have
never been there.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-05-23 13:36:01 -07:00
Auke Kok c653e6351e e1000: add shutdown handler back to fix WOL
Someone was waaay too aggressive and removed e1000's reboot notifier
instead of porting it to the new way of the shutdown handler.  This change
broke wake on lan.  Add the shutdown handler back in using the same method
as e100 uses.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-05-23 13:35:57 -07:00
Thomas Gleixner 3821720d51 [MTD] Export nand_write_raw
The previous _ecc removal / cleanup broke (i)nftl module usage.
Export the missing symbol.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 22:33:52 +02:00
Bryan O'Sullivan 09b74de9ff IB/ipath: deref correct pointer when using kernel SMA
At this point, the core QP structure hasn't been initialized, so what's
in there isn't valid.  Get the same information elsewhere.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:29:35 -07:00
Bryan O'Sullivan 3977026462 IB/ipath: fix null deref during rdma ops
The problem was that node A's sending thread, which handles sending RDMA
read response data, would write the trigger word, the last packet would
be sent, node B would send a new RDMA read request, node A's interrupt
handler would initialize s_rdma_sge, then node A's sending thread would
update s_rdma_sge.  This didn't happen very often naturally but was more
frequent with 1 byte RDMA reads.  Rather than adding more locking or
increasing the QP structure size and copying sge data, I modified the
copy routine to update the pointers before writing the trigger word to
avoid the update race.

Signed-off-by: Ralph Campbell <ralphc@pathscale.com>
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:29:35 -07:00
Bryan O'Sullivan 41c75a19bf IB/ipath: register as IB device owner
This fixes an oops.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:29:35 -07:00
Bryan O'Sullivan 9dcc0e58e2 IB/ipath: enable PE800 receive interrupts on user ports
Fixed so it works on the PE-800.  It had not previously been updated to
match PE-800 receive interrupt differences from HT-400.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:29:35 -07:00
Bryan O'Sullivan f2080fa3c6 IB/ipath: enable GPIO interrupt on HT-460
This is required for even semi-decent performance on OpenIB.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:29:34 -07:00
Bryan O'Sullivan b0ff7c2005 IB/ipath: fix NULL dereference during cleanup
Fix NULL deref due to pcidev being clobbered before dd->ipath_f_cleanup()
was called.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:27:06 -07:00
Bryan O'Sullivan 94b8d9f98d IB/ipath: replace uses of LIST_POISON
Per Andrew's request.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:27:06 -07:00
Bryan O'Sullivan eaf6733bc1 IB/ipath: fix reporting of driver version to userspace
Fix the interface version that gets exported to userspace.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:27:06 -07:00
Bryan O'Sullivan b228b43c49 IB/ipath: don't modify QP if changes fail
Make sure modify_qp won't modify the QP if any of the changes failed.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:27:06 -07:00
Bryan O'Sullivan ebac3800e5 IB/ipath: fix spinlock recursion bug
The local loopback path for RC can lock the rkey table lock without
blocking interrupts.  The receive interrupt path can then call
ipath_rkey_ok() and deadlock.  Remove the redundant lock.

Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-05-23 13:27:06 -07:00
Thomas Gleixner 85b85fee0c [MTD] Mark NAND drivers TOTO and PPChameleon broken
Both drivers can not be fixed and compiled due to missing header files.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 22:03:39 +02:00
Mauro Carvalho Chehab 14ba3e7b31 V4L/DVB (4041): Fix compilation on PPC 64
Those functions don't exist on PPC64 architecture.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-23 16:08:29 -03:00
Jean Delvare 8b6c879c81 V4L/DVB (4040a): Fix the following section warnings:
reference to .init.text: from .text between 'dvb_bt8xx_probe'
(at offset 0x122c) and 'dvb_bt8xx_remove'
reference to .init.text: from .text between 'dvb_bt8xx_probe'
(at offset 0x1267) and 'dvb_bt8xx_remove'

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-23 15:56:50 -03:00
Manu Abraham 3c2c54910f V4L/DVB (4037): Make the bridge devices that depend on I2C dependant on I2C
Ref: Bugzilla 6179, 6589

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-23 15:56:38 -03:00
Adrian Bunk 9d8a51f801 V4L/DVB (3927): Fix VIDEO_DEV=m, VIDEO_V4L1_COMPAT=y
If CONFIG_VIDEO_DEV=m and CONFIG_VIDEO_V4L1_COMPAT=y, v4l1-compat should
be built as a module (currently, it isn't built at all leading to
problems with modules using it).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-23 15:56:20 -03:00
Linus Torvalds 9cfe864842 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:
  [NETFILTER]: SNMP NAT: fix memory corruption
  [IRDA]: fixup type of ->lsap_state
  [IRDA]: fix 16/32 bit confusion
  [NET]: Fix "ntohl(ntohs" bugs
  [BNX2]: Use kmalloc instead of array
  [BNX2]: Fix bug in bnx2_nvram_write()
  [TG3]: Add some missing rx error counters
2006-05-23 10:40:19 -07:00
Florin Malita bb6e093da2 [PATCH] orinoco: possible null pointer dereference in orinoco_rx_monitor()
If the skb allocation fails, the current error path calls
dev_kfree_skb_irq() with a NULL argument.  Also, 'err' is not being used.

Coverity CID: 275.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-23 10:35:32 -07:00
Tobias Powalowski ff4547f4aa [PATCH] tty_insert_flip_string_flags() license fix
We still don't have the tty layer licensing compatibility quite right.

tty_insert_flip_char() used to be inlined in include/linux/tty_flip.h.  It
is now out-of-lined and hence needs EXPORT_SYMBOL() to be back-compatible.

One known offender is the Intel Modem driver.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-23 10:35:31 -07:00
NeilBrown 5c4c33318d [PATCH] md: fix possible oops when starting a raid0 array
This loop that sets up the hash_table has problems.

Careful examination will show that the last time through, everything but
the first line is pointless.  This is because all it does is change 'cur'
and 'size' and neither of these are used after the loop.  This should ring
warning bells...  That last time through the loop,

        size += conf->strip_zone[cur].size

can index off the end of the strip_zone array.  Depending on what it finds
there, it might exit the loop cleanly, or it might spin going further and
further beyond the array until it hits an unmapped address.

This patch rearranges the code so that the last, pointless, iteration of
the loop never happens.  i.e.  the one statement of the last loop that is
needed is moved the the end of the previous loop - or to before the loop
starts - and the loop counter starts from 1 instead of 0.

Cc: "Don Dupuis" <dondster@gmail.com>
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-23 10:35:31 -07:00
Auke Kok 777e1d4a0f ixgb: increment version to 1.0.104-k2
Increment the driver version to 1.0.104-k2

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:35:08 -07:00
Auke Kok 9b8118df48 ixgb: add tx timeout counter
This adds a TX timeout counter to the ethtool stats, a tx timeout
debug message, and sets the timer to 5 seconds.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:35:04 -07:00
Auke Kok ec9c3f5d3b ixgb: use DPRINTK and msglvl, and ethtool to control it
Use DPRINTK and msglvl, and ethtool to control it. Add proper names
to netdev structs and mappings.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:34:59 -07:00
Auke Kok c85fd6f0de ixgb: remove hardcoded number
This adds a define for an awkward and uncommented value.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:30:02 -07:00
Auke Kok 940829e2f9 ixgb: add copper 10gig driver id
Add support for Copper 10GbE device ID 109E

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:29:58 -07:00
Auke Kok f017f14b3f ixgb: add NETIF_F_LLTX analogous to e1000
add NETIF_F_LLTX code like e1000 has

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:29:53 -07:00
Auke Kok 953784d66d ixgb: fix flow control
Make default flow control only have *sending* of flow control packets
enabled, and fix to disable / enable flow control correctly. Set flow
control defaults to disable receiving flow control from the link
partner, to fix the transmit fifo overlow errata

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:29:50 -07:00
Auke Kok 4de17c8c72 ixgb: remove duplicate code setting duplex and speed
Removed duplicate code.  Create ixgb_set_speed_duplex function to contain
duplicate code.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:29:46 -07:00
Auke Kok 96f9c2e277 ixgb: fix rare early tso completion
Fix rare early completion when using TSO.  This essentially is the
e1000 fix, with code that was mostly already written. Another skb frag
was also needed.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
2006-05-23 10:29:41 -07:00
Thomas Gleixner 9223a456da [MTD] Remove read/write _ecc variants
MTD clients are agnostic of FLASH which needs ECC suppport.
Remove the functions and fixup the callers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 17:21:03 +02:00
Thomas Gleixner 2528e8cdf3 [MTD] Remove readv/readv_ecc
These functions were never implemented and added only bloat to
partition and concat code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 16:10:00 +02:00
Thomas Gleixner 9d8522df37 [MTD] Remove nand writev support
NAND writev(_ecc) support is not longer necessary. Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 16:06:03 +02:00
Thomas Gleixner 0cddd6c258 [MTD] ECC rework broke diskonchip
Fix the diskonchip ecc setup.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 15:59:58 +02:00
Thomas Gleixner 4cbb9b80e1 Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 12:37:31 +02:00
Thomas Gleixner 6dfc6d250d [MTD] NAND modularize ECC
First step of modularizing ECC support.
- Move ECC related functionality into a seperate embedded data structure
- Get rid of the hardware dependend constants to simplify new ECC models

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 12:00:46 +02:00
Thomas Gleixner 7aa65bfd67 [MTD] NAND cleanup nand_scan
Seperate functionality out of nand_scan so the code is more
readable. No functional change. First step of simplifying
the nand driver.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 11:54:38 +02:00
Thomas Gleixner 58dd8f2bfd [MTD] NAND consolidate data types
The NAND driver used a mix of unsigned char, u_char amd uint8_t
data types. Consolidate to uint8_t usage

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 11:52:35 +02:00
Thomas Gleixner 2c0a2bed92 [MTD] NAND whitespace and formatting cleanup
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 11:50:56 +02:00
Thomas Gleixner ce4c61f184 [MTD] Add support for NDFC NAND controller
NDFC NAND Flash controller is embedded in PPC EP44x SoCs.
Add platform driver based support.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 11:43:28 +02:00
Thomas Gleixner a36ed2995c [MTD] Simplify NAND locking
Replace the chip lock by a the controller lock. For simple drivers a
dummy controller structure is created by the scan code.
This simplifies the locking algorithm in nand_get/release_chip().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 11:37:03 +02:00
Thomas Gleixner 819d6a32c3 [MTD] Improve software ECC calculation
Unrolling the loops produces denser and much faster code.
Add a config switch which allows to select the byte order of the
resulting ecc code. The current Linux implementation has a byte
swap versus the SmartMedia specification

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2006-05-23 11:32:45 +02:00
Michael Chan ae181bc44c [BNX2]: Use kmalloc instead of array
Use kmalloc() instead of a local array in bnx2_nvram_write().

Update version to 1.4.40.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-22 16:39:20 -07:00
Michael Chan bae25761c9 [BNX2]: Fix bug in bnx2_nvram_write()
Fix a bug in bnx2_nvram_write() caused by a counter variable not
correctly incremented by 4.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-22 16:38:38 -07:00
Michael Chan 463d305bc5 [TG3]: Add some missing rx error counters
Add some missing rx error counters for 5705 and newer chips.

Update version to 3.58.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-22 16:36:27 -07:00
Joern Engel 5fa433942b [MTD] Introduce MTD_BIT_WRITEABLE
o Add a flag MTD_BIT_WRITEABLE for devices that allow single bits to be
  cleared.
o Replace MTD_PROGRAM_REGIONS with a cleared MTD_BIT_WRITEABLE flag for
  STMicro and Intel Sibley flashes with internal ECC.  Those flashes
  disallow clearing of single bits, unlike regular NOR flashes, so the
  new flag models their behaviour better.
o Remove MTD_ECC.  After the STMicro/Sibley merge, this flag is only set
  and never checked.

Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-05-22 23:18:29 +02:00