aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-03-25 14:31:35 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-25 14:31:35 -0400
commit8937b7349ca9e25a02b2a72ccb7fba404ddedc5b (patch)
tree434ffe23d318f8af55850a26c3431ce8b82ab6f4 /include
parent997302259f386bca8fe1db67c50296ca426c438f (diff)
parentffe7f95bb1a4d1e9ca5d252445dc38476e1a208e (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_edid.h2
-rw-r--r--include/linux/bio.h4
-rw-r--r--include/linux/capability.h6
-rw-r--r--include/linux/dca.h20
-rw-r--r--include/linux/ide.h1
-rw-r--r--include/linux/lockd/lockd.h8
-rw-r--r--include/linux/mm_types.h3
-rw-r--r--include/linux/nfs_xdr.h2
-rw-r--r--include/linux/nfsacl.h3
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/net/netfilter/nf_conntrack_core.h3
-rw-r--r--include/scsi/fc/fc_fcoe.h4
-rw-r--r--include/scsi/fc/fc_fs.h5
-rw-r--r--include/scsi/libfc.h138
-rw-r--r--include/scsi/libfcoe.h9
15 files changed, 136 insertions, 75 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index ff8d27af4786..a11cc9d32591 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -69,8 +69,8 @@ struct detailed_pixel_timing {
69 u8 hborder; 69 u8 hborder;
70 u8 vborder; 70 u8 vborder;
71 u8 unknown0:1; 71 u8 unknown0:1;
72 u8 vsync_positive:1;
73 u8 hsync_positive:1; 72 u8 hsync_positive:1;
73 u8 vsync_positive:1;
74 u8 separate_sync:2; 74 u8 separate_sync:2;
75 u8 stereo:1; 75 u8 stereo:1;
76 u8 unknown6:1; 76 u8 unknown6:1;
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 1b16108a5417..d8bd43bfdcf5 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -531,7 +531,7 @@ extern void bio_integrity_endio(struct bio *, int);
531extern void bio_integrity_advance(struct bio *, unsigned int); 531extern void bio_integrity_advance(struct bio *, unsigned int);
532extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); 532extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int);
533extern void bio_integrity_split(struct bio *, struct bio_pair *, int); 533extern void bio_integrity_split(struct bio *, struct bio_pair *, int);
534extern int bio_integrity_clone(struct bio *, struct bio *, struct bio_set *); 534extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *);
535extern int bioset_integrity_create(struct bio_set *, int); 535extern int bioset_integrity_create(struct bio_set *, int);
536extern void bioset_integrity_free(struct bio_set *); 536extern void bioset_integrity_free(struct bio_set *);
537extern void bio_integrity_init_slab(void); 537extern void bio_integrity_init_slab(void);
@@ -542,7 +542,7 @@ extern void bio_integrity_init_slab(void);
542#define bioset_integrity_create(a, b) (0) 542#define bioset_integrity_create(a, b) (0)
543#define bio_integrity_prep(a) (0) 543#define bio_integrity_prep(a) (0)
544#define bio_integrity_enabled(a) (0) 544#define bio_integrity_enabled(a) (0)
545#define bio_integrity_clone(a, b, c) (0) 545#define bio_integrity_clone(a, b, c,d ) (0)
546#define bioset_integrity_free(a) do { } while (0) 546#define bioset_integrity_free(a) do { } while (0)
547#define bio_integrity_free(a, b) do { } while (0) 547#define bio_integrity_free(a, b) do { } while (0)
548#define bio_integrity_endio(a, b) do { } while (0) 548#define bio_integrity_endio(a, b) do { } while (0)
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 1b9872556131..4864a43b2b45 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -393,8 +393,10 @@ struct cpu_vfs_cap_data {
393# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) 393# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }})
394# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) 394# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }})
395# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) 395# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } })
396# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ 396# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \
397 CAP_FS_MASK_B1 } }) 397 | CAP_TO_MASK(CAP_SYS_RESOURCE) \
398 | CAP_TO_MASK(CAP_MKNOD), \
399 CAP_FS_MASK_B1 } })
398 400
399#endif /* _KERNEL_CAPABILITY_U32S != 2 */ 401#endif /* _KERNEL_CAPABILITY_U32S != 2 */
400 402
diff --git a/include/linux/dca.h b/include/linux/dca.h
index b00a753eda53..9c20c7e87d0a 100644
--- a/include/linux/dca.h
+++ b/include/linux/dca.h
@@ -1,3 +1,23 @@
1/*
2 * Copyright(c) 2007 - 2009 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59
16 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called COPYING.
20 */
1#ifndef DCA_H 21#ifndef DCA_H
2#define DCA_H 22#define DCA_H
3/* DCA Provider API */ 23/* DCA Provider API */
diff --git a/include/linux/ide.h b/include/linux/ide.h
index e0cedfe9fad4..25087aead657 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -797,6 +797,7 @@ typedef struct hwif_s {
797 struct scatterlist *sg_table; 797 struct scatterlist *sg_table;
798 int sg_max_nents; /* Maximum number of entries in it */ 798 int sg_max_nents; /* Maximum number of entries in it */
799 int sg_nents; /* Current number of entries in it */ 799 int sg_nents; /* Current number of entries in it */
800 int orig_sg_nents;
800 int sg_dma_direction; /* dma transfer direction */ 801 int sg_dma_direction; /* dma transfer direction */
801 802
802 /* data phase of the active command (currently only valid for PIO/DMA) */ 803 /* data phase of the active command (currently only valid for PIO/DMA) */
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index aa6fe7026de7..51855dfd8adb 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -346,6 +346,7 @@ static inline int __nlm_cmp_addr4(const struct sockaddr *sap1,
346 return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; 346 return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr;
347} 347}
348 348
349#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
349static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, 350static inline int __nlm_cmp_addr6(const struct sockaddr *sap1,
350 const struct sockaddr *sap2) 351 const struct sockaddr *sap2)
351{ 352{
@@ -353,6 +354,13 @@ static inline int __nlm_cmp_addr6(const struct sockaddr *sap1,
353 const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2; 354 const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2;
354 return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr); 355 return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr);
355} 356}
357#else /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */
358static inline int __nlm_cmp_addr6(const struct sockaddr *sap1,
359 const struct sockaddr *sap2)
360{
361 return 0;
362}
363#endif /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */
356 364
357/* 365/*
358 * Compare two host addresses 366 * Compare two host addresses
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 92915e81443f..d84feb7bdbf0 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -276,4 +276,7 @@ struct mm_struct {
276#endif 276#endif
277}; 277};
278 278
279/* Future-safe accessor for struct mm_struct's cpu_vm_mask. */
280#define mm_cpumask(mm) (&(mm)->cpu_vm_mask)
281
279#endif /* _LINUX_MM_TYPES_H */ 282#endif /* _LINUX_MM_TYPES_H */
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index a550b528319f..2e5f00066afd 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -406,6 +406,8 @@ struct nfs3_setaclargs {
406 int mask; 406 int mask;
407 struct posix_acl * acl_access; 407 struct posix_acl * acl_access;
408 struct posix_acl * acl_default; 408 struct posix_acl * acl_default;
409 size_t len;
410 unsigned int npages;
409 struct page ** pages; 411 struct page ** pages;
410}; 412};
411 413
diff --git a/include/linux/nfsacl.h b/include/linux/nfsacl.h
index 54487a99beb8..43011b69297c 100644
--- a/include/linux/nfsacl.h
+++ b/include/linux/nfsacl.h
@@ -37,6 +37,9 @@
37#define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \ 37#define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \
38 >> PAGE_SHIFT) 38 >> PAGE_SHIFT)
39 39
40#define NFS_ACL_MAX_ENTRIES_INLINE (5)
41#define NFS_ACL_INLINE_BUFSIZE ((2*(2+3*NFS_ACL_MAX_ENTRIES_INLINE)) << 2)
42
40static inline unsigned int 43static inline unsigned int
41nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) 44nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default)
42{ 45{
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8c216e057c94..011db2f4c94c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1419,6 +1419,9 @@ struct task_struct {
1419#endif 1419#endif
1420}; 1420};
1421 1421
1422/* Future-safe accessor for struct task_struct's cpus_allowed. */
1423#define tsk_cpumask(tsk) (&(tsk)->cpus_allowed)
1424
1422/* 1425/*
1423 * Priority of a process goes from 0..MAX_PRIO-1, valid RT 1426 * Priority of a process goes from 0..MAX_PRIO-1, valid RT
1424 * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH 1427 * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index c25068e38516..5a449b44ba33 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -62,7 +62,8 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb)
62 if (ct && ct != &nf_conntrack_untracked) { 62 if (ct && ct != &nf_conntrack_untracked) {
63 if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) 63 if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct))
64 ret = __nf_conntrack_confirm(skb); 64 ret = __nf_conntrack_confirm(skb);
65 nf_ct_deliver_cached_events(ct); 65 if (likely(ret == NF_ACCEPT))
66 nf_ct_deliver_cached_events(ct);
66 } 67 }
67 return ret; 68 return ret;
68} 69}
diff --git a/include/scsi/fc/fc_fcoe.h b/include/scsi/fc/fc_fcoe.h
index 57aaa8f0d613..f271d9cc0fc2 100644
--- a/include/scsi/fc/fc_fcoe.h
+++ b/include/scsi/fc/fc_fcoe.h
@@ -31,10 +31,6 @@
31#define ETH_P_FCOE 0x8906 /* FCOE ether type */ 31#define ETH_P_FCOE 0x8906 /* FCOE ether type */
32#endif 32#endif
33 33
34#ifndef ETH_P_8021Q
35#define ETH_P_8021Q 0x8100
36#endif
37
38/* 34/*
39 * FC_FCOE_OUI hasn't been standardized yet. XXX TBD. 35 * FC_FCOE_OUI hasn't been standardized yet. XXX TBD.
40 */ 36 */
diff --git a/include/scsi/fc/fc_fs.h b/include/scsi/fc/fc_fs.h
index 3e4801d2bdbb..1b7af3a64c7c 100644
--- a/include/scsi/fc/fc_fs.h
+++ b/include/scsi/fc/fc_fs.h
@@ -337,4 +337,9 @@ enum fc_pf_rjt_reason {
337 FC_RJT_VENDOR = 0xff, /* vendor specific reject */ 337 FC_RJT_VENDOR = 0xff, /* vendor specific reject */
338}; 338};
339 339
340/* default timeout values */
341
342#define FC_DEF_E_D_TOV 2000UL
343#define FC_DEF_R_A_TOV 10000UL
344
340#endif /* _FC_FS_H_ */ 345#endif /* _FC_FS_H_ */
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 9f2876397dda..a2e126b86e3e 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -68,9 +68,6 @@
68/* 68/*
69 * FC HBA status 69 * FC HBA status
70 */ 70 */
71#define FC_PAUSE (1 << 1)
72#define FC_LINK_UP (1 << 0)
73
74enum fc_lport_state { 71enum fc_lport_state {
75 LPORT_ST_NONE = 0, 72 LPORT_ST_NONE = 0,
76 LPORT_ST_FLOGI, 73 LPORT_ST_FLOGI,
@@ -339,31 +336,17 @@ struct fc_exch {
339 336
340struct libfc_function_template { 337struct libfc_function_template {
341 338
342 /**
343 * Mandatory Fields
344 *
345 * These handlers must be implemented by the LLD.
346 */
347
348 /* 339 /*
349 * Interface to send a FC frame 340 * Interface to send a FC frame
350 */
351 int (*frame_send)(struct fc_lport *lp, struct fc_frame *fp);
352
353 /**
354 * Optional Fields
355 * 341 *
356 * The LLD may choose to implement any of the following handlers. 342 * STATUS: REQUIRED
357 * If LLD doesn't specify hander and leaves its pointer NULL then
358 * the default libfc function will be used for that handler.
359 */
360
361 /**
362 * ELS/CT interfaces
363 */ 343 */
344 int (*frame_send)(struct fc_lport *lp, struct fc_frame *fp);
364 345
365 /* 346 /*
366 * elsct_send - sends ELS/CT frame 347 * Interface to send ELS/CT frames
348 *
349 * STATUS: OPTIONAL
367 */ 350 */
368 struct fc_seq *(*elsct_send)(struct fc_lport *lport, 351 struct fc_seq *(*elsct_send)(struct fc_lport *lport,
369 struct fc_rport *rport, 352 struct fc_rport *rport,
@@ -373,9 +356,6 @@ struct libfc_function_template {
373 struct fc_frame *fp, 356 struct fc_frame *fp,
374 void *arg), 357 void *arg),
375 void *arg, u32 timer_msec); 358 void *arg, u32 timer_msec);
376 /**
377 * Exhance Manager interfaces
378 */
379 359
380 /* 360 /*
381 * Send the FC frame payload using a new exchange and sequence. 361 * Send the FC frame payload using a new exchange and sequence.
@@ -407,6 +387,8 @@ struct libfc_function_template {
407 * timer_msec argument is specified. The timer is canceled when 387 * timer_msec argument is specified. The timer is canceled when
408 * it fires or when the exchange is done. The exchange timeout handler 388 * it fires or when the exchange is done. The exchange timeout handler
409 * is registered by EM layer. 389 * is registered by EM layer.
390 *
391 * STATUS: OPTIONAL
410 */ 392 */
411 struct fc_seq *(*exch_seq_send)(struct fc_lport *lp, 393 struct fc_seq *(*exch_seq_send)(struct fc_lport *lp,
412 struct fc_frame *fp, 394 struct fc_frame *fp,
@@ -418,14 +400,18 @@ struct libfc_function_template {
418 void *arg, unsigned int timer_msec); 400 void *arg, unsigned int timer_msec);
419 401
420 /* 402 /*
421 * send a frame using existing sequence and exchange. 403 * Send a frame using an existing sequence and exchange.
404 *
405 * STATUS: OPTIONAL
422 */ 406 */
423 int (*seq_send)(struct fc_lport *lp, struct fc_seq *sp, 407 int (*seq_send)(struct fc_lport *lp, struct fc_seq *sp,
424 struct fc_frame *fp); 408 struct fc_frame *fp);
425 409
426 /* 410 /*
427 * Send ELS response using mainly infomation 411 * Send an ELS response using infomation from a previous
428 * in exchange and sequence in EM layer. 412 * exchange and sequence.
413 *
414 * STATUS: OPTIONAL
429 */ 415 */
430 void (*seq_els_rsp_send)(struct fc_seq *sp, enum fc_els_cmd els_cmd, 416 void (*seq_els_rsp_send)(struct fc_seq *sp, enum fc_els_cmd els_cmd,
431 struct fc_seq_els_data *els_data); 417 struct fc_seq_els_data *els_data);
@@ -437,6 +423,8 @@ struct libfc_function_template {
437 * A timer_msec can be specified for abort timeout, if non-zero 423 * A timer_msec can be specified for abort timeout, if non-zero
438 * timer_msec value is specified then exchange resp handler 424 * timer_msec value is specified then exchange resp handler
439 * will be called with timeout error if no response to abort. 425 * will be called with timeout error if no response to abort.
426 *
427 * STATUS: OPTIONAL
440 */ 428 */
441 int (*seq_exch_abort)(const struct fc_seq *req_sp, 429 int (*seq_exch_abort)(const struct fc_seq *req_sp,
442 unsigned int timer_msec); 430 unsigned int timer_msec);
@@ -444,6 +432,8 @@ struct libfc_function_template {
444 /* 432 /*
445 * Indicate that an exchange/sequence tuple is complete and the memory 433 * Indicate that an exchange/sequence tuple is complete and the memory
446 * allocated for the related objects may be freed. 434 * allocated for the related objects may be freed.
435 *
436 * STATUS: OPTIONAL
447 */ 437 */
448 void (*exch_done)(struct fc_seq *sp); 438 void (*exch_done)(struct fc_seq *sp);
449 439
@@ -451,6 +441,8 @@ struct libfc_function_template {
451 * Assigns a EM and a free XID for an new exchange and then 441 * Assigns a EM and a free XID for an new exchange and then
452 * allocates a new exchange and sequence pair. 442 * allocates a new exchange and sequence pair.
453 * The fp can be used to determine free XID. 443 * The fp can be used to determine free XID.
444 *
445 * STATUS: OPTIONAL
454 */ 446 */
455 struct fc_exch *(*exch_get)(struct fc_lport *lp, struct fc_frame *fp); 447 struct fc_exch *(*exch_get)(struct fc_lport *lp, struct fc_frame *fp);
456 448
@@ -458,12 +450,16 @@ struct libfc_function_template {
458 * Release previously assigned XID by exch_get API. 450 * Release previously assigned XID by exch_get API.
459 * The LLD may implement this if XID is assigned by LLD 451 * The LLD may implement this if XID is assigned by LLD
460 * in exch_get(). 452 * in exch_get().
453 *
454 * STATUS: OPTIONAL
461 */ 455 */
462 void (*exch_put)(struct fc_lport *lp, struct fc_exch_mgr *mp, 456 void (*exch_put)(struct fc_lport *lp, struct fc_exch_mgr *mp,
463 u16 ex_id); 457 u16 ex_id);
464 458
465 /* 459 /*
466 * Start a new sequence on the same exchange/sequence tuple. 460 * Start a new sequence on the same exchange/sequence tuple.
461 *
462 * STATUS: OPTIONAL
467 */ 463 */
468 struct fc_seq *(*seq_start_next)(struct fc_seq *sp); 464 struct fc_seq *(*seq_start_next)(struct fc_seq *sp);
469 465
@@ -471,26 +467,38 @@ struct libfc_function_template {
471 * Reset an exchange manager, completing all sequences and exchanges. 467 * Reset an exchange manager, completing all sequences and exchanges.
472 * If s_id is non-zero, reset only exchanges originating from that FID. 468 * If s_id is non-zero, reset only exchanges originating from that FID.
473 * If d_id is non-zero, reset only exchanges sending to that FID. 469 * If d_id is non-zero, reset only exchanges sending to that FID.
470 *
471 * STATUS: OPTIONAL
474 */ 472 */
475 void (*exch_mgr_reset)(struct fc_exch_mgr *, 473 void (*exch_mgr_reset)(struct fc_lport *,
476 u32 s_id, u32 d_id); 474 u32 s_id, u32 d_id);
477 475
478 void (*rport_flush_queue)(void); 476 /*
479 /** 477 * Flush the rport work queue. Generally used before shutdown.
480 * Local Port interfaces 478 *
479 * STATUS: OPTIONAL
481 */ 480 */
481 void (*rport_flush_queue)(void);
482 482
483 /* 483 /*
484 * Receive a frame to a local port. 484 * Receive a frame for a local port.
485 *
486 * STATUS: OPTIONAL
485 */ 487 */
486 void (*lport_recv)(struct fc_lport *lp, struct fc_seq *sp, 488 void (*lport_recv)(struct fc_lport *lp, struct fc_seq *sp,
487 struct fc_frame *fp); 489 struct fc_frame *fp);
488 490
491 /*
492 * Reset the local port.
493 *
494 * STATUS: OPTIONAL
495 */
489 int (*lport_reset)(struct fc_lport *); 496 int (*lport_reset)(struct fc_lport *);
490 497
491 /** 498 /*
492 * Remote Port interfaces 499 * Create a remote port
493 */ 500 */
501 struct fc_rport *(*rport_create)(struct fc_disc_port *);
494 502
495 /* 503 /*
496 * Initiates the RP state machine. It is called from the LP module. 504 * Initiates the RP state machine. It is called from the LP module.
@@ -500,26 +508,33 @@ struct libfc_function_template {
500 * - PLOGI 508 * - PLOGI
501 * - PRLI 509 * - PRLI
502 * - RTV 510 * - RTV
511 *
512 * STATUS: OPTIONAL
503 */ 513 */
504 int (*rport_login)(struct fc_rport *rport); 514 int (*rport_login)(struct fc_rport *rport);
505 515
506 /* 516 /*
507 * Logoff, and remove the rport from the transport if 517 * Logoff, and remove the rport from the transport if
508 * it had been added. This will send a LOGO to the target. 518 * it had been added. This will send a LOGO to the target.
519 *
520 * STATUS: OPTIONAL
509 */ 521 */
510 int (*rport_logoff)(struct fc_rport *rport); 522 int (*rport_logoff)(struct fc_rport *rport);
511 523
512 /* 524 /*
513 * Recieve a request from a remote port. 525 * Recieve a request from a remote port.
526 *
527 * STATUS: OPTIONAL
514 */ 528 */
515 void (*rport_recv_req)(struct fc_seq *, struct fc_frame *, 529 void (*rport_recv_req)(struct fc_seq *, struct fc_frame *,
516 struct fc_rport *); 530 struct fc_rport *);
517 531
518 struct fc_rport *(*rport_lookup)(const struct fc_lport *, u32); 532 /*
519 533 * lookup an rport by it's port ID.
520 /** 534 *
521 * FCP interfaces 535 * STATUS: OPTIONAL
522 */ 536 */
537 struct fc_rport *(*rport_lookup)(const struct fc_lport *, u32);
523 538
524 /* 539 /*
525 * Send a fcp cmd from fsp pkt. 540 * Send a fcp cmd from fsp pkt.
@@ -527,30 +542,38 @@ struct libfc_function_template {
527 * 542 *
528 * The resp handler is called when FCP_RSP received. 543 * The resp handler is called when FCP_RSP received.
529 * 544 *
545 * STATUS: OPTIONAL
530 */ 546 */
531 int (*fcp_cmd_send)(struct fc_lport *lp, struct fc_fcp_pkt *fsp, 547 int (*fcp_cmd_send)(struct fc_lport *lp, struct fc_fcp_pkt *fsp,
532 void (*resp)(struct fc_seq *, struct fc_frame *fp, 548 void (*resp)(struct fc_seq *, struct fc_frame *fp,
533 void *arg)); 549 void *arg));
534 550
535 /* 551 /*
536 * Used at least durring linkdown and reset 552 * Cleanup the FCP layer, used durring link down and reset
553 *
554 * STATUS: OPTIONAL
537 */ 555 */
538 void (*fcp_cleanup)(struct fc_lport *lp); 556 void (*fcp_cleanup)(struct fc_lport *lp);
539 557
540 /* 558 /*
541 * Abort all I/O on a local port 559 * Abort all I/O on a local port
560 *
561 * STATUS: OPTIONAL
542 */ 562 */
543 void (*fcp_abort_io)(struct fc_lport *lp); 563 void (*fcp_abort_io)(struct fc_lport *lp);
544 564
545 /** 565 /*
546 * Discovery interfaces 566 * Receive a request for the discovery layer.
567 *
568 * STATUS: OPTIONAL
547 */ 569 */
548
549 void (*disc_recv_req)(struct fc_seq *, 570 void (*disc_recv_req)(struct fc_seq *,
550 struct fc_frame *, struct fc_lport *); 571 struct fc_frame *, struct fc_lport *);
551 572
552 /* 573 /*
553 * Start discovery for a local port. 574 * Start discovery for a local port.
575 *
576 * STATUS: OPTIONAL
554 */ 577 */
555 void (*disc_start)(void (*disc_callback)(struct fc_lport *, 578 void (*disc_start)(void (*disc_callback)(struct fc_lport *,
556 enum fc_disc_event), 579 enum fc_disc_event),
@@ -559,6 +582,8 @@ struct libfc_function_template {
559 /* 582 /*
560 * Stop discovery for a given lport. This will remove 583 * Stop discovery for a given lport. This will remove
561 * all discovered rports 584 * all discovered rports
585 *
586 * STATUS: OPTIONAL
562 */ 587 */
563 void (*disc_stop) (struct fc_lport *); 588 void (*disc_stop) (struct fc_lport *);
564 589
@@ -566,6 +591,8 @@ struct libfc_function_template {
566 * Stop discovery for a given lport. This will block 591 * Stop discovery for a given lport. This will block
567 * until all discovered rports are deleted from the 592 * until all discovered rports are deleted from the
568 * FC transport class 593 * FC transport class
594 *
595 * STATUS: OPTIONAL
569 */ 596 */
570 void (*disc_stop_final) (struct fc_lport *); 597 void (*disc_stop_final) (struct fc_lport *);
571}; 598};
@@ -603,7 +630,8 @@ struct fc_lport {
603 630
604 /* Operational Information */ 631 /* Operational Information */
605 struct libfc_function_template tt; 632 struct libfc_function_template tt;
606 u16 link_status; 633 u8 link_up;
634 u8 qfull;
607 enum fc_lport_state state; 635 enum fc_lport_state state;
608 unsigned long boot_time; 636 unsigned long boot_time;
609 637
@@ -637,7 +665,7 @@ struct fc_lport {
637 struct delayed_work disc_work; 665 struct delayed_work disc_work;
638}; 666};
639 667
640/** 668/*
641 * FC_LPORT HELPER FUNCTIONS 669 * FC_LPORT HELPER FUNCTIONS
642 *****************************/ 670 *****************************/
643static inline void *lport_priv(const struct fc_lport *lp) 671static inline void *lport_priv(const struct fc_lport *lp)
@@ -669,7 +697,7 @@ static inline void fc_lport_state_enter(struct fc_lport *lp,
669} 697}
670 698
671 699
672/** 700/*
673 * LOCAL PORT LAYER 701 * LOCAL PORT LAYER
674 *****************************/ 702 *****************************/
675int fc_lport_init(struct fc_lport *lp); 703int fc_lport_init(struct fc_lport *lp);
@@ -704,12 +732,6 @@ void fc_linkup(struct fc_lport *);
704void fc_linkdown(struct fc_lport *); 732void fc_linkdown(struct fc_lport *);
705 733
706/* 734/*
707 * Pause and unpause traffic.
708 */
709void fc_pause(struct fc_lport *);
710void fc_unpause(struct fc_lport *);
711
712/*
713 * Configure the local port. 735 * Configure the local port.
714 */ 736 */
715int fc_lport_config(struct fc_lport *); 737int fc_lport_config(struct fc_lport *);
@@ -725,19 +747,19 @@ int fc_lport_reset(struct fc_lport *);
725int fc_set_mfs(struct fc_lport *lp, u32 mfs); 747int fc_set_mfs(struct fc_lport *lp, u32 mfs);
726 748
727 749
728/** 750/*
729 * REMOTE PORT LAYER 751 * REMOTE PORT LAYER
730 *****************************/ 752 *****************************/
731int fc_rport_init(struct fc_lport *lp); 753int fc_rport_init(struct fc_lport *lp);
732void fc_rport_terminate_io(struct fc_rport *rp); 754void fc_rport_terminate_io(struct fc_rport *rp);
733 755
734/** 756/*
735 * DISCOVERY LAYER 757 * DISCOVERY LAYER
736 *****************************/ 758 *****************************/
737int fc_disc_init(struct fc_lport *lp); 759int fc_disc_init(struct fc_lport *lp);
738 760
739 761
740/** 762/*
741 * SCSI LAYER 763 * SCSI LAYER
742 *****************************/ 764 *****************************/
743/* 765/*
@@ -798,7 +820,7 @@ int fc_change_queue_type(struct scsi_device *sdev, int tag_type);
798 */ 820 */
799void fc_fcp_destroy(struct fc_lport *); 821void fc_fcp_destroy(struct fc_lport *);
800 822
801/** 823/*
802 * ELS/CT interface 824 * ELS/CT interface
803 *****************************/ 825 *****************************/
804/* 826/*
@@ -807,7 +829,7 @@ void fc_fcp_destroy(struct fc_lport *);
807int fc_elsct_init(struct fc_lport *lp); 829int fc_elsct_init(struct fc_lport *lp);
808 830
809 831
810/** 832/*
811 * EXCHANGE MANAGER LAYER 833 * EXCHANGE MANAGER LAYER
812 *****************************/ 834 *****************************/
813/* 835/*
@@ -916,7 +938,7 @@ struct fc_seq *fc_seq_start_next(struct fc_seq *sp);
916 * If s_id is non-zero, reset only exchanges originating from that FID. 938 * If s_id is non-zero, reset only exchanges originating from that FID.
917 * If d_id is non-zero, reset only exchanges sending to that FID. 939 * If d_id is non-zero, reset only exchanges sending to that FID.
918 */ 940 */
919void fc_exch_mgr_reset(struct fc_exch_mgr *, u32 s_id, u32 d_id); 941void fc_exch_mgr_reset(struct fc_lport *, u32 s_id, u32 d_id);
920 942
921/* 943/*
922 * Functions for fc_functions_template 944 * Functions for fc_functions_template
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 89fdbb9a6a1b..941818f29f59 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -46,6 +46,7 @@ struct fcoe_softc {
46 struct net_device *phys_dev; /* device with ethtool_ops */ 46 struct net_device *phys_dev; /* device with ethtool_ops */
47 struct packet_type fcoe_packet_type; 47 struct packet_type fcoe_packet_type;
48 struct sk_buff_head fcoe_pending_queue; 48 struct sk_buff_head fcoe_pending_queue;
49 u8 fcoe_pending_queue_active;
49 50
50 u8 dest_addr[ETH_ALEN]; 51 u8 dest_addr[ETH_ALEN];
51 u8 ctl_src_addr[ETH_ALEN]; 52 u8 ctl_src_addr[ETH_ALEN];
@@ -58,16 +59,10 @@ struct fcoe_softc {
58 u8 address_mode; 59 u8 address_mode;
59}; 60};
60 61
61static inline struct fcoe_softc *fcoe_softc(
62 const struct fc_lport *lp)
63{
64 return (struct fcoe_softc *)lport_priv(lp);
65}
66
67static inline struct net_device *fcoe_netdev( 62static inline struct net_device *fcoe_netdev(
68 const struct fc_lport *lp) 63 const struct fc_lport *lp)
69{ 64{
70 return fcoe_softc(lp)->real_dev; 65 return ((struct fcoe_softc *)lport_priv(lp))->real_dev;
71} 66}
72 67
73static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb) 68static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb)