Commit Graph

7832 Commits

Author SHA1 Message Date
David S. Miller
1e42198609 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
David S. Miller
2e5a3eaca3 Merge branch 'upstream-net26' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-04-17 14:13:13 -07:00
Jeff Garzik
36b30ea940 [netdrvr] forcedeth: internal simplifications; changelog removal
* remove changelog from source; its kept in git repository

* consolidate descriptor version tests using nv_optimized()

* consolidate NIC DMA start, stop and drain into
  nv_start_txrx(), nv_stop_txrx(), nv_drain_txrx()

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:33 -04:00
Paul Gortmaker
cac1f3c8a8 phylib: factor out get_phy_id from within get_phy_device
We were already doing what amounts to a get_phy_id from within
get_phy_device, and rather than duplicate this for the TBIPA
probing, we might as well just factor it out and make it available
instead.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:33 -04:00
Paul Gortmaker
b1394f961a PHY: add BCM5464 support to broadcom PHY driver
The BCM5464 can be used with the current broadcom PHY driver
by just adding the appropriate chip ID and using the existing
support within.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:32 -04:00
Dan Noe
d96a51f6b8 cxgb3: Fix __must_check warning with dev_dbg.
Fix the warning:
drivers/net/cxgb3/cxgb3_main.c: In function ‘offload_open’:
drivers/net/cxgb3/cxgb3_main.c:936: warning: ignoring return value of
 ‘sysfs_create_group’, declared with attribute warn_unused_result

Now the return value is checked; if sysfs_create_group() returns failure,
a warning is printed using dev_dbg, and the code continues as before.  Use
of dev_dbg ensures printk is not needlessly included unless desired for
debugging.

Signed-off-by: Dan Noe <dpn@isomerica.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:32 -04:00
Atsushi Nemoto
10e05f78c5 tc35815: Statistics cleanup
On Sat, 12 Apr 2008 05:00:49 -0400, Jeff Garzik <jeff@garzik.org> wrote:
> applied 1-6

Thanks.

Could you apply this too, or hopufully fold into Andy Fleming's "phy:
Change mii_bus id field to a string" patch (commit c69fedae) ?

------------------------------------------------------
Subject: [PATCH] tc35815: build fix

Fix build failure caused by Andy Fleming's "phy: Change mii_bus id
field to a string" patch.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:31 -04:00
Sergei Shtylyov
703bb99ca7 natsemi: fix MMIO for PPC 44x platforms
The driver stores the PCI resource address into 'unsigned long' variable before
calling ioremap()  on it. This warrants a kernel oops when the registers are
accessed on PPC 44x platforms which (being 32-bit) have PCI memory space mapped
beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion of the
PCI memory resources are mapped below 4 GB, but arch/powerpc/ code got rid of
this trick, having instead CONFIG_RESOURCES_64BIT enabled.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-17 15:31:31 -04:00
Joe Perches
406874a7cc e1000: convert uint16_t style integers to u16
Conglomerate from 4 separate patches from Joe.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:45 -04:00
Joe Perches
222441a620 ixgb: convert uint16_t style integers to u16
Conglomerate of 4 separate patches by Joe.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:44 -04:00
Denys Vlasenko
7dd73bbcc9 sb1000.c: make const arrays static
This patch replaces automatic constant arrays a-la

    const unsigned char Command0[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};

with static ones. Size difference for 32bit x86:

text  data   bss     dec     hex filename
5418   129     0    5547    15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o
5396   129     0    5525    1595 linux-2.6.followup-ALLYES/drivers/net/sb1000.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:44 -04:00
Denys Vlasenko
a8d06342ba sb1000.c: stop inlining largish static functions
drivers/net/sb1000.c has lots of inlined static functions.

Mst of them are used at initialization, wait for some
hardware register to change (wait using yield, sleep etc),
or do slow port-based I/O. Inlining thse "for speed" makes no sense.

This patch removes "inline" from biggest static function
(regardless of number of callsites - gcc nowadays auto-inlines
statics with one callsite).

Size difference for 32bit x86:

text   data    bss    dec    hex filename
6299    129      0   6428   191c linux-2.6-ALLYES/drivers/net/sb1000.o
5418    129      0   5547   15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:43 -04:00
Adrian Bunk
aa39432326 #if 0 netxen_nic_link_ok()
This patch #if 0's the no longer used netxen_nic_link_ok().

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:43 -04:00
Adrian Bunk
b1555130c7 make netxen_workq static
netxen_workq can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:42 -04:00
Bruce Allan
cef8c79315 e1000e: reformat register test code, fix some minor initialization
The register tests should be run with all the proper flags enabled
to maximize the test coverage code and make sure we are as close
as we can get to testing regular traffic.

Reformat the code for readability. Minor cleanups in the descriptor
ring setup.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:37 -04:00
Jeff Kirsher
69e3fd8ccc e1000e: rename a few functions
Several minor cosmetic function renames.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:37 -04:00
Jeff Kirsher
e9ec2c0f4b e1000e: Make arrays out of these Rx/Tx registers
With multiple queues coming into the code these base control
registers need to be made into arrays.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:36 -04:00
Jeff Kirsher
8d7c294cae e1000e: limit EEPROM size accesses
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:36 -04:00
Stephen Hemminger
2723b01921 sc92031: use netdev_alloc_skb
Use netdev_alloc_skb since it handles any NUMA node memory localtion issues
and sets skb->dev. Since device driver was not setting skb->dev, I bet
filter rules based on device would not work.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:35 -04:00
Stephen Hemminger
26a17b7bbb sc92031: start transmit return value bugfix
Any negative return value from start_xmit is interpreted as NETDEV_TX_LOCK
which is not what this driver wants. It should return 0 (NETDEV_TX_OK)
when it consumes a packet.

Also, use skb_padto() as the generic way to pad small frames.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:35 -04:00
Stephen Hemminger
9c28eaea90 sc92031: use net_device stats
Statistics structure is available for use in net_device structure.
Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:41:34 -04:00
Peter Horton
10c6462090 [netdrvr] tulip: Better MWI workaround for 21143 rev 65 chip errata
This patch works around the MWI bug on the DC21143 rev 65 Tulip by
ensuring that the receive buffers don't end on a cache line boundary
(as documented in the errata).

This patch is required for the MIPS based Cobalt Qube/RaQ as
supporting the extra PCI commands seems to reduce the chance of a hard
lockup between the Tulip and the PCI bridge.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:40:01 -04:00
Jeff Garzik
48dd59e398 [netdrvr] tulip/winbond-840: don't let tulip.h symbol stomp ours
winbond-840 shares tulip.h with the tulip driver, because they share
many (but not all) of the same register definitions.

This is useful for the register definitions, but not helpful when it
comes to symbols that are shared among the tulip driver's C modules,
but not meant to be shared outside that one driver.

Thus, PKT_BUF_SZ is a symbol internal to tulip, but it was intruding
upon a similar symbol in winbond-840's namespace.  This was not a
problem as long as the two symbols had the same value, but upcoming
patches result in differing symbol values.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:37:24 -04:00
Joe Perches
dc13b38599 drivers/net/bonding/bond_main.c - remove unnecessary #define
bond_main.c already #includes <linux/seq_file.h>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:09:35 -04:00
Andy Fleming
9d9326d3bc phy: Change mii_bus id field to a string
Having the id field be an int was making more complex bus topologies
excessively difficult.  For now, just convert it to a string, and
change all instances of "bus->id = val" to
snprintf(id, MII_BUS_ID_LEN, "%x", val).

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:09:35 -04:00
Dai Haruki
d080cd6301 gianfar: Support NAPI for TX Frames
Poll the completed TX frames in gfar_poll().  This prevents the tx
completion interrupt from interfering with processing of received
frames.

We also disable hardware rx coalescing when NAPI is enabled.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Ishizaki Kou
0b50d75387 spidernet: revise link status logging
This patch revises the logging for link informations of spidernet.

  - The link down message is too verbose because auto-negotiation timeout
    occurs periodically while an ethernet cable is not connected.
  - We want to see the link result, and we think it should be displayed.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Ishizaki Kou
9a11fcb521 spidernet: fix error interrupt handling
In addition to the value of GHIINT0STS, spidernet interrupt handler
should check the values of GHIINT1STS/GHIINT2STS registers at the
beginning of spider_net_interrupt() so as not to drop error
interrupts.

GHIINT1STS/GHIINT2STS registers indicates some of erroneous conditions
in spidernet, and a few bits of GHIINT0STS register reflects these
conditions. But GHIINT0MSK masks these bits, so you should check these
conditions by reading GHIINT1STS/GHIINT2STS registers directly.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Ishizaki Kou
fcfcfa205e spidernet: change interrupt masks
This patch changes spidernet interrupt masks.

 - unmask GDAINVAINT. There is an operation to do by spidernet
   interrupt handler.
 - mask some interrupts. There are no operations in the interrupt handler.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Ishizaki Kou
