Removed the workaround that was needed for PS3 firmware versions
prior to the first release.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The PS3 virtual network device requires a vlan tag in the sending packet
to select the destination device, ethernet port or wireless.
As the vlan tag field is in the middle of the passed data,
we should insert it into the packet data.
To avoid copying much of the packet data, the driver used two tx descriptors
for one tx skb; one descriptor was for sending a small static
buffer which contained vlan tag and copied header (two mac addresses),
one was for the residual data after the vlan field.
This patch changes the way to insert the vlan tag. By changing
netdev->hard_header_len, we can make the headroom for moving mac address
fields in the skb buffer. Then we can send one tx skb with
one tx descriptor. This also gives us a tx throughut gain of approx.
20% according to netperf results.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Unfortunately there's no timeout for how long a packet can sit on
the TX ring after completion before an interrupt is generated, and
we want to have a threshold that's larger than one packet per interrupt.
So we have to have a timer that occasionally cleans the TX ring even
though there hasn't been an interrupt. Instead of setting up a dedicated
timer for this, just clean it in the NAPI poll routine instead.
[ Resolved conflicts with napi_struct changes... -DaveM ]
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Enable LLTX on pasemi_mac: we're already doing sufficient locking
in the driver to enable it.
[ Resolved merge conflicts with napi_struct changes... -DaveM ]
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
RX side flag to use is CHECKSUM_UNNECESSARY, not CHECKSUM_COMPLETE.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The old logic didn't detect full (tx) ring cases properly, causing
overruns and general badness. Clean it up a bit and abstract out the
ring size checks, always making sure to leave 1 slot open.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Postpone pci unmap and skb free of the transmitted buffers to outside of
the tx ring lock, batching them up 32 at a time.
Also increase the count threshold to 128.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Various RX performance tweaks, do some explicit prefetching of packet
data, etc.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Enable settings to target l2 for the first few cachelines of the packet, since
we'll access them to get to the various headers.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Move away from using the pci config access functions for simple register
access. Our device has all of the registers in the config space (hey,
from the hardware point of view it looks reasonable :-), so we need to
somehow get to it. Newer firmwares have it in the device tree such that
we can just get it and ioremap it there (in case it ever moves in future
products). For now, provide a hardcoded fallback for older firmwares.
[ Resolved napi_struct conflicts... -DaveM ]
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Abstract out the PCI config read/write accesses into reg read/write ones,
still calling the pci accessors on the back end.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
NetworkManager will not start dhcpd on an interface unless it reports
link-up state via ethtool.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Use the PCI layer config access functions. The driver was using the
memory mapped window in device, to workaround issues accessing the
advanced error reporting registers.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Use the kernel interfaces for advanced error reporting.
This should be cleaner and clear up errors on boot.
For those systems with busted BIOS's that don't correctly
support mmconfig, advanced error reporting will be disabled.
The PCI registers for advanced error reporting start at 0x100 which
is too large to be accessed by legacy functions.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Take out the code that protects driver from accessing the
PCI config space.
We are old enough to run with scissors now.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add documentation of GPHY_CTRL register bits even if driver
is not using them (yet).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Use debugfs rename to handle device neame changes.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Set PM1 internal memory to round robin mode
It balances access to this internal memory for multiport adapters.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
A HW issue requires limiting the receive window size
to 23 pages of internal memory.
These pages can be configured to different sizes,
thus the RDMA driver needs to know the
page size to enforce the upper limit.
Also assign explicit enum values.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Send small TX_DATA work requests as immediate data even when
there are fragments. this avoids doing multiple DMAs for
small fragmented packets.
The driver already implements this optimization for small
contiguous packets.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Reduce Rx coalescing length to 12288
Large bursts from the adapter to the host create back pressure
on the chip. Reducing the burst size avoids the issue.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Check return of pci_enable_device in vortex_up().
Also modify vortex_up to return error to callers. Handle failure of
vortex_up in vortex_open and vortex_resume.
Signed-off-by: Mark Hindley <mark@hindley.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Removes the use of bitfields from the ibmveth driver. This results
in slightly smaller object code.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Removes dead frag processing code from ibmveth. Since NETIF_F_SG was
not set, this code was never executed. Also, since the ibmveth
interface can only handle 6 fragments, core networking code would need
to be modified in order to efficiently enable this support.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add ethtool hooks to ibmveth to retrieve driver statistics.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add handlers for get_tso and get_ufo to prevent errors being printed
by ethtool.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch adds the appropriate ethtool hooks to allow for enabling/disabling
of hypervisor assisted checksum offload for TCP.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patchset enables TCP checksum offload support for IPV4
on ibmveth. This completely eliminates the generation and checking of
the checksum for packets that are completely virtual and never
touch a physical network. A simple TCP_STREAM netperf run on
a virtual network with maximum mtu set yielded a ~30% increase
in throughput. This feature is enabled by default on systems that
support it, but can be disabled with a module option.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Actually, D-Link modified the VendorID/ProductID of the TC902x.
The TC902x is the original chipset.
Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add suspend/resume support to the uli526x network driver (tested on x86_64,
with 'Ethernet controller: ALi Corporation M5263 Ethernet Controller, rev 40').
This patch is based on the suspend/resume code in the tg3 driver.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add suspend and resume capability to the driver.
Tested both to ram and to disk on x86_64 platform.
Signed-off-by: Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
this implements support for USB autosuspend in the asix USB ethernet
driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This driver implements support for the ICH9 on-board LAN ethernet
device. The device is similar to ICH8.
The driver encompasses code to support 82571/2/3, es2lan and ICH8
devices as well, but those device IDs are disabled and will be
"lifted" from the e1000 driver over one at a time once this driver
receives some more live time.
Changes to the last snapshot posted are exclusively in the internal
hardware API organization. Many thanks to Jeff Garzik for jumping in
and getting this organized with a keen eye on the future layout.
[ Integrated napi_struct patch from Auke as well... -DaveM ]
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_helper':
drivers/net/wireless/libertas/if_cs.c:462: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
drivers/net/wireless/libertas/if_cs.c: In function 'if_cs_prog_real':
drivers/net/wireless/libertas/if_cs.c:538: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
kmalloc() and friends return void*, no need to cast it.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Advertise support for 802.11g bitrates when starting adhoc
networks, not just 802.11b bitrates.
Signed-off-by: Brajesh Dave <brajeshd@marvell.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch strips away possible mess in regioncode (eg. on my card - 88W8305
chipset - I get 0x3031 instead of expected 0x0031 and as a result the driver
defaults to USA region which is obviously incorrect). Following patch fixes
the issue.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Make sure that errors reported by the hardware layer is properly
handled. Otherwise commands tend to get stuck in limbo.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ensures that any platform specific code that might live in libertas_reset_device
(for example, OLPC tells the EC to do a GPIO-toggled reset of the wireless
from libertas_reset_device) isn't called. Could be handled better by
interface-specific callbacks and a flag for "other hardware reset".
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch moves all firmware load responsibility into the interface-specific
code and gets rid of the firmware pointer in the generic card structure. It
also removes 3 fairly unecessary callbacks: hw_register_dev, hw_unregister_dev,
and hw_prog_firmware. It also makes the init sequence from interface
probe functions more logical, as there are paired add/remove and start/stop
calls into generic libertas code.
Because the USB driver code uses the same TX URB callback for both firmware
upload (where the generic libertas structure isn't initialized yet) and for
normal operation (where it is), some bits of USB code have to deal with
'priv' being NULL. All USB firmware upload bits have been changed to not
require 'priv' at all, but simply the USB card structure.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested by Nathen Meyers
FCC ID: SI5WUB221Z
zd1211b chip 0586:340a v4810 high 00-13-49 AL2230_RF pa0 ----S
Despite the product name, I'm pretty sure this isn't a MIMO device. It
appears just to be a normal ZD1211B and we have never heard of these
devices having more than 1 RF. I guess they named this product this way
to make it appear that it fits in with the rest of their XtremeMIMO
product range.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
As pointed out by Daniel Drake, the zd1211rw driver used several
different rate values and names throughout the driver. He has
written a patch to change it and tweaked it after some pretty wild
ideas from my side. But the discussion helped me to understand the
problem better and I think I have nailed it down with this patch.
A zd-rate will consist from now on of a four-bit "pure" rate value
and a modulation type flag as used in the ZD1211 control set used
for packet transmission. This is consistent with the usage in the
zd_rates table. If possible these zd-rates should be used in the
code.
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tested by Giuseppe Lippolis
zd1211b chip 0cde:001a v4810 high 00-60-b3 AL2230_RF pa0 g--NS
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
While developing the driver we added a lot of debug messages for
setting hardware registers. These messages make the reading of the
log files difficult and are of no use anymore. This patch removes
those messages in zd_chip.c.
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch removes some residual dead code left over from removing the
"flip" receive mode. This patch doesn't change the generated output
at all, since gcc already realized it was dead.
This resolves the "regression" reported by Adrian.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Hi,
Replacing kmalloc with kzalloc and cleaning up memset in
drivers/net/tokenring/3c359.c
Signed-off-by: Surya Prabhakar <surya.prabhakar@wipro.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Update the MAC workaround to deal with switches that do not
honor pause frames.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch covers something like this:
dev = alloc_*dev(...
...
priv = netdev_priv(dev);
memset(priv, 0, sizeof(*priv));
The memset() here is superfluous. alloc_netdev() uses kzalloc()
to allocate needed memory so there is no need to zero the priv region
twice.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch cleans up duplicate includes in
drivers/net/
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-Fixed Link LED issue when MSI-X is enabled.
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Calling store_xmsi_data to store the MSI-X datas during initialization
in s2io-init_nic function
- Disabling NAPI when MSI-X is enabled
- Freeing sp->entries and sp->s2io_entries in s2io_rem_isr
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Making MSIX as default intr_type
- Driver will test MSI-X by issuing test MSI-X vector and if fails it will
fallback to INTA
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
* (main change) tab-align hardware register value enums, and hw struct
* MMIO_FLUSH_AUDIT_COMPLETE has been defined to 1 for a while. Remove
the code activated when it is set to zero.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Replacing accesses to dev->priv to netdev_priv(dev). The replacment
is safe when netdev_priv is used to access a private structure that is
right next to the net_device structure in memory.
Cf http://groups.google.com/group/comp.os.linux.development.system/browse_thread/thread/de19321bcd94dbb8/0d74a4adcd6177bd
This is the case when the net_device structure was allocated with
a call to alloc_netdev or one of its derivative.
Here is an excerpt of the semantic patch that performs the transformation
@ rule1 @
type T;
struct net_device *dev;
@@
dev =
(
alloc_netdev
|
alloc_etherdev
|
alloc_trdev
)
(sizeof(T), ...)
@ rule1bis @
struct net_device *dev;
expression E;
@@
dev->priv = E
@ rule2 depends on rule1 && !rule1bis @
struct net_device *dev;
type rule1.T;
@@
- (T*) dev->priv
+ netdev_priv(dev)
PS: I have performed the same transformation on the whole kernel
and it affects around 70 files, most of them in drivers/net/.
Should I split my patch for each subnet directories ? (wireless/, wan/, etc)
Thanks to Thomas Surrel for helping me refining my semantic patch.
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
3c359.c | 58 +++++++++++++++++++++++++++++-----------------------------
ibmtr.c | 38 +++++++++++++++++++-------------------
lanstreamer.c | 32 ++++++++++++++++----------------
madgemc.c | 4 ++--
olympic.c | 36 ++++++++++++++++++------------------
tmspci.c | 4 ++--
6 files changed, 86 insertions(+), 86 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The driver has not compiled in anything except PCI support for many
years (see drivers/net/skfp/Makefile). This driver is also unmaintained
for many years, so arguments for keeping the cross-OS, cross-bus (ISA,
EISA, MCA) code do not exist.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
A few fields being converted to the wrong sized type, and a few missed
endian conversions.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Describe the association response status code the firmware
returns, based on mail to libertas-dev from Ronak.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don't trust the firmware to always send them at the right time,
ignore them when the driver thinks mesh autostart is disabled.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Boot2 version used to be hardcoded in the uploaded firmware,
this patch preserves the boot2 version before uploading firmware
and sends it to the firmware again on resume.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Push WEXT scan requests to a workqueue and have each partial scan queue
the next part, then only report results when the complete scan has finished.
Full scans don't go through the work queue.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Driver support for the monitor mode support that will be available in the next
OLPC 'bleeding edge' Marvell firmware release (most likely, 5.110.16.p2).
To activate monitor mode,
echo mode > /sys/class/net/{ethX,mshX}/device/libertas_rtap
where mode is the hex mask that specifies which frames to sniff (in short, 0x1
for data, 0x2 for all management but beacons, 0x4 for beacons). Any non zero
mode will activate the monitor mode, inhibiting transmission in ethX and mshX
interfaces and routing all the incoming traffic to a new rtapX interface that
will output the packets in 802.11+radiotap headers format.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
o SIOCGIWNAME is not designed to return the version number of the driver.
On the other hand, you are free to abuse SIOCGIWNICKN for that purpose.
o Don't attempt to fix the WE19/WE20 transition in the driver, because
your fixes are bogus, and redundant with the code in the kernel (you may
endup with +2, you can't read 32 char ESSID...).
o In SIOCSIWTXPOW, if you specified in iwrange that you want dBm, you
should only get dBm, which allow to reduce code bloat.
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
After loading the firmware, mesh autostart will be disabled. After that, the
user will still be able to enable or disable it at will. On suspend, it will be
always activated and later on resume it will go back to the state it had before
going to sleep.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
CAPINFO_MASK changed on commits 981f187b and a091095b. Reverting to the original
value. Also move CAPINFO_MASK into the sole user, join.c. CAPINFO_MASK
should be in host CPU byte order; capability is converted to device
byte order elsewhere.
This fixes OLPC ticket #2161
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Send association event to userspace when reassociating to the same
ad-hoc network, because it's still an association.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Purely cosmetic: this moves an lbs_deb_enter() to the proper place
and changes an erraneous lbs_deb_enter_args() into lbs_deb_leave_args()
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This value was parsed out, but then nowhere used ... except in
some debugfs output. I can't imagine anyone wanting to use this
value for anything real (as no other driver exports it), so
bye-bye.
Along this, made the columns of
/sys/kernel/debug/libertas_wireless/*/getscantable align again.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
scantype was initialized with CMD_SCAN_TYPE_ACTIVE, but there is no code
that would ever change it, so we can use that variable directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
scanmode was initialized with CMD_BSS_TYPE_ANY, but there is no code
that ever can store another value there, so it can go away.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
beaconperiod was initialized with MRVDRV_BEACON_INTERVAL, but there is
no code that would ever change it's value. We can use the define directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The variable was initialized with 0 (false). There is no code that would
ever change it, so we can use the false-patch directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
listeninterval was initialized with MRVDRV_DEFAULT_LISTEN_INTERVAL, but
there exists that would ever change it. So we can use this define directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The value was computed, but then never used.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This varaible was initialized with 0 but there is no code that would ever
change it's value. So it can go away.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
multipledtim was initialized with MRVDRV_DEFAULT_MULTIPLE_DTIM and then
kept at that value, so we could use that define directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
locallisteninterval was initialized with 0, but there is no code that
changes it, rendering it rather useless.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
No code ever initialized this variable, so it was 0 because of kzalloc().
But no other code changes it, making it rather useless.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Those two variables were initialized with some default values, but there
is no code that would ever change them. So we could use as well the defaults
directly.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
No code uses the contents of this variable, so it can go.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The value of txrate was only set by a CMD_802_11_TX_RATE_QUERY command,
but there was no code in the driver that ever issued this command.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The variable was initialized to 0 and nowhere else changed, so basically
the per-packet TX control wasn't used.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The variable was initialized to 0 and nowhere else to anything
different.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The value 1 was assigned to it and there was nowhere any code
that would have changed that to 0.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There was nowhere any code that used the values of those
variables.
This patch also removes two static functions that are now unused.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There were just used in some debug output, but nowhere else.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch adds support for Marvell based 8385 compact flash cards.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
... and LBS_DEB_CMD for command execution. Also tidies misc
comments to give a consistent output.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
... and LBS_DEB_CMD for command execution. Also tidies misc
comments to give a consistent output.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
types.h contains the same amount of CMD_RET_xxx and CMD_xxx definitions.
They contains the same info: the firmware command opcode and, when the
firmware sends back a result, the command opcode ORed with 0x8000.
Having the same data twice in the source code is redundant and can lead to
errors (e.g. if you update or delete only one instance). This patch removed
all CMD_RET_xxx definitions and introduces a simple CMD_RET() macro.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Currently, when you define LBS_DEB_HEX, you get every hex dump in the
whole driver, e.g. for LBS_DEB_CMD, LBS_DEB_RX, LBS_DEB_TX etc. This
patch makes sure that you only get the hexdump that you're interested in.
Renamed lbs_dbg_hex() into lbs_deb_hex(), like the other lbs_deb_XXX()
macros.
Made lbs_deb_hex() issue a line feed (and a new prompt) after 16 bytes.
As lbs_deb_hex() now prints the ":" after the prompt by itself, removed
the misc colons in the various *.c files.
lbs_deb_XXX() now print the debug category as well.
As lbs_deb_XXX() --- and especially lbs_deb_11d() --- now print the
category, I removed various "11D:" prefixes in 11d.c as well.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
echo 0 > /sys/class/net/mshX/autostart_enabled
This is supported from Marvell firmware version 5.110.16.p0 (to be released).
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
There is nowhere any place that set's this variable.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The CF/SDIO firmware doesn't support Mesh, so priv->mesh_dev is
NULL there. Protect all accesses.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Usually constants defined by #define are in ALL_UPPERCASE. This patch
fixes this.
I also shuffled the bits around so that they match the bit positions in the
host-interrupt-state register of the CF/SDIO card :-)
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Some functions where declared in header files, but used only once. They are
now static functions.
After doing this, I found out that some functions weren't used at all. I
removed this dead code.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
adhoc_rates_b is only used locally, so make it static
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Firmware download is quite different for different hardware. The SDIO and CF
cards have two flat files that need to be downloaded, whereas the USB driver
needs only one file, but with an internal structure.
The code that handles this (USB only) structured file is currently in fw.c.
This patch moves this code into if_usb.c. The remaining functions in fw.c
have not much to do with firmware, they are various card- and network-stack
initialisation functions. I've moved them into main.c.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove unused/duplicated fields and consolidate static data rate arrays,
for example the libertas_supported_rates[] and datarates[] arrays in
the bss_descriptor structure, and the libertas_supported_rates field
in the wlan_adapter structure.
Introduce libertas_fw_index_to_data_rate and libertas_data_rate_to_fw_index
functions and use them everywhere firmware requires a rate index rather
than a rate array.
The firmware requires the 4 basic rates to have the MSB set, but most
other stuff doesn't, like WEXT and mesh ioctls. Therefore, only set the MSB
on basic rates when pushing rate arrays to firmware instead of doing a ton
of (rate & 0x7f) everywhere.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
It's not USB specific, so move it out of the USB interface code.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mistakently introduced by a previous patch to upper-case all command
constants.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Support for new mesh control knobs on firmware 5.220.11.p4:
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove the thread.h abstractions and opencode kthread stuff
to make it clearer.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Missed when fixing mixed-case structure field names.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Move the only function in it to if_usb.c, which was its
only user anyway.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
With this patch, scanning with mshX interface will only return mesh networks. To
differentiate them, a specific mesh IE in beacons/probe responses is used. This
IE has been introduced in firmware release 5.110.14. Note:
Even though there can be at most a single mesh per channel, this scan might
return several networks in the same channel.
If all nodes in a mesh network are associated to an AP, they won't produce
beacons/probe responses, thus the network will not be listed. This will be fixed
in future firmware releases.
Scan on ethX interface is not filtered, so it will list both mesh and non-mesh
networks.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Remove struct IE_WPA and just use direct checking of the IE
bytes like ipw. Remove WLAN_802_11_VARIABLE_IEs because
it's unused.
Kill ieeetypes_elementid enum and just use MFIE_* from
ieee80211.h. Also use struct ieee80211_info_element for
scan buffer processing to simplify pointer usage.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
It doesn't touch hardware and therefore doesn't need endian notations
either.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Use standard BSS capability field constants from ieee80211.h.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The Host AP driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Currently the modinfo looks like:
description: Support for Cisco/Aironet 802.11 wireless ethernet cards. Direct support for ISA/PCI/MPI cards and support for PCMCIA when used with airo_cs.
Arguably, it should be cut at the end of the first sentence.
This at least makes it somewhat more legible.
Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
pcmcia-cs/cardmgr is deprecated and mentioning it in the help text is
misleading.
Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
While in monitor mode the zd1211rw received only a limited
set of packets. This patch forwards now all packets the device
receives. Notify that while monitoring no FCS checks are done; so
strange packets might appear in the network sniffer of your
choice.
ATTENTION: Support for multiple interfaces on a single ZD1211
device is currently broken. So this code works only on the first
interface.
Here is an example to put the device in monitor mode.
iwconfig wlan0 mode monitor
ifconfig wlan0 up
iwconfig wlan0 channel 10
[dsd@gentoo.org: backport to mainline]
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch adds a mac80211 wireless driver for ADMtek ADM8211 based
wireless cards.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch reworks the various hardware crypto related
flags to make them more local, i.e. put them with each
key or each packet instead of into the hw struct.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The core patchset of the network namespace sent by
Eric Biederman does not do dynamic loopback creation.
So there is no call to alloc_netdev_mq which fills the
network namespace field of the netdevice.
This patch assign the loopback to the init network namespace.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch introduces NETIF_F_NETNS_LOCAL a flag to indicate
a network device is local to a single network namespace and
should never be moved. Useful for pseudo devices that we
need an instance in each network namespace (like the loopback
device) and for any device we find that cannot handle multiple
network namespaces so we may trap them in the initial network
namespace.
This patch introduces the function dev_change_net_namespace
a function used to move a network device from one network
namespace to another. To the network device nothing
special appears to happen, to the components of the network
stack it appears as if the network device was unregistered
in the network namespace it is in, and a new device
was registered in the network namespace the device
was moved to.
This patch sets up a namespace device destructor that
upon the exit of a network namespace moves all of the
movable network devices to the initial network namespace
so they are not lost.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch makes most of the generic device layer network
namespace safe. This patch makes dev_base_head a
network namespace variable, and then it picks up
a few associated variables. The functions:
dev_getbyhwaddr
dev_getfirsthwbytype
dev_get_by_flags
dev_get_by_name
__dev_get_by_name
dev_get_by_index
__dev_get_by_index
dev_ioctl
dev_ethtool
dev_load
wireless_process_ioctl
were modified to take a network namespace argument, and
deal with it.
vlan_ioctl_set and brioctl_set were modified so their
hooks will receive a network namespace argument.
So basically anthing in the core of the network stack that was
affected to by the change of dev_base was modified to handle
multiple network namespaces. The rest of the network stack was
simply modified to explicitly use &init_net the initial network
namespace. This can be fixed when those components of the network
stack are modified to handle multiple network namespaces.
For now the ifindex generator is left global.
Fundametally ifindex numbers are per namespace, or else
we will have corner case problems with migration when
we get that far.
At the same time there are assumptions in the network stack
that the ifindex of a network device won't change. Making
the ifindex number global seems a good compromise until
the network stack can cope with ifindex changes when
you change namespaces, and the like.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Every user of the network device notifiers is either a protocol
stack or a pseudo device. If a protocol stack that does not have
support for multiple network namespaces receives an event for a
device that is not in the initial network namespace it quite possibly
can get confused and do the wrong thing.
To avoid problems until all of the protocol stacks are converted
this patch modifies all netdev event handlers to ignore events on
devices that are not in the initial network namespace.
As the rest of the code is made network namespace aware these
checks can be removed.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch modifies every packet receive function
registered with dev_add_pack() to drop packets if they
are not from the initial network namespace.
This should ensure that the various network stacks do
not receive packets in a anything but the initial network
namespace until the code has been converted and is ready
for them.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch passes in the namespace a new socket should be created in
and has the socket code do the appropriate reference counting. By
virtue of this all socket create methods are touched. In addition
the socket create methods are modified so that they will fail if
you attempt to create a socket in a non-default network namespace.
Failing if we attempt to create a socket outside of the default
network namespace ensures that as we incrementally make the network stack
network namespace aware we will not export functionality that someone
has not audited and made certain is network namespace safe.
Allowing us to partially enable network namespaces before all of the
exotic protocols are supported.
Any protocol layers I have missed will fail to compile because I now
pass an extra parameter into the socket creation code.
[ Integrated AF_IUCV build fixes from Andrew Morton... -DaveM ]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch makes /proc/net per network namespace. It modifies the global
variables proc_net and proc_net_stat to be per network namespace.
The proc_net file helpers are modified to take a network namespace argument,
and all of their callers are fixed to pass &init_net for that argument.
This ensures that all of the /proc/net files are only visible and
usable in the initial network namespace until the code behind them
has been updated to be handle multiple network namespaces.
Making /proc/net per namespace is necessary as at least some files
in /proc/net depend upon the set of network devices which is per
network namespace, and even more files in /proc/net have contents
that are relevant to a single network namespace.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Removed sparse warnings from tg3 driver. The new logic seems fine (I
don't immediately see where we are running over values for any of the
variables that need to be saved).
This patch compiles fine and I'm currently using a tg3 with the patched
driver to post this patch as a basic proof of concept.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This dongle does not follow the usb-irda specification, so it needs its own
special driver. First, it uses control URBs for data transfer, instead of
bulk or interrupt transfers; the only interrupt endpoint exposed seems to
be a dummy to prevent the interface from being rejected. Second, it uses
obfuscation and padding at the USB traffic level, for no apparent reason
other than to make reverse engineering harder (full details on obfuscation
in comments at beginning of source). Although it is advertised as a "4 Mbps
FIR dongle", it apparently loses packets at speeds greater than 57600 bps.
On plugin, this dongle reports vendor and device IDs: 0x07d0:0x4959 .
The Windows driver that is used normally to control this dongle has a
filename of KS-959.SYS .
Signed-off-by: Alex Villacís Lasso <a_villacis@palosanto.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This dongle does not follow the usb-irda specification, so it needs its own
special driver. Just like the Kingsun/Donshine dongle, it exposes two
interrupt endpoints. Reception is performed through direct reads from the
input endpoint. Transmission requires splitting the IrDA frames into 8-byte
segments, in which the first byte encodes how many of the remaining 7 bytes
are used as data. Speed change is made with a control URB just like the one
in cypress_m8, and it seems to support up to 115200 bps.
On plugin, this dongle reports vendor and device IDs: 0x07d0:0x4100
Signed-off-by: Alex Villacís Lasso <a_villacis@palosanto.com>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
This patch introduces support for dynamic reconfiguration (adding, removing
and/or modifying parameters of netconsole targets at runtime) using a
userspace interface exported via configfs. Documentation is also updated
accordingly.
Issues and brief design overview:
(1) Kernel-initiated creation / destruction of kernel objects is not
possible with configfs -- the lifetimes of the "config items" is managed
exclusively from userspace. But netconsole must support boot/module
params too, and these are parsed in kernel and hence netpolls must be
setup from the kernel. Joel Becker suggested to separately manage the
lifetimes of the two kinds of netconsole_target objects -- those created
via configfs mkdir(2) from userspace and those specified from the
boot/module option string. This adds complexity and some redundancy here
and also means that boot/module param-created targets are not exposed
through the configfs namespace (and hence cannot be updated / destroyed
dynamically). However, this saves us from locking / refcounting
complexities that would need to be introduced in configfs to support
kernel-initiated item creation / destroy there.
(2) In configfs, item creation takes place in the call chain of the
mkdir(2) syscall in the driver subsystem. If we used an ioctl(2) to
create / destroy objects from userspace, the special userspace program is
able to fill out the structure to be passed into the ioctl and hence
specify attributes such as local interface that are required at the time
we set up the netpoll. For configfs, this information is not available at
the time of mkdir(2). So, we keep all newly-created targets (via
configfs) disabled by default. The user is expected to set various
attributes appropriately (including the local network interface if
required) and then write(2) "1" to the "enabled" attribute. Thus,
netpoll_setup() is then called on the set parameters in the context of
_this_ write(2) on the "enabled" attribute itself. This design enables
the user to reconfigure existing netconsole targets at runtime to be
attached to newly-come-up interfaces that may not have existed when
netconsole was loaded or when the targets were actually created. All this
effectively enables us to get rid of custom ioctls.
(3) Ultra-paranoid configfs attribute show() and store() operations, with
sanity and input range checking, using only safe string primitives, and
compliant with the recommendations in Documentation/filesystems/sysfs.txt.
(4) A new function netpoll_print_options() is created in the netpoll API,
that just prints out the configured parameters for a netpoll structure.
netpoll_parse_options() is modified to use that and it is also exported to
be used from netconsole.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
This patch introduces support for multiple targets, independent of
CONFIG_NETCONSOLE_DYNAMIC -- this is useful even in the default case and
(including the infrastructure introduced in previous patches) doesn't really
add too many bytes to module text. All the complexity (and size) comes with
the dynamic reconfigurability / userspace interface patch, and so it's
plausible users may want to keep this enabled but that disabled (say to avoid
a dependency on CONFIG_CONFIGFS_FS too).
Also update documentation to mention the use of ";" separator to specify
multiple logging targets in the boot/module option string.
Brief overview:
We maintain a target_list (and corresponding lock). Get rid of the static
"default_target" and introduce allocation and release functions for our
netconsole_target objects (but keeping sure to preserve previous behaviour
such as default values). During init_netconsole(), ";" is used as the
separator to identify multiple target specifications in the boot/module option
string. The target specifications are parsed and netpolls setup. During
exit, the target_list is torn down and all items released.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
To update fields of underlying netpoll structure at runtime on corresponding
NETDEV_CHANGEADDR or NETDEV_CHANGENAME notifications.
ioctl(SIOCSIFHWADDR or SIOCSIFNAME) could be used to change the hardware/MAC
address or name of the local interface that our netpoll is attached to.
Whenever this happens, netdev notifier chain is called out with the
NETDEV_CHANGEADDR or NETDEV_CHANGENAME event message. We respond to that and
update the local_mac or dev_name field of the struct netpoll. This makes
sense anyway, but is especially required for dynamic netconsole because the
netpoll structure's internal members become user visible files when either
sysfs or configfs are used. So this helps us to keep up with the MAC
address/name changes and keep values in struct netpoll uptodate.
[ Note that ioctl(SIOCSIFADDR) to change IP address of interface at
runtime is not handled (to update local_ip of netpoll) on purpose --
some setups may set the local_ip to a private address, not necessary
the actual IP address of the sender host, as presently allowed. ]
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
Introduce a wrapper structure over netpoll to represent logging targets
configured in netconsole. This will get extended with other members in
further patches.
This is done independent of the (to-be-introduced) NETCONSOLE_DYNAMIC config
option so that we're able to drastically cut down on the #ifdef complexity of
final netconsole.c. Also, struct netconsole_target would be required for
multiple targets support also, and not just dynamic reconfigurability.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
Avoid unnecessarily disabling interrupts and calling netpoll_send_udp() if the
corresponding local interface is not up.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
Presently, boot/module parameters are set up quite differently for the case of
built-in netconsole (__setup() -> obsolete_checksetup() ->
netpoll_parse_options() -> strlen(config) == 0 in init_netconsole()) vs
modular netconsole (module_param_string() -> string copied to the config
variable -> strlen(config) != 0 init_netconsole() -> netpoll_parse_options()).
This patch makes both of them similar by doing exactly the equivalent of a
module_param_string() in option_setup() also -- just copying the param string
passed from the kernel command line into "config" variable. So,
strlen(config) != 0 in both cases, and netpoll_parse_options() is always
called from init_netconsole(), thus making the setup logic for both cases
similar.
Now, option_setup() is only ever called / used for the built-in case, so we
put it inside a #ifndef MODULE, otherwise gcc will complain about
option_setup() being "defined but not used". Also, the "configured" variable
is redundant with this patch and hence removed.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
The (!np.dev) check in write_msg() is bogus (always false), because: np.dev is
set by netpoll_setup(), which is called by init_netconsole() before
register_console(), so write_msg() cannot be triggered unless netpoll_setup()
successfully set np.dev. Also np.dev cannot go away from under us, because
netpoll_setup() grabs us reference on it. So let's remove the bogus check.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
(1) Remove unwanted headers.
(2) Mark __init and __exit as appropriate.
(3) Various trivial codingstyle and prettification stuff.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Veth stands for Virtual ETHernet. It is a simple tunnel driver
that works at the link layer and looks like a pair of ethernet
devices interconnected with each other.
Mainly it allows to communicate between network namespaces but
it can be used as is as well.
The newlink callback is organized that way to make it easy to
create the peer device in the separate namespace when we have
them in kernel.
This implementation uses another interface - the RTM_NRELINK
message introduced by Patric.
Bug fixes from Daniel Lezcano.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Several devices have multiple independant RX queues per net
device, and some have a single interrupt doorbell for several
queues.
In either case, it's easier to support layouts like that if the
structure representing the poll is independant from the net
device itself.
The signature of the ->poll() call back goes from:
int foo_poll(struct net_device *dev, int *budget)
to
int foo_poll(struct napi_struct *napi, int budget)
The caller is returned the number of RX packets processed (or
the number of "NAPI credits" consumed if you want to get
abstract). The callee no longer messes around bumping
dev->quota, *budget, etc. because that is all handled in the
caller upon return.
The napi_struct is to be embedded in the device driver private data
structures.
Furthermore, it is the driver's responsibility to disable all NAPI
instances in it's ->stop() device close handler. Since the
napi_struct is privatized into the driver's private data structures,
only the driver knows how to get at all of the napi_struct instances
it may have per-device.
With lots of help and suggestions from Rusty Russell, Roland Dreier,
Michael Chan, Jeff Garzik, and Jamal Hadi Salim.
Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.
[ Ported to current tree and all drivers converted. Integrated
Stephen's follow-on kerneldoc additions, and restored poll_list
handling to the old style to fix mutual exclusion issues. -DaveM ]
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Similarly to CTS protection, whether short preambles are used for 802.11b
transmissions should be a per-subif setting, not device global.
For STAs, this patch makes short preamble handling automatic based on the ERP
IE. For APs, hostapd still uses the prism ioctls, but the write ioctl has been
restricted to AP-only subifs.
ieee80211_txrx_data.short_preamble (an unused field) was removed.
Unfortunately, some API changes were required for the following functions:
- ieee80211_generic_frame_duration
- ieee80211_rts_duration
- ieee80211_ctstoself_duration
- ieee80211_rts_get
- ieee80211_ctstoself_get
Affected drivers were updated accordingly.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Commit ee49bd93 ("mlx4_core: Reset device when internal error is
detected") introduced some section mismatch problems when
CONFIG_HOTPLUG=n, because the error recovery code tears down and
reinitializes the device after everything is loaded, which ends up
calling into lots of code marked __devinit and __devexit from regular
.text. Fix this by getting rid of these now-incorrect section
markers.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Firmware commands are sent to the HCA by writing multiple words to a
command register block. Access to this block of registers is
serialized with a mutex. However, on large SGI systems writes to the
register block may be reordered within the system interconnect and
reach the HCA in a different order than they were issued (even with
the mutex). Fix this by adding an mmiowb() before dropping the mutex.
This bug was observed with real workloads with the similar FW command
code in the mthca driver, and adding the mmiowb() as in commit
66547550 ("IB/mthca: Use mmiowb() to avoid firmware commands getting
jumbled up") was confirmed to fix the problems, so we should add the
same fix to mlx4.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Increase the number of QPs allowed per multicast group from 8 to 56.
This allows for one QP per core on 16-core systems, which are now
quite common, and allows some space for future growth.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Implement FMRs for mlx4. This is an adaptation of code from mthca.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Write MTT entries directly to ICM from the driver (eliminating use of
WRITE_MTT command). This reduces the number of FW commands needed to
register an MR by at least a factor of 2 and speeds up memory
registration significantly. This code will also be used to implement
FMRs.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Everything that uses caps.reserved_mtts expects it to be a count of MTT
segments, not MTT entries. So convert the value that the FW gives us to
a count of segments.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Taking ilog2(dev->caps.reserved_mtts) to find out the order to pass to
the MTT buddy allocator will do the wrong thing if reserved_mtts is ever
not a power of 2. Be safe and use fls(dev->caps.reserved_mtts - 1).
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Enable having ICM tables in coherent memory, and use coherent memory
for the dMPT table. This will allow writing MPT entries for MRs both
via the SW2HW_MPT command and also directly by the driver for FMR
remapping without needing to flush or worry about cacheline boundaries.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
display the following device information under /sys/class/infiniband/mlx4_X:
board_id, fw_ver, hw_rev, hca_type.
This patch makes this information available to userspace utilities
such as ibstat and ibv_devinfo.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
The SRC ("scalable RC") transport has been renamed to XRC ("extended
RC"), to avoid having an abbreviation that is so easily confused with an
abbreviation for "source." Update the HCA capability decoding output to
use the new name.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
mlx4_srq_query() returns a big-endian 16-bit value through an int *,
which screws up sparse checking. Fix this so that a CPU-endian value
is returned.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Recover from MSI-X errors by automatically falling back on regular
interrupt, instead of asking the user to do this manually. This makes
it possible to enable MSI-X by default, and will make it possible to
get rid of the msi_x module option in the future.
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Special QPs are not allocated using the regular QP number bitmap, so
when they are destroyed, their QP number should not be freed in the
bitmap.
Found by Dotan Barak of Mellanox.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Rename GO_BIT_TIMEOUT to GO_BIT_TIMEOUT_MSECS for clarity, and
actually use it as the go bit timeout (instead of having the define
but then ignoring it and using a hard-coded 10 * HZ for the actual
timeout).
Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This patch makes numerous miscellaneous code improvements to the QE library.
1. Remove struct ucc_common and merge ucc_init_guemr() into ucc_set_type()
(every caller of ucc_init_guemr() also calls ucc_set_type()). Modify all
callers of ucc_set_type() accordingly.
2. Remove the unused enum ucc_pram_initial_offset.
3. Refactor qe_setbrg(), also implement work-around for errata QE_General4.
4. Several printk() calls were missing the terminating \n.
5. Add __iomem where needed, and change u16 to __be16 and u32 to __be32 where
appropriate.
6. In ucc_slow_init() the RBASE and TBASE registers in the PRAM were programmed
with the wrong value.
7. Add the protocol type to struct us_info and updated ucc_slow_init() to
use it, instead of always programming QE_CR_PROTOCOL_UNSPECIFIED.
8. Rename ucc_slow_restart_x() to ucc_slow_restart_tx()
9. Add several macros in qe.h (mostly for slow UCC support, but also to
standardize some naming convention) and remove several unused macros.
10. Update ucc_geth.c to use the new macros.
11. Add ucc_slow_info.protocol to specify which QE_CR_PROTOCOL_xxx protcol
to use when initializing the UCC in ucc_slow_init().
12. Rename ucc_slow_pram.rfcr to rbmr and ucc_slow_pram.tfcr to tbmr, since
these are the real names of the registers.
13. Use the setbits, clrbits, and clrsetbits where appropriate.
14. Refactor ucc_set_qe_mux_rxtx().
15. Remove all instances of 'volatile'.
16. Simplify get_cmxucr_reg();
17. Replace qe_mux.cmxucrX with qe_mux.cmxucr[].
18. Updated struct ucc_geth because struct ucc_fast is not padded any more.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
The 8169/8110SC currently announces itself as:
[...]
eth0: RTL8169sc/8110sc at 0x........, ..:..:..:..:..:.., XID 18000000 IRQ ..
^^^^^^^^
It uses RTL_GIGA_MAC_VER_05 and this part of the changeset can cut
its performance by a factor of 2~2.5 as reported by Timo.
(the driver includes code just before the hunk to write the ChipCmd
register when mac_version == RTL_GIGA_MAC_VER_0[1-4])
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Timo Jantunen <jeti@welho.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Remove unneeded check that caused problems with jumbo frame sizes.
The check was recently added and is wrong.
When using jumbo frames the sky2 driver does fragmentation, so
rx_data_size is less than mtu.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Correct printk with PFX before KERN_ in bcm43xx_wx.c
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
dm9601 didn't take the ethernet header into account when calculating
RX MTU, causing packets bigger than 1486 to fail.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This driver erroneously zeros dev->tx_queue_len, since
mp->tx_ring_size has not yet been initialized. Actually,
the driver shouldn't modify tx_queue_len at all and should
leave the value set by alloc_etherdev(), currently 1000.
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fix 4032 chip undocumented "feature" where bit-8 is set
if the inbound completion is for a VLAN.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fix missing symbols in libertas USB driver when it is modular and rest
of libertas is built-in.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Commit 468d09f894 masked the "state"
interrupt (bit 20 of the cause register). This results in Radstone's
PPC7D repeatedly re-entering the interrupt routine, locking up the
board. The following patch returns the required handling for this
interrupt.
Signed-off-by: Martyn Welch <martyn.welch@radstone.co.uk>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This blade-specific board form factor is identical to the 82571EB
board.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This should fix http://bugzilla.kernel.org/show_bug.cgi?id=8667
After resume, driver has reset the chip so the current state
of transmit checksum offload state machine and DMA state machine
will be undefined.
The fix is to set the state so that first Tx will set MSS and offset
values.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The FE+ workaround means the driver can no longer trust the status register
to indicate VLAN tagged frames. The fix for this is to just disable VLAN
acceleration for that chip version. Tested and works fine.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The Yukon FE+ chip appears to have a hardware glitch that causes bogus
receive status values to be posted. The data in the packet is good, but
the status value is random garbage. As a temporary workaround until the
problem is better understood, implement the workaround the vendor driver
used of ignoring the status value on this chip.
Since this means trusting dodgy hardware values; add additional checking
of the receive packet length.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This reverts commit fadacb1b80.
The change being reverted made the driver consistent with
include/linux/netdevice.h, but then inconsistent with the other PCMCIA
ethernet drivers.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Be more selective about when to enable the ram buffer watchdog code.
It is unnecessary on XL A3 or later revs, and with Yukon FE
the buffer is so small (4K) that the watchdog detects false positives.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
One more snippet of PHY initialization required for FE+ chips.
Discovered in latest sk98lin 10.21.1.3 driver.
Please apply to 2.6.23.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
A driver writer from another operating system hinted that
the versions of Yukon 2 chip with rambuffer (EC and XL) have
a hardware bug that if the FIFO ever gets completely full it
will hang. Sounds like a classic ring full vs ring empty wrap around
bug.
As a workaround, use the existing watchdog timer to check for
ring full lockup.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add support for newest Marvell chips.
The Yukon FE plus chip is found in some not yet released laptops.
Tested on hardware evaluation boards.
This version of the patch is for 2.6.23. It supersedes
the two previous patches that are sitting in netdev-2.6 (upstream branch).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch should cause no functional changes in driver behaviour.
There are (too) many revisions of the Yukon 2 chip now. Instead of
adding more conditionals based on chip revision; rerganize into a
set of feature flags so adding new versions is less problematic.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
On 100mbit versions, the driver always reports gigabit speed
available. The correct modes are already computed, then overwritten.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The length check for truncated frames was not correctly handling
the case where VLAN acceleration had already read the tag.
Also, the Yukon EX has some features that use high bit of status
as security tag.
Signed-off-by: Pierre-Yves Ritschard <pyr@spootnik.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add the DIS_EARLY_DAC PHY workaround for 5709 A1. Without it, link
sometimes does not come up.
Update version to 1.6.5.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch makes pppol2tp_xmit call skb_cow_head so that we don't modify
cloned skb data. It also gets rid of skb2 we only need to preserve the
original skb for congestion notification, which is only applicable for
ppp_async and ppp_sync.
The other semantic change made here is the removal of socket accounting
for data tranmitted out of pppol2tp_xmit. The original code leaked any
existing socket skb accounting. We could fix this by dropping the
original skb owner. However, this is undesirable as the packet has not
physically left the host yet.
In fact, all other tunnels in the kernel do not account skb's passing
through to their own socket. In partciular, ESP over UDP does not do
so and it is the closest tunnel type to PPPoL2TP. So this patch simply
removes the socket accounting in pppol2tp_xmit. The accounting still
applies to control packets of course.
I've also added a reminder that the outgoing checksum here doesn't work.
I suppose existing deployments don't actually enable checksums.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
The function pppol2tp_recv_core doesn't handle non-linear packets properly.
It also fails to check the remote offset field.
This patch fixes these problems. It also removes an unnecessary check on
the UDP header which has already been performed by the UDP layer.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
With the addition of UDP-Lite we need to refine the socket check so
that only genuine UDP sockets are allowed through.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
When I got rid of the second packet in __pppoe_xmit I created
a double-free on the skb because of the goto abort on failure.
This patch removes that.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Export phy_mii_ioctl, so network drivers can use it when built
as modules too.
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The 8168 ignores the requests to fetch the Tx descriptors when
the relevant TxPoll bit is already set. It easily kills the
performances of the 8168. David Gundersen has noticed that it
is enough to wait for the completion of the DMA transfer (NPQ
bit is cleared) before writing the TxPoll register again.
The extra IO traffic added by the proposed workaround could be
minimalized but it is not a high-priority task.
Fix for:
http://bugzilla.kernel.org/show_bug.cgi?id=7924http://bugzilla.kernel.org/show_bug.cgi?id=8688
(http://bugzilla.kernel.org/show_bug.cgi?id=7555 ?)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Gundersen <gundy@iinet.net.au>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
The phys of the 8110SC (RTL_GIGA_MAC_VER_{05/06}) act abnormally in
gigabit mode if they are applied the parameters in rtl8169_hw_phy_config
which actually aim the 8110S/SB.
It is ok to return early from rtl8169_hw_phy_config as it does not
apply to the 8101 and 8168 families.
Signed-off-by: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[VLAN]: Fix net_device leak.
[PPP] generic: Fix receive path data clobbering & non-linear handling
[PPP] generic: Call skb_cow_head before scribbling over skb
[NET] skbuff: Add skb_cow_head
[BRIDGE]: Kill clone argument to br_flood_*
[PPP] pppoe: Fill in header directly in __pppoe_xmit
[PPP] pppoe: Fix data clobbering in __pppoe_xmit and return value
[PPP] pppoe: Fix skb_unshare_check call position
[SCTP]: Convert bind_addr_list locking to RCU
[SCTP]: Add RCU synchronization around sctp_localaddr_list
[PKT_SCHED]: sch_cbq.c: Shut up uninitialized variable warning
[PKTGEN]: srcmac fix
[IPV6]: Fix source address selection.
[IPV4]: Just increment OutDatagrams once per a datagram.
[IPV6]: Just increment OutDatagrams once per a datagram.
[IPV6]: Fix unbalanced socket reference with MSG_CONFIRM.
[NET_SCHED] protect action config/dump from irqs
[NET]: Fix two issues wrt. SO_BINDTODEVICE.
This patch adds missing pskb_may_pull calls to deal with non-linear
packets that may arrive from pppoe or pppol2tp.
It also copies cloned packets before writing over them.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
It's rude to write over data that other people are still using. So call
skb_cow_head before PPP proceeds to modify the skb data.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds an optimised version of skb_cow that avoids the copy if
the header can be modified even if the rest of the payload is cloned.
This can be used in encapsulating paths where we only need to modify the
header. As it is, this can be used in PPPOE and bridging.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch removes the hdr variable (which is copied into the skb)
and instead sets the header directly in the skb.
It also uses __skb_push instead of skb_push since we've just checked
using skb_cow for enough head room.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
The function __pppoe_xmit modifies the skb data and therefore it needs
to copy and skb data if it's cloned.
In fact, it currently allocates a new skb so that it can return 0 in
case of error without freeing the original skb. This is totally wrong
because returning zero is meant to indicate congestion whereupon pppoe
is supposed to wake up the upper layer once the congestion subsides.
This makes sense for ppp_async and ppp_sync but is out-of-place for
pppoe. This patch makes it always return 1 and free the skb.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
The skb_unshare_check call needs to be made before pskb_may_pull,
not after.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This reverts commit e1abecc489.
The driver works on some hardware that skge doesn't handle yet.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Currently qe_bd_t is used in the macro call -- dma_unmap_single,
which is a no-op on PPC32, thus error is hidden today. Starting
with 2.6.24, macro will be replaced by the empty static function,
and erroneous use of qe_bd_t will trigger compilation error.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
A crash upon booting that is caused by bcm43xx has been reported [1] and
found to be due to a work queue being reinitialized while work on that
queue is still pending. This fix modifies the shutdown of work queues and
prevents periodic work from being requeued during shutdown. With this patch,
no more crashes on reboot were observed by the original reporter. I do not
get that particular failure on my system; however, when running a large
number of ifdown/ifup sequences, my system would kernel panic with the
'caps lock' light blinking at roughly a 1 Hz rate. In addition, there were
infrequent failures in the firmware that resulted in 'IRQ READY TIMEOUT'
errors. With this patch, no more of the first type of failure occur, and
incidence of the second type is greatly reduced.
[1] http://bugzilla.kernel.org/show_bug.cgi?id=8937
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The ucc_geth_mii code is based on the gianfar_mii code that use to include
ocp.h. ucc never need this and it causes issues when we want to kill
arch/ppc includes from arch/powerpc.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This patch solves a problem that the spidernet driver sometimes fails
to handle IRQ.
The problem happens because,
- In Cell architecture, interrupts may arrive at an interrupt
controller, even if they are masked by the setting on registers of
devices. It happens when interrupt packets are sent just before
the interrupts are masked.
- spidernet interrupt handler compares interrupt reasons with
interrupt masks, so when such interrupts occurs, spidernet interrupt
handler returns IRQ_NONE.
- When all of interrupt handler return IRQ_NONE, linux kernel disables
the IRQ and it no longer delivers interrupts to the interrupt handlers.
spidernet doesn't work after above sequence, because it can't receive
interrupts.
This patch changes spidernet interrupt handler that it compares
interrupt reason with SPIDER_NET_INTX_MASK_VALUE.
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Update last_rx in registered device struct instead of
in the dummy device.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Introduces a module parameter to decide whether the physical
port link state is propagated to the network stack or not.
It makes sense not to take the physical port state into account
on machines with more logical partitions that communicate
with each other. This is always possible no matter what the physical
port state is. Thus eHEA can be considered as a switch there.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Lock debugging finds a problem in phy.c and phy_device.c,
this patch fixes it. Tested on an AT91SAM9263-EK board,
kernel 2.6.23-rc4.
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Need to restore multicast settings on resume and after 'ethtool -r'.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
64-bit DMA causes data corruption with atl1. We don't know why, and Atheros
is working on it. For now, just use 32-bit DMA. This is a big hack that is
probably wrong, but it stops the bleeding.
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Acked-by: Chris Snook <csnook@redhat.com>
Acked-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
A hardware bug was revealed after a recent PCI MSI patch was made to
always disable legacy INTX when enabling MSI. The 5714/5780 chips
will not generate MSI when INTX is disabled, causing MSI failure
messages to be reported, and another patch was made to workaround the
problem by disabling MSI on ServerWorks HT1000 bridge chips commonly
found with the 5714.
We workaround this chip bug by enabling INTX after we enable MSI and
after we resume from suspend.
Update version to 3.81.
This problem was discovered by David Miller.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
- cxgb3 engine microcode load
cxgb3 - Fix dev->priv usage
qeth: Drop ARP packages on HiperSockets interface with NOARP attribute.
qeth: provide specific message for OSA-adapters exclusively used
qeth: crash during reboot after failing online setting
qeth: Announce tx checksumming for qeth devices in TSO/EDDP mode
qeth: dont return the return values of void functions.
qeth: enforce a rate limit for inbound scatter gather messages
qeth: ungrouping a device must not be interruptible
netxen: fix crashes during module unload
netxen: Avoid firmware load in PCI probe
PS3: fix the bug that 'ifconfig down' would hang
IOC3: Program UART predividers.
Load the engine microcode when an interface
is brought up, instead of of doing it when the module
is loaded.
Loosen up tight binding between the driver and the
engine microcode version.
There is no need for microcode update with T3A boards.
Fix the file naming.
Do a better job at logging the loading activity.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
cxgb3 used netdev_priv() and dev->priv for different purposes.
In 2.6.23, netdev_priv() == dev->priv, cxgb3 needs a fix.
This patch is a partial backport of Dave Miller's changes in the
net-2.6.24 git branch.
Without this fix, cxgb3 crashes on 2.6.23.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch fixes two problems during driver unload. The pci_disable_device()
call is before firmware reload, causing reads and writes across PCI bus after
disabling device. Second problem is the register window was wrong during
firmware reload
Signed-off by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Loading firmware during PCI probe can lead to incorrect initialization,
rendering the card unusable until next reboot. This was introduced a while
ago as a workaround for firmware bug, a better workaround was submitted for
this a while ago. So removing original hack that loads firmware during probe.
Signed-off by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fix the bug that 'ifconfig eth0 down' would hang up, reported by Stefan
Assmann <sassmann@suse.de>.
As we removed netif_poll_enable() from dev->open(), we should not use
netif_poll_disable() in dev->stop().
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The IOC3 driver's UART detection bits used to rely on the the firmware
setting the UART pre-divider in a way that's apropriate for the 8250
driver which doesn't currently program this register. This happens
to work for the console but not rarely for additional ports.
While at it, also program the UART to RS-232 PIO mode; it the UART might
have been in mac-serial and/or DMA mode though that hasn't actually been
observed in practice.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add comment to explain why we cannot read back after chip reset
before delaying.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
bnx2.c (incorrectly) sets current->state directly to
TASK_UNINTERRUPTIBLE, without going through set_task_state(). However
all the code wants to do is an msleep so just make it do that instead...
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
The general kernel memory allocation functions return void pointers
and there is no need to cast their return values.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kmalloc() returns a void pointer, so there is no need to cast it in
drivers/net/irda/kingsun-sir.c::kingsun_probe().
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Function declared static in forward declaration, but not in actual code.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
More noodlin on long flights, patch bin. Sparse warning fix for eql.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Based on a patch from Peter Oruba, convert myri10ge to use pcie_get_readrq()
and pcie_set_readrq() instead of our own PCI calls and arithmetics.
These driver changes incorporate the proposed PCI-X / PCI-Express read byte
count interface. Reading and setting those values doesn't take place
"manually", instead wrapping functions are called to allow quirks for some
PCI bridges.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off by: Peter Oruba <peter.oruba@amd.com>
Based on work by Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Includes hcp_epas_dtor in eq/cq/qp destructors to unmap
HW register.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Update the module parameter description of "use_mcs" to
show correct default value
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Userspace DLPAR tool expects decimal numbers to be written to
and read from sysfs entries.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The driver remove method needs to return an int not void. This was just
never noticed because usually this driver is not being built as a module.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Mark new version to track if current driver is in use.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This fixes the extra timer overhead that people were whining about
as a 2.6.23 regression.
Running the watchdog timer all the time is unneeded. Change it
to run only if link is up, and reduce frequency to save power.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Make sure PCI register for PHY power gets cleared on boot, and make
sure to avoid any PCI posting problems.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
When transferring data at full speed, the DM9000 network interface
sometimes stops sending/receiving data. Worse, ksoftirqd consumes
100% cpu and the net tx watchdog never triggers.
Fix by spin_lock_irqsave() in dm9000_start_xmit() to prevent the
interrupt handler from interfering.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Writing BMCR_RESET bit will reset MII_BMCR to default values. This is
clearly not what we want.
Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
IP32 doesn't even have a ZONE_DMA so no point in using GFP_DMA in any
IP32-specific device driver.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
As noticed by Chuck Ebbert, commit c5e3ae8823
introduced a copy-paste typo, as realtek phy is 0x732 and not 0x1c1. Obvious
fix below suggested by Ayaz Abdulla.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch addresses the issue with "osize too small" errors in mppe
encryption. The patch fixes the issue with wrong output buffer size
being passed to ppp decompression routine.
--------------------
As pointed out by Suresh Mahalingam, the issue addressed by
ppp-fix-osize-too-small-errors-when-decoding patch is not fully resolved yet.
The size of allocated output buffer is correct, however it size passed to
ppp->rcomp->decompress in ppp_generic.c if wrong. The patch fixes that.
--------------------
Signed-off-by: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
There are special PHY settings available on Yukon EC-U chip that
should not get cleared. This should solve mysterious errors on some
motherboards (like Gigabyte DS-3).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
If the forcedeth driver receives too much work in an interrupt, it
assumes it has a broken hardware with stuck IRQ. It works around the
problem by disabling interrupts on the nic but makes a printk while
holding device spinlog - which isn't smart thing to do if you have
netconsole on the same nic.
This patch moves the printk's out of the spinlock protected area.
Without this patch the machine hangs hard. With this patch everything
still works even when there is significant increase on CPU usage while
using the nic.
Signed-off-by: Timo Jantunen <jeti@iki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/mlx4: Incorrect semicolon after if statement
mlx4_core: Wait 1 second after reset before accessing device
IPoIB: Fix leak in ipoib_transport_dev_init() error path
IB/mlx4: Fix opcode returned in RDMA read completion
IB/srp: Add OUI for new Cisco targets
IB/srp: Wrap OUI checking for workarounds in helper functions
RDMA/cxgb3: Always call low level send function via cxgb3_ofld_send()
IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c
IB: Include <linux/list.h> and <linux/rwsem.h> from <rdma/ib_verbs.h>
IB: Include <linux/list.h> from <rdma/ib_mad.h>
IB/mad: Fix address handle leak in mad_rmpp
IB/mad: agent_send_response() should be void
IB/mad: Fix memory leak in switch handling in ib_mad_recv_done_handler()
IB/mad: Fix error path if response alloc fails in ib_mad_recv_done_handler()
IB/sa: Don't need to check for default P_Key twice
IB/core: Ignore membership bit in ib_find_pkey()
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[IPVS]: Use IP_VS_WAIT_WHILE when encessary.
[NET]: Share correct feature code between bridging and bonding
[ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc
[IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc
[WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc
[DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm()
[DCCP]: fix theoretical ccids_{read,write}_lock() race
[XFRM]: Clean up duplicate includes in net/xfrm/
[TIPC]: Clean up duplicate includes in net/tipc/
[SUNRPC]: Clean up duplicate includes in net/sunrpc/
[PKT_SCHED]: Clean up duplicate includes in net/sched/
[IPV6]: Clean up duplicate includes in net/ipv6/
[IPV4]: Clean up duplicate includes in net/ipv4/
[ATM]: Clean up duplicate includes in net/atm/
[ATM]: Clean up duplicate includes in drivers/atm/
[IPCONFIG]: ip_auto_config fix
[ATM]: fore200e_param_bs_queue() must be __devinit
This patch adds support for 2 new board variants:
- A Quad port fiber 82571 board
- A blade version of the 82571 quad copper board
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
http://bugzilla.kernel.org/show_bug.cgi?id=8797 shows that the
bonding driver may produce bogus combinations of the checksum
flags and SG/TSO.
For example, if you bond devices with NETIF_F_HW_CSUM and
NETIF_F_IP_CSUM you'll end up with a bonding device that
has neither flag set. If both have TSO then this produces
an illegal combination.
The bridge device on the other hand has the correct code to
deal with this.
In fact, the same code can be used for both. So this patch
moves that logic into net/core/dev.c and uses it for both
bonding and bridging.
In the process I've made small adjustments such as only
setting GSO_ROBUST if at least one constituent device
supports it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
xennet_tx_bug_gc can free the skb before we use it, so make sure we don't.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
A special sequence of ifconfig up/down and plug/unplug the cable can break
the duplex configuration of the driver.
Setting
vp->mii.full_duplex = vp->full_duplex
in vortex_up should fix this.
Addresses Bug 8575 3c59x duplex configuration broken
http://bugzilla.kernel.org/show_bug.cgi?id=8575
Cc: Martin Buck <mb-tmp-ohtmvyyn.xreary.bet@gromit.dyndns.org>
Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Cc: Natalie Protasevich <protasnb@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
When a detailed netdev error is counted, we also must account for it in the
aggregated error count.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8106
Cc: Tim Hockin <thockin@hockin.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Chongfeng Hu <loveminix@yahoo.com.cn>
Cc: Natalie Protasevich <protasnb@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/ax88796.c: In function `ax_probe':
drivers/net/ax88796.c:825: warning: size_t format, different type arg (arg 4)
drivers/net/ax88796.c:825: warning: size_t format, different type arg (arg 5)
resource_size_t isn't size_t.
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Use the pause counter to avoid a needless device reset, and
print a message telling the admin that our link partner is
flow controlling us down to 0 pkts/sec.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Patch to disable the rx_copybreak feature on hardware architectures that
don't allow unaligned DMA access.
#ifdef code taken from tulip_core.c. Problem pointed out by Ivan
Kokshaysky.
Signed-off-by: Dustin Marquess <jailbird@alcatraz.fdf.net>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Put a 1000 msec delay after resetting the device before attempting to
do config cycles on it. Not waiting causes system hangs on some
chipsets, e.g. Intel E7520, when the driver is loaded.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
> >> Looks like memset() is zeroing wrong nr of bytes.
> >
> > Good catch, however, I think we can just remove this memset altogether
> > since the memory gets allocated via kzalloc.
>
> Correct, that memset() is superfluous.
Ok. Then this should do it.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
drivers/net/ibmveth.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Use shorter method to determine whether adapter has configured ports
Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
sis190 driver assumes to find ISA only on SiS965.
similar fix is in sis900 driver, see bug report
http://bugs.debian.org/435547
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
use the simpler spin_trylock_irqsave() API to get the adapter lock.
[ this is also a fix for -rt where adapter->lock is a sleeping lock. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
SH boards in general only wire this up in 8 or 16-bit mode, and
as we never had the wrappers for 32-bit mode defined, SMC_CAN_USE_32BIT
caused build failure for the non-Solution Engine boards. This gets it
building again.
Also kill off the straggling set_irq_type() definition, this is left
over cruft that was missed when the rest of it switched to IRQ flags.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
--
drivers/net/smc91x.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Theory : though needless, it should not have hurt.
Practice: it does not play nice with DEBUG_SHIRQ + LOCKDEP + UP
(see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242572).
The patch makes sense in itself but I should dig why it has an effect
on #242572 (assuming that NAPI do not change in a near future).
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Fix extracted from Realtek's driver (8.002.00/20070713) for the PHY
attached to 8111/8168b chipsets.
The check against mac_version is just usual paranoia during the bugfix
period of the kernel cycle. -- FR
Tested on Asus M2A-VM motherboard by Roger So.
No regression on my Asrock 945G DVI either (built-in 8168 + 2x8169).
Signed-off-by: Roger So <roger.so@gmail.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
While filling the control set the driver tests for a PSPOLL frame.
But it tested only the subtype of the packet. The full type needs
to be tested to identify those packets reliably.
[dsd@gentoo.org: backport to mainline]
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
conf->mac_addr is not guaranteed to be set. This ensures priv->hwaddr is
always set to a valid mac address. Thanks to Johannes Berg
<johannes@sipsolutions.net> for finding this problem.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This reverts commit 77548f5807.
David Woodhouse wrote:
>This broke my shinybook. I seem to get absolutely _no_ outgoing packets,
>although I can receive OK.
Larry Finger wrote:
>Please revert this patch.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The device would not resume properly if it was shutdown before the system
was suspended. In such scenario where the netif_running state is 0,
bnx2_suspend() would not save the PCI state and so the memory enable bit
and bus master enable bit would be lost.
We fix this by always saving and restoring the PCI state in
bnx2_suspend() and bnx2_resume() regardless of netif_running() state.
Update version to 1.6.4.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joachim Deguara <joachim.deguara@amd.com> reported that tg3 devices
would not resume properly if the device was shutdown before the system
was suspended. In such scenario where the netif_running state is 0,
tg3_suspend() would not save the PCI state and so the memory enable bit
and bus master enable bit would be lost.
We fix this by always saving and restoring the PCI state in
tg3_suspend() and tg3_resume() regardless of netif_running() state.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
* wrong argument passed to pci_unmap_single() on failure
exit paths
* leak in the same area
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is needed because commit 313674afa8
inlines the generic function to the caller.
Signed-off-by: Jan Altenberg <jan.altenberg@linutronix.de>
Signed-off-by: Li Yang <leoli@freescale.com>
This fix section mismatch:
reference to .exit.text:uec_mdio_exit (between 'ucc_geth_init' and 'uec_mdio_init')
void __exit uec_mdio_exit(void) is called from
- static int __init ucc_geth_init(void)
- static void __exit ucc_geth_exit(void)
First one would make error path more than just an error.
Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Li Yang <leoli@freescale.com>
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits)
[RTNETLINK]: Fix warning for !CONFIG_KMOD
[IPV4] ip_options.c: kmalloc + memset conversion to kzalloc
[DECNET]: kmalloc + memset conversion to kzalloc
[NET]: ethtool_perm_addr only has one implementation
[NET]: ethtool ops are the only way
[PPPOE]: Improve hashing function in hash_item().
[XFRM]: State selection update to use inner addresses.
[IPSEC]: Ensure that state inner family is set
[TCP]: Bidir flow must not disregard SACK blocks for lost marking
[TCP]: Fix ratehalving with bidirectional flows
[PPPOL2TP]: Add CONFIG_INET Kconfig dependency.
[NET]: Page offsets and lengths need to be __u32.
[AF_UNIX]: Make code static.
[NETFILTER]: Make nf_ct_ipv6_skip_exthdr() static.
[PKTGEN]: make get_ipsec_sa() static and non-inline
[PPPoE]: move lock_sock() in pppoe_sendmsg() to the right location
[PPPoX/E]: return ENOTTY on unknown ioctl requests
[IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses.
[NET]: Fix prio_tune() handling of root qdisc.
[NET]: Fix sch_api to properly set sch->parent on the root.
...
One patch for two trivial typos of 'error' with three R's, appearing in message strings.
There's a bunch more of the same in comments, not dealt with here.
Signed-off-by: Eddy L O Jansson <eddy@klopper.net>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The rcu_dereference() primitive needs to be applied to an l-value in order to
ensure that compiler writers don't get an opportunity to apply reordering
optimizations that could result in multiple fetches or in other misbehavior.
This patch pulls the rcu_dereference() calls in bpq_seq_next() up to the point
at which the fetched pointers are still l-values, rather than after
list_entry() has transformed them into r-values.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
All drivers implement ethtool get_perm_addr the same way -- by calling
the generic function. So we can inline the generic function into the
caller and avoid going through the drivers.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: David S. Miller <davem@davemloft.net>
During the transition to the ethtool_ops way of doing things, we supported
calling the device's ->do_ioctl method to allow unconverted drivers to
continue working. Those days are long behind us, all in-tree drivers
use the ethtool_ops way, and so we no longer need to support this.
The bonding driver is the biggest beneficiary of this; it no longer
needs to call ioctl() as a fallback if ethtool_ops aren't supported.
Also put a proper copyright statement on ethtool.c.
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: David S. Miller <davem@davemloft.net>
The new code produces the same results as the old version and is
~ 3 to 6 times faster for 4-bit hashes on the CPUs I tested.
Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
PPPOL2TP uses UDP so it obviously depends on CONFIG_INET.
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
and the last one for now: Acquire the sock lock in pppoe_sendmsg()
before accessing the sock - and in particular avoid releasing the lock
even though it hasn't been acquired.
Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
here another patch for the PPPoX/E code that makes sure that ENOTTY is
returned for unknown ioctl requests rather than 0 (and removes another
unneeded initializer which I didn't bother creating a separate patch for).
Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Because IPv4 and IPv6 both depend on the presence of the loopback
device to function, failure in registration the loopback device should
be fatal.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This driver was still using the deprecated prom_*() interfaces to
obtain values out of the OBP device tree, and this is causing
some kinds of problems on sparc32 especially SMP boxes.
Signed-off-by: David S. Miller <davem@davemloft.net>
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c
PATCH kernel 2.6.22] PCMCIA-NETDEV : modify smc91c92_cs.c to become SMP safe
S2io: Increment received packet count correctly
S2io: Fix crash when resetting adapter
S2io: Mask spurious interrupts
S2IO: Implementing review comments from old patches
S2IO: Checking for the return value of pci map function
S2IO: Removing MSI support from driver
S2IO: Removing 3 buffer mode support from the driver
netxen: drop redudant spinlock
netxen: Fix interrupt handling for multiport adapters
netxen: re-init station address after h/w init
tulip: Remove tulip maintainer
forcedeth: mac address correct
gfar: Fix modpost warning
lib8390: comment on locking by Alan Cox
Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/ipath: Workaround problem of errormask register being overwritten
IB/ipath: Fix some issues with buffer cancel and sendctrl register update
IB/ipath: Use faster put_tid_2 routine after initialization
IB/ipath: Remove unsafe fastrcvint code from interrupt handler
IB/ehca: Move extern declarations from .c files to .h files
IB/mlx4: Whitespace fix
IB/ehca: Fix include order to better match kernel style
mlx4_core: Remove kfree() in mlx4_mr_alloc() error flow
RDMA/amso1100: Initialize the wait_queue_head_t in the c2_qp structure
This patch fixes a potential null dereference bug where we dereference
DEV before a null check. This patch simply moves the dereferencing after
the null check.
Signed-off-by: Micah Gruber <micah.gruber@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
protect smc_start_xmit, smc_interrupt and media_check by spin_lock.
Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Fix to increment the received packet count correctly.
(Resending; Removed HTML sections in the patch)
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Removed the call to pci_set_power_state to reset the adapter as it was resulting
in system crash on some platforms.
(Resending; Removed HTML sections in the patch)
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Mask single and double bit ETQ ecc errors to inhibit spurious interrupts.
(Resending; Removed HTML sections in the patch)
Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Checking for the return value of pci map function
- Implemented Francois Romieu's comments on eliminating code duplication
using goto
- Implemented Francois Romieu's comments on using a temporary variable for
accessing statistics structure
Signed-off-by: Veena Parat <veena.parat@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Removed 3 buffer mode support from driver - unused feature
- Incorporated Jeff Garzik's comments on elimination of inline typecasting
- Code cleanup : Removed a few extra spaces
Signed-off-by: Veena Parat <veena.parat@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Some leftover code that makes use of adapter->lock in tx_timeout function,
which resets the interface under this lock. In close() when the workqueue
is flushed, prints the warning about sleeping with interrupts disabled
(when spinlock debug is enabled). The lock was required with private netxen
IOCTLs, which were removed a while ago.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch fixes masking of interrupts on multiport adapters. Also disables
interrupts upon ifdown interface. The wrong mask could result in interrupt
flood after interface is down.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This is a workaround for firmware bug with 2nd port of multiport adapter,
where MAC address is reset. Driver just needs to overwrite it with the
value read from PROM.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
In older chipsets, the mac address was stored in reversed order.
However, in newer chipsets, the mac address is in correct order. This
patch takes those newer chipsets into account and does not rely on a
special bit setup by BIOS'.
Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fix the following modpost warning:
WARNING: vmlinux.o(.init.text+0x1aa6c): Section mismatch: reference to .exit.text:gfar_mdio_exit (between 'gfar_init' and 'gfar_mdio_init')
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Additional explanation of problems with locking by Alan Cox.
Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch fixes a potential null dereference bug where we dereference
pegasus before a null check. This patch simply moves the dereferencing
after the null check.
Signed-off-by: Micah Gruber <micah.gruber@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Added code to recognize the second interface on M5275 boards.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
On the MCF5272, there is no need to read the ICR before writing it :
the bit 4n+3 is a write-enable for the bits 4n,4n+1 and 4n+2.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix the work queue code in the FEC driver.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Removed unused CONFIG symbol and its conditional code from FEC driver.
Pointed out by Robert P. J. Day <rpjday@mindspring.com>.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Include cacheflush.h to get definitions for cache functions used
in this code.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Gabriel C reports lguest doesn't compile with CONFIG_BLOCK=n. Fix this
by introducing a config var for the block device, which depends on
LGUEST && BLOCK. Do the same for the net driver, rather then depending
gratuitously on CONFIG_NET.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Gabriel C <nix.or.die@googlemail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
Input Serio: Blackfin doesnt support I8042 - make sure it doesnt get selected
Blackfin arch: add BF54x I2C/TWI TWI0 driver support
Blackfin On-Chip RTC driver update for supporting BF54x
Blackfin Ethernet MAC driver: fix bug Report returned -ENOMEM upwards (in case L1/uncached memory alloc fails)
Blackfin arch: add error message when IRQ no available
Blackfin arch: Initialize the exception vectors early in the boot process
Blackfin arch: fix a compiling warning about dma-mapping
Blackfin arch: switch to using proper defines this time THREAD_SIZE and PAGE_SIZE instead of just PAGE_SIZE everywhere
Blackfin arch: fix bug which unaligns the init thread's stack and causes the current macro to fail.
Blackfin arch: Load P0 before storing through it
Blackfin arch: fix KGDB bug, dont forget last parameter.
Blackfin arch: add selections for BF544 and BF542
Blackfin arch: use bfin_read_SWRST() now that BF561 provides it
Blackfin arch: setup aliases for some core Core A MMRs
mlx4_mr_alloc() doesn't actually allocate mr (it just initializes the
pointer that the caller passes in), so it shouldn't free it if an
error occurs.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Change INT0 trigger mode from edge-sense mode to level-sense mode,
in order to fix the following timeout error:
'NETDEV WATCHDOG: eth0: transmit timed out'.
This patch is required only for the Mappi platform.
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation: The FIXMEs
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation: The Drivers
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Address of auto variable is not a userland pointer. A good thing, too,
since if pppol2tp_tunnel_getsockopt() would _really_ get a userland pointer
as argument, it would be an instant roothole...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
netdev: i82596 Ethernet needs <asm/cacheflush.h> on m68k
drivers/net/82596.c: In function 'init_rx_bufs':
drivers/net/82596.c:552: error: implicit declaration of function 'cache_clear'
drivers/net/82596.c: In function 'i596_start_xmit':
drivers/net/82596.c:1104: error: implicit declaration of function 'cache_push'
The driver still compiles on ia32 (CONFIG_APRICOT=y)
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This patch contains new device settings for MCP73 chipset.
Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Sparse (correctly) thinks this function should be static. Make it so.
Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The Coverity checker noted that we've already dereferenced "dev" when we
check whether it's NULL.
Since it's impossible that "dev" is NULL at this place this patch
removes the NULL check.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This is a change to remove a local hack in favour to __maybe_unused that
has been recently added.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
phy_read() returns a negative number if there's an error, but the
error-checking code in the Vitesse driver's config_intr function
triggers if phy_read() returns non-zero. Correct that.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Reduced allocation size for rx skb buffers, from 2308 bytes to
1356 per buffer.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Use constants already provided by the kernel for ethernet related lengths.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Change the threshold number of descriptors used to trigger CMB writes.
The vendor reports that under certain conditions this will reduce the
number of unnecessary tx interrupts and improve rx performance.
This change is lifted directly from vendor version 1.2.40.2 of the L1
driver.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The DMA engine setup contains a typo that can result in an incorrect
dmaw_block setting.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fixed rare issue that 'lv1_net_start_rx_dma failed, status=-9" was shown
in dmesg. This meant restarting rx DMA had been rejected by the hypervisor.
This issue would caused if the guest os requested starting DMA when
the hypervisor thought the DMA was in progress.
The state machine for DMA status of the hypervisor would be updated
by processing interrupt in the hypervisor.
Thus we should wait for the interrupt delivery before restarting
DMA.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Removed use of netif_poll_enable() in open function.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Use net_device name for registration of irq as many network drivers do.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Removed the statistics information from private structre.
Instead, use net_device_stats in net_device structure.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
gelic: TX descriptor handling cleanup
- Emitted return value of NETDEV_TX_LOCKED when DMA map or kick
failure.
Now it would free the skb, update drop packet statistics
and return OK. Requested from Jeff Garzik.
- Enable tx queue if number of free descriptors are more than 2
- Fixed descriptor leak if dma map for second descriptor failed
- Stopped calling xmit handler from interrupt handler in order
to recheck tx queue. Instead, call appropriate helper functions.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- Removed the embarrassing definition which was used in only one
place.
- Fixed wrong initialization of dmac_cmd_status.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fixed the bug that calculation of the address of rx descriptor was
wrong.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The firmware should be loaded after resetting hardware during PCI probe,
besides module unload. This fixes issue with 2nd port of multiport adapter
on powerpc blades. This patch also fixes a bug that PCI resources are not
freed if dma watchdog shutdown failed. The dma watchdog poll messages
during module unload are also suppressed.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Milan Bag <mbag@netxen.com>
Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Adds netif message level control to the ucc_geth driver. The level can
be set by module parameter and ethtool.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The patch enables statistics in ucc_geth and adds ethtool support to
ucc_geth driver.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/ehca: Support small QP queues
IB/ehca: Make internal_create/destroy_qp() static
IB/ehca: Move ehca2ib_return_code() out of line
IB/ehca: Generate async event when SRQ limit reached
IB/ehca: Support large page MRs
IB/mlx4: Fix error path in create_qp_common()
mlx4_core: Change command token on timeout
IB/mthca: Change command token on timeout
IB/ipath: Remove ipath_layer dead code
IB/mlx4: Fix leaks in __mlx4_ib_modify_qp
Enabling drivers from "Devices > Networking" (in menuconfig), for
example SLIP and/or PLIP, throws link time errors when CONFIG_NET itself
is =n. Have CONFIG_NETDEVICES depend on CONFIG_NET.
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
The EP7211 SIR driver was the only one left without a new SIR API port.
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
The FW command token is currently only updated on a command completion
event. This means that on command timeout, the same token will be
reused for new command, which results in a mess if the timed out
command *does* eventually complete.
This is the same change as the patch for mthca from Michael
S. Tsirkin <mst@dev.mellanox.co.il> that was just merged. It seems
sensible to avoid gratuitous differences in FW command processing
between mthca and mlx4.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Fix two year old bug in early bootup asm.
[SPARC64]: Update defconfig.
[SPARC64]: Fix log message type in vio_create_one().
[SPARC64]: Tweak assertions in sun4v_build_virq().
[SPARC64]: Tweak kernel log messages in power_probe().
[SPARC64]: Fix handling of multiple vdc-port nodes.
[SPARC64]: Fix device type matching in VIO's devspec_show().
[SPARC64]: Fix MODULE_DEVICE_TABLE() specification in VDC and VNET.
[SPARC]: Add sys_fallocate() entries.
[SPARC64]: Use orderly_poweroff().
Doing |= 1 << 19 to 16bit unsigned is not particulary useful;
that register is 32bit, unlike the ones dealt with in the rest of
function, so we need u32 variable here.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
WARNING: drivers/built-in.o(.text+0x3fd54): Section mismatch: reference to .init.data: (between 'ether3_probe' and 'ether1_setmulticastlist')
WARNING: drivers/built-in.o(.text+0x40380): Section mismatch: reference to .init.data: (between 'ether1_probe' and 'ether1_interrupt')
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>