diff options
-rw-r--r-- | Documentation/DocBook/scsi.tmpl | 10 | ||||
-rw-r--r-- | drivers/scsi/scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 79 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_srp.c | 3 |
4 files changed, 45 insertions, 49 deletions
diff --git a/Documentation/DocBook/scsi.tmpl b/Documentation/DocBook/scsi.tmpl index 6255930216b3..f299ab182bbe 100644 --- a/Documentation/DocBook/scsi.tmpl +++ b/Documentation/DocBook/scsi.tmpl | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | <book id="scsimid"> | 5 | <book id="scsimid"> |
6 | <bookinfo> | 6 | <bookinfo> |
7 | <title>SCSI Mid Layer Guide</title> | 7 | <title>SCSI Interfaces Guide</title> |
8 | 8 | ||
9 | <authorgroup> | 9 | <authorgroup> |
10 | <author> | 10 | <author> |
@@ -92,7 +92,7 @@ | |||
92 | The SCSI subsystem uses a three layer design, with upper, mid, and low | 92 | The SCSI subsystem uses a three layer design, with upper, mid, and low |
93 | layers. Every operation involving the SCSI subsystem (such as reading | 93 | layers. Every operation involving the SCSI subsystem (such as reading |
94 | a sector from a disk) uses one driver at each of the 3 levels: one | 94 | a sector from a disk) uses one driver at each of the 3 levels: one |
95 | upper layer driver, one lower layer driver, and the scsi midlayer. | 95 | upper layer driver, one lower layer driver, and the SCSI midlayer. |
96 | </para> | 96 | </para> |
97 | <para> | 97 | <para> |
98 | The SCSI upper layer provides the interface between userspace and the | 98 | The SCSI upper layer provides the interface between userspace and the |
@@ -154,7 +154,7 @@ | |||
154 | 154 | ||
155 | <sect2 id="scsi.c"> | 155 | <sect2 id="scsi.c"> |
156 | <title>drivers/scsi/scsi.c</title> | 156 | <title>drivers/scsi/scsi.c</title> |
157 | <para>Main file for the scsi midlayer.</para> | 157 | <para>Main file for the SCSI midlayer.</para> |
158 | !Edrivers/scsi/scsi.c | 158 | !Edrivers/scsi/scsi.c |
159 | </sect2> | 159 | </sect2> |
160 | <sect2 id="scsicam.c"> | 160 | <sect2 id="scsicam.c"> |
@@ -182,7 +182,7 @@ | |||
182 | <sect2 id="scsi_ioctl.c"> | 182 | <sect2 id="scsi_ioctl.c"> |
183 | <title>drivers/scsi/scsi_ioctl.c</title> | 183 | <title>drivers/scsi/scsi_ioctl.c</title> |
184 | <para> | 184 | <para> |
185 | Handle ioctl() calls for scsi devices. | 185 | Handle ioctl() calls for SCSI devices. |
186 | </para> | 186 | </para> |
187 | !Edrivers/scsi/scsi_ioctl.c | 187 | !Edrivers/scsi/scsi_ioctl.c |
188 | </sect2> | 188 | </sect2> |
@@ -287,7 +287,7 @@ | |||
287 | <sect1 id="Transport_classes"> | 287 | <sect1 id="Transport_classes"> |
288 | <title>Transport classes</title> | 288 | <title>Transport classes</title> |
289 | <para> | 289 | <para> |
290 | Transport classes are service libraries for drivers in the scsi | 290 | Transport classes are service libraries for drivers in the SCSI |
291 | lower layer, which expose transport attributes in sysfs. | 291 | lower layer, which expose transport attributes in sysfs. |
292 | </para> | 292 | </para> |
293 | <sect2 id="Fibre_Channel_transport"> | 293 | <sect2 id="Fibre_Channel_transport"> |
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 412a351c6cf7..ebc019380835 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -960,7 +960,7 @@ EXPORT_SYMBOL(__starget_for_each_device); | |||
960 | * reference. You must hold the host's host_lock over this call and | 960 | * reference. You must hold the host's host_lock over this call and |
961 | * any access to the returned scsi_device. | 961 | * any access to the returned scsi_device. |
962 | * | 962 | * |
963 | * Note: The only reason why drivers would want to use this is because | 963 | * Note: The only reason why drivers should use this is because |
964 | * they need to access the device list in irq context. Otherwise you | 964 | * they need to access the device list in irq context. Otherwise you |
965 | * really want to use scsi_device_lookup_by_target instead. | 965 | * really want to use scsi_device_lookup_by_target instead. |
966 | **/ | 966 | **/ |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 22f8140598ba..169bc595648a 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -62,7 +62,7 @@ void scsi_eh_wakeup(struct Scsi_Host *shost) | |||
62 | * @shost: SCSI host to invoke error handling on. | 62 | * @shost: SCSI host to invoke error handling on. |
63 | * | 63 | * |
64 | * Schedule SCSI EH without scmd. | 64 | * Schedule SCSI EH without scmd. |
65 | **/ | 65 | */ |
66 | void scsi_schedule_eh(struct Scsi_Host *shost) | 66 | void scsi_schedule_eh(struct Scsi_Host *shost) |
67 | { | 67 | { |
68 | unsigned long flags; | 68 | unsigned long flags; |
@@ -86,7 +86,7 @@ EXPORT_SYMBOL_GPL(scsi_schedule_eh); | |||
86 | * | 86 | * |
87 | * Return value: | 87 | * Return value: |
88 | * 0 on failure. | 88 | * 0 on failure. |
89 | **/ | 89 | */ |
90 | int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag) | 90 | int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag) |
91 | { | 91 | { |
92 | struct Scsi_Host *shost = scmd->device->host; | 92 | struct Scsi_Host *shost = scmd->device->host; |
@@ -121,7 +121,7 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag) | |||
121 | * This should be turned into an inline function. Each scsi command | 121 | * This should be turned into an inline function. Each scsi command |
122 | * has its own timer, and as it is added to the queue, we set up the | 122 | * has its own timer, and as it is added to the queue, we set up the |
123 | * timer. When the command completes, we cancel the timer. | 123 | * timer. When the command completes, we cancel the timer. |
124 | **/ | 124 | */ |
125 | void scsi_add_timer(struct scsi_cmnd *scmd, int timeout, | 125 | void scsi_add_timer(struct scsi_cmnd *scmd, int timeout, |
126 | void (*complete)(struct scsi_cmnd *)) | 126 | void (*complete)(struct scsi_cmnd *)) |
127 | { | 127 | { |
@@ -155,7 +155,7 @@ void scsi_add_timer(struct scsi_cmnd *scmd, int timeout, | |||
155 | * Return value: | 155 | * Return value: |
156 | * 1 if we were able to detach the timer. 0 if we blew it, and the | 156 | * 1 if we were able to detach the timer. 0 if we blew it, and the |
157 | * timer function has already started to run. | 157 | * timer function has already started to run. |
158 | **/ | 158 | */ |
159 | int scsi_delete_timer(struct scsi_cmnd *scmd) | 159 | int scsi_delete_timer(struct scsi_cmnd *scmd) |
160 | { | 160 | { |
161 | int rtn; | 161 | int rtn; |
@@ -181,7 +181,7 @@ int scsi_delete_timer(struct scsi_cmnd *scmd) | |||
181 | * only in that the normal completion handling might run, but if the | 181 | * only in that the normal completion handling might run, but if the |
182 | * normal completion function determines that the timer has already | 182 | * normal completion function determines that the timer has already |
183 | * fired, then it mustn't do anything. | 183 | * fired, then it mustn't do anything. |
184 | **/ | 184 | */ |
185 | void scsi_times_out(struct scsi_cmnd *scmd) | 185 | void scsi_times_out(struct scsi_cmnd *scmd) |
186 | { | 186 | { |
187 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); | 187 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); |
@@ -224,7 +224,7 @@ void scsi_times_out(struct scsi_cmnd *scmd) | |||
224 | * | 224 | * |
225 | * Return value: | 225 | * Return value: |
226 | * 0 when dev was taken offline by error recovery. 1 OK to proceed. | 226 | * 0 when dev was taken offline by error recovery. 1 OK to proceed. |
227 | **/ | 227 | */ |
228 | int scsi_block_when_processing_errors(struct scsi_device *sdev) | 228 | int scsi_block_when_processing_errors(struct scsi_device *sdev) |
229 | { | 229 | { |
230 | int online; | 230 | int online; |
@@ -245,7 +245,7 @@ EXPORT_SYMBOL(scsi_block_when_processing_errors); | |||
245 | * scsi_eh_prt_fail_stats - Log info on failures. | 245 | * scsi_eh_prt_fail_stats - Log info on failures. |
246 | * @shost: scsi host being recovered. | 246 | * @shost: scsi host being recovered. |
247 | * @work_q: Queue of scsi cmds to process. | 247 | * @work_q: Queue of scsi cmds to process. |
248 | **/ | 248 | */ |
249 | static inline void scsi_eh_prt_fail_stats(struct Scsi_Host *shost, | 249 | static inline void scsi_eh_prt_fail_stats(struct Scsi_Host *shost, |
250 | struct list_head *work_q) | 250 | struct list_head *work_q) |
251 | { | 251 | { |
@@ -295,7 +295,7 @@ static inline void scsi_eh_prt_fail_stats(struct Scsi_Host *shost, | |||
295 | * Notes: | 295 | * Notes: |
296 | * When a deferred error is detected the current command has | 296 | * When a deferred error is detected the current command has |
297 | * not been executed and needs retrying. | 297 | * not been executed and needs retrying. |
298 | **/ | 298 | */ |
299 | static int scsi_check_sense(struct scsi_cmnd *scmd) | 299 | static int scsi_check_sense(struct scsi_cmnd *scmd) |
300 | { | 300 | { |
301 | struct scsi_sense_hdr sshdr; | 301 | struct scsi_sense_hdr sshdr; |
@@ -398,7 +398,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
398 | * queued during error recovery. the main difference here is that we | 398 | * queued during error recovery. the main difference here is that we |
399 | * don't allow for the possibility of retries here, and we are a lot | 399 | * don't allow for the possibility of retries here, and we are a lot |
400 | * more restrictive about what we consider acceptable. | 400 | * more restrictive about what we consider acceptable. |
401 | **/ | 401 | */ |
402 | static int scsi_eh_completed_normally(struct scsi_cmnd *scmd) | 402 | static int scsi_eh_completed_normally(struct scsi_cmnd *scmd) |
403 | { | 403 | { |
404 | /* | 404 | /* |
@@ -452,7 +452,7 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd) | |||
452 | /** | 452 | /** |
453 | * scsi_eh_done - Completion function for error handling. | 453 | * scsi_eh_done - Completion function for error handling. |
454 | * @scmd: Cmd that is done. | 454 | * @scmd: Cmd that is done. |
455 | **/ | 455 | */ |
456 | static void scsi_eh_done(struct scsi_cmnd *scmd) | 456 | static void scsi_eh_done(struct scsi_cmnd *scmd) |
457 | { | 457 | { |
458 | struct completion *eh_action; | 458 | struct completion *eh_action; |
@@ -469,7 +469,7 @@ static void scsi_eh_done(struct scsi_cmnd *scmd) | |||
469 | /** | 469 | /** |
470 | * scsi_try_host_reset - ask host adapter to reset itself | 470 | * scsi_try_host_reset - ask host adapter to reset itself |
471 | * @scmd: SCSI cmd to send hsot reset. | 471 | * @scmd: SCSI cmd to send hsot reset. |
472 | **/ | 472 | */ |
473 | static int scsi_try_host_reset(struct scsi_cmnd *scmd) | 473 | static int scsi_try_host_reset(struct scsi_cmnd *scmd) |
474 | { | 474 | { |
475 | unsigned long flags; | 475 | unsigned long flags; |
@@ -498,7 +498,7 @@ static int scsi_try_host_reset(struct scsi_cmnd *scmd) | |||
498 | /** | 498 | /** |
499 | * scsi_try_bus_reset - ask host to perform a bus reset | 499 | * scsi_try_bus_reset - ask host to perform a bus reset |
500 | * @scmd: SCSI cmd to send bus reset. | 500 | * @scmd: SCSI cmd to send bus reset. |
501 | **/ | 501 | */ |
502 | static int scsi_try_bus_reset(struct scsi_cmnd *scmd) | 502 | static int scsi_try_bus_reset(struct scsi_cmnd *scmd) |
503 | { | 503 | { |
504 | unsigned long flags; | 504 | unsigned long flags; |
@@ -533,7 +533,7 @@ static int scsi_try_bus_reset(struct scsi_cmnd *scmd) | |||
533 | * unreliable for a given host, then the host itself needs to put a | 533 | * unreliable for a given host, then the host itself needs to put a |
534 | * timer on it, and set the host back to a consistent state prior to | 534 | * timer on it, and set the host back to a consistent state prior to |
535 | * returning. | 535 | * returning. |
536 | **/ | 536 | */ |
537 | static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) | 537 | static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) |
538 | { | 538 | { |
539 | int rtn; | 539 | int rtn; |
@@ -568,7 +568,7 @@ static int __scsi_try_to_abort_cmd(struct scsi_cmnd *scmd) | |||
568 | * author of the low-level driver wishes this operation to be timed, | 568 | * author of the low-level driver wishes this operation to be timed, |
569 | * they can provide this facility themselves. helper functions in | 569 | * they can provide this facility themselves. helper functions in |
570 | * scsi_error.c can be supplied to make this easier to do. | 570 | * scsi_error.c can be supplied to make this easier to do. |
571 | **/ | 571 | */ |
572 | static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd) | 572 | static int scsi_try_to_abort_cmd(struct scsi_cmnd *scmd) |
573 | { | 573 | { |
574 | /* | 574 | /* |
@@ -601,7 +601,7 @@ static void scsi_abort_eh_cmnd(struct scsi_cmnd *scmd) | |||
601 | * sent must be one that does not transfer any data. If @sense_bytes != 0 | 601 | * sent must be one that does not transfer any data. If @sense_bytes != 0 |
602 | * @cmnd is ignored and this functions sets up a REQUEST_SENSE command | 602 | * @cmnd is ignored and this functions sets up a REQUEST_SENSE command |
603 | * and cmnd buffers to read @sense_bytes into @scmd->sense_buffer. | 603 | * and cmnd buffers to read @sense_bytes into @scmd->sense_buffer. |
604 | **/ | 604 | */ |
605 | void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses, | 605 | void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses, |
606 | unsigned char *cmnd, int cmnd_size, unsigned sense_bytes) | 606 | unsigned char *cmnd, int cmnd_size, unsigned sense_bytes) |
607 | { | 607 | { |
@@ -667,7 +667,7 @@ EXPORT_SYMBOL(scsi_eh_prep_cmnd); | |||
667 | * @ses: saved information from a coresponding call to scsi_prep_eh_cmnd | 667 | * @ses: saved information from a coresponding call to scsi_prep_eh_cmnd |
668 | * | 668 | * |
669 | * Undo any damage done by above scsi_prep_eh_cmnd(). | 669 | * Undo any damage done by above scsi_prep_eh_cmnd(). |
670 | **/ | 670 | */ |
671 | void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses) | 671 | void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd, struct scsi_eh_save *ses) |
672 | { | 672 | { |
673 | /* | 673 | /* |
@@ -697,7 +697,7 @@ EXPORT_SYMBOL(scsi_eh_restore_cmnd); | |||
697 | * | 697 | * |
698 | * Return value: | 698 | * Return value: |
699 | * SUCCESS or FAILED or NEEDS_RETRY | 699 | * SUCCESS or FAILED or NEEDS_RETRY |
700 | **/ | 700 | */ |
701 | static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, | 701 | static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, |
702 | int cmnd_size, int timeout, unsigned sense_bytes) | 702 | int cmnd_size, int timeout, unsigned sense_bytes) |
703 | { | 703 | { |
@@ -765,7 +765,7 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, | |||
765 | * Some hosts automatically obtain this information, others require | 765 | * Some hosts automatically obtain this information, others require |
766 | * that we obtain it on our own. This function will *not* return until | 766 | * that we obtain it on our own. This function will *not* return until |
767 | * the command either times out, or it completes. | 767 | * the command either times out, or it completes. |
768 | **/ | 768 | */ |
769 | static int scsi_request_sense(struct scsi_cmnd *scmd) | 769 | static int scsi_request_sense(struct scsi_cmnd *scmd) |
770 | { | 770 | { |
771 | return scsi_send_eh_cmnd(scmd, NULL, 0, SENSE_TIMEOUT, ~0); | 771 | return scsi_send_eh_cmnd(scmd, NULL, 0, SENSE_TIMEOUT, ~0); |
@@ -782,7 +782,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd) | |||
782 | * and that would disturb what we are doing. Thus we really want to | 782 | * and that would disturb what we are doing. Thus we really want to |
783 | * keep a list of pending commands for final completion, and once we | 783 | * keep a list of pending commands for final completion, and once we |
784 | * are ready to leave error handling we handle completion for real. | 784 | * are ready to leave error handling we handle completion for real. |
785 | **/ | 785 | */ |
786 | void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q) | 786 | void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q) |
787 | { | 787 | { |
788 | scmd->device->host->host_failed--; | 788 | scmd->device->host->host_failed--; |
@@ -810,7 +810,7 @@ EXPORT_SYMBOL(scsi_eh_finish_cmd); | |||
810 | * | 810 | * |
811 | * XXX: Long term this code should go away, but that needs an audit of | 811 | * XXX: Long term this code should go away, but that needs an audit of |
812 | * all LLDDs first. | 812 | * all LLDDs first. |
813 | **/ | 813 | */ |
814 | int scsi_eh_get_sense(struct list_head *work_q, | 814 | int scsi_eh_get_sense(struct list_head *work_q, |
815 | struct list_head *done_q) | 815 | struct list_head *done_q) |
816 | { | 816 | { |
@@ -862,7 +862,7 @@ EXPORT_SYMBOL_GPL(scsi_eh_get_sense); | |||
862 | * | 862 | * |
863 | * Return value: | 863 | * Return value: |
864 | * 0 - Device is ready. 1 - Device NOT ready. | 864 | * 0 - Device is ready. 1 - Device NOT ready. |
865 | **/ | 865 | */ |
866 | static int scsi_eh_tur(struct scsi_cmnd *scmd) | 866 | static int scsi_eh_tur(struct scsi_cmnd *scmd) |
867 | { | 867 | { |
868 | static unsigned char tur_command[6] = {TEST_UNIT_READY, 0, 0, 0, 0, 0}; | 868 | static unsigned char tur_command[6] = {TEST_UNIT_READY, 0, 0, 0, 0, 0}; |
@@ -897,7 +897,7 @@ retry_tur: | |||
897 | * command that has timed out. If the command simply failed, it makes | 897 | * command that has timed out. If the command simply failed, it makes |
898 | * no sense to try and abort the command, since as far as the shost | 898 | * no sense to try and abort the command, since as far as the shost |
899 | * adapter is concerned, it isn't running. | 899 | * adapter is concerned, it isn't running. |
900 | **/ | 900 | */ |
901 | static int scsi_eh_abort_cmds(struct list_head *work_q, | 901 | static int scsi_eh_abort_cmds(struct list_head *work_q, |
902 | struct list_head *done_q) | 902 | struct list_head *done_q) |
903 | { | 903 | { |
@@ -935,7 +935,7 @@ static int scsi_eh_abort_cmds(struct list_head *work_q, | |||
935 | * | 935 | * |
936 | * Return value: | 936 | * Return value: |
937 | * 0 - Device is ready. 1 - Device NOT ready. | 937 | * 0 - Device is ready. 1 - Device NOT ready. |
938 | **/ | 938 | */ |
939 | static int scsi_eh_try_stu(struct scsi_cmnd *scmd) | 939 | static int scsi_eh_try_stu(struct scsi_cmnd *scmd) |
940 | { | 940 | { |
941 | static unsigned char stu_command[6] = {START_STOP, 0, 0, 0, 1, 0}; | 941 | static unsigned char stu_command[6] = {START_STOP, 0, 0, 0, 1, 0}; |
@@ -963,7 +963,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd) | |||
963 | * Notes: | 963 | * Notes: |
964 | * If commands are failing due to not ready, initializing command required, | 964 | * If commands are failing due to not ready, initializing command required, |
965 | * try revalidating the device, which will end up sending a start unit. | 965 | * try revalidating the device, which will end up sending a start unit. |
966 | **/ | 966 | */ |
967 | static int scsi_eh_stu(struct Scsi_Host *shost, | 967 | static int scsi_eh_stu(struct Scsi_Host *shost, |
968 | struct list_head *work_q, | 968 | struct list_head *work_q, |
969 | struct list_head *done_q) | 969 | struct list_head *done_q) |
@@ -1017,7 +1017,7 @@ static int scsi_eh_stu(struct Scsi_Host *shost, | |||
1017 | * devices that are jammed or not - if we have multiple devices, it | 1017 | * devices that are jammed or not - if we have multiple devices, it |
1018 | * makes no sense to try bus_device_reset - we really would need to try | 1018 | * makes no sense to try bus_device_reset - we really would need to try |
1019 | * a bus_reset instead. | 1019 | * a bus_reset instead. |
1020 | **/ | 1020 | */ |
1021 | static int scsi_eh_bus_device_reset(struct Scsi_Host *shost, | 1021 | static int scsi_eh_bus_device_reset(struct Scsi_Host *shost, |
1022 | struct list_head *work_q, | 1022 | struct list_head *work_q, |
1023 | struct list_head *done_q) | 1023 | struct list_head *done_q) |
@@ -1068,7 +1068,7 @@ static int scsi_eh_bus_device_reset(struct Scsi_Host *shost, | |||
1068 | * @shost: &scsi host being recovered. | 1068 | * @shost: &scsi host being recovered. |
1069 | * @work_q: &list_head for pending commands. | 1069 | * @work_q: &list_head for pending commands. |
1070 | * @done_q: &list_head for processed commands. | 1070 | * @done_q: &list_head for processed commands. |
1071 | **/ | 1071 | */ |
1072 | static int scsi_eh_bus_reset(struct Scsi_Host *shost, | 1072 | static int scsi_eh_bus_reset(struct Scsi_Host *shost, |
1073 | struct list_head *work_q, | 1073 | struct list_head *work_q, |
1074 | struct list_head *done_q) | 1074 | struct list_head *done_q) |
@@ -1125,7 +1125,7 @@ static int scsi_eh_bus_reset(struct Scsi_Host *shost, | |||
1125 | * scsi_eh_host_reset - send a host reset | 1125 | * scsi_eh_host_reset - send a host reset |
1126 | * @work_q: list_head for processed commands. | 1126 | * @work_q: list_head for processed commands. |
1127 | * @done_q: list_head for processed commands. | 1127 | * @done_q: list_head for processed commands. |
1128 | **/ | 1128 | */ |
1129 | static int scsi_eh_host_reset(struct list_head *work_q, | 1129 | static int scsi_eh_host_reset(struct list_head *work_q, |
1130 | struct list_head *done_q) | 1130 | struct list_head *done_q) |
1131 | { | 1131 | { |
@@ -1160,8 +1160,7 @@ static int scsi_eh_host_reset(struct list_head *work_q, | |||
1160 | * scsi_eh_offline_sdevs - offline scsi devices that fail to recover | 1160 | * scsi_eh_offline_sdevs - offline scsi devices that fail to recover |
1161 | * @work_q: list_head for processed commands. | 1161 | * @work_q: list_head for processed commands. |
1162 | * @done_q: list_head for processed commands. | 1162 | * @done_q: list_head for processed commands. |
1163 | * | 1163 | */ |
1164 | **/ | ||
1165 | static void scsi_eh_offline_sdevs(struct list_head *work_q, | 1164 | static void scsi_eh_offline_sdevs(struct list_head *work_q, |
1166 | struct list_head *done_q) | 1165 | struct list_head *done_q) |
1167 | { | 1166 | { |
@@ -1194,7 +1193,7 @@ static void scsi_eh_offline_sdevs(struct list_head *work_q, | |||
1194 | * is woken. In cases where the error code indicates an error that | 1193 | * is woken. In cases where the error code indicates an error that |
1195 | * doesn't require the error handler read (i.e. we don't need to | 1194 | * doesn't require the error handler read (i.e. we don't need to |
1196 | * abort/reset), this function should return SUCCESS. | 1195 | * abort/reset), this function should return SUCCESS. |
1197 | **/ | 1196 | */ |
1198 | int scsi_decide_disposition(struct scsi_cmnd *scmd) | 1197 | int scsi_decide_disposition(struct scsi_cmnd *scmd) |
1199 | { | 1198 | { |
1200 | int rtn; | 1199 | int rtn; |
@@ -1375,7 +1374,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) | |||
1375 | * | 1374 | * |
1376 | * If scsi_allocate_request() fails for what ever reason, we | 1375 | * If scsi_allocate_request() fails for what ever reason, we |
1377 | * completely forget to lock the door. | 1376 | * completely forget to lock the door. |
1378 | **/ | 1377 | */ |
1379 | static void scsi_eh_lock_door(struct scsi_device *sdev) | 1378 | static void scsi_eh_lock_door(struct scsi_device *sdev) |
1380 | { | 1379 | { |
1381 | unsigned char cmnd[MAX_COMMAND_SIZE]; | 1380 | unsigned char cmnd[MAX_COMMAND_SIZE]; |
@@ -1399,7 +1398,7 @@ static void scsi_eh_lock_door(struct scsi_device *sdev) | |||
1399 | * Notes: | 1398 | * Notes: |
1400 | * When we entered the error handler, we blocked all further i/o to | 1399 | * When we entered the error handler, we blocked all further i/o to |
1401 | * this device. we need to 'reverse' this process. | 1400 | * this device. we need to 'reverse' this process. |
1402 | **/ | 1401 | */ |
1403 | static void scsi_restart_operations(struct Scsi_Host *shost) | 1402 | static void scsi_restart_operations(struct Scsi_Host *shost) |
1404 | { | 1403 | { |
1405 | struct scsi_device *sdev; | 1404 | struct scsi_device *sdev; |
@@ -1445,8 +1444,7 @@ static void scsi_restart_operations(struct Scsi_Host *shost) | |||
1445 | * @shost: host to be recovered. | 1444 | * @shost: host to be recovered. |
1446 | * @work_q: &list_head for pending commands. | 1445 | * @work_q: &list_head for pending commands. |
1447 | * @done_q: &list_head for processed commands. | 1446 | * @done_q: &list_head for processed commands. |
1448 | * | 1447 | */ |
1449 | **/ | ||
1450 | void scsi_eh_ready_devs(struct Scsi_Host *shost, | 1448 | void scsi_eh_ready_devs(struct Scsi_Host *shost, |
1451 | struct list_head *work_q, | 1449 | struct list_head *work_q, |
1452 | struct list_head *done_q) | 1450 | struct list_head *done_q) |
@@ -1462,8 +1460,7 @@ EXPORT_SYMBOL_GPL(scsi_eh_ready_devs); | |||
1462 | /** | 1460 | /** |
1463 | * scsi_eh_flush_done_q - finish processed commands or retry them. | 1461 | * scsi_eh_flush_done_q - finish processed commands or retry them. |
1464 | * @done_q: list_head of processed commands. | 1462 | * @done_q: list_head of processed commands. |
1465 | * | 1463 | */ |
1466 | **/ | ||
1467 | void scsi_eh_flush_done_q(struct list_head *done_q) | 1464 | void scsi_eh_flush_done_q(struct list_head *done_q) |
1468 | { | 1465 | { |
1469 | struct scsi_cmnd *scmd, *next; | 1466 | struct scsi_cmnd *scmd, *next; |
@@ -1517,7 +1514,7 @@ EXPORT_SYMBOL(scsi_eh_flush_done_q); | |||
1517 | * scsi_finish_cmd() called for it. we do all of the retry stuff | 1514 | * scsi_finish_cmd() called for it. we do all of the retry stuff |
1518 | * here, so when we restart the host after we return it should have an | 1515 | * here, so when we restart the host after we return it should have an |
1519 | * empty queue. | 1516 | * empty queue. |
1520 | **/ | 1517 | */ |
1521 | static void scsi_unjam_host(struct Scsi_Host *shost) | 1518 | static void scsi_unjam_host(struct Scsi_Host *shost) |
1522 | { | 1519 | { |
1523 | unsigned long flags; | 1520 | unsigned long flags; |
@@ -1544,7 +1541,7 @@ static void scsi_unjam_host(struct Scsi_Host *shost) | |||
1544 | * Notes: | 1541 | * Notes: |
1545 | * This is the main error handling loop. This is run as a kernel thread | 1542 | * This is the main error handling loop. This is run as a kernel thread |
1546 | * for every SCSI host and handles all error handling activity. | 1543 | * for every SCSI host and handles all error handling activity. |
1547 | **/ | 1544 | */ |
1548 | int scsi_error_handler(void *data) | 1545 | int scsi_error_handler(void *data) |
1549 | { | 1546 | { |
1550 | struct Scsi_Host *shost = data; | 1547 | struct Scsi_Host *shost = data; |
@@ -1773,7 +1770,7 @@ EXPORT_SYMBOL(scsi_reset_provider); | |||
1773 | * | 1770 | * |
1774 | * Return value: | 1771 | * Return value: |
1775 | * 1 if valid sense data information found, else 0; | 1772 | * 1 if valid sense data information found, else 0; |
1776 | **/ | 1773 | */ |
1777 | int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, | 1774 | int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, |
1778 | struct scsi_sense_hdr *sshdr) | 1775 | struct scsi_sense_hdr *sshdr) |
1779 | { | 1776 | { |
@@ -1839,7 +1836,7 @@ EXPORT_SYMBOL(scsi_command_normalize_sense); | |||
1839 | * | 1836 | * |
1840 | * Return value: | 1837 | * Return value: |
1841 | * pointer to start of (first) descriptor if found else NULL | 1838 | * pointer to start of (first) descriptor if found else NULL |
1842 | **/ | 1839 | */ |
1843 | const u8 * scsi_sense_desc_find(const u8 * sense_buffer, int sb_len, | 1840 | const u8 * scsi_sense_desc_find(const u8 * sense_buffer, int sb_len, |
1844 | int desc_type) | 1841 | int desc_type) |
1845 | { | 1842 | { |
@@ -1875,7 +1872,7 @@ EXPORT_SYMBOL(scsi_sense_desc_find); | |||
1875 | * | 1872 | * |
1876 | * Return value: | 1873 | * Return value: |
1877 | * 1 if information field found, 0 if not found. | 1874 | * 1 if information field found, 0 if not found. |
1878 | **/ | 1875 | */ |
1879 | int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, | 1876 | int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, |
1880 | u64 * info_out) | 1877 | u64 * info_out) |
1881 | { | 1878 | { |
diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c index 739e327bba09..2445c98ae95e 100644 --- a/drivers/scsi/scsi_transport_srp.c +++ b/drivers/scsi/scsi_transport_srp.c | |||
@@ -185,11 +185,10 @@ static int srp_host_match(struct attribute_container *cont, struct device *dev) | |||
185 | 185 | ||
186 | /** | 186 | /** |
187 | * srp_rport_add - add a SRP remote port to the device hierarchy | 187 | * srp_rport_add - add a SRP remote port to the device hierarchy |
188 | * | ||
189 | * @shost: scsi host the remote port is connected to. | 188 | * @shost: scsi host the remote port is connected to. |
190 | * @ids: The port id for the remote port. | 189 | * @ids: The port id for the remote port. |
191 | * | 190 | * |
192 | * publishes a port to the rest of the system | 191 | * Publishes a port to the rest of the system. |
193 | */ | 192 | */ |
194 | struct srp_rport *srp_rport_add(struct Scsi_Host *shost, | 193 | struct srp_rport *srp_rport_add(struct Scsi_Host *shost, |
195 | struct srp_rport_identifiers *ids) | 194 | struct srp_rport_identifiers *ids) |