diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-12-22 12:57:02 -0500 |
commit | 4b7bd364700d9ac8372eff48832062b936d0793b (patch) | |
tree | 0dbf78c95456a0b02d07fcd473281f04a87e266d /drivers/scsi/fcoe | |
parent | c0d8768af260e2cbb4bf659ae6094a262c86b085 (diff) | |
parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) |
Merge branch 'master' into for-next
Conflicts:
MAINTAINERS
arch/arm/mach-omap2/pm24xx.c
drivers/scsi/bfa/bfa_fcpim.c
Needed to update to apply fixes for which the old branch was too
outdated.
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 18 | ||||
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 2 |
2 files changed, 8 insertions, 12 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 844d618b84bd..d23a538a9dfc 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -117,7 +117,7 @@ static void fcoe_recv_frame(struct sk_buff *skb); | |||
117 | 117 | ||
118 | static void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *); | 118 | static void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *); |
119 | 119 | ||
120 | module_param_call(create, fcoe_create, NULL, (void *)FIP_MODE_AUTO, S_IWUSR); | 120 | module_param_call(create, fcoe_create, NULL, (void *)FIP_MODE_FABRIC, S_IWUSR); |
121 | __MODULE_PARM_TYPE(create, "string"); | 121 | __MODULE_PARM_TYPE(create, "string"); |
122 | MODULE_PARM_DESC(create, " Creates fcoe instance on a ethernet interface"); | 122 | MODULE_PARM_DESC(create, " Creates fcoe instance on a ethernet interface"); |
123 | module_param_call(create_vn2vn, fcoe_create, NULL, | 123 | module_param_call(create_vn2vn, fcoe_create, NULL, |
@@ -1243,7 +1243,6 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, | |||
1243 | struct fcoe_interface *fcoe; | 1243 | struct fcoe_interface *fcoe; |
1244 | struct fc_frame_header *fh; | 1244 | struct fc_frame_header *fh; |
1245 | struct fcoe_percpu_s *fps; | 1245 | struct fcoe_percpu_s *fps; |
1246 | struct fcoe_port *port; | ||
1247 | struct ethhdr *eh; | 1246 | struct ethhdr *eh; |
1248 | unsigned int cpu; | 1247 | unsigned int cpu; |
1249 | 1248 | ||
@@ -1262,16 +1261,7 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, | |||
1262 | skb_tail_pointer(skb), skb_end_pointer(skb), | 1261 | skb_tail_pointer(skb), skb_end_pointer(skb), |
1263 | skb->csum, skb->dev ? skb->dev->name : "<NULL>"); | 1262 | skb->csum, skb->dev ? skb->dev->name : "<NULL>"); |
1264 | 1263 | ||
1265 | /* check for mac addresses */ | ||
1266 | eh = eth_hdr(skb); | 1264 | eh = eth_hdr(skb); |
1267 | port = lport_priv(lport); | ||
1268 | if (compare_ether_addr(eh->h_dest, port->data_src_addr) && | ||
1269 | compare_ether_addr(eh->h_dest, fcoe->ctlr.ctl_src_addr) && | ||
1270 | compare_ether_addr(eh->h_dest, (u8[6])FC_FCOE_FLOGI_MAC)) { | ||
1271 | FCOE_NETDEV_DBG(netdev, "wrong destination mac address:%pM\n", | ||
1272 | eh->h_dest); | ||
1273 | goto err; | ||
1274 | } | ||
1275 | 1265 | ||
1276 | if (is_fip_mode(&fcoe->ctlr) && | 1266 | if (is_fip_mode(&fcoe->ctlr) && |
1277 | compare_ether_addr(eh->h_source, fcoe->ctlr.dest_addr)) { | 1267 | compare_ether_addr(eh->h_source, fcoe->ctlr.dest_addr)) { |
@@ -1291,6 +1281,12 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, | |||
1291 | skb_set_transport_header(skb, sizeof(struct fcoe_hdr)); | 1281 | skb_set_transport_header(skb, sizeof(struct fcoe_hdr)); |
1292 | fh = (struct fc_frame_header *) skb_transport_header(skb); | 1282 | fh = (struct fc_frame_header *) skb_transport_header(skb); |
1293 | 1283 | ||
1284 | if (ntoh24(&eh->h_dest[3]) != ntoh24(fh->fh_d_id)) { | ||
1285 | FCOE_NETDEV_DBG(netdev, "FC frame d_id mismatch with MAC:%pM\n", | ||
1286 | eh->h_dest); | ||
1287 | goto err; | ||
1288 | } | ||
1289 | |||
1294 | fr = fcoe_dev_from_skb(skb); | 1290 | fr = fcoe_dev_from_skb(skb); |
1295 | fr->fr_dev = lport; | 1291 | fr->fr_dev = lport; |
1296 | fr->ptype = ptype; | 1292 | fr->ptype = ptype; |
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index aa503d83092a..bc17c7123202 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -2296,7 +2296,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
2296 | { | 2296 | { |
2297 | struct fip_header *fiph; | 2297 | struct fip_header *fiph; |
2298 | enum fip_vn2vn_subcode sub; | 2298 | enum fip_vn2vn_subcode sub; |
2299 | union { | 2299 | struct { |
2300 | struct fc_rport_priv rdata; | 2300 | struct fc_rport_priv rdata; |
2301 | struct fcoe_rport frport; | 2301 | struct fcoe_rport frport; |
2302 | } buf; | 2302 | } buf; |