diff options
Diffstat (limited to 'drivers/scsi/scsi_transport_fc.c')
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 579760420d53..2d1e68db9b3f 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -1744,6 +1744,15 @@ fc_host_statistic(fcp_output_requests); | |||
1744 | fc_host_statistic(fcp_control_requests); | 1744 | fc_host_statistic(fcp_control_requests); |
1745 | fc_host_statistic(fcp_input_megabytes); | 1745 | fc_host_statistic(fcp_input_megabytes); |
1746 | fc_host_statistic(fcp_output_megabytes); | 1746 | fc_host_statistic(fcp_output_megabytes); |
1747 | fc_host_statistic(fcp_packet_alloc_failures); | ||
1748 | fc_host_statistic(fcp_packet_aborts); | ||
1749 | fc_host_statistic(fcp_frame_alloc_failures); | ||
1750 | fc_host_statistic(fc_no_free_exch); | ||
1751 | fc_host_statistic(fc_no_free_exch_xid); | ||
1752 | fc_host_statistic(fc_xid_not_found); | ||
1753 | fc_host_statistic(fc_xid_busy); | ||
1754 | fc_host_statistic(fc_seq_not_found); | ||
1755 | fc_host_statistic(fc_non_bls_resp); | ||
1747 | 1756 | ||
1748 | static ssize_t | 1757 | static ssize_t |
1749 | fc_reset_statistics(struct device *dev, struct device_attribute *attr, | 1758 | fc_reset_statistics(struct device *dev, struct device_attribute *attr, |
@@ -1784,6 +1793,15 @@ static struct attribute *fc_statistics_attrs[] = { | |||
1784 | &device_attr_host_fcp_control_requests.attr, | 1793 | &device_attr_host_fcp_control_requests.attr, |
1785 | &device_attr_host_fcp_input_megabytes.attr, | 1794 | &device_attr_host_fcp_input_megabytes.attr, |
1786 | &device_attr_host_fcp_output_megabytes.attr, | 1795 | &device_attr_host_fcp_output_megabytes.attr, |
1796 | &device_attr_host_fcp_packet_alloc_failures.attr, | ||
1797 | &device_attr_host_fcp_packet_aborts.attr, | ||
1798 | &device_attr_host_fcp_frame_alloc_failures.attr, | ||
1799 | &device_attr_host_fc_no_free_exch.attr, | ||
1800 | &device_attr_host_fc_no_free_exch_xid.attr, | ||
1801 | &device_attr_host_fc_xid_not_found.attr, | ||
1802 | &device_attr_host_fc_xid_busy.attr, | ||
1803 | &device_attr_host_fc_seq_not_found.attr, | ||
1804 | &device_attr_host_fc_non_bls_resp.attr, | ||
1787 | &device_attr_host_reset_statistics.attr, | 1805 | &device_attr_host_reset_statistics.attr, |
1788 | NULL | 1806 | NULL |
1789 | }; | 1807 | }; |
@@ -2477,11 +2495,9 @@ static void fc_terminate_rport_io(struct fc_rport *rport) | |||
2477 | i->f->terminate_rport_io(rport); | 2495 | i->f->terminate_rport_io(rport); |
2478 | 2496 | ||
2479 | /* | 2497 | /* |
2480 | * must unblock to flush queued IO. The caller will have set | 2498 | * Must unblock to flush queued IO. scsi-ml will fail incoming reqs. |
2481 | * the port_state or flags, so that fc_remote_port_chkready will | ||
2482 | * fail IO. | ||
2483 | */ | 2499 | */ |
2484 | scsi_target_unblock(&rport->dev); | 2500 | scsi_target_unblock(&rport->dev, SDEV_TRANSPORT_OFFLINE); |
2485 | } | 2501 | } |
2486 | 2502 | ||
2487 | /** | 2503 | /** |
@@ -2812,8 +2828,8 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel, | |||
2812 | 2828 | ||
2813 | /* if target, initiate a scan */ | 2829 | /* if target, initiate a scan */ |
2814 | if (rport->scsi_target_id != -1) { | 2830 | if (rport->scsi_target_id != -1) { |
2815 | scsi_target_unblock(&rport->dev); | 2831 | scsi_target_unblock(&rport->dev, |
2816 | 2832 | SDEV_RUNNING); | |
2817 | spin_lock_irqsave(shost->host_lock, | 2833 | spin_lock_irqsave(shost->host_lock, |
2818 | flags); | 2834 | flags); |
2819 | rport->flags |= FC_RPORT_SCAN_PENDING; | 2835 | rport->flags |= FC_RPORT_SCAN_PENDING; |
@@ -2882,7 +2898,7 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel, | |||
2882 | spin_unlock_irqrestore(shost->host_lock, flags); | 2898 | spin_unlock_irqrestore(shost->host_lock, flags); |
2883 | 2899 | ||
2884 | if (ids->roles & FC_PORT_ROLE_FCP_TARGET) { | 2900 | if (ids->roles & FC_PORT_ROLE_FCP_TARGET) { |
2885 | scsi_target_unblock(&rport->dev); | 2901 | scsi_target_unblock(&rport->dev, SDEV_RUNNING); |
2886 | 2902 | ||
2887 | /* initiate a scan of the target */ | 2903 | /* initiate a scan of the target */ |
2888 | spin_lock_irqsave(shost->host_lock, flags); | 2904 | spin_lock_irqsave(shost->host_lock, flags); |
@@ -3087,7 +3103,7 @@ fc_remote_port_rolechg(struct fc_rport *rport, u32 roles) | |||
3087 | /* ensure any stgt delete functions are done */ | 3103 | /* ensure any stgt delete functions are done */ |
3088 | fc_flush_work(shost); | 3104 | fc_flush_work(shost); |
3089 | 3105 | ||
3090 | scsi_target_unblock(&rport->dev); | 3106 | scsi_target_unblock(&rport->dev, SDEV_RUNNING); |
3091 | /* initiate a scan of the target */ | 3107 | /* initiate a scan of the target */ |
3092 | spin_lock_irqsave(shost->host_lock, flags); | 3108 | spin_lock_irqsave(shost->host_lock, flags); |
3093 | rport->flags |= FC_RPORT_SCAN_PENDING; | 3109 | rport->flags |= FC_RPORT_SCAN_PENDING; |
@@ -3131,7 +3147,7 @@ fc_timeout_deleted_rport(struct work_struct *work) | |||
3131 | "blocked FC remote port time out: no longer" | 3147 | "blocked FC remote port time out: no longer" |
3132 | " a FCP target, removing starget\n"); | 3148 | " a FCP target, removing starget\n"); |
3133 | spin_unlock_irqrestore(shost->host_lock, flags); | 3149 | spin_unlock_irqrestore(shost->host_lock, flags); |
3134 | scsi_target_unblock(&rport->dev); | 3150 | scsi_target_unblock(&rport->dev, SDEV_TRANSPORT_OFFLINE); |
3135 | fc_queue_work(shost, &rport->stgt_delete_work); | 3151 | fc_queue_work(shost, &rport->stgt_delete_work); |
3136 | return; | 3152 | return; |
3137 | } | 3153 | } |