Commit graph

29917 commits

Author SHA1 Message Date
Vladimir Davydov ac630c2b19 [LIBERTAS]: fix oops on the blackfin architecture
Fixing memory alignment problems on the blackfin architecture (maybe on the
ARM also)

Signed-off-by: Vladimir Davydov <vladimir.davydov@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:28 -07:00
Vladimir Davydov f31ce76b78 [LIBERTAS]: fix oops on the blackfin architecture
Reserve two bytes to align pointer to the IP header.

Signed-off-by: Vladimir Davydov <vladimir.davydov@promwad.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:27 -07:00
Ryan Mallon 28de0b36be [LIBERTAS]: fix interrupts in CF driver
The following patch fixes the tx transmit timeout problem, which is
caused by the interrupts being incorrectly check and masked. The patch
moves the interrupt masking code so that interrupts are enabled only
when the driver is registered and only disabled when the driver is
unregistered.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:27 -07:00
Ryan Mallon 6f05cbe588 [LIBERTAS]: set dnld_sent correctly for CF parts
Corrects a minor bug with priv->dnld_sent being set incorrectly in
if_cs_host_to_card.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:26 -07:00
Larry Finger 1065de1562 [B43LEGACY]: Change the hardware radio enable logic and cleanup code
This change cleans up the radio-related messages in several ways.

(1) The state of the rfkill switch is assumed to be on, rather than
    tested. Now, any user without such a switch will not see any
    messages. For devices with such a switch, a message will be
    logged only if the initial state is off, or if the switch is toggled.
(2) The routine for testing the switch state is no longer inline.
(3) The LED handling routine is simplified.
(4) The "Radio turned off" message that has confused some users has been
    changed to "Radio initialized".

This patch is patterned after a similar change to b43 by Michael Buesch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:25 -07:00
Larry Finger 42a9174f54 [B43LEGACY]: Support for turning the radio off from software.
This adds support for turning the radio off in software.
That's useful in environments, where you don't want the RF
to radiate any signals, but don't want to bring the interface down.

This patch is based on a similar patch of b43 by Michael Buesch.

Signed-off-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:25 -07:00
Michael Buesch fda9abcf1a [B43]: Support for turning the radio off from software.
This adds support for turning the radio off in software.
That's useful in environments, where you don't want the RF
to radiate any signals, but don't want to bring the interface down.

Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:24 -07:00
Michael Buesch 6a724d68a3 [B43]: Remove the "radio hw enabled" message on startup.
This message is useless. Only report state changes.

Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:24 -07:00
Michael Buesch 05155c83d1 [B43]: Change loglevel of radio-enable message.
Also cleanup the code a bit and remove the inline.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:21 -07:00
Michael Buesch 6b9bafec66 [SSB]: Sparse fixes.
This fixes all Sparse warnings in SSB.
No semantics change.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:21 -07:00
Michael Buesch 4b402c65a3 [SSB]: Use ioreadX() and iowriteX() for PCI.
On a PCI bus use ioreadX() and iowriteX().
We map the I/O space with pci_iomap(), so we must use the correct
accessor functions, too.
readX() and writeX() are not guaranteed to accept the cookie returned
from pci_iomap() (though, it currently works on most architectures).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:20 -07:00
Michael Buesch b85b3b7af5 [B43]: Don't lock irq_lock in debugfs txpower adjust
It's not required and the txpower adjustment must not be in atomic.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:20 -07:00
Andrew Morton 90f4dd0f4b [P54PCI]: terminate pci table
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:19 -07:00
Ulrich Kunitz ababda03e1 [ZD1211RD]: add USB id for Telegent TG54USB WLAN adapter
Reinhard Speyerer reported at 2007-08-10 a new device.

Here are the information strings.

Product: Telegent TG54USB WLAN Adapter
USB ID: 129b:1666
Chip ID: zd1211 chip 129b:1666 v4330 high 00-01-36 RF2959_RF pa0 -----
FCC ID: N89-UW620Z

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:18 -07:00
Larry Finger 01449c5a46 [BCM43XX]: Change radio hardware switch status printk from debug to regular
Some distros ship bcm43xx with debugging printout disabled. For those
BCM43xx devices with radio on/off switches, this makes it impossible
to know if the radio is on or off. This patch changes a pair of debug
printk's into ordinary printk's. It also changes the message that
prints when the radio is initialized to the off state as the old message
seems to confuse users.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:18 -07:00
Jesper Juhl fa46081c50 [ZD1211RW]: Don't needlessly initialize variable to NULL in zd_chip
No need to initialize to NULL when variable is never used before
it's assigned the return value of a kmalloc() call.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:17 -07:00
Zhu Yi 1156b2c689 [IWLWIFI]: remove per-file CFLAGS for IWL define
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:16 -07:00
Daniel Lezcano 854d8363f3 [NET]: Dynamically allocate the loopback device, part 2.
Doing this makes loopback.c a better example of how to do a
simple network device, and it removes the special case
single static allocation of a struct net_device, hopefully
making maintenance easier.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-By: Kirill Korotaev <dev@sw.ru>
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
2007-10-10 16:52:15 -07:00
Daniel Lezcano de3cb747ff [NET]: Dynamically allocate the loopback device, part 1.
This patch replaces all occurences to the static variable
loopback_dev to a pointer loopback_dev. That provides the
mindless, trivial, uninteressting change part for the dynamic
allocation for the loopback.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-By: Kirill Korotaev <dev@sw.ru>
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:14 -07:00
Michael Buesch 1a09404a23 [B43]: Fix sparse warnings.
The remaining warning in phy.c will be fixed later.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:52:07 -07:00
Al Viro fb8e4444cc cxgb3: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:06 -07:00
Al Viro bd7eb1c549 3c509: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:06 -07:00
Al Viro 16989ba6e9 drivers/net/appletalk: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:05 -07:00
Al Viro 2929e7700f tms380tr: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:05 -07:00
Al Viro b963dc1df7 pppoe: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:04 -07:00
Al Viro 53c03f5c9e via-rhine: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:04 -07:00
Al Viro b1eab70130 r8169: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:03 -07:00
Al Viro 88b1943bd3 starfire: trivial endianness annotations
Note: we still have several fishy areas - mcast filter
and vlan handling.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:02 -07:00
Al Viro 37e1370b70 drivers/net/irda: endianness, NULL noise
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:02 -07:00
Al Viro c676504ef5 ixgb: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:01 -07:00
Al Viro 3e33545ba6 pcnet32: endianness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:01 -07:00
Al Viro 03a710ffcb typhoon: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:00 -07:00
Al Viro c559a5bc94 tulip: endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:52:00 -07:00
Al Viro 701181ac1d arcnet endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:59 -07:00
Al Viro 05d2fec9f5 amd8111e big-endian fix
amd8111e_calc_coalesce() ends up with insane values of tx_data_rate since
->tx_bytes increments missing conversion from little- to host-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:58 -07:00
Al Viro ee41a82fa3 amd8111e: trivial endianness annotations, NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:58 -07:00
Al Viro cc2d6596ca 3c59x: trivial endianness annotations, NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:57 -07:00
Al Viro cf9830195a fix vlan in 8139cp on big-endian
Layout of opts2 is
: MSB(vlan_tag) : LSB(vlan_tag) : flags : 0 :
regardless of the host endianness.  On little-endian
the current code ends up with the right values, but
on big-endian it blows.  In r8169.c the same bug
had been fixed in commit d35da12a40426184b1d0844104b1d464753eba19
(r8169: endianness fixes).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:57 -07:00
Al Viro d3bb52b094 endianness annotations drivers/net/bonding/
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:56 -07:00
Vitaly Bordug 9b8ee8e7d6 FS_ENET: Add polling support
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:55 -07:00
Vitaly Bordug aa90f50321 FS_ENET: TX stuff should use fep->tx_lock, instead of fep->lock.
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:54 -07:00
Maciej W. Rozycki 1a9e8549ef NET_SB1250_MAC: Rename to SB1250_MAC
Rename NET_SB1250_MAC to SB1250_MAC to follow the convention.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:54 -07:00
Maciej W. Rozycki 25a72dfe04 NET_SB1250_MAC: Update Kconfig entry
The SB1250 network interfaces are Gigabit Ethernet ones.  Move the
Kconfig entry to the appropriate section and add some help text.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:53 -07:00
Dhananjay Phadke 200eef20db netxen: ethtool fixes
Resubmitting the patch.

This patch improves ethtool support for printing correct ring statistics,
segmentation offload status, etc.

Signed-off by: Dhananjay Phadke <dhananjay@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:52 -07:00
David Gibson 1d3bb99648 Device tree aware EMAC driver
Based on BenH's earlier work, this is a new version of the EMAC driver
for the built-in ethernet found on PowerPC 4xx embedded CPUs.  The
same ASIC is also found in the Axon bridge chip.  This new version is
designed to work in the arch/powerpc tree, using the device tree to
probe the device, rather than the old and ugly arch/ppc OCP layer.

This driver is designed to sit alongside the old driver (that lies in
drivers/net/ibm_emac and this one in drivers/net/ibm_newemac).  The
old driver is left in place to support arch/ppc until arch/ppc itself
reaches its final demise (not too long now, with luck).

This driver still has a number of things that could do with cleaning
up, but I think they can be fixed up after merging.  Specifically:
	- Should be adjusted to properly use the dma mapping API.
Axon needs this.
	- Probe logic needs reworking, in conjuction with the general
probing code for of_platform devices.  The dependencies here between
EMAC, MAL, ZMII etc. make this complicated.  At present, it usually
works, because we initialize and register the sub-drivers before the
EMAC driver itself, and (being in driver code) runs after the devices
themselves have been instantiated from the device tree.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:52 -07:00
Al Viro 03233b90b0 8139cp: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:51 -07:00
Bryan Wu eeb70af91d Blackfin EMAC driver: add a select for the PHYLIB of this driver
Since we are adding requirement for the PHYLIB for this driver, there should be a select for that

Cc: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:51 -07:00
Bryan Wu 4ae5a3ad5a Blackfin EMAC driver: Add phy abstraction layer supporting in bfin_emac driver
- add MDIO functions and register mdio bus
 - add phy abstraction layer (PAL) functions and use PAL API
 - test on STAMP537 board

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:50 -07:00
Bryan Wu 496a34c224 Blackfin EMAC driver: add power management interface and change the bf537mac_reset to bf537mac_disable
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:49 -07:00
Alex Landau 73f8318286 Blackfin EMAC driver: add function to change the MAC address
Alex Landau writes in the forums:
 Previously, changing the MAC address (e.g. via ifconfig) resulted
 in a generic function to be called that only changed a variable in
 memory. This patch also updated the Blackfin MAC address registers
 to filter the correct new MAC.

Signed-off-by: Alex Landau <lirsb@yahoo.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:48 -07:00
Sivakumar Subramani 1a7eb72b68 S2io: Updating transceiver information in ethtool function
- Update transceiver information in ethtool function

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:48 -07:00
Sivakumar Subramani 2fd3768845 S2io: Added support set_mac_address driver entry point
- Added set_mac_address driver entry point
- Copying permanent mac address to dev->perm_addr
- Incorporated following review comments from Jeff
     - Converted the macro to a function and removed call to memset
     - regarding function naming convention, for all callbacks and entry points
       will have 's2io_' prefix and helper functions will have 'do_s2io_' prefix.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:47 -07:00
Sivakumar Subramani 8a4bdbaa93 S2io: Removed unused feature - bimodal interrupts
Removed bimodal interrupt support - unused feature

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

[also, trim trailing whitespace]
2007-10-10 16:51:47 -07:00
Sivakumar Subramani bd684e43d6 S2io: Change kmalloc+memset to k[zc]alloc
- Changed kmalloc+memset to k[zc]alloc as per Mariusz's patch
  <m.kozlowski@tuxland.pl>

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:46 -07:00
Jeff Garzik b9f2c0440d [netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_count
These have been superceded by the new ->get_sset_count() hook.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:45 -07:00
Michael Buesch 753f492093 [B44]: port to native ssb support
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:51:43 -07:00
Michael Wu eff1a59c48 [P54]: add mac80211-based driver for prism54 softmac hardware
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:42 -07:00
Joe Perches 0795af5729 [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:42 -07:00
Ivo van Doorn 95ea36275f [RT2x00]: add driver for Ralink wireless hardware
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:39 -07:00
Zhu Yi b481de9ca0 [IWLWIFI]: add iwlwifi wireless drivers
This patch adds the mac80211 based wireless drivers for the Intel
PRO/Wireless 3945ABG/BG Network Connection and Intel Wireless WiFi
Link AGN (4965) adapters.

[ Move driver into it's own directory -DaveM ]

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:39 -07:00
Larry Finger 75388acd0c [B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:38 -07:00
Michael Buesch e4d6b79518 [B43]: add mac80211-based driver for modern BCM43xx devices
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:37 -07:00
Michael Buesch 61e115a56d [SSB]: add Sonics Silicon Backplane bus support
SSB is an SoC bus used in a number of embedded devices.  The most
well-known of these devices is probably the Linksys WRT54G, but there
are others as well.  The bus is also used internally on the BCM43xx
and BCM44xx devices from Broadcom.

This patch also includes support for SSB ID tables in modules, so
that SSB drivers can be loaded automatically.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:36 -07:00
Andy Gospodarek 1a348ccc10 [NET]: Add Tehuti network driver.
[ Ported to napi_struct changes... -DaveM ]

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:34 -07:00
Francois Romieu 1202d6ff35 [IPG]: add IP1000A driver to kernel tree
Signed-off-by: Jesse Huang <jesse@icplus.com.tw>
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:33 -07:00
Ed Swierk 4885a50476 [TAP]: Configurable interface MTU.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:19 -07:00
Jeff Garzik 88d3aafdae [ETHTOOL] Provide default behaviors for a few ethtool sub-ioctls
For the operations
	get-tx-csum
	get-sg
	get-tso
	get-ufo
the default ethtool_op_xxx behavior is fine for all drivers, so we
permit op==NULL to imply the default behavior.

This provides a more uniform behavior across all drivers, eliminating
ethtool(8) "ioctl not supported" errors on older drivers that had
not been updated for the latest sub-ioctls.

The ethtool_op_xxx() functions are left exported, in case anyone
wishes to call them directly from a driver-private implementation --
a not-uncommon case.  Should an ethtool_op_xxx() helper remain unused
for a while, except by net/core/ethtool.c, we can un-export it at a
later date.

[ Resolved conflicts with set/get value ethtool patch... -DaveM ]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:17 -07:00
Jeff Garzik 09f75cd7bf [NET] drivers/net: statistics cleanup #1 -- save memory and shrink code
We now have struct net_device_stats embedded in struct net_device,
and the default ->get_stats() hook does the obvious thing for us.

Run through drivers/net/* and remove the driver-local storage of
statistics, and driver-local ->get_stats() hook where applicable.

This was just the low-hanging fruit in drivers/net; plenty more drivers
remain to be updated.

[ Resolved conflicts with napi_struct changes and fix sunqe build
  regression... -DaveM ]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:16 -07:00
Denis Cheng ff8ac60948 drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:15 -07:00
Ralf Baechle 10d024c1b2 [NET]: Nuke SET_MODULE_OWNER macro.
It's been a useless no-op for long enough in 2.6 so I figured it's time to
remove it.  The number of people that could object because they're
maintaining unified 2.4 and 2.6 drivers is probably rather small.

[ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:13 -07:00
Sivakumar Subramani 596c5c9743 S2io: code Optimization of isr function
- Code Optimization of s2io_isr function.
- Isr check using per device napi variable instead of driver global.
- Reduced from 3 to 1 if condition before check for processing packet receive
  packets.
- Implemented Jeff's comment to use synchronize_irq. Removed the isr_cnt
  variable as it became redundant.
- One time de assert the interrupts by writing all F's to the general_int_mask
  register instead of de asserting by clearing the source of interrupts with
  multiple writes which causes loss of interrupts (race conditions). It is
  entirely possible that before the driver has a chance to mask the asserted
  alarm bit, another alarm/traffic interrupt bit gets asserted as well. In
  this case Herc will keep the INTA line asserted and the bridge will not
  send a new Assert_INTA message upstream.

[ Resolved conflicts due to napi_struct changes... -DaveM ]

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@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>
2007-10-10 16:51:10 -07:00
Sivakumar Subramani 92b84437a6 S2io: Check for device state before handling traffic
- Added check to return from the traffic handling function, if the card status
  is DOWN.
- Implemented Jeff's comments on incorrect return value in s2io_poll function.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:10 -07:00
Sivakumar Subramani eaae7f7230 S2io: Cleanup - removed unused variable intr_type
- Removed the unused variable, intr_type, in device private structure.

[ Resolve conflicts with napi_struct changes... -DaveM ]

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@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>
2007-10-10 16:51:09 -07:00
Sivakumar Subramani 8116f3cf4a [S2IO]: Handle and monitor all of the device errors and alarms
- Added support to poll entire set of device errors and alarams.
- A note on how device errors and alarms are handled:
- The adapter will automatically recover from uncorrectable ECC errors.
  Packets containing corrupted data will be dropped (not transmitted) or tagged
  as invalid before being passed to the host.
- The adapter cannot recover from any internal state machine errors. A state
  machine error requires a device reset.
- Any internal error that could potentially result in .store trampling.
  (undesirable PCI behaviour)is tagged as a "serious error". In such cases
  the adapter will give up its ability to be a bus master. In this situation
  the host will still be able to read internal device registers in order to
  generate an error report. A device reset is necessary to return to normal
  operation.
- In the event of a pcix data parity error, the adapter will automatically
  disable itself. Adapter_En will automatically transition from '1' to '0' and
  the adapter will enter its clean-up routine. Once the device has achieved
  quiescence, an adapter reset should be performed.
- Replaced alarm_intr_handler() with s2io_handle_errors().
- Added statistic counters to monitor the alarms.

[ Fix warnings wrt. do_s2io_chk_alarm_bit(), Callers pass in an
  "unsigned long long *" but the function takes a "u64 *" which is
  different on many 64-bit platforms. -DaveM ]

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:09 -07:00
Sivakumar Subramani 9caab4587b S2io: Enable all the error and alarm indications
- Added support to unmask entire set of device errors and alarams.
        Alarm interrupts are generated for a myriad of purposes, ranging from
  illegal operations or requests to internal state machine errors and
  uncorrectable data corruption errors. In several cases the adapter can
  recover gracefully from unexpected events; however, in some cases, a device
  reset may be necessary. This patch handles alarms generated by all the
  blocks within the device.

  The adapter generates the following types of alarms:
        1. Link state transitions (local/remote fault) or other link-related
           problems.
        2. Problems with any device peripherals, including the EEPROM, FLASH,
           etc.
        3. Correctable ECC errors (single-bit errors) on internal data
           structures or frame data.
        4. Uncorrectable ECC errors (multi-bit errors) on internal data
           structures or frame data.
        5. State machine errors, which indicate that internal control
           structures have become corrupted.
        6. PCI related errors, including parity errors or illegal transactions.
        7. Other unexpected events.

- Implemented Jeff's review comments to use do_s2io_write_bits function to avoid
  duplicate codes.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:08 -07:00
Thomas Bogendoerfer ed9f0e0bf3 remove setup of platform device from jazzsonic.c
remove setup platform device from jazzsonic, which is done in arch code now

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:07 -07:00
Ralf Baechle 99cd149efe sgiseeq: replace use of dma_cache_wback_inv
The sgiseeq driver is one of the few remaining users of the ancient
cache banging DMA API.  Replaced with the modern days DMA API.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:07 -07:00
Divy Le Ray dc67369573 cxgb3 - Update engine microcode version
The new microcode engine version is set to 1.1.0

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:06 -07:00
Divy Le Ray 1aafee2657 cxgb3 - Add T3C rev
add driver recognition for T3C rev board.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:06 -07:00
Divy Le Ray bb9366af7b cxgb3 - CQ context operations time out too soon.
Currently, the driver only tries up to 5 times (5us) to get the results
of a CQ context operation.  Testing has shown the chip can take as much
as 50us to return the response on SG_CONTEXT_CMD operations.  So we up
the retry count to 100 to cover high loads.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:05 -07:00
Divy Le Ray 1c17ae8af9 cxgb3 - Set the CQ_ERR bit in CQ contexts.
The cxgb3 driver is incorrectly configuring the HW CQ context for CQ's
that use overflow-avoidance.  Namely the RDMA control CQ.  This results
in a bad DMA from the device to bus address 0.  The solution is to set
the CQ_ERR bit in the context for these types of CQs.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:05 -07:00
Divy Le Ray b4687ff753 cxgb3 - remove false positive in xgmac workaround
Qualify toggling of xgmac tx enable with not getting pause frames,
we might not make forward progress because the peer is sending
lots of pause frames.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:04 -07:00
Divy Le Ray 3eea3337a0 cxgb3 - log and clear PEX errors
Clear pciE PEX errors late at module load time.
Log details when PEX errors occur.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:03 -07:00
Divy Le Ray a5a3b4601b cxgb3 - Firmware update
Update firmware version.
Allow the driver to be up and running with older FW image

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:03 -07:00
Stephen Hemminger 34c6417b70 e100: timer power saving
Since E100 timer is 2HZ, use rounding to make timer occur on the
correct boundary.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:02 -07:00
Auke Kok 9a799d7103 ixgbe: driver for Intel(R) 82598 PCI-Express 10GbE adapters (v4)
This patch adds support for the Intel 82598 PCI-Express 10GbE
chipset. Devices will be available on the market soon.

This version of the driver is largely the same as the last release:

  * Driver uses a single RX and single TX queue, each using 1 MSI-X
  irq vector.
  * Driver runs in NAPI mode only
  * Driver is largely multiqueue-ready (TM)

Changes since 20070803:
  * removed wrappers for hardware functions
  * incorporated e1000e-style HW api reorganization code
  * sparse/checkpatch cleanups, namespace cleanups
  * driver prints out extra debugging information at load time
    identifying adapter board number, mac, phy types
  * removed ixgbe_api.c, ixgbe_api.h, ixgbe_osdep.h
  * driver update to 1.1.18
  * removed ixgbe.txt which contained no useful info anymore

[ Integrated napi_struct changes from Auke as well... -DaveM ]

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Ayyappan Veeraiyan <ayyappan.veeraiyan@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:02 -07:00
Masakazu Mokuno dc029ad97f PS3: Remove the workaround no longer needed
Removed the workaround that was needed for PS3 firmware versions
prior to the first release.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:01 -07:00
Masakazu Mokuno 173261ed37 PS3: changed the way to handle tx skbs
The PS3 virtual network device requires a vlan tag in the sending packet
to select the destination device, ethernet port or wireless.
As the vlan tag field is in the middle of the passed data,
we should insert it into the packet data.
To avoid copying much of the packet data, the driver used two tx descriptors
for one tx skb; one descriptor was for sending a small static
buffer which contained vlan tag and copied header (two mac addresses),
one was for the residual data after the vlan field.

This patch changes the way to insert the vlan tag.  By changing
netdev->hard_header_len, we can make the headroom for moving mac address
fields in the skb buffer. Then we can send one tx skb with
one tx descriptor.  This also gives us a tx throughut gain of approx.
20% according to netperf results.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:51:00 -07:00
Olof Johansson 829185e97f pasemi_mac: Clean TX ring in poll
Unfortunately there's no timeout for how long a packet can sit on
the TX ring after completion before an interrupt is generated, and
we want to have a threshold that's larger than one packet per interrupt.

So we have to have a timer that occasionally cleans the TX ring even
though there hasn't been an interrupt. Instead of setting up a dedicated
timer for this, just clean it in the NAPI poll routine instead.

[ Resolved conflicts with napi_struct changes... -DaveM ]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:00 -07:00
Olof Johansson 6fba848a9a pasemi_mac: Enable LLTX
Enable LLTX on pasemi_mac: we're already doing sufficient locking
in the driver to enable it.

[ Resolved merge conflicts with napi_struct changes... -DaveM ]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:59 -07:00
Olof Johansson 38bf3184e8 pasemi_mac: Fix RX checksum flags
RX side flag to use is CHECKSUM_UNNECESSARY, not CHECKSUM_COMPLETE.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:59 -07:00
Olof Johansson 021fa22e01 pasemi_mac: Fix TX ring wrap checking
The old logic didn't detect full (tx) ring cases properly, causing
overruns and general badness. Clean it up a bit and abstract out the
ring size checks, always making sure to leave 1 slot open.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:58 -07:00
Olof Johansson 02df6cfa09 pasemi_mac: Batch up TX buffer frees
Postpone pci unmap and skb free of the transmitted buffers to outside of
the tx ring lock, batching them up 32 at a time.

Also increase the count threshold to 128.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:58 -07:00
Olof Johansson 26fcfa95ae pasemi_mac: RX performance tweaks
Various RX performance tweaks, do some explicit prefetching of packet
data, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:57 -07:00
Olof Johansson 73344863e4 pasemi_mac: Fix memcpy amount for short receives
Fix up memcpy for short receives.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:56 -07:00
Olof Johansson c0efd52b8b pasemi_mac: Enable L2 caching of packet headers
Enable settings to target l2 for the first few cachelines of the packet, since
we'll access them to get to the various headers.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:56 -07:00
Olof Johansson b6e05a1b67 pasemi_mac: Stop using the pci config space accessors for register read/writes
Move away from using the pci config access functions for simple register
access.  Our device has all of the registers in the config space (hey,
from the hardware point of view it looks reasonable :-), so we need to
somehow get to it. Newer firmwares have it in the device tree such that
we can just get it and ioremap it there (in case it ever moves in future
products). For now, provide a hardcoded fallback for older firmwares.

[ Resolved napi_struct conflicts... -DaveM ]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:55 -07:00
Olof Johansson a85b94222d pasemi_mac: Abstract out register access
Abstract out the PCI config read/write accesses into reg read/write ones,
still calling the pci accessors on the back end.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:55 -07:00
Olaf Hering ced13330bb bmac: add simple ethtool support for network manager
NetworkManager will not start dhcpd on an interface unless it reports
link-up state via ethtool.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:54 -07:00
Stephen Hemminger 167f53d05f sky2: use pci_config access functions
Use the PCI layer config access functions. The driver was using the
memory mapped window in device, to workaround issues accessing the
advanced error reporting registers.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:54 -07:00
Stephen Hemminger 555382cbfc sky2: advanced error reporting
Use the kernel interfaces for advanced error reporting.
This should be cleaner and clear up errors on boot.

For those systems with busted BIOS's that don't correctly
support mmconfig, advanced error reporting will be disabled.
The PCI registers for advanced error reporting start at 0x100 which
is too large to be accessed by legacy functions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:53 -07:00
Stephen Hemminger 8c4c00f371 sky2: dont restrict config space access
Take out the code that protects driver from accessing the
PCI config space.
We are old enough to run with scissors now.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:52 -07:00
Stephen Hemminger efcf6e2feb sky2: document GPHY_CTRL bits
Add documentation of GPHY_CTRL register bits even if driver
is not using them (yet).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:52 -07:00
Stephen Hemminger 5b296bc9e1 sky2: use debugfs rename
Use debugfs rename to handle device neame changes.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:51 -07:00
Divy Le Ray 3f61e4278c cxgb3 - Update internal memory management
Set PM1 internal memory to round robin mode
It balances access to this internal memory for multiport adapters.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:51 -07:00
Divy Le Ray 167cdf5fbc cxgb3 - log adapter serial number
Log HW serial number when cxgb3 module is loaded.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:50 -07:00
Divy Le Ray c64c2eaeaa cxgb3 - Fatal error update
Stop the MAC when a fatal error is detected.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:50 -07:00
Divy Le Ray c9a6ce500d cxgb3 - tighten checks on TID values
Enforce validity checks on connection ids

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:49 -07:00
Divy Le Ray e22bb45d77 cxgb3 - Expose HW memory page info
A HW issue requires limiting the receive window size
to 23 pages of internal memory.
These pages can be configured to different sizes,
thus the RDMA driver needs to know the
page size to enforce the upper limit.

Also assign explicit enum values.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:49 -07:00
Divy Le Ray 27186dc325 cxgb3 - use immediate data for offload Tx
Send small TX_DATA work requests as immediate data even when
there are fragments. this avoids doing multiple DMAs for
small fragmented packets.
The driver already implements this optimization for small
contiguous packets.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:48 -07:00
Divy Le Ray 6e3f03b72c cxgb3 - SGE doorbell overflow warning
Log doorbell Fifo overflow

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:47 -07:00
Divy Le Ray 52b810d305 cxgb3 - Update rx coalescing length
Reduce Rx coalescing length to 12288
Large bursts from the adapter to the host create back pressure
on the chip. Reducing the burst size avoids the issue.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:47 -07:00
Mark Hindley c8303d10da 3c59x: check return of pci_enable_device()
Check return of pci_enable_device in vortex_up().

Also modify vortex_up to return error to callers. Handle failure of
vortex_up in vortex_open and vortex_resume.

Signed-off-by: Mark Hindley <mark@hindley.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:46 -07:00
Brian King 79ef4a4dd4 ibmveth: Remove use of bitfields
Removes the use of bitfields from the ibmveth driver. This results
in slightly smaller object code.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:46 -07:00
Brian King 3449a2ab31 ibmveth: Remove dead frag processing code
Removes dead frag processing code from ibmveth. Since NETIF_F_SG was
not set, this code was never executed. Also, since the ibmveth
interface can only handle 6 fragments, core networking code would need
to be modified in order to efficiently enable this support.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:45 -07:00
Brian King ddbb4de967 ibmveth: Add ethtool driver stats hooks
Add ethtool hooks to ibmveth to retrieve driver statistics.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:44 -07:00
Brian King 80e536770c ibmveth: Add ethtool TSO handlers
Add handlers for get_tso and get_ufo to prevent errors being printed
by ethtool.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:44 -07:00
Brian King 5fc7e01cb7 ibmveth: Implement ethtool hooks to enable/disable checksum offload
This patch adds the appropriate ethtool hooks to allow for enabling/disabling
of hypervisor assisted checksum offload for TCP.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:43 -07:00
Brian King f4ff28720f ibmveth: Enable TCP checksum offload
This patchset enables TCP checksum offload support for IPV4
on ibmveth. This completely eliminates the generation and checking of
the checksum for packets that are completely virtual and never
touch a physical network. A simple TCP_STREAM netperf run on
a virtual network with maximum mtu set yielded a ~30% increase
in throughput. This feature is enabled by default on systems that
support it, but can be disabled with a module option.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:43 -07:00
Komuro df950828b0 dl2k: add Sundance/Tamarack TC902x Gigabit Ethernet Adapter support
Actually, D-Link modified the VendorID/ProductID of the TC902x.
The TC902x is the original chipset.

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:42 -07:00
Rafael J. Wysocki b6aec32a77 uli526x: Add suspend and resume routines (updated)
Add suspend/resume support to the uli526x network driver (tested on x86_64,
with 'Ethernet controller: ALi Corporation M5263 Ethernet Controller, rev 40').

This patch is based on the suspend/resume code in the tg3 driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:41 -07:00
Don Fry 917270c6ed pcnet32: add suspend and resume capability
Add suspend and resume capability to the driver.
Tested both to ram and to disk on x86_64 platform.

Signed-off-by:  Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:41 -07:00
Oliver Neukum a11a6544c0 support for USB autosuspend in the asix driver
this implements support for USB autosuspend in the asix USB ethernet
driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:40 -07:00
Auke Kok bc7f75fa97 [E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)
This driver implements support for the ICH9 on-board LAN ethernet
device. The device is similar to ICH8.

The driver encompasses code to support 82571/2/3, es2lan and ICH8
devices as well, but those device IDs are disabled and will be
"lifted" from the e1000 driver over one at a time once this driver
receives some more live time.

Changes to the last snapshot posted are exclusively in the internal
hardware API organization. Many thanks to Jeff Garzik for jumping in
and getting this organized with a keen eye on the future layout.

[ Integrated napi_struct patch from Auke as well... -DaveM ]

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:40 -07:00
John W. Linville cbdb9e43d1 [PATCH] libertas: remove unused adhoc_rates_b definition
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:39 -07:00
Andrew Morton 4ecd41bd0f [PATCH] libertas: printk warning fixes
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_helper':
drivers/net/wireless/libertas/if_cs.c:462: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_real':
drivers/net/wireless/libertas/if_cs.c:538: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:38 -07:00
Jesper Juhl 655b4d16ac [PATCH] net: Kill some unneeded allocation return value casts in libertas
kmalloc() and friends return void*, no need to cast it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:37 -07:00
Brajesh Dave 4b04f19625 [PATCH] libertas: advertise 11g ad-hoc rates
Advertise support for 802.11g bitrates when starting adhoc
networks, not just 802.11b bitrates.

Signed-off-by: Brajesh Dave <brajeshd@marvell.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:37 -07:00
Marek Vašut 70500f5443 [PATCH] libertas: region code values specified as 8bit
This patch strips away possible mess in regioncode (eg. on my card - 88W8305
chipset - I get 0x3031 instead of expected 0x0031 and as a result the driver
defaults to USA region which is obviously incorrect). Following patch fixes
the issue.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:36 -07:00
Pierre Ossman 794760f750 [PATCH] libertas: properly end commands on hardware failure
Make sure that errors reported by the hardware layer is properly
handled. Otherwise commands tend to get stuck in limbo.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:36 -07:00
Dan Williams b6e99dd6e2 [PATCH] libertas: send reset command directly instead of calling libertas_reset_device
Ensures that any platform specific code that might live in libertas_reset_device
(for example, OLPC tells the EC to do a GPIO-toggled reset of the wireless
from libertas_reset_device) isn't called.  Could be handled better by
interface-specific callbacks and a flag for "other hardware reset".

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:35 -07:00
Dan Williams 64f104e89b [PATCH] libertas: don't stomp on interface-specific private data
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:34 -07:00
Dan Williams 954ee164f4 [PATCH] libertas: reorganize and simplify init sequence
This patch moves all firmware load responsibility into the interface-specific
code and gets rid of the firmware pointer in the generic card structure.  It
also removes 3 fairly unecessary callbacks: hw_register_dev, hw_unregister_dev,
and hw_prog_firmware.  It also makes the init sequence from interface
probe functions more logical, as there are paired add/remove and start/stop
calls into generic libertas code.

Because the USB driver code uses the same TX URB callback for both firmware
upload (where the generic libertas structure isn't initialized yet) and for
normal operation (where it is), some bits of USB code have to deal with
'priv' being NULL.  All USB firmware upload bits have been changed to not
require 'priv' at all, but simply the USB card structure.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:34 -07:00
Dan Williams b1b1907dce [PATCH] libertas: fix inadvertant removal of bits from commit 8314418629
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:33 -07:00
Mariusz Kozlowski 7563a0b4b5 [PATCH] drivers/net/wireless/wl3501_cs.c: remove redundant memset
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:33 -07:00
Daniel Drake 475fed1e22 [PATCH] zd1211rw: Add ID for ZyXEL M-202 XtremeMIMO
Tested by Nathen Meyers
FCC ID: SI5WUB221Z
zd1211b chip 0586:340a v4810 high 00-13-49 AL2230_RF pa0 ----S

Despite the product name, I'm pretty sure this isn't a MIMO device. It
appears just to be a normal ZD1211B and we have never heard of these
devices having more than 1 RF. I guess they named this product this way
to make it appear that it fits in with the rest of their XtremeMIMO
product range.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:32 -07:00
Ulrich Kunitz 64f222cce2 [PATCH] zd1211rw: consistent handling of ZD1211 specific rates
As pointed out by Daniel Drake, the zd1211rw driver used several
different rate values and names throughout the driver. He has
written a patch to change it and tweaked it after some pretty wild
ideas from my side. But the discussion helped me to understand the
problem better and I think I have nailed it down with this patch.

A zd-rate will consist from now on of a four-bit "pure" rate value
and a modulation type flag as used in the ZD1211 control set used
for packet transmission. This is consistent with the usage in the
zd_rates table. If possible these zd-rates should be used in the
code.

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:32 -07:00
Daniel Drake 8e97afe569 [PATCH] zd1211rw: Add ID for Sitecom WL-162
Tested by Giuseppe Lippolis
zd1211b chip 0cde:001a v4810 high 00-60-b3 AL2230_RF pa0 g--NS

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:31 -07:00
Ulrich Kunitz ffe143741f [PATCH] zd1211rw: removed noisy debug messages
While developing the driver we added a lot of debug messages for
setting hardware registers. These messages make the reading of the
log files difficult and are of no use anymore. This patch removes
those messages in zd_chip.c.

Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:30 -07:00
Jeremy Fitzhardinge 5dcddfae63 xen-netfront: remove dead code
This patch removes some residual dead code left over from removing the
"flip" receive mode.  This patch doesn't change the generated output
at all, since gcc already realized it was dead.

This resolves the "regression" reported by Adrian.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:30 -07:00
Richard Knutsson df570f9333 drivers/net/3c505: Convert to generic boolean
Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:29 -07:00
Richard Knutsson 2d6d749d12 drivers/net/tokenring: Convert to generic boolean
Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:29 -07:00
Surya Prabhakar N c821d55c67 drivers/net/tokenring/3c359.c
Hi,
   Replacing kmalloc with kzalloc and cleaning up memset in
drivers/net/tokenring/3c359.c

Signed-off-by: Surya Prabhakar <surya.prabhakar@wipro.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:28 -07:00
Divy Le Ray b1c9e0f780 cxgb3 - MAC workaround update
Update the MAC workaround to deal with switches that do not
honor pause frames.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:28 -07:00
Mariusz Kozlowski acb2cc8b20 [PATCH] drivers/net: remove superfluous memset
This patch covers something like this:

dev = alloc_*dev(...
...
priv = netdev_priv(dev);
memset(priv, 0, sizeof(*priv));

The memset() here is superfluous. alloc_netdev() uses kzalloc()
to allocate needed memory so there is no need to zero the priv region
twice.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:27 -07:00
Jesper Juhl bf1e9a080d Clean up duplicate includes in drivers/net/
This patch cleans up duplicate includes in
	 drivers/net/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:26 -07:00
Jeff Garzik 10096974ad [netdrvr] ns83820: add ethtool media support
Split out from patch authored by Dan Faerch <dan@hacker.dk>.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:26 -07:00
Mariusz Kozlowski 2808d2e83f net/tulip/xircom_cb.c: remove superfulous priv assignment
Unpatched version does sth like this:

dev = alloc_etherdev(...
private = netdev_priv(dev);
...
dev->priv = private;

which doesn't make much sense (does it?) because this is done in
alloc_netdev() already.

struct net_device *alloc_netdev(...
{
...
	if (sizeof_priv)
		dev->priv = netdev_priv(dev);

This patch removes superfluous code.

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

 drivers/net/tulip/xircom_cb.c | 32853 -> 32831 (-22 bytes)
 drivers/net/tulip/xircom_cb.o | 123984 -> 123984 (0 bytes)

 drivers/net/tulip/xircom_cb.c |    1 -
 1 file changed, 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:25 -07:00
Sivakumar Subramani 92c487996d S2IO: Fixed Link LED issue when MSI-X is enabled
-Fixed Link LED issue when MSI-X is enabled.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:25 -07:00
Sivakumar Subramani c77dd43e77 S2IO: Fixes in MSIX related code.
- Calling store_xmsi_data to store the MSI-X datas during initialization
  in s2io-init_nic function
- Disabling NAPI when MSI-X is enabled
- Freeing sp->entries and sp->s2io_entries in s2io_rem_isr

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:24 -07:00
Sivakumar Subramani 8abc4d5b84 [S2IO]: Making MSIX as default intr_type
- Making MSIX as default intr_type
- Driver will test MSI-X by issuing test MSI-X vector and if fails it will
  fallback to INTA

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@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>
2007-10-10 16:50:24 -07:00
Jeff Garzik 28006c65a7 [8139too]: tab-align enums and structs; remove dead code
* (main change) tab-align hardware register value enums, and hw struct

* MMIO_FLUSH_AUDIT_COMPLETE has been defined to 1 for a while.  Remove
  the code activated when it is set to zero.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:50:23 -07:00
Jeff Garzik 6cc92cddb1 [netdrvr] 8139cp, 8139too: convert to generic DMA
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:22 -07:00
Mariusz Kozlowski ae94607d19 drivers/net/via-velocity.c: mostly kmalloc + memset conversion to kcalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/via-velocity.c | 88263 -> 88120 (-143 bytes)
 drivers/net/via-velocity.o | 254264 -> 253828 (-436 bytes)

 drivers/net/via-velocity.c |   24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:22 -07:00
Mariusz Kozlowski c477f3348a drivers/net/sb1250-mac.c: kmalloc + memset conversion to kcalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/net/sb1250-mac.c | 76286 -> 76199 (-87 bytes)

 drivers/net/sb1250-mac.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:21 -07:00
Jeff Garzik a967b14035 drivers/net/skfp: Remove dead code referencing pci_find_device()
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:21 -07:00
Ralf Baechle bbfb86c577 IOC3: Switch hw checksumming to ethtool configurable.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:20 -07:00
Denis Cheng c54f5c2402 drivers/net/cxgb3: removed several unneeded zero initilization
Cc: linux-bugs@chelsio.com
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:20 -07:00
Yoann Padioleau eda105317f dev->priv to netdev_priv(dev), drivers/net/tokenring/
Replacing accesses to dev->priv to netdev_priv(dev). The replacment
is safe when netdev_priv is used to access a private structure that is
right next to the net_device structure in memory.
Cf http://groups.google.com/group/comp.os.linux.development.system/browse_thread/thread/de19321bcd94dbb8/0d74a4adcd6177bd
This is the case when the net_device structure was allocated with
a call to alloc_netdev or one of its derivative.

Here is an excerpt of the semantic patch that performs the transformation

@ rule1 @
type T;
struct net_device *dev;
@@

 dev =
(
        alloc_netdev
|
        alloc_etherdev
|
        alloc_trdev
)
   (sizeof(T), ...)

@ rule1bis @
struct net_device *dev;
expression E;
@@
 dev->priv = E

@ rule2 depends on rule1 && !rule1bis  @
struct net_device *dev;
type rule1.T;
@@

- (T*) dev->priv
+ netdev_priv(dev)

PS: I have performed the same transformation on the whole kernel
and it affects around 70 files, most of them in drivers/net/.
Should I split my patch for each subnet directories ? (wireless/, wan/, etc)

Thanks to Thomas Surrel for helping me refining my semantic patch.

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>

 3c359.c       |   58 +++++++++++++++++++++++++++++-----------------------------
 ibmtr.c       |   38 +++++++++++++++++++-------------------
 lanstreamer.c |   32 ++++++++++++++++----------------
 madgemc.c     |    4 ++--
 olympic.c     |   36 ++++++++++++++++++------------------
 tmspci.c      |    4 ++--
 6 files changed, 86 insertions(+), 86 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:19 -07:00
Jeff Garzik af096046f6 [netdrvr] skfp: remove a bunch of dead code
The driver has not compiled in anything except PCI support for many
years (see drivers/net/skfp/Makefile).  This driver is also unmaintained
for many years, so arguments for keeping the cross-OS, cross-bus (ISA,
EISA, MCA) code do not exist.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 16:50:18 -07:00
Dan Williams 7856a541ad [PATCH] libertas: bump driver version
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:18 -07:00
Dan Williams 8362cd413e [PATCH] libertas: fix sparse-reported problems
A few fields being converted to the wrong sized type, and a few missed
endian conversions.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:17 -07:00
Dan Williams c7fdf26995 [PATCH] libertas: better descriptions for association errors
Describe the association response status code the firmware
returns, based on mail to libertas-dev from Ronak.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:17 -07:00
Dan Williams 5612c0140a [PATCH] libertas: ignore spurious mesh autostart events
Don't trust the firmware to always send them at the right time,
ignore them when the driver thinks mesh autostart is disabled.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:16 -07:00
Dan Williams 81173e34d4 [PATCH] libertas: fix misspelling in debug message
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:15 -07:00
Luis Carlos Cobo 63f0023bc3 [PATCH] libertas: pass boot2 version to firmware
Boot2 version used to be hardcoded in the uploaded firmware,
this patch preserves the boot2 version before uploading firmware
and sends it to the firmware again on resume.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:15 -07:00
Dan Williams 2afc0c5d71 [PATCH] libertas: push WEXT scan requests to a work queue
Push WEXT scan requests to a workqueue and have each partial scan queue
the next part, then only report results when the complete scan has finished.
Full scans don't go through the work queue.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:14 -07:00
Eugene Teo b031ac1026 [PATCH] drivers/net/wireless/libertas/cmd.c: fix adapter->driver_lock dereference
adapter is NULL if cmdnode is not.

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:14 -07:00
Dan Williams 5707708111 [PATCH] libertas: fix assignment of WEP key type
keytype is a u8

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:13 -07:00
Luis Carlos Cobo 965f8bbc6c [PATCH] libertas: monitor mode support for OLPC firmware
Driver support for the monitor mode support that will be available in the next
OLPC 'bleeding edge' Marvell firmware release (most likely, 5.110.16.p2).

To activate monitor mode,

echo mode > /sys/class/net/{ethX,mshX}/device/libertas_rtap

where mode is the hex mask that specifies which frames to sniff (in short, 0x1
for data, 0x2 for all management but beacons, 0x4 for beacons). Any non zero
mode will activate the monitor mode, inhibiting transmission in ethX and mshX
interfaces and routing all the incoming traffic to a new rtapX interface that
will output the packets in 802.11+radiotap headers format.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:13 -07:00
Jean Tourrilhes 9483f03150 [PATCH] libertas: fix a few wext abuses...
o SIOCGIWNAME is not designed to return the version number of the driver.
On the other hand, you are free to abuse SIOCGIWNICKN for that purpose.

o Don't attempt to fix the WE19/WE20 transition in the driver, because
your fixes are bogus, and redundant with the code in the kernel (you may
endup with +2, you can't read 32 char ESSID...).

o In SIOCSIWTXPOW, if you specified in iwrange that you want dBm, you
should only get dBm, which allow to reduce code bloat.

Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:12 -07:00
Luis Carlos Cobo d21b31fd53 [PATCH] libertas: keep mesh autostart enabled while asleep
After loading the firmware, mesh autostart will be disabled. After that, the
user will still be able to enable or disable it at will. On suspend, it will be
always activated and later on resume it will go back to the state it had before
going to sleep.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:11 -07:00
Luis Carlos Cobo b37e5842f5 [PATCH] libertas: revert CAPINFO_MASK to its original value
CAPINFO_MASK changed on commits 981f187b and a091095b. Reverting to the original
value.  Also move CAPINFO_MASK into the sole user, join.c.  CAPINFO_MASK
should be in host CPU byte order; capability is converted to device
byte order elsewhere.

This fixes OLPC ticket #2161

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:11 -07:00
Dan Williams 00af0157e0 [PATCH] libertas: push mesh beacon bit to userspace in scan results
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:10 -07:00
Dan Williams 0edef215e4 [PATCH] libertas: send association events on adhoc reassociation
Send association event to userspace when reassociating to the same
ad-hoc network, because it's still an association.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:10 -07:00
Holger Schurig 9556d2120c [PATCH] libertas: fix two debug statements in cmdresp.c
Purely cosmetic: this moves an lbs_deb_enter() to the proper place
and changes an erraneous lbs_deb_enter_args() into lbs_deb_leave_args()

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:09 -07:00
Holger Schurig bee093d613 [PATCH] libertas: remove bss_descriptor->timestamp
Noone used this variable.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:09 -07:00
Holger Schurig a2235ed402 [PATCH] libertas: remove bss_descriptior->networktsf
This value was parsed out, but then nowhere used ... except in
some debugfs output. I can't imagine anyone wanting to use this
value for anything real (as no other driver exports it), so
bye-bye.

Along this, made the columns of
/sys/kernel/debug/libertas_wireless/*/getscantable align again.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:08 -07:00
Holger Schurig 4f2fdaaf0e [PATCH] libertas: remove adapter->scantype
scantype was initialized with CMD_SCAN_TYPE_ACTIVE, but there is no code
that would ever change it, so we can use that variable directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:08 -07:00
Holger Schurig d65ead886a [PATCH] libertas: remove adapter->scanmode
scanmode was initialized with CMD_BSS_TYPE_ANY, but there is no code
that ever can store another value there, so it can go away.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:07 -07:00
Holger Schurig 2c85103da3 [PATCH] libertas: remove adapter->beaconperiod
beaconperiod was initialized with MRVDRV_BEACON_INTERVAL, but there is
no code that would ever change it's value. We can use the define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:06 -07:00
Holger Schurig 85c93e5189 [PATCH] libertas: remove adapter->adhoc_grate_enabled
The variable was initialized with 0 (false). There is no code that would
ever change it, so we can use the false-patch directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:06 -07:00
Holger Schurig 0aabc0a5d5 [PATCH] libertas: remove adapter->listeninterval
listeninterval was initialized with MRVDRV_DEFAULT_LISTEN_INTERVAL, but
there exists that would ever change it. So we can use this define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:05 -07:00
Holger Schurig 956deb867a [PATCH] libertas: remove adapter->regiontableindex
The value was computed, but then never used.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:05 -07:00
Holger Schurig ae596ce2f7 [PATCH] libertas: remove adapter->atimwindow
This varaible was initialized with 0 but there is no code that would ever
change it's value. So it can go away.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:04 -07:00
Holger Schurig 56c4656e84 [PATCH] libertas: remove adapter->multipledtim
multipledtim was initialized with MRVDRV_DEFAULT_MULTIPLE_DTIM and then
kept at that value, so we could use that define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:03 -07:00
Holger Schurig 252cf0d10f [PATCH] libertas: remove adapter->locallisteninterval
locallisteninterval was initialized with 0, but there is no code that
changes it, rendering it rather useless.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:03 -07:00
Holger Schurig 97605c3eb3 [PATCH] libertas: remove adapter->nullpktinterval
No code ever initialized this variable, so it was 0 because of kzalloc().
But no other code changes it, making it rather useless.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:02 -07:00
Holger Schurig a783f1ee5b [PATCH] libertas: remove adapter->{data,bcn}_avg_factor
Those two variables were initialized with some default values, but there
is no code that would ever change them. So we could use as well the defaults
directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:02 -07:00
Holger Schurig caef47a0dc [PATCH] libertas: remove adapter->rxpd_rate
No code uses the contents of this variable, so it can go.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:01 -07:00
Holger Schurig cad9d9b17a [PATCH] libertas: remove adapter->txrate
The value of txrate was only set by a CMD_802_11_TX_RATE_QUERY command,
but there was no code in the driver that ever issued this command.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:01 -07:00
Dan Williams b20c520763 [PATCH] libertas: fix WEXT quality reporting
Found by Ronak and others at Marvell.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:50:00 -07:00
Holger Schurig fcff0e0856 [PATCH] libertas: remove adapter->pkttxctrl
The variable was initialized to 0 and nowhere else changed, so basically
the per-packet TX control wasn't used.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:59 -07:00
Holger Schurig e2aa334bee [PATCH] libertas: remove adapter->scanprobes
The variable was initialized to 0 and nowhere else to anything
different.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:59 -07:00
Holger Schurig 6e22a855b2 [PATCH] libertas: remove adapter->prescan
The value 1 was assigned to it and there was nowhere any code
that would have changed that to 0.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:58 -07:00
Holger Schurig fdde7084e0 [PATCH] libertas: remove adapter->{rx,tx}antenna
There was nowhere any code that used the values of those
variables.

This patch also removes two static functions that are now unused.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:57 -07:00
Holger Schurig 4d4ce1ad02 [PATCH] libertas: remove unused adapter->prev_XXXX variables
There were just used in some debug output, but nowhere else.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:56 -07:00
Holger Schurig 27590d06e1 [PATCH] add support for Marvell 8385 CF cards
This patch adds support for Marvell based 8385 compact flash cards.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:56 -07:00
Luis Carlos Cobo 9cdc6d295b [PATCH] libertas: Avoid MESH_AUTOSTARTED spam on console
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:55 -07:00
Holger Schurig 8ff12da121 [PATCH] libertas: use LBS_DEB_HOST for host-to-card communications
... and LBS_DEB_CMD for command execution. Also tidies misc
comments to give a consistent output.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:55 -07:00
Holger Schurig a6c8700f36 [PATCH] libertas: use LBS_DEB_HOST for host-to-card communications
... and LBS_DEB_CMD for command execution. Also tidies misc
comments to give a consistent output.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:54 -07:00
Holger Schurig 6b63cd0f42 [PATCH] libertas: remove a hundred CMD_RET_xxx definitions
types.h contains the same amount of CMD_RET_xxx and CMD_xxx definitions.
They contains the same info: the firmware command opcode and, when the
firmware sends back a result, the command opcode ORed with 0x8000.

Having the same data twice in the source code is redundant and can lead to
errors (e.g. if you update or delete only one instance). This patch removed
all CMD_RET_xxx definitions and introduces a simple CMD_RET() macro.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:53 -07:00
Holger Schurig ece5619193 [PATCH] libertas: make the hex dumper nicer
Currently, when you define LBS_DEB_HEX, you get every hex dump in the
whole driver, e.g. for LBS_DEB_CMD, LBS_DEB_RX, LBS_DEB_TX etc. This
patch makes sure that you only get the hexdump that you're interested in.

Renamed lbs_dbg_hex() into lbs_deb_hex(), like the other lbs_deb_XXX()
macros.

Made lbs_deb_hex() issue a line feed (and a new prompt) after 16 bytes.

As lbs_deb_hex() now prints the ":" after the prompt by itself, removed
the misc colons in the various *.c files.

lbs_deb_XXX() now print the debug category as well.

As lbs_deb_XXX() --- and especially lbs_deb_11d() --- now print the
category, I removed various "11D:" prefixes in 11d.c as well.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:53 -07:00
Luis Carlos Cobo a9f38d023b [PATCH] Support for mesh autostart deactivation through sysfs
echo 0 > /sys/class/net/mshX/autostart_enabled

This is supported from Marvell firmware version 5.110.16.p0 (to be released).

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:52 -07:00
Holger Schurig f455eb1a4b [PATCH] libertas: remove debugmode
There is nowhere any place that set's this variable.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:52 -07:00
Holger Schurig 0a6d0555e9 [PATCH] libertas: tune hardware info output
This changes the output of hardware related info from:

libertas: GET_HW_SPEC: FWReleaseVersion- 5.0.11.p0
libertas: GET_HW_SPEC: Permanent addr-  0:16:41:72:f6:a8
libertas: GET_HW_SPEC: hwifversion=0x2  version=0x213

to:

libertas: GET_HW_SPEC: FWReleaseVersion: 5.0.11.p0
libertas: GET_HW_SPEC: Permanent addr: 00:16:41:72:f6:a8
libertas: GET_HW_SPEC: hwifversion: 0x2, version: 0x213

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:51 -07:00
Holger Schurig 3cf840914b [PATCH] libertas: access mesh_dev more carefully
The CF/SDIO firmware doesn't support Mesh, so priv->mesh_dev is
NULL there. Protect all accesses.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:50 -07:00
Holger Schurig c95c7f930e [PATCH] libertas: uppercase some #defines
Usually constants defined by #define are in ALL_UPPERCASE. This patch
fixes this.

I also shuffled the bits around so that they match the bit positions in the
host-interrupt-state register of the CF/SDIO card :-)

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:50 -07:00
Holger Schurig ac558ca2ae [PATCH] libertas: make more functions static & remove unused functions
Some functions where declared in header files, but used only once. They are
now static functions.

After doing this, I found out that some functions weren't used at all. I
removed this dead code.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:49 -07:00
Holger Schurig c23a24f6ae [PATCH] libertas: fix one more sparse warning
adhoc_rates_b is only used locally, so make it static

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:49 -07:00
Holger Schurig 1df4e8fe91 [PATCH] libertas: remove fw.c
Firmware download is quite different for different hardware. The SDIO and CF
cards have two flat files that need to be downloaded, whereas the USB driver
needs only one file, but with an internal structure.

The code that handles this (USB only) structured file is currently in fw.c.
This patch moves this code into if_usb.c. The remaining functions in fw.c
have not much to do with firmware, they are various card- and network-stack
initialisation functions. I've moved them into main.c.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:48 -07:00
Dan Williams 8c51276575 [PATCH] libertas: simplify and clean up data rate handling
Remove unused/duplicated fields and consolidate static data rate arrays,
for example the libertas_supported_rates[] and datarates[] arrays in
the bss_descriptor structure, and the libertas_supported_rates field
in the wlan_adapter structure.

Introduce libertas_fw_index_to_data_rate and libertas_data_rate_to_fw_index
functions and use them everywhere firmware requires a rate index rather
than a rate array.

The firmware requires the 4 basic rates to have the MSB set, but most
other stuff doesn't, like WEXT and mesh ioctls.  Therefore, only set the MSB
on basic rates when pushing rate arrays to firmware instead of doing a ton
of (rate & 0x7f) everywhere.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:48 -07:00
Dan Williams e52414728b [PATCH] libertas: wlan_ -> libertas_ function prefix renames for main.c
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:47 -07:00
Dan Williams eedc2a3191 [PATCH] libertas: move generic firmware reset command to common code
It's not USB specific, so move it out of the USB interface code.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:46 -07:00
Dan Williams ffcae953ac [PATCH] libertas: fix more mixed-case abuse
Mistakently introduced by a previous patch to upper-case all command
constants.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:46 -07:00
Dan Williams 125dcabf72 [PATCH] libertas: bump version to 322.p1
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:45 -07:00
Dan Williams 276c015e1b [PATCH] libertas: new mesh control knobs
Support for new mesh control knobs on firmware 5.220.11.p4:

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:45 -07:00
Dan Williams fe3361507a [PATCH] libertas: remove thread.h and make kthread usage clearer
Remove the thread.h abstractions and opencode kthread stuff
to make it clearer.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:44 -07:00
Dan Williams 2ca10e6d6a [PATCH] libertas: fix debug build breakage due to field rename
Missed when fixing mixed-case structure field names.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:44 -07:00
Dan Williams 0aef64d758 [PATCH] libertas: re-uppercase command defines and other constants
For readability.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:43 -07:00
Dan Williams b44898eb2c [PATCH] libertas: fix mixed-case abuse in cmd_ds_802_11_ad_hoc_start
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:42 -07:00
Dan Williams ea8da92d70 [PATCH] libertas: fix mixed-case abuse in cmd_ds_802_11_ad_hoc_result
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:42 -07:00
Dan Williams 492b6da7d2 [PATCH] libertas: fix mixed-case abuse in cmd_ds_802_11_scan
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:41 -07:00
Dan Williams 9e22cb67d9 [PATCH] libertas: remove if_bootcmd.c
Move the only function in it to if_usb.c, which was its
only user anyway.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:41 -07:00
Luis Carlos Cobo 1e838bf31c [PATCH] libertas: specific mesh scan for mshX interface
With this patch, scanning with mshX interface will only return mesh networks. To
differentiate them, a specific mesh IE in beacons/probe responses is used. This
IE has been introduced in firmware release 5.110.14. Note:

Even though there can be at most a single mesh per channel, this scan might
return several networks in the same channel.

If all nodes in a mesh network are associated to an AP, they won't produce
beacons/probe responses, thus the network will not be listed. This will be fixed
in future firmware releases.

Scan on ethX interface is not filtered, so it will list both mesh and non-mesh
networks.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:40 -07:00
Dan Williams ab6179711a [PATCH] libertas: clean up 802.11 IE post-scan handling
Remove struct IE_WPA and just use direct checking of the IE
bytes like ipw.  Remove WLAN_802_11_VARIABLE_IEs because
it's unused.

Kill ieeetypes_elementid enum and just use MFIE_* from
ieee80211.h.  Also use struct ieee80211_info_element for
scan buffer processing to simplify pointer usage.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:39 -07:00
Dan Williams 2950cd2630 [PATCH] libertas: clean up indentation in libertas_association_worker
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:39 -07:00
Dan Williams 1443b6530d [PATCH] libertas: rename WLAN_802_11_KEY to enc_key and clean up usage
It doesn't touch hardware and therefore doesn't need endian notations
either.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:38 -07:00
Dan Williams 0c9ca690e0 [PATCH] libertas: kill ieeetypes_capinfo bitfield, use ieee80211.h types
Use standard BSS capability field constants from ieee80211.h.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:38 -07:00
Yoann Padioleau 6dbc9c89fb [PATCH] dev->priv to netdev_priv(dev), for drivers/net/wireless
Replacing accesses to dev->priv to netdev_priv(dev). The replacment
is safe when netdev_priv is used to access a private structure that is
right next to the net_device structure in memory. Cf
http://groups.google.com/group/comp.os.linux.development.system/browse_thread/thread/de19321bcd94dbb8/0d74a4adcd6177bd
This is the case when the net_device structure was allocated with
a call to alloc_netdev or one of its derivative.

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: mcgrof@gmail.com
Cc: linux-wireless@vger.kernel.org
Cc: akpm@linux-foundation.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:37 -07:00
Mariusz Kozlowski 8951554dba [PATCH] drivers/net/wireless/prism54/oid_mgt.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:36 -07:00
Matthias Kaehlcke 3623060abb [PATCH] Use mutex instead of semaphore in the Host AP driver
The Host AP driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:36 -07:00
Bill Nottingham d73ae55ad4 [PATCH] remove gratuitous space in airo module description
Currently the modinfo looks like:

description:    Support for Cisco/Aironet 802.11 wireless ethernet                    cards.  Direct support for ISA/PCI/MPI cards and support               for PCMCIA when used with airo_cs.

Arguably, it should be cut at the end of the first sentence.
This at least makes it somewhat more legible.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:35 -07:00
Faidon Liambotis cfbde697e4 [PATCH] Kconfig: remove references of pcmcia-cs
pcmcia-cs/cardmgr is deprecated and mentioning it in the help text is
misleading.

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:35 -07:00
Faidon Liambotis e12dcb05bf [PATCH] Kconfig: order options
Reorder the Atmel options so that the menu appears saner.
Before:
  < >   Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)
  <*>   Atmel at76c50x chipset  802.11b support
  < >     Atmel at76c506 PCI cards (NEW)
  < > Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards
  < > Atmel at76c502/at76c504 PCMCIA cards (NEW)

After:
  < >   Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)
  <*>   Atmel at76c50x chipset  802.11b support
  < >     Atmel at76c506 PCI cards (NEW)
  < >     Atmel at76c502/at76c504 PCMCIA cards (NEW)
  < >   Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:34 -07:00
Ulrich Kunitz c5691235cf [PATCH] zd1211rw: monitor all packets
While in monitor mode the zd1211rw received only a limited
set of packets. This patch forwards now all packets the device
receives. Notify that while monitoring no FCS checks are done; so
strange packets might appear in the network sniffer of your
choice.

ATTENTION: Support for multiple interfaces on a single ZD1211
device is currently broken. So this code works only on the first
interface.

Here is an example to put the device in monitor mode.

iwconfig wlan0 mode monitor
ifconfig wlan0 up
iwconfig wlan0 channel 10

[dsd@gentoo.org: backport to mainline]
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:34 -07:00
Michael Wu cc0b88cf5e [PATCH] Add adm8211 802.11b wireless driver
This patch adds a mac80211 wireless driver for ADMtek ADM8211 based
wireless cards.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:33 -07:00
Johannes Berg 7848ba7d7a [MAC80211]: rework hardware crypto flags
This patch reworks the various hardware crypto related
flags to make them more local, i.e. put them with each
key or each packet instead of into the hw struct.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:27 -07:00
Daniel Lezcano abf07acbb9 [NETNS]: Fix loopback network namespace initialization.
The core patchset of the network namespace sent by
Eric Biederman does not do dynamic loopback creation.
So there is no call to alloc_netdev_mq which fills the
network namespace field of the netdevice.

This patch assign the loopback to the init network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:17 -07:00
Eric W. Biederman ce286d3273 [NET]: Implement network device movement between namespaces
This patch introduces NETIF_F_NETNS_LOCAL a flag to indicate
a network device is local to a single network namespace and
should never be moved.  Useful for pseudo devices that we
need an instance in each network namespace (like the loopback
device) and for any device we find that cannot handle multiple
network namespaces so we may trap them in the initial network
namespace.

This patch introduces the function dev_change_net_namespace
a function used to move a network device from one network
namespace to another.  To the network device nothing
special appears to happen, to the components of the network
stack it appears as if the network device was unregistered
in the network namespace it is in, and a new device
was registered in the network namespace the device
was moved to.

This patch sets up a namespace device destructor that
upon the exit of a network namespace moves all of the
movable network devices  to the initial network namespace
so they are not lost.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:12 -07:00
Eric W. Biederman 881d966b48 [NET]: Make the device list and device lookups per namespace.
This patch makes most of the generic device layer network
namespace safe.  This patch makes dev_base_head a
network namespace variable, and then it picks up
a few associated variables.  The functions:
dev_getbyhwaddr
dev_getfirsthwbytype
dev_get_by_flags
dev_get_by_name
__dev_get_by_name
dev_get_by_index
__dev_get_by_index
dev_ioctl
dev_ethtool
dev_load
wireless_process_ioctl

were modified to take a network namespace argument, and
deal with it.

vlan_ioctl_set and brioctl_set were modified so their
hooks will receive a network namespace argument.

So basically anthing in the core of the network stack that was
affected to by the change of dev_base was modified to handle
multiple network namespaces.  The rest of the network stack was
simply modified to explicitly use &init_net the initial network
namespace.  This can be fixed when those components of the network
stack are modified to handle multiple network namespaces.

For now the ifindex generator is left global.

Fundametally ifindex numbers are per namespace, or else
we will have corner case problems with migration when
we get that far.

At the same time there are assumptions in the network stack
that the ifindex of a network device won't change.  Making
the ifindex number global seems a good compromise until
the network stack can cope with ifindex changes when
you change namespaces, and the like.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:10 -07:00
Eric W. Biederman b4b510290b [NET]: Support multiple network namespaces with netlink
Each netlink socket will live in exactly one network namespace,
this includes the controlling kernel sockets.

This patch updates all of the existing netlink protocols
to only support the initial network namespace.  Request
by clients in other namespaces will get -ECONREFUSED.
As they would if the kernel did not have the support for
that netlink protocol compiled in.

As each netlink protocol is updated to be multiple network
namespace safe it can register multiple kernel sockets
to acquire a presence in the rest of the network namespaces.

The implementation in af_netlink is a simple filter implementation
at hash table insertion and hash table look up time.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:09 -07:00
Eric W. Biederman e9dc865340 [NET]: Make device event notification network namespace safe
Every user of the network device notifiers is either a protocol
stack or a pseudo device.  If a protocol stack that does not have
support for multiple network namespaces receives an event for a
device that is not in the initial network namespace it quite possibly
can get confused and do the wrong thing.

To avoid problems until all of the protocol stacks are converted
this patch modifies all netdev event handlers to ignore events on
devices that are not in the initial network namespace.

As the rest of the code is made network namespace aware these
checks can be removed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:09 -07:00
Eric W. Biederman e730c15519 [NET]: Make packet reception network namespace safe
This patch modifies every packet receive function
registered with dev_add_pack() to drop packets if they
are not from the initial network namespace.

This should ensure that the various network stacks do
not receive packets in a anything but the initial network
namespace until the code has been converted and is ready
for them.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:08 -07:00
Eric W. Biederman 1b8d7ae42d [NET]: Make socket creation namespace safe.
This patch passes in the namespace a new socket should be created in
and has the socket code do the appropriate reference counting.  By
virtue of this all socket create methods are touched.  In addition
the socket create methods are modified so that they will fail if
you attempt to create a socket in a non-default network namespace.

Failing if we attempt to create a socket outside of the default
network namespace ensures that as we incrementally make the network stack
network namespace aware we will not export functionality that someone
has not audited and made certain is network namespace safe.
Allowing us to partially enable network namespaces before all of the
exotic protocols are supported.

Any protocol layers I have missed will fail to compile because I now
pass an extra parameter into the socket creation code.

[ Integrated AF_IUCV build fixes from Andrew Morton... -DaveM ]

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:07 -07:00
Eric W. Biederman 457c4cbc5a [NET]: Make /proc/net per network namespace
This patch makes /proc/net per network namespace.  It modifies the global
variables proc_net and proc_net_stat to be per network namespace.
The proc_net file helpers are modified to take a network namespace argument,
and all of their callers are fixed to pass &init_net for that argument.
This ensures that all of the /proc/net files are only visible and
usable in the initial network namespace until the code behind them
has been updated to be handle multiple network namespaces.

Making /proc/net per namespace is necessary as at least some files
in /proc/net depend upon the set of network devices which is per
network namespace, and even more files in /proc/net have contents
that are relevant to a single network namespace.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:06 -07:00
Andy Gospodarek ab0049b4a2 [TG3]: remove sparse warnings
Removed sparse warnings from tg3 driver.  The new logic seems fine (I
don't immediately see where we are running over values for any of the
variables that need to be saved).

This patch compiles fine and I'm currently using a tg3 with the patched
driver to post this patch as a basic proof of concept.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:49:00 -07:00
Johannes Berg aaa92e9a74 [MAC80211]: remove IEEE80211_HW_DATA_NULLFUNC_ACK
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:42 -07:00
Alex Villacís Lasso 4b6aa59999 [IrDA]: Kingsun KS-959 IrDA USB driver
This dongle does not follow the usb-irda specification, so it needs its own
special driver. First, it uses control URBs for data transfer, instead of
bulk or interrupt transfers; the only interrupt endpoint exposed seems to
be a dummy to prevent the interface from being rejected. Second, it uses
obfuscation and padding at the USB traffic level, for no apparent reason
other than to make reverse engineering harder (full details on obfuscation
in comments at beginning of source). Although it is advertised as a "4 Mbps
FIR dongle", it apparently loses packets at speeds greater than 57600 bps.

On plugin, this dongle reports vendor and device IDs: 0x07d0:0x4959 .

The Windows driver that is used normally to control this dongle has a
filename of KS-959.SYS .

Signed-off-by: Alex Villacís Lasso <a_villacis@palosanto.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:39 -07:00
Alex Villacís Lasso 4a1d7c25cb [IrDA]: Kingsun Dazzle IrDA USB driver
This dongle does not follow the usb-irda specification, so it needs its own
special driver. Just like the Kingsun/Donshine dongle, it exposes two
interrupt endpoints. Reception is performed through direct reads from the
input endpoint. Transmission requires splitting the IrDA frames into 8-byte
segments, in which the first byte encodes how many of the remaining 7 bytes
are used as data. Speed change is made with a control URB just like the one
in cypress_m8, and it seems to support up to 115200 bps.

On plugin, this dongle reports vendor and device IDs: 0x07d0:0x4100

Signed-off-by: Alex Villacís Lasso <a_villacis@palosanto.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:38 -07:00
Satyam Sharma 0bcc181618 [NET] netconsole: Support dynamic reconfiguration using configfs
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

This patch introduces support for dynamic reconfiguration (adding, removing
and/or modifying parameters of netconsole targets at runtime) using a
userspace interface exported via configfs.  Documentation is also updated
accordingly.

Issues and brief design overview:

(1) Kernel-initiated creation / destruction of kernel objects is not
    possible with configfs -- the lifetimes of the "config items" is managed
    exclusively from userspace.  But netconsole must support boot/module
    params too, and these are parsed in kernel and hence netpolls must be
    setup from the kernel.  Joel Becker suggested to separately manage the
    lifetimes of the two kinds of netconsole_target objects -- those created
    via configfs mkdir(2) from userspace and those specified from the
    boot/module option string.  This adds complexity and some redundancy here
    and also means that boot/module param-created targets are not exposed
    through the configfs namespace (and hence cannot be updated / destroyed
    dynamically).  However, this saves us from locking / refcounting
    complexities that would need to be introduced in configfs to support
    kernel-initiated item creation / destroy there.

(2) In configfs, item creation takes place in the call chain of the
    mkdir(2) syscall in the driver subsystem.  If we used an ioctl(2) to
    create / destroy objects from userspace, the special userspace program is
    able to fill out the structure to be passed into the ioctl and hence
    specify attributes such as local interface that are required at the time
    we set up the netpoll.  For configfs, this information is not available at
    the time of mkdir(2).  So, we keep all newly-created targets (via
    configfs) disabled by default.  The user is expected to set various
    attributes appropriately (including the local network interface if
    required) and then write(2) "1" to the "enabled" attribute.  Thus,
    netpoll_setup() is then called on the set parameters in the context of
    _this_ write(2) on the "enabled" attribute itself.  This design enables
    the user to reconfigure existing netconsole targets at runtime to be
    attached to newly-come-up interfaces that may not have existed when
    netconsole was loaded or when the targets were actually created.  All this
    effectively enables us to get rid of custom ioctls.

(3) Ultra-paranoid configfs attribute show() and store() operations, with
    sanity and input range checking, using only safe string primitives, and
    compliant with the recommendations in Documentation/filesystems/sysfs.txt.

(4) A new function netpoll_print_options() is created in the netpoll API,
    that just prints out the configured parameters for a netpoll structure.
    netpoll_parse_options() is modified to use that and it is also exported to
    be used from netconsole.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:06 -07:00
Satyam Sharma b5427c2717 [NET] netconsole: Support multiple logging targets
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

This patch introduces support for multiple targets, independent of
CONFIG_NETCONSOLE_DYNAMIC -- this is useful even in the default case and
(including the infrastructure introduced in previous patches) doesn't really
add too many bytes to module text.  All the complexity (and size) comes with
the dynamic reconfigurability / userspace interface patch, and so it's
plausible users may want to keep this enabled but that disabled (say to avoid
a dependency on CONFIG_CONFIGFS_FS too).

Also update documentation to mention the use of ";" separator to specify
multiple logging targets in the boot/module option string.

Brief overview:

We maintain a target_list (and corresponding lock).  Get rid of the static
"default_target" and introduce allocation and release functions for our
netconsole_target objects (but keeping sure to preserve previous behaviour
such as default values).  During init_netconsole(), ";" is used as the
separator to identify multiple target specifications in the boot/module option
string.  The target specifications are parsed and netpolls setup.  During
exit, the target_list is torn down and all items released.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:06 -07:00
Satyam Sharma 17951f34b0 [NET] netconsole: Introduce netconsole_netdev_notifier
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

To update fields of underlying netpoll structure at runtime on corresponding
NETDEV_CHANGEADDR or NETDEV_CHANGENAME notifications.

ioctl(SIOCSIFHWADDR or SIOCSIFNAME) could be used to change the hardware/MAC
address or name of the local interface that our netpoll is attached to.
Whenever this happens, netdev notifier chain is called out with the
NETDEV_CHANGEADDR or NETDEV_CHANGENAME event message.  We respond to that and
update the local_mac or dev_name field of the struct netpoll.  This makes
sense anyway, but is especially required for dynamic netconsole because the
netpoll structure's internal members become user visible files when either
sysfs or configfs are used.  So this helps us to keep up with the MAC
address/name changes and keep values in struct netpoll uptodate.

[ Note that ioctl(SIOCSIFADDR) to change IP address of interface at
  runtime is not handled (to update local_ip of netpoll) on purpose --
  some setups may set the local_ip to a private address, not necessary
  the actual IP address of the sender host, as presently allowed. ]

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:05 -07:00
Satyam Sharma df180e369c [NET] netconsole: Introduce netconsole_target
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

Introduce a wrapper structure over netpoll to represent logging targets
configured in netconsole.  This will get extended with other members in
further patches.

This is done independent of the (to-be-introduced) NETCONSOLE_DYNAMIC config
option so that we're able to drastically cut down on the #ifdef complexity of
final netconsole.c.  Also, struct netconsole_target would be required for
multiple targets support also, and not just dynamic reconfigurability.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:04 -07:00
Satyam Sharma 0cc120bea1 [NET] netconsole: Use netif_running() in write_msg()
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

Avoid unnecessarily disabling interrupts and calling netpoll_send_udp() if the
corresponding local interface is not up.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:03 -07:00
Satyam Sharma d2b60881e2 [NET] netconsole: Simplify boot/module option setup logic
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

Presently, boot/module parameters are set up quite differently for the case of
built-in netconsole (__setup() -> obsolete_checksetup() ->
netpoll_parse_options() -> strlen(config) == 0 in init_netconsole()) vs
modular netconsole (module_param_string() -> string copied to the config
variable -> strlen(config) != 0 init_netconsole() -> netpoll_parse_options()).

This patch makes both of them similar by doing exactly the equivalent of a
module_param_string() in option_setup() also -- just copying the param string
passed from the kernel command line into "config" variable.  So,
strlen(config) != 0 in both cases, and netpoll_parse_options() is always
called from init_netconsole(), thus making the setup logic for both cases
similar.

Now, option_setup() is only ever called / used for the built-in case, so we
put it inside a #ifndef MODULE, otherwise gcc will complain about
option_setup() being "defined but not used".  Also, the "configured" variable
is redundant with this patch and hence removed.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:03 -07:00
Satyam Sharma d133ccbdc3 [NET] netconsole: Remove bogus check
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

The (!np.dev) check in write_msg() is bogus (always false), because: np.dev is
set by netpoll_setup(), which is called by init_netconsole() before
register_console(), so write_msg() cannot be triggered unless netpoll_setup()
successfully set np.dev.  Also np.dev cannot go away from under us, because
netpoll_setup() grabs us reference on it.  So let's remove the bogus check.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:02 -07:00
Satyam Sharma d39badf05b [NET] netconsole: Cleanups, codingstyle, prettyfication
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

(1) Remove unwanted headers.
(2) Mark __init and __exit as appropriate.
(3) Various trivial codingstyle and prettification stuff.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:02 -07:00
Andrew Gallatin 1e6e9342d4 [MYRI10GE]: Use LRO.
Singed off by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:47:47 -07:00
Jan-Bernd Themann d4dc4ec9d8 [EHEA]: Use LRO.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:47:47 -07:00
Pavel Emelyanov e314dbdc1c [NET]: Virtual ethernet device driver.
Veth stands for Virtual ETHernet. It is a simple tunnel driver
that works at the link layer and looks like a pair of ethernet
devices interconnected with each other.

Mainly it allows to communicate between network namespaces but
it can be used as is as well.

The newlink callback is organized that way to make it easy to
create the peer device in the separate namespace when we have
them in kernel.

This implementation uses another interface - the RTM_NRELINK
message introduced by Patric.

Bug fixes from Daniel Lezcano.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:47:46 -07:00
Stephen Hemminger bea3348eef [NET]: Make NAPI polling independent of struct net_device objects.
Several devices have multiple independant RX queues per net
device, and some have a single interrupt doorbell for several
queues.

In either case, it's easier to support layouts like that if the
structure representing the poll is independant from the net
device itself.

The signature of the ->poll() call back goes from:

	int foo_poll(struct net_device *dev, int *budget)

to

	int foo_poll(struct napi_struct *napi, int budget)

The caller is returned the number of RX packets processed (or
the number of "NAPI credits" consumed if you want to get
abstract).  The callee no longer messes around bumping
dev->quota, *budget, etc. because that is all handled in the
caller upon return.

The napi_struct is to be embedded in the device driver private data
structures.

Furthermore, it is the driver's responsibility to disable all NAPI
instances in it's ->stop() device close handler.  Since the
napi_struct is privatized into the driver's private data structures,
only the driver knows how to get at all of the napi_struct instances
it may have per-device.

With lots of help and suggestions from Rusty Russell, Roland Dreier,
Michael Chan, Jeff Garzik, and Jamal Hadi Salim.

Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.

[ Ported to current tree and all drivers converted.  Integrated
  Stephen's follow-on kerneldoc additions, and restored poll_list
  handling to the old style to fix mutual exclusion issues.  -DaveM ]

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:47:45 -07:00
Daniel Drake 7e9ed18874 [MAC80211]: improved short preamble handling
Similarly to CTS protection, whether short preambles are used for 802.11b
transmissions should be a per-subif setting, not device global.

For STAs, this patch makes short preamble handling automatic based on the ERP
IE. For APs, hostapd still uses the prism ioctls, but the write ioctl has been
restricted to AP-only subifs.

ieee80211_txrx_data.short_preamble (an unused field) was removed.

Unfortunately, some API changes were required for the following functions:
 - ieee80211_generic_frame_duration
 - ieee80211_rts_duration
 - ieee80211_ctstoself_duration
 - ieee80211_rts_get
 - ieee80211_ctstoself_get
Affected drivers were updated accordingly.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:47:38 -07:00
Roland Dreier 3d73c2884f mlx4_core: Fix section mismatches
Commit ee49bd93 ("mlx4_core: Reset device when internal error is
detected") introduced some section mismatch problems when
CONFIG_HOTPLUG=n, because the error recovery code tears down and
reinitializes the device after everything is loaded, which ends up
calling into lots of code marked __devinit and __devexit from regular
.text.  Fix this by getting rid of these now-incorrect section
markers.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-10 15:43:54 -07:00
Or Gerlitz 335a64a5a9 IPoIB: Allow setting policy to ignore multicast groups
The kernel IB stack allows (through the RDMA CM) userspace
applications to join and use multicast groups from the IPoIB MGID
range.  This allows multicast traffic to be handled directly from
userspace QPs, without going through the kernel stack, which gives
better performance for some applications.

However, to fully interoperate with IP multicast, such userspace
applications need to participate in IGMP reports and queries, or else
routers may not forward the multicast traffic to the system where the
application is running.  The simplest way to do this is to share the
kernel IGMP implementation by using the IP_ADD_MEMBERSHIP option to
join multicast groups that are being handled directly in userspace.

However, in such cases, the actual multicast traffic should not also
be handled by the IPoIB interface, because that would burn resources
handling multicast packets that will just be discarded in the kernel.

To handle this, this patch adds lookup on the database used for IB
multicast group reference counting when IPoIB is joining multicast
groups, and if a multicast group is already handled by user space,
then the IPoIB kernel driver ignores the group.  This is controlled by
a per-interface policy flag.  When the flag is set, IPoIB will not
join and attach its QP to a multicast group which already has an entry
in the database; when the flag is cleared, IPoIB will behave as before
this change.

For each IPoIB interface, the /sys/class/net/$intf/umcast attribute
controls the policy flag.  The default value is off/0.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-10 13:02:30 -07:00
Eli Cohen 55a98e955c IB/mthca: Mark error paths as unlikely() in post_srq_recv functions
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-10 11:24:33 -07:00
Nicolas Pitre c783837bc6 pxamci: support arbitrary block size
The PXA has two transmit FIFOes, each32 byte deep.  when one FIFO is
full and the other one has been transmitted, they are automatically
swapped and DMA is triggered for another 32 byte burst.  However, when
there is less than 32 bytes left to send, the FIFO swap has to be done
manually. This is required for some SDIO transfers which are not
required to be multiples of 32 bytes.

A DMA completion interrupt is set for each descriptor which length isn't
a multiple of 32 in order to force the FIFO swap.  While at it, the DMA
interrupt handler has been made a bit more resilient against errors.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-10 20:13:29 +02:00
Trent Piepho a991f44b79 V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry
The rest of V4L files.

There is one list_for_each+list_entry in cpia_pp.c that
wasn't changed because it expects the loop iterator to remain NULL if
the list is empty.

A bug in vivi is fixed; the 'safe' version needs to be used because the loop
deletes the list entries.

Simplify a second loop in vivi and get rid if an un-used variable in that loop.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:35:29 -03:00
Trent Piepho e77e2c2f29 V4L/DVB (6315): pvrusb2: Change list_for_each+list_entry to list_for_each_entry
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:35:20 -03:00
Trent Piepho 6d28e98906 V4L/DVB (6314): saa7134: Replace list_for_each+list_entry with list_for_each_entry
A couple loops weren't changed because they expected the loop iterator
to be left as NULL if the list was empty.  Maybe the code should just
check for that first, then loop?

Adjust some of the loop logic to be simpler.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:35:07 -03:00
Trent Piepho 805a439241 V4L/DVB (6313): ivtv: Replace list_for_each+list_entry with list_for_each_entry
Also fixed a few cases of cut&paste errors where 'buf' would be set to the
first entry in the list prior to be used as the loop iterator.  In one case
the value of buf was used before it was changed, but the rest were
unnecessary.

There was one list_for_each+list_entry loop that wasn't changed, since it
depending on the loop iterator being left as NULL if the list was empty.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
CC: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:34:56 -03:00
Trent Piepho 8bb629e22f V4L/DVB (6312): cx88: Replace list_for_each+list_entry with list_for_each_entry
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:34:48 -03:00
Trent Piepho 7948261942 V4L/DVB (6311): dvb: Replace list_for_each+list_entry with list_for_each_entry
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:34:33 -03:00
Grant Likely b9a22794f2 [POWERPC] XilinxFB: sparse fixes
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-10 09:14:34 -06:00
Grant Likely d2bbf3da37 Sysace: Don't enable IRQ until after interrupt handler is registered
The previous patch to move the interrupt handler registration moved it
below enabling interrupts which could be a problem if the device is on
a shared interrupt line.  This patch fixes the order.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:26:00 +02:00
Grant Likely b5515d86f2 Sysace: sparse fixes
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:59 +02:00
Grant Likely 34e1b83413 Sysace: Minor coding convention fixup
Put function call and return code test on separate lines.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:59 +02:00
Jeff Garzik cb3503ca54 drivers/block/umem: use DRIVER_NAME where appropriate
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 09:25:59 +02:00
Jeff Garzik 4e953a2162 drivers/block/umem: trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 09:25:59 +02:00
Jeff Garzik ee4a7b6874 drivers/block/umem: minor cleanups
* tab-align DRIVER_*, pci_driver entries

* reduced wasted memory by killing unused struct cardinfo members

* move free_irq() call above resource unmap, to fix tiny window where
  irq handler may access recently-unmapped memory

* propagate pci_enable_device() return value

* use pci_request_regions, pci_release_regions() for resource reservation

* call pci_disable_device() in pci_driver::remove()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 09:25:59 +02:00
Jeff Garzik 4e0af881af drivers/block/umem: use dev_printk()
dev_printk() gives us a consistent prefix (driver name + PCI bus id),
which allows us to eliminate the hand-rolled one.

Also allows us to eliminate card->card_number, which was used solely in
printk() calls.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 09:25:59 +02:00
Jeff Garzik 3084f0c610 drivers/block/umem: move private include away from include/linux
Move include/linux/umem.h to drivers/block, as umem.c is the only user,
and its not an exported header.

Move the PCI_{VENDOR,DEVICE}_ID_* constants to include/linux/pci_ids.h.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10 09:25:59 +02:00
Grant Likely ed155a95a4 Sysace: Labels in C code should not be indented.
Remove the indentation on labels

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:59 +02:00
Grant Likely 95e896c35f Sysace: Add of_platform_bus binding
The of_platform bus binding is needed to make the device driver usable
under arch/powerpc.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:59 +02:00
Grant Likely 32f6fff47d Sysace: Move IRQ handler registration to occur after FSM is initialized
The FSM needs to be initialized before it is safe to call the ISR

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:58 +02:00
Grant Likely 4a24d8610d Sysace: minor rework and cleanup changes
Miscellanious rework to the sysace driver; Not critical, but makes the
subsequent addition of the of_platform bus binding a wee bit cleaner

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:58 +02:00
Grant Likely 1b45546654 Sysace: Move structure allocation from bus binding into common code
Split the determination of device registers/irqs/etc from the actual
allocation and initialization of the device structure.  This cleans
up the code a bit in preparation to add an of_platform bus binding

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:58 +02:00
Grant Likely edec49616c Sysace: Use the established platform bus api
SystemACE uses the platform bus binding, but it doesn't use the
platform bus API.  Move to using the correct API for consistency
sake and future proofing against platform bus changes.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:57 +02:00
NeilBrown 6712ecf8f6 Drop 'size' argument from bio_endio and bi_end_io
As bi_end_io is only called once when the reqeust is complete,
the 'size' argument is now redundant.  Remove it.

Now there is no need for bio_endio to subtract the size completed
from bi_size.  So don't do that either.

While we are at it, change bi_end_io to return void.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:57 +02:00
Jens Axboe 6c92e699b5 Fixup rq_for_each_segment() indentation
Remove one level of nesting where appropriate.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:56 +02:00
NeilBrown 66846572bf Stop exporting blk_rq_bio_prep
blk_rq_bio_prep is exported for use in exactly
one place.  That place can benefit from using
the new blk_rq_append_bio instead.
So
  - change dm-emc to call blk_rq_append_bio
  - stop exporting blk_rq_bio_prep, and
  - initialise rq_disk in blk_rq_bio_prep,
       as dm-emc needs it.

Signed-off-by: Neil Brown <neilb@suse.de>

diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:56 +02:00
NeilBrown 3001ca7712 New function blk_req_append_bio
ll_back_merge_fn is currently exported to SCSI where is it used,
together with blk_rq_bio_prep, in exactly the same way these
functions are used in __blk_rq_map_user.

So move the common code into a new function (blk_rq_append_bio), and
don't export ll_back_merge_fn any longer.

Signed-off-by: Neil Brown <neilb@suse.de>

diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:56 +02:00
NeilBrown eea9befacc Fix various abuse of bio fields in umem.c
umem.c:
  advances bi_idx and bi_sector to track where it is up to.
   But it is only ever doing this on one bio, so the updated
   fields can easily be kept elsewhere (current_*).
  updates bi_size, but never uses the updated values, so
   this isn't needed.
  reuses bi_phys_segments to count how many iovecs have been
   completely.  As the completion happens sequentiually, we
   can store this information outside the bio too.

Signed-off-by: Neil Brown <neilb@suse.de>

diff .prev/drivers/block/umem.c ./drivers/block/umem.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:56 +02:00
NeilBrown 5705f70217 Introduce rq_for_each_segment replacing rq_for_each_bio
Every usage of rq_for_each_bio wraps a usage of
bio_for_each_segment, so these can be combined into
rq_for_each_segment.

We define "struct req_iterator" to hold the 'bio' and 'index' that
are needed for the double iteration.

Signed-off-by: Neil Brown <neilb@suse.de>

Various compile fixes by me...

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-10 09:25:56 +02:00
Dave Olson 3ac8c70f74 IB/ipath: Minor fix to ordering of freeing and zeroing of tid pages.
Fixed to be the same as everywhere else.  copy and then zero the page *
in the array first, and then pass the copy to the VM routines.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 21:03:02 -07:00
Ralph Campbell bda94e32b3 IB/ipath: Remove redundant link state checks
This patch removes some redundant checks when the SMA changes the link
state since the same checks are made in the lower level function that
sets the state.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 21:02:08 -07:00
Ralph Campbell 49739b3e24 IB/ipath: Fix IB_EVENT_PORT_ERR event
The link state event calls were being generated when the SM told the SMA
to change link states. This works for IB_EVENT_PORT_ACTIVE but not if
the link goes down and stays down. The fix is to generate event calls
from the interrupt handler when the HW link state changes.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 21:01:38 -07:00
Michael Albaugh 6a733cdc71 IB/ipath: Better handling of unexpected GPIO interrupts
The General Purpose I/O pins can be configured to cause interrupts. At
the end of the interrupt code dealing with all known causes, a message
is output if any bits remain un-handled. Since this is a "can't happen"
scenario, it should only be triggered by bugs elsewhere. It is harmless,
and potentially beneficial, to limit the damage by masking any such
unexpected interrupts.

This patch adds disabling of interrupts from any pins that should
not have been allowed to interrupt, in addition to emitting a message.

Signed-off-by: Michael Albaugh <Michael.Albaugh@Qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 21:00:47 -07:00
Michael Albaugh 192594d523 IB/ipath: Maintain active time on all chips
There is a count of "active hours" maintained in EEPROM, to aid
troubleshooting. The definition of "active" is based on traffic
exceeding a threshold in any given 5-second polling interval. As
originally written, the check was inadvertently bypassed for chips whose
counters were 64-bits wide, and only applied to chips with 32-bit wide
counters.

This patch moves the test for amount of traffic "out" to a more common
location, rather than depending on a side-effect of the software
emulation of 64-bit counts on chips whose hardware is only 32-bits wide.

Signed-off-by: Michael Albaugh <Michael.Albaugh@Qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 21:00:08 -07:00
Dave Olson aa7c79abd1 IB/ipath: Fix QHT7040 serial number check
Remove all the OEM and bringup boards, and complain and fail
initialization if one is found.  QHT7040 with GPIO rework (128ywwuuuu)
is OK, older 112ywwuuuu is no longer supported). The check that had been
added was failing both the 112 and 128 series.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:58:49 -07:00
Arthur Jones 20bed34314 IB/ipath: Indicate a couple of chip bugs to userspace
A couple of chip bugs in the iba6110 and in the iba6120 are not in more
recent chips.  This first bug swaps two of the pioavail register
locations.  In the second bug, the chip can sometimes forget to dma the
pio avail register to memory.  We indicate the presence of these bugs
with runtime flags and we indicate the presence of the flags by bumping
the SWMINOR.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:57:54 -07:00
Arthur Jones 4bec0b9155 IB/ipath: iba6110 rev4 no longer needs recv header overrun workaround
iba6110 rev3 and earlier had a chip bug where the chip could overrun the
recv header queue. rev4 fixed this chip bug so userspace no longer needs
to workaround it.  Now we only set the workaround flag for older chip
versions.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:56:59 -07:00
Arthur Jones 70c51da2c4 IB/ipath: Use counters in ipath_poll and cleanup interrupts in ipath_close
ipath_poll() suffered from a couple subtle bugs.  Under the right
conditions we could leave recv interrupts enabled on an ipath user
context on close, thereby taking potentially unwanted interrupts on the
next open -- this is fixed by unconditionally turning off recv
interrupts on close.  Also, we now use counters rather than set/clear
bits which allows us to make sure we catch all interrupts at the cost of
changing the semantics slightly (it's now give me all events since the
last time I called poll() rather than give me all events since I called
_this_ poll routine).  We also added some memory barriers which may help
ensure we get all notifications in a timely manner.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:56:23 -07:00
Ralph Campbell 542869a17e IB/ipath: Remove duplicate copy of LMC
The LMC value was being saved by the SMA in two places. This patch
cleans it up so only one copy is kept.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:55:06 -07:00
Ralph Campbell 15cba26f42 IB/ipath: Add ability to set the LMC via the sysfs debugging interface
This patch adds the ability to set the LMC via a sysfs file as if the SM
sent a SubnSet(PortInfo) MAD.  It is useful for debugging when no SM is
running.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:53:50 -07:00
Ralph Campbell 6cff2faaf1 IB/ipath: Optimize completion queue entry insertion and polling
The code to add an entry to the completion queue stored the QPN which is
needed for the user level verbs view of the completion queue entry but
the kernel struct ib_wc contains a pointer to the QP instead of a QPN.
When the kernel polled for a completion queue entry, the QPN was lookup
up and the QP pointer recovered. This patch stores the CQE differently
based on whether the CQ is a kernel CQ or a user CQ thus avoiding the
QPN to QP lookup overhead.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:52:23 -07:00
Ralph Campbell d42b01b584 IB/ipath: Implement IB_EVENT_QP_LAST_WQE_REACHED
This patch implements the IB_EVENT_QP_LAST_WQE_REACHED event which is
needed by ib_ipoib to destroy the QP when used in connected mode.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:51:20 -07:00
Ralph Campbell c9cf7db2bc IB/ipath: Generate flush CQE when QP is in error state
Follow the IB spec. (C10-96) for post send which states that a flushed 
completion event should be generated for work requests posted when a QP
is in the error state.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:50:29 -07:00
Ralph Campbell 036be09ca5 IB/ipath: Remove redundant code
This patch removes some redundant initialization code.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:46:23 -07:00
Dave Olson d29cc6efb9 IB/ipath: Future proof eeprom checksum code (contents reading)
In an earlier change, the amount of data read from the flash was
mistakenly limited to the size known to the current driver.  This causes
problems when the length is increased, and written with the new longer
version; the checksum would fail because not enough data was read.
Always read the full 128 byte length to prevent this.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:45:57 -07:00
Ralph Campbell 55046698fa IB/ipath: UC RDMA WRITE with IMMEDIATE doesn't send the immediate
This patch fixes a bug in the receive processing for UC RDMA WRITE with
immediate which caused the last packet to be dropped.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:44:56 -07:00
Dave Olson 9ef8617af7 IB/ipath: Correctly describe workaround for TID write chip bug
This is a comment change, only, correcting the comment to match the
implemented workaround, rather than the original workaround, and
clarifying why it's needed.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:44:20 -07:00
Ralph Campbell 1793b4771d IB/ipath: Remove unneeded code for ipathfs
The ipathfs file system is used to export binary data verses ASCII data
such as through /sys. This patch removes some unneeded files since the
data is available through other /sys files.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:43:17 -07:00
Dave Olson 9bec399231 IB/ipath: Verify host bus bandwidth to chip will not limit performance
There have been a number of issues where host bandwidth via HT or PCIe
to the InfiniPath chip has been limited in some fashion (BIOS,
configuration, etc.), resulting in user confusion.  This check gives a
clear warning that something is wrong and needs to be resolved.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:20:15 -07:00
Ralph Campbell 4ee97180ac IB/ipath: Change UD to queue work requests like RC & UC
The code to post UD sends tried to process work requests at the time
ib_post_send() is called without using a WQE queue.  This was fine as
long as HW resources were available for sending a packet.  This patch
changes UD to be handled more like RC and UC and shares more code.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:05:49 -07:00
Ralph Campbell 210d6ca3db IB/ipath: Performance optimization for CPU differences
Different processors have different ordering restrictions for write
combining.  By taking advantage of this, we can eliminate some write
barriers when writing to the send buffers.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 20:04:14 -07:00
Jiri Slaby c3e2a8e64c V4L/DVB (6308): V4L: zc0301, remove bad usage of ERESTARTSYS
zc0301, remove bad usage of ERESTARTSYS

down_read_trylock can't be interrupted and so ERESTARTSYS would reach
userspace, which is not permitted. Change it to EAGAIN

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:25 -03:00
Jiri Slaby 3abff557d5 V4L/DVB (6307): V4L: w9968cf, remove bad usage of ERESTARTSYS
w9968cf, remove bad usage of ERESTARTSYS

down_read_trylock can't be interrupted and so ERESTARTSYS would reach
userspace, which is not permitted. Change it to EAGAIN

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:25 -03:00
Maxim Levitsky acd827d63a V4L/DVB (6306): Few clenups for saa7134 resume code
*Disable DMA explictly on suspend
*Enable DMA on resume, after all buffers were configured
*Disable overlay on resume - apps should enable it when X is resumed

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:20 -03:00
Brandon Philips 49ee718ef5 V4L/DVB (6305): V4L: videobuf-core.c avoid NULL dereferences in videobuf-core
The return value of videobuf_alloc() is unchecked but this function will
return NULL on an error.  Check for NULL and make videobuf_reqbufs()
return the number of successfully allocated buffers.

Also, fix saa7146_video.c and bttv-driver.c to use this returned
buffer count.

Tested against the vivi driver.  Not tested against saa7146 or bt8xx
devices.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:20 -03:00
Trent Piepho c726b65d07 V4L/DVB (6301): pvrusb: Update DEBUGIFC sysfs to kernel 2.6.13+
The prototypes for the show and store methods of a device_attribute changed in
kernel 2.6.13, but the code in pvrusb2 was never updated.  I guess the
DEBUGIFC stuff isn't used much....

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:20 -03:00
Trent Piepho bde00cc027 V4L/DVB (6300): CodingStyle cleanup
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:20 -03:00
Trent Piepho 102abd826a V4L/DVB (6299): dvb: Add dependencies for VIDEOBUF_DVB
It needs to select VIDEOBUF_GEN and VIDEOBUF_DMA_SG, since it uses those
modules.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:19 -03:00
Michael Krufky 21a7ad4a7e V4L/DVB (6297): cx23885: remove wrong Kconfig selection of VIDEOBUF
fix bad Kconfig dependency of cx23885 module.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:15 -03:00
Joachim Steiger fa3b877e5c V4L/DVB (6296): dib0700: add support for AverMedia DVB-T Express card
add Avermedia dvb-t express card 34 (usb2) id

Signed-off-by: Joachim Steiger <roh@hyte.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:15 -03:00
Eric Sandeen 0ac3a5bbca V4L/DVB (6295): saa7134: add autodetection for KWorld ATSC-115
Recognize the KWorld ATSC115 PCI ID as a hardware clone of the ATSC110.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:15 -03:00
Kay Sievers 54bd5b66c8 V4L/DVB (6293): V4L: convert struct class_device to struct device
The currently used "struct class_device" will be removed from the
kernel. Here is a patch that converts all users in drivers/media/video/
to struct device.

Reviewed-by: Thierry Merle <thierry.merle@free.fr>
Reviewed-by: Mike Isely <isely@pobox.com>
Reviewed-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:14 -03:00
Mauro Carvalho Chehab d4cae5a500 V4L/DVB (6292): videobuf_core init always require callback implementation
In the past, videobuf_queue_init were used to initialize PCI DMA videobuffers.
This patch renames it, to avoid confusion with the previous kernel API, doing:
	s/videobuf_queue_init/void videobuf_queue_core_init/

Also, the operations is now part of the function parameter. The function will
also add a test if this is defined, otherwise producing BUG.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:14 -03:00
Mauro Carvalho Chehab d5f1b01644 V4L/DVB (6291): Fix: avoid oops on some SMP machines
This workaround fix a bug that happens on some SMP machines. On those machines,
videobuf_iolock is called too soon, before file .mmap handler. This patch calls
the scheduler before iolocking, allowing it to properly call the pending mmap.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:14 -03:00
Mauro Carvalho Chehab 5ddff43435 V4L/DVB (6290): remove videobuf_set_pci_ops
Before the videobuf redesign, a procedure for re-using videobuf without PCI
scatter/gather where provided by changing the pci-dependent operations by
other operations.

With the newer approach, those methods are obsolete and can safelly be removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:10 -03:00
Robert P. J. Day 7568e3ce67 V4L/DVB (6289): Remove reference to dead CONFIG_UST and ust.h header
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:10 -03:00
Mauro Carvalho Chehab aecfde539e V4L/DVB (6287): Fix DMA Scatter/Gather constructor
cx23885 driver were converted to use the newer videobuf support. Unfortunately,
the constructor weren't changed. This causes an oops, since the abstract methods
(implemented as callbacks) aren't defined.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
2007-10-10 00:03:09 -03:00
Mauro Carvalho Chehab 593f18c6e4 V4L/DVB (6286): Add support for MSI TV @nywhere A/D NB
This is a Lifeview hybrid OEM board.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:09 -03:00
Jesper Juhl 925343ecdf V4L/DVB (6285): Remove pointless kmalloc() return value cast in Zoran PCI controller driver
No need to cast the void pointer returned by kmalloc() in
drivers/media/video/zoran_driver.c::v4l_fbuffer_alloc().

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:09 -03:00
Trent Piepho 409d84f85a V4L/DVB (6284): cx23885: Update to new videobuf code
cx23885 was still uses the old video-buf includes and code, which would only
`work' if one happened to be compiling against a kernel that had the old
headers.  Even then, it wouldn't actually work, it would just compile without
errors.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:09 -03:00
Trent Piepho 5a3ebe8755 V4L/DVB (6283): videobuf: Remove references to old Kconfig option name
CONFIG_VIDEO_BUF_DVB became CONFIG_VIDEOBUF_DVB.

But in these cases, it makes more sense to use CONFIG_VIDEO_SAA7134_DVB
or CONFIG_VIDEO_CX88_DVB_MODULE depending on the driver.

The reference in cx23885.h should just be removed, as the code there needs to
be included if DVB is on or off.  I do not think you can even compile the
cx23885 driver without DVB.  It's clearly just leftover from when the file was
obvious copied from the cx88 driver (which is not mentioned in the copyright
BTW).

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:08 -03:00
Christoph Hellwig 9320874a3e V4L/DVB (6279): en_50221: convert to kthread API
Here's an attempted update to the full kthread API + wake_up_process:

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
CC: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:08 -03:00
Maxim Levitsky d00cd2985e V4L/DVB (6278): Buf: fix typo that caused data loss when readng streams from device
If videobuf_read_stream reads two or more buffers it was overwriting the first one

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-10 00:03:08 -03:00
Mauro Carvalho Chehab 14f37aee29 V4L/DVB (6277): vivi cleanup: remove the unused vars
Vivi driver is now simpler. This patch removes the now unused vars.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:08 -03:00
Brandon Philips 00f98d0804 V4L/DVB (6276): V4L: videobuf-core.c lock before streaming check
The reading/streaming fields are used for mutual exclusion of the queue and
should be protected by the queue lock.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-10 00:03:05 -03:00
Brandon Philips ba32bd95d4 V4L/DVB (6275): V4L: vivi.c remove the "resource" locking
The "resource" locking in vivi isn't needed since
streamon/streamoff/read_stream do mutual exclusion using
q->reading/q->streaming.

Plus it is sort of broken:

a) res_locked() use in vivi_read() is racey.
b) res_free() calls mutex_lock twice causing streamoff to break

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:05 -03:00
Brandon Philips 85c7c70bc2 V4L/DVB (6274): V4L: vivi.c replace logic in vivi_poll with videobuf_poll_stream
Since vivi is using videobuf_read_stream() it can use videobuf_poll_stream()
now.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:05 -03:00
Brandon Philips a326ae1126 V4L/DVB (6273): V4L: vivi.c vidioc_try_fmt_cap() negotiate a valid field
If the client provides V4L2_FIELD_ANY vivi should return a valid field :)

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:00 -03:00
Maxim Levitsky 11f7078c10 V4L/DVB (6272): V4L: properly fix support for capturing interlaced video in saa7134
By "capturing interlaced video" I mean that card ensures that top field
is really top and vice versa (I think it takes the filed ID from signal)
Properly turn on/off that support depending on signal state

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:02:59 -03:00
Maxim Levitsky cb71201f20 V4L/DVB (6271): V4L: Add basic support for suspend/resume for saa7134
This adds support for suspend/resume for core of saa7134

Should fix bug#7220

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:02:59 -03:00
Maxim Levitsky f5a1ac64cc V4L/DVB (6270): V4L: Honor dev->ctl_invert when setting up the decoder in saa7134
When user sets dev->ctl_invert, driver writes negative values to
SAA7134_DEC_LUMA_CONTRAST and SAA7134_DEC_CHROMA_SATURATION,
but general code that initializes decorder ignores that

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:02:59 -03:00
Maxim Levitsky b4aeb8b823 V4L/DVB (6269): V4L: Fix a "scheduling while atomic" bug in saa7134
set_tvnorm can sleep in saa7134_i2c_xfer
(it will be called through tuner code)
but code calls it under spinlock. Fix that

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:02:58 -03:00
Maxim Levitsky 9900132f34 V4L/DVB (6268): V4L: Fix a lock inversion in generic videobuf code
videobuf_qbuf takes q->lock, and then calls
q->ops->buf_prepare which by design in all drivers calls
videobuf_iolock which calls videobuf_dma_init_user and this
takes current->mm->mmap_sem

on the other hand if user calls mumap from other thread, sys_munmap
takes current->mm->mmap_sem and videobuf_vm_close takes q->lock

Since this can occur only for V4L2_MEMORY_MMAP buffers, take
current->mm->mmap_sem in qbuf, before q->lock, and don't take
current->mm->mmap_sem videobuf_dma_init_user for those buffers

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:02:58 -03:00
Mauro Carvalho Chehab 851c0c96b2 V4L/DVB (6266): videobuf cleanup: mmap check is common to all videobuf. Make it at core
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-10 00:02:55 -03:00
Mauro Carvalho Chehab cd4765efdd V4L/DVB (6265): Prevent for calling mmap_free without an allocated buffer
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-10 00:02:55 -03:00