* [PATCH net-next] vmxnet3: make bit twiddle routines inline
From: Stephen Hemminger @ 2010-10-15 21:06 UTC (permalink / raw)
To: Shreyas Bhatewara, David S. Miller; +Cc: VMware, Inc., netdev
Gcc doesn't usually handle inline across compilation units, and the
functions don't have to be global in scope. Move the set/reset flag
functions int the existing vmxnet3 header.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 17 -----------------
drivers/net/vmxnet3/vmxnet3_int.h | 17 ++++++++++++++---
2 files changed, 14 insertions(+), 20 deletions(-)
--- a/drivers/net/vmxnet3/vmxnet3_drv.c 2010-10-15 13:58:23.378722695 -0700
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c 2010-10-15 13:59:32.724873755 -0700
@@ -1548,23 +1548,6 @@ vmxnet3_free_irqs(struct vmxnet3_adapter
}
}
-
-inline void set_flag_le16(__le16 *data, u16 flag)
-{
- *data = cpu_to_le16(le16_to_cpu(*data) | flag);
-}
-
-inline void set_flag_le64(__le64 *data, u64 flag)
-{
- *data = cpu_to_le64(le64_to_cpu(*data) | flag);
-}
-
-inline void reset_flag_le64(__le64 *data, u64 flag)
-{
- *data = cpu_to_le64(le64_to_cpu(*data) & ~flag);
-}
-
-
static void
vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
{
--- a/drivers/net/vmxnet3/vmxnet3_int.h 2010-10-15 13:58:23.390723065 -0700
+++ b/drivers/net/vmxnet3/vmxnet3_int.h 2010-10-15 13:59:46.329296549 -0700
@@ -353,9 +353,20 @@ struct vmxnet3_adapter {
#define VMXNET3_MAX_ETH_HDR_SIZE 22
#define VMXNET3_MAX_SKB_BUF_SIZE (3*1024)
-void set_flag_le16(__le16 *data, u16 flag);
-void set_flag_le64(__le64 *data, u64 flag);
-void reset_flag_le64(__le64 *data, u64 flag);
+static inline void set_flag_le16(__le16 *data, u16 flag)
+{
+ *data = cpu_to_le16(le16_to_cpu(*data) | flag);
+}
+
+static inline void set_flag_le64(__le64 *data, u64 flag)
+{
+ *data = cpu_to_le64(le64_to_cpu(*data) | flag);
+}
+
+static inline void reset_flag_le64(__le64 *data, u64 flag)
+{
+ *data = cpu_to_le64(le64_to_cpu(*data) & ~flag);
+}
int
vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter);
^ permalink raw reply
* [PATCH net-next] bonding: make bond_resend_igmp_join_requests_delayed static
From: Stephen Hemminger @ 2010-10-15 21:02 UTC (permalink / raw)
To: David Miller, Jay Vosburgh, netdev; +Cc: bonding-devel
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/bonding/bond_main.c 2010-10-15 13:52:01.747192520 -0700
+++ b/drivers/net/bonding/bond_main.c 2010-10-15 13:52:39.004286643 -0700
@@ -914,7 +914,7 @@ static void bond_resend_igmp_join_reques
read_unlock(&bond->lock);
}
-void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
+static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
{
struct bonding *bond = container_of(work, struct bonding,
mcast_work.work);
^ permalink raw reply
* pull request: wireless-next-2.6 2010-10-15
From: John W. Linville @ 2010-10-15 20:40 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Dave,
Here is the latest batch of updates intended for 2.6.37. As usual,
it is primarily a bunch of driver updates and fixes to code already
in -next. This also includes a batch of Bluetooth updates courtesy
of Gustavo Padovan. There is also the movement of the wl1251 driver
out of the wl12xx directory. This is a prelude to the expansion of
the wl1271 code to cover some new hardware, all of which is actually
largely unrelated to wl1251.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 7662ff46b7b3678162ce125903115e4ab0607a2d:
ixgbe: DCB: remove DCB check config (2010-10-15 09:27:38 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git for-davem
Andrei Emeltchenko (4):
Bluetooth: remove extra newline from debug output
Bluetooth: check L2CAP length in first ACL fragment
Bluetooth: check for l2cap header in start fragment
Bluetooth: clean up rfcomm code
Ben Greear (9):
mac80211: Improve mlme probe response log messages.
wireless: Set some stats used by /proc/net/wireless (wext)
ath5k: Print out opmode in debugfs.
ath5k: Adjust opmode when interfaces are removed.
wireless: Print wiphy name in sysfs.
ath5k: Move debugfs under ieee80211/[wiphy-name]
ath9k: Fix potential use-after-free.
ath9k: Remove bf_dmacontext.
ath9k: Null out references to stale pointers.
Björn Smedman (3):
mac80211: minstrel_ht A-MPDU fix
ath9k: A-MPDU rate control info fix
ath9k: built-in rate control A-MPDU fix
Christian Lamparter (5):
mac80211: fix possible null-pointer de-reference
mac80211: temporarily disable reorder release timer
carl9170: common error path for bad frames
carl9170: remove stale rx error path
carl9170: A-MPDU frame type filter
David Vrabel (2):
Bluetooth: HCI devices are either BR/EDR or AMP radios
Bluetooth: Support SDIO devices that are AMP controllers
Felix Fietkau (14):
ath9k_hw: store the clock rate in common data on channel changes
ath5k: store the clock rate in common data on channel changes
ath9k_hw: move the cycle counter tracking to ath
ath5k: use the common cycle counter / listen time implementation
cfg80211: add channel utilization stats to the survey command
ath9k: add compile time checking for the size of the channel list
ath9k: implement channel utilization stats for survey
ath9k: do not track cycle counter updates in powersave mode
ath9k_hw: fix division by zero in the ANI monitor code
ath9k_hw: fix PHY counter overflow handling in ANI v1
ath9k: add missing locking around ath9k_hw_proc_mib_event
ath9k: make rate control debugfs stats per station
ath9k: remove sc->cur_rate_table and sc->cur_rate_mode
ath9k_hw: remove enum wireless_mode and its users
Gerrit Renker (1):
wext: fix alignment problem in serializing 'struct iw_point'
Gustavo F. Padovan (4):
Bluetooth: remove unused variable from cmtp
Bluetooth: make batostr() print in the right order
Bluetooth: Use the proper error value from bt_skb_send_alloc()
Bluetooth: update MAINTAINERS for Bluetooth subsys
Haijun Liu (1):
Bluetooth: Update conf_state before send config_req out
Helmut Schaa (6):
rt2x00: Shortcut link state updates when not operating as STA
rt2x00: Optimize unmapping of skbs
rt2x00: Use proper type for rxwi_w2 in rt2800_agc_to_rssi
rt2x00: Use unlikely for error case in rt2x00queue_write_tx_frame
rt2x00: Remove superfluous initialization of qidx
rt2x00: Fix tx status handling in rt2800pci
Ivo van Doorn (7):
rt2x00: Simplify Queue function arguments
rt2x00: Move watchdog work to kernel work_queue
rt2x00: Validate MCS on RX path
rt2x00: Fix dead queue when skb allocation failed
rt2x00: Make queue_entry flags access atomic
rt2x00: Don't perform watchdog checks on empty queue
rt2x00: Fix URB error handling
Jiri Slaby (1):
WIRELESS: at76c50x, remove unneeded NULL check
Joe Perches (1):
ath5k: fix build break from "ath5k: Print out opmode in debugfs"
Johan Hedberg (1):
Bluetooth: Don't clear the blacklist when closing the HCI device
Johannes Berg (32):
iwlagn: rename iwl_commit_rxon
iwlwifi: introduce post_scan hook
iwl3945: use iwl3945_commit_rxon
iwlwifi: move chain settings to agn
iwlwifi: rename iwl_mac_beacon_update
iwlwifi: remove verify_signature eeprom operation
iwlwifi: move agn specific station code there
iwlwifi: move tx fail code to agn
iwlwifi: remove spurious exports
iwlwifi: remove agn rates info there
iwlwifi: move iwl_toggle_rx_ant to agn
iwlwifi: move iwl_dump_csr to agn
iwlwifi: move iwl_dump_fh to agn
iwlwifi: remove set_ct_kill operation
iwlwifi: remove set_pwr_src operation
iwlwifi: remove apm_ops.stop
iwlwifi: clean up declarations
iwlwifi: remove iwl_check_bits
iwlwifi: fix dual-mode scanning
Revert "wireless: Use first phyX name available when registering phy devices."
mac80211: don't kmalloc 16 bytes
iwl3945: fix queue allocation
cfg80211: notify drivers about frame registrations
mac80211: add probe request filter flag
mac80211: fix SMPS request
iwlwifi: allow probe-after-rx on 2.4 GHz
iwlwifi: rename ibss_beacon variable
iwlwifi: clean up some beacon handling
iwlwifi: rewrite RXON checks
iwlwifi: blink LED in IBSS mode
iwlagn: check beacon frame size
radiotap: fix vendor namespace parsing
John W. Linville (4):
Merge branch 'wireless-next' of git://git.kernel.org/.../luca/wl12xx
Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
Merge branch 'master' of git://git.kernel.org/.../padovan/bluetooth-next-2.6 into for-davem
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem
Jouni Malinen (1):
ath9k: Set RX filter for Probe Request based on filter flag
Julia Lawall (1):
drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure
Kalle Valo (3):
wl1251: create a copy of wl12xx_80211.h for wl1251
wl1251: move to it's own directory
wl1251: update the new location to the maintainers file
Karl Beldan (1):
Bluetooth: hci_uart: Fix typo in stats for sco tx
Luis R. Rodriguez (1):
ath9k_hw: remove AR9003 2.0 support
Mat Martineau (4):
Bluetooth: Validate PSM values in calls to connect() and bind()
Bluetooth: Add common code for stream-oriented recvmsg()
Bluetooth: Use common SOCK_STREAM receive code in RFCOMM
Bluetooth: Use a stream-oriented recvmsg with SOCK_STREAM L2CAP sockets.
Mohammed Shafi Shajakhan (1):
ath9k: Fix documentation in rate control
Nobuhiro Iwamatsu (2):
Bluetooth: Add support Bluetooth controller of MacbookPro 6,2
Bluetooth: Add support Bluetooth controller of MacbookPro 7,1
Ohad Ben-Cohen (2):
wl1271: sdio: enable runtime PM
wl1271: sdio: add suspend/resume support
Paul Fox (1):
libertas: Communicate USB transfer errors
Rafał Miłecki (8):
b43: N-PHY: grab more info about new channel
b43: N-PHY: store info about current channel's type
b43: N-PHY: fix logic in band switching
b43: N-PHY: prepare for rev3+ channel tables
b43: N-PHY: replace N-specific radio_chanspec with common code
b43: N-PHY: fix typo: read table when caching IQ LO calibration (do not write)
b43: N-PHY: put radio-specific code in separated file
b43: N-PHY: put 2056-radio's specific code in separated file
Rajkumar Manoharan (1):
ath9k_htc: set probe request rx filter
Shanyu Zhao (2):
iwlagn: fix default calibration table size
iwlagn: add temperature offset calib for 6000g2
Steve deRosier (1):
mac80211: Update mesh constants to approved IEEE ANA values
Wey-Yi Guy (6):
iwlagn: no version check for experimental uCode
iiwlagn: always download priority table
iwlagn: prio_tbl need to download before calibration
iwlgn: need longer tx queue stuck timer for coex devices
iwlagn: 6050 ops should be used;
iwlwifi: move agn only eeprom functions to separate file
Yuri Kululin (1):
Bluetooth: Fix RFCOMM RPN negotiation
MAINTAINERS | 8 +-
drivers/bluetooth/btmrvl_main.c | 4 +-
drivers/bluetooth/btsdio.c | 8 +
drivers/bluetooth/btusb.c | 6 +
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/Makefile | 1 +
drivers/net/wireless/at76c50x-usb.c | 3 +-
drivers/net/wireless/ath/ath.h | 16 +
drivers/net/wireless/ath/ath5k/ani.c | 41 +-
drivers/net/wireless/ath/ath5k/ani.h | 5 +-
drivers/net/wireless/ath/ath5k/ath5k.h | 2 +-
drivers/net/wireless/ath/ath5k/base.c | 71 +-
drivers/net/wireless/ath/ath5k/debug.c | 49 +-
drivers/net/wireless/ath/ath5k/debug.h | 12 -
drivers/net/wireless/ath/ath5k/pcu.c | 13 +-
drivers/net/wireless/ath/ath5k/phy.c | 1 +
drivers/net/wireless/ath/ath9k/ani.c | 101 +-
drivers/net/wireless/ath/ath9k/ani.h | 8 -
.../net/wireless/ath/ath9k/ar9003_2p0_initvals.h | 1784 --------------------
drivers/net/wireless/ath/ath9k/ar9003_hw.c | 162 +--
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 7 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 7 +-
drivers/net/wireless/ath/ath9k/beacon.c | 21 +-
drivers/net/wireless/ath/ath9k/debug.c | 93 -
drivers/net/wireless/ath/ath9k/debug.h | 21 -
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 12 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 1 +
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 3 +-
drivers/net/wireless/ath/ath9k/hw.c | 66 +-
drivers/net/wireless/ath/ath9k/hw.h | 21 +-
drivers/net/wireless/ath/ath9k/init.c | 16 +-
drivers/net/wireless/ath/ath9k/main.c | 179 ++-
drivers/net/wireless/ath/ath9k/rc.c | 184 ++-
drivers/net/wireless/ath/ath9k/rc.h | 26 +-
drivers/net/wireless/ath/ath9k/recv.c | 10 +-
drivers/net/wireless/ath/ath9k/reg.h | 14 -
drivers/net/wireless/ath/ath9k/xmit.c | 38 +-
drivers/net/wireless/ath/carl9170/rx.c | 89 +-
drivers/net/wireless/ath/carl9170/wlan.h | 14 +-
drivers/net/wireless/ath/debug.c | 29 +
drivers/net/wireless/ath/debug.h | 10 +
drivers/net/wireless/ath/hw.c | 59 +
drivers/net/wireless/ath/reg.h | 11 +
drivers/net/wireless/b43/Makefile | 2 +
drivers/net/wireless/b43/phy_common.h | 5 +-
drivers/net/wireless/b43/phy_n.c | 128 +-
drivers/net/wireless/b43/phy_n.h | 218 +---
drivers/net/wireless/b43/radio_2055.c | 1332 +++++++++++++++
drivers/net/wireless/b43/radio_2055.h | 254 +++
drivers/net/wireless/b43/radio_2056.c | 43 +
drivers/net/wireless/b43/radio_2056.h | 42 +
drivers/net/wireless/b43/tables_nphy.c | 1311 +--------------
drivers/net/wireless/b43/tables_nphy.h | 59 +-
drivers/net/wireless/iwlwifi/Makefile | 2 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 7 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 76 +-
drivers/net/wireless/iwlwifi/iwl-3945.h | 9 +-
drivers/net/wireless/iwlwifi/iwl-4965.c | 27 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 14 +-
drivers/net/wireless/iwlwifi/iwl-6000.c | 62 +-
drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 2 +-
.../iwlwifi/{iwl-calib.h => iwl-agn-calib.h} | 4 +
drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c | 454 +++++
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 9 +-
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 372 ++++-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 69 +
drivers/net/wireless/iwlwifi/iwl-agn-rs.h | 10 -
drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 716 ++++++++
drivers/net/wireless/iwlwifi/iwl-agn-tt.c | 5 -
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 40 +
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 28 +
drivers/net/wireless/iwlwifi/iwl-agn.c | 106 +-
drivers/net/wireless/iwlwifi/iwl-agn.h | 71 +
drivers/net/wireless/iwlwifi/iwl-commands.h | 13 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 531 +-----
drivers/net/wireless/iwlwifi/iwl-core.h | 49 +-
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 1 -
drivers/net/wireless/iwlwifi/iwl-dev.h | 16 +-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 381 +----
drivers/net/wireless/iwlwifi/iwl-eeprom.h | 8 +-
drivers/net/wireless/iwlwifi/iwl-helpers.h | 5 -
drivers/net/wireless/iwlwifi/iwl-rx.c | 1 -
drivers/net/wireless/iwlwifi/iwl-scan.c | 12 +-
drivers/net/wireless/iwlwifi/iwl-sta.c | 725 +--------
drivers/net/wireless/iwlwifi/iwl-sta.h | 35 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 38 -
drivers/net/wireless/iwlwifi/iwl3945-base.c | 97 +-
drivers/net/wireless/libertas/if_usb.c | 4 +-
drivers/net/wireless/p54/eeprom.c | 4 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2500pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 4 +-
drivers/net/wireless/rt2x00/rt2x00.h | 18 +-
drivers/net/wireless/rt2x00/rt2x00dev.c | 87 +-
drivers/net/wireless/rt2x00/rt2x00lib.h | 11 +-
drivers/net/wireless/rt2x00/rt2x00link.c | 12 +-
drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00queue.c | 56 +-
drivers/net/wireless/rt2x00/rt2x00usb.c | 54 +-
drivers/net/wireless/wl1251/Kconfig | 33 +
drivers/net/wireless/wl1251/Makefile | 6 +
.../wireless/{wl12xx/wl1251_acx.c => wl1251/acx.c} | 8 +-
.../wireless/{wl12xx/wl1251_acx.h => wl1251/acx.h} | 2 +-
.../{wl12xx/wl1251_boot.c => wl1251/boot.c} | 12 +-
.../{wl12xx/wl1251_boot.h => wl1251/boot.h} | 0
.../wireless/{wl12xx/wl1251_cmd.c => wl1251/cmd.c} | 10 +-
.../wireless/{wl12xx/wl1251_cmd.h => wl1251/cmd.h} | 0
.../{wl12xx/wl1251_debugfs.c => wl1251/debugfs.c} | 6 +-
.../{wl12xx/wl1251_debugfs.h => wl1251/debugfs.h} | 0
.../{wl12xx/wl1251_event.c => wl1251/event.c} | 8 +-
.../{wl12xx/wl1251_event.h => wl1251/event.h} | 0
.../{wl12xx/wl1251_init.c => wl1251/init.c} | 8 +-
.../{wl12xx/wl1251_init.h => wl1251/init.h} | 0
.../wireless/{wl12xx/wl1251_io.c => wl1251/io.c} | 4 +-
.../wireless/{wl12xx/wl1251_io.h => wl1251/io.h} | 0
.../{wl12xx/wl1251_main.c => wl1251/main.c} | 20 +-
.../wireless/{wl12xx/wl1251_ps.c => wl1251/ps.c} | 8 +-
.../wireless/{wl12xx/wl1251_ps.h => wl1251/ps.h} | 2 +-
.../wireless/{wl12xx/wl1251_reg.h => wl1251/reg.h} | 0
.../wireless/{wl12xx/wl1251_rx.c => wl1251/rx.c} | 10 +-
.../wireless/{wl12xx/wl1251_rx.h => wl1251/rx.h} | 0
.../{wl12xx/wl1251_sdio.c => wl1251/sdio.c} | 0
.../wireless/{wl12xx/wl1251_spi.c => wl1251/spi.c} | 4 +-
.../wireless/{wl12xx/wl1251_spi.h => wl1251/spi.h} | 6 +-
.../wireless/{wl12xx/wl1251_tx.c => wl1251/tx.c} | 8 +-
.../wireless/{wl12xx/wl1251_tx.h => wl1251/tx.h} | 2 +-
drivers/net/wireless/{wl12xx => wl1251}/wl1251.h | 0
drivers/net/wireless/wl1251/wl12xx_80211.h | 156 ++
drivers/net/wireless/wl12xx/Kconfig | 34 -
drivers/net/wireless/wl12xx/Makefile | 9 -
drivers/net/wireless/wl12xx/wl1271_sdio.c | 43 +-
include/linux/ieee80211.h | 71 +-
include/linux/mmc/sdio_ids.h | 1 +
include/linux/nl80211.h | 15 +
include/linux/wireless.h | 2 +-
include/net/bluetooth/bluetooth.h | 2 +
include/net/bluetooth/hci.h | 2 +-
include/net/bluetooth/rfcomm.h | 5 -
include/net/cfg80211.h | 31 +
include/net/mac80211.h | 9 +-
net/bluetooth/af_bluetooth.c | 109 ++
net/bluetooth/cmtp/core.c | 6 +-
net/bluetooth/hci_core.c | 1 -
net/bluetooth/hci_sysfs.c | 21 +-
net/bluetooth/hidp/core.c | 8 +-
net/bluetooth/l2cap.c | 56 +-
net/bluetooth/lib.c | 4 +-
net/bluetooth/rfcomm/core.c | 39 +-
net/bluetooth/rfcomm/sock.c | 104 +--
net/bluetooth/rfcomm/tty.c | 4 +-
net/mac80211/cfg.c | 22 +-
net/mac80211/ht.c | 2 +
net/mac80211/ieee80211_i.h | 4 +-
net/mac80211/iface.c | 9 +-
net/mac80211/main.c | 3 +
net/mac80211/mesh_plink.c | 17 +-
net/mac80211/mlme.c | 18 +-
net/mac80211/rc80211_minstrel_ht.c | 7 +-
net/mac80211/rx.c | 24 +
net/mac80211/wep.c | 8 +-
net/wireless/core.c | 54 +-
net/wireless/mlme.c | 23 +-
net/wireless/nl80211.c | 15 +
net/wireless/radiotap.c | 58 +-
net/wireless/sysfs.c | 9 +
net/wireless/wext-compat.c | 4 +
169 files changed, 5491 insertions(+), 6553 deletions(-)
delete mode 100644 drivers/net/wireless/ath/ath9k/ar9003_2p0_initvals.h
create mode 100644 drivers/net/wireless/b43/radio_2055.c
create mode 100644 drivers/net/wireless/b43/radio_2055.h
create mode 100644 drivers/net/wireless/b43/radio_2056.c
create mode 100644 drivers/net/wireless/b43/radio_2056.h
rename drivers/net/wireless/iwlwifi/{iwl-calib.h => iwl-agn-calib.h} (95%)
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-sta.c
create mode 100644 drivers/net/wireless/wl1251/Kconfig
create mode 100644 drivers/net/wireless/wl1251/Makefile
rename drivers/net/wireless/{wl12xx/wl1251_acx.c => wl1251/acx.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_acx.h => wl1251/acx.h} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_boot.c => wl1251/boot.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_boot.h => wl1251/boot.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_cmd.c => wl1251/cmd.c} (98%)
rename drivers/net/wireless/{wl12xx/wl1251_cmd.h => wl1251/cmd.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_debugfs.c => wl1251/debugfs.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_debugfs.h => wl1251/debugfs.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_event.c => wl1251/event.c} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_event.h => wl1251/event.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_init.c => wl1251/init.c} (98%)
rename drivers/net/wireless/{wl12xx/wl1251_init.h => wl1251/init.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_io.c => wl1251/io.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_io.h => wl1251/io.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_main.c => wl1251/main.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_ps.c => wl1251/ps.c} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_ps.h => wl1251/ps.h} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_reg.h => wl1251/reg.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_rx.c => wl1251/rx.c} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_rx.h => wl1251/rx.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_sdio.c => wl1251/sdio.c} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_spi.c => wl1251/spi.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_spi.h => wl1251/spi.h} (96%)
rename drivers/net/wireless/{wl12xx/wl1251_tx.c => wl1251/tx.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_tx.h => wl1251/tx.h} (99%)
rename drivers/net/wireless/{wl12xx => wl1251}/wl1251.h (100%)
create mode 100644 drivers/net/wireless/wl1251/wl12xx_80211.h
Omnibus patch is available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-10-15.patch.bz2
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] PCI: MSI: Remove unsafe and unnecessary hardware access
From: Jesse Barnes @ 2010-10-15 20:06 UTC (permalink / raw)
To: Emil S Tantilov
Cc: Ben Hutchings, Michael Chan, Matthew Wilcox, linux-pci, NetDev,
Tantilov, Emil S, Jesse Brandeburg, Kirsher, Jeffrey T
In-Reply-To: <AANLkTi=F19SdRNfhQe_R9sqwqCbFtAUCFu+09KFgzdAK@mail.gmail.com>
On Fri, 15 Oct 2010 11:26:08 -0700
Emil S Tantilov <emils.tantilov@gmail.com> wrote:
> On Thu, Jun 17, 2010 at 12:16 PM, Ben Hutchings
> <bhutchings@solarflare.com> wrote:
> > During suspend on an SMP system, {read,write}_msi_msg_desc() may be
> > called to mask and unmask interrupts on a device that is already in a
> > reduced power state. At this point memory-mapped registers including
> > MSI-X tables are not accessible, and config space may not be fully
> > functional either.
> >
> > While a device is in a reduced power state its interrupts are
> > effectively masked and its MSI(-X) state will be restored when it is
> > brought back to D0. Therefore these functions can simply read and
> > write msi_desc::msg for devices not in D0.
> >
> > Further, read_msi_msg_desc() should only ever be used to update a
> > previously written message, so it can always read msi_desc::msg
> > and never needs to touch the hardware.
> >
> > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> > ---
> > On Mon, 2010-06-14 at 18:13 -0700, Michael Chan wrote:
> >> I'm debugging the bnx2 driver which doesn't work after suspend/resume if
> >> it is running in MSI-X mode. The problem is that during suspend, the
> >> MSI-X vectors are disabled by the following sequence on x86:
> >>
> >> take_cpu_down() -> cpu_disable_common() -> fixup_irqs()
> >>
> >> The MSI-X address/data used to disable the vectors are remembered in the
> >> above sequence. During resume, these address/data are then programmed
> >> back to the device during pci_restore_state(), causing all the vectors
> >> to remain disabled.
> >
> > That's not quite what I see. What I see is that the message is read
> > back from the table *after* the driver's suspend method has been called.
> > At this point the device is already in D3 and memory-mapped registers
> > are not accessible, so we get random bits as the message. At least,
> > that's what I see happening with the sfc driver.
> >
> >> Some drivers call free_irq() during suspend and request_irq() during
> >> resume, and that should avoid the problem. bnx2 and some other drivers
> >> do not do that. These drivers rely on pci_restore_state() to restore
> >> the MSI-X vectors to the same working state before suspend.
> >>
> >> What's the right way to fix this? Thanks.
> >
> > This is my attempt, which works for sfc. See if it works for bnx2.
> >
> > Ben.
> >
> > drivers/pci/msi.c | 34 +++++++++++-----------------------
> > 1 files changed, 11 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> > index 77b68ea..03f04dc 100644
> > --- a/drivers/pci/msi.c
> > +++ b/drivers/pci/msi.c
> > @@ -196,30 +196,15 @@ void unmask_msi_irq(unsigned int irq)
> > void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
> > {
> > struct msi_desc *entry = get_irq_desc_msi(desc);
> > - if (entry->msi_attrib.is_msix) {
> > - void __iomem *base = entry->mask_base +
> > - entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE;
> >
> > - msg->address_lo = readl(base + PCI_MSIX_ENTRY_LOWER_ADDR);
> > - msg->address_hi = readl(base + PCI_MSIX_ENTRY_UPPER_ADDR);
> > - msg->data = readl(base + PCI_MSIX_ENTRY_DATA);
> > - } else {
> > - struct pci_dev *dev = entry->dev;
> > - int pos = entry->msi_attrib.pos;
> > - u16 data;
> > + /* We do not touch the hardware (which may not even be
> > + * accessible at the moment) but return the last message
> > + * written. Assert that this is valid, assuming that
> > + * valid messages are not all-zeroes. */
> > + BUG_ON(!(entry->msg.address_hi | entry->msg.address_lo |
> > + entry->msg.data));
> >
> > - pci_read_config_dword(dev, msi_lower_address_reg(pos),
> > - &msg->address_lo);
> > - if (entry->msi_attrib.is_64) {
> > - pci_read_config_dword(dev, msi_upper_address_reg(pos),
> > - &msg->address_hi);
> > - pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
> > - } else {
> > - msg->address_hi = 0;
> > - pci_read_config_word(dev, msi_data_reg(pos, 0), &data);
> > - }
> > - msg->data = data;
> > - }
> > + *msg = entry->msg;
> > }
> >
> > void read_msi_msg(unsigned int irq, struct msi_msg *msg)
> > @@ -232,7 +217,10 @@ void read_msi_msg(unsigned int irq, struct msi_msg *msg)
> > void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
> > {
> > struct msi_desc *entry = get_irq_desc_msi(desc);
> > - if (entry->msi_attrib.is_msix) {
> > +
> > + if (entry->dev->current_state != PCI_D0) {
>
> This check exposed a problem in ixgb (patch is on the way) where
> pci_disable_device() was not being called in ixgb_remove(). As a
> result the current_state was set to PCI_UNKNOWN and the interface
> failed to work on subsequent load of the driver.
>
> Even though the problem was in ixgb, it made me wonder about this
> check as the presumption here (low power state) may not always be
> true. Like in the case of unloading a driver, which sets
> dev->current_state to PCI_UNKNOWN which is not a representation of the
> _real_ state of the device (actual state could be D0).
>
> BTW - quick search shows other drivers that could potentially suffer
> the faith of ixgb due to lack of pci_disable_device() call on removal.
Yeah we just ran into this in the DRM layer as well; which does a
pci_enable_device but never calls _disable, so we're stuck with
potentially stale state.
I came up with the below to address that, but really I don't like the
idea of nested pci_enable_device() calls at all. But I haven't looked
at the latest Wireless USB stuff to see if those drivers still rely on
it.
--
Jesse Barnes, Intel Open Source Technology Center
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7fa3cbd..37facc1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -994,6 +994,18 @@ static int __pci_enable_device_flags(struct pci_dev *dev,
int err;
int i, bars = 0;
+ /*
+ * Power state could be unknown at this point, either due to a fresh
+ * boot or a device removal call. So get the current power state
+ * so that things like MSI message writing will behave as expected
+ * (e.g. if the device really is in D0 at enable time).
+ */
+ if (dev->pm_cap) {
+ u16 pmcsr;
+ pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
+ dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
+ }
+
if (atomic_add_return(1, &dev->enable_cnt) > 1)
return 0; /* already enabled */
^ permalink raw reply related
* Re: large divisor for flow classifier
From: Eric Dumazet @ 2010-10-15 20:01 UTC (permalink / raw)
To: Jonathan Thibault; +Cc: Patrick McHardy, netdev
In-Reply-To: <4CB899F7.0@navigue.com>
Le vendredi 15 octobre 2010 à 14:14 -0400, Jonathan Thibault a écrit :
> It appears that when setting a fairly large divisor on the flow classifier for sfq, traffic stops altogether.
>
> On my machine, anything above divisor 2200 seems to stop all traffic. If I want to be fair between hosts (but not flows) for a large network (say 6000 hosts), I run into problems. Obviously the rates here are quite low but this is just an example.
>
> I also tested on a real interface with the same results.
>
> Example that works:
>
> tc qdisc add dev ifb0 root handle 3: htb default 10
> tc class add dev ifb0 parent 3: classid 3:1 htb rate 80kbit
> tc class add dev ifb0 parent 3:1 classid 3:10 htb rate 80kbit
> tc qdisc add dev ifb0 parent 3:10 handle 310: sfq perturb 10
> tc filter add dev ifb0 parent 3: protocol all prio 1 u32 match mark 0x000 0xf00 flowid 3:10
> tc filter add dev ifb0 parent 310: protocol all handle 0x310 flow hash keys dst divisor 1024
>
> Example that doesn't work:
>
> tc qdisc add dev ifb0 root handle 3: htb default 10
> tc class add dev ifb0 parent 3: classid 3:1 htb rate 80kbit
> tc class add dev ifb0 parent 3:1 classid 3:10 htb rate 80kbit
> tc qdisc add dev ifb0 parent 3:10 handle 310: sfq perturb 10
> tc filter add dev ifb0 parent 3: protocol all prio 1 u32 match mark 0x000 0xf00 flowid 3:10
> tc filter add dev ifb0 parent 310: protocol all handle 0x310 flow hash keys dst divisor 6144
>
SFQ is limited to a 1024 divisor
You might try following patch :
(8192 is the smallest power of two greater than 6144)
sizeof(struct sfq_sched_data) becomes 0x2ccc instead of 0x10cc
keep in mind hash distribution is not perfect.
What would be the real rate ?
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 3cf478d..c4a53d6 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -77,7 +77,7 @@
It is easy to increase these values, but not in flight. */
#define SFQ_DEPTH 128
-#define SFQ_HASH_DIVISOR 1024
+#define SFQ_HASH_DIVISOR 8192
/* This type should contain at least SFQ_DEPTH*2 values */
typedef unsigned char sfq_index;
^ permalink raw reply related
* Re: Linux Plumbers Conference: User-visible Network Issues Mini-Conf
From: Matt Domsch @ 2010-10-15 19:50 UTC (permalink / raw)
To: netdev
In-Reply-To: <1B9798A3396AB0429545ADFEA207931510536C7C8E@AUSX7MCPS302.AMER.DELL.COM>
At the Linux Plumbers Conference [1] November 3-5, 2010 in Cambridge,
MA, we have a half-day mini-conference [2] set aside on Thursday
morning (so as to follow immediately, but not conflict with netconf)
to discuss "User-visible Network Issues" - challenges that users face,
that could benefit from both userspace and kernel enhancements to make
their lives easier.
Accepted topics are:
* Challenges in Mobile Networking
Challenges that we have with networking in the mobile space.
Led by Dan Williams
* Network Device Naming
Which of my NICs is eth0?
Led by Matt Domsch
* Scaling techniques in the stack for servers with high connection rates
This talk will describe some techniques for scaling front end
servers. In particular, we will describe the the use of SO_REUSEPORT
in scaling servers for high connection rates with a single listening
port.
Led by Ying Cai
* Simplifying network configuration for VMs by harmonizing multiple Bridging, QOS, DCB and CNA implementations
Led by Shyam Iyer
While I'm sure the individual topics will generate great discussion,
it will be vital that members of the netdev community be present to
represent the kernel developers' perspectives on the problems and to
help brainstorm solutions. Most of these topics have significant
kernel components to them, and without additional kernel developer
participation, I fear we would just be talking to ourselves, but no
real progress made. I invite you to attend LPC, and this
mini-conf in particular, and lend your expertise.
If you would attend LPC, except that the conference fee is a burden,
please let me know. I have at least one pass available for mini-conf
participants.
Thanks,
Matt
[1] http://www.linuxplumbersconf.org/2010/
[2] http://www.linuxplumbersconf.org/2010/ocw/events/LPC2010MC/tracks/63
--
Matt Domsch
Technology Strategist
Dell | Office of the CTO
^ permalink raw reply
* Re: Documentation for IP_TRANSPARENT?
From: Balazs Scheidler @ 2010-10-15 19:40 UTC (permalink / raw)
To: mtk.manpages; +Cc: KOVACS Krisztian, David Miller, linux-net, netdev
In-Reply-To: <AANLkTika83PJ_KkmE+3Rhi4JgTjEZHTDzV-hcyz_UCWB@mail.gmail.com>
On Wed, 2010-10-13 at 07:16 +0200, Michael Kerrisk wrote:
> Hello Bazsi
>
> A long time after your mail, I've now added the text you supplied
> below. The changes are now available via git, and will be in
> man-pages-3.29. However, I have a few small questions that you can
> maybe clarify. See below.
>
> On Tue, Dec 9, 2008 at 2:17 PM, Balazs Scheidler <bazsi@balabit.hu> wrote:
> > Hi,
> >
> > On Mon, 2008-11-24 at 11:06 -0500, Michael Kerrisk wrote:
> >> Hello Krisztian,
> >>
> >> Your 2.6.27 patch adds the IP_TRANSPARENT socket option. Could you
> >> please supply some documentation (plain text is fine) suitable for
> >> inclusion in the ip(7) man page.
> >
> > Although it was Krisztian who originally submitted the patches, but I
> > also did some things about them, so here I gave the documentation part a
> > spin.
> >
> > There are some other related options, that are undocumented right now,
> > so I tried to give documentation on those as well.
> >
> > IP_FREEBIND
> > Enable binding to IP addresses that do not currently exist. When
> > enabled on a TCP or UDP socket, the bind(2) call referencing a
> > non-existing IP address will succeed. This functionality is useful
> > if the specified IP address is dynamic (e.g. assigned to a PPP device)
> > and is down at the time when the application is trying to bind to it.
> > This setsockopt is the per-socket equivalent to ip_nonlocal_bind sysctl.
> >
> > IP_TRANSPARENT
> > Enable transparent proxying on this socket. This socket option allows
> > the calling application to bind to a non-local IP address and operate
> > both as a client and a server with the foreign address as the local
> > endpoint. NOTE: this requires that routing be set up in a way that
> > packets going to the foreign address are routed through the tproxy box.
>
> Can you say a few words explaining what is meant by "tproxy box".
tproxy box is the computer running the transparent proxy application,
ie. the one calling the IP_TRANSPARENT socket option.
>
> Also, should one write "TProxy" here, analogous with "TProxy" below?
yes.
>
> > Enabling this socket option requires superuser privileges
> > (more specifically the CAP_NET_ADMIN capability).
> >
> > TProxy redirection with the iptables TPROXY target also requires that
> > this option be set on the redirected socket.
>
> In iptables(8), I find no mention of TPROXY. Is it just that the
> iptables(8) man page is not up to date?
AFAIR in iptables the man page is automatically generated from snippets
supplied with extensions.
Checking the iptables git tree, there's such a man page snippet for the
TPROXY target here:
http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=blob;f=extensions/libxt_TPROXY.man;hb=HEAD
I'm not 100% percent sure why it doesn't get into the iptables manual
page in your case. On my system, it seems to be included though:
$ man iptables | grep TPROXY
TPROXY
>
> > IP_RECVORIGDSTADDR
> > Enables the IP_ORIGDSTADDR ancillary message in recvmsg(2) in which
> > the kernel returns the original destination address of a datagram. The
> > ancillary message contains a "struct sockaddr_in" instance.
>
> Do you happen to know of any userspace test code that demonstrates the
> use of IP_RECVORIGDSTADDR?
Well, the one I have has too much cruft around it and many layers of
indirection, not really good for a sample code.
Pattern-wise it is the same as IP_RECVTTL, e.g. you set
IP_RECVORIGDSTADDR via setsockopt and then you get an ancillary message
with recvmsg() with the cmsg_level == IPPROTO_IP and cmsg_type ==
IP_ORIGDSTADDR
There's a similar sample in cmsg(3)
If you still need a sample, let me know and I'll cook something up.
>
> Thanks for this documentation, and sorry it took so long to make its
> way into man-pages.
No problem :) I could use these interfaces ever since :)
--
Bazsi
^ permalink raw reply
* (unknown),
From: WESTERN UNION OFFICE. @ 2010-10-15 19:15 UTC (permalink / raw)
We have been trying to reach you since the past few days,
as my associate has helped me to send your first payment
of $7,500 USD to you as instructed by Mr. David Cameron
the United Kingdom prime minister after the last G20
meeting that was held in United Kingdom, making you one
of the beneficiaries. Here is the information below.
MONEY TRANSFER CONTROL NUMBER: 0224873876
SENDER NAME: Jame w. Barry
AMOUNT: $7,500 USD
I told him to keep sending you $7,500 USD twice a week
until the FULL payment of ($820000.00 United State Dollars)
is completed.
A certificate will be made to change the Receiver Name as
stated by the British prime minister, send your Full Names
and address via Email to: Mr Garry Moore
Mail:mr.garrymoore009@gmail.com
The money will not reflect until the clearance certificate is
issue to you by the G20 committee.
Click your reply botton to contact Mr. Garry Moore for your
clearance certificate.
^ permalink raw reply
* [PATCH] net/core: Allow tagged VLAN packets to flow through VETH devices.
From: Ben Greear @ 2010-10-15 18:35 UTC (permalink / raw)
To: netdev; +Cc: Ben Greear
When there are VLANs on a VETH device, the packets being transmitted
through the VETH device may be 4 bytes bigger than MTU. A check
in dev_forward_skb did not take this into account and so dropped
these packets.
This patch is needed at least as far back as 2.6.34.7 and should
be considered for -stable.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 7f52603... 9fa308b... M net/core/dev.c
net/core/dev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 7f52603..9fa308b 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1485,7 +1485,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
nf_reset(skb);
if (!(dev->flags & IFF_UP) ||
- (skb->len > (dev->mtu + dev->hard_header_len))) {
+ (skb->len > (dev->mtu + dev->hard_header_len + VLAN_HLEN))) {
kfree_skb(skb);
return NET_RX_DROP;
}
--
1.6.2.5
^ permalink raw reply related
* Re: [PATCH] PCI: MSI: Remove unsafe and unnecessary hardware access
From: Emil S Tantilov @ 2010-10-15 18:26 UTC (permalink / raw)
To: Ben Hutchings
Cc: Jesse Barnes, Michael Chan, Matthew Wilcox, linux-pci, NetDev,
Tantilov, Emil S, Jesse Brandeburg, Kirsher, Jeffrey T
In-Reply-To: <1276802196.2083.12.camel@achroite.uk.solarflarecom.com>
On Thu, Jun 17, 2010 at 12:16 PM, Ben Hutchings
<bhutchings@solarflare.com> wrote:
> During suspend on an SMP system, {read,write}_msi_msg_desc() may be
> called to mask and unmask interrupts on a device that is already in a
> reduced power state. At this point memory-mapped registers including
> MSI-X tables are not accessible, and config space may not be fully
> functional either.
>
> While a device is in a reduced power state its interrupts are
> effectively masked and its MSI(-X) state will be restored when it is
> brought back to D0. Therefore these functions can simply read and
> write msi_desc::msg for devices not in D0.
>
> Further, read_msi_msg_desc() should only ever be used to update a
> previously written message, so it can always read msi_desc::msg
> and never needs to touch the hardware.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> On Mon, 2010-06-14 at 18:13 -0700, Michael Chan wrote:
>> I'm debugging the bnx2 driver which doesn't work after suspend/resume if
>> it is running in MSI-X mode. The problem is that during suspend, the
>> MSI-X vectors are disabled by the following sequence on x86:
>>
>> take_cpu_down() -> cpu_disable_common() -> fixup_irqs()
>>
>> The MSI-X address/data used to disable the vectors are remembered in the
>> above sequence. During resume, these address/data are then programmed
>> back to the device during pci_restore_state(), causing all the vectors
>> to remain disabled.
>
> That's not quite what I see. What I see is that the message is read
> back from the table *after* the driver's suspend method has been called.
> At this point the device is already in D3 and memory-mapped registers
> are not accessible, so we get random bits as the message. At least,
> that's what I see happening with the sfc driver.
>
>> Some drivers call free_irq() during suspend and request_irq() during
>> resume, and that should avoid the problem. bnx2 and some other drivers
>> do not do that. These drivers rely on pci_restore_state() to restore
>> the MSI-X vectors to the same working state before suspend.
>>
>> What's the right way to fix this? Thanks.
>
> This is my attempt, which works for sfc. See if it works for bnx2.
>
> Ben.
>
> drivers/pci/msi.c | 34 +++++++++++-----------------------
> 1 files changed, 11 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 77b68ea..03f04dc 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -196,30 +196,15 @@ void unmask_msi_irq(unsigned int irq)
> void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
> {
> struct msi_desc *entry = get_irq_desc_msi(desc);
> - if (entry->msi_attrib.is_msix) {
> - void __iomem *base = entry->mask_base +
> - entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE;
>
> - msg->address_lo = readl(base + PCI_MSIX_ENTRY_LOWER_ADDR);
> - msg->address_hi = readl(base + PCI_MSIX_ENTRY_UPPER_ADDR);
> - msg->data = readl(base + PCI_MSIX_ENTRY_DATA);
> - } else {
> - struct pci_dev *dev = entry->dev;
> - int pos = entry->msi_attrib.pos;
> - u16 data;
> + /* We do not touch the hardware (which may not even be
> + * accessible at the moment) but return the last message
> + * written. Assert that this is valid, assuming that
> + * valid messages are not all-zeroes. */
> + BUG_ON(!(entry->msg.address_hi | entry->msg.address_lo |
> + entry->msg.data));
>
> - pci_read_config_dword(dev, msi_lower_address_reg(pos),
> - &msg->address_lo);
> - if (entry->msi_attrib.is_64) {
> - pci_read_config_dword(dev, msi_upper_address_reg(pos),
> - &msg->address_hi);
> - pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
> - } else {
> - msg->address_hi = 0;
> - pci_read_config_word(dev, msi_data_reg(pos, 0), &data);
> - }
> - msg->data = data;
> - }
> + *msg = entry->msg;
> }
>
> void read_msi_msg(unsigned int irq, struct msi_msg *msg)
> @@ -232,7 +217,10 @@ void read_msi_msg(unsigned int irq, struct msi_msg *msg)
> void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
> {
> struct msi_desc *entry = get_irq_desc_msi(desc);
> - if (entry->msi_attrib.is_msix) {
> +
> + if (entry->dev->current_state != PCI_D0) {
This check exposed a problem in ixgb (patch is on the way) where
pci_disable_device() was not being called in ixgb_remove(). As a
result the current_state was set to PCI_UNKNOWN and the interface
failed to work on subsequent load of the driver.
Even though the problem was in ixgb, it made me wonder about this
check as the presumption here (low power state) may not always be
true. Like in the case of unloading a driver, which sets
dev->current_state to PCI_UNKNOWN which is not a representation of the
_real_ state of the device (actual state could be D0).
BTW - quick search shows other drivers that could potentially suffer
the faith of ixgb due to lack of pci_disable_device() call on removal.
Thanks,
Emil
^ permalink raw reply
* Re: [PATCH net-next 4/8] tg3: Add EEE support
From: Matt Carlson @ 2010-10-15 18:19 UTC (permalink / raw)
To: Ben Hutchings
Cc: Matthew Carlson, davem@davemloft.net, netdev@vger.kernel.org,
andy@greyhouse.net
In-Reply-To: <1287152246.2267.14.camel@achroite.uk.solarflarecom.com>
On Fri, Oct 15, 2010 at 07:17:26AM -0700, Ben Hutchings wrote:
> On Thu, 2010-10-14 at 13:37 -0700, Matt Carlson wrote:
> > This patch adds Energy Efficient Ethernet (EEE) support for the 5718
> > device ID and the 57765 B0 asic revision.
> [...]
> > +/* Clause 45 expansion registers */
> > +#define TG3_CL45_D7_EEEADV_CAP 0x003c
> > +#define TG3_CL45_D7_EEEADV_CAP_100TX 0x0002
> > +#define TG3_CL45_D7_EEEADV_CAP_1000T 0x0004
>
> I assume this is going to be a standard register, so I think it should
> be defined in <linux/mdio.h>.
O.K. I'll make the change and respin this patch.
> > +#define TG3_CL45_D7_EEERES_STAT 0x803e
> > +#define TG3_CL45_D7_EEERES_STAT_LP_100TX 0x0002
> > +#define TG3_CL45_D7_EEERES_STAT_LP_1000T 0x0004
>
> 0x803e not 0x003e?
I'm checking on this one. EEE works with this patch in place. Maybe I
can make this a definition that takes a standard clause 45 register as
an input though.
> Also Dave suggested there should be an ethtool interface to control EEE
> <http://thread.gmane.org/gmane.linux.network/164141/focus=165143>.
I don't see any ETH_FLAG definition for this in ethtool.h yet. Is this
the way everyone wanted to go?
^ permalink raw reply
* RFD: OF device tree vs. PHY flags.
From: David Daney @ 2010-10-15 18:18 UTC (permalink / raw)
To: Grant Likely, devicetree-discuss, Netdev
I am in the process of planning a conversion of Octeon SOC platform code
to use the OF device tree in the Linux kernel.
One issue that I have encountered, is that for some boards, we need to
pass a non-zero flags argument to the phy_attach_direct() method. The
value of the flags is board dependent, so it would make some sense to
encode its value in the device tree itself. The flags I am interested
in control the configuration of clocking modes and status LED connections.
I would suggest the following:
o Add a new property to "ethernet-phy" dts bindings called
"linux,flags". It would contain a comma separated string of flag names.
Something like "led-mode1,clock-mode2". The semantics of the flag
names would be interpreted by the PHY driver...
o Add a new function pointer to struct phy_driver: u32
(*of_parse_flags)(struct phy_device *phydev). This would parse and
return the flags value for the "linux,flags" property from the
device_node associated with the particular PHY device in question.
o Modify of_phy_connect() to do something like the following:
.
.
.
if (phy->driver && phy->driver->of_parse_flags)
flags |= phy->driver->of_parse_flags(phy);
.
.
.
o Perhaps add some helper functions to of_mdio.c to assist in parsing
the "linux,flags" properties string.
o Any extra code in the PHY drivers and struct phy_driver would be
protected by #ifdef CONFIG_OF
How does this sound?
Any suggestions as for improvements, or better names for things?
Thanks,
David Daney
^ permalink raw reply
* large divisor for flow classifier
From: Jonathan Thibault @ 2010-10-15 18:14 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netdev
It appears that when setting a fairly large divisor on the flow classifier for sfq, traffic stops altogether.
On my machine, anything above divisor 2200 seems to stop all traffic. If I want to be fair between hosts (but not flows) for a large network (say 6000 hosts), I run into problems. Obviously the rates here are quite low but this is just an example.
I also tested on a real interface with the same results.
Example that works:
tc qdisc add dev ifb0 root handle 3: htb default 10
tc class add dev ifb0 parent 3: classid 3:1 htb rate 80kbit
tc class add dev ifb0 parent 3:1 classid 3:10 htb rate 80kbit
tc qdisc add dev ifb0 parent 3:10 handle 310: sfq perturb 10
tc filter add dev ifb0 parent 3: protocol all prio 1 u32 match mark 0x000 0xf00 flowid 3:10
tc filter add dev ifb0 parent 310: protocol all handle 0x310 flow hash keys dst divisor 1024
Example that doesn't work:
tc qdisc add dev ifb0 root handle 3: htb default 10
tc class add dev ifb0 parent 3: classid 3:1 htb rate 80kbit
tc class add dev ifb0 parent 3:1 classid 3:10 htb rate 80kbit
tc qdisc add dev ifb0 parent 3:10 handle 310: sfq perturb 10
tc filter add dev ifb0 parent 3: protocol all prio 1 u32 match mark 0x000 0xf00 flowid 3:10
tc filter add dev ifb0 parent 310: protocol all handle 0x310 flow hash keys dst divisor 6144
Jonathan
^ permalink raw reply
* [PATCH net-next] vxge: make functions local and remove dead code
From: Stephen Hemminger @ 2010-10-15 17:21 UTC (permalink / raw)
To: Ramkrishna, "Vepa <ramkrishna.vepa",
Sivakumar Subramani, Sreenivasa Honnur
Cc: netdev
Use results of make namespacecheck to make functions local and
remove code that is not used.
Also rename initialize_ethtool_ops to vxge_initialize_ethtool_ops.
Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/vxge/vxge-config.c | 332 +++++++++++++++++++++++++++++-----------
drivers/net/vxge/vxge-config.h | 227 ---------------------------
drivers/net/vxge/vxge-ethtool.c | 2
drivers/net/vxge/vxge-main.c | 64 ++++---
drivers/net/vxge/vxge-main.h | 59 -------
drivers/net/vxge/vxge-traffic.c | 101 +-----------
drivers/net/vxge/vxge-traffic.h | 134 ----------------
7 files changed, 304 insertions(+), 615 deletions(-)
--- a/drivers/net/vxge/vxge-config.c 2010-10-15 09:10:06.686399147 -0700
+++ b/drivers/net/vxge/vxge-config.c 2010-10-15 10:15:51.420682586 -0700
@@ -20,6 +20,179 @@
#include "vxge-traffic.h"
#include "vxge-config.h"
+static enum vxge_hw_status
+__vxge_hw_fifo_create(
+ struct __vxge_hw_vpath_handle *vpath_handle,
+ struct vxge_hw_fifo_attr *attr);
+
+static enum vxge_hw_status
+__vxge_hw_fifo_abort(
+ struct __vxge_hw_fifo *fifoh);
+
+static enum vxge_hw_status
+__vxge_hw_fifo_reset(
+ struct __vxge_hw_fifo *ringh);
+
+static enum vxge_hw_status
+__vxge_hw_fifo_delete(
+ struct __vxge_hw_vpath_handle *vpath_handle);
+
+static struct __vxge_hw_blockpool_entry *
+__vxge_hw_blockpool_block_allocate(struct __vxge_hw_device *hldev,
+ u32 size);
+
+static void
+__vxge_hw_blockpool_block_free(struct __vxge_hw_device *hldev,
+ struct __vxge_hw_blockpool_entry *entry);
+
+static void vxge_hw_blockpool_block_add(struct __vxge_hw_device *devh,
+ void *block_addr,
+ u32 length,
+ struct pci_dev *dma_h,
+ struct pci_dev *acc_handle);
+
+static enum vxge_hw_status
+__vxge_hw_blockpool_create(struct __vxge_hw_device *hldev,
+ struct __vxge_hw_blockpool *blockpool,
+ u32 pool_size,
+ u32 pool_max);
+
+static void
+__vxge_hw_blockpool_destroy(struct __vxge_hw_blockpool *blockpool);
+
+static void *
+__vxge_hw_blockpool_malloc(struct __vxge_hw_device *hldev,
+ u32 size,
+ struct vxge_hw_mempool_dma *dma_object);
+
+static void
+__vxge_hw_blockpool_free(struct __vxge_hw_device *hldev,
+ void *memblock,
+ u32 size,
+ struct vxge_hw_mempool_dma *dma_object);
+
+
+static struct __vxge_hw_channel*
+__vxge_hw_channel_allocate(struct __vxge_hw_vpath_handle *vph,
+ enum __vxge_hw_channel_type type, u32 length,
+ u32 per_dtr_space, void *userdata);
+
+static void
+__vxge_hw_channel_free(
+ struct __vxge_hw_channel *channel);
+
+static enum vxge_hw_status
+__vxge_hw_channel_initialize(
+ struct __vxge_hw_channel *channel);
+
+static enum vxge_hw_status
+__vxge_hw_channel_reset(
+ struct __vxge_hw_channel *channel);
+
+static enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_vpath_handle *vp);
+
+static enum vxge_hw_status
+__vxge_hw_device_fifo_config_check(struct vxge_hw_fifo_config *fifo_config);
+
+static enum vxge_hw_status
+__vxge_hw_device_config_check(struct vxge_hw_device_config *new_config);
+
+static void
+__vxge_hw_device_id_get(struct __vxge_hw_device *hldev);
+
+static void
+__vxge_hw_device_host_info_get(struct __vxge_hw_device *hldev);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_card_info_get(
+ u32 vp_id,
+ struct vxge_hw_vpath_reg __iomem *vpath_reg,
+ struct vxge_hw_device_hw_info *hw_info);
+
+static enum vxge_hw_status
+__vxge_hw_device_initialize(struct __vxge_hw_device *hldev);
+
+static void
+__vxge_hw_device_pci_e_init(struct __vxge_hw_device *hldev);
+
+static enum vxge_hw_status
+__vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev);
+
+static enum vxge_hw_status
+__vxge_hw_device_register_poll(
+ void __iomem *reg,
+ u64 mask, u32 max_millis);
+
+static inline enum vxge_hw_status
+__vxge_hw_pio_mem_write64(u64 val64, void __iomem *addr,
+ u64 mask, u32 max_millis)
+{
+ __vxge_hw_pio_mem_write32_lower((u32)vxge_bVALn(val64, 32, 32), addr);
+ wmb();
+
+ __vxge_hw_pio_mem_write32_upper((u32)vxge_bVALn(val64, 0, 32), addr);
+ wmb();
+
+ return __vxge_hw_device_register_poll(addr, mask, max_millis);
+}
+
+static struct vxge_hw_mempool*
+__vxge_hw_mempool_create(struct __vxge_hw_device *devh, u32 memblock_size,
+ u32 item_size, u32 private_size, u32 items_initial,
+ u32 items_max, struct vxge_hw_mempool_cbs *mp_callback,
+ void *userdata);
+static void __vxge_hw_mempool_destroy(struct vxge_hw_mempool *mempool);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_stats_get(struct __vxge_hw_virtualpath *vpath,
+ struct vxge_hw_vpath_stats_hw_info *hw_stats);
+
+static enum vxge_hw_status
+vxge_hw_vpath_stats_enable(struct __vxge_hw_vpath_handle *vpath_handle);
+
+static enum vxge_hw_status
+__vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg);
+
+static u64
+__vxge_hw_vpath_pci_func_mode_get(u32 vp_id,
+ struct vxge_hw_vpath_reg __iomem *vpath_reg);
+
+static u32
+__vxge_hw_vpath_func_id_get(u32 vp_id, struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_addr_get(u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg,
+ u8 (macaddr)[ETH_ALEN], u8 (macaddr_mask)[ETH_ALEN]);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath);
+
+
+static enum vxge_hw_status
+__vxge_hw_vpath_sw_reset(struct __vxge_hw_device *devh, u32 vp_id);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_fw_ver_get(u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg,
+ struct vxge_hw_device_hw_info *hw_info);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_mac_configure(struct __vxge_hw_device *devh, u32 vp_id);
+
+static void
+__vxge_hw_vp_terminate(struct __vxge_hw_device *devh, u32 vp_id);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_stats_access(struct __vxge_hw_virtualpath *vpath,
+ u32 operation, u32 offset, u64 *stat);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_xmac_tx_stats_get(struct __vxge_hw_virtualpath *vpath,
+ struct vxge_hw_xmac_vpath_tx_stats *vpath_tx_stats);
+
+static enum vxge_hw_status
+__vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath *vpath,
+ struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats);
+
/*
* __vxge_hw_channel_allocate - Allocate memory for channel
* This function allocates required memory for the channel and various arrays
@@ -190,7 +363,7 @@ __vxge_hw_device_pci_e_init(struct __vxg
* Will poll certain register for specified amount of time.
* Will poll until masked bit is not cleared.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_device_register_poll(void __iomem *reg, u64 mask, u32 max_millis)
{
u64 val64;
@@ -221,7 +394,7 @@ __vxge_hw_device_register_poll(void __io
* in progress
* This routine checks the vpath reset in progress register is turned zero
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_device_vpath_reset_in_prog_check(u64 __iomem *vpath_rst_in_prog)
{
enum vxge_hw_status status;
@@ -236,7 +409,7 @@ __vxge_hw_device_vpath_reset_in_prog_che
* This routine sets the swapper and reads the toc pointer and returns the
* memory mapped address of the toc
*/
-struct vxge_hw_toc_reg __iomem *
+static struct vxge_hw_toc_reg __iomem *
__vxge_hw_device_toc_get(void __iomem *bar0)
{
u64 val64;
@@ -779,7 +952,7 @@ exit:
* vxge_hw_device_xmac_aggr_stats_get - Get the Statistics on aggregate port
* Get the Statistics on aggregate port
*/
-enum vxge_hw_status
+static enum vxge_hw_status
vxge_hw_device_xmac_aggr_stats_get(struct __vxge_hw_device *hldev, u32 port,
struct vxge_hw_xmac_aggr_stats *aggr_stats)
{
@@ -814,7 +987,7 @@ exit:
* vxge_hw_device_xmac_port_stats_get - Get the Statistics on a port
* Get the Statistics on port
*/
-enum vxge_hw_status
+static enum vxge_hw_status
vxge_hw_device_xmac_port_stats_get(struct __vxge_hw_device *hldev, u32 port,
struct vxge_hw_xmac_port_stats *port_stats)
{
@@ -952,20 +1125,6 @@ u32 vxge_hw_device_trace_level_get(struc
return 0;
#endif
}
-/*
- * vxge_hw_device_debug_mask_get - Get the debug mask
- * This routine returns the current debug mask set
- */
-u32 vxge_hw_device_debug_mask_get(struct __vxge_hw_device *hldev)
-{
-#if defined(VXGE_DEBUG_TRACE_MASK) || defined(VXGE_DEBUG_ERR_MASK)
- if (hldev == NULL)
- return 0;
- return hldev->debug_module_mask;
-#else
- return 0;
-#endif
-}
/*
* vxge_hw_getpause_data -Pause frame frame generation and reception.
@@ -1090,7 +1249,7 @@ __vxge_hw_ring_block_next_pointer_set(u8
* first block
* Returns the dma address of the first RxD block
*/
-u64 __vxge_hw_ring_first_block_address_get(struct __vxge_hw_ring *ring)
+static u64 __vxge_hw_ring_first_block_address_get(struct __vxge_hw_ring *ring)
{
struct vxge_hw_mempool_dma *dma_object;
@@ -1252,7 +1411,7 @@ exit:
* This function creates Ring and initializes it.
*
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_ring_create(struct __vxge_hw_vpath_handle *vp,
struct vxge_hw_ring_attr *attr)
{
@@ -1363,7 +1522,7 @@ exit:
* __vxge_hw_ring_abort - Returns the RxD
* This function terminates the RxDs of ring
*/
-enum vxge_hw_status __vxge_hw_ring_abort(struct __vxge_hw_ring *ring)
+static enum vxge_hw_status __vxge_hw_ring_abort(struct __vxge_hw_ring *ring)
{
void *rxdh;
struct __vxge_hw_channel *channel;
@@ -1392,7 +1551,7 @@ enum vxge_hw_status __vxge_hw_ring_abort
* __vxge_hw_ring_reset - Resets the ring
* This function resets the ring during vpath reset operation
*/
-enum vxge_hw_status __vxge_hw_ring_reset(struct __vxge_hw_ring *ring)
+static enum vxge_hw_status __vxge_hw_ring_reset(struct __vxge_hw_ring *ring)
{
enum vxge_hw_status status = VXGE_HW_OK;
struct __vxge_hw_channel *channel;
@@ -1419,7 +1578,7 @@ exit:
* __vxge_hw_ring_delete - Removes the ring
* This function freeup the memory pool and removes the ring
*/
-enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_vpath_handle *vp)
+static enum vxge_hw_status __vxge_hw_ring_delete(struct __vxge_hw_vpath_handle *vp)
{
struct __vxge_hw_ring *ring = vp->vpath->ringh;
@@ -1438,7 +1597,7 @@ enum vxge_hw_status __vxge_hw_ring_delet
* __vxge_hw_mempool_grow
* Will resize mempool up to %num_allocate value.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_mempool_grow(struct vxge_hw_mempool *mempool, u32 num_allocate,
u32 *num_allocated)
{
@@ -1527,7 +1686,7 @@ exit:
* with size enough to hold %items_initial number of items. Memory is
* DMA-able but client must map/unmap before interoperating with the device.
*/
-struct vxge_hw_mempool*
+static struct vxge_hw_mempool*
__vxge_hw_mempool_create(
struct __vxge_hw_device *devh,
u32 memblock_size,
@@ -1644,7 +1803,7 @@ exit:
/*
* vxge_hw_mempool_destroy
*/
-void __vxge_hw_mempool_destroy(struct vxge_hw_mempool *mempool)
+static void __vxge_hw_mempool_destroy(struct vxge_hw_mempool *mempool)
{
u32 i, j;
struct __vxge_hw_device *devh = mempool->devh;
@@ -1700,7 +1859,7 @@ __vxge_hw_device_fifo_config_check(struc
* __vxge_hw_device_vpath_config_check - Check vpath configuration.
* Check the vpath configuration
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_device_vpath_config_check(struct vxge_hw_vp_config *vp_config)
{
enum vxge_hw_status status;
@@ -1922,7 +2081,7 @@ vxge_hw_device_config_default_get(struct
* _hw_legacy_swapper_set - Set the swapper bits for the legacy secion.
* Set the swapper bits appropriately for the lagacy section.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg)
{
u64 val64;
@@ -1977,7 +2136,7 @@ __vxge_hw_legacy_swapper_set(struct vxge
* __vxge_hw_vpath_swapper_set - Set the swapper bits for the vpath.
* Set the swapper bits appropriately for the vpath.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_swapper_set(struct vxge_hw_vpath_reg __iomem *vpath_reg)
{
#ifndef __BIG_ENDIAN
@@ -1996,7 +2155,7 @@ __vxge_hw_vpath_swapper_set(struct vxge_
* __vxge_hw_kdfc_swapper_set - Set the swapper bits for the kdfc.
* Set the swapper bits appropriately for the vpath.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_kdfc_swapper_set(
struct vxge_hw_legacy_reg __iomem *legacy_reg,
struct vxge_hw_vpath_reg __iomem *vpath_reg)
@@ -2021,28 +2180,6 @@ __vxge_hw_kdfc_swapper_set(
}
/*
- * vxge_hw_mgmt_device_config - Retrieve device configuration.
- * Get device configuration. Permits to retrieve at run-time configuration
- * values that were used to initialize and configure the device.
- */
-enum vxge_hw_status
-vxge_hw_mgmt_device_config(struct __vxge_hw_device *hldev,
- struct vxge_hw_device_config *dev_config, int size)
-{
-
- if ((hldev == NULL) || (hldev->magic != VXGE_HW_DEVICE_MAGIC))
- return VXGE_HW_ERR_INVALID_DEVICE;
-
- if (size != sizeof(struct vxge_hw_device_config))
- return VXGE_HW_ERR_VERSION_CONFLICT;
-
- memcpy(dev_config, &hldev->config,
- sizeof(struct vxge_hw_device_config));
-
- return VXGE_HW_OK;
-}
-
-/*
* vxge_hw_mgmt_reg_read - Read Titan register.
*/
enum vxge_hw_status
@@ -2438,7 +2575,7 @@ exit:
* __vxge_hw_fifo_abort - Returns the TxD
* This function terminates the TxDs of fifo
*/
-enum vxge_hw_status __vxge_hw_fifo_abort(struct __vxge_hw_fifo *fifo)
+static enum vxge_hw_status __vxge_hw_fifo_abort(struct __vxge_hw_fifo *fifo)
{
void *txdlh;
@@ -2466,7 +2603,7 @@ enum vxge_hw_status __vxge_hw_fifo_abort
* __vxge_hw_fifo_reset - Resets the fifo
* This function resets the fifo during vpath reset operation
*/
-enum vxge_hw_status __vxge_hw_fifo_reset(struct __vxge_hw_fifo *fifo)
+static enum vxge_hw_status __vxge_hw_fifo_reset(struct __vxge_hw_fifo *fifo)
{
enum vxge_hw_status status = VXGE_HW_OK;
@@ -2501,7 +2638,7 @@ enum vxge_hw_status __vxge_hw_fifo_delet
* in pci config space.
* Read from the vpath pci config space.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_pci_read(struct __vxge_hw_virtualpath *vpath,
u32 phy_func_0, u32 offset, u32 *val)
{
@@ -2542,7 +2679,7 @@ exit:
* __vxge_hw_vpath_func_id_get - Get the function id of the vpath.
* Returns the function number of the vpath.
*/
-u32
+static u32
__vxge_hw_vpath_func_id_get(u32 vp_id,
struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg)
{
@@ -2573,7 +2710,7 @@ __vxge_hw_read_rts_ds(struct vxge_hw_vpa
* __vxge_hw_vpath_card_info_get - Get the serial numbers,
* part number and product description.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_card_info_get(
u32 vp_id,
struct vxge_hw_vpath_reg __iomem *vpath_reg,
@@ -2695,7 +2832,7 @@ __vxge_hw_vpath_card_info_get(
* __vxge_hw_vpath_fw_ver_get - Get the fw version
* Returns FW Version
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_fw_ver_get(
u32 vp_id,
struct vxge_hw_vpath_reg __iomem *vpath_reg,
@@ -2789,7 +2926,7 @@ exit:
* __vxge_hw_vpath_pci_func_mode_get - Get the pci mode
* Returns pci function mode
*/
-u64
+static u64
__vxge_hw_vpath_pci_func_mode_get(
u32 vp_id,
struct vxge_hw_vpath_reg __iomem *vpath_reg)
@@ -2995,7 +3132,7 @@ exit:
* __vxge_hw_vpath_addr_get - Get the hw address entry for this vpath
* from MAC address table.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_addr_get(
u32 vp_id, struct vxge_hw_vpath_reg __iomem *vpath_reg,
u8 (macaddr)[ETH_ALEN], u8 (macaddr_mask)[ETH_ALEN])
@@ -3347,7 +3484,7 @@ __vxge_hw_vpath_mgmt_read(
* This routine checks the vpath_rst_in_prog register to see if
* adapter completed the reset process for the vpath
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath)
{
enum vxge_hw_status status;
@@ -3365,7 +3502,7 @@ __vxge_hw_vpath_reset_check(struct __vxg
* __vxge_hw_vpath_reset
* This routine resets the vpath on the device
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_reset(struct __vxge_hw_device *hldev, u32 vp_id)
{
u64 val64;
@@ -3383,7 +3520,7 @@ __vxge_hw_vpath_reset(struct __vxge_hw_d
* __vxge_hw_vpath_sw_reset
* This routine resets the vpath structures
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_sw_reset(struct __vxge_hw_device *hldev, u32 vp_id)
{
enum vxge_hw_status status = VXGE_HW_OK;
@@ -3408,7 +3545,7 @@ exit:
* This routine configures the prc registers of virtual path using the config
* passed
*/
-void
+static void
__vxge_hw_vpath_prc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
u64 val64;
@@ -3480,7 +3617,7 @@ __vxge_hw_vpath_prc_configure(struct __v
* This routine configures the kdfc registers of virtual path using the
* config passed
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_kdfc_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
u64 val64;
@@ -3553,7 +3690,7 @@ exit:
* __vxge_hw_vpath_mac_configure
* This routine configures the mac of virtual path using the config passed
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_mac_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
u64 val64;
@@ -3621,7 +3758,7 @@ __vxge_hw_vpath_mac_configure(struct __v
* This routine configures the tim registers of virtual path using the config
* passed
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_tim_configure(struct __vxge_hw_device *hldev, u32 vp_id)
{
u64 val64;
@@ -3897,7 +4034,7 @@ vxge_hw_vpath_tti_ci_set(struct __vxge_h
* This routine is the final phase of init which initializes the
* registers of the vpath using the configuration passed.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_initialize(struct __vxge_hw_device *hldev, u32 vp_id)
{
u64 val64;
@@ -3966,7 +4103,7 @@ exit:
* This routine is the initial phase of init which resets the vpath and
* initializes the software support structures.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vp_initialize(struct __vxge_hw_device *hldev, u32 vp_id,
struct vxge_hw_vp_config *config)
{
@@ -4022,7 +4159,7 @@ exit:
* __vxge_hw_vp_terminate - Terminate Virtual Path structure
* This routine closes all channels it opened and freeup memory
*/
-void
+static void
__vxge_hw_vp_terminate(struct __vxge_hw_device *hldev, u32 vp_id)
{
struct __vxge_hw_virtualpath *vpath;
@@ -4384,7 +4521,7 @@ vxge_hw_vpath_enable(struct __vxge_hw_vp
* Enable the DMA vpath statistics. The function is to be called to re-enable
* the adapter to update stats into the host memory
*/
-enum vxge_hw_status
+static enum vxge_hw_status
vxge_hw_vpath_stats_enable(struct __vxge_hw_vpath_handle *vp)
{
enum vxge_hw_status status = VXGE_HW_OK;
@@ -4409,7 +4546,7 @@ exit:
* __vxge_hw_vpath_stats_access - Get the statistics from the given location
* and offset and perform an operation
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_stats_access(struct __vxge_hw_virtualpath *vpath,
u32 operation, u32 offset, u64 *stat)
{
@@ -4445,7 +4582,7 @@ vpath_stats_access_exit:
/*
* __vxge_hw_vpath_xmac_tx_stats_get - Get the TX Statistics of a vpath
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_xmac_tx_stats_get(
struct __vxge_hw_virtualpath *vpath,
struct vxge_hw_xmac_vpath_tx_stats *vpath_tx_stats)
@@ -4478,9 +4615,9 @@ exit:
/*
* __vxge_hw_vpath_xmac_rx_stats_get - Get the RX Statistics of a vpath
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_vpath_xmac_rx_stats_get(struct __vxge_hw_virtualpath *vpath,
- struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats)
+ struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats)
{
u64 *val64;
enum vxge_hw_status status = VXGE_HW_OK;
@@ -4509,9 +4646,9 @@ exit:
/*
* __vxge_hw_vpath_stats_get - Get the vpath hw statistics.
*/
-enum vxge_hw_status __vxge_hw_vpath_stats_get(
- struct __vxge_hw_virtualpath *vpath,
- struct vxge_hw_vpath_stats_hw_info *hw_stats)
+static enum vxge_hw_status
+__vxge_hw_vpath_stats_get(struct __vxge_hw_virtualpath *vpath,
+ struct vxge_hw_vpath_stats_hw_info *hw_stats)
{
u64 val64;
enum vxge_hw_status status = VXGE_HW_OK;
@@ -4643,6 +4780,32 @@ exit:
return status;
}
+
+static void vxge_os_dma_malloc_async(struct pci_dev *pdev, void *devh,
+ unsigned long size)
+{
+ gfp_t flags;
+ void *vaddr;
+
+ if (in_interrupt())
+ flags = GFP_ATOMIC | GFP_DMA;
+ else
+ flags = GFP_KERNEL | GFP_DMA;
+
+ vaddr = kmalloc((size), flags);
+
+ vxge_hw_blockpool_block_add(devh, vaddr, size, pdev, pdev);
+}
+
+static void vxge_os_dma_free(struct pci_dev *pdev, const void *vaddr,
+ struct pci_dev **p_dma_acch)
+{
+ unsigned long misaligned = *(unsigned long *)p_dma_acch;
+ u8 *tmp = (u8 *)vaddr;
+ tmp -= misaligned;
+ kfree((void *)tmp);
+}
+
/*
* __vxge_hw_blockpool_create - Create block pool
*/
@@ -4845,12 +5008,11 @@ void __vxge_hw_blockpool_blocks_remove(s
* vxge_hw_blockpool_block_add - callback for vxge_os_dma_malloc_async
* Adds a block to block pool
*/
-void vxge_hw_blockpool_block_add(
- struct __vxge_hw_device *devh,
- void *block_addr,
- u32 length,
- struct pci_dev *dma_h,
- struct pci_dev *acc_handle)
+static void vxge_hw_blockpool_block_add(struct __vxge_hw_device *devh,
+ void *block_addr,
+ u32 length,
+ struct pci_dev *dma_h,
+ struct pci_dev *acc_handle)
{
struct __vxge_hw_blockpool *blockpool;
struct __vxge_hw_blockpool_entry *entry = NULL;
--- a/drivers/net/vxge/vxge-config.h 2010-10-15 09:10:06.766402819 -0700
+++ b/drivers/net/vxge/vxge-config.h 2010-10-15 10:14:19.925408165 -0700
@@ -183,11 +183,6 @@ struct vxge_hw_device_version {
char version[VXGE_HW_FW_STRLEN];
};
-u64
-__vxge_hw_vpath_pci_func_mode_get(
- u32 vp_id,
- struct vxge_hw_vpath_reg __iomem *vpath_reg);
-
/**
* struct vxge_hw_fifo_config - Configuration of fifo.
* @enable: Is this fifo to be commissioned
@@ -1426,9 +1421,6 @@ struct vxge_hw_rth_hash_types {
u8 hash_type_ipv6ex_en;
};
-u32
-vxge_hw_device_debug_mask_get(struct __vxge_hw_device *devh);
-
void vxge_hw_device_debug_set(
struct __vxge_hw_device *devh,
enum vxge_debug_level level,
@@ -1440,9 +1432,6 @@ vxge_hw_device_error_level_get(struct __
u32
vxge_hw_device_trace_level_get(struct __vxge_hw_device *devh);
-u32
-vxge_hw_device_debug_mask_get(struct __vxge_hw_device *devh);
-
/**
* vxge_hw_ring_rxd_size_get - Get the size of ring descriptor.
* @buf_mode: Buffer mode (1, 3 or 5)
@@ -1817,60 +1806,10 @@ struct vxge_hw_vpath_attr {
struct vxge_hw_fifo_attr fifo_attr;
};
-enum vxge_hw_status
-__vxge_hw_blockpool_create(struct __vxge_hw_device *hldev,
- struct __vxge_hw_blockpool *blockpool,
- u32 pool_size,
- u32 pool_max);
-
-void
-__vxge_hw_blockpool_destroy(struct __vxge_hw_blockpool *blockpool);
-
-struct __vxge_hw_blockpool_entry *
-__vxge_hw_blockpool_block_allocate(struct __vxge_hw_device *hldev,
- u32 size);
-
-void
-__vxge_hw_blockpool_block_free(struct __vxge_hw_device *hldev,
- struct __vxge_hw_blockpool_entry *entry);
-
-void *
-__vxge_hw_blockpool_malloc(struct __vxge_hw_device *hldev,
- u32 size,
- struct vxge_hw_mempool_dma *dma_object);
-
-void
-__vxge_hw_blockpool_free(struct __vxge_hw_device *hldev,
- void *memblock,
- u32 size,
- struct vxge_hw_mempool_dma *dma_object);
-
-enum vxge_hw_status
-__vxge_hw_device_fifo_config_check(struct vxge_hw_fifo_config *fifo_config);
-
-enum vxge_hw_status
-__vxge_hw_device_config_check(struct vxge_hw_device_config *new_config);
-
-enum vxge_hw_status
-vxge_hw_mgmt_device_config(struct __vxge_hw_device *devh,
- struct vxge_hw_device_config *dev_config, int size);
-
enum vxge_hw_status __devinit vxge_hw_device_hw_info_get(
void __iomem *bar0,
struct vxge_hw_device_hw_info *hw_info);
-enum vxge_hw_status
-__vxge_hw_vpath_fw_ver_get(
- u32 vp_id,
- struct vxge_hw_vpath_reg __iomem *vpath_reg,
- struct vxge_hw_device_hw_info *hw_info);
-
-enum vxge_hw_status
-__vxge_hw_vpath_card_info_get(
- u32 vp_id,
- struct vxge_hw_vpath_reg __iomem *vpath_reg,
- struct vxge_hw_device_hw_info *hw_info);
-
enum vxge_hw_status __devinit vxge_hw_device_config_default_get(
struct vxge_hw_device_config *device_config);
@@ -1954,38 +1893,6 @@ out:
return vaddr;
}
-extern void vxge_hw_blockpool_block_add(
- struct __vxge_hw_device *devh,
- void *block_addr,
- u32 length,
- struct pci_dev *dma_h,
- struct pci_dev *acc_handle);
-
-static inline void vxge_os_dma_malloc_async(struct pci_dev *pdev, void *devh,
- unsigned long size)
-{
- gfp_t flags;
- void *vaddr;
-
- if (in_interrupt())
- flags = GFP_ATOMIC | GFP_DMA;
- else
- flags = GFP_KERNEL | GFP_DMA;
-
- vaddr = kmalloc((size), flags);
-
- vxge_hw_blockpool_block_add(devh, vaddr, size, pdev, pdev);
-}
-
-static inline void vxge_os_dma_free(struct pci_dev *pdev, const void *vaddr,
- struct pci_dev **p_dma_acch)
-{
- unsigned long misaligned = *(unsigned long *)p_dma_acch;
- u8 *tmp = (u8 *)vaddr;
- tmp -= misaligned;
- kfree((void *)tmp);
-}
-
/*
* __vxge_hw_mempool_item_priv - will return pointer on per item private space
*/
@@ -2010,40 +1917,6 @@ __vxge_hw_mempool_item_priv(
(*memblock_item_idx) * mempool->items_priv_size;
}
-enum vxge_hw_status
-__vxge_hw_mempool_grow(
- struct vxge_hw_mempool *mempool,
- u32 num_allocate,
- u32 *num_allocated);
-
-struct vxge_hw_mempool*
-__vxge_hw_mempool_create(
- struct __vxge_hw_device *devh,
- u32 memblock_size,
- u32 item_size,
- u32 private_size,
- u32 items_initial,
- u32 items_max,
- struct vxge_hw_mempool_cbs *mp_callback,
- void *userdata);
-
-struct __vxge_hw_channel*
-__vxge_hw_channel_allocate(struct __vxge_hw_vpath_handle *vph,
- enum __vxge_hw_channel_type type, u32 length,
- u32 per_dtr_space, void *userdata);
-
-void
-__vxge_hw_channel_free(
- struct __vxge_hw_channel *channel);
-
-enum vxge_hw_status
-__vxge_hw_channel_initialize(
- struct __vxge_hw_channel *channel);
-
-enum vxge_hw_status
-__vxge_hw_channel_reset(
- struct __vxge_hw_channel *channel);
-
/*
* __vxge_hw_fifo_txdl_priv - Return the max fragments allocated
* for the fifo.
@@ -2065,9 +1938,6 @@ enum vxge_hw_status vxge_hw_vpath_open(
struct vxge_hw_vpath_attr *attr,
struct __vxge_hw_vpath_handle **vpath_handle);
-enum vxge_hw_status
-__vxge_hw_device_vpath_reset_in_prog_check(u64 __iomem *vpath_rst_in_prog);
-
enum vxge_hw_status vxge_hw_vpath_close(
struct __vxge_hw_vpath_handle *vpath_handle);
@@ -2089,54 +1959,9 @@ enum vxge_hw_status vxge_hw_vpath_mtu_se
struct __vxge_hw_vpath_handle *vpath_handle,
u32 new_mtu);
-enum vxge_hw_status vxge_hw_vpath_stats_enable(
- struct __vxge_hw_vpath_handle *vpath_handle);
-
-enum vxge_hw_status
-__vxge_hw_vpath_stats_access(
- struct __vxge_hw_virtualpath *vpath,
- u32 operation,
- u32 offset,
- u64 *stat);
-
-enum vxge_hw_status
-__vxge_hw_vpath_xmac_tx_stats_get(
- struct __vxge_hw_virtualpath *vpath,
- struct vxge_hw_xmac_vpath_tx_stats *vpath_tx_stats);
-
-enum vxge_hw_status
-__vxge_hw_vpath_xmac_rx_stats_get(
- struct __vxge_hw_virtualpath *vpath,
- struct vxge_hw_xmac_vpath_rx_stats *vpath_rx_stats);
-
-enum vxge_hw_status
-__vxge_hw_vpath_stats_get(
- struct __vxge_hw_virtualpath *vpath,
- struct vxge_hw_vpath_stats_hw_info *hw_stats);
-
void
vxge_hw_vpath_rx_doorbell_init(struct __vxge_hw_vpath_handle *vp);
-enum vxge_hw_status
-__vxge_hw_device_vpath_config_check(struct vxge_hw_vp_config *vp_config);
-
-void
-__vxge_hw_device_pci_e_init(struct __vxge_hw_device *hldev);
-
-enum vxge_hw_status
-__vxge_hw_legacy_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg);
-
-enum vxge_hw_status
-__vxge_hw_vpath_swapper_set(struct vxge_hw_vpath_reg __iomem *vpath_reg);
-
-enum vxge_hw_status
-__vxge_hw_kdfc_swapper_set(struct vxge_hw_legacy_reg __iomem *legacy_reg,
- struct vxge_hw_vpath_reg __iomem *vpath_reg);
-
-enum vxge_hw_status
-__vxge_hw_device_register_poll(
- void __iomem *reg,
- u64 mask, u32 max_millis);
#ifndef readq
static inline u64 readq(void __iomem *addr)
@@ -2168,62 +1993,12 @@ static inline void __vxge_hw_pio_mem_wri
writel(val, addr);
}
-static inline enum vxge_hw_status
-__vxge_hw_pio_mem_write64(u64 val64, void __iomem *addr,
- u64 mask, u32 max_millis)
-{
- enum vxge_hw_status status = VXGE_HW_OK;
-
- __vxge_hw_pio_mem_write32_lower((u32)vxge_bVALn(val64, 32, 32), addr);
- wmb();
- __vxge_hw_pio_mem_write32_upper((u32)vxge_bVALn(val64, 0, 32), addr);
- wmb();
-
- status = __vxge_hw_device_register_poll(addr, mask, max_millis);
- return status;
-}
-
-struct vxge_hw_toc_reg __iomem *
-__vxge_hw_device_toc_get(void __iomem *bar0);
-
-enum vxge_hw_status
-__vxge_hw_device_reg_addr_get(struct __vxge_hw_device *hldev);
-
-void
-__vxge_hw_device_id_get(struct __vxge_hw_device *hldev);
-
-void
-__vxge_hw_device_host_info_get(struct __vxge_hw_device *hldev);
-
enum vxge_hw_status
vxge_hw_device_flick_link_led(struct __vxge_hw_device *devh, u64 on_off);
enum vxge_hw_status
-__vxge_hw_device_initialize(struct __vxge_hw_device *hldev);
-
-enum vxge_hw_status
-__vxge_hw_vpath_pci_read(
- struct __vxge_hw_virtualpath *vpath,
- u32 phy_func_0,
- u32 offset,
- u32 *val);
-
-enum vxge_hw_status
-__vxge_hw_vpath_addr_get(
- u32 vp_id,
- struct vxge_hw_vpath_reg __iomem *vpath_reg,
- u8 (macaddr)[ETH_ALEN],
- u8 (macaddr_mask)[ETH_ALEN]);
-
-u32
-__vxge_hw_vpath_func_id_get(
- u32 vp_id, struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg);
-
-enum vxge_hw_status
-__vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath);
-
-enum vxge_hw_status
vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask);
+
/**
* vxge_debug
* @level: level of debug verbosity.
--- a/drivers/net/vxge/vxge-main.c 2010-10-15 09:10:06.734401351 -0700
+++ b/drivers/net/vxge/vxge-main.c 2010-10-15 10:13:44.000142249 -0700
@@ -82,6 +82,16 @@ module_param_array(bw_percentage, uint,
static struct vxge_drv_config *driver_config;
+static enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
+ struct macInfo *mac);
+static enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev,
+ struct macInfo *mac);
+static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac);
+static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac);
+static enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath);
+static enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath);
+static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
+
static inline int is_vxge_card_up(struct vxgedev *vdev)
{
return test_bit(__VXGE_STATE_CARD_UP, &vdev->state);
@@ -138,7 +148,7 @@ static inline void VXGE_COMPLETE_ALL_RX(
* This function is called during interrupt context to notify link up state
* change.
*/
-void
+static void
vxge_callback_link_up(struct __vxge_hw_device *hldev)
{
struct net_device *dev = hldev->ndev;
@@ -162,7 +172,7 @@ vxge_callback_link_up(struct __vxge_hw_d
* This function is called during interrupt context to notify link down state
* change.
*/
-void
+static void
vxge_callback_link_down(struct __vxge_hw_device *hldev)
{
struct net_device *dev = hldev->ndev;
@@ -354,7 +364,7 @@ static inline void vxge_post(int *dtr_cn
* If the interrupt is because of a received frame or if the receive ring
* contains fresh as yet un-processed frames, this function is called.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr,
u8 t_code, void *userdata)
{
@@ -531,7 +541,7 @@ vxge_rx_1b_compl(struct __vxge_hw_ring *
* freed and frees all skbs whose data have already DMA'ed into the NICs
* internal memory.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
vxge_xmit_compl(struct __vxge_hw_fifo *fifo_hw, void *dtr,
enum vxge_hw_fifo_tcode t_code, void *userdata,
struct sk_buff ***skb_ptr, int nr_skb, int *more)
@@ -1246,7 +1256,7 @@ static int vxge_set_mac_addr(struct net_
*
* Enables the interrupts for the vpath
*/
-void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id)
+static void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id)
{
struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
int msix_id = 0;
@@ -1279,7 +1289,7 @@ void vxge_vpath_intr_enable(struct vxged
*
* Disables the interrupts for the vpath
*/
-void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
+static void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id)
{
struct vxge_vpath *vpath = &vdev->vpaths[vp_id];
int msix_id;
@@ -1553,7 +1563,7 @@ out:
*
* driver may reset the chip on events of serr, eccerr, etc
*/
-int vxge_reset(struct vxgedev *vdev)
+static int vxge_reset(struct vxgedev *vdev)
{
return do_vxge_reset(vdev, VXGE_LL_FULL_RESET);
}
@@ -1724,7 +1734,7 @@ static enum vxge_hw_status vxge_rth_conf
return status;
}
-int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
+static int vxge_mac_list_add(struct vxge_vpath *vpath, struct macInfo *mac)
{
struct vxge_mac_addrs *new_mac_entry;
u8 *mac_address = NULL;
@@ -1757,7 +1767,8 @@ int vxge_mac_list_add(struct vxge_vpath
}
/* Add a mac address to DA table */
-enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
+static enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
+ struct macInfo *mac)
{
enum vxge_hw_status status = VXGE_HW_OK;
struct vxge_vpath *vpath;
@@ -1782,7 +1793,7 @@ enum vxge_hw_status vxge_add_mac_addr(st
return status;
}
-int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
+static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
{
struct list_head *entry, *next;
u64 del_mac = 0;
@@ -1807,7 +1818,8 @@ int vxge_mac_list_del(struct vxge_vpath
return FALSE;
}
/* delete a mac address from DA table */
-enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev, struct macInfo *mac)
+static enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev,
+ struct macInfo *mac)
{
enum vxge_hw_status status = VXGE_HW_OK;
struct vxge_vpath *vpath;
@@ -1854,7 +1866,7 @@ static vxge_search_mac_addr_in_da_table(
}
/* Store all vlan ids from the list to the vid table */
-enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath)
+static enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath)
{
enum vxge_hw_status status = VXGE_HW_OK;
struct vxgedev *vdev = vpath->vdev;
@@ -1874,7 +1886,7 @@ enum vxge_hw_status vxge_restore_vpath_v
}
/* Store all mac addresses from the list to the DA table */
-enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
+static enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath)
{
enum vxge_hw_status status = VXGE_HW_OK;
struct macInfo mac_info;
@@ -1916,7 +1928,7 @@ enum vxge_hw_status vxge_restore_vpath_m
}
/* reset vpaths */
-enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
+static enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev)
{
enum vxge_hw_status status = VXGE_HW_OK;
struct vxge_vpath *vpath;
@@ -1948,7 +1960,7 @@ enum vxge_hw_status vxge_reset_all_vpath
}
/* close vpaths */
-void vxge_close_vpaths(struct vxgedev *vdev, int index)
+static void vxge_close_vpaths(struct vxgedev *vdev, int index)
{
struct vxge_vpath *vpath;
int i;
@@ -1966,7 +1978,7 @@ void vxge_close_vpaths(struct vxgedev *v
}
/* open vpaths */
-int vxge_open_vpaths(struct vxgedev *vdev)
+static int vxge_open_vpaths(struct vxgedev *vdev)
{
struct vxge_hw_vpath_attr attr;
enum vxge_hw_status status;
@@ -2517,7 +2529,7 @@ static void vxge_poll_vp_lockup(unsigned
* Return value: '0' on success and an appropriate (-)ve integer as
* defined in errno.h file on failure.
*/
-int
+static int
vxge_open(struct net_device *dev)
{
enum vxge_hw_status status;
@@ -2721,7 +2733,7 @@ out0:
}
/* Loop throught the mac address list and delete all the entries */
-void vxge_free_mac_add_list(struct vxge_vpath *vpath)
+static void vxge_free_mac_add_list(struct vxge_vpath *vpath)
{
struct list_head *entry, *next;
@@ -2745,7 +2757,7 @@ static void vxge_napi_del_all(struct vxg
}
}
-int do_vxge_close(struct net_device *dev, int do_io)
+static int do_vxge_close(struct net_device *dev, int do_io)
{
enum vxge_hw_status status;
struct vxgedev *vdev;
@@ -2856,7 +2868,7 @@ int do_vxge_close(struct net_device *dev
* Return value: '0' on success and an appropriate (-)ve integer as
* defined in errno.h file on failure.
*/
-int
+static int
vxge_close(struct net_device *dev)
{
do_vxge_close(dev, 1);
@@ -3113,10 +3125,10 @@ static const struct net_device_ops vxge_
#endif
};
-int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
- struct vxge_config *config,
- int high_dma, int no_of_vpath,
- struct vxgedev **vdev_out)
+static int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
+ struct vxge_config *config,
+ int high_dma, int no_of_vpath,
+ struct vxgedev **vdev_out)
{
struct net_device *ndev;
enum vxge_hw_status status = VXGE_HW_OK;
@@ -3164,7 +3176,7 @@ int __devinit vxge_device_register(struc
ndev->watchdog_timeo = VXGE_LL_WATCH_DOG_TIMEOUT;
- initialize_ethtool_ops(ndev);
+ vxge_initialize_ethtool_ops(ndev);
/* Allocate memory for vpath */
vdev->vpaths = kzalloc((sizeof(struct vxge_vpath)) *
@@ -3249,7 +3261,7 @@ _out0:
*
* This function will unregister and free network device
*/
-void
+static void
vxge_device_unregister(struct __vxge_hw_device *hldev)
{
struct vxgedev *vdev;
--- a/drivers/net/vxge/vxge-main.h 2010-10-15 09:10:06.802404471 -0700
+++ b/drivers/net/vxge/vxge-main.h 2010-10-15 10:13:51.232396166 -0700
@@ -396,64 +396,7 @@ struct vxge_tx_priv {
mod_timer(&timer, (jiffies + exp)); \
} while (0);
-int __devinit vxge_device_register(struct __vxge_hw_device *devh,
- struct vxge_config *config,
- int high_dma, int no_of_vpath,
- struct vxgedev **vdev);
-
-void vxge_device_unregister(struct __vxge_hw_device *devh);
-
-void vxge_vpath_intr_enable(struct vxgedev *vdev, int vp_id);
-
-void vxge_vpath_intr_disable(struct vxgedev *vdev, int vp_id);
-
-void vxge_callback_link_up(struct __vxge_hw_device *devh);
-
-void vxge_callback_link_down(struct __vxge_hw_device *devh);
-
-enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
- struct macInfo *mac);
-
-int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac);
-
-int vxge_reset(struct vxgedev *vdev);
-
-enum vxge_hw_status
-vxge_rx_1b_compl(struct __vxge_hw_ring *ringh, void *dtr,
- u8 t_code, void *userdata);
-
-enum vxge_hw_status
-vxge_xmit_compl(struct __vxge_hw_fifo *fifo_hw, void *dtr,
- enum vxge_hw_fifo_tcode t_code, void *userdata,
- struct sk_buff ***skb_ptr, int nr_skbs, int *more);
-
-int vxge_close(struct net_device *dev);
-
-int vxge_open(struct net_device *dev);
-
-void vxge_close_vpaths(struct vxgedev *vdev, int index);
-
-int vxge_open_vpaths(struct vxgedev *vdev);
-
-enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
-
-enum vxge_hw_status vxge_add_mac_addr(struct vxgedev *vdev,
- struct macInfo *mac);
-
-enum vxge_hw_status vxge_del_mac_addr(struct vxgedev *vdev,
- struct macInfo *mac);
-
-int vxge_mac_list_add(struct vxge_vpath *vpath,
- struct macInfo *mac);
-
-void vxge_free_mac_add_list(struct vxge_vpath *vpath);
-
-enum vxge_hw_status vxge_restore_vpath_mac_addr(struct vxge_vpath *vpath);
-
-enum vxge_hw_status vxge_restore_vpath_vid_table(struct vxge_vpath *vpath);
-
-int do_vxge_close(struct net_device *dev, int do_io);
-extern void initialize_ethtool_ops(struct net_device *ndev);
+extern void vxge_initialize_ethtool_ops(struct net_device *ndev);
/**
* #define VXGE_DEBUG_INIT: debug for initialization functions
* #define VXGE_DEBUG_TX : debug transmit related functions
--- a/drivers/net/vxge/vxge-traffic.c 2010-10-15 09:10:06.750402084 -0700
+++ b/drivers/net/vxge/vxge-traffic.c 2010-10-15 09:36:10.750557049 -0700
@@ -17,6 +17,13 @@
#include "vxge-config.h"
#include "vxge-main.h"
+static enum vxge_hw_status
+__vxge_hw_device_handle_error(struct __vxge_hw_device *hldev,
+ u32 vp_id, enum vxge_hw_event type);
+static enum vxge_hw_status
+__vxge_hw_vpath_alarm_process(struct __vxge_hw_virtualpath *vpath,
+ u32 skip_alarms);
+
/*
* vxge_hw_vpath_intr_enable - Enable vpath interrupts.
* @vp: Virtual Path handle.
@@ -513,7 +520,7 @@ exit:
* Link up indication handler. The function is invoked by HW when
* Titan indicates that the link is up for programmable amount of time.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_device_handle_link_up_ind(struct __vxge_hw_device *hldev)
{
/*
@@ -538,7 +545,7 @@ exit:
* Link down indication handler. The function is invoked by HW when
* Titan indicates that the link is down.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_device_handle_link_down_ind(struct __vxge_hw_device *hldev)
{
/*
@@ -564,7 +571,7 @@ exit:
*
* Handle error.
*/
-enum vxge_hw_status
+static enum vxge_hw_status
__vxge_hw_device_handle_error(
struct __vxge_hw_device *hldev,
u32 vp_id,
@@ -646,7 +653,7 @@ void vxge_hw_device_clear_tx_rx(struct _
* it swaps the reserve and free arrays.
*
*/
-enum vxge_hw_status
+static enum vxge_hw_status
vxge_hw_channel_dtr_alloc(struct __vxge_hw_channel *channel, void **dtrh)
{
void **tmp_arr;
@@ -692,7 +699,8 @@ _alloc_after_swap:
* Posts a dtr to work array.
*
*/
-void vxge_hw_channel_dtr_post(struct __vxge_hw_channel *channel, void *dtrh)
+static void vxge_hw_channel_dtr_post(struct __vxge_hw_channel *channel,
+ void *dtrh)
{
vxge_assert(channel->work_arr[channel->post_index] == NULL);
@@ -1658,37 +1666,6 @@ exit:
}
/**
- * vxge_hw_vpath_vid_get_next - Get the next vid entry for this vpath
- * from vlan id table.
- * @vp: Vpath handle.
- * @vid: Buffer to return vlan id
- *
- * Returns the next vlan id in the list for this vpath.
- * see also: vxge_hw_vpath_vid_get
- *
- */
-enum vxge_hw_status
-vxge_hw_vpath_vid_get_next(struct __vxge_hw_vpath_handle *vp, u64 *vid)
-{
- u64 data;
- enum vxge_hw_status status = VXGE_HW_OK;
-
- if (vp == NULL) {
- status = VXGE_HW_ERR_INVALID_HANDLE;
- goto exit;
- }
-
- status = __vxge_hw_vpath_rts_table_get(vp,
- VXGE_HW_RTS_ACCESS_STEER_CTRL_ACTION_LIST_NEXT_ENTRY,
- VXGE_HW_RTS_ACCESS_STEER_CTRL_DATA_STRUCT_SEL_VID,
- 0, vid, &data);
-
- *vid = VXGE_HW_RTS_ACCESS_STEER_DATA0_GET_VLAN_ID(*vid);
-exit:
- return status;
-}
-
-/**
* vxge_hw_vpath_vid_delete - Delete the vlan id entry for this vpath
* to vlan id table.
* @vp: Vpath handle.
@@ -1898,9 +1875,9 @@ exit:
* Process vpath alarms.
*
*/
-enum vxge_hw_status __vxge_hw_vpath_alarm_process(
- struct __vxge_hw_virtualpath *vpath,
- u32 skip_alarms)
+static enum vxge_hw_status
+__vxge_hw_vpath_alarm_process(struct __vxge_hw_virtualpath *vpath,
+ u32 skip_alarms)
{
u64 val64;
u64 alarm_status;
@@ -2265,36 +2242,6 @@ vxge_hw_vpath_msix_mask(struct __vxge_hw
}
/**
- * vxge_hw_vpath_msix_clear - Clear MSIX Vector.
- * @vp: Virtual Path handle.
- * @msix_id: MSI ID
- *
- * The function clears the msix interrupt for the given msix_id
- *
- * Returns: 0,
- * Otherwise, VXGE_HW_ERR_WRONG_IRQ if the msix index is out of range
- * status.
- * See also:
- */
-void
-vxge_hw_vpath_msix_clear(struct __vxge_hw_vpath_handle *vp, int msix_id)
-{
- struct __vxge_hw_device *hldev = vp->vpath->hldev;
- if (hldev->config.intr_mode ==
- VXGE_HW_INTR_MODE_MSIX_ONE_SHOT) {
- __vxge_hw_pio_mem_write32_upper(
- (u32)vxge_bVALn(vxge_mBIT(msix_id >> 2), 0, 32),
- &hldev->common_reg->
- clr_msix_one_shot_vec[msix_id%4]);
- } else {
- __vxge_hw_pio_mem_write32_upper(
- (u32)vxge_bVALn(vxge_mBIT(msix_id >> 2), 0, 32),
- &hldev->common_reg->
- clear_msix_mask_vect[msix_id%4]);
- }
-}
-
-/**
* vxge_hw_vpath_msix_unmask - Unmask the MSIX Vector.
* @vp: Virtual Path handle.
* @msix_id: MSI ID
@@ -2316,22 +2263,6 @@ vxge_hw_vpath_msix_unmask(struct __vxge_
}
/**
- * vxge_hw_vpath_msix_mask_all - Mask all MSIX vectors for the vpath.
- * @vp: Virtual Path handle.
- *
- * The function masks all msix interrupt for the given vpath
- *
- */
-void
-vxge_hw_vpath_msix_mask_all(struct __vxge_hw_vpath_handle *vp)
-{
-
- __vxge_hw_pio_mem_write32_upper(
- (u32)vxge_bVALn(vxge_mBIT(vp->vpath->vp_id), 0, 32),
- &vp->vpath->hldev->common_reg->set_msix_mask_all_vect);
-}
-
-/**
* vxge_hw_vpath_inta_mask_tx_rx - Mask Tx and Rx interrupts.
* @vp: Virtual Path handle.
*
--- a/drivers/net/vxge/vxge-traffic.h 2010-10-15 09:10:06.834405939 -0700
+++ b/drivers/net/vxge/vxge-traffic.h 2010-10-15 10:14:43.870258247 -0700
@@ -1749,14 +1749,6 @@ vxge_hw_mrpcim_stats_access(
u64 *stat);
enum vxge_hw_status
-vxge_hw_device_xmac_aggr_stats_get(struct __vxge_hw_device *devh, u32 port,
- struct vxge_hw_xmac_aggr_stats *aggr_stats);
-
-enum vxge_hw_status
-vxge_hw_device_xmac_port_stats_get(struct __vxge_hw_device *devh, u32 port,
- struct vxge_hw_xmac_port_stats *port_stats);
-
-enum vxge_hw_status
vxge_hw_device_xmac_stats_get(struct __vxge_hw_device *devh,
struct vxge_hw_xmac_stats *xmac_stats);
@@ -2117,49 +2109,10 @@ struct __vxge_hw_ring_rxd_priv {
#endif
};
-/* ========================= RING PRIVATE API ============================= */
-u64
-__vxge_hw_ring_first_block_address_get(
- struct __vxge_hw_ring *ringh);
-
-enum vxge_hw_status
-__vxge_hw_ring_create(
- struct __vxge_hw_vpath_handle *vpath_handle,
- struct vxge_hw_ring_attr *attr);
-
-enum vxge_hw_status
-__vxge_hw_ring_abort(
- struct __vxge_hw_ring *ringh);
-
-enum vxge_hw_status
-__vxge_hw_ring_reset(
- struct __vxge_hw_ring *ringh);
-
-enum vxge_hw_status
-__vxge_hw_ring_delete(
- struct __vxge_hw_vpath_handle *vpath_handle);
-
/* ========================= FIFO PRIVATE API ============================= */
struct vxge_hw_fifo_attr;
-enum vxge_hw_status
-__vxge_hw_fifo_create(
- struct __vxge_hw_vpath_handle *vpath_handle,
- struct vxge_hw_fifo_attr *attr);
-
-enum vxge_hw_status
-__vxge_hw_fifo_abort(
- struct __vxge_hw_fifo *fifoh);
-
-enum vxge_hw_status
-__vxge_hw_fifo_reset(
- struct __vxge_hw_fifo *ringh);
-
-enum vxge_hw_status
-__vxge_hw_fifo_delete(
- struct __vxge_hw_vpath_handle *vpath_handle);
-
struct vxge_hw_mempool_cbs {
void (*item_func_alloc)(
struct vxge_hw_mempool *mempoolh,
@@ -2169,10 +2122,6 @@ struct vxge_hw_mempool_cbs {
u32 is_last);
};
-void
-__vxge_hw_mempool_destroy(
- struct vxge_hw_mempool *mempool);
-
#define VXGE_HW_VIRTUAL_PATH_HANDLE(vpath) \
((struct __vxge_hw_vpath_handle *)(vpath)->vpath_handles.next)
@@ -2195,61 +2144,10 @@ __vxge_hw_vpath_rts_table_set(
u64 data2);
enum vxge_hw_status
-__vxge_hw_vpath_reset(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
-__vxge_hw_vpath_sw_reset(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
__vxge_hw_vpath_enable(
struct __vxge_hw_device *devh,
u32 vp_id);
-void
-__vxge_hw_vpath_prc_configure(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
-__vxge_hw_vpath_kdfc_configure(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
-__vxge_hw_vpath_mac_configure(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
-__vxge_hw_vpath_tim_configure(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
-__vxge_hw_vpath_initialize(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
-__vxge_hw_vp_initialize(
- struct __vxge_hw_device *devh,
- u32 vp_id,
- struct vxge_hw_vp_config *config);
-
-void
-__vxge_hw_vp_terminate(
- struct __vxge_hw_device *devh,
- u32 vp_id);
-
-enum vxge_hw_status
-__vxge_hw_vpath_alarm_process(
- struct __vxge_hw_virtualpath *vpath,
- u32 skip_alarms);
-
void vxge_hw_device_intr_enable(
struct __vxge_hw_device *devh);
@@ -2321,11 +2219,6 @@ vxge_hw_vpath_vid_get(
u64 *vid);
enum vxge_hw_status
-vxge_hw_vpath_vid_get_next(
- struct __vxge_hw_vpath_handle *vpath_handle,
- u64 *vid);
-
-enum vxge_hw_status
vxge_hw_vpath_vid_delete(
struct __vxge_hw_vpath_handle *vpath_handle,
u64 vid);
@@ -2387,16 +2280,9 @@ vxge_hw_vpath_msix_mask(struct __vxge_hw
void vxge_hw_device_flush_io(struct __vxge_hw_device *devh);
void
-vxge_hw_vpath_msix_clear(struct __vxge_hw_vpath_handle *vpath_handle,
- int msix_id);
-
-void
vxge_hw_vpath_msix_unmask(struct __vxge_hw_vpath_handle *vpath_handle,
int msix_id);
-void
-vxge_hw_vpath_msix_mask_all(struct __vxge_hw_vpath_handle *vpath_handle);
-
enum vxge_hw_status vxge_hw_vpath_intr_enable(
struct __vxge_hw_vpath_handle *vpath_handle);
@@ -2415,12 +2301,6 @@ vxge_hw_channel_msix_mask(struct __vxge_
void
vxge_hw_channel_msix_unmask(struct __vxge_hw_channel *channelh, int msix_id);
-enum vxge_hw_status
-vxge_hw_channel_dtr_alloc(struct __vxge_hw_channel *channel, void **dtrh);
-
-void
-vxge_hw_channel_dtr_post(struct __vxge_hw_channel *channel, void *dtrh);
-
void
vxge_hw_channel_dtr_try_complete(struct __vxge_hw_channel *channel,
void **dtrh);
@@ -2436,18 +2316,4 @@ vxge_hw_channel_dtr_count(struct __vxge_
void
vxge_hw_vpath_tti_ci_set(struct __vxge_hw_device *hldev, u32 vp_id);
-/* ========================== PRIVATE API ================================= */
-
-enum vxge_hw_status
-__vxge_hw_device_handle_link_up_ind(struct __vxge_hw_device *hldev);
-
-enum vxge_hw_status
-__vxge_hw_device_handle_link_down_ind(struct __vxge_hw_device *hldev);
-
-enum vxge_hw_status
-__vxge_hw_device_handle_error(
- struct __vxge_hw_device *hldev,
- u32 vp_id,
- enum vxge_hw_event type);
-
#endif
--- a/drivers/net/vxge/vxge-ethtool.c 2010-10-15 09:10:06.718400615 -0700
+++ b/drivers/net/vxge/vxge-ethtool.c 2010-10-15 10:13:39.927999492 -0700
@@ -1142,7 +1142,7 @@ static const struct ethtool_ops vxge_eth
.get_ethtool_stats = vxge_get_ethtool_stats,
};
-void initialize_ethtool_ops(struct net_device *ndev)
+void vxge_initialize_ethtool_ops(struct net_device *ndev)
{
SET_ETHTOOL_OPS(ndev, &vxge_ethtool_ops);
}
^ permalink raw reply
* Re: [PATCH] sctp: implement SIOCINQ ioctl() (take 3 bis)
From: Diego Elio Pettenò @ 2010-10-15 17:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-sctp
In-Reply-To: <20101015.095940.39172218.davem@davemloft.net>
Il giorno ven, 15/10/2010 alle 09.59 -0700, David Miller ha scritto:
>
> I'm pretty sure it's in the net-next-2.6, is it not?
Ah yes it is, sorry, I was mislead by the presence in -rc8 of the other
SCTP patches that came afterwards (and because it has been since August
I'm dragging this patch around).
Thank you very much!
--
Diego Elio Pettenò — “Flameeyes”
http://blog.flameeyes.eu/
If you found a .asc file in this mail and know not what it is,
it's a GnuPG digital signature: http://www.gnupg.org/
^ permalink raw reply
* RE: [PATCH net-next] tipc: cleanup function namespace
From: Jon Maloy @ 2010-10-15 16:59 UTC (permalink / raw)
To: Neil Horman, Stephen Hemminger
Cc: Paul Gortmaker, David Miller, netdev@vger.kernel.org,
allan.stephens@windriver.com
In-Reply-To: <20101015110122.GD22294@hmsreliant.think-freely.org>
<...>
> > > diff --git a/Documentation/feature-removal-schedule.txt
> > > b/Documentation/feature-removal-schedule.txt
> > > index f456389..1def37e 100644
> > > --- a/Documentation/feature-removal-schedule.txt
> > > +++ b/Documentation/feature-removal-schedule.txt
> > > @@ -573,3 +573,15 @@ Why: Hareware scan is the prefer
> method for iwlwifi devices for
> > > Who: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> > >
> > > ----------------------------
> > > +
> > > +What: TIPC: Delete all code and exported symbols
> specific to Native API
> > > +When: March 2011
> > > +Why: The TIPC Native API, as described here:
> > > +
> http://tipc.sourceforge.net/doc/tipc_1.7_prog_guide.html#native_api
> > > + is implemented by exporting a bunch of otherwise unused
> functions
> > > + for possible modular linkage by custom end-user code. This goes
> > > + against the general concept that the kernel should not be libc.
> > > +
> > > +Who: Paul Gortmaker <paul.gortmaker@windriver.com>
> > > +
> > > +----------------------------
> >
> > Acked-by: Stephen Hemminger <shemminger@vyatta.com>
> >
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
^ permalink raw reply
* Re: [PATCH] sctp: implement SIOCINQ ioctl() (take 3 bis)
From: David Miller @ 2010-10-15 16:59 UTC (permalink / raw)
To: flameeyes; +Cc: netdev, linux-sctp
In-Reply-To: <1287152557.465.24.camel@yamato.local>
From: Diego Elio Pettenò <flameeyes@gmail.com>
Date: Fri, 15 Oct 2010 16:22:37 +0200
> Il giorno ven, 01/10/2010 alle 11.56 +0200, Diego Elio Pettenò ha
> scritto:
>>
>>
>> This simple patch copies the current approach for SIOCINQ ioctl() from
>> DCCP
>> into SCTP so that the userland code working with SCTP can use a
>> similar
>> interface across different protocols to know how much space to
>> allocate for
>> a buffer.
>
> Any news on getting this one in? Pretty please? :)
I'm pretty sure it's in the net-next-2.6, is it not?
^ permalink raw reply
* Re: [PATCH net-next] net: allocate skbs on local node
From: Christoph Lameter @ 2010-10-15 16:57 UTC (permalink / raw)
To: Eric Dumazet
Cc: Tom Herbert, Andrew Morton, David Miller, netdev, Michael Chan,
Eilon Greenstein, Christoph Hellwig, Pekka Enberg, David Rientjes
In-Reply-To: <1287072352.2712.84.camel@edumazet-laptop>
On Thu, 14 Oct 2010, Eric Dumazet wrote:
> > Some results running netper TCP_RR test with 200 instances, 1 byte
> > request and response on 16 core AMD using bnx2x with one 16 queues,
> > one for each CPU.
> >
> > SLAB
> >
> > Without patch 553570 tps at 86% CPU
> > With patch 791883 tps at 93% CPU
> >
> > SLUB
> >
> > Without patch 704879 tps at 95% CPU
> > With patch 775278 tps at 92% CPU
Shows one basic difference between SLAB and SLUB: SLAB always needs to go
the slow path when allocating from other nodes. SLUB allows other nodes to
use the fast path. First alloc will be slow but it will switch the "local
queue" to the new node ("queue" switching fast because the queue is
simply a linked list from the page struct of objects within the page).
Second and following access will be fast and coming from that node.
But the requirement that objects on the per page queue are only within the
page also limits the size of the queue and often requires more slow path
use on free....
^ permalink raw reply
* Re: openvswitch/flow WAS ( Re: [rfc] Merging the Open vSwitch datapath
From: Ben Pfaff @ 2010-10-15 16:18 UTC (permalink / raw)
To: ovs-team; +Cc: jamal, Jesse Gross, netdev
In-Reply-To: <1287142292.3642.19.camel@bigi>
[adding ovs-team]
On Fri, Oct 15, 2010 at 07:31:32AM -0400, jamal wrote:
>
> Sorry, slightly off topic - and this old (catching up
> with netdev randomly going backwards)..
>
> I was curious after seeing the exchange with Eric D. on
> the tunnels and how you have your own tree so i glossed
> over what your project is doing.
>
> It seems to me that you reinvented things that exist in
> Linux already such as bridging, tunnels and what really
> caught my attention: ability to do flows (tc actions).
> It is possible Linux is missing something you wanted or was
> not efficient enough?
> [For example: I couldnt see anything you needed
> on flow-action management that Linux couldnt do already
> (with already very nice well structured netlink APIs)]
^ permalink raw reply
* Oops (wild pointer) in rt73usb on ARM
From: Ben Hutchings @ 2010-10-15 16:41 UTC (permalink / raw)
To: sunitha ap; +Cc: netdev, linux-wireless
In-Reply-To: <AANLkTikRdxp3PVeXtyhc=TL3r8Cx_mLBe3H4RYz7D2My@mail.gmail.com>
On Fri, 2010-10-15 at 09:35 -0700, sunitha ap wrote:
> Hi
>
> I am running linux on mini2440 (ARM based).
>
> I am able to load most of the drivers and run fine.
>
> When I load rt73usb.ko , I get a crash.
>
> I have copied rt73.bin from my ubuntu 9.1 (x86) to /lib/firmware. Hope
> that is OK
> as it is a data file.
This is correct.
> If not, how do I compile it. I have tried commenting out
> #CONFIG_STANDALONE
> #CONFIG_PREVENT_FIRMWARE_BUILD
> #CONFIG_FIRMWARE_IN_KERNEL
>
> This creates .bin for many drivers but none for rt73.
Only firmware images that used to be embedded in drivers is kept with
the kernel source. Other firmware images are collected in the
linux-firmware repository maintained by David Woodhouse.
> The crash messages is below. I can provide any other info, if required
The crash doesn't seem to have anything to do with the firmware file;
that's just the last message logged by the driver's initialisation code.
I've changed the subject accordingly.
Ben.
> Thanks
> linketu
>
> rt73usb 1-1.1:1.0: firmware: requesting rt73.bin
> Unable to handle kernel paging request at virtual address de17c157
> pgd = c309c000
> [de17c157] *pgd=00000000
> Internal error: Oops: 3 [#1]
> last sysfs file:
> /sys/devices/platform/s3c2410-ohci/usb1/1-1/1-1.1/1-1.1:1.0/firmware/1-1.1:1.0/loading
> Modules linked in: rt73usb rt2x00usb rt2x00lib mac80211 cfg80211
> option usbserial rfcomm hidp l2cap crc16 bluetooth
> CPU: 0 Not tainted (2.6.32.11 #4)
> PC is at put_page+0x4/0x144
> LR is at skb_release_data+0x70/0xa8
> pc : [<c0072f20>] lr : [<c025945c>] psr: 80000013
> sp : c30ffed0 ip : 00000000 fp : 0014cbc8
> r10: c39b9e40 r9 : c30fff04 r8 : c3814754
> r7 : c38139ec r6 : c38141e0 r5 : c39b9e40 r4 : 00000000
> r3 : c38139ec r2 : c38139ec r1 : 000000ff r0 : de17c157
> Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
> Control: c000717f Table: 3309c000 DAC: 00000015
> Process Xfbdev (pid: 1425, stack limit = 0xc30fe270)
> Stack: (0xc30ffed0 to 0xc3100000)
> fec0: 00000000 c39b9e40 c38141e0 c025945c
> fee0: c39b9e40 c3814754 c38141e0 c0258f78 00000000 bf094224 c03e0be0 0000001e
> ff00: c03dd138 c39b9e40 00000000 c38141e0 00000000 00000000 00000000 c39b9e64
> ff20: c334c540 00000002 00000000 00000010 00000000 00000000 c39b9e40 c38141e0
> ff40: c38142c4 c38142b8 00000006 0000000a c0420a60 bf084d84 00000000 c30fe000
> ff60: 00000018 00000001 00000006 c00456e0 00000100 c0045d28 0000002a c30fe000
> ff80: 0000002a 00000000 04000000 0002f000 009ca433 c30fe000 be80d610 c002e068
> ffa0: ffffffff f4000000 04000000 c002ec7c 0000009c 00000000 0000ca00 00000000
> ffc0: 00150b78 00150b60 00030d00 0002f000 009ca433 0000004e be80d610 0014cbc8
> ffe0: 80000000 be80d5b8 009c0000 000afc84 80000010 ffffffff 00000000 00000000
> [<c0072f20>] (put_page+0x4/0x144) from [<c025945c>] (skb_release_data+0x70/0xa8)
> [<c025945c>] (skb_release_data+0x70/0xa8) from [<c0258f78>]
> (__kfree_skb+0xc/0xb0)
> [<c0258f78>] (__kfree_skb+0xc/0xb0) from [<bf094224>]
> (__ieee80211_rx_handle_packet+0x2e0/0x2ec [mac80211])
> [<bf094224>] (__ieee80211_rx_handle_packet+0x2e0/0x2ec [mac80211])
> from [<bf084d84>] (ieee80211_tasklet_handler+0x54)
> [<bf084d84>] (ieee80211_tasklet_handler+0x54/0xe8 [mac80211]) from
> [<c00456e0>] (tasklet_action+0x84/0xe0)
> [<c00456e0>] (tasklet_action+0x84/0xe0) from [<c0045d28>]
> (__do_softirq+0x78/0x104)
> [<c0045d28>] (__do_softirq+0x78/0x104) from [<c002e068>] (asm_do_IRQ+0x68/0x80)
> [<c002e068>] (asm_do_IRQ+0x68/0x80) from [<c002ec7c>] (__irq_usr+0x3c/0xc0)
> Exception stack(0xc30fffb0 to 0xc30ffff8)
> ffa0: 0000009c 00000000 0000ca00 00000000
> ffc0: 00150b78 00150b60 00030d00 0002f000 009ca433 0000004e be80d610 0014cbc8
> ffe0: 80000000 be80d5b8 009c0000 000afc84 80000010 ffffffff
> Code: e59f0000 eaff74e9 c0072e40 e92d4070 (e5903000)
> ---[ end trace 912112f829d72a71 ]---
> Kernel panic - not syncing: Fatal exception in interrupt
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Kernel crash when "requesting rt73.bin"
From: sunitha ap @ 2010-10-15 16:35 UTC (permalink / raw)
To: netdev
Hi
I am running linux on mini2440 (ARM based).
I am able to load most of the drivers and run fine.
When I load rt73usb.ko , I get a crash.
I have copied rt73.bin from my ubuntu 9.1 (x86) to /lib/firmware. Hope
that is OK
as it is a data file. If not, how do I compile it. I have tried commenting out
#CONFIG_STANDALONE
#CONFIG_PREVENT_FIRMWARE_BUILD
#CONFIG_FIRMWARE_IN_KERNEL
This creates .bin for many drivers but none for rt73.
The crash messages is below. I can provide any other info, if required
Thanks
linketu
rt73usb 1-1.1:1.0: firmware: requesting rt73.bin
Unable to handle kernel paging request at virtual address de17c157
pgd = c309c000
[de17c157] *pgd=00000000
Internal error: Oops: 3 [#1]
last sysfs file:
/sys/devices/platform/s3c2410-ohci/usb1/1-1/1-1.1/1-1.1:1.0/firmware/1-1.1:1.0/loading
Modules linked in: rt73usb rt2x00usb rt2x00lib mac80211 cfg80211
option usbserial rfcomm hidp l2cap crc16 bluetooth
CPU: 0 Not tainted (2.6.32.11 #4)
PC is at put_page+0x4/0x144
LR is at skb_release_data+0x70/0xa8
pc : [<c0072f20>] lr : [<c025945c>] psr: 80000013
sp : c30ffed0 ip : 00000000 fp : 0014cbc8
r10: c39b9e40 r9 : c30fff04 r8 : c3814754
r7 : c38139ec r6 : c38141e0 r5 : c39b9e40 r4 : 00000000
r3 : c38139ec r2 : c38139ec r1 : 000000ff r0 : de17c157
Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: c000717f Table: 3309c000 DAC: 00000015
Process Xfbdev (pid: 1425, stack limit = 0xc30fe270)
Stack: (0xc30ffed0 to 0xc3100000)
fec0: 00000000 c39b9e40 c38141e0 c025945c
fee0: c39b9e40 c3814754 c38141e0 c0258f78 00000000 bf094224 c03e0be0 0000001e
ff00: c03dd138 c39b9e40 00000000 c38141e0 00000000 00000000 00000000 c39b9e64
ff20: c334c540 00000002 00000000 00000010 00000000 00000000 c39b9e40 c38141e0
ff40: c38142c4 c38142b8 00000006 0000000a c0420a60 bf084d84 00000000 c30fe000
ff60: 00000018 00000001 00000006 c00456e0 00000100 c0045d28 0000002a c30fe000
ff80: 0000002a 00000000 04000000 0002f000 009ca433 c30fe000 be80d610 c002e068
ffa0: ffffffff f4000000 04000000 c002ec7c 0000009c 00000000 0000ca00 00000000
ffc0: 00150b78 00150b60 00030d00 0002f000 009ca433 0000004e be80d610 0014cbc8
ffe0: 80000000 be80d5b8 009c0000 000afc84 80000010 ffffffff 00000000 00000000
[<c0072f20>] (put_page+0x4/0x144) from [<c025945c>] (skb_release_data+0x70/0xa8)
[<c025945c>] (skb_release_data+0x70/0xa8) from [<c0258f78>]
(__kfree_skb+0xc/0xb0)
[<c0258f78>] (__kfree_skb+0xc/0xb0) from [<bf094224>]
(__ieee80211_rx_handle_packet+0x2e0/0x2ec [mac80211])
[<bf094224>] (__ieee80211_rx_handle_packet+0x2e0/0x2ec [mac80211])
from [<bf084d84>] (ieee80211_tasklet_handler+0x54)
[<bf084d84>] (ieee80211_tasklet_handler+0x54/0xe8 [mac80211]) from
[<c00456e0>] (tasklet_action+0x84/0xe0)
[<c00456e0>] (tasklet_action+0x84/0xe0) from [<c0045d28>]
(__do_softirq+0x78/0x104)
[<c0045d28>] (__do_softirq+0x78/0x104) from [<c002e068>] (asm_do_IRQ+0x68/0x80)
[<c002e068>] (asm_do_IRQ+0x68/0x80) from [<c002ec7c>] (__irq_usr+0x3c/0xc0)
Exception stack(0xc30fffb0 to 0xc30ffff8)
ffa0: 0000009c 00000000 0000ca00 00000000
ffc0: 00150b78 00150b60 00030d00 0002f000 009ca433 0000004e be80d610 0014cbc8
ffe0: 80000000 be80d5b8 009c0000 000afc84 80000010 ffffffff
Code: e59f0000 eaff74e9 c0072e40 e92d4070 (e5903000)
---[ end trace 912112f829d72a71 ]---
Kernel panic - not syncing: Fatal exception in interrupt
^ permalink raw reply
* Re: [net-next-2.6 PATCH] ixgbe: DCB: remove DCB check config
From: David Miller @ 2010-10-15 16:27 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, john.r.fastabend
In-Reply-To: <20101015051846.32242.1734.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 14 Oct 2010 22:21:22 -0700
> From: John Fastabend <john.r.fastabend@intel.com>
>
> Remove a DCB check config from DCB configuration we
> continue to configure DCB even if it fails so don't
> even bother to check. Plus user space (lldpad) checks
> this before programming the hw anyways.
>
> Worse case is we program some values into the hw that
> don't make total sense resulting in incorrect bandwidth
> allocation.
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 2.6.35-rc6] net-next: Add multiqueue support to vmxnet3 driver
From: David Miller @ 2010-10-15 16:23 UTC (permalink / raw)
To: sbhatewara; +Cc: bhutchings, shemminger, netdev, pv-drivers, linux-kernel
In-Reply-To: <89E2752CFA8EC044846EB8499819134102BF0F3B1D@EXCH-MBX-4.vmware.com>
From: Shreyas Bhatewara <sbhatewara@vmware.com>
Date: Thu, 14 Oct 2010 16:31:35 -0700
> Okay. It would be best to keep module parameters to dictate number
> of queues till ethtool commands to do so become available/easy to
> use (command to change number of tx queues do not exist).
No, because then you can never remove these knobs, they must stay
forever.
And also then every other driver developer can make the same
argument. And then we have private knobs in every driver and
the user experience is a complete disaster.
Instead, the onus is on you to help get the ethtool interfaces
completed so your driver can provide the functionality it
wants.
Not the other way around (add crap first, use the proper interface
later whenever someone else gets around to it).
Thanks.
^ permalink raw reply
* Re: [PATCH V2 net-next] can-raw: add msg_flags to distinguish local traffic
From: Oliver Hartkopp @ 2010-10-15 16:15 UTC (permalink / raw)
To: Kurt Van Dijck; +Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w, netdev
In-Reply-To: <20101015153829.GA317-MxZ6Iy/zr/UdbCeoMzGj59i2O/JbrIOy@public.gmane.org>
Hello Kurt,
thanks for the patch.
I really appreciate this extension.
Some remarks inline ...
On 15.10.2010 17:38, Kurt Van Dijck wrote:
> diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
> index cd79735..95341aa 100644
> --- a/Documentation/networking/can.txt
> +++ b/Documentation/networking/can.txt
> @@ -22,6 +22,7 @@ This file contains
> 4.1.2 RAW socket option CAN_RAW_ERR_FILTER
> 4.1.3 RAW socket option CAN_RAW_LOOPBACK
> 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
> + 4.1.5 RAW socket returned flags
> 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
> 4.3 connected transport protocols (SOCK_SEQPACKET)
> 4.4 unconnected transport protocols (SOCK_DGRAM)
> @@ -471,6 +472,16 @@ solution for a couple of reasons:
> setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS,
> &recv_own_msgs, sizeof(recv_own_msgs));
>
> + 4.1.5 RAW socket returned flags
> +
> + When using recvmsg() call, the msg->msg_flags may contain following flags:
> +
> + MSG_DONTROUTE: set when the frame was sent via the same physical device,
> + ie. a loopback frame.
According the code MSG_DONTROUTE indicates frames that have been originated on
the local host. Nothing more.
Only when you enabled CAN_RAW_RECV_OWN_MSGS and you bound the socket to a
specific CAN interface, the description becomes correct.
Better write:
MSG_DONTROUTE : set when the received frame was created on the local host.
> + MSG_CONFIRM: set when the frame was sent via the socket it is received on.
ok.
> + This flag acts as a 'transmission confirmation'.
Better:
This flag can be interpreted as a 'transmission confirmation' when the CAN
driver supports the echo of CAN frames on driver level, see 3.2 and 6.2
> + In order to receive such messages, CAN_RAW_RECV_OWN_MSGS must be set.
> +
> 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
> 4.3 connected transport protocols (SOCK_SEQPACKET)
> 4.4 unconnected transport protocols (SOCK_DGRAM)
> diff --git a/net/can/raw.c b/net/can/raw.c
> index 7d77e67..9020c4f 100644
> --- a/net/can/raw.c
> +++ b/net/can/raw.c
> @@ -90,23 +90,39 @@ struct raw_sock {
> can_err_mask_t err_mask;
> };
>
> +/*
> + * return some space to store extra msg flags in.
> + * We use 1 int beyond the 'struct sockaddr_can' in skb->cb
> + * to store those.
> + * These flags will be use in raw_recvmsg()
> + */
/*
* Return pointer to store the extra msg flags for raw_recvmsg().
* We use the space of one unsigned int beyond the 'struct sockaddr_can'
* in skb->cb.
*/
> +static inline unsigned int *raw_flags(struct sk_buff *skb)
> +{
> + BUILD_BUG_ON(sizeof(skb->cb) <= (sizeof(struct sockaddr_can)
> + + sizeof(unsigned int)));
One empty line would be nice here ...
> + /* return pointer after struct sockaddr_can */
> + return (unsigned int *)(&((struct sockaddr_can *)skb->cb)[1]);
> +}
> +
> static inline struct raw_sock *raw_sk(const struct sock *sk)
> {
> return (struct raw_sock *)sk;
> }
>
> -static void raw_rcv(struct sk_buff *skb, void *data)
> +static void raw_rcv(struct sk_buff *oskb, void *data)
> {
> struct sock *sk = (struct sock *)data;
> struct raw_sock *ro = raw_sk(sk);
> struct sockaddr_can *addr;
> + struct sk_buff *skb;
> + unsigned int *pflags;
>
> /* check the received tx sock reference */
> - if (!ro->recv_own_msgs && skb->sk == sk)
> + if (!ro->recv_own_msgs && oskb->sk == sk)
> return;
>
> /* clone the given skb to be able to enqueue it into the rcv queue */
> - skb = skb_clone(skb, GFP_ATOMIC);
> + skb = skb_clone(oskb, GFP_ATOMIC);
> if (!skb)
> return;
>
> @@ -123,6 +139,14 @@ static void raw_rcv(struct sk_buff *skb, void *data)
> addr->can_family = AF_CAN;
> addr->can_ifindex = skb->dev->ifindex;
>
> + /* prepare the flags for raw_recvmsg() */
> + pflags = raw_flags(skb);
> + *pflags = 0;
> + if (oskb->sk)
> + *pflags |= MSG_DONTROUTE;
> + if (oskb->sk == sk)
> + *pflags |= MSG_CONFIRM;
> +
A good improvement since your first proof-of-concept code :-)
> if (sock_queue_rcv_skb(sk, skb) < 0)
> kfree_skb(skb);
> }
> @@ -707,6 +731,9 @@ static int raw_recvmsg(struct kiocb *iocb, struct socket *sock,
> memcpy(msg->msg_name, skb->cb, msg->msg_namelen);
> }
>
> + /* assign the flags that have been recorded in raw_rcv() */
> + msg->msg_flags |= *(raw_flags(skb));
> +
dito :-)
> skb_free_datagram(sk, skb);
>
> return size;
Tnx & regards,
Oliver
^ permalink raw reply
* Re: [PATCH 6/6] r8169: print errors when dma mapping fail
From: Stanislaw Gruszka @ 2010-10-15 15:59 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, Denis Kirjanov
In-Reply-To: <20101015145201.GB4417@electric-eye.fr.zoreil.com>
On Fri, Oct 15, 2010 at 04:52:01PM +0200, Francois Romieu wrote:
> Stanislaw Gruszka <sgruszka@redhat.com> :
> > Print errors because dma mapping failures can cause device to stop
> > working and will need user intervention to recover.
>
> I am hesitating (overengineered ? bloaty ? not the right place ?).
As someone who seen lot's of bug reports like "my network device stops
working, nothing in dmesg", or like "my network device stops working,
there is NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out in
dmesg" (what is nothing but useful information), I do no think this is
overengineered or bloaty. I could agree for "not the right place", but
even if the error would be reported by upper layers, exact reason of
the problem will be unknown. Regarding lower layers, I don't think iommu
or other dma code print warning with calltrace in case of failure.
> The Tx stats are kept up-to-date : Tx failure will go along a Tx drop
> stat increase.
In current implementation, I stop tx queue on dma errors, if that
happens the queue can never be started again. I will probably change
that as you suggest not returning NETDEV_TX_BUSY, stopping the queue
is also wrong. But I would like to keep this error messages, perhaps
after adding net_ratelimit() check.
> Regarding a mapping failure in the Rx path, either it will behave as
> an allocation failure at open / resume time -
Still it's worth to know exact reason of failure.
> and I have no idea how
> the user will recover - or it will happen during a Rx ring refill.
ifconfig eth0 down/up or reloading module
Stanislaw
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox