]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years ago[IrDA]: Irport removal - part 1
Adrian Bunk [Sat, 19 Jan 2008 08:00:42 +0000 (00:00 -0800)]
[IrDA]: Irport removal - part 1

This patch removes IrPORT and the old dongle drivers (all off them
have replacement drivers).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IrDA]: Frame length validation.
Robie Basak [Sat, 19 Jan 2008 07:58:44 +0000 (23:58 -0800)]
[IrDA]: Frame length validation.

When using a stir4200-based USB adaptor to talk to a device that uses
an mcp2150, the stir4200 sometimes drops an incoming frame causing the
mcp2150 to try and retransmit the lost frame. In this combination, the
next frame received from the mcp2150 is often invalid - either an
empty i:rsp or an IrCOMM i:rsp with an invalid clen. These corner
cases are now checked.

Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IrDA]: Resend frames on timeout.
Robie Basak [Sat, 19 Jan 2008 07:56:54 +0000 (23:56 -0800)]
[IrDA]: Resend frames on timeout.

When final timer expires, it might also mean that the i:cmd wasn't
received properly. If we have rejected frames, we can try to resend them.

Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Namespace stop vs 'ip r l' race.
Denis V. Lunev [Sat, 19 Jan 2008 07:55:19 +0000 (23:55 -0800)]
[NETNS]: Namespace stop vs 'ip r l' race.

During network namespace stop process kernel side netlink sockets
belonging to a namespace should be closed. They should not prevent
namespace to stop, so they do not increment namespace usage
counter. Though this counter will be put during last sock_put.

The raplacement of the correct netns for init_ns solves the problem
only partial as socket to be stoped until proper stop is a valid
netlink kernel socket and can be looked up by the user processes. This
is not a problem until it resides in initial namespace (no processes
inside this net), but this is not true for init_net.

So, hold the referrence for a socket, remove it from lookup tables and
only after that change namespace and perform a last put.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Tested-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Consolidate kernel netlink socket destruction.
Denis V. Lunev [Mon, 28 Jan 2008 22:41:19 +0000 (14:41 -0800)]
[NETNS]: Consolidate kernel netlink socket destruction.

Create a specific helper for netlink kernel socket disposal. This just
let the code look better and provides a ground for proper disposal
inside a namespace.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Tested-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Memory leak on network namespace stop.
Denis V. Lunev [Sat, 19 Jan 2008 07:54:15 +0000 (23:54 -0800)]
[NETNS]: Memory leak on network namespace stop.

Network namespace allocates 2 kernel netlink sockets, fibnl &
rtnl. These sockets should be disposed properly, i.e. by
sock_release. Plain sock_put is not enough.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Tested-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS]: Double free in netlink_release.
Denis V. Lunev [Sat, 19 Jan 2008 07:53:31 +0000 (23:53 -0800)]
[NETNS]: Double free in netlink_release.

Netlink protocol table is global for all namespaces. Some netlink
protocols have been virtualized, i.e. they have per/namespace netlink
socket. This difference can easily lead to double free if more than 1
namespace is started. Count the number of kernel netlink sockets to
track that this table is not used any more.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Tested-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Fix ip6_frag ctl
Daniel Lezcano [Sat, 19 Jan 2008 07:52:35 +0000 (23:52 -0800)]
[IPV6]: Fix ip6_frag ctl

Alexey Dobriyan reported an oops when unsharing the network
indefinitely inside a loop. This is because the ip6_frag is not per
namespace while the ctls are.

That happens at the fragment timer expiration:
inet_frag_secret_rebuild function is called and this one restarts the
timer using the value stored inside the sysctl field.

        "mod_timer(&f->secret_timer, now + f->ctl->secret_interval);"

When the network is unshared, ip6_frag.ctl is initialized with the new
sysctl instances, but ip6_frag has only one instance. A race in this
case will appear because f->ctl can be modified during the read access
in the timer callback.

Until the ip6_frag is not per namespace, I discard the assignation to
the ctl field of ip6_frags in ip6_frag_sysctl_init when the network
namespace is not the init net.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: NEWEMAC: Fix problem with mtu > 4080 on non TAH equipped 4xx PPC's
Stefan Roese [Wed, 16 Jan 2008 07:11:15 +0000 (08:11 +0100)]
net: NEWEMAC: Fix problem with mtu > 4080 on non TAH equipped 4xx PPC's

