summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-08-02 17:46:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-08-02 17:46:33 -0400
commit6e6d05360b80f196ed07061327f03346b204abea (patch)
treecab059b7061393b1b6508ccca497273efe4b280f
parent10e5ddd71fb35cfa4eb86a980b6951d4fe9f68a9 (diff)
parente82f04ec6ba91065fd33a6201ffd7cab840e1475 (diff)
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Seven fixes to four drivers with no core changes. The mpt3sas one is theoretical until we get a CPU that goes up to 64 bits physical, the qla2xxx one fixes an oops in a driver initialization error leg and the others are mostly cosmetic" [ The fcoe patches may be worth highlighting - they may be "just" cleanups, but they simplify and fix the odd fc_rport_priv structure handling rules so that the new gcc-9 warnings about memset crossing structure boundaries are gone. The old code was hard for humans to understand too, and really confused the compiler sanity checks - Linus ] * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Fix possible fcport null-pointer dereferences scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA scsi: hpsa: remove printing internal cdb on tag collision scsi: hpsa: correct scsi command status issue after reset scsi: fcoe: pass in fcoe_rport structure instead of fc_rport_priv scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure scsi: libfc: Whitespace cleanup in libfc.h
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c138
-rw-r--r--drivers/scsi/hpsa.c14
-rw-r--r--drivers/scsi/libfc/fc_rport.c5
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.c12
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c2
-rw-r--r--include/scsi/libfc.h52
-rw-r--r--include/scsi/libfcoe.h1
7 files changed, 115 insertions, 109 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 1a85fe9e4b7b..1791a393795d 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -2005,7 +2005,7 @@ EXPORT_SYMBOL_GPL(fcoe_wwn_from_mac);
2005 */ 2005 */
2006static inline struct fcoe_rport *fcoe_ctlr_rport(struct fc_rport_priv *rdata) 2006static inline struct fcoe_rport *fcoe_ctlr_rport(struct fc_rport_priv *rdata)
2007{ 2007{
2008 return (struct fcoe_rport *)(rdata + 1); 2008 return container_of(rdata, struct fcoe_rport, rdata);
2009} 2009}
2010 2010
2011/** 2011/**
@@ -2269,7 +2269,7 @@ static void fcoe_ctlr_vn_start(struct fcoe_ctlr *fip)
2269 */ 2269 */
2270static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip, 2270static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip,
2271 struct sk_buff *skb, 2271 struct sk_buff *skb,
2272 struct fc_rport_priv *rdata) 2272 struct fcoe_rport *frport)
2273{ 2273{
2274 struct fip_header *fiph; 2274 struct fip_header *fiph;
2275 struct fip_desc *desc = NULL; 2275 struct fip_desc *desc = NULL;
@@ -2277,16 +2277,12 @@ static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip,
2277 struct fip_wwn_desc *wwn = NULL; 2277 struct fip_wwn_desc *wwn = NULL;
2278 struct fip_vn_desc *vn = NULL; 2278 struct fip_vn_desc *vn = NULL;
2279 struct fip_size_desc *size = NULL; 2279 struct fip_size_desc *size = NULL;
2280 struct fcoe_rport *frport;
2281 size_t rlen; 2280 size_t rlen;
2282 size_t dlen; 2281 size_t dlen;
2283 u32 desc_mask = 0; 2282 u32 desc_mask = 0;
2284 u32 dtype; 2283 u32 dtype;
2285 u8 sub; 2284 u8 sub;
2286 2285
2287 memset(rdata, 0, sizeof(*rdata) + sizeof(*frport));
2288 frport = fcoe_ctlr_rport(rdata);
2289
2290 fiph = (struct fip_header *)skb->data; 2286 fiph = (struct fip_header *)skb->data;
2291 frport->flags = ntohs(fiph->fip_flags); 2287 frport->flags = ntohs(fiph->fip_flags);
2292 2288
@@ -2349,15 +2345,17 @@ static int fcoe_ctlr_vn_parse(struct fcoe_ctlr *fip,
2349 if (dlen != sizeof(struct fip_wwn_desc)) 2345 if (dlen != sizeof(struct fip_wwn_desc))
2350 goto len_err; 2346 goto len_err;
2351 wwn = (struct fip_wwn_desc *)desc; 2347 wwn = (struct fip_wwn_desc *)desc;
2352 rdata->ids.node_name = get_unaligned_be64(&wwn->fd_wwn); 2348 frport->rdata.ids.node_name =
2349 get_unaligned_be64(&wwn->fd_wwn);
2353 break; 2350 break;
2354 case FIP_DT_VN_ID: 2351 case FIP_DT_VN_ID:
2355 if (dlen != sizeof(struct fip_vn_desc)) 2352 if (dlen != sizeof(struct fip_vn_desc))
2356 goto len_err; 2353 goto len_err;
2357 vn = (struct fip_vn_desc *)desc; 2354 vn = (struct fip_vn_desc *)desc;
2358 memcpy(frport->vn_mac, vn->fd_mac, ETH_ALEN); 2355 memcpy(frport->vn_mac, vn->fd_mac, ETH_ALEN);
2359 rdata->ids.port_id = ntoh24(vn->fd_fc_id); 2356 frport->rdata.ids.port_id = ntoh24(vn->fd_fc_id);
2360 rdata->ids.port_name = get_unaligned_be64(&vn->fd_wwpn); 2357 frport->rdata.ids.port_name =
2358 get_unaligned_be64(&vn->fd_wwpn);
2361 break; 2359 break;
2362 case FIP_DT_FC4F: 2360 case FIP_DT_FC4F:
2363 if (dlen != sizeof(struct fip_fc4_feat)) 2361 if (dlen != sizeof(struct fip_fc4_feat))
@@ -2403,16 +2401,14 @@ static void fcoe_ctlr_vn_send_claim(struct fcoe_ctlr *fip)
2403/** 2401/**
2404 * fcoe_ctlr_vn_probe_req() - handle incoming VN2VN probe request. 2402 * fcoe_ctlr_vn_probe_req() - handle incoming VN2VN probe request.
2405 * @fip: The FCoE controller 2403 * @fip: The FCoE controller
2406 * @rdata: parsed remote port with frport from the probe request 2404 * @frport: parsed FCoE rport from the probe request
2407 * 2405 *
2408 * Called with ctlr_mutex held. 2406 * Called with ctlr_mutex held.
2409 */ 2407 */
2410static void fcoe_ctlr_vn_probe_req(struct fcoe_ctlr *fip, 2408static void fcoe_ctlr_vn_probe_req(struct fcoe_ctlr *fip,
2411 struct fc_rport_priv *rdata) 2409 struct fcoe_rport *frport)
2412{ 2410{
2413 struct fcoe_rport *frport = fcoe_ctlr_rport(rdata); 2411 if (frport->rdata.ids.port_id != fip->port_id)
2414
2415 if (rdata->ids.port_id != fip->port_id)
2416 return; 2412 return;
2417 2413
2418 switch (fip->state) { 2414 switch (fip->state) {
@@ -2432,7 +2428,7 @@ static void fcoe_ctlr_vn_probe_req(struct fcoe_ctlr *fip,
2432 * Probe's REC bit is not set. 2428 * Probe's REC bit is not set.
2433 * If we don't reply, we will change our address. 2429 * If we don't reply, we will change our address.
2434 */ 2430 */
2435 if (fip->lp->wwpn > rdata->ids.port_name && 2431 if (fip->lp->wwpn > frport->rdata.ids.port_name &&
2436 !(frport->flags & FIP_FL_REC_OR_P2P)) { 2432 !(frport->flags & FIP_FL_REC_OR_P2P)) {
2437 LIBFCOE_FIP_DBG(fip, "vn_probe_req: " 2433 LIBFCOE_FIP_DBG(fip, "vn_probe_req: "
2438 "port_id collision\n"); 2434 "port_id collision\n");
@@ -2456,14 +2452,14 @@ static void fcoe_ctlr_vn_probe_req(struct fcoe_ctlr *fip,
2456/** 2452/**
2457 * fcoe_ctlr_vn_probe_reply() - handle incoming VN2VN probe reply. 2453 * fcoe_ctlr_vn_probe_reply() - handle incoming VN2VN probe reply.
2458 * @fip: The FCoE controller 2454 * @fip: The FCoE controller
2459 * @rdata: parsed remote port with frport from the probe request 2455 * @frport: parsed FCoE rport from the probe request
2460 * 2456 *
2461 * Called with ctlr_mutex held. 2457 * Called with ctlr_mutex held.
2462 */ 2458 */
2463static void fcoe_ctlr_vn_probe_reply(struct fcoe_ctlr *fip, 2459static void fcoe_ctlr_vn_probe_reply(struct fcoe_ctlr *fip,
2464 struct fc_rport_priv *rdata) 2460 struct fcoe_rport *frport)
2465{ 2461{
2466 if (rdata->ids.port_id != fip->port_id) 2462 if (frport->rdata.ids.port_id != fip->port_id)
2467 return; 2463 return;
2468 switch (fip->state) { 2464 switch (fip->state) {
2469 case FIP_ST_VNMP_START: 2465 case FIP_ST_VNMP_START:
@@ -2486,11 +2482,11 @@ static void fcoe_ctlr_vn_probe_reply(struct fcoe_ctlr *fip,
2486/** 2482/**
2487 * fcoe_ctlr_vn_add() - Add a VN2VN entry to the list, based on a claim reply. 2483 * fcoe_ctlr_vn_add() - Add a VN2VN entry to the list, based on a claim reply.
2488 * @fip: The FCoE controller 2484 * @fip: The FCoE controller
2489 * @new: newly-parsed remote port with frport as a template for new rdata 2485 * @new: newly-parsed FCoE rport as a template for new rdata
2490 * 2486 *
2491 * Called with ctlr_mutex held. 2487 * Called with ctlr_mutex held.
2492 */ 2488 */
2493static void fcoe_ctlr_vn_add(struct fcoe_ctlr *fip, struct fc_rport_priv *new) 2489static void fcoe_ctlr_vn_add(struct fcoe_ctlr *fip, struct fcoe_rport *new)
2494{ 2490{
2495 struct fc_lport *lport = fip->lp; 2491 struct fc_lport *lport = fip->lp;
2496 struct fc_rport_priv *rdata; 2492 struct fc_rport_priv *rdata;
@@ -2498,7 +2494,7 @@ static void fcoe_ctlr_vn_add(struct fcoe_ctlr *fip, struct fc_rport_priv *new)
2498 struct fcoe_rport *frport; 2494 struct fcoe_rport *frport;
2499 u32 port_id; 2495 u32 port_id;
2500 2496
2501 port_id = new->ids.port_id; 2497 port_id = new->rdata.ids.port_id;
2502 if (port_id == fip->port_id) 2498 if (port_id == fip->port_id)
2503 return; 2499 return;
2504 2500
@@ -2515,22 +2511,28 @@ static void fcoe_ctlr_vn_add(struct fcoe_ctlr *fip, struct fc_rport_priv *new)
2515 rdata->disc_id = lport->disc.disc_id; 2511 rdata->disc_id = lport->disc.disc_id;
2516 2512
2517 ids = &rdata->ids; 2513 ids = &rdata->ids;
2518 if ((ids->port_name != -1 && ids->port_name != new->ids.port_name) || 2514 if ((ids->port_name != -1 &&
2519 (ids->node_name != -1 && ids->node_name != new->ids.node_name)) { 2515 ids->port_name != new->rdata.ids.port_name) ||
2516 (ids->node_name != -1 &&
2517 ids->node_name != new->rdata.ids.node_name)) {
2520 mutex_unlock(&rdata->rp_mutex); 2518 mutex_unlock(&rdata->rp_mutex);
2521 LIBFCOE_FIP_DBG(fip, "vn_add rport logoff %6.6x\n", port_id); 2519 LIBFCOE_FIP_DBG(fip, "vn_add rport logoff %6.6x\n", port_id);
2522 fc_rport_logoff(rdata); 2520 fc_rport_logoff(rdata);
2523 mutex_lock(&rdata->rp_mutex); 2521 mutex_lock(&rdata->rp_mutex);
2524 } 2522 }
2525 ids->port_name = new->ids.port_name; 2523 ids->port_name = new->rdata.ids.port_name;
2526 ids->node_name = new->ids.node_name; 2524 ids->node_name = new->rdata.ids.node_name;
2527 mutex_unlock(&rdata->rp_mutex); 2525 mutex_unlock(&rdata->rp_mutex);
2528 2526
2529 frport = fcoe_ctlr_rport(rdata); 2527 frport = fcoe_ctlr_rport(rdata);
2530 LIBFCOE_FIP_DBG(fip, "vn_add rport %6.6x %s state %d\n", 2528 LIBFCOE_FIP_DBG(fip, "vn_add rport %6.6x %s state %d\n",
2531 port_id, frport->fcoe_len ? "old" : "new", 2529 port_id, frport->fcoe_len ? "old" : "new",
2532 rdata->rp_state); 2530 rdata->rp_state);
2533 *frport = *fcoe_ctlr_rport(new); 2531 frport->fcoe_len = new->fcoe_len;
2532 frport->flags = new->flags;
2533 frport->login_count = new->login_count;
2534 memcpy(frport->enode_mac, new->enode_mac, ETH_ALEN);
2535 memcpy(frport->vn_mac, new->vn_mac, ETH_ALEN);
2534 frport->time = 0; 2536 frport->time = 0;
2535} 2537}
2536 2538
@@ -2562,16 +2564,14 @@ static int fcoe_ctlr_vn_lookup(struct fcoe_ctlr *fip, u32 port_id, u8 *mac)
2562/** 2564/**
2563 * fcoe_ctlr_vn_claim_notify() - handle received FIP VN2VN Claim Notification 2565 * fcoe_ctlr_vn_claim_notify() - handle received FIP VN2VN Claim Notification
2564 * @fip: The FCoE controller 2566 * @fip: The FCoE controller
2565 * @new: newly-parsed remote port with frport as a template for new rdata 2567 * @new: newly-parsed FCoE rport as a template for new rdata
2566 * 2568 *
2567 * Called with ctlr_mutex held. 2569 * Called with ctlr_mutex held.
2568 */ 2570 */
2569static void fcoe_ctlr_vn_claim_notify(struct fcoe_ctlr *fip, 2571static void fcoe_ctlr_vn_claim_notify(struct fcoe_ctlr *fip,
2570 struct fc_rport_priv *new) 2572 struct fcoe_rport *new)
2571{ 2573{
2572 struct fcoe_rport *frport = fcoe_ctlr_rport(new); 2574 if (new->flags & FIP_FL_REC_OR_P2P) {
2573
2574 if (frport->flags & FIP_FL_REC_OR_P2P) {
2575 LIBFCOE_FIP_DBG(fip, "send probe req for P2P/REC\n"); 2575 LIBFCOE_FIP_DBG(fip, "send probe req for P2P/REC\n");
2576 fcoe_ctlr_vn_send(fip, FIP_SC_VN_PROBE_REQ, fcoe_all_vn2vn, 0); 2576 fcoe_ctlr_vn_send(fip, FIP_SC_VN_PROBE_REQ, fcoe_all_vn2vn, 0);
2577 return; 2577 return;
@@ -2580,7 +2580,7 @@ static void fcoe_ctlr_vn_claim_notify(struct fcoe_ctlr *fip,
2580 case FIP_ST_VNMP_START: 2580 case FIP_ST_VNMP_START:
2581 case FIP_ST_VNMP_PROBE1: 2581 case FIP_ST_VNMP_PROBE1:
2582 case FIP_ST_VNMP_PROBE2: 2582 case FIP_ST_VNMP_PROBE2:
2583 if (new->ids.port_id == fip->port_id) { 2583 if (new->rdata.ids.port_id == fip->port_id) {
2584 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: " 2584 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: "
2585 "restart, state %d\n", 2585 "restart, state %d\n",
2586 fip->state); 2586 fip->state);
@@ -2589,8 +2589,8 @@ static void fcoe_ctlr_vn_claim_notify(struct fcoe_ctlr *fip,
2589 break; 2589 break;
2590 case FIP_ST_VNMP_CLAIM: 2590 case FIP_ST_VNMP_CLAIM:
2591 case FIP_ST_VNMP_UP: 2591 case FIP_ST_VNMP_UP:
2592 if (new->ids.port_id == fip->port_id) { 2592 if (new->rdata.ids.port_id == fip->port_id) {
2593 if (new->ids.port_name > fip->lp->wwpn) { 2593 if (new->rdata.ids.port_name > fip->lp->wwpn) {
2594 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: " 2594 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: "
2595 "restart, port_id collision\n"); 2595 "restart, port_id collision\n");
2596 fcoe_ctlr_vn_restart(fip); 2596 fcoe_ctlr_vn_restart(fip);
@@ -2602,15 +2602,16 @@ static void fcoe_ctlr_vn_claim_notify(struct fcoe_ctlr *fip,
2602 break; 2602 break;
2603 } 2603 }
2604 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: send reply to %x\n", 2604 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: send reply to %x\n",
2605 new->ids.port_id); 2605 new->rdata.ids.port_id);
2606 fcoe_ctlr_vn_send(fip, FIP_SC_VN_CLAIM_REP, frport->enode_mac, 2606 fcoe_ctlr_vn_send(fip, FIP_SC_VN_CLAIM_REP, new->enode_mac,
2607 min((u32)frport->fcoe_len, 2607 min((u32)new->fcoe_len,
2608 fcoe_ctlr_fcoe_size(fip))); 2608 fcoe_ctlr_fcoe_size(fip)));
2609 fcoe_ctlr_vn_add(fip, new); 2609 fcoe_ctlr_vn_add(fip, new);
2610 break; 2610 break;
2611 default: 2611 default:
2612 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: " 2612 LIBFCOE_FIP_DBG(fip, "vn_claim_notify: "
2613 "ignoring claim from %x\n", new->ids.port_id); 2613 "ignoring claim from %x\n",
2614 new->rdata.ids.port_id);
2614 break; 2615 break;
2615 } 2616 }
2616} 2617}
@@ -2618,15 +2619,15 @@ static void fcoe_ctlr_vn_claim_notify(struct fcoe_ctlr *fip,
2618/** 2619/**
2619 * fcoe_ctlr_vn_claim_resp() - handle received Claim Response 2620 * fcoe_ctlr_vn_claim_resp() - handle received Claim Response
2620 * @fip: The FCoE controller that received the frame 2621 * @fip: The FCoE controller that received the frame
2621 * @new: newly-parsed remote port with frport from the Claim Response 2622 * @new: newly-parsed FCoE rport from the Claim Response
2622 * 2623 *
2623 * Called with ctlr_mutex held. 2624 * Called with ctlr_mutex held.
2624 */ 2625 */
2625static void fcoe_ctlr_vn_claim_resp(struct fcoe_ctlr *fip, 2626static void fcoe_ctlr_vn_claim_resp(struct fcoe_ctlr *fip,
2626 struct fc_rport_priv *new) 2627 struct fcoe_rport *new)
2627{ 2628{
2628 LIBFCOE_FIP_DBG(fip, "claim resp from from rport %x - state %s\n", 2629 LIBFCOE_FIP_DBG(fip, "claim resp from from rport %x - state %s\n",
2629 new->ids.port_id, fcoe_ctlr_state(fip->state)); 2630 new->rdata.ids.port_id, fcoe_ctlr_state(fip->state));
2630 if (fip->state == FIP_ST_VNMP_UP || fip->state == FIP_ST_VNMP_CLAIM) 2631 if (fip->state == FIP_ST_VNMP_UP || fip->state == FIP_ST_VNMP_CLAIM)
2631 fcoe_ctlr_vn_add(fip, new); 2632 fcoe_ctlr_vn_add(fip, new);
2632} 2633}
@@ -2634,28 +2635,28 @@ static void fcoe_ctlr_vn_claim_resp(struct fcoe_ctlr *fip,
2634/** 2635/**
2635 * fcoe_ctlr_vn_beacon() - handle received beacon. 2636 * fcoe_ctlr_vn_beacon() - handle received beacon.
2636 * @fip: The FCoE controller that received the frame 2637 * @fip: The FCoE controller that received the frame
2637 * @new: newly-parsed remote port with frport from the Beacon 2638 * @new: newly-parsed FCoE rport from the Beacon
2638 * 2639 *
2639 * Called with ctlr_mutex held. 2640 * Called with ctlr_mutex held.
2640 */ 2641 */
2641static void fcoe_ctlr_vn_beacon(struct fcoe_ctlr *fip, 2642static void fcoe_ctlr_vn_beacon(struct fcoe_ctlr *fip,
2642 struct fc_rport_priv *new) 2643 struct fcoe_rport *new)
2643{ 2644{
2644 struct fc_lport *lport = fip->lp; 2645 struct fc_lport *lport = fip->lp;
2645 struct fc_rport_priv *rdata; 2646 struct fc_rport_priv *rdata;
2646 struct fcoe_rport *frport; 2647 struct fcoe_rport *frport;
2647 2648
2648 frport = fcoe_ctlr_rport(new); 2649 if (new->flags & FIP_FL_REC_OR_P2P) {
2649 if (frport->flags & FIP_FL_REC_OR_P2P) {
2650 LIBFCOE_FIP_DBG(fip, "p2p beacon while in vn2vn mode\n"); 2650 LIBFCOE_FIP_DBG(fip, "p2p beacon while in vn2vn mode\n");
2651 fcoe_ctlr_vn_send(fip, FIP_SC_VN_PROBE_REQ, fcoe_all_vn2vn, 0); 2651 fcoe_ctlr_vn_send(fip, FIP_SC_VN_PROBE_REQ, fcoe_all_vn2vn, 0);
2652 return; 2652 return;
2653 } 2653 }
2654 rdata = fc_rport_lookup(lport, new->ids.port_id); 2654 rdata = fc_rport_lookup(lport, new->rdata.ids.port_id);
2655 if (rdata) { 2655 if (rdata) {
2656 if (rdata->ids.node_name == new->ids.node_name && 2656 if (rdata->ids.node_name == new->rdata.ids.node_name &&
2657 rdata->ids.port_name == new->ids.port_name) { 2657 rdata->ids.port_name == new->rdata.ids.port_name) {
2658 frport = fcoe_ctlr_rport(rdata); 2658 frport = fcoe_ctlr_rport(rdata);
2659
2659 LIBFCOE_FIP_DBG(fip, "beacon from rport %x\n", 2660 LIBFCOE_FIP_DBG(fip, "beacon from rport %x\n",
2660 rdata->ids.port_id); 2661 rdata->ids.port_id);
2661 if (!frport->time && fip->state == FIP_ST_VNMP_UP) { 2662 if (!frport->time && fip->state == FIP_ST_VNMP_UP) {
@@ -2678,7 +2679,7 @@ static void fcoe_ctlr_vn_beacon(struct fcoe_ctlr *fip,
2678 * Don't add the neighbor yet. 2679 * Don't add the neighbor yet.
2679 */ 2680 */
2680 LIBFCOE_FIP_DBG(fip, "beacon from new rport %x. sending claim notify\n", 2681 LIBFCOE_FIP_DBG(fip, "beacon from new rport %x. sending claim notify\n",
2681 new->ids.port_id); 2682 new->rdata.ids.port_id);
2682 if (time_after(jiffies, 2683 if (time_after(jiffies,
2683 fip->sol_time + msecs_to_jiffies(FIP_VN_ANN_WAIT))) 2684 fip->sol_time + msecs_to_jiffies(FIP_VN_ANN_WAIT)))
2684 fcoe_ctlr_vn_send_claim(fip); 2685 fcoe_ctlr_vn_send_claim(fip);
@@ -2738,10 +2739,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
2738{ 2739{
2739 struct fip_header *fiph; 2740 struct fip_header *fiph;
2740 enum fip_vn2vn_subcode sub; 2741 enum fip_vn2vn_subcode sub;
2741 struct { 2742 struct fcoe_rport frport = { };
2742 struct fc_rport_priv rdata;
2743 struct fcoe_rport frport;
2744 } buf;
2745 int rc, vlan_id = 0; 2743 int rc, vlan_id = 0;
2746 2744
2747 fiph = (struct fip_header *)skb->data; 2745 fiph = (struct fip_header *)skb->data;
@@ -2757,7 +2755,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
2757 goto drop; 2755 goto drop;
2758 } 2756 }
2759 2757
2760 rc = fcoe_ctlr_vn_parse(fip, skb, &buf.rdata); 2758 rc = fcoe_ctlr_vn_parse(fip, skb, &frport);
2761 if (rc) { 2759 if (rc) {
2762 LIBFCOE_FIP_DBG(fip, "vn_recv vn_parse error %d\n", rc); 2760 LIBFCOE_FIP_DBG(fip, "vn_recv vn_parse error %d\n", rc);
2763 goto drop; 2761 goto drop;
@@ -2766,19 +2764,19 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
2766 mutex_lock(&fip->ctlr_mutex); 2764 mutex_lock(&fip->ctlr_mutex);
2767 switch (sub) { 2765 switch (sub) {
2768 case FIP_SC_VN_PROBE_REQ: 2766 case FIP_SC_VN_PROBE_REQ:
2769 fcoe_ctlr_vn_probe_req(fip, &buf.rdata); 2767 fcoe_ctlr_vn_probe_req(fip, &frport);
2770 break; 2768 break;
2771 case FIP_SC_VN_PROBE_REP: 2769 case FIP_SC_VN_PROBE_REP:
2772 fcoe_ctlr_vn_probe_reply(fip, &buf.rdata); 2770 fcoe_ctlr_vn_probe_reply(fip, &frport);
2773 break; 2771 break;
2774 case FIP_SC_VN_CLAIM_NOTIFY: 2772 case FIP_SC_VN_CLAIM_NOTIFY:
2775 fcoe_ctlr_vn_claim_notify(fip, &buf.rdata); 2773 fcoe_ctlr_vn_claim_notify(fip, &frport);
2776 break; 2774 break;
2777 case FIP_SC_VN_CLAIM_REP: 2775 case FIP_SC_VN_CLAIM_REP:
2778 fcoe_ctlr_vn_claim_resp(fip, &buf.rdata); 2776 fcoe_ctlr_vn_claim_resp(fip, &frport);
2779 break; 2777 break;
2780 case FIP_SC_VN_BEACON: 2778 case FIP_SC_VN_BEACON:
2781 fcoe_ctlr_vn_beacon(fip, &buf.rdata); 2779 fcoe_ctlr_vn_beacon(fip, &frport);
2782 break; 2780 break;
2783 default: 2781 default:
2784 LIBFCOE_FIP_DBG(fip, "vn_recv unknown subcode %d\n", sub); 2782 LIBFCOE_FIP_DBG(fip, "vn_recv unknown subcode %d\n", sub);
@@ -2802,22 +2800,18 @@ drop:
2802 */ 2800 */
2803static int fcoe_ctlr_vlan_parse(struct fcoe_ctlr *fip, 2801static int fcoe_ctlr_vlan_parse(struct fcoe_ctlr *fip,
2804 struct sk_buff *skb, 2802 struct sk_buff *skb,
2805 struct fc_rport_priv *rdata) 2803 struct fcoe_rport *frport)
2806{ 2804{
2807 struct fip_header *fiph; 2805 struct fip_header *fiph;
2808 struct fip_desc *desc = NULL; 2806 struct fip_desc *desc = NULL;
2809 struct fip_mac_desc *macd = NULL; 2807 struct fip_mac_desc *macd = NULL;
2810 struct fip_wwn_desc *wwn = NULL; 2808 struct fip_wwn_desc *wwn = NULL;
2811 struct fcoe_rport *frport;
2812 size_t rlen; 2809 size_t rlen;
2813 size_t dlen; 2810 size_t dlen;
2814 u32 desc_mask = 0; 2811 u32 desc_mask = 0;
2815 u32 dtype; 2812 u32 dtype;
2816 u8 sub; 2813 u8 sub;
2817 2814
2818 memset(rdata, 0, sizeof(*rdata) + sizeof(*frport));
2819 frport = fcoe_ctlr_rport(rdata);
2820
2821 fiph = (struct fip_header *)skb->data; 2815 fiph = (struct fip_header *)skb->data;
2822 frport->flags = ntohs(fiph->fip_flags); 2816 frport->flags = ntohs(fiph->fip_flags);
2823 2817
@@ -2871,7 +2865,8 @@ static int fcoe_ctlr_vlan_parse(struct fcoe_ctlr *fip,
2871 if (dlen != sizeof(struct fip_wwn_desc)) 2865 if (dlen != sizeof(struct fip_wwn_desc))
2872 goto len_err; 2866 goto len_err;
2873 wwn = (struct fip_wwn_desc *)desc; 2867 wwn = (struct fip_wwn_desc *)desc;
2874 rdata->ids.node_name = get_unaligned_be64(&wwn->fd_wwn); 2868 frport->rdata.ids.node_name =
2869 get_unaligned_be64(&wwn->fd_wwn);
2875 break; 2870 break;
2876 default: 2871 default:
2877 LIBFCOE_FIP_DBG(fip, "unexpected descriptor type %x " 2872 LIBFCOE_FIP_DBG(fip, "unexpected descriptor type %x "
@@ -2957,13 +2952,13 @@ static void fcoe_ctlr_vlan_send(struct fcoe_ctlr *fip,
2957/** 2952/**
2958 * fcoe_ctlr_vlan_disk_reply() - send FIP VLAN Discovery Notification. 2953 * fcoe_ctlr_vlan_disk_reply() - send FIP VLAN Discovery Notification.
2959 * @fip: The FCoE controller 2954 * @fip: The FCoE controller
2955 * @frport: The newly-parsed FCoE rport from the Discovery Request
2960 * 2956 *
2961 * Called with ctlr_mutex held. 2957 * Called with ctlr_mutex held.
2962 */ 2958 */
2963static void fcoe_ctlr_vlan_disc_reply(struct fcoe_ctlr *fip, 2959static void fcoe_ctlr_vlan_disc_reply(struct fcoe_ctlr *fip,
2964 struct fc_rport_priv *rdata) 2960 struct fcoe_rport *frport)
2965{ 2961{
2966 struct fcoe_rport *frport = fcoe_ctlr_rport(rdata);
2967 enum fip_vlan_subcode sub = FIP_SC_VL_NOTE; 2962 enum fip_vlan_subcode sub = FIP_SC_VL_NOTE;
2968 2963
2969 if (fip->mode == FIP_MODE_VN2VN) 2964 if (fip->mode == FIP_MODE_VN2VN)
@@ -2982,22 +2977,19 @@ static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
2982{ 2977{
2983 struct fip_header *fiph; 2978 struct fip_header *fiph;
2984 enum fip_vlan_subcode sub; 2979 enum fip_vlan_subcode sub;
2985 struct { 2980 struct fcoe_rport frport = { };
2986 struct fc_rport_priv rdata;
2987 struct fcoe_rport frport;
2988 } buf;
2989 int rc; 2981 int rc;
2990 2982
2991 fiph = (struct fip_header *)skb->data; 2983 fiph = (struct fip_header *)skb->data;
2992 sub = fiph->fip_subcode; 2984 sub = fiph->fip_subcode;
2993 rc = fcoe_ctlr_vlan_parse(fip, skb, &buf.rdata); 2985 rc = fcoe_ctlr_vlan_parse(fip, skb, &frport);
2994 if (rc) { 2986 if (rc) {
2995 LIBFCOE_FIP_DBG(fip, "vlan_recv vlan_parse error %d\n", rc); 2987 LIBFCOE_FIP_DBG(fip, "vlan_recv vlan_parse error %d\n", rc);
2996 goto drop; 2988 goto drop;
2997 } 2989 }
2998 mutex_lock(&fip->ctlr_mutex); 2990 mutex_lock(&fip->ctlr_mutex);
2999 if (sub == FIP_SC_VL_REQ) 2991 if (sub == FIP_SC_VL_REQ)
3000 fcoe_ctlr_vlan_disc_reply(fip, &buf.rdata); 2992 fcoe_ctlr_vlan_disc_reply(fip, &frport);
3001 mutex_unlock(&fip->ctlr_mutex); 2993 mutex_unlock(&fip->ctlr_mutex);
3002 2994
3003drop: 2995drop:
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index eaf6177ac9ee..1bb6aada93fa 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2334,6 +2334,8 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h,
2334 case IOACCEL2_SERV_RESPONSE_COMPLETE: 2334 case IOACCEL2_SERV_RESPONSE_COMPLETE:
2335 switch (c2->error_data.status) { 2335 switch (c2->error_data.status) {
2336 case IOACCEL2_STATUS_SR_TASK_COMP_GOOD: 2336 case IOACCEL2_STATUS_SR_TASK_COMP_GOOD:
2337 if (cmd)
2338 cmd->result = 0;
2337 break; 2339 break;
2338 case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND: 2340 case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND:
2339 cmd->result |= SAM_STAT_CHECK_CONDITION; 2341 cmd->result |= SAM_STAT_CHECK_CONDITION;
@@ -2483,8 +2485,10 @@ static void process_ioaccel2_completion(struct ctlr_info *h,
2483 2485
2484 /* check for good status */ 2486 /* check for good status */
2485 if (likely(c2->error_data.serv_response == 0 && 2487 if (likely(c2->error_data.serv_response == 0 &&
2486 c2->error_data.status == 0)) 2488 c2->error_data.status == 0)) {
2489 cmd->result = 0;
2487 return hpsa_cmd_free_and_done(h, c, cmd); 2490 return hpsa_cmd_free_and_done(h, c, cmd);
2491 }
2488 2492
2489 /* 2493 /*
2490 * Any RAID offload error results in retry which will use 2494 * Any RAID offload error results in retry which will use
@@ -5654,6 +5658,12 @@ static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
5654 return SCSI_MLQUEUE_DEVICE_BUSY; 5658 return SCSI_MLQUEUE_DEVICE_BUSY;
5655 5659
5656 /* 5660 /*
5661 * This is necessary because the SML doesn't zero out this field during
5662 * error recovery.
5663 */
5664 cmd->result = 0;
5665
5666 /*
5657 * Call alternate submit routine for I/O accelerated commands. 5667 * Call alternate submit routine for I/O accelerated commands.
5658 * Retries always go down the normal I/O path. 5668 * Retries always go down the normal I/O path.
5659 */ 5669 */
@@ -6081,8 +6091,6 @@ static struct CommandList *cmd_tagged_alloc(struct ctlr_info *h,
6081 if (idx != h->last_collision_tag) { /* Print once per tag */ 6091 if (idx != h->last_collision_tag) { /* Print once per tag */
6082 dev_warn(&h->pdev->dev, 6092 dev_warn(&h->pdev->dev,
6083 "%s: tag collision (tag=%d)\n", __func__, idx); 6093 "%s: tag collision (tag=%d)\n", __func__, idx);
6084 if (c->scsi_cmd != NULL)
6085 scsi_print_command(c->scsi_cmd);
6086 if (scmd) 6094 if (scmd)
6087 scsi_print_command(scmd); 6095 scsi_print_command(scmd);
6088 h->last_collision_tag = idx; 6096 h->last_collision_tag = idx;
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index e0f3852fdad1..da6e97d8dc3b 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -128,6 +128,7 @@ EXPORT_SYMBOL(fc_rport_lookup);
128struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, u32 port_id) 128struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, u32 port_id)
129{ 129{
130 struct fc_rport_priv *rdata; 130 struct fc_rport_priv *rdata;
131 size_t rport_priv_size = sizeof(*rdata);
131 132
132 lockdep_assert_held(&lport->disc.disc_mutex); 133 lockdep_assert_held(&lport->disc.disc_mutex);
133 134
@@ -135,7 +136,9 @@ struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, u32 port_id)
135 if (rdata) 136 if (rdata)
136 return rdata; 137 return rdata;
137 138
138 rdata = kzalloc(sizeof(*rdata) + lport->rport_priv_size, GFP_KERNEL); 139 if (lport->rport_priv_size > 0)
140 rport_priv_size = lport->rport_priv_size;
141 rdata = kzalloc(rport_priv_size, GFP_KERNEL);
139 if (!rdata) 142 if (!rdata)
140 return NULL; 143 return NULL;
141 144
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 684662888792..050c0f029ef9 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2703,6 +2703,8 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)
2703{ 2703{
2704 u64 required_mask, coherent_mask; 2704 u64 required_mask, coherent_mask;
2705 struct sysinfo s; 2705 struct sysinfo s;
2706 /* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
2707 int dma_mask = (ioc->hba_mpi_version_belonged > MPI2_VERSION) ? 63 : 64;
2706 2708
2707 if (ioc->is_mcpu_endpoint) 2709 if (ioc->is_mcpu_endpoint)
2708 goto try_32bit; 2710 goto try_32bit;
@@ -2712,17 +2714,17 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)
2712 goto try_32bit; 2714 goto try_32bit;
2713 2715
2714 if (ioc->dma_mask) 2716 if (ioc->dma_mask)
2715 coherent_mask = DMA_BIT_MASK(64); 2717 coherent_mask = DMA_BIT_MASK(dma_mask);
2716 else 2718 else
2717 coherent_mask = DMA_BIT_MASK(32); 2719 coherent_mask = DMA_BIT_MASK(32);
2718 2720
2719 if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) || 2721 if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(dma_mask)) ||
2720 dma_set_coherent_mask(&pdev->dev, coherent_mask)) 2722 dma_set_coherent_mask(&pdev->dev, coherent_mask))
2721 goto try_32bit; 2723 goto try_32bit;
2722 2724
2723 ioc->base_add_sg_single = &_base_add_sg_single_64; 2725 ioc->base_add_sg_single = &_base_add_sg_single_64;
2724 ioc->sge_size = sizeof(Mpi2SGESimple64_t); 2726 ioc->sge_size = sizeof(Mpi2SGESimple64_t);
2725 ioc->dma_mask = 64; 2727 ioc->dma_mask = dma_mask;
2726 goto out; 2728 goto out;
2727 2729
2728 try_32bit: 2730 try_32bit:
@@ -2744,7 +2746,7 @@ static int
2744_base_change_consistent_dma_mask(struct MPT3SAS_ADAPTER *ioc, 2746_base_change_consistent_dma_mask(struct MPT3SAS_ADAPTER *ioc,
2745 struct pci_dev *pdev) 2747 struct pci_dev *pdev)
2746{ 2748{
2747 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { 2749 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(ioc->dma_mask))) {
2748 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) 2750 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
2749 return -ENODEV; 2751 return -ENODEV;
2750 } 2752 }
@@ -4989,7 +4991,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc)
4989 total_sz += sz; 4991 total_sz += sz;
4990 } while (ioc->rdpq_array_enable && (++i < ioc->reply_queue_count)); 4992 } while (ioc->rdpq_array_enable && (++i < ioc->reply_queue_count));
4991 4993
4992 if (ioc->dma_mask == 64) { 4994 if (ioc->dma_mask > 32) {
4993 if (_base_change_consistent_dma_mask(ioc, ioc->pdev) != 0) { 4995 if (_base_change_consistent_dma_mask(ioc, ioc->pdev) != 0) {
4994 ioc_warn(ioc, "no suitable consistent DMA mask for %s\n", 4996 ioc_warn(ioc, "no suitable consistent DMA mask for %s\n",
4995 pci_name(ioc->pdev)); 4997 pci_name(ioc->pdev));
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 4059655639d9..da83034d4759 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -4877,7 +4877,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
4877 ql_log(ql_log_warn, vha, 0xd049, 4877 ql_log(ql_log_warn, vha, 0xd049,
4878 "Failed to allocate ct_sns request.\n"); 4878 "Failed to allocate ct_sns request.\n");
4879 kfree(fcport); 4879 kfree(fcport);
4880 fcport = NULL; 4880 return NULL;
4881 } 4881 }
4882 4882
4883 INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn); 4883 INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn);
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 2d64b53f947c..9b87e1a1c646 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -115,7 +115,7 @@ struct fc_disc_port {
115 struct fc_lport *lp; 115 struct fc_lport *lp;
116 struct list_head peers; 116 struct list_head peers;
117 struct work_struct rport_work; 117 struct work_struct rport_work;
118 u32 port_id; 118 u32 port_id;
119}; 119};
120 120
121/** 121/**
@@ -155,14 +155,14 @@ struct fc_rport_operations {
155 */ 155 */
156struct fc_rport_libfc_priv { 156struct fc_rport_libfc_priv {
157 struct fc_lport *local_port; 157 struct fc_lport *local_port;
158 enum fc_rport_state rp_state; 158 enum fc_rport_state rp_state;
159 u16 flags; 159 u16 flags;
160 #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0) 160 #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0)
161 #define FC_RP_FLAGS_RETRY (1 << 1) 161 #define FC_RP_FLAGS_RETRY (1 << 1)
162 #define FC_RP_STARTED (1 << 2) 162 #define FC_RP_STARTED (1 << 2)
163 #define FC_RP_FLAGS_CONF_REQ (1 << 3) 163 #define FC_RP_FLAGS_CONF_REQ (1 << 3)
164 unsigned int e_d_tov; 164 unsigned int e_d_tov;
165 unsigned int r_a_tov; 165 unsigned int r_a_tov;
166}; 166};
167 167
168/** 168/**
@@ -191,24 +191,24 @@ struct fc_rport_priv {
191 struct fc_lport *local_port; 191 struct fc_lport *local_port;
192 struct fc_rport *rport; 192 struct fc_rport *rport;
193 struct kref kref; 193 struct kref kref;
194 enum fc_rport_state rp_state; 194 enum fc_rport_state rp_state;
195 struct fc_rport_identifiers ids; 195 struct fc_rport_identifiers ids;
196 u16 flags; 196 u16 flags;
197 u16 max_seq; 197 u16 max_seq;
198 u16 disc_id; 198 u16 disc_id;
199 u16 maxframe_size; 199 u16 maxframe_size;
200 unsigned int retries; 200 unsigned int retries;
201 unsigned int major_retries; 201 unsigned int major_retries;
202 unsigned int e_d_tov; 202 unsigned int e_d_tov;
203 unsigned int r_a_tov; 203 unsigned int r_a_tov;
204 struct mutex rp_mutex; 204 struct mutex rp_mutex;
205 struct delayed_work retry_work; 205 struct delayed_work retry_work;
206 enum fc_rport_event event; 206 enum fc_rport_event event;
207 struct fc_rport_operations *ops; 207 struct fc_rport_operations *ops;
208 struct list_head peers; 208 struct list_head peers;
209 struct work_struct event_work; 209 struct work_struct event_work;
210 u32 supported_classes; 210 u32 supported_classes;
211 u16 prli_count; 211 u16 prli_count;
212 struct rcu_head rcu; 212 struct rcu_head rcu;
213 u16 sp_features; 213 u16 sp_features;
214 u8 spp_type; 214 u8 spp_type;
@@ -618,12 +618,12 @@ struct libfc_function_template {
618 * @disc_callback: Callback routine called when discovery completes 618 * @disc_callback: Callback routine called when discovery completes
619 */ 619 */
620struct fc_disc { 620struct fc_disc {
621 unsigned char retry_count; 621 unsigned char retry_count;
622 unsigned char pending; 622 unsigned char pending;
623 unsigned char requested; 623 unsigned char requested;
624 unsigned short seq_count; 624 unsigned short seq_count;
625 unsigned char buf_len; 625 unsigned char buf_len;
626 u16 disc_id; 626 u16 disc_id;
627 627
628 struct list_head rports; 628 struct list_head rports;
629 void *priv; 629 void *priv;
@@ -697,7 +697,7 @@ struct fc_lport {
697 struct fc_rport_priv *ms_rdata; 697 struct fc_rport_priv *ms_rdata;
698 struct fc_rport_priv *ptp_rdata; 698 struct fc_rport_priv *ptp_rdata;
699 void *scsi_priv; 699 void *scsi_priv;
700 struct fc_disc disc; 700 struct fc_disc disc;
701 701
702 /* Virtual port information */ 702 /* Virtual port information */
703 struct list_head vports; 703 struct list_head vports;
@@ -715,7 +715,7 @@ struct fc_lport {
715 u8 retry_count; 715 u8 retry_count;
716 716
717 /* Fabric information */ 717 /* Fabric information */
718 u32 port_id; 718 u32 port_id;
719 u64 wwpn; 719 u64 wwpn;
720 u64 wwnn; 720 u64 wwnn;
721 unsigned int service_params; 721 unsigned int service_params;
@@ -743,11 +743,11 @@ struct fc_lport {
743 struct fc_ns_fts fcts; 743 struct fc_ns_fts fcts;
744 744
745 /* Miscellaneous */ 745 /* Miscellaneous */
746 struct mutex lp_mutex; 746 struct mutex lp_mutex;
747 struct list_head list; 747 struct list_head list;
748 struct delayed_work retry_work; 748 struct delayed_work retry_work;
749 void *prov[FC_FC4_PROV_SIZE]; 749 void *prov[FC_FC4_PROV_SIZE];
750 struct list_head lport_list; 750 struct list_head lport_list;
751}; 751};
752 752
753/** 753/**
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index dc14b52577f7..2568cb0627ec 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -229,6 +229,7 @@ struct fcoe_fcf {
229 * @vn_mac: VN_Node assigned MAC address for data 229 * @vn_mac: VN_Node assigned MAC address for data
230 */ 230 */
231struct fcoe_rport { 231struct fcoe_rport {
232 struct fc_rport_priv rdata;
232 unsigned long time; 233 unsigned long time;
233 u16 fcoe_len; 234 u16 fcoe_len;
234 u16 flags; 235 u16 flags;