diff options
Diffstat (limited to 'drivers/scsi/libfc/fc_disc.c')
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index cfbce893941a..e57556ea5b48 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -64,7 +64,7 @@ static void fc_disc_single(struct fc_disc *, struct fc_disc_port *); | |||
64 | static void fc_disc_restart(struct fc_disc *); | 64 | static void fc_disc_restart(struct fc_disc *); |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * fc_disc_lookup_rport - lookup a remote port by port_id | 67 | * fc_disc_lookup_rport() - lookup a remote port by port_id |
68 | * @lport: Fibre Channel host port instance | 68 | * @lport: Fibre Channel host port instance |
69 | * @port_id: remote port port_id to match | 69 | * @port_id: remote port port_id to match |
70 | */ | 70 | */ |
@@ -92,7 +92,7 @@ struct fc_rport *fc_disc_lookup_rport(const struct fc_lport *lport, | |||
92 | } | 92 | } |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * fc_disc_stop_rports - delete all the remote ports associated with the lport | 95 | * fc_disc_stop_rports() - delete all the remote ports associated with the lport |
96 | * @disc: The discovery job to stop rports on | 96 | * @disc: The discovery job to stop rports on |
97 | * | 97 | * |
98 | * Locking Note: This function expects that the lport mutex is locked before | 98 | * Locking Note: This function expects that the lport mutex is locked before |
@@ -117,7 +117,7 @@ void fc_disc_stop_rports(struct fc_disc *disc) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | /** | 119 | /** |
120 | * fc_disc_rport_callback - Event handler for rport events | 120 | * fc_disc_rport_callback() - Event handler for rport events |
121 | * @lport: The lport which is receiving the event | 121 | * @lport: The lport which is receiving the event |
122 | * @rport: The rport which the event has occured on | 122 | * @rport: The rport which the event has occured on |
123 | * @event: The event that occured | 123 | * @event: The event that occured |
@@ -151,7 +151,7 @@ static void fc_disc_rport_callback(struct fc_lport *lport, | |||
151 | } | 151 | } |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * fc_disc_recv_rscn_req - Handle Registered State Change Notification (RSCN) | 154 | * fc_disc_recv_rscn_req() - Handle Registered State Change Notification (RSCN) |
155 | * @sp: Current sequence of the RSCN exchange | 155 | * @sp: Current sequence of the RSCN exchange |
156 | * @fp: RSCN Frame | 156 | * @fp: RSCN Frame |
157 | * @lport: Fibre Channel host port instance | 157 | * @lport: Fibre Channel host port instance |
@@ -265,7 +265,7 @@ reject: | |||
265 | } | 265 | } |
266 | 266 | ||
267 | /** | 267 | /** |
268 | * fc_disc_recv_req - Handle incoming requests | 268 | * fc_disc_recv_req() - Handle incoming requests |
269 | * @sp: Current sequence of the request exchange | 269 | * @sp: Current sequence of the request exchange |
270 | * @fp: The frame | 270 | * @fp: The frame |
271 | * @lport: The FC local port | 271 | * @lport: The FC local port |
@@ -294,7 +294,7 @@ static void fc_disc_recv_req(struct fc_seq *sp, struct fc_frame *fp, | |||
294 | } | 294 | } |
295 | 295 | ||
296 | /** | 296 | /** |
297 | * fc_disc_restart - Restart discovery | 297 | * fc_disc_restart() - Restart discovery |
298 | * @lport: FC discovery context | 298 | * @lport: FC discovery context |
299 | * | 299 | * |
300 | * Locking Note: This function expects that the disc mutex | 300 | * Locking Note: This function expects that the disc mutex |
@@ -322,7 +322,7 @@ static void fc_disc_restart(struct fc_disc *disc) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | /** | 324 | /** |
325 | * fc_disc_start - Fibre Channel Target discovery | 325 | * fc_disc_start() - Fibre Channel Target discovery |
326 | * @lport: FC local port | 326 | * @lport: FC local port |
327 | * | 327 | * |
328 | * Returns non-zero if discovery cannot be started. | 328 | * Returns non-zero if discovery cannot be started. |
@@ -383,7 +383,7 @@ static struct fc_rport_operations fc_disc_rport_ops = { | |||
383 | }; | 383 | }; |
384 | 384 | ||
385 | /** | 385 | /** |
386 | * fc_disc_new_target - Handle new target found by discovery | 386 | * fc_disc_new_target() - Handle new target found by discovery |
387 | * @lport: FC local port | 387 | * @lport: FC local port |
388 | * @rport: The previous FC remote port (NULL if new remote port) | 388 | * @rport: The previous FC remote port (NULL if new remote port) |
389 | * @ids: Identifiers for the new FC remote port | 389 | * @ids: Identifiers for the new FC remote port |
@@ -446,7 +446,7 @@ static int fc_disc_new_target(struct fc_disc *disc, | |||
446 | } | 446 | } |
447 | 447 | ||
448 | /** | 448 | /** |
449 | * fc_disc_del_target - Delete a target | 449 | * fc_disc_del_target() - Delete a target |
450 | * @disc: FC discovery context | 450 | * @disc: FC discovery context |
451 | * @rport: The remote port to be removed | 451 | * @rport: The remote port to be removed |
452 | */ | 452 | */ |
@@ -459,7 +459,7 @@ static void fc_disc_del_target(struct fc_disc *disc, struct fc_rport *rport) | |||
459 | } | 459 | } |
460 | 460 | ||
461 | /** | 461 | /** |
462 | * fc_disc_done - Discovery has been completed | 462 | * fc_disc_done() - Discovery has been completed |
463 | * @disc: FC discovery context | 463 | * @disc: FC discovery context |
464 | */ | 464 | */ |
465 | static void fc_disc_done(struct fc_disc *disc) | 465 | static void fc_disc_done(struct fc_disc *disc) |
@@ -479,7 +479,7 @@ static void fc_disc_done(struct fc_disc *disc) | |||
479 | } | 479 | } |
480 | 480 | ||
481 | /** | 481 | /** |
482 | * fc_disc_error - Handle error on dNS request | 482 | * fc_disc_error() - Handle error on dNS request |
483 | * @disc: FC discovery context | 483 | * @disc: FC discovery context |
484 | * @fp: The frame pointer | 484 | * @fp: The frame pointer |
485 | */ | 485 | */ |
@@ -519,7 +519,7 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp) | |||
519 | } | 519 | } |
520 | 520 | ||
521 | /** | 521 | /** |
522 | * fc_disc_gpn_ft_req - Send Get Port Names by FC-4 type (GPN_FT) request | 522 | * fc_disc_gpn_ft_req() - Send Get Port Names by FC-4 type (GPN_FT) request |
523 | * @lport: FC discovery context | 523 | * @lport: FC discovery context |
524 | * | 524 | * |
525 | * Locking Note: This function expects that the disc_mutex is locked | 525 | * Locking Note: This function expects that the disc_mutex is locked |
@@ -553,7 +553,7 @@ err: | |||
553 | } | 553 | } |
554 | 554 | ||
555 | /** | 555 | /** |
556 | * fc_disc_gpn_ft_parse - Parse the list of IDs and names resulting from a request | 556 | * fc_disc_gpn_ft_parse() - Parse the list of IDs and names resulting from a request |
557 | * @lport: Fibre Channel host port instance | 557 | * @lport: Fibre Channel host port instance |
558 | * @buf: GPN_FT response buffer | 558 | * @buf: GPN_FT response buffer |
559 | * @len: size of response buffer | 559 | * @len: size of response buffer |
@@ -658,7 +658,10 @@ static int fc_disc_gpn_ft_parse(struct fc_disc *disc, void *buf, size_t len) | |||
658 | return error; | 658 | return error; |
659 | } | 659 | } |
660 | 660 | ||
661 | /* | 661 | /** |
662 | * fc_disc_timeout() - Retry handler for the disc component | ||
663 | * @work: Structure holding disc obj that needs retry discovery | ||
664 | * | ||
662 | * Handle retry of memory allocation for remote ports. | 665 | * Handle retry of memory allocation for remote ports. |
663 | */ | 666 | */ |
664 | static void fc_disc_timeout(struct work_struct *work) | 667 | static void fc_disc_timeout(struct work_struct *work) |
@@ -673,7 +676,7 @@ static void fc_disc_timeout(struct work_struct *work) | |||
673 | } | 676 | } |
674 | 677 | ||
675 | /** | 678 | /** |
676 | * fc_disc_gpn_ft_resp - Handle a response frame from Get Port Names (GPN_FT) | 679 | * fc_disc_gpn_ft_resp() - Handle a response frame from Get Port Names (GPN_FT) |
677 | * @sp: Current sequence of GPN_FT exchange | 680 | * @sp: Current sequence of GPN_FT exchange |
678 | * @fp: response frame | 681 | * @fp: response frame |
679 | * @lp_arg: Fibre Channel host port instance | 682 | * @lp_arg: Fibre Channel host port instance |
@@ -712,9 +715,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
712 | fr_len(fp)); | 715 | fr_len(fp)); |
713 | } else if (ntohs(cp->ct_cmd) == FC_FS_ACC) { | 716 | } else if (ntohs(cp->ct_cmd) == FC_FS_ACC) { |
714 | 717 | ||
715 | /* | 718 | /* Accepted, parse the response. */ |
716 | * Accepted. Parse response. | ||
717 | */ | ||
718 | buf = cp + 1; | 719 | buf = cp + 1; |
719 | len -= sizeof(*cp); | 720 | len -= sizeof(*cp); |
720 | } else if (ntohs(cp->ct_cmd) == FC_FS_RJT) { | 721 | } else if (ntohs(cp->ct_cmd) == FC_FS_RJT) { |
@@ -746,7 +747,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, | |||
746 | } | 747 | } |
747 | 748 | ||
748 | /** | 749 | /** |
749 | * fc_disc_single - Discover the directory information for a single target | 750 | * fc_disc_single() - Discover the directory information for a single target |
750 | * @lport: FC local port | 751 | * @lport: FC local port |
751 | * @dp: The port to rediscover | 752 | * @dp: The port to rediscover |
752 | * | 753 | * |
@@ -782,7 +783,7 @@ out: | |||
782 | } | 783 | } |
783 | 784 | ||
784 | /** | 785 | /** |
785 | * fc_disc_stop - Stop discovery for a given lport | 786 | * fc_disc_stop() - Stop discovery for a given lport |
786 | * @lport: The lport that discovery should stop for | 787 | * @lport: The lport that discovery should stop for |
787 | */ | 788 | */ |
788 | void fc_disc_stop(struct fc_lport *lport) | 789 | void fc_disc_stop(struct fc_lport *lport) |
@@ -796,7 +797,7 @@ void fc_disc_stop(struct fc_lport *lport) | |||
796 | } | 797 | } |
797 | 798 | ||
798 | /** | 799 | /** |
799 | * fc_disc_stop_final - Stop discovery for a given lport | 800 | * fc_disc_stop_final() - Stop discovery for a given lport |
800 | * @lport: The lport that discovery should stop for | 801 | * @lport: The lport that discovery should stop for |
801 | * | 802 | * |
802 | * This function will block until discovery has been | 803 | * This function will block until discovery has been |
@@ -809,7 +810,7 @@ void fc_disc_stop_final(struct fc_lport *lport) | |||
809 | } | 810 | } |
810 | 811 | ||
811 | /** | 812 | /** |
812 | * fc_disc_init - Initialize the discovery block | 813 | * fc_disc_init() - Initialize the discovery block |
813 | * @lport: FC local port | 814 | * @lport: FC local port |
814 | */ | 815 | */ |
815 | int fc_disc_init(struct fc_lport *lport) | 816 | int fc_disc_init(struct fc_lport *lport) |