Currently, all non TAH equipped 4xx PPC's call emac_start_xmit() upon
xmit. This routine doesn't check if the frame length exceeds the max.
MAL buffer size.

This patch now changes the driver to call emac_start_xmit_sg() on all
GigE platforms and not only the TAH equipped ones (440GX). This enables
an MTU of 9000 instead 4080.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoadd driver for enc28j60 ethernet chip
Claudio Lanconelli [Mon, 14 Jan 2008 10:00:28 +0000 (11:00 +0100)]
add driver for enc28j60 ethernet chip

Signed-off-by: Claudio Lanconelli <lanconelli.claudio@eptar.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoSGISEEQ: fix oops when doing ifconfig down; ifconfig up
Thomas Bogendoerfer [Sat, 12 Jan 2008 23:08:47 +0000 (00:08 +0100)]
SGISEEQ: fix oops when doing ifconfig down; ifconfig up

When doing init_ring checking whether a new skb needs to be allocated
was wrong.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: version 1.21
Stephen Hemminger [Fri, 11 Jan 2008 00:14:15 +0000 (16:14 -0800)]
sky2: version 1.21

Update driver version reflects new hardware support.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: support for Yukon Supreme
Stephen Hemminger [Fri, 11 Jan 2008 00:14:14 +0000 (16:14 -0800)]
sky2: support for Yukon Supreme

Add support from sk98lin vendor driver 10.50.1.3 for 88E8055 and
88E8075 chips.  I don't have this hardware to test, so this changes
are untested.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoqla3xxx annotations
Al Viro [Sat, 22 Dec 2007 19:44:29 +0000 (19:44 +0000)]
qla3xxx annotations

stop the byteswap-in-place, annotate

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoslhc annotations
Al Viro [Sat, 22 Dec 2007 18:56:05 +0000 (18:56 +0000)]
slhc annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoeepro100 annotations
Al Viro [Sat, 22 Dec 2007 18:55:49 +0000 (18:55 +0000)]
eepro100 annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoannotate the rest of drivers/net/wan
Al Viro [Sat, 22 Dec 2007 17:52:52 +0000 (17:52 +0000)]
annotate the rest of drivers/net/wan

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoannotate tun
Al Viro [Sat, 22 Dec 2007 17:52:42 +0000 (17:52 +0000)]
annotate tun

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoNET: ns83820.c remove fastcall macro
David Miller [Thu, 20 Dec 2007 12:14:42 +0000 (04:14 -0800)]
NET: ns83820.c remove fastcall macro

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoSGISEEQ: use cached memory access to make driver work on IP28
Thomas Bogendoerfer [Wed, 19 Dec 2007 12:42:36 +0000 (13:42 +0100)]
SGISEEQ: use cached memory access to make driver work on IP28

- Use inline functions for dma_sync_* instead of macros
- added Kconfig change to make selection for similair SGI boxes easier

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoAdd me as maintainer of the RDC r6040 driver
Florian Fainelli [Wed, 19 Dec 2007 10:30:30 +0000 (11:30 +0100)]
Add me as maintainer of the RDC r6040 driver

This patch adds me as maintainer of the RDC R6040 Fast Ethernet driver.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
--
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoiwlwifi: skip mac80211 conf during a hardware scan and replay it afterwards
Zhu Yi [Thu, 20 Dec 2007 06:10:01 +0000 (14:10 +0800)]
iwlwifi: skip mac80211 conf during a hardware scan and replay it afterwards

This patch skips mac80211 configuration setting during a hardware scan
and replays it afterwards for the iwlwifi drivers.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: proper monitor support
Zhu Yi [Thu, 20 Dec 2007 03:27:32 +0000 (11:27 +0800)]
iwlwifi: proper monitor support

This patch changes the iwlwifi driver to properly support
monitor interfaces after the filter flags change.

The patch is originally created by Johannes Berg for iwl4965. I fixed some
of the comments and created a similar patch for iwl3945.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: remove check for driver_lock in lbs_interrupt()
David Woodhouse [Tue, 18 Dec 2007 11:41:43 +0000 (11:41 +0000)]
libertas: remove check for driver_lock in lbs_interrupt()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert SUBSCRIBE_EVENT to a direct command
David Woodhouse [Tue, 18 Dec 2007 07:01:37 +0000 (02:01 -0500)]
libertas: convert SUBSCRIBE_EVENT to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: change inference about buffer size in lbs_cmd()
David Woodhouse [Wed, 19 Dec 2007 13:03:19 +0000 (13:03 +0000)]
libertas: change inference about buffer size in lbs_cmd()

sizeof(*cmd) is going to give the total size of the data structure that
we allocated, more often than not. But the size of the command to be
_sent_ could be a lot smaller, as it is in the KEY_MATERIAL and
SUBSCRIBE_EVENT commands for example. So swap them round; let the caller
set the _command_ size explicitly in the header, and infer the
maximum response size from the data structure.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert ENABLE_RSN to a direct command
David Woodhouse [Tue, 18 Dec 2007 05:47:17 +0000 (00:47 -0500)]
libertas: convert ENABLE_RSN to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert SET_WEP to a direct command
David Woodhouse [Tue, 18 Dec 2007 05:18:05 +0000 (00:18 -0500)]
libertas: convert SET_WEP to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert SLEEP_PARAMS to a direct command
David Woodhouse [Tue, 18 Dec 2007 04:48:31 +0000 (23:48 -0500)]
libertas: convert SLEEP_PARAMS to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert INACTIVITY_TIMEOUT to a direct command
David Woodhouse [Tue, 18 Dec 2007 04:04:37 +0000 (23:04 -0500)]
libertas: convert INACTIVITY_TIMEOUT to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert RADIO_CONTROL to a direct command
David Woodhouse [Tue, 18 Dec 2007 03:43:48 +0000 (22:43 -0500)]
libertas: convert RADIO_CONTROL to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: submit RSSI command on tx timeout, to check whether module is dead
David Woodhouse [Tue, 18 Dec 2007 00:22:40 +0000 (19:22 -0500)]
libertas: submit RSSI command on tx timeout, to check whether module is dead

We don't necessarily want to reset the device on a TX timeout. But more
often than not, the real cause is that the firmware has crapped itself,
not just that the network is busy. So submit any harmless command, and
if _that_ times out, then the error handling code will reset the module,
as appropriate.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: make lbs_submit_command always 'succeed' and set command timer
David Woodhouse [Mon, 17 Dec 2007 21:03:58 +0000 (16:03 -0500)]
libertas: make lbs_submit_command always 'succeed' and set command timer

Even if it fails, we want to wait a while and try again, with an
ultimate timeout if it the condition persists. So again, just use the
standard command timeout behaviour.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: discard DEFER responses to commands; let the timeout trigger
David Woodhouse [Mon, 17 Dec 2007 20:41:30 +0000 (15:41 -0500)]
libertas: discard DEFER responses to commands; let the timeout trigger

When the firmware returns 0x0004, it wants us to try again later. We can
achieve that simply by throwing out the response and letting the command
timeout code kick in.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: use priv->upld_buf for command responses
David Woodhouse [Mon, 17 Dec 2007 20:22:43 +0000 (15:22 -0500)]
libertas: use priv->upld_buf for command responses

If we don't scribble over the command we sent, then we can retry it when
the firmware responds with 0x0004 (which means -EAGAIN).

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: reduce explicit references to priv->cur_cmd->cmdbuf
David Woodhouse [Mon, 17 Dec 2007 20:12:49 +0000 (15:12 -0500)]
libertas: reduce explicit references to priv->cur_cmd->cmdbuf

We have a local variable 'resp' which we use for this. So use it,
instead of typing the whole thing.

In preparation for actually using priv->upld_buf for the responses
instead...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: Check for PS mode support on USB devices
David Woodhouse [Mon, 17 Dec 2007 19:42:33 +0000 (14:42 -0500)]
libertas: Check for PS mode support on USB devices

Move the various firmware setup bits into a separate function, which
used to do just boot2 version.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: allow for PS mode to be disabled when firmware doesn't support it
David Woodhouse [Mon, 17 Dec 2007 19:41:13 +0000 (14:41 -0500)]
libertas: allow for PS mode to be disabled when firmware doesn't support it

Otherwise, we go into an endless busy loop trying to enable PS mode when
the command queue is empty, dealing with the error response, and then
trying to enable PS mode again because the command queue is empty.... it
doesn't really save much power.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: handle HOST_AWAKE event by sending WAKEUP_CONFIRM command
David Woodhouse [Mon, 17 Dec 2007 18:26:42 +0000 (13:26 -0500)]
libertas: handle HOST_AWAKE event by sending WAKEUP_CONFIRM command

lbs_send_confirmwake() is a bit ugly but matches the way we confirm
sleep. We'll deal with that whole thing later.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: don't clear priv->dnld_sent after sending sleep confirm
David Woodhouse [Mon, 17 Dec 2007 17:35:28 +0000 (12:35 -0500)]
libertas: don't clear priv->dnld_sent after sending sleep confirm

DNLD_RES_RECEIVED is a bit of a misnomer -- we never wait for the result
to be received; it's purely representing the state of the TX path, and
in this case the TX path is definitely busy.

Of course, that means that we don't actually care about DATA_SENT vs.
CMD_SENT either, but that's a can of worms for another day...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: fix buffer handling of PS_MODE commands and responses
David Woodhouse [Mon, 17 Dec 2007 04:26:54 +0000 (23:26 -0500)]
libertas: fix buffer handling of PS_MODE commands and responses

Commit 5b8845345e7385d2eb37fac22ba9ab6905988be5 (or, in case the git
workflow is broken and patches get recommitted, the commit entitled
'libertas: rename and re-type bufvirtualaddr to cmdbuf' by dcbw),
introduced a number of bugs where we once had a pointer to a command
_payload_, but now we use the pointer to the command header instead.

The fix isn't wonderfully pretty for now, but it'll get better when we
finish converting all commands so the structures include the header.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add SLEEP_PERIOD and FW_WAKE_METHOD command definitions
David Woodhouse [Mon, 17 Dec 2007 02:43:40 +0000 (21:43 -0500)]
libertas: add SLEEP_PERIOD and FW_WAKE_METHOD command definitions

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: fix return from lbs_update_channel()
David Woodhouse [Sun, 16 Dec 2007 22:21:00 +0000 (17:21 -0500)]
libertas: fix return from lbs_update_channel()

If we return the channel number in a 'ret' variable where anything
non-zero is later interpreted as an error, that isn't nice. It breaks
WPA, for a start. OLPC trac #5485

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: kill 'addtail' argument to lbs_queue_cmd() and make it static
David Woodhouse [Sun, 16 Dec 2007 01:04:54 +0000 (20:04 -0500)]
libertas: kill 'addtail' argument to lbs_queue_cmd() and make it static

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: handle command timeout in main thread instead of directly in timer
David Woodhouse [Sun, 16 Dec 2007 00:33:43 +0000 (19:33 -0500)]
libertas: handle command timeout in main thread instead of directly in timer

And handle the case where it times out more than once, too, instead of
locking up for ever.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: ensure response buffer size is always set for lbs_cmd_with_response
David Woodhouse [Sat, 15 Dec 2007 08:46:44 +0000 (03:46 -0500)]
libertas: ensure response buffer size is always set for lbs_cmd_with_response

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add __lbs_cmd_async() for asynchronous command submission
David Woodhouse [Sat, 15 Dec 2007 08:09:33 +0000 (03:09 -0500)]
libertas: add __lbs_cmd_async() for asynchronous command submission

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: store command result in cmdnode instead of priv->cur_cmd_retcode
David Woodhouse [Sat, 15 Dec 2007 09:22:52 +0000 (04:22 -0500)]
libertas: store command result in cmdnode instead of priv->cur_cmd_retcode

