net driver updates #2
Subsystems (7)
PATCH 1/1 net driver updates #2
This submit is based on top of Linus's tree, since I'm not sure what's going on with net-2.6.git and my previous (lost?) submission.
These changes do /not/ include anything from the previous submission, which was on top of net-2.6 -- but then you rebased, which probably made everything more difficult. :)
Please pull from 'upstream2-davem' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream2-davem
to receive the following updates:
MAINTAINERS | 23 ---- drivers/net/Kconfig | 2 +- drivers/net/ax88796.c | 40 ++++--- drivers/net/e100.c | 18 ++-- drivers/net/e1000/e1000_main.c | 2 +- drivers/net/e1000e/defines.h | 1 + drivers/net/e1000e/ethtool.c | 17 ++- drivers/net/e1000e/netdev.c | 12 +- drivers/net/ehea/ehea.h | 3 + drivers/net/ehea/ehea_ethtool.c | 4 +- drivers/net/ehea/ehea_hw.h | 8 +- drivers/net/ehea/ehea_main.c | 124 +++++++------------ drivers/net/ehea/ehea_phyp.c | 158 ++++++++++++------------ drivers/net/ehea/ehea_phyp.h | 22 ++-- drivers/net/ehea/ehea_qmr.c | 32 +++--- drivers/net/ehea/ehea_qmr.h | 16 ++-- drivers/net/ibmlana.c | 4 +- drivers/net/igb/igb_main.c | 1 - drivers/net/macb.c | 9 +- drivers/net/mipsnet.c | 203 ++++++++++++++++++++---------- drivers/net/mipsnet.h | 112 ----------------- drivers/net/pasemi_mac.c | 259 ++++++++++++++++++++++++++++----------- drivers/net/pasemi_mac.h | 16 +++ drivers/net/phy/broadcom.c | 20 +++ drivers/net/s2io.c | 128 +++++++++++--------- drivers/net/s2io.h | 9 +- drivers/net/sunbmac.c | 2 +- drivers/net/sunqe.c | 6 +- drivers/net/sunvnet.c | 2 +- drivers/net/tokenring/olympic.c | 2 +- drivers/net/ucc_geth.c | 37 +++++- drivers/net/usb/rtl8150.c | 1 - drivers/net/via-rhine.c | 2 +- drivers/net/via-velocity.c | 70 +++++------ drivers/net/via-velocity.h | 224 ++++++++++++++------------------- 35 files changed, 827 insertions(+), 762 deletions(-) delete mode 100644 drivers/net/mipsnet.h
Adrian Bunk (11):
via-rhine.c:rhine_hw_init() must be __devinit ibmlana_adapter_names[] must be __devinitdata olympic_open() must be __devinit ibmlana_init_one() must be __devinit
IBMLANA no longer has to depend on MCA_LEGACY drivers/net/sunvnet.c:print_version() must be __devinit net/sunqe.c section fix
net/sunbmac.c section fix
e1000e: make a function static
e1000: make e1000_dump_eeprom() static
remove obsolete tokenring maintainer information
Al Viro (1):
big-endian support for via-velocity
Andreas Mohr (1):
e100: fix spelling errors
Andy Gospodarek (1):
e1000e: tweak irq allocation messages
Anton Vorontsov (2):
ucc_geth: fix module removal
ucc_geth: add support for netpoll
Auke Kok (1):
igb: remove unneeded declaration shadowing earlier one
Ben Dooks (1):
NET: AX88796 use dev_dbg() instead of printk()
Doug Maxey (5):
ehea: fix ehea.h checkpatch complaints
ehea: fix ethtool checkpatch complaints
ehea: fix main checkpatch complaints
ehea: fix phyp checkpatch complaints
ehea: fix qmr checkpatch complaints
Haavard Skinnemoen (1):
macb: Fix section mismatch and shrink runtime footprint
Jan-Bernd Themann (1):
ehea: fix sysfs link compile problem
Jiri Slaby (1):
Net: e100, fix iomap mem accesses
Lennert Buytenhek (1):
rtl8150: use default MTU of 1500
Mitch Williams (1):
e1000e: add new wakeup cababilities
Nate Case (1):
PHYLIB: Add BCM5482 PHY support
Olof Johansson (3):
pasemi_mac: Add support for changing mac address
pasemi_mac: add support for setting MTU
pasemi_mac: Disable interface on close
Ralf Baechle (1):
Fix/Rewrite of the mipsnet driver]
Sreenivasa Honnur (2):
S2io: Support for vlan_rx_kill_vid entry point
S2io: Fix for LRO Bugs
MAINTAINERS +0 -23
@@ -84,13 +84,6 @@ S: Status, one of the following: it has been replaced by a better system and you should be using that. -3C359 NETWORK DRIVER -P: Mike Phillips -M: [email protected] -L: [email protected] -W: http://www.linuxtr.net -S: Maintained - 3C505 NETWORK DRIVER P: Philip Blundell M: [email protected]
@@ -2864,15 +2857,6 @@ L: [email protected] W: http://oss.oracle.com/projects/ocfs2/ S: Supported -OLYMPIC NETWORK DRIVER -P: Peter De Shrijver -M: [email protected] -P: Mike Phillips -M: [email protected] -L: [email protected] -W: http://www.linuxtr.net -S: Maintained - OMNIKEY CARDMAN 4000 DRIVER P: Harald Welte M: [email protected]
@@ -3789,13 +3773,6 @@ L: [email protected] (subscribers-only) W: http://sourceforge.net/projects/tlan/ S: Maintained -TOKEN-RING NETWORK DRIVER -P: Mike Phillips -M: [email protected] -L: [email protected] -W: http://www.linuxtr.net -S: Maintained - TOSHIBA ACPI EXTRAS DRIVER P: John Belmonte M: [email protected]
drivers/net/Kconfig +1 -1
@@ -1199,7 +1199,7 @@ config NE2_MCA config IBMLANA tristate "IBM LAN Adapter/A support" - depends on MCA && MCA_LEGACY + depends on MCA ---help--- This is a Micro Channel Ethernet adapter. You need to set CONFIG_MCA to use this driver. It is both available as an in-kernel
drivers/net/ax88796.c +23 -17
@@ -137,11 +137,12 @@ static int ax_initial_check(struct net_device *dev)static void ax_reset_8390 (struct net_device *dev) {struct ei_device *ei_local =netdev_priv (dev); +struct ax_device *ax =to_ax_dev (dev);unsigned long reset_start_time = jiffies;void __iomem *addr = (void __iomem *)dev->base_addr;if (ei_debug >1 ) -printk (KERN_DEBUG "resetting the 8390 t=%ld..." , jiffies); +dev_dbg (&ax->dev->dev,"resetting the 8390 t=%ld\n" , jiffies);ei_outb (ei_inb (addr +NE_RESET ), addr +NE_RESET );
@@ -151,7 +152,7 @@ static void ax_reset_8390(struct net_device *dev)/* This check _should_not_ be necessary, omit eventually. */ while ((ei_inb (addr +EN0_ISR ) &ENISR_RESET ) ==0 ) {if (jiffies - reset_start_time >2 *HZ /100 ) { -printk (KERN_WARNING "%s: %s did not complete.\n" , +dev_warn (&ax->dev->dev,"%s: %s did not complete.\n" , __FUNCTION__, dev->name);break ; }
@@ -165,13 +166,15 @@ static void ax_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page) {struct ei_device *ei_local =netdev_priv (dev); +struct ax_device *ax =to_ax_dev (dev);void __iomem *nic_base = ei_local->mem;/* This *shouldn't* happen. If it does, it's the last thing you'll see */ if (ei_status.dmaing) { -printk (KERN_EMERG "%s: DMAing conflict in %s [DMAstat:%d][irqlock:%d].\n" , +dev_err (&ax->dev->dev,"%s: DMAing conflict in %s " +"[DMAstat:%d][irqlock:%d].\n" , dev->name, __FUNCTION__, - ei_status.dmaing, ei_status.irqlock); + ei_status.dmaing, ei_status.irqlock);return ; }
@@ -204,13 +207,16 @@ static void ax_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) {struct ei_device *ei_local =netdev_priv (dev); +struct ax_device *ax =to_ax_dev (dev);void __iomem *nic_base = ei_local->mem;char *buf = skb->data;if (ei_status.dmaing) { -printk (KERN_EMERG "%s: DMAing conflict in ax_block_input " +dev_err (&ax->dev->dev, +"%s: DMAing conflict in %s " "[DMAstat:%d][irqlock:%d].\n" , - dev->name, ei_status.dmaing, ei_status.irqlock); + dev->name, __FUNCTION__, + ei_status.dmaing, ei_status.irqlock);return ; }
@@ -239,6 +245,7 @@ static void ax_block_output(struct net_device *dev, int count, const unsigned char *buf, const int start_page) { struct ei_device *ei_local = netdev_priv(dev); +struct ax_device *ax =to_ax_dev (dev);void __iomem *nic_base = ei_local->mem;unsigned long dma_start;
@@ -251,7 +258,7 @@ static void ax_block_output(struct net_device *dev, int count,/* This *shouldn't* happen. If it does, it's the last thing you'll see */ if (ei_status.dmaing) { -printk (KERN_EMERG "%s: DMAing conflict in %s." +dev_err (&ax->dev->dev,"%s: DMAing conflict in %s." "[DMAstat:%d][irqlock:%d]\n" , dev->name, __FUNCTION__, ei_status.dmaing, ei_status.irqlock);
@@ -281,7 +288,8 @@ static void ax_block_output(struct net_device *dev, int count,while ((ei_inb (nic_base +EN0_ISR ) &ENISR_RDC ) ==0 ) {if (jiffies - dma_start >2 *HZ /100 ) {/* 20ms */ -printk (KERN_WARNING "%s: timeout waiting for Tx RDC.\n" , dev->name); +dev_warn (&ax->dev->dev, +"%s: timeout waiting for Tx RDC.\n" , dev->name);ax_reset_8390 (dev);ax_NS8390_init (dev,1 );break ;
@@ -424,10 +432,11 @@ static void ax_phy_write(struct net_device *dev, int phy_addr, int reg, int value) { struct ei_device *ei = (struct ei_device *) netdev_priv(dev); +struct ax_device *ax =to_ax_dev (dev);unsigned long flags; -printk (KERN_DEBUG "%s: %p, %04x, %04x %04x\n" , - __FUNCTION__, dev, phy_addr, reg, value); +dev_dbg (&ax->dev->dev,"%s: %p, %04x, %04x %04x\n" , + __FUNCTION__, dev, phy_addr, reg, value);spin_lock_irqsave (&ei->page_lock, flags);
@@ -750,14 +759,11 @@ static int ax_init_dev(struct net_device *dev, int first_init)ax_NS8390_init (dev,0 );if (first_init) { -printk ("AX88796: %dbit, irq %d, %lx, MAC: " , - ei_status.word16 ?16 :8 , dev->irq, dev->base_addr); - -for (i =0 ; i <ETHER_ADDR_LEN ; i++) -printk ("%2.2x%c" , dev->dev_addr[i], - (i < (ETHER_ADDR_LEN -1 ) ?':' :' ' )); +DECLARE_MAC_BUF (mac); -printk ("\n" ); +dev_info (&ax->dev->dev,"%dbit, irq %d, %lx, MAC: %s\n" , + ei_status.word16 ?16 :8 , dev->irq, dev->base_addr, +print_mac (mac, dev->dev_addr)); } ret =register_netdev (dev);
drivers/net/e100.c +9 -9
@@ -94,7 +94,7 @@* enabled. 82557 pads with 7Eh, while the later controllers pad * with 00h. * -* IV. Recieve +* IV. Receive * * The Receive Frame Area (RFA) comprises a ring of Receive Frame * Descriptors (RFD) + data buffer, thus forming the simplified mode
@@ -120,7 +120,7 @@* and Rx indication and re-allocation happen in the same context, * therefore no locking is required. A software-generated interrupt * is generated from the watchdog to recover from a failed allocation -* senario where all Rx resources have been indicated and none re- +* scenario where all Rx resources have been indicated and none re- * placed. * * V. Miscellaneous
@@ -954,7 +954,7 @@ static void e100_get_defaults(struct nic *nic)/* Quadwords to DMA into FIFO before starting frame transmit */ nic->tx_threshold =0xE0 ; -/* no interrupt for every tx completion, delay = 256us if not 557*/ +/* no interrupt for every tx completion, delay = 256us if not 557 */ nic->tx_command =cpu_to_le16 (cb_tx | cb_tx_sf | ((nic->mac >= mac_82558_D101_A4) ? cb_cid : cb_i));
@@ -1497,7 +1497,7 @@ static void e100_update_stats(struct nic *nic) &s->complete;/* Device's stats reporting may take several microseconds to -* complete, so where always waiting for results of the +* complete, so we're always waiting for results of the * previous command. */ if (*complete ==cpu_to_le32 (cuc_dump_reset_complete)) {
@@ -1958,7 +1958,7 @@ static void e100_rx_clean(struct nic *nic, unsigned int *work_done,if (restart_required) {// ack the rnr? -writeb (stat_ack_rnr, &nic->csr->scb.stat_ack); +iowrite8 (stat_ack_rnr, &nic->csr->scb.stat_ack);e100_start_receiver (nic, nic->rx_to_clean);if (work_done) (*work_done)++;
@@ -2774,7 +2774,7 @@ static void __devexit e100_remove(struct pci_dev *pdev)struct nic *nic =netdev_priv (netdev);unregister_netdev (netdev);e100_free (nic); -iounmap (nic->csr); +pci_iounmap (pdev, nic->csr);free_netdev (netdev);pci_release_regions (pdev);pci_disable_device (pdev);
@@ -2858,17 +2858,17 @@ static void e100_shutdown(struct pci_dev *pdev)/** * e100_io_error_detected - called when PCI error is detected. * @pdev: Pointer to PCI device -* @state: The current pci conneection state +* @state: The current pci connection state */ static pci_ers_result_t e100_io_error_detected (struct pci_dev *pdev,pci_channel_state_t state) {struct net_device *netdev =pci_get_drvdata (pdev);struct nic *nic =netdev_priv (netdev); -/* Similar to calling e100_down(), but avoids adpater I/O. */ +/* Similar to calling e100_down(), but avoids adapter I/O. */ netdev->stop (netdev); -/* Detach; put netif into state similar to hotplug unplug. */ +/* Detach; put netif into a state similar to hotplug unplug. */ napi_enable (&nic->napi);netif_device_detach (netdev);pci_disable_device (pdev);
drivers/net/e1000/e1000_main.c +1 -1
@@ -853,7 +853,7 @@ e1000_reset(struct e1000_adapter *adapter)/** * Dump the eeprom for users having checksum issues **/ -void e1000_dump_eeprom (struct e1000_adapter *adapter) +static void e1000_dump_eeprom (struct e1000_adapter *adapter) {struct net_device *netdev = adapter->netdev;struct ethtool_eeprom eeprom;
drivers/net/e1000e/defines.h +1 -0
@@ -63,6 +63,7 @@#define E1000_WUFC_EX 0x00000004/* Directed Exact Wakeup Enable */ #define E1000_WUFC_MC 0x00000008/* Directed Multicast Wakeup Enable */ #define E1000_WUFC_BC 0x00000010/* Broadcast Wakeup Enable */ +#define E1000_WUFC_ARP 0x00000020/* ARP Request Packet Wakeup Enable */ /* Extended Device Control */ #define E1000_CTRL_EXT_SDP7_DATA 0x00000080/* Value of SW Defineable Pin 7 */
drivers/net/e1000e/ethtool.c +13 -4
@@ -690,8 +690,8 @@ err_setup:return err; } -bool reg_pattern_test_array (struct e1000_adapter *adapter,u64 *data, -int reg,int offset,u32 mask,u32 write) +static bool reg_pattern_test_array (struct e1000_adapter *adapter,u64 *data, +int reg,int offset,u32 mask,u32 write) {int i;u32 read;
@@ -1632,7 +1632,8 @@ static void e1000_get_wol(struct net_device *netdev,return ; wol->supported =WAKE_UCAST |WAKE_MCAST | -WAKE_BCAST |WAKE_MAGIC ; +WAKE_BCAST |WAKE_MAGIC | +WAKE_PHY |WAKE_ARP ;/* apply any specific unsupported masks here */ if (adapter->flags &FLAG_NO_WAKE_UCAST ) {
@@ -1651,6 +1652,10 @@ static void e1000_get_wol(struct net_device *netdev, wol->wolopts |=WAKE_BCAST ;if (adapter->wol &E1000_WUFC_MAG ) wol->wolopts |=WAKE_MAGIC ; +if (adapter->wol &E1000_WUFC_LNKC ) + wol->wolopts |=WAKE_PHY ; +if (adapter->wol &E1000_WUFC_ARP ) + wol->wolopts |=WAKE_ARP ; } static int e1000_set_wol(struct net_device *netdev,
@@ -1658,7 +1663,7 @@ static int e1000_set_wol(struct net_device *netdev, {struct e1000_adapter *adapter =netdev_priv (netdev); -if (wol->wolopts & (WAKE_PHY |WAKE_ARP |WAKE_MAGICSECURE )) +if (wol->wolopts &WAKE_MAGICSECURE )return -EOPNOTSUPP ;if (!(adapter->flags &FLAG_HAS_WOL ))
@@ -1675,6 +1680,10 @@ static int e1000_set_wol(struct net_device *netdev, adapter->wol |=E1000_WUFC_BC ;if (wol->wolopts &WAKE_MAGIC ) adapter->wol |=E1000_WUFC_MAG ; +if (wol->wolopts &WAKE_PHY ) + adapter->wol |=E1000_WUFC_LNKC ; +if (wol->wolopts &WAKE_ARP ) + adapter->wol |=E1000_WUFC_ARP ;return 0 ; }
drivers/net/e1000e/netdev.c +5 -7
@@ -945,11 +945,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)int irq_flags =IRQF_SHARED ;int err; - err =pci_enable_msi (adapter->pdev); -if (err) { -ndev_warn (netdev, -"Unable to allocate MSI interrupt Error: %d\n" , err); - }else { +if (!pci_enable_msi (adapter->pdev)) { adapter->flags |=FLAG_MSI_ENABLED ; handler = e1000_intr_msi; irq_flags =0 ;
@@ -958,10 +954,12 @@ static int e1000_request_irq(struct e1000_adapter *adapter) err =request_irq (adapter->pdev->irq, handler, irq_flags, netdev->name, netdev);if (err) { +ndev_err (netdev, +"Unable to allocate %s interrupt (return: %d)\n" , + adapter->flags &FLAG_MSI_ENABLED ?"MSI" :"INTx" , + err);if (adapter->flags &FLAG_MSI_ENABLED )pci_disable_msi (adapter->pdev); -ndev_err (netdev, -"Unable to allocate interrupt Error: %d\n" , err); }return err;
drivers/net/ehea/ehea.h +3 -0
@@ -458,4 +458,7 @@ void ehea_set_ethtool_ops(struct net_device *netdev);int ehea_sense_port_attr (struct ehea_port *port);int ehea_set_portspeed (struct ehea_port *port,u32 port_speed); +extern u64 ehea_driver_flags; +extern struct work_struct ehea_rereg_mr_task; +#endif /* __EHEA_H__ */
drivers/net/ehea/ehea_ethtool.c +2 -2
@@ -40,7 +40,7 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)return ret;if (netif_carrier_ok (dev)) { -switch (port->port_speed) { +switch (port->port_speed) {case EHEA_SPEED_10M : cmd->speed =SPEED_10 ;break ;case EHEA_SPEED_100M : cmd->speed =SPEED_100 ;break ;case EHEA_SPEED_1G : cmd->speed =SPEED_1000 ;break ;
@@ -78,7 +78,7 @@ static int ehea_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) goto doit; } -switch (cmd->speed) { +switch (cmd->speed) {case SPEED_10 :if (cmd->duplex ==DUPLEX_FULL ) sp =H_SPEED_10M_F ;
drivers/net/ehea/ehea_hw.h +4 -4
@@ -29,10 +29,10 @@#ifndef __EHEA_HW_H__#define __EHEA_HW_H__ -#define QPX_SQA_VALUE EHEA_BMASK_IBM(48,63) -#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48,63) -#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48,63) -#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48,63) +#define QPX_SQA_VALUE EHEA_BMASK_IBM(48, 63) +#define QPX_RQ1A_VALUE EHEA_BMASK_IBM(48, 63) +#define QPX_RQ2A_VALUE EHEA_BMASK_IBM(48, 63) +#define QPX_RQ3A_VALUE EHEA_BMASK_IBM(48, 63)#define QPTEMM_OFFSET (x) offsetof(struct ehea_qptemm, x)
drivers/net/ehea/ehea_main.c +46 -78
325 lines not on this page · raw message
drivers/net/ehea/ehea_phyp.c +79 -79
257 lines not on this page · raw message
drivers/net/ehea/ehea_phyp.h +11 -11
@@ -93,7 +93,7 @@ static inline void hcp_epas_ctor(struct h_epas *epas, u64 paddr_kernel,static inline void hcp_epas_dtor (struct h_epas *epas) {if (epas->kernel.addr) -iounmap ((void __iomem *)((u64 )epas->kernel.addr &PAGE_MASK )); +iounmap ((void __iomem *)((u64 )epas->kernel.addr &PAGE_MASK )); epas->user.addr =0 ; epas->kernel.addr =0 ;
@@ -388,23 +388,23 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle,const u64 qp_handle, const u64 sel_mask, void *cb_addr, - u64 * inv_attr_id, - u64 * proc_mask, u16 * out_swr, u16 * out_rwr); + u64 *inv_attr_id, + u64 *proc_mask, u16 *out_swr, u16 *out_rwr);u64 ehea_h_alloc_resource_eq (const u64 adapter_handle, -struct ehea_eq_attr *eq_attr,u64 * eq_handle); +struct ehea_eq_attr *eq_attr,u64 *eq_handle);u64 ehea_h_alloc_resource_cq (const u64 adapter_handle,struct ehea_cq_attr *cq_attr, -u64 * cq_handle,struct h_epas *epas); +u64 *cq_handle,struct h_epas *epas);u64 ehea_h_alloc_resource_qp (const u64 adapter_handle,struct ehea_qp_init_attr *init_attr,const u32 pd, -u64 * qp_handle,struct h_epas *h_epas); +u64 *qp_handle,struct h_epas *h_epas); -#define H_REG_RPAGE_PAGE_SIZE EHEA_BMASK_IBM(48,55) -#define H_REG_RPAGE_QT EHEA_BMASK_IBM(62,63) +#define H_REG_RPAGE_PAGE_SIZE EHEA_BMASK_IBM(48, 55) +#define H_REG_RPAGE_QT EHEA_BMASK_IBM(62, 63) u64 ehea_h_register_rpage(const u64 adapter_handle, const u8 pagesize,
@@ -426,7 +426,7 @@ u64 ehea_h_free_resource(const u64 adapter_handle, const u64 res_handle,u64 ehea_h_alloc_resource_mr (const u64 adapter_handle,const u64 vaddr,const u64 length,const u32 access_ctrl, -const u32 pd,u64 * mr_handle,u32 * lkey); +const u32 pd,u64 *mr_handle,u32 *lkey); u64 ehea_h_register_rpage_mr(const u64 adapter_handle, const u64 mr_handle, const u8 pagesize, const u8 queue_type,
@@ -439,8 +439,8 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,u64 ehea_h_query_ehea (const u64 adapter_handle,void *cb_addr);/* output param R5 */ -#define H_MEHEAPORT_CAT EHEA_BMASK_IBM(40,47) -#define H_MEHEAPORT_PN EHEA_BMASK_IBM(48,63) +#define H_MEHEAPORT_CAT EHEA_BMASK_IBM(40, 47) +#define H_MEHEAPORT_PN EHEA_BMASK_IBM(48, 63) u64 ehea_h_query_ehea_port(const u64 adapter_handle, const u16 port_num, const u8 cb_cat, const u64 select_mask,
drivers/net/ehea/ehea_qmr.c +16 -16
@@ -33,8 +33,6 @@struct ehea_busmap ehea_bmap = {0 ,0 ,NULL }; -extern u64 ehea_driver_flags; -extern struct work_struct ehea_rereg_mr_task;static void *hw_qpageit_get_inc (struct hw_queue *queue)
@@ -65,7 +63,7 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages, } queue->queue_length = nr_of_pages * pagesize; - queue->queue_pages =kmalloc (nr_of_pages *sizeof (void *),GFP_KERNEL ); + queue->queue_pages =kmalloc (nr_of_pages *sizeof (void *),GFP_KERNEL );if (!queue->queue_pages) {ehea_error ("no mem for queue_pages" );return -ENOMEM ;
@@ -78,11 +76,11 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages,*/ i =0 ;while (i < nr_of_pages) { -u8 *kpage = (u8 *)get_zeroed_page (GFP_KERNEL ); +u8 *kpage = (u8 *)get_zeroed_page (GFP_KERNEL );if (!kpage) goto out_nomem;for (k =0 ; k < pages_per_kpage && i < nr_of_pages; k++) { - (queue->queue_pages)[i] = (struct ehea_page *)kpage; + (queue->queue_pages)[i] = (struct ehea_page *)kpage; kpage += pagesize; i++; }
@@ -235,8 +233,8 @@ int ehea_destroy_cq(struct ehea_cq *cq)return 0 ;hcp_epas_dtor (&cq->epas); - -if ((hret =ehea_destroy_cq_res (cq,NORMAL_FREE )) ==H_R_STATE ) { + hret =ehea_destroy_cq_res (cq,NORMAL_FREE ); +if (hret ==H_R_STATE ) {ehea_error_data (cq->adapter, cq->fw_handle); hret =ehea_destroy_cq_res (cq,FORCE_FREE ); }
@@ -301,13 +299,13 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter,if (i == (eq->attr.nr_pages -1 )) {/* last page */ vpage =hw_qpageit_get_inc (&eq->hw_queue); -if ((hret !=H_SUCCESS ) || (vpage)) { +if ((hret !=H_SUCCESS ) || (vpage)) goto out_kill_hwq; - } + }else { -if ((hret !=H_PAGE_REGISTERED ) || (!vpage)) { +if ((hret !=H_PAGE_REGISTERED ) || (!vpage)) goto out_kill_hwq; - } + } }
@@ -331,7 +329,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq)unsigned long flags;spin_lock_irqsave (&eq->spinlock, flags); - eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid (&eq->hw_queue); + eqe = (struct ehea_eqe *)hw_eqit_eq_get_inc_valid (&eq->hw_queue);spin_unlock_irqrestore (&eq->spinlock, flags);return eqe;
@@ -364,7 +362,8 @@ int ehea_destroy_eq(struct ehea_eq *eq)hcp_epas_dtor (&eq->epas); -if ((hret =ehea_destroy_eq_res (eq,NORMAL_FREE )) ==H_R_STATE ) { + hret =ehea_destroy_eq_res (eq,NORMAL_FREE ); +if (hret ==H_R_STATE ) {ehea_error_data (eq->adapter, eq->fw_handle); hret =ehea_destroy_eq_res (eq,FORCE_FREE ); }
@@ -546,7 +545,8 @@ int ehea_destroy_qp(struct ehea_qp *qp)hcp_epas_dtor (&qp->epas); -if ((hret =ehea_destroy_qp_res (qp,NORMAL_FREE )) ==H_R_STATE ) { + hret =ehea_destroy_qp_res (qp,NORMAL_FREE ); +if (hret ==H_R_STATE ) {ehea_error_data (qp->adapter, qp->fw_handle); hret =ehea_destroy_qp_res (qp,FORCE_FREE ); }
@@ -559,7 +559,7 @@ int ehea_destroy_qp(struct ehea_qp *qp)return 0 ; } -int ehea_create_busmap (void ) +int ehea_create_busmap (void ) {u64 vaddr =EHEA_BUSMAP_START ;unsigned long high_section_index =0 ;
@@ -595,7 +595,7 @@ int ehea_create_busmap( void )return 0 ; } -void ehea_destroy_busmap (void ) +void ehea_destroy_busmap (void ) {vfree (ehea_bmap.vaddr); }
drivers/net/ehea/ehea_qmr.h +8 -8
@@ -41,8 +41,8 @@#define EHEA_SECTSIZE (1UL << 24)#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT) -#if (1UL <<SECTION_SIZE_BITS ) <EHEA_SECTSIZE -#error eHEA module can't work if kernel sectionsize < ehea sectionsize +#if ((1UL <<SECTION_SIZE_BITS ) <EHEA_SECTSIZE ) +#error eHEA module cannot work if kernel sectionsize < ehea sectionsize#endif /* Some abbreviations used here:
@@ -188,8 +188,8 @@ struct ehea_eqe {u64 entry; }; -#define ERROR_DATA_LENGTH EHEA_BMASK_IBM(52,63) -#define ERROR_DATA_TYPE EHEA_BMASK_IBM(0,7) +#define ERROR_DATA_LENGTH EHEA_BMASK_IBM(52, 63) +#define ERROR_DATA_TYPE EHEA_BMASK_IBM(0, 7)static inline void *hw_qeit_calc (struct hw_queue *queue,u64 q_offset) {
@@ -279,7 +279,7 @@ static inline void *hw_qeit_eq_get_inc(struct hw_queue *queue)static inline void *hw_eqit_eq_get_inc_valid (struct hw_queue *queue) {void *retvalue =hw_qeit_get (queue); -u32 qe = *(u8 *)retvalue; +u32 qe = *(u8 *)retvalue;if ((qe >>7 ) == (queue->toggle_state &1 ))hw_qeit_eq_get_inc (queue);else
@@ -364,7 +364,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter, int cqe,int ehea_destroy_cq (struct ehea_cq *cq); -struct ehea_qp *ehea_create_qp (struct ehea_adapter * adapter,u32 pd, +struct ehea_qp *ehea_create_qp (struct ehea_adapter *adapter,u32 pd,struct ehea_qp_init_attr *init_attr);int ehea_destroy_qp (struct ehea_qp *qp);
@@ -378,8 +378,8 @@ int ehea_rem_mr(struct ehea_mr *mr);void ehea_error_data (struct ehea_adapter *adapter,u64 res_handle); -int ehea_create_busmap (void ); -void ehea_destroy_busmap (void ); +int ehea_create_busmap (void ); +void ehea_destroy_busmap (void );u64 ehea_map_vaddr (void *caddr);#endif /* __EHEA_QMR_H__ */
drivers/net/ibmlana.c +2 -2
@@ -901,12 +901,12 @@ static short ibmlana_adapter_ids[] __initdata = { 0x0000 }; -static char *ibmlana_adapter_names[]__initdata = { +static char *ibmlana_adapter_names[]__devinitdata = {"IBM LAN Adapter/A" ,NULL }; -static int ibmlana_init_one (struct device *kdev) +static int __devinit ibmlana_init_one (struct device *kdev) {struct mca_device *mdev =to_mca_device (kdev);struct net_device *dev;
drivers/net/igb/igb_main.c +0 -1
@@ -438,7 +438,6 @@ static int igb_request_irq(struct igb_adapter *adapter)if (adapter->msix_entries) { err =igb_request_msix (adapter);if (!err) { -struct e1000_hw *hw = &adapter->hw;/* enable IAM, auto-mask, * DO NOT USE EIAME or IAME in legacy mode */ wr32 (E1000_IAM ,IMS_ENABLE_MASK );
drivers/net/macb.c +4 -5
@@ -1084,7 +1084,7 @@ static int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)return phy_mii_ioctl (phydev,if_mii (rq), cmd); } -static int __devinit macb_probe (struct platform_device *pdev) +static int __init macb_probe (struct platform_device *pdev) {struct eth_platform_data *pdata;struct resource *regs;
@@ -1248,7 +1248,7 @@ err_out:return err; } -static int __devexit macb_remove(struct platform_device *pdev) +static int __exit macb_remove(struct platform_device *pdev) {struct net_device *dev;struct macb *bp;
@@ -1276,8 +1276,7 @@ static int __devexit macb_remove(struct platform_device *pdev) }static struct platform_driver macb_driver = { - .probe = macb_probe, - .remove =__devexit_p (macb_remove), + .remove =__exit_p (macb_remove), .driver = { .name ="macb" , },
@@ -1285,7 +1284,7 @@ static struct platform_driver macb_driver = {static int __init macb_init (void ) { -return platform_driver_register (&macb_driver); +return platform_driver_probe (&macb_driver, macb_probe); } static void __exit macb_exit(void)
drivers/net/mipsnet.c +135 -68
303 lines not on this page · raw message
drivers/net/mipsnet.h deleted +0 -112
112 lines not on this page · raw message
drivers/net/pasemi_mac.c +187 -72
353 lines not on this page · raw message
drivers/net/pasemi_mac.h +16 -0
@@ -59,6 +59,7 @@ struct pasemi_mac {struct phy_device *phydev;struct napi_struct napi; +int bufsz;/* RX ring buffer size */ u8 type;#define MAC_TYPE_GMAC 1#define MAC_TYPE_XAUI 2
@@ -96,6 +97,9 @@ struct pasemi_mac_buffer {/* MAC CFG register offsets */ enum {PAS_MAC_CFG_PCFG =0x80 , +PAS_MAC_CFG_MACCFG =0x84 , +PAS_MAC_CFG_ADR0 =0x8c , +PAS_MAC_CFG_ADR1 =0x90 ,PAS_MAC_CFG_TXP =0x98 ,PAS_MAC_IPC_CHNL =0x208 , };
@@ -130,6 +134,18 @@ enum {#define PAS_MAC_CFG_PCFG_SPD_100M 0x00000001#define PAS_MAC_CFG_PCFG_SPD_1G 0x00000002#define PAS_MAC_CFG_PCFG_SPD_10G 0x00000003 + +#define PAS_MAC_CFG_MACCFG_TXT_M 0x70000000 +#define PAS_MAC_CFG_MACCFG_TXT_S 28 +#define PAS_MAC_CFG_MACCFG_PRES_M 0x0f000000 +#define PAS_MAC_CFG_MACCFG_PRES_S 24 +#define PAS_MAC_CFG_MACCFG_MAXF_M 0x00ffff00 +#define PAS_MAC_CFG_MACCFG_MAXF_S 8 +#define PAS_MAC_CFG_MACCFG_MAXF (x) (((x) << PAS_MAC_CFG_MACCFG_MAXF_S) & \ + PAS_MAC_CFG_MACCFG_MAXF_M) +#define PAS_MAC_CFG_MACCFG_MINF_M 0x000000ff +#define PAS_MAC_CFG_MACCFG_MINF_S 0 +#define PAS_MAC_CFG_TXP_FCF 0x01000000#define PAS_MAC_CFG_TXP_FCE 0x00800000#define PAS_MAC_CFG_TXP_FC 0x00400000
drivers/net/phy/broadcom.c +20 -0
@@ -141,6 +141,20 @@ static struct phy_driver bcm5461_driver = { .driver = { .owner = THIS_MODULE }, }; +static struct phy_driver bcm5482_driver = { + .phy_id =0x0143bcb0 , + .phy_id_mask =0xfffffff0 , + .name ="Broadcom BCM5482" , + .features =PHY_GBIT_FEATURES , + .flags =PHY_HAS_MAGICANEG |PHY_HAS_INTERRUPT , + .config_init = bcm54xx_config_init, + .config_aneg = genphy_config_aneg, + .read_status = genphy_read_status, + .ack_interrupt = bcm54xx_ack_interrupt, + .config_intr = bcm54xx_config_intr, + .driver = { .owner =THIS_MODULE }, +}; +static int __init broadcom_init (void ) {int ret;
@@ -154,8 +168,13 @@ static int __init broadcom_init(void) ret =phy_driver_register (&bcm5461_driver);if (ret) goto out_5461; + ret =phy_driver_register (&bcm5482_driver); +if (ret) + goto out_5482;return ret; +out_5482: +phy_driver_unregister (&bcm5461_driver); out_5461:phy_driver_unregister (&bcm5421_driver); out_5421:
@@ -166,6 +185,7 @@ out_5411: static void __exit broadcom_exit(void) { +phy_driver_unregister (&bcm5482_driver);phy_driver_unregister (&bcm5461_driver);phy_driver_unregister (&bcm5421_driver);phy_driver_unregister (&bcm5411_driver);
drivers/net/s2io.c +70 -58
251 lines not on this page · raw message
drivers/net/s2io.h +6 -3
@@ -534,6 +534,7 @@ struct RxD_t {#define RXD_OWN_XENA s2BIT(7)#define RXD_T_CODE (s2BIT(12)|s2BIT(13)|s2BIT(14)|s2BIT(15))#define RXD_FRAME_PROTO vBIT(0xFFFF,24,8) +#define RXD_FRAME_VLAN_TAG s2BIT(24)#define RXD_FRAME_PROTO_IPV4 s2BIT(27)#define RXD_FRAME_PROTO_IPV6 s2BIT(28)#define RXD_FRAME_IP_FRAG s2BIT(29)
@@ -808,10 +809,12 @@ struct lro {int sg_num;int in_use;__be16 window; +u16 vlan_tag;u32 cur_tsval; -u32 cur_tsecr; +__be32 cur_tsecr;u8 saw_ts; -}; +}____cacheline_aligned ; +/* These flags represent the devices temporary state */ enum s2io_device_state_t
@@ -1087,7 +1090,7 @@ static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, struct lro **lro, struct RxD_t *rxdp, struct s2io_nic *sp);static void clear_lro_session (struct lro *lro); -static void queue_rx_frame (struct sk_buff *skb); +static void queue_rx_frame (struct sk_buff *skb,u16 vlan_tag);static void update_L3L4_header (struct s2io_nic *sp,struct lro *lro);static void lro_append_pkt (struct s2io_nic *sp,struct lro *lro,struct sk_buff *skb,u32 tcp_len);
drivers/net/sunbmac.c +1 -1
@@ -1075,7 +1075,7 @@ static const struct ethtool_ops bigmac_ethtool_ops = { .get_link = bigmac_get_link, }; -static int __init bigmac_ether_init (struct sbus_dev *qec_sdev) +static int __devinit bigmac_ether_init (struct sbus_dev *qec_sdev) {struct net_device *dev;static int version_printed;
drivers/net/sunqe.c +3 -3
@@ -747,7 +747,7 @@ static inline void qec_init_once(struct sunqec *qecp, struct sbus_dev *qsdev) qecp->gregs + GLOB_RSIZE); } -static u8 __init qec_get_burst (struct device_node *dp) +static u8 __devinit qec_get_burst (struct device_node *dp) {u8 bsizes, bsizes_more;
@@ -767,7 +767,7 @@ static u8 __init qec_get_burst(struct device_node *dp)return bsizes; } -static struct sunqec *__init get_qec (struct sbus_dev *child_sdev) +static struct sunqec *__devinit get_qec (struct sbus_dev *child_sdev) {struct sbus_dev *qec_sdev = child_sdev->parent;struct sunqec *qecp;
@@ -823,7 +823,7 @@ fail:return NULL ; } -static int __init qec_ether_init (struct sbus_dev *sdev) +static int __devinit qec_ether_init (struct sbus_dev *sdev) {static unsigned version_printed;struct net_device *dev;
drivers/net/sunvnet.c +1 -1
@@ -1130,7 +1130,7 @@ static struct vio_driver_ops vnet_vio_ops = { .handshake_complete = vnet_handshake_complete, }; -static void print_version (void ) +static void __devinit print_version (void ) {static int version_printed;
drivers/net/tokenring/olympic.c +1 -1
@@ -434,7 +434,7 @@ static int __devinit olympic_init(struct net_device *dev) } -static int olympic_open (struct net_device *dev) +static int __devinit olympic_open (struct net_device *dev) {struct olympic_private *olympic_priv=netdev_priv (dev);u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb;
drivers/net/ucc_geth.c +30 -7
@@ -2084,8 +2084,10 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)if (!ugeth)return ; -if (ugeth->uccf) +if (ugeth->uccf) {ucc_fast_free (ugeth->uccf); + ugeth->uccf =NULL ; + }if (ugeth->p_thread_data_tx) {qe_muram_free (ugeth->thread_dat_tx_offset);
@@ -2305,10 +2307,6 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) ug_info = ugeth->ug_info; uf_info = &ug_info->uf_info; -/* Create CQs for hash tables */ -INIT_LIST_HEAD (&ugeth->group_hash_q); -INIT_LIST_HEAD (&ugeth->ind_hash_q); -if (!((uf_info->bd_mem_part ==MEM_PART_SYSTEM ) || (uf_info->bd_mem_part ==MEM_PART_MURAM ))) {if (netif_msg_probe (ugeth))
@@ -3668,6 +3666,23 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)return IRQ_HANDLED ; } +#ifdef CONFIG_NET_POLL_CONTROLLER +/* +* Polling 'interrupt' - used by things like netconsole to send skbs +* without having to re-enable interrupts. It's not called while +* the interrupt routine is executing. +*/ +static void ucc_netpoll (struct net_device *dev) +{ +struct ucc_geth_private *ugeth =netdev_priv (dev); +int irq = ugeth->ug_info->uf_info.irq; + +disable_irq (irq); +ucc_geth_irq_handler (irq, dev); +enable_irq (irq); +} +#endif /* CONFIG_NET_POLL_CONTROLLER */ +/* Called when something needs to use the ethernet device */ /* Returns 0 for success. */ static int ucc_geth_open (struct net_device *dev)
@@ -3990,6 +4005,10 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ugeth =netdev_priv (dev);spin_lock_init (&ugeth->lock); +/* Create CQs for hash tables */ +INIT_LIST_HEAD (&ugeth->group_hash_q); +INIT_LIST_HEAD (&ugeth->ind_hash_q); +dev_set_drvdata (device, dev);/* Set the dev->base_addr to the gfar reg region */
@@ -4006,6 +4025,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma#ifdef CONFIG_UGETH_NAPI netif_napi_add (dev, &ugeth->napi, ucc_geth_poll,UCC_GETH_DEV_WEIGHT );#endif /* CONFIG_UGETH_NAPI */ +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = ucc_netpoll; +#endif dev->stop = ucc_geth_close;// dev->change_mtu = ucc_geth_change_mtu; dev->mtu =1500 ;
@@ -4040,9 +4062,10 @@ static int ucc_geth_remove(struct of_device* ofdev)struct net_device *dev =dev_get_drvdata (device);struct ucc_geth_private *ugeth =netdev_priv (dev); -dev_set_drvdata (device,NULL ); -ucc_geth_memclean (ugeth); +unregister_netdev (dev);free_netdev (dev); +ucc_geth_memclean (ugeth); +dev_set_drvdata (device,NULL );return 0 ; }
drivers/net/usb/rtl8150.c +0 -1
@@ -926,7 +926,6 @@ static int rtl8150_probe(struct usb_interface *intf, netdev->set_multicast_list = rtl8150_set_multicast; netdev->set_mac_address = rtl8150_set_mac_address; netdev->get_stats = rtl8150_netdev_stats; - netdev->mtu =RTL8150_MTU ;SET_ETHTOOL_OPS (netdev, &ops); dev->intr_interval =100 ;/* 100ms */
drivers/net/via-rhine.c +1 -1
@@ -606,7 +606,7 @@ static int rhine_napipoll(struct napi_struct *napi, int budget) }#endif -static void rhine_hw_init (struct net_device *dev,long pioaddr) +static void __devinit rhine_hw_init (struct net_device *dev,long pioaddr) {struct rhine_private *rp =netdev_priv (dev);
drivers/net/via-velocity.c +32 -38
232 lines not on this page · raw message
drivers/net/via-velocity.h +96 -128
319 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
David Miller
maintainerFrom: Jeff Garzik <[email protected]>
Date: Fri, 1 Feb 2008 16:03:38 -0500
Quoted 6 lines
This submit is based on top of Linus's tree, since I'm not sure what's going on with net-2.6.git and my previous (lost?) submission.
These changes do /not/ include anything from the previous submission, which was on top of net-2.6 -- but then you rebased, which probably made everything more difficult. :)
Can you respin the tree with that previus submission init?
The best I'll be able to do is clone that entire tree in order to pick the patches out, and from here in Australia with a dodgy link I might not even finish before I have to get on a plane back home on Monday :-)
I'll pull in this second set later tonight.
David Miller
maintainerFrom: Jeff Garzik <[email protected]>
Date: Fri, 1 Feb 2008 16:03:38 -0500
Quoted 1 line
Please pull from 'upstream2-davem' branch of
This is now pulled and pushed back out to net-2.6
Thanks!
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Fri, 01 Feb 2008 21:52:10 -0800 (PST)
Quoted 6 lines
From: Jeff Garzik <[email protected]>
Date: Fri, 1 Feb 2008 16:03:38 -0500Quoted 1 line
Please pull from 'upstream2-davem' branch of
This is now pulled and pushed back out to net-2.6
The first S2io patch breaks the build so I'm removing it from the net-2.6 tree. I suspect you rejected an earlier patch that added the tx_lock member to the S2IO device private.
If you do that Jeff, please at least do a quick sanity check of the build.
If, instead, I messed things up somehow, my apologies in advance.
drivers/net/s2io.c: In function 's2io_vlan_rx_kill_vid':drivers/net/s2io.c:395: error: 'struct s2io_nic' has no member named 'tx_lock' drivers/net/s2io.c:399: error: 'struct s2io_nic' has no member named 'tx_lock'
S2io: Support for vlan_rx_kill_vid entry point
- Added s2io_vlan_rx_kill_vid entry point function for unregistering vlan.
- Fix to aggregate vlan packets. IP offset is incremented by
4 bytes if the packet contains vlan header.
--- drivers/net/s2io.c | 108 +++++++++++++++++++++++++++++----------------------- drivers/net/s2io.h | 7 ++- 2 files changed, 65 insertions(+), 50 deletions(-)
drivers/net/s2io.c +60 -48
@@ -386,6 +386,19 @@ static void s2io_vlan_rx_register(struct net_device *dev,/* A flag indicating whether 'RX_PA_CFG_STRIP_VLAN_TAG' bit is set or not */ static int vlan_strip_flag; +/* Unregister the vlan */ +static void s2io_vlan_rx_kill_vid (struct net_device *dev,unsigned long vid) +{ +unsigned long flags; +struct s2io_nic *nic = dev->priv; + +spin_lock_irqsave (&nic->tx_lock, flags); +if (nic->vlgrp) +vlan_group_set_device (nic->vlgrp, vid,NULL ); + +spin_unlock_irqrestore (&nic->tx_lock, flags); +} +/* * Constants to be programmed into the Xena's registers, to configure * the XAUI.
@@ -2948,7 +2961,7 @@ static void rx_intr_handler(struct ring_info *ring_data)struct lro *lro = &nic->lro0_n[i];if (lro->in_use) {update_L3L4_header (nic, lro); -queue_rx_frame (lro->parent); +queue_rx_frame (lro->parent, lro->vlan_tag);clear_lro_session (lro); } }
@@ -7371,7 +7384,8 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) {lro_append_pkt (sp, lro, skb, tcp_len); -queue_rx_frame (lro->parent); +queue_rx_frame (lro->parent, + lro->vlan_tag);clear_lro_session (lro); sp->mac_control.stats_info-> sw_stat.flush_max_pkts++;
@@ -7382,7 +7396,8 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) lro->frags_len; sp->mac_control.stats_info-> sw_stat.sending_both++; -queue_rx_frame (lro->parent); +queue_rx_frame (lro->parent, + lro->vlan_tag);clear_lro_session (lro); goto send_up;case 0 :/* sessions exceeded */
@@ -7408,31 +7423,12 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)*/ skb->ip_summed =CHECKSUM_NONE ; } - }else { + }else skb->ip_summed =CHECKSUM_NONE ; - } + sp->mac_control.stats_info->sw_stat.mem_freed += skb->truesize; -if (!sp->lro) { - skb->protocol =eth_type_trans (skb, dev); -if ((sp->vlgrp &&RXD_GET_VLAN_TAG (rxdp->Control_2) && - vlan_strip_flag)) { -/* Queueing the vlan frame to the upper layer */ -if (napi) -vlan_hwaccel_receive_skb (skb, sp->vlgrp, -RXD_GET_VLAN_TAG (rxdp->Control_2)); -else -vlan_hwaccel_rx (skb, sp->vlgrp, -RXD_GET_VLAN_TAG (rxdp->Control_2)); - }else { -if (napi) -netif_receive_skb (skb); -else -netif_rx (skb); - } - }else { send_up: -queue_rx_frame (skb); - } +queue_rx_frame (skb,RXD_GET_VLAN_TAG (rxdp->Control_2)); dev->last_rx = jiffies; aggregate:atomic_dec (&sp->rx_bufs_left[ring_no]);
@@ -7790,6 +7786,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)SET_ETHTOOL_OPS (dev, &netdev_ethtool_ops); dev->features |=NETIF_F_HW_VLAN_TX |NETIF_F_HW_VLAN_RX ; dev->vlan_rx_register = s2io_vlan_rx_register; + dev->vlan_rx_kill_vid = (void *)s2io_vlan_rx_kill_vid;/* * will use eth_mac_addr() for dev->set_mac_address
@@ -8061,7 +8058,8 @@ module_init(s2io_starter);module_exit (s2io_closer);static int check_L2_lro_capable (u8 *buffer,struct iphdr **ip, -struct tcphdr **tcp,struct RxD_t *rxdp) +struct tcphdr **tcp,struct RxD_t *rxdp, +struct s2io_nic *sp) {int ip_off;u8 l2_type = (u8)((rxdp->Control_1 >>37 ) &0x7 ), ip_len;
@@ -8072,19 +8070,20 @@ static int check_L2_lro_capable(u8 *buffer, struct iphdr **ip,return -1 ; } -/* TODO: -* By default the VLAN field in the MAC is stripped by the card, if this -* feature is turned off in rx_pa_cfg register, then the ip_off field -* has to be shifted by a further 2 bytes -*/ -switch (l2_type) { -case 0 :/* DIX type */ -case 4 :/* DIX type with VLAN */ - ip_off =HEADER_ETHERNET_II_802_3_SIZE ; -break ; +/* Checking for DIX type or DIX type with VLAN */ +if ((l2_type ==0 ) + || (l2_type ==4 )) { + ip_off =HEADER_ETHERNET_II_802_3_SIZE ; +/* +* If vlan stripping is disabled and the frame is VLAN tagged, +* shift the offset by the VLAN header size bytes. +*/ +if ((!vlan_strip_flag) && + (rxdp->Control_1 &RXD_FRAME_VLAN_TAG )) + ip_off +=HEADER_VLAN_SIZE ; + }else {/* LLC, SNAP etc are considered non-mergeable */ -default : -return -1 ; +return -1 ; } *ip = (struct iphdr *)((u8 *)buffer + ip_off);
@@ -8111,7 +8110,7 @@ static inline int get_l4_pyld_length(struct iphdr *ip, struct tcphdr *tcp) }static void initiate_new_session (struct lro *lro,u8 *l2h, -struct iphdr *ip,struct tcphdr *tcp,u32 tcp_pyld_len) +struct iphdr *ip,struct tcphdr *tcp,u32 tcp_pyld_len,u16 vlan_tag) {DBG_PRINT (INFO_DBG ,"%s: Been here...\n" , __FUNCTION__); lro->l2h = l2h;
@@ -8122,6 +8121,7 @@ static void initiate_new_session(struct lro *lro, u8 *l2h, lro->sg_num =1 ; lro->total_len =ntohs (ip->tot_len); lro->frags_len =0 ; + lro->vlan_tag = vlan_tag;/* * check if we saw TCP timestamp. Other consistency checks have * already been done.
@@ -8253,15 +8253,16 @@ s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, struct lro **lro,struct iphdr *ip;struct tcphdr *tcph;int ret =0 , i; +u16 vlan_tag =0 ;if (!(ret =check_L2_lro_capable (buffer, &ip, (struct tcphdr **)tcp, - rxdp))) { + rxdp, sp))) {DBG_PRINT (INFO_DBG ,"IP Saddr: %x Daddr: %x\n" , ip->saddr, ip->daddr); - }else { + }else return ret; - } + vlan_tag =RXD_GET_VLAN_TAG (rxdp->Control_2); tcph = (struct tcphdr *)*tcp; *tcp_len =get_l4_pyld_length (ip, tcph);for (i=0 ; i<MAX_LRO_SESSIONS ; i++) {
@@ -8321,7 +8322,8 @@ s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, struct lro **lro,switch (ret) {case 3 : -initiate_new_session (*lro, buffer, ip, tcph, *tcp_len); +initiate_new_session (*lro, buffer, ip, tcph, *tcp_len, + vlan_tag);break ;case 2 :update_L3L4_header (sp, *lro);
@@ -8349,15 +8351,25 @@ static void clear_lro_session(struct lro *lro)memset (lro,0 , lro_struct_size); } -static void queue_rx_frame (struct sk_buff *skb) +static void queue_rx_frame (struct sk_buff *skb,u16 vlan_tag) {struct net_device *dev = skb->dev; +struct s2io_nic *sp = dev->priv; skb->protocol =eth_type_trans (skb, dev); -if (napi) -netif_receive_skb (skb); -else -netif_rx (skb); +if (sp->vlgrp && vlan_tag + && (vlan_strip_flag)) { +/* Queueing the vlan frame to the upper layer */ +if (sp->config.napi) +vlan_hwaccel_receive_skb (skb, sp->vlgrp, vlan_tag); +else +vlan_hwaccel_rx (skb, sp->vlgrp, vlan_tag); + }else { +if (sp->config.napi) +netif_receive_skb (skb); +else +netif_rx (skb); + } } static void lro_append_pkt(struct s2io_nic *sp, struct lro *lro,
drivers/net/s2io.h +5 -2
@@ -534,6 +534,7 @@ struct RxD_t {#define RXD_OWN_XENA s2BIT(7)#define RXD_T_CODE (s2BIT(12)|s2BIT(13)|s2BIT(14)|s2BIT(15))#define RXD_FRAME_PROTO vBIT(0xFFFF,24,8) +#define RXD_FRAME_VLAN_TAG s2BIT(24)#define RXD_FRAME_PROTO_IPV4 s2BIT(27)#define RXD_FRAME_PROTO_IPV6 s2BIT(28)#define RXD_FRAME_IP_FRAG s2BIT(29)
@@ -808,10 +809,12 @@ struct lro {int sg_num;int in_use;__be16 window; +u16 vlan_tag;u32 cur_tsval;u32 cur_tsecr;u8 saw_ts; -}; +}____cacheline_aligned ; +/* These flags represent the devices temporary state */ enum s2io_device_state_t
@@ -1087,7 +1090,7 @@ static int s2io_club_tcp_session(u8 *buffer, u8 **tcp, u32 *tcp_len, struct lro **lro, struct RxD_t *rxdp, struct s2io_nic *sp);static void clear_lro_session (struct lro *lro); -static void queue_rx_frame (struct sk_buff *skb); +static void queue_rx_frame (struct sk_buff *skb,u16 vlan_tag);static void update_L3L4_header (struct s2io_nic *sp,struct lro *lro);static void lro_append_pkt (struct s2io_nic *sp,struct lro *lro,struct sk_buff *skb,u32 tcp_len);
Signature · 1 line
1.5.4.rc5