Commit Graph

53382 Commits

Author SHA1 Message Date
Cornelia Huck
5fb6b8544d [S390] cio: Only register ccw_device for registered subchannel.
There is a race between io_subchannel_register() and
io_subchannel_sch_event() which may cause a subchannel to be
unregistered because it is no longer operational before
io_subchannel_register() had run. We need to check whether the
subchannel is still registered before the ccw device can be
registered and just bail out if it is not.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:08 +01:00
Cornelia Huck
6eff208f47 [S390] cio: Fix I/O subchannel refcounting.
Subchannel refcounting was incorrect in some places, especially
a refcount was missing when ccw_device_call_sch_unregister()
was called and the refcount was not correctly switched after
moving devices.

Fix this by establishing the following rules:
- The ccw_device obtains a reference on its parent subchannel
  when dev.parent is set and gives it up in its release
  function. This is needed because we need a parent reference
  for correct refcounting even before the ccw device is (if at
  all) registered.
- When calling device_move(), obtain a reference on the new
  subchannel before moving the ccw device and give up the
  reference on the old parent after moving. This brings the
  refcount in line with the first rule.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:08 +01:00
Cornelia Huck
9cd6742197 [S390] cio: Fix reference counting for online/offline.
The current code attempts to get an extra reference count
for online devices by doing a get_device() in ccw_device_online()
and a put_device() in ccw_device_done(). However, this
- incorrectly obtains an extra reference for disconnected
  devices becoming available again (since they are already
  online)
- needs special checks for css_init_done in order to handle
  the console device
- is not obvious and
- may incorretly drop a reference count in ccw_device_done() if
  that function is called after path verification for a device
  that just became not operational.

So let's just get the reference in ccw_device_set_online() and
drop it in ccw_device_set_offline(). (Unfortunately, we still
need the special case in io_subchannel_probe().)

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:07 +01:00
Cornelia Huck
97166f52fc [S390] cio: Put referernce on correct device after moving.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:07 +01:00
Peter Oberparleiter
c619d4223e [S390] cio: fix ccwgroup online vs. ungroup race condition
Ensure atomicity of ungroup operation to prevent concurrent ungroup
and online processing which may lead to use-after-release situations.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:06 +01:00
Sebastian Ott
111e95a4ca [S390] cio: move irritating comment.
Due to former patches a comment and device id initialization were
split from the addressed function call in io_subchannel_probe.

Move it back to where it belongs.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:06 +01:00
Heiko Carstens
191fd44c11 [S390] cio: get rid of compile warning
Move cio_tpi() to the rest of the CONFIG_CCW_CONSOLE functions to
get rid of this one:

drivers/s390/cio/cio.c:115: warning: 'cio_tpi' defined but not used

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:05 +01:00
Hendrik Brueckner
44a01d5ba8 [S390] s390/hvc_console: z/VM IUCV hypervisor console support
This patch introduces a new hypervisor console (HVC) back-end that provides
terminal access over the z/VM inter-user communication vehicle (IUCV).

The z/VM IUCV communication is independent of the regular tcp/ip network
and allows access even if there is no network connection between two
z/VM guest virtual machines.
The z/VM IUCV hypervisor console back-end helps the user to access a
z/VM guest virtual machine that lacks of network connectivity; and thus,
provides a "full-screen" terminal alternative to 3215/3270 terminal sessions.

Use the hvc_iucv=[0..8] kernel boot parameter to specify the number of
HVC terminals using a z/VM IUCV back-end.

A recent version of the s390-tools package is required to establish a
terminal connection to a z/VM IUCV hypervisor console back-end.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:03 +01:00
Kay Sievers
98df67b324 [S390] struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:03 +01:00
Stefan Haberland
0cd4bd4754 [S390] dasd: call cleanup_cqr with request_queue_lock
__dasd_cleanup_cqr should be called with request_queue_lock held and
__dasd_block_process_erp with queue_lock

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:02 +01:00
Stefan Haberland
50afd20f8c [S390] dasd: correct sense byte condition for SIM
SIM sense data are always 32 bit sense data so sense byte 27 bit 0
has not to be set.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:02 +01:00
Cornelia Huck
faf16aa9b3 [S390] dasd: Use accessors instead of using driver_data directly.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:01 +01:00
Stefan Haberland
2bf373b3e3 [S390] dasd: improve dasd statistics proc interface
For a large number of I/O requests the values were shifted binary.
The shift was not transparent for the user because the shift value
was not displayed. To make this interface more human readable the
values are shifted decimal and the scale factor is displayed.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:01 +01:00
Christof Schmitt
bd43a42b7e [S390] zfcp: Report microcode level through service level interface
Register zfcp with the new /proc/service_level interface to report the
FCP microcode level. When the adapter goes offline or a channel path
disappears, zfcp unregisters, since the microcode version might change
and zfcp does not know about it.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:01 +01:00
Martin Schwidefsky
6bcac508fb [S390] service level interface.
Add a new proc interface /proc/service_levels that allows any code
to report a relevant service level, e.g. the microcode level of
devices, the service level of the hypervisor, etc.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:00 +01:00
Jan Glauber
7a0b4cbc7d [S390] qdio: fix error reporting for hipersockets
Hipersocket connections can encounter temporary busy conditions.
In case of the busy bit set we retry the SIGA operation immediatelly.
If the busy condition still persists after 100 ms we fail and report
the error to the upper layer. The second stage retry logic is removed.
In case of ongoing busy conditions the upper layer needs to reset the
connection.

The reporting of a SIGA error is now done synchronously to allow the
network driver to requeue the buffers. Also no error trace is created
for the temporary SIGA errors so the error message view is not flooded.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:00 +01:00
Jan Glauber
50f769df1c [S390] qdio: improve inbound buffer acknowledgement
- Use automatic acknowledgement of incoming buffers in QEBSM mode
- Move ACK for non-QEBSM mode always to the newest buffer to prevent
  a race with qdio_stop_polling
- Remove the polling spinlock, the upper layer drivers return new buffers
  in the same code path and could not run in parallel
- Don't flood the error log in case of no-target-buffer-empty
- In handle_inbound we check if we would overwrite an ACK'ed buffer, if so
  advance the pointer to the oldest ACK'ed buffer so we don't overwrite an
  empty buffer in qdio_stop_polling

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:59 +01:00
Jan Glauber
22f9934767 [S390] qdio: rework debug feature logging
- make qdio_trace a per device view
- remove s390dbf exceptions
- remove CONFIG_QDIO_DEBUG, not needed anymore if we check for the level
  before calling sprintf
- use snprintf for dbf entries
- add start markers to see if the dbf view wrapped
- add a global error view for all queues

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:59 +01:00
Jan Glauber
9a1ce28aeb [S390] qdio: fix compile warning under 31 bit
The QEBSM instructions are only available for CONFIG_64BIT, they are not
used under 31 bit. Make compiler happy about the false positive:

drivers/s390/cio/qdio_main.c: In function ?qdio_inbound_q_done?:
drivers/s390/cio/qdio_main.c:532: warning: ?state? may be used uninitialized in this function

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:58 +01:00
Jan Glauber
23589d057a [S390] qdio: add eqbs/sqbs instruction counters
Add counters for the eqbs and sqbs instructions that indicate how often
we issued the instructions and how often the instructions returned with
less buffers than specified.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:58 +01:00
Jan Glauber
bbd50e172f [S390] qdio: fix qeth port count detection
qeth needs to get the port count information before
qdio has allocated a page for the chsc operation.
Extend qdio_get_ssqd_desc() to store the data in the
specified structure.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:58 +01:00
Christian Maaser
43c207e6e5 [S390] ap: Minor code beautification.
Changed some symbol names for a better and clearer code.

Signed-off-by: Christian Maaser <cmaaser@de.ibm.com>
Signed-off-by: Felix Beck <beckf@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:57 +01:00
Felix Beck
cb17a6364a [S390] zcrypt: Use of Thin Interrupts
When the machine supports AP adapter interrupts polling will be
switched off at module initialization and the driver will work in
interrupt mode.

Signed-off-by: Felix Beck <felix.beck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:57 +01:00
Christian Borntraeger
a114a9d69d [S390] vmcp: remove BKL
The vmcp driver uses the session->mutex for concurrent access of the data
structures. Therefore, the BKL in vmcp_open does not protect against any
other function in the driver.
The BLK in vmcp_open would protect concurrent access to the module init
but all necessary steps ave finished before misc_register is called.
We can safely remove the lock_kernel from vcmp.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:54 +01:00
Ingo Molnar
5250d329e3 Merge branches 'tracing/ftrace', 'tracing/hw-branch-tracing' and 'tracing/ring-buffer'; commit 'v2.6.28' into tracing/core 2008-12-25 13:11:00 +01:00
Ingo Molnar
a3eeeefbf1 Merge branch 'x86/tsc' into tracing/core
Merge it to resolve this incidental conflict between the BTS fixes/cleanups
and changes in x86/tsc:

Conflicts:
	arch/x86/kernel/cpu/intel.c
2008-12-25 12:48:18 +01:00
Ingo Molnar
79a66b96c3 Merge branches 'x86/pat2' and 'x86/fpu'; commit 'v2.6.28' into x86/core 2008-12-25 11:50:41 +01:00
Roland Dreier
2a0d8366dd Merge branches 'cma', 'ehca', 'ipath', 'iser', 'mlx4' and 'nes' into for-next 2008-12-24 20:35:42 -08:00
Jack Morgenstein
7798dbf40a IB/mlx4: Set ownership bit correctly when copying CQEs during CQ resize
When resizing a CQ, when copying over unpolled CQEs from the old CQE
buffer to the new buffer, the ownership bit must be set appropriately
for the new buffer, or the ownership bit in the new buffer gets
corrupted.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-24 20:32:42 -08:00
Faisal Latif
e189062a8c RDMA/nes: Remove tx_free_list
There is no lock protecting tx_free_list thus causing a system crash
when skb_dequeue() is called and the list is empty.  Since it did not give
any performance boost under heavy load, remove it to simplify the code.
Replace get_free_pkt() with dev_alloc_skb() to allocate MAX_CM_BUFFER skb
for connection establishment/teardown as well as MPA request/response.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-24 20:30:04 -08:00
James Morris
cbacc2c7f0 Merge branch 'next' into for-linus 2008-12-25 11:40:09 +11:00
Lee Nipper
ca38a814c6 crypto: talitos - Ack done interrupt in isr instead of tasklet
Previous commit for interrupt mitigation moved the done interrupt
acknowlegement from the isr to the talitos_done tasklet.
This patch moves the done interrupt acknowledgement back
into the isr so that done interrupts will always be acknowledged.
This covers the case for acknowledging interrupts for channel done processing
that has actually already been completed by the tasklet prior to fielding
a pending interrupt.

Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:02:33 +11:00
Harvey Harrison
dad3df2044 crypto: remove uses of __constant_{endian} helpers
Base versions handle constant folding just fine.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:02:03 +11:00
Evgeniy Polyakov
5f459f0adc crypto: hifn_795x - Use softirq kernel mapping in bh context
Use KM_SOFTIRQ instead of KM_IRQ in tasklet context.
Added bug_on on input no-page condition.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:02:00 +11:00
Evgeniy Polyakov
d6a10c84a2 crypto: hifn_795x - Fix queue management
Fix queue management. Change ring size and perform its check not
one after another descriptor, but using stored pointers to the last
checked descriptors.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:58 +11:00
Patrick McHardy
3ec858de64 crypto: hifn_795x - Remove some unused cruft
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:57 +11:00
Patrick McHardy
ed4f92e372 crypto: hifn_795x - Fix queue processing
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:55 +11:00
Patrick McHardy
5df4c0c671 crypto: hifn_795x - Fix request context corruption
HIFN uses the transform context to store per-request data, which breaks
when more than one request is outstanding. Move per request members from
struct hifn_context to a new struct hifn_request_context and convert
the code to use this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:54 +11:00
Patrick McHardy
3416158680 crypto: hifn_795x - Don't copy src sg list
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:52 +11:00
Patrick McHardy
75741a0340 crypto: hifn_795x - Fix DMA setup
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:51 +11:00
Herbert Xu
420a4b20c5 crypto: padlock - Avoid resetting cword on successive operations
Resetting the control word is quite expensive.  Fortunately this
isn't an issue for the common operations such as CBC and ECB as
the whole operation is done through a single call.  However, modes
such as LRW and XTS have to call padlock over and over again for
one operation which really hurts if each call resets the control
word.

This patch uses an idea by Sebastian Siewior to store the last
control word used on a CPU and only reset the control word if
that changes.

Note that any task switch automatically resets the control word
so we only need to be accurate with regard to the stored control
word when no task switches occur.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:20 +11:00
Vishnu Suresh
4b24ea971a crypto: talitos - Preempt overflow interrupts off-by-one fix
In commit ec6644d632 "crypto: talitos - Preempt
overflow interrupts", the test in atomic_inc_not_zero was interpreted by the
author to be applied after the increment operation (not before). This off-by-one
fix prevents overflow error interrupts from occurring when requests are frequent
and large enough to do so.

Signed-off-by: Vishnu Suresh <Vishnu@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:17 +11:00
Kim Phillips
fe5720e2b7 crypto: talitos - Perform auth check in h/w if on sec 2.1 and above
SEC version 2.1 and above adds the capability to do the IPSec ICV
memcmp in h/w. Results of the cmp are written back in the descriptor
header, along with the done status.  A new callback is added that
checks these ICCR bits instead of performing the memcmp on the core,
and is enabled by h/w capability.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>

After testing on different parts, another condition was added
before using h/w auth check because different
SEC revisions require different handling.

The SEC 3.0 allows a more flexible link table where
the auth data can span separate link table entries.
The SEC 2.4/2.1 does not support this case.
So a test was added in the decrypt routine
for a fragmented case; the h/w auth check is disallowed for
revisions not having the extent in the link table;
in this case the hw auth check is done by software.

A portion of a previous change for SEC 3.0 link table handling
was removed since it became dead code with the hw auth check supported.

This seems to be the best compromise for using hw auth check
on supporting SEC revisions; it keeps the link table logic
simpler for the fragmented cases.

Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:12 +11:00
Lee Nipper
1c2e8811ee crypto: talitos - Implement done interrupt mitigation
In talitos_interrupt, upon one done interrupt, mask further done interrupts,
and ack only any error interrupt.
In talitos_done, unmask done interrupts after completing processing.
In flush_channel, ack each done channel processed.
Keep done overflow interrupts masked because even though each pkt
is ack'ed, a few done overflows still occur.

Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:10 +11:00
Kim Phillips
40405f10b8 crypto: talitos - Pass correct interrupt status to error handler
Since we ack early, the re-read interrupt status in talitos_error
may be already updated with a new value.  Pass the error ISR value
directly in order to report and handle the error based on the correct
error status.

Also remove unused error tasklet.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:09 +11:00
Evgeniy Polyakov
a44b56cc69 crypto: hifn - Disable driver when physical size exceeds 32 bits
On Tue, Sep 23, 2008 at 08:06:32PM +0200, Dimitri Puzin (max@psycast.de) wrote:
> With this patch applied it still doesn't work as expected. The overflow
> messages are gone however syslog shows
> [  120.924266] hifn0: abort: c: 0, s: 1, d: 0, r: 0.
> when doing cryptsetup luksFormat as in original e-mail. At this point
> cryptsetup hangs and can't be killed with -SIGKILL. I've attached
> SysRq-t dump of this condition.

Yes, I was wrong with the patch: HIFN does not support 64-bit addresses
afaics.

Attached patch should not allow HIFN to be registered on 64-bit arch, so
crypto layer will fallback to the software algorithms.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-12-25 11:01:07 +11:00
Ingo Molnar
db8862eafe Merge branch 'linus' into tracing/hw-branch-tracing 2008-12-24 21:08:26 +01:00
Linus Torvalds
c20137fc53 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET command
  V4L/DVB (9908a): MAINTAINERS: mark linux-uvc-devel as subscribers only
  V4L/DVB (9906): v4l2-compat: test for unlocked_ioctl as well.
  V4L/DVB (9885): drivers/media Kconfig's: fix bugzilla #12204
  V4L/DVB (9875): gspca - main: Fix vidioc_s_jpegcomp locking.
  V4L/DVB (9781): [PATCH] Cablestar 2 I2C retries (fix CableStar2 support)
  V4L/DVB (9780): dib0700: Stop repeating after user stops pushing button
2008-12-24 10:24:52 -08:00
Aleksey Senin
1f5175adea RDMA/cma: Add IPv6 support
Handle AF_INET6 cases where required, and use struct sockaddr_storage
wherever an IPv6 address might be stored.

Signed-off-by: Aleksey Senin <aleksey@alst60.(none)>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-24 10:16:45 -08:00
Aleksey Senin
38617c64bf RDMA/addr: Add support for translating IPv6 addresses
Add support for translating AF_INET6 addresses to the IB address
translation service.  This requires using struct sockaddr_storage
instead of struct sockaddr wherever an IPv6 address might be stored,
and adding cases to handle IPv6 in addition to IPv4 to the various
translation functions.

Signed-off-by: Aleksey Senin <aleksey@alst60.(none)>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-24 10:16:37 -08:00
David S. Miller
6332178d91 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/ppp_generic.c
2008-12-23 17:56:23 -08:00
Linus Torvalds
8960223d59 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon: fix correctness of irq_enabled check for radeon.
2008-12-23 17:01:40 -08:00
Harry Ciao
d519c8d9cc edac: fix edac core deadlock when removing a device
When deleting an edac device, we have to wait for its edac_dev.work to be
completed before deleting the whole edac_dev structure.  Since we have no
idea which work in current edac_poller's workqueue is the work we are
conerned about, we wait for all work in the edac_poller's workqueue to be
proceseed.  This is done via flush_cpu_workqueue() which inserts a
wq_barrier into the tail of the workqueue and then sleeping on the
completion of this wq_barrier.  The edac_poller will wake up sleepers when
it is found.

EDAC core creates only one kernel worker thread, edac_poller, to run the
works of all current edac devices.  They share the same callback function
of edac_device_workq_function(), which would grab the mutex of
device_ctls_mutex first before it checks the device.  This is exactly
where edac_poller and rmmod would have a great chance to deadlock.

In below call trace of rmmod > ... >
edac_device_del_device >
edac_device_workq_teardown > flush_workqueue > flush_cpu_workqueue,

device_ctls_mutex would have already been grabbed by
edac_device_del_device().  So, on one hand rmmod would sleep on the
completion of a wq_barrier, holding device_ctls_mutex; on the other hand
edac_poller would be blocked on the same mutex when it's running any one
of works of existing edac evices(Note, this edac_dev.work is likely to be
totally irrelevant to the one that is being removed right now)and never
would have a chance to run the work of above wq_barrier to wake rmmod up.

edac_device_workq_teardown() should not be called within the critical
region of device_ctls_mutex.  Just like is done in edac_pci_del_device()
and edac_mc_del_mc(), where edac_pci_workq_teardown() and
edac_mc_workq_teardown() are called after related mutex are released.

Moreover, an edac_dev.work should check first if it is being removed.  If
this is the case, then it should bail out immediately.  Since not all of
existing edac devices are to be removed, this "shutting flag" should be
contained to edac device being removed.  The current edac_dev.op_state can
be used to serve this purpose.

The original deadlock problem and the solution have been witnessed and
tested on actual hardware.  Without the solution, rmmod an edac driver
would result in below deadlock:

root@localhost:/root> rmmod mv64x60_edac
EDAC DEBUG: mv64x60_dma_err_remove()
EDAC DEBUG: edac_device_del_device()
EDAC DEBUG: find_edac_device_by_dev()

(hang for a moment)

INFO: task edac-poller:2030 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
edac-poller   D 00000000     0  2030      2
Call Trace:
[df159dc0] [c0071e3c] free_hot_cold_page+0x17c/0x304 (unreliable)
[df159e80] [c000a024] __switch_to+0x6c/0xa0
[df159ea0] [c03587d8] schedule+0x2f4/0x4d8
[df159f00] [c03598a8] __mutex_lock_slowpath+0xa0/0x174
[df159f40] [e1030434] edac_device_workq_function+0x28/0xd8 [edac_core]
[df159f60] [c003beb4] run_workqueue+0x114/0x218
[df159f90] [c003c674] worker_thread+0x5c/0xc8
[df159fd0] [c004106c] kthread+0x5c/0xa0
[df159ff0] [c0013538] original_kernel_thread+0x44/0x60
INFO: task rmmod:2062 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
rmmod         D 0ff2c9fc     0  2062   1839
Call Trace:
[df119c00] [c0437a74] 0xc0437a74 (unreliable)
[df119cc0] [c000a024] __switch_to+0x6c/0xa0
[df119ce0] [c03587d8] schedule+0x2f4/0x4d8
[df119d40] [c03591dc] schedule_timeout+0xb0/0xf4

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-23 15:58:21 -08:00
Evgeniy Polyakov
f00a189257 w1: fix slave selection on big-endian systems
During test of the w1-gpio driver i found that in "w1.c:679
w1_slave_found()" the device id is converted to little-endian with
"cpu_to_le64()", but its not converted back to cpu format in "w1_io.c:293
w1_reset_select_slave()".

Based on a patch created by Andreas Hummel.

[akpm@linux-foundation.org: remove unneeded cast]
Reported-by: Andreas Hummel <andi_hummel@gmx.de>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-23 15:58:21 -08:00
Chris Elston
cc6c2ca300 rtc: rtc-isl1208: reject invalid dates
This patch for the rtc-isl1208 driver makes it reject invalid dates.

Signed-off-by: Chris Elston <celston@katalix.com>
[a.zummo@towertech.it: added comment explaining the check]
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Hebert Valerio Riedel <hvr@gnu.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-23 15:58:21 -08:00
Ingo Molnar
be9a1d3c2e Merge branch 'x86/tsc' into x86/core 2008-12-23 16:30:20 +01:00
Ingo Molnar
fa623d1b02 Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core 2008-12-23 16:27:23 +01:00
Devin Heitmueller
231ffc9c07 V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET command
Fix a NULL pointer dereference that would occur if the video decoder tied to
the em28xx supports the VIDIOC_INT_RESET call (for example: the cx25840 driver)

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-23 09:13:50 -02:00
Neil Horman
908a7a16b8 net: Remove unused netdev arg from some NAPI interfaces.
When the napi api was changed to separate its 1:1 binding to the net_device
struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
vestigual net_device structure parameter.  This patch cleans up that api by
properly removing it..

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22 20:43:12 -08:00
Oliver Neukum
889bd9b6db net: startup race in hso driver
The flag marking a device running must be set before the URBs for
recption are submitted or they may complete too early and fail to resubmit.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22 19:54:00 -08:00
Florian Fainelli
4707470ae7 r6040: bump release number to 0.19
This patch bumps the release number of the driver.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22 19:40:38 -08:00
Joe Chou
3e7c469f07 r6040: save and restore MIER correctly in the interrupt routine
This patch saves the MIER register contents before treating
interrupts, then restores them correcty at the end of the
interrupt routine.

Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22 19:40:02 -08:00
Joe Chou
11e5e8f5d1 r6040: fix wrong logic in mdio code
This patch fixes a reverse logic in the MDIO code.

Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-22 19:38:17 -08:00
Dave Airlie
077ebed54f drm/radeon: fix correctness of irq_enabled check for radeon.
This check was introduced with the logic the wrong way around.

Fixes regression: http://bugzilla.kernel.org/show_bug.cgi?id=12216

Tested-by: François Valenduc <francois.valenduc@tvcablenet.be>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-23 10:50:12 +10:00
Linus Torvalds
c47a75a45f Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: don't cond_resched() when irqs_disabled()
  ACPI: fix 2.6.28 acpi.debug_level regression
2008-12-22 14:52:00 -08:00
Linus Torvalds
0099f77e0a Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  drivers/ide/{cs5530.c,sc1200.c}: Move a dereference below a NULL test
2008-12-22 14:40:48 -08:00
Julia Lawall
9ecab6e5bf drivers/ide/{cs5530.c,sc1200.c}: Move a dereference below a NULL test
In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-22 23:05:06 +01:00
Benjamin Krill
def434c231 powerpc/cell: add QPACE as a separate Cell platform
Since the QPACE (Chromodynamics Parallel Computing on the
Cell Broadband Engine) platform doesn't use a iommu, doesn't
have PCI devices and a MPIC much lesser setup and
configurations are needed. So far all devices are detected
as OF device. A notifier function is used to set the dma_ops
for the of_platform bus. Further this patch splits the
PPC_CELL_NATIVE into PPC_CELL_COMMON which are parts that are
shared with the QPACE platform and the rest.

Signed-off-by: Benjamin Krill <ben@codiert.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-12-22 22:19:19 +01:00
Linus Torvalds
7ef5f41c16 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ppp: fix segfaults introduced by netdev_priv changes
  net: Fix module refcount leak in kernel_accept()
2008-12-22 10:12:54 -08:00
Roland Dreier
f5eda57f9b mlx4_core: Delete incorrect comment
The comment about a "Conditional on hca_type" was cut-and-pasted from
the mthca driver, and doesn't apply to mlx4 (since only one type of HCA
is handled by mlx4).  So just delete it.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-22 07:15:05 -08:00
Yevgeny Petrilin
b8dd786f94 mlx4_core: Add support for multiple completion event vectors
When using MSI-X mode, create a completion event queue for each CPU.
Report the number of completion EQs in a new struct mlx4_caps member,
num_comp_vectors, and extend the mlx4_cq_alloc() interface with a
vector parameter so that consumers can specify which completion EQ
should be used to report events for the CQ being created.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-22 07:15:03 -08:00
Paul Mundt
b0c50ad717 serial: sh-sci: Fix up port pinmux for SH7366.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:49 +09:00
Magnus Damm
8564557a03 video: sh_mobile_lcdcfb deferred io support
This patch adds sh_mobile_lcdcfb deferred io support for SYS panels.

The LCDC hardware block managed by the sh_mobile_lcdcfb driver supports
RGB or SYS panel configurations. SYS panels come with an external display
controller that is resposible for refreshing the actual LCD panel. RGB
panels are controlled directly by the LCDC and they need to be refreshed
by the LCDC hardware.

In the case of SYS panels we can save some power by configuring the LCDC
hardware block in one-shot mode. In this one-shot mode panel refresh is
managed by software. This works well together with deferred io since it
allows us to stop clocks for most of the time and only enable clocks when
we actually want to trigger an update. When there is no fbdev activity
the clocks are kept stopped which allows us to deep sleep.

The refresh rate in deferred io mode is set using platform data. The same
platform data can also be used to disable deferred io mode.

As with other deferred io frame buffers user space code should use fsync()
on the frame buffer device to trigger an update.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:48 +09:00
Magnus Damm
37b4837959 video: deferred io with physically contiguous memory
Extend the deferred io code from only supporting vmalloc()ed frame
buffer memory to support both vmalloc()ed and physically contiguous
frame buffer memory.

The sh_mobile_lcdcfb hardware does not support scatter gather so
we need physically contiguous memory to back our frame buffer.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:48 +09:00
Magnus Damm
6e1038a95b video: deferred io cleanup
Make sure the mmap callback is set to NULL in the deferred io
cleanup function. This way we can enable and disable deferred
io on the fly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:48 +09:00
Magnus Damm
87884bd8ae video: fix deferred io fsync()
If CONFIG_FB_DEFERRED_IO is set, but there are framebuffers
registered that does not make use of deferred io, then fsync()
on those framebuffers will result in a crash. Fix that.

This is needed for sh_mobile_lcdcfb since we always enable
deferred io at compile time but we may disable deferred io
for some types of hardware configurations.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:48 +09:00
Magnus Damm
2540c111ea sh_mobile_lcdc: use FB_SYS helpers instead of FB_CFB
Since the sh_mobile_lcdc hardware has the framebuffer(s) in system RAM,
use FB_SYS instead of FB_CFB. Also hook in read and write helpers.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:48 +09:00
Paul Mundt
1f6fd5c916 serial: sh-sci: sci_poll_get_char() is only used by CONFIG_CONSOLE_POLL.
sci_poll_put_char() happens to also be used by the serial console,
while sci_poll_get_char() is only used by CONFIG_CONSOLE_POLL. Add
another gnarly ifdef to shut up the compiler.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:46 +09:00
Paul Mundt
d5701647f1 serial: sh-sci: Generalize port pin initialization.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:43 +09:00
Paul Mundt
d830fa4584 serial: sh-sci: Tidy up fifo overrun error handling.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:43 +09:00
Paul Mundt
762c69e3ca serial: sh-sci: pr_debug() -> dev_dbg() conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:43 +09:00
Paul Mundt
027e687249 serial: sh-sci: Fix up the cpufreq notifier to use the proper port clock.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:43 +09:00
Paul Mundt
07d2a1a1cd serial: sh-sci: Implement CONSOLE_POLL support and kill off old kgdb console.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:04 +09:00
Peter Griffin
2825999e8a sh: Add support for SH7201 CPU subtype.
This patch adds support for the SH-2A FPU based SH7201 processor subtype.

Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:50 +09:00
Nobuhiro Iwamatsu
5c72f303a2 sh: sh7760fb: Add support SH7720/SH7721 of Renesas
SH7720 and 7721 has IP of Frame Buffer same as SH7760.
This driver can support these.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:55 +09:00
Nobuhiro Iwamatsu
679dc3c92c sh: sh7760fb: Fix color pallette setting
The setting of the color palette was wrong, fixed it.
And removed fb_setcmap, and added fb_setcolreg function.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:54 +09:00
Paul Mundt
d6435102d4 usb: Fix up sh_mobile usbf clock framework warnings.
drivers/usb/gadget/m66592-udc.c: In function 'm66592_probe':
drivers/usb/gadget/m66592-udc.c:1672: warning: label 'clean_up2' defined but not used
drivers/usb/host/r8a66597-hcd.c: In function 'r8a66597_probe':
drivers/usb/host/r8a66597-hcd.c:2401: warning: label 'clean_up2' defined but not used

Added by commit 985fc7c81c7852f2e104c71cbe913ace683c9e6a ("sh: sh_mobile
usbf clock framework support").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Michael Trimarchi
e7c98dc76d serial: sh-sci: Codestyle cleanup patch.
Trivial coding style cleanups.

Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Paul Mundt
af505b1eab media: sh_mobile_ceu_camera: Add HAVE_CLK dependency.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Magnus Damm
b51339fff2 sh: sh_mobile lcdc clock framework support
Add clock framework support to the lcdc driver and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Magnus Damm
765786e0ae sh: sh_mobile usb clock framework support
Add clock framework support to the usb/r8a66597 driver and
adjust the cpu specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm
af5be79a7f sh: sh_mobile usbf clock framework support
Add clock framework support to the usbf/m66592 driver and
adjust the cpu specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm
a42b6dd69c sh: sh_mobile ceu clock framework support
Add clock framework support to the sh_mobile ceu and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm
090d951b69 sh: sh_mobile keysc clock framework support
Add clock framework support to the sh_mobile keysc driver and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm
a5616bd0f1 sh: sh_mobile i2c clock framework support
Add clock framework support to the sh_mobile i2c driver and
adjust the processor specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Matt Carlson
d3d317092b tg3: Update version to 3.97
This patch updates the version number to 3.97.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:21:52 -08:00
Matt Carlson
aa10f27d99 tg3: tg3.h cleanups
This patch cleans up the tg3 header file by removing the preprocessor
definitions for standard PCI configuration space registers.  The driver
should be using the standard definitions when needed.  The patch
continues by removing redundant PHY related definitions and reorganizes
some of the remaining entries.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:21:18 -08:00
Matt Carlson
69fc405318 tg3: Remove unused cfgspc device members
This patch removes the pci_bist and pci_hdr_type members from the
device structure and removes the code that references them.  They are
not really used.

The patch rounds out the changes by moving the pci_cmd member to plug
a structure hole that would have been created.  On 32-bit systems, this
movement removes a subsequent structure hole later in the structure. On
64-bit systems though, the movement merely consolidates two holes into
one larger hole.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:19:57 -08:00
Matt Carlson
027455adac tg3: Cleanup IPV6 LSO
This patch attempts to make the relationship between IPV6 checksum
offload and IPV6 LSO more obvious.  The patch also toggles a bit
needed for IPV6 LSO on 5785 and 57780 devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:19:30 -08:00
Matt Carlson
2023276ebf tg3: WOL fixes
The first hunk of this patch inverts a flag that was accidentally
toggled as part of commit 0a459aac9d
("tg3: Allow WOL for phylib controlled Broadcom phys").

The second hunk of the patch removes the call to
device_may_wakeup() in the 5906 config detection path.  At the
point of the call, the driver shouldn't be querying for WOL
capability.  It should be detecting and setting it.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:18:56 -08:00
Don Skidmore
bfb8cc31b1 ixgbe: fix the display of DCB control stats in ethtool
Priority flow contol statistics for Data Center Bridging (DCB) weren't
included in ethtool.  This patch adds them.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:11:04 -08:00
Don Skidmore
f4314e815e net: add DCNA attribute to the BCN interface for DCB
Adds the Backward Congestion Notification Address (BCNA) attribute to the
Backward Congestion Notification (BCN) interface for Data Center Bridging
(DCB), which was missing.  Receive the BCNA attribute in the ixgbe driver.
The BCNA attribute is for a switch to inform the endstation about the physical
port identification in order to support BCN on aggregated links.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2008-12-21 20:10:29 -08:00
Don Skidmore
1486a61ebc net: fix DCB setstate to return success/failure
Data Center Bridging (DCB) had no way to know if setstate had failed in the
driver.  This patch enables dcb netlink code to handle the status for the DCB
setstate interface.  Likewise it allows the driver to return a failed status
if MSI-X isn't enabled.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Eric W Multanen <eric.w.multanen@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21 20:09:50 -08:00
David S. Miller
c2da953a46 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-12-21 19:57:10 -08:00
Krzysztof Hałasa
59f8500efb Convert ixp4xx_eth driver to use net_device_ops.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 02:04:52 +01:00
Julia Lawall
4cb56b6856 drivers/net/wan: Remove redundant test
arg is checked not to be NULL a few lines before.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 01:12:09 +01:00
Krzysztof Hałasa
93bc933524 HDLC_PPP: Fix Configure-Ack to return original options as required by the standard.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 01:00:05 +01:00
Krzysztof Hałasa
e6da96ace8 IXP4xx: move common debugging from network drivers to QMGR module.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 00:48:00 +01:00
Krzysztof Hałasa
f5b89e41ce WAN: Add IXP4xx HSS HDLC driver.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 00:47:31 +01:00
Krzysztof Hałasa
490b77224f IXP4xx: Add ethtool support to Ethernet driver.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 00:42:55 +01:00
Krzysztof Hałasa
4954936e25 IXP4xx: Add PHYLIB MII ioctl to the Ethernet driver.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 00:42:55 +01:00
Krzysztof Hałasa
2098c18d6c IXP4xx: Add PHYLIB support to Ethernet driver.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 00:42:55 +01:00
Krzysztof Hałasa
b4c7d3b072 IXP4xx: Make the Ethernet driver use built-in netdev stats.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 00:42:55 +01:00
Krzysztof Hałasa
3c36a837a9 IXP4xx: Silence section mismatch warning in Ethernet driver.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
2008-12-22 00:41:50 +01:00
David Disseldorp
bba7ebba3b IB/iser: Avoid recv buffer exhaustion caused by unexpected PDUs
iSCSI/iSER targets may send PDUs without a prior request from the
initiator.  RFC 5046 refers to these PDUs as "unexpected".  NOP-In PDUs
with itt=RESERVED and Asynchronous Message PDUs occupy this category.

The amount of active "unexpected" PDU's an iSER target may have at any
time is governed by the MaxOutstandingUnexpectedPDUs key, which is not
yet supported.

Currently when an iSER target sends an "unexpected" PDU, the
initiators recv buffer consumed by the PDU is not replaced.  If over
initial_post_recv_bufs_num "unexpected" PDUs are received then the
receive queue will run out of receive work requests entirely.

This patch ensures recv buffers consumed by "unexpected" PDUs are
replaced in the next iser_post_receive_control() call.

Signed-off-by: David Disseldorp <ddiss@sgi.com>
Signed-off-by: Ken Sandars <ksandars@sgi.com>
Acked-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-21 13:56:50 -08:00
Julia Lawall
139cdab0a2 IB/ehca: Remove redundant test of vpage
vpage is checked not to be NULL just after it is initialized at the
beginning of each loop iteration.

A simplified version of the semantic patch that makes this change is
as follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
  S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-12-21 13:29:13 -08:00
Wolfram Sang
418441d9eb powerpc/mpc5200: fix error paths in PSC UART probe function
- error cases for mapbase and irq were unbundled
- mapped irq now gets disposed on error

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-12-21 02:54:32 -07:00
Wolfram Sang
aec739e010 powerpc/mpc5200: add rts/cts handling in PSC UART driver
Add RTS/CTS-support for the PSC of the MPC5200B. Tested with a Phytec
MPC5200B-IO.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-12-21 02:54:32 -07:00
René Bürgel
b65149880d powerpc/mpc5200: Make PSC UART driver update serial errors counters
This patch adds the capability to the mpc52xx-uart to report framing
errors, parity errors, breaks and overruns to userspace. These values
may be requested in userspace by using the ioctl TIOCGICOUNT.

Signed-off-by: René Bürgel <r.buergel@unicontrol.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-12-21 02:54:31 -07:00
Wolfram Sang
e51f47a5c6 powerpc/mpc5200: Remove obsolete code from mpc5200 MDIO driver
As this driver polls for a complete MDIO transaction, there is no need
to enable interrupts for it.  Furthermore, make both checks for
freeing MDIO-bus irqs consistent.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-12-21 02:54:30 -07:00
Tim Yamin
6b61e69e7b powerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver
This patch adds MDMA/UDMA support using BestComm for DMA on the MPC5200
platform.  Based heavily on previous work by Freescale (Bernard Kuhn,
John Rigby) and Domen Puncer.

With this patch, a SanDisk Extreme IV CF card gets read speeds of
approximately 26.70 MB/sec.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-12-21 02:54:29 -07:00
Benjamin Herrenschmidt
64b3d0e812 powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
Currently, we never set _PAGE_COHERENT in the PTEs, we just OR it in
in the hash code based on some CPU feature bit.  We also manipulate
_PAGE_NO_CACHE and _PAGE_GUARDED by hand in all sorts of places.

This changes the logic so that instead, the PTE now contains
_PAGE_COHERENT for all normal RAM pages thay have I = 0 on platforms
that need it.  The hash code clears it if the feature bit is not set.

It also adds some clean accessors to setup various valid combinations
of access flags and change various bits of code to use them instead.

This should help having the PTE actually containing the bit
combinations that we really want.

I also removed _PAGE_GUARDED from _PAGE_BASE on 44x and instead
set it explicitely from the TLB miss.  I will ultimately remove it
completely as it appears that it might not be needed after all
but in the meantime, having it in the TLB miss makes things a
lot easier.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-21 14:21:16 +11:00
Benjamin Herrenschmidt
5e696617c4 powerpc/mm: Split mmu_context handling
This splits the mmu_context handling between 32-bit hash based
processors, 64-bit hash based processors and everybody else.  This is
preliminary work for adding SMP support for BookE processors.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-21 14:21:15 +11:00
Hendrik Brueckner
368c1e3249 hvc_console: Escape magic sysrq key
The ctrl-o (^O) is a common control key used by several applications,
such as vim, but hvc_console uses ^O as the magic-sysrq key.  This
commit allows users to send ^O to applications by pressing ^O twice
in succession.

To implement this, this commit introduces a check if ^O is pressed
again if the sysrq_pressed variable is already set.  In this case,
clear sysrq_pressed state and flip the ^O character to the tty.  (The
old behavior has always set "sysrq_pressed" if ^O has been entered,
and it has not flipped the ^O character to the tty.)

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-21 14:21:15 +11:00
Anton Vorontsov
749820928a of/gpio: Implement of_gpio_count()
This function is used to count how many GPIOs are specified for
a device node.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-21 14:21:14 +11:00
Anton Vorontsov
7736a3db98 of: of_parse_phandles_with_args() learns to differentiate 'hole' cells
Given this list (contains three gpio specifiers, one of which is a hole):

gpios = <&phandle1 1 2 3
         0 /* a hole */
         &phandle2 4 5 6>;

of_parse_phandles_with_args() would report -ENOENT for the `hole'
specifier item, the same error value is used to report the end of the
list, for example.

Sometimes we want to differentiate holes from real errors -- for
example when we want to count all the [syntax correct] specifiers.

With this patch of_parse_phandles_with_args() will report -EEXITS when
somebody requested to parse a hole.

Also, make the out_{node,args} arguments optional, when counting we
don't really need the out values.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-21 14:21:14 +11:00
Anton Vorontsov
c1bb7c6d04 of: Minor simplification for the of_parse_phandles_with_args()
By using 'list++' in the beginning we can simplify the code a
little bit.

Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-21 14:21:14 +11:00
Michael Buesch
9cf7f247bd b43: Add key memory dumping
This adds an option to dump all crypto related memory to
the kernel log.
Obviously, it should not be enabled on productive systems. ;)

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:24:06 -05:00
Michael Buesch
b929ecf796 b43: Suspend MAC while killing the radio
We should suspend the MAC, before we kill the radio. This gives
the MAC a chance to leave any TX/RX state and it avoids races on
the PHY/RADIO registers.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:24:04 -05:00
Bob Copeland
fd6effcaf8 ath5k: correct packet length in tx descriptors
Packet length calculation (which includes frame check sequence)
should take into account whether we add a pad field or not.
Extract the calculation into a helper and use it in both places.

Changes to desc.c
Changes-licensed-under: ISC

Changes to ath5k.h, base.c
Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:24:02 -05:00
Michael Buesch
d10d0e5707 b43: Fix some MAC locking
This fixes some locking w.r.t. the lower MAC (firmware).
It also removes a lot of ancient IRQ-locking that's not needed anymore.
We simply suspend the MAC. That's easier and causes less trouble.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:56 -05:00
Rami Rosen
0e7690f1e9 iwlwifi: iwl-tx.c cleanup (remove unused parameter and unused local variable).
This patch removes unused parameter and unused local variable in
methods in iwl-tx.c:

- Remove a parameter (is_unicast) from iwl_tx_cmd_build_basic().

- Remove an unused variable name unicast from iwl_tx_skb().

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:54 -05:00
Jouni Malinen
be2864cfff ath9k: Fixed RX decryption status reporting
The RX code in ath9k uses sc_keymap to figure out whether a default
key was used. However, the default key entries in sc_keymap were
always set and as such, frames could have been claimed to be decrypted
by hardware when they were not. This can cause problems especially
with TKIP since mac80211 is validating the Michael MIC in the frame
and this will result in MIC failure and potentially TKIP
countermeasures if the frame was not decrypted correctly.

Change key cache slot allocation to mark only the keys that really
have been used in sc_keymap to avoid the issue. The key cache slot
selection routines are now internally avoiding the slots that may be
needed for TKIP group keys.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:53 -05:00
Jouni Malinen
ea61213288 ath9k: Fix key cache slot selection for splitmic
ath_reserve_key_cache_slot() was obviously supposed to return an index
to a free slot, not reserved one. This could have caused problems with
hardware revisions that use splitmic.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:51 -05:00
Sujith
aa33de09a8 ath9k: Protect config() callback with a mutex
This should fix the timeout issues seen when using wpa_supplicant.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:50 -05:00
Christian Lamparter
6110781af0 p54usb: bring first generation devices back to life
This patch fixes a serious regression (introduced by:
"p54: fix memory management")
that affected isl3886+net2280 usb devices operation.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Tested-by: Artur Skawina <art.08.09@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:47 -05:00
Jouni Malinen
6ace2891a1 ath9k: Key cache allocation for AP mode
Enhance allocation of key cache entries to support multiple pairwise
keys to fix AP mode with more than one associated STA.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:46 -05:00
Jouni Malinen
f66000f7a3 ath9k: Fix a NULL pointer dereference in ath_rate_get
It looks like mac80211 may try to send unicast frames to a STA that
does not have a STA entry. We need to make sure that that is caught in
the rate control code before dereferencing STA data.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:44 -05:00
Jay Sternberg
91f39e8eea iwlwifi: indicate txpower is off in sysfs
The patch checks if the radio is disabled before displaying the tx power
level. Previously when the txpower was set off show_tx_power still
returned the prior power level. Now it will indicate the power has been
turned off.

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:42 -05:00
Zhu Yi
f1bc4ac61f iwlwifi: use GFP_KERNEL to allocate Rx SKB memory
Previously we allocate Rx SKB with GFP_ATOMIC flag. This is because we need
to hold a spinlock to protect the two rx_used and rx_free lists operation
in the rxq.

	spin_lock();
	...
	element = rxq->rx_used.next;
	element->skb = alloc_skb(..., GFP_ATOMIC);
	list_del(element);
	list_add_tail(&element->list, &rxq->rx_free);
	...
	spin_unlock();

After spliting the rx_used delete and rx_free insert into two operations,
we don't require the skb allocation in an atomic context any more (the
function itself is scheduled in a workqueue).

	spin_lock();
	...
	element = rxq->rx_used.next;
	list_del(element);
	...
	spin_unlock();
	...
	element->skb = alloc_skb(..., GFP_KERNEL);
	...
	spin_lock()
	...
	list_add_tail(&element->list, &rxq->rx_free);
	...
	spin_unlock();

This patch should fix the "iwlagn: Can not allocate SKB buffers" warning
we see recently.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:41 -05:00
Wu, Fengguang
4087f6f68c iwlwifi: use meaningful vars in _iwl_poll_bit()
Rename vars in _iwl_poll_bit() to better reflect the truth.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:39 -05:00
Wu Fengguang
febf3370c6 iwlwifi: remove useless goto
The patch removes some useless goto in code cleanup.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:38 -05:00
Wu, Fengguang
95aa194ac4 iwlwifi: use type uint for module param debug
This enables one to change the debug level at bit 31.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:36 -05:00
Wu, Fengguang
c3a739fa35 iwlwifi: update comments on the debug interface
Bring up-to-date some comments on the location of debug files.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:35 -05:00
Wu, Fengguang
5c11ec60ef iwlwifi: add line feed to printk
This adds line feed to printk.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:33 -05:00
Winkler, Tomas
34c22cf93d iwlwifi: cleanup iwl-dev.h
The patch removes unused definition and moves code to proper places.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:32 -05:00
Rami Rosen
73ec1cc28e iwlwifi: remove a parameter (dest) from *_fill_beacon_frame() methods.
This patch removes a parameter (dest) from iwl_fill_beacon_frame() (iwl-agn.c)
 and from iwl3945_fill_beacon_frame(). (iwl-3945.c,iwl-3945.h)

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:29 -05:00
Vasanthakumar Thiagarajan
ca8a856056 ath9k: Move rate control alg register/unregister to appropriate place
This patch makes sure the rate control alg is registered/unregistered
only once for this module.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:27 -05:00
Vasanthakumar Thiagarajan
9bf9fca8de ath9k: Synchronize DMA transfer with CPU at right place
This patch does pci_dma_sync_single_for_cpu() before accessing
the header of the frame and queueing the same buffer into h/w.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:26 -05:00
Jouni Malinen
f7a276a625 ath9k: Remove MAC header pad before reporting TX status
Remove the possible MAC header pad before reporting TX status to
mac80211. This pad is hardware specific operation and should not be
exposed outside the driver. This fixes the frame body in monitor
interfaces that could be used to check on TX status for transmitted
frames.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:24 -05:00
Jouni Malinen
da027ca00a ath9k: Fix TX status reporting for retries and MCS index
The count field in struct ieee80211_tx_rate does not include the final
successful attempt, so only report retries here.

Fix the struct ieee80211_tx_rate::idx field when MCS was used. It is
supposed to be the MCS index, not an internal index to the rate
control algorithm table.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:23 -05:00
Herton Ronaldo Krzesinski
d858822733 rtl8187: Fix crash on unload when using SLUB debug
Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>

After the code was modified to use urb anchors ("rtl8187: Use usb anchor
facilities to manage urbs"), rtl8187 began generating an intermittent GPF
on shutdown when using SLUB with debugging enabled. Furthermore, rebooting
the system with a ping running caused a GPF every time. There are two problems:
(1) incorrect locking in the rtl8187_rx_cb() routine, a pre-existing bug that
apparently had not been triggered before, and (2) duplicate freeing of receive
skbs that was probably introduced with the change to anchors.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:20 -05:00
Christian Lamparter
0a5ec96ad6 p54: remove free_on_tx parameter
This patch simplifies the tx code a bit and will be necessary for
the upcoming stlc45xx<->p54 port.

In detail: we no longer have to tell all back-end drivers directly,
if we want to free a frame right after it was send to the firmware,
or if we do it in the library callback later.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:19 -05:00
Christian Lamparter
69ba3e5d74 p54: more accurate rssi to dBm conversion
This patch replaces the static rssi auto calibration data
with more precise values out of the device's eeprom.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:17 -05:00
Larry Finger
da9f57eade rtl8187: Fix error returns
There are two places in the rtl8187 code where a routine was returning zero
(OK) when it should have been returning an error.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:16 -05:00
Ilpo Järvinen
23827926eb libertas: use roundup instead of opencoding
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:14 -05:00
Christian Lamparter
ee370ceda8 p54: update ACK failure statistic counter in real-time
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:13 -05:00
Christian Lamparter
54fdb040b4 p54: move statistic timer update routine into a workqueue
This patch moves a good chunk of code from the former statistic update
timer routine into a workqueue, which is kindly provided by mac80211.

Also as a nice side-effect we can lay the foundation for other
essential housekeeping features we want to do in the future.
e.g:
 - drain the (clogged) tx_queue.
 - initiate bursts.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:11 -05:00
Mohamed Abbas
d5e490362f iwlagn: fix agn rate scaling
Rate scaling in agn can be broken because of these two problems
    1- the LQ command could not sent, we try to call LQ command before
       post association will be rejected, this will cause the driver to
       break in rs_tx_status reporting initial rate does not match.
    2- In rs_rate_init we can get a value of 12, rate 60, for
       last_txrate_idx, this rate only valid in SISO/MIMO mode only

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:10 -05:00
Benoit PAPILLAULT
0fe45b1deb ath5k: fix 802.11 header padding on RX, unpadding on TX
Padding the 802.11 header to a multiple of 4 bytes needs to be done only for
frames with a body. This fixes a bug where 2 bytes were missing in monitor
mode for ACK frames. Inspired by a patch from Jouni Malinen on ath9k.

Ref: http://bugzilla.kernel.org/show_bug.cgi?id=12101 :
Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:07 -05:00
Jouni Malinen
baad1d921b ath9k: Report HT rates in RX status
Fix and clean up the RX status reporting by getting rid of code that
used internal rate tables and ratekbps calculation. The correct value
is now reported with MCS index instead of the old mechanism that
defaulted to using the highest legacy rate.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:06 -05:00
Sujith
9d8eed12db ath9k: Do not use association state to update rate table
Now that HT information is made available to the driver through
config() callback, the channel type can be calculated whenever
setting the channel. Update the rate table accordingly with the new
channel type.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:23:02 -05:00
Sujith
094d05dc32 mac80211: Fix HT channel selection
HT management is done differently for AP and STA modes, unify
to just the ->config() callback since HT is fundamentally a
PHY property and cannot be per-BSS.

Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
the channel type ( NO_HT, HT20, HT40+, HT40- ).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-19 15:22:54 -05:00
Linus Torvalds
9a1d103563 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] mpt fusion: clear list of outstanding commands on host reset
  [SCSI] scsi_lib: only call scsi_unprep_request() under queue lock
  [SCSI] ibmvstgt: move crq_queue_create to the end of initialization
  [SCSI] libiscsi REGRESSION: fix passthrough support with older iscsi tools
  [SCSI] aacraid: disable Dell Percraid quirk on Adaptec 2200S and 2120S
2008-12-19 11:37:23 -08:00
Linus Torvalds
281981ca87 Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  cciss: fix problem that deleting multiple logical drives could cause a panic
2008-12-19 11:36:49 -08:00
Linus Torvalds
f3485c82f7 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: GEM on PAE has problems - disable it for now.
  drm/i915: Don't return busy for buffers left on the flushing list.
2008-12-19 11:36:04 -08:00
Linus Torvalds
db873cfc7c Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
  md: Don't read past end of bitmap when reading bitmap.
2008-12-19 11:34:36 -08:00
Linus Torvalds
eae34c6794 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI hotplug: ibmphp: Fix module ref count underflow
  PCI hotplug: acpiphp wants a 64-bit _SUN
  PCI: pciehp: fix unexpected power off with pciehp_force
  PCI: fix aer resume sanity check
2008-12-19 11:33:10 -08:00
Bjorn Helgaas
e76f427611 ACPI: fix 2.6.28 acpi.debug_level regression
acpi_early_init() was changed to over-write the cmdline param,
making it really inconvenient to set debug flags at boot-time.

Also,
This sets the default level to "info", which is what all the ACPI
drivers use.  So to enable messages from drivers, you only have to
supply the "layer" (a.k.a. "component").  For non-"info" ACPI core
and ACPI interpreter messages, you have to supply both level and
layer masks, as before.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-19 04:38:32 -05:00
Ingo Molnar
30cd324e97 Merge branches 'tracing/ftrace', 'tracing/ring-buffer' and 'tracing/urgent' into tracing/core
Conflicts:
	include/linux/ftrace.h
2008-12-19 09:42:40 +01:00
Stephen M. Cameron
d8a0be6ab7 cciss: fix problem that deleting multiple logical drives could cause a panic
Fix problem that deleting multiple logical drives could cause a panic.

It fixes a panic which can be easily reproduced in the following way: Just
create several "arrays," each with multiple logical drives via hpacucli,
then delete the first array, and it will blow up in deregister_disk(), in
the call to get_host() when it tries to dig the hba pointer out of a NULL
queue pointer.

The problem has been present since my code to make rebuild_lun_table
behave better went in.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-12-19 08:14:07 +01:00
Oliver Neukum
c94cb31450 net: prepare usb net drivers for addition of status as a parameter
USB is going to switch the signature of the callbacks to
void callback(struct urb *urb, int status)
This patch will ease the transition.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 23:00:59 -08:00
Cyrill Gorcunov
ab5024ab23 net: ppp_generic - use DEFINE_IDR for static initialization
We could use DEFINE_IDR for statically allocated idr
that allow us to save a few lines of code.

And spell fix.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:59:32 -08:00
Karen Xie
a109a5b916 cxgb3: manage private iSCSI IP address
The accelerated iSCSI traffic could use a private IP address unknown to the OS:
- The IP address is required in both drivers to manage ARP requests and connection set up.
- Added an control call to retrieve the ip address.
- Reply to ARP requests dedicated to the private IP address.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:56:20 -08:00
Anton Vorontsov
221b3d60cb ucc_geth: Remove UGETH_FILTERING dead code
The code appears to be dead: nobody call these functions, plus build
breaks when UGETH_FILTERING is enabled:

ucc_geth.c:1848: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c:1848: warning: its scope is only this definition or declaration, which is probably not what you want
ucc_geth.c: In function 'ugeth_82xx_filtering_get_match_addr_in_hash':
ucc_geth.c:1856: error: dereferencing pointer to incomplete type
ucc_geth.c:1874: error: dereferencing pointer to incomplete type
ucc_geth.c:1877: warning: return from incompatible pointer type
ucc_geth.c: At top level:
ucc_geth.c:1885: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_hash':
ucc_geth.c:1894: error: dereferencing pointer to incomplete type
ucc_geth.c:1909: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
ucc_geth.c:1909: warning: assignment from incompatible pointer type
ucc_geth.c:1918: error: dereferencing pointer to incomplete type
ucc_geth.c: At top level:
ucc_geth.c:1928: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_clear_addr_in_hash':
ucc_geth.c:1947: warning: passing argument 2 of 'ugeth_82xx_filtering_get_match_addr_in_hash' from incompatible pointer type
ucc_geth.c:1947: warning: assignment from incompatible pointer type
ucc_geth.c:1954: error: dereferencing pointer to incomplete type
ucc_geth.c: At top level:
ucc_geth.c:2060: warning: 'struct enet_addr' declared inside parameter list
ucc_geth.c: In function 'ugeth_82xx_filtering_add_addr_in_paddr':
ucc_geth.c:2064: error: dereferencing pointer to incomplete type
ucc_geth.c:2073: error: dereferencing pointer to incomplete type
ucc_geth.c:2075: warning: passing argument 2 of 'hw_add_addr_in_paddr' from incompatible pointer type
make[2]: *** [ucc_geth.o] Error 1

The code is there since the driver was merged, and nobody seem to be
interested in fixing or actually using it. If we ever want the
filtering support, we can always revert the patch and fix it, but so
far it just draws reader's attention.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:50:56 -08:00
Anton Vorontsov
3e73fc9a12 ucc_geth: Fix IO memory (un)mapping code
The driver doesn't check ioremap() return value, and doesn't free the
remapped memory.

This patch fixes it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:50:55 -08:00
Anton Vorontsov
ba574696a3 ucc_geth: Cleanup repetitive ucc_geth_memclean() calls
No need to call ucc_geth_memclean() so many times, just check for
errors in ucc_geth_open(), and call ucc_geth_stop() in case of errors.

The ucc_geth_stop() may be called anytime and will do the right thing.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:50:52 -08:00
Anton Vorontsov
67c2fb8ff0 ucc_geth: Fix IRQ freeing code in ucc_geth_open()
open() routine calls stop() in case of errors, the function will try
to free the requested IRQ. But we don't know if it was actually
requested, so the code might issue bogus free_irq(0, dev) call.

Fix this by rearranging the code so that now request_irq() is the last
call in the open() routine, and move free_irq() into the close().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:50:50 -08:00
Anton Vorontsov
1762a29ae5 ucc_geth: Fix TX watchdog timeout handling
The timeout handling code is currently broken in several ways:

- It calls stop() (which frees all the memory and IRQ), and then
  calls startup() (which won't re-request IRQ, neither it will
  re-init the Fast UCC structure).
- It calls these routines from the softirq context, which is wrong,
  since stop() calls free_irq() (which might sleep) and startup()
  allocates things with GFP_KERNEL.
- It won't soft-reset the PHY. We need the PHY reset for at least
  MPC8360E-MDS boards with Marvell 88E1111 PHY, the PHY won't recover
  from timeouts w/o the reset.

So the patch fixes these problems by implementing the workqueue for the
timeout handling, and there we fully re-open the device via close() and
open() calls. The close/open paths do the right things, and I can see
that the driver actually survive the timeouts.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:48:55 -08:00
Anton Vorontsov
b3431c6476 ucc_geth: Fix endless loop in stop_{tx,rx} routines
Currently the routines wait for the various bits w/o an assumption that
bits may never get set. When timeouts happen I see that these bits never
get set and so the routines hang the kernel.

With this patch we'll wait the graceful stop for 100 ms, and then will
simply exit. There is nothing* we can do about that, but it's OK since
we'll do full reset later.

* Well, actually, there is also not-graceful variant for the TX stop,
  but specs says that we never should use it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:48:53 -08:00
Jesper Dangaard Brouer
e98def1f71 NIU: Implement discard counters, optimize
Optimize the lightly loaded case, by only synchronizing discards stats
when qlen > 10 indicate potential for drops.

Notice Robert Olsson might disagree with this patch.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:27:41 -08:00
Jesper Dangaard Brouer
d231776fda NIU: Implement discard counters, info/debug statements.
Discard packet counter debug statements that can be turned on
at runtime by users to assist debugging of the driver code.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:27:40 -08:00
Jesper Dangaard Brouer
b8a606b871 NIU: Implement discard counters
Implementing discard counters for the NIU driver turned out to be more
complicated than first assumed.

The discard counters for the NIU neptune chip are only 16-bit (even
though this is a 64-bit chip).  These 16-bit counters can overflow
quickly, especially considering this is a 10Gbit/s ethernet card.

The overflow indication bit is, unfortunatly, not usable as the
counter value does not wrap, but remains at max value 0xFFFF.
Resulting in lost counts until the counter is reset.

The read and reset scheme also poses a problem. Both in theory and in
practice counters can be lost in between reading nr64() and clearing
the counter nw64().  For this reason, the number of counter clearings
nw64() is limited/reduced.  On the fast-path the counters are only
syncronized once it exceeds 0x7FFF.  When read by userspace, its
syncronized fully.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:27:40 -08:00
Baruch Siach
5664dd5561 enc28j60: reduce the number of spi transfers in enc28j60_set_bank()
A major source of overhead in the enc28j60 driver is the SPI transfers. Each
SPI transfer entails two kernel thread context switches. One major source of
SPI transfers is the enc28j60_set_bank() functions which runs before every
register access. This patch reduces the number of SPI transfers that
enc28j60_set_bank() performs in two ways:

  1. removes unnecessary bank switch for the registers that are present in all
	 banks

  2. when switching from banks 0 or 3 to banks 1 or 2 (i.e. only one bit
	 changes) enc28j60_set_bank() does only one SPI transfer instead of two

According to my tests these changes reduce the number of SPI transfers in
about 25%.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:27:39 -08:00
Wang Chen
b88a2a22c6 netdevice zd1201: Use after free
| commit 3d29b0c33d
| Author: John W. Linville <linville@tuxdriver.com>
| Date:   Fri Oct 31 14:13:12 2008 -0400
|
|     netdevice zd1201: Convert directly reference of netdev->priv to netdev_priv()
|
|     We have some reasons to kill netdev->priv:
|     1. netdev->priv is equal to netdev_priv().
|     2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
|        netdev_priv() is more flexible than netdev->priv.
|     But we cann't kill netdev->priv, because so many drivers reference to it
|     directly.
|
|     OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug",
|     and I want to kill netdev->priv later, I decided to convert all the direct
|     reference of netdev->priv first.
|
|     (Original patch posted by Wang Chen <wangchen@cn.fujitsu.com> w/ above
|     changelog but using dev->ml_priv.  That doesn't seem appropriate
|     to me for this driver, so I've revamped it to use netdev_priv()
|     instead. -- JWL)

This commit changed the allocation of netdev, but didn't change
the free method of it.
This causes "zd" be used after the memory, which is pointed by "zd", being
freed by free_netdev().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 22:27:38 -08:00
Dave Airlie
ac5c4e7618 drm/i915: GEM on PAE has problems - disable it for now.
On PAE systems, GEM allocates pages using shmem, and passes these
pages to be bound into AGP, however the AGP interfaces + the x86
set_memory interfaces all take unsigned long not dma_addr_t.

The initial fix for this was a mess, so we need to do this correctly
for 2.6.29.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-19 15:38:34 +10:00
Eric Anholt
c4de0a5d67 drm/i915: Don't return busy for buffers left on the flushing list.
These buffers don't have active rendering still occurring to them, they just
need either a flush to be emitted or a retire_requests to occur so that we
notice they're done.  Return unbusy so that one of the two occurs.  The two
expected consumers of this interface (OpenGL and libdrm_intel BO cache) both
want this behavior.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-12-19 15:34:32 +10:00
NeilBrown
a2ed9615e3 md: Don't read past end of bitmap when reading bitmap.
When we read the write-intent-bitmap off the device, we currently
read a whole number of pages.
When PAGE_SIZE is 4K, this works due to the alignment we enforce
on the superblock and bitmap.
When PAGE_SIZE is 64K, this case read past the end-of-device
which causes an error.

When we write the superblock, we ensure to clip the last page
to just be the required size.  Copy that code into the read path
to just read the required number of sectors.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: stable@kernel.org
2008-12-19 16:25:01 +11:00
James Chapman
739840d529 ppp: fix segfaults introduced by netdev_priv changes
This patch fixes a segfault in ppp_shutdown_interface() and
ppp_destroy_interface() when a PPP connection is closed. I bisected
the problem to the following commit:

  commit c8019bf3af
  Author: Wang Chen <wangchen@cn.fujitsu.com>
  Date:   Thu Nov 20 04:24:17 2008 -0800

    netdevice ppp: Convert directly reference of netdev->priv

    1. Use netdev_priv(dev) to replace dev->priv.
    2. Alloc netdev's private data by alloc_netdev().

    Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

The original ppp_generic code treated the netdev and struct ppp as
independent data structures which were freed separately. In moving the
ppp struct into the netdev, it is now possible for the private data to
be freed before the call to ppp_shutdown_interface(), which is bad.

The kfree(ppp) in ppp_destroy_interface() is also wrong; presumably
ppp hasn't worked since the above commit.

The following patch fixes both problems.

Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 19:41:42 -08:00
Linus Torvalds
59da1f87b2 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  async_xor: dma_map destination DMA_BIDIRECTIONAL
  dmaengine: protect 'id' from concurrent registrations
  ioat: wait for self-test completion
2008-12-18 12:05:53 -08:00
Linus Torvalds
b3806c3b94 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2: Fix bug in bnx2_free_rx_mem().
  irda: Add irda_skb_cb qdisc related padding
  jme: Fixed a typo
  net: kernel BUG at drivers/net/phy/mdio_bus.c:165!
  drivers/net: starfire: Fix napi ->poll() weight handling
  tlan: Fix pci memory unmapping
  enc28j60: use netif_rx_ni() to deliver RX packets
  tlan: Fix small (< 64 bytes) datagram transmissions
  netfilter: ctnetlink: fix missing CTA_NAT_SEQ_UNSPEC
2008-12-18 12:00:46 -08:00
Holger Eitzenberger
3b5b35d022 bonding: use port_params in __update_lacpdu_from_port
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:13:53 -08:00
Holger Eitzenberger
3c52065fbb bonding: use port_params in __update_default_selected()
I also removed some of the unneeded braces in the if condition to
improve readability and a little bit of reformatting.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:13:27 -08:00
Holger Eitzenberger
ce6a49ad40 bonding: use port_params in __update_selected()
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:13:07 -08:00
Holger Eitzenberger
a6ae186b9a bonding: remove various function declarations
They are all defined before used, it's therefore ok to remove
them.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:12:40 -08:00
Holger Eitzenberger
c7e703d01e bonding: init port_params from template
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:12:07 -08:00
Holger Eitzenberger
5eefd1adce bonding: use plain memcpy in __record_default()
Also remove the pointless comment at the top.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:08:46 -08:00
Holger Eitzenberger
b99d6ba96d bonding: use port_params in __record_pdu()
It helps in maintaining the various partner information values from
the LACPDU.  It also removes the pointless comment at the top.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:08:14 -08:00
Holger Eitzenberger
1055c9aba3 bonding: introduce and use port_params structure
It generally helps to handle those values in various places, using it
might make the code more readable and gives room for other improvements.

The IEEE standard talks about them as "parameter values".

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:07:38 -08:00
Holger Eitzenberger
aa3128199d bonding: improve elaborate port_state assignment
The previous code was just a funny way of assigning both values (they
are both of type u8).

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 19:07:16 -08:00