... at least for users of __lbs_cmd().

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: kill pdata_buf member of struct cmd_ctrl_node
David Woodhouse [Sat, 15 Dec 2007 07:38:17 +0000 (02:38 -0500)]
libertas: kill pdata_buf member of struct cmd_ctrl_node

We can use the callback_arg for it; that's the way we're heading anyway...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: let __lbs_cmd() free its own cmdnode
David Woodhouse [Sat, 15 Dec 2007 07:06:16 +0000 (02:06 -0500)]
libertas: let __lbs_cmd() free its own cmdnode

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: kill cleanup_cmdnode()
David Woodhouse [Sat, 15 Dec 2007 07:02:56 +0000 (02:02 -0500)]
libertas: kill cleanup_cmdnode()

Move the wakeup into lbs_complete_command(), and leave the other bits
in __lbs_cleanup_and_insert_cmd() which was the only caller now anyway.

There are two remaining direct callers of lbs_cleanup_and_insert_cmd(),
and they are both fine without the wakeup.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: don't re-initialise cmdnode when taking it off the free queue
David Woodhouse [Sat, 15 Dec 2007 06:57:12 +0000 (01:57 -0500)]
libertas: don't re-initialise cmdnode when taking it off the free queue

We initialise it when we add it to the queue. No need to do it again.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: introduce and use lbs_complete_command() for command completion
David Woodhouse [Sat, 15 Dec 2007 06:52:54 +0000 (01:52 -0500)]
libertas: introduce and use lbs_complete_command() for command completion

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: remove some pointless checks for cmdnode buffer being present
David Woodhouse [Sat, 15 Dec 2007 05:41:51 +0000 (00:41 -0500)]
libertas: remove some pointless checks for cmdnode buffer being present

We allocate them all at the same time, at startup. If they go missing,
we have more serious things to worry about, and the resulting oops will
be a perfectly acceptable result.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: don't use __lbs_cmd() with empty callback in if_usb.c
David Woodhouse [Sat, 15 Dec 2007 06:22:09 +0000 (01:22 -0500)]
libertas: don't use __lbs_cmd() with empty callback in if_usb.c

We're about to change semantics, leaving callers of
lbs_prepare_and_send_command() with the old broken priv->cur_cmd_retcode
crap. The existence of the callback command will be the trigger for the
new semantics when handling the response.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: rename and clean up DownloadcommandToStation
David Woodhouse [Sat, 15 Dec 2007 05:09:25 +0000 (00:09 -0500)]
libertas: rename and clean up DownloadcommandToStation

Call it lbs_submit_command(), remove a bunch of things which can be (or,
in the case of zeroing ->cmdwaitqwoken, already are) done elsewhere.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: kill unused wait_option field in struct cmd_ctrl_node
David Woodhouse [Sat, 15 Dec 2007 04:08:13 +0000 (23:08 -0500)]
libertas: kill unused wait_option field in struct cmd_ctrl_node

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: kill whitespace at end of lines
David Woodhouse [Sat, 15 Dec 2007 03:53:41 +0000 (22:53 -0500)]
libertas: kill whitespace at end of lines

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: clean up if_usb driver
David Woodhouse [Fri, 14 Dec 2007 05:47:05 +0000 (00:47 -0500)]
libertas: clean up if_usb driver

It was just getting on my tits, really.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: stop attempting to reset devices on unload
David Woodhouse [Fri, 14 Dec 2007 02:53:16 +0000 (21:53 -0500)]
libertas: stop attempting to reset devices on unload

It wasn't working anyway -- by the time we get into if_usb_disconnect()
the USB core has already stopped us talking to the thing; even if it's
just on unload and the device still exists.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: don't exit worker thread until kthread_stop() is called
David Woodhouse [Fri, 14 Dec 2007 02:48:00 +0000 (21:48 -0500)]
libertas: don't exit worker thread until kthread_stop() is called

The kthread code can't cope with a thread exiting of its own accord and
then someone calling kthread_stop() for it. When the thread detects that
it needs to die, make it wait for kthread_stop() to be called.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43legacy: Fix rfkill radio LED
Larry Finger [Sun, 16 Dec 2007 18:21:06 +0000 (19:21 +0100)]
b43legacy: Fix rfkill radio LED

This fixes Bug #9414 for b43legacy. This patch is the equivalent of one
submitted earlier for b43.

Since addition of the rfkill callback, the LED associated with the off
switch on the radio has not worked for several reasons:

(1) Essential data in the rfkill structure were missing.
(2) The rfkill structure was initialized after the LED initialization.
(3) There was a minor memory leak if the radio LED structure was inited.

Once the above problems were fixed, additional difficulties were noted:

(4) The radio LED was in the wrong state at startup.
(5) The radio switch had to be manipulated twice for each state change.
(6) A circular mutex locking situation existed.
(7) If rfkill-input is built as a module, it is not automatically loaded.

This patch fixes all of the above and removes a couple of sparse warnings.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoS2io: Fixes to enable multiple transmit fifos
Ramkrishna Vepa [Mon, 17 Dec 2007 19:40:15 +0000 (11:40 -0800)]
S2io: Fixes to enable multiple transmit fifos

Multiple transmit fifo initialization -
  - Assigned equal scheduling priority for all configured FIFO's.
  - Modularized transmit traffic interrupt initialization since it is executed in
    s2io_card_up and s2io_link. Enable continuous tx interrupt when link is UP
    and vice verse.
  - Enable transmit interrupts for all configured transmit fifos.
  - Fixed typo errors.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoS2io: Fixes to enable multiple transmit fifo support
Surjit Reang [Thu, 24 Jan 2008 10:08:59 +0000 (02:08 -0800)]
S2io: Fixes to enable multiple transmit fifo support

Fixes to enable multiple transmit fifos (upto a maximum of eight).
  - Moved single tx_lock from struct s2io_nic to struct fifo_info.
  - Moved single ufo_in_band_v structure from struct s2io_nic to struct
    fifo_info.
  - Assign the respective interrupt number for the transmitting fifo in the
    transmit descriptor (TXD).
- Added boundary checks for number of FIFOs enabled and FIFO length.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocxgb3 - Fix EEH, missing softirq blocking
Divy Le Ray [Tue, 18 Dec 2007 02:47:41 +0000 (18:47 -0800)]
cxgb3 - Fix EEH, missing softirq blocking

set_pci_drvdata() stores a pointer to the adapter,
not the net device.
Add missing softirq blocking in t3_mgmt_tx.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb3 - parity initialization for T3C adapters.
Divy Le Ray [Tue, 18 Dec 2007 02:47:31 +0000 (18:47 -0800)]
cxgb3 - parity initialization for T3C adapters.

Add parity initialization for T3C adapters.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopasemi: export pasemi_dma_init()
Olof Johansson [Fri, 14 Dec 2007 08:06:55 +0000 (02:06 -0600)]
pasemi: export pasemi_dma_init()

Forgot to export this one. Needed when pasemi_mac is compiled as a module.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoPLIP driver: convert the semaphore killed_timer_sem to completion
Matthias Kaehlcke [Fri, 14 Dec 2007 00:03:00 +0000 (16:03 -0800)]
PLIP driver: convert the semaphore killed_timer_sem to completion

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agobnx2x depends on ZLIB_INFLATE
Lee Schermerhorn [Fri, 14 Dec 2007 00:02:59 +0000 (16:02 -0800)]
bnx2x depends on ZLIB_INFLATE

The bnx2x module depends on the zlib_inflate functions.  The build will
fail if ZLIB_INFLATE has not been selected manually or by building another
module that automatically selects it.

Modify BNX2X config option to 'select ZLIB_INFLATE' like BNX2
and others.  This seems to fix it.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Eliezer Tamir <eliezert@broadcom.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopcmcia net: use roundup_pow_of_two() macro instead of grotesque loop
Robert P. J. Day [Fri, 14 Dec 2007 00:02:55 +0000 (16:02 -0800)]
pcmcia net: use roundup_pow_of_two() macro instead of grotesque loop

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe1000: Dump the eeprom when a user encounters a bad checksum
Auke Kok [Mon, 17 Dec 2007 21:50:23 +0000 (13:50 -0800)]
e1000: Dump the eeprom when a user encounters a bad checksum

