Re: [BK PATCHES] lotsa net driver merges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Jeff Garzik wrote:

> Linus,
> 
> A bunch of net driver changes, few noteworthy.  The interesting changes:
> 
> 1) Add two helpers to PCI API, pci_set_mwi and pci_clear_mwi, for
> enabling and disabling Memory-Write-Invalidate transcations.  This is
> really just a cleanup, moving code that existed in drivers/net/* for a
> long time into drivers/pci where it belongs.
> 
> GNU PATCH ATTACHED for reference and review
> 
> 2) Add new gige driver tg3
> 
> 3) Add new 10/100 driver e100


In case you are using intel's 1.8.37 driver, I can cause a kernel panic
in it by trying to reset the transceiver through MII IOCTLs..  I've
been passing email with their support, so hopefully it will be resolved
soon.


> 
> 4) Move tulip clone drivers into drivers/net/tulip.  -No changes-, just
> moves the files.  Eventually they will be able to share code and such
> nifty things...
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> Linus,
> 
> Please do a
> 
> 	bk pull http://gkernel.bkbits.net/net-drivers-2.5
> 
> to receive a whole bunch of net driver changes.
> 
> 
> 
> 
> ChangeSet@1.493, 2002-03-07 05:35:22-05:00, jgarzik@mandrakesoft.com
>   Move dmfe, winbond-840, xircom_cb, xircom_tulip_cb, de2104x and de4x5
>   net drivers to drivers/net/tulip directory.
> 
>  drivers/net/de2104x.c                | 2240 -------------
>  drivers/net/de4x5.c                  | 5918 -----------------------------------
>  drivers/net/de4x5.h                  | 1031 ------
>  drivers/net/dmfe.c                   | 2070 ------------
>  drivers/net/pcmcia/xircom_cb.c       | 1245 -------
>  drivers/net/pcmcia/xircom_tulip_cb.c | 1744 ----------
>  drivers/net/winbond-840.c            | 1757 ----------
>  Makefile                             |    1 
>  drivers/net/Config.help              |   83 
>  drivers/net/Config.in                |   12 
>  drivers/net/Makefile                 |   13 
>  drivers/net/pcmcia/Config.in         |    5 
>  drivers/net/pcmcia/Makefile          |    5 
>  drivers/net/tulip/Config.help        |  110 
>  drivers/net/tulip/Config.in          |   27 
>  drivers/net/tulip/Makefile           |   39 
>  drivers/net/tulip/de2104x.c          | 2240 +++++++++++++
>  drivers/net/tulip/de4x5.c            | 5918 +++++++++++++++++++++++++++++++++++
>  drivers/net/tulip/de4x5.h            | 1031 ++++++
>  drivers/net/tulip/dmfe.c             | 2070 ++++++++++++
>  drivers/net/tulip/winbond-840.c      | 1757 ++++++++++
>  drivers/net/tulip/xircom_cb.c        | 1245 +++++++
>  drivers/net/tulip/xircom_tulip_cb.c  | 1744 ++++++++++
>  23 files changed, 16178 insertions(+), 16127 deletions(-)
> 
> 
> ChangeSet@1.492, 2002-03-07 04:41:44-05:00, jgarzik@mandrakesoft.com
>   Update starfire and tulip net drivers to use new PCI API functions
>   pci_set_mwi and pci_clear_mwi.
> 
>  drivers/net/starfire.c         |   15 ++++++---
>  drivers/net/tulip/ChangeLog    |    7 ++++
>  drivers/net/tulip/tulip_core.c |   65 ++++++++++++++++++-----------------------
>  3 files changed, 48 insertions(+), 39 deletions(-)
> 
> 
> ChangeSet@1.491, 2002-03-07 04:22:59-05:00, jgarzik@mandrakesoft.com
>   Revert to older xircom_cb net driver.  This older one is far
>   more reliable in testing, and works for all cases as near as
>   everyone can tell.
>   
>   Contributor: Arjan @ RedHat
> 
>  drivers/net/pcmcia/xircom_cb.c |  660 +++++++++++++++--------------------------
>  1 files changed, 247 insertions(+), 413 deletions(-)
> 
> 
> ChangeSet@1.490, 2002-03-07 03:48:44-05:00, jgarzik@mandrakesoft.com
>   Merge Intel EtherExpress PRO/100 net driver "e100" from Intel,
>   version 2.0.19, plus boolean cleanups.
>   Bump version to 2.0.20-pre1.
>   
>   Contributors: Eli Kupermann @ Intel, Amir Noam @ Intel
> 
>  drivers/net/Config.in          |    3 
>  drivers/net/Makefile           |    4 
>  drivers/net/e100/Makefile      |   16 
>  drivers/net/e100/e100.h        | 1033 +++++++++++
>  drivers/net/e100/e100_config.c |  596 ++++++
>  drivers/net/e100/e100_config.h |  206 ++
>  drivers/net/e100/e100_eeprom.c |  614 ++++++
>  drivers/net/e100/e100_main.c   | 3797 +++++++++++++++++++++++++++++++++++++++++
>  drivers/net/e100/e100_phy.c    | 1133 ++++++++++++
>  drivers/net/e100/e100_phy.h    |  183 +
>  drivers/net/e100/e100_proc.c   |  925 +++++++++
>  drivers/net/e100/e100_ucode.h  |  411 ++++
>  drivers/net/e100/e100_vendor.h |  348 +++
>  13 files changed, 9268 insertions(+), 1 deletion(-)
> 
> 
> ChangeSet@1.489, 2002-03-07 03:20:03-05:00, jgarzik@mandrakesoft.com
>   Merge new tg3 version 0.96 gigabit ethernet driver.
> 
>  Documentation/networking/driver.txt |   84 
>  drivers/net/Config.help             |    8 
>  drivers/net/Config.in               |    1 
>  drivers/net/Makefile                |    1 
>  drivers/net/tg3.c                   | 5925 ++++++++++++++++++++++++++++++++++++
>  drivers/net/tg3.h                   | 1851 +++++++++++
>  drivers/pci/pci.ids                 |   18 
>  include/linux/pci_ids.h             |    7 
>  8 files changed, 7895 insertions(+)
> 
> 
> ChangeSet@1.488, 2002-03-07 02:26:01-05:00, go@turbolinux.co.jp
>   Update pcnet32 net driver with the following changes:
>   v1.27   improved CSR/PROM address detection, lots of cleanups,
>          new pcnet32vlb module option, HP-PARISC support,
>          added module parameter descriptions, 
>          initial ethtool support - Helge Deller <deller@gmx.de>
>   v1.27a  Sun Feb 10 2002 Go Taniguchi <go@turbolinux.co.jp>
>          use alloc_etherdev and register_netdev
>          fix pci probe not increment cards_found
>          FD auto negotiate error workaround for xSeries250
>          clean up and using new mii module
> 
>  drivers/net/pcnet32.c |  412 ++++++++++++++++++++++++--------------------------
>  1 files changed, 203 insertions(+), 209 deletions(-)
> 
> 
> ChangeSet@1.487, 2002-03-07 02:18:29-05:00, davej@suse.de
>   Add dev->last_rx = jiffies at time of raw interface packet receive,
>   for the following net drivers:
>   
>   Several ham radio, several IrDA, lp4863, pcnet32, saa9730,
>   wireless orinoco.
> 
>  drivers/net/hamradio/6pack.c      |    1 +
>  drivers/net/hamradio/baycom_epp.c |    1 +
>  drivers/net/hamradio/bpqether.c   |    1 +
>  drivers/net/hamradio/hdlcdrv.c    |    1 +
>  drivers/net/hamradio/mkiss.c      |    1 +
>  drivers/net/hamradio/scc.c        |    1 +
>  drivers/net/hamradio/yam.c        |    1 +
>  drivers/net/irda/ali-ircc.c       |    1 +
>  drivers/net/irda/irda-usb.c       |    1 +
>  drivers/net/irda/nsc-ircc.c       |    1 +
>  drivers/net/irda/smc-ircc.c       |    1 +
>  drivers/net/irda/toshoboe.c       |    4 +++-
>  drivers/net/irda/vlsi_ir.c        |    1 +
>  drivers/net/irda/w83977af_ir.c    |    1 +
>  drivers/net/lp486e.c              |    1 +
>  drivers/net/pcnet32.c             |    1 +
>  drivers/net/saa9730.c             |    1 +
>  drivers/net/wireless/orinoco.c    |    1 +
>  18 files changed, 20 insertions(+), 1 deletion(-)
> 
> 
> ChangeSet@1.486, 2002-03-07 02:08:23-05:00, p_gortmaker@yahoo.com
>   MODULE_DESC net drivers cleanup.
>   
>   Idea is that if there is a valid name in MODULE_DESCRIPTION("...")
>   then the name of the hardware/driver should not be also repeated
>   in each MODULE_PARM_DESC("...").  MODULE_DESCRIPTION has been
>   added to essentially all the 8390 drivers.
>   
>   All of the drivers changed are 8390 based, with the exception of
>   eepro100 and 3c509.
> 
>  drivers/net/3c503.c       |    9 +++++----
>  drivers/net/3c509.c       |   11 ++++++-----
>  drivers/net/ac3200.c      |    9 +++++----
>  drivers/net/e2100.c       |   11 ++++++-----
>  drivers/net/eepro100.c    |   22 +++++++++++-----------
>  drivers/net/es3210.c      |    9 +++++----
>  drivers/net/hp-plus.c     |    7 ++++---
>  drivers/net/hp.c          |    7 ++++---
>  drivers/net/lne390.c      |    7 ++++---
>  drivers/net/ne.c          |    9 +++++----
>  drivers/net/ne2k-pci.c    |    6 +++---
>  drivers/net/ne3210.c      |    9 +++++----
>  drivers/net/smc-ultra.c   |    7 ++++---
>  drivers/net/smc-ultra32.c |    4 +++-
>  drivers/net/wd.c          |    9 +++++----
>  15 files changed, 75 insertions(+), 61 deletions(-)
> 
> 
> ChangeSet@1.485, 2002-03-07 02:02:52-05:00, brownfld@irridia.com
>   Update SysKonnect gigabit ethernet driver to support
>   the second port on dual-port SK-9844 NICs.
> 
>  drivers/net/sk98lin/skge.c |   42 ++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 42 insertions(+)
> 
> 
> ChangeSet@1.484, 2002-03-07 01:59:32-05:00, sebastian.droege@gmx.de
>   Fix dmfe net driver build with newer binutils.
> 
>  drivers/net/dmfe.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> 
> ChangeSet@1.483, 2002-03-07 01:55:49-05:00, key@austin.ibm.com
>   lanstreamer token ring driver update:
>   08/15/01 - Added ioctl() functionality for debugging, changed netif_*_queue
>              calls and other incorrectness - Kent Yoder <yoder1@us.ibm.com>
>   11/05/01 - Restructured the interrupt function, added delays, reduced the 
>              the number of TX descriptors to 1, which together can prevent 
>              the card from locking up the box - <yoder1@us.ibm.com>
> 
>  drivers/net/tokenring/lanstreamer.c |  230 ++++++++++++++++++++++++++++--------
>  drivers/net/tokenring/lanstreamer.h |   34 +++++
>  2 files changed, 212 insertions(+), 52 deletions(-)
> 
> 
> ChangeSet@1.482, 2002-03-07 01:52:56-05:00, davej@suse.de
>   Fix 3c505 net driver merge error:
>   Remove duplicated ethtool ioctl handling code, fixing build.
> 
>  drivers/net/3c505.c |   81 ----------------------------------------------------
>  1 files changed, 81 deletions(-)
> 
> 
> ChangeSet@1.481, 2002-03-06 21:47:46-05:00, jgarzik@mandrakesoft.com
>   s/foo/DE4X5_foo/ in de4x5 net driver, to fix conflict
>   with public namespace.
> 
>  drivers/net/de4x5.c |   32 ++++++++++++++++----------------
>  1 files changed, 16 insertions(+), 16 deletions(-)
> 
> 
> ChangeSet@1.480, 2002-03-06 21:38:57-05:00, jgarzik@mandrakesoft.com
>   Hand merge.
> 
>  include/linux/compiler.h |    3 +--
>  1 files changed, 1 insertion(+), 2 deletions(-)
> 
> 
> ChangeSet@1.472.1.5, 2002-03-06 21:23:59-05:00, jgarzik@mandrakesoft.com
>   Add new architecture PCI API function helper, pdev_set_mwi().
>   Add new PCI API functions pci_set_mwi(), pci_clear_mwi().
> 
>  Documentation/pci.txt |    7 +++
>  drivers/pci/pci.c     |   98 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/pci.h   |    4 ++
>  3 files changed, 109 insertions(+)
> 
> 
> ChangeSet@1.472.1.4, 2002-03-06 19:56:34-05:00, jgarzik@mandrakesoft.com
>   Typo fix for linux/compiler.h.
>   (a few csets later on this is auto-merged away)
> 
>  include/linux/compiler.h |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> 
> ChangeSet@1.472.1.3, 2002-03-06 17:15:35-05:00, ionut@cs.columbia.edu
>   starfire net driver updates:
>   * Sparc64 support and fixes.
>   * Better stats and error handling.
> 
>  drivers/net/Config.in  |    2 -
>  drivers/net/starfire.c |   59 ++++++++++++++++++++++++++++++++++---------------
>  2 files changed, 43 insertions(+), 18 deletions(-)
> 
> 
> ChangeSet@1.472.1.2, 2002-03-06 17:08:49-05:00, jgarzik@mandrakesoft.com
>   s/kfree/kfree_skb/ in drivers/s390/net/ctctty.c.
>   Contributor forgotten :(
> 
>  drivers/s390/net/ctctty.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> 
> ChangeSet@1.422.1.9, 2002-03-02 02:06:00-05:00, jgarzik@mandrakesoft.com
>   Update e1000 net driver to not EXPORT_SYMBOL
>   the standard net driver interface.
> 
>  drivers/net/e1000/e1000_main.c |   19 +------------------
>  1 files changed, 1 insertion(+), 18 deletions(-)
> 
> 
> ChangeSet@1.422.1.8, 2002-02-28 04:46:11-05:00, jgarzik@mandrakesoft.com
>   Update 8139cp net driver for the following:
>   * Merge VLAN defines and support from vger, ifdef'd out until
>     API appears in main tree.
>   * Support RX checksumming.
>   * Correct CP_MAX_MTU.
>   * Clarify CP_MIN_MTU issues.
> 
>  drivers/net/8139cp.c |  122 ++++++++++++++++++++++++++++++++++++++++++---------
>  1 files changed, 102 insertions(+), 20 deletions(-)
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> diff -Nru a/Documentation/pci.txt b/Documentation/pci.txt
> --- a/Documentation/pci.txt	Thu Mar  7 05:42:40 2002
> +++ b/Documentation/pci.txt	Thu Mar  7 05:42:40 2002
> @@ -156,6 +156,11 @@
>  which enables the bus master bit in PCI_COMMAND register and also fixes
>  the latency timer value if it's set to something bogus by the BIOS.
>  
> +   If you want to use the PCI Memory-Write-Invalidate transaction,
> +call pci_set_mwi().  This enables bit PCI_COMMAND bit for Mem-Wr-Inval
> +and also ensures that the cache line size register is set correctly.
> +Make sure to check the return value of pci_set_mwi(), not all architectures
> +may support Memory-Write-Invalidate.
>  
>  4. How to access PCI config space
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> @@ -202,6 +207,8 @@
>  pci_resource_len()		Returns the byte length of a PCI region
>  pci_set_drvdata()		Set private driver data pointer for a pci_dev
>  pci_get_drvdata()		Return private driver data pointer for a pci_dev
> +pci_set_mwi()			Enable Memory-Write-Invalidate transactions.
> +pci_clear_mwi()			Disable Memory-Write-Invalidate transactions.
>  
>  
>  7. Miscellaneous hints
> diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c
> --- a/drivers/pci/pci.c	Thu Mar  7 05:42:40 2002
> +++ b/drivers/pci/pci.c	Thu Mar  7 05:42:40 2002
> @@ -23,6 +23,7 @@
>  #include <linux/kmod.h>		/* for hotplug_path */
>  #include <linux/bitops.h>
>  #include <linux/delay.h>
> +#include <linux/cache.h>
>  
>  #include <asm/page.h>
>  #include <asm/dma.h>	/* isa_dma_bridge_buggy */
> @@ -848,6 +849,100 @@
>  	pcibios_set_master(dev);
>  }
>  
> +/**
> + * pdev_set_mwi - arch helper function for pcibios_set_mwi
> + * @dev: the PCI device for which MWI is enabled
> + *
> + * Helper function for implementation the arch-specific pcibios_set_mwi
> + * function.  Originally copied from drivers/net/acenic.c.
> + * Copyright 1998-2001 by Jes Sorensen, <jes@trained-monkey.org>.
> + *
> + * RETURNS: An appriopriate -ERRNO error value on eror, or zero for success.
> + */
> +int
> +pdev_set_mwi(struct pci_dev *dev)
> +{
> +	int rc = 0;
> +	u8 cache_size;
> +
> +	/*
> +	 * Looks like this is necessary to deal with on all architectures,
> +	 * even this %$#%$# N440BX Intel based thing doesn't get it right.
> +	 * Ie. having two NICs in the machine, one will have the cache
> +	 * line set at boot time, the other will not.
> +	 */
> +	pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &cache_size);
> +	cache_size <<= 2;
> +	if (cache_size != SMP_CACHE_BYTES) {
> +		printk(KERN_WARNING "PCI: %s PCI cache line size set incorrectly "
> +		       "(%i bytes) by BIOS/FW, ",
> +		       dev->slot_name, cache_size);
> +		if (cache_size > SMP_CACHE_BYTES) {
> +			printk("expecting %i\n", SMP_CACHE_BYTES);
> +			rc = -EINVAL;
> +		} else {
> +			printk("correcting to %i\n", SMP_CACHE_BYTES);
> +			pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
> +					      SMP_CACHE_BYTES >> 2);
> +		}
> +	}
> +
> +	return rc;
> +}
> +
> +/**
> + * pci_set_mwi - enables memory-write-validate PCI transaction
> + * @dev: the PCI device for which MWI is enabled
> + *
> + * Enables the Memory-Write-Invalidate transaction in %PCI_COMMAND,
> + * and then calls @pcibios_set_mwi to do the needed arch specific
> + * operations or a generic mwi-prep function.
> + *
> + * RETURNS: An appriopriate -ERRNO error value on eror, or zero for success.
> + */
> +int
> +pci_set_mwi(struct pci_dev *dev)
> +{
> +	int rc;
> +	u16 cmd;
> +
> +#ifdef HAVE_ARCH_PCI_MWI
> +	rc = pcibios_set_mwi(dev);
> +#else
> +	rc = pdev_set_mwi(dev);
> +#endif
> +
> +	if (rc)
> +		return rc;
> +
> +	pci_read_config_word(dev, PCI_COMMAND, &cmd);
> +	if (! (cmd & PCI_COMMAND_INVALIDATE)) {
> +		DBG("PCI: Enabling Mem-Wr-Inval for device %s\n", dev->slot_name);
> +		cmd |= PCI_COMMAND_INVALIDATE;
> +		pci_write_config_word(dev, PCI_COMMAND, cmd);
> +	}
> +	
> +	return 0;
> +}
> +
> +/**
> + * pci_clear_mwi - disables Memory-Write-Invalidate for device dev
> + * @dev: the PCI device to disable
> + *
> + * Disables PCI Memory-Write-Invalidate transaction on the device
> + */
> +void
> +pci_clear_mwi(struct pci_dev *dev)
> +{
> +	u16 cmd;
> +
> +	pci_read_config_word(dev, PCI_COMMAND, &cmd);
> +	if (cmd & PCI_COMMAND_INVALIDATE) {
> +		cmd &= ~PCI_COMMAND_INVALIDATE;
> +		pci_write_config_word(dev, PCI_COMMAND, cmd);
> +	}
> +}
> +
>  int
>  pci_set_dma_mask(struct pci_dev *dev, u64 mask)
>  {
> @@ -2002,6 +2097,9 @@
>  EXPORT_SYMBOL(pci_find_slot);
>  EXPORT_SYMBOL(pci_find_subsys);
>  EXPORT_SYMBOL(pci_set_master);
> +EXPORT_SYMBOL(pci_set_mwi);
> +EXPORT_SYMBOL(pci_clear_mwi);
> +EXPORT_SYMBOL(pdev_set_mwi);
>  EXPORT_SYMBOL(pci_set_dma_mask);
>  EXPORT_SYMBOL(pci_dac_set_dma_mask);
>  EXPORT_SYMBOL(pci_assign_resource);
> diff -Nru a/include/linux/pci.h b/include/linux/pci.h
> --- a/include/linux/pci.h	Thu Mar  7 05:42:40 2002
> +++ b/include/linux/pci.h	Thu Mar  7 05:42:40 2002
> @@ -564,6 +564,10 @@
>  int pci_enable_device(struct pci_dev *dev);
>  void pci_disable_device(struct pci_dev *dev);
>  void pci_set_master(struct pci_dev *dev);
> +#define HAVE_PCI_SET_MWI
> +int pci_set_mwi(struct pci_dev *dev);
> +void pci_clear_mwi(struct pci_dev *dev);
> +int pdev_set_mwi(struct pci_dev *dev);
>  int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
>  int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask);
>  int pci_assign_resource(struct pci_dev *dev, int i);
> 


-- 
Ben Greear <greearb@candelatech.com>          <Ben_Greear@excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux