aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2009-05-22 19:22:17 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-30 01:12:32 -0400
commitccffad25b5136958d4769ed6de5e87992dd9c65c (patch)
treecd5f36fe67f4deeae23d76436f7a032a201cba44 /drivers/scsi
parentae63e808f508c38fe65e23a1480c85d5bd00ecbd (diff)
net: convert unicast addr list
This patch converts unicast address list to standard list_head using previously introduced struct netdev_hw_addr. It also relaxes the locking. Original spinlock (still used for multicast addresses) is not needed and is no longer used for a protection of this list. All reading and writing takes place under rtnl (with no changes). I also removed a possibility to specify the length of the address while adding or deleting unicast address. It's always dev->addr_len. The convertion touched especially e1000 and ixgbe codes when the change is not so trivial. Signed-off-by: Jiri Pirko <jpirko@redhat.com> drivers/net/bnx2.c | 13 +-- drivers/net/e1000/e1000_main.c | 24 +++-- drivers/net/ixgbe/ixgbe_common.c | 14 ++-- drivers/net/ixgbe/ixgbe_common.h | 4 +- drivers/net/ixgbe/ixgbe_main.c | 6 +- drivers/net/ixgbe/ixgbe_type.h | 4 +- drivers/net/macvlan.c | 11 +- drivers/net/mv643xx_eth.c | 11 +- drivers/net/niu.c | 7 +- drivers/net/virtio_net.c | 7 +- drivers/s390/net/qeth_l2_main.c | 6 +- drivers/scsi/fcoe/fcoe.c | 16 ++-- include/linux/netdevice.h | 18 ++-- net/8021q/vlan.c | 4 +- net/8021q/vlan_dev.c | 10 +- net/core/dev.c | 195 +++++++++++++++++++++++++++----------- net/dsa/slave.c | 10 +- net/packet/af_packet.c | 4 +- 18 files changed, 227 insertions(+), 137 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fcoe/fcoe.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index ce33f107b0a0..f791348871fc 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -182,8 +182,8 @@ static void fcoe_update_src_mac(struct fcoe_ctlr *fip, u8 *old, u8 *new)
182 fc = fcoe_from_ctlr(fip); 182 fc = fcoe_from_ctlr(fip);
183 rtnl_lock(); 183 rtnl_lock();
184 if (!is_zero_ether_addr(old)) 184 if (!is_zero_ether_addr(old))
185 dev_unicast_delete(fc->real_dev, old, ETH_ALEN); 185 dev_unicast_delete(fc->real_dev, old);
186 dev_unicast_add(fc->real_dev, new, ETH_ALEN); 186 dev_unicast_add(fc->real_dev, new);
187 rtnl_unlock(); 187 rtnl_unlock();
188} 188}
189 189
@@ -233,13 +233,11 @@ void fcoe_netdev_cleanup(struct fcoe_softc *fc)
233 /* Delete secondary MAC addresses */ 233 /* Delete secondary MAC addresses */
234 rtnl_lock(); 234 rtnl_lock();
235 memcpy(flogi_maddr, (u8[6]) FC_FCOE_FLOGI_MAC, ETH_ALEN); 235 memcpy(flogi_maddr, (u8[6]) FC_FCOE_FLOGI_MAC, ETH_ALEN);
236 dev_unicast_delete(fc->real_dev, flogi_maddr, ETH_ALEN); 236 dev_unicast_delete(fc->real_dev, flogi_maddr);
237 if (!is_zero_ether_addr(fc->ctlr.data_src_addr)) 237 if (!is_zero_ether_addr(fc->ctlr.data_src_addr))
238 dev_unicast_delete(fc->real_dev, 238 dev_unicast_delete(fc->real_dev, fc->ctlr.data_src_addr);
239 fc->ctlr.data_src_addr, ETH_ALEN);
240 if (fc->ctlr.spma) 239 if (fc->ctlr.spma)
241 dev_unicast_delete(fc->real_dev, 240 dev_unicast_delete(fc->real_dev, fc->ctlr.ctl_src_addr);
242 fc->ctlr.ctl_src_addr, ETH_ALEN);
243 dev_mc_delete(fc->real_dev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0); 241 dev_mc_delete(fc->real_dev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0);
244 rtnl_unlock(); 242 rtnl_unlock();
245} 243}
@@ -347,9 +345,9 @@ static int fcoe_netdev_config(struct fc_lport *lp, struct net_device *netdev)
347 */ 345 */
348 rtnl_lock(); 346 rtnl_lock();
349 memcpy(flogi_maddr, (u8[6]) FC_FCOE_FLOGI_MAC, ETH_ALEN); 347 memcpy(flogi_maddr, (u8[6]) FC_FCOE_FLOGI_MAC, ETH_ALEN);
350 dev_unicast_add(fc->real_dev, flogi_maddr, ETH_ALEN); 348 dev_unicast_add(fc->real_dev, flogi_maddr);
351 if (fc->ctlr.spma) 349 if (fc->ctlr.spma)
352 dev_unicast_add(fc->real_dev, fc->ctlr.ctl_src_addr, ETH_ALEN); 350 dev_unicast_add(fc->real_dev, fc->ctlr.ctl_src_addr);
353 dev_mc_add(fc->real_dev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0); 351 dev_mc_add(fc->real_dev, FIP_ALL_ENODE_MACS, ETH_ALEN, 0);
354 rtnl_unlock(); 352 rtnl_unlock();
355 353