Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorDavid S. Miller <davem@davemloft.net>
Tue, 9 Feb 2010 19:44:44 +0000 (11:44 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Feb 2010 19:44:44 +0000 (11:44 -0800)
1  2 
MAINTAINERS
drivers/net/cxgb3/sge.c
drivers/net/igb/igb_main.c

diff --combined MAINTAINERS
@@@ -3836,6 -3836,7 +3836,7 @@@ NETWORKING DRIVER
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git
  S:    Odd Fixes
  F:    drivers/net/
  F:    include/linux/if_*
@@@ -4443,13 -4444,6 +4444,13 @@@ S:    Supporte
  F:    Documentation/networking/LICENSE.qla3xxx
  F:    drivers/net/qla3xxx.*
  
 +QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
 +M:    Amit Kumar Salecha <amit.salecha@qlogic.com>
 +M:    linux-driver@qlogic.com
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/qlcnic/
 +
  QLOGIC QLGE 10Gb ETHERNET DRIVER
  M:    Ron Mercer <ron.mercer@qlogic.com>
  M:    linux-driver@qlogic.com
@@@ -5801,15 -5795,6 +5802,15 @@@ S:    Maintaine
  F:    Documentation/filesystems/vfat.txt
  F:    fs/fat/
  
 +VIRTIO HOST (VHOST)
 +M:    "Michael S. Tsirkin" <mst@redhat.com>
 +L:    kvm@vger.kernel.org
 +L:    virtualization@lists.osdl.org
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/vhost/
 +F:    include/linux/vhost.h
 +
  VIA RHINE NETWORK DRIVER
  M:    Roger Luethi <rl@hellgate.ch>
  S:    Maintained
diff --combined drivers/net/cxgb3/sge.c
@@@ -480,7 -480,6 +480,7 @@@ static inline void ring_fl_db(struct ad
  {
        if (q->pend_cred >= q->credits / 4) {
                q->pend_cred = 0;
 +              wmb();
                t3_write_reg(adap, A_SG_KDOORBELL, V_EGRCNTX(q->cntxt_id));
        }
  }
@@@ -2080,6 -2079,7 +2080,7 @@@ static void lro_add_page(struct adapte
                         struct sge_fl *fl, int len, int complete)
  {
        struct rx_sw_desc *sd = &fl->sdesc[fl->cidx];
+       struct port_info *pi = netdev_priv(qs->netdev);
        struct sk_buff *skb = NULL;
        struct cpl_rx_pkt *cpl;
        struct skb_frag_struct *rx_frag;
  
        if (!nr_frags) {
                offset = 2 + sizeof(struct cpl_rx_pkt);
-               qs->lro_va = sd->pg_chunk.va + 2;
-       }
-       len -= offset;
+               cpl = qs->lro_va = sd->pg_chunk.va + 2;
+               if ((pi->rx_offload & T3_RX_CSUM) &&
+                    cpl->csum_valid && cpl->csum == htons(0xffff)) {
+                       skb->ip_summed = CHECKSUM_UNNECESSARY;
+                       qs->port_stats[SGE_PSTAT_RX_CSUM_GOOD]++;
+               } else
+                       skb->ip_summed = CHECKSUM_NONE;
+       } else
+               cpl = qs->lro_va;
  
-       prefetch(qs->lro_va);
+       len -= offset;
  
        rx_frag += nr_frags;
        rx_frag->page = sd->pg_chunk.page;
                return;
  
        skb_record_rx_queue(skb, qs - &adap->sge.qs[0]);
-       skb->ip_summed = CHECKSUM_UNNECESSARY;
-       cpl = qs->lro_va;
  
        if (unlikely(cpl->vlan_valid)) {
-               struct net_device *dev = qs->netdev;
-               struct port_info *pi = netdev_priv(dev);
                struct vlan_group *grp = pi->vlan_grp;
  
                if (likely(grp != NULL)) {
@@@ -2283,14 -2286,11 +2287,14 @@@ static int process_responses(struct ada
        while (likely(budget_left && is_new_response(r, q))) {
                int packet_complete, eth, ethpad = 2, lro = qs->lro_enabled;
                struct sk_buff *skb = NULL;
 -              u32 len, flags = ntohl(r->flags);
 -              __be32 rss_hi = *(const __be32 *)r,
 -                     rss_lo = r->rss_hdr.rss_hash_val;
 +              u32 len, flags;
 +              __be32 rss_hi, rss_lo;
  
 +              rmb();
                eth = r->rss_hdr.opcode == CPL_RX_PKT;
 +              rss_hi = *(const __be32 *)r;
 +              rss_lo = r->rss_hdr.rss_hash_val;
 +              flags = ntohl(r->flags);
  
                if (unlikely(flags & F_RSPD_ASYNC_NOTIF)) {
                        skb = alloc_skb(AN_PKT_SIZE, GFP_ATOMIC);
@@@ -2501,10 -2501,7 +2505,10 @@@ static int process_pure_responses(struc
                        refill_rspq(adap, q, q->credits);
                        q->credits = 0;
                }
 -      } while (is_new_response(r, q) && is_pure_response(r));
 +              if (!is_new_response(r, q))
 +                      break;
 +              rmb();
 +      } while (is_pure_response(r));
  
        if (sleeping)
                check_ring_db(adap, qs, sleeping);
@@@ -2538,7 -2535,6 +2542,7 @@@ static inline int handle_responses(stru
  
        if (!is_new_response(r, q))
                return -1;
 +      rmb();
        if (is_pure_response(r) && process_pure_responses(adap, qs, r) == 0) {
                t3_write_reg(adap, A_SG_GTS, V_RSPQ(q->cntxt_id) |
                             V_NEWTIMER(q->holdoff_tmr) | V_NEWINDEX(q->cidx));
@@@ -60,7 -60,7 +60,7 @@@ static const struct e1000_info *igb_inf
        [board_82575] = &e1000_82575_info,
  };
  
 -static struct pci_device_id igb_pci_tbl[] = {
 +static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER), board_82575 },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_FIBER), board_82575 },
        { PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SERDES), board_82575 },
@@@ -421,6 -421,8 +421,8 @@@ static void igb_assign_vector(struct ig
                        msixbm = E1000_EICR_RX_QUEUE0 << rx_queue;
                if (tx_queue > IGB_N0_QUEUE)
                        msixbm |= E1000_EICR_TX_QUEUE0 << tx_queue;
+               if (!adapter->msix_entries && msix_vector == 0)
+                       msixbm |= E1000_EIMS_OTHER;
                array_wr32(E1000_MSIXBM(0), msix_vector, msixbm);
                q_vector->eims_value = msixbm;
                break;
@@@ -877,7 -879,6 +879,6 @@@ static int igb_request_irq(struct igb_a
  {
        struct net_device *netdev = adapter->netdev;
        struct pci_dev *pdev = adapter->pdev;
-       struct e1000_hw *hw = &adapter->hw;
        int err = 0;
  
        if (adapter->msix_entries) {
                igb_setup_all_tx_resources(adapter);
                igb_setup_all_rx_resources(adapter);
        } else {
-               switch (hw->mac.type) {
-               case e1000_82575:
-                       wr32(E1000_MSIXBM(0),
-                            (E1000_EICR_RX_QUEUE0 |
-                             E1000_EICR_TX_QUEUE0 |
-                             E1000_EIMS_OTHER));
-                       break;
-               case e1000_82580:
-               case e1000_82576:
-                       wr32(E1000_IVAR0, E1000_IVAR_VALID);
-                       break;
-               default:
-                       break;
-               }
+               igb_assign_vector(adapter->q_vector[0], 0);
        }
  
        if (adapter->flags & IGB_FLAG_HAS_MSI) {
@@@ -1140,6 -1128,8 +1128,8 @@@ int igb_up(struct igb_adapter *adapter
        }
        if (adapter->msix_entries)
                igb_configure_msix(adapter);
+       else
+               igb_assign_vector(adapter->q_vector[0], 0);
  
        /* Clear any pending interrupts. */
        rd32(E1000_ICR);
@@@ -2905,13 -2895,12 +2895,13 @@@ static int igb_write_uc_addr_list(struc
        int count = 0;
  
        /* return ENOMEM indicating insufficient memory for addresses */
 -      if (netdev->uc.count > rar_entries)
 +      if (netdev_uc_count(netdev) > rar_entries)
                return -ENOMEM;
  
 -      if (netdev->uc.count && rar_entries) {
 +      if (!netdev_uc_empty(netdev) && rar_entries) {
                struct netdev_hw_addr *ha;
 -              list_for_each_entry(ha, &netdev->uc.list, list) {
 +
 +              netdev_for_each_uc_addr(ha, netdev) {
                        if (!rar_entries)
                                break;
                        igb_rar_set_qsel(adapter, ha->addr,
@@@ -4106,9 -4095,6 +4096,9 @@@ static irqreturn_t igb_msix_other(int i
        u32 icr = rd32(E1000_ICR);
        /* reading ICR causes bit 31 of EICR to be cleared */
  
 +      if (icr & E1000_ICR_DRSTA)
 +              schedule_work(&adapter->reset_task);
 +
        if (icr & E1000_ICR_DOUTSYNC) {
                /* HW is reporting DMA is out of sync */
                adapter->stats.doosync++;
@@@ -4732,9 -4718,6 +4722,9 @@@ static irqreturn_t igb_intr_msi(int irq
  
        igb_write_itr(q_vector);
  
 +      if (icr & E1000_ICR_DRSTA)
 +              schedule_work(&adapter->reset_task);
 +
        if (icr & E1000_ICR_DOUTSYNC) {
                /* HW is reporting DMA is out of sync */
                adapter->stats.doosync++;
@@@ -4774,9 -4757,6 +4764,9 @@@ static irqreturn_t igb_intr(int irq, vo
        if (!(icr & E1000_ICR_INT_ASSERTED))
                return IRQ_NONE;
  
 +      if (icr & E1000_ICR_DRSTA)
 +              schedule_work(&adapter->reset_task);
 +
        if (icr & E1000_ICR_DOUTSYNC) {
                /* HW is reporting DMA is out of sync */
                adapter->stats.doosync++;