pandora-kernel.git
13 years agoath9k: set diversity group for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:47 +0000 (11:23 +0200)]
ath9k: set diversity group for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add fast_div_bias configuration for diversity group 1
Gabor Juhos [Tue, 21 Jun 2011 09:23:46 +0000 (11:23 +0200)]
ath9k: add fast_div_bias configuration for diversity group 1

The patch adds the missing configuration code for diversity
group 1.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove superfluous parentheses
Gabor Juhos [Tue, 21 Jun 2011 09:23:45 +0000 (11:23 +0200)]
ath9k: remove superfluous parentheses

Also remove two empty lines.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix antenna diversity configuration for non AR9485 chips
Gabor Juhos [Tue, 21 Jun 2011 09:23:44 +0000 (11:23 +0200)]
ath9k: fix antenna diversity configuration for non AR9485 chips

The current values must be used only on AR9485 chips. Other chips
requires different values.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add a missing case statement to ath_ant_div_comb_alt_check
Gabor Juhos [Tue, 21 Jun 2011 09:23:43 +0000 (11:23 +0200)]
ath9k: add a missing case statement to ath_ant_div_comb_alt_check

The 'ar9003_hw_antdiv_comb_conf_get' function sets div_group to 2
however that value is not used in 'ath_ant_div_comb_alt_check'.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use correct max_streams for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:42 +0000 (11:23 +0200)]
ath9k: use correct max_streams for AR9330

The AR9330 is a single stream chip.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: enable antenna diversity for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:41 +0000 (11:23 +0200)]
ath9k: enable antenna diversity for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: set NF limits for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:40 +0000 (11:23 +0200)]
ath9k: set NF limits for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: configure xpa bias level for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:39 +0000 (11:23 +0200)]
ath9k: configure xpa bias level for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use correct EEPROM base for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:38 +0000 (11:23 +0200)]
ath9k: use correct EEPROM base for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: enable tuning capacitance configuration for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:37 +0000 (11:23 +0200)]
ath9k: enable tuning capacitance configuration for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: skip internal regulator configuration for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:36 +0000 (11:23 +0200)]
ath9k: skip internal regulator configuration for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: enable TX/RX data byte swap for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:35 +0000 (11:23 +0200)]
ath9k: enable TX/RX data byte swap for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: configure RF channel frequency for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:34 +0000 (11:23 +0200)]
ath9k: configure RF channel frequency for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix channel frequency calculation for AR9340
Gabor Juhos [Tue, 21 Jun 2011 09:23:33 +0000 (11:23 +0200)]
ath9k: fix channel frequency calculation for AR9340

A multiplication is missing from the current formula.

Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: read spur frequency information from eeprom for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:32 +0000 (11:23 +0200)]
ath9k: read spur frequency information from eeprom for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: don't enable LDPC for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:31 +0000 (11:23 +0200)]
ath9k: don't enable LDPC for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use different BB watchdog timeout value for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:30 +0000 (11:23 +0200)]
ath9k: use different BB watchdog timeout value for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add AR9330 specific PLL initialization
Gabor Juhos [Tue, 21 Jun 2011 09:23:29 +0000 (11:23 +0200)]
ath9k: add AR9330 specific PLL initialization

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: initialize rx gain table for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:28 +0000 (11:23 +0200)]
ath9k: initialize rx gain table for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: initialize tx gain table for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:27 +0000 (11:23 +0200)]
ath9k: initialize tx gain table for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: initialize mode registers for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:26 +0000 (11:23 +0200)]
ath9k: initialize mode registers for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add AR9330 initvals
Gabor Juhos [Tue, 21 Jun 2011 09:23:25 +0000 (11:23 +0200)]
ath9k: add AR9330 initvals

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add platform device id for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:24 +0000 (11:23 +0200)]
ath9k: add platform device id for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add MAC revision detection for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:23 +0000 (11:23 +0200)]
ath9k: add MAC revision detection for AR9330

The AR9330 1.0 and 1.1 are using the same revision,
thus it is not possible to distinguish the two chips.
The platform setup code can distinguish the chips based
on the SoC revision.

Add a callback function to ath9k_platform_data in order
to allow getting the revision number from the platform code.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: define device id for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:22 +0000 (11:23 +0200)]
ath9k: define device id for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: define mac version for AR9330
Gabor Juhos [Tue, 21 Jun 2011 09:23:21 +0000 (11:23 +0200)]
ath9k: define mac version for AR9330

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix calculation of PAPRD training power at 5Ghz
Mohammed Shafi Shajakhan [Tue, 21 Jun 2011 09:21:46 +0000 (14:51 +0530)]
ath9k_hw: Fix calculation of PAPRD training power at 5Ghz

higher the chainmask, lesser the power_delta to be added
to the paprd_training_power

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: use netlink consistent dump feature for BSS dumps
Johannes Berg [Tue, 21 Jun 2011 07:45:33 +0000 (09:45 +0200)]
nl80211: use netlink consistent dump feature for BSS dumps

Use the new consistent dump feature from (generic) netlink
to advertise when dumps are incomplete.

Readers may note that this does not initialize the
rdev->bss_generation counter to a non-zero value. This is
still OK since the value is modified only under spinlock
when the list is modified. Since the dump code holds the
spinlock, the value will either be > 0 already, or the
list will still be empty in which case a consistent dump
will actually be made (and be empty).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove casts of void pointers
Amitkumar Karwar [Mon, 20 Jun 2011 22:21:48 +0000 (15:21 -0700)]
mwifiex: remove casts of void pointers

In some cases local pointers are used to cast void pointers passed to
the function. Those unnecessary local pointers are also removed.

This patch was inspired by Joe Perches' patch
[PATCH net-next 1/2] wireless: Remove casts of void *;
and the comments from Julian Calaby.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Cc: Joe Perches <joe@perches.com>
Cc: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: detect stalled beacon interrupt faster
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:54 +0000 (14:42 +0300)]
zd1211rw: detect stalled beacon interrupt faster

As USB_INT_ID_RETRY_FAILED can override USB_INT_ID_REGS, beacon interrupt
(CR_INTERRUPT) might be lost. Problem is that when device trigger CR_INTERRUPT
it disables HW interrupt. Now if USB_INT_ID_REGS with CR_INTERRUPT gets lost,
beacon interrupt stays disabled until beacon watchdog notices the stall. This
happen very often on heavy TX. Improve watchdog to trigger earlier, after three
missing beacon interrupts.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: don't let zd_mac_config_beacon() run too long from beacon interrupt handler
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:49 +0000 (14:42 +0300)]
zd1211rw: don't let zd_mac_config_beacon() run too long from beacon interrupt handler

zd_mac_config_beacon() has only limited time to set up beacon when called from
beacon interrupt handler/worker. So do not let it retry acquiring beacon fifo
semaphore in interrupt handler. Beacon fifo semaphore should not be locked by
firmware anyway at this time, it's only locked when device is using/txing
beacon.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: handle lost read-reg interrupts
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:44 +0000 (14:42 +0300)]
zd1211rw: handle lost read-reg interrupts

Device losses read-reg interrupts. By looking at usbmon it appears that
USB_INT_ID_RETRY_FAILED can override USB_INT_ID_REGS. This causes read
command to timeout, usually under heavy TX.

Fix by retrying read registers again if USB_INT_ID_RETRY_FAILED is received
while waiting for USB_INT_ID_REGS.

However USB_INT_ID_REGS is not always lost but is received after
USB_INT_ID_RETRY_FAILED and is usually received by the retried read
command. USB_INT_ID_REGS of the retry is then left unhandled and might
be received by next read command. Handle this by ignoring previous
USB_INT_ID_REGS that doesn't match current read command request.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: only update HW beacon if new beacon differs from currect
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:39 +0000 (14:42 +0300)]
zd1211rw: only update HW beacon if new beacon differs from currect

Update HW beacon only when needed. This appears to make device work in AP-mode
(dtim_period=1) somewhat more stable.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: make 'handle_rx_packet: invalid, small RX packet' message debug-only
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:33 +0000 (14:42 +0300)]
zd1211rw: make 'handle_rx_packet: invalid, small RX packet' message debug-only

This message is should be debug-only as it tells almost nothing useful. It also
happens very often and just floods logs.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: fix invalid signal values from device
Jussi Kivilinna [Mon, 20 Jun 2011 11:42:28 +0000 (14:42 +0300)]
zd1211rw: fix invalid signal values from device

Driver uses IEEE80211_HW_SIGNAL_UNSPEC and so signal values reported to
mac80211 should be in range 0..100. Sometimes device return out of range
values. These out of range values can then trigger warning in
cfg80211_inform_bss_frame.

This patch adds checks to enforce range returned from driver to
mac80211 be in 0..100 range.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonetlink: advertise incomplete dumps
Johannes Berg [Mon, 20 Jun 2011 11:40:46 +0000 (13:40 +0200)]
netlink: advertise incomplete dumps

Consider the following situation:
 * a dump that would show 8 entries, four in the first
   round, and four in the second
 * between the first and second rounds, 6 entries are
   removed
 * now the second round will not show any entry, and
   even if there is a sequence/generation counter the
   application will not know

To solve this problem, add a new flag NLM_F_DUMP_INTR
to the netlink header that indicates the dump wasn't
consistent, this flag can also be set on the MSG_DONE
message that terminates the dump, and as such above
situation can be detected.

To achieve this, add a sequence counter to the netlink
callback struct. Of course, netlink code still needs
to use this new functionality. The correct way to do
that is to always set cb->seq when a dumpit callback
is invoked and call nl_dump_check_consistent() for
each new message. The core code will also call this
function for the final MSG_DONE message.

To make it usable with generic netlink, a new function
genlmsg_nlhdr() is needed to obtain the netlink header
from the genetlink user header.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: calibrate radio after switching channel
Rafał Miłecki [Mon, 20 Jun 2011 01:12:19 +0000 (03:12 +0200)]
b43: HT-PHY: calibrate radio after switching channel

After uploading radio values calibration goes in. In MMIO dump it is:
 radio_read(0x002b) -> 0x0008
radio_write(0x002b) <- 0x0008
 radio_read(0x002e) -> 0x0004
radio_write(0x002e) <- 0x0000
 radio_read(0x002e) -> 0x0000
radio_write(0x002e) <- 0x0004
 radio_read(0x002b) -> 0x0008
radio_write(0x002b) <- 0x0009
To find masks and sets, MMIO hacks were used to fool closed driver.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: reset usb devices at probe
Stanislaw Gruszka [Sun, 19 Jun 2011 17:47:39 +0000 (19:47 +0200)]
rt2x00: reset usb devices at probe

When module is reloaded, device may fail to work, with messages:

[  342.211926] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x0059, type=2.
[  342.314254] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x004a, type=2.
[  342.416458] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 3183 max 2432.
[  342.518605] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x00c9, type=2.
[  342.620836] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x00ae, type=1.
[  342.723201] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 0 max 2432.
[  342.825399] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 0 max 2432.
[  342.927624] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 0 max 2432.
[  343.029804] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 2491 max 2432.
[  343.132008] phy40 -> rt2x00lib_rxdone: Warning - Wrong frame size 2576 max 2432.
[  343.234326] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x004c, type=1.
[  343.438723] phy40 -> rt2x00lib_rxdone_read_signal: Warning - Frame received with unrecognized signal, mode=0x0000, signal=0x00e6, type=1.

Whereas replugging device make it functional. To solve that problem
force reset device during probe.

With patch messages are gone. Unfortunately device may sometimes
still does not operate correctly after module reload (fail to receive
data after associate), but such cases are rarer than without the patch.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: fix possible memory corruption in case of invalid rxdesc.size
Stanislaw Gruszka [Sun, 19 Jun 2011 17:46:02 +0000 (19:46 +0200)]
rt2x00: fix possible memory corruption in case of invalid rxdesc.size

Sometimes rxdesc descriptor provided by hardware contains invalid
(random) data. For example rxdesc.size can be bigger than actual
size of the buffer. When this happen rt2x00crypto_rx_insert_iv()
corrupt memory doing memmove outside of buffer boundaries.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: move declarations of chantables functions to correct files
Rafał Miłecki [Sun, 19 Jun 2011 11:30:21 +0000 (13:30 +0200)]
b43: N-PHY: move declarations of chantables functions to correct files

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: update switching analog on/off
Rafał Miłecki [Sun, 19 Jun 2011 11:30:20 +0000 (13:30 +0200)]
b43: N-PHY: update switching analog on/off

Specs were recently updated.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: switch radio to requested channel
Rafał Miłecki [Sun, 19 Jun 2011 10:17:21 +0000 (12:17 +0200)]
b43: HT-PHY: switch radio to requested channel

Switching channel happens after specific SHM write to B43_SHM_SH_CHAN.
This is the way we found it in BCM4331 MMIO dumps. By comparing with
N-PHY code we noticed there is routing used for SYN and TX/RX.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: add place for implementing channel switching
Rafał Miłecki [Sun, 19 Jun 2011 10:17:20 +0000 (12:17 +0200)]
b43: HT-PHY: add place for implementing channel switching

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: define standard structs for channel switching
Rafał Miłecki [Sun, 19 Jun 2011 10:17:19 +0000 (12:17 +0200)]
b43: HT-PHY: define standard structs for channel switching

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: enable radio
Rafał Miłecki [Sun, 19 Jun 2011 00:18:12 +0000 (02:18 +0200)]
b43: HT-PHY: enable radio

The trick was to find 0x810 PHY reg ops close to analog enabling code.
To find out proper masks and sets, MMIO hacks were used.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: HT-PHY: implement killing radio
Rafał Miłecki [Sun, 19 Jun 2011 00:18:11 +0000 (02:18 +0200)]
b43: HT-PHY: implement killing radio

Closed drivers kill radio right after reading radio version and MACCTL,
so it was easy to find related PHY ops:
 phy_read(0x0810) -> 0x0000
phy_write(0x0810) <- 0x0000
To find out the mask of above OP, MMIO hack was used to fake read val:
 phy_read(0x0810) -> 0xffff
phy_write(0x0810) <- 0x0000

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetoot...
John W. Linville [Wed, 22 Jun 2011 20:06:58 +0000 (16:06 -0400)]
Merge branch 'master' of /linux/kernel/git/padovan/bluetooth-next-2.6

13 years agoip: introduce ip_is_fragment helper inline function
Paul Gortmaker [Wed, 22 Jun 2011 03:33:34 +0000 (20:33 -0700)]
ip: introduce ip_is_fragment helper inline function

There are enough instances of this:

    iph->frag_off & htons(IP_MF | IP_OFFSET)

that a helper function is probably warranted.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoirda: fix smsc-ircc2 section mismatch warning
Randy Dunlap [Wed, 22 Jun 2011 03:32:53 +0000 (20:32 -0700)]
irda: fix smsc-ircc2 section mismatch warning

Fix section mismatch warning:

