Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorDavid S. Miller <davem@davemloft.net>
Sun, 3 May 2009 21:07:43 +0000 (14:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 May 2009 21:07:43 +0000 (14:07 -0700)
1  2 
drivers/net/bonding/bond_main.c
drivers/net/cxgb3/t3_hw.c
drivers/net/virtio_net.c
net/core/dev.c

Simple merge
Simple merge
index 0718558715244a17ccaf8e20526653c9db912609,4d1d47953fc6e4d780c538b5ffd00c901ffc06bf..6cc5bcd34fb0ab329be4514790205bb50e900c02
@@@ -620,10 -620,14 +620,11 @@@ static bool virtnet_send_command(struc
        struct virtio_net_ctrl_hdr ctrl;
        virtio_net_ctrl_ack status = ~0;
        unsigned int tmp;
+       int i;
  
 -      if (!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)) {
 -              BUG();  /* Caller should know better */
 -              return false;
 -      }
 -
 -      BUG_ON(out + in > VIRTNET_SEND_COMMAND_SG_MAX);
 +      /* Caller should know better */
 +      BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) ||
 +              (out + in > VIRTNET_SEND_COMMAND_SG_MAX));
  
        out++; /* Add header */
        in++; /* Add return status */
        sg_init_table(sg, out + in);
  
        sg_set_buf(&sg[0], &ctrl, sizeof(ctrl));
-       memcpy(&sg[1], data, sizeof(struct scatterlist) * (out + in - 2));
+       for_each_sg(data, s, out + in - 2, i)
+               sg_set_buf(&sg[i + 1], sg_virt(s), s->length);
        sg_set_buf(&sg[out + in - 1], &status, sizeof(status));
  
 -      if (vi->cvq->vq_ops->add_buf(vi->cvq, sg, out, in, vi) != 0)
 -              BUG();
 +      BUG_ON(vi->cvq->vq_ops->add_buf(vi->cvq, sg, out, in, vi));
  
        vi->cvq->vq_ops->kick(vi->cvq);
  
diff --cc net/core/dev.c
Simple merge