net driver updates
Subsystems (3)
PATCH 1/1 net driver updates
Normally I wait a day or two between pushes, to queue up patches and also to avoid annoying my upstream :) But this includes a couple fixes I felt should be upstreamed sooner rather than later.
Please pull from 'upstream' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream
to receive the following updates:
Jeff Garzik (1):
drivers/net/qla3xxx: trim trailing whitespace
Olof Johansson (11):
pasemi_mac: basic error checking
pasemi_mac: fix bug in receive buffer dma mapping
pasemi_mac: rework ring management
pasemi_mac: implement sg support
pasemi_mac: workaround for erratum 5971
pasemi_mac: add local skb alignment
pasemi_mac: further performance tweaks
pasemi_mac: update todo list
pasemi_mac: clear out old errors on interface open
pasemi_mac: use buffer index pointer in clean_rx()
pasemi_mac: enable iommu support
trem (1):
ipg.c doesn't compile with with CONFIG_HIGHMEM64G
[email protected] (1):
Fix typo in new EMAC driver.
arch/powerpc/platforms/pasemi/Kconfig | 10 arch/powerpc/platforms/pasemi/iommu.c | 15 drivers/net/ibm_newemac/core.c | 4 drivers/net/ipg.c | 10 drivers/net/pasemi_mac.c | 595 ++++++++++++++++++++++------------ drivers/net/pasemi_mac.h | 67 ++- drivers/net/qla3xxx.c | 128 +++---- drivers/net/qla3xxx.h | 6 8 files changed, 527 insertions(+), 308 deletions(-)
arch/powerpc/platforms/pasemi/Kconfig +10 -0
@@ -18,6 +18,16 @@ config PPC_PASEMI_IOMMU help IOMMU support for PA6T-1682M +config PPC_PASEMI_IOMMU_DMA_FORCE + bool "Force DMA engine to use IOMMU" + depends on PPC_PASEMI_IOMMU + help + This option forces the use of the IOMMU also for the + DMA engine. Otherwise the kernel will use it only when + running under a hypervisor. + + If in doubt, say "N". + config PPC_PASEMI_MDIO depends on PHYLIB tristate "MDIO support via GPIO"
arch/powerpc/platforms/pasemi/iommu.c +10 -5
@@ -25,6 +25,7 @@#include <asm/iommu.h> #include <asm/machdep.h> #include <asm/abs_addr.h> +#include <asm/firmware.h> #define IOBMAP_PAGE_SHIFT 12
@@ -175,13 +176,17 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev) {pr_debug ("pci_dma_dev_setup, dev %p (%s)\n" , dev,pci_name (dev)); -/* DMA device is untranslated, but all other PCI-e goes through -* the IOMMU +#if !defined(CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE ) +/* For non-LPAR environment, don't translate anything for the DMA +* engine. The exception to this is if the user has enabled +* CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE at build time. */ -if (dev->vendor ==0x1959 && dev->device ==0xa007 ) +if (dev->vendor ==0x1959 && dev->device ==0xa007 && + !firmware_has_feature (FW_FEATURE_LPAR )) dev->dev.archdata.dma_ops = &dma_direct_ops; -else - dev->dev.archdata.dma_data = &iommu_table_iobmap; +#endif + + dev->dev.archdata.dma_data = &iommu_table_iobmap; }static void pci_dma_bus_setup_null (struct pci_bus *b) { }
drivers/net/ibm_newemac/core.c +2 -2
@@ -1232,9 +1232,9 @@ static inline int emac_xmit_finish(struct emac_instance *dev, int len)* instead */ if (emac_has_feature (dev,EMAC_FTR_EMAC4 )) -out_be32 (&p->tmr0,EMAC_TMR0_XMIT ); -else out_be32 (&p->tmr0,EMAC4_TMR0_XMIT ); +else +out_be32 (&p->tmr0,EMAC_TMR0_XMIT );if (unlikely (++dev->tx_cnt ==NUM_TX_BUFF )) {netif_stop_queue (ndev);
drivers/net/ipg.c +8 -2
@@ -25,6 +25,8 @@#include <linux/mii.h> #include <linux/mutex.h> +#include <asm/div64.h> +#define IPG_RX_RING_BYTES (sizeof(struct ipg_rx) * IPG_RFDLIST_LENGTH)#define IPG_TX_RING_BYTES (sizeof(struct ipg_tx) * IPG_TFDLIST_LENGTH)#define IPG_RESET_MASK \
@@ -836,10 +838,14 @@ static void ipg_nic_txfree(struct net_device *dev) {struct ipg_nic_private *sp =netdev_priv (dev);void __iomem *ioaddr = sp->ioaddr; -const unsigned int curr =ipg_r32 (TFD_LIST_PTR_0 ) - - (sp->txd_map /sizeof (struct ipg_tx )) -1 ; +unsigned int curr; +u64 txd_map;unsigned int released, pending; + txd_map = (u64 )sp->txd_map; + curr =ipg_r32 (TFD_LIST_PTR_0 ) - +do_div (txd_map,sizeof (struct ipg_tx )) -1 ; +IPG_DEBUG_MSG ("_nic_txfree\n" ); pending = sp->tx_current - sp->tx_dirty;
drivers/net/pasemi_mac.c +387 -208
946 lines not on this page · raw message
drivers/net/pasemi_mac.h +43 -24
149 lines not on this page · raw message
drivers/net/qla3xxx.c +64 -64
378 lines not on this page · raw message
drivers/net/qla3xxx.h +3 -3
@@ -556,7 +556,7 @@ enum {IP_ADDR_INDEX_REG_FUNC_3_SEC =0x0007 ,IP_ADDR_INDEX_REG_6 =0x0008 ,IP_ADDR_INDEX_REG_OFFSET_MASK =0x0030 , - IP_ADDR_INDEX_REG_E = 0x0040, + IP_ADDR_INDEX_REG_E = 0x0040, };enum { QL3032_PORT_CONTROL_DS = 0x0001,
@@ -1112,7 +1112,7 @@ struct ql_rcv_buf_cb {* OAL has 5 entries: * 1 thru 4 point to frags * fifth points to next oal. -*/ +*/ #define MAX_OAL_CNT ((MAX_SKB_FRAGS-1)/4 + 1)struct oal_entry {
@@ -1137,7 +1137,7 @@ struct ql_tx_buf_cb {struct ob_mac_iocb_req *queue_entry ;int seg_count;struct oal *oal; -struct map_list map[MAX_SKB_FRAGS +1 ]; +struct map_list map[MAX_SKB_FRAGS +1 ]; };/* definitions for type field */
David Miller
maintainerFrom: Jeff Garzik <[email protected]>
Date: Wed, 3 Oct 2007 14:39:16 -0400
Quoted 7 lines
Normally I wait a day or two between pushes, to queue up patches and also to avoid annoying my upstream :) But this includes a couple fixes I felt should be upstreamed sooner rather than later.
Please pull from 'upstream' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream
Pulled, thanks Jeff!