WARNING: drivers/net/irda/smsc-ircc2.o(.devinit.text+0x1a7): Section mismatch in reference from the function smsc_ircc_pnp_probe() to the function .init.text:smsc_ircc_open()

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: remove mm.h inclusion from netdevice.h
Alexey Dobriyan [Thu, 16 Jun 2011 11:01:34 +0000 (11:01 +0000)]
net: remove mm.h inclusion from netdevice.h

Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).

To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h".
Removal of mm.h from scatterlist.h was tried and was found not feasible
on most archs, so the link was cutoff earlier.

Hope people are OK with tiny include file.

Note, that mm_types.h is still dragged in, but it is a separate story.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcb: Add missing error check in dcb_ieee_set()
John Fastabend [Tue, 21 Jun 2011 07:35:04 +0000 (07:35 +0000)]
dcb: Add missing error check in dcb_ieee_set()

Missing error checking before nla_parse_nested().

Reported-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcb: fix return type on dcb_setapp()
John Fastabend [Tue, 21 Jun 2011 07:34:58 +0000 (07:34 +0000)]
dcb: fix return type on dcb_setapp()

Incorrect return type on dcb_setapp() this routine
returns negative error codes. All call sites of
dcb_setapp() assign the return value to an int already
so no need to update drivers.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcb: Add dcb_ieee_getapp_mask() for drivers to query APP settings
John Fastabend [Tue, 21 Jun 2011 07:34:53 +0000 (07:34 +0000)]
dcb: Add dcb_ieee_getapp_mask() for drivers to query APP settings

With multiple APP entries per selector and protocol drivers
or stacks may want to pick a specific value or stripe traffic
across many priorities. Also if an APP entry in use is
deleted the stack/driver may want to choose from the existing
APP entries.

To facilitate this and avoid having duplicate code to walk
the APP ring provide a routine dcb_ieee_getapp_mask() to
return a u8 bitmask of all priorities set for the specified
selector and protocol. This routine and bitmask is a helper
for DCB kernel users.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcb: Add ieee_dcb_delapp() and dcb op to delete app entry
John Fastabend [Tue, 21 Jun 2011 07:34:48 +0000 (07:34 +0000)]
dcb: Add ieee_dcb_delapp() and dcb op to delete app entry

Now that we allow multiple IEEE App entries we need a way
to remove specific entries. To do this add the ieee_dcb_delapp()
routine.

Additionaly drivers may need to remove the APP entry from
their firmware tables. Add dcb ops routine to handle this.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcb: Add ieee_dcb_setapp() to be used for IEEE 802.1Qaz APP data
John Fastabend [Tue, 21 Jun 2011 07:34:42 +0000 (07:34 +0000)]
dcb: Add ieee_dcb_setapp() to be used for IEEE 802.1Qaz APP data

This adds a setapp routine for IEEE802.1Qaz encoded APP data types.
The IEEE 802.1Qaz spec encodes the priority bits differently and
allows for multiple APP data entries of the same selector and
protocol. Trying to force these to use the same set routines was
becoming tedious. Furthermore, userspace could probably enforce
the correct semantics, but expecting drivers to do this seems
error prone in the firmware case.

For these reasons add ieee_dcb_setapp() that understands the
IEEE 802.1Qaz encoded form.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: dcbnl, add multicast group for DCB
John Fastabend [Tue, 21 Jun 2011 07:34:37 +0000 (07:34 +0000)]
net: dcbnl, add multicast group for DCB

Now that dcbnl is being used in many cases by more
than a single agent it is beneficial to be notified
when some entity either driver or user space has
changed the DCB attributes.

Today applications either end up polling the interface
or relying on a user space database to maintain the DCB
state and post events. Polling is a poor solution for
obvious reasons. And relying on a user space database
has its own downside. Namely it has created strange
boot dependencies requiring the database be populated
before any applications dependent on DCB attributes
starts or the application goes into a polling loop.
Populating the database requires negotiating link
setting with the peer and can take anywhere from less
than a second up to a few seconds depending on the switch
implementation.

Perhaps more importantly if another application or an
embedded agent sets a DCB link attribute the database
has no way of knowing other than polling the kernel.
This prevents applications from responding quickly to
changes in link events which at least in the FCoE case
and probably any other protocols expecting a lossless
link may result in IO errors.

By adding a multicast group for DCB we have clean way
to disseminate kernel DCB link attributes up to user
space. Avoiding the need for user space to maintain
a coherant database and disperse events that potentially
do not reflect the current link state.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcb: Add DCBX capabilities bitmask to the get_ieee response
John Fastabend [Tue, 21 Jun 2011 07:34:31 +0000 (07:34 +0000)]
dcb: Add DCBX capabilities bitmask to the get_ieee response

Adding the capabilities bitmask to the get_ieee response allows
user space to determine the current DCBX mode. Either CEE or IEEE
this is useful with devices that support switching between modes
where knowing the current state is relevant.

Derived from work by Mark Rustad

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocnic, bnx2i: Add support for new devices - 57800, 57810, and 57840
Michael Chan [Mon, 20 Jun 2011 15:15:56 +0000 (15:15 +0000)]
cnic, bnx2i: Add support for new devices - 57800, 57810, and 57840

And change iSCSI RQ doorbell size from 16B to 64B to match new firmware.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocore: add tracepoints for queueing skb to rcvbuf
Satoru Moriya [Fri, 17 Jun 2011 12:00:03 +0000 (12:00 +0000)]
core: add tracepoints for queueing skb to rcvbuf

This patch adds 2 tracepoints to get a status of a socket receive queue
and related parameter.

One tracepoint is added to sock_queue_rcv_skb. It records rcvbuf size
and its usage. The other tracepoint is added to __sk_mem_schedule and
it records limitations of memory for sockets and current usage.

By using these tracepoints we're able to know detailed reason why kernel
drop the packet.

Signed-off-by: Satoru Moriya <satoru.moriya@hds.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoudp: add tracepoints for queueing skb to rcvbuf
Satoru Moriya [Fri, 17 Jun 2011 11:58:39 +0000 (11:58 +0000)]
udp: add tracepoints for queueing skb to rcvbuf

This patch adds a tracepoint to __udp_queue_rcv_skb to get the
return value of ip_queue_rcv_skb. It indicates why kernel drops
a packet at this point.

ip_queue_rcv_skb returns following values in the packet drop case:

rcvbuf is full                 : -ENOMEM
sk_filter returns error        : -EINVAL, -EACCESS, -ENOMEM, etc.
__sk_mem_schedule returns error: -ENOBUF

Signed-off-by: Satoru Moriya <satoru.moriya@hds.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoRemove redundant linux/version.h includes from net/
Jesper Juhl [Mon, 20 Jun 2011 12:13:10 +0000 (12:13 +0000)]
Remove redundant linux/version.h includes from net/

It was suggested by "make versioncheck" that the follwing includes of
linux/version.h are redundant:

  /home/jj/src/linux-2.6/net/caif/caif_dev.c: 14 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/caif/chnl_net.c: 10 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/ipv4/gre.c: 19 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/netfilter/ipset/ip_set_core.c: 20 linux/version.h not needed.
  /home/jj/src/linux-2.6/net/netfilter/xt_set.c: 16 linux/version.h not needed.

and it seems that it is right.

Beyond manually inspecting the source files I also did a few build
tests with various configs to confirm that including the header in
those files is indeed not needed.

Here's a patch to remove the pointless includes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomv643xx_eth: enable transmit time stamping.
Richard Cochran [Tue, 21 Jun 2011 23:01:11 +0000 (16:01 -0700)]
mv643xx_eth: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping.
Compile tested only.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomv643xx_eth: fix race in trasmit path.
Richard Cochran [Tue, 21 Jun 2011 23:00:24 +0000 (16:00 -0700)]
mv643xx_eth: fix race in trasmit path.

Because the socket buffer is freed in the completion interrupt, it is not
safe to access it after submitting it to the hardware.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxen: convert to 64 bit stats interface
stephen hemminger [Tue, 21 Jun 2011 05:35:31 +0000 (05:35 +0000)]
xen: convert to 64 bit stats interface

Convert xen driver to 64 bit statistics interface.
Use stats_sync to ensure that 64 bit update is read atomically on 32 bit platform.
Put hot statistics into per-cpu table.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: fix 64 bit access on 32 bit platforms
stephen hemminger [Mon, 20 Jun 2011 10:35:07 +0000 (10:35 +0000)]
vxge: fix 64 bit access on 32 bit platforms

Need to add stat_sync wrapper around 64 bit statistic values.
Fix wraparound bug in lockup detector where it is unsafely comparing
64 bit value that is not atomic. Since only care about detecting activity
just looking at current low order bits will work.

Remove unused entries in old vxge_sw_stats structure.
Change the error counters to unsigned long since they won't grow so large
as to have to be 64 bits.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: convert to 64 bit stats
stephen hemminger [Mon, 20 Jun 2011 11:42:30 +0000 (11:42 +0000)]
ifb: convert to 64 bit stats

Convert input functional block device to use 64 bit stats.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: Remove casts of void *
Joe Perches [Thu, 16 Jun 2011 19:08:06 +0000 (19:08 +0000)]
drivers/net: Remove casts of void *

Unnecessary casts of void * clutter the code.

These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.

Done via coccinelle script (and a little editing):

$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@

- pt = (T *)pv;
+ pt = pv;

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Acked-By: Chris Snook <chris.snook@gmail.com>
Acked-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoBluetooth: Fix not setting the chan state
Vinicius Costa Gomes [Mon, 20 Jun 2011 21:53:18 +0000 (18:53 -0300)]
Bluetooth: Fix not setting the chan state

When the connection is ready we should set the connection
to CONNECTED so userspace can use it.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6
Gustavo F. Padovan [Tue, 21 Jun 2011 17:52:56 +0000 (14:52 -0300)]
Merge /linux/kernel/git/padovan/bluetooth-2.6

Conflicts:
net/bluetooth/l2cap_core.c

13 years agoixgbe: setup per CPU PCI pool for FCoE DDP
Vasu Dev [Wed, 11 May 2011 05:41:46 +0000 (05:41 +0000)]
ixgbe: setup per CPU PCI pool for FCoE DDP

Currently single PCI pool used across all CPUs and that
doesn't scales up as number of CPU increases, so this
patch adds per CPU PCI pool to setup udl and that aligns
well from FCoE stack as that already has per CPU exch locking.

Adds per CPU PCI alloc setup and free in
ixgbe_fcoe_ddp_pools_alloc and ixgbe_fcoe_ddp_pools_free,
use CPU specific pool during DDP setup.

Re-arranged ixgbe_fcoe struct to have fewer holes
along with adding pools ptr using pahole.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add support for Dell CEM
Emil Tantilov [Sat, 7 May 2011 07:40:20 +0000 (07:40 +0000)]
ixgbe: add support for Dell CEM

This patch adds support for Dell CEM (Comprehensive Embedded Management)).
This consists of informing the management firmware of the driver version
during probe on 82599 and X540 HW.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Evan Swanson <evan.swanson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, remove unneeded ixgbe_dcb_txq_to_tc() routine
John Fastabend [Tue, 26 Apr 2011 07:26:36 +0000 (07:26 +0000)]
ixgbe: DCB, remove unneeded ixgbe_dcb_txq_to_tc() routine

The ixgbe_dcb_txq_to_tc() routine was used to map TX rings to
a DCB traffic class. Now that a tx_ring has a DCB traffic class
associated with it this routine is no longer needed.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB and perfect filters can coexist
John Fastabend [Tue, 26 Apr 2011 07:26:30 +0000 (07:26 +0000)]
ixgbe: DCB and perfect filters can coexist

Now flow directors perfect filters features can coexist with DCB.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix bit mask for DCB version
John Fastabend [Tue, 26 Apr 2011 07:26:25 +0000 (07:26 +0000)]
ixgbe: fix bit mask for DCB version

This bit mask is wrong DCBX_HOST is always set. It was missed up
until now because lldpad reprograms the device on a link
event. However this is still wrong and it is best not to be
mis-configured for some time immediately following ixgbe_up().

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: setup redirection table for multiple packet buffers
John Fastabend [Tue, 26 Apr 2011 07:26:19 +0000 (07:26 +0000)]
ixgbe: setup redirection table for multiple packet buffers

Setup RSS redirection table to be compatible with multiple packet
buffers. Currently, this works on 82599 devices because the RSS
redirection index is masked by the number of queues per packet
buffer.

This sets the cap on the RSS table to maxq.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB 82598 devices, tx_idx and rx_idx swapped
John Fastabend [Tue, 26 Apr 2011 07:26:14 +0000 (07:26 +0000)]
ixgbe: DCB 82598 devices, tx_idx and rx_idx swapped

The tx_idx and rx_idx values are swapped on 82598 devices
with DCB enabled.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB use existing TX and RX queues
John Fastabend [Tue, 26 Apr 2011 07:26:08 +0000 (07:26 +0000)]
ixgbe: DCB use existing TX and RX queues

The number of TX and RX queues allocated depends on the device
type, the current features set, online CPUs, and various
compile flags.

To enable DCB with multiple queues and allow it to coexist with
all the features currently implemented it has to setup a valid
queue count. This is done at init time using the FDIR and RSS
max queue counts and allowing each TC to allocate a queue per
CPU.

DCB will now use available queues up to (8 x TCs) this is somewhat
arbitrary cap but allows DCB to use up to 64 queues. Its easy to
increase this later if that is needed.

This is prep work to enable Flow Director with DCB. After this
DCB can easily coexist with existing features and no longer
needs its own DCB feature ring.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: configure minimal packet buffers to support TC
John Fastabend [Tue, 3 May 2011 02:26:48 +0000 (02:26 +0000)]
ixgbe: configure minimal packet buffers to support TC

ixgbe devices support different numbers of packet buffers either
8 or 4. Here we only allocate the minimal number of packet
buffers required to implement the net_devices number of traffic
classes.

Fewer traffic classes allows for larger packet buffers in
hardware. Also more Tx/Rx queues can be given to each
traffic class.

This patch is mostly about propagating the number of traffic
classes through the init path. Specifically this adds the 4TC
cases to the MRQC and MTQC setup routines. Also ixgbe_setup_tc()
was sanitized to handle other traffic class value.

Finally changing the number of packet buffers in the hardware
requires the device to reinit. So this moves the reinit work
from DCB into the main ixgbe_setup_tc() routine to consolidate
the reset code. Now dcbnl_xxx ops call ixgbe_setup_tc() to
configure packet buffers if needed.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: consolidate MRQC and MTQC handling
John Fastabend [Tue, 26 Apr 2011 07:25:58 +0000 (07:25 +0000)]
ixgbe: consolidate MRQC and MTQC handling

The MRQC and MTQC registers are configured in the main
setup path but are also reconfigured in the DCB setup
path. The DCB path fixes the DCB configuration by configuring
the SECTXMINIFG gap which is required for DCB pause
to operate correctly.

This patch reduces the duplicate code and does all setup
in ixgbe_setup_mtqc() and ixgbe_setup_mrqc().

Additionally, this removes the IXGBE_QDE. This write never
set the WRITE bit in the register so the write was not
actually doing anything. Also this was to clear the register
but, it is never set and defaults to zero. If this is
needed for SRIOV it should be added correctly in a follow
up patch. But it's never been working so removing it here
should be OK.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: consolidate packet buffer allocation
John Fastabend [Mon, 2 May 2011 12:34:10 +0000 (12:34 +0000)]
ixgbe: consolidate packet buffer allocation

Consolidate packet buffer allocation currently being
done in the DCB path and main path. This allows the
feature set and packet buffer requirements to be done
once.

This is prep work to allow DCB to coexist with other
features namely, flow director.

CC: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: dcbnl reduce duplicated code and indentation
John Fastabend [Tue, 26 Apr 2011 10:05:14 +0000 (10:05 +0000)]
ixgbe: dcbnl reduce duplicated code and indentation

Replace duplicated code in if/else branches with single
check and ixgbe_init_interrupt_scheme().

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbevf: remove unnecessary ampersands
Stephen Hemminger [Thu, 9 Jun 2011 02:58:39 +0000 (02:58 +0000)]
ixgbevf: remove unnecessary ampersands

Use standard format for net_device_ops (without &)

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Greg Rose <Gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbevf: Fix bungled declaration of ixgbevf_mbx_ops
Greg Rose [Wed, 8 Jun 2011 07:32:38 +0000 (07:32 +0000)]
ixgbevf: Fix bungled declaration of ixgbevf_mbx_ops

In two places storage for mbx_ops is misidentified as type
ixgbe_mac_operations.

Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: convert to ndo_fix_features
Michał Mirosław [Wed, 8 Jun 2011 08:38:01 +0000 (08:38 +0000)]
igb: convert to ndo_fix_features

Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
Removing this needs deeper surgery.

Things noticed:
 - HW VLAN acceleration probably can be toggled, but it's left as is
 - the resets on RX csum offload change can probably be avoided
 - there is A LOT of copy-and-pasted code here

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000: convert to ndo_fix_features
Michał Mirosław [Wed, 8 Jun 2011 08:36:42 +0000 (08:36 +0000)]
e1000: convert to ndo_fix_features

Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
Removing this needs deeper surgery.

Things noticed:
 - RX csum disabled by default
 - HW VLAN acceleration probably can be toggled, but it's left as is
 - the resets on RX csum offload change can probably be avoided
 - there is A LOT of copy-and-pasted code here

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 21 Jun 2011 05:29:08 +0000 (22:29 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/rtlwifi/pci.c
net/netfilter/ipvs/ip_vs_core.c

13 years agoLinux 3.0-rc4 v3.0-rc4
Linus Torvalds [Tue, 21 Jun 2011 03:25:46 +0000 (20:25 -0700)]
Linux 3.0-rc4

13 years agovfs: i_state needs to be 'unsigned long' for now
Linus Torvalds [Tue, 21 Jun 2011 03:13:49 +0000 (20:13 -0700)]
vfs: i_state needs to be 'unsigned long' for now

Commit 13e12d14e2dc ("vfs: reorganize 'struct inode' layout a bit")
moved things around a bit changed i_state to be unsigned int instead of
unsigned long.  That was to help structure layout for the 64-bit case,
and shrink 'struct inode' a bit (admittedly that only happened when
spinlock debugging was on and i_flags didn't pack with i_lock).

However, Meelis Roos reports that this results in unaligned exceptions
on sprc, and it turns out that the bit-locking primitives that we use
for the I_NEW bit want to use the bitops.  Which want 'unsigned long',
not 'unsigned int'.

We really should fix the bit locking code to not have that kind of
requirement, but that's a much bigger change.  So for now, revert that
field back to 'unsigned long' (but keep the other re-ordering changes
from the commit that caused this).

Andi points out that we have played games with this in 'struct page', so
it's solvable with other hacks too, but since right now the struct inode
size advantage only happens with some rare config options, it's not
worth fighting.

It _would_ be worth fixing the bitlocking code, though.  Especially
since there is no type safety in the bitlocking code (this never caused
any warnings, and worked fine on x86-64, because the bitlocks take a
'void *' and x86-64 doesn't care that deeply about alignment).  So it's
currently a very easy problem to trigger by mistake and never notice.

Reported-by: Meelis Roos <mroos@linux.ee>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 21 Jun 2011 03:12:48 +0000 (20:12 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms/r6xx+: voltage fixes
  drm/nouveau: drop leftover debugging
  drm/radeon: avoid warnings from r600/eg irq handlers on powered off card.
  drm/radeon/kms: add missing param for dce3.2 DP transmitter setup
  drm/radeon/kms/atom: fix duallink on some early DCE3.2 cards
  drm/nouveau: fix assumption that semaphore dmaobj is valid in x-chan sync
  drm/nv50/disp: fix gamma with page flipping overlay turned on
  drm/nouveau/pm: Prevent overflow in nouveau_perf_init()
  drm/nouveau: fix big-endian switch

13 years agoMerge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm
Linus Torvalds [Tue, 21 Jun 2011 03:11:34 +0000 (20:11 -0700)]
Merge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm

* 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm:
  msm: timer: Fix DGT rate on 8960 and 8660
  msm: timer: compensate for timer shift in msm_read_timer_count
  msm: timer: Fix SMP build error

13 years agoMerge branch 'for-2.6.40' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Tue, 21 Jun 2011 03:10:52 +0000 (20:10 -0700)]
Merge branch 'for-2.6.40' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.40' of git://linux-nfs.org/~bfields/linux:
  nfsd4: fix break_lease flags on nfsd open
  nfsd: link returns nfserr_delay when breaking lease
  nfsd: v4 support requires CRYPTO
  nfsd: fix dependency of nfsd on auth_rpcgss

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 21 Jun 2011 03:10:18 +0000 (20:10 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
  pxa168_eth: fix race in transmit path.
  ipv4, ping: Remove duplicate icmp.h include
  netxen: fix race in skb->len access
  sgi-xp: fix a use after free
  hp100: fix an skb->len race
  netpoll: copy dev name of slaves to struct netpoll
  ipv4: fix multicast losses
  r8169: fix static initializers.
  inet_diag: fix inet_diag_bc_audit()
  gigaset: call module_put before restart of if_open()
  farsync: add module_put to error path in fst_open()
  net: rfs: enable RFS before first data packet is received
  fs_enet: fix freescale FCC ethernet dp buffer alignment
  netdev: bfin_mac: fix memory leak when freeing dma descriptors
  vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support
  caif: Bugfix - XOFF removed channel from caif-mux
  tun: teach the tun/tap driver to support netpoll
  dp83640: drop PHY status frames in the driver.
  dp83640: fix phy status frame event parsing
  phylib: Allow BCM63XX PHY to be selected only on BCM63XX.
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Tue, 21 Jun 2011 03:09:15 +0000 (20:09 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  devcgroup_inode_permission: take "is it a device node" checks to inlined wrapper
  fix comment in generic_permission()
  kill obsolete comment for follow_down()
  proc_sys_permission() is OK in RCU mode
  reiserfs_permission() doesn't need to bail out in RCU mode
  proc_fd_permission() is doesn't need to bail out in RCU mode
  nilfs2_permission() doesn't need to bail out in RCU mode
  logfs doesn't need ->permission() at all
  coda_ioctl_permission() is safe in RCU mode
  cifs_permission() doesn't need to bail out in RCU mode
  bad_inode_permission() is safe from RCU mode
  ubifs: dereferencing an ERR_PTR in ubifs_mount()

13 years agodrm/radeon/kms/r6xx+: voltage fixes
Alex Deucher [Mon, 20 Jun 2011 17:00:31 +0000 (13:00 -0400)]
drm/radeon/kms/r6xx+: voltage fixes

0xff01 is not an actual voltage value, but a flag
for the driver.  If the power state as that value,
skip setting the voltage.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomsm: timer: Fix DGT rate on 8960 and 8660
Stephen Boyd [Thu, 21 Apr 2011 23:09:11 +0000 (23:09 +0000)]
msm: timer: Fix DGT rate on 8960 and 8660

The DGT runs at 27 MHz divided by 4 on 8660 and 8960.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
13 years agopxa168_eth: fix race in transmit path.
Richard Cochran [Sun, 19 Jun 2011 21:48:06 +0000 (21:48 +0000)]
pxa168_eth: fix race in transmit path.

Because the socket buffer is freed in the completion interrupt, it is not
safe to access it after submitting it to the hardware.

Cc: stable@kernel.org
Cc: Sachin Sanap <ssanap@marvell.com>
Cc: Zhangfei Gao <zgao6@marvell.com>
Cc: Philip Rakity <prakity@marvell.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogianfar v5: implement nfc
Sebastian Poehn [Mon, 20 Jun 2011 20:57:59 +0000 (13:57 -0700)]
gianfar v5: implement nfc

This patch adds all missing functionalities for nfc except GRXFH. There is so much code because hardware has not a TCAM.
Further hardware rule space is very limited. So I had to extensively use
optimization features. Both reasons lead to the necessity to hold all
online flows in a linked-list.

Change-log:
# Some suggestions by Joe Perches applied (thanks!)
# Shorted some logs
# Use memcmp() for comparing

Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoucc_geth: enable transmit time stamping.
Richard Cochran [Sun, 19 Jun 2011 21:51:33 +0000 (21:51 +0000)]
ucc_geth: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping.
Compile tested only.

Cc: Shlomi Gridish <gridish@freescale.com>
Cc: Li Yang <leoli@freescale.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopxa168_eth: enable transmit time stamping.
Richard Cochran [Sun, 19 Jun 2011 21:51:31 +0000 (21:51 +0000)]
pxa168_eth: enable transmit time stamping.

This patch enables software (and phy device) transmit time stamping
Compile tested only.

Cc: Sachin Sanap <ssanap@marvell.com>
Cc: Zhangfei Gao <zgao6@marvell.com>
Cc: Philip Rakity <prakity@marvell.com>
Cc: Mark Brown <markb@marvell.com>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>