4f2d65c774 spidernet: increase auto-negotiation timeout to 5 seconds
This patch extends the timeout for spidernet auto-negotiation.
Auto-negotiation often fails to finish in 2 seconds.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Ishizaki Kou
81971bef4c spidernet: add missing initialization
This patch fixes initialization of "aneg_count" and "medium" fields in
spider_net_card to make spidernet driver correctly sets "link status".

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Atsushi Nemoto
7f225b427b tc35815: Whitespace cleanup
Cosmetic TAB/whitespace cleanups and some style cleanups.  No
functional changes.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Atsushi Nemoto
c6686fe3e4 tc35815: Use generic PHY layer
Convert the tc35815 driver to use the generic PHY layer in
drivers/net/phy.  Also rename 'boardtype' to 'chiptype' which hould be
more appropriate.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:50 -04:00
Atsushi Nemoto
22adf7e536 tc35815: Use managed pci iomap helper
Use managed pci functions and kill unnecessary volatiles.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:49 -04:00
Atsushi Nemoto
ee79b7fbf0 tc35815: Use netdev_priv()
Use netdev_priv() instead of dev->priv.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:49 -04:00
Atsushi Nemoto
958eb80bd2 tc35815: Use print_mac() helper
Use print_mac() and DECLARE_MAC_BUF().

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:49 -04:00
Atsushi Nemoto
c201abd9a4 tc35815: Statistics cleanup
Use struct net_device_stats embedded in struct net_device.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16 20:06:49 -04:00
Lennert Buytenhek
4547fa615f mv643xx_eth: update copyright
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-16 20:06:49 -04:00
Lennert Buytenhek
e519abb63d mv643xx_eth: only print banner once
When there are multiple mv643xx_eth silicon blocks in the system,
don't print an initialisation message for each and every one of
them.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-16 20:06:49 -04:00
Lennert Buytenhek
ec69d651ac mv643xx_eth: pass port identifier to register accessors
Pass a struct mv643xx_private * to the register accessor functions,
as a preparation for having multiple mv643xx_eth silicon blocks.

(Since this causes some 80 column straddling, and the mv_ prefix
is useless anyway, rename mv_read to rdl and mv_write to wrl to
compensate.)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-16 20:06:49 -04:00
Lennert Buytenhek
c1b35a28f2 mv643xx_eth: report netdev name in all printks
In error and warning printks, always report the netdevice name
instead of the port index (the latter has no meaning when there
are multiple mv643xx_eth silicon blocks in the system.)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-16 20:06:49 -04:00
Lennert Buytenhek
afdb57a249 mv643xx_eth: identify ports by struct mv643xx_private *
Instead of identifying individual mv643xx ethernet ports by only
their port number, identify them by their struct mv643xx_private *,
as just a port number has no meaning when there are multiple
mv643xx_eth silicon blocks in the system.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-16 20:06:48 -04:00
Lennert Buytenhek
c0d0f2caa1 mv643xx_eth: various cleanups
- Remove unused MV643XX_DEFAULT_[RT]X_QUEUE_SIZE definitions.
- Remove ETH_TARGET enum -- it isn't used anywhere in the driver,
  and isn't even valid for non-mv643xx chip models, as those use
  different MBUS target IDs.
- Clean up comment and control flow in mv643xx_eth_change_mtu().
- Use mp->dev instead of mp->mii.dev in mv643xx_eth_tx_timeout_task().
- Make mv643xx_eth_free_tx_descs() static.
- Remove overzealous NULL check in mv643xx_eth_start_xmit().
- Use symbolic NETDEV_TX_* constants in mv643xx_eth_start_xmit().

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-16 20:06:48 -04:00
Lennert Buytenhek
4d64e718b4 mv643xx_eth: mp->tx_desc_count needs spinlock protection
mv643xx_eth_start_xmit() should check mp->tx_desc_count only
inside the mp->lock spinlock.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
2008-04-16 20:06:48 -04:00
Nick Kossifidis
194828a292 ath5k: Misc fixes/cleanups
*Handle MIB interrupts and pass low level stats to mac80211
*Add Power On Self Test function
*Update to match recent dumps
*Let RF2425 attach so we can further test it
*Remove unused files regdom.c and regdom.h

base.c
Changes-licensed-under: 3-clause-BSD

rest
Changes-licensed-under: ISC

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16 16:00:03 -04:00
Nick Kossifidis
136bfc798f ath5k: Add RF2425 initvals
*Add RF2425 initvals (still no rx/tx)

This was on my laptop for a long time so it has to go out even if
it still doesn't work, i hope i'll get my hands on an eeepc so i can
work this out.

base.c
Changes-licensed-under: 3-clause-BSD

rest
Changes-licensed-under: ISC

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16 16:00:02 -04:00
Emmanuel Grumbach
fcc76c6b33 iwlwifi: Use HW acceleration decryption by default
This patch reverses the hw_crypto logic and makes HW crypto a default.
Giving swcrypto=1 as parameter to the module disables HW crypto.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16 16:00:02 -04:00
Mohamed Abbas
5900383502 iwlwifi: fix unload warning and error
This patch fix the error we get when unload the driver, No space for Tx.
The cause of this problem is related to receiving late SW rfkill from
rfkill subsystem during the driver teardown causing this error.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16 16:00:01 -04:00
Ron Rindjunsky
dfe7d45840 iwlwifi: arrange max number of Tx queues
This patch increases the max possible number of Tx queues, but leaves
current used number of queues as HW dependent

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16 16:00:01 -04:00
Emmanuel Grumbach
77bab6024c iwlwifi: Fix TKIP update key and get_free_ucode_key
This patch fixes a bug in update_tkip_key: only one key needs to be
allocated in uCode, every time it is updated, the old one will be
overwritten

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16 16:00:01 -04:00