To help supporting users with a bad eeprom checksum, dump the
eeprom info when such a situation is encountered by a user.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb: enable sun hardware support for broadcom phy
Matheos Worku [Fri, 14 Dec 2007 19:48:36 +0000 (11:48 -0800)]
ixgb: enable sun hardware support for broadcom phy

Implement support for a SUN-specific PHY.

SUN provides a modified 82597-based board with their own
PHY that works with very little modification to the code. This
patch implements this new PHY which is identified by the
subvendor device ID. The device ID of the adapter remains
the same.

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe1000: remove no longer used code for pci read/write cfg
Adrian Bunk [Thu, 13 Dec 2007 17:36:53 +0000 (09:36 -0800)]
e1000: remove no longer used code for pci read/write cfg

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgb endianness annotations
Al Viro [Mon, 10 Dec 2007 19:00:38 +0000 (19:00 +0000)]
ixgb endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoixgbe endianness annotations
Al Viro [Mon, 10 Dec 2007 18:54:12 +0000 (18:54 +0000)]
ixgbe endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe100 endianness annotations
Al Viro [Mon, 10 Dec 2007 18:32:49 +0000 (18:32 +0000)]
e100 endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoforcedeth endianness bugs
Al Viro [Sun, 9 Dec 2007 16:06:41 +0000 (16:06 +0000)]
forcedeth endianness bugs

* misannotation: struct register_test members are actually host-endian
* bug: cpu_to_le64(n) >> 32 instead of cpu_to_le32(n >> 32) in setting
->bufhigh and similar for ->buflow (take low bits, _then_ convert to
little-endian, not the other way round).
* bug: setup_hw_rings() should not convert to little-endian at all (we
feed the result to writel(), not store in shared data structure), let
alone try to play with shifting and masking little-endian values.  Introduced
when setup_hw_rings() went in, screwed both 64bit case and the old code for
32bit rings it had replaced.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoNULL noise in drivers/net
Al Viro [Thu, 24 Jan 2008 10:06:46 +0000 (02:06 -0800)]
NULL noise in drivers/net

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoe1000 endianness annotations
Al Viro [Tue, 11 Dec 2007 19:49:39 +0000 (19:49 +0000)]
e1000 endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe1000e endianness annotations
Al Viro [Tue, 11 Dec 2007 19:50:34 +0000 (19:50 +0000)]
e1000e endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosungem endianness annotations\e
Al Viro [Mon, 17 Dec 2007 06:48:04 +0000 (06:48 +0000)]
sungem endianness annotations\e

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosunhme endianness annotations
Al Viro [Sun, 16 Dec 2007 23:30:08 +0000 (23:30 +0000)]
sunhme endianness annotations

This one is interesting - SBUS and PCI variants have
opposite endianness in descriptors (SBUS is sparc-only, so there
host-endian == big-endian).

Solution: declare a bitwise type (hme32) and in accessor
helpers do typechecking and force-casts (once we know that the
type is right).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoendianness annotations and fixes for olympic
Al Viro [Sun, 16 Dec 2007 20:53:36 +0000 (20:53 +0000)]
endianness annotations and fixes for olympic

* missing braces in !readl(...) & ...
* trivial endianness annotations
* in olympic_arb_cmd() the loop collecting fragments of
packet is b0rken on big-endian - we have
(next_ptr && (buf_ptr=olympic_priv->olympic_lap + ntohs(next_ptr)))
as condition and it should have swab16(), not ntohs() - it's host-endian
byteswapped, not big-endian.  So if we get more than one fragment on big-endian
host, we get screwed.
This ntohs() got missed back when the rest of those had been switched
to swab16() in 2.4.0-test2-pre1 - at a guess, nobody had hit fragmented
packets during the testing of PPC fixes.

PS: Ken Aaker cc'd on assumption that he is the same guy who'd done the
original set of PPC fixes in olympic

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibertas: use spin_is_locked() instead of spin_trylock() in lbs_interrupt()
David Woodhouse [Thu, 13 Dec 2007 06:53:57 +0000 (01:53 -0500)]
libertas: use spin_is_locked() instead of spin_trylock() in lbs_interrupt()

We get scary warnings on UP if we use spin_trylock() and find, as we
hoped, that the lock in question is already locked.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: pass channel argument directly to lbs_mesh_config()
David Woodhouse [Thu, 13 Dec 2007 05:32:36 +0000 (00:32 -0500)]
libertas: pass channel argument directly to lbs_mesh_config()

There is weirdness here; the firmware seems to refuse to change channels
at will.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: cope with both old and new mesh TLV values
David Woodhouse [Thu, 13 Dec 2007 04:29:13 +0000 (23:29 -0500)]
libertas: cope with both old and new mesh TLV values

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: make lbs_update_channel() function non-static
David Woodhouse [Thu, 13 Dec 2007 03:50:21 +0000 (22:50 -0500)]
libertas: make lbs_update_channel() function non-static

We'll want to use this for meshfrobbing

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add ethtool support for wake-on-lan configuration
David Woodhouse [Thu, 13 Dec 2007 01:06:06 +0000 (20:06 -0500)]
libertas: add ethtool support for wake-on-lan configuration

Also, check that suspend is refused if HOST_SLEEP_CFG hasn't been done.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: implement suspend/resume for USB devices
David Woodhouse [Wed, 12 Dec 2007 22:40:56 +0000 (17:40 -0500)]
libertas: implement suspend/resume for USB devices

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: implement suspend and resume core methods
David Woodhouse [Wed, 12 Dec 2007 22:38:56 +0000 (17:38 -0500)]
libertas: implement suspend and resume core methods

We (ab)use priv->fw_ready to stop the worker thread from sending more
commands or data after the response to the HOST_SLEEP_ACTIVATE command
comes in. And we set it from the callback function _directly_ to ensure
that the worker thread sees it immediately; if we did it in
lbs_suspend() after waking up, that might be too late.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: make worker thread not freezable
David Woodhouse [Wed, 12 Dec 2007 21:04:12 +0000 (16:04 -0500)]
libertas: make worker thread not freezable

We want it to send the HOST_SLEEP_ACTIVATE command on the way down...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: switch lbs_cmd() to take a _pointer_ to the command structure
David Woodhouse [Wed, 12 Dec 2007 21:00:42 +0000 (16:00 -0500)]
libertas: switch lbs_cmd() to take a _pointer_ to the command structure

This way, it looks more like a normal function.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add lbs_host_sleep_cfg() command function
David Woodhouse [Wed, 12 Dec 2007 20:19:29 +0000 (15:19 -0500)]
libertas: add lbs_host_sleep_cfg() command function

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: slight cleanup of netif queue stop/wake
David Woodhouse [Wed, 12 Dec 2007 05:41:51 +0000 (00:41 -0500)]
libertas: slight cleanup of netif queue stop/wake

In particular, we shouldn't be waking the queues in lbs_host_to_card_done()
any more.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add missing newlines in debugging statements
David Woodhouse [Wed, 12 Dec 2007 05:14:21 +0000 (00:14 -0500)]
libertas: add missing newlines in debugging statements

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: be more careful about command responses matching cur_cmd
David Woodhouse [Wed, 12 Dec 2007 04:42:49 +0000 (23:42 -0500)]
libertas: be more careful about command responses matching cur_cmd

Especially in the light of OLPC trac #5461, in which the firmware starts
sending us seemingly random command responses which bear little relation
to the command we sent it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add debugging output to lbs_mesh_config()
David Woodhouse [Wed, 12 Dec 2007 03:52:03 +0000 (22:52 -0500)]
libertas: add debugging output to lbs_mesh_config()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: disable mesh temporarily while setting eth channel/assoc
David Woodhouse [Wed, 12 Dec 2007 01:03:01 +0000 (20:03 -0500)]
libertas: disable mesh temporarily while setting eth channel/assoc

Otherwise the device won't let us change channels.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add missing newline on debug message
David Woodhouse [Wed, 12 Dec 2007 00:57:05 +0000 (19:57 -0500)]
libertas: add missing newline on debug message

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: allow setting channel on mshX device
David Woodhouse [Wed, 12 Dec 2007 00:56:28 +0000 (19:56 -0500)]
libertas: allow setting channel on mshX device

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>