Pull SCSI updates from James Bottomley: "This consists of the usual driver updates (ufs, qla2xxx, tcmu, lpfc, hpsa, zfcp, scsi_debug) and minor bug fixes. We also have a huge docbook fix update like most other subsystems and no major update to the core (the few non trivial updates are either minor fixes or removing an unused feature [scsi_sdb_cache])" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (307 commits) scsi: scsi_transport_srp: Sanitize scsi_target_block/unblock sequences scsi: ufs-mediatek: Apply DELAY_AFTER_LPM quirk to Micron devices scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM" scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged scsi: scsi_debug: Implement tur_ms_to_ready parameter scsi: scsi_debug: Fix request sense scsi: lpfc: Fix typo in comment for ULP scsi: ufs-mediatek: Prevent LPM operation on undeclared VCC scsi: iscsi: Do not put host in iscsi_set_flashnode_param() scsi: hpsa: Correct ctrl queue depth scsi: target: tcmu: Make TMR notification optional scsi: target: tcmu: Implement tmr_notify callback scsi: target: tcmu: Fix and simplify timeout handling scsi: target: tcmu: Factor out new helper ring_insert_padding scsi: target: tcmu: Do not queue aborted commands scsi: target: tcmu: Use priv pointer in se_cmd scsi: target: Add tmr_notify backend function scsi: target: Modify core_tmr_abort_task() scsi: target: iscsi: Fix inconsistent debug message scsi: target: iscsi: Fix login error when receiving ...
Unified · Split
| @@ -883,3 +883,139 @@ Contact: Subhash Jadavani <subhashj@codeaurora.org> · 882 unmodified lines | |||
| 883 | Description: This entry shows the target state of an UFS UIC link | 883 | Description: This entry shows the target state of an UFS UIC link |
| 884 | for the chosen system power management level. | 884 | for the chosen system power management level. |
| 885 | The file is read only. | 885 | The file is read only. |
| 886 | |||
| 887 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_presv_us_en | ||
| 888 | Date: June 2020 | ||
| 889 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 890 | Description: This entry shows if preserve user-space was configured | ||
| 891 | The file is read only. | ||
| 892 | |||
| 893 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_shared_alloc_units | ||
| 894 | Date: June 2020 | ||
| 895 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 896 | Description: This entry shows the shared allocated units of WB buffer | ||
| 897 | The file is read only. | ||
| 898 | |||
| 899 | What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/wb_type | ||
| 900 | Date: June 2020 | ||
| 901 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 902 | Description: This entry shows the configured WB type. | ||
| 903 | 0x1 for shared buffer mode. 0x0 for dedicated buffer mode. | ||
| 904 | The file is read only. | ||
| 905 | |||
| 906 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_buff_cap_adj | ||
| 907 | Date: June 2020 | ||
| 908 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 909 | Description: This entry shows the total user-space decrease in shared | ||
| 910 | buffer mode. | ||
| 911 | The value of this parameter is 3 for TLC NAND when SLC mode | ||
| 912 | is used as WriteBooster Buffer. 2 for MLC NAND. | ||
| 913 | The file is read only. | ||
| 914 | |||
| 915 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_alloc_units | ||
| 916 | Date: June 2020 | ||
| 917 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 918 | Description: This entry shows the Maximum total WriteBooster Buffer size | ||
| 919 | which is supported by the entire device. | ||
| 920 | The file is read only. | ||
| 921 | |||
| 922 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_max_wb_luns | ||
| 923 | Date: June 2020 | ||
| 924 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 925 | Description: This entry shows the maximum number of luns that can support | ||
| 926 | WriteBooster. | ||
| 927 | The file is read only. | ||
| 928 | |||
| 929 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_red_type | ||
| 930 | Date: June 2020 | ||
| 931 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 932 | Description: The supportability of user space reduction mode | ||
| 933 | and preserve user space mode. | ||
| 934 | 00h: WriteBooster Buffer can be configured only in | ||
| 935 | user space reduction type. | ||
| 936 | 01h: WriteBooster Buffer can be configured only in | ||
| 937 | preserve user space type. | ||
| 938 | 02h: Device can be configured in either user space | ||
| 939 | reduction type or preserve user space type. | ||
| 940 | The file is read only. | ||
| 941 | |||
| 942 | What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/wb_sup_wb_type | ||
| 943 | Date: June 2020 | ||
| 944 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 945 | Description: The supportability of WriteBooster Buffer type. | ||
| 946 | 00h: LU based WriteBooster Buffer configuration | ||
| 947 | 01h: Single shared WriteBooster Buffer | ||
| 948 | configuration | ||
| 949 | 02h: Supporting both LU based WriteBooster | ||
| 950 | Buffer and Single shared WriteBooster Buffer | ||
| 951 | configuration | ||
| 952 | The file is read only. | ||
| 953 | |||
| 954 | What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_enable | ||
| 955 | Date: June 2020 | ||
| 956 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 957 | Description: This entry shows the status of WriteBooster. | ||
| 958 | 0: WriteBooster is not enabled. | ||
| 959 | 1: WriteBooster is enabled | ||
| 960 | The file is read only. | ||
| 961 | |||
| 962 | What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_en | ||
| 963 | Date: June 2020 | ||
| 964 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 965 | Description: This entry shows if flush is enabled. | ||
| 966 | 0: Flush operation is not performed. | ||
| 967 | 1: Flush operation is performed. | ||
| 968 | The file is read only. | ||
| 969 | |||
| 970 | What: /sys/bus/platform/drivers/ufshcd/*/flags/wb_flush_during_h8 | ||
| 971 | Date: June 2020 | ||
| 972 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 973 | Description: Flush WriteBooster Buffer during hibernate state. | ||
| 974 | 0: Device is not allowed to flush the | ||
| 975 | WriteBooster Buffer during link hibernate | ||
| 976 | state. | ||
| 977 | 1: Device is allowed to flush the | ||
| 978 | WriteBooster Buffer during link hibernate | ||
| 979 | state | ||
| 980 | The file is read only. | ||
| 981 | |||
| 982 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_avail_buf | ||
| 983 | Date: June 2020 | ||
| 984 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 985 | Description: This entry shows the amount of unused WriteBooster buffer | ||
| 986 | available. | ||
| 987 | The file is read only. | ||
| 988 | |||
| 989 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_cur_buf | ||
| 990 | Date: June 2020 | ||
| 991 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 992 | Description: This entry shows the amount of unused current buffer. | ||
| 993 | The file is read only. | ||
| 994 | |||
| 995 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_flush_status | ||
| 996 | Date: June 2020 | ||
| 997 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 998 | Description: This entry shows the flush operation status. | ||
| 999 | 00h: idle | ||
| 1000 | 01h: Flush operation in progress | ||
| 1001 | 02h: Flush operation stopped prematurely. | ||
| 1002 | 03h: Flush operation completed successfully | ||
| 1003 | 04h: Flush operation general failure | ||
| 1004 | The file is read only. | ||
| 1005 | |||
| 1006 | What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_life_time_est | ||
| 1007 | Date: June 2020 | ||
| 1008 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 1009 | Description: This entry shows an indication of the WriteBooster Buffer | ||
| 1010 | lifetime based on the amount of performed program/erase cycles | ||
| 1011 | 01h: 0% - 10% WriteBooster Buffer life time used | ||
| 1012 | ... | ||
| 1013 | 0Ah: 90% - 100% WriteBooster Buffer life time used | ||
| 1014 | The file is read only. | ||
| 1015 | |||
| 1016 | What: /sys/class/scsi_device/*/device/unit_descriptor/wb_buf_alloc_units | ||
| 1017 | Date: June 2020 | ||
| 1018 | Contact: Asutosh Das <asutoshd@codeaurora.org> | ||
| 1019 | Description: This entry shows the configured size of WriteBooster buffer. | ||
| 1020 | 0400h corresponds to 4GB. | ||
| 1021 | The file is read only. | ||
| @@ -125,7 +125,7 @@ The following constants can be defined in the source file. · 124 unmodified lines | |||
| 125 | c. klogd is started with the appropriate -c parameter | 125 | c. klogd is started with the appropriate -c parameter |
| 126 | (e.g. klogd -c 8) | 126 | (e.g. klogd -c 8) |
| 127 | 127 | ||
| 128 | This will cause printk() messages to be be displayed on the | 128 | This will cause printk() messages to be displayed on the |
| 129 | current console. Refer to the klogd(8) and syslogd(8) man pages | 129 | current console. Refer to the klogd(8) and syslogd(8) man pages |
| 130 | for details. | 130 | for details. |
| 131 | 131 | ||
| @@ -94,7 +94,7 @@ parameters may be changed at runtime by the command · 93 unmodified lines | |||
| 94 | (/proc/sys/dev/scsi/logging_level). | 94 | (/proc/sys/dev/scsi/logging_level). |
| 95 | There is also a nice 'scsi_logging_level' script in the | 95 | There is also a nice 'scsi_logging_level' script in the |
| 96 | S390-tools package, available for download at | 96 | S390-tools package, available for download at |
| 97 | http://www-128.ibm.com/developerworks/linux/linux390/s390-tools-1.5.4.html | 97 | https://github.com/ibm-s390-tools/s390-tools/blob/master/scripts/scsi_logging_level |
| 98 | 98 | ||
| 99 | scsi_mod.scan= [SCSI] sync (default) scans SCSI busses as they are | 99 | scsi_mod.scan= [SCSI] sync (default) scans SCSI busses as they are |
| 100 | discovered. async scans them in kernel threads, | 100 | discovered. async scans them in kernel threads, |
| @@ -2309,7 +2309,7 @@ F: drivers/pci/controller/dwc/pcie-qcom.c · 2308 unmodified lines | |||
| 2309 | F: drivers/phy/qualcomm/ | 2309 | F: drivers/phy/qualcomm/ |
| 2310 | F: drivers/power/*/msm* | 2310 | F: drivers/power/*/msm* |
| 2311 | F: drivers/reset/reset-qcom-* | 2311 | F: drivers/reset/reset-qcom-* |
| 2312 | F: drivers/scsi/ufs/ufs-qcom.* | 2312 | F: drivers/scsi/ufs/ufs-qcom* |
| 2313 | F: drivers/spi/spi-geni-qcom.c | 2313 | F: drivers/spi/spi-geni-qcom.c |
| 2314 | F: drivers/spi/spi-qcom-qspi.c | 2314 | F: drivers/spi/spi-qcom-qspi.c |
| 2315 | F: drivers/spi/spi-qup.c | 2315 | F: drivers/spi/spi-qup.c |
| @@ -164,9 +164,8 @@ EXPORT_SYMBOL(blk_pre_runtime_resume); · 163 unmodified lines | |||
| 164 | * | 164 | * |
| 165 | * Description: | 165 | * Description: |
| 166 | * Update the queue's runtime status according to the return value of the | 166 | * Update the queue's runtime status according to the return value of the |
| 167 | * device's runtime_resume function. If it is successfully resumed, process | 167 | * device's runtime_resume function. If the resume was successful, call |
| 168 | * the requests that are queued into the device's queue when it is resuming | 168 | * blk_set_runtime_active() to do the real work of restarting the queue. |
| 169 | * and then mark last busy and initiate autosuspend for it. | ||
| 170 | * | 169 | * |
| 171 | * This function should be called near the end of the device's | 170 | * This function should be called near the end of the device's |
| 172 | * runtime_resume callback. | 171 | * runtime_resume callback. |
| @@ -175,19 +174,13 @@ void blk_post_runtime_resume(struct request_queue *q, int err) · 2 unmodified lines | |||
| 175 | { | 174 | { |
| 176 | if (!q->dev) | 175 | if (!q->dev) |
| 177 | return; | 176 | return; |
| 178 | |||
| 179 | spin_lock_irq(&q->queue_lock); | ||
| 180 | if (!err) { | 177 | if (!err) { |
| 181 | q->rpm_status = RPM_ACTIVE; | 178 | blk_set_runtime_active(q); |
| 182 | pm_runtime_mark_last_busy(q->dev); | ||
| 183 | pm_request_autosuspend(q->dev); | ||
| 184 | } else { | 179 | } else { |
| 180 | spin_lock_irq(&q->queue_lock); | ||
| 185 | q->rpm_status = RPM_SUSPENDED; | 181 | q->rpm_status = RPM_SUSPENDED; |
| 182 | spin_unlock_irq(&q->queue_lock); | ||
| 186 | } | 183 | } |
| 187 | spin_unlock_irq(&q->queue_lock); | ||
| 188 | |||
| 189 | if (!err) | ||
| 190 | blk_clear_pm_only(q); | ||
| 191 | } | 184 | } |
| 192 | EXPORT_SYMBOL(blk_post_runtime_resume); | 185 | EXPORT_SYMBOL(blk_post_runtime_resume); |
| 193 | 186 | ||
| @@ -204,15 +197,25 @@ EXPORT_SYMBOL(blk_post_runtime_resume); · 10 unmodified lines | |||
| 204 | * This function can be used in driver's resume hook to correct queue | 197 | * This function can be used in driver's resume hook to correct queue |
| 205 | * runtime PM status and re-enable peeking requests from the queue. It | 198 | * runtime PM status and re-enable peeking requests from the queue. It |
| 206 | * should be called before first request is added to the queue. | 199 | * should be called before first request is added to the queue. |
| 200 | * | ||
| 201 | * This function is also called by blk_post_runtime_resume() for successful | ||
| 202 | * runtime resumes. It does everything necessary to restart the queue. | ||
| 207 | */ | 203 | */ |
| 208 | void blk_set_runtime_active(struct request_queue *q) | 204 | void blk_set_runtime_active(struct request_queue *q) |
| 209 | { | 205 | { |
| 210 | if (q->dev) { | 206 | int old_status; |
| 211 | spin_lock_irq(&q->queue_lock); | 207 | |
| 212 | q->rpm_status = RPM_ACTIVE; | 208 | if (!q->dev) |
| 213 | pm_runtime_mark_last_busy(q->dev); | 209 | return; |
| 214 | pm_request_autosuspend(q->dev); | 210 | |
| 215 | spin_unlock_irq(&q->queue_lock); | 211 | spin_lock_irq(&q->queue_lock); |
| 216 | } | 212 | old_status = q->rpm_status; |
| 213 | q->rpm_status = RPM_ACTIVE; | ||
| 214 | pm_runtime_mark_last_busy(q->dev); | ||
| 215 | pm_request_autosuspend(q->dev); | ||
| 216 | spin_unlock_irq(&q->queue_lock); | ||
| 217 | |||
| 218 | if (old_status != RPM_ACTIVE) | ||
| 219 | blk_clear_pm_only(q); | ||
| 217 | } | 220 | } |
| 218 | EXPORT_SYMBOL(blk_set_runtime_active); | 221 | EXPORT_SYMBOL(blk_set_runtime_active); |
| @@ -922,6 +922,107 @@ int qcom_scm_ocmem_unlock(enum qcom_scm_ocmem_client id, u32 offset, u32 size) · 921 unmodified lines | |||
| 922 | } | 922 | } |
| 923 | EXPORT_SYMBOL(qcom_scm_ocmem_unlock); | 923 | EXPORT_SYMBOL(qcom_scm_ocmem_unlock); |
| 924 | 924 | ||
| 925 | /** | ||
| 926 | * qcom_scm_ice_available() - Is the ICE key programming interface available? | ||
| 927 | * | ||
| 928 | * Return: true iff the SCM calls wrapped by qcom_scm_ice_invalidate_key() and | ||
| 929 | * qcom_scm_ice_set_key() are available. | ||
| 930 | */ | ||
| 931 | bool qcom_scm_ice_available(void) | ||
| 932 | { | ||
| 933 | return __qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_ES, | ||
| 934 | QCOM_SCM_ES_INVALIDATE_ICE_KEY) && | ||
| 935 | __qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_ES, | ||
| 936 | QCOM_SCM_ES_CONFIG_SET_ICE_KEY); | ||
| 937 | } | ||
| 938 | EXPORT_SYMBOL(qcom_scm_ice_available); | ||
| 939 | |||
| 940 | /** | ||
| 941 | * qcom_scm_ice_invalidate_key() - Invalidate an inline encryption key | ||
| 942 | * @index: the keyslot to invalidate | ||
| 943 | * | ||
| 944 | * The UFSHCI standard defines a standard way to do this, but it doesn't work on | ||
| 945 | * these SoCs; only this SCM call does. | ||
| 946 | * | ||
| 947 | * Return: 0 on success; -errno on failure. | ||
| 948 | */ | ||
| 949 | int qcom_scm_ice_invalidate_key(u32 index) | ||
| 950 | { | ||
| 951 | struct qcom_scm_desc desc = { | ||
| 952 | .svc = QCOM_SCM_SVC_ES, | ||
| 953 | .cmd = QCOM_SCM_ES_INVALIDATE_ICE_KEY, | ||
| 954 | .arginfo = QCOM_SCM_ARGS(1), | ||
| 955 | .args[0] = index, | ||
| 956 | .owner = ARM_SMCCC_OWNER_SIP, | ||
| 957 | }; | ||
| 958 | |||
| 959 | return qcom_scm_call(__scm->dev, &desc, NULL); | ||
| 960 | } | ||
| 961 | EXPORT_SYMBOL(qcom_scm_ice_invalidate_key); | ||
| 962 | |||
| 963 | /** | ||
| 964 | * qcom_scm_ice_set_key() - Set an inline encryption key | ||
| 965 | * @index: the keyslot into which to set the key | ||
| 966 | * @key: the key to program | ||
| 967 | * @key_size: the size of the key in bytes | ||
| 968 | * @cipher: the encryption algorithm the key is for | ||
| 969 | * @data_unit_size: the encryption data unit size, i.e. the size of each | ||
| 970 | * individual plaintext and ciphertext. Given in 512-byte | ||
| 971 | * units, e.g. 1 = 512 bytes, 8 = 4096 bytes, etc. | ||
| 972 | * | ||
| 973 | * Program a key into a keyslot of Qualcomm ICE (Inline Crypto Engine), where it | ||
| 974 | * can then be used to encrypt/decrypt UFS I/O requests inline. | ||
| 975 | * | ||
| 976 | * The UFSHCI standard defines a standard way to do this, but it doesn't work on | ||
| 977 | * these SoCs; only this SCM call does. | ||
| 978 | * | ||
| 979 | * Return: 0 on success; -errno on failure. | ||
| 980 | */ | ||
| 981 | int qcom_scm_ice_set_key(u32 index, const u8 *key, u32 key_size, | ||
| 982 | enum qcom_scm_ice_cipher cipher, u32 data_unit_size) | ||
| 983 | { | ||
| 984 | struct qcom_scm_desc desc = { | ||
| 985 | .svc = QCOM_SCM_SVC_ES, | ||
| 986 | .cmd = QCOM_SCM_ES_CONFIG_SET_ICE_KEY, | ||
| 987 | .arginfo = QCOM_SCM_ARGS(5, QCOM_SCM_VAL, QCOM_SCM_RW, | ||
| 988 | QCOM_SCM_VAL, QCOM_SCM_VAL, | ||
| 989 | QCOM_SCM_VAL), | ||
| 990 | .args[0] = index, | ||
| 991 | .args[2] = key_size, | ||
| 992 | .args[3] = cipher, | ||
| 993 | .args[4] = data_unit_size, | ||
| 994 | .owner = ARM_SMCCC_OWNER_SIP, | ||
| 995 | }; | ||
| 996 | void *keybuf; | ||
| 997 | dma_addr_t key_phys; | ||
| 998 | int ret; | ||
| 999 | |||
| 1000 | /* | ||
| 1001 | * 'key' may point to vmalloc()'ed memory, but we need to pass a | ||
| 1002 | * physical address that's been properly flushed. The sanctioned way to | ||
| 1003 | * do this is by using the DMA API. But as is best practice for crypto | ||
| 1004 | * keys, we also must wipe the key after use. This makes kmemdup() + | ||
| 1005 | * dma_map_single() not clearly correct, since the DMA API can use | ||
| 1006 | * bounce buffers. Instead, just use dma_alloc_coherent(). Programming | ||
| 1007 | * keys is normally rare and thus not performance-critical. | ||
| 1008 | */ | ||
| 1009 | |||
| 1010 | keybuf = dma_alloc_coherent(__scm->dev, key_size, &key_phys, | ||
| 1011 | GFP_KERNEL); | ||
| 1012 | if (!keybuf) | ||
| 1013 | return -ENOMEM; | ||
| 1014 | memcpy(keybuf, key, key_size); | ||
| 1015 | desc.args[1] = key_phys; | ||
| 1016 | |||
| 1017 | ret = qcom_scm_call(__scm->dev, &desc, NULL); | ||
| 1018 | |||
| 1019 | memzero_explicit(keybuf, key_size); | ||
| 1020 | |||
| 1021 | dma_free_coherent(__scm->dev, key_size, keybuf, key_phys); | ||
| 1022 | return ret; | ||
| 1023 | } | ||
| 1024 | EXPORT_SYMBOL(qcom_scm_ice_set_key); | ||
| 1025 | |||
| 925 | /** | 1026 | /** |
| 926 | * qcom_scm_hdcp_available() - Check if secure environment supports HDCP. | 1027 | * qcom_scm_hdcp_available() - Check if secure environment supports HDCP. |
| 927 | * | 1028 | * |
| @@ -103,6 +103,10 @@ extern int scm_legacy_call(struct device *dev, const struct qcom_scm_desc *desc, · 102 unmodified lines | |||
| 103 | #define QCOM_SCM_OCMEM_LOCK_CMD 0x01 | 103 | #define QCOM_SCM_OCMEM_LOCK_CMD 0x01 |
| 104 | #define QCOM_SCM_OCMEM_UNLOCK_CMD 0x02 | 104 | #define QCOM_SCM_OCMEM_UNLOCK_CMD 0x02 |
| 105 | 105 | ||
| 106 | #define QCOM_SCM_SVC_ES 0x10 /* Enterprise Security */ | ||
| 107 | #define QCOM_SCM_ES_INVALIDATE_ICE_KEY 0x03 | ||
| 108 | #define QCOM_SCM_ES_CONFIG_SET_ICE_KEY 0x04 | ||
| 109 | |||
| 106 | #define QCOM_SCM_SVC_HDCP 0x11 | 110 | #define QCOM_SCM_SVC_HDCP 0x11 |
| 107 | #define QCOM_SCM_HDCP_INVOKE 0x01 | 111 | #define QCOM_SCM_HDCP_INVOKE 0x01 |
| 108 | 112 | ||
| @@ -124,13 +124,12 @@ static void zfcp_ccw_remove(struct ccw_device *cdev) · 123 unmodified lines | |||
| 124 | return; | 124 | return; |
| 125 | 125 | ||
| 126 | write_lock_irq(&adapter->port_list_lock); | 126 | write_lock_irq(&adapter->port_list_lock); |
| 127 | list_for_each_entry_safe(port, p, &adapter->port_list, list) { | 127 | list_for_each_entry(port, &adapter->port_list, list) { |
| 128 | write_lock(&port->unit_list_lock); | 128 | write_lock(&port->unit_list_lock); |
| 129 | list_for_each_entry_safe(unit, u, &port->unit_list, list) | 129 | list_splice_init(&port->unit_list, &unit_remove_lh); |
| 130 | list_move(&unit->list, &unit_remove_lh); | ||
| 131 | write_unlock(&port->unit_list_lock); | 130 | write_unlock(&port->unit_list_lock); |
| 132 | list_move(&port->list, &port_remove_lh); | ||
| 133 | } | 131 | } |
| 132 | list_splice_init(&adapter->port_list, &port_remove_lh); | ||
| 134 | write_unlock_irq(&adapter->port_list_lock); | 133 | write_unlock_irq(&adapter->port_list_lock); |
| 135 | zfcp_ccw_adapter_put(adapter); /* put from zfcp_ccw_adapter_by_cdev */ | 134 | zfcp_ccw_adapter_put(adapter); /* put from zfcp_ccw_adapter_by_cdev */ |
| 136 | 135 | ||
| @@ -68,7 +68,7 @@ static void zfcp_erp_action_ready(struct zfcp_erp_action *act) · 67 unmodified lines | |||
| 68 | { | 68 | { |
| 69 | struct zfcp_adapter *adapter = act->adapter; | 69 | struct zfcp_adapter *adapter = act->adapter; |
| 70 | 70 | ||
| 71 | list_move(&act->list, &act->adapter->erp_ready_head); | 71 | list_move(&act->list, &adapter->erp_ready_head); |
| 72 | zfcp_dbf_rec_run("erardy1", act); | 72 | zfcp_dbf_rec_run("erardy1", act); |
| 73 | wake_up(&adapter->erp_ready_wq); | 73 | wake_up(&adapter->erp_ready_wq); |
| 74 | zfcp_dbf_rec_run("erardy2", act); | 74 | zfcp_dbf_rec_run("erardy2", act); |
| @@ -48,7 +48,7 @@ unsigned int zfcp_fc_port_scan_backoff(void) · 47 unmodified lines | |||
| 48 | { | 48 | { |
| 49 | if (!port_scan_backoff) | 49 | if (!port_scan_backoff) |
| 50 | return 0; | 50 | return 0; |
| 51 | return get_random_int() % port_scan_backoff; | 51 | return prandom_u32_max(port_scan_backoff); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | static void zfcp_fc_port_scan_time(struct zfcp_adapter *adapter) | 54 | static void zfcp_fc_port_scan_time(struct zfcp_adapter *adapter) |
| @@ -246,7 +246,7 @@ int zfcp_qdio_sbal_get(struct zfcp_qdio *qdio) · 245 unmodified lines | |||
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | /** | 248 | /** |
| 249 | * zfcp_qdio_send - set PCI flag in first SBALE and send req to QDIO | 249 | * zfcp_qdio_send - send req to QDIO |
| 250 | * @qdio: pointer to struct zfcp_qdio | 250 | * @qdio: pointer to struct zfcp_qdio |
| 251 | * @q_req: pointer to struct zfcp_qdio_req | 251 | * @q_req: pointer to struct zfcp_qdio_req |
| 252 | * Returns: 0 on success, error otherwise | 252 | * Returns: 0 on success, error otherwise |
| @@ -260,17 +260,20 @@ int zfcp_qdio_send(struct zfcp_qdio *qdio, struct zfcp_qdio_req *q_req) · 7 unmodified lines | |||
| 260 | zfcp_qdio_account(qdio); | 260 | zfcp_qdio_account(qdio); |
| 261 | spin_unlock(&qdio->stat_lock); | 261 | spin_unlock(&qdio->stat_lock); |
| 262 | 262 | ||
| 263 | atomic_sub(sbal_number, &qdio->req_q_free); | ||
| 264 | |||
| 263 | retval = do_QDIO(qdio->adapter->ccw_device, QDIO_FLAG_SYNC_OUTPUT, 0, | 265 | retval = do_QDIO(qdio->adapter->ccw_device, QDIO_FLAG_SYNC_OUTPUT, 0, |
| 264 | q_req->sbal_first, sbal_number); | 266 | q_req->sbal_first, sbal_number); |
| 265 | 267 | ||
| 266 | if (unlikely(retval)) { | 268 | if (unlikely(retval)) { |
| 269 | /* Failed to submit the IO, roll back our modifications. */ | ||
| 270 | atomic_add(sbal_number, &qdio->req_q_free); | ||
| 267 | zfcp_qdio_zero_sbals(qdio->req_q, q_req->sbal_first, | 271 | zfcp_qdio_zero_sbals(qdio->req_q, q_req->sbal_first, |
| 268 | sbal_number); | 272 | sbal_number); |
| 269 | return retval; | 273 | return retval; |
| 270 | } | 274 | } |
| 271 | 275 | ||
| 272 | /* account for transferred buffers */ | 276 | /* account for transferred buffers */ |
| 273 | atomic_sub(sbal_number, &qdio->req_q_free); | ||
| 274 | qdio->req_q_idx += sbal_number; | 277 | qdio->req_q_idx += sbal_number; |
| 275 | qdio->req_q_idx %= QDIO_MAX_BUFFERS_PER_Q; | 278 | qdio->req_q_idx %= QDIO_MAX_BUFFERS_PER_Q; |
| 276 | 279 | ||
| @@ -1154,6 +1154,7 @@ source "drivers/scsi/qedf/Kconfig" · 1153 unmodified lines | |||
| 1154 | config SCSI_LPFC | 1154 | config SCSI_LPFC |
| 1155 | tristate "Emulex LightPulse Fibre Channel Support" | 1155 | tristate "Emulex LightPulse Fibre Channel Support" |
| 1156 | depends on PCI && SCSI | 1156 | depends on PCI && SCSI |
| 1157 | depends on CPU_FREQ | ||
| 1157 | depends on SCSI_FC_ATTRS | 1158 | depends on SCSI_FC_ATTRS |
| 1158 | depends on NVME_TARGET_FC || NVME_TARGET_FC=n | 1159 | depends on NVME_TARGET_FC || NVME_TARGET_FC=n |
| 1159 | depends on NVME_FC || NVME_FC=n | 1160 | depends on NVME_FC || NVME_FC=n |
| @@ -1469,14 +1470,19 @@ config SCSI_SUNESP · 309 unmodified lines | |||
| 1469 | module will be called sun_esp. | 1470 | module will be called sun_esp. |
| 1470 | 1471 | ||
| 1471 | config ZFCP | 1472 | config ZFCP |
| 1472 | tristate "FCP host bus adapter driver for IBM eServer zSeries" | 1473 | tristate "FCP host bus adapter driver for IBM mainframes" |
| 1473 | depends on S390 && QDIO && SCSI | 1474 | depends on S390 && QDIO && SCSI |
| 1474 | depends on SCSI_FC_ATTRS | 1475 | depends on SCSI_FC_ATTRS |
| 1475 | help | 1476 | help |
| 1476 | If you want to access SCSI devices attached to your IBM eServer | 1477 | If you want to access SCSI devices attached to your IBM mainframe by |
| 1477 | zSeries by means of Fibre Channel interfaces say Y. | 1478 | means of Fibre Channel Protocol host bus adapters say Y. |
| 1478 | For details please refer to the documentation provided by IBM at | 1479 | |
| 1479 | <http://oss.software.ibm.com/developerworks/opensource/linux390> | 1480 | Supported HBAs include different models of the FICON Express and FCP |
| 1481 | Express I/O cards. | ||
| 1482 | |||
| 1483 | For a more complete list, and for more details about setup and | ||
| 1484 | operation refer to the IBM publication "Device Drivers, Features, and | ||
| 1485 | Commands", SC33-8411. | ||
| 1480 | 1486 | ||
| 1481 | This driver is also available as a module. This module will be | 1487 | This driver is also available as a module. This module will be |
| 1482 | called zfcp. If you want to compile it as a module, say M here | 1488 | called zfcp. If you want to compile it as a module, say M here |
| @@ -350,7 +350,8 @@ static inline int aac_valid_context(struct scsi_cmnd *scsicmd, · 349 unmodified lines | |||
| 350 | 350 | ||
| 351 | /** | 351 | /** |
| 352 | * aac_get_config_status - check the adapter configuration | 352 | * aac_get_config_status - check the adapter configuration |
| 353 | * @common: adapter to query | 353 | * @dev: aac driver data |
| 354 | * @commit_flag: force sending CT_COMMIT_CONFIG | ||
| 354 | * | 355 | * |
| 355 | * Query config status, and commit the configuration if needed. | 356 | * Query config status, and commit the configuration if needed. |
| 356 | */ | 357 | */ |
| @@ -442,7 +443,7 @@ static void aac_expose_phy_device(struct scsi_cmnd *scsicmd) · 85 unmodified lines | |||
| 442 | 443 | ||
| 443 | /** | 444 | /** |
| 444 | * aac_get_containers - list containers | 445 | * aac_get_containers - list containers |
| 445 | * @common: adapter to probe | 446 | * @dev: aac driver data |
| 446 | * | 447 | * |
| 447 | * Make a list of all containers on this controller | 448 | * Make a list of all containers on this controller |
| 448 | */ | 449 | */ |
| @@ -561,7 +562,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr) · 112 unmodified lines | |||
| 561 | scsicmd->scsi_done(scsicmd); | 562 | scsicmd->scsi_done(scsicmd); |
| 562 | } | 563 | } |
| 563 | 564 | ||
| 564 | /** | 565 | /* |
| 565 | * aac_get_container_name - get container name, none blocking. | 566 | * aac_get_container_name - get container name, none blocking. |
| 566 | */ | 567 | */ |
| 567 | static int aac_get_container_name(struct scsi_cmnd * scsicmd) | 568 | static int aac_get_container_name(struct scsi_cmnd * scsicmd) |
| @@ -786,8 +787,7 @@ static int _aac_probe_container(struct scsi_cmnd * scsicmd, int (*callback)(stru · 218 unmodified lines | |||
| 786 | 787 | ||
| 787 | /** | 788 | /** |
| 788 | * aac_probe_container - query a logical volume | 789 | * aac_probe_container - query a logical volume |
| 789 | * @dev: device to query | 790 | * @scsicmd: the scsi command block |
| 790 | * @cid: container identifier | ||
| 791 | * | 791 | * |
| 792 | * Queries the controller about the given volume. The volume information | 792 | * Queries the controller about the given volume. The volume information |
| 793 | * is updated in the struct fsa_dev_info structure rather than returned. | 793 | * is updated in the struct fsa_dev_info structure rather than returned. |
| @@ -1098,7 +1098,7 @@ static void get_container_serial_callback(void *context, struct fib * fibptr) · 304 unmodified lines | |||
| 1098 | scsicmd->scsi_done(scsicmd); | 1098 | scsicmd->scsi_done(scsicmd); |
| 1099 | } | 1099 | } |
| 1100 | 1100 | ||
| 1101 | /** | 1101 | /* |
| 1102 | * aac_get_container_serial - get container serial, none blocking. | 1102 | * aac_get_container_serial - get container serial, none blocking. |
| 1103 | */ | 1103 | */ |
| 1104 | static int aac_get_container_serial(struct scsi_cmnd * scsicmd) | 1104 | static int aac_get_container_serial(struct scsi_cmnd * scsicmd) |
| @@ -1952,8 +1952,6 @@ free_identify_resp: · 847 unmodified lines | |||
| 1952 | /** | 1952 | /** |
| 1953 | * aac_set_safw_attr_all_targets- update current hba map with data from FW | 1953 | * aac_set_safw_attr_all_targets- update current hba map with data from FW |
| 1954 | * @dev: aac_dev structure | 1954 | * @dev: aac_dev structure |
| 1955 | * @phys_luns: FW information from report phys luns | ||
| 1956 | * @rescan: Indicates scan type | ||
| 1957 | * | 1955 | * |
| 1958 | * Update our hba map with the information gathered from the FW | 1956 | * Update our hba map with the information gathered from the FW |
| 1959 | */ | 1957 | */ |
| @@ -3391,15 +3389,12 @@ int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg) · 1431 unmodified lines | |||
| 3391 | } | 3389 | } |
| 3392 | 3390 | ||
| 3393 | /** | 3391 | /** |
| 3394 | * | ||
| 3395 | * aac_srb_callback | 3392 | * aac_srb_callback |
| 3396 | * @context: the context set in the fib - here it is scsi cmd | 3393 | * @context: the context set in the fib - here it is scsi cmd |
| 3397 | * @fibptr: pointer to the fib | 3394 | * @fibptr: pointer to the fib |
| 3398 | * | 3395 | * |
| 3399 | * Handles the completion of a scsi command to a non dasd device | 3396 | * Handles the completion of a scsi command to a non dasd device |
| 3400 | * | ||
| 3401 | */ | 3397 | */ |
| 3402 | |||
| 3403 | static void aac_srb_callback(void *context, struct fib * fibptr) | 3398 | static void aac_srb_callback(void *context, struct fib * fibptr) |
| 3404 | { | 3399 | { |
| 3405 | struct aac_srb_reply *srbreply; | 3400 | struct aac_srb_reply *srbreply; |
| @@ -3684,13 +3679,11 @@ static void hba_resp_task_failure(struct aac_dev *dev, · 278 unmodified lines | |||
| 3684 | } | 3679 | } |
| 3685 | 3680 | ||
| 3686 | /** | 3681 | /** |
| 3687 | * | ||
| 3688 | * aac_hba_callback | 3682 | * aac_hba_callback |
| 3689 | * @context: the context set in the fib - here it is scsi cmd | 3683 | * @context: the context set in the fib - here it is scsi cmd |
| 3690 | * @fibptr: pointer to the fib | 3684 | * @fibptr: pointer to the fib |
| 3691 | * | 3685 | * |
| 3692 | * Handles the completion of a native HBA scsi command | 3686 | * Handles the completion of a native HBA scsi command |
| 3693 | * | ||
| 3694 | */ | 3687 | */ |
| 3695 | void aac_hba_callback(void *context, struct fib *fibptr) | 3688 | void aac_hba_callback(void *context, struct fib *fibptr) |
| 3696 | { | 3689 | { |
| @@ -3749,14 +3742,12 @@ out: · 52 unmodified lines | |||
| 3749 | } | 3742 | } |
| 3750 | 3743 | ||
| 3751 | /** | 3744 | /** |
| 3752 | * | ||
| 3753 | * aac_send_srb_fib | 3745 | * aac_send_srb_fib |
| 3754 | * @scsicmd: the scsi command block | 3746 | * @scsicmd: the scsi command block |
| 3755 | * | 3747 | * |
| 3756 | * This routine will form a FIB and fill in the aac_srb from the | 3748 | * This routine will form a FIB and fill in the aac_srb from the |
| 3757 | * scsicmd passed in. | 3749 | * scsicmd passed in. |
| 3758 | */ | 3750 | */ |
| 3759 | |||
| 3760 | static int aac_send_srb_fib(struct scsi_cmnd* scsicmd) | 3751 | static int aac_send_srb_fib(struct scsi_cmnd* scsicmd) |
| 3761 | { | 3752 | { |
| 3762 | struct fib* cmd_fibcontext; | 3753 | struct fib* cmd_fibcontext; |
| @@ -3792,7 +3783,6 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd) · 29 unmodified lines | |||
| 3792 | } | 3783 | } |
| 3793 | 3784 | ||
| 3794 | /** | 3785 | /** |
| 3795 | * | ||
| 3796 | * aac_send_hba_fib | 3786 | * aac_send_hba_fib |
| 3797 | * @scsicmd: the scsi command block | 3787 | * @scsicmd: the scsi command block |
| 3798 | * | 3788 | * |
| @@ -32,6 +32,8 @@ · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | #include "aacraid.h" | 33 | #include "aacraid.h" |
| 34 | 34 | ||
| 35 | # define AAC_DEBUG_PREAMBLE KERN_INFO | ||
| 36 | # define AAC_DEBUG_POSTAMBLE | ||
| 35 | /** | 37 | /** |
| 36 | * ioctl_send_fib - send a FIB from userspace | 38 | * ioctl_send_fib - send a FIB from userspace |
| 37 | * @dev: adapter is being processed | 39 | * @dev: adapter is being processed |
| @@ -40,9 +42,6 @@ · 2 unmodified lines | |||
| 40 | * This routine sends a fib to the adapter on behalf of a user level | 42 | * This routine sends a fib to the adapter on behalf of a user level |
| 41 | * program. | 43 | * program. |
| 42 | */ | 44 | */ |
| 43 | # define AAC_DEBUG_PREAMBLE KERN_INFO | ||
| 44 | # define AAC_DEBUG_POSTAMBLE | ||
| 45 | |||
| 46 | static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) | 45 | static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) |
| 47 | { | 46 | { |
| 48 | struct hw_fib * kfib; | 47 | struct hw_fib * kfib; |
| @@ -158,11 +157,12 @@ cleanup: · 109 unmodified lines | |||
| 158 | 157 | ||
| 159 | /** | 158 | /** |
| 160 | * open_getadapter_fib - Get the next fib | 159 | * open_getadapter_fib - Get the next fib |
| 160 | * @dev: adapter is being processed | ||
| 161 | * @arg: arguments to the open call | ||
| 161 | * | 162 | * |
| 162 | * This routine will get the next Fib, if available, from the AdapterFibContext | 163 | * This routine will get the next Fib, if available, from the AdapterFibContext |
| 163 | * passed in from the user. | 164 | * passed in from the user. |
| 164 | */ | 165 | */ |
| 165 | |||
| 166 | static int open_getadapter_fib(struct aac_dev * dev, void __user *arg) | 166 | static int open_getadapter_fib(struct aac_dev * dev, void __user *arg) |
| 167 | { | 167 | { |
| 168 | struct aac_fib_context * fibctx; | 168 | struct aac_fib_context * fibctx; |
| @@ -234,7 +234,6 @@ static int open_getadapter_fib(struct aac_dev * dev, void __user *arg) · 65 unmodified lines | |||
| 234 | * This routine will get the next Fib, if available, from the AdapterFibContext | 234 | * This routine will get the next Fib, if available, from the AdapterFibContext |
| 235 | * passed in from the user. | 235 | * passed in from the user. |
| 236 | */ | 236 | */ |
| 237 | |||
| 238 | static int next_getadapter_fib(struct aac_dev * dev, void __user *arg) | 237 | static int next_getadapter_fib(struct aac_dev * dev, void __user *arg) |
| 239 | { | 238 | { |
| 240 | struct fib_ioctl f; | 239 | struct fib_ioctl f; |
| @@ -455,11 +454,10 @@ static int check_revision(struct aac_dev *dev, void __user *arg) · 214 unmodified lines | |||
| 455 | 454 | ||
| 456 | 455 | ||
| 457 | /** | 456 | /** |
| 458 | * | ||
| 459 | * aac_send_raw_scb | 457 | * aac_send_raw_scb |
| 460 | * | 458 | * @dev: adapter is being processed |
| 459 | * @arg: arguments to the send call | ||
| 461 | */ | 460 | */ |
| 462 | |||
| 463 | static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | 461 | static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) |
| 464 | { | 462 | { |
| 465 | struct fib* srbfib; | 463 | struct fib* srbfib; |
| @@ -214,6 +214,7 @@ int aac_fib_setup(struct aac_dev * dev) · 213 unmodified lines | |||
| 214 | /** | 214 | /** |
| 215 | * aac_fib_alloc_tag-allocate a fib using tags | 215 | * aac_fib_alloc_tag-allocate a fib using tags |
| 216 | * @dev: Adapter to allocate the fib for | 216 | * @dev: Adapter to allocate the fib for |
| 217 | * @scmd: SCSI command | ||
| 217 | * | 218 | * |
| 218 | * Allocate a fib from the adapter fib pool using tags | 219 | * Allocate a fib from the adapter fib pool using tags |
| 219 | * from the blk layer. | 220 | * from the blk layer. |
| @@ -405,8 +406,8 @@ static int aac_get_entry (struct aac_dev * dev, u32 qid, struct aac_entry **entr · 185 unmodified lines | |||
| 405 | * aac_queue_get - get the next free QE | 406 | * aac_queue_get - get the next free QE |
| 406 | * @dev: Adapter | 407 | * @dev: Adapter |
| 407 | * @index: Returned index | 408 | * @index: Returned index |
| 408 | * @priority: Priority of fib | 409 | * @qid: Queue number |
| 409 | * @fib: Fib to associate with the queue entry | 410 | * @hw_fib: Fib to associate with the queue entry |
| 410 | * @wait: Wait if queue full | 411 | * @wait: Wait if queue full |
| 411 | * @fibptr: Driver fib object to go with fib | 412 | * @fibptr: Driver fib object to go with fib |
| 412 | * @nonotify: Don't notify the adapter | 413 | * @nonotify: Don't notify the adapter |
| @@ -934,7 +935,7 @@ int aac_fib_adapter_complete(struct fib *fibptr, unsigned short size) · 521 unmodified lines | |||
| 934 | 935 | ||
| 935 | /** | 936 | /** |
| 936 | * aac_fib_complete - fib completion handler | 937 | * aac_fib_complete - fib completion handler |
| 937 | * @fib: FIB to complete | 938 | * @fibptr: FIB to complete |
| 938 | * | 939 | * |
| 939 | * Will do all necessary work to complete a FIB. | 940 | * Will do all necessary work to complete a FIB. |
| 940 | */ | 941 | */ |
| @@ -1049,6 +1050,7 @@ static void aac_handle_aif_bu(struct aac_dev *dev, struct aac_aifcmd *aifcmd) · 108 unmodified lines | |||
| 1049 | } | 1050 | } |
| 1050 | } | 1051 | } |
| 1051 | 1052 | ||
| 1053 | #define AIF_SNIFF_TIMEOUT (500*HZ) | ||
| 1052 | /** | 1054 | /** |
| 1053 | * aac_handle_aif - Handle a message from the firmware | 1055 | * aac_handle_aif - Handle a message from the firmware |
| 1054 | * @dev: Which adapter this fib is from | 1056 | * @dev: Which adapter this fib is from |
| @@ -1057,8 +1059,6 @@ static void aac_handle_aif_bu(struct aac_dev *dev, struct aac_aifcmd *aifcmd) · 2 unmodified lines | |||
| 1057 | * This routine handles a driver notify fib from the adapter and | 1059 | * This routine handles a driver notify fib from the adapter and |
| 1058 | * dispatches it to the appropriate routine for handling. | 1060 | * dispatches it to the appropriate routine for handling. |
| 1059 | */ | 1061 | */ |
| 1060 | |||
| 1061 | #define AIF_SNIFF_TIMEOUT (500*HZ) | ||
| 1062 | static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr) | 1062 | static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr) |
| 1063 | { | 1063 | { |
| 1064 | struct hw_fib * hw_fib = fibptr->hw_fib_va; | 1064 | struct hw_fib * hw_fib = fibptr->hw_fib_va; |
| @@ -2416,7 +2416,7 @@ out: · 1351 unmodified lines | |||
| 2416 | 2416 | ||
| 2417 | /** | 2417 | /** |
| 2418 | * aac_command_thread - command processing thread | 2418 | * aac_command_thread - command processing thread |
| 2419 | * @dev: Adapter to monitor | 2419 | * @data: Adapter to monitor |
| 2420 | * | 2420 | * |
| 2421 | * Waits on the commandready event in it's queue. When the event gets set | 2421 | * Waits on the commandready event in it's queue. When the event gets set |
| 2422 | * it will pull FIBs off it's queue. It will continue to pull FIBs off | 2422 | * it will pull FIBs off it's queue. It will continue to pull FIBs off |
| @@ -99,10 +99,11 @@ unsigned int aac_response_normal(struct aac_queue * q) · 98 unmodified lines | |||
| 99 | } | 99 | } |
| 100 | if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected | Async)) | 100 | if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected | Async)) |
| 101 | { | 101 | { |
| 102 | if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected)) | 102 | if (hwfib->header.XferState & cpu_to_le32(NoResponseExpected)) { |
| 103 | FIB_COUNTER_INCREMENT(aac_config.NoResponseRecved); | 103 | FIB_COUNTER_INCREMENT(aac_config.NoResponseRecved); |
| 104 | else | 104 | } else { |
| 105 | FIB_COUNTER_INCREMENT(aac_config.AsyncRecved); | 105 | FIB_COUNTER_INCREMENT(aac_config.AsyncRecved); |
| 106 | } | ||
| 106 | /* | 107 | /* |
| 107 | * NOTE: we cannot touch the fib after this | 108 | * NOTE: we cannot touch the fib after this |
| 108 | * call, because it may have been deallocated. | 109 | * call, because it may have been deallocated. |
| @@ -229,7 +230,6 @@ static void aac_aif_callback(void *context, struct fib * fibptr) · 120 unmodified lines | |||
| 229 | struct fib *fibctx; | 230 | struct fib *fibctx; |
| 230 | struct aac_dev *dev; | 231 | struct aac_dev *dev; |
| 231 | struct aac_aifcmd *cmd; | 232 | struct aac_aifcmd *cmd; |
| 232 | int status; | ||
| 233 | 233 | ||
| 234 | fibctx = (struct fib *)context; | 234 | fibctx = (struct fib *)context; |
| 235 | BUG_ON(fibptr == NULL); | 235 | BUG_ON(fibptr == NULL); |
| @@ -249,7 +249,7 @@ static void aac_aif_callback(void *context, struct fib * fibptr) · 13 unmodified lines | |||
| 249 | cmd = (struct aac_aifcmd *) fib_data(fibctx); | 249 | cmd = (struct aac_aifcmd *) fib_data(fibctx); |
| 250 | cmd->command = cpu_to_le32(AifReqEvent); | 250 | cmd->command = cpu_to_le32(AifReqEvent); |
| 251 | 251 | ||
| 252 | status = aac_fib_send(AifRequest, | 252 | aac_fib_send(AifRequest, |
| 253 | fibctx, | 253 | fibctx, |
| 254 | sizeof(struct hw_fib)-sizeof(struct aac_fibhdr), | 254 | sizeof(struct hw_fib)-sizeof(struct aac_fibhdr), |
| 255 | FsaNormal, | 255 | FsaNormal, |
| @@ -258,7 +258,7 @@ static void aac_aif_callback(void *context, struct fib * fibptr) · 2 unmodified lines | |||
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | 260 | ||
| 261 | /** | 261 | /* |
| 262 | * aac_intr_normal - Handle command replies | 262 | * aac_intr_normal - Handle command replies |
| 263 | * @dev: Device | 263 | * @dev: Device |
| 264 | * @index: completion reference | 264 | * @index: completion reference |
| @@ -403,12 +403,13 @@ unsigned int aac_intr_normal(struct aac_dev *dev, u32 index, int isAif, · 138 unmodified lines | |||
| 403 | if (hwfib->header.XferState & | 403 | if (hwfib->header.XferState & |
| 404 | cpu_to_le32(NoResponseExpected | Async)) { | 404 | cpu_to_le32(NoResponseExpected | Async)) { |
| 405 | if (hwfib->header.XferState & cpu_to_le32( | 405 | if (hwfib->header.XferState & cpu_to_le32( |
| 406 | NoResponseExpected)) | 406 | NoResponseExpected)) { |
| 407 | FIB_COUNTER_INCREMENT( | 407 | FIB_COUNTER_INCREMENT( |
| 408 | aac_config.NoResponseRecved); | 408 | aac_config.NoResponseRecved); |
| 409 | else | 409 | } else { |
| 410 | FIB_COUNTER_INCREMENT( | 410 | FIB_COUNTER_INCREMENT( |
| 411 | aac_config.AsyncRecved); | 411 | aac_config.AsyncRecved); |
| 412 | } | ||
| 412 | start_callback = 1; | 413 | start_callback = 1; |
| 413 | } else { | 414 | } else { |
| 414 | unsigned long flagv; | 415 | unsigned long flagv; |
| @@ -230,8 +230,8 @@ static struct aac_driver_ident aac_drivers[] = { · 229 unmodified lines | |||
| 230 | 230 | ||
| 231 | /** | 231 | /** |
| 232 | * aac_queuecommand - queue a SCSI command | 232 | * aac_queuecommand - queue a SCSI command |
| 233 | * @shost: Scsi host to queue command on | ||
| 233 | * @cmd: SCSI command to queue | 234 | * @cmd: SCSI command to queue |
| 234 | * @done: Function to call on command completion | ||
| 235 | * | 235 | * |
| 236 | * Queues a command for execution by the associated Host Adapter. | 236 | * Queues a command for execution by the associated Host Adapter. |
| 237 | * | 237 | * |
| @@ -363,9 +363,10 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, · 125 unmodified lines | |||
| 363 | 363 | ||
| 364 | param->cylinders = cap_to_cyls(capacity, param->heads * param->sectors); | 364 | param->cylinders = cap_to_cyls(capacity, param->heads * param->sectors); |
| 365 | if (num < 4 && end_sec == param->sectors) { | 365 | if (num < 4 && end_sec == param->sectors) { |
| 366 | if (param->cylinders != saved_cylinders) | 366 | if (param->cylinders != saved_cylinders) { |
| 367 | dprintk((KERN_DEBUG "Adopting geometry: heads=%d, sectors=%d from partition table %d.\n", | 367 | dprintk((KERN_DEBUG "Adopting geometry: heads=%d, sectors=%d from partition table %d.\n", |
| 368 | param->heads, param->sectors, num)); | 368 | param->heads, param->sectors, num)); |
| 369 | } | ||
| 369 | } else if (end_head > 0 || end_sec > 0) { | 370 | } else if (end_head > 0 || end_sec > 0) { |
| 370 | dprintk((KERN_DEBUG "Strange geometry: heads=%d, sectors=%d in partition table %d.\n", | 371 | dprintk((KERN_DEBUG "Strange geometry: heads=%d, sectors=%d in partition table %d.\n", |
| 371 | end_head + 1, end_sec, num)); | 372 | end_head + 1, end_sec, num)); |
| @@ -1159,7 +1160,6 @@ static int aac_cfg_open(struct inode *inode, struct file *file) · 787 unmodified lines | |||
| 1159 | 1160 | ||
| 1160 | /** | 1161 | /** |
| 1161 | * aac_cfg_ioctl - AAC configuration request | 1162 | * aac_cfg_ioctl - AAC configuration request |
| 1162 | * @inode: inode of device | ||
| 1163 | * @file: file handle | 1163 | * @file: file handle |
| 1164 | * @cmd: ioctl command code | 1164 | * @cmd: ioctl command code |
| 1165 | * @arg: argument | 1165 | * @arg: argument |
| @@ -24,6 +24,7 @@ · 23 unmodified lines | |||
| 24 | 24 | ||
| 25 | /** | 25 | /** |
| 26 | * aac_nark_ioremap | 26 | * aac_nark_ioremap |
| 27 | * @dev: device to ioremap | ||
| 27 | * @size: mapping resize request | 28 | * @size: mapping resize request |
| 28 | * | 29 | * |
| 29 | */ | 30 | */ |
| @@ -57,6 +57,7 @@ static int aac_rkt_select_comm(struct aac_dev *dev, int comm) · 56 unmodified lines | |||
| 57 | 57 | ||
| 58 | /** | 58 | /** |
| 59 | * aac_rkt_ioremap | 59 | * aac_rkt_ioremap |
| 60 | * @dev: device to ioremap | ||
| 60 | * @size: mapping resize request | 61 | * @size: mapping resize request |
| 61 | * | 62 | * |
| 62 | */ | 63 | */ |
| @@ -77,8 +78,8 @@ static int aac_rkt_ioremap(struct aac_dev * dev, u32 size) · 14 unmodified lines | |||
| 77 | * aac_rkt_init - initialize an i960 based AAC card | 78 | * aac_rkt_init - initialize an i960 based AAC card |
| 78 | * @dev: device to configure | 79 | * @dev: device to configure |
| 79 | * | 80 | * |
| 80 | * Allocate and set up resources for the i960 based AAC variants. The | 81 | * Allocate and set up resources for the i960 based AAC variants. The |
| 81 | * device_interface in the commregion will be allocated and linked | 82 | * device_interface in the commregion will be allocated and linked |
| 82 | * to the comm region. | 83 | * to the comm region. |
| 83 | */ | 84 | */ |
| 84 | 85 | ||
| @@ -144,7 +144,16 @@ static void aac_rx_enable_interrupt_message(struct aac_dev *dev) · 143 unmodified lines | |||
| 144 | * @dev: Adapter | 144 | * @dev: Adapter |
| 145 | * @command: Command to execute | 145 | * @command: Command to execute |
| 146 | * @p1: first parameter | 146 | * @p1: first parameter |
| 147 | * @ret: adapter status | 147 | * @p2: second parameter |
| 148 | * @p3: third parameter | ||
| 149 | * @p4: forth parameter | ||
| 150 | * @p5: fifth parameter | ||
| 151 | * @p6: sixth parameter | ||
| 152 | * @status: adapter status | ||
| 153 | * @r1: first return value | ||
| 154 | * @r2: second return value | ||
| 155 | * @r3: third return value | ||
| 156 | * @r4: forth return value | ||
| 148 | * | 157 | * |
| 149 | * This routine will send a synchronous command to the adapter and wait | 158 | * This routine will send a synchronous command to the adapter and wait |
| 150 | * for its completion. | 159 | * for its completion. |
| @@ -443,6 +452,7 @@ static int aac_rx_deliver_message(struct fib * fib) · 292 unmodified lines | |||
| 443 | 452 | ||
| 444 | /** | 453 | /** |
| 445 | * aac_rx_ioremap | 454 | * aac_rx_ioremap |
| 455 | * @dev: adapter | ||
| 446 | * @size: mapping resize request | 456 | * @size: mapping resize request |
| 447 | * | 457 | * |
| 448 | */ | 458 | */ |
| @@ -135,13 +135,21 @@ static void aac_sa_notify_adapter(struct aac_dev *dev, u32 event) · 134 unmodified lines | |||
| 135 | * @dev: Adapter | 135 | * @dev: Adapter |
| 136 | * @command: Command to execute | 136 | * @command: Command to execute |
| 137 | * @p1: first parameter | 137 | * @p1: first parameter |
| 138 | * @p2: second parameter | ||
| 139 | * @p3: third parameter | ||
| 140 | * @p4: forth parameter | ||
| 141 | * @p5: fifth parameter | ||
| 142 | * @p6: sixth parameter | ||
| 138 | * @ret: adapter status | 143 | * @ret: adapter status |
| 144 | * @r1: first return value | ||
| 145 | * @r2: second return value | ||
| 146 | * @r3: third return value | ||
| 147 | * @r4: forth return value | ||
| 139 | * | 148 | * |
| 140 | * This routine will send a synchronous command to the adapter and wait | 149 | * This routine will send a synchronous command to the adapter and wait |
| 141 | * for its completion. | 150 | * for its completion. |
| 142 | */ | 151 | */ |
| 143 | 152 | static int sa_sync_cmd(struct aac_dev *dev, u32 command, | |
| 144 | static int sa_sync_cmd(struct aac_dev *dev, u32 command, | ||
| 145 | u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, | 153 | u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6, |
| 146 | u32 *ret, u32 *r1, u32 *r2, u32 *r3, u32 *r4) | 154 | u32 *ret, u32 *r1, u32 *r2, u32 *r3, u32 *r4) |
| 147 | { | 155 | { |
| @@ -283,6 +291,7 @@ static int aac_sa_check_health(struct aac_dev *dev) · 135 unmodified lines | |||
| 283 | 291 | ||
| 284 | /** | 292 | /** |
| 285 | * aac_sa_ioremap | 293 | * aac_sa_ioremap |
| 294 | * @dev: device to ioremap | ||
| 286 | * @size: mapping resize request | 295 | * @size: mapping resize request |
| 287 | * | 296 | * |
| 288 | */ | 297 | */ |
| @@ -300,8 +309,8 @@ static int aac_sa_ioremap(struct aac_dev * dev, u32 size) · 11 unmodified lines | |||
| 300 | * aac_sa_init - initialize an ARM based AAC card | 309 | * aac_sa_init - initialize an ARM based AAC card |
| 301 | * @dev: device to configure | 310 | * @dev: device to configure |
| 302 | * | 311 | * |
| 303 | * Allocate and set up resources for the ARM based AAC variants. The | 312 | * Allocate and set up resources for the ARM based AAC variants. The |
| 304 | * device_interface in the commregion will be allocated and linked | 313 | * device_interface in the commregion will be allocated and linked |
| 305 | * to the comm region. | 314 | * to the comm region. |
| 306 | */ | 315 | */ |
| 307 | 316 | ||
| @@ -191,7 +191,16 @@ static void aac_src_enable_interrupt_message(struct aac_dev *dev) · 190 unmodified lines | |||
| 191 | * @dev: Adapter | 191 | * @dev: Adapter |
| 192 | * @command: Command to execute | 192 | * @command: Command to execute |
| 193 | * @p1: first parameter | 193 | * @p1: first parameter |
| 194 | * @ret: adapter status | 194 | * @p2: second parameter |
| 195 | * @p3: third parameter | ||
| 196 | * @p4: forth parameter | ||
| 197 | * @p5: fifth parameter | ||
| 198 | * @p6: sixth parameter | ||
| 199 | * @status: adapter status | ||
| 200 | * @r1: first return value | ||
| 201 | * @r2: second return valu | ||
| 202 | * @r3: third return value | ||
| 203 | * @r4: forth return value | ||
| 195 | * | 204 | * |
| 196 | * This routine will send a synchronous command to the adapter and wait | 205 | * This routine will send a synchronous command to the adapter and wait |
| 197 | * for its completion. | 206 | * for its completion. |
| @@ -602,6 +611,7 @@ static int aac_src_deliver_message(struct fib *fib) · 404 unmodified lines | |||
| 602 | 611 | ||
| 603 | /** | 612 | /** |
| 604 | * aac_src_ioremap | 613 | * aac_src_ioremap |
| 614 | * @dev: device ioremap | ||
| 605 | * @size: mapping resize request | 615 | * @size: mapping resize request |
| 606 | * | 616 | * |
| 607 | */ | 617 | */ |
| @@ -632,6 +642,7 @@ static int aac_src_ioremap(struct aac_dev *dev, u32 size) · 24 unmodified lines | |||
| 632 | 642 | ||
| 633 | /** | 643 | /** |
| 634 | * aac_srcv_ioremap | 644 | * aac_srcv_ioremap |
| 645 | * @dev: device ioremap | ||
| 635 | * @size: mapping resize request | 646 | * @size: mapping resize request |
| 636 | * | 647 | * |
| 637 | */ | 648 | */ |
| @@ -2030,8 +2030,7 @@ static void datai_run(struct Scsi_Host *shpnt) · 2029 unmodified lines | |||
| 2030 | fifodata, GETPORT(FIFOSTAT)); | 2030 | fifodata, GETPORT(FIFOSTAT)); |
| 2031 | SETPORT(DMACNTRL0, ENDMA|_8BIT); | 2031 | SETPORT(DMACNTRL0, ENDMA|_8BIT); |
| 2032 | while(fifodata>0) { | 2032 | while(fifodata>0) { |
| 2033 | int data; | 2033 | GETPORT(DATAPORT); |
| 2034 | data=GETPORT(DATAPORT); | ||
| 2035 | fifodata--; | 2034 | fifodata--; |
| 2036 | DATA_LEN++; | 2035 | DATA_LEN++; |
| 2037 | } | 2036 | } |
| @@ -1735,10 +1735,8 @@ ahd_dump_sglist(struct scb *scb) · 1734 unmodified lines | |||
| 1735 | sg_list = (struct ahd_dma64_seg*)scb->sg_list; | 1735 | sg_list = (struct ahd_dma64_seg*)scb->sg_list; |
| 1736 | for (i = 0; i < scb->sg_count; i++) { | 1736 | for (i = 0; i < scb->sg_count; i++) { |
| 1737 | uint64_t addr; | 1737 | uint64_t addr; |
| 1738 | uint32_t len; | ||
| 1739 | 1738 | ||
| 1740 | addr = ahd_le64toh(sg_list[i].addr); | 1739 | addr = ahd_le64toh(sg_list[i].addr); |
| 1741 | len = ahd_le32toh(sg_list[i].len); | ||
| 1742 | printk("sg[%d] - Addr 0x%x%x : Length %d%s\n", | 1740 | printk("sg[%d] - Addr 0x%x%x : Length %d%s\n", |
| 1743 | i, | 1741 | i, |
| 1744 | (uint32_t)((addr >> 32) & 0xFFFFFFFF), | 1742 | (uint32_t)((addr >> 32) & 0xFFFFFFFF), |
| @@ -1906,9 +1904,6 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) · 161 unmodified lines | |||
| 1906 | { | 1904 | { |
| 1907 | struct ahd_devinfo devinfo; | 1905 | struct ahd_devinfo devinfo; |
| 1908 | struct scb *scb; | 1906 | struct scb *scb; |
| 1909 | struct ahd_initiator_tinfo *targ_info; | ||
| 1910 | struct ahd_tmode_tstate *tstate; | ||
| 1911 | struct ahd_transinfo *tinfo; | ||
| 1912 | u_int scbid; | 1907 | u_int scbid; |
| 1913 | 1908 | ||
| 1914 | /* | 1909 | /* |
| @@ -1936,12 +1931,6 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) · 21 unmodified lines | |||
| 1936 | SCB_GET_LUN(scb), | 1931 | SCB_GET_LUN(scb), |
| 1937 | SCB_GET_CHANNEL(ahd, scb), | 1932 | SCB_GET_CHANNEL(ahd, scb), |
| 1938 | ROLE_INITIATOR); | 1933 | ROLE_INITIATOR); |
| 1939 | targ_info = ahd_fetch_transinfo(ahd, | ||
| 1940 | devinfo.channel, | ||
| 1941 | devinfo.our_scsiid, | ||
| 1942 | devinfo.target, | ||
| 1943 | &tstate); | ||
| 1944 | tinfo = &targ_info->curr; | ||
| 1945 | ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, | 1934 | ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, |
| 1946 | AHD_TRANS_ACTIVE, /*paused*/TRUE); | 1935 | AHD_TRANS_ACTIVE, /*paused*/TRUE); |
| 1947 | ahd_set_syncrate(ahd, &devinfo, /*period*/0, | 1936 | ahd_set_syncrate(ahd, &devinfo, /*period*/0, |
| @@ -2669,7 +2658,6 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) · 721 unmodified lines | |||
| 2669 | struct scb *scb; | 2658 | struct scb *scb; |
| 2670 | u_int scbid; | 2659 | u_int scbid; |
| 2671 | u_int lqistat1; | 2660 | u_int lqistat1; |
| 2672 | u_int lqistat2; | ||
| 2673 | u_int msg_out; | 2661 | u_int msg_out; |
| 2674 | u_int curphase; | 2662 | u_int curphase; |
| 2675 | u_int lastphase; | 2663 | u_int lastphase; |
| @@ -2680,7 +2668,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) · 4 unmodified lines | |||
| 2680 | scb = NULL; | 2668 | scb = NULL; |
| 2681 | ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); | 2669 | ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); |
| 2682 | lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ); | 2670 | lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ); |
| 2683 | lqistat2 = ahd_inb(ahd, LQISTAT2); | 2671 | ahd_inb(ahd, LQISTAT2); |
| 2684 | if ((lqistat1 & (LQICRCI_NLQ|LQICRCI_LQ)) == 0 | 2672 | if ((lqistat1 & (LQICRCI_NLQ|LQICRCI_LQ)) == 0 |
| 2685 | && (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) { | 2673 | && (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) { |
| 2686 | u_int lqistate; | 2674 | u_int lqistate; |
| @@ -4218,13 +4206,11 @@ ahd_update_pending_scbs(struct ahd_softc *ahd) · 1531 unmodified lines | |||
| 4218 | pending_scb_count = 0; | 4206 | pending_scb_count = 0; |
| 4219 | LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) { | 4207 | LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) { |
| 4220 | struct ahd_devinfo devinfo; | 4208 | struct ahd_devinfo devinfo; |
| 4221 | struct ahd_initiator_tinfo *tinfo; | ||
| 4222 | struct ahd_tmode_tstate *tstate; | 4209 | struct ahd_tmode_tstate *tstate; |
| 4223 | 4210 | ||
| 4224 | ahd_scb_devinfo(ahd, &devinfo, pending_scb); | 4211 | ahd_scb_devinfo(ahd, &devinfo, pending_scb); |
| 4225 | tinfo = ahd_fetch_transinfo(ahd, devinfo.channel, | 4212 | ahd_fetch_transinfo(ahd, devinfo.channel, devinfo.our_scsiid, |
| 4226 | devinfo.our_scsiid, | 4213 | devinfo.target, &tstate); |
| 4227 | devinfo.target, &tstate); | ||
| 4228 | if ((tstate->auto_negotiate & devinfo.target_mask) == 0 | 4214 | if ((tstate->auto_negotiate & devinfo.target_mask) == 0 |
| 4229 | && (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) { | 4215 | && (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) { |
| 4230 | pending_scb->flags &= ~SCB_AUTO_NEGOTIATE; | 4216 | pending_scb->flags &= ~SCB_AUTO_NEGOTIATE; |
| @@ -700,9 +700,6 @@ ahd_linux_slave_alloc(struct scsi_device *sdev) · 699 unmodified lines | |||
| 700 | static int | 700 | static int |
| 701 | ahd_linux_slave_configure(struct scsi_device *sdev) | 701 | ahd_linux_slave_configure(struct scsi_device *sdev) |
| 702 | { | 702 | { |
| 703 | struct ahd_softc *ahd; | ||
| 704 | |||
| 705 | ahd = *((struct ahd_softc **)sdev->host->hostdata); | ||
| 706 | if (bootverbose) | 703 | if (bootverbose) |
| 707 | sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); | 704 | sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); |
| 708 | 705 | ||
| @@ -778,16 +775,13 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd) · 69 unmodified lines | |||
| 778 | struct scb *reset_scb; | 775 | struct scb *reset_scb; |
| 779 | u_int cdb_byte; | 776 | u_int cdb_byte; |
| 780 | int retval = SUCCESS; | 777 | int retval = SUCCESS; |
| 781 | int paused; | ||
| 782 | int wait; | ||
| 783 | struct ahd_initiator_tinfo *tinfo; | 778 | struct ahd_initiator_tinfo *tinfo; |
| 784 | struct ahd_tmode_tstate *tstate; | 779 | struct ahd_tmode_tstate *tstate; |
| 785 | unsigned long flags; | 780 | unsigned long flags; |
| 786 | DECLARE_COMPLETION_ONSTACK(done); | 781 | DECLARE_COMPLETION_ONSTACK(done); |
| 787 | 782 | ||
| 788 | reset_scb = NULL; | 783 | reset_scb = NULL; |
| 789 | paused = FALSE; | 784 | |
| 790 | wait = FALSE; | ||
| 791 | ahd = *(struct ahd_softc **)cmd->device->host->hostdata; | 785 | ahd = *(struct ahd_softc **)cmd->device->host->hostdata; |
| 792 | 786 | ||
| 793 | scmd_printk(KERN_INFO, cmd, | 787 | scmd_printk(KERN_INFO, cmd, |
| @@ -1793,10 +1787,12 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb) · 999 unmodified lines | |||
| 1793 | */ | 1787 | */ |
| 1794 | cmd->sense_buffer[0] = 0; | 1788 | cmd->sense_buffer[0] = 0; |
| 1795 | if (ahd_get_transaction_status(scb) == CAM_REQ_INPROG) { | 1789 | if (ahd_get_transaction_status(scb) == CAM_REQ_INPROG) { |
| 1790 | #ifdef AHD_REPORT_UNDERFLOWS | ||
| 1796 | uint32_t amount_xferred; | 1791 | uint32_t amount_xferred; |
| 1797 | 1792 | ||
| 1798 | amount_xferred = | 1793 | amount_xferred = |
| 1799 | ahd_get_transfer_length(scb) - ahd_get_residual(scb); | 1794 | ahd_get_transfer_length(scb) - ahd_get_residual(scb); |
| 1795 | #endif | ||
| 1800 | if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) { | 1796 | if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) { |
| 1801 | #ifdef AHD_DEBUG | 1797 | #ifdef AHD_DEBUG |
| 1802 | if ((ahd_debug & AHD_SHOW_MISC) != 0) { | 1798 | if ((ahd_debug & AHD_SHOW_MISC) != 0) { |
| @@ -2147,7 +2143,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) · 344 unmodified lines | |||
| 2147 | u_int last_phase; | 2143 | u_int last_phase; |
| 2148 | u_int saved_scsiid; | 2144 | u_int saved_scsiid; |
| 2149 | u_int cdb_byte; | 2145 | u_int cdb_byte; |
| 2150 | int retval; | 2146 | int retval = SUCCESS; |
| 2151 | int was_paused; | 2147 | int was_paused; |
| 2152 | int paused; | 2148 | int paused; |
| 2153 | int wait; | 2149 | int wait; |
| @@ -2185,8 +2181,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) · 31 unmodified lines | |||
| 2185 | * so we must not still own the command. | 2181 | * so we must not still own the command. |
| 2186 | */ | 2182 | */ |
| 2187 | scmd_printk(KERN_INFO, cmd, "Is not an active device\n"); | 2183 | scmd_printk(KERN_INFO, cmd, "Is not an active device\n"); |
| 2188 | retval = SUCCESS; | 2184 | goto done; |
| 2189 | goto no_cmd; | ||
| 2190 | } | 2185 | } |
| 2191 | 2186 | ||
| 2192 | /* | 2187 | /* |
| @@ -2199,7 +2194,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) · 6 unmodified lines | |||
| 2199 | 2194 | ||
| 2200 | if (pending_scb == NULL) { | 2195 | if (pending_scb == NULL) { |
| 2201 | scmd_printk(KERN_INFO, cmd, "Command not found\n"); | 2196 | scmd_printk(KERN_INFO, cmd, "Command not found\n"); |
| 2202 | goto no_cmd; | 2197 | goto done; |
| 2203 | } | 2198 | } |
| 2204 | 2199 | ||
| 2205 | if ((pending_scb->flags & SCB_RECOVERY_SCB) != 0) { | 2200 | if ((pending_scb->flags & SCB_RECOVERY_SCB) != 0) { |
| @@ -2207,7 +2202,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) · 1 unmodified line | |||
| 2207 | * We can't queue two recovery actions using the same SCB | 2202 | * We can't queue two recovery actions using the same SCB |
| 2208 | */ | 2203 | */ |
| 2209 | retval = FAILED; | 2204 | retval = FAILED; |
| 2210 | goto done; | 2205 | goto done; |
| 2211 | } | 2206 | } |
| 2212 | 2207 | ||
| 2213 | /* | 2208 | /* |
| @@ -2222,7 +2217,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) · 8 unmodified lines | |||
| 2222 | 2217 | ||
| 2223 | if ((pending_scb->flags & SCB_ACTIVE) == 0) { | 2218 | if ((pending_scb->flags & SCB_ACTIVE) == 0) { |
| 2224 | scmd_printk(KERN_INFO, cmd, "Command already completed\n"); | 2219 | scmd_printk(KERN_INFO, cmd, "Command already completed\n"); |
| 2225 | goto no_cmd; | 2220 | goto done; |
| 2226 | } | 2221 | } |
| 2227 | 2222 | ||
| 2228 | printk("%s: At time of recovery, card was %spaused\n", | 2223 | printk("%s: At time of recovery, card was %spaused\n", |
| @@ -2239,7 +2234,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) · 10 unmodified lines | |||
| 2239 | printk("%s:%d:%d:%d: Cmd aborted from QINFIFO\n", | 2234 | printk("%s:%d:%d:%d: Cmd aborted from QINFIFO\n", |
| 2240 | ahd_name(ahd), cmd->device->channel, | 2235 | ahd_name(ahd), cmd->device->channel, |
| 2241 | cmd->device->id, (u8)cmd->device->lun); | 2236 | cmd->device->id, (u8)cmd->device->lun); |
| 2242 | retval = SUCCESS; | ||
| 2243 | goto done; | 2237 | goto done; |
| 2244 | } | 2238 | } |
| 2245 | 2239 | ||
| @@ -2336,17 +2330,10 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) · 90 unmodified lines | |||
| 2336 | } else { | 2330 | } else { |
| 2337 | scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n"); | 2331 | scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n"); |
| 2338 | retval = FAILED; | 2332 | retval = FAILED; |
| 2339 | goto done; | ||
| 2340 | } | 2333 | } |
| 2341 | 2334 | ||
| 2342 | no_cmd: | 2335 | |
| 2343 | /* | 2336 | ahd_restore_modes(ahd, saved_modes); |
| 2344 | * Our assumption is that if we don't have the command, no | ||
| 2345 | * recovery action was required, so we return success. Again, | ||
| 2346 | * the semantics of the mid-layer recovery engine are not | ||
| 2347 | * well defined, so this may change in time. | ||
| 2348 | */ | ||
| 2349 | retval = SUCCESS; | ||
| 2350 | done: | 2337 | done: |
| 2351 | if (paused) | 2338 | if (paused) |
| 2352 | ahd_unpause(ahd); | 2339 | ahd_unpause(ahd); |
| @@ -564,8 +564,6 @@ ahc_linux_target_alloc(struct scsi_target *starget) · 563 unmodified lines | |||
| 564 | struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); | 564 | struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); |
| 565 | unsigned short scsirate; | 565 | unsigned short scsirate; |
| 566 | struct ahc_devinfo devinfo; | 566 | struct ahc_devinfo devinfo; |
| 567 | struct ahc_initiator_tinfo *tinfo; | ||
| 568 | struct ahc_tmode_tstate *tstate; | ||
| 569 | char channel = starget->channel + 'A'; | 567 | char channel = starget->channel + 'A'; |
| 570 | unsigned int our_id = ahc->our_id; | 568 | unsigned int our_id = ahc->our_id; |
| 571 | unsigned int target_offset; | 569 | unsigned int target_offset; |
| @@ -612,9 +610,6 @@ ahc_linux_target_alloc(struct scsi_target *starget) · 40 unmodified lines | |||
| 612 | spi_max_offset(starget) = 0; | 610 | spi_max_offset(starget) = 0; |
| 613 | spi_min_period(starget) = | 611 | spi_min_period(starget) = |
| 614 | ahc_find_period(ahc, scsirate, maxsync); | 612 | ahc_find_period(ahc, scsirate, maxsync); |
| 615 | |||
| 616 | tinfo = ahc_fetch_transinfo(ahc, channel, ahc->our_id, | ||
| 617 | starget->id, &tstate); | ||
| 618 | } | 613 | } |
| 619 | ahc_compile_devinfo(&devinfo, our_id, starget->id, | 614 | ahc_compile_devinfo(&devinfo, our_id, starget->id, |
| 620 | CAM_LUN_WILDCARD, channel, | 615 | CAM_LUN_WILDCARD, channel, |
| @@ -671,10 +666,6 @@ ahc_linux_slave_alloc(struct scsi_device *sdev) · 50 unmodified lines | |||
| 671 | static int | 666 | static int |
| 672 | ahc_linux_slave_configure(struct scsi_device *sdev) | 667 | ahc_linux_slave_configure(struct scsi_device *sdev) |
| 673 | { | 668 | { |
| 674 | struct ahc_softc *ahc; | ||
| 675 | |||
| 676 | ahc = *((struct ahc_softc **)sdev->host->hostdata); | ||
| 677 | |||
| 678 | if (bootverbose) | 669 | if (bootverbose) |
| 679 | sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); | 670 | sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); |
| 680 | 671 | ||
| @@ -1601,7 +1592,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel, · 920 unmodified lines | |||
| 1601 | case AC_TRANSFER_NEG: | 1592 | case AC_TRANSFER_NEG: |
| 1602 | { | 1593 | { |
| 1603 | struct scsi_target *starget; | 1594 | struct scsi_target *starget; |
| 1604 | struct ahc_linux_target *targ; | ||
| 1605 | struct ahc_initiator_tinfo *tinfo; | 1595 | struct ahc_initiator_tinfo *tinfo; |
| 1606 | struct ahc_tmode_tstate *tstate; | 1596 | struct ahc_tmode_tstate *tstate; |
| 1607 | int target_offset; | 1597 | int target_offset; |
| @@ -1635,7 +1625,6 @@ ahc_send_async(struct ahc_softc *ahc, char channel, · 27 unmodified lines | |||
| 1635 | starget = ahc->platform_data->starget[target_offset]; | 1625 | starget = ahc->platform_data->starget[target_offset]; |
| 1636 | if (starget == NULL) | 1626 | if (starget == NULL) |
| 1637 | break; | 1627 | break; |
| 1638 | targ = scsi_transport_target_data(starget); | ||
| 1639 | 1628 | ||
| 1640 | target_ppr_options = | 1629 | target_ppr_options = |
| 1641 | (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) | 1630 | (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) |
| @@ -1722,10 +1711,12 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) · 80 unmodified lines | |||
| 1722 | */ | 1711 | */ |
| 1723 | cmd->sense_buffer[0] = 0; | 1712 | cmd->sense_buffer[0] = 0; |
| 1724 | if (ahc_get_transaction_status(scb) == CAM_REQ_INPROG) { | 1713 | if (ahc_get_transaction_status(scb) == CAM_REQ_INPROG) { |
| 1714 | #ifdef AHC_REPORT_UNDERFLOWS | ||
| 1725 | uint32_t amount_xferred; | 1715 | uint32_t amount_xferred; |
| 1726 | 1716 | ||
| 1727 | amount_xferred = | 1717 | amount_xferred = |
| 1728 | ahc_get_transfer_length(scb) - ahc_get_residual(scb); | 1718 | ahc_get_transfer_length(scb) - ahc_get_residual(scb); |
| 1719 | #endif | ||
| 1729 | if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) { | 1720 | if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) { |
| 1730 | #ifdef AHC_DEBUG | 1721 | #ifdef AHC_DEBUG |
| 1731 | if ((ahc_debug & AHC_SHOW_MISC) != 0) { | 1722 | if ((ahc_debug & AHC_SHOW_MISC) != 0) { |
| @@ -236,7 +236,7 @@ static int asd_init_sata_pm_table_ddb(struct domain_device *dev) · 235 unmodified lines | |||
| 236 | 236 | ||
| 237 | /** | 237 | /** |
| 238 | * asd_init_sata_pm_port_ddb -- SATA Port Multiplier Port | 238 | * asd_init_sata_pm_port_ddb -- SATA Port Multiplier Port |
| 239 | * dev: pointer to domain device | 239 | * @dev: pointer to domain device |
| 240 | * | 240 | * |
| 241 | * For SATA Port Multiplier Ports we need to allocate one SATA Port | 241 | * For SATA Port Multiplier Ports we need to allocate one SATA Port |
| 242 | * Multiplier Port DDB and depending on whether the target on it | 242 | * Multiplier Port DDB and depending on whether the target on it |
| @@ -281,7 +281,7 @@ static int asd_init_initiator_ddb(struct domain_device *dev) · 38 unmodified lines | |||
| 281 | 281 | ||
| 282 | /** | 282 | /** |
| 283 | * asd_init_sata_pm_ddb -- SATA Port Multiplier | 283 | * asd_init_sata_pm_ddb -- SATA Port Multiplier |
| 284 | * dev: pointer to domain device | 284 | * @dev: pointer to domain device |
| 285 | * | 285 | * |
| 286 | * For STP and direct-attached SATA Port Multipliers we need | 286 | * For STP and direct-attached SATA Port Multipliers we need |
| 287 | * one target port DDB entry and one SATA PM table DDB entry. | 287 | * one target port DDB entry and one SATA PM table DDB entry. |
| @@ -575,7 +575,7 @@ static int asd_extend_cmdctx(struct asd_ha_struct *asd_ha) · 574 unmodified lines | |||
| 575 | 575 | ||
| 576 | /** | 576 | /** |
| 577 | * asd_init_ctxmem -- initialize context memory | 577 | * asd_init_ctxmem -- initialize context memory |
| 578 | * asd_ha: pointer to host adapter structure | 578 | * @asd_ha: pointer to host adapter structure |
| 579 | * | 579 | * |
| 580 | * This function sets the maximum number of SCBs and | 580 | * This function sets the maximum number of SCBs and |
| 581 | * DDBs which can be used by the sequencer. This is normally | 581 | * DDBs which can be used by the sequencer. This is normally |
| @@ -1146,7 +1146,6 @@ static void asd_swap_head_scb(struct asd_ha_struct *asd_ha, · 564 unmodified lines | |||
| 1146 | /** | 1146 | /** |
| 1147 | * asd_start_timers -- (add and) start timers of SCBs | 1147 | * asd_start_timers -- (add and) start timers of SCBs |
| 1148 | * @list: pointer to struct list_head of the scbs | 1148 | * @list: pointer to struct list_head of the scbs |
| 1149 | * @to: timeout in jiffies | ||
| 1150 | * | 1149 | * |
| 1151 | * If an SCB in the @list has no timer function, assign the default | 1150 | * If an SCB in the @list has no timer function, assign the default |
| 1152 | * one, then start the timer of the SCB. This function is | 1151 | * one, then start the timer of the SCB. This function is |
| @@ -530,7 +530,7 @@ static int asd_create_ha_caches(struct asd_ha_struct *asd_ha) · 529 unmodified lines | |||
| 530 | return 0; | 530 | return 0; |
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | /** | 533 | /* |
| 534 | * asd_free_edbs -- free empty data buffers | 534 | * asd_free_edbs -- free empty data buffers |
| 535 | * asd_ha: pointer to host adapter structure | 535 | * asd_ha: pointer to host adapter structure |
| 536 | */ | 536 | */ |
| @@ -123,8 +123,8 @@ static unsigned ord_phy(struct asd_ha_struct *asd_ha, struct asd_phy *phy) · 122 unmodified lines | |||
| 123 | 123 | ||
| 124 | /** | 124 | /** |
| 125 | * asd_get_attached_sas_addr -- extract/generate attached SAS address | 125 | * asd_get_attached_sas_addr -- extract/generate attached SAS address |
| 126 | * phy: pointer to asd_phy | 126 | * @phy: pointer to asd_phy |
| 127 | * sas_addr: pointer to buffer where the SAS address is to be written | 127 | * @sas_addr: pointer to buffer where the SAS address is to be written |
| 128 | * | 128 | * |
| 129 | * This function extracts the SAS address from an IDENTIFY frame | 129 | * This function extracts the SAS address from an IDENTIFY frame |
| 130 | * received. If OOB is SATA, then a SAS address is generated from the | 130 | * received. If OOB is SATA, then a SAS address is generated from the |
| @@ -847,7 +847,7 @@ void asd_build_initiate_link_adm_task(struct asd_ascb *ascb, int phy_id, · 716 unmodified lines | |||
| 847 | 847 | ||
| 848 | /** | 848 | /** |
| 849 | * asd_ascb_timedout -- called when a pending SCB's timer has expired | 849 | * asd_ascb_timedout -- called when a pending SCB's timer has expired |
| 850 | * @data: unsigned long, a pointer to the ascb in question | 850 | * @t: Timer context used to fetch the SCB |
| 851 | * | 851 | * |
| 852 | * This is the default timeout function which does the most necessary. | 852 | * This is the default timeout function which does the most necessary. |
| 853 | * Upper layers can implement their own timeout function, say to free | 853 | * Upper layers can implement their own timeout function, say to free |
| @@ -582,6 +582,7 @@ static void asd_init_cseq_scratch(struct asd_ha_struct *asd_ha) · 581 unmodified lines | |||
| 582 | /** | 582 | /** |
| 583 | * asd_init_lseq_mip -- initialize LSEQ Mode independent pages 0-3 | 583 | * asd_init_lseq_mip -- initialize LSEQ Mode independent pages 0-3 |
| 584 | * @asd_ha: pointer to host adapter structure | 584 | * @asd_ha: pointer to host adapter structure |
| 585 | * @lseq: link sequencer | ||
| 585 | */ | 586 | */ |
| 586 | static void asd_init_lseq_mip(struct asd_ha_struct *asd_ha, u8 lseq) | 587 | static void asd_init_lseq_mip(struct asd_ha_struct *asd_ha, u8 lseq) |
| 587 | { | 588 | { |
| @@ -669,6 +670,7 @@ static void asd_init_lseq_mip(struct asd_ha_struct *asd_ha, u8 lseq) · 81 unmodified lines | |||
| 669 | /** | 670 | /** |
| 670 | * asd_init_lseq_mdp -- initialize LSEQ mode dependent pages. | 671 | * asd_init_lseq_mdp -- initialize LSEQ mode dependent pages. |
| 671 | * @asd_ha: pointer to host adapter structure | 672 | * @asd_ha: pointer to host adapter structure |
| 673 | * @lseq: link sequencer | ||
| 672 | */ | 674 | */ |
| 673 | static void asd_init_lseq_mdp(struct asd_ha_struct *asd_ha, int lseq) | 675 | static void asd_init_lseq_mdp(struct asd_ha_struct *asd_ha, int lseq) |
| 674 | { | 676 | { |
| @@ -953,6 +955,7 @@ static void asd_init_cseq_cio(struct asd_ha_struct *asd_ha) · 278 unmodified lines | |||
| 953 | /** | 955 | /** |
| 954 | * asd_init_lseq_cio -- initialize LmSEQ CIO registers | 956 | * asd_init_lseq_cio -- initialize LmSEQ CIO registers |
| 955 | * @asd_ha: pointer to host adapter structure | 957 | * @asd_ha: pointer to host adapter structure |
| 958 | * @lseq: link sequencer | ||
| 956 | */ | 959 | */ |
| 957 | static void asd_init_lseq_cio(struct asd_ha_struct *asd_ha, int lseq) | 960 | static void asd_init_lseq_cio(struct asd_ha_struct *asd_ha, int lseq) |
| 958 | { | 961 | { |
| @@ -1345,7 +1348,8 @@ int asd_start_seqs(struct asd_ha_struct *asd_ha) · 386 unmodified lines | |||
| 1345 | 1348 | ||
| 1346 | /** | 1349 | /** |
| 1347 | * asd_update_port_links -- update port_map_by_links and phy_is_up | 1350 | * asd_update_port_links -- update port_map_by_links and phy_is_up |
| 1348 | * @sas_phy: pointer to the phy which has been added to a port | 1351 | * @asd_ha: pointer to host adapter structure |
| 1352 | * @phy: pointer to the phy which has been added to a port | ||
| 1349 | * | 1353 | * |
| 1350 | * 1) When a link reset has completed and we got BYTES DMAED with a | 1354 | * 1) When a link reset has completed and we got BYTES DMAED with a |
| 1351 | * valid frame we call this function for that phy, to indicate that | 1355 | * valid frame we call this function for that phy, to indicate that |
| @@ -673,7 +673,7 @@ int asd_lu_reset(struct domain_device *dev, u8 *lun) · 672 unmodified lines | |||
| 673 | 673 | ||
| 674 | /** | 674 | /** |
| 675 | * asd_query_task -- send a QUERY TASK TMF to an I_T_L_Q nexus | 675 | * asd_query_task -- send a QUERY TASK TMF to an I_T_L_Q nexus |
| 676 | * task: pointer to sas_task struct of interest | 676 | * @task: pointer to sas_task struct of interest |
| 677 | * | 677 | * |
| 678 | * Returns: TMF_RESP_FUNC_COMPLETE if the task is not in the task set, | 678 | * Returns: TMF_RESP_FUNC_COMPLETE if the task is not in the task set, |
| 679 | * or TMF_RESP_FUNC_SUCC if the task is in the task set. | 679 | * or TMF_RESP_FUNC_SUCC if the task is in the task set. |
| @@ -283,11 +283,10 @@ static bool arcmsr_remap_pciregion(struct AdapterControlBlock *acb) · 282 unmodified lines | |||
| 283 | } | 283 | } |
| 284 | case ACB_ADAPTER_TYPE_D: { | 284 | case ACB_ADAPTER_TYPE_D: { |
| 285 | void __iomem *mem_base0; | 285 | void __iomem *mem_base0; |
| 286 | unsigned long addr, range, flags; | 286 | unsigned long addr, range; |
| 287 | 287 | ||
| 288 | addr = (unsigned long)pci_resource_start(pdev, 0); | 288 | addr = (unsigned long)pci_resource_start(pdev, 0); |
| 289 | range = pci_resource_len(pdev, 0); | 289 | range = pci_resource_len(pdev, 0); |
| 290 | flags = pci_resource_flags(pdev, 0); | ||
| 291 | mem_base0 = ioremap(addr, range); | 290 | mem_base0 = ioremap(addr, range); |
| 292 | if (!mem_base0) { | 291 | if (!mem_base0) { |
| 293 | pr_notice("arcmsr%d: memory mapping region fail\n", | 292 | pr_notice("arcmsr%d: memory mapping region fail\n", |
| @@ -1067,12 +1066,11 @@ static void arcmsr_free_irq(struct pci_dev *pdev, · 773 unmodified lines | |||
| 1067 | 1066 | ||
| 1068 | static int arcmsr_suspend(struct pci_dev *pdev, pm_message_t state) | 1067 | static int arcmsr_suspend(struct pci_dev *pdev, pm_message_t state) |
| 1069 | { | 1068 | { |
| 1070 | uint32_t intmask_org; | ||
| 1071 | struct Scsi_Host *host = pci_get_drvdata(pdev); | 1069 | struct Scsi_Host *host = pci_get_drvdata(pdev); |
| 1072 | struct AdapterControlBlock *acb = | 1070 | struct AdapterControlBlock *acb = |
| 1073 | (struct AdapterControlBlock *)host->hostdata; | 1071 | (struct AdapterControlBlock *)host->hostdata; |
| 1074 | 1072 | ||
| 1075 | intmask_org = arcmsr_disable_outbound_ints(acb); | 1073 | arcmsr_disable_outbound_ints(acb); |
| 1076 | arcmsr_free_irq(pdev, acb); | 1074 | arcmsr_free_irq(pdev, acb); |
| 1077 | del_timer_sync(&acb->eternal_timer); | 1075 | del_timer_sync(&acb->eternal_timer); |
| 1078 | if (set_date_time) | 1076 | if (set_date_time) |
| @@ -1407,7 +1405,7 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb) · 328 unmodified lines | |||
| 1407 | struct ARCMSR_CDB *pARCMSR_CDB; | 1405 | struct ARCMSR_CDB *pARCMSR_CDB; |
| 1408 | bool error; | 1406 | bool error; |
| 1409 | struct CommandControlBlock *pCCB; | 1407 | struct CommandControlBlock *pCCB; |
| 1410 | unsigned long ccb_cdb_phy, cdb_phy_hipart; | 1408 | unsigned long ccb_cdb_phy; |
| 1411 | 1409 | ||
| 1412 | switch (acb->adapter_type) { | 1410 | switch (acb->adapter_type) { |
| 1413 | 1411 | ||
| @@ -1489,8 +1487,6 @@ static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb) · 75 unmodified lines | |||
| 1489 | ((toggle ^ 0x4000) + 1); | 1487 | ((toggle ^ 0x4000) + 1); |
| 1490 | doneq_index = pmu->doneq_index; | 1488 | doneq_index = pmu->doneq_index; |
| 1491 | spin_unlock_irqrestore(&acb->doneq_lock, flags); | 1489 | spin_unlock_irqrestore(&acb->doneq_lock, flags); |
| 1492 | cdb_phy_hipart = pmu->done_qbuffer[doneq_index & | ||
| 1493 | 0xFFF].addressHigh; | ||
| 1494 | addressLow = pmu->done_qbuffer[doneq_index & | 1490 | addressLow = pmu->done_qbuffer[doneq_index & |
| 1495 | 0xFFF].addressLow; | 1491 | 0xFFF].addressLow; |
| 1496 | ccb_cdb_phy = (addressLow & 0xFFFFFFF0); | 1492 | ccb_cdb_phy = (addressLow & 0xFFFFFFF0); |
| @@ -2445,7 +2441,7 @@ static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb) · 948 unmodified lines | |||
| 2445 | struct MessageUnit_D *pmu; | 2441 | struct MessageUnit_D *pmu; |
| 2446 | struct ARCMSR_CDB *arcmsr_cdb; | 2442 | struct ARCMSR_CDB *arcmsr_cdb; |
| 2447 | struct CommandControlBlock *ccb; | 2443 | struct CommandControlBlock *ccb; |
| 2448 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart; | 2444 | unsigned long flags, ccb_cdb_phy; |
| 2449 | 2445 | ||
| 2450 | spin_lock_irqsave(&acb->doneq_lock, flags); | 2446 | spin_lock_irqsave(&acb->doneq_lock, flags); |
| 2451 | pmu = acb->pmuD; | 2447 | pmu = acb->pmuD; |
| @@ -2459,8 +2455,6 @@ static void arcmsr_hbaD_postqueue_isr(struct AdapterControlBlock *acb) · 7 unmodified lines | |||
| 2459 | pmu->doneq_index = index_stripped ? (index_stripped | toggle) : | 2455 | pmu->doneq_index = index_stripped ? (index_stripped | toggle) : |
| 2460 | ((toggle ^ 0x4000) + 1); | 2456 | ((toggle ^ 0x4000) + 1); |
| 2461 | doneq_index = pmu->doneq_index; | 2457 | doneq_index = pmu->doneq_index; |
| 2462 | cdb_phy_hipart = pmu->done_qbuffer[doneq_index & | ||
| 2463 | 0xFFF].addressHigh; | ||
| 2464 | addressLow = pmu->done_qbuffer[doneq_index & | 2458 | addressLow = pmu->done_qbuffer[doneq_index & |
| 2465 | 0xFFF].addressLow; | 2459 | 0xFFF].addressLow; |
| 2466 | ccb_cdb_phy = (addressLow & 0xFFFFFFF0); | 2460 | ccb_cdb_phy = (addressLow & 0xFFFFFFF0); |
| @@ -3495,7 +3489,7 @@ static int arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb, · 1028 unmodified lines | |||
| 3495 | bool error; | 3489 | bool error; |
| 3496 | uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb; | 3490 | uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb; |
| 3497 | int rtn, doneq_index, index_stripped, outbound_write_pointer, toggle; | 3491 | int rtn, doneq_index, index_stripped, outbound_write_pointer, toggle; |
| 3498 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart; | 3492 | unsigned long flags, ccb_cdb_phy; |
| 3499 | struct ARCMSR_CDB *arcmsr_cdb; | 3493 | struct ARCMSR_CDB *arcmsr_cdb; |
| 3500 | struct CommandControlBlock *pCCB; | 3494 | struct CommandControlBlock *pCCB; |
| 3501 | struct MessageUnit_D *pmu = acb->pmuD; | 3495 | struct MessageUnit_D *pmu = acb->pmuD; |
| @@ -3527,8 +3521,6 @@ polling_hbaD_ccb_retry: · 25 unmodified lines | |||
| 3527 | ((toggle ^ 0x4000) + 1); | 3521 | ((toggle ^ 0x4000) + 1); |
| 3528 | doneq_index = pmu->doneq_index; | 3522 | doneq_index = pmu->doneq_index; |
| 3529 | spin_unlock_irqrestore(&acb->doneq_lock, flags); | 3523 | spin_unlock_irqrestore(&acb->doneq_lock, flags); |
| 3530 | cdb_phy_hipart = pmu->done_qbuffer[doneq_index & | ||
| 3531 | 0xFFF].addressHigh; | ||
| 3532 | flag_ccb = pmu->done_qbuffer[doneq_index & 0xFFF].addressLow; | 3524 | flag_ccb = pmu->done_qbuffer[doneq_index & 0xFFF].addressLow; |
| 3533 | ccb_cdb_phy = (flag_ccb & 0xFFFFFFF0); | 3525 | ccb_cdb_phy = (flag_ccb & 0xFFFFFFF0); |
| 3534 | if (acb->cdb_phyadd_hipart) | 3526 | if (acb->cdb_phyadd_hipart) |
| @@ -450,7 +450,7 @@ static int cumanascsi2_probe(struct expansion_card *ec, · 449 unmodified lines | |||
| 450 | 450 | ||
| 451 | if (info->info.scsi.dma != NO_DMA) | 451 | if (info->info.scsi.dma != NO_DMA) |
| 452 | free_dma(info->info.scsi.dma); | 452 | free_dma(info->info.scsi.dma); |
| 453 | free_irq(ec->irq, host); | 453 | free_irq(ec->irq, info); |
| 454 | 454 | ||
| 455 | out_release: | 455 | out_release: |
| 456 | fas216_release(host); | 456 | fas216_release(host); |
| @@ -571,7 +571,7 @@ static int eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id) · 570 unmodified lines | |||
| 571 | 571 | ||
| 572 | if (info->info.scsi.dma != NO_DMA) | 572 | if (info->info.scsi.dma != NO_DMA) |
| 573 | free_dma(info->info.scsi.dma); | 573 | free_dma(info->info.scsi.dma); |
| 574 | free_irq(ec->irq, host); | 574 | free_irq(ec->irq, info); |
| 575 | 575 | ||
| 576 | out_remove: | 576 | out_remove: |
| 577 | fas216_remove(host); | 577 | fas216_remove(host); |
| @@ -378,7 +378,7 @@ static int powertecscsi_probe(struct expansion_card *ec, · 377 unmodified lines | |||
| 378 | 378 | ||
| 379 | if (info->info.scsi.dma != NO_DMA) | 379 | if (info->info.scsi.dma != NO_DMA) |
| 380 | free_dma(info->info.scsi.dma); | 380 | free_dma(info->info.scsi.dma); |
| 381 | free_irq(ec->irq, host); | 381 | free_irq(ec->irq, info); |
| 382 | 382 | ||
| 383 | out_release: | 383 | out_release: |
| 384 | fas216_release(host); | 384 | fas216_release(host); |
| @@ -27,6 +27,7 @@ extern struct iscsi_transport beiscsi_iscsi_transport; · 26 unmodified lines | |||
| 27 | 27 | ||
| 28 | /** | 28 | /** |
| 29 | * beiscsi_session_create - creates a new iscsi session | 29 | * beiscsi_session_create - creates a new iscsi session |
| 30 | * @ep: pointer to iscsi ep | ||
| 30 | * @cmds_max: max commands supported | 31 | * @cmds_max: max commands supported |
| 31 | * @qdepth: max queue depth supported | 32 | * @qdepth: max queue depth supported |
| 32 | * @initial_cmdsn: initial iscsi CMDSN | 33 | * @initial_cmdsn: initial iscsi CMDSN |
| @@ -164,6 +165,7 @@ beiscsi_conn_create(struct iscsi_cls_session *cls_session, u32 cid) · 131 unmodified lines | |||
| 164 | * @cls_session: pointer to iscsi cls session | 165 | * @cls_session: pointer to iscsi cls session |
| 165 | * @cls_conn: pointer to iscsi cls conn | 166 | * @cls_conn: pointer to iscsi cls conn |
| 166 | * @transport_fd: EP handle(64 bit) | 167 | * @transport_fd: EP handle(64 bit) |
| 168 | * @is_leading: indicate if this is the session leading connection (MCS) | ||
| 167 | * | 169 | * |
| 168 | * This function binds the TCP Conn with iSCSI Connection and Session. | 170 | * This function binds the TCP Conn with iSCSI Connection and Session. |
| 169 | */ | 171 | */ |
| @@ -992,7 +994,7 @@ static void beiscsi_put_cid(struct beiscsi_hba *phba, unsigned short cid) · 822 unmodified lines | |||
| 992 | 994 | ||
| 993 | /** | 995 | /** |
| 994 | * beiscsi_free_ep - free endpoint | 996 | * beiscsi_free_ep - free endpoint |
| 995 | * @ep: pointer to iscsi endpoint structure | 997 | * @beiscsi_ep: pointer to device endpoint struct |
| 996 | */ | 998 | */ |
| 997 | static void beiscsi_free_ep(struct beiscsi_endpoint *beiscsi_ep) | 999 | static void beiscsi_free_ep(struct beiscsi_endpoint *beiscsi_ep) |
| 998 | { | 1000 | { |
| @@ -1027,9 +1029,10 @@ static void beiscsi_free_ep(struct beiscsi_endpoint *beiscsi_ep) · 28 unmodified lines | |||
| 1027 | 1029 | ||
| 1028 | /** | 1030 | /** |
| 1029 | * beiscsi_open_conn - Ask FW to open a TCP connection | 1031 | * beiscsi_open_conn - Ask FW to open a TCP connection |
| 1030 | * @ep: endpoint to be used | 1032 | * @ep: pointer to device endpoint struct |
| 1031 | * @src_addr: The source IP address | 1033 | * @src_addr: The source IP address |
| 1032 | * @dst_addr: The Destination IP address | 1034 | * @dst_addr: The Destination IP address |
| 1035 | * @non_blocking: blocking or non-blocking call | ||
| 1033 | * | 1036 | * |
| 1034 | * Asks the FW to open a TCP connection | 1037 | * Asks the FW to open a TCP connection |
| 1035 | */ | 1038 | */ |
| @@ -1123,7 +1126,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, · 87 unmodified lines | |||
| 1123 | 1126 | ||
| 1124 | /** | 1127 | /** |
| 1125 | * beiscsi_ep_connect - Ask chip to create TCP Conn | 1128 | * beiscsi_ep_connect - Ask chip to create TCP Conn |
| 1126 | * @scsi_host: Pointer to scsi_host structure | 1129 | * @shost: Pointer to scsi_host structure |
| 1127 | * @dst_addr: The IP address of Target | 1130 | * @dst_addr: The IP address of Target |
| 1128 | * @non_blocking: blocking or non-blocking call | 1131 | * @non_blocking: blocking or non-blocking call |
| 1129 | * | 1132 | * |
| @@ -1228,7 +1231,7 @@ static void beiscsi_flush_cq(struct beiscsi_hba *phba) · 98 unmodified lines | |||
| 1228 | 1231 | ||
| 1229 | /** | 1232 | /** |
| 1230 | * beiscsi_conn_close - Invalidate and upload connection | 1233 | * beiscsi_conn_close - Invalidate and upload connection |
| 1231 | * @ep: The iscsi endpoint | 1234 | * @beiscsi_ep: pointer to device endpoint struct |
| 1232 | * | 1235 | * |
| 1233 | * Returns 0 on success, -1 on failure. | 1236 | * Returns 0 on success, -1 on failure. |
| 1234 | */ | 1237 | */ |
| @@ -977,7 +977,7 @@ beiscsi_get_wrb_handle(struct hwi_wrb_context *pwrb_context, · 976 unmodified lines | |||
| 977 | * alloc_wrb_handle - To allocate a wrb handle | 977 | * alloc_wrb_handle - To allocate a wrb handle |
| 978 | * @phba: The hba pointer | 978 | * @phba: The hba pointer |
| 979 | * @cid: The cid to use for allocation | 979 | * @cid: The cid to use for allocation |
| 980 | * @pwrb_context: ptr to ptr to wrb context | 980 | * @pcontext: ptr to ptr to wrb context |
| 981 | * | 981 | * |
| 982 | * This happens under session_lock until submission to chip | 982 | * This happens under session_lock until submission to chip |
| 983 | */ | 983 | */ |
| @@ -1394,7 +1394,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn, · 410 unmodified lines | |||
| 1394 | spin_unlock_bh(&session->back_lock); | 1394 | spin_unlock_bh(&session->back_lock); |
| 1395 | } | 1395 | } |
| 1396 | 1396 | ||
| 1397 | /** | 1397 | /* |
| 1398 | * ASYNC PDUs include | 1398 | * ASYNC PDUs include |
| 1399 | * a. Unsolicited NOP-In (target initiated NOP-In) | 1399 | * a. Unsolicited NOP-In (target initiated NOP-In) |
| 1400 | * b. ASYNC Messages | 1400 | * b. ASYNC Messages |
| @@ -97,6 +97,7 @@ unsigned int mgmt_vendor_specific_fw_cmd(struct be_ctrl_info *ctrl, · 96 unmodified lines | |||
| 97 | 97 | ||
| 98 | /** | 98 | /** |
| 99 | * mgmt_open_connection()- Establish a TCP CXN | 99 | * mgmt_open_connection()- Establish a TCP CXN |
| 100 | * @phba: driver priv structure | ||
| 100 | * @dst_addr: Destination Address | 101 | * @dst_addr: Destination Address |
| 101 | * @beiscsi_ep: ptr to device endpoint struct | 102 | * @beiscsi_ep: ptr to device endpoint struct |
| 102 | * @nonemb_cmd: ptr to memory allocated for command | 103 | * @nonemb_cmd: ptr to memory allocated for command |
| @@ -209,7 +210,7 @@ int mgmt_open_connection(struct beiscsi_hba *phba, · 106 unmodified lines | |||
| 209 | return tag; | 210 | return tag; |
| 210 | } | 211 | } |
| 211 | 212 | ||
| 212 | /* | 213 | /** |
| 213 | * beiscsi_exec_nemb_cmd()- execute non-embedded MBX cmd | 214 | * beiscsi_exec_nemb_cmd()- execute non-embedded MBX cmd |
| 214 | * @phba: driver priv structure | 215 | * @phba: driver priv structure |
| 215 | * @nonemb_cmd: DMA address of the MBX command to be issued | 216 | * @nonemb_cmd: DMA address of the MBX command to be issued |
| @@ -1237,7 +1237,7 @@ bfa_iocfc_disable_cb(void *bfa_arg, bfa_boolean_t compl) · 1236 unmodified lines | |||
| 1237 | complete(&bfad->disable_comp); | 1237 | complete(&bfad->disable_comp); |
| 1238 | } | 1238 | } |
| 1239 | 1239 | ||
| 1240 | /** | 1240 | /* |
| 1241 | * configure queue registers from firmware response | 1241 | * configure queue registers from firmware response |
| 1242 | */ | 1242 | */ |
| 1243 | static void | 1243 | static void |
| @@ -2335,9 +2335,7 @@ bfa_fcpim_lunmask_delete(struct bfa_s *bfa, u16 vf_id, wwn_t *pwwn, · 2334 unmodified lines | |||
| 2335 | wwn_t rpwwn, struct scsi_lun lun) | 2335 | wwn_t rpwwn, struct scsi_lun lun) |
| 2336 | { | 2336 | { |
| 2337 | struct bfa_lun_mask_s *lunm_list; | 2337 | struct bfa_lun_mask_s *lunm_list; |
| 2338 | struct bfa_rport_s *rp = NULL; | ||
| 2339 | struct bfa_fcs_lport_s *port = NULL; | 2338 | struct bfa_fcs_lport_s *port = NULL; |
| 2340 | struct bfa_fcs_rport_s *rp_fcs; | ||
| 2341 | int i; | 2339 | int i; |
| 2342 | 2340 | ||
| 2343 | /* in min cfg lunm_list could be NULL but no commands should run. */ | 2341 | /* in min cfg lunm_list could be NULL but no commands should run. */ |
| @@ -2353,12 +2351,8 @@ bfa_fcpim_lunmask_delete(struct bfa_s *bfa, u16 vf_id, wwn_t *pwwn, · 9 unmodified lines | |||
| 2353 | port = bfa_fcs_lookup_port( | 2351 | port = bfa_fcs_lookup_port( |
| 2354 | &((struct bfad_s *)bfa->bfad)->bfa_fcs, | 2352 | &((struct bfad_s *)bfa->bfad)->bfa_fcs, |
| 2355 | vf_id, *pwwn); | 2353 | vf_id, *pwwn); |
| 2356 | if (port) { | 2354 | if (port) |
| 2357 | *pwwn = port->port_cfg.pwwn; | 2355 | *pwwn = port->port_cfg.pwwn; |
| 2358 | rp_fcs = bfa_fcs_lport_get_rport_by_pwwn(port, rpwwn); | ||
| 2359 | if (rp_fcs) | ||
| 2360 | rp = rp_fcs->bfa_rport; | ||
| 2361 | } | ||
| 2362 | } | 2356 | } |
| 2363 | 2357 | ||
| 2364 | lunm_list = bfa_get_lun_mask_list(bfa); | 2358 | lunm_list = bfa_get_lun_mask_list(bfa); |
| @@ -3818,7 +3812,7 @@ bfa_iotag_attach(struct bfa_fcp_mod_s *fcp) · 1453 unmodified lines | |||
| 3818 | } | 3812 | } |
| 3819 | 3813 | ||
| 3820 | 3814 | ||
| 3821 | /** | 3815 | /* |
| 3822 | * To send config req, first try to use throttle value from flash | 3816 | * To send config req, first try to use throttle value from flash |
| 3823 | * If 0, then use driver parameter | 3817 | * If 0, then use driver parameter |
| 3824 | * We need to use min(flash_val, drv_val) because | 3818 | * We need to use min(flash_val, drv_val) because |
| @@ -2240,15 +2240,12 @@ bfa_fcs_rport_process_adisc(struct bfa_fcs_rport_s *rport, · 2239 unmodified lines | |||
| 2240 | struct bfa_fcxp_s *fcxp; | 2240 | struct bfa_fcxp_s *fcxp; |
| 2241 | struct fchs_s fchs; | 2241 | struct fchs_s fchs; |
| 2242 | struct bfa_fcs_lport_s *port = rport->port; | 2242 | struct bfa_fcs_lport_s *port = rport->port; |
| 2243 | struct fc_adisc_s *adisc; | ||
| 2244 | 2243 | ||
| 2245 | bfa_trc(port->fcs, rx_fchs->s_id); | 2244 | bfa_trc(port->fcs, rx_fchs->s_id); |
| 2246 | bfa_trc(port->fcs, rx_fchs->d_id); | 2245 | bfa_trc(port->fcs, rx_fchs->d_id); |
| 2247 | 2246 | ||
| 2248 | rport->stats.adisc_rcvd++; | 2247 | rport->stats.adisc_rcvd++; |
| 2249 | 2248 | ||
| 2250 | adisc = (struct fc_adisc_s *) (rx_fchs + 1); | ||
| 2251 | |||
| 2252 | /* | 2249 | /* |
| 2253 | * Accept if the itnim for this rport is online. | 2250 | * Accept if the itnim for this rport is online. |
| 2254 | * Else reject the ADISC. | 2251 | * Else reject the ADISC. |
| @@ -701,7 +701,7 @@ static void · 700 unmodified lines | |||
| 701 | bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf) | 701 | bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf) |
| 702 | { | 702 | { |
| 703 | struct bfi_ioc_image_hdr_s fwhdr; | 703 | struct bfi_ioc_image_hdr_s fwhdr; |
| 704 | u32 r32, fwstate, pgnum, pgoff, loff = 0; | 704 | u32 r32, fwstate, pgnum, loff = 0; |
| 705 | int i; | 705 | int i; |
| 706 | 706 | ||
| 707 | /* | 707 | /* |
| @@ -731,7 +731,6 @@ bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf) · 23 unmodified lines | |||
| 731 | * Clear fwver hdr | 731 | * Clear fwver hdr |
| 732 | */ | 732 | */ |
| 733 | pgnum = PSS_SMEM_PGNUM(iocpf->ioc->ioc_regs.smem_pg0, loff); | 733 | pgnum = PSS_SMEM_PGNUM(iocpf->ioc->ioc_regs.smem_pg0, loff); |
| 734 | pgoff = PSS_SMEM_PGOFF(loff); | ||
| 735 | writel(pgnum, iocpf->ioc->ioc_regs.host_page_num_fn); | 734 | writel(pgnum, iocpf->ioc->ioc_regs.host_page_num_fn); |
| 736 | 735 | ||
| 737 | for (i = 0; i < sizeof(struct bfi_ioc_image_hdr_s) / sizeof(u32); i++) { | 736 | for (i = 0; i < sizeof(struct bfi_ioc_image_hdr_s) / sizeof(u32); i++) { |
| @@ -1440,13 +1439,12 @@ bfa_ioc_lpu_stop(struct bfa_ioc_s *ioc) · 702 unmodified lines | |||
| 1440 | void | 1439 | void |
| 1441 | bfa_ioc_fwver_get(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *fwhdr) | 1440 | bfa_ioc_fwver_get(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *fwhdr) |
| 1442 | { | 1441 | { |
| 1443 | u32 pgnum, pgoff; | 1442 | u32 pgnum; |
| 1444 | u32 loff = 0; | 1443 | u32 loff = 0; |
| 1445 | int i; | 1444 | int i; |
| 1446 | u32 *fwsig = (u32 *) fwhdr; | 1445 | u32 *fwsig = (u32 *) fwhdr; |
| 1447 | 1446 | ||
| 1448 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); | 1447 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); |
| 1449 | pgoff = PSS_SMEM_PGOFF(loff); | ||
| 1450 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); | 1448 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); |
| 1451 | 1449 | ||
| 1452 | for (i = 0; i < (sizeof(struct bfi_ioc_image_hdr_s) / sizeof(u32)); | 1450 | for (i = 0; i < (sizeof(struct bfi_ioc_image_hdr_s) / sizeof(u32)); |
| @@ -1662,7 +1660,7 @@ bfa_status_t · 209 unmodified lines | |||
| 1662 | bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc) | 1660 | bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc) |
| 1663 | { | 1661 | { |
| 1664 | 1662 | ||
| 1665 | u32 pgnum, pgoff; | 1663 | u32 pgnum; |
| 1666 | u32 loff = 0; | 1664 | u32 loff = 0; |
| 1667 | enum bfi_ioc_state ioc_fwstate; | 1665 | enum bfi_ioc_state ioc_fwstate; |
| 1668 | 1666 | ||
| @@ -1671,7 +1669,6 @@ bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc) · 2 unmodified lines | |||
| 1671 | return BFA_STATUS_ADAPTER_ENABLED; | 1669 | return BFA_STATUS_ADAPTER_ENABLED; |
| 1672 | 1670 | ||
| 1673 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); | 1671 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); |
| 1674 | pgoff = PSS_SMEM_PGOFF(loff); | ||
| 1675 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); | 1672 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); |
| 1676 | bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, BFA_IOC_FW_INV_SIGN); | 1673 | bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, BFA_IOC_FW_INV_SIGN); |
| 1677 | 1674 | ||
| @@ -1863,7 +1860,7 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, · 185 unmodified lines | |||
| 1863 | u32 boot_env) | 1860 | u32 boot_env) |
| 1864 | { | 1861 | { |
| 1865 | u32 *fwimg; | 1862 | u32 *fwimg; |
| 1866 | u32 pgnum, pgoff; | 1863 | u32 pgnum; |
| 1867 | u32 loff = 0; | 1864 | u32 loff = 0; |
| 1868 | u32 chunkno = 0; | 1865 | u32 chunkno = 0; |
| 1869 | u32 i; | 1866 | u32 i; |
| @@ -1892,8 +1889,6 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, · 22 unmodified lines | |||
| 1892 | 1889 | ||
| 1893 | 1890 | ||
| 1894 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); | 1891 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); |
| 1895 | pgoff = PSS_SMEM_PGOFF(loff); | ||
| 1896 | |||
| 1897 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); | 1892 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); |
| 1898 | 1893 | ||
| 1899 | for (i = 0; i < fwimg_size; i++) { | 1894 | for (i = 0; i < fwimg_size; i++) { |
| @@ -4763,11 +4758,9 @@ bfa_diag_memtest_done(void *cbarg) · 2863 unmodified lines | |||
| 4763 | struct bfa_ioc_s *ioc = diag->ioc; | 4758 | struct bfa_ioc_s *ioc = diag->ioc; |
| 4764 | struct bfa_diag_memtest_result *res = diag->result; | 4759 | struct bfa_diag_memtest_result *res = diag->result; |
| 4765 | u32 loff = BFI_BOOT_MEMTEST_RES_ADDR; | 4760 | u32 loff = BFI_BOOT_MEMTEST_RES_ADDR; |
| 4766 | u32 pgnum, pgoff, i; | 4761 | u32 pgnum, i; |
| 4767 | 4762 | ||
| 4768 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); | 4763 | pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff); |
| 4769 | pgoff = PSS_SMEM_PGOFF(loff); | ||
| 4770 | |||
| 4771 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); | 4764 | writel(pgnum, ioc->ioc_regs.host_page_num_fn); |
| 4772 | 4765 | ||
| 4773 | for (i = 0; i < (sizeof(struct bfa_diag_memtest_result) / | 4766 | for (i = 0; i < (sizeof(struct bfa_diag_memtest_result) / |
| @@ -5026,7 +5019,7 @@ diag_portbeacon_comp(struct bfa_diag_s *diag) · 252 unmodified lines | |||
| 5026 | /* | 5019 | /* |
| 5027 | * Diag hmbox handler | 5020 | * Diag hmbox handler |
| 5028 | */ | 5021 | */ |
| 5029 | void | 5022 | static void |
| 5030 | bfa_diag_intr(void *diagarg, struct bfi_mbmsg_s *msg) | 5023 | bfa_diag_intr(void *diagarg, struct bfi_mbmsg_s *msg) |
| 5031 | { | 5024 | { |
| 5032 | struct bfa_diag_s *diag = diagarg; | 5025 | struct bfa_diag_s *diag = diagarg; |
| @@ -6649,8 +6642,8 @@ enum bfa_flash_cmd { · 1616 unmodified lines | |||
| 6649 | BFA_FLASH_READ_STATUS = 0x05, /* read status */ | 6642 | BFA_FLASH_READ_STATUS = 0x05, /* read status */ |
| 6650 | }; | 6643 | }; |
| 6651 | 6644 | ||
| 6652 | /** | 6645 | /* |
| 6653 | * @brief hardware error definition | 6646 | * Hardware error definition |
| 6654 | */ | 6647 | */ |
| 6655 | enum bfa_flash_err { | 6648 | enum bfa_flash_err { |
| 6656 | BFA_FLASH_NOT_PRESENT = -1, /*!< flash not present */ | 6649 | BFA_FLASH_NOT_PRESENT = -1, /*!< flash not present */ |
| @@ -6664,8 +6657,8 @@ enum bfa_flash_err { · 7 unmodified lines | |||
| 6664 | BFA_FLASH_ERR_LEN = -9, /*!< invalid length */ | 6657 | BFA_FLASH_ERR_LEN = -9, /*!< invalid length */ |
| 6665 | }; | 6658 | }; |
| 6666 | 6659 | ||
| 6667 | /** | 6660 | /* |
| 6668 | * @brief flash command register data structure | 6661 | * Flash command register data structure |
| 6669 | */ | 6662 | */ |
| 6670 | union bfa_flash_cmd_reg_u { | 6663 | union bfa_flash_cmd_reg_u { |
| 6671 | struct { | 6664 | struct { |
| @@ -6688,8 +6681,8 @@ union bfa_flash_cmd_reg_u { · 16 unmodified lines | |||
| 6688 | u32 i; | 6681 | u32 i; |
| 6689 | }; | 6682 | }; |
| 6690 | 6683 | ||
| 6691 | /** | 6684 | /* |
| 6692 | * @brief flash device status register data structure | 6685 | * Flash device status register data structure |
| 6693 | */ | 6686 | */ |
| 6694 | union bfa_flash_dev_status_reg_u { | 6687 | union bfa_flash_dev_status_reg_u { |
| 6695 | struct { | 6688 | struct { |
| @@ -6714,8 +6707,8 @@ union bfa_flash_dev_status_reg_u { · 18 unmodified lines | |||
| 6714 | u32 i; | 6707 | u32 i; |
| 6715 | }; | 6708 | }; |
| 6716 | 6709 | ||
| 6717 | /** | 6710 | /* |
| 6718 | * @brief flash address register data structure | 6711 | * Flash address register data structure |
| 6719 | */ | 6712 | */ |
| 6720 | union bfa_flash_addr_reg_u { | 6713 | union bfa_flash_addr_reg_u { |
| 6721 | struct { | 6714 | struct { |
| @@ -6730,7 +6723,7 @@ union bfa_flash_addr_reg_u { · 8 unmodified lines | |||
| 6730 | u32 i; | 6723 | u32 i; |
| 6731 | }; | 6724 | }; |
| 6732 | 6725 | ||
| 6733 | /** | 6726 | /* |
| 6734 | * dg flash_raw_private Flash raw private functions | 6727 | * dg flash_raw_private Flash raw private functions |
| 6735 | */ | 6728 | */ |
| 6736 | static void | 6729 | static void |
| @@ -6771,7 +6764,7 @@ bfa_flash_cmd_act_check(void __iomem *pci_bar) · 34 unmodified lines | |||
| 6771 | return 0; | 6764 | return 0; |
| 6772 | } | 6765 | } |
| 6773 | 6766 | ||
| 6774 | /** | 6767 | /* |
| 6775 | * @brief | 6768 | * @brief |
| 6776 | * Flush FLI data fifo. | 6769 | * Flush FLI data fifo. |
| 6777 | * | 6770 | * |
| @@ -6784,7 +6777,6 @@ static u32 · 6 unmodified lines | |||
| 6784 | bfa_flash_fifo_flush(void __iomem *pci_bar) | 6777 | bfa_flash_fifo_flush(void __iomem *pci_bar) |
| 6785 | { | 6778 | { |
| 6786 | u32 i; | 6779 | u32 i; |
| 6787 | u32 t; | ||
| 6788 | union bfa_flash_dev_status_reg_u dev_status; | 6780 | union bfa_flash_dev_status_reg_u dev_status; |
| 6789 | 6781 | ||
| 6790 | dev_status.i = readl(pci_bar + FLI_DEV_STATUS_REG); | 6782 | dev_status.i = readl(pci_bar + FLI_DEV_STATUS_REG); |
| @@ -6794,7 +6786,7 @@ bfa_flash_fifo_flush(void __iomem *pci_bar) · 3 unmodified lines | |||
| 6794 | 6786 | ||
| 6795 | /* fifo counter in terms of words */ | 6787 | /* fifo counter in terms of words */ |
| 6796 | for (i = 0; i < dev_status.r.fifo_cnt; i++) | 6788 | for (i = 0; i < dev_status.r.fifo_cnt; i++) |
| 6797 | t = readl(pci_bar + FLI_RDDATA_REG); | 6789 | readl(pci_bar + FLI_RDDATA_REG); |
| 6798 | 6790 | ||
| 6799 | /* | 6791 | /* |
| 6800 | * Check the device status. It may take some time. | 6792 | * Check the device status. It may take some time. |
| @@ -6811,7 +6803,7 @@ bfa_flash_fifo_flush(void __iomem *pci_bar) · 10 unmodified lines | |||
| 6811 | return 0; | 6803 | return 0; |
| 6812 | } | 6804 | } |
| 6813 | 6805 | ||
| 6814 | /** | 6806 | /* |
| 6815 | * @brief | 6807 | * @brief |
| 6816 | * Read flash status. | 6808 | * Read flash status. |
| 6817 | * | 6809 | * |
| @@ -6856,7 +6848,7 @@ bfa_flash_status_read(void __iomem *pci_bar) · 38 unmodified lines | |||
| 6856 | return ret_status; | 6848 | return ret_status; |
| 6857 | } | 6849 | } |
| 6858 | 6850 | ||
| 6859 | /** | 6851 | /* |
| 6860 | * @brief | 6852 | * @brief |
| 6861 | * Start flash read operation. | 6853 | * Start flash read operation. |
| 6862 | * | 6854 | * |
| @@ -6902,7 +6894,7 @@ bfa_flash_read_start(void __iomem *pci_bar, u32 offset, u32 len, · 39 unmodified lines | |||
| 6902 | return 0; | 6894 | return 0; |
| 6903 | } | 6895 | } |
| 6904 | 6896 | ||
| 6905 | /** | 6897 | /* |
| 6906 | * @brief | 6898 | * @brief |
| 6907 | * Check flash read operation. | 6899 | * Check flash read operation. |
| 6908 | * | 6900 | * |
| @@ -6918,7 +6910,8 @@ bfa_flash_read_check(void __iomem *pci_bar) · 9 unmodified lines | |||
| 6918 | 6910 | ||
| 6919 | return 0; | 6911 | return 0; |
| 6920 | } | 6912 | } |
| 6921 | /** | 6913 | |
| 6914 | /* | ||
| 6922 | * @brief | 6915 | * @brief |
| 6923 | * End flash read operation. | 6916 | * End flash read operation. |
| 6924 | * | 6917 | * |
| @@ -6944,7 +6937,7 @@ bfa_flash_read_end(void __iomem *pci_bar, u32 len, char *buf) · 19 unmodified lines | |||
| 6944 | bfa_flash_fifo_flush(pci_bar); | 6937 | bfa_flash_fifo_flush(pci_bar); |
| 6945 | } | 6938 | } |
| 6946 | 6939 | ||
| 6947 | /** | 6940 | /* |
| 6948 | * @brief | 6941 | * @brief |
| 6949 | * Perform flash raw read. | 6942 | * Perform flash raw read. |
| 6950 | * | 6943 | * |
| @@ -6970,7 +6963,7 @@ bfa_raw_sem_get(void __iomem *bar) · 19 unmodified lines | |||
| 6970 | 6963 | ||
| 6971 | } | 6964 | } |
| 6972 | 6965 | ||
| 6973 | bfa_status_t | 6966 | static bfa_status_t |
| 6974 | bfa_flash_sem_get(void __iomem *bar) | 6967 | bfa_flash_sem_get(void __iomem *bar) |
| 6975 | { | 6968 | { |
| 6976 | u32 n = FLASH_BLOCKING_OP_MAX; | 6969 | u32 n = FLASH_BLOCKING_OP_MAX; |
| @@ -6983,7 +6976,7 @@ bfa_flash_sem_get(void __iomem *bar) · 6 unmodified lines | |||
| 6983 | return BFA_STATUS_OK; | 6976 | return BFA_STATUS_OK; |
| 6984 | } | 6977 | } |
| 6985 | 6978 | ||
| 6986 | void | 6979 | static void |
| 6987 | bfa_flash_sem_put(void __iomem *bar) | 6980 | bfa_flash_sem_put(void __iomem *bar) |
| 6988 | { | 6981 | { |
| 6989 | writel(0, (bar + FLASH_SEM_LOCK_REG)); | 6982 | writel(0, (bar + FLASH_SEM_LOCK_REG)); |
| @@ -496,7 +496,7 @@ bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc) · 495 unmodified lines | |||
| 496 | return BFA_FALSE; | 496 | return BFA_FALSE; |
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | /** | 499 | /* |
| 500 | * Called from bfa_ioc_attach() to map asic specific calls. | 500 | * Called from bfa_ioc_attach() to map asic specific calls. |
| 501 | */ | 501 | */ |
| 502 | static void | 502 | static void |
| @@ -517,7 +517,7 @@ bfa_ioc_set_ctx_hwif(struct bfa_ioc_s *ioc, struct bfa_ioc_hwif_s *hwif) · 14 unmodified lines | |||
| 517 | hwif->ioc_get_alt_fwstate = bfa_ioc_ct_get_alt_ioc_fwstate; | 517 | hwif->ioc_get_alt_fwstate = bfa_ioc_ct_get_alt_ioc_fwstate; |
| 518 | } | 518 | } |
| 519 | 519 | ||
| 520 | /** | 520 | /* |
| 521 | * Called from bfa_ioc_attach() to map asic specific calls. | 521 | * Called from bfa_ioc_attach() to map asic specific calls. |
| 522 | */ | 522 | */ |
| 523 | void | 523 | void |
| @@ -532,7 +532,7 @@ bfa_ioc_set_ct_hwif(struct bfa_ioc_s *ioc) · 8 unmodified lines | |||
| 532 | ioc->ioc_hwif = &hwif_ct; | 532 | ioc->ioc_hwif = &hwif_ct; |
| 533 | } | 533 | } |
| 534 | 534 | ||
| 535 | /** | 535 | /* |
| 536 | * Called from bfa_ioc_attach() to map asic specific calls. | 536 | * Called from bfa_ioc_attach() to map asic specific calls. |
| 537 | */ | 537 | */ |
| 538 | void | 538 | void |
| @@ -756,7 +756,7 @@ bfa_cee_reset_stats(struct bfa_cee_s *cee, · 755 unmodified lines | |||
| 756 | * @return void | 756 | * @return void |
| 757 | */ | 757 | */ |
| 758 | 758 | ||
| 759 | void | 759 | static void |
| 760 | bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m) | 760 | bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m) |
| 761 | { | 761 | { |
| 762 | union bfi_cee_i2h_msg_u *msg; | 762 | union bfi_cee_i2h_msg_u *msg; |
| @@ -792,7 +792,7 @@ bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m) · 29 unmodified lines | |||
| 792 | * @return void | 792 | * @return void |
| 793 | */ | 793 | */ |
| 794 | 794 | ||
| 795 | void | 795 | static void |
| 796 | bfa_cee_notify(void *arg, enum bfa_ioc_event_e event) | 796 | bfa_cee_notify(void *arg, enum bfa_ioc_event_e event) |
| 797 | { | 797 | { |
| 798 | struct bfa_cee_s *cee = (struct bfa_cee_s *) arg; | 798 | struct bfa_cee_s *cee = (struct bfa_cee_s *) arg; |
| @@ -2718,7 +2718,7 @@ bfa_fcport_sm_ddport(struct bfa_fcport_s *fcport, · 2717 unmodified lines | |||
| 2718 | case BFA_FCPORT_SM_DPORTDISABLE: | 2718 | case BFA_FCPORT_SM_DPORTDISABLE: |
| 2719 | case BFA_FCPORT_SM_ENABLE: | 2719 | case BFA_FCPORT_SM_ENABLE: |
| 2720 | case BFA_FCPORT_SM_START: | 2720 | case BFA_FCPORT_SM_START: |
| 2721 | /** | 2721 | /* |
| 2722 | * Ignore event for a port that is ddport | 2722 | * Ignore event for a port that is ddport |
| 2723 | */ | 2723 | */ |
| 2724 | break; | 2724 | break; |
| @@ -3839,7 +3839,7 @@ bfa_fcport_get_topology(struct bfa_s *bfa) · 1114 unmodified lines | |||
| 3839 | return fcport->topology; | 3839 | return fcport->topology; |
| 3840 | } | 3840 | } |
| 3841 | 3841 | ||
| 3842 | /** | 3842 | /* |
| 3843 | * Get config topology. | 3843 | * Get config topology. |
| 3844 | */ | 3844 | */ |
| 3845 | enum bfa_port_topology | 3845 | enum bfa_port_topology |
| @@ -15,7 +15,7 @@ · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | BFA_TRC_FILE(LDRV, BSG); | 16 | BFA_TRC_FILE(LDRV, BSG); |
| 17 | 17 | ||
| 18 | int | 18 | static int |
| 19 | bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd) | 19 | bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd) |
| 20 | { | 20 | { |
| 21 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 21 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -38,7 +38,7 @@ bfad_iocmd_ioc_enable(struct bfad_s *bfad, void *cmd) · 16 unmodified lines | |||
| 38 | return 0; | 38 | return 0; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | int | 41 | static int |
| 42 | bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd) | 42 | bfad_iocmd_ioc_disable(struct bfad_s *bfad, void *cmd) |
| 43 | { | 43 | { |
| 44 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 44 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -146,7 +146,7 @@ bfad_iocmd_ioc_get_stats(struct bfad_s *bfad, void *cmd) · 101 unmodified lines | |||
| 146 | return 0; | 146 | return 0; |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | int | 149 | static int |
| 150 | bfad_iocmd_ioc_get_fwstats(struct bfad_s *bfad, void *cmd, | 150 | bfad_iocmd_ioc_get_fwstats(struct bfad_s *bfad, void *cmd, |
| 151 | unsigned int payload_len) | 151 | unsigned int payload_len) |
| 152 | { | 152 | { |
| @@ -176,7 +176,7 @@ out: · 23 unmodified lines | |||
| 176 | return 0; | 176 | return 0; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | int | 179 | static int |
| 180 | bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) | 180 | bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
| 181 | { | 181 | { |
| 182 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 182 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -194,7 +194,7 @@ bfad_iocmd_ioc_reset_stats(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) · 11 unmodified lines | |||
| 194 | return 0; | 194 | return 0; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | int | 197 | static int |
| 198 | bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) | 198 | bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
| 199 | { | 199 | { |
| 200 | struct bfa_bsg_ioc_name_s *iocmd = (struct bfa_bsg_ioc_name_s *) cmd; | 200 | struct bfa_bsg_ioc_name_s *iocmd = (struct bfa_bsg_ioc_name_s *) cmd; |
| @@ -208,7 +208,7 @@ bfad_iocmd_ioc_set_name(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) · 7 unmodified lines | |||
| 208 | return 0; | 208 | return 0; |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | int | 211 | static int |
| 212 | bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd) | 212 | bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd) |
| 213 | { | 213 | { |
| 214 | struct bfa_bsg_iocfc_attr_s *iocmd = (struct bfa_bsg_iocfc_attr_s *)cmd; | 214 | struct bfa_bsg_iocfc_attr_s *iocmd = (struct bfa_bsg_iocfc_attr_s *)cmd; |
| @@ -219,7 +219,7 @@ bfad_iocmd_iocfc_get_attr(struct bfad_s *bfad, void *cmd) · 4 unmodified lines | |||
| 219 | return 0; | 219 | return 0; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | int | 222 | static int |
| 223 | bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd) | 223 | bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd) |
| 224 | { | 224 | { |
| 225 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 225 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -231,7 +231,7 @@ bfad_iocmd_ioc_fw_sig_inv(struct bfad_s *bfad, void *cmd) · 5 unmodified lines | |||
| 231 | return 0; | 231 | return 0; |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | int | 234 | static int |
| 235 | bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd) | 235 | bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd) |
| 236 | { | 236 | { |
| 237 | struct bfa_bsg_iocfc_intr_s *iocmd = (struct bfa_bsg_iocfc_intr_s *)cmd; | 237 | struct bfa_bsg_iocfc_intr_s *iocmd = (struct bfa_bsg_iocfc_intr_s *)cmd; |
| @@ -244,7 +244,7 @@ bfad_iocmd_iocfc_set_intr(struct bfad_s *bfad, void *cmd) · 6 unmodified lines | |||
| 244 | return 0; | 244 | return 0; |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | int | 247 | static int |
| 248 | bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd) | 248 | bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd) |
| 249 | { | 249 | { |
| 250 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 250 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -265,7 +265,7 @@ bfad_iocmd_port_enable(struct bfad_s *bfad, void *cmd) · 14 unmodified lines | |||
| 265 | return 0; | 265 | return 0; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | int | 268 | static int |
| 269 | bfad_iocmd_port_disable(struct bfad_s *bfad, void *cmd) | 269 | bfad_iocmd_port_disable(struct bfad_s *bfad, void *cmd) |
| 270 | { | 270 | { |
| 271 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 271 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -315,7 +315,7 @@ bfad_iocmd_port_get_attr(struct bfad_s *bfad, void *cmd) · 43 unmodified lines | |||
| 315 | return 0; | 315 | return 0; |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | int | 318 | static int |
| 319 | bfad_iocmd_port_get_stats(struct bfad_s *bfad, void *cmd, | 319 | bfad_iocmd_port_get_stats(struct bfad_s *bfad, void *cmd, |
| 320 | unsigned int payload_len) | 320 | unsigned int payload_len) |
| 321 | { | 321 | { |
| @@ -349,7 +349,7 @@ out: · 27 unmodified lines | |||
| 349 | return 0; | 349 | return 0; |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | int | 352 | static int |
| 353 | bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd) | 353 | bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd) |
| 354 | { | 354 | { |
| 355 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 355 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -370,7 +370,7 @@ bfad_iocmd_port_reset_stats(struct bfad_s *bfad, void *cmd) · 14 unmodified lines | |||
| 370 | return 0; | 370 | return 0; |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | int | 373 | static int |
| 374 | bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd) | 374 | bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd) |
| 375 | { | 375 | { |
| 376 | struct bfa_bsg_port_cfg_s *cmd = (struct bfa_bsg_port_cfg_s *)iocmd; | 376 | struct bfa_bsg_port_cfg_s *cmd = (struct bfa_bsg_port_cfg_s *)iocmd; |
| @@ -390,7 +390,7 @@ bfad_iocmd_set_port_cfg(struct bfad_s *bfad, void *iocmd, unsigned int v_cmd) · 13 unmodified lines | |||
| 390 | return 0; | 390 | return 0; |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | int | 393 | static int |
| 394 | bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd) | 394 | bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd) |
| 395 | { | 395 | { |
| 396 | struct bfa_bsg_port_cfg_maxfrsize_s *iocmd = | 396 | struct bfa_bsg_port_cfg_maxfrsize_s *iocmd = |
| @@ -404,7 +404,7 @@ bfad_iocmd_port_cfg_maxfrsize(struct bfad_s *bfad, void *cmd) · 7 unmodified lines | |||
| 404 | return 0; | 404 | return 0; |
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | int | 407 | static int |
| 408 | bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd) | 408 | bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
| 409 | { | 409 | { |
| 410 | struct bfa_bsg_bbcr_enable_s *iocmd = | 410 | struct bfa_bsg_bbcr_enable_s *iocmd = |
| @@ -427,7 +427,7 @@ bfad_iocmd_port_cfg_bbcr(struct bfad_s *bfad, unsigned int cmd, void *pcmd) · 16 unmodified lines | |||
| 427 | return 0; | 427 | return 0; |
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | int | 430 | static int |
| 431 | bfad_iocmd_port_get_bbcr_attr(struct bfad_s *bfad, void *pcmd) | 431 | bfad_iocmd_port_get_bbcr_attr(struct bfad_s *bfad, void *pcmd) |
| 432 | { | 432 | { |
| 433 | struct bfa_bsg_bbcr_attr_s *iocmd = (struct bfa_bsg_bbcr_attr_s *) pcmd; | 433 | struct bfa_bsg_bbcr_attr_s *iocmd = (struct bfa_bsg_bbcr_attr_s *) pcmd; |
| @@ -465,7 +465,7 @@ out: · 31 unmodified lines | |||
| 465 | return 0; | 465 | return 0; |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | int | 468 | static int |
| 469 | bfad_iocmd_lport_get_stats(struct bfad_s *bfad, void *cmd) | 469 | bfad_iocmd_lport_get_stats(struct bfad_s *bfad, void *cmd) |
| 470 | { | 470 | { |
| 471 | struct bfa_fcs_lport_s *fcs_port; | 471 | struct bfa_fcs_lport_s *fcs_port; |
| @@ -489,7 +489,7 @@ out: · 17 unmodified lines | |||
| 489 | return 0; | 489 | return 0; |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | int | 492 | static int |
| 493 | bfad_iocmd_lport_reset_stats(struct bfad_s *bfad, void *cmd) | 493 | bfad_iocmd_lport_reset_stats(struct bfad_s *bfad, void *cmd) |
| 494 | { | 494 | { |
| 495 | struct bfa_fcs_lport_s *fcs_port; | 495 | struct bfa_fcs_lport_s *fcs_port; |
| @@ -523,7 +523,7 @@ out: · 27 unmodified lines | |||
| 523 | return 0; | 523 | return 0; |
| 524 | } | 524 | } |
| 525 | 525 | ||
| 526 | int | 526 | static int |
| 527 | bfad_iocmd_lport_get_iostats(struct bfad_s *bfad, void *cmd) | 527 | bfad_iocmd_lport_get_iostats(struct bfad_s *bfad, void *cmd) |
| 528 | { | 528 | { |
| 529 | struct bfa_fcs_lport_s *fcs_port; | 529 | struct bfa_fcs_lport_s *fcs_port; |
| @@ -548,7 +548,7 @@ out: · 18 unmodified lines | |||
| 548 | return 0; | 548 | return 0; |
| 549 | } | 549 | } |
| 550 | 550 | ||
| 551 | int | 551 | static int |
| 552 | bfad_iocmd_lport_get_rports(struct bfad_s *bfad, void *cmd, | 552 | bfad_iocmd_lport_get_rports(struct bfad_s *bfad, void *cmd, |
| 553 | unsigned int payload_len) | 553 | unsigned int payload_len) |
| 554 | { | 554 | { |
| @@ -590,7 +590,7 @@ out: · 35 unmodified lines | |||
| 590 | return 0; | 590 | return 0; |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | int | 593 | static int |
| 594 | bfad_iocmd_rport_get_attr(struct bfad_s *bfad, void *cmd) | 594 | bfad_iocmd_rport_get_attr(struct bfad_s *bfad, void *cmd) |
| 595 | { | 595 | { |
| 596 | struct bfa_bsg_rport_attr_s *iocmd = (struct bfa_bsg_rport_attr_s *)cmd; | 596 | struct bfa_bsg_rport_attr_s *iocmd = (struct bfa_bsg_rport_attr_s *)cmd; |
| @@ -676,7 +676,7 @@ out: · 79 unmodified lines | |||
| 676 | return 0; | 676 | return 0; |
| 677 | } | 677 | } |
| 678 | 678 | ||
| 679 | int | 679 | static int |
| 680 | bfad_iocmd_rport_get_stats(struct bfad_s *bfad, void *cmd) | 680 | bfad_iocmd_rport_get_stats(struct bfad_s *bfad, void *cmd) |
| 681 | { | 681 | { |
| 682 | struct bfa_bsg_rport_stats_s *iocmd = | 682 | struct bfa_bsg_rport_stats_s *iocmd = |
| @@ -717,7 +717,7 @@ out: · 34 unmodified lines | |||
| 717 | return 0; | 717 | return 0; |
| 718 | } | 718 | } |
| 719 | 719 | ||
| 720 | int | 720 | static int |
| 721 | bfad_iocmd_rport_clr_stats(struct bfad_s *bfad, void *cmd) | 721 | bfad_iocmd_rport_clr_stats(struct bfad_s *bfad, void *cmd) |
| 722 | { | 722 | { |
| 723 | struct bfa_bsg_rport_reset_stats_s *iocmd = | 723 | struct bfa_bsg_rport_reset_stats_s *iocmd = |
| @@ -753,7 +753,7 @@ out: · 29 unmodified lines | |||
| 753 | return 0; | 753 | return 0; |
| 754 | } | 754 | } |
| 755 | 755 | ||
| 756 | int | 756 | static int |
| 757 | bfad_iocmd_rport_set_speed(struct bfad_s *bfad, void *cmd) | 757 | bfad_iocmd_rport_set_speed(struct bfad_s *bfad, void *cmd) |
| 758 | { | 758 | { |
| 759 | struct bfa_bsg_rport_set_speed_s *iocmd = | 759 | struct bfa_bsg_rport_set_speed_s *iocmd = |
| @@ -789,7 +789,7 @@ out: · 29 unmodified lines | |||
| 789 | return 0; | 789 | return 0; |
| 790 | } | 790 | } |
| 791 | 791 | ||
| 792 | int | 792 | static int |
| 793 | bfad_iocmd_vport_get_attr(struct bfad_s *bfad, void *cmd) | 793 | bfad_iocmd_vport_get_attr(struct bfad_s *bfad, void *cmd) |
| 794 | { | 794 | { |
| 795 | struct bfa_fcs_vport_s *fcs_vport; | 795 | struct bfa_fcs_vport_s *fcs_vport; |
| @@ -812,7 +812,7 @@ out: · 16 unmodified lines | |||
| 812 | return 0; | 812 | return 0; |
| 813 | } | 813 | } |
| 814 | 814 | ||
| 815 | int | 815 | static int |
| 816 | bfad_iocmd_vport_get_stats(struct bfad_s *bfad, void *cmd) | 816 | bfad_iocmd_vport_get_stats(struct bfad_s *bfad, void *cmd) |
| 817 | { | 817 | { |
| 818 | struct bfa_fcs_vport_s *fcs_vport; | 818 | struct bfa_fcs_vport_s *fcs_vport; |
| @@ -840,7 +840,7 @@ out: · 21 unmodified lines | |||
| 840 | return 0; | 840 | return 0; |
| 841 | } | 841 | } |
| 842 | 842 | ||
| 843 | int | 843 | static int |
| 844 | bfad_iocmd_vport_clr_stats(struct bfad_s *bfad, void *cmd) | 844 | bfad_iocmd_vport_clr_stats(struct bfad_s *bfad, void *cmd) |
| 845 | { | 845 | { |
| 846 | struct bfa_fcs_vport_s *fcs_vport; | 846 | struct bfa_fcs_vport_s *fcs_vport; |
| @@ -907,7 +907,7 @@ out: · 60 unmodified lines | |||
| 907 | return 0; | 907 | return 0; |
| 908 | } | 908 | } |
| 909 | 909 | ||
| 910 | int | 910 | static int |
| 911 | bfad_iocmd_qos_set_bw(struct bfad_s *bfad, void *pcmd) | 911 | bfad_iocmd_qos_set_bw(struct bfad_s *bfad, void *pcmd) |
| 912 | { | 912 | { |
| 913 | struct bfa_bsg_qos_bw_s *iocmd = (struct bfa_bsg_qos_bw_s *)pcmd; | 913 | struct bfa_bsg_qos_bw_s *iocmd = (struct bfa_bsg_qos_bw_s *)pcmd; |
| @@ -920,7 +920,7 @@ bfad_iocmd_qos_set_bw(struct bfad_s *bfad, void *pcmd) · 6 unmodified lines | |||
| 920 | return 0; | 920 | return 0; |
| 921 | } | 921 | } |
| 922 | 922 | ||
| 923 | int | 923 | static int |
| 924 | bfad_iocmd_ratelim(struct bfad_s *bfad, unsigned int cmd, void *pcmd) | 924 | bfad_iocmd_ratelim(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
| 925 | { | 925 | { |
| 926 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; | 926 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
| @@ -949,7 +949,7 @@ bfad_iocmd_ratelim(struct bfad_s *bfad, unsigned int cmd, void *pcmd) · 22 unmodified lines | |||
| 949 | return 0; | 949 | return 0; |
| 950 | } | 950 | } |
| 951 | 951 | ||
| 952 | int | 952 | static int |
| 953 | bfad_iocmd_ratelim_speed(struct bfad_s *bfad, unsigned int cmd, void *pcmd) | 953 | bfad_iocmd_ratelim_speed(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
| 954 | { | 954 | { |
| 955 | struct bfa_bsg_trl_speed_s *iocmd = (struct bfa_bsg_trl_speed_s *)pcmd; | 955 | struct bfa_bsg_trl_speed_s *iocmd = (struct bfa_bsg_trl_speed_s *)pcmd; |
| @@ -978,7 +978,7 @@ bfad_iocmd_ratelim_speed(struct bfad_s *bfad, unsigned int cmd, void *pcmd) · 22 unmodified lines | |||
| 978 | return 0; | 978 | return 0; |
| 979 | } | 979 | } |
| 980 | 980 | ||
| 981 | int | 981 | static int |
| 982 | bfad_iocmd_cfg_fcpim(struct bfad_s *bfad, void *cmd) | 982 | bfad_iocmd_cfg_fcpim(struct bfad_s *bfad, void *cmd) |
| 983 | { | 983 | { |
| 984 | struct bfa_bsg_fcpim_s *iocmd = (struct bfa_bsg_fcpim_s *)cmd; | 984 | struct bfa_bsg_fcpim_s *iocmd = (struct bfa_bsg_fcpim_s *)cmd; |
| @@ -991,7 +991,7 @@ bfad_iocmd_cfg_fcpim(struct bfad_s *bfad, void *cmd) · 6 unmodified lines | |||
| 991 | return 0; | 991 | return 0; |
| 992 | } | 992 | } |
| 993 | 993 | ||
| 994 | int | 994 | static int |
| 995 | bfad_iocmd_fcpim_get_modstats(struct bfad_s *bfad, void *cmd) | 995 | bfad_iocmd_fcpim_get_modstats(struct bfad_s *bfad, void *cmd) |
| 996 | { | 996 | { |
| 997 | struct bfa_bsg_fcpim_modstats_s *iocmd = | 997 | struct bfa_bsg_fcpim_modstats_s *iocmd = |
| @@ -1013,7 +1013,7 @@ bfad_iocmd_fcpim_get_modstats(struct bfad_s *bfad, void *cmd) · 15 unmodified lines | |||
| 1013 | return 0; | 1013 | return 0; |
| 1014 | } | 1014 | } |
| 1015 | 1015 | ||
| 1016 | int | 1016 | static int |
| 1017 | bfad_iocmd_fcpim_clr_modstats(struct bfad_s *bfad, void *cmd) | 1017 | bfad_iocmd_fcpim_clr_modstats(struct bfad_s *bfad, void *cmd) |
| 1018 | { | 1018 | { |
| 1019 | struct bfa_bsg_fcpim_modstatsclr_s *iocmd = | 1019 | struct bfa_bsg_fcpim_modstatsclr_s *iocmd = |
| @@ -1035,7 +1035,7 @@ bfad_iocmd_fcpim_clr_modstats(struct bfad_s *bfad, void *cmd) · 15 unmodified lines | |||
| 1035 | return 0; | 1035 | return 0; |
| 1036 | } | 1036 | } |
| 1037 | 1037 | ||
| 1038 | int | 1038 | static int |
| 1039 | bfad_iocmd_fcpim_get_del_itn_stats(struct bfad_s *bfad, void *cmd) | 1039 | bfad_iocmd_fcpim_get_del_itn_stats(struct bfad_s *bfad, void *cmd) |
| 1040 | { | 1040 | { |
| 1041 | struct bfa_bsg_fcpim_del_itn_stats_s *iocmd = | 1041 | struct bfa_bsg_fcpim_del_itn_stats_s *iocmd = |
| @@ -1160,7 +1160,7 @@ bfad_iocmd_itnim_get_itnstats(struct bfad_s *bfad, void *cmd) · 118 unmodified lines | |||
| 1160 | return 0; | 1160 | return 0; |
| 1161 | } | 1161 | } |
| 1162 | 1162 | ||
| 1163 | int | 1163 | static int |
| 1164 | bfad_iocmd_fcport_enable(struct bfad_s *bfad, void *cmd) | 1164 | bfad_iocmd_fcport_enable(struct bfad_s *bfad, void *cmd) |
| 1165 | { | 1165 | { |
| 1166 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 1166 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -1173,7 +1173,7 @@ bfad_iocmd_fcport_enable(struct bfad_s *bfad, void *cmd) · 6 unmodified lines | |||
| 1173 | return 0; | 1173 | return 0; |
| 1174 | } | 1174 | } |
| 1175 | 1175 | ||
| 1176 | int | 1176 | static int |
| 1177 | bfad_iocmd_fcport_disable(struct bfad_s *bfad, void *cmd) | 1177 | bfad_iocmd_fcport_disable(struct bfad_s *bfad, void *cmd) |
| 1178 | { | 1178 | { |
| 1179 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 1179 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -1186,7 +1186,7 @@ bfad_iocmd_fcport_disable(struct bfad_s *bfad, void *cmd) · 6 unmodified lines | |||
| 1186 | return 0; | 1186 | return 0; |
| 1187 | } | 1187 | } |
| 1188 | 1188 | ||
| 1189 | int | 1189 | static int |
| 1190 | bfad_iocmd_ioc_get_pcifn_cfg(struct bfad_s *bfad, void *cmd) | 1190 | bfad_iocmd_ioc_get_pcifn_cfg(struct bfad_s *bfad, void *cmd) |
| 1191 | { | 1191 | { |
| 1192 | struct bfa_bsg_pcifn_cfg_s *iocmd = (struct bfa_bsg_pcifn_cfg_s *)cmd; | 1192 | struct bfa_bsg_pcifn_cfg_s *iocmd = (struct bfa_bsg_pcifn_cfg_s *)cmd; |
| @@ -1208,7 +1208,7 @@ out: · 15 unmodified lines | |||
| 1208 | return 0; | 1208 | return 0; |
| 1209 | } | 1209 | } |
| 1210 | 1210 | ||
| 1211 | int | 1211 | static int |
| 1212 | bfad_iocmd_pcifn_create(struct bfad_s *bfad, void *cmd) | 1212 | bfad_iocmd_pcifn_create(struct bfad_s *bfad, void *cmd) |
| 1213 | { | 1213 | { |
| 1214 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; | 1214 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; |
| @@ -1231,7 +1231,7 @@ out: · 16 unmodified lines | |||
| 1231 | return 0; | 1231 | return 0; |
| 1232 | } | 1232 | } |
| 1233 | 1233 | ||
| 1234 | int | 1234 | static int |
| 1235 | bfad_iocmd_pcifn_delete(struct bfad_s *bfad, void *cmd) | 1235 | bfad_iocmd_pcifn_delete(struct bfad_s *bfad, void *cmd) |
| 1236 | { | 1236 | { |
| 1237 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; | 1237 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; |
| @@ -1253,7 +1253,7 @@ out: · 15 unmodified lines | |||
| 1253 | return 0; | 1253 | return 0; |
| 1254 | } | 1254 | } |
| 1255 | 1255 | ||
| 1256 | int | 1256 | static int |
| 1257 | bfad_iocmd_pcifn_bw(struct bfad_s *bfad, void *cmd) | 1257 | bfad_iocmd_pcifn_bw(struct bfad_s *bfad, void *cmd) |
| 1258 | { | 1258 | { |
| 1259 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; | 1259 | struct bfa_bsg_pcifn_s *iocmd = (struct bfa_bsg_pcifn_s *)cmd; |
| @@ -1277,7 +1277,7 @@ out: · 17 unmodified lines | |||
| 1277 | return 0; | 1277 | return 0; |
| 1278 | } | 1278 | } |
| 1279 | 1279 | ||
| 1280 | int | 1280 | static int |
| 1281 | bfad_iocmd_adapter_cfg_mode(struct bfad_s *bfad, void *cmd) | 1281 | bfad_iocmd_adapter_cfg_mode(struct bfad_s *bfad, void *cmd) |
| 1282 | { | 1282 | { |
| 1283 | struct bfa_bsg_adapter_cfg_mode_s *iocmd = | 1283 | struct bfa_bsg_adapter_cfg_mode_s *iocmd = |
| @@ -1300,7 +1300,7 @@ out: · 16 unmodified lines | |||
| 1300 | return 0; | 1300 | return 0; |
| 1301 | } | 1301 | } |
| 1302 | 1302 | ||
| 1303 | int | 1303 | static int |
| 1304 | bfad_iocmd_port_cfg_mode(struct bfad_s *bfad, void *cmd) | 1304 | bfad_iocmd_port_cfg_mode(struct bfad_s *bfad, void *cmd) |
| 1305 | { | 1305 | { |
| 1306 | struct bfa_bsg_port_cfg_mode_s *iocmd = | 1306 | struct bfa_bsg_port_cfg_mode_s *iocmd = |
| @@ -1324,7 +1324,7 @@ out: · 17 unmodified lines | |||
| 1324 | return 0; | 1324 | return 0; |
| 1325 | } | 1325 | } |
| 1326 | 1326 | ||
| 1327 | int | 1327 | static int |
| 1328 | bfad_iocmd_ablk_optrom(struct bfad_s *bfad, unsigned int cmd, void *pcmd) | 1328 | bfad_iocmd_ablk_optrom(struct bfad_s *bfad, unsigned int cmd, void *pcmd) |
| 1329 | { | 1329 | { |
| 1330 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; | 1330 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
| @@ -1350,7 +1350,7 @@ out: · 19 unmodified lines | |||
| 1350 | return 0; | 1350 | return 0; |
| 1351 | } | 1351 | } |
| 1352 | 1352 | ||
| 1353 | int | 1353 | static int |
| 1354 | bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd) | 1354 | bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd) |
| 1355 | { | 1355 | { |
| 1356 | struct bfa_bsg_faa_attr_s *iocmd = (struct bfa_bsg_faa_attr_s *)cmd; | 1356 | struct bfa_bsg_faa_attr_s *iocmd = (struct bfa_bsg_faa_attr_s *)cmd; |
| @@ -1373,7 +1373,7 @@ out: · 16 unmodified lines | |||
| 1373 | return 0; | 1373 | return 0; |
| 1374 | } | 1374 | } |
| 1375 | 1375 | ||
| 1376 | int | 1376 | static int |
| 1377 | bfad_iocmd_cee_attr(struct bfad_s *bfad, void *cmd, unsigned int payload_len) | 1377 | bfad_iocmd_cee_attr(struct bfad_s *bfad, void *cmd, unsigned int payload_len) |
| 1378 | { | 1378 | { |
| 1379 | struct bfa_bsg_cee_attr_s *iocmd = | 1379 | struct bfa_bsg_cee_attr_s *iocmd = |
| @@ -1409,7 +1409,7 @@ out: · 29 unmodified lines | |||
| 1409 | return 0; | 1409 | return 0; |
| 1410 | } | 1410 | } |
| 1411 | 1411 | ||
| 1412 | int | 1412 | static int |
| 1413 | bfad_iocmd_cee_get_stats(struct bfad_s *bfad, void *cmd, | 1413 | bfad_iocmd_cee_get_stats(struct bfad_s *bfad, void *cmd, |
| 1414 | unsigned int payload_len) | 1414 | unsigned int payload_len) |
| 1415 | { | 1415 | { |
| @@ -1446,7 +1446,7 @@ out: · 30 unmodified lines | |||
| 1446 | return 0; | 1446 | return 0; |
| 1447 | } | 1447 | } |
| 1448 | 1448 | ||
| 1449 | int | 1449 | static int |
| 1450 | bfad_iocmd_cee_reset_stats(struct bfad_s *bfad, void *cmd) | 1450 | bfad_iocmd_cee_reset_stats(struct bfad_s *bfad, void *cmd) |
| 1451 | { | 1451 | { |
| 1452 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 1452 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -1460,7 +1460,7 @@ bfad_iocmd_cee_reset_stats(struct bfad_s *bfad, void *cmd) · 7 unmodified lines | |||
| 1460 | return 0; | 1460 | return 0; |
| 1461 | } | 1461 | } |
| 1462 | 1462 | ||
| 1463 | int | 1463 | static int |
| 1464 | bfad_iocmd_sfp_media(struct bfad_s *bfad, void *cmd) | 1464 | bfad_iocmd_sfp_media(struct bfad_s *bfad, void *cmd) |
| 1465 | { | 1465 | { |
| 1466 | struct bfa_bsg_sfp_media_s *iocmd = (struct bfa_bsg_sfp_media_s *)cmd; | 1466 | struct bfa_bsg_sfp_media_s *iocmd = (struct bfa_bsg_sfp_media_s *)cmd; |
| @@ -1482,7 +1482,7 @@ out: · 15 unmodified lines | |||
| 1482 | return 0; | 1482 | return 0; |
| 1483 | } | 1483 | } |
| 1484 | 1484 | ||
| 1485 | int | 1485 | static int |
| 1486 | bfad_iocmd_sfp_speed(struct bfad_s *bfad, void *cmd) | 1486 | bfad_iocmd_sfp_speed(struct bfad_s *bfad, void *cmd) |
| 1487 | { | 1487 | { |
| 1488 | struct bfa_bsg_sfp_speed_s *iocmd = (struct bfa_bsg_sfp_speed_s *)cmd; | 1488 | struct bfa_bsg_sfp_speed_s *iocmd = (struct bfa_bsg_sfp_speed_s *)cmd; |
| @@ -1503,7 +1503,7 @@ out: · 14 unmodified lines | |||
| 1503 | return 0; | 1503 | return 0; |
| 1504 | } | 1504 | } |
| 1505 | 1505 | ||
| 1506 | int | 1506 | static int |
| 1507 | bfad_iocmd_flash_get_attr(struct bfad_s *bfad, void *cmd) | 1507 | bfad_iocmd_flash_get_attr(struct bfad_s *bfad, void *cmd) |
| 1508 | { | 1508 | { |
| 1509 | struct bfa_bsg_flash_attr_s *iocmd = | 1509 | struct bfa_bsg_flash_attr_s *iocmd = |
| @@ -1524,7 +1524,7 @@ out: · 14 unmodified lines | |||
| 1524 | return 0; | 1524 | return 0; |
| 1525 | } | 1525 | } |
| 1526 | 1526 | ||
| 1527 | int | 1527 | static int |
| 1528 | bfad_iocmd_flash_erase_part(struct bfad_s *bfad, void *cmd) | 1528 | bfad_iocmd_flash_erase_part(struct bfad_s *bfad, void *cmd) |
| 1529 | { | 1529 | { |
| 1530 | struct bfa_bsg_flash_s *iocmd = (struct bfa_bsg_flash_s *)cmd; | 1530 | struct bfa_bsg_flash_s *iocmd = (struct bfa_bsg_flash_s *)cmd; |
| @@ -1544,7 +1544,7 @@ out: · 13 unmodified lines | |||
| 1544 | return 0; | 1544 | return 0; |
| 1545 | } | 1545 | } |
| 1546 | 1546 | ||
| 1547 | int | 1547 | static int |
| 1548 | bfad_iocmd_flash_update_part(struct bfad_s *bfad, void *cmd, | 1548 | bfad_iocmd_flash_update_part(struct bfad_s *bfad, void *cmd, |
| 1549 | unsigned int payload_len) | 1549 | unsigned int payload_len) |
| 1550 | { | 1550 | { |
| @@ -1576,7 +1576,7 @@ out: · 25 unmodified lines | |||
| 1576 | return 0; | 1576 | return 0; |
| 1577 | } | 1577 | } |
| 1578 | 1578 | ||
| 1579 | int | 1579 | static int |
| 1580 | bfad_iocmd_flash_read_part(struct bfad_s *bfad, void *cmd, | 1580 | bfad_iocmd_flash_read_part(struct bfad_s *bfad, void *cmd, |
| 1581 | unsigned int payload_len) | 1581 | unsigned int payload_len) |
| 1582 | { | 1582 | { |
| @@ -1608,7 +1608,7 @@ out: · 25 unmodified lines | |||
| 1608 | return 0; | 1608 | return 0; |
| 1609 | } | 1609 | } |
| 1610 | 1610 | ||
| 1611 | int | 1611 | static int |
| 1612 | bfad_iocmd_diag_temp(struct bfad_s *bfad, void *cmd) | 1612 | bfad_iocmd_diag_temp(struct bfad_s *bfad, void *cmd) |
| 1613 | { | 1613 | { |
| 1614 | struct bfa_bsg_diag_get_temp_s *iocmd = | 1614 | struct bfa_bsg_diag_get_temp_s *iocmd = |
| @@ -1630,7 +1630,7 @@ out: · 15 unmodified lines | |||
| 1630 | return 0; | 1630 | return 0; |
| 1631 | } | 1631 | } |
| 1632 | 1632 | ||
| 1633 | int | 1633 | static int |
| 1634 | bfad_iocmd_diag_memtest(struct bfad_s *bfad, void *cmd) | 1634 | bfad_iocmd_diag_memtest(struct bfad_s *bfad, void *cmd) |
| 1635 | { | 1635 | { |
| 1636 | struct bfa_bsg_diag_memtest_s *iocmd = | 1636 | struct bfa_bsg_diag_memtest_s *iocmd = |
| @@ -1653,7 +1653,7 @@ out: · 16 unmodified lines | |||
| 1653 | return 0; | 1653 | return 0; |
| 1654 | } | 1654 | } |
| 1655 | 1655 | ||
| 1656 | int | 1656 | static int |
| 1657 | bfad_iocmd_diag_loopback(struct bfad_s *bfad, void *cmd) | 1657 | bfad_iocmd_diag_loopback(struct bfad_s *bfad, void *cmd) |
| 1658 | { | 1658 | { |
| 1659 | struct bfa_bsg_diag_loopback_s *iocmd = | 1659 | struct bfa_bsg_diag_loopback_s *iocmd = |
| @@ -1676,7 +1676,7 @@ out: · 16 unmodified lines | |||
| 1676 | return 0; | 1676 | return 0; |
| 1677 | } | 1677 | } |
| 1678 | 1678 | ||
| 1679 | int | 1679 | static int |
| 1680 | bfad_iocmd_diag_fwping(struct bfad_s *bfad, void *cmd) | 1680 | bfad_iocmd_diag_fwping(struct bfad_s *bfad, void *cmd) |
| 1681 | { | 1681 | { |
| 1682 | struct bfa_bsg_diag_fwping_s *iocmd = | 1682 | struct bfa_bsg_diag_fwping_s *iocmd = |
| @@ -1700,7 +1700,7 @@ out: · 17 unmodified lines | |||
| 1700 | return 0; | 1700 | return 0; |
| 1701 | } | 1701 | } |
| 1702 | 1702 | ||
| 1703 | int | 1703 | static int |
| 1704 | bfad_iocmd_diag_queuetest(struct bfad_s *bfad, void *cmd) | 1704 | bfad_iocmd_diag_queuetest(struct bfad_s *bfad, void *cmd) |
| 1705 | { | 1705 | { |
| 1706 | struct bfa_bsg_diag_qtest_s *iocmd = (struct bfa_bsg_diag_qtest_s *)cmd; | 1706 | struct bfa_bsg_diag_qtest_s *iocmd = (struct bfa_bsg_diag_qtest_s *)cmd; |
| @@ -1721,7 +1721,7 @@ out: · 14 unmodified lines | |||
| 1721 | return 0; | 1721 | return 0; |
| 1722 | } | 1722 | } |
| 1723 | 1723 | ||
| 1724 | int | 1724 | static int |
| 1725 | bfad_iocmd_diag_sfp(struct bfad_s *bfad, void *cmd) | 1725 | bfad_iocmd_diag_sfp(struct bfad_s *bfad, void *cmd) |
| 1726 | { | 1726 | { |
| 1727 | struct bfa_bsg_sfp_show_s *iocmd = | 1727 | struct bfa_bsg_sfp_show_s *iocmd = |
| @@ -1744,7 +1744,7 @@ out: · 16 unmodified lines | |||
| 1744 | return 0; | 1744 | return 0; |
| 1745 | } | 1745 | } |
| 1746 | 1746 | ||
| 1747 | int | 1747 | static int |
| 1748 | bfad_iocmd_diag_led(struct bfad_s *bfad, void *cmd) | 1748 | bfad_iocmd_diag_led(struct bfad_s *bfad, void *cmd) |
| 1749 | { | 1749 | { |
| 1750 | struct bfa_bsg_diag_led_s *iocmd = (struct bfa_bsg_diag_led_s *)cmd; | 1750 | struct bfa_bsg_diag_led_s *iocmd = (struct bfa_bsg_diag_led_s *)cmd; |
| @@ -1757,7 +1757,7 @@ bfad_iocmd_diag_led(struct bfad_s *bfad, void *cmd) · 6 unmodified lines | |||
| 1757 | return 0; | 1757 | return 0; |
| 1758 | } | 1758 | } |
| 1759 | 1759 | ||
| 1760 | int | 1760 | static int |
| 1761 | bfad_iocmd_diag_beacon_lport(struct bfad_s *bfad, void *cmd) | 1761 | bfad_iocmd_diag_beacon_lport(struct bfad_s *bfad, void *cmd) |
| 1762 | { | 1762 | { |
| 1763 | struct bfa_bsg_diag_beacon_s *iocmd = | 1763 | struct bfa_bsg_diag_beacon_s *iocmd = |
| @@ -1772,7 +1772,7 @@ bfad_iocmd_diag_beacon_lport(struct bfad_s *bfad, void *cmd) · 8 unmodified lines | |||
| 1772 | return 0; | 1772 | return 0; |
| 1773 | } | 1773 | } |
| 1774 | 1774 | ||
| 1775 | int | 1775 | static int |
| 1776 | bfad_iocmd_diag_lb_stat(struct bfad_s *bfad, void *cmd) | 1776 | bfad_iocmd_diag_lb_stat(struct bfad_s *bfad, void *cmd) |
| 1777 | { | 1777 | { |
| 1778 | struct bfa_bsg_diag_lb_stat_s *iocmd = | 1778 | struct bfa_bsg_diag_lb_stat_s *iocmd = |
| @@ -1787,7 +1787,7 @@ bfad_iocmd_diag_lb_stat(struct bfad_s *bfad, void *cmd) · 8 unmodified lines | |||
| 1787 | return 0; | 1787 | return 0; |
| 1788 | } | 1788 | } |
| 1789 | 1789 | ||
| 1790 | int | 1790 | static int |
| 1791 | bfad_iocmd_diag_dport_enable(struct bfad_s *bfad, void *pcmd) | 1791 | bfad_iocmd_diag_dport_enable(struct bfad_s *bfad, void *pcmd) |
| 1792 | { | 1792 | { |
| 1793 | struct bfa_bsg_dport_enable_s *iocmd = | 1793 | struct bfa_bsg_dport_enable_s *iocmd = |
| @@ -1809,7 +1809,7 @@ bfad_iocmd_diag_dport_enable(struct bfad_s *bfad, void *pcmd) · 15 unmodified lines | |||
| 1809 | return 0; | 1809 | return 0; |
| 1810 | } | 1810 | } |
| 1811 | 1811 | ||
| 1812 | int | 1812 | static int |
| 1813 | bfad_iocmd_diag_dport_disable(struct bfad_s *bfad, void *pcmd) | 1813 | bfad_iocmd_diag_dport_disable(struct bfad_s *bfad, void *pcmd) |
| 1814 | { | 1814 | { |
| 1815 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; | 1815 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
| @@ -1829,7 +1829,7 @@ bfad_iocmd_diag_dport_disable(struct bfad_s *bfad, void *pcmd) · 13 unmodified lines | |||
| 1829 | return 0; | 1829 | return 0; |
| 1830 | } | 1830 | } |
| 1831 | 1831 | ||
| 1832 | int | 1832 | static int |
| 1833 | bfad_iocmd_diag_dport_start(struct bfad_s *bfad, void *pcmd) | 1833 | bfad_iocmd_diag_dport_start(struct bfad_s *bfad, void *pcmd) |
| 1834 | { | 1834 | { |
| 1835 | struct bfa_bsg_dport_enable_s *iocmd = | 1835 | struct bfa_bsg_dport_enable_s *iocmd = |
| @@ -1854,7 +1854,7 @@ bfad_iocmd_diag_dport_start(struct bfad_s *bfad, void *pcmd) · 18 unmodified lines | |||
| 1854 | return 0; | 1854 | return 0; |
| 1855 | } | 1855 | } |
| 1856 | 1856 | ||
| 1857 | int | 1857 | static int |
| 1858 | bfad_iocmd_diag_dport_show(struct bfad_s *bfad, void *pcmd) | 1858 | bfad_iocmd_diag_dport_show(struct bfad_s *bfad, void *pcmd) |
| 1859 | { | 1859 | { |
| 1860 | struct bfa_bsg_diag_dport_show_s *iocmd = | 1860 | struct bfa_bsg_diag_dport_show_s *iocmd = |
| @@ -1869,7 +1869,7 @@ bfad_iocmd_diag_dport_show(struct bfad_s *bfad, void *pcmd) · 8 unmodified lines | |||
| 1869 | } | 1869 | } |
| 1870 | 1870 | ||
| 1871 | 1871 | ||
| 1872 | int | 1872 | static int |
| 1873 | bfad_iocmd_phy_get_attr(struct bfad_s *bfad, void *cmd) | 1873 | bfad_iocmd_phy_get_attr(struct bfad_s *bfad, void *cmd) |
| 1874 | { | 1874 | { |
| 1875 | struct bfa_bsg_phy_attr_s *iocmd = | 1875 | struct bfa_bsg_phy_attr_s *iocmd = |
| @@ -1890,7 +1890,7 @@ out: · 14 unmodified lines | |||
| 1890 | return 0; | 1890 | return 0; |
| 1891 | } | 1891 | } |
| 1892 | 1892 | ||
| 1893 | int | 1893 | static int |
| 1894 | bfad_iocmd_phy_get_stats(struct bfad_s *bfad, void *cmd) | 1894 | bfad_iocmd_phy_get_stats(struct bfad_s *bfad, void *cmd) |
| 1895 | { | 1895 | { |
| 1896 | struct bfa_bsg_phy_stats_s *iocmd = | 1896 | struct bfa_bsg_phy_stats_s *iocmd = |
| @@ -1911,7 +1911,7 @@ out: · 14 unmodified lines | |||
| 1911 | return 0; | 1911 | return 0; |
| 1912 | } | 1912 | } |
| 1913 | 1913 | ||
| 1914 | int | 1914 | static int |
| 1915 | bfad_iocmd_phy_read(struct bfad_s *bfad, void *cmd, unsigned int payload_len) | 1915 | bfad_iocmd_phy_read(struct bfad_s *bfad, void *cmd, unsigned int payload_len) |
| 1916 | { | 1916 | { |
| 1917 | struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd; | 1917 | struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd; |
| @@ -1943,7 +1943,7 @@ out: · 25 unmodified lines | |||
| 1943 | return 0; | 1943 | return 0; |
| 1944 | } | 1944 | } |
| 1945 | 1945 | ||
| 1946 | int | 1946 | static int |
| 1947 | bfad_iocmd_vhba_query(struct bfad_s *bfad, void *cmd) | 1947 | bfad_iocmd_vhba_query(struct bfad_s *bfad, void *cmd) |
| 1948 | { | 1948 | { |
| 1949 | struct bfa_bsg_vhba_attr_s *iocmd = | 1949 | struct bfa_bsg_vhba_attr_s *iocmd = |
| @@ -1962,7 +1962,7 @@ bfad_iocmd_vhba_query(struct bfad_s *bfad, void *cmd) · 12 unmodified lines | |||
| 1962 | return 0; | 1962 | return 0; |
| 1963 | } | 1963 | } |
| 1964 | 1964 | ||
| 1965 | int | 1965 | static int |
| 1966 | bfad_iocmd_phy_update(struct bfad_s *bfad, void *cmd, unsigned int payload_len) | 1966 | bfad_iocmd_phy_update(struct bfad_s *bfad, void *cmd, unsigned int payload_len) |
| 1967 | { | 1967 | { |
| 1968 | struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd; | 1968 | struct bfa_bsg_phy_s *iocmd = (struct bfa_bsg_phy_s *)cmd; |
| @@ -1992,7 +1992,7 @@ out: · 23 unmodified lines | |||
| 1992 | return 0; | 1992 | return 0; |
| 1993 | } | 1993 | } |
| 1994 | 1994 | ||
| 1995 | int | 1995 | static int |
| 1996 | bfad_iocmd_porglog_get(struct bfad_s *bfad, void *cmd) | 1996 | bfad_iocmd_porglog_get(struct bfad_s *bfad, void *cmd) |
| 1997 | { | 1997 | { |
| 1998 | struct bfa_bsg_debug_s *iocmd = (struct bfa_bsg_debug_s *)cmd; | 1998 | struct bfa_bsg_debug_s *iocmd = (struct bfa_bsg_debug_s *)cmd; |
| @@ -2012,7 +2012,7 @@ out: · 13 unmodified lines | |||
| 2012 | } | 2012 | } |
| 2013 | 2013 | ||
| 2014 | #define BFA_DEBUG_FW_CORE_CHUNK_SZ 0x4000U /* 16K chunks for FW dump */ | 2014 | #define BFA_DEBUG_FW_CORE_CHUNK_SZ 0x4000U /* 16K chunks for FW dump */ |
| 2015 | int | 2015 | static int |
| 2016 | bfad_iocmd_debug_fw_core(struct bfad_s *bfad, void *cmd, | 2016 | bfad_iocmd_debug_fw_core(struct bfad_s *bfad, void *cmd, |
| 2017 | unsigned int payload_len) | 2017 | unsigned int payload_len) |
| 2018 | { | 2018 | { |
| @@ -2046,7 +2046,7 @@ out: · 27 unmodified lines | |||
| 2046 | return 0; | 2046 | return 0; |
| 2047 | } | 2047 | } |
| 2048 | 2048 | ||
| 2049 | int | 2049 | static int |
| 2050 | bfad_iocmd_debug_ctl(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) | 2050 | bfad_iocmd_debug_ctl(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
| 2051 | { | 2051 | { |
| 2052 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 2052 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -2067,7 +2067,7 @@ bfad_iocmd_debug_ctl(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) · 14 unmodified lines | |||
| 2067 | return 0; | 2067 | return 0; |
| 2068 | } | 2068 | } |
| 2069 | 2069 | ||
| 2070 | int | 2070 | static int |
| 2071 | bfad_iocmd_porglog_ctl(struct bfad_s *bfad, void *cmd) | 2071 | bfad_iocmd_porglog_ctl(struct bfad_s *bfad, void *cmd) |
| 2072 | { | 2072 | { |
| 2073 | struct bfa_bsg_portlogctl_s *iocmd = (struct bfa_bsg_portlogctl_s *)cmd; | 2073 | struct bfa_bsg_portlogctl_s *iocmd = (struct bfa_bsg_portlogctl_s *)cmd; |
| @@ -2081,7 +2081,7 @@ bfad_iocmd_porglog_ctl(struct bfad_s *bfad, void *cmd) · 7 unmodified lines | |||
| 2081 | return 0; | 2081 | return 0; |
| 2082 | } | 2082 | } |
| 2083 | 2083 | ||
| 2084 | int | 2084 | static int |
| 2085 | bfad_iocmd_fcpim_cfg_profile(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) | 2085 | bfad_iocmd_fcpim_cfg_profile(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
| 2086 | { | 2086 | { |
| 2087 | struct bfa_bsg_fcpim_profile_s *iocmd = | 2087 | struct bfa_bsg_fcpim_profile_s *iocmd = |
| @@ -2125,7 +2125,7 @@ bfad_iocmd_itnim_get_ioprofile(struct bfad_s *bfad, void *cmd) · 37 unmodified lines | |||
| 2125 | return 0; | 2125 | return 0; |
| 2126 | } | 2126 | } |
| 2127 | 2127 | ||
| 2128 | int | 2128 | static int |
| 2129 | bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd) | 2129 | bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd) |
| 2130 | { | 2130 | { |
| 2131 | struct bfa_bsg_fcport_stats_s *iocmd = | 2131 | struct bfa_bsg_fcport_stats_s *iocmd = |
| @@ -2150,7 +2150,7 @@ out: · 18 unmodified lines | |||
| 2150 | return 0; | 2150 | return 0; |
| 2151 | } | 2151 | } |
| 2152 | 2152 | ||
| 2153 | int | 2153 | static int |
| 2154 | bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd) | 2154 | bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd) |
| 2155 | { | 2155 | { |
| 2156 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 2156 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -2174,7 +2174,7 @@ out: · 17 unmodified lines | |||
| 2174 | return 0; | 2174 | return 0; |
| 2175 | } | 2175 | } |
| 2176 | 2176 | ||
| 2177 | int | 2177 | static int |
| 2178 | bfad_iocmd_boot_cfg(struct bfad_s *bfad, void *cmd) | 2178 | bfad_iocmd_boot_cfg(struct bfad_s *bfad, void *cmd) |
| 2179 | { | 2179 | { |
| 2180 | struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd; | 2180 | struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd; |
| @@ -2196,7 +2196,7 @@ out: · 15 unmodified lines | |||
| 2196 | return 0; | 2196 | return 0; |
| 2197 | } | 2197 | } |
| 2198 | 2198 | ||
| 2199 | int | 2199 | static int |
| 2200 | bfad_iocmd_boot_query(struct bfad_s *bfad, void *cmd) | 2200 | bfad_iocmd_boot_query(struct bfad_s *bfad, void *cmd) |
| 2201 | { | 2201 | { |
| 2202 | struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd; | 2202 | struct bfa_bsg_boot_s *iocmd = (struct bfa_bsg_boot_s *)cmd; |
| @@ -2218,7 +2218,7 @@ out: · 15 unmodified lines | |||
| 2218 | return 0; | 2218 | return 0; |
| 2219 | } | 2219 | } |
| 2220 | 2220 | ||
| 2221 | int | 2221 | static int |
| 2222 | bfad_iocmd_preboot_query(struct bfad_s *bfad, void *cmd) | 2222 | bfad_iocmd_preboot_query(struct bfad_s *bfad, void *cmd) |
| 2223 | { | 2223 | { |
| 2224 | struct bfa_bsg_preboot_s *iocmd = (struct bfa_bsg_preboot_s *)cmd; | 2224 | struct bfa_bsg_preboot_s *iocmd = (struct bfa_bsg_preboot_s *)cmd; |
| @@ -2237,7 +2237,7 @@ bfad_iocmd_preboot_query(struct bfad_s *bfad, void *cmd) · 12 unmodified lines | |||
| 2237 | return 0; | 2237 | return 0; |
| 2238 | } | 2238 | } |
| 2239 | 2239 | ||
| 2240 | int | 2240 | static int |
| 2241 | bfad_iocmd_ethboot_cfg(struct bfad_s *bfad, void *cmd) | 2241 | bfad_iocmd_ethboot_cfg(struct bfad_s *bfad, void *cmd) |
| 2242 | { | 2242 | { |
| 2243 | struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd; | 2243 | struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd; |
| @@ -2260,7 +2260,7 @@ out: · 16 unmodified lines | |||
| 2260 | return 0; | 2260 | return 0; |
| 2261 | } | 2261 | } |
| 2262 | 2262 | ||
| 2263 | int | 2263 | static int |
| 2264 | bfad_iocmd_ethboot_query(struct bfad_s *bfad, void *cmd) | 2264 | bfad_iocmd_ethboot_query(struct bfad_s *bfad, void *cmd) |
| 2265 | { | 2265 | { |
| 2266 | struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd; | 2266 | struct bfa_bsg_ethboot_s *iocmd = (struct bfa_bsg_ethboot_s *)cmd; |
| @@ -2283,7 +2283,7 @@ out: · 16 unmodified lines | |||
| 2283 | return 0; | 2283 | return 0; |
| 2284 | } | 2284 | } |
| 2285 | 2285 | ||
| 2286 | int | 2286 | static int |
| 2287 | bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) | 2287 | bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
| 2288 | { | 2288 | { |
| 2289 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 2289 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -2323,7 +2323,7 @@ bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) · 33 unmodified lines | |||
| 2323 | return 0; | 2323 | return 0; |
| 2324 | } | 2324 | } |
| 2325 | 2325 | ||
| 2326 | int | 2326 | static int |
| 2327 | bfad_iocmd_trunk_get_attr(struct bfad_s *bfad, void *cmd) | 2327 | bfad_iocmd_trunk_get_attr(struct bfad_s *bfad, void *cmd) |
| 2328 | { | 2328 | { |
| 2329 | struct bfa_bsg_trunk_attr_s *iocmd = (struct bfa_bsg_trunk_attr_s *)cmd; | 2329 | struct bfa_bsg_trunk_attr_s *iocmd = (struct bfa_bsg_trunk_attr_s *)cmd; |
| @@ -2346,7 +2346,7 @@ bfad_iocmd_trunk_get_attr(struct bfad_s *bfad, void *cmd) · 16 unmodified lines | |||
| 2346 | return 0; | 2346 | return 0; |
| 2347 | } | 2347 | } |
| 2348 | 2348 | ||
| 2349 | int | 2349 | static int |
| 2350 | bfad_iocmd_qos(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) | 2350 | bfad_iocmd_qos(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
| 2351 | { | 2351 | { |
| 2352 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 2352 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -2374,7 +2374,7 @@ bfad_iocmd_qos(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) · 21 unmodified lines | |||
| 2374 | return 0; | 2374 | return 0; |
| 2375 | } | 2375 | } |
| 2376 | 2376 | ||
| 2377 | int | 2377 | static int |
| 2378 | bfad_iocmd_qos_get_attr(struct bfad_s *bfad, void *cmd) | 2378 | bfad_iocmd_qos_get_attr(struct bfad_s *bfad, void *cmd) |
| 2379 | { | 2379 | { |
| 2380 | struct bfa_bsg_qos_attr_s *iocmd = (struct bfa_bsg_qos_attr_s *)cmd; | 2380 | struct bfa_bsg_qos_attr_s *iocmd = (struct bfa_bsg_qos_attr_s *)cmd; |
| @@ -2400,7 +2400,7 @@ bfad_iocmd_qos_get_attr(struct bfad_s *bfad, void *cmd) · 19 unmodified lines | |||
| 2400 | return 0; | 2400 | return 0; |
| 2401 | } | 2401 | } |
| 2402 | 2402 | ||
| 2403 | int | 2403 | static int |
| 2404 | bfad_iocmd_qos_get_vc_attr(struct bfad_s *bfad, void *cmd) | 2404 | bfad_iocmd_qos_get_vc_attr(struct bfad_s *bfad, void *cmd) |
| 2405 | { | 2405 | { |
| 2406 | struct bfa_bsg_qos_vc_attr_s *iocmd = | 2406 | struct bfa_bsg_qos_vc_attr_s *iocmd = |
| @@ -2432,7 +2432,7 @@ bfad_iocmd_qos_get_vc_attr(struct bfad_s *bfad, void *cmd) · 25 unmodified lines | |||
| 2432 | return 0; | 2432 | return 0; |
| 2433 | } | 2433 | } |
| 2434 | 2434 | ||
| 2435 | int | 2435 | static int |
| 2436 | bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd) | 2436 | bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd) |
| 2437 | { | 2437 | { |
| 2438 | struct bfa_bsg_fcport_stats_s *iocmd = | 2438 | struct bfa_bsg_fcport_stats_s *iocmd = |
| @@ -2464,7 +2464,7 @@ out: · 25 unmodified lines | |||
| 2464 | return 0; | 2464 | return 0; |
| 2465 | } | 2465 | } |
| 2466 | 2466 | ||
| 2467 | int | 2467 | static int |
| 2468 | bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd) | 2468 | bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd) |
| 2469 | { | 2469 | { |
| 2470 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; | 2470 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd; |
| @@ -2495,7 +2495,7 @@ out: · 24 unmodified lines | |||
| 2495 | return 0; | 2495 | return 0; |
| 2496 | } | 2496 | } |
| 2497 | 2497 | ||
| 2498 | int | 2498 | static int |
| 2499 | bfad_iocmd_vf_get_stats(struct bfad_s *bfad, void *cmd) | 2499 | bfad_iocmd_vf_get_stats(struct bfad_s *bfad, void *cmd) |
| 2500 | { | 2500 | { |
| 2501 | struct bfa_bsg_vf_stats_s *iocmd = | 2501 | struct bfa_bsg_vf_stats_s *iocmd = |
| @@ -2518,7 +2518,7 @@ out: · 16 unmodified lines | |||
| 2518 | return 0; | 2518 | return 0; |
| 2519 | } | 2519 | } |
| 2520 | 2520 | ||
| 2521 | int | 2521 | static int |
| 2522 | bfad_iocmd_vf_clr_stats(struct bfad_s *bfad, void *cmd) | 2522 | bfad_iocmd_vf_clr_stats(struct bfad_s *bfad, void *cmd) |
| 2523 | { | 2523 | { |
| 2524 | struct bfa_bsg_vf_reset_stats_s *iocmd = | 2524 | struct bfa_bsg_vf_reset_stats_s *iocmd = |
| @@ -2555,7 +2555,7 @@ bfad_iocmd_lunmask_reset_lunscan_mode(struct bfad_s *bfad, int lunmask_cfg) · 30 unmodified lines | |||
| 2555 | bfad_reset_sdev_bflags(vport->drv_port.im_port, lunmask_cfg); | 2555 | bfad_reset_sdev_bflags(vport->drv_port.im_port, lunmask_cfg); |
| 2556 | } | 2556 | } |
| 2557 | 2557 | ||
| 2558 | int | 2558 | static int |
| 2559 | bfad_iocmd_lunmask(struct bfad_s *bfad, void *pcmd, unsigned int v_cmd) | 2559 | bfad_iocmd_lunmask(struct bfad_s *bfad, void *pcmd, unsigned int v_cmd) |
| 2560 | { | 2560 | { |
| 2561 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; | 2561 | struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)pcmd; |
| @@ -2578,7 +2578,7 @@ bfad_iocmd_lunmask(struct bfad_s *bfad, void *pcmd, unsigned int v_cmd) · 16 unmodified lines | |||
| 2578 | return 0; | 2578 | return 0; |
| 2579 | } | 2579 | } |
| 2580 | 2580 | ||
| 2581 | int | 2581 | static int |
| 2582 | bfad_iocmd_fcpim_lunmask_query(struct bfad_s *bfad, void *cmd) | 2582 | bfad_iocmd_fcpim_lunmask_query(struct bfad_s *bfad, void *cmd) |
| 2583 | { | 2583 | { |
| 2584 | struct bfa_bsg_fcpim_lunmask_query_s *iocmd = | 2584 | struct bfa_bsg_fcpim_lunmask_query_s *iocmd = |
| @@ -2592,7 +2592,7 @@ bfad_iocmd_fcpim_lunmask_query(struct bfad_s *bfad, void *cmd) · 7 unmodified lines | |||
| 2592 | return 0; | 2592 | return 0; |
| 2593 | } | 2593 | } |
| 2594 | 2594 | ||
| 2595 | int | 2595 | static int |
| 2596 | bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) | 2596 | bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) |
| 2597 | { | 2597 | { |
| 2598 | struct bfa_bsg_fcpim_lunmask_s *iocmd = | 2598 | struct bfa_bsg_fcpim_lunmask_s *iocmd = |
| @@ -2611,7 +2611,7 @@ bfad_iocmd_fcpim_cfg_lunmask(struct bfad_s *bfad, void *cmd, unsigned int v_cmd) · 12 unmodified lines | |||
| 2611 | return 0; | 2611 | return 0; |
| 2612 | } | 2612 | } |
| 2613 | 2613 | ||
| 2614 | int | 2614 | static int |
| 2615 | bfad_iocmd_fcpim_throttle_query(struct bfad_s *bfad, void *cmd) | 2615 | bfad_iocmd_fcpim_throttle_query(struct bfad_s *bfad, void *cmd) |
| 2616 | { | 2616 | { |
| 2617 | struct bfa_bsg_fcpim_throttle_s *iocmd = | 2617 | struct bfa_bsg_fcpim_throttle_s *iocmd = |
| @@ -2626,7 +2626,7 @@ bfad_iocmd_fcpim_throttle_query(struct bfad_s *bfad, void *cmd) · 8 unmodified lines | |||
| 2626 | return 0; | 2626 | return 0; |
| 2627 | } | 2627 | } |
| 2628 | 2628 | ||
| 2629 | int | 2629 | static int |
| 2630 | bfad_iocmd_fcpim_throttle_set(struct bfad_s *bfad, void *cmd) | 2630 | bfad_iocmd_fcpim_throttle_set(struct bfad_s *bfad, void *cmd) |
| 2631 | { | 2631 | { |
| 2632 | struct bfa_bsg_fcpim_throttle_s *iocmd = | 2632 | struct bfa_bsg_fcpim_throttle_s *iocmd = |
| @@ -2641,7 +2641,7 @@ bfad_iocmd_fcpim_throttle_set(struct bfad_s *bfad, void *cmd) · 8 unmodified lines | |||
| 2641 | return 0; | 2641 | return 0; |
| 2642 | } | 2642 | } |
| 2643 | 2643 | ||
| 2644 | int | 2644 | static int |
| 2645 | bfad_iocmd_tfru_read(struct bfad_s *bfad, void *cmd) | 2645 | bfad_iocmd_tfru_read(struct bfad_s *bfad, void *cmd) |
| 2646 | { | 2646 | { |
| 2647 | struct bfa_bsg_tfru_s *iocmd = | 2647 | struct bfa_bsg_tfru_s *iocmd = |
| @@ -2663,7 +2663,7 @@ bfad_iocmd_tfru_read(struct bfad_s *bfad, void *cmd) · 15 unmodified lines | |||
| 2663 | return 0; | 2663 | return 0; |
| 2664 | } | 2664 | } |
| 2665 | 2665 | ||
| 2666 | int | 2666 | static int |
| 2667 | bfad_iocmd_tfru_write(struct bfad_s *bfad, void *cmd) | 2667 | bfad_iocmd_tfru_write(struct bfad_s *bfad, void *cmd) |
| 2668 | { | 2668 | { |
| 2669 | struct bfa_bsg_tfru_s *iocmd = | 2669 | struct bfa_bsg_tfru_s *iocmd = |
| @@ -2685,7 +2685,7 @@ bfad_iocmd_tfru_write(struct bfad_s *bfad, void *cmd) · 15 unmodified lines | |||
| 2685 | return 0; | 2685 | return 0; |
| 2686 | } | 2686 | } |
| 2687 | 2687 | ||
| 2688 | int | 2688 | static int |
| 2689 | bfad_iocmd_fruvpd_read(struct bfad_s *bfad, void *cmd) | 2689 | bfad_iocmd_fruvpd_read(struct bfad_s *bfad, void *cmd) |
| 2690 | { | 2690 | { |
| 2691 | struct bfa_bsg_fruvpd_s *iocmd = | 2691 | struct bfa_bsg_fruvpd_s *iocmd = |
| @@ -2707,7 +2707,7 @@ bfad_iocmd_fruvpd_read(struct bfad_s *bfad, void *cmd) · 15 unmodified lines | |||
| 2707 | return 0; | 2707 | return 0; |
| 2708 | } | 2708 | } |
| 2709 | 2709 | ||
| 2710 | int | 2710 | static int |
| 2711 | bfad_iocmd_fruvpd_update(struct bfad_s *bfad, void *cmd) | 2711 | bfad_iocmd_fruvpd_update(struct bfad_s *bfad, void *cmd) |
| 2712 | { | 2712 | { |
| 2713 | struct bfa_bsg_fruvpd_s *iocmd = | 2713 | struct bfa_bsg_fruvpd_s *iocmd = |
| @@ -2729,7 +2729,7 @@ bfad_iocmd_fruvpd_update(struct bfad_s *bfad, void *cmd) · 15 unmodified lines | |||
| 2729 | return 0; | 2729 | return 0; |
| 2730 | } | 2730 | } |
| 2731 | 2731 | ||
| 2732 | int | 2732 | static int |
| 2733 | bfad_iocmd_fruvpd_get_max_size(struct bfad_s *bfad, void *cmd) | 2733 | bfad_iocmd_fruvpd_get_max_size(struct bfad_s *bfad, void *cmd) |
| 2734 | { | 2734 | { |
| 2735 | struct bfa_bsg_fruvpd_max_size_s *iocmd = | 2735 | struct bfa_bsg_fruvpd_max_size_s *iocmd = |
| @@ -3177,7 +3177,7 @@ out: · 441 unmodified lines | |||
| 3177 | } | 3177 | } |
| 3178 | 3178 | ||
| 3179 | /* FC passthru call backs */ | 3179 | /* FC passthru call backs */ |
| 3180 | u64 | 3180 | static u64 |
| 3181 | bfad_fcxp_get_req_sgaddr_cb(void *bfad_fcxp, int sgeid) | 3181 | bfad_fcxp_get_req_sgaddr_cb(void *bfad_fcxp, int sgeid) |
| 3182 | { | 3182 | { |
| 3183 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; | 3183 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
| @@ -3189,7 +3189,7 @@ bfad_fcxp_get_req_sgaddr_cb(void *bfad_fcxp, int sgeid) · 5 unmodified lines | |||
| 3189 | return addr; | 3189 | return addr; |
| 3190 | } | 3190 | } |
| 3191 | 3191 | ||
| 3192 | u32 | 3192 | static u32 |
| 3193 | bfad_fcxp_get_req_sglen_cb(void *bfad_fcxp, int sgeid) | 3193 | bfad_fcxp_get_req_sglen_cb(void *bfad_fcxp, int sgeid) |
| 3194 | { | 3194 | { |
| 3195 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; | 3195 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
| @@ -3199,7 +3199,7 @@ bfad_fcxp_get_req_sglen_cb(void *bfad_fcxp, int sgeid) · 3 unmodified lines | |||
| 3199 | return sge->sg_len; | 3199 | return sge->sg_len; |
| 3200 | } | 3200 | } |
| 3201 | 3201 | ||
| 3202 | u64 | 3202 | static u64 |
| 3203 | bfad_fcxp_get_rsp_sgaddr_cb(void *bfad_fcxp, int sgeid) | 3203 | bfad_fcxp_get_rsp_sgaddr_cb(void *bfad_fcxp, int sgeid) |
| 3204 | { | 3204 | { |
| 3205 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; | 3205 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
| @@ -3211,7 +3211,7 @@ bfad_fcxp_get_rsp_sgaddr_cb(void *bfad_fcxp, int sgeid) · 5 unmodified lines | |||
| 3211 | return addr; | 3211 | return addr; |
| 3212 | } | 3212 | } |
| 3213 | 3213 | ||
| 3214 | u32 | 3214 | static u32 |
| 3215 | bfad_fcxp_get_rsp_sglen_cb(void *bfad_fcxp, int sgeid) | 3215 | bfad_fcxp_get_rsp_sglen_cb(void *bfad_fcxp, int sgeid) |
| 3216 | { | 3216 | { |
| 3217 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; | 3217 | struct bfad_fcxp *drv_fcxp = bfad_fcxp; |
| @@ -3221,7 +3221,7 @@ bfad_fcxp_get_rsp_sglen_cb(void *bfad_fcxp, int sgeid) · 3 unmodified lines | |||
| 3221 | return sge->sg_len; | 3221 | return sge->sg_len; |
| 3222 | } | 3222 | } |
| 3223 | 3223 | ||
| 3224 | void | 3224 | static void |
| 3225 | bfad_send_fcpt_cb(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg, | 3225 | bfad_send_fcpt_cb(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg, |
| 3226 | bfa_status_t req_status, u32 rsp_len, u32 resid_len, | 3226 | bfa_status_t req_status, u32 rsp_len, u32 resid_len, |
| 3227 | struct fchs_s *rsp_fchs) | 3227 | struct fchs_s *rsp_fchs) |
| @@ -3236,7 +3236,7 @@ bfad_send_fcpt_cb(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg, · 8 unmodified lines | |||
| 3236 | complete(&drv_fcxp->comp); | 3236 | complete(&drv_fcxp->comp); |
| 3237 | } | 3237 | } |
| 3238 | 3238 | ||
| 3239 | struct bfad_buf_info * | 3239 | static struct bfad_buf_info * |
| 3240 | bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf, | 3240 | bfad_fcxp_map_sg(struct bfad_s *bfad, void *payload_kbuf, |
| 3241 | uint32_t payload_len, uint32_t *num_sgles) | 3241 | uint32_t payload_len, uint32_t *num_sgles) |
| 3242 | { | 3242 | { |
| @@ -3280,7 +3280,7 @@ out_free_mem: · 37 unmodified lines | |||
| 3280 | return NULL; | 3280 | return NULL; |
| 3281 | } | 3281 | } |
| 3282 | 3282 | ||
| 3283 | void | 3283 | static void |
| 3284 | bfad_fcxp_free_mem(struct bfad_s *bfad, struct bfad_buf_info *buf_base, | 3284 | bfad_fcxp_free_mem(struct bfad_s *bfad, struct bfad_buf_info *buf_base, |
| 3285 | uint32_t num_sgles) | 3285 | uint32_t num_sgles) |
| 3286 | { | 3286 | { |
| @@ -3298,7 +3298,7 @@ bfad_fcxp_free_mem(struct bfad_s *bfad, struct bfad_buf_info *buf_base, · 11 unmodified lines | |||
| 3298 | } | 3298 | } |
| 3299 | } | 3299 | } |
| 3300 | 3300 | ||
| 3301 | int | 3301 | static int |
| 3302 | bfad_fcxp_bsg_send(struct bsg_job *job, struct bfad_fcxp *drv_fcxp, | 3302 | bfad_fcxp_bsg_send(struct bsg_job *job, struct bfad_fcxp *drv_fcxp, |
| 3303 | bfa_bsg_fcpt_t *bsg_fcpt) | 3303 | bfa_bsg_fcpt_t *bsg_fcpt) |
| 3304 | { | 3304 | { |
| @@ -3338,7 +3338,7 @@ bfad_fcxp_bsg_send(struct bsg_job *job, struct bfad_fcxp *drv_fcxp, · 33 unmodified lines | |||
| 3338 | return BFA_STATUS_OK; | 3338 | return BFA_STATUS_OK; |
| 3339 | } | 3339 | } |
| 3340 | 3340 | ||
| 3341 | int | 3341 | static int |
| 3342 | bfad_im_bsg_els_ct_request(struct bsg_job *job) | 3342 | bfad_im_bsg_els_ct_request(struct bsg_job *job) |
| 3343 | { | 3343 | { |
| 3344 | struct bfa_bsg_data *bsg_data; | 3344 | struct bfa_bsg_data *bsg_data; |
| @@ -1071,9 +1071,8 @@ static int bnx2fc_fip_recv(struct sk_buff *skb, struct net_device *dev, · 1070 unmodified lines | |||
| 1071 | /** | 1071 | /** |
| 1072 | * bnx2fc_update_src_mac - Update Ethernet MAC filters. | 1072 | * bnx2fc_update_src_mac - Update Ethernet MAC filters. |
| 1073 | * | 1073 | * |
| 1074 | * @fip: FCoE controller. | 1074 | * @lport: The local port |
| 1075 | * @old: Unicast MAC address to delete if the MAC is non-zero. | 1075 | * @addr: Location of data to copy |
| 1076 | * @new: Unicast MAC address to add. | ||
| 1077 | * | 1076 | * |
| 1078 | * Remove any previously-set unicast MAC filter. | 1077 | * Remove any previously-set unicast MAC filter. |
| 1079 | * Add secondary FCoE MAC address filter for our OUI. | 1078 | * Add secondary FCoE MAC address filter for our OUI. |
| @@ -1659,8 +1658,7 @@ static void __bnx2fc_destroy(struct bnx2fc_interface *interface) · 579 unmodified lines | |||
| 1659 | /** | 1658 | /** |
| 1660 | * bnx2fc_destroy - Destroy a bnx2fc FCoE interface | 1659 | * bnx2fc_destroy - Destroy a bnx2fc FCoE interface |
| 1661 | * | 1660 | * |
| 1662 | * @buffer: The name of the Ethernet interface to be destroyed | 1661 | * @netdev: The net device that the FCoE interface is on |
| 1663 | * @kp: The associated kernel parameter | ||
| 1664 | * | 1662 | * |
| 1665 | * Called from sysfs. | 1663 | * Called from sysfs. |
| 1666 | * | 1664 | * |
| @@ -2101,7 +2099,7 @@ static int __bnx2fc_disable(struct fcoe_ctlr *ctlr) · 434 unmodified lines | |||
| 2101 | return 0; | 2099 | return 0; |
| 2102 | } | 2100 | } |
| 2103 | 2101 | ||
| 2104 | /** | 2102 | /* |
| 2105 | * Deperecated: Use bnx2fc_enabled() | 2103 | * Deperecated: Use bnx2fc_enabled() |
| 2106 | */ | 2104 | */ |
| 2107 | static int bnx2fc_disable(struct net_device *netdev) | 2105 | static int bnx2fc_disable(struct net_device *netdev) |
| @@ -2229,7 +2227,7 @@ done: · 121 unmodified lines | |||
| 2229 | return 0; | 2227 | return 0; |
| 2230 | } | 2228 | } |
| 2231 | 2229 | ||
| 2232 | /** | 2230 | /* |
| 2233 | * Deprecated: Use bnx2fc_enabled() | 2231 | * Deprecated: Use bnx2fc_enabled() |
| 2234 | */ | 2232 | */ |
| 2235 | static int bnx2fc_enable(struct net_device *netdev) | 2233 | static int bnx2fc_enable(struct net_device *netdev) |
| @@ -2523,7 +2521,7 @@ static struct bnx2fc_hba *bnx2fc_hba_lookup(struct net_device · 287 unmodified lines | |||
| 2523 | /** | 2521 | /** |
| 2524 | * bnx2fc_ulp_exit - shuts down adapter instance and frees all resources | 2522 | * bnx2fc_ulp_exit - shuts down adapter instance and frees all resources |
| 2525 | * | 2523 | * |
| 2526 | * @dev cnic device handle | 2524 | * @dev: cnic device handle |
| 2527 | */ | 2525 | */ |
| 2528 | static void bnx2fc_ulp_exit(struct cnic_dev *dev) | 2526 | static void bnx2fc_ulp_exit(struct cnic_dev *dev) |
| 2529 | { | 2527 | { |
| @@ -2956,7 +2954,7 @@ static struct device_attribute *bnx2fc_host_attrs[] = { · 426 unmodified lines | |||
| 2956 | NULL, | 2954 | NULL, |
| 2957 | }; | 2955 | }; |
| 2958 | 2956 | ||
| 2959 | /** | 2957 | /* |
| 2960 | * scsi_host_template structure used while registering with SCSI-ml | 2958 | * scsi_host_template structure used while registering with SCSI-ml |
| 2961 | */ | 2959 | */ |
| 2962 | static struct scsi_host_template bnx2fc_shost_template = { | 2960 | static struct scsi_host_template bnx2fc_shost_template = { |
| @@ -2989,7 +2987,7 @@ static struct libfc_function_template bnx2fc_libfc_fcn_templ = { · 26 unmodified lines | |||
| 2989 | .rport_event_callback = bnx2fc_rport_event_handler, | 2987 | .rport_event_callback = bnx2fc_rport_event_handler, |
| 2990 | }; | 2988 | }; |
| 2991 | 2989 | ||
| 2992 | /** | 2990 | /* |
| 2993 | * bnx2fc_cnic_cb - global template of bnx2fc - cnic driver interface | 2991 | * bnx2fc_cnic_cb - global template of bnx2fc - cnic driver interface |
| 2994 | * structure carrying callback function pointers | 2992 | * structure carrying callback function pointers |
| 2995 | */ | 2993 | */ |
| @@ -485,7 +485,7 @@ int bnx2fc_send_session_disable_req(struct fcoe_port *port, · 484 unmodified lines | |||
| 485 | /** | 485 | /** |
| 486 | * bnx2fc_send_session_destroy_req - initiates FCoE Session destroy | 486 | * bnx2fc_send_session_destroy_req - initiates FCoE Session destroy |
| 487 | * | 487 | * |
| 488 | * @port: port structure pointer | 488 | * @hba: adapter structure pointer |
| 489 | * @tgt: bnx2fc_rport structure pointer | 489 | * @tgt: bnx2fc_rport structure pointer |
| 490 | */ | 490 | */ |
| 491 | int bnx2fc_send_session_destroy_req(struct bnx2fc_hba *hba, | 491 | int bnx2fc_send_session_destroy_req(struct bnx2fc_hba *hba, |
| @@ -635,7 +635,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe) · 143 unmodified lines | |||
| 635 | struct bnx2fc_cmd *io_req = NULL; | 635 | struct bnx2fc_cmd *io_req = NULL; |
| 636 | struct bnx2fc_interface *interface = tgt->port->priv; | 636 | struct bnx2fc_interface *interface = tgt->port->priv; |
| 637 | struct bnx2fc_hba *hba = interface->hba; | 637 | struct bnx2fc_hba *hba = interface->hba; |
| 638 | int task_idx, index; | ||
| 639 | int rc = 0; | 638 | int rc = 0; |
| 640 | u64 err_warn_bit_map; | 639 | u64 err_warn_bit_map; |
| 641 | u8 err_warn = 0xff; | 640 | u8 err_warn = 0xff; |
| @@ -701,15 +700,12 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe) · 59 unmodified lines | |||
| 701 | BNX2FC_TGT_DBG(tgt, "buf_offsets - tx = 0x%x, rx = 0x%x\n", | 700 | BNX2FC_TGT_DBG(tgt, "buf_offsets - tx = 0x%x, rx = 0x%x\n", |
| 702 | err_entry->data.tx_buf_off, err_entry->data.rx_buf_off); | 701 | err_entry->data.tx_buf_off, err_entry->data.rx_buf_off); |
| 703 | 702 | ||
| 704 | |||
| 705 | if (xid > hba->max_xid) { | 703 | if (xid > hba->max_xid) { |
| 706 | BNX2FC_TGT_DBG(tgt, "xid(0x%x) out of FW range\n", | 704 | BNX2FC_TGT_DBG(tgt, "xid(0x%x) out of FW range\n", |
| 707 | xid); | 705 | xid); |
| 708 | goto ret_err_rqe; | 706 | goto ret_err_rqe; |
| 709 | } | 707 | } |
| 710 | 708 | ||
| 711 | task_idx = xid / BNX2FC_TASKS_PER_PAGE; | ||
| 712 | index = xid % BNX2FC_TASKS_PER_PAGE; | ||
| 713 | 709 | ||
| 714 | io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; | 710 | io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; |
| 715 | if (!io_req) | 711 | if (!io_req) |
| @@ -833,8 +829,6 @@ ret_err_rqe: · 117 unmodified lines | |||
| 833 | } | 829 | } |
| 834 | BNX2FC_TGT_DBG(tgt, "warn = 0x%x\n", err_warn); | 830 | BNX2FC_TGT_DBG(tgt, "warn = 0x%x\n", err_warn); |
| 835 | 831 | ||
| 836 | task_idx = xid / BNX2FC_TASKS_PER_PAGE; | ||
| 837 | index = xid % BNX2FC_TASKS_PER_PAGE; | ||
| 838 | io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; | 832 | io_req = (struct bnx2fc_cmd *)hba->cmd_mgr->cmds[xid]; |
| 839 | if (!io_req) | 833 | if (!io_req) |
| 840 | goto ret_warn_rqe; | 834 | goto ret_warn_rqe; |
| @@ -1008,7 +1002,6 @@ static bool bnx2fc_pending_work(struct bnx2fc_rport *tgt, unsigned int wqe) · 167 unmodified lines | |||
| 1008 | unsigned char *rq_data = NULL; | 1002 | unsigned char *rq_data = NULL; |
| 1009 | unsigned char rq_data_buff[BNX2FC_RQ_BUF_SZ]; | 1003 | unsigned char rq_data_buff[BNX2FC_RQ_BUF_SZ]; |
| 1010 | int task_idx, index; | 1004 | int task_idx, index; |
| 1011 | unsigned char *dummy; | ||
| 1012 | u16 xid; | 1005 | u16 xid; |
| 1013 | u8 num_rq; | 1006 | u8 num_rq; |
| 1014 | int i; | 1007 | int i; |
| @@ -1038,7 +1031,7 @@ static bool bnx2fc_pending_work(struct bnx2fc_rport *tgt, unsigned int wqe) · 23 unmodified lines | |||
| 1038 | if (num_rq > 1) { | 1031 | if (num_rq > 1) { |
| 1039 | /* We do not need extra sense data */ | 1032 | /* We do not need extra sense data */ |
| 1040 | for (i = 1; i < num_rq; i++) | 1033 | for (i = 1; i < num_rq; i++) |
| 1041 | dummy = bnx2fc_get_next_rqe(tgt, 1); | 1034 | bnx2fc_get_next_rqe(tgt, 1); |
| 1042 | } | 1035 | } |
| 1043 | 1036 | ||
| 1044 | if (rq_data) | 1037 | if (rq_data) |
| @@ -1341,8 +1334,8 @@ static void bnx2fc_init_failure(struct bnx2fc_hba *hba, u32 err_code) · 296 unmodified lines | |||
| 1341 | /** | 1334 | /** |
| 1342 | * bnx2fc_indicae_kcqe - process KCQE | 1335 | * bnx2fc_indicae_kcqe - process KCQE |
| 1343 | * | 1336 | * |
| 1344 | * @hba: adapter structure pointer | 1337 | * @context: adapter structure pointer |
| 1345 | * @kcqe: kcqe pointer | 1338 | * @kcq: kcqe pointer |
| 1346 | * @num_cqe: Number of completion queue elements | 1339 | * @num_cqe: Number of completion queue elements |
| 1347 | * | 1340 | * |
| 1348 | * Generic KCQ event handler | 1341 | * Generic KCQ event handler |
| @@ -1510,7 +1503,6 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req, · 161 unmodified lines | |||
| 1510 | u64 phys_addr = (u64)orig_io_req->bd_tbl->bd_tbl_dma; | 1503 | u64 phys_addr = (u64)orig_io_req->bd_tbl->bd_tbl_dma; |
| 1511 | u32 orig_offset = offset; | 1504 | u32 orig_offset = offset; |
| 1512 | int bd_count; | 1505 | int bd_count; |
| 1513 | int orig_task_idx, index; | ||
| 1514 | int i; | 1506 | int i; |
| 1515 | 1507 | ||
| 1516 | memset(task, 0, sizeof(struct fcoe_task_ctx_entry)); | 1508 | memset(task, 0, sizeof(struct fcoe_task_ctx_entry)); |
| @@ -1560,8 +1552,6 @@ void bnx2fc_init_seq_cleanup_task(struct bnx2fc_cmd *seq_clnp_req, · 43 unmodified lines | |||
| 1560 | offset; /* adjusted offset */ | 1552 | offset; /* adjusted offset */ |
| 1561 | task->txwr_only.sgl_ctx.sgl.mul_sgl.cur_sge_idx = i; | 1553 | task->txwr_only.sgl_ctx.sgl.mul_sgl.cur_sge_idx = i; |
| 1562 | } else { | 1554 | } else { |
| 1563 | orig_task_idx = orig_xid / BNX2FC_TASKS_PER_PAGE; | ||
| 1564 | index = orig_xid % BNX2FC_TASKS_PER_PAGE; | ||
| 1565 | 1555 | ||
| 1566 | /* Multiple SGEs were used for this IO */ | 1556 | /* Multiple SGEs were used for this IO */ |
| 1567 | sgl = &task->rxwr_only.union_ctx.read_info.sgl_ctx.sgl; | 1557 | sgl = &task->rxwr_only.union_ctx.read_info.sgl_ctx.sgl; |
| @@ -2089,11 +2079,7 @@ static int bnx2fc_allocate_hash_table(struct bnx2fc_hba *hba) · 521 unmodified lines | |||
| 2089 | pbl = hba->hash_tbl_pbl; | 2079 | pbl = hba->hash_tbl_pbl; |
| 2090 | i = 0; | 2080 | i = 0; |
| 2091 | while (*pbl && *(pbl + 1)) { | 2081 | while (*pbl && *(pbl + 1)) { |
| 2092 | u32 lo; | ||
| 2093 | u32 hi; | ||
| 2094 | lo = *pbl; | ||
| 2095 | ++pbl; | 2082 | ++pbl; |
| 2096 | hi = *pbl; | ||
| 2097 | ++pbl; | 2083 | ++pbl; |
| 2098 | ++i; | 2084 | ++i; |
| 2099 | } | 2085 | } |
| @@ -431,7 +431,7 @@ static int bnx2fc_init_tgt(struct bnx2fc_rport *tgt, · 430 unmodified lines | |||
| 431 | return 0; | 431 | return 0; |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | /** | 434 | /* |
| 435 | * This event_callback is called after successful completion of libfc | 435 | * This event_callback is called after successful completion of libfc |
| 436 | * initiated target login. bnx2fc can proceed with initiating the session | 436 | * initiated target login. bnx2fc can proceed with initiating the session |
| 437 | * establishment. | 437 | * establishment. |
| @@ -656,9 +656,8 @@ static void bnx2fc_free_conn_id(struct bnx2fc_hba *hba, u32 conn_id) · 218 unmodified lines | |||
| 656 | spin_unlock_bh(&hba->hba_lock); | 656 | spin_unlock_bh(&hba->hba_lock); |
| 657 | } | 657 | } |
| 658 | 658 | ||
| 659 | /** | 659 | /* |
| 660 | *bnx2fc_alloc_session_resc - Allocate qp resources for the session | 660 | * bnx2fc_alloc_session_resc - Allocate qp resources for the session |
| 661 | * | ||
| 662 | */ | 661 | */ |
| 663 | static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba, | 662 | static int bnx2fc_alloc_session_resc(struct bnx2fc_hba *hba, |
| 664 | struct bnx2fc_rport *tgt) | 663 | struct bnx2fc_rport *tgt) |
| @@ -181,7 +181,7 @@ int bnx2i_arm_cq_event_coalescing(struct bnx2i_endpoint *ep, u8 action) · 180 unmodified lines | |||
| 181 | 181 | ||
| 182 | /** | 182 | /** |
| 183 | * bnx2i_get_rq_buf - copy RQ buffer contents to driver buffer | 183 | * bnx2i_get_rq_buf - copy RQ buffer contents to driver buffer |
| 184 | * @conn: iscsi connection on which RQ event occurred | 184 | * @bnx2i_conn: iscsi connection on which RQ event occurred |
| 185 | * @ptr: driver buffer to which RQ buffer contents is to | 185 | * @ptr: driver buffer to which RQ buffer contents is to |
| 186 | * be copied | 186 | * be copied |
| 187 | * @len: length of valid data inside RQ buf | 187 | * @len: length of valid data inside RQ buf |
| @@ -223,7 +223,7 @@ static void bnx2i_ring_577xx_doorbell(struct bnx2i_conn *conn) · 35 unmodified lines | |||
| 223 | 223 | ||
| 224 | /** | 224 | /** |
| 225 | * bnx2i_put_rq_buf - Replenish RQ buffer, if required ring on chip doorbell | 225 | * bnx2i_put_rq_buf - Replenish RQ buffer, if required ring on chip doorbell |
| 226 | * @conn: iscsi connection on which event to post | 226 | * @bnx2i_conn: iscsi connection on which event to post |
| 227 | * @count: number of RQ buffer being posted to chip | 227 | * @count: number of RQ buffer being posted to chip |
| 228 | * | 228 | * |
| 229 | * No need to ring hardware doorbell for 57710 family of devices | 229 | * No need to ring hardware doorbell for 57710 family of devices |
| @@ -258,7 +258,7 @@ void bnx2i_put_rq_buf(struct bnx2i_conn *bnx2i_conn, int count) · 28 unmodified lines | |||
| 258 | 258 | ||
| 259 | /** | 259 | /** |
| 260 | * bnx2i_ring_sq_dbell - Ring SQ doorbell to wake-up the processing engine | 260 | * bnx2i_ring_sq_dbell - Ring SQ doorbell to wake-up the processing engine |
| 261 | * @conn: iscsi connection to which new SQ entries belong | 261 | * @bnx2i_conn: iscsi connection to which new SQ entries belong |
| 262 | * @count: number of SQ WQEs to post | 262 | * @count: number of SQ WQEs to post |
| 263 | * | 263 | * |
| 264 | * SQ DB is updated in host memory and TX Doorbell is rung for 57710 family | 264 | * SQ DB is updated in host memory and TX Doorbell is rung for 57710 family |
| @@ -283,7 +283,7 @@ static void bnx2i_ring_sq_dbell(struct bnx2i_conn *bnx2i_conn, int count) · 18 unmodified lines | |||
| 283 | 283 | ||
| 284 | /** | 284 | /** |
| 285 | * bnx2i_ring_dbell_update_sq_params - update SQ driver parameters | 285 | * bnx2i_ring_dbell_update_sq_params - update SQ driver parameters |
| 286 | * @conn: iscsi connection to which new SQ entries belong | 286 | * @bnx2i_conn: iscsi connection to which new SQ entries belong |
| 287 | * @count: number of SQ WQEs to post | 287 | * @count: number of SQ WQEs to post |
| 288 | * | 288 | * |
| 289 | * this routine will update SQ driver parameters and ring the doorbell | 289 | * this routine will update SQ driver parameters and ring the doorbell |
| @@ -320,9 +320,9 @@ static void bnx2i_ring_dbell_update_sq_params(struct bnx2i_conn *bnx2i_conn, · 30 unmodified lines | |||
| 320 | 320 | ||
| 321 | /** | 321 | /** |
| 322 | * bnx2i_send_iscsi_login - post iSCSI login request MP WQE to hardware | 322 | * bnx2i_send_iscsi_login - post iSCSI login request MP WQE to hardware |
| 323 | * @conn: iscsi connection | 323 | * @bnx2i_conn: iscsi connection |
| 324 | * @cmd: driver command structure which is requesting | 324 | * @task: transport layer's command structure pointer which is requesting |
| 325 | * a WQE to sent to chip for further processing | 325 | * a WQE to sent to chip for further processing |
| 326 | * | 326 | * |
| 327 | * prepare and post an iSCSI Login request WQE to CNIC firmware | 327 | * prepare and post an iSCSI Login request WQE to CNIC firmware |
| 328 | */ | 328 | */ |
| @@ -373,7 +373,7 @@ int bnx2i_send_iscsi_login(struct bnx2i_conn *bnx2i_conn, · 44 unmodified lines | |||
| 373 | 373 | ||
| 374 | /** | 374 | /** |
| 375 | * bnx2i_send_iscsi_tmf - post iSCSI task management request MP WQE to hardware | 375 | * bnx2i_send_iscsi_tmf - post iSCSI task management request MP WQE to hardware |
| 376 | * @conn: iscsi connection | 376 | * @bnx2i_conn: iscsi connection |
| 377 | * @mtask: driver command structure which is requesting | 377 | * @mtask: driver command structure which is requesting |
| 378 | * a WQE to sent to chip for further processing | 378 | * a WQE to sent to chip for further processing |
| 379 | * | 379 | * |
| @@ -447,7 +447,7 @@ int bnx2i_send_iscsi_tmf(struct bnx2i_conn *bnx2i_conn, · 67 unmodified lines | |||
| 447 | 447 | ||
| 448 | /** | 448 | /** |
| 449 | * bnx2i_send_iscsi_text - post iSCSI text WQE to hardware | 449 | * bnx2i_send_iscsi_text - post iSCSI text WQE to hardware |
| 450 | * @conn: iscsi connection | 450 | * @bnx2i_conn: iscsi connection |
| 451 | * @mtask: driver command structure which is requesting | 451 | * @mtask: driver command structure which is requesting |
| 452 | * a WQE to sent to chip for further processing | 452 | * a WQE to sent to chip for further processing |
| 453 | * | 453 | * |
| @@ -495,7 +495,7 @@ int bnx2i_send_iscsi_text(struct bnx2i_conn *bnx2i_conn, · 41 unmodified lines | |||
| 495 | 495 | ||
| 496 | /** | 496 | /** |
| 497 | * bnx2i_send_iscsi_scsicmd - post iSCSI scsicmd request WQE to hardware | 497 | * bnx2i_send_iscsi_scsicmd - post iSCSI scsicmd request WQE to hardware |
| 498 | * @conn: iscsi connection | 498 | * @bnx2i_conn: iscsi connection |
| 499 | * @cmd: driver command structure which is requesting | 499 | * @cmd: driver command structure which is requesting |
| 500 | * a WQE to sent to chip for further processing | 500 | * a WQE to sent to chip for further processing |
| 501 | * | 501 | * |
| @@ -517,9 +517,9 @@ int bnx2i_send_iscsi_scsicmd(struct bnx2i_conn *bnx2i_conn, · 15 unmodified lines | |||
| 517 | 517 | ||
| 518 | /** | 518 | /** |
| 519 | * bnx2i_send_iscsi_nopout - post iSCSI NOPOUT request WQE to hardware | 519 | * bnx2i_send_iscsi_nopout - post iSCSI NOPOUT request WQE to hardware |
| 520 | * @conn: iscsi connection | 520 | * @bnx2i_conn: iscsi connection |
| 521 | * @cmd: driver command structure which is requesting | 521 | * @task: transport layer's command structure pointer which is |
| 522 | * a WQE to sent to chip for further processing | 522 | * requesting a WQE to sent to chip for further processing |
| 523 | * @datap: payload buffer pointer | 523 | * @datap: payload buffer pointer |
| 524 | * @data_len: payload data length | 524 | * @data_len: payload data length |
| 525 | * @unsol: indicated whether nopout pdu is unsolicited pdu or | 525 | * @unsol: indicated whether nopout pdu is unsolicited pdu or |
| @@ -579,9 +579,9 @@ int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn, · 53 unmodified lines | |||
| 579 | 579 | ||
| 580 | /** | 580 | /** |
| 581 | * bnx2i_send_iscsi_logout - post iSCSI logout request WQE to hardware | 581 | * bnx2i_send_iscsi_logout - post iSCSI logout request WQE to hardware |
| 582 | * @conn: iscsi connection | 582 | * @bnx2i_conn: iscsi connection |
| 583 | * @cmd: driver command structure which is requesting | 583 | * @task: transport layer's command structure pointer which is |
| 584 | * a WQE to sent to chip for further processing | 584 | * requesting a WQE to sent to chip for further processing |
| 585 | * | 585 | * |
| 586 | * prepare and post logout request WQE to CNIC firmware | 586 | * prepare and post logout request WQE to CNIC firmware |
| 587 | */ | 587 | */ |
| @@ -678,7 +678,8 @@ void bnx2i_update_iscsi_conn(struct iscsi_conn *conn) · 90 unmodified lines | |||
| 678 | 678 | ||
| 679 | /** | 679 | /** |
| 680 | * bnx2i_ep_ofld_timer - post iSCSI logout request WQE to hardware | 680 | * bnx2i_ep_ofld_timer - post iSCSI logout request WQE to hardware |
| 681 | * @data: endpoint (transport handle) structure pointer | 681 | * @t: timer context used to fetch the endpoint (transport |
| 682 | * handle) structure pointer | ||
| 682 | * | 683 | * |
| 683 | * routine to handle connection offload/destroy request timeout | 684 | * routine to handle connection offload/destroy request timeout |
| 684 | */ | 685 | */ |
| @@ -1662,7 +1663,7 @@ static void bnx2i_process_nopin_local_cmpl(struct iscsi_session *session, · 977 unmodified lines | |||
| 1662 | 1663 | ||
| 1663 | /** | 1664 | /** |
| 1664 | * bnx2i_unsol_pdu_adjust_rq - makes adjustments to RQ after unsol pdu is recvd | 1665 | * bnx2i_unsol_pdu_adjust_rq - makes adjustments to RQ after unsol pdu is recvd |
| 1665 | * @conn: iscsi connection | 1666 | * @bnx2i_conn: iscsi connection |
| 1666 | * | 1667 | * |
| 1667 | * Firmware advances RQ producer index for every unsolicited PDU even if | 1668 | * Firmware advances RQ producer index for every unsolicited PDU even if |
| 1668 | * payload data length is '0'. This function makes corresponding | 1669 | * payload data length is '0'. This function makes corresponding |
| @@ -1885,7 +1886,9 @@ int bnx2i_percpu_io_thread(void *arg) · 216 unmodified lines | |||
| 1885 | 1886 | ||
| 1886 | /** | 1887 | /** |
| 1887 | * bnx2i_queue_scsi_cmd_resp - queue cmd completion to the percpu thread | 1888 | * bnx2i_queue_scsi_cmd_resp - queue cmd completion to the percpu thread |
| 1889 | * @session: iscsi session | ||
| 1888 | * @bnx2i_conn: bnx2i connection | 1890 | * @bnx2i_conn: bnx2i connection |
| 1891 | * @cqe: pointer to newly DMA'ed CQE entry for processing | ||
| 1889 | * | 1892 | * |
| 1890 | * this function is called by generic KCQ handler to queue all pending cmd | 1893 | * this function is called by generic KCQ handler to queue all pending cmd |
| 1891 | * completion CQEs | 1894 | * completion CQEs |
| @@ -2466,8 +2469,9 @@ static void bnx2i_process_ofld_cmpl(struct bnx2i_hba *hba, · 574 unmodified lines | |||
| 2466 | 2469 | ||
| 2467 | /** | 2470 | /** |
| 2468 | * bnx2i_indicate_kcqe - process iscsi conn update completion KCQE | 2471 | * bnx2i_indicate_kcqe - process iscsi conn update completion KCQE |
| 2469 | * @hba: adapter structure pointer | 2472 | * @context: adapter structure pointer |
| 2470 | * @update_kcqe: kcqe pointer | 2473 | * @kcqe: kcqe pointer |
| 2474 | * @num_cqe: number of kcqes to process | ||
| 2471 | * | 2475 | * |
| 2472 | * Generic KCQ event handler/dispatcher | 2476 | * Generic KCQ event handler/dispatcher |
| 2473 | */ | 2477 | */ |
| @@ -2614,8 +2618,7 @@ static void bnx2i_cm_abort_cmpl(struct cnic_sock *cm_sk) · 140 unmodified lines | |||
| 2614 | 2618 | ||
| 2615 | /** | 2619 | /** |
| 2616 | * bnx2i_cm_remote_close - process received TCP FIN | 2620 | * bnx2i_cm_remote_close - process received TCP FIN |
| 2617 | * @hba: adapter structure pointer | 2621 | * @cm_sk: cnic sock structure pointer |
| 2618 | * @update_kcqe: kcqe pointer | ||
| 2619 | * | 2622 | * |
| 2620 | * function callback exported via bnx2i - cnic driver interface to indicate | 2623 | * function callback exported via bnx2i - cnic driver interface to indicate |
| 2621 | * async TCP events such as FIN | 2624 | * async TCP events such as FIN |
| @@ -2631,8 +2634,7 @@ static void bnx2i_cm_remote_close(struct cnic_sock *cm_sk) · 9 unmodified lines | |||
| 2631 | 2634 | ||
| 2632 | /** | 2635 | /** |
| 2633 | * bnx2i_cm_remote_abort - process TCP RST and start conn cleanup | 2636 | * bnx2i_cm_remote_abort - process TCP RST and start conn cleanup |
| 2634 | * @hba: adapter structure pointer | 2637 | * @cm_sk: cnic sock structure pointer |
| 2635 | * @update_kcqe: kcqe pointer | ||
| 2636 | * | 2638 | * |
| 2637 | * function callback exported via bnx2i - cnic driver interface to | 2639 | * function callback exported via bnx2i - cnic driver interface to |
| 2638 | * indicate async TCP events (RST) sent by the peer. | 2640 | * indicate async TCP events (RST) sent by the peer. |
| @@ -2669,10 +2671,9 @@ static int bnx2i_send_nl_mesg(void *context, u32 msg_type, · 30 unmodified lines | |||
| 2669 | } | 2671 | } |
| 2670 | 2672 | ||
| 2671 | 2673 | ||
| 2672 | /** | 2674 | /* |
| 2673 | * bnx2i_cnic_cb - global template of bnx2i - cnic driver interface structure | 2675 | * bnx2i_cnic_cb - global template of bnx2i - cnic driver interface structure |
| 2674 | * carrying callback function pointers | 2676 | * carrying callback function pointers |
| 2675 | * | ||
| 2676 | */ | 2677 | */ |
| 2677 | struct cnic_ulp_ops bnx2i_cnic_cb = { | 2678 | struct cnic_ulp_ops bnx2i_cnic_cb = { |
| 2678 | .cnic_init = bnx2i_ulp_init, | 2679 | .cnic_init = bnx2i_ulp_init, |
| @@ -73,7 +73,7 @@ DEFINE_PER_CPU(struct bnx2i_percpu_s, bnx2i_percpu); · 72 unmodified lines | |||
| 73 | /** | 73 | /** |
| 74 | * bnx2i_identify_device - identifies NetXtreme II device type | 74 | * bnx2i_identify_device - identifies NetXtreme II device type |
| 75 | * @hba: Adapter structure pointer | 75 | * @hba: Adapter structure pointer |
| 76 | * @cnic: Corresponding cnic device | 76 | * @dev: Corresponding cnic device |
| 77 | * | 77 | * |
| 78 | * This function identifies the NX2 device type and sets appropriate | 78 | * This function identifies the NX2 device type and sets appropriate |
| 79 | * queue mailbox register access method, 5709 requires driver to | 79 | * queue mailbox register access method, 5709 requires driver to |
| @@ -228,7 +228,7 @@ static void bnx2i_setup_cmd_wqe_template(struct bnx2i_cmd *cmd) · 227 unmodified lines | |||
| 228 | /** | 228 | /** |
| 229 | * bnx2i_bind_conn_to_iscsi_cid - bind conn structure to 'iscsi_cid' | 229 | * bnx2i_bind_conn_to_iscsi_cid - bind conn structure to 'iscsi_cid' |
| 230 | * @hba: pointer to adapter instance | 230 | * @hba: pointer to adapter instance |
| 231 | * @conn: pointer to iscsi connection | 231 | * @bnx2i_conn: pointer to iscsi connection |
| 232 | * @iscsi_cid: iscsi context ID, range 0 - (MAX_CONN - 1) | 232 | * @iscsi_cid: iscsi context ID, range 0 - (MAX_CONN - 1) |
| 233 | * | 233 | * |
| 234 | * update iscsi cid table entry with connection pointer. This enables | 234 | * update iscsi cid table entry with connection pointer. This enables |
| @@ -463,7 +463,6 @@ static int bnx2i_alloc_bdt(struct bnx2i_hba *hba, struct iscsi_session *session, · 228 unmodified lines | |||
| 463 | * bnx2i_destroy_cmd_pool - destroys iscsi command pool and release BD table | 463 | * bnx2i_destroy_cmd_pool - destroys iscsi command pool and release BD table |
| 464 | * @hba: adapter instance pointer | 464 | * @hba: adapter instance pointer |
| 465 | * @session: iscsi session pointer | 465 | * @session: iscsi session pointer |
| 466 | * @cmd: iscsi command structure | ||
| 467 | */ | 466 | */ |
| 468 | static void bnx2i_destroy_cmd_pool(struct bnx2i_hba *hba, | 467 | static void bnx2i_destroy_cmd_pool(struct bnx2i_hba *hba, |
| 469 | struct iscsi_session *session) | 468 | struct iscsi_session *session) |
| @@ -582,8 +581,7 @@ static void bnx2i_free_mp_bdt(struct bnx2i_hba *hba) · 112 unmodified lines | |||
| 582 | 581 | ||
| 583 | /** | 582 | /** |
| 584 | * bnx2i_drop_session - notifies iscsid of connection error. | 583 | * bnx2i_drop_session - notifies iscsid of connection error. |
| 585 | * @hba: adapter instance pointer | 584 | * @cls_session: iscsi cls session pointer |
| 586 | * @session: iscsi session pointer | ||
| 587 | * | 585 | * |
| 588 | * This notifies iscsid that there is a error, so it can initiate | 586 | * This notifies iscsid that there is a error, so it can initiate |
| 589 | * recovery. | 587 | * recovery. |
| @@ -1277,7 +1275,8 @@ static int bnx2i_task_xmit(struct iscsi_task *task) · 687 unmodified lines | |||
| 1277 | 1275 | ||
| 1278 | /** | 1276 | /** |
| 1279 | * bnx2i_session_create - create a new iscsi session | 1277 | * bnx2i_session_create - create a new iscsi session |
| 1280 | * @cmds_max: max commands supported | 1278 | * @ep: pointer to iscsi endpoint |
| 1279 | * @cmds_max: user specified maximum commands | ||
| 1281 | * @qdepth: scsi queue depth to support | 1280 | * @qdepth: scsi queue depth to support |
| 1282 | * @initial_cmdsn: initial iscsi CMDSN to be used for this session | 1281 | * @initial_cmdsn: initial iscsi CMDSN to be used for this session |
| 1283 | * | 1282 | * |
| @@ -1971,7 +1970,7 @@ static int bnx2i_ep_poll(struct iscsi_endpoint *ep, int timeout_ms) · 687 unmodified lines | |||
| 1971 | 1970 | ||
| 1972 | /** | 1971 | /** |
| 1973 | * bnx2i_ep_tcp_conn_active - check EP state transition | 1972 | * bnx2i_ep_tcp_conn_active - check EP state transition |
| 1974 | * @ep: endpoint pointer | 1973 | * @bnx2i_ep: endpoint pointer |
| 1975 | * | 1974 | * |
| 1976 | * check if underlying TCP connection is active | 1975 | * check if underlying TCP connection is active |
| 1977 | */ | 1976 | */ |
| @@ -2014,9 +2013,9 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep) · 36 unmodified lines | |||
| 2014 | } | 2013 | } |
| 2015 | 2014 | ||
| 2016 | 2015 | ||
| 2017 | /* | 2016 | /** |
| 2018 | * bnx2i_hw_ep_disconnect - executes TCP connection teardown process in the hw | 2017 | * bnx2i_hw_ep_disconnect - executes TCP connection teardown process in the hw |
| 2019 | * @ep: TCP connection (bnx2i endpoint) handle | 2018 | * @bnx2i_ep: TCP connection (bnx2i endpoint) handle |
| 2020 | * | 2019 | * |
| 2021 | * executes TCP connection teardown process | 2020 | * executes TCP connection teardown process |
| 2022 | */ | 2021 | */ |
| @@ -2171,8 +2170,8 @@ out: · 148 unmodified lines | |||
| 2171 | 2170 | ||
| 2172 | /** | 2171 | /** |
| 2173 | * bnx2i_nl_set_path - ISCSI_UEVENT_PATH_UPDATE user message handler | 2172 | * bnx2i_nl_set_path - ISCSI_UEVENT_PATH_UPDATE user message handler |
| 2174 | * @buf: pointer to buffer containing iscsi path message | 2173 | * @shost: scsi host pointer |
| 2175 | * | 2174 | * @params: pointer to buffer containing iscsi path message |
| 2176 | */ | 2175 | */ |
| 2177 | static int bnx2i_nl_set_path(struct Scsi_Host *shost, struct iscsi_path *params) | 2176 | static int bnx2i_nl_set_path(struct Scsi_Host *shost, struct iscsi_path *params) |
| 2178 | { | 2177 | { |
| @@ -30,6 +30,7 @@ static inline struct bnx2i_hba *bnx2i_dev_to_hba(struct device *dev) · 29 unmodified lines | |||
| 30 | /** | 30 | /** |
| 31 | * bnx2i_show_sq_info - return(s currently configured send queue (SQ) size | 31 | * bnx2i_show_sq_info - return(s currently configured send queue (SQ) size |
| 32 | * @dev: device pointer | 32 | * @dev: device pointer |
| 33 | * @attr: device attribute (unused) | ||
| 33 | * @buf: buffer to return current SQ size parameter | 34 | * @buf: buffer to return current SQ size parameter |
| 34 | * | 35 | * |
| 35 | * Returns current SQ size parameter, this paramater determines the number | 36 | * Returns current SQ size parameter, this paramater determines the number |
| @@ -47,6 +48,7 @@ static ssize_t bnx2i_show_sq_info(struct device *dev, · 11 unmodified lines | |||
| 47 | /** | 48 | /** |
| 48 | * bnx2i_set_sq_info - update send queue (SQ) size parameter | 49 | * bnx2i_set_sq_info - update send queue (SQ) size parameter |
| 49 | * @dev: device pointer | 50 | * @dev: device pointer |
| 51 | * @attr: device attribute (unused) | ||
| 50 | * @buf: buffer to return current SQ size parameter | 52 | * @buf: buffer to return current SQ size parameter |
| 51 | * @count: parameter buffer size | 53 | * @count: parameter buffer size |
| 52 | * | 54 | * |
| @@ -87,6 +89,7 @@ skip_config: · 34 unmodified lines | |||
| 87 | /** | 89 | /** |
| 88 | * bnx2i_show_ccell_info - returns command cell (HQ) size | 90 | * bnx2i_show_ccell_info - returns command cell (HQ) size |
| 89 | * @dev: device pointer | 91 | * @dev: device pointer |
| 92 | * @attr: device attribute (unused) | ||
| 90 | * @buf: buffer to return current SQ size parameter | 93 | * @buf: buffer to return current SQ size parameter |
| 91 | * | 94 | * |
| 92 | * returns per-connection TCP history queue size parameter | 95 | * returns per-connection TCP history queue size parameter |
| @@ -103,6 +106,7 @@ static ssize_t bnx2i_show_ccell_info(struct device *dev, · 10 unmodified lines | |||
| 103 | /** | 106 | /** |
| 104 | * bnx2i_get_link_state - set command cell (HQ) size | 107 | * bnx2i_get_link_state - set command cell (HQ) size |
| 105 | * @dev: device pointer | 108 | * @dev: device pointer |
| 109 | * @attr: device attribute (unused) | ||
| 106 | * @buf: buffer to return current SQ size parameter | 110 | * @buf: buffer to return current SQ size parameter |
| 107 | * @count: parameter buffer size | 111 | * @count: parameter buffer size |
| 108 | * | 112 | * |
| @@ -306,7 +306,7 @@ csio_hw_get_vpd_params(struct csio_hw *hw, struct csio_vpd *p) · 305 unmodified lines | |||
| 306 | uint8_t *vpd, csum; | 306 | uint8_t *vpd, csum; |
| 307 | const struct t4_vpd_hdr *v; | 307 | const struct t4_vpd_hdr *v; |
| 308 | /* To get around compilation warning from strstrip */ | 308 | /* To get around compilation warning from strstrip */ |
| 309 | char *s; | 309 | char __always_unused *s; |
| 310 | 310 | ||
| 311 | if (csio_is_valid_vpd(hw)) | 311 | if (csio_is_valid_vpd(hw)) |
| 312 | return 0; | 312 | return 0; |
| @@ -148,12 +148,11 @@ csio_t5_mc_read(struct csio_hw *hw, int idx, uint32_t addr, __be32 *data, · 147 unmodified lines | |||
| 148 | { | 148 | { |
| 149 | int i; | 149 | int i; |
| 150 | uint32_t mc_bist_cmd_reg, mc_bist_cmd_addr_reg, mc_bist_cmd_len_reg; | 150 | uint32_t mc_bist_cmd_reg, mc_bist_cmd_addr_reg, mc_bist_cmd_len_reg; |
| 151 | uint32_t mc_bist_status_rdata_reg, mc_bist_data_pattern_reg; | 151 | uint32_t mc_bist_data_pattern_reg; |
| 152 | 152 | ||
| 153 | mc_bist_cmd_reg = MC_REG(MC_P_BIST_CMD_A, idx); | 153 | mc_bist_cmd_reg = MC_REG(MC_P_BIST_CMD_A, idx); |
| 154 | mc_bist_cmd_addr_reg = MC_REG(MC_P_BIST_CMD_ADDR_A, idx); | 154 | mc_bist_cmd_addr_reg = MC_REG(MC_P_BIST_CMD_ADDR_A, idx); |
| 155 | mc_bist_cmd_len_reg = MC_REG(MC_P_BIST_CMD_LEN_A, idx); | 155 | mc_bist_cmd_len_reg = MC_REG(MC_P_BIST_CMD_LEN_A, idx); |
| 156 | mc_bist_status_rdata_reg = MC_REG(MC_P_BIST_STATUS_RDATA_A, idx); | ||
| 157 | mc_bist_data_pattern_reg = MC_REG(MC_P_BIST_DATA_PATTERN_A, idx); | 156 | mc_bist_data_pattern_reg = MC_REG(MC_P_BIST_DATA_PATTERN_A, idx); |
| 158 | 157 | ||
| 159 | if (csio_rd_reg32(hw, mc_bist_cmd_reg) & START_BIST_F) | 158 | if (csio_rd_reg32(hw, mc_bist_cmd_reg) & START_BIST_F) |
| @@ -196,7 +195,7 @@ csio_t5_edc_read(struct csio_hw *hw, int idx, uint32_t addr, __be32 *data, · 36 unmodified lines | |||
| 196 | { | 195 | { |
| 197 | int i; | 196 | int i; |
| 198 | uint32_t edc_bist_cmd_reg, edc_bist_cmd_addr_reg, edc_bist_cmd_len_reg; | 197 | uint32_t edc_bist_cmd_reg, edc_bist_cmd_addr_reg, edc_bist_cmd_len_reg; |
| 199 | uint32_t edc_bist_cmd_data_pattern, edc_bist_status_rdata_reg; | 198 | uint32_t edc_bist_cmd_data_pattern; |
| 200 | 199 | ||
| 201 | /* | 200 | /* |
| 202 | * These macro are missing in t4_regs.h file. | 201 | * These macro are missing in t4_regs.h file. |
| @@ -208,7 +207,6 @@ csio_t5_edc_read(struct csio_hw *hw, int idx, uint32_t addr, __be32 *data, · 5 unmodified lines | |||
| 208 | edc_bist_cmd_addr_reg = EDC_REG_T5(EDC_H_BIST_CMD_ADDR_A, idx); | 207 | edc_bist_cmd_addr_reg = EDC_REG_T5(EDC_H_BIST_CMD_ADDR_A, idx); |
| 209 | edc_bist_cmd_len_reg = EDC_REG_T5(EDC_H_BIST_CMD_LEN_A, idx); | 208 | edc_bist_cmd_len_reg = EDC_REG_T5(EDC_H_BIST_CMD_LEN_A, idx); |
| 210 | edc_bist_cmd_data_pattern = EDC_REG_T5(EDC_H_BIST_DATA_PATTERN_A, idx); | 209 | edc_bist_cmd_data_pattern = EDC_REG_T5(EDC_H_BIST_DATA_PATTERN_A, idx); |
| 211 | edc_bist_status_rdata_reg = EDC_REG_T5(EDC_H_BIST_STATUS_RDATA_A, idx); | ||
| 212 | #undef EDC_REG_T5 | 210 | #undef EDC_REG_T5 |
| 213 | #undef EDC_STRIDE_T5 | 211 | #undef EDC_STRIDE_T5 |
| 214 | 212 | ||
| @@ -582,7 +582,7 @@ csio_hw_free(struct csio_hw *hw) · 581 unmodified lines | |||
| 582 | * @hw: The HW module. | 582 | * @hw: The HW module. |
| 583 | * @dev: The device associated with this invocation. | 583 | * @dev: The device associated with this invocation. |
| 584 | * @probe: Called from probe context or not? | 584 | * @probe: Called from probe context or not? |
| 585 | * @os_pln: Parent lnode if any. | 585 | * @pln: Parent lnode if any. |
| 586 | * | 586 | * |
| 587 | * Allocates lnode structure via scsi_host_alloc, initializes | 587 | * Allocates lnode structure via scsi_host_alloc, initializes |
| 588 | * shost, initializes lnode module and registers with SCSI ML | 588 | * shost, initializes lnode module and registers with SCSI ML |
| @@ -2068,10 +2068,9 @@ csio_ln_exit(struct csio_lnode *ln) · 2067 unmodified lines | |||
| 2068 | ln->fcfinfo = NULL; | 2068 | ln->fcfinfo = NULL; |
| 2069 | } | 2069 | } |
| 2070 | 2070 | ||
| 2071 | /** | 2071 | /* |
| 2072 | * csio_lnode_init - Initialize the members of an lnode. | 2072 | * csio_lnode_init - Initialize the members of an lnode. |
| 2073 | * @ln: lnode | 2073 | * @ln: lnode |
| 2074 | * | ||
| 2075 | */ | 2074 | */ |
| 2076 | int | 2075 | int |
| 2077 | csio_lnode_init(struct csio_lnode *ln, struct csio_hw *hw, | 2076 | csio_lnode_init(struct csio_lnode *ln, struct csio_hw *hw, |
| @@ -862,7 +862,7 @@ csio_rnode_devloss_handler(struct csio_rnode *rn) · 861 unmodified lines | |||
| 862 | /** | 862 | /** |
| 863 | * csio_rnode_fwevt_handler - Event handler for firmware rnode events. | 863 | * csio_rnode_fwevt_handler - Event handler for firmware rnode events. |
| 864 | * @rn: rnode | 864 | * @rn: rnode |
| 865 | * | 865 | * @fwevt: firmware event to handle |
| 866 | */ | 866 | */ |
| 867 | void | 867 | void |
| 868 | csio_rnode_fwevt_handler(struct csio_rnode *rn, uint8_t fwevt) | 868 | csio_rnode_fwevt_handler(struct csio_rnode *rn, uint8_t fwevt) |
| @@ -361,7 +361,7 @@ static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb, · 360 unmodified lines | |||
| 361 | /* len includes the length of any HW ULP additions */ | 361 | /* len includes the length of any HW ULP additions */ |
| 362 | req->len = htonl(len); | 362 | req->len = htonl(len); |
| 363 | /* V_TX_ULP_SUBMODE sets both the mode and submode */ | 363 | /* V_TX_ULP_SUBMODE sets both the mode and submode */ |
| 364 | req->flags = htonl(V_TX_ULP_SUBMODE(cxgbi_skcb_ulp_mode(skb)) | | 364 | req->flags = htonl(V_TX_ULP_SUBMODE(cxgbi_skcb_tx_ulp_mode(skb)) | |
| 365 | V_TX_SHOVE((skb_peek(&csk->write_queue) ? 0 : 1))); | 365 | V_TX_SHOVE((skb_peek(&csk->write_queue) ? 0 : 1))); |
| 366 | req->sndseq = htonl(csk->snd_nxt); | 366 | req->sndseq = htonl(csk->snd_nxt); |
| 367 | req->param = htonl(V_TX_PORT(l2t->smt_idx)); | 367 | req->param = htonl(V_TX_PORT(l2t->smt_idx)); |
| @@ -375,10 +375,8 @@ static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb, · 7 unmodified lines | |||
| 375 | } | 375 | } |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | /** | 378 | /* |
| 379 | * push_tx_frames -- start transmit | 379 | * push_tx_frames -- start transmit |
| 380 | * @c3cn: the offloaded connection | ||
| 381 | * @req_completion: request wr_ack or not | ||
| 382 | * | 380 | * |
| 383 | * Prepends TX_DATA_WR or CPL_CLOSE_CON_REQ headers to buffers waiting in a | 381 | * Prepends TX_DATA_WR or CPL_CLOSE_CON_REQ headers to buffers waiting in a |
| 384 | * connection's send queue and sends them on to T3. Must be called with the | 382 | * connection's send queue and sends them on to T3. Must be called with the |
| @@ -442,7 +440,7 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion) · 57 unmodified lines | |||
| 442 | req_completion = 1; | 440 | req_completion = 1; |
| 443 | csk->wr_una_cred = 0; | 441 | csk->wr_una_cred = 0; |
| 444 | } | 442 | } |
| 445 | len += cxgbi_ulp_extra_len(cxgbi_skcb_ulp_mode(skb)); | 443 | len += cxgbi_ulp_extra_len(cxgbi_skcb_tx_ulp_mode(skb)); |
| 446 | make_tx_data_wr(csk, skb, len, req_completion); | 444 | make_tx_data_wr(csk, skb, len, req_completion); |
| 447 | csk->snd_nxt += len; | 445 | csk->snd_nxt += len; |
| 448 | cxgbi_skcb_clear_flag(skb, SKCBF_TX_NEED_HDR); | 446 | cxgbi_skcb_clear_flag(skb, SKCBF_TX_NEED_HDR); |
| @@ -886,11 +884,6 @@ free_cpl_skbs: · 437 unmodified lines | |||
| 886 | return -ENOMEM; | 884 | return -ENOMEM; |
| 887 | } | 885 | } |
| 888 | 886 | ||
| 889 | /** | ||
| 890 | * release_offload_resources - release offload resource | ||
| 891 | * @c3cn: the offloaded iscsi tcp connection. | ||
| 892 | * Release resources held by an offload connection (TID, L2T entry, etc.) | ||
| 893 | */ | ||
| 894 | static void l2t_put(struct cxgbi_sock *csk) | 887 | static void l2t_put(struct cxgbi_sock *csk) |
| 895 | { | 888 | { |
| 896 | struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev; | 889 | struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev; |
| @@ -902,6 +895,10 @@ static void l2t_put(struct cxgbi_sock *csk) · 5 unmodified lines | |||
| 902 | } | 895 | } |
| 903 | } | 896 | } |
| 904 | 897 | ||
| 898 | /* | ||
| 899 | * release_offload_resources - release offload resource | ||
| 900 | * Release resources held by an offload connection (TID, L2T entry, etc.) | ||
| 901 | */ | ||
| 905 | static void release_offload_resources(struct cxgbi_sock *csk) | 902 | static void release_offload_resources(struct cxgbi_sock *csk) |
| 906 | { | 903 | { |
| 907 | struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev; | 904 | struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev; |
| @@ -197,7 +197,10 @@ static inline bool is_ofld_imm(const struct sk_buff *skb) · 196 unmodified lines | |||
| 197 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR))) | 197 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR))) |
| 198 | len += sizeof(struct fw_ofld_tx_data_wr); | 198 | len += sizeof(struct fw_ofld_tx_data_wr); |
| 199 | 199 | ||
| 200 | return len <= MAX_IMM_TX_PKT_LEN; | 200 | if (likely(cxgbi_skcb_test_flag((struct sk_buff *)skb, SKCBF_TX_ISO))) |
| 201 | len += sizeof(struct cpl_tx_data_iso); | ||
| 202 | |||
| 203 | return (len <= MAX_IMM_OFLD_TX_DATA_WR_LEN); | ||
| 201 | } | 204 | } |
| 202 | 205 | ||
| 203 | static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, | 206 | static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, |
| @@ -641,7 +644,10 @@ static inline int send_tx_flowc_wr(struct cxgbi_sock *csk) · 437 unmodified lines | |||
| 641 | flowc->mnemval[8].mnemonic = 0; | 644 | flowc->mnemval[8].mnemonic = 0; |
| 642 | flowc->mnemval[8].val = 0; | 645 | flowc->mnemval[8].val = 0; |
| 643 | flowc->mnemval[8].mnemonic = FW_FLOWC_MNEM_TXDATAPLEN_MAX; | 646 | flowc->mnemval[8].mnemonic = FW_FLOWC_MNEM_TXDATAPLEN_MAX; |
| 644 | flowc->mnemval[8].val = 16384; | 647 | if (csk->cdev->skb_iso_txhdr) |
| 648 | flowc->mnemval[8].val = cpu_to_be32(CXGBI_MAX_ISO_DATA_IN_SKB); | ||
| 649 | else | ||
| 650 | flowc->mnemval[8].val = cpu_to_be32(16128); | ||
| 645 | #ifdef CONFIG_CHELSIO_T4_DCB | 651 | #ifdef CONFIG_CHELSIO_T4_DCB |
| 646 | flowc->mnemval[9].mnemonic = FW_FLOWC_MNEM_DCBPRIO; | 652 | flowc->mnemval[9].mnemonic = FW_FLOWC_MNEM_DCBPRIO; |
| 647 | if (vlan == CPL_L2T_VLAN_NONE) { | 653 | if (vlan == CPL_L2T_VLAN_NONE) { |
| @@ -667,38 +673,86 @@ static inline int send_tx_flowc_wr(struct cxgbi_sock *csk) · 19 unmodified lines | |||
| 667 | return flowclen16; | 673 | return flowclen16; |
| 668 | } | 674 | } |
| 669 | 675 | ||
| 670 | static inline void make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb, | 676 | static void |
| 671 | int dlen, int len, u32 credits, int compl) | 677 | cxgb4i_make_tx_iso_cpl(struct sk_buff *skb, struct cpl_tx_data_iso *cpl) |
| 678 | { | ||
| 679 | struct cxgbi_iso_info *info = (struct cxgbi_iso_info *)skb->head; | ||
| 680 | u32 imm_en = !!(info->flags & CXGBI_ISO_INFO_IMM_ENABLE); | ||
| 681 | u32 fslice = !!(info->flags & CXGBI_ISO_INFO_FSLICE); | ||
| 682 | u32 lslice = !!(info->flags & CXGBI_ISO_INFO_LSLICE); | ||
| 683 | u32 pdu_type = (info->op == ISCSI_OP_SCSI_CMD) ? 0 : 1; | ||
| 684 | u32 submode = cxgbi_skcb_tx_ulp_mode(skb) & 0x3; | ||
| 685 | |||
| 686 | cpl->op_to_scsi = cpu_to_be32(CPL_TX_DATA_ISO_OP_V(CPL_TX_DATA_ISO) | | ||
| 687 | CPL_TX_DATA_ISO_FIRST_V(fslice) | | ||
| 688 | CPL_TX_DATA_ISO_LAST_V(lslice) | | ||
| 689 | CPL_TX_DATA_ISO_CPLHDRLEN_V(0) | | ||
| 690 | CPL_TX_DATA_ISO_HDRCRC_V(submode & 1) | | ||
| 691 | CPL_TX_DATA_ISO_PLDCRC_V(((submode >> 1) & 1)) | | ||
| 692 | CPL_TX_DATA_ISO_IMMEDIATE_V(imm_en) | | ||
| 693 | CPL_TX_DATA_ISO_SCSI_V(pdu_type)); | ||
| 694 | |||
| 695 | cpl->ahs_len = info->ahs; | ||
| 696 | cpl->mpdu = cpu_to_be16(DIV_ROUND_UP(info->mpdu, 4)); | ||
| 697 | cpl->burst_size = cpu_to_be32(info->burst_size); | ||
| 698 | cpl->len = cpu_to_be32(info->len); | ||
| 699 | cpl->reserved2_seglen_offset = | ||
| 700 | cpu_to_be32(CPL_TX_DATA_ISO_SEGLEN_OFFSET_V(info->segment_offset)); | ||
| 701 | cpl->datasn_offset = cpu_to_be32(info->datasn_offset); | ||
| 702 | cpl->buffer_offset = cpu_to_be32(info->buffer_offset); | ||
| 703 | cpl->reserved3 = cpu_to_be32(0); | ||
| 704 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | ||
| 705 | "iso: flags 0x%x, op %u, ahs %u, num_pdu %u, mpdu %u, " | ||
| 706 | "burst_size %u, iso_len %u\n", | ||
| 707 | info->flags, info->op, info->ahs, info->num_pdu, | ||
| 708 | info->mpdu, info->burst_size << 2, info->len); | ||
| 709 | } | ||
| 710 | |||
| 711 | static void | ||
| 712 | cxgb4i_make_tx_data_wr(struct cxgbi_sock *csk, struct sk_buff *skb, int dlen, | ||
| 713 | int len, u32 credits, int compl) | ||
| 672 | { | 714 | { |
| 715 | struct cxgbi_device *cdev = csk->cdev; | ||
| 716 | struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); | ||
| 673 | struct fw_ofld_tx_data_wr *req; | 717 | struct fw_ofld_tx_data_wr *req; |
| 674 | unsigned int submode = cxgbi_skcb_ulp_mode(skb) & 3; | 718 | struct cpl_tx_data_iso *cpl; |
| 675 | unsigned int wr_ulp_mode = 0, val; | 719 | u32 submode = cxgbi_skcb_tx_ulp_mode(skb) & 0x3; |
| 676 | bool imm = is_ofld_imm(skb); | 720 | u32 wr_ulp_mode = 0; |
| 677 | 721 | u32 hdr_size = sizeof(*req); | |
| 678 | req = __skb_push(skb, sizeof(*req)); | 722 | u32 opcode = FW_OFLD_TX_DATA_WR; |
| 679 | 723 | u32 immlen = 0; | |
| 680 | if (imm) { | 724 | u32 force = is_t5(lldi->adapter_type) ? TX_FORCE_V(!submode) : |
| 681 | req->op_to_immdlen = htonl(FW_WR_OP_V(FW_OFLD_TX_DATA_WR) | | 725 | T6_TX_FORCE_F; |
| 682 | FW_WR_COMPL_F | | 726 | |
| 683 | FW_WR_IMMDLEN_V(dlen)); | 727 | if (cxgbi_skcb_test_flag(skb, SKCBF_TX_ISO)) { |
| 684 | req->flowid_len16 = htonl(FW_WR_FLOWID_V(csk->tid) | | 728 | hdr_size += sizeof(struct cpl_tx_data_iso); |
| 685 | FW_WR_LEN16_V(credits)); | 729 | opcode = FW_ISCSI_TX_DATA_WR; |
| 686 | } else { | 730 | immlen += sizeof(struct cpl_tx_data_iso); |
| 687 | req->op_to_immdlen = | 731 | submode |= 8; |
| 688 | cpu_to_be32(FW_WR_OP_V(FW_OFLD_TX_DATA_WR) | | ||
| 689 | FW_WR_COMPL_F | | ||
| 690 | FW_WR_IMMDLEN_V(0)); | ||
| 691 | req->flowid_len16 = | ||
| 692 | cpu_to_be32(FW_WR_FLOWID_V(csk->tid) | | ||
| 693 | FW_WR_LEN16_V(credits)); | ||
| 694 | } | 732 | } |
| 733 | |||
| 734 | if (is_ofld_imm(skb)) | ||
| 735 | immlen += dlen; | ||
| 736 | |||
| 737 | req = (struct fw_ofld_tx_data_wr *)__skb_push(skb, hdr_size); | ||
| 738 | req->op_to_immdlen = cpu_to_be32(FW_WR_OP_V(opcode) | | ||
| 739 | FW_WR_COMPL_V(compl) | | ||
| 740 | FW_WR_IMMDLEN_V(immlen)); | ||
| 741 | req->flowid_len16 = cpu_to_be32(FW_WR_FLOWID_V(csk->tid) | | ||
| 742 | FW_WR_LEN16_V(credits)); | ||
| 743 | req->plen = cpu_to_be32(len); | ||
| 744 | cpl = (struct cpl_tx_data_iso *)(req + 1); | ||
| 745 | |||
| 746 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_ISO))) | ||
| 747 | cxgb4i_make_tx_iso_cpl(skb, cpl); | ||
| 748 | |||
| 695 | if (submode) | 749 | if (submode) |
| 696 | wr_ulp_mode = FW_OFLD_TX_DATA_WR_ULPMODE_V(ULP2_MODE_ISCSI) | | 750 | wr_ulp_mode = FW_OFLD_TX_DATA_WR_ULPMODE_V(ULP2_MODE_ISCSI) | |
| 697 | FW_OFLD_TX_DATA_WR_ULPSUBMODE_V(submode); | 751 | FW_OFLD_TX_DATA_WR_ULPSUBMODE_V(submode); |
| 698 | val = skb_peek(&csk->write_queue) ? 0 : 1; | 752 | |
| 699 | req->tunnel_to_proxy = htonl(wr_ulp_mode | | 753 | req->tunnel_to_proxy = cpu_to_be32(wr_ulp_mode | force | |
| 700 | FW_OFLD_TX_DATA_WR_SHOVE_V(val)); | 754 | FW_OFLD_TX_DATA_WR_SHOVE_V(1U)); |
| 701 | req->plen = htonl(len); | 755 | |
| 702 | if (!cxgbi_sock_flag(csk, CTPF_TX_DATA_SENT)) | 756 | if (!cxgbi_sock_flag(csk, CTPF_TX_DATA_SENT)) |
| 703 | cxgbi_sock_set_flag(csk, CTPF_TX_DATA_SENT); | 757 | cxgbi_sock_set_flag(csk, CTPF_TX_DATA_SENT); |
| 704 | } | 758 | } |
| @@ -716,30 +770,34 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion) · 11 unmodified lines | |||
| 716 | if (unlikely(csk->state < CTP_ESTABLISHED || | 770 | if (unlikely(csk->state < CTP_ESTABLISHED || |
| 717 | csk->state == CTP_CLOSE_WAIT_1 || csk->state >= CTP_ABORTING)) { | 771 | csk->state == CTP_CLOSE_WAIT_1 || csk->state >= CTP_ABORTING)) { |
| 718 | log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK | | 772 | log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK | |
| 719 | 1 << CXGBI_DBG_PDU_TX, | 773 | 1 << CXGBI_DBG_PDU_TX, |
| 720 | "csk 0x%p,%u,0x%lx,%u, in closing state.\n", | 774 | "csk 0x%p,%u,0x%lx,%u, in closing state.\n", |
| 721 | csk, csk->state, csk->flags, csk->tid); | 775 | csk, csk->state, csk->flags, csk->tid); |
| 722 | return 0; | 776 | return 0; |
| 723 | } | 777 | } |
| 724 | 778 | ||
| 725 | while (csk->wr_cred && (skb = skb_peek(&csk->write_queue)) != NULL) { | 779 | while (csk->wr_cred && ((skb = skb_peek(&csk->write_queue)) != NULL)) { |
| 726 | int dlen = skb->len; | 780 | struct cxgbi_iso_info *iso_cpl; |
| 727 | int len = skb->len; | 781 | u32 dlen = skb->len; |
| 728 | unsigned int credits_needed; | 782 | u32 len = skb->len; |
| 729 | int flowclen16 = 0; | 783 | u32 iso_cpl_len = 0; |
| 784 | u32 flowclen16 = 0; | ||
| 785 | u32 credits_needed; | ||
| 786 | u32 num_pdu = 1, hdr_len; | ||
| 787 | |||
| 788 | if (cxgbi_skcb_test_flag(skb, SKCBF_TX_ISO)) | ||
| 789 | iso_cpl_len = sizeof(struct cpl_tx_data_iso); | ||
| 730 | 790 | ||
| 731 | skb_reset_transport_header(skb); | ||
| 732 | if (is_ofld_imm(skb)) | 791 | if (is_ofld_imm(skb)) |
| 733 | credits_needed = DIV_ROUND_UP(dlen, 16); | 792 | credits_needed = DIV_ROUND_UP(dlen + iso_cpl_len, 16); |
| 734 | else | 793 | else |
| 735 | credits_needed = DIV_ROUND_UP( | 794 | credits_needed = |
| 736 | 8 * calc_tx_flits_ofld(skb), | 795 | DIV_ROUND_UP((8 * calc_tx_flits_ofld(skb)) + |
| 737 | 16); | 796 | iso_cpl_len, 16); |
| 738 | 797 | ||
| 739 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR))) | 798 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR))) |
| 740 | credits_needed += DIV_ROUND_UP( | 799 | credits_needed += |
| 741 | sizeof(struct fw_ofld_tx_data_wr), | 800 | DIV_ROUND_UP(sizeof(struct fw_ofld_tx_data_wr), 16); |
| 742 | 16); | ||
| 743 | 801 | ||
| 744 | /* | 802 | /* |
| 745 | * Assumes the initial credits is large enough to support | 803 | * Assumes the initial credits is large enough to support |
| @@ -754,14 +812,19 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion) · 8 unmodified lines | |||
| 754 | 812 | ||
| 755 | if (csk->wr_cred < credits_needed) { | 813 | if (csk->wr_cred < credits_needed) { |
| 756 | log_debug(1 << CXGBI_DBG_PDU_TX, | 814 | log_debug(1 << CXGBI_DBG_PDU_TX, |
| 757 | "csk 0x%p, skb %u/%u, wr %d < %u.\n", | 815 | "csk 0x%p, skb %u/%u, wr %d < %u.\n", |
| 758 | csk, skb->len, skb->data_len, | 816 | csk, skb->len, skb->data_len, |
| 759 | credits_needed, csk->wr_cred); | 817 | credits_needed, csk->wr_cred); |
| 818 | |||
| 819 | csk->no_tx_credits++; | ||
| 760 | break; | 820 | break; |
| 761 | } | 821 | } |
| 822 | |||
| 823 | csk->no_tx_credits = 0; | ||
| 824 | |||
| 762 | __skb_unlink(skb, &csk->write_queue); | 825 | __skb_unlink(skb, &csk->write_queue); |
| 763 | set_wr_txq(skb, CPL_PRIORITY_DATA, csk->port_id); | 826 | set_wr_txq(skb, CPL_PRIORITY_DATA, csk->port_id); |
| 764 | skb->csum = credits_needed + flowclen16; | 827 | skb->csum = (__force __wsum)(credits_needed + flowclen16); |
| 765 | csk->wr_cred -= credits_needed; | 828 | csk->wr_cred -= credits_needed; |
| 766 | csk->wr_una_cred += credits_needed; | 829 | csk->wr_una_cred += credits_needed; |
| 767 | cxgbi_sock_enqueue_wr(csk, skb); | 830 | cxgbi_sock_enqueue_wr(csk, skb); |
| @@ -771,25 +834,42 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion) · 3 unmodified lines | |||
| 771 | csk, skb->len, skb->data_len, credits_needed, | 834 | csk, skb->len, skb->data_len, credits_needed, |
| 772 | csk->wr_cred, csk->wr_una_cred); | 835 | csk->wr_cred, csk->wr_una_cred); |
| 773 | 836 | ||
| 837 | if (!req_completion && | ||
| 838 | ((csk->wr_una_cred >= (csk->wr_max_cred / 2)) || | ||
| 839 | after(csk->write_seq, (csk->snd_una + csk->snd_win / 2)))) | ||
| 840 | req_completion = 1; | ||
| 841 | |||
| 774 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR))) { | 842 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_NEED_HDR))) { |
| 775 | len += cxgbi_ulp_extra_len(cxgbi_skcb_ulp_mode(skb)); | 843 | u32 ulp_mode = cxgbi_skcb_tx_ulp_mode(skb); |
| 776 | make_tx_data_wr(csk, skb, dlen, len, credits_needed, | 844 | |
| 777 | req_completion); | 845 | if (cxgbi_skcb_test_flag(skb, SKCBF_TX_ISO)) { |
| 846 | iso_cpl = (struct cxgbi_iso_info *)skb->head; | ||
| 847 | num_pdu = iso_cpl->num_pdu; | ||
| 848 | hdr_len = cxgbi_skcb_tx_iscsi_hdrlen(skb); | ||
| 849 | len += (cxgbi_ulp_extra_len(ulp_mode) * num_pdu) + | ||
| 850 | (hdr_len * (num_pdu - 1)); | ||
| 851 | } else { | ||
| 852 | len += cxgbi_ulp_extra_len(ulp_mode); | ||
| 853 | } | ||
| 854 | |||
| 855 | cxgb4i_make_tx_data_wr(csk, skb, dlen, len, | ||
| 856 | credits_needed, req_completion); | ||
| 778 | csk->snd_nxt += len; | 857 | csk->snd_nxt += len; |
| 779 | cxgbi_skcb_clear_flag(skb, SKCBF_TX_NEED_HDR); | 858 | cxgbi_skcb_clear_flag(skb, SKCBF_TX_NEED_HDR); |
| 780 | } else if (cxgbi_skcb_test_flag(skb, SKCBF_TX_FLAG_COMPL) && | 859 | } else if (cxgbi_skcb_test_flag(skb, SKCBF_TX_FLAG_COMPL) && |
| 781 | (csk->wr_una_cred >= (csk->wr_max_cred / 2))) { | 860 | (csk->wr_una_cred >= (csk->wr_max_cred / 2))) { |
| 782 | struct cpl_close_con_req *req = | 861 | struct cpl_close_con_req *req = |
| 783 | (struct cpl_close_con_req *)skb->data; | 862 | (struct cpl_close_con_req *)skb->data; |
| 784 | req->wr.wr_hi |= htonl(FW_WR_COMPL_F); | 863 | |
| 864 | req->wr.wr_hi |= cpu_to_be32(FW_WR_COMPL_F); | ||
| 785 | } | 865 | } |
| 866 | |||
| 786 | total_size += skb->truesize; | 867 | total_size += skb->truesize; |
| 787 | t4_set_arp_err_handler(skb, csk, arp_failure_skb_discard); | 868 | t4_set_arp_err_handler(skb, csk, arp_failure_skb_discard); |
| 788 | 869 | ||
| 789 | log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_PDU_TX, | 870 | log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_PDU_TX, |
| 790 | "csk 0x%p,%u,0x%lx,%u, skb 0x%p, %u.\n", | 871 | "csk 0x%p,%u,0x%lx,%u, skb 0x%p, %u.\n", |
| 791 | csk, csk->state, csk->flags, csk->tid, skb, len); | 872 | csk, csk->state, csk->flags, csk->tid, skb, len); |
| 792 | |||
| 793 | cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); | 873 | cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); |
| 794 | } | 874 | } |
| 795 | return total_size; | 875 | return total_size; |
| @@ -2111,10 +2191,30 @@ static int cxgb4i_ddp_init(struct cxgbi_device *cdev) · 1315 unmodified lines | |||
| 2111 | return 0; | 2191 | return 0; |
| 2112 | } | 2192 | } |
| 2113 | 2193 | ||
| 2194 | static bool is_memfree(struct adapter *adap) | ||
| 2195 | { | ||
| 2196 | u32 io; | ||
| 2197 | |||
| 2198 | io = t4_read_reg(adap, MA_TARGET_MEM_ENABLE_A); | ||
| 2199 | if (is_t5(adap->params.chip)) { | ||
| 2200 | if ((io & EXT_MEM0_ENABLE_F) || (io & EXT_MEM1_ENABLE_F)) | ||
| 2201 | return false; | ||
| 2202 | } else if (io & EXT_MEM_ENABLE_F) { | ||
| 2203 | return false; | ||
| 2204 | } | ||
| 2205 | |||
| 2206 | return true; | ||
| 2207 | } | ||
| 2208 | |||
| 2114 | static void *t4_uld_add(const struct cxgb4_lld_info *lldi) | 2209 | static void *t4_uld_add(const struct cxgb4_lld_info *lldi) |
| 2115 | { | 2210 | { |
| 2116 | struct cxgbi_device *cdev; | 2211 | struct cxgbi_device *cdev; |
| 2117 | struct port_info *pi; | 2212 | struct port_info *pi; |
| 2213 | struct net_device *ndev; | ||
| 2214 | struct adapter *adap; | ||
| 2215 | struct tid_info *t; | ||
| 2216 | u32 max_cmds = CXGB4I_SCSI_HOST_QDEPTH; | ||
| 2217 | u32 max_conn = CXGBI_MAX_CONN; | ||
| 2118 | int i, rc; | 2218 | int i, rc; |
| 2119 | 2219 | ||
| 2120 | cdev = cxgbi_device_register(sizeof(*lldi), lldi->nports); | 2220 | cdev = cxgbi_device_register(sizeof(*lldi), lldi->nports); |
| @@ -2154,14 +2254,40 @@ static void *t4_uld_add(const struct cxgb4_lld_info *lldi) · 33 unmodified lines | |||
| 2154 | pr_info("t4 0x%p ddp init failed %d.\n", cdev, rc); | 2254 | pr_info("t4 0x%p ddp init failed %d.\n", cdev, rc); |
| 2155 | goto err_out; | 2255 | goto err_out; |
| 2156 | } | 2256 | } |
| 2257 | |||
| 2258 | ndev = cdev->ports[0]; | ||
| 2259 | adap = netdev2adap(ndev); | ||
| 2260 | if (adap) { | ||
| 2261 | t = &adap->tids; | ||
| 2262 | if (t->ntids <= CXGBI_MAX_CONN) | ||
| 2263 | max_conn = t->ntids; | ||
| 2264 | |||
| 2265 | if (is_memfree(adap)) { | ||
| 2266 | cdev->flags |= CXGBI_FLAG_DEV_ISO_OFF; | ||
| 2267 | max_cmds = CXGB4I_SCSI_HOST_QDEPTH >> 2; | ||
| 2268 | |||
| 2269 | pr_info("%s: 0x%p, tid %u, SO adapter.\n", | ||
| 2270 | ndev->name, cdev, t->ntids); | ||
| 2271 | } | ||
| 2272 | } else { | ||
| 2273 | pr_info("%s, 0x%p, NO adapter struct.\n", ndev->name, cdev); | ||
| 2274 | } | ||
| 2275 | |||
| 2276 | /* ISO is enabled in T5/T6 firmware version >= 1.13.43.0 */ | ||
| 2277 | if (!is_t4(lldi->adapter_type) && | ||
| 2278 | (lldi->fw_vers >= 0x10d2b00) && | ||
| 2279 | !(cdev->flags & CXGBI_FLAG_DEV_ISO_OFF)) | ||
| 2280 | cdev->skb_iso_txhdr = sizeof(struct cpl_tx_data_iso); | ||
| 2281 | |||
| 2157 | rc = cxgb4i_ofld_init(cdev); | 2282 | rc = cxgb4i_ofld_init(cdev); |
| 2158 | if (rc) { | 2283 | if (rc) { |
| 2159 | pr_info("t4 0x%p ofld init failed.\n", cdev); | 2284 | pr_info("t4 0x%p ofld init failed.\n", cdev); |
| 2160 | goto err_out; | 2285 | goto err_out; |
| 2161 | } | 2286 | } |
| 2162 | 2287 | ||
| 2163 | rc = cxgbi_hbas_add(cdev, CXGB4I_MAX_LUN, CXGBI_MAX_CONN, | 2288 | cxgb4i_host_template.can_queue = max_cmds; |
| 2164 | &cxgb4i_host_template, cxgb4i_stt); | 2289 | rc = cxgbi_hbas_add(cdev, CXGB4I_MAX_LUN, max_conn, |
| 2290 | &cxgb4i_host_template, cxgb4i_stt); | ||
| 2165 | if (rc) | 2291 | if (rc) |
| 2166 | goto err_out; | 2292 | goto err_out; |
| 2167 | 2293 | ||
| @@ -359,13 +359,15 @@ int cxgbi_hbas_add(struct cxgbi_device *cdev, u64 max_lun, · 358 unmodified lines | |||
| 359 | shost->max_lun = max_lun; | 359 | shost->max_lun = max_lun; |
| 360 | shost->max_id = max_id; | 360 | shost->max_id = max_id; |
| 361 | shost->max_channel = 0; | 361 | shost->max_channel = 0; |
| 362 | shost->max_cmd_len = 16; | 362 | shost->max_cmd_len = SCSI_MAX_VARLEN_CDB_SIZE; |
| 363 | 363 | ||
| 364 | chba = iscsi_host_priv(shost); | 364 | chba = iscsi_host_priv(shost); |
| 365 | chba->cdev = cdev; | 365 | chba->cdev = cdev; |
| 366 | chba->ndev = cdev->ports[i]; | 366 | chba->ndev = cdev->ports[i]; |
| 367 | chba->shost = shost; | 367 | chba->shost = shost; |
| 368 | 368 | ||
| 369 | shost->can_queue = sht->can_queue - ISCSI_MGMT_CMDS_MAX; | ||
| 370 | |||
| 369 | log_debug(1 << CXGBI_DBG_DEV, | 371 | log_debug(1 << CXGBI_DBG_DEV, |
| 370 | "cdev 0x%p, p#%d %s: chba 0x%p.\n", | 372 | "cdev 0x%p, p#%d %s: chba 0x%p.\n", |
| 371 | cdev, i, cdev->ports[i]->name, chba); | 373 | cdev, i, cdev->ports[i]->name, chba); |
| @@ -1136,82 +1138,6 @@ void cxgbi_sock_check_wr_invariants(const struct cxgbi_sock *csk) · 764 unmodified lines | |||
| 1136 | } | 1138 | } |
| 1137 | EXPORT_SYMBOL_GPL(cxgbi_sock_check_wr_invariants); | 1139 | EXPORT_SYMBOL_GPL(cxgbi_sock_check_wr_invariants); |
| 1138 | 1140 | ||
| 1139 | static int cxgbi_sock_send_pdus(struct cxgbi_sock *csk, struct sk_buff *skb) | ||
| 1140 | { | ||
| 1141 | struct cxgbi_device *cdev = csk->cdev; | ||
| 1142 | struct sk_buff *next; | ||
| 1143 | int err, copied = 0; | ||
| 1144 | |||
| 1145 | spin_lock_bh(&csk->lock); | ||
| 1146 | |||
| 1147 | if (csk->state != CTP_ESTABLISHED) { | ||
| 1148 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 1149 | "csk 0x%p,%u,0x%lx,%u, EAGAIN.\n", | ||
| 1150 | csk, csk->state, csk->flags, csk->tid); | ||
| 1151 | err = -EAGAIN; | ||
| 1152 | goto out_err; | ||
| 1153 | } | ||
| 1154 | |||
| 1155 | if (csk->err) { | ||
| 1156 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 1157 | "csk 0x%p,%u,0x%lx,%u, EPIPE %d.\n", | ||
| 1158 | csk, csk->state, csk->flags, csk->tid, csk->err); | ||
| 1159 | err = -EPIPE; | ||
| 1160 | goto out_err; | ||
| 1161 | } | ||
| 1162 | |||
| 1163 | if (csk->write_seq - csk->snd_una >= csk->snd_win) { | ||
| 1164 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 1165 | "csk 0x%p,%u,0x%lx,%u, FULL %u-%u >= %u.\n", | ||
| 1166 | csk, csk->state, csk->flags, csk->tid, csk->write_seq, | ||
| 1167 | csk->snd_una, csk->snd_win); | ||
| 1168 | err = -ENOBUFS; | ||
| 1169 | goto out_err; | ||
| 1170 | } | ||
| 1171 | |||
| 1172 | while (skb) { | ||
| 1173 | int frags = skb_shinfo(skb)->nr_frags + | ||
| 1174 | (skb->len != skb->data_len); | ||
| 1175 | |||
| 1176 | if (unlikely(skb_headroom(skb) < cdev->skb_tx_rsvd)) { | ||
| 1177 | pr_err("csk 0x%p, skb head %u < %u.\n", | ||
| 1178 | csk, skb_headroom(skb), cdev->skb_tx_rsvd); | ||
| 1179 | err = -EINVAL; | ||
| 1180 | goto out_err; | ||
| 1181 | } | ||
| 1182 | |||
| 1183 | if (frags >= SKB_WR_LIST_SIZE) { | ||
| 1184 | pr_err("csk 0x%p, frags %d, %u,%u >%u.\n", | ||
| 1185 | csk, skb_shinfo(skb)->nr_frags, skb->len, | ||
| 1186 | skb->data_len, (uint)(SKB_WR_LIST_SIZE)); | ||
| 1187 | err = -EINVAL; | ||
| 1188 | goto out_err; | ||
| 1189 | } | ||
| 1190 | |||
| 1191 | next = skb->next; | ||
| 1192 | skb->next = NULL; | ||
| 1193 | cxgbi_skcb_set_flag(skb, SKCBF_TX_NEED_HDR); | ||
| 1194 | cxgbi_sock_skb_entail(csk, skb); | ||
| 1195 | copied += skb->len; | ||
| 1196 | csk->write_seq += skb->len + | ||
| 1197 | cxgbi_ulp_extra_len(cxgbi_skcb_ulp_mode(skb)); | ||
| 1198 | skb = next; | ||
| 1199 | } | ||
| 1200 | |||
| 1201 | if (likely(skb_queue_len(&csk->write_queue))) | ||
| 1202 | cdev->csk_push_tx_frames(csk, 1); | ||
| 1203 | done: | ||
| 1204 | spin_unlock_bh(&csk->lock); | ||
| 1205 | return copied; | ||
| 1206 | |||
| 1207 | out_err: | ||
| 1208 | if (copied == 0 && err == -EPIPE) | ||
| 1209 | copied = csk->err ? csk->err : -EPIPE; | ||
| 1210 | else | ||
| 1211 | copied = err; | ||
| 1212 | goto done; | ||
| 1213 | } | ||
| 1214 | |||
| 1215 | static inline void | 1141 | static inline void |
| 1216 | scmd_get_params(struct scsi_cmnd *sc, struct scatterlist **sgl, | 1142 | scmd_get_params(struct scsi_cmnd *sc, struct scatterlist **sgl, |
| 1217 | unsigned int *sgcnt, unsigned int *dlen, | 1143 | unsigned int *sgcnt, unsigned int *dlen, |
| @@ -1284,8 +1210,6 @@ EXPORT_SYMBOL_GPL(cxgbi_ddp_set_one_ppod); · 66 unmodified lines | |||
| 1284 | * APIs interacting with open-iscsi libraries | 1210 | * APIs interacting with open-iscsi libraries |
| 1285 | */ | 1211 | */ |
| 1286 | 1212 | ||
| 1287 | static unsigned char padding[4]; | ||
| 1288 | |||
| 1289 | int cxgbi_ddp_ppm_setup(void **ppm_pp, struct cxgbi_device *cdev, | 1213 | int cxgbi_ddp_ppm_setup(void **ppm_pp, struct cxgbi_device *cdev, |
| 1290 | struct cxgbi_tag_format *tformat, | 1214 | struct cxgbi_tag_format *tformat, |
| 1291 | unsigned int iscsi_size, unsigned int llimit, | 1215 | unsigned int iscsi_size, unsigned int llimit, |
| @@ -1833,9 +1757,10 @@ static int sgl_seek_offset(struct scatterlist *sgl, unsigned int sgcnt, · 541 unmodified lines | |||
| 1833 | return -EFAULT; | 1757 | return -EFAULT; |
| 1834 | } | 1758 | } |
| 1835 | 1759 | ||
| 1836 | static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, | 1760 | static int |
| 1837 | unsigned int dlen, struct page_frag *frags, | 1761 | sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, |
| 1838 | int frag_max) | 1762 | unsigned int dlen, struct page_frag *frags, |
| 1763 | int frag_max, u32 *dlimit) | ||
| 1839 | { | 1764 | { |
| 1840 | unsigned int datalen = dlen; | 1765 | unsigned int datalen = dlen; |
| 1841 | unsigned int sglen = sg->length - sgoffset; | 1766 | unsigned int sglen = sg->length - sgoffset; |
| @@ -1867,6 +1792,7 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, · 25 unmodified lines | |||
| 1867 | if (i >= frag_max) { | 1792 | if (i >= frag_max) { |
| 1868 | pr_warn("too many pages %u, dlen %u.\n", | 1793 | pr_warn("too many pages %u, dlen %u.\n", |
| 1869 | frag_max, dlen); | 1794 | frag_max, dlen); |
| 1795 | *dlimit = dlen - datalen; | ||
| 1870 | return -EINVAL; | 1796 | return -EINVAL; |
| 1871 | } | 1797 | } |
| 1872 | 1798 | ||
| @@ -1883,38 +1809,220 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, · 10 unmodified lines | |||
| 1883 | return i; | 1809 | return i; |
| 1884 | } | 1810 | } |
| 1885 | 1811 | ||
| 1886 | int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 opcode) | 1812 | static void cxgbi_task_data_sgl_check(struct iscsi_task *task) |
| 1887 | { | 1813 | { |
| 1888 | struct iscsi_tcp_conn *tcp_conn = task->conn->dd_data; | 1814 | struct scsi_cmnd *sc = task->sc; |
| 1815 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); | ||
| 1816 | struct scatterlist *sg, *sgl = NULL; | ||
| 1817 | u32 sgcnt = 0; | ||
| 1818 | int i; | ||
| 1819 | |||
| 1820 | tdata->flags = CXGBI_TASK_SGL_CHECKED; | ||
| 1821 | if (!sc) | ||
| 1822 | return; | ||
| 1823 | |||
| 1824 | scmd_get_params(sc, &sgl, &sgcnt, &tdata->dlen, 0); | ||
| 1825 | if (!sgl || !sgcnt) { | ||
| 1826 | tdata->flags |= CXGBI_TASK_SGL_COPY; | ||
| 1827 | return; | ||
| 1828 | } | ||
| 1829 | |||
| 1830 | for_each_sg(sgl, sg, sgcnt, i) { | ||
| 1831 | if (page_count(sg_page(sg)) < 1) { | ||
| 1832 | tdata->flags |= CXGBI_TASK_SGL_COPY; | ||
| 1833 | return; | ||
| 1834 | } | ||
| 1835 | } | ||
| 1836 | } | ||
| 1837 | |||
| 1838 | static int | ||
| 1839 | cxgbi_task_data_sgl_read(struct iscsi_task *task, u32 offset, u32 count, | ||
| 1840 | u32 *dlimit) | ||
| 1841 | { | ||
| 1842 | struct scsi_cmnd *sc = task->sc; | ||
| 1843 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); | ||
| 1844 | struct scatterlist *sgl = NULL; | ||
| 1845 | struct scatterlist *sg; | ||
| 1846 | u32 dlen = 0; | ||
| 1847 | u32 sgcnt; | ||
| 1848 | int err; | ||
| 1849 | |||
| 1850 | if (!sc) | ||
| 1851 | return 0; | ||
| 1852 | |||
| 1853 | scmd_get_params(sc, &sgl, &sgcnt, &dlen, 0); | ||
| 1854 | if (!sgl || !sgcnt) | ||
| 1855 | return 0; | ||
| 1856 | |||
| 1857 | err = sgl_seek_offset(sgl, sgcnt, offset, &tdata->sgoffset, &sg); | ||
| 1858 | if (err < 0) { | ||
| 1859 | pr_warn("tpdu max, sgl %u, bad offset %u/%u.\n", | ||
| 1860 | sgcnt, offset, tdata->dlen); | ||
| 1861 | return err; | ||
| 1862 | } | ||
| 1863 | err = sgl_read_to_frags(sg, tdata->sgoffset, count, | ||
| 1864 | tdata->frags, MAX_SKB_FRAGS, dlimit); | ||
| 1865 | if (err < 0) { | ||
| 1866 | log_debug(1 << CXGBI_DBG_ISCSI, | ||
| 1867 | "sgl max limit, sgl %u, offset %u, %u/%u, dlimit %u.\n", | ||
| 1868 | sgcnt, offset, count, tdata->dlen, *dlimit); | ||
| 1869 | return err; | ||
| 1870 | } | ||
| 1871 | tdata->offset = offset; | ||
| 1872 | tdata->count = count; | ||
| 1873 | tdata->nr_frags = err; | ||
| 1874 | tdata->total_count = count; | ||
| 1875 | tdata->total_offset = offset; | ||
| 1876 | |||
| 1877 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | ||
| 1878 | "%s: offset %u, count %u,\n" | ||
| 1879 | "err %u, total_count %u, total_offset %u\n", | ||
| 1880 | __func__, offset, count, err, tdata->total_count, tdata->total_offset); | ||
| 1881 | |||
| 1882 | return 0; | ||
| 1883 | } | ||
| 1884 | |||
| 1885 | int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 op) | ||
| 1886 | { | ||
| 1887 | struct iscsi_conn *conn = task->conn; | ||
| 1888 | struct iscsi_session *session = task->conn->session; | ||
| 1889 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; | ||
| 1889 | struct cxgbi_conn *cconn = tcp_conn->dd_data; | 1890 | struct cxgbi_conn *cconn = tcp_conn->dd_data; |
| 1890 | struct cxgbi_device *cdev = cconn->chba->cdev; | 1891 | struct cxgbi_device *cdev = cconn->chba->cdev; |
| 1891 | struct iscsi_conn *conn = task->conn; | 1892 | struct cxgbi_sock *csk = cconn->cep ? cconn->cep->csk : NULL; |
| 1892 | struct iscsi_tcp_task *tcp_task = task->dd_data; | 1893 | struct iscsi_tcp_task *tcp_task = task->dd_data; |
| 1893 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); | 1894 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); |
| 1894 | struct scsi_cmnd *sc = task->sc; | 1895 | struct scsi_cmnd *sc = task->sc; |
| 1895 | struct cxgbi_sock *csk = cconn->cep->csk; | 1896 | u32 headroom = SKB_TX_ISCSI_PDU_HEADER_MAX; |
| 1896 | struct net_device *ndev = cdev->ports[csk->port_id]; | 1897 | u32 max_txdata_len = conn->max_xmit_dlength; |
| 1897 | int headroom = SKB_TX_ISCSI_PDU_HEADER_MAX; | 1898 | u32 iso_tx_rsvd = 0, local_iso_info = 0; |
| 1899 | u32 last_tdata_offset, last_tdata_count; | ||
| 1900 | int err = 0; | ||
| 1901 | |||
| 1902 | if (!tcp_task) { | ||
| 1903 | pr_err("task 0x%p, tcp_task 0x%p, tdata 0x%p.\n", | ||
| 1904 | task, tcp_task, tdata); | ||
| 1905 | return -ENOMEM; | ||
| 1906 | } | ||
| 1907 | if (!csk) { | ||
| 1908 | pr_err("task 0x%p, csk gone.\n", task); | ||
| 1909 | return -EPIPE; | ||
| 1910 | } | ||
| 1911 | |||
| 1912 | op &= ISCSI_OPCODE_MASK; | ||
| 1898 | 1913 | ||
| 1899 | tcp_task->dd_data = tdata; | 1914 | tcp_task->dd_data = tdata; |
| 1900 | task->hdr = NULL; | 1915 | task->hdr = NULL; |
| 1901 | 1916 | ||
| 1902 | if (SKB_MAX_HEAD(cdev->skb_tx_rsvd) > (512 * MAX_SKB_FRAGS) && | 1917 | last_tdata_count = tdata->count; |
| 1903 | (opcode == ISCSI_OP_SCSI_DATA_OUT || | 1918 | last_tdata_offset = tdata->offset; |
| 1904 | (opcode == ISCSI_OP_SCSI_CMD && | 1919 | |
| 1905 | sc->sc_data_direction == DMA_TO_DEVICE))) | 1920 | if ((op == ISCSI_OP_SCSI_DATA_OUT) || |
| 1906 | /* data could goes into skb head */ | 1921 | ((op == ISCSI_OP_SCSI_CMD) && |
| 1907 | headroom += min_t(unsigned int, | 1922 | (sc->sc_data_direction == DMA_TO_DEVICE))) { |
| 1908 | SKB_MAX_HEAD(cdev->skb_tx_rsvd), | 1923 | u32 remaining_data_tosend, dlimit = 0; |
| 1909 | conn->max_xmit_dlength); | 1924 | u32 max_pdu_size, max_num_pdu, num_pdu; |
| 1925 | u32 count; | ||
| 1910 | 1926 | ||
| 1911 | tdata->skb = alloc_skb(cdev->skb_tx_rsvd + headroom, GFP_ATOMIC); | 1927 | /* Preserve conn->max_xmit_dlength because it can get updated to |
| 1928 | * ISO data size. | ||
| 1929 | */ | ||
| 1930 | if (task->state == ISCSI_TASK_PENDING) | ||
| 1931 | tdata->max_xmit_dlength = conn->max_xmit_dlength; | ||
| 1932 | |||
| 1933 | if (!tdata->offset) | ||
| 1934 | cxgbi_task_data_sgl_check(task); | ||
| 1935 | |||
| 1936 | remaining_data_tosend = | ||
| 1937 | tdata->dlen - tdata->offset - tdata->count; | ||
| 1938 | |||
| 1939 | recalculate_sgl: | ||
| 1940 | max_txdata_len = tdata->max_xmit_dlength; | ||
| 1941 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | ||
| 1942 | "tdata->dlen %u, remaining to send %u " | ||
| 1943 | "conn->max_xmit_dlength %u, " | ||
| 1944 | "tdata->max_xmit_dlength %u\n", | ||
| 1945 | tdata->dlen, remaining_data_tosend, | ||
| 1946 | conn->max_xmit_dlength, tdata->max_xmit_dlength); | ||
| 1947 | |||
| 1948 | if (cdev->skb_iso_txhdr && !csk->disable_iso && | ||
| 1949 | (remaining_data_tosend > tdata->max_xmit_dlength) && | ||
| 1950 | !(remaining_data_tosend % 4)) { | ||
| 1951 | u32 max_iso_data; | ||
| 1952 | |||
| 1953 | if ((op == ISCSI_OP_SCSI_CMD) && | ||
| 1954 | session->initial_r2t_en) | ||
| 1955 | goto no_iso; | ||
| 1956 | |||
| 1957 | max_pdu_size = tdata->max_xmit_dlength + | ||
| 1958 | ISCSI_PDU_NONPAYLOAD_LEN; | ||
| 1959 | max_iso_data = rounddown(CXGBI_MAX_ISO_DATA_IN_SKB, | ||
| 1960 | csk->advmss); | ||
| 1961 | max_num_pdu = max_iso_data / max_pdu_size; | ||
| 1962 | |||
| 1963 | num_pdu = (remaining_data_tosend + | ||
| 1964 | tdata->max_xmit_dlength - 1) / | ||
| 1965 | tdata->max_xmit_dlength; | ||
| 1966 | |||
| 1967 | if (num_pdu > max_num_pdu) | ||
| 1968 | num_pdu = max_num_pdu; | ||
| 1969 | |||
| 1970 | conn->max_xmit_dlength = tdata->max_xmit_dlength * num_pdu; | ||
| 1971 | max_txdata_len = conn->max_xmit_dlength; | ||
| 1972 | iso_tx_rsvd = cdev->skb_iso_txhdr; | ||
| 1973 | local_iso_info = sizeof(struct cxgbi_iso_info); | ||
| 1974 | |||
| 1975 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | ||
| 1976 | "max_pdu_size %u, max_num_pdu %u, " | ||
| 1977 | "max_txdata %u, num_pdu %u\n", | ||
| 1978 | max_pdu_size, max_num_pdu, | ||
| 1979 | max_txdata_len, num_pdu); | ||
| 1980 | } | ||
| 1981 | no_iso: | ||
| 1982 | count = min_t(u32, max_txdata_len, remaining_data_tosend); | ||
| 1983 | err = cxgbi_task_data_sgl_read(task, | ||
| 1984 | tdata->offset + tdata->count, | ||
| 1985 | count, &dlimit); | ||
| 1986 | if (unlikely(err < 0)) { | ||
| 1987 | log_debug(1 << CXGBI_DBG_ISCSI, | ||
| 1988 | "task 0x%p, tcp_task 0x%p, tdata 0x%p, " | ||
| 1989 | "sgl err %d, count %u, dlimit %u\n", | ||
| 1990 | task, tcp_task, tdata, err, count, dlimit); | ||
| 1991 | if (dlimit) { | ||
| 1992 | remaining_data_tosend = | ||
| 1993 | rounddown(dlimit, | ||
| 1994 | tdata->max_xmit_dlength); | ||
| 1995 | if (!remaining_data_tosend) | ||
| 1996 | remaining_data_tosend = dlimit; | ||
| 1997 | |||
| 1998 | dlimit = 0; | ||
| 1999 | |||
| 2000 | conn->max_xmit_dlength = remaining_data_tosend; | ||
| 2001 | goto recalculate_sgl; | ||
| 2002 | } | ||
| 2003 | |||
| 2004 | pr_err("task 0x%p, tcp_task 0x%p, tdata 0x%p, " | ||
| 2005 | "sgl err %d\n", | ||
| 2006 | task, tcp_task, tdata, err); | ||
| 2007 | goto ret_err; | ||
| 2008 | } | ||
| 2009 | |||
| 2010 | if ((tdata->flags & CXGBI_TASK_SGL_COPY) || | ||
| 2011 | (tdata->nr_frags > MAX_SKB_FRAGS)) | ||
| 2012 | headroom += conn->max_xmit_dlength; | ||
| 2013 | } | ||
| 2014 | |||
| 2015 | tdata->skb = alloc_skb(local_iso_info + cdev->skb_tx_rsvd + | ||
| 2016 | iso_tx_rsvd + headroom, GFP_ATOMIC); | ||
| 1912 | if (!tdata->skb) { | 2017 | if (!tdata->skb) { |
| 1913 | ndev->stats.tx_dropped++; | 2018 | tdata->count = last_tdata_count; |
| 1914 | return -ENOMEM; | 2019 | tdata->offset = last_tdata_offset; |
| 2020 | err = -ENOMEM; | ||
| 2021 | goto ret_err; | ||
| 1915 | } | 2022 | } |
| 1916 | 2023 | ||
| 1917 | skb_reserve(tdata->skb, cdev->skb_tx_rsvd); | 2024 | skb_reserve(tdata->skb, local_iso_info + cdev->skb_tx_rsvd + |
| 2025 | iso_tx_rsvd); | ||
| 1918 | 2026 | ||
| 1919 | if (task->sc) { | 2027 | if (task->sc) { |
| 1920 | task->hdr = (struct iscsi_hdr *)tdata->skb->data; | 2028 | task->hdr = (struct iscsi_hdr *)tdata->skb->data; |
| @@ -1923,25 +2031,100 @@ int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 opcode) · 2 unmodified lines | |||
| 1923 | if (!task->hdr) { | 2031 | if (!task->hdr) { |
| 1924 | __kfree_skb(tdata->skb); | 2032 | __kfree_skb(tdata->skb); |
| 1925 | tdata->skb = NULL; | 2033 | tdata->skb = NULL; |
| 1926 | ndev->stats.tx_dropped++; | ||
| 1927 | return -ENOMEM; | 2034 | return -ENOMEM; |
| 1928 | } | 2035 | } |
| 1929 | } | 2036 | } |
| 1930 | task->hdr_max = SKB_TX_ISCSI_PDU_HEADER_MAX; /* BHS + AHS */ | 2037 | |
| 2038 | task->hdr_max = SKB_TX_ISCSI_PDU_HEADER_MAX; | ||
| 2039 | |||
| 2040 | if (iso_tx_rsvd) | ||
| 2041 | cxgbi_skcb_set_flag(tdata->skb, SKCBF_TX_ISO); | ||
| 1931 | 2042 | ||
| 1932 | /* data_out uses scsi_cmd's itt */ | 2043 | /* data_out uses scsi_cmd's itt */ |
| 1933 | if (opcode != ISCSI_OP_SCSI_DATA_OUT) | 2044 | if (op != ISCSI_OP_SCSI_DATA_OUT) |
| 1934 | task_reserve_itt(task, &task->hdr->itt); | 2045 | task_reserve_itt(task, &task->hdr->itt); |
| 1935 | 2046 | ||
| 1936 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | 2047 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, |
| 1937 | "task 0x%p, op 0x%x, skb 0x%p,%u+%u/%u, itt 0x%x.\n", | 2048 | "task 0x%p, op 0x%x, skb 0x%p,%u+%u/%u, itt 0x%x.\n", |
| 1938 | task, opcode, tdata->skb, cdev->skb_tx_rsvd, headroom, | 2049 | task, op, tdata->skb, cdev->skb_tx_rsvd, headroom, |
| 1939 | conn->max_xmit_dlength, ntohl(task->hdr->itt)); | 2050 | conn->max_xmit_dlength, be32_to_cpu(task->hdr->itt)); |
| 1940 | 2051 | ||
| 1941 | return 0; | 2052 | return 0; |
| 2053 | |||
| 2054 | ret_err: | ||
| 2055 | conn->max_xmit_dlength = tdata->max_xmit_dlength; | ||
| 2056 | return err; | ||
| 1942 | } | 2057 | } |
| 1943 | EXPORT_SYMBOL_GPL(cxgbi_conn_alloc_pdu); | 2058 | EXPORT_SYMBOL_GPL(cxgbi_conn_alloc_pdu); |
| 1944 | 2059 | ||
| 2060 | static int | ||
| 2061 | cxgbi_prep_iso_info(struct iscsi_task *task, struct sk_buff *skb, | ||
| 2062 | u32 count) | ||
| 2063 | { | ||
| 2064 | struct cxgbi_iso_info *iso_info = (struct cxgbi_iso_info *)skb->head; | ||
| 2065 | struct iscsi_r2t_info *r2t; | ||
| 2066 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); | ||
| 2067 | struct iscsi_conn *conn = task->conn; | ||
| 2068 | struct iscsi_session *session = conn->session; | ||
| 2069 | struct iscsi_tcp_task *tcp_task = task->dd_data; | ||
| 2070 | u32 burst_size = 0, r2t_dlength = 0, dlength; | ||
| 2071 | u32 max_pdu_len = tdata->max_xmit_dlength; | ||
| 2072 | u32 segment_offset = 0; | ||
| 2073 | u32 num_pdu; | ||
| 2074 | |||
| 2075 | if (unlikely(!cxgbi_skcb_test_flag(skb, SKCBF_TX_ISO))) | ||
| 2076 | return 0; | ||
| 2077 | |||
| 2078 | memset(iso_info, 0, sizeof(struct cxgbi_iso_info)); | ||
| 2079 | |||
| 2080 | if (task->hdr->opcode == ISCSI_OP_SCSI_CMD && session->imm_data_en) { | ||
| 2081 | iso_info->flags |= CXGBI_ISO_INFO_IMM_ENABLE; | ||
| 2082 | burst_size = count; | ||
| 2083 | } | ||
| 2084 | |||
| 2085 | dlength = ntoh24(task->hdr->dlength); | ||
| 2086 | dlength = min(dlength, max_pdu_len); | ||
| 2087 | hton24(task->hdr->dlength, dlength); | ||
| 2088 | |||
| 2089 | num_pdu = (count + max_pdu_len - 1) / max_pdu_len; | ||
| 2090 | |||
| 2091 | if (iscsi_task_has_unsol_data(task)) | ||
| 2092 | r2t = &task->unsol_r2t; | ||
| 2093 | else | ||
| 2094 | r2t = tcp_task->r2t; | ||
| 2095 | |||
| 2096 | if (r2t) { | ||
| 2097 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | ||
| 2098 | "count %u, tdata->count %u, num_pdu %u," | ||
| 2099 | "task->hdr_len %u, r2t->data_length %u, r2t->sent %u\n", | ||
| 2100 | count, tdata->count, num_pdu, task->hdr_len, | ||
| 2101 | r2t->data_length, r2t->sent); | ||
| 2102 | |||
| 2103 | r2t_dlength = r2t->data_length - r2t->sent; | ||
| 2104 | segment_offset = r2t->sent; | ||
| 2105 | r2t->datasn += num_pdu - 1; | ||
| 2106 | } | ||
| 2107 | |||
| 2108 | if (!r2t || !r2t->sent) | ||
| 2109 | iso_info->flags |= CXGBI_ISO_INFO_FSLICE; | ||
| 2110 | |||
| 2111 | if (task->hdr->flags & ISCSI_FLAG_CMD_FINAL) | ||
| 2112 | iso_info->flags |= CXGBI_ISO_INFO_LSLICE; | ||
| 2113 | |||
| 2114 | task->hdr->flags &= ~ISCSI_FLAG_CMD_FINAL; | ||
| 2115 | |||
| 2116 | iso_info->op = task->hdr->opcode; | ||
| 2117 | iso_info->ahs = task->hdr->hlength; | ||
| 2118 | iso_info->num_pdu = num_pdu; | ||
| 2119 | iso_info->mpdu = max_pdu_len; | ||
| 2120 | iso_info->burst_size = (burst_size + r2t_dlength) >> 2; | ||
| 2121 | iso_info->len = count + task->hdr_len; | ||
| 2122 | iso_info->segment_offset = segment_offset; | ||
| 2123 | |||
| 2124 | cxgbi_skcb_tx_iscsi_hdrlen(skb) = task->hdr_len; | ||
| 2125 | return 0; | ||
| 2126 | } | ||
| 2127 | |||
| 1945 | static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int dcrc) | 2128 | static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int dcrc) |
| 1946 | { | 2129 | { |
| 1947 | if (hcrc || dcrc) { | 2130 | if (hcrc || dcrc) { |
| @@ -1951,133 +2134,260 @@ static inline void tx_skb_setmode(struct sk_buff *skb, int hcrc, int dcrc) · 3 unmodified lines | |||
| 1951 | submode |= 1; | 2134 | submode |= 1; |
| 1952 | if (dcrc) | 2135 | if (dcrc) |
| 1953 | submode |= 2; | 2136 | submode |= 2; |
| 1954 | cxgbi_skcb_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) | submode; | 2137 | cxgbi_skcb_tx_ulp_mode(skb) = (ULP2_MODE_ISCSI << 4) | submode; |
| 1955 | } else | 2138 | } else |
| 1956 | cxgbi_skcb_ulp_mode(skb) = 0; | 2139 | cxgbi_skcb_tx_ulp_mode(skb) = 0; |
| 1957 | } | 2140 | } |
| 1958 | 2141 | ||
| 2142 | static struct page *rsvd_page; | ||
| 2143 | |||
| 1959 | int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset, | 2144 | int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset, |
| 1960 | unsigned int count) | 2145 | unsigned int count) |
| 1961 | { | 2146 | { |
| 1962 | struct iscsi_conn *conn = task->conn; | 2147 | struct iscsi_conn *conn = task->conn; |
| 2148 | struct iscsi_tcp_task *tcp_task = task->dd_data; | ||
| 1963 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); | 2149 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); |
| 1964 | struct sk_buff *skb = tdata->skb; | 2150 | struct sk_buff *skb; |
| 1965 | unsigned int datalen = count; | 2151 | struct scsi_cmnd *sc = task->sc; |
| 1966 | int i, padlen = iscsi_padding(count); | 2152 | u32 expected_count, expected_offset; |
| 2153 | u32 datalen = count, dlimit = 0; | ||
| 2154 | u32 i, padlen = iscsi_padding(count); | ||
| 1967 | struct page *pg; | 2155 | struct page *pg; |
| 2156 | int err; | ||
| 2157 | |||
| 2158 | if (!tcp_task || (tcp_task->dd_data != tdata)) { | ||
| 2159 | pr_err("task 0x%p,0x%p, tcp_task 0x%p, tdata 0x%p/0x%p.\n", | ||
| 2160 | task, task->sc, tcp_task, | ||
| 2161 | tcp_task ? tcp_task->dd_data : NULL, tdata); | ||
| 2162 | return -EINVAL; | ||
| 2163 | } | ||
| 2164 | skb = tdata->skb; | ||
| 1968 | 2165 | ||
| 1969 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | 2166 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, |
| 1970 | "task 0x%p,0x%p, skb 0x%p, 0x%x,0x%x,0x%x, %u+%u.\n", | 2167 | "task 0x%p,0x%p, skb 0x%p, 0x%x,0x%x,0x%x, %u+%u.\n", |
| 1971 | task, task->sc, skb, (*skb->data) & ISCSI_OPCODE_MASK, | 2168 | task, task->sc, skb, (*skb->data) & ISCSI_OPCODE_MASK, |
| 1972 | ntohl(task->cmdsn), ntohl(task->hdr->itt), offset, count); | 2169 | be32_to_cpu(task->cmdsn), be32_to_cpu(task->hdr->itt), offset, count); |
| 1973 | 2170 | ||
| 1974 | skb_put(skb, task->hdr_len); | 2171 | skb_put(skb, task->hdr_len); |
| 1975 | tx_skb_setmode(skb, conn->hdrdgst_en, datalen ? conn->datadgst_en : 0); | 2172 | tx_skb_setmode(skb, conn->hdrdgst_en, datalen ? conn->datadgst_en : 0); |
| 1976 | if (!count) | 2173 | if (!count) { |
| 2174 | tdata->count = count; | ||
| 2175 | tdata->offset = offset; | ||
| 2176 | tdata->nr_frags = 0; | ||
| 2177 | tdata->total_offset = 0; | ||
| 2178 | tdata->total_count = 0; | ||
| 2179 | if (tdata->max_xmit_dlength) | ||
| 2180 | conn->max_xmit_dlength = tdata->max_xmit_dlength; | ||
| 2181 | cxgbi_skcb_clear_flag(skb, SKCBF_TX_ISO); | ||
| 1977 | return 0; | 2182 | return 0; |
| 2183 | } | ||
| 1978 | 2184 | ||
| 1979 | if (task->sc) { | 2185 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, |
| 1980 | struct scsi_data_buffer *sdb = &task->sc->sdb; | 2186 | "data->total_count %u, tdata->total_offset %u\n", |
| 1981 | struct scatterlist *sg = NULL; | 2187 | tdata->total_count, tdata->total_offset); |
| 1982 | int err; | ||
| 1983 | 2188 | ||
| 1984 | tdata->offset = offset; | 2189 | expected_count = tdata->total_count; |
| 1985 | tdata->count = count; | 2190 | expected_offset = tdata->total_offset; |
| 1986 | err = sgl_seek_offset( | 2191 | |
| 1987 | sdb->table.sgl, sdb->table.nents, | 2192 | if ((count != expected_count) || |
| 1988 | tdata->offset, &tdata->sgoffset, &sg); | 2193 | (offset != expected_offset)) { |
| 1989 | if (err < 0) { | 2194 | err = cxgbi_task_data_sgl_read(task, offset, count, &dlimit); |
| 1990 | pr_warn("tpdu, sgl %u, bad offset %u/%u.\n", | ||
| 1991 | sdb->table.nents, tdata->offset, sdb->length); | ||
| 1992 | return err; | ||
| 1993 | } | ||
| 1994 | err = sgl_read_to_frags(sg, tdata->sgoffset, tdata->count, | ||
| 1995 | tdata->frags, MAX_PDU_FRAGS); | ||
| 1996 | if (err < 0) { | 2195 | if (err < 0) { |
| 1997 | pr_warn("tpdu, sgl %u, bad offset %u + %u.\n", | 2196 | pr_err("task 0x%p,0x%p, tcp_task 0x%p, tdata 0x%p/0x%p " |
| 1998 | sdb->table.nents, tdata->offset, tdata->count); | 2197 | "dlimit %u, sgl err %d.\n", task, task->sc, |
| 2198 | tcp_task, tcp_task ? tcp_task->dd_data : NULL, | ||
| 2199 | tdata, dlimit, err); | ||
| 1999 | return err; | 2200 | return err; |
| 2000 | } | 2201 | } |
| 2001 | tdata->nr_frags = err; | 2202 | } |
| 2203 | |||
| 2204 | /* Restore original value of conn->max_xmit_dlength because | ||
| 2205 | * it can get updated to ISO data size. | ||
| 2206 | */ | ||
| 2207 | conn->max_xmit_dlength = tdata->max_xmit_dlength; | ||
| 2208 | |||
| 2209 | if (sc) { | ||
| 2210 | struct page_frag *frag = tdata->frags; | ||
| 2002 | 2211 | ||
| 2003 | if (tdata->nr_frags > MAX_SKB_FRAGS || | 2212 | if ((tdata->flags & CXGBI_TASK_SGL_COPY) || |
| 2004 | (padlen && tdata->nr_frags == MAX_SKB_FRAGS)) { | 2213 | (tdata->nr_frags > MAX_SKB_FRAGS) || |
| 2214 | (padlen && (tdata->nr_frags == | ||
| 2215 | MAX_SKB_FRAGS))) { | ||
| 2005 | char *dst = skb->data + task->hdr_len; | 2216 | char *dst = skb->data + task->hdr_len; |
| 2006 | struct page_frag *frag = tdata->frags; | ||
| 2007 | 2217 | ||
| 2008 | /* data fits in the skb's headroom */ | 2218 | /* data fits in the skb's headroom */ |
| 2009 | for (i = 0; i < tdata->nr_frags; i++, frag++) { | 2219 | for (i = 0; i < tdata->nr_frags; i++, frag++) { |
| 2010 | char *src = kmap_atomic(frag->page); | 2220 | char *src = kmap_atomic(frag->page); |
| 2011 | 2221 | ||
| 2012 | memcpy(dst, src+frag->offset, frag->size); | 2222 | memcpy(dst, src + frag->offset, frag->size); |
| 2013 | dst += frag->size; | 2223 | dst += frag->size; |
| 2014 | kunmap_atomic(src); | 2224 | kunmap_atomic(src); |
| 2015 | } | 2225 | } |
| 2226 | |||
| 2016 | if (padlen) { | 2227 | if (padlen) { |
| 2017 | memset(dst, 0, padlen); | 2228 | memset(dst, 0, padlen); |
| 2018 | padlen = 0; | 2229 | padlen = 0; |
| 2019 | } | 2230 | } |
| 2020 | skb_put(skb, count + padlen); | 2231 | skb_put(skb, count + padlen); |
| 2021 | } else { | 2232 | } else { |
| 2022 | /* data fit into frag_list */ | 2233 | for (i = 0; i < tdata->nr_frags; i++, frag++) { |
| 2023 | for (i = 0; i < tdata->nr_frags; i++) { | 2234 | get_page(frag->page); |
| 2024 | __skb_fill_page_desc(skb, i, | 2235 | skb_fill_page_desc(skb, i, frag->page, |
| 2025 | tdata->frags[i].page, | 2236 | frag->offset, frag->size); |
| 2026 | tdata->frags[i].offset, | ||
| 2027 | tdata->frags[i].size); | ||
| 2028 | skb_frag_ref(skb, i); | ||
| 2029 | } | 2237 | } |
| 2030 | skb_shinfo(skb)->nr_frags = tdata->nr_frags; | 2238 | |
| 2031 | skb->len += count; | 2239 | skb->len += count; |
| 2032 | skb->data_len += count; | 2240 | skb->data_len += count; |
| 2033 | skb->truesize += count; | 2241 | skb->truesize += count; |
| 2034 | } | 2242 | } |
| 2035 | |||
| 2036 | } else { | 2243 | } else { |
| 2037 | pg = virt_to_page(task->data); | 2244 | pg = virt_to_head_page(task->data); |
| 2038 | |||
| 2039 | get_page(pg); | 2245 | get_page(pg); |
| 2040 | skb_fill_page_desc(skb, 0, pg, offset_in_page(task->data), | 2246 | skb_fill_page_desc(skb, 0, pg, |
| 2041 | count); | 2247 | task->data - (char *)page_address(pg), |
| 2248 | count); | ||
| 2042 | skb->len += count; | 2249 | skb->len += count; |
| 2043 | skb->data_len += count; | 2250 | skb->data_len += count; |
| 2044 | skb->truesize += count; | 2251 | skb->truesize += count; |
| 2045 | } | 2252 | } |
| 2046 | 2253 | ||
| 2047 | if (padlen) { | 2254 | if (padlen) { |
| 2048 | i = skb_shinfo(skb)->nr_frags; | 2255 | get_page(rsvd_page); |
| 2049 | skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags, | 2256 | skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags, |
| 2050 | virt_to_page(padding), offset_in_page(padding), | 2257 | rsvd_page, 0, padlen); |
| 2051 | padlen); | ||
| 2052 | 2258 | ||
| 2053 | skb->data_len += padlen; | 2259 | skb->data_len += padlen; |
| 2054 | skb->truesize += padlen; | 2260 | skb->truesize += padlen; |
| 2055 | skb->len += padlen; | 2261 | skb->len += padlen; |
| 2056 | } | 2262 | } |
| 2057 | 2263 | ||
| 2264 | if (likely(count > tdata->max_xmit_dlength)) | ||
| 2265 | cxgbi_prep_iso_info(task, skb, count); | ||
| 2266 | else | ||
| 2267 | cxgbi_skcb_clear_flag(skb, SKCBF_TX_ISO); | ||
| 2268 | |||
| 2058 | return 0; | 2269 | return 0; |
| 2059 | } | 2270 | } |
| 2060 | EXPORT_SYMBOL_GPL(cxgbi_conn_init_pdu); | 2271 | EXPORT_SYMBOL_GPL(cxgbi_conn_init_pdu); |
| 2061 | 2272 | ||
| 2273 | static int cxgbi_sock_tx_queue_up(struct cxgbi_sock *csk, struct sk_buff *skb) | ||
| 2274 | { | ||
| 2275 | struct cxgbi_device *cdev = csk->cdev; | ||
| 2276 | struct cxgbi_iso_info *iso_cpl; | ||
| 2277 | u32 frags = skb_shinfo(skb)->nr_frags; | ||
| 2278 | u32 extra_len, num_pdu, hdr_len; | ||
| 2279 | u32 iso_tx_rsvd = 0; | ||
| 2280 | |||
| 2281 | if (csk->state != CTP_ESTABLISHED) { | ||
| 2282 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 2283 | "csk 0x%p,%u,0x%lx,%u, EAGAIN.\n", | ||
| 2284 | csk, csk->state, csk->flags, csk->tid); | ||
| 2285 | return -EPIPE; | ||
| 2286 | } | ||
| 2287 | |||
| 2288 | if (csk->err) { | ||
| 2289 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 2290 | "csk 0x%p,%u,0x%lx,%u, EPIPE %d.\n", | ||
| 2291 | csk, csk->state, csk->flags, csk->tid, csk->err); | ||
| 2292 | return -EPIPE; | ||
| 2293 | } | ||
| 2294 | |||
| 2295 | if ((cdev->flags & CXGBI_FLAG_DEV_T3) && | ||
| 2296 | before((csk->snd_win + csk->snd_una), csk->write_seq)) { | ||
| 2297 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 2298 | "csk 0x%p,%u,0x%lx,%u, FULL %u-%u >= %u.\n", | ||
| 2299 | csk, csk->state, csk->flags, csk->tid, csk->write_seq, | ||
| 2300 | csk->snd_una, csk->snd_win); | ||
| 2301 | return -ENOBUFS; | ||
| 2302 | } | ||
| 2303 | |||
| 2304 | if (cxgbi_skcb_test_flag(skb, SKCBF_TX_ISO)) | ||
| 2305 | iso_tx_rsvd = cdev->skb_iso_txhdr; | ||
| 2306 | |||
| 2307 | if (unlikely(skb_headroom(skb) < (cdev->skb_tx_rsvd + iso_tx_rsvd))) { | ||
| 2308 | pr_err("csk 0x%p, skb head %u < %u.\n", | ||
| 2309 | csk, skb_headroom(skb), cdev->skb_tx_rsvd); | ||
| 2310 | return -EINVAL; | ||
| 2311 | } | ||
| 2312 | |||
| 2313 | if (skb->len != skb->data_len) | ||
| 2314 | frags++; | ||
| 2315 | |||
| 2316 | if (frags >= SKB_WR_LIST_SIZE) { | ||
| 2317 | pr_err("csk 0x%p, frags %u, %u,%u >%lu.\n", | ||
| 2318 | csk, skb_shinfo(skb)->nr_frags, skb->len, | ||
| 2319 | skb->data_len, SKB_WR_LIST_SIZE); | ||
| 2320 | return -EINVAL; | ||
| 2321 | } | ||
| 2322 | |||
| 2323 | cxgbi_skcb_set_flag(skb, SKCBF_TX_NEED_HDR); | ||
| 2324 | skb_reset_transport_header(skb); | ||
| 2325 | cxgbi_sock_skb_entail(csk, skb); | ||
| 2326 | |||
| 2327 | extra_len = cxgbi_ulp_extra_len(cxgbi_skcb_tx_ulp_mode(skb)); | ||
| 2328 | |||
| 2329 | if (likely(cxgbi_skcb_test_flag(skb, SKCBF_TX_ISO))) { | ||
| 2330 | iso_cpl = (struct cxgbi_iso_info *)skb->head; | ||
| 2331 | num_pdu = iso_cpl->num_pdu; | ||
| 2332 | hdr_len = cxgbi_skcb_tx_iscsi_hdrlen(skb); | ||
| 2333 | extra_len = (cxgbi_ulp_extra_len(cxgbi_skcb_tx_ulp_mode(skb)) * | ||
| 2334 | num_pdu) + (hdr_len * (num_pdu - 1)); | ||
| 2335 | } | ||
| 2336 | |||
| 2337 | csk->write_seq += (skb->len + extra_len); | ||
| 2338 | |||
| 2339 | return 0; | ||
| 2340 | } | ||
| 2341 | |||
| 2342 | static int cxgbi_sock_send_skb(struct cxgbi_sock *csk, struct sk_buff *skb) | ||
| 2343 | { | ||
| 2344 | struct cxgbi_device *cdev = csk->cdev; | ||
| 2345 | int len = skb->len; | ||
| 2346 | int err; | ||
| 2347 | |||
| 2348 | spin_lock_bh(&csk->lock); | ||
| 2349 | err = cxgbi_sock_tx_queue_up(csk, skb); | ||
| 2350 | if (err < 0) { | ||
| 2351 | spin_unlock_bh(&csk->lock); | ||
| 2352 | return err; | ||
| 2353 | } | ||
| 2354 | |||
| 2355 | if (likely(skb_queue_len(&csk->write_queue))) | ||
| 2356 | cdev->csk_push_tx_frames(csk, 0); | ||
| 2357 | spin_unlock_bh(&csk->lock); | ||
| 2358 | return len; | ||
| 2359 | } | ||
| 2360 | |||
| 2062 | int cxgbi_conn_xmit_pdu(struct iscsi_task *task) | 2361 | int cxgbi_conn_xmit_pdu(struct iscsi_task *task) |
| 2063 | { | 2362 | { |
| 2064 | struct iscsi_tcp_conn *tcp_conn = task->conn->dd_data; | 2363 | struct iscsi_tcp_conn *tcp_conn = task->conn->dd_data; |
| 2065 | struct cxgbi_conn *cconn = tcp_conn->dd_data; | 2364 | struct cxgbi_conn *cconn = tcp_conn->dd_data; |
| 2365 | struct iscsi_tcp_task *tcp_task = task->dd_data; | ||
| 2066 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); | 2366 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); |
| 2067 | struct cxgbi_task_tag_info *ttinfo = &tdata->ttinfo; | 2367 | struct cxgbi_task_tag_info *ttinfo = &tdata->ttinfo; |
| 2068 | struct sk_buff *skb = tdata->skb; | 2368 | struct sk_buff *skb; |
| 2069 | struct cxgbi_sock *csk = NULL; | 2369 | struct cxgbi_sock *csk = NULL; |
| 2070 | unsigned int datalen; | 2370 | u32 pdulen = 0; |
| 2371 | u32 datalen; | ||
| 2071 | int err; | 2372 | int err; |
| 2072 | 2373 | ||
| 2374 | if (!tcp_task || (tcp_task->dd_data != tdata)) { | ||
| 2375 | pr_err("task 0x%p,0x%p, tcp_task 0x%p, tdata 0x%p/0x%p.\n", | ||
| 2376 | task, task->sc, tcp_task, | ||
| 2377 | tcp_task ? tcp_task->dd_data : NULL, tdata); | ||
| 2378 | return -EINVAL; | ||
| 2379 | } | ||
| 2380 | |||
| 2381 | skb = tdata->skb; | ||
| 2073 | if (!skb) { | 2382 | if (!skb) { |
| 2074 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | 2383 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, |
| 2075 | "task 0x%p\n", task); | 2384 | "task 0x%p, skb NULL.\n", task); |
| 2076 | return 0; | 2385 | return 0; |
| 2077 | } | 2386 | } |
| 2078 | 2387 | ||
| 2079 | if (cconn && cconn->cep) | 2388 | if (cconn && cconn->cep) |
| 2080 | csk = cconn->cep->csk; | 2389 | csk = cconn->cep->csk; |
| 2390 | |||
| 2081 | if (!csk) { | 2391 | if (!csk) { |
| 2082 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | 2392 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, |
| 2083 | "task 0x%p, csk gone.\n", task); | 2393 | "task 0x%p, csk gone.\n", task); |
| @@ -2101,13 +2411,12 @@ int cxgbi_conn_xmit_pdu(struct iscsi_task *task) · 17 unmodified lines | |||
| 2101 | if (!task->sc) | 2411 | if (!task->sc) |
| 2102 | memcpy(skb->data, task->hdr, SKB_TX_ISCSI_PDU_HEADER_MAX); | 2412 | memcpy(skb->data, task->hdr, SKB_TX_ISCSI_PDU_HEADER_MAX); |
| 2103 | 2413 | ||
| 2104 | err = cxgbi_sock_send_pdus(cconn->cep->csk, skb); | 2414 | err = cxgbi_sock_send_skb(csk, skb); |
| 2105 | if (err > 0) { | 2415 | if (err > 0) { |
| 2106 | int pdulen = err; | 2416 | pdulen += err; |
| 2107 | 2417 | ||
| 2108 | log_debug(1 << CXGBI_DBG_PDU_TX, | 2418 | log_debug(1 << CXGBI_DBG_PDU_TX, "task 0x%p,0x%p, rv %d.\n", |
| 2109 | "task 0x%p,0x%p, skb 0x%p, len %u/%u, rv %d.\n", | 2419 | task, task->sc, err); |
| 2110 | task, task->sc, skb, skb->len, skb->data_len, err); | ||
| 2111 | 2420 | ||
| 2112 | if (task->conn->hdrdgst_en) | 2421 | if (task->conn->hdrdgst_en) |
| 2113 | pdulen += ISCSI_DIGEST_SIZE; | 2422 | pdulen += ISCSI_DIGEST_SIZE; |
| @@ -2116,24 +2425,42 @@ int cxgbi_conn_xmit_pdu(struct iscsi_task *task) · 2 unmodified lines | |||
| 2116 | pdulen += ISCSI_DIGEST_SIZE; | 2425 | pdulen += ISCSI_DIGEST_SIZE; |
| 2117 | 2426 | ||
| 2118 | task->conn->txdata_octets += pdulen; | 2427 | task->conn->txdata_octets += pdulen; |
| 2428 | |||
| 2429 | if (unlikely(cxgbi_is_iso_config(csk) && cxgbi_is_iso_disabled(csk))) { | ||
| 2430 | if (time_after(jiffies, csk->prev_iso_ts + HZ)) { | ||
| 2431 | csk->disable_iso = false; | ||
| 2432 | csk->prev_iso_ts = 0; | ||
| 2433 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 2434 | "enable iso: csk 0x%p\n", csk); | ||
| 2435 | } | ||
| 2436 | } | ||
| 2437 | |||
| 2119 | return 0; | 2438 | return 0; |
| 2120 | } | 2439 | } |
| 2121 | 2440 | ||
| 2122 | if (err == -EAGAIN || err == -ENOBUFS) { | 2441 | if (err == -EAGAIN || err == -ENOBUFS) { |
| 2123 | log_debug(1 << CXGBI_DBG_PDU_TX, | 2442 | log_debug(1 << CXGBI_DBG_PDU_TX, |
| 2124 | "task 0x%p, skb 0x%p, len %u/%u, %d EAGAIN.\n", | 2443 | "task 0x%p, skb 0x%p, len %u/%u, %d EAGAIN.\n", |
| 2125 | task, skb, skb->len, skb->data_len, err); | 2444 | task, skb, skb->len, skb->data_len, err); |
| 2126 | /* reset skb to send when we are called again */ | 2445 | /* reset skb to send when we are called again */ |
| 2127 | tdata->skb = skb; | 2446 | tdata->skb = skb; |
| 2447 | |||
| 2448 | if (cxgbi_is_iso_config(csk) && !cxgbi_is_iso_disabled(csk) && | ||
| 2449 | (csk->no_tx_credits++ >= 2)) { | ||
| 2450 | csk->disable_iso = true; | ||
| 2451 | csk->prev_iso_ts = jiffies; | ||
| 2452 | log_debug(1 << CXGBI_DBG_PDU_TX, | ||
| 2453 | "disable iso:csk 0x%p, ts:%lu\n", | ||
| 2454 | csk, csk->prev_iso_ts); | ||
| 2455 | } | ||
| 2456 | |||
| 2128 | return err; | 2457 | return err; |
| 2129 | } | 2458 | } |
| 2130 | 2459 | ||
| 2131 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | ||
| 2132 | "itt 0x%x, skb 0x%p, len %u/%u, xmit err %d.\n", | ||
| 2133 | task->itt, skb, skb->len, skb->data_len, err); | ||
| 2134 | |||
| 2135 | __kfree_skb(skb); | 2460 | __kfree_skb(skb); |
| 2136 | 2461 | log_debug(1 << CXGBI_DBG_ISCSI | 1 << CXGBI_DBG_PDU_TX, | |
| 2462 | "itt 0x%x, skb 0x%p, len %u/%u, xmit err %d.\n", | ||
| 2463 | task->itt, skb, skb->len, skb->data_len, err); | ||
| 2137 | iscsi_conn_printk(KERN_ERR, task->conn, "xmit err %d.\n", err); | 2464 | iscsi_conn_printk(KERN_ERR, task->conn, "xmit err %d.\n", err); |
| 2138 | iscsi_conn_failure(task->conn, ISCSI_ERR_XMIT_FAILED); | 2465 | iscsi_conn_failure(task->conn, ISCSI_ERR_XMIT_FAILED); |
| 2139 | return err; | 2466 | return err; |
| @@ -2145,7 +2472,7 @@ void cxgbi_cleanup_task(struct iscsi_task *task) · 5 unmodified lines | |||
| 2145 | struct iscsi_tcp_task *tcp_task = task->dd_data; | 2472 | struct iscsi_tcp_task *tcp_task = task->dd_data; |
| 2146 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); | 2473 | struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); |
| 2147 | 2474 | ||
| 2148 | if (!tcp_task || !tdata || (tcp_task->dd_data != tdata)) { | 2475 | if (!tcp_task || (tcp_task->dd_data != tdata)) { |
| 2149 | pr_info("task 0x%p,0x%p, tcp_task 0x%p, tdata 0x%p/0x%p.\n", | 2476 | pr_info("task 0x%p,0x%p, tcp_task 0x%p, tdata 0x%p/0x%p.\n", |
| 2150 | task, task->sc, tcp_task, | 2477 | task, task->sc, tcp_task, |
| 2151 | tcp_task ? tcp_task->dd_data : NULL, tdata); | 2478 | tcp_task ? tcp_task->dd_data : NULL, tdata); |
| @@ -2749,12 +3076,17 @@ static int __init libcxgbi_init_module(void) · 597 unmodified lines | |||
| 2749 | 3076 | ||
| 2750 | BUILD_BUG_ON(sizeof_field(struct sk_buff, cb) < | 3077 | BUILD_BUG_ON(sizeof_field(struct sk_buff, cb) < |
| 2751 | sizeof(struct cxgbi_skb_cb)); | 3078 | sizeof(struct cxgbi_skb_cb)); |
| 3079 | rsvd_page = alloc_page(GFP_KERNEL | __GFP_ZERO); | ||
| 3080 | if (!rsvd_page) | ||
| 3081 | return -ENOMEM; | ||
| 3082 | |||
| 2752 | return 0; | 3083 | return 0; |
| 2753 | } | 3084 | } |
| 2754 | 3085 | ||
| 2755 | static void __exit libcxgbi_exit_module(void) | 3086 | static void __exit libcxgbi_exit_module(void) |
| 2756 | { | 3087 | { |
| 2757 | cxgbi_device_unregister_all(0xFF); | 3088 | cxgbi_device_unregister_all(0xFF); |
| 3089 | put_page(rsvd_page); | ||
| 2758 | return; | 3090 | return; |
| 2759 | } | 3091 | } |
| 2760 | 3092 | ||
| @@ -76,6 +76,14 @@ do { \ · 75 unmodified lines | |||
| 76 | #define ULP2_MAX_PDU_PAYLOAD \ | 76 | #define ULP2_MAX_PDU_PAYLOAD \ |
| 77 | (ULP2_MAX_PKT_SIZE - ISCSI_PDU_NONPAYLOAD_LEN) | 77 | (ULP2_MAX_PKT_SIZE - ISCSI_PDU_NONPAYLOAD_LEN) |
| 78 | 78 | ||
| 79 | #define CXGBI_ULP2_MAX_ISO_PAYLOAD 65535 | ||
| 80 | |||
| 81 | #define CXGBI_MAX_ISO_DATA_IN_SKB \ | ||
| 82 | min_t(u32, MAX_SKB_FRAGS << PAGE_SHIFT, CXGBI_ULP2_MAX_ISO_PAYLOAD) | ||
| 83 | |||
| 84 | #define cxgbi_is_iso_config(csk) ((csk)->cdev->skb_iso_txhdr) | ||
| 85 | #define cxgbi_is_iso_disabled(csk) ((csk)->disable_iso) | ||
| 86 | |||
| 79 | /* | 87 | /* |
| 80 | * For iscsi connections HW may inserts digest bytes into the pdu. Those digest | 88 | * For iscsi connections HW may inserts digest bytes into the pdu. Those digest |
| 81 | * bytes are not sent by the host but are part of the TCP payload and therefore | 89 | * bytes are not sent by the host but are part of the TCP payload and therefore |
| @@ -162,6 +170,10 @@ struct cxgbi_sock { · 80 unmodified lines | |||
| 162 | u32 write_seq; | 170 | u32 write_seq; |
| 163 | u32 snd_win; | 171 | u32 snd_win; |
| 164 | u32 rcv_win; | 172 | u32 rcv_win; |
| 173 | |||
| 174 | bool disable_iso; | ||
| 175 | u32 no_tx_credits; | ||
| 176 | unsigned long prev_iso_ts; | ||
| 165 | }; | 177 | }; |
| 166 | 178 | ||
| 167 | /* | 179 | /* |
| @@ -203,6 +215,8 @@ struct cxgbi_skb_tx_cb { · 35 unmodified lines | |||
| 203 | void *handle; | 215 | void *handle; |
| 204 | void *arp_err_handler; | 216 | void *arp_err_handler; |
| 205 | struct sk_buff *wr_next; | 217 | struct sk_buff *wr_next; |
| 218 | u16 iscsi_hdr_len; | ||
| 219 | u8 ulp_mode; | ||
| 206 | }; | 220 | }; |
| 207 | 221 | ||
| 208 | enum cxgbi_skcb_flags { | 222 | enum cxgbi_skcb_flags { |
| @@ -218,6 +232,7 @@ enum cxgbi_skcb_flags { · 9 unmodified lines | |||
| 218 | SKCBF_RX_HCRC_ERR, /* header digest error */ | 232 | SKCBF_RX_HCRC_ERR, /* header digest error */ |
| 219 | SKCBF_RX_DCRC_ERR, /* data digest error */ | 233 | SKCBF_RX_DCRC_ERR, /* data digest error */ |
| 220 | SKCBF_RX_PAD_ERR, /* padding byte error */ | 234 | SKCBF_RX_PAD_ERR, /* padding byte error */ |
| 235 | SKCBF_TX_ISO, /* iso cpl in tx skb */ | ||
| 221 | }; | 236 | }; |
| 222 | 237 | ||
| 223 | struct cxgbi_skb_cb { | 238 | struct cxgbi_skb_cb { |
| @@ -225,18 +240,18 @@ struct cxgbi_skb_cb { · 1 unmodified line | |||
| 225 | struct cxgbi_skb_rx_cb rx; | 240 | struct cxgbi_skb_rx_cb rx; |
| 226 | struct cxgbi_skb_tx_cb tx; | 241 | struct cxgbi_skb_tx_cb tx; |
| 227 | }; | 242 | }; |
| 228 | unsigned char ulp_mode; | ||
| 229 | unsigned long flags; | 243 | unsigned long flags; |
| 230 | unsigned int seq; | 244 | unsigned int seq; |
| 231 | }; | 245 | }; |
| 232 | 246 | ||
| 233 | #define CXGBI_SKB_CB(skb) ((struct cxgbi_skb_cb *)&((skb)->cb[0])) | 247 | #define CXGBI_SKB_CB(skb) ((struct cxgbi_skb_cb *)&((skb)->cb[0])) |
| 234 | #define cxgbi_skcb_flags(skb) (CXGBI_SKB_CB(skb)->flags) | 248 | #define cxgbi_skcb_flags(skb) (CXGBI_SKB_CB(skb)->flags) |
| 235 | #define cxgbi_skcb_ulp_mode(skb) (CXGBI_SKB_CB(skb)->ulp_mode) | ||
| 236 | #define cxgbi_skcb_tcp_seq(skb) (CXGBI_SKB_CB(skb)->seq) | 249 | #define cxgbi_skcb_tcp_seq(skb) (CXGBI_SKB_CB(skb)->seq) |
| 237 | #define cxgbi_skcb_rx_ddigest(skb) (CXGBI_SKB_CB(skb)->rx.ddigest) | 250 | #define cxgbi_skcb_rx_ddigest(skb) (CXGBI_SKB_CB(skb)->rx.ddigest) |
| 238 | #define cxgbi_skcb_rx_pdulen(skb) (CXGBI_SKB_CB(skb)->rx.pdulen) | 251 | #define cxgbi_skcb_rx_pdulen(skb) (CXGBI_SKB_CB(skb)->rx.pdulen) |
| 239 | #define cxgbi_skcb_tx_wr_next(skb) (CXGBI_SKB_CB(skb)->tx.wr_next) | 252 | #define cxgbi_skcb_tx_wr_next(skb) (CXGBI_SKB_CB(skb)->tx.wr_next) |
| 253 | #define cxgbi_skcb_tx_iscsi_hdrlen(skb) (CXGBI_SKB_CB(skb)->tx.iscsi_hdr_len) | ||
| 254 | #define cxgbi_skcb_tx_ulp_mode(skb) (CXGBI_SKB_CB(skb)->tx.ulp_mode) | ||
| 240 | 255 | ||
| 241 | static inline void cxgbi_skcb_set_flag(struct sk_buff *skb, | 256 | static inline void cxgbi_skcb_set_flag(struct sk_buff *skb, |
| 242 | enum cxgbi_skcb_flags flag) | 257 | enum cxgbi_skcb_flags flag) |
| @@ -458,6 +473,7 @@ struct cxgbi_ports_map { · 215 unmodified lines | |||
| 458 | #define CXGBI_FLAG_IPV4_SET 0x10 | 473 | #define CXGBI_FLAG_IPV4_SET 0x10 |
| 459 | #define CXGBI_FLAG_USE_PPOD_OFLDQ 0x40 | 474 | #define CXGBI_FLAG_USE_PPOD_OFLDQ 0x40 |
| 460 | #define CXGBI_FLAG_DDP_OFF 0x100 | 475 | #define CXGBI_FLAG_DDP_OFF 0x100 |
| 476 | #define CXGBI_FLAG_DEV_ISO_OFF 0x400 | ||
| 461 | 477 | ||
| 462 | struct cxgbi_device { | 478 | struct cxgbi_device { |
| 463 | struct list_head list_head; | 479 | struct list_head list_head; |
| @@ -477,6 +493,7 @@ struct cxgbi_device { · 13 unmodified lines | |||
| 477 | unsigned int pfvf; | 493 | unsigned int pfvf; |
| 478 | unsigned int rx_credit_thres; | 494 | unsigned int rx_credit_thres; |
| 479 | unsigned int skb_tx_rsvd; | 495 | unsigned int skb_tx_rsvd; |
| 496 | u32 skb_iso_txhdr; | ||
| 480 | unsigned int skb_rx_extra; /* for msg coalesced mode */ | 497 | unsigned int skb_rx_extra; /* for msg coalesced mode */ |
| 481 | unsigned int tx_max_size; | 498 | unsigned int tx_max_size; |
| 482 | unsigned int rx_max_size; | 499 | unsigned int rx_max_size; |
| @@ -523,20 +540,41 @@ struct cxgbi_endpoint { · 40 unmodified lines | |||
| 523 | struct cxgbi_sock *csk; | 540 | struct cxgbi_sock *csk; |
| 524 | }; | 541 | }; |
| 525 | 542 | ||
| 526 | #define MAX_PDU_FRAGS ((ULP2_MAX_PDU_PAYLOAD + 512 - 1) / 512) | ||
| 527 | struct cxgbi_task_data { | 543 | struct cxgbi_task_data { |
| 544 | #define CXGBI_TASK_SGL_CHECKED 0x1 | ||
| 545 | #define CXGBI_TASK_SGL_COPY 0x2 | ||
| 546 | u8 flags; | ||
| 528 | unsigned short nr_frags; | 547 | unsigned short nr_frags; |
| 529 | struct page_frag frags[MAX_PDU_FRAGS]; | 548 | struct page_frag frags[MAX_SKB_FRAGS]; |
| 530 | struct sk_buff *skb; | 549 | struct sk_buff *skb; |
| 531 | unsigned int dlen; | 550 | unsigned int dlen; |
| 532 | unsigned int offset; | 551 | unsigned int offset; |
| 533 | unsigned int count; | 552 | unsigned int count; |
| 534 | unsigned int sgoffset; | 553 | unsigned int sgoffset; |
| 554 | u32 total_count; | ||
| 555 | u32 total_offset; | ||
| 556 | u32 max_xmit_dlength; | ||
| 535 | struct cxgbi_task_tag_info ttinfo; | 557 | struct cxgbi_task_tag_info ttinfo; |
| 536 | }; | 558 | }; |
| 537 | #define iscsi_task_cxgbi_data(task) \ | 559 | #define iscsi_task_cxgbi_data(task) \ |
| 538 | ((task)->dd_data + sizeof(struct iscsi_tcp_task)) | 560 | ((task)->dd_data + sizeof(struct iscsi_tcp_task)) |
| 539 | 561 | ||
| 562 | struct cxgbi_iso_info { | ||
| 563 | #define CXGBI_ISO_INFO_FSLICE 0x1 | ||
| 564 | #define CXGBI_ISO_INFO_LSLICE 0x2 | ||
| 565 | #define CXGBI_ISO_INFO_IMM_ENABLE 0x4 | ||
| 566 | u8 flags; | ||
| 567 | u8 op; | ||
| 568 | u8 ahs; | ||
| 569 | u8 num_pdu; | ||
| 570 | u32 mpdu; | ||
| 571 | u32 burst_size; | ||
| 572 | u32 len; | ||
| 573 | u32 segment_offset; | ||
| 574 | u32 datasn_offset; | ||
| 575 | u32 buffer_offset; | ||
| 576 | }; | ||
| 577 | |||
| 540 | static inline void *cxgbi_alloc_big_mem(unsigned int size, | 578 | static inline void *cxgbi_alloc_big_mem(unsigned int size, |
| 541 | gfp_t gfp) | 579 | gfp_t gfp) |
| 542 | { | 580 | { |
| @@ -1331,7 +1331,6 @@ static s32 adpt_i2o_reset_hba(adpt_hba* pHba) · 1330 unmodified lines | |||
| 1331 | printk(KERN_ERR"IOP reset failed - no free memory.\n"); | 1331 | printk(KERN_ERR"IOP reset failed - no free memory.\n"); |
| 1332 | return -ENOMEM; | 1332 | return -ENOMEM; |
| 1333 | } | 1333 | } |
| 1334 | memset(status,0,4); | ||
| 1335 | 1334 | ||
| 1336 | msg[0]=EIGHT_WORD_MSG_SIZE|SGL_OFFSET_0; | 1335 | msg[0]=EIGHT_WORD_MSG_SIZE|SGL_OFFSET_0; |
| 1337 | msg[1]=I2O_CMD_ADAPTER_RESET<<24|HOST_TID<<12|ADAPTER_TID; | 1336 | msg[1]=I2O_CMD_ADAPTER_RESET<<24|HOST_TID<<12|ADAPTER_TID; |
| @@ -2784,7 +2783,6 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba) · 1446 unmodified lines | |||
| 2784 | pHba->name); | 2783 | pHba->name); |
| 2785 | return -ENOMEM; | 2784 | return -ENOMEM; |
| 2786 | } | 2785 | } |
| 2787 | memset(status, 0, 4); | ||
| 2788 | 2786 | ||
| 2789 | writel(EIGHT_WORD_MSG_SIZE| SGL_OFFSET_6, &msg[0]); | 2787 | writel(EIGHT_WORD_MSG_SIZE| SGL_OFFSET_6, &msg[0]); |
| 2790 | writel(I2O_CMD_OUTBOUND_INIT<<24 | HOST_TID<<12 | ADAPTER_TID, &msg[1]); | 2788 | writel(I2O_CMD_OUTBOUND_INIT<<24 | HOST_TID<<12 | ADAPTER_TID, &msg[1]); |
| @@ -2838,7 +2836,6 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba) · 47 unmodified lines | |||
| 2838 | printk(KERN_ERR "%s: Could not allocate reply pool\n", pHba->name); | 2836 | printk(KERN_ERR "%s: Could not allocate reply pool\n", pHba->name); |
| 2839 | return -ENOMEM; | 2837 | return -ENOMEM; |
| 2840 | } | 2838 | } |
| 2841 | memset(pHba->reply_pool, 0 , pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4); | ||
| 2842 | 2839 | ||
| 2843 | for(i = 0; i < pHba->reply_fifo_size; i++) { | 2840 | for(i = 0; i < pHba->reply_fifo_size; i++) { |
| 2844 | writel(pHba->reply_pool_pa + (i * REPLY_FRAME_SIZE * 4), | 2841 | writel(pHba->reply_pool_pa + (i * REPLY_FRAME_SIZE * 4), |
| @@ -3073,7 +3070,6 @@ static int adpt_i2o_build_sys_table(void) · 228 unmodified lines | |||
| 3073 | printk(KERN_WARNING "SysTab Set failed. Out of memory.\n"); | 3070 | printk(KERN_WARNING "SysTab Set failed. Out of memory.\n"); |
| 3074 | return -ENOMEM; | 3071 | return -ENOMEM; |
| 3075 | } | 3072 | } |
| 3076 | memset(sys_tbl, 0, sys_tbl_len); | ||
| 3077 | 3073 | ||
| 3078 | sys_tbl->num_entries = hba_count; | 3074 | sys_tbl->num_entries = hba_count; |
| 3079 | sys_tbl->version = I2OVERSION; | 3075 | sys_tbl->version = I2OVERSION; |
| @@ -1225,8 +1225,9 @@ static inline void esas2r_rq_init_request(struct esas2r_request *rq, · 1224 unmodified lines | |||
| 1225 | 1225 | ||
| 1226 | /* req_table entry should be NULL at this point - if not, halt */ | 1226 | /* req_table entry should be NULL at this point - if not, halt */ |
| 1227 | 1227 | ||
| 1228 | if (a->req_table[LOWORD(vrq->scsi.handle)]) | 1228 | if (a->req_table[LOWORD(vrq->scsi.handle)]) { |
| 1229 | esas2r_bugon(); | 1229 | esas2r_bugon(); |
| 1230 | } | ||
| 1230 | 1231 | ||
| 1231 | /* fill in the table for this handle so we can get back to the | 1232 | /* fill in the table for this handle so we can get back to the |
| 1232 | * request. | 1233 | * request. |
| @@ -75,7 +75,7 @@ static char event_buffer[EVENT_LOG_BUFF_SIZE]; · 74 unmodified lines | |||
| 75 | /* A lock to protect the shared buffer used for formatting messages. */ | 75 | /* A lock to protect the shared buffer used for formatting messages. */ |
| 76 | static DEFINE_SPINLOCK(event_buffer_lock); | 76 | static DEFINE_SPINLOCK(event_buffer_lock); |
| 77 | 77 | ||
| 78 | /** | 78 | /* |
| 79 | * translates an esas2r-defined logging event level to a kernel logging level. | 79 | * translates an esas2r-defined logging event level to a kernel logging level. |
| 80 | * | 80 | * |
| 81 | * @param [in] level the esas2r-defined logging event level to translate | 81 | * @param [in] level the esas2r-defined logging event level to translate |
| @@ -101,7 +101,7 @@ static const char *translate_esas2r_event_level_to_kernel(const long level) · 19 unmodified lines | |||
| 101 | } | 101 | } |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | /** | 104 | /* |
| 105 | * the master logging function. this function will format the message as | 105 | * the master logging function. this function will format the message as |
| 106 | * outlined by the formatting string, the input device information and the | 106 | * outlined by the formatting string, the input device information and the |
| 107 | * substitution arguments and output the resulting string to the system log. | 107 | * substitution arguments and output the resulting string to the system log. |
| @@ -170,7 +170,7 @@ static int esas2r_log_master(const long level, · 62 unmodified lines | |||
| 170 | return 0; | 170 | return 0; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | /** | 173 | /* |
| 174 | * formats and logs a message to the system log. | 174 | * formats and logs a message to the system log. |
| 175 | * | 175 | * |
| 176 | * @param [in] level the event level of the message | 176 | * @param [in] level the event level of the message |
| @@ -193,7 +193,7 @@ int esas2r_log(const long level, const char *format, ...) · 16 unmodified lines | |||
| 193 | return retval; | 193 | return retval; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | /** | 196 | /* |
| 197 | * formats and logs a message to the system log. this message will include | 197 | * formats and logs a message to the system log. this message will include |
| 198 | * device information. | 198 | * device information. |
| 199 | * | 199 | * |
| @@ -221,7 +221,7 @@ int esas2r_log_dev(const long level, · 21 unmodified lines | |||
| 221 | return retval; | 221 | return retval; |
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | /** | 224 | /* |
| 225 | * formats and logs a message to the system log. this message will include | 225 | * formats and logs a message to the system log. this message will include |
| 226 | * device information. | 226 | * device information. |
| 227 | * | 227 | * |
| @@ -645,7 +645,7 @@ static int fcoe_lport_config(struct fc_lport *lport) · 644 unmodified lines | |||
| 645 | return 0; | 645 | return 0; |
| 646 | } | 646 | } |
| 647 | 647 | ||
| 648 | /** | 648 | /* |
| 649 | * fcoe_netdev_features_change - Updates the lport's offload flags based | 649 | * fcoe_netdev_features_change - Updates the lport's offload flags based |
| 650 | * on the LLD netdev's FCoE feature flags | 650 | * on the LLD netdev's FCoE feature flags |
| 651 | */ | 651 | */ |
| @@ -2029,7 +2029,7 @@ static int fcoe_ctlr_enabled(struct fcoe_ctlr_device *cdev) · 1377 unmodified lines | |||
| 2029 | 2029 | ||
| 2030 | /** | 2030 | /** |
| 2031 | * fcoe_ctlr_mode() - Switch FIP mode | 2031 | * fcoe_ctlr_mode() - Switch FIP mode |
| 2032 | * @cdev: The FCoE Controller that is being modified | 2032 | * @ctlr_dev: The FCoE Controller that is being modified |
| 2033 | * | 2033 | * |
| 2034 | * When the FIP mode has been changed we need to update | 2034 | * When the FIP mode has been changed we need to update |
| 2035 | * the multicast addresses to ensure we get the correct | 2035 | * the multicast addresses to ensure we get the correct |
| @@ -2136,9 +2136,7 @@ static bool fcoe_match(struct net_device *netdev) · 100 unmodified lines | |||
| 2136 | 2136 | ||
| 2137 | /** | 2137 | /** |
| 2138 | * fcoe_dcb_create() - Initialize DCB attributes and hooks | 2138 | * fcoe_dcb_create() - Initialize DCB attributes and hooks |
| 2139 | * @netdev: The net_device object of the L2 link that should be queried | 2139 | * @fcoe: The new FCoE interface |
| 2140 | * @port: The fcoe_port to bind FCoE APP priority with | ||
| 2141 | * @ | ||
| 2142 | */ | 2140 | */ |
| 2143 | static void fcoe_dcb_create(struct fcoe_interface *fcoe) | 2141 | static void fcoe_dcb_create(struct fcoe_interface *fcoe) |
| 2144 | { | 2142 | { |
| @@ -2609,7 +2607,7 @@ static void fcoe_logo_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg) · 464 unmodified lines | |||
| 2609 | fc_lport_logo_resp(seq, fp, lport); | 2607 | fc_lport_logo_resp(seq, fp, lport); |
| 2610 | } | 2608 | } |
| 2611 | 2609 | ||
| 2612 | /** | 2610 | /* |
| 2613 | * fcoe_elsct_send - FCoE specific ELS handler | 2611 | * fcoe_elsct_send - FCoE specific ELS handler |
| 2614 | * | 2612 | * |
| 2615 | * This does special case handling of FIP encapsualted ELS exchanges for FCoE, | 2613 | * This does special case handling of FIP encapsualted ELS exchanges for FCoE, |
| @@ -134,6 +134,7 @@ static void fcoe_ctlr_map_dest(struct fcoe_ctlr *fip) · 133 unmodified lines | |||
| 134 | /** | 134 | /** |
| 135 | * fcoe_ctlr_init() - Initialize the FCoE Controller instance | 135 | * fcoe_ctlr_init() - Initialize the FCoE Controller instance |
| 136 | * @fip: The FCoE controller to initialize | 136 | * @fip: The FCoE controller to initialize |
| 137 | * @mode: FIP mode to set | ||
| 137 | */ | 138 | */ |
| 138 | void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_mode mode) | 139 | void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_mode mode) |
| 139 | { | 140 | { |
| @@ -336,7 +337,7 @@ static void fcoe_ctlr_announce(struct fcoe_ctlr *fip) · 196 unmodified lines | |||
| 336 | printk(KERN_NOTICE "libfcoe: host%d: " | 337 | printk(KERN_NOTICE "libfcoe: host%d: " |
| 337 | "FIP Fibre-Channel Forwarder MAC %pM deselected\n", | 338 | "FIP Fibre-Channel Forwarder MAC %pM deselected\n", |
| 338 | fip->lp->host->host_no, fip->dest_addr); | 339 | fip->lp->host->host_no, fip->dest_addr); |
| 339 | memset(fip->dest_addr, 0, ETH_ALEN); | 340 | eth_zero_addr(fip->dest_addr); |
| 340 | } | 341 | } |
| 341 | if (sel) { | 342 | if (sel) { |
| 342 | printk(KERN_INFO "libfcoe: host%d: FIP selected " | 343 | printk(KERN_INFO "libfcoe: host%d: FIP selected " |
| @@ -587,6 +588,7 @@ static void fcoe_ctlr_send_keep_alive(struct fcoe_ctlr *fip, · 244 unmodified lines | |||
| 587 | /** | 588 | /** |
| 588 | * fcoe_ctlr_encaps() - Encapsulate an ELS frame for FIP, without sending it | 589 | * fcoe_ctlr_encaps() - Encapsulate an ELS frame for FIP, without sending it |
| 589 | * @fip: The FCoE controller for the ELS frame | 590 | * @fip: The FCoE controller for the ELS frame |
| 591 | * @lport: The local port | ||
| 590 | * @dtype: The FIP descriptor type for the frame | 592 | * @dtype: The FIP descriptor type for the frame |
| 591 | * @skb: The FCoE ELS frame including FC header but no FCoE headers | 593 | * @skb: The FCoE ELS frame including FC header but no FCoE headers |
| 592 | * @d_id: The destination port ID. | 594 | * @d_id: The destination port ID. |
| @@ -1302,7 +1304,7 @@ drop: · 709 unmodified lines | |||
| 1302 | /** | 1304 | /** |
| 1303 | * fcoe_ctlr_recv_els() - Handle an incoming link reset frame | 1305 | * fcoe_ctlr_recv_els() - Handle an incoming link reset frame |
| 1304 | * @fip: The FCoE controller that received the frame | 1306 | * @fip: The FCoE controller that received the frame |
| 1305 | * @fh: The received FIP header | 1307 | * @skb: The received FIP packet |
| 1306 | * | 1308 | * |
| 1307 | * There may be multiple VN_Port descriptors. | 1309 | * There may be multiple VN_Port descriptors. |
| 1308 | * The overall length has already been checked. | 1310 | * The overall length has already been checked. |
| @@ -1775,7 +1777,7 @@ unlock: · 466 unmodified lines | |||
| 1775 | 1777 | ||
| 1776 | /** | 1778 | /** |
| 1777 | * fcoe_ctlr_timeout() - FIP timeout handler | 1779 | * fcoe_ctlr_timeout() - FIP timeout handler |
| 1778 | * @arg: The FCoE controller that timed out | 1780 | * @t: Timer context use to obtain the controller reference |
| 1779 | */ | 1781 | */ |
| 1780 | static void fcoe_ctlr_timeout(struct timer_list *t) | 1782 | static void fcoe_ctlr_timeout(struct timer_list *t) |
| 1781 | { | 1783 | { |
| @@ -1887,6 +1889,7 @@ static void fcoe_ctlr_recv_work(struct work_struct *recv_work) · 105 unmodified lines | |||
| 1887 | /** | 1889 | /** |
| 1888 | * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response | 1890 | * fcoe_ctlr_recv_flogi() - Snoop pre-FIP receipt of FLOGI response |
| 1889 | * @fip: The FCoE controller | 1891 | * @fip: The FCoE controller |
| 1892 | * @lport: The local port | ||
| 1890 | * @fp: The FC frame to snoop | 1893 | * @fp: The FC frame to snoop |
| 1891 | * | 1894 | * |
| 1892 | * Snoop potential response to FLOGI or even incoming FLOGI. | 1895 | * Snoop potential response to FLOGI or even incoming FLOGI. |
| @@ -2158,7 +2161,7 @@ static struct fc_rport_operations fcoe_ctlr_vn_rport_ops = { · 265 unmodified lines | |||
| 2158 | 2161 | ||
| 2159 | /** | 2162 | /** |
| 2160 | * fcoe_ctlr_disc_stop_locked() - stop discovery in VN2VN mode | 2163 | * fcoe_ctlr_disc_stop_locked() - stop discovery in VN2VN mode |
| 2161 | * @fip: The FCoE controller | 2164 | * @lport: The local port |
| 2162 | * | 2165 | * |
| 2163 | * Called with ctlr_mutex held. | 2166 | * Called with ctlr_mutex held. |
| 2164 | */ | 2167 | */ |
| @@ -2179,7 +2182,7 @@ static void fcoe_ctlr_disc_stop_locked(struct fc_lport *lport) · 14 unmodified lines | |||
| 2179 | 2182 | ||
| 2180 | /** | 2183 | /** |
| 2181 | * fcoe_ctlr_disc_stop() - stop discovery in VN2VN mode | 2184 | * fcoe_ctlr_disc_stop() - stop discovery in VN2VN mode |
| 2182 | * @fip: The FCoE controller | 2185 | * @lport: The local port |
| 2183 | * | 2186 | * |
| 2184 | * Called through the local port template for discovery. | 2187 | * Called through the local port template for discovery. |
| 2185 | * Called without the ctlr_mutex held. | 2188 | * Called without the ctlr_mutex held. |
| @@ -2195,7 +2198,7 @@ static void fcoe_ctlr_disc_stop(struct fc_lport *lport) · 9 unmodified lines | |||
| 2195 | 2198 | ||
| 2196 | /** | 2199 | /** |
| 2197 | * fcoe_ctlr_disc_stop_final() - stop discovery for shutdown in VN2VN mode | 2200 | * fcoe_ctlr_disc_stop_final() - stop discovery for shutdown in VN2VN mode |
| 2198 | * @fip: The FCoE controller | 2201 | * @lport: The local port |
| 2199 | * | 2202 | * |
| 2200 | * Called through the local port template for discovery. | 2203 | * Called through the local port template for discovery. |
| 2201 | * Called without the ctlr_mutex held. | 2204 | * Called without the ctlr_mutex held. |
| @@ -2262,7 +2265,7 @@ static void fcoe_ctlr_vn_start(struct fcoe_ctlr *fip) · 60 unmodified lines | |||
| 2262 | * fcoe_ctlr_vn_parse - parse probe request or response | 2265 | * fcoe_ctlr_vn_parse - parse probe request or response |
| 2263 | * @fip: The FCoE controller | 2266 | * @fip: The FCoE controller |
| 2264 | * @skb: incoming packet | 2267 | * @skb: incoming packet |
| 2265 | * @rdata: buffer for resulting parsed VN entry plus fcoe_rport | 2268 | * @frport: parsed FCoE rport from the probe request |
| 2266 | * | 2269 | * |
| 2267 | * Returns non-zero error number on error. | 2270 | * Returns non-zero error number on error. |
| 2268 | * Does not consume the packet. | 2271 | * Does not consume the packet. |
| @@ -2793,7 +2796,7 @@ drop: · 524 unmodified lines | |||
| 2793 | * fcoe_ctlr_vlan_parse - parse vlan discovery request or response | 2796 | * fcoe_ctlr_vlan_parse - parse vlan discovery request or response |
| 2794 | * @fip: The FCoE controller | 2797 | * @fip: The FCoE controller |
| 2795 | * @skb: incoming packet | 2798 | * @skb: incoming packet |
| 2796 | * @rdata: buffer for resulting parsed VLAN entry plus fcoe_rport | 2799 | * @frport: parsed FCoE rport from the probe request |
| 2797 | * | 2800 | * |
| 2798 | * Returns non-zero error number on error. | 2801 | * Returns non-zero error number on error. |
| 2799 | * Does not consume the packet. | 2802 | * Does not consume the packet. |
| @@ -2892,7 +2895,6 @@ len_err: · 92 unmodified lines | |||
| 2892 | * @fip: The FCoE controller | 2895 | * @fip: The FCoE controller |
| 2893 | * @sub: sub-opcode for vlan notification or vn2vn vlan notification | 2896 | * @sub: sub-opcode for vlan notification or vn2vn vlan notification |
| 2894 | * @dest: The destination Ethernet MAC address | 2897 | * @dest: The destination Ethernet MAC address |
| 2895 | * @min_len: minimum size of the Ethernet payload to be sent | ||
| 2896 | */ | 2898 | */ |
| 2897 | static void fcoe_ctlr_vlan_send(struct fcoe_ctlr *fip, | 2899 | static void fcoe_ctlr_vlan_send(struct fcoe_ctlr *fip, |
| 2898 | enum fip_vlan_subcode sub, | 2900 | enum fip_vlan_subcode sub, |
| @@ -2969,9 +2971,8 @@ static void fcoe_ctlr_vlan_disc_reply(struct fcoe_ctlr *fip, · 70 unmodified lines | |||
| 2969 | 2971 | ||
| 2970 | /** | 2972 | /** |
| 2971 | * fcoe_ctlr_vlan_recv - vlan request receive handler for VN2VN mode. | 2973 | * fcoe_ctlr_vlan_recv - vlan request receive handler for VN2VN mode. |
| 2972 | * @lport: The local port | 2974 | * @fip: The FCoE controller |
| 2973 | * @fp: The received frame | 2975 | * @skb: The received FIP packet |
| 2974 | * | ||
| 2975 | */ | 2976 | */ |
| 2976 | static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb) | 2977 | static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb) |
| 2977 | { | 2978 | { |
| @@ -3015,9 +3016,8 @@ static void fcoe_ctlr_disc_recv(struct fc_lport *lport, struct fc_frame *fp) · 37 unmodified lines | |||
| 3015 | fc_frame_free(fp); | 3016 | fc_frame_free(fp); |
| 3016 | } | 3017 | } |
| 3017 | 3018 | ||
| 3018 | /** | 3019 | /* |
| 3019 | * fcoe_ctlr_disc_recv - start discovery for VN2VN mode. | 3020 | * fcoe_ctlr_disc_start - start discovery for VN2VN mode. |
| 3020 | * @fip: The FCoE controller | ||
| 3021 | * | 3021 | * |
| 3022 | * This sets a flag indicating that remote ports should be created | 3022 | * This sets a flag indicating that remote ports should be created |
| 3023 | * and started for the peers we discover. We use the disc_callback | 3023 | * and started for the peers we discover. We use the disc_callback |
| @@ -382,6 +382,7 @@ EXPORT_SYMBOL_GPL(fcoe_clean_pending_queue); · 381 unmodified lines | |||
| 382 | /** | 382 | /** |
| 383 | * fcoe_check_wait_queue() - Attempt to clear the transmit backlog | 383 | * fcoe_check_wait_queue() - Attempt to clear the transmit backlog |
| 384 | * @lport: The local port whose backlog is to be cleared | 384 | * @lport: The local port whose backlog is to be cleared |
| 385 | * @skb: The received FIP packet | ||
| 385 | * | 386 | * |
| 386 | * This empties the wait_queue, dequeues the head of the wait_queue queue | 387 | * This empties the wait_queue, dequeues the head of the wait_queue queue |
| 387 | * and calls fcoe_start_io() for each packet. If all skb have been | 388 | * and calls fcoe_start_io() for each packet. If all skb have been |
| @@ -439,7 +440,7 @@ EXPORT_SYMBOL_GPL(fcoe_check_wait_queue); · 51 unmodified lines | |||
| 439 | 440 | ||
| 440 | /** | 441 | /** |
| 441 | * fcoe_queue_timer() - The fcoe queue timer | 442 | * fcoe_queue_timer() - The fcoe queue timer |
| 442 | * @lport: The local port | 443 | * @t: Timer context use to obtain the FCoE port |
| 443 | * | 444 | * |
| 444 | * Calls fcoe_check_wait_queue on timeout | 445 | * Calls fcoe_check_wait_queue on timeout |
| 445 | */ | 446 | */ |
| @@ -672,6 +673,7 @@ static void fcoe_del_netdev_mapping(struct net_device *netdev) · 226 unmodified lines | |||
| 672 | /** | 673 | /** |
| 673 | * fcoe_netdev_map_lookup - find the fcoe transport that matches the netdev on which | 674 | * fcoe_netdev_map_lookup - find the fcoe transport that matches the netdev on which |
| 674 | * it was created | 675 | * it was created |
| 676 | * @netdev: The net device that the FCoE interface is on | ||
| 675 | * | 677 | * |
| 676 | * Returns : ptr to the fcoe transport that supports this netdev or NULL | 678 | * Returns : ptr to the fcoe transport that supports this netdev or NULL |
| 677 | * if not found. | 679 | * if not found. |
| @@ -103,7 +103,7 @@ enum { · 102 unmodified lines | |||
| 103 | #define REG_FIFO_COUNT 14 /* R: FIFO Data Count */ | 103 | #define REG_FIFO_COUNT 14 /* R: FIFO Data Count */ |
| 104 | 104 | ||
| 105 | #ifdef CONFIG_PM_SLEEP | 105 | #ifdef CONFIG_PM_SLEEP |
| 106 | static const struct dev_pm_ops fdomain_pm_ops; | 106 | static const struct dev_pm_ops __maybe_unused fdomain_pm_ops; |
| 107 | #define FDOMAIN_PM_OPS (&fdomain_pm_ops) | 107 | #define FDOMAIN_PM_OPS (&fdomain_pm_ops) |
| 108 | #else | 108 | #else |
| 109 | #define FDOMAIN_PM_OPS NULL | 109 | #define FDOMAIN_PM_OPS NULL |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | |||
| 23 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
| 24 | #include <linux/skbuff.h> | 24 | #include <linux/skbuff.h> |
| 25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
| 26 | #include <linux/etherdevice.h> | ||
| 26 | #include <linux/if_ether.h> | 27 | #include <linux/if_ether.h> |
| 27 | #include <linux/if_vlan.h> | 28 | #include <linux/if_vlan.h> |
| 28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
| @@ -275,7 +276,7 @@ int fnic_flogi_reg_handler(struct fnic *fnic, u32 fc_id) · 246 unmodified lines | |||
| 275 | } | 276 | } |
| 276 | 277 | ||
| 277 | if (fnic->ctlr.map_dest) { | 278 | if (fnic->ctlr.map_dest) { |
| 278 | memset(gw_mac, 0xff, ETH_ALEN); | 279 | eth_broadcast_addr(gw_mac); |
| 279 | format = FCPIO_FLOGI_REG_DEF_DEST; | 280 | format = FCPIO_FLOGI_REG_DEF_DEST; |
| 280 | } else { | 281 | } else { |
| 281 | memcpy(gw_mac, fnic->ctlr.dest_addr, ETH_ALEN); | 282 | memcpy(gw_mac, fnic->ctlr.dest_addr, ETH_ALEN); |
| @@ -1258,8 +1258,10 @@ static void slot_complete_v1_hw(struct hisi_hba *hisi_hba, · 1257 unmodified lines | |||
| 1258 | !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) { | 1258 | !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) { |
| 1259 | 1259 | ||
| 1260 | slot_err_v1_hw(hisi_hba, task, slot); | 1260 | slot_err_v1_hw(hisi_hba, task, slot); |
| 1261 | if (unlikely(slot->abort)) | 1261 | if (unlikely(slot->abort)) { |
| 1262 | sas_task_abort(task); | ||
| 1262 | return; | 1263 | return; |
| 1264 | } | ||
| 1263 | goto out; | 1265 | goto out; |
| 1264 | } | 1266 | } |
| 1265 | 1267 | ||
| @@ -2404,8 +2404,10 @@ static void slot_complete_v2_hw(struct hisi_hba *hisi_hba, · 2403 unmodified lines | |||
| 2404 | error_info[0], error_info[1], | 2404 | error_info[0], error_info[1], |
| 2405 | error_info[2], error_info[3]); | 2405 | error_info[2], error_info[3]); |
| 2406 | 2406 | ||
| 2407 | if (unlikely(slot->abort)) | 2407 | if (unlikely(slot->abort)) { |
| 2408 | sas_task_abort(task); | ||
| 2408 | return; | 2409 | return; |
| 2410 | } | ||
| 2409 | goto out; | 2411 | goto out; |
| 2410 | } | 2412 | } |
| 2411 | 2413 | ||
| @@ -3300,7 +3302,7 @@ static irq_handler_t fatal_interrupts[HISI_SAS_FATAL_INT_NR] = { · 888 unmodified lines | |||
| 3300 | fatal_axi_int_v2_hw | 3302 | fatal_axi_int_v2_hw |
| 3301 | }; | 3303 | }; |
| 3302 | 3304 | ||
| 3303 | /** | 3305 | /* |
| 3304 | * There is a limitation in the hip06 chipset that we need | 3306 | * There is a limitation in the hip06 chipset that we need |
| 3305 | * to map in all mbigen interrupts, even if they are not used. | 3307 | * to map in all mbigen interrupts, even if they are not used. |
| 3306 | */ | 3308 | */ |
| @@ -2235,8 +2235,10 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba, · 2234 unmodified lines | |||
| 2235 | dw0, dw1, complete_hdr->act, dw3, | 2235 | dw0, dw1, complete_hdr->act, dw3, |
| 2236 | error_info[0], error_info[1], | 2236 | error_info[0], error_info[1], |
| 2237 | error_info[2], error_info[3]); | 2237 | error_info[2], error_info[3]); |
| 2238 | if (unlikely(slot->abort)) | 2238 | if (unlikely(slot->abort)) { |
| 2239 | sas_task_abort(task); | ||
| 2239 | return; | 2240 | return; |
| 2241 | } | ||
| 2240 | goto out; | 2242 | goto out; |
| 2241 | } | 2243 | } |
| 2242 | 2244 | ||
| @@ -272,8 +272,10 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev, · 271 unmodified lines | |||
| 272 | if (shost->transportt->create_work_queue) { | 272 | if (shost->transportt->create_work_queue) { |
| 273 | snprintf(shost->work_q_name, sizeof(shost->work_q_name), | 273 | snprintf(shost->work_q_name, sizeof(shost->work_q_name), |
| 274 | "scsi_wq_%d", shost->host_no); | 274 | "scsi_wq_%d", shost->host_no); |
| 275 | shost->work_q = create_singlethread_workqueue( | 275 | shost->work_q = alloc_workqueue("%s", |
| 276 | shost->work_q_name); | 276 | WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, |
| 277 | 1, shost->work_q_name); | ||
| 278 | |||
| 277 | if (!shost->work_q) { | 279 | if (!shost->work_q) { |
| 278 | error = -EINVAL; | 280 | error = -EINVAL; |
| 279 | goto out_free_shost_data; | 281 | goto out_free_shost_data; |
| @@ -487,7 +489,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) · 207 unmodified lines | |||
| 487 | } | 489 | } |
| 488 | 490 | ||
| 489 | shost->tmf_work_q = alloc_workqueue("scsi_tmf_%d", | 491 | shost->tmf_work_q = alloc_workqueue("scsi_tmf_%d", |
| 490 | WQ_UNBOUND | WQ_MEM_RECLAIM, | 492 | WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS, |
| 491 | 1, shost->host_no); | 493 | 1, shost->host_no); |
| 492 | if (!shost->tmf_work_q) { | 494 | if (!shost->tmf_work_q) { |
| 493 | shost_printk(KERN_WARNING, shost, | 495 | shost_printk(KERN_WARNING, shost, |
| @@ -59,7 +59,7 @@ · 58 unmodified lines | |||
| 59 | * HPSA_DRIVER_VERSION must be 3 byte values (0-255) separated by '.' | 59 | * HPSA_DRIVER_VERSION must be 3 byte values (0-255) separated by '.' |
| 60 | * with an optional trailing '-' followed by a byte value (0-255). | 60 | * with an optional trailing '-' followed by a byte value (0-255). |
| 61 | */ | 61 | */ |
| 62 | #define HPSA_DRIVER_VERSION "3.4.20-170" | 62 | #define HPSA_DRIVER_VERSION "3.4.20-200" |
| 63 | #define DRIVER_NAME "HP HPSA Driver (v " HPSA_DRIVER_VERSION ")" | 63 | #define DRIVER_NAME "HP HPSA Driver (v " HPSA_DRIVER_VERSION ")" |
| 64 | #define HPSA "hpsa" | 64 | #define HPSA "hpsa" |
| 65 | 65 | ||
| @@ -2134,6 +2134,7 @@ static int hpsa_slave_alloc(struct scsi_device *sdev) · 2068 unmodified lines | |||
| 2134 | } | 2134 | } |
| 2135 | 2135 | ||
| 2136 | /* configure scsi device based on internal per-device structure */ | 2136 | /* configure scsi device based on internal per-device structure */ |
| 2137 | #define CTLR_TIMEOUT (120 * HZ) | ||
| 2137 | static int hpsa_slave_configure(struct scsi_device *sdev) | 2138 | static int hpsa_slave_configure(struct scsi_device *sdev) |
| 2138 | { | 2139 | { |
| 2139 | struct hpsa_scsi_dev_t *sd; | 2140 | struct hpsa_scsi_dev_t *sd; |
| @@ -2144,17 +2145,21 @@ static int hpsa_slave_configure(struct scsi_device *sdev) · 4 unmodified lines | |||
| 2144 | 2145 | ||
| 2145 | if (sd) { | 2146 | if (sd) { |
| 2146 | sd->was_removed = 0; | 2147 | sd->was_removed = 0; |
| 2148 | queue_depth = sd->queue_depth != 0 ? | ||
| 2149 | sd->queue_depth : sdev->host->can_queue; | ||
| 2147 | if (sd->external) { | 2150 | if (sd->external) { |
| 2148 | queue_depth = EXTERNAL_QD; | 2151 | queue_depth = EXTERNAL_QD; |
| 2149 | sdev->eh_timeout = HPSA_EH_PTRAID_TIMEOUT; | 2152 | sdev->eh_timeout = HPSA_EH_PTRAID_TIMEOUT; |
| 2150 | blk_queue_rq_timeout(sdev->request_queue, | 2153 | blk_queue_rq_timeout(sdev->request_queue, |
| 2151 | HPSA_EH_PTRAID_TIMEOUT); | 2154 | HPSA_EH_PTRAID_TIMEOUT); |
| 2152 | } else { | ||
| 2153 | queue_depth = sd->queue_depth != 0 ? | ||
| 2154 | sd->queue_depth : sdev->host->can_queue; | ||
| 2155 | } | 2155 | } |
| 2156 | } else | 2156 | if (is_hba_lunid(sd->scsi3addr)) { |
| 2157 | sdev->eh_timeout = CTLR_TIMEOUT; | ||
| 2158 | blk_queue_rq_timeout(sdev->request_queue, CTLR_TIMEOUT); | ||
| 2159 | } | ||
| 2160 | } else { | ||
| 2157 | queue_depth = sdev->host->can_queue; | 2161 | queue_depth = sdev->host->can_queue; |
| 2162 | } | ||
| 2158 | 2163 | ||
| 2159 | scsi_change_queue_depth(sdev, queue_depth); | 2164 | scsi_change_queue_depth(sdev, queue_depth); |
| 2160 | 2165 | ||
| @@ -3443,9 +3448,14 @@ static void hpsa_get_enclosure_info(struct ctlr_info *h, · 1282 unmodified lines | |||
| 3443 | struct ErrorInfo *ei = NULL; | 3448 | struct ErrorInfo *ei = NULL; |
| 3444 | struct bmic_sense_storage_box_params *bssbp = NULL; | 3449 | struct bmic_sense_storage_box_params *bssbp = NULL; |
| 3445 | struct bmic_identify_physical_device *id_phys = NULL; | 3450 | struct bmic_identify_physical_device *id_phys = NULL; |
| 3446 | struct ext_report_lun_entry *rle = &rlep->LUN[rle_index]; | 3451 | struct ext_report_lun_entry *rle; |
| 3447 | u16 bmic_device_index = 0; | 3452 | u16 bmic_device_index = 0; |
| 3448 | 3453 | ||
| 3454 | if (rle_index < 0 || rle_index >= HPSA_MAX_PHYS_LUN) | ||
| 3455 | return; | ||
| 3456 | |||
| 3457 | rle = &rlep->LUN[rle_index]; | ||
| 3458 | |||
| 3449 | encl_dev->eli = | 3459 | encl_dev->eli = |
| 3450 | hpsa_get_enclosure_logical_identifier(h, scsi3addr); | 3460 | hpsa_get_enclosure_logical_identifier(h, scsi3addr); |
| 3451 | 3461 | ||
| @@ -4174,6 +4184,9 @@ static void hpsa_get_ioaccel_drive_info(struct ctlr_info *h, · 722 unmodified lines | |||
| 4174 | int rc; | 4184 | int rc; |
| 4175 | struct ext_report_lun_entry *rle; | 4185 | struct ext_report_lun_entry *rle; |
| 4176 | 4186 | ||
| 4187 | if (rle_index < 0 || rle_index >= HPSA_MAX_PHYS_LUN) | ||
| 4188 | return; | ||
| 4189 | |||
| 4177 | rle = &rlep->LUN[rle_index]; | 4190 | rle = &rlep->LUN[rle_index]; |
| 4178 | 4191 | ||
| 4179 | dev->ioaccel_handle = rle->ioaccel_handle; | 4192 | dev->ioaccel_handle = rle->ioaccel_handle; |
| @@ -4198,7 +4211,12 @@ static void hpsa_get_path_info(struct hpsa_scsi_dev_t *this_device, · 18 unmodified lines | |||
| 4198 | struct ReportExtendedLUNdata *rlep, int rle_index, | 4211 | struct ReportExtendedLUNdata *rlep, int rle_index, |
| 4199 | struct bmic_identify_physical_device *id_phys) | 4212 | struct bmic_identify_physical_device *id_phys) |
| 4200 | { | 4213 | { |
| 4201 | struct ext_report_lun_entry *rle = &rlep->LUN[rle_index]; | 4214 | struct ext_report_lun_entry *rle; |
| 4215 | |||
| 4216 | if (rle_index < 0 || rle_index >= HPSA_MAX_PHYS_LUN) | ||
| 4217 | return; | ||
| 4218 | |||
| 4219 | rle = &rlep->LUN[rle_index]; | ||
| 4202 | 4220 | ||
| 4203 | if ((rle->device_flags & 0x08) && this_device->ioaccel_handle) | 4221 | if ((rle->device_flags & 0x08) && this_device->ioaccel_handle) |
| 4204 | this_device->hba_ioaccel_enabled = 1; | 4222 | this_device->hba_ioaccel_enabled = 1; |
| @@ -4420,7 +4438,8 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h) · 215 unmodified lines | |||
| 4420 | /* | 4438 | /* |
| 4421 | * Skip over some devices such as a spare. | 4439 | * Skip over some devices such as a spare. |
| 4422 | */ | 4440 | */ |
| 4423 | if (!tmpdevice->external && physical_device) { | 4441 | if (phys_dev_index >= 0 && !tmpdevice->external && |
| 4442 | physical_device) { | ||
| 4424 | skip_device = hpsa_skip_device(h, lunaddrbytes, | 4443 | skip_device = hpsa_skip_device(h, lunaddrbytes, |
| 4425 | &physdev_list->LUN[phys_dev_index]); | 4444 | &physdev_list->LUN[phys_dev_index]); |
| 4426 | if (skip_device) | 4445 | if (skip_device) |
| @@ -57,7 +57,7 @@ struct hpsa_sas_phy { · 56 unmodified lines | |||
| 57 | bool added_to_port; | 57 | bool added_to_port; |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | #define EXTERNAL_QD 7 | 60 | #define EXTERNAL_QD 128 |
| 61 | struct hpsa_scsi_dev_t { | 61 | struct hpsa_scsi_dev_t { |
| 62 | unsigned int devtype; | 62 | unsigned int devtype; |
| 63 | int bus, target, lun; /* as presented to the OS */ | 63 | int bus, target, lun; /* as presented to the OS */ |
| @@ -1344,7 +1344,7 @@ static void ibmvfc_map_sg_list(struct scsi_cmnd *scmd, int nseg, · 1343 unmodified lines | |||
| 1344 | } | 1344 | } |
| 1345 | 1345 | ||
| 1346 | /** | 1346 | /** |
| 1347 | * ibmvfc_map_sg_data - Maps dma for a scatterlist and initializes decriptor fields | 1347 | * ibmvfc_map_sg_data - Maps dma for a scatterlist and initializes descriptor fields |
| 1348 | * @scmd: struct scsi_cmnd with the scatterlist | 1348 | * @scmd: struct scsi_cmnd with the scatterlist |
| 1349 | * @evt: ibmvfc event struct | 1349 | * @evt: ibmvfc event struct |
| 1350 | * @vfc_cmd: vfc_cmd that contains the memory descriptor | 1350 | * @vfc_cmd: vfc_cmd that contains the memory descriptor |
| @@ -669,7 +669,7 @@ static int map_sg_list(struct scsi_cmnd *cmd, int nseg, · 668 unmodified lines | |||
| 669 | } | 669 | } |
| 670 | 670 | ||
| 671 | /** | 671 | /** |
| 672 | * map_sg_data: - Maps dma for a scatterlist and initializes decriptor fields | 672 | * map_sg_data: - Maps dma for a scatterlist and initializes descriptor fields |
| 673 | * @cmd: struct scsi_cmnd with the scatterlist | 673 | * @cmd: struct scsi_cmnd with the scatterlist |
| 674 | * @srp_cmd: srp_cmd that contains the memory descriptor | 674 | * @srp_cmd: srp_cmd that contains the memory descriptor |
| 675 | * @dev: device for which to map dma memory | 675 | * @dev: device for which to map dma memory |
| @@ -903,7 +903,6 @@ static int imm_engine(imm_struct *dev, struct scsi_cmnd *cmd) · 902 unmodified lines | |||
| 903 | w_ctr(ppb, 0x4); | 903 | w_ctr(ppb, 0x4); |
| 904 | } | 904 | } |
| 905 | return 0; /* Finished */ | 905 | return 0; /* Finished */ |
| 906 | break; | ||
| 907 | 906 | ||
| 908 | default: | 907 | default: |
| 909 | printk("imm: Invalid scsi phase\n"); | 908 | printk("imm: Invalid scsi phase\n"); |
| @@ -969,10 +968,8 @@ static int imm_abort(struct scsi_cmnd *cmd) · 59 unmodified lines | |||
| 969 | case 1: /* Have not connected to interface */ | 968 | case 1: /* Have not connected to interface */ |
| 970 | dev->cur_cmd = NULL; /* Forget the problem */ | 969 | dev->cur_cmd = NULL; /* Forget the problem */ |
| 971 | return SUCCESS; | 970 | return SUCCESS; |
| 972 | break; | ||
| 973 | default: /* SCSI command sent, can not abort */ | 971 | default: /* SCSI command sent, can not abort */ |
| 974 | return FAILED; | 972 | return FAILED; |
| 975 | break; | ||
| 976 | } | 973 | } |
| 977 | } | 974 | } |
| 978 | 975 | ||
| @@ -670,6 +670,7 @@ static void ipr_reinit_ipr_cmnd(struct ipr_cmnd *ipr_cmd) · 669 unmodified lines | |||
| 670 | /** | 670 | /** |
| 671 | * ipr_init_ipr_cmnd - Initialize an IPR Cmnd block | 671 | * ipr_init_ipr_cmnd - Initialize an IPR Cmnd block |
| 672 | * @ipr_cmd: ipr command struct | 672 | * @ipr_cmd: ipr command struct |
| 673 | * @fast_done: fast done function call-back | ||
| 673 | * | 674 | * |
| 674 | * Return value: | 675 | * Return value: |
| 675 | * none | 676 | * none |
| @@ -687,7 +688,7 @@ static void ipr_init_ipr_cmnd(struct ipr_cmnd *ipr_cmd, · 11 unmodified lines | |||
| 687 | 688 | ||
| 688 | /** | 689 | /** |
| 689 | * __ipr_get_free_ipr_cmnd - Get a free IPR Cmnd block | 690 | * __ipr_get_free_ipr_cmnd - Get a free IPR Cmnd block |
| 690 | * @ioa_cfg: ioa config struct | 691 | * @hrrq: hrr queue |
| 691 | * | 692 | * |
| 692 | * Return value: | 693 | * Return value: |
| 693 | * pointer to ipr command struct | 694 | * pointer to ipr command struct |
| @@ -737,7 +738,6 @@ struct ipr_cmnd *ipr_get_free_ipr_cmnd(struct ipr_ioa_cfg *ioa_cfg) · 43 unmodified lines | |||
| 737 | static void ipr_mask_and_clear_interrupts(struct ipr_ioa_cfg *ioa_cfg, | 738 | static void ipr_mask_and_clear_interrupts(struct ipr_ioa_cfg *ioa_cfg, |
| 738 | u32 clr_ints) | 739 | u32 clr_ints) |
| 739 | { | 740 | { |
| 740 | volatile u32 int_reg; | ||
| 741 | int i; | 741 | int i; |
| 742 | 742 | ||
| 743 | /* Stop new interrupts */ | 743 | /* Stop new interrupts */ |
| @@ -757,7 +757,7 @@ static void ipr_mask_and_clear_interrupts(struct ipr_ioa_cfg *ioa_cfg, · 13 unmodified lines | |||
| 757 | if (ioa_cfg->sis64) | 757 | if (ioa_cfg->sis64) |
| 758 | writel(~0, ioa_cfg->regs.clr_interrupt_reg); | 758 | writel(~0, ioa_cfg->regs.clr_interrupt_reg); |
| 759 | writel(clr_ints, ioa_cfg->regs.clr_interrupt_reg32); | 759 | writel(clr_ints, ioa_cfg->regs.clr_interrupt_reg32); |
| 760 | int_reg = readl(ioa_cfg->regs.sense_interrupt_reg); | 760 | readl(ioa_cfg->regs.sense_interrupt_reg); |
| 761 | } | 761 | } |
| 762 | 762 | ||
| 763 | /** | 763 | /** |
| @@ -1287,7 +1287,7 @@ static int ipr_is_same_device(struct ipr_resource_entry *res, · 523 unmodified lines | |||
| 1287 | /** | 1287 | /** |
| 1288 | * __ipr_format_res_path - Format the resource path for printing. | 1288 | * __ipr_format_res_path - Format the resource path for printing. |
| 1289 | * @res_path: resource path | 1289 | * @res_path: resource path |
| 1290 | * @buf: buffer | 1290 | * @buffer: buffer |
| 1291 | * @len: length of buffer provided | 1291 | * @len: length of buffer provided |
| 1292 | * | 1292 | * |
| 1293 | * Return value: | 1293 | * Return value: |
| @@ -1310,7 +1310,7 @@ static char *__ipr_format_res_path(u8 *res_path, char *buffer, int len) · 16 unmodified lines | |||
| 1310 | * ipr_format_res_path - Format the resource path for printing. | 1310 | * ipr_format_res_path - Format the resource path for printing. |
| 1311 | * @ioa_cfg: ioa config struct | 1311 | * @ioa_cfg: ioa config struct |
| 1312 | * @res_path: resource path | 1312 | * @res_path: resource path |
| 1313 | * @buf: buffer | 1313 | * @buffer: buffer |
| 1314 | * @len: length of buffer provided | 1314 | * @len: length of buffer provided |
| 1315 | * | 1315 | * |
| 1316 | * Return value: | 1316 | * Return value: |
| @@ -1391,7 +1391,6 @@ static void ipr_update_res_entry(struct ipr_resource_entry *res, · 74 unmodified lines | |||
| 1391 | * ipr_clear_res_target - Clear the bit in the bit map representing the target | 1391 | * ipr_clear_res_target - Clear the bit in the bit map representing the target |
| 1392 | * for the resource. | 1392 | * for the resource. |
| 1393 | * @res: resource entry struct | 1393 | * @res: resource entry struct |
| 1394 | * @cfgtew: config table entry wrapper struct | ||
| 1395 | * | 1394 | * |
| 1396 | * Return value: | 1395 | * Return value: |
| 1397 | * none | 1396 | * none |
| @@ -2667,7 +2666,7 @@ static void ipr_process_error(struct ipr_cmnd *ipr_cmd) · 1269 unmodified lines | |||
| 2667 | 2666 | ||
| 2668 | /** | 2667 | /** |
| 2669 | * ipr_timeout - An internally generated op has timed out. | 2668 | * ipr_timeout - An internally generated op has timed out. |
| 2670 | * @ipr_cmd: ipr command struct | 2669 | * @t: Timer context used to fetch ipr command struct |
| 2671 | * | 2670 | * |
| 2672 | * This function blocks host requests and initiates an | 2671 | * This function blocks host requests and initiates an |
| 2673 | * adapter reset. | 2672 | * adapter reset. |
| @@ -2700,7 +2699,7 @@ static void ipr_timeout(struct timer_list *t) · 26 unmodified lines | |||
| 2700 | 2699 | ||
| 2701 | /** | 2700 | /** |
| 2702 | * ipr_oper_timeout - Adapter timed out transitioning to operational | 2701 | * ipr_oper_timeout - Adapter timed out transitioning to operational |
| 2703 | * @ipr_cmd: ipr command struct | 2702 | * @t: Timer context used to fetch ipr command struct |
| 2704 | * | 2703 | * |
| 2705 | * This function blocks host requests and initiates an | 2704 | * This function blocks host requests and initiates an |
| 2706 | * adapter reset. | 2705 | * adapter reset. |
| @@ -3484,6 +3483,7 @@ static struct bin_attribute ipr_trace_attr = { · 777 unmodified lines | |||
| 3484 | /** | 3483 | /** |
| 3485 | * ipr_show_fw_version - Show the firmware version | 3484 | * ipr_show_fw_version - Show the firmware version |
| 3486 | * @dev: class device struct | 3485 | * @dev: class device struct |
| 3486 | * @attr: device attribute (unused) | ||
| 3487 | * @buf: buffer | 3487 | * @buf: buffer |
| 3488 | * | 3488 | * |
| 3489 | * Return value: | 3489 | * Return value: |
| @@ -3518,6 +3518,7 @@ static struct device_attribute ipr_fw_version_attr = { · 28 unmodified lines | |||
| 3518 | /** | 3518 | /** |
| 3519 | * ipr_show_log_level - Show the adapter's error logging level | 3519 | * ipr_show_log_level - Show the adapter's error logging level |
| 3520 | * @dev: class device struct | 3520 | * @dev: class device struct |
| 3521 | * @attr: device attribute (unused) | ||
| 3521 | * @buf: buffer | 3522 | * @buf: buffer |
| 3522 | * | 3523 | * |
| 3523 | * Return value: | 3524 | * Return value: |
| @@ -3540,7 +3541,9 @@ static ssize_t ipr_show_log_level(struct device *dev, · 16 unmodified lines | |||
| 3540 | /** | 3541 | /** |
| 3541 | * ipr_store_log_level - Change the adapter's error logging level | 3542 | * ipr_store_log_level - Change the adapter's error logging level |
| 3542 | * @dev: class device struct | 3543 | * @dev: class device struct |
| 3544 | * @attr: device attribute (unused) | ||
| 3543 | * @buf: buffer | 3545 | * @buf: buffer |
| 3546 | * @count: buffer size | ||
| 3544 | * | 3547 | * |
| 3545 | * Return value: | 3548 | * Return value: |
| 3546 | * number of bytes printed to buffer | 3549 | * number of bytes printed to buffer |
| @@ -3571,6 +3574,7 @@ static struct device_attribute ipr_log_level_attr = { · 24 unmodified lines | |||
| 3571 | /** | 3574 | /** |
| 3572 | * ipr_store_diagnostics - IOA Diagnostics interface | 3575 | * ipr_store_diagnostics - IOA Diagnostics interface |
| 3573 | * @dev: device struct | 3576 | * @dev: device struct |
| 3577 | * @attr: device attribute (unused) | ||
| 3574 | * @buf: buffer | 3578 | * @buf: buffer |
| 3575 | * @count: buffer size | 3579 | * @count: buffer size |
| 3576 | * | 3580 | * |
| @@ -3631,7 +3635,8 @@ static struct device_attribute ipr_diagnostics_attr = { · 54 unmodified lines | |||
| 3631 | 3635 | ||
| 3632 | /** | 3636 | /** |
| 3633 | * ipr_show_adapter_state - Show the adapter's state | 3637 | * ipr_show_adapter_state - Show the adapter's state |
| 3634 | * @class_dev: device struct | 3638 | * @dev: device struct |
| 3639 | * @attr: device attribute (unused) | ||
| 3635 | * @buf: buffer | 3640 | * @buf: buffer |
| 3636 | * | 3641 | * |
| 3637 | * Return value: | 3642 | * Return value: |
| @@ -3657,6 +3662,7 @@ static ssize_t ipr_show_adapter_state(struct device *dev, · 19 unmodified lines | |||
| 3657 | /** | 3662 | /** |
| 3658 | * ipr_store_adapter_state - Change adapter state | 3663 | * ipr_store_adapter_state - Change adapter state |
| 3659 | * @dev: device struct | 3664 | * @dev: device struct |
| 3665 | * @attr: device attribute (unused) | ||
| 3660 | * @buf: buffer | 3666 | * @buf: buffer |
| 3661 | * @count: buffer size | 3667 | * @count: buffer size |
| 3662 | * | 3668 | * |
| @@ -3708,6 +3714,7 @@ static struct device_attribute ipr_ioa_state_attr = { · 45 unmodified lines | |||
| 3708 | /** | 3714 | /** |
| 3709 | * ipr_store_reset_adapter - Reset the adapter | 3715 | * ipr_store_reset_adapter - Reset the adapter |
| 3710 | * @dev: device struct | 3716 | * @dev: device struct |
| 3717 | * @attr: device attribute (unused) | ||
| 3711 | * @buf: buffer | 3718 | * @buf: buffer |
| 3712 | * @count: buffer size | 3719 | * @count: buffer size |
| 3713 | * | 3720 | * |
| @@ -3749,6 +3756,7 @@ static int ipr_iopoll(struct irq_poll *iop, int budget); · 35 unmodified lines | |||
| 3749 | /** | 3756 | /** |
| 3750 | * ipr_show_iopoll_weight - Show ipr polling mode | 3757 | * ipr_show_iopoll_weight - Show ipr polling mode |
| 3751 | * @dev: class device struct | 3758 | * @dev: class device struct |
| 3759 | * @attr: device attribute (unused) | ||
| 3752 | * @buf: buffer | 3760 | * @buf: buffer |
| 3753 | * | 3761 | * |
| 3754 | * Return value: | 3762 | * Return value: |
| @@ -3772,7 +3780,9 @@ static ssize_t ipr_show_iopoll_weight(struct device *dev, · 17 unmodified lines | |||
| 3772 | /** | 3780 | /** |
| 3773 | * ipr_store_iopoll_weight - Change the adapter's polling mode | 3781 | * ipr_store_iopoll_weight - Change the adapter's polling mode |
| 3774 | * @dev: class device struct | 3782 | * @dev: class device struct |
| 3783 | * @attr: device attribute (unused) | ||
| 3775 | * @buf: buffer | 3784 | * @buf: buffer |
| 3785 | * @count: buffer size | ||
| 3776 | * | 3786 | * |
| 3777 | * Return value: | 3787 | * Return value: |
| 3778 | * number of bytes printed to buffer | 3788 | * number of bytes printed to buffer |
| @@ -3871,7 +3881,7 @@ static struct ipr_sglist *ipr_alloc_ucode_buffer(int buf_len) · 92 unmodified lines | |||
| 3871 | 3881 | ||
| 3872 | /** | 3882 | /** |
| 3873 | * ipr_free_ucode_buffer - Frees a microcode download buffer | 3883 | * ipr_free_ucode_buffer - Frees a microcode download buffer |
| 3874 | * @p_dnld: scatter/gather list pointer | 3884 | * @sglist: scatter/gather list pointer |
| 3875 | * | 3885 | * |
| 3876 | * Free a DMA'able ucode download buffer previously allocated with | 3886 | * Free a DMA'able ucode download buffer previously allocated with |
| 3877 | * ipr_alloc_ucode_buffer | 3887 | * ipr_alloc_ucode_buffer |
| @@ -4059,7 +4069,8 @@ static int ipr_update_ioa_ucode(struct ipr_ioa_cfg *ioa_cfg, · 181 unmodified lines | |||
| 4059 | 4069 | ||
| 4060 | /** | 4070 | /** |
| 4061 | * ipr_store_update_fw - Update the firmware on the adapter | 4071 | * ipr_store_update_fw - Update the firmware on the adapter |
| 4062 | * @class_dev: device struct | 4072 | * @dev: device struct |
| 4073 | * @attr: device attribute (unused) | ||
| 4063 | * @buf: buffer | 4074 | * @buf: buffer |
| 4064 | * @count: buffer size | 4075 | * @count: buffer size |
| 4065 | * | 4076 | * |
| @@ -4139,6 +4150,7 @@ static struct device_attribute ipr_update_fw_attr = { · 73 unmodified lines | |||
| 4139 | /** | 4150 | /** |
| 4140 | * ipr_show_fw_type - Show the adapter's firmware type. | 4151 | * ipr_show_fw_type - Show the adapter's firmware type. |
| 4141 | * @dev: class device struct | 4152 | * @dev: class device struct |
| 4153 | * @attr: device attribute (unused) | ||
| 4142 | * @buf: buffer | 4154 | * @buf: buffer |
| 4143 | * | 4155 | * |
| 4144 | * Return value: | 4156 | * Return value: |
| @@ -4480,7 +4492,6 @@ static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg) { return 0; }; · 335 unmodified lines | |||
| 4480 | * ipr_change_queue_depth - Change the device's queue depth | 4492 | * ipr_change_queue_depth - Change the device's queue depth |
| 4481 | * @sdev: scsi device struct | 4493 | * @sdev: scsi device struct |
| 4482 | * @qdepth: depth to set | 4494 | * @qdepth: depth to set |
| 4483 | * @reason: calling context | ||
| 4484 | * | 4495 | * |
| 4485 | * Return value: | 4496 | * Return value: |
| 4486 | * actual depth set | 4497 | * actual depth set |
| @@ -4650,6 +4661,7 @@ static struct device_attribute ipr_resource_type_attr = { · 163 unmodified lines | |||
| 4650 | /** | 4661 | /** |
| 4651 | * ipr_show_raw_mode - Show the adapter's raw mode | 4662 | * ipr_show_raw_mode - Show the adapter's raw mode |
| 4652 | * @dev: class device struct | 4663 | * @dev: class device struct |
| 4664 | * @attr: device attribute (unused) | ||
| 4653 | * @buf: buffer | 4665 | * @buf: buffer |
| 4654 | * | 4666 | * |
| 4655 | * Return value: | 4667 | * Return value: |
| @@ -4677,7 +4689,9 @@ static ssize_t ipr_show_raw_mode(struct device *dev, · 21 unmodified lines | |||
| 4677 | /** | 4689 | /** |
| 4678 | * ipr_store_raw_mode - Change the adapter's raw mode | 4690 | * ipr_store_raw_mode - Change the adapter's raw mode |
| 4679 | * @dev: class device struct | 4691 | * @dev: class device struct |
| 4692 | * @attr: device attribute (unused) | ||
| 4680 | * @buf: buffer | 4693 | * @buf: buffer |
| 4694 | * @count: buffer size | ||
| 4681 | * | 4695 | * |
| 4682 | * Return value: | 4696 | * Return value: |
| 4683 | * number of bytes printed to buffer | 4697 | * number of bytes printed to buffer |
| @@ -5060,7 +5074,7 @@ static int ipr_match_lun(struct ipr_cmnd *ipr_cmd, void *device) · 376 unmodified lines | |||
| 5060 | 5074 | ||
| 5061 | /** | 5075 | /** |
| 5062 | * ipr_cmnd_is_free - Check if a command is free or not | 5076 | * ipr_cmnd_is_free - Check if a command is free or not |
| 5063 | * @ipr_cmd ipr command struct | 5077 | * @ipr_cmd: ipr command struct |
| 5064 | * | 5078 | * |
| 5065 | * Returns: | 5079 | * Returns: |
| 5066 | * true / false | 5080 | * true / false |
| @@ -5096,7 +5110,7 @@ static int ipr_match_res(struct ipr_cmnd *ipr_cmd, void *resource) · 29 unmodified lines | |||
| 5096 | 5110 | ||
| 5097 | /** | 5111 | /** |
| 5098 | * ipr_wait_for_ops - Wait for matching commands to complete | 5112 | * ipr_wait_for_ops - Wait for matching commands to complete |
| 5099 | * @ipr_cmd: ipr command struct | 5113 | * @ioa_cfg: ioa config struct |
| 5100 | * @device: device to match (sdev) | 5114 | * @device: device to match (sdev) |
| 5101 | * @match: match function to use | 5115 | * @match: match function to use |
| 5102 | * | 5116 | * |
| @@ -5261,6 +5275,7 @@ static int ipr_device_reset(struct ipr_ioa_cfg *ioa_cfg, · 158 unmodified lines | |||
| 5261 | * ipr_sata_reset - Reset the SATA port | 5275 | * ipr_sata_reset - Reset the SATA port |
| 5262 | * @link: SATA link to reset | 5276 | * @link: SATA link to reset |
| 5263 | * @classes: class of the attached device | 5277 | * @classes: class of the attached device |
| 5278 | * @deadline: unused | ||
| 5264 | * | 5279 | * |
| 5265 | * This function issues a SATA phy reset to the affected ATA link. | 5280 | * This function issues a SATA phy reset to the affected ATA link. |
| 5266 | * | 5281 | * |
| @@ -5440,7 +5455,7 @@ static void ipr_bus_reset_done(struct ipr_cmnd *ipr_cmd) · 173 unmodified lines | |||
| 5440 | 5455 | ||
| 5441 | /** | 5456 | /** |
| 5442 | * ipr_abort_timeout - An abort task has timed out | 5457 | * ipr_abort_timeout - An abort task has timed out |
| 5443 | * @ipr_cmd: ipr command struct | 5458 | * @t: Timer context used to fetch ipr command struct |
| 5444 | * | 5459 | * |
| 5445 | * This function handles when an abort task times out. If this | 5460 | * This function handles when an abort task times out. If this |
| 5446 | * happens we issue a bus reset since we have resources tied | 5461 | * happens we issue a bus reset since we have resources tied |
| @@ -5494,7 +5509,7 @@ static int ipr_cancel_op(struct scsi_cmnd *scsi_cmd) · 47 unmodified lines | |||
| 5494 | struct ipr_ioa_cfg *ioa_cfg; | 5509 | struct ipr_ioa_cfg *ioa_cfg; |
| 5495 | struct ipr_resource_entry *res; | 5510 | struct ipr_resource_entry *res; |
| 5496 | struct ipr_cmd_pkt *cmd_pkt; | 5511 | struct ipr_cmd_pkt *cmd_pkt; |
| 5497 | u32 ioasc, int_reg; | 5512 | u32 ioasc; |
| 5498 | int i, op_found = 0; | 5513 | int i, op_found = 0; |
| 5499 | struct ipr_hrr_queue *hrrq; | 5514 | struct ipr_hrr_queue *hrrq; |
| 5500 | 5515 | ||
| @@ -5517,7 +5532,7 @@ static int ipr_cancel_op(struct scsi_cmnd *scsi_cmd) · 16 unmodified lines | |||
| 5517 | * by a still not detected EEH error. In such cases, reading a register will | 5532 | * by a still not detected EEH error. In such cases, reading a register will |
| 5518 | * trigger the EEH recovery infrastructure. | 5533 | * trigger the EEH recovery infrastructure. |
| 5519 | */ | 5534 | */ |
| 5520 | int_reg = readl(ioa_cfg->regs.sense_interrupt_reg); | 5535 | readl(ioa_cfg->regs.sense_interrupt_reg); |
| 5521 | 5536 | ||
| 5522 | if (!ipr_is_gscsi(res)) | 5537 | if (!ipr_is_gscsi(res)) |
| 5523 | return FAILED; | 5538 | return FAILED; |
| @@ -5569,7 +5584,8 @@ static int ipr_cancel_op(struct scsi_cmnd *scsi_cmd) · 45 unmodified lines | |||
| 5569 | 5584 | ||
| 5570 | /** | 5585 | /** |
| 5571 | * ipr_eh_abort - Abort a single op | 5586 | * ipr_eh_abort - Abort a single op |
| 5572 | * @scsi_cmd: scsi command struct | 5587 | * @shost: scsi host struct |
| 5588 | * @elapsed_time: elapsed time | ||
| 5573 | * | 5589 | * |
| 5574 | * Return value: | 5590 | * Return value: |
| 5575 | * 0 if scan in progress / 1 if scan is complete | 5591 | * 0 if scan in progress / 1 if scan is complete |
| @@ -5696,6 +5712,7 @@ static irqreturn_t ipr_handle_other_interrupt(struct ipr_ioa_cfg *ioa_cfg, · 120 unmodified lines | |||
| 5696 | * ipr_isr_eh - Interrupt service routine error handler | 5712 | * ipr_isr_eh - Interrupt service routine error handler |
| 5697 | * @ioa_cfg: ioa config struct | 5713 | * @ioa_cfg: ioa config struct |
| 5698 | * @msg: message to log | 5714 | * @msg: message to log |
| 5715 | * @number: various meanings depending on the caller/message | ||
| 5699 | * | 5716 | * |
| 5700 | * Return value: | 5717 | * Return value: |
| 5701 | * none | 5718 | * none |
| @@ -5762,7 +5779,6 @@ static int ipr_process_hrrq(struct ipr_hrr_queue *hrr_queue, int budget, · 60 unmodified lines | |||
| 5762 | 5779 | ||
| 5763 | static int ipr_iopoll(struct irq_poll *iop, int budget) | 5780 | static int ipr_iopoll(struct irq_poll *iop, int budget) |
| 5764 | { | 5781 | { |
| 5765 | struct ipr_ioa_cfg *ioa_cfg; | ||
| 5766 | struct ipr_hrr_queue *hrrq; | 5782 | struct ipr_hrr_queue *hrrq; |
| 5767 | struct ipr_cmnd *ipr_cmd, *temp; | 5783 | struct ipr_cmnd *ipr_cmd, *temp; |
| 5768 | unsigned long hrrq_flags; | 5784 | unsigned long hrrq_flags; |
| @@ -5770,7 +5786,6 @@ static int ipr_iopoll(struct irq_poll *iop, int budget) · 1 unmodified line | |||
| 5770 | LIST_HEAD(doneq); | 5786 | LIST_HEAD(doneq); |
| 5771 | 5787 | ||
| 5772 | hrrq = container_of(iop, struct ipr_hrr_queue, iopoll); | 5788 | hrrq = container_of(iop, struct ipr_hrr_queue, iopoll); |
| 5773 | ioa_cfg = hrrq->ioa_cfg; | ||
| 5774 | 5789 | ||
| 5775 | spin_lock_irqsave(hrrq->lock, hrrq_flags); | 5790 | spin_lock_irqsave(hrrq->lock, hrrq_flags); |
| 5776 | completed_ops = ipr_process_hrrq(hrrq, budget, &doneq); | 5791 | completed_ops = ipr_process_hrrq(hrrq, budget, &doneq); |
| @@ -6268,8 +6283,7 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, · 491 unmodified lines | |||
| 6268 | 6283 | ||
| 6269 | /** | 6284 | /** |
| 6270 | * ipr_gen_sense - Generate SCSI sense data from an IOASA | 6285 | * ipr_gen_sense - Generate SCSI sense data from an IOASA |
| 6271 | * @ioasa: IOASA | 6286 | * @ipr_cmd: ipr command struct |
| 6272 | * @sense_buf: sense data buffer | ||
| 6273 | * | 6287 | * |
| 6274 | * Return value: | 6288 | * Return value: |
| 6275 | * none | 6289 | * none |
| @@ -6702,7 +6716,7 @@ static int ipr_ioctl(struct scsi_device *sdev, unsigned int cmd, · 426 unmodified lines | |||
| 6702 | 6716 | ||
| 6703 | /** | 6717 | /** |
| 6704 | * ipr_info - Get information about the card/driver | 6718 | * ipr_info - Get information about the card/driver |
| 6705 | * @scsi_host: scsi host struct | 6719 | * @host: scsi host struct |
| 6706 | * | 6720 | * |
| 6707 | * Return value: | 6721 | * Return value: |
| 6708 | * pointer to buffer with description string | 6722 | * pointer to buffer with description string |
| @@ -7592,7 +7606,7 @@ static int ipr_ioafp_mode_select_page28(struct ipr_cmnd *ipr_cmd) · 883 unmodified lines | |||
| 7592 | /** | 7606 | /** |
| 7593 | * ipr_build_mode_sense - Builds a mode sense command | 7607 | * ipr_build_mode_sense - Builds a mode sense command |
| 7594 | * @ipr_cmd: ipr command struct | 7608 | * @ipr_cmd: ipr command struct |
| 7595 | * @res: resource entry struct | 7609 | * @res_handle: resource entry struct |
| 7596 | * @parm: Byte 2 of mode sense command | 7610 | * @parm: Byte 2 of mode sense command |
| 7597 | * @dma_addr: DMA address of mode sense buffer | 7611 | * @dma_addr: DMA address of mode sense buffer |
| 7598 | * @xfer_len: Size of DMA buffer | 7612 | * @xfer_len: Size of DMA buffer |
| @@ -7939,6 +7953,7 @@ static void ipr_build_ioa_service_action(struct ipr_cmnd *ipr_cmd, · 340 unmodified lines | |||
| 7939 | /** | 7953 | /** |
| 7940 | * ipr_ioafp_set_caching_parameters - Issue Set Cache parameters service | 7954 | * ipr_ioafp_set_caching_parameters - Issue Set Cache parameters service |
| 7941 | * action | 7955 | * action |
| 7956 | * @ipr_cmd: ipr command struct | ||
| 7942 | * | 7957 | * |
| 7943 | * Return value: | 7958 | * Return value: |
| 7944 | * none | 7959 | * none |
| @@ -7975,6 +7990,10 @@ static int ipr_ioafp_set_caching_parameters(struct ipr_cmnd *ipr_cmd) · 30 unmodified lines | |||
| 7975 | /** | 7990 | /** |
| 7976 | * ipr_ioafp_inquiry - Send an Inquiry to the adapter. | 7991 | * ipr_ioafp_inquiry - Send an Inquiry to the adapter. |
| 7977 | * @ipr_cmd: ipr command struct | 7992 | * @ipr_cmd: ipr command struct |
| 7993 | * @flags: flags to send | ||
| 7994 | * @page: page to inquire | ||
| 7995 | * @dma_addr: DMA address | ||
| 7996 | * @xfer_len: transfer data length | ||
| 7978 | * | 7997 | * |
| 7979 | * This utility function sends an inquiry to the adapter. | 7998 | * This utility function sends an inquiry to the adapter. |
| 7980 | * | 7999 | * |
| @@ -8265,7 +8284,7 @@ static int ipr_ioafp_identify_hrrq(struct ipr_cmnd *ipr_cmd) · 284 unmodified lines | |||
| 8265 | 8284 | ||
| 8266 | /** | 8285 | /** |
| 8267 | * ipr_reset_timer_done - Adapter reset timer function | 8286 | * ipr_reset_timer_done - Adapter reset timer function |
| 8268 | * @ipr_cmd: ipr command struct | 8287 | * @t: Timer context used to fetch ipr command struct |
| 8269 | * | 8288 | * |
| 8270 | * Description: This function is used in adapter reset processing | 8289 | * Description: This function is used in adapter reset processing |
| 8271 | * for timing events. If the reset_cmd pointer in the IOA | 8290 | * for timing events. If the reset_cmd pointer in the IOA |
| @@ -8659,7 +8678,6 @@ static int ipr_dump_mailbox_wait(struct ipr_cmnd *ipr_cmd) · 387 unmodified lines | |||
| 8659 | static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd) | 8678 | static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd) |
| 8660 | { | 8679 | { |
| 8661 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; | 8680 | struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; |
| 8662 | u32 int_reg; | ||
| 8663 | 8681 | ||
| 8664 | ENTER; | 8682 | ENTER; |
| 8665 | ioa_cfg->pdev->state_saved = true; | 8683 | ioa_cfg->pdev->state_saved = true; |
| @@ -8675,7 +8693,7 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd) · 9 unmodified lines | |||
| 8675 | if (ioa_cfg->sis64) { | 8693 | if (ioa_cfg->sis64) { |
| 8676 | /* Set the adapter to the correct endian mode. */ | 8694 | /* Set the adapter to the correct endian mode. */ |
| 8677 | writel(IPR_ENDIAN_SWAP_KEY, ioa_cfg->regs.endian_swap_reg); | 8695 | writel(IPR_ENDIAN_SWAP_KEY, ioa_cfg->regs.endian_swap_reg); |
| 8678 | int_reg = readl(ioa_cfg->regs.endian_swap_reg); | 8696 | readl(ioa_cfg->regs.endian_swap_reg); |
| 8679 | } | 8697 | } |
| 8680 | 8698 | ||
| 8681 | if (ioa_cfg->ioa_unit_checked) { | 8699 | if (ioa_cfg->ioa_unit_checked) { |
| @@ -9483,7 +9501,6 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev, · 801 unmodified lines | |||
| 9483 | * Description: This is the second phase of adapter initialization | 9501 | * Description: This is the second phase of adapter initialization |
| 9484 | * This function takes care of initilizing the adapter to the point | 9502 | * This function takes care of initilizing the adapter to the point |
| 9485 | * where it can accept new commands. | 9503 | * where it can accept new commands. |
| 9486 | |||
| 9487 | * Return value: | 9504 | * Return value: |
| 9488 | * 0 on success / -EIO on failure | 9505 | * 0 on success / -EIO on failure |
| 9489 | **/ | 9506 | **/ |
| @@ -9597,7 +9614,7 @@ static void ipr_free_irqs(struct ipr_ioa_cfg *ioa_cfg) · 107 unmodified lines | |||
| 9597 | 9614 | ||
| 9598 | /** | 9615 | /** |
| 9599 | * ipr_free_all_resources - Free all allocated resources for an adapter. | 9616 | * ipr_free_all_resources - Free all allocated resources for an adapter. |
| 9600 | * @ipr_cmd: ipr command struct | 9617 | * @ioa_cfg: ioa config struct |
| 9601 | * | 9618 | * |
| 9602 | * This function frees all allocated resources for the | 9619 | * This function frees all allocated resources for the |
| 9603 | * specified adapter. | 9620 | * specified adapter. |
| @@ -10059,7 +10076,8 @@ static int ipr_request_other_msi_irqs(struct ipr_ioa_cfg *ioa_cfg, · 455 unmodified lines | |||
| 10059 | 10076 | ||
| 10060 | /** | 10077 | /** |
| 10061 | * ipr_test_intr - Handle the interrupt generated in ipr_test_msi(). | 10078 | * ipr_test_intr - Handle the interrupt generated in ipr_test_msi(). |
| 10062 | * @pdev: PCI device struct | 10079 | * @devp: PCI device struct |
| 10080 | * @irq: IRQ number | ||
| 10063 | * | 10081 | * |
| 10064 | * Description: Simply set the msi_received flag to 1 indicating that | 10082 | * Description: Simply set the msi_received flag to 1 indicating that |
| 10065 | * Message Signaled Interrupts are supported. | 10083 | * Message Signaled Interrupts are supported. |
| @@ -10085,6 +10103,7 @@ static irqreturn_t ipr_test_intr(int irq, void *devp) · 19 unmodified lines | |||
| 10085 | 10103 | ||
| 10086 | /** | 10104 | /** |
| 10087 | * ipr_test_msi - Test for Message Signaled Interrupt (MSI) support. | 10105 | * ipr_test_msi - Test for Message Signaled Interrupt (MSI) support. |
| 10106 | * @ioa_cfg: ioa config struct | ||
| 10088 | * @pdev: PCI device struct | 10107 | * @pdev: PCI device struct |
| 10089 | * | 10108 | * |
| 10090 | * Description: This routine sets up and initiates a test interrupt to determine | 10109 | * Description: This routine sets up and initiates a test interrupt to determine |
| @@ -10097,7 +10116,6 @@ static irqreturn_t ipr_test_intr(int irq, void *devp) · 6 unmodified lines | |||
| 10097 | static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev) | 10116 | static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev) |
| 10098 | { | 10117 | { |
| 10099 | int rc; | 10118 | int rc; |
| 10100 | volatile u32 int_reg; | ||
| 10101 | unsigned long lock_flags = 0; | 10119 | unsigned long lock_flags = 0; |
| 10102 | int irq = pci_irq_vector(pdev, 0); | 10120 | int irq = pci_irq_vector(pdev, 0); |
| 10103 | 10121 | ||
| @@ -10108,7 +10126,7 @@ static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev) · 4 unmodified lines | |||
| 10108 | ioa_cfg->msi_received = 0; | 10126 | ioa_cfg->msi_received = 0; |
| 10109 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); | 10127 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); |
| 10110 | writel(IPR_PCII_IO_DEBUG_ACKNOWLEDGE, ioa_cfg->regs.clr_interrupt_mask_reg32); | 10128 | writel(IPR_PCII_IO_DEBUG_ACKNOWLEDGE, ioa_cfg->regs.clr_interrupt_mask_reg32); |
| 10111 | int_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg); | 10129 | readl(ioa_cfg->regs.sense_interrupt_mask_reg); |
| 10112 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | 10130 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); |
| 10113 | 10131 | ||
| 10114 | rc = request_irq(irq, ipr_test_intr, 0, IPR_NAME, ioa_cfg); | 10132 | rc = request_irq(irq, ipr_test_intr, 0, IPR_NAME, ioa_cfg); |
| @@ -10119,7 +10137,7 @@ static int ipr_test_msi(struct ipr_ioa_cfg *ioa_cfg, struct pci_dev *pdev) · 4 unmodified lines | |||
| 10119 | dev_info(&pdev->dev, "IRQ assigned: %d\n", irq); | 10137 | dev_info(&pdev->dev, "IRQ assigned: %d\n", irq); |
| 10120 | 10138 | ||
| 10121 | writel(IPR_PCII_IO_DEBUG_ACKNOWLEDGE, ioa_cfg->regs.sense_interrupt_reg32); | 10139 | writel(IPR_PCII_IO_DEBUG_ACKNOWLEDGE, ioa_cfg->regs.sense_interrupt_reg32); |
| 10122 | int_reg = readl(ioa_cfg->regs.sense_interrupt_reg); | 10140 | readl(ioa_cfg->regs.sense_interrupt_reg); |
| 10123 | wait_event_timeout(ioa_cfg->msi_wait_q, ioa_cfg->msi_received, HZ); | 10141 | wait_event_timeout(ioa_cfg->msi_wait_q, ioa_cfg->msi_received, HZ); |
| 10124 | spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); | 10142 | spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); |
| 10125 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); | 10143 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); |
| @@ -10530,6 +10548,8 @@ static void ipr_remove(struct pci_dev *pdev) · 404 unmodified lines | |||
| 10530 | 10548 | ||
| 10531 | /** | 10549 | /** |
| 10532 | * ipr_probe - Adapter hot plug add entry point | 10550 | * ipr_probe - Adapter hot plug add entry point |
| 10551 | * @pdev: pci device struct | ||
| 10552 | * @dev_id: pci device ID | ||
| 10533 | * | 10553 | * |
| 10534 | * Return value: | 10554 | * Return value: |
| 10535 | * 0 on success / non-zero on failure | 10555 | * 0 on success / non-zero on failure |
| @@ -10786,6 +10806,7 @@ static struct pci_driver ipr_driver = { · 250 unmodified lines | |||
| 10786 | 10806 | ||
| 10787 | /** | 10807 | /** |
| 10788 | * ipr_halt_done - Shutdown prepare completion | 10808 | * ipr_halt_done - Shutdown prepare completion |
| 10809 | * @ipr_cmd: ipr command struct | ||
| 10789 | * | 10810 | * |
| 10790 | * Return value: | 10811 | * Return value: |
| 10791 | * none | 10812 | * none |
| @@ -10797,6 +10818,9 @@ static void ipr_halt_done(struct ipr_cmnd *ipr_cmd) · 5 unmodified lines | |||
| 10797 | 10818 | ||
| 10798 | /** | 10819 | /** |
| 10799 | * ipr_halt - Issue shutdown prepare to all adapters | 10820 | * ipr_halt - Issue shutdown prepare to all adapters |
| 10821 | * @nb: Notifier block | ||
| 10822 | * @event: Notifier event | ||
| 10823 | * @buf: Notifier data (unused) | ||
| 10800 | * | 10824 | * |
| 10801 | * Return value: | 10825 | * Return value: |
| 10802 | * NOTIFY_OK on success / NOTIFY_DONE on failure | 10826 | * NOTIFY_OK on success / NOTIFY_DONE on failure |
| @@ -1684,7 +1684,7 @@ struct ipr_dump_entry_header { · 1683 unmodified lines | |||
| 1684 | struct ipr_dump_location_entry { | 1684 | struct ipr_dump_location_entry { |
| 1685 | struct ipr_dump_entry_header hdr; | 1685 | struct ipr_dump_entry_header hdr; |
| 1686 | u8 location[20]; | 1686 | u8 location[20]; |
| 1687 | }__attribute__((packed)); | 1687 | }__attribute__((packed, aligned (4))); |
| 1688 | 1688 | ||
| 1689 | struct ipr_dump_trace_entry { | 1689 | struct ipr_dump_trace_entry { |
| 1690 | struct ipr_dump_entry_header hdr; | 1690 | struct ipr_dump_entry_header hdr; |
| @@ -1708,7 +1708,7 @@ struct ipr_driver_dump { · 17 unmodified lines | |||
| 1708 | struct ipr_dump_location_entry location_entry; | 1708 | struct ipr_dump_location_entry location_entry; |
| 1709 | struct ipr_dump_ioa_type_entry ioa_type_entry; | 1709 | struct ipr_dump_ioa_type_entry ioa_type_entry; |
| 1710 | struct ipr_dump_trace_entry trace_entry; | 1710 | struct ipr_dump_trace_entry trace_entry; |
| 1711 | }__attribute__((packed)); | 1711 | }__attribute__((packed, aligned (4))); |
| 1712 | 1712 | ||
| 1713 | struct ipr_ioa_dump { | 1713 | struct ipr_ioa_dump { |
| 1714 | struct ipr_dump_entry_header hdr; | 1714 | struct ipr_dump_entry_header hdr; |
| @@ -2239,7 +2239,7 @@ ips_get_bios_version(ips_ha_t * ha, int intr) · 2238 unmodified lines | |||
| 2239 | major = 0; | 2239 | major = 0; |
| 2240 | minor = 0; | 2240 | minor = 0; |
| 2241 | 2241 | ||
| 2242 | strncpy(ha->bios_version, " ?", 8); | 2242 | memcpy(ha->bios_version, " ?", 8); |
| 2243 | 2243 | ||
| 2244 | if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) { | 2244 | if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) { |
| 2245 | if (IPS_USE_MEMIO(ha)) { | 2245 | if (IPS_USE_MEMIO(ha)) { |
| @@ -3515,11 +3515,11 @@ ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) · 1269 unmodified lines | |||
| 3515 | inquiry.Flags[1] = | 3515 | inquiry.Flags[1] = |
| 3516 | IPS_SCSI_INQ_WBus16 | | 3516 | IPS_SCSI_INQ_WBus16 | |
| 3517 | IPS_SCSI_INQ_Sync; | 3517 | IPS_SCSI_INQ_Sync; |
| 3518 | strncpy(inquiry.VendorId, "IBM ", | 3518 | memcpy(inquiry.VendorId, "IBM ", |
| 3519 | 8); | 3519 | 8); |
| 3520 | strncpy(inquiry.ProductId, | 3520 | memcpy(inquiry.ProductId, |
| 3521 | "SERVERAID ", 16); | 3521 | "SERVERAID ", 16); |
| 3522 | strncpy(inquiry.ProductRevisionLevel, | 3522 | memcpy(inquiry.ProductRevisionLevel, |
| 3523 | "1.00", 4); | 3523 | "1.00", 4); |
| 3524 | 3524 | ||
| 3525 | ips_scmd_buf_write(scb->scsi_cmd, | 3525 | ips_scmd_buf_write(scb->scsi_cmd, |
| @@ -4036,9 +4036,9 @@ ips_inquiry(ips_ha_t * ha, ips_scb_t * scb) · 510 unmodified lines | |||
| 4036 | inquiry.Flags[0] = IPS_SCSI_INQ_Address16; | 4036 | inquiry.Flags[0] = IPS_SCSI_INQ_Address16; |
| 4037 | inquiry.Flags[1] = | 4037 | inquiry.Flags[1] = |
| 4038 | IPS_SCSI_INQ_WBus16 | IPS_SCSI_INQ_Sync | IPS_SCSI_INQ_CmdQue; | 4038 | IPS_SCSI_INQ_WBus16 | IPS_SCSI_INQ_Sync | IPS_SCSI_INQ_CmdQue; |
| 4039 | strncpy(inquiry.VendorId, "IBM ", 8); | 4039 | memcpy(inquiry.VendorId, "IBM ", 8); |
| 4040 | strncpy(inquiry.ProductId, "SERVERAID ", 16); | 4040 | memcpy(inquiry.ProductId, "SERVERAID ", 16); |
| 4041 | strncpy(inquiry.ProductRevisionLevel, "1.00", 4); | 4041 | memcpy(inquiry.ProductRevisionLevel, "1.00", 4); |
| 4042 | 4042 | ||
| 4043 | ips_scmd_buf_write(scb->scsi_cmd, &inquiry, sizeof (inquiry)); | 4043 | ips_scmd_buf_write(scb->scsi_cmd, &inquiry, sizeof (inquiry)); |
| 4044 | 4044 | ||
| @@ -4697,7 +4697,6 @@ ips_init_copperhead(ips_ha_t * ha) · 652 unmodified lines | |||
| 4697 | uint8_t Isr; | 4697 | uint8_t Isr; |
| 4698 | uint8_t Cbsp; | 4698 | uint8_t Cbsp; |
| 4699 | uint8_t PostByte[IPS_MAX_POST_BYTES]; | 4699 | uint8_t PostByte[IPS_MAX_POST_BYTES]; |
| 4700 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; | ||
| 4701 | int i, j; | 4700 | int i, j; |
| 4702 | 4701 | ||
| 4703 | METHOD_TRACE("ips_init_copperhead", 1); | 4702 | METHOD_TRACE("ips_init_copperhead", 1); |
| @@ -4742,7 +4741,7 @@ ips_init_copperhead(ips_ha_t * ha) · 38 unmodified lines | |||
| 4742 | /* error occurred */ | 4741 | /* error occurred */ |
| 4743 | return (0); | 4742 | return (0); |
| 4744 | 4743 | ||
| 4745 | ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR); | 4744 | inb(ha->io_addr + IPS_REG_ISPR); |
| 4746 | outb(Isr, ha->io_addr + IPS_REG_HISR); | 4745 | outb(Isr, ha->io_addr + IPS_REG_HISR); |
| 4747 | } | 4746 | } |
| 4748 | 4747 | ||
| @@ -4791,7 +4790,6 @@ ips_init_copperhead_memio(ips_ha_t * ha) · 42 unmodified lines | |||
| 4791 | uint8_t Isr = 0; | 4790 | uint8_t Isr = 0; |
| 4792 | uint8_t Cbsp; | 4791 | uint8_t Cbsp; |
| 4793 | uint8_t PostByte[IPS_MAX_POST_BYTES]; | 4792 | uint8_t PostByte[IPS_MAX_POST_BYTES]; |
| 4794 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; | ||
| 4795 | int i, j; | 4793 | int i, j; |
| 4796 | 4794 | ||
| 4797 | METHOD_TRACE("ips_init_copperhead_memio", 1); | 4795 | METHOD_TRACE("ips_init_copperhead_memio", 1); |
| @@ -4836,7 +4834,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) · 38 unmodified lines | |||
| 4836 | /* error occurred */ | 4834 | /* error occurred */ |
| 4837 | return (0); | 4835 | return (0); |
| 4838 | 4836 | ||
| 4839 | ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); | 4837 | readb(ha->mem_ptr + IPS_REG_ISPR); |
| 4840 | writeb(Isr, ha->mem_ptr + IPS_REG_HISR); | 4838 | writeb(Isr, ha->mem_ptr + IPS_REG_HISR); |
| 4841 | } | 4839 | } |
| 4842 | 4840 | ||
| @@ -5622,10 +5620,10 @@ ips_write_driver_status(ips_ha_t * ha, int intr) · 779 unmodified lines | |||
| 5622 | /* change values (as needed) */ | 5620 | /* change values (as needed) */ |
| 5623 | ha->nvram->operating_system = IPS_OS_LINUX; | 5621 | ha->nvram->operating_system = IPS_OS_LINUX; |
| 5624 | ha->nvram->adapter_type = ha->ad_type; | 5622 | ha->nvram->adapter_type = ha->ad_type; |
| 5625 | strncpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); | 5623 | memcpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); |
| 5626 | strncpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); | 5624 | memcpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); |
| 5627 | strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4); | 5625 | memcpy((char *) ha->nvram->bios_high, ha->bios_version, 4); |
| 5628 | strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); | 5626 | memcpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); |
| 5629 | 5627 | ||
| 5630 | ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ | 5628 | ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ |
| 5631 | 5629 | ||
| @@ -6835,8 +6833,6 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr) · 1203 unmodified lines | |||
| 6835 | uint32_t mem_addr; | 6833 | uint32_t mem_addr; |
| 6836 | uint32_t io_len; | 6834 | uint32_t io_len; |
| 6837 | uint32_t mem_len; | 6835 | uint32_t mem_len; |
| 6838 | uint8_t bus; | ||
| 6839 | uint8_t func; | ||
| 6840 | int j; | 6836 | int j; |
| 6841 | int index; | 6837 | int index; |
| 6842 | dma_addr_t dma_address; | 6838 | dma_addr_t dma_address; |
| @@ -6856,10 +6852,6 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr) · 13 unmodified lines | |||
| 6856 | if (index >= IPS_MAX_ADAPTERS) | 6852 | if (index >= IPS_MAX_ADAPTERS) |
| 6857 | return -1; | 6853 | return -1; |
| 6858 | 6854 | ||
| 6859 | /* stuff that we get in dev */ | ||
| 6860 | bus = pci_dev->bus->number; | ||
| 6861 | func = pci_dev->devfn; | ||
| 6862 | |||
| 6863 | /* Init MEM/IO addresses to 0 */ | 6855 | /* Init MEM/IO addresses to 0 */ |
| 6864 | mem_addr = 0; | 6856 | mem_addr = 0; |
| 6865 | io_addr = 0; | 6857 | io_addr = 0; |
| @@ -3444,7 +3444,7 @@ struct isci_request *isci_tmf_request_from_tag(struct isci_host *ihost, · 3443 unmodified lines | |||
| 3444 | int isci_request_execute(struct isci_host *ihost, struct isci_remote_device *idev, | 3444 | int isci_request_execute(struct isci_host *ihost, struct isci_remote_device *idev, |
| 3445 | struct sas_task *task, u16 tag) | 3445 | struct sas_task *task, u16 tag) |
| 3446 | { | 3446 | { |
| 3447 | enum sci_status status = SCI_FAILURE_UNSUPPORTED_PROTOCOL; | 3447 | enum sci_status status; |
| 3448 | struct isci_request *ireq; | 3448 | struct isci_request *ireq; |
| 3449 | unsigned long flags; | 3449 | unsigned long flags; |
| 3450 | int ret = 0; | 3450 | int ret = 0; |
| @@ -337,7 +337,7 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp) · 336 unmodified lines | |||
| 337 | 337 | ||
| 338 | /** | 338 | /** |
| 339 | * fc_disc_gpn_ft_req() - Send Get Port Names by FC-4 type (GPN_FT) request | 339 | * fc_disc_gpn_ft_req() - Send Get Port Names by FC-4 type (GPN_FT) request |
| 340 | * @lport: The discovery context | 340 | * @disc: The discovery context |
| 341 | */ | 341 | */ |
| 342 | static void fc_disc_gpn_ft_req(struct fc_disc *disc) | 342 | static void fc_disc_gpn_ft_req(struct fc_disc *disc) |
| 343 | { | 343 | { |
| @@ -370,7 +370,7 @@ err: · 26 unmodified lines | |||
| 370 | 370 | ||
| 371 | /** | 371 | /** |
| 372 | * fc_disc_gpn_ft_parse() - Parse the body of the dNS GPN_FT response. | 372 | * fc_disc_gpn_ft_parse() - Parse the body of the dNS GPN_FT response. |
| 373 | * @lport: The local port the GPN_FT was received on | 373 | * @disc: The discovery context |
| 374 | * @buf: The GPN_FT response buffer | 374 | * @buf: The GPN_FT response buffer |
| 375 | * @len: The size of response buffer | 375 | * @len: The size of response buffer |
| 376 | * | 376 | * |
| @@ -488,7 +488,7 @@ static void fc_disc_timeout(struct work_struct *work) · 111 unmodified lines | |||
| 488 | * fc_disc_gpn_ft_resp() - Handle a response frame from Get Port Names (GPN_FT) | 488 | * fc_disc_gpn_ft_resp() - Handle a response frame from Get Port Names (GPN_FT) |
| 489 | * @sp: The sequence that the GPN_FT response was received on | 489 | * @sp: The sequence that the GPN_FT response was received on |
| 490 | * @fp: The GPN_FT response frame | 490 | * @fp: The GPN_FT response frame |
| 491 | * @lp_arg: The discovery context | 491 | * @disc_arg: The discovery context |
| 492 | * | 492 | * |
| 493 | * Locking Note: This function is called without disc mutex held, and | 493 | * Locking Note: This function is called without disc mutex held, and |
| 494 | * should do all its processing with the mutex held | 494 | * should do all its processing with the mutex held |
| @@ -49,6 +49,8 @@ static struct workqueue_struct *fc_exch_workqueue; · 48 unmodified lines | |||
| 49 | * @total_exches: Total allocated exchanges | 49 | * @total_exches: Total allocated exchanges |
| 50 | * @lock: Exch pool lock | 50 | * @lock: Exch pool lock |
| 51 | * @ex_list: List of exchanges | 51 | * @ex_list: List of exchanges |
| 52 | * @left: Cache of free slot in exch array | ||
| 53 | * @right: Cache of free slot in exch array | ||
| 52 | * | 54 | * |
| 53 | * This structure manages per cpu exchanges in array of exchange pointers. | 55 | * This structure manages per cpu exchanges in array of exchange pointers. |
| 54 | * This array is allocated followed by struct fc_exch_pool memory for | 56 | * This array is allocated followed by struct fc_exch_pool memory for |
| @@ -60,7 +62,6 @@ struct fc_exch_pool { · 5 unmodified lines | |||
| 60 | u16 next_index; | 62 | u16 next_index; |
| 61 | u16 total_exches; | 63 | u16 total_exches; |
| 62 | 64 | ||
| 63 | /* two cache of free slot in exch array */ | ||
| 64 | u16 left; | 65 | u16 left; |
| 65 | u16 right; | 66 | u16 right; |
| 66 | } ____cacheline_aligned_in_smp; | 67 | } ____cacheline_aligned_in_smp; |
| @@ -74,6 +75,7 @@ struct fc_exch_pool { · 7 unmodified lines | |||
| 74 | * @ep_pool: Reserved exchange pointers | 75 | * @ep_pool: Reserved exchange pointers |
| 75 | * @pool_max_index: Max exch array index in exch pool | 76 | * @pool_max_index: Max exch array index in exch pool |
| 76 | * @pool: Per cpu exch pool | 77 | * @pool: Per cpu exch pool |
| 78 | * @lport: Local exchange port | ||
| 77 | * @stats: Statistics structure | 79 | * @stats: Statistics structure |
| 78 | * | 80 | * |
| 79 | * This structure is the center for creating exchanges and sequences. | 81 | * This structure is the center for creating exchanges and sequences. |
| @@ -702,6 +704,9 @@ int fc_seq_exch_abort(const struct fc_seq *req_sp, unsigned int timer_msec) · 622 unmodified lines | |||
| 702 | 704 | ||
| 703 | /** | 705 | /** |
| 704 | * fc_invoke_resp() - invoke ep->resp() | 706 | * fc_invoke_resp() - invoke ep->resp() |
| 707 | * @ep: The exchange to be operated on | ||
| 708 | * @fp: The frame pointer to pass through to ->resp() | ||
| 709 | * @sp: The sequence pointer to pass through to ->resp() | ||
| 705 | * | 710 | * |
| 706 | * Notes: | 711 | * Notes: |
| 707 | * It is assumed that after initialization finished (this means the | 712 | * It is assumed that after initialization finished (this means the |
| @@ -289,6 +289,7 @@ static int fc_fcp_send_abort(struct fc_fcp_pkt *fsp) · 288 unmodified lines | |||
| 289 | /** | 289 | /** |
| 290 | * fc_fcp_retry_cmd() - Retry a fcp_pkt | 290 | * fc_fcp_retry_cmd() - Retry a fcp_pkt |
| 291 | * @fsp: The FCP packet to be retried | 291 | * @fsp: The FCP packet to be retried |
| 292 | * @status_code: The FCP status code to set | ||
| 292 | * | 293 | * |
| 293 | * Sets the status code to be FC_ERROR and then calls | 294 | * Sets the status code to be FC_ERROR and then calls |
| 294 | * fc_fcp_complete_locked() which in turn calls fc_io_compl(). | 295 | * fc_fcp_complete_locked() which in turn calls fc_io_compl(). |
| @@ -580,7 +581,7 @@ err: · 285 unmodified lines | |||
| 580 | /** | 581 | /** |
| 581 | * fc_fcp_send_data() - Send SCSI data to a target | 582 | * fc_fcp_send_data() - Send SCSI data to a target |
| 582 | * @fsp: The FCP packet the data is on | 583 | * @fsp: The FCP packet the data is on |
| 583 | * @sp: The sequence the data is to be sent on | 584 | * @seq: The sequence the data is to be sent on |
| 584 | * @offset: The starting offset for this data request | 585 | * @offset: The starting offset for this data request |
| 585 | * @seq_blen: The burst length for this data request | 586 | * @seq_blen: The burst length for this data request |
| 586 | * | 587 | * |
| @@ -1283,7 +1284,7 @@ static int fc_fcp_pkt_abort(struct fc_fcp_pkt *fsp) · 696 unmodified lines | |||
| 1283 | 1284 | ||
| 1284 | /** | 1285 | /** |
| 1285 | * fc_lun_reset_send() - Send LUN reset command | 1286 | * fc_lun_reset_send() - Send LUN reset command |
| 1286 | * @data: The FCP packet that identifies the LUN to be reset | 1287 | * @t: Timer context used to fetch the FSP packet |
| 1287 | */ | 1288 | */ |
| 1288 | static void fc_lun_reset_send(struct timer_list *t) | 1289 | static void fc_lun_reset_send(struct timer_list *t) |
| 1289 | { | 1290 | { |
| @@ -1409,7 +1410,7 @@ static void fc_fcp_cleanup(struct fc_lport *lport) · 119 unmodified lines | |||
| 1409 | 1410 | ||
| 1410 | /** | 1411 | /** |
| 1411 | * fc_fcp_timeout() - Handler for fcp_pkt timeouts | 1412 | * fc_fcp_timeout() - Handler for fcp_pkt timeouts |
| 1412 | * @data: The FCP packet that has timed out | 1413 | * @t: Timer context used to fetch the FSP packet |
| 1413 | * | 1414 | * |
| 1414 | * If REC is supported then just issue it and return. The REC exchange will | 1415 | * If REC is supported then just issue it and return. The REC exchange will |
| 1415 | * complete or time out and recovery can continue at that point. Otherwise, | 1416 | * complete or time out and recovery can continue at that point. Otherwise, |
| @@ -1691,6 +1692,7 @@ out: · 275 unmodified lines | |||
| 1691 | /** | 1692 | /** |
| 1692 | * fc_fcp_recovery() - Handler for fcp_pkt recovery | 1693 | * fc_fcp_recovery() - Handler for fcp_pkt recovery |
| 1693 | * @fsp: The FCP pkt that needs to be aborted | 1694 | * @fsp: The FCP pkt that needs to be aborted |
| 1695 | * @code: The FCP status code to set | ||
| 1694 | */ | 1696 | */ |
| 1695 | static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code) | 1697 | static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code) |
| 1696 | { | 1698 | { |
| @@ -1709,6 +1711,7 @@ static void fc_fcp_recovery(struct fc_fcp_pkt *fsp, u8 code) · 12 unmodified lines | |||
| 1709 | * fc_fcp_srr() - Send a SRR request (Sequence Retransmission Request) | 1711 | * fc_fcp_srr() - Send a SRR request (Sequence Retransmission Request) |
| 1710 | * @fsp: The FCP packet the SRR is to be sent on | 1712 | * @fsp: The FCP packet the SRR is to be sent on |
| 1711 | * @r_ctl: The R_CTL field for the SRR request | 1713 | * @r_ctl: The R_CTL field for the SRR request |
| 1714 | * @offset: The SRR relative offset | ||
| 1712 | * This is called after receiving status but insufficient data, or | 1715 | * This is called after receiving status but insufficient data, or |
| 1713 | * when expecting status but the request has timed out. | 1716 | * when expecting status but the request has timed out. |
| 1714 | */ | 1717 | */ |
| @@ -1851,7 +1854,7 @@ static inline int fc_fcp_lport_queue_ready(struct fc_lport *lport) · 136 unmodified lines | |||
| 1851 | /** | 1854 | /** |
| 1852 | * fc_queuecommand() - The queuecommand function of the SCSI template | 1855 | * fc_queuecommand() - The queuecommand function of the SCSI template |
| 1853 | * @shost: The Scsi_Host that the command was issued to | 1856 | * @shost: The Scsi_Host that the command was issued to |
| 1854 | * @cmd: The scsi_cmnd to be executed | 1857 | * @sc_cmd: The scsi_cmnd to be executed |
| 1855 | * | 1858 | * |
| 1856 | * This is the i/o strategy routine, called by the SCSI layer. | 1859 | * This is the i/o strategy routine, called by the SCSI layer. |
| 1857 | */ | 1860 | */ |
| @@ -405,7 +405,7 @@ static void fc_lport_recv_rlir_req(struct fc_lport *lport, struct fc_frame *fp) · 404 unmodified lines | |||
| 405 | /** | 405 | /** |
| 406 | * fc_lport_recv_echo_req() - Handle received ECHO request | 406 | * fc_lport_recv_echo_req() - Handle received ECHO request |
| 407 | * @lport: The local port receiving the ECHO | 407 | * @lport: The local port receiving the ECHO |
| 408 | * @fp: ECHO request frame | 408 | * @in_fp: ECHO request frame |
| 409 | */ | 409 | */ |
| 410 | static void fc_lport_recv_echo_req(struct fc_lport *lport, | 410 | static void fc_lport_recv_echo_req(struct fc_lport *lport, |
| 411 | struct fc_frame *in_fp) | 411 | struct fc_frame *in_fp) |
| @@ -440,7 +440,7 @@ static void fc_lport_recv_echo_req(struct fc_lport *lport, · 28 unmodified lines | |||
| 440 | /** | 440 | /** |
| 441 | * fc_lport_recv_rnid_req() - Handle received Request Node ID data request | 441 | * fc_lport_recv_rnid_req() - Handle received Request Node ID data request |
| 442 | * @lport: The local port receiving the RNID | 442 | * @lport: The local port receiving the RNID |
| 443 | * @fp: The RNID request frame | 443 | * @in_fp: The RNID request frame |
| 444 | */ | 444 | */ |
| 445 | static void fc_lport_recv_rnid_req(struct fc_lport *lport, | 445 | static void fc_lport_recv_rnid_req(struct fc_lport *lport, |
| 446 | struct fc_frame *in_fp) | 446 | struct fc_frame *in_fp) |
| @@ -1325,6 +1325,7 @@ static void fc_lport_enter_scr(struct fc_lport *lport) · 878 unmodified lines | |||
| 1325 | /** | 1325 | /** |
| 1326 | * fc_lport_enter_ns() - register some object with the name server | 1326 | * fc_lport_enter_ns() - register some object with the name server |
| 1327 | * @lport: Fibre Channel local port to register | 1327 | * @lport: Fibre Channel local port to register |
| 1328 | * @state: Local port state | ||
| 1328 | */ | 1329 | */ |
| 1329 | static void fc_lport_enter_ns(struct fc_lport *lport, enum fc_lport_state state) | 1330 | static void fc_lport_enter_ns(struct fc_lport *lport, enum fc_lport_state state) |
| 1330 | { | 1331 | { |
| @@ -1423,6 +1424,7 @@ err: · 92 unmodified lines | |||
| 1423 | /** | 1424 | /** |
| 1424 | * fc_lport_enter_ms() - management server commands | 1425 | * fc_lport_enter_ms() - management server commands |
| 1425 | * @lport: Fibre Channel local port to register | 1426 | * @lport: Fibre Channel local port to register |
| 1427 | * @state: Local port state | ||
| 1426 | */ | 1428 | */ |
| 1427 | static void fc_lport_enter_ms(struct fc_lport *lport, enum fc_lport_state state) | 1429 | static void fc_lport_enter_ms(struct fc_lport *lport, enum fc_lport_state state) |
| 1428 | { | 1430 | { |
| @@ -1932,6 +1934,7 @@ static void fc_lport_bsg_resp(struct fc_seq *sp, struct fc_frame *fp, · 503 unmodified lines | |||
| 1932 | * @job: The BSG Passthrough job | 1934 | * @job: The BSG Passthrough job |
| 1933 | * @lport: The local port sending the request | 1935 | * @lport: The local port sending the request |
| 1934 | * @did: The destination port id | 1936 | * @did: The destination port id |
| 1937 | * @tov: The timeout period (in ms) | ||
| 1935 | */ | 1938 | */ |
| 1936 | static int fc_lport_els_request(struct bsg_job *job, | 1939 | static int fc_lport_els_request(struct bsg_job *job, |
| 1937 | struct fc_lport *lport, | 1940 | struct fc_lport *lport, |
| @@ -121,7 +121,7 @@ EXPORT_SYMBOL(fc_rport_lookup); · 120 unmodified lines | |||
| 121 | /** | 121 | /** |
| 122 | * fc_rport_create() - Create a new remote port | 122 | * fc_rport_create() - Create a new remote port |
| 123 | * @lport: The local port this remote port will be associated with | 123 | * @lport: The local port this remote port will be associated with |
| 124 | * @ids: The identifiers for the new remote port | 124 | * @port_id: The identifiers for the new remote port |
| 125 | * | 125 | * |
| 126 | * The remote port will start in the INIT state. | 126 | * The remote port will start in the INIT state. |
| 127 | */ | 127 | */ |
| @@ -1445,7 +1445,7 @@ drop: · 1317 unmodified lines | |||
| 1445 | * fc_rport_logo_resp() - Handler for logout (LOGO) responses | 1445 | * fc_rport_logo_resp() - Handler for logout (LOGO) responses |
| 1446 | * @sp: The sequence the LOGO was on | 1446 | * @sp: The sequence the LOGO was on |
| 1447 | * @fp: The LOGO response frame | 1447 | * @fp: The LOGO response frame |
| 1448 | * @lport_arg: The local port | 1448 | * @rdata_arg: The remote port |
| 1449 | */ | 1449 | */ |
| 1450 | static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, | 1450 | static void fc_rport_logo_resp(struct fc_seq *sp, struct fc_frame *fp, |
| 1451 | void *rdata_arg) | 1451 | void *rdata_arg) |
| @@ -507,10 +507,23 @@ void sas_ata_end_eh(struct ata_port *ap) · 506 unmodified lines | |||
| 507 | spin_unlock_irqrestore(&ha->lock, flags); | 507 | spin_unlock_irqrestore(&ha->lock, flags); |
| 508 | } | 508 | } |
| 509 | 509 | ||
| 510 | static int sas_ata_prereset(struct ata_link *link, unsigned long deadline) | ||
| 511 | { | ||
| 512 | struct ata_port *ap = link->ap; | ||
| 513 | struct domain_device *dev = ap->private_data; | ||
| 514 | struct sas_phy *local_phy = sas_get_local_phy(dev); | ||
| 515 | int res = 0; | ||
| 516 | |||
| 517 | if (!local_phy->enabled || test_bit(SAS_DEV_GONE, &dev->state)) | ||
| 518 | res = -ENOENT; | ||
| 519 | sas_put_local_phy(local_phy); | ||
| 520 | |||
| 521 | return res; | ||
| 522 | } | ||
| 523 | |||
| 510 | static struct ata_port_operations sas_sata_ops = { | 524 | static struct ata_port_operations sas_sata_ops = { |
| 511 | .prereset = ata_std_prereset, | 525 | .prereset = sas_ata_prereset, |
| 512 | .hardreset = sas_ata_hard_reset, | 526 | .hardreset = sas_ata_hard_reset, |
| 513 | .postreset = ata_std_postreset, | ||
| 514 | .error_handler = ata_std_error_handler, | 527 | .error_handler = ata_std_error_handler, |
| 515 | .post_internal_cmd = sas_ata_post_internal, | 528 | .post_internal_cmd = sas_ata_post_internal, |
| 516 | .qc_defer = ata_std_qc_defer, | 529 | .qc_defer = ata_std_qc_defer, |
| @@ -427,7 +427,7 @@ out_err: · 426 unmodified lines | |||
| 427 | static int sas_expander_discover(struct domain_device *dev) | 427 | static int sas_expander_discover(struct domain_device *dev) |
| 428 | { | 428 | { |
| 429 | struct expander_device *ex = &dev->ex_dev; | 429 | struct expander_device *ex = &dev->ex_dev; |
| 430 | int res = -ENOMEM; | 430 | int res; |
| 431 | 431 | ||
| 432 | ex->ex_phy = kcalloc(ex->num_phys, sizeof(*ex->ex_phy), GFP_KERNEL); | 432 | ex->ex_phy = kcalloc(ex->num_phys, sizeof(*ex->ex_phy), GFP_KERNEL); |
| 433 | if (!ex->ex_phy) | 433 | if (!ex->ex_phy) |
| @@ -627,6 +627,14 @@ struct lpfc_ras_fwlog { · 626 unmodified lines | |||
| 627 | enum ras_state state; /* RAS logging running state */ | 627 | enum ras_state state; /* RAS logging running state */ |
| 628 | }; | 628 | }; |
| 629 | 629 | ||
| 630 | #define DBG_LOG_STR_SZ 256 | ||
| 631 | #define DBG_LOG_SZ 256 | ||
| 632 | |||
| 633 | struct dbg_log_ent { | ||
| 634 | char log[DBG_LOG_STR_SZ]; | ||
| 635 | u64 t_ns; | ||
| 636 | }; | ||
| 637 | |||
| 630 | enum lpfc_irq_chann_mode { | 638 | enum lpfc_irq_chann_mode { |
| 631 | /* Assign IRQs to all possible cpus that have hardware queues */ | 639 | /* Assign IRQs to all possible cpus that have hardware queues */ |
| 632 | NORMAL_MODE, | 640 | NORMAL_MODE, |
| @@ -709,6 +717,9 @@ struct lpfc_hba { · 76 unmodified lines | |||
| 709 | struct workqueue_struct *wq; | 717 | struct workqueue_struct *wq; |
| 710 | struct delayed_work eq_delay_work; | 718 | struct delayed_work eq_delay_work; |
| 711 | 719 | ||
| 720 | #define LPFC_IDLE_STAT_DELAY 1000 | ||
| 721 | struct delayed_work idle_stat_delay_work; | ||
| 722 | |||
| 712 | struct lpfc_sli sli; | 723 | struct lpfc_sli sli; |
| 713 | uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */ | 724 | uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */ |
| 714 | uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */ | 725 | uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */ |
| @@ -1237,6 +1248,10 @@ struct lpfc_hba { · 522 unmodified lines | |||
| 1237 | struct scsi_host_template port_template; | 1248 | struct scsi_host_template port_template; |
| 1238 | /* SCSI host template information - for all vports */ | 1249 | /* SCSI host template information - for all vports */ |
| 1239 | struct scsi_host_template vport_template; | 1250 | struct scsi_host_template vport_template; |
| 1251 | atomic_t dbg_log_idx; | ||
| 1252 | atomic_t dbg_log_cnt; | ||
| 1253 | atomic_t dbg_log_dmping; | ||
| 1254 | struct dbg_log_ent dbg_log[DBG_LOG_SZ]; | ||
| 1240 | }; | 1255 | }; |
| 1241 | 1256 | ||
| 1242 | static inline struct Scsi_Host * | 1257 | static inline struct Scsi_Host * |
| @@ -2404,33 +2404,27 @@ lpfc_sli4_bsg_link_diag_test(struct bsg_job *job) · 2403 unmodified lines | |||
| 2404 | union lpfc_sli4_cfg_shdr *shdr; | 2404 | union lpfc_sli4_cfg_shdr *shdr; |
| 2405 | uint32_t shdr_status, shdr_add_status; | 2405 | uint32_t shdr_status, shdr_add_status; |
| 2406 | struct diag_status *diag_status_reply; | 2406 | struct diag_status *diag_status_reply; |
| 2407 | int mbxstatus, rc = 0; | 2407 | int mbxstatus, rc = -ENODEV, rc1 = 0; |
| 2408 | 2408 | ||
| 2409 | shost = fc_bsg_to_shost(job); | 2409 | shost = fc_bsg_to_shost(job); |
| 2410 | if (!shost) { | 2410 | if (!shost) |
| 2411 | rc = -ENODEV; | ||
| 2412 | goto job_error; | 2411 | goto job_error; |
| 2413 | } | 2412 | |
| 2414 | vport = shost_priv(shost); | 2413 | vport = shost_priv(shost); |
| 2415 | if (!vport) { | 2414 | if (!vport) |
| 2416 | rc = -ENODEV; | ||
| 2417 | goto job_error; | 2415 | goto job_error; |
| 2418 | } | 2416 | |
| 2419 | phba = vport->phba; | 2417 | phba = vport->phba; |
| 2420 | if (!phba) { | 2418 | if (!phba) |
| 2421 | rc = -ENODEV; | ||
| 2422 | goto job_error; | 2419 | goto job_error; |
| 2423 | } | ||
| 2424 | 2420 | ||
| 2425 | if (phba->sli_rev < LPFC_SLI_REV4) { | 2421 | |
| 2426 | rc = -ENODEV; | 2422 | if (phba->sli_rev < LPFC_SLI_REV4) |
| 2427 | goto job_error; | 2423 | goto job_error; |
| 2428 | } | 2424 | |
| 2429 | if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) < | 2425 | if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) < |
| 2430 | LPFC_SLI_INTF_IF_TYPE_2) { | 2426 | LPFC_SLI_INTF_IF_TYPE_2) |
| 2431 | rc = -ENODEV; | ||
| 2432 | goto job_error; | 2427 | goto job_error; |
| 2433 | } | ||
| 2434 | 2428 | ||
| 2435 | if (job->request_len < sizeof(struct fc_bsg_request) + | 2429 | if (job->request_len < sizeof(struct fc_bsg_request) + |
| 2436 | sizeof(struct sli4_link_diag)) { | 2430 | sizeof(struct sli4_link_diag)) { |
| @@ -2465,8 +2459,10 @@ lpfc_sli4_bsg_link_diag_test(struct bsg_job *job) · 28 unmodified lines | |||
| 2465 | alloc_len = lpfc_sli4_config(phba, pmboxq, LPFC_MBOX_SUBSYSTEM_FCOE, | 2459 | alloc_len = lpfc_sli4_config(phba, pmboxq, LPFC_MBOX_SUBSYSTEM_FCOE, |
| 2466 | LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_STATE, | 2460 | LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_STATE, |
| 2467 | req_len, LPFC_SLI4_MBX_EMBED); | 2461 | req_len, LPFC_SLI4_MBX_EMBED); |
| 2468 | if (alloc_len != req_len) | 2462 | if (alloc_len != req_len) { |
| 2463 | rc = -ENOMEM; | ||
| 2469 | goto link_diag_test_exit; | 2464 | goto link_diag_test_exit; |
| 2465 | } | ||
| 2470 | 2466 | ||
| 2471 | run_link_diag_test = &pmboxq->u.mqe.un.link_diag_test; | 2467 | run_link_diag_test = &pmboxq->u.mqe.un.link_diag_test; |
| 2472 | bf_set(lpfc_mbx_run_diag_test_link_num, &run_link_diag_test->u.req, | 2468 | bf_set(lpfc_mbx_run_diag_test_link_num, &run_link_diag_test->u.req, |
| @@ -2515,7 +2511,7 @@ lpfc_sli4_bsg_link_diag_test(struct bsg_job *job) · 42 unmodified lines | |||
| 2515 | diag_status_reply->shdr_add_status = shdr_add_status; | 2511 | diag_status_reply->shdr_add_status = shdr_add_status; |
| 2516 | 2512 | ||
| 2517 | link_diag_test_exit: | 2513 | link_diag_test_exit: |
| 2518 | rc = lpfc_sli4_bsg_set_link_diag_state(phba, 0); | 2514 | rc1 = lpfc_sli4_bsg_set_link_diag_state(phba, 0); |
| 2519 | 2515 | ||
| 2520 | if (pmboxq) | 2516 | if (pmboxq) |
| 2521 | mempool_free(pmboxq, phba->mbox_mem_pool); | 2517 | mempool_free(pmboxq, phba->mbox_mem_pool); |
| @@ -2524,6 +2520,8 @@ link_diag_test_exit: · 2 unmodified lines | |||
| 2524 | 2520 | ||
| 2525 | job_error: | 2521 | job_error: |
| 2526 | /* make error code available to userspace */ | 2522 | /* make error code available to userspace */ |
| 2523 | if (rc1 && !rc) | ||
| 2524 | rc = rc1; | ||
| 2527 | bsg_reply->result = rc; | 2525 | bsg_reply->result = rc; |
| 2528 | /* complete the job back to userspace if no error */ | 2526 | /* complete the job back to userspace if no error */ |
| 2529 | if (rc == 0) | 2527 | if (rc == 0) |
| @@ -4306,6 +4304,7 @@ lpfc_bsg_handle_sli_cfg_mbox(struct lpfc_hba *phba, struct bsg_job *job, · 1776 unmodified lines | |||
| 4306 | case COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES: | 4304 | case COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES: |
| 4307 | case COMN_OPCODE_GET_CNTL_ATTRIBUTES: | 4305 | case COMN_OPCODE_GET_CNTL_ATTRIBUTES: |
| 4308 | case COMN_OPCODE_GET_PROFILE_CONFIG: | 4306 | case COMN_OPCODE_GET_PROFILE_CONFIG: |
| 4307 | case COMN_OPCODE_SET_FEATURES: | ||
| 4309 | lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, | 4308 | lpfc_printf_log(phba, KERN_INFO, LOG_LIBDFC, |
| 4310 | "3106 Handled SLI_CONFIG " | 4309 | "3106 Handled SLI_CONFIG " |
| 4311 | "subsys_comn, opcode:x%x\n", | 4310 | "subsys_comn, opcode:x%x\n", |
| @@ -225,6 +225,10 @@ struct lpfc_sli_config_hdr { · 224 unmodified lines | |||
| 225 | uint32_t reserved5; | 225 | uint32_t reserved5; |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | #define LPFC_CSF_BOOT_DEV 0x1D | ||
| 229 | #define LPFC_CSF_QUERY 0 | ||
| 230 | #define LPFC_CSF_SAVE 1 | ||
| 231 | |||
| 228 | struct lpfc_sli_config_emb0_subsys { | 232 | struct lpfc_sli_config_emb0_subsys { |
| 229 | struct lpfc_sli_config_hdr sli_config_hdr; | 233 | struct lpfc_sli_config_hdr sli_config_hdr; |
| 230 | #define LPFC_MBX_SLI_CONFIG_MAX_MSE 19 | 234 | #define LPFC_MBX_SLI_CONFIG_MAX_MSE 19 |
| @@ -243,6 +247,15 @@ struct lpfc_sli_config_emb0_subsys { · 12 unmodified lines | |||
| 243 | #define FCOE_OPCODE_ADD_FCF 0x09 | 247 | #define FCOE_OPCODE_ADD_FCF 0x09 |
| 244 | #define FCOE_OPCODE_SET_DPORT_MODE 0x27 | 248 | #define FCOE_OPCODE_SET_DPORT_MODE 0x27 |
| 245 | #define FCOE_OPCODE_GET_DPORT_RESULTS 0x28 | 249 | #define FCOE_OPCODE_GET_DPORT_RESULTS 0x28 |
| 250 | uint32_t timeout; /* comn_set_feature timeout */ | ||
| 251 | uint32_t request_length; /* comn_set_feature request len */ | ||
| 252 | uint32_t version; /* comn_set_feature version */ | ||
| 253 | uint32_t csf_feature; /* comn_set_feature feature */ | ||
| 254 | uint32_t word69; /* comn_set_feature parameter len */ | ||
| 255 | uint32_t word70; /* comn_set_feature parameter val0 */ | ||
| 256 | #define lpfc_emb0_subcmnd_csf_p0_SHIFT 0 | ||
| 257 | #define lpfc_emb0_subcmnd_csf_p0_MASK 0x3 | ||
| 258 | #define lpfc_emb0_subcmnd_csf_p0_WORD word70 | ||
| 246 | }; | 259 | }; |
| 247 | 260 | ||
| 248 | struct lpfc_sli_config_emb1_subsys { | 261 | struct lpfc_sli_config_emb1_subsys { |
| @@ -261,6 +274,7 @@ struct lpfc_sli_config_emb1_subsys { · 12 unmodified lines | |||
| 261 | #define COMN_OPCODE_WRITE_OBJECT 0xAC | 274 | #define COMN_OPCODE_WRITE_OBJECT 0xAC |
| 262 | #define COMN_OPCODE_READ_OBJECT_LIST 0xAD | 275 | #define COMN_OPCODE_READ_OBJECT_LIST 0xAD |
| 263 | #define COMN_OPCODE_DELETE_OBJECT 0xAE | 276 | #define COMN_OPCODE_DELETE_OBJECT 0xAE |
| 277 | #define COMN_OPCODE_SET_FEATURES 0xBF | ||
| 264 | #define COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES 0x79 | 278 | #define COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES 0x79 |
| 265 | #define COMN_OPCODE_GET_CNTL_ATTRIBUTES 0x20 | 279 | #define COMN_OPCODE_GET_CNTL_ATTRIBUTES 0x20 |
| 266 | uint32_t timeout; | 280 | uint32_t timeout; |
| @@ -386,7 +386,7 @@ void lpfc_rq_buf_free(struct lpfc_hba *phba, struct lpfc_dmabuf *mp); · 385 unmodified lines | |||
| 386 | int lpfc_link_reset(struct lpfc_vport *vport); | 386 | int lpfc_link_reset(struct lpfc_vport *vport); |
| 387 | 387 | ||
| 388 | /* Function prototypes. */ | 388 | /* Function prototypes. */ |
| 389 | int lpfc_check_pci_resettable(const struct lpfc_hba *phba); | 389 | int lpfc_check_pci_resettable(struct lpfc_hba *phba); |
| 390 | const char* lpfc_info(struct Scsi_Host *); | 390 | const char* lpfc_info(struct Scsi_Host *); |
| 391 | int lpfc_scan_finished(struct Scsi_Host *, unsigned long); | 391 | int lpfc_scan_finished(struct Scsi_Host *, unsigned long); |
| 392 | 392 | ||
| @@ -300,7 +300,7 @@ lpfc_ct_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *ctiocb) · 299 unmodified lines | |||
| 300 | return 0; | 300 | return 0; |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | /** | 303 | /* |
| 304 | * lpfc_gen_req - Build and issue a GEN_REQUEST command to the SLI Layer | 304 | * lpfc_gen_req - Build and issue a GEN_REQUEST command to the SLI Layer |
| 305 | * @vport: pointer to a host virtual N_Port data structure. | 305 | * @vport: pointer to a host virtual N_Port data structure. |
| 306 | * @bmp: Pointer to BPL for SLI command | 306 | * @bmp: Pointer to BPL for SLI command |
| @@ -394,7 +394,7 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, · 87 unmodified lines | |||
| 394 | return 0; | 394 | return 0; |
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | /** | 397 | /* |
| 398 | * lpfc_ct_cmd - Build and issue a CT command | 398 | * lpfc_ct_cmd - Build and issue a CT command |
| 399 | * @vport: pointer to a host virtual N_Port data structure. | 399 | * @vport: pointer to a host virtual N_Port data structure. |
| 400 | * @inmp: Pointer to data buffer for response data. | 400 | * @inmp: Pointer to data buffer for response data. |
| @@ -750,7 +750,7 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 349 unmodified lines | |||
| 750 | if (vport->fc_flag & FC_RSCN_MODE) | 750 | if (vport->fc_flag & FC_RSCN_MODE) |
| 751 | lpfc_els_flush_rscn(vport); | 751 | lpfc_els_flush_rscn(vport); |
| 752 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 752 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 753 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 753 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 754 | "0257 GID_FT Query error: 0x%x 0x%x\n", | 754 | "0257 GID_FT Query error: 0x%x 0x%x\n", |
| 755 | irsp->ulpStatus, vport->fc_ns_retry); | 755 | irsp->ulpStatus, vport->fc_ns_retry); |
| 756 | } else { | 756 | } else { |
| @@ -811,7 +811,7 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 54 unmodified lines | |||
| 811 | 811 | ||
| 812 | } else { | 812 | } else { |
| 813 | /* NameServer Rsp Error */ | 813 | /* NameServer Rsp Error */ |
| 814 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 814 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 815 | "0241 NameServer Rsp Error " | 815 | "0241 NameServer Rsp Error " |
| 816 | "Data: x%x x%x x%x x%x\n", | 816 | "Data: x%x x%x x%x x%x\n", |
| 817 | CTrsp->CommandResponse.bits.CmdRsp, | 817 | CTrsp->CommandResponse.bits.CmdRsp, |
| @@ -951,7 +951,7 @@ lpfc_cmpl_ct_cmd_gid_pt(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 133 unmodified lines | |||
| 951 | if (vport->fc_flag & FC_RSCN_MODE) | 951 | if (vport->fc_flag & FC_RSCN_MODE) |
| 952 | lpfc_els_flush_rscn(vport); | 952 | lpfc_els_flush_rscn(vport); |
| 953 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 953 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 954 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 954 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 955 | "4103 GID_FT Query error: 0x%x 0x%x\n", | 955 | "4103 GID_FT Query error: 0x%x 0x%x\n", |
| 956 | irsp->ulpStatus, vport->fc_ns_retry); | 956 | irsp->ulpStatus, vport->fc_ns_retry); |
| 957 | } else { | 957 | } else { |
| @@ -1012,7 +1012,7 @@ lpfc_cmpl_ct_cmd_gid_pt(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 54 unmodified lines | |||
| 1012 | } | 1012 | } |
| 1013 | } else { | 1013 | } else { |
| 1014 | /* NameServer Rsp Error */ | 1014 | /* NameServer Rsp Error */ |
| 1015 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1015 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1016 | "4109 NameServer Rsp Error " | 1016 | "4109 NameServer Rsp Error " |
| 1017 | "Data: x%x x%x x%x x%x\n", | 1017 | "Data: x%x x%x x%x x%x\n", |
| 1018 | CTrsp->CommandResponse.bits.CmdRsp, | 1018 | CTrsp->CommandResponse.bits.CmdRsp, |
| @@ -1143,7 +1143,7 @@ lpfc_cmpl_ct_cmd_gff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 124 unmodified lines | |||
| 1143 | } | 1143 | } |
| 1144 | } | 1144 | } |
| 1145 | } | 1145 | } |
| 1146 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1146 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1147 | "0267 NameServer GFF Rsp " | 1147 | "0267 NameServer GFF Rsp " |
| 1148 | "x%x Error (%d %d) Data: x%x x%x\n", | 1148 | "x%x Error (%d %d) Data: x%x x%x\n", |
| 1149 | did, irsp->ulpStatus, irsp->un.ulpWord[4], | 1149 | did, irsp->ulpStatus, irsp->un.ulpWord[4], |
| @@ -1271,7 +1271,7 @@ lpfc_cmpl_ct_cmd_gft_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 121 unmodified lines | |||
| 1271 | } | 1271 | } |
| 1272 | } | 1272 | } |
| 1273 | } else | 1273 | } else |
| 1274 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1274 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1275 | "3065 GFT_ID failed x%08x\n", irsp->ulpStatus); | 1275 | "3065 GFT_ID failed x%08x\n", irsp->ulpStatus); |
| 1276 | 1276 | ||
| 1277 | lpfc_ct_free_iocb(phba, cmdiocb); | 1277 | lpfc_ct_free_iocb(phba, cmdiocb); |
| @@ -1320,7 +1320,7 @@ lpfc_cmpl_ct(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 42 unmodified lines | |||
| 1320 | irsp->ulpStatus, irsp->un.ulpWord[4], cmdcode); | 1320 | irsp->ulpStatus, irsp->un.ulpWord[4], cmdcode); |
| 1321 | 1321 | ||
| 1322 | if (irsp->ulpStatus) { | 1322 | if (irsp->ulpStatus) { |
| 1323 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1323 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1324 | "0268 NS cmd x%x Error (x%x x%x)\n", | 1324 | "0268 NS cmd x%x Error (x%x x%x)\n", |
| 1325 | cmdcode, irsp->ulpStatus, irsp->un.ulpWord[4]); | 1325 | cmdcode, irsp->ulpStatus, irsp->un.ulpWord[4]); |
| 1326 | 1326 | ||
| @@ -1843,7 +1843,7 @@ ns_cmd_free_mpvirt: · 516 unmodified lines | |||
| 1843 | ns_cmd_free_mp: | 1843 | ns_cmd_free_mp: |
| 1844 | kfree(mp); | 1844 | kfree(mp); |
| 1845 | ns_cmd_exit: | 1845 | ns_cmd_exit: |
| 1846 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1846 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1847 | "0266 Issue NameServer Req x%x err %d Data: x%x x%x\n", | 1847 | "0266 Issue NameServer Req x%x err %d Data: x%x x%x\n", |
| 1848 | cmdcode, rc, vport->fc_flag, vport->fc_rscn_id_cnt); | 1848 | cmdcode, rc, vport->fc_flag, vport->fc_rscn_id_cnt); |
| 1849 | return 1; | 1849 | return 1; |
| @@ -3019,8 +3019,8 @@ int (*lpfc_fdmi_port_action[]) · 1169 unmodified lines | |||
| 3019 | * lpfc_fdmi_cmd - Build and send a FDMI cmd to the specified NPort | 3019 | * lpfc_fdmi_cmd - Build and send a FDMI cmd to the specified NPort |
| 3020 | * @vport: pointer to a host virtual N_Port data structure. | 3020 | * @vport: pointer to a host virtual N_Port data structure. |
| 3021 | * @ndlp: ndlp to send FDMI cmd to (if NULL use FDMI_DID) | 3021 | * @ndlp: ndlp to send FDMI cmd to (if NULL use FDMI_DID) |
| 3022 | * cmdcode: FDMI command to send | 3022 | * @cmdcode: FDMI command to send |
| 3023 | * mask: Mask of HBA or PORT Attributes to send | 3023 | * @new_mask: Mask of HBA or PORT Attributes to send |
| 3024 | * | 3024 | * |
| 3025 | * Builds and sends a FDMI command using the CT subsystem. | 3025 | * Builds and sends a FDMI command using the CT subsystem. |
| 3026 | */ | 3026 | */ |
| @@ -3262,7 +3262,7 @@ fdmi_cmd_exit: · 235 unmodified lines | |||
| 3262 | 3262 | ||
| 3263 | /** | 3263 | /** |
| 3264 | * lpfc_delayed_disc_tmo - Timeout handler for delayed discovery timer. | 3264 | * lpfc_delayed_disc_tmo - Timeout handler for delayed discovery timer. |
| 3265 | * @ptr - Context object of the timer. | 3265 | * @t: Context object of the timer. |
| 3266 | * | 3266 | * |
| 3267 | * This function set the WORKER_DELAYED_DISC_TMO flag and wake up | 3267 | * This function set the WORKER_DELAYED_DISC_TMO flag and wake up |
| 3268 | * the worker thread. | 3268 | * the worker thread. |
| @@ -100,7 +100,7 @@ lpfc_els_chk_latt(struct lpfc_vport *vport) · 99 unmodified lines | |||
| 100 | return 0; | 100 | return 0; |
| 101 | 101 | ||
| 102 | /* Pending Link Event during Discovery */ | 102 | /* Pending Link Event during Discovery */ |
| 103 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 103 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 104 | "0237 Pending Link Event during " | 104 | "0237 Pending Link Event during " |
| 105 | "Discovery: State x%x\n", | 105 | "Discovery: State x%x\n", |
| 106 | phba->pport->port_state); | 106 | phba->pport->port_state); |
| @@ -440,8 +440,9 @@ fail_free_mbox: · 333 unmodified lines | |||
| 440 | 440 | ||
| 441 | fail: | 441 | fail: |
| 442 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 442 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 443 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 443 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 444 | "0249 Cannot issue Register Fabric login: Err %d\n", err); | 444 | "0249 Cannot issue Register Fabric login: Err %d\n", |
| 445 | err); | ||
| 445 | return -ENXIO; | 446 | return -ENXIO; |
| 446 | } | 447 | } |
| 447 | 448 | ||
| @@ -524,8 +525,8 @@ fail: · 76 unmodified lines | |||
| 524 | } | 525 | } |
| 525 | 526 | ||
| 526 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 527 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 527 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 528 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 528 | "0289 Issue Register VFI failed: Err %d\n", rc); | 529 | "0289 Issue Register VFI failed: Err %d\n", rc); |
| 529 | return rc; | 530 | return rc; |
| 530 | } | 531 | } |
| 531 | 532 | ||
| @@ -550,7 +551,7 @@ lpfc_issue_unreg_vfi(struct lpfc_vport *vport) · 18 unmodified lines | |||
| 550 | 551 | ||
| 551 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 552 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 552 | if (!mboxq) { | 553 | if (!mboxq) { |
| 553 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, | 554 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 554 | "2556 UNREG_VFI mbox allocation failed" | 555 | "2556 UNREG_VFI mbox allocation failed" |
| 555 | "HBA state x%x\n", phba->pport->port_state); | 556 | "HBA state x%x\n", phba->pport->port_state); |
| 556 | return -ENOMEM; | 557 | return -ENOMEM; |
| @@ -562,7 +563,7 @@ lpfc_issue_unreg_vfi(struct lpfc_vport *vport) · 5 unmodified lines | |||
| 562 | 563 | ||
| 563 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); | 564 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); |
| 564 | if (rc == MBX_NOT_FINISHED) { | 565 | if (rc == MBX_NOT_FINISHED) { |
| 565 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, | 566 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 566 | "2557 UNREG_VFI issue mbox failed rc x%x " | 567 | "2557 UNREG_VFI issue mbox failed rc x%x " |
| 567 | "HBA state x%x\n", | 568 | "HBA state x%x\n", |
| 568 | rc, phba->pport->port_state); | 569 | rc, phba->pport->port_state); |
| @@ -1041,18 +1042,18 @@ stop_rr_fcf_flogi: · 472 unmodified lines | |||
| 1041 | if (!(irsp->ulpStatus == IOSTAT_LOCAL_REJECT && | 1042 | if (!(irsp->ulpStatus == IOSTAT_LOCAL_REJECT && |
| 1042 | ((irsp->un.ulpWord[4] & IOERR_PARAM_MASK) == | 1043 | ((irsp->un.ulpWord[4] & IOERR_PARAM_MASK) == |
| 1043 | IOERR_LOOP_OPEN_FAILURE))) | 1044 | IOERR_LOOP_OPEN_FAILURE))) |
| 1044 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1045 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1045 | "2858 FLOGI failure Status:x%x/x%x " | 1046 | "2858 FLOGI failure Status:x%x/x%x TMO" |
| 1046 | "TMO:x%x Data x%x x%x\n", | 1047 | ":x%x Data x%x x%x\n", |
| 1047 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1048 | irsp->ulpStatus, irsp->un.ulpWord[4], |
| 1048 | irsp->ulpTimeout, phba->hba_flag, | 1049 | irsp->ulpTimeout, phba->hba_flag, |
| 1049 | phba->fcf.fcf_flag); | 1050 | phba->fcf.fcf_flag); |
| 1050 | 1051 | ||
| 1051 | /* Check for retry */ | 1052 | /* Check for retry */ |
| 1052 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) | 1053 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) |
| 1053 | goto out; | 1054 | goto out; |
| 1054 | 1055 | ||
| 1055 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS, | 1056 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_TRACE_EVENT, |
| 1056 | "0150 FLOGI failure Status:x%x/x%x " | 1057 | "0150 FLOGI failure Status:x%x/x%x " |
| 1057 | "xri x%x TMO:x%x\n", | 1058 | "xri x%x TMO:x%x\n", |
| 1058 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1059 | irsp->ulpStatus, irsp->un.ulpWord[4], |
| @@ -1132,8 +1133,7 @@ stop_rr_fcf_flogi: · 73 unmodified lines | |||
| 1132 | else if (!(phba->hba_flag & HBA_FCOE_MODE)) | 1133 | else if (!(phba->hba_flag & HBA_FCOE_MODE)) |
| 1133 | rc = lpfc_cmpl_els_flogi_nport(vport, ndlp, sp); | 1134 | rc = lpfc_cmpl_els_flogi_nport(vport, ndlp, sp); |
| 1134 | else { | 1135 | else { |
| 1135 | lpfc_printf_vlog(vport, KERN_ERR, | 1136 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1136 | LOG_FIP | LOG_ELS, | ||
| 1137 | "2831 FLOGI response with cleared Fabric " | 1137 | "2831 FLOGI response with cleared Fabric " |
| 1138 | "bit fcf_index 0x%x " | 1138 | "bit fcf_index 0x%x " |
| 1139 | "Switch Name %02x%02x%02x%02x%02x%02x%02x%02x " | 1139 | "Switch Name %02x%02x%02x%02x%02x%02x%02x%02x " |
| @@ -1934,7 +1934,7 @@ lpfc_cmpl_els_rrq(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 794 unmodified lines | |||
| 1934 | 1934 | ||
| 1935 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); | 1935 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); |
| 1936 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp) || ndlp != rrq->ndlp) { | 1936 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp) || ndlp != rrq->ndlp) { |
| 1937 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1937 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1938 | "2882 RRQ completes to NPort x%x " | 1938 | "2882 RRQ completes to NPort x%x " |
| 1939 | "with no ndlp. Data: x%x x%x x%x\n", | 1939 | "with no ndlp. Data: x%x x%x x%x\n", |
| 1940 | irsp->un.elsreq64.remoteID, | 1940 | irsp->un.elsreq64.remoteID, |
| @@ -1957,10 +1957,11 @@ lpfc_cmpl_els_rrq(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 16 unmodified lines | |||
| 1957 | (((irsp->un.ulpWord[4]) >> 16 != LSRJT_INVALID_CMD) && | 1957 | (((irsp->un.ulpWord[4]) >> 16 != LSRJT_INVALID_CMD) && |
| 1958 | ((irsp->un.ulpWord[4]) >> 16 != LSRJT_UNABLE_TPC)) || | 1958 | ((irsp->un.ulpWord[4]) >> 16 != LSRJT_UNABLE_TPC)) || |
| 1959 | (phba)->pport->cfg_log_verbose & LOG_ELS) | 1959 | (phba)->pport->cfg_log_verbose & LOG_ELS) |
| 1960 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1960 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1961 | "2881 RRQ failure DID:%06X Status:x%x/x%x\n", | 1961 | "2881 RRQ failure DID:%06X Status:" |
| 1962 | ndlp->nlp_DID, irsp->ulpStatus, | 1962 | "x%x/x%x\n", |
| 1963 | irsp->un.ulpWord[4]); | 1963 | ndlp->nlp_DID, irsp->ulpStatus, |
| 1964 | irsp->un.ulpWord[4]); | ||
| 1964 | } | 1965 | } |
| 1965 | out: | 1966 | out: |
| 1966 | if (rrq) | 1967 | if (rrq) |
| @@ -2010,7 +2011,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 43 unmodified lines | |||
| 2010 | 2011 | ||
| 2011 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); | 2012 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); |
| 2012 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { | 2013 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { |
| 2013 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 2014 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2014 | "0136 PLOGI completes to NPort x%x " | 2015 | "0136 PLOGI completes to NPort x%x " |
| 2015 | "with no ndlp. Data: x%x x%x x%x\n", | 2016 | "with no ndlp. Data: x%x x%x x%x\n", |
| 2016 | irsp->un.elsreq64.remoteID, | 2017 | irsp->un.elsreq64.remoteID, |
| @@ -2059,7 +2060,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 42 unmodified lines | |||
| 2059 | (((irsp->un.ulpWord[4]) >> 16 != LSRJT_INVALID_CMD) && | 2060 | (((irsp->un.ulpWord[4]) >> 16 != LSRJT_INVALID_CMD) && |
| 2060 | ((irsp->un.ulpWord[4]) >> 16 != LSRJT_UNABLE_TPC)) || | 2061 | ((irsp->un.ulpWord[4]) >> 16 != LSRJT_UNABLE_TPC)) || |
| 2061 | (phba)->pport->cfg_log_verbose & LOG_ELS) | 2062 | (phba)->pport->cfg_log_verbose & LOG_ELS) |
| 2062 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 2063 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2063 | "2753 PLOGI failure DID:%06X Status:x%x/x%x\n", | 2064 | "2753 PLOGI failure DID:%06X Status:x%x/x%x\n", |
| 2064 | ndlp->nlp_DID, irsp->ulpStatus, | 2065 | ndlp->nlp_DID, irsp->ulpStatus, |
| 2065 | irsp->un.ulpWord[4]); | 2066 | irsp->un.ulpWord[4]); |
| @@ -2237,6 +2238,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 171 unmodified lines | |||
| 2237 | IOCB_t *irsp; | 2238 | IOCB_t *irsp; |
| 2238 | struct lpfc_nodelist *ndlp; | 2239 | struct lpfc_nodelist *ndlp; |
| 2239 | char *mode; | 2240 | char *mode; |
| 2241 | u32 loglevel; | ||
| 2240 | 2242 | ||
| 2241 | /* we pass cmdiocb to state machine which needs rspiocb as well */ | 2243 | /* we pass cmdiocb to state machine which needs rspiocb as well */ |
| 2242 | cmdiocb->context_un.rsp_iocb = rspiocb; | 2244 | cmdiocb->context_un.rsp_iocb = rspiocb; |
| @@ -2278,13 +2280,16 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 35 unmodified lines | |||
| 2278 | * could be expected. | 2280 | * could be expected. |
| 2279 | */ | 2281 | */ |
| 2280 | if ((vport->fc_flag & FC_FABRIC) || | 2282 | if ((vport->fc_flag & FC_FABRIC) || |
| 2281 | (vport->cfg_enable_fc4_type != LPFC_ENABLE_BOTH)) | 2283 | (vport->cfg_enable_fc4_type != LPFC_ENABLE_BOTH)) { |
| 2282 | mode = KERN_ERR; | 2284 | mode = KERN_ERR; |
| 2283 | else | 2285 | loglevel = LOG_TRACE_EVENT; |
| 2286 | } else { | ||
| 2284 | mode = KERN_INFO; | 2287 | mode = KERN_INFO; |
| 2288 | loglevel = LOG_ELS; | ||
| 2289 | } | ||
| 2285 | 2290 | ||
| 2286 | /* PRLI failed */ | 2291 | /* PRLI failed */ |
| 2287 | lpfc_printf_vlog(vport, mode, LOG_ELS, | 2292 | lpfc_printf_vlog(vport, mode, loglevel, |
| 2288 | "2754 PRLI failure DID:%06X Status:x%x/x%x, " | 2293 | "2754 PRLI failure DID:%06X Status:x%x/x%x, " |
| 2289 | "data: x%x\n", | 2294 | "data: x%x\n", |
| 2290 | ndlp->nlp_DID, irsp->ulpStatus, | 2295 | ndlp->nlp_DID, irsp->ulpStatus, |
| @@ -2695,7 +2700,7 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 404 unmodified lines | |||
| 2695 | goto out; | 2700 | goto out; |
| 2696 | } | 2701 | } |
| 2697 | /* ADISC failed */ | 2702 | /* ADISC failed */ |
| 2698 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 2703 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2699 | "2755 ADISC failure DID:%06X Status:x%x/x%x\n", | 2704 | "2755 ADISC failure DID:%06X Status:x%x/x%x\n", |
| 2700 | ndlp->nlp_DID, irsp->ulpStatus, | 2705 | ndlp->nlp_DID, irsp->ulpStatus, |
| 2701 | irsp->un.ulpWord[4]); | 2706 | irsp->un.ulpWord[4]); |
| @@ -2853,7 +2858,7 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 151 unmodified lines | |||
| 2853 | */ | 2858 | */ |
| 2854 | if (irsp->ulpStatus) { | 2859 | if (irsp->ulpStatus) { |
| 2855 | /* LOGO failed */ | 2860 | /* LOGO failed */ |
| 2856 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 2861 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2857 | "2756 LOGO failure, No Retry DID:%06X Status:x%x/x%x\n", | 2862 | "2756 LOGO failure, No Retry DID:%06X Status:x%x/x%x\n", |
| 2858 | ndlp->nlp_DID, irsp->ulpStatus, | 2863 | ndlp->nlp_DID, irsp->ulpStatus, |
| 2859 | irsp->un.ulpWord[4]); | 2864 | irsp->un.ulpWord[4]); |
| @@ -3597,7 +3602,7 @@ lpfc_cancel_retry_delay_tmo(struct lpfc_vport *vport, struct lpfc_nodelist *nlp) · 737 unmodified lines | |||
| 3597 | 3602 | ||
| 3598 | /** | 3603 | /** |
| 3599 | * lpfc_els_retry_delay - Timer function with a ndlp delayed function timer | 3604 | * lpfc_els_retry_delay - Timer function with a ndlp delayed function timer |
| 3600 | * @ptr: holder for the pointer to the timer function associated data (ndlp). | 3605 | * @t: pointer to the timer function associated data (ndlp). |
| 3601 | * | 3606 | * |
| 3602 | * This routine is invoked by the ndlp delayed-function timer to check | 3607 | * This routine is invoked by the ndlp delayed-function timer to check |
| 3603 | * whether there is any pending ELS retry event(s) with the node. If not, it | 3608 | * whether there is any pending ELS retry event(s) with the node. If not, it |
| @@ -3734,7 +3739,7 @@ lpfc_link_reset(struct lpfc_vport *vport) · 130 unmodified lines | |||
| 3734 | "2851 Attempt link reset\n"); | 3739 | "2851 Attempt link reset\n"); |
| 3735 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 3740 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 3736 | if (!mbox) { | 3741 | if (!mbox) { |
| 3737 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 3742 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3738 | "2852 Failed to allocate mbox memory"); | 3743 | "2852 Failed to allocate mbox memory"); |
| 3739 | return 1; | 3744 | return 1; |
| 3740 | } | 3745 | } |
| @@ -3756,7 +3761,7 @@ lpfc_link_reset(struct lpfc_vport *vport) · 15 unmodified lines | |||
| 3756 | mbox->vport = vport; | 3761 | mbox->vport = vport; |
| 3757 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); | 3762 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); |
| 3758 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { | 3763 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { |
| 3759 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 3764 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3760 | "2853 Failed to issue INIT_LINK " | 3765 | "2853 Failed to issue INIT_LINK " |
| 3761 | "mbox command, rc:x%x\n", rc); | 3766 | "mbox command, rc:x%x\n", rc); |
| 3762 | mempool_free(mbox, phba->mbox_mem_pool); | 3767 | mempool_free(mbox, phba->mbox_mem_pool); |
| @@ -3860,7 +3865,7 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 97 unmodified lines | |||
| 3860 | break; | 3865 | break; |
| 3861 | 3866 | ||
| 3862 | case IOERR_ILLEGAL_COMMAND: | 3867 | case IOERR_ILLEGAL_COMMAND: |
| 3863 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 3868 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3864 | "0124 Retry illegal cmd x%x " | 3869 | "0124 Retry illegal cmd x%x " |
| 3865 | "retry:x%x delay:x%x\n", | 3870 | "retry:x%x delay:x%x\n", |
| 3866 | cmd, cmdiocb->retry, delay); | 3871 | cmd, cmdiocb->retry, delay); |
| @@ -3970,7 +3975,8 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 103 unmodified lines | |||
| 3970 | if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) && | 3975 | if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) && |
| 3971 | (cmd == ELS_CMD_FDISC) && | 3976 | (cmd == ELS_CMD_FDISC) && |
| 3972 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_OUT_OF_RESOURCE)){ | 3977 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_OUT_OF_RESOURCE)){ |
| 3973 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 3978 | lpfc_printf_vlog(vport, KERN_ERR, |
| 3979 | LOG_TRACE_EVENT, | ||
| 3974 | "0125 FDISC Failed (x%x). " | 3980 | "0125 FDISC Failed (x%x). " |
| 3975 | "Fabric out of resources\n", | 3981 | "Fabric out of resources\n", |
| 3976 | stat.un.lsRjtError); | 3982 | stat.un.lsRjtError); |
| @@ -4009,7 +4015,8 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 32 unmodified lines | |||
| 4009 | LSEXP_NOTHING_MORE) { | 4015 | LSEXP_NOTHING_MORE) { |
| 4010 | vport->fc_sparam.cmn.bbRcvSizeMsb &= 0xf; | 4016 | vport->fc_sparam.cmn.bbRcvSizeMsb &= 0xf; |
| 4011 | retry = 1; | 4017 | retry = 1; |
| 4012 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 4018 | lpfc_printf_vlog(vport, KERN_ERR, |
| 4019 | LOG_TRACE_EVENT, | ||
| 4013 | "0820 FLOGI Failed (x%x). " | 4020 | "0820 FLOGI Failed (x%x). " |
| 4014 | "BBCredit Not Supported\n", | 4021 | "BBCredit Not Supported\n", |
| 4015 | stat.un.lsRjtError); | 4022 | stat.un.lsRjtError); |
| @@ -4022,7 +4029,8 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 6 unmodified lines | |||
| 4022 | ((stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_PNAME) || | 4029 | ((stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_PNAME) || |
| 4023 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID)) | 4030 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID)) |
| 4024 | ) { | 4031 | ) { |
| 4025 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 4032 | lpfc_printf_vlog(vport, KERN_ERR, |
| 4033 | LOG_TRACE_EVENT, | ||
| 4026 | "0122 FDISC Failed (x%x). " | 4034 | "0122 FDISC Failed (x%x). " |
| 4027 | "Fabric Detected Bad WWN\n", | 4035 | "Fabric Detected Bad WWN\n", |
| 4028 | stat.un.lsRjtError); | 4036 | stat.un.lsRjtError); |
| @@ -4200,7 +4208,7 @@ out_retry: · 171 unmodified lines | |||
| 4200 | } | 4208 | } |
| 4201 | /* No retry ELS command <elsCmd> to remote NPORT <did> */ | 4209 | /* No retry ELS command <elsCmd> to remote NPORT <did> */ |
| 4202 | if (logerr) { | 4210 | if (logerr) { |
| 4203 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 4211 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 4204 | "0137 No retry ELS command x%x to remote " | 4212 | "0137 No retry ELS command x%x to remote " |
| 4205 | "NPORT x%x: Out of Resources: Error:x%x/%x\n", | 4213 | "NPORT x%x: Out of Resources: Error:x%x/%x\n", |
| 4206 | cmd, did, irsp->ulpStatus, | 4214 | cmd, did, irsp->ulpStatus, |
| @@ -4499,7 +4507,7 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 292 unmodified lines | |||
| 4499 | irsp = &rspiocb->iocb; | 4507 | irsp = &rspiocb->iocb; |
| 4500 | 4508 | ||
| 4501 | if (!vport) { | 4509 | if (!vport) { |
| 4502 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4510 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4503 | "3177 ELS response failed\n"); | 4511 | "3177 ELS response failed\n"); |
| 4504 | goto out; | 4512 | goto out; |
| 4505 | } | 4513 | } |
| @@ -4605,7 +4613,7 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 99 unmodified lines | |||
| 4605 | ndlp->nlp_flag &= ~NLP_REG_LOGIN_SEND; | 4613 | ndlp->nlp_flag &= ~NLP_REG_LOGIN_SEND; |
| 4606 | 4614 | ||
| 4607 | /* ELS rsp: Cannot issue reg_login for <NPortid> */ | 4615 | /* ELS rsp: Cannot issue reg_login for <NPortid> */ |
| 4608 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 4616 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 4609 | "0138 ELS rsp: Cannot issue reg_login for x%x " | 4617 | "0138 ELS rsp: Cannot issue reg_login for x%x " |
| 4610 | "Data: x%x x%x x%x\n", | 4618 | "Data: x%x x%x x%x\n", |
| 4611 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, | 4619 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
| @@ -4843,7 +4851,7 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag, · 231 unmodified lines | |||
| 4843 | /** | 4851 | /** |
| 4844 | * lpfc_els_rsp_reject - Propare and issue a rjt response iocb command | 4852 | * lpfc_els_rsp_reject - Propare and issue a rjt response iocb command |
| 4845 | * @vport: pointer to a virtual N_Port data structure. | 4853 | * @vport: pointer to a virtual N_Port data structure. |
| 4846 | * @rejectError: | 4854 | * @rejectError: reject response to issue |
| 4847 | * @oldiocb: pointer to the original lpfc command iocb data structure. | 4855 | * @oldiocb: pointer to the original lpfc command iocb data structure. |
| 4848 | * @ndlp: pointer to a node-list data structure. | 4856 | * @ndlp: pointer to a node-list data structure. |
| 4849 | * @mbox: pointer to the driver internal queue element for mailbox command. | 4857 | * @mbox: pointer to the driver internal queue element for mailbox command. |
| @@ -6411,8 +6419,8 @@ lpfc_els_rcv_lcb(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, · 1561 unmodified lines | |||
| 6411 | lcb_context->rx_id = cmdiocb->iocb.ulpContext; | 6419 | lcb_context->rx_id = cmdiocb->iocb.ulpContext; |
| 6412 | lcb_context->ndlp = lpfc_nlp_get(ndlp); | 6420 | lcb_context->ndlp = lpfc_nlp_get(ndlp); |
| 6413 | if (lpfc_sli4_set_beacon(vport, lcb_context, state)) { | 6421 | if (lpfc_sli4_set_beacon(vport, lcb_context, state)) { |
| 6414 | lpfc_printf_vlog(ndlp->vport, KERN_ERR, | 6422 | lpfc_printf_vlog(ndlp->vport, KERN_ERR, LOG_TRACE_EVENT, |
| 6415 | LOG_ELS, "0193 failed to send mail box"); | 6423 | "0193 failed to send mail box"); |
| 6416 | kfree(lcb_context); | 6424 | kfree(lcb_context); |
| 6417 | lpfc_nlp_put(ndlp); | 6425 | lpfc_nlp_put(ndlp); |
| 6418 | rjt_err = LSRJT_UNABLE_TPC; | 6426 | rjt_err = LSRJT_UNABLE_TPC; |
| @@ -6621,7 +6629,7 @@ lpfc_send_rscn_event(struct lpfc_vport *vport, · 202 unmodified lines | |||
| 6621 | rscn_event_data = kmalloc(sizeof(struct lpfc_rscn_event_header) + | 6629 | rscn_event_data = kmalloc(sizeof(struct lpfc_rscn_event_header) + |
| 6622 | payload_len, GFP_KERNEL); | 6630 | payload_len, GFP_KERNEL); |
| 6623 | if (!rscn_event_data) { | 6631 | if (!rscn_event_data) { |
| 6624 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 6632 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 6625 | "0147 Failed to allocate memory for RSCN event\n"); | 6633 | "0147 Failed to allocate memory for RSCN event\n"); |
| 6626 | return; | 6634 | return; |
| 6627 | } | 6635 | } |
| @@ -6998,7 +7006,7 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, · 370 unmodified lines | |||
| 6998 | 7006 | ||
| 6999 | /* An FLOGI ELS command <elsCmd> was received from DID <did> in | 7007 | /* An FLOGI ELS command <elsCmd> was received from DID <did> in |
| 7000 | Loop Mode */ | 7008 | Loop Mode */ |
| 7001 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 7009 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 7002 | "0113 An FLOGI ELS command x%x was " | 7010 | "0113 An FLOGI ELS command x%x was " |
| 7003 | "received from DID x%x in Loop Mode\n", | 7011 | "received from DID x%x in Loop Mode\n", |
| 7004 | cmd, did); | 7012 | cmd, did); |
| @@ -7879,7 +7887,7 @@ lpfc_els_rcv_fan(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, · 874 unmodified lines | |||
| 7879 | 7887 | ||
| 7880 | /** | 7888 | /** |
| 7881 | * lpfc_els_timeout - Handler funciton to the els timer | 7889 | * lpfc_els_timeout - Handler funciton to the els timer |
| 7882 | * @ptr: holder for the timer function associated data. | 7890 | * @t: timer context used to obtain the vport. |
| 7883 | * | 7891 | * |
| 7884 | * This routine is invoked by the ELS timer after timeout. It posts the ELS | 7892 | * This routine is invoked by the ELS timer after timeout. It posts the ELS |
| 7885 | * timer timeout event by setting the WORKER_ELS_TMO bit to the work port | 7893 | * timer timeout event by setting the WORKER_ELS_TMO bit to the work port |
| @@ -7988,7 +7996,7 @@ lpfc_els_timeout_handler(struct lpfc_vport *vport) · 102 unmodified lines | |||
| 7988 | 7996 | ||
| 7989 | list_for_each_entry_safe(piocb, tmp_iocb, &abort_list, dlist) { | 7997 | list_for_each_entry_safe(piocb, tmp_iocb, &abort_list, dlist) { |
| 7990 | cmd = &piocb->iocb; | 7998 | cmd = &piocb->iocb; |
| 7991 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 7999 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 7992 | "0127 ELS timeout Data: x%x x%x x%x " | 8000 | "0127 ELS timeout Data: x%x x%x x%x " |
| 7993 | "x%x\n", els_command, | 8001 | "x%x\n", els_command, |
| 7994 | remote_ID, cmd->ulpCommand, cmd->ulpIoTag); | 8002 | remote_ID, cmd->ulpCommand, cmd->ulpIoTag); |
| @@ -8098,7 +8106,7 @@ lpfc_els_flush_cmd(struct lpfc_vport *vport) · 103 unmodified lines | |||
| 8098 | spin_unlock_irqrestore(&phba->hbalock, iflags); | 8106 | spin_unlock_irqrestore(&phba->hbalock, iflags); |
| 8099 | } | 8107 | } |
| 8100 | if (!list_empty(&abort_list)) | 8108 | if (!list_empty(&abort_list)) |
| 8101 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 8109 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 8102 | "3387 abort list for txq not empty\n"); | 8110 | "3387 abort list for txq not empty\n"); |
| 8103 | INIT_LIST_HEAD(&abort_list); | 8111 | INIT_LIST_HEAD(&abort_list); |
| 8104 | 8112 | ||
| @@ -8252,7 +8260,7 @@ lpfc_send_els_failure_event(struct lpfc_hba *phba, · 147 unmodified lines | |||
| 8252 | * lpfc_send_els_event - Posts unsolicited els event | 8260 | * lpfc_send_els_event - Posts unsolicited els event |
| 8253 | * @vport: Pointer to vport object. | 8261 | * @vport: Pointer to vport object. |
| 8254 | * @ndlp: Pointer FC node object. | 8262 | * @ndlp: Pointer FC node object. |
| 8255 | * @cmd: ELS command code. | 8263 | * @payload: ELS command code type. |
| 8256 | * | 8264 | * |
| 8257 | * This function posts an event when there is an incoming | 8265 | * This function posts an event when there is an incoming |
| 8258 | * unsolicited ELS command. | 8266 | * unsolicited ELS command. |
| @@ -8269,7 +8277,7 @@ lpfc_send_els_event(struct lpfc_vport *vport, · 10 unmodified lines | |||
| 8269 | if (*payload == ELS_CMD_LOGO) { | 8277 | if (*payload == ELS_CMD_LOGO) { |
| 8270 | logo_data = kmalloc(sizeof(struct lpfc_logo_event), GFP_KERNEL); | 8278 | logo_data = kmalloc(sizeof(struct lpfc_logo_event), GFP_KERNEL); |
| 8271 | if (!logo_data) { | 8279 | if (!logo_data) { |
| 8272 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 8280 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 8273 | "0148 Failed to allocate memory " | 8281 | "0148 Failed to allocate memory " |
| 8274 | "for LOGO event\n"); | 8282 | "for LOGO event\n"); |
| 8275 | return; | 8283 | return; |
| @@ -8279,7 +8287,7 @@ lpfc_send_els_event(struct lpfc_vport *vport, · 3 unmodified lines | |||
| 8279 | els_data = kmalloc(sizeof(struct lpfc_els_event_header), | 8287 | els_data = kmalloc(sizeof(struct lpfc_els_event_header), |
| 8280 | GFP_KERNEL); | 8288 | GFP_KERNEL); |
| 8281 | if (!els_data) { | 8289 | if (!els_data) { |
| 8282 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 8290 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 8283 | "0149 Failed to allocate memory " | 8291 | "0149 Failed to allocate memory " |
| 8284 | "for ELS event\n"); | 8292 | "for ELS event\n"); |
| 8285 | return; | 8293 | return; |
| @@ -8337,7 +8345,7 @@ DECLARE_ENUM2STR_LOOKUP(lpfc_get_fpin_li_event_nm, fc_fpin_li_event_types, · 51 unmodified lines | |||
| 8337 | /** | 8345 | /** |
| 8338 | * lpfc_els_rcv_fpin_li - Process an FPIN Link Integrity Event. | 8346 | * lpfc_els_rcv_fpin_li - Process an FPIN Link Integrity Event. |
| 8339 | * @vport: Pointer to vport object. | 8347 | * @vport: Pointer to vport object. |
| 8340 | * @lnk_not: Pointer to the Link Integrity Notification Descriptor. | 8348 | * @tlv: Pointer to the Link Integrity Notification Descriptor. |
| 8341 | * | 8349 | * |
| 8342 | * This function processes a link integrity FPIN event by | 8350 | * This function processes a link integrity FPIN event by |
| 8343 | * logging a message | 8351 | * logging a message |
| @@ -8396,7 +8404,7 @@ lpfc_els_rcv_fpin(struct lpfc_vport *vport, struct fc_els_fpin *fpin, · 52 unmodified lines | |||
| 8396 | break; | 8404 | break; |
| 8397 | default: | 8405 | default: |
| 8398 | dtag_nm = lpfc_get_tlv_dtag_nm(dtag); | 8406 | dtag_nm = lpfc_get_tlv_dtag_nm(dtag); |
| 8399 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 8407 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 8400 | "4678 skipped FPIN descriptor[%d]: " | 8408 | "4678 skipped FPIN descriptor[%d]: " |
| 8401 | "tag x%x (%s)\n", | 8409 | "tag x%x (%s)\n", |
| 8402 | desc_cnt, dtag, dtag_nm); | 8410 | desc_cnt, dtag, dtag_nm); |
| @@ -8811,7 +8819,7 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, · 408 unmodified lines | |||
| 8811 | rjt_exp = LSEXP_NOTHING_MORE; | 8819 | rjt_exp = LSEXP_NOTHING_MORE; |
| 8812 | 8820 | ||
| 8813 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ | 8821 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ |
| 8814 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 8822 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 8815 | "0115 Unknown ELS command x%x " | 8823 | "0115 Unknown ELS command x%x " |
| 8816 | "received from NPORT x%x\n", cmd, did); | 8824 | "received from NPORT x%x\n", cmd, did); |
| 8817 | if (newnode) | 8825 | if (newnode) |
| @@ -8856,7 +8864,7 @@ lsrjt: · 38 unmodified lines | |||
| 8856 | 8864 | ||
| 8857 | dropit: | 8865 | dropit: |
| 8858 | if (vport && !(vport->load_flag & FC_UNLOADING)) | 8866 | if (vport && !(vport->load_flag & FC_UNLOADING)) |
| 8859 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 8867 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 8860 | "0111 Dropping received ELS cmd " | 8868 | "0111 Dropping received ELS cmd " |
| 8861 | "Data: x%x x%x x%x\n", | 8869 | "Data: x%x x%x x%x\n", |
| 8862 | icmd->ulpStatus, icmd->un.ulpWord[4], icmd->ulpTimeout); | 8870 | icmd->ulpStatus, icmd->un.ulpWord[4], icmd->ulpTimeout); |
| @@ -9006,7 +9014,7 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) · 143 unmodified lines | |||
| 9006 | spin_lock_irq(shost->host_lock); | 9014 | spin_lock_irq(shost->host_lock); |
| 9007 | if (vport->fc_flag & FC_DISC_DELAYED) { | 9015 | if (vport->fc_flag & FC_DISC_DELAYED) { |
| 9008 | spin_unlock_irq(shost->host_lock); | 9016 | spin_unlock_irq(shost->host_lock); |
| 9009 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 9017 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9010 | "3334 Delay fc port discovery for %d seconds\n", | 9018 | "3334 Delay fc port discovery for %d seconds\n", |
| 9011 | phba->fc_ratov); | 9019 | phba->fc_ratov); |
| 9012 | mod_timer(&vport->delayed_disc_tmo, | 9020 | mod_timer(&vport->delayed_disc_tmo, |
| @@ -9024,7 +9032,7 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) · 11 unmodified lines | |||
| 9024 | return; | 9032 | return; |
| 9025 | } | 9033 | } |
| 9026 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 9034 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 9027 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 9035 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9028 | "0251 NameServer login: no memory\n"); | 9036 | "0251 NameServer login: no memory\n"); |
| 9029 | return; | 9037 | return; |
| 9030 | } | 9038 | } |
| @@ -9036,7 +9044,7 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) · 5 unmodified lines | |||
| 9036 | return; | 9044 | return; |
| 9037 | } | 9045 | } |
| 9038 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 9046 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 9039 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 9047 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9040 | "0348 NameServer login: node freed\n"); | 9048 | "0348 NameServer login: node freed\n"); |
| 9041 | return; | 9049 | return; |
| 9042 | } | 9050 | } |
| @@ -9047,7 +9055,7 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) · 4 unmodified lines | |||
| 9047 | 9055 | ||
| 9048 | if (lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0)) { | 9056 | if (lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0)) { |
| 9049 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 9057 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 9050 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 9058 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9051 | "0252 Cannot issue NameServer login\n"); | 9059 | "0252 Cannot issue NameServer login\n"); |
| 9052 | return; | 9060 | return; |
| 9053 | } | 9061 | } |
| @@ -9084,7 +9092,7 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 30 unmodified lines | |||
| 9084 | spin_unlock_irq(shost->host_lock); | 9092 | spin_unlock_irq(shost->host_lock); |
| 9085 | 9093 | ||
| 9086 | if (mb->mbxStatus) { | 9094 | if (mb->mbxStatus) { |
| 9087 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 9095 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9088 | "0915 Register VPI failed : Status: x%x" | 9096 | "0915 Register VPI failed : Status: x%x" |
| 9089 | " upd bit: x%x \n", mb->mbxStatus, | 9097 | " upd bit: x%x \n", mb->mbxStatus, |
| 9090 | mb->un.varRegVpi.upd); | 9098 | mb->un.varRegVpi.upd); |
| @@ -9114,8 +9122,8 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 23 unmodified lines | |||
| 9114 | rc = lpfc_sli_issue_mbox(phba, pmb, | 9122 | rc = lpfc_sli_issue_mbox(phba, pmb, |
| 9115 | MBX_NOWAIT); | 9123 | MBX_NOWAIT); |
| 9116 | if (rc == MBX_NOT_FINISHED) { | 9124 | if (rc == MBX_NOT_FINISHED) { |
| 9117 | lpfc_printf_vlog(vport, | 9125 | lpfc_printf_vlog(vport, KERN_ERR, |
| 9118 | KERN_ERR, LOG_MBOX, | 9126 | LOG_TRACE_EVENT, |
| 9119 | "2732 Failed to issue INIT_VPI" | 9127 | "2732 Failed to issue INIT_VPI" |
| 9120 | " mailbox command\n"); | 9128 | " mailbox command\n"); |
| 9121 | } else { | 9129 | } else { |
| @@ -9203,12 +9211,12 @@ lpfc_register_new_vport(struct lpfc_hba *phba, struct lpfc_vport *vport, · 81 unmodified lines | |||
| 9203 | lpfc_nlp_put(ndlp); | 9211 | lpfc_nlp_put(ndlp); |
| 9204 | mempool_free(mbox, phba->mbox_mem_pool); | 9212 | mempool_free(mbox, phba->mbox_mem_pool); |
| 9205 | 9213 | ||
| 9206 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 9214 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9207 | "0253 Register VPI: Can't send mbox\n"); | 9215 | "0253 Register VPI: Can't send mbox\n"); |
| 9208 | goto mbox_err_exit; | 9216 | goto mbox_err_exit; |
| 9209 | } | 9217 | } |
| 9210 | } else { | 9218 | } else { |
| 9211 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 9219 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9212 | "0254 Register VPI: no memory\n"); | 9220 | "0254 Register VPI: no memory\n"); |
| 9213 | goto mbox_err_exit; | 9221 | goto mbox_err_exit; |
| 9214 | } | 9222 | } |
| @@ -9370,7 +9378,7 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, · 155 unmodified lines | |||
| 9370 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) | 9378 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) |
| 9371 | goto out; | 9379 | goto out; |
| 9372 | /* FDISC failed */ | 9380 | /* FDISC failed */ |
| 9373 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 9381 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9374 | "0126 FDISC failed. (x%x/x%x)\n", | 9382 | "0126 FDISC failed. (x%x/x%x)\n", |
| 9375 | irsp->ulpStatus, irsp->un.ulpWord[4]); | 9383 | irsp->ulpStatus, irsp->un.ulpWord[4]); |
| 9376 | goto fdisc_failed; | 9384 | goto fdisc_failed; |
| @@ -9492,7 +9500,7 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 115 unmodified lines | |||
| 9492 | ELS_CMD_FDISC); | 9500 | ELS_CMD_FDISC); |
| 9493 | if (!elsiocb) { | 9501 | if (!elsiocb) { |
| 9494 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 9502 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 9495 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 9503 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9496 | "0255 Issue FDISC: no IOCB\n"); | 9504 | "0255 Issue FDISC: no IOCB\n"); |
| 9497 | return 1; | 9505 | return 1; |
| 9498 | } | 9506 | } |
| @@ -9546,7 +9554,7 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 47 unmodified lines | |||
| 9546 | if (rc == IOCB_ERROR) { | 9554 | if (rc == IOCB_ERROR) { |
| 9547 | lpfc_els_free_iocb(phba, elsiocb); | 9555 | lpfc_els_free_iocb(phba, elsiocb); |
| 9548 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 9556 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 9549 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 9557 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 9550 | "0256 Issue FDISC: Cannot send IOCB\n"); | 9558 | "0256 Issue FDISC: Cannot send IOCB\n"); |
| 9551 | return 1; | 9559 | return 1; |
| 9552 | } | 9560 | } |
| @@ -9666,7 +9674,7 @@ lpfc_issue_els_npiv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 113 unmodified lines | |||
| 9666 | 9674 | ||
| 9667 | /** | 9675 | /** |
| 9668 | * lpfc_fabric_block_timeout - Handler function to the fabric block timer | 9676 | * lpfc_fabric_block_timeout - Handler function to the fabric block timer |
| 9669 | * @ptr: holder for the timer function associated data. | 9677 | * @t: timer context used to obtain the lpfc hba. |
| 9670 | * | 9678 | * |
| 9671 | * This routine is invoked by the fabric iocb block timer after | 9679 | * This routine is invoked by the fabric iocb block timer after |
| 9672 | * timeout. It posts the fabric iocb block timeout event by setting the | 9680 | * timeout. It posts the fabric iocb block timeout event by setting the |
| @@ -10127,8 +10135,7 @@ lpfc_sli_abts_recover_port(struct lpfc_vport *vport, · 454 unmodified lines | |||
| 10127 | "rport in state 0x%x\n", ndlp->nlp_state); | 10135 | "rport in state 0x%x\n", ndlp->nlp_state); |
| 10128 | return; | 10136 | return; |
| 10129 | } | 10137 | } |
| 10130 | lpfc_printf_log(phba, KERN_ERR, | 10138 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10131 | LOG_ELS | LOG_FCP_ERROR | LOG_NVME_IOERR, | ||
| 10132 | "3094 Start rport recovery on shost id 0x%x " | 10139 | "3094 Start rport recovery on shost id 0x%x " |
| 10133 | "fc_id 0x%06x vpi 0x%x rpi 0x%x state 0x%x " | 10140 | "fc_id 0x%06x vpi 0x%x rpi 0x%x state 0x%x " |
| 10134 | "flags 0x%x\n", | 10141 | "flags 0x%x\n", |
| @@ -155,17 +155,17 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport) · 154 unmodified lines | |||
| 155 | return; | 155 | return; |
| 156 | 156 | ||
| 157 | if (rport->port_name != wwn_to_u64(ndlp->nlp_portname.u.wwn)) | 157 | if (rport->port_name != wwn_to_u64(ndlp->nlp_portname.u.wwn)) |
| 158 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE, | 158 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 159 | "6789 rport name %llx != node port name %llx", | 159 | "6789 rport name %llx != node port name %llx", |
| 160 | rport->port_name, | 160 | rport->port_name, |
| 161 | wwn_to_u64(ndlp->nlp_portname.u.wwn)); | 161 | wwn_to_u64(ndlp->nlp_portname.u.wwn)); |
| 162 | 162 | ||
| 163 | evtp = &ndlp->dev_loss_evt; | 163 | evtp = &ndlp->dev_loss_evt; |
| 164 | 164 | ||
| 165 | if (!list_empty(&evtp->evt_listp)) { | 165 | if (!list_empty(&evtp->evt_listp)) { |
| 166 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE, | 166 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 167 | "6790 rport name %llx dev_loss_evt pending", | 167 | "6790 rport name %llx dev_loss_evt pending", |
| 168 | rport->port_name); | 168 | rport->port_name); |
| 169 | return; | 169 | return; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| @@ -295,7 +295,7 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp) · 123 unmodified lines | |||
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | if (warn_on) { | 297 | if (warn_on) { |
| 298 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 298 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 299 | "0203 Devloss timeout on " | 299 | "0203 Devloss timeout on " |
| 300 | "WWPN %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x " | 300 | "WWPN %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x " |
| 301 | "NPort x%06x Data: x%x x%x x%x\n", | 301 | "NPort x%06x Data: x%x x%x x%x\n", |
| @@ -304,7 +304,7 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp) · 2 unmodified lines | |||
| 304 | ndlp->nlp_DID, ndlp->nlp_flag, | 304 | ndlp->nlp_DID, ndlp->nlp_flag, |
| 305 | ndlp->nlp_state, ndlp->nlp_rpi); | 305 | ndlp->nlp_state, ndlp->nlp_rpi); |
| 306 | } else { | 306 | } else { |
| 307 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, | 307 | lpfc_printf_vlog(vport, KERN_INFO, LOG_TRACE_EVENT, |
| 308 | "0204 Devloss timeout on " | 308 | "0204 Devloss timeout on " |
| 309 | "WWPN %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x " | 309 | "WWPN %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x " |
| 310 | "NPort x%06x Data: x%x x%x x%x\n", | 310 | "NPort x%06x Data: x%x x%x x%x\n", |
| @@ -755,7 +755,7 @@ lpfc_do_work(void *p) · 444 unmodified lines | |||
| 755 | || kthread_should_stop())); | 755 | || kthread_should_stop())); |
| 756 | /* Signal wakeup shall terminate the worker thread */ | 756 | /* Signal wakeup shall terminate the worker thread */ |
| 757 | if (rc) { | 757 | if (rc) { |
| 758 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 758 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 759 | "0433 Wakeup on signal: rc=x%x\n", rc); | 759 | "0433 Wakeup on signal: rc=x%x\n", rc); |
| 760 | break; | 760 | break; |
| 761 | } | 761 | } |
| @@ -1092,7 +1092,7 @@ lpfc_mbx_cmpl_clear_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 330 unmodified lines | |||
| 1092 | /* Check for error */ | 1092 | /* Check for error */ |
| 1093 | if ((mb->mbxStatus) && (mb->mbxStatus != 0x1601)) { | 1093 | if ((mb->mbxStatus) && (mb->mbxStatus != 0x1601)) { |
| 1094 | /* CLEAR_LA mbox error <mbxStatus> state <hba_state> */ | 1094 | /* CLEAR_LA mbox error <mbxStatus> state <hba_state> */ |
| 1095 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 1095 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1096 | "0320 CLEAR_LA mbxStatus error x%x hba " | 1096 | "0320 CLEAR_LA mbxStatus error x%x hba " |
| 1097 | "state x%x\n", | 1097 | "state x%x\n", |
| 1098 | mb->mbxStatus, vport->port_state); | 1098 | mb->mbxStatus, vport->port_state); |
| @@ -1180,7 +1180,7 @@ lpfc_mbx_cmpl_local_config_link(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 81 unmodified lines | |||
| 1180 | return; | 1180 | return; |
| 1181 | 1181 | ||
| 1182 | out: | 1182 | out: |
| 1183 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 1183 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1184 | "0306 CONFIG_LINK mbxStatus error x%x " | 1184 | "0306 CONFIG_LINK mbxStatus error x%x " |
| 1185 | "HBA state x%x\n", | 1185 | "HBA state x%x\n", |
| 1186 | pmb->u.mb.mbxStatus, vport->port_state); | 1186 | pmb->u.mb.mbxStatus, vport->port_state); |
| @@ -1188,7 +1188,7 @@ out: · 1 unmodified line | |||
| 1188 | 1188 | ||
| 1189 | lpfc_linkdown(phba); | 1189 | lpfc_linkdown(phba); |
| 1190 | 1190 | ||
| 1191 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1191 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1192 | "0200 CONFIG_LINK bad hba state x%x\n", | 1192 | "0200 CONFIG_LINK bad hba state x%x\n", |
| 1193 | vport->port_state); | 1193 | vport->port_state); |
| 1194 | 1194 | ||
| @@ -1198,7 +1198,7 @@ out: · 3 unmodified lines | |||
| 1198 | 1198 | ||
| 1199 | /** | 1199 | /** |
| 1200 | * lpfc_sli4_clear_fcf_rr_bmask | 1200 | * lpfc_sli4_clear_fcf_rr_bmask |
| 1201 | * @phba pointer to the struct lpfc_hba for this port. | 1201 | * @phba: pointer to the struct lpfc_hba for this port. |
| 1202 | * This fucnction resets the round robin bit mask and clears the | 1202 | * This fucnction resets the round robin bit mask and clears the |
| 1203 | * fcf priority list. The list deletions are done while holding the | 1203 | * fcf priority list. The list deletions are done while holding the |
| 1204 | * hbalock. The ON_LIST flag and the FLOGI_FAILED flags are cleared | 1204 | * hbalock. The ON_LIST flag and the FLOGI_FAILED flags are cleared |
| @@ -1224,10 +1224,10 @@ lpfc_mbx_cmpl_reg_fcfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 19 unmodified lines | |||
| 1224 | struct lpfc_vport *vport = mboxq->vport; | 1224 | struct lpfc_vport *vport = mboxq->vport; |
| 1225 | 1225 | ||
| 1226 | if (mboxq->u.mb.mbxStatus) { | 1226 | if (mboxq->u.mb.mbxStatus) { |
| 1227 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 1227 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1228 | "2017 REG_FCFI mbxStatus error x%x " | 1228 | "2017 REG_FCFI mbxStatus error x%x " |
| 1229 | "HBA state x%x\n", | 1229 | "HBA state x%x\n", mboxq->u.mb.mbxStatus, |
| 1230 | mboxq->u.mb.mbxStatus, vport->port_state); | 1230 | vport->port_state); |
| 1231 | goto fail_out; | 1231 | goto fail_out; |
| 1232 | } | 1232 | } |
| 1233 | 1233 | ||
| @@ -1297,7 +1297,7 @@ lpfc_fab_name_match(uint8_t *fab_name, struct fcf_record *new_fcf_record) · 63 unmodified lines | |||
| 1297 | 1297 | ||
| 1298 | /** | 1298 | /** |
| 1299 | * lpfc_sw_name_match - Check if the fcf switch name match. | 1299 | * lpfc_sw_name_match - Check if the fcf switch name match. |
| 1300 | * @fab_name: pointer to fabric name. | 1300 | * @sw_name: pointer to switch name. |
| 1301 | * @new_fcf_record: pointer to fcf record. | 1301 | * @new_fcf_record: pointer to fcf record. |
| 1302 | * | 1302 | * |
| 1303 | * This routine compare the fcf record's switch name with provided | 1303 | * This routine compare the fcf record's switch name with provided |
| @@ -1385,7 +1385,7 @@ __lpfc_update_fcf_record_pri(struct lpfc_hba *phba, uint16_t fcf_index, · 81 unmodified lines | |||
| 1385 | 1385 | ||
| 1386 | /** | 1386 | /** |
| 1387 | * lpfc_copy_fcf_record - Copy fcf information to lpfc_hba. | 1387 | * lpfc_copy_fcf_record - Copy fcf information to lpfc_hba. |
| 1388 | * @fcf: pointer to driver fcf record. | 1388 | * @fcf_rec: pointer to driver fcf record. |
| 1389 | * @new_fcf_record: pointer to fcf record. | 1389 | * @new_fcf_record: pointer to fcf record. |
| 1390 | * | 1390 | * |
| 1391 | * This routine copies the FCF information from the FCF | 1391 | * This routine copies the FCF information from the FCF |
| @@ -1848,7 +1848,7 @@ lpfc_sli4_fcf_rec_mbox_parse(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq, · 456 unmodified lines | |||
| 1848 | */ | 1848 | */ |
| 1849 | lpfc_sli4_mbx_sge_get(mboxq, 0, &sge); | 1849 | lpfc_sli4_mbx_sge_get(mboxq, 0, &sge); |
| 1850 | if (unlikely(!mboxq->sge_array)) { | 1850 | if (unlikely(!mboxq->sge_array)) { |
| 1851 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 1851 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1852 | "2524 Failed to get the non-embedded SGE " | 1852 | "2524 Failed to get the non-embedded SGE " |
| 1853 | "virtual address\n"); | 1853 | "virtual address\n"); |
| 1854 | return NULL; | 1854 | return NULL; |
| @@ -1864,11 +1864,12 @@ lpfc_sli4_fcf_rec_mbox_parse(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq, · 9 unmodified lines | |||
| 1864 | if (shdr_status || shdr_add_status) { | 1864 | if (shdr_status || shdr_add_status) { |
| 1865 | if (shdr_status == STATUS_FCF_TABLE_EMPTY || | 1865 | if (shdr_status == STATUS_FCF_TABLE_EMPTY || |
| 1866 | if_type == LPFC_SLI_INTF_IF_TYPE_2) | 1866 | if_type == LPFC_SLI_INTF_IF_TYPE_2) |
| 1867 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP, | 1867 | lpfc_printf_log(phba, KERN_ERR, |
| 1868 | LOG_TRACE_EVENT, | ||
| 1868 | "2726 READ_FCF_RECORD Indicates empty " | 1869 | "2726 READ_FCF_RECORD Indicates empty " |
| 1869 | "FCF table.\n"); | 1870 | "FCF table.\n"); |
| 1870 | else | 1871 | else |
| 1871 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP, | 1872 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1872 | "2521 READ_FCF_RECORD mailbox failed " | 1873 | "2521 READ_FCF_RECORD mailbox failed " |
| 1873 | "with status x%x add_status x%x, " | 1874 | "with status x%x add_status x%x, " |
| 1874 | "mbx\n", shdr_status, shdr_add_status); | 1875 | "mbx\n", shdr_status, shdr_add_status); |
| @@ -1952,7 +1953,7 @@ lpfc_sli4_log_fcf_record_info(struct lpfc_hba *phba, · 77 unmodified lines | |||
| 1952 | } | 1953 | } |
| 1953 | 1954 | ||
| 1954 | /** | 1955 | /** |
| 1955 | lpfc_sli4_fcf_record_match - testing new FCF record for matching existing FCF | 1956 | * lpfc_sli4_fcf_record_match - testing new FCF record for matching existing FCF |
| 1956 | * @phba: pointer to lpfc hba data structure. | 1957 | * @phba: pointer to lpfc hba data structure. |
| 1957 | * @fcf_rec: pointer to an existing FCF record. | 1958 | * @fcf_rec: pointer to an existing FCF record. |
| 1958 | * @new_fcf_record: pointer to a new FCF record. | 1959 | * @new_fcf_record: pointer to a new FCF record. |
| @@ -2066,7 +2067,7 @@ stop_flogi_current_fcf: · 107 unmodified lines | |||
| 2066 | /** | 2067 | /** |
| 2067 | * lpfc_sli4_fcf_pri_list_del | 2068 | * lpfc_sli4_fcf_pri_list_del |
| 2068 | * @phba: pointer to lpfc hba data structure. | 2069 | * @phba: pointer to lpfc hba data structure. |
| 2069 | * @fcf_index the index of the fcf record to delete | 2070 | * @fcf_index: the index of the fcf record to delete |
| 2070 | * This routine checks the on list flag of the fcf_index to be deleted. | 2071 | * This routine checks the on list flag of the fcf_index to be deleted. |
| 2071 | * If it is one the list then it is removed from the list, and the flag | 2072 | * If it is one the list then it is removed from the list, and the flag |
| 2072 | * is cleared. This routine grab the hbalock before removing the fcf | 2073 | * is cleared. This routine grab the hbalock before removing the fcf |
| @@ -2096,7 +2097,7 @@ static void lpfc_sli4_fcf_pri_list_del(struct lpfc_hba *phba, · 23 unmodified lines | |||
| 2096 | /** | 2097 | /** |
| 2097 | * lpfc_sli4_set_fcf_flogi_fail | 2098 | * lpfc_sli4_set_fcf_flogi_fail |
| 2098 | * @phba: pointer to lpfc hba data structure. | 2099 | * @phba: pointer to lpfc hba data structure. |
| 2099 | * @fcf_index the index of the fcf record to update | 2100 | * @fcf_index: the index of the fcf record to update |
| 2100 | * This routine acquires the hbalock and then set the LPFC_FCF_FLOGI_FAILED | 2101 | * This routine acquires the hbalock and then set the LPFC_FCF_FLOGI_FAILED |
| 2101 | * flag so the the round robin slection for the particular priority level | 2102 | * flag so the the round robin slection for the particular priority level |
| 2102 | * will try a different fcf record that does not have this bit set. | 2103 | * will try a different fcf record that does not have this bit set. |
| @@ -2116,7 +2117,8 @@ lpfc_sli4_set_fcf_flogi_fail(struct lpfc_hba *phba, uint16_t fcf_index) · 13 unmodified lines | |||
| 2116 | /** | 2117 | /** |
| 2117 | * lpfc_sli4_fcf_pri_list_add | 2118 | * lpfc_sli4_fcf_pri_list_add |
| 2118 | * @phba: pointer to lpfc hba data structure. | 2119 | * @phba: pointer to lpfc hba data structure. |
| 2119 | * @fcf_index the index of the fcf record to add | 2120 | * @fcf_index: the index of the fcf record to add |
| 2121 | * @new_fcf_record: pointer to a new FCF record. | ||
| 2120 | * This routine checks the priority of the fcf_index to be added. | 2122 | * This routine checks the priority of the fcf_index to be added. |
| 2121 | * If it is a lower priority than the current head of the fcf_pri list | 2123 | * If it is a lower priority than the current head of the fcf_pri list |
| 2122 | * then it is added to the list in the right order. | 2124 | * then it is added to the list in the right order. |
| @@ -2246,7 +2248,7 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 123 unmodified lines | |||
| 2246 | new_fcf_record = lpfc_sli4_fcf_rec_mbox_parse(phba, mboxq, | 2248 | new_fcf_record = lpfc_sli4_fcf_rec_mbox_parse(phba, mboxq, |
| 2247 | &next_fcf_index); | 2249 | &next_fcf_index); |
| 2248 | if (!new_fcf_record) { | 2250 | if (!new_fcf_record) { |
| 2249 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP, | 2251 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2250 | "2765 Mailbox command READ_FCF_RECORD " | 2252 | "2765 Mailbox command READ_FCF_RECORD " |
| 2251 | "failed to retrieve a FCF record.\n"); | 2253 | "failed to retrieve a FCF record.\n"); |
| 2252 | /* Let next new FCF event trigger fast failover */ | 2254 | /* Let next new FCF event trigger fast failover */ |
| @@ -2290,7 +2292,8 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 37 unmodified lines | |||
| 2290 | new_fcf_record, LPFC_FCOE_IGNORE_VID)) { | 2292 | new_fcf_record, LPFC_FCOE_IGNORE_VID)) { |
| 2291 | if (bf_get(lpfc_fcf_record_fcf_index, new_fcf_record) != | 2293 | if (bf_get(lpfc_fcf_record_fcf_index, new_fcf_record) != |
| 2292 | phba->fcf.current_rec.fcf_indx) { | 2294 | phba->fcf.current_rec.fcf_indx) { |
| 2293 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP, | 2295 | lpfc_printf_log(phba, KERN_ERR, |
| 2296 | LOG_TRACE_EVENT, | ||
| 2294 | "2862 FCF (x%x) matches property " | 2297 | "2862 FCF (x%x) matches property " |
| 2295 | "of in-use FCF (x%x)\n", | 2298 | "of in-use FCF (x%x)\n", |
| 2296 | bf_get(lpfc_fcf_record_fcf_index, | 2299 | bf_get(lpfc_fcf_record_fcf_index, |
| @@ -2360,7 +2363,7 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 63 unmodified lines | |||
| 2360 | phba->pport->fc_flag); | 2363 | phba->pport->fc_flag); |
| 2361 | goto out; | 2364 | goto out; |
| 2362 | } else | 2365 | } else |
| 2363 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP, | 2366 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2364 | "2863 New FCF (x%x) matches " | 2367 | "2863 New FCF (x%x) matches " |
| 2365 | "property of in-use FCF (x%x)\n", | 2368 | "property of in-use FCF (x%x)\n", |
| 2366 | bf_get(lpfc_fcf_record_fcf_index, | 2369 | bf_get(lpfc_fcf_record_fcf_index, |
| @@ -2774,10 +2777,9 @@ lpfc_init_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 407 unmodified lines | |||
| 2774 | (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != | 2777 | (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != |
| 2775 | LPFC_SLI_INTF_IF_TYPE_0) && | 2778 | LPFC_SLI_INTF_IF_TYPE_0) && |
| 2776 | mboxq->u.mb.mbxStatus != MBX_VFI_IN_USE) { | 2779 | mboxq->u.mb.mbxStatus != MBX_VFI_IN_USE) { |
| 2777 | lpfc_printf_vlog(vport, KERN_ERR, | 2780 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2778 | LOG_MBOX, | 2781 | "2891 Init VFI mailbox failed 0x%x\n", |
| 2779 | "2891 Init VFI mailbox failed 0x%x\n", | 2782 | mboxq->u.mb.mbxStatus); |
| 2780 | mboxq->u.mb.mbxStatus); | ||
| 2781 | mempool_free(mboxq, phba->mbox_mem_pool); | 2783 | mempool_free(mboxq, phba->mbox_mem_pool); |
| 2782 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 2784 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 2783 | return; | 2785 | return; |
| @@ -2805,7 +2807,7 @@ lpfc_issue_init_vfi(struct lpfc_vport *vport) · 21 unmodified lines | |||
| 2805 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 2807 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 2806 | if (!mboxq) { | 2808 | if (!mboxq) { |
| 2807 | lpfc_printf_vlog(vport, KERN_ERR, | 2809 | lpfc_printf_vlog(vport, KERN_ERR, |
| 2808 | LOG_MBOX, "2892 Failed to allocate " | 2810 | LOG_TRACE_EVENT, "2892 Failed to allocate " |
| 2809 | "init_vfi mailbox\n"); | 2811 | "init_vfi mailbox\n"); |
| 2810 | return; | 2812 | return; |
| 2811 | } | 2813 | } |
| @@ -2813,8 +2815,8 @@ lpfc_issue_init_vfi(struct lpfc_vport *vport) · 1 unmodified line | |||
| 2813 | mboxq->mbox_cmpl = lpfc_init_vfi_cmpl; | 2815 | mboxq->mbox_cmpl = lpfc_init_vfi_cmpl; |
| 2814 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); | 2816 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); |
| 2815 | if (rc == MBX_NOT_FINISHED) { | 2817 | if (rc == MBX_NOT_FINISHED) { |
| 2816 | lpfc_printf_vlog(vport, KERN_ERR, | 2818 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2817 | LOG_MBOX, "2893 Failed to issue init_vfi mailbox\n"); | 2819 | "2893 Failed to issue init_vfi mailbox\n"); |
| 2818 | mempool_free(mboxq, vport->phba->mbox_mem_pool); | 2820 | mempool_free(mboxq, vport->phba->mbox_mem_pool); |
| 2819 | } | 2821 | } |
| 2820 | } | 2822 | } |
| @@ -2834,10 +2836,9 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 13 unmodified lines | |||
| 2834 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 2836 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
| 2835 | 2837 | ||
| 2836 | if (mboxq->u.mb.mbxStatus) { | 2838 | if (mboxq->u.mb.mbxStatus) { |
| 2837 | lpfc_printf_vlog(vport, KERN_ERR, | 2839 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2838 | LOG_MBOX, | 2840 | "2609 Init VPI mailbox failed 0x%x\n", |
| 2839 | "2609 Init VPI mailbox failed 0x%x\n", | 2841 | mboxq->u.mb.mbxStatus); |
| 2840 | mboxq->u.mb.mbxStatus); | ||
| 2841 | mempool_free(mboxq, phba->mbox_mem_pool); | 2842 | mempool_free(mboxq, phba->mbox_mem_pool); |
| 2842 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 2843 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 2843 | return; | 2844 | return; |
| @@ -2851,7 +2852,7 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 7 unmodified lines | |||
| 2851 | ndlp = lpfc_findnode_did(vport, Fabric_DID); | 2852 | ndlp = lpfc_findnode_did(vport, Fabric_DID); |
| 2852 | if (!ndlp) | 2853 | if (!ndlp) |
| 2853 | lpfc_printf_vlog(vport, KERN_ERR, | 2854 | lpfc_printf_vlog(vport, KERN_ERR, |
| 2854 | LOG_DISCOVERY, | 2855 | LOG_TRACE_EVENT, |
| 2855 | "2731 Cannot find fabric " | 2856 | "2731 Cannot find fabric " |
| 2856 | "controller node\n"); | 2857 | "controller node\n"); |
| 2857 | else | 2858 | else |
| @@ -2864,7 +2865,7 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 6 unmodified lines | |||
| 2864 | lpfc_initial_fdisc(vport); | 2865 | lpfc_initial_fdisc(vport); |
| 2865 | else { | 2866 | else { |
| 2866 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); | 2867 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); |
| 2867 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 2868 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2868 | "2606 No NPIV Fabric support\n"); | 2869 | "2606 No NPIV Fabric support\n"); |
| 2869 | } | 2870 | } |
| 2870 | mempool_free(mboxq, phba->mbox_mem_pool); | 2871 | mempool_free(mboxq, phba->mbox_mem_pool); |
| @@ -2887,8 +2888,7 @@ lpfc_issue_init_vpi(struct lpfc_vport *vport) · 16 unmodified lines | |||
| 2887 | if ((vport->port_type != LPFC_PHYSICAL_PORT) && (!vport->vpi)) { | 2888 | if ((vport->port_type != LPFC_PHYSICAL_PORT) && (!vport->vpi)) { |
| 2888 | vpi = lpfc_alloc_vpi(vport->phba); | 2889 | vpi = lpfc_alloc_vpi(vport->phba); |
| 2889 | if (!vpi) { | 2890 | if (!vpi) { |
| 2890 | lpfc_printf_vlog(vport, KERN_ERR, | 2891 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2891 | LOG_MBOX, | ||
| 2892 | "3303 Failed to obtain vport vpi\n"); | 2892 | "3303 Failed to obtain vport vpi\n"); |
| 2893 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 2893 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 2894 | return; | 2894 | return; |
| @@ -2899,7 +2899,7 @@ lpfc_issue_init_vpi(struct lpfc_vport *vport) · 4 unmodified lines | |||
| 2899 | mboxq = mempool_alloc(vport->phba->mbox_mem_pool, GFP_KERNEL); | 2899 | mboxq = mempool_alloc(vport->phba->mbox_mem_pool, GFP_KERNEL); |
| 2900 | if (!mboxq) { | 2900 | if (!mboxq) { |
| 2901 | lpfc_printf_vlog(vport, KERN_ERR, | 2901 | lpfc_printf_vlog(vport, KERN_ERR, |
| 2902 | LOG_MBOX, "2607 Failed to allocate " | 2902 | LOG_TRACE_EVENT, "2607 Failed to allocate " |
| 2903 | "init_vpi mailbox\n"); | 2903 | "init_vpi mailbox\n"); |
| 2904 | return; | 2904 | return; |
| 2905 | } | 2905 | } |
| @@ -2908,8 +2908,8 @@ lpfc_issue_init_vpi(struct lpfc_vport *vport) · 2 unmodified lines | |||
| 2908 | mboxq->mbox_cmpl = lpfc_init_vpi_cmpl; | 2908 | mboxq->mbox_cmpl = lpfc_init_vpi_cmpl; |
| 2909 | rc = lpfc_sli_issue_mbox(vport->phba, mboxq, MBX_NOWAIT); | 2909 | rc = lpfc_sli_issue_mbox(vport->phba, mboxq, MBX_NOWAIT); |
| 2910 | if (rc == MBX_NOT_FINISHED) { | 2910 | if (rc == MBX_NOT_FINISHED) { |
| 2911 | lpfc_printf_vlog(vport, KERN_ERR, | 2911 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2912 | LOG_MBOX, "2608 Failed to issue init_vpi mailbox\n"); | 2912 | "2608 Failed to issue init_vpi mailbox\n"); |
| 2913 | mempool_free(mboxq, vport->phba->mbox_mem_pool); | 2913 | mempool_free(mboxq, vport->phba->mbox_mem_pool); |
| 2914 | } | 2914 | } |
| 2915 | } | 2915 | } |
| @@ -2953,7 +2953,7 @@ lpfc_start_fdiscs(struct lpfc_hba *phba) · 37 unmodified lines | |||
| 2953 | lpfc_vport_set_state(vports[i], | 2953 | lpfc_vport_set_state(vports[i], |
| 2954 | FC_VPORT_NO_FABRIC_SUPP); | 2954 | FC_VPORT_NO_FABRIC_SUPP); |
| 2955 | lpfc_printf_vlog(vports[i], KERN_ERR, | 2955 | lpfc_printf_vlog(vports[i], KERN_ERR, |
| 2956 | LOG_ELS, | 2956 | LOG_TRACE_EVENT, |
| 2957 | "0259 No NPIV " | 2957 | "0259 No NPIV " |
| 2958 | "Fabric support\n"); | 2958 | "Fabric support\n"); |
| 2959 | } | 2959 | } |
| @@ -2977,10 +2977,10 @@ lpfc_mbx_cmpl_reg_vfi(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 17 unmodified lines | |||
| 2977 | (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != | 2977 | (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) != |
| 2978 | LPFC_SLI_INTF_IF_TYPE_0) && | 2978 | LPFC_SLI_INTF_IF_TYPE_0) && |
| 2979 | mboxq->u.mb.mbxStatus != MBX_VFI_IN_USE) { | 2979 | mboxq->u.mb.mbxStatus != MBX_VFI_IN_USE) { |
| 2980 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 2980 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2981 | "2018 REG_VFI mbxStatus error x%x " | 2981 | "2018 REG_VFI mbxStatus error x%x " |
| 2982 | "HBA state x%x\n", | 2982 | "HBA state x%x\n", |
| 2983 | mboxq->u.mb.mbxStatus, vport->port_state); | 2983 | mboxq->u.mb.mbxStatus, vport->port_state); |
| 2984 | if (phba->fc_topology == LPFC_TOPOLOGY_LOOP) { | 2984 | if (phba->fc_topology == LPFC_TOPOLOGY_LOOP) { |
| 2985 | /* FLOGI failed, use loop map to make discovery list */ | 2985 | /* FLOGI failed, use loop map to make discovery list */ |
| 2986 | lpfc_disc_list_loopmap(vport); | 2986 | lpfc_disc_list_loopmap(vport); |
| @@ -3067,7 +3067,7 @@ lpfc_mbx_cmpl_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 80 unmodified lines | |||
| 3067 | /* Check for error */ | 3067 | /* Check for error */ |
| 3068 | if (mb->mbxStatus) { | 3068 | if (mb->mbxStatus) { |
| 3069 | /* READ_SPARAM mbox error <mbxStatus> state <hba_state> */ | 3069 | /* READ_SPARAM mbox error <mbxStatus> state <hba_state> */ |
| 3070 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 3070 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3071 | "0319 READ_SPARAM mbxStatus error x%x " | 3071 | "0319 READ_SPARAM mbxStatus error x%x " |
| 3072 | "hba state x%x>\n", | 3072 | "hba state x%x>\n", |
| 3073 | mb->mbxStatus, vport->port_state); | 3073 | mb->mbxStatus, vport->port_state); |
| @@ -3286,7 +3286,7 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la) · 212 unmodified lines | |||
| 3286 | GFP_KERNEL); | 3286 | GFP_KERNEL); |
| 3287 | if (unlikely(!fcf_record)) { | 3287 | if (unlikely(!fcf_record)) { |
| 3288 | lpfc_printf_log(phba, KERN_ERR, | 3288 | lpfc_printf_log(phba, KERN_ERR, |
| 3289 | LOG_MBOX | LOG_SLI, | 3289 | LOG_TRACE_EVENT, |
| 3290 | "2554 Could not allocate memory for " | 3290 | "2554 Could not allocate memory for " |
| 3291 | "fcf record\n"); | 3291 | "fcf record\n"); |
| 3292 | rc = -ENODEV; | 3292 | rc = -ENODEV; |
| @@ -3298,7 +3298,7 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la) · 5 unmodified lines | |||
| 3298 | rc = lpfc_sli4_add_fcf_record(phba, fcf_record); | 3298 | rc = lpfc_sli4_add_fcf_record(phba, fcf_record); |
| 3299 | if (unlikely(rc)) { | 3299 | if (unlikely(rc)) { |
| 3300 | lpfc_printf_log(phba, KERN_ERR, | 3300 | lpfc_printf_log(phba, KERN_ERR, |
| 3301 | LOG_MBOX | LOG_SLI, | 3301 | LOG_TRACE_EVENT, |
| 3302 | "2013 Could not manually add FCF " | 3302 | "2013 Could not manually add FCF " |
| 3303 | "record 0, status %d\n", rc); | 3303 | "record 0, status %d\n", rc); |
| 3304 | rc = -ENODEV; | 3304 | rc = -ENODEV; |
| @@ -3344,7 +3344,7 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, struct lpfc_mbx_read_top *la) · 39 unmodified lines | |||
| 3344 | return; | 3344 | return; |
| 3345 | out: | 3345 | out: |
| 3346 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 3346 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 3347 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 3347 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3348 | "0263 Discovery Mailbox error: state: 0x%x : x%px x%px\n", | 3348 | "0263 Discovery Mailbox error: state: 0x%x : x%px x%px\n", |
| 3349 | vport->port_state, sparam_mbox, cfglink_mbox); | 3349 | vport->port_state, sparam_mbox, cfglink_mbox); |
| 3350 | lpfc_issue_clear_la(phba, vport); | 3350 | lpfc_issue_clear_la(phba, vport); |
| @@ -3617,7 +3617,7 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 266 unmodified lines | |||
| 3617 | break; | 3617 | break; |
| 3618 | /* If VPI is busy, reset the HBA */ | 3618 | /* If VPI is busy, reset the HBA */ |
| 3619 | case 0x9700: | 3619 | case 0x9700: |
| 3620 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE, | 3620 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3621 | "2798 Unreg_vpi failed vpi 0x%x, mb status = 0x%x\n", | 3621 | "2798 Unreg_vpi failed vpi 0x%x, mb status = 0x%x\n", |
| 3622 | vport->vpi, mb->mbxStatus); | 3622 | vport->vpi, mb->mbxStatus); |
| 3623 | if (!(phba->pport->load_flag & FC_UNLOADING)) | 3623 | if (!(phba->pport->load_flag & FC_UNLOADING)) |
| @@ -3655,7 +3655,7 @@ lpfc_mbx_unreg_vpi(struct lpfc_vport *vport) · 31 unmodified lines | |||
| 3655 | mbox->mbox_cmpl = lpfc_mbx_cmpl_unreg_vpi; | 3655 | mbox->mbox_cmpl = lpfc_mbx_cmpl_unreg_vpi; |
| 3656 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); | 3656 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); |
| 3657 | if (rc == MBX_NOT_FINISHED) { | 3657 | if (rc == MBX_NOT_FINISHED) { |
| 3658 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_VPORT, | 3658 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3659 | "1800 Could not issue unreg_vpi\n"); | 3659 | "1800 Could not issue unreg_vpi\n"); |
| 3660 | mempool_free(mbox, phba->mbox_mem_pool); | 3660 | mempool_free(mbox, phba->mbox_mem_pool); |
| 3661 | vport->unreg_vpi_cmpl = VPORT_ERROR; | 3661 | vport->unreg_vpi_cmpl = VPORT_ERROR; |
| @@ -3742,7 +3742,7 @@ lpfc_create_static_vport(struct lpfc_hba *phba) · 80 unmodified lines | |||
| 3742 | 3742 | ||
| 3743 | pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 3743 | pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 3744 | if (!pmb) { | 3744 | if (!pmb) { |
| 3745 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3745 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3746 | "0542 lpfc_create_static_vport failed to" | 3746 | "0542 lpfc_create_static_vport failed to" |
| 3747 | " allocate mailbox memory\n"); | 3747 | " allocate mailbox memory\n"); |
| 3748 | return; | 3748 | return; |
| @@ -3752,7 +3752,7 @@ lpfc_create_static_vport(struct lpfc_hba *phba) · 3 unmodified lines | |||
| 3752 | 3752 | ||
| 3753 | vport_info = kzalloc(sizeof(struct static_vport_info), GFP_KERNEL); | 3753 | vport_info = kzalloc(sizeof(struct static_vport_info), GFP_KERNEL); |
| 3754 | if (!vport_info) { | 3754 | if (!vport_info) { |
| 3755 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3755 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3756 | "0543 lpfc_create_static_vport failed to" | 3756 | "0543 lpfc_create_static_vport failed to" |
| 3757 | " allocate vport_info\n"); | 3757 | " allocate vport_info\n"); |
| 3758 | mempool_free(pmb, phba->mbox_mem_pool); | 3758 | mempool_free(pmb, phba->mbox_mem_pool); |
| @@ -3813,11 +3813,12 @@ lpfc_create_static_vport(struct lpfc_hba *phba) · 54 unmodified lines | |||
| 3813 | if ((le32_to_cpu(vport_info->signature) != VPORT_INFO_SIG) || | 3813 | if ((le32_to_cpu(vport_info->signature) != VPORT_INFO_SIG) || |
| 3814 | ((le32_to_cpu(vport_info->rev) & VPORT_INFO_REV_MASK) | 3814 | ((le32_to_cpu(vport_info->rev) & VPORT_INFO_REV_MASK) |
| 3815 | != VPORT_INFO_REV)) { | 3815 | != VPORT_INFO_REV)) { |
| 3816 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3816 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3817 | "0545 lpfc_create_static_vport bad" | 3817 | "0545 lpfc_create_static_vport bad" |
| 3818 | " information header 0x%x 0x%x\n", | 3818 | " information header 0x%x 0x%x\n", |
| 3819 | le32_to_cpu(vport_info->signature), | 3819 | le32_to_cpu(vport_info->signature), |
| 3820 | le32_to_cpu(vport_info->rev) & VPORT_INFO_REV_MASK); | 3820 | le32_to_cpu(vport_info->rev) & |
| 3821 | VPORT_INFO_REV_MASK); | ||
| 3821 | 3822 | ||
| 3822 | goto out; | 3823 | goto out; |
| 3823 | } | 3824 | } |
| @@ -3881,7 +3882,7 @@ lpfc_mbx_cmpl_fabric_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 57 unmodified lines | |||
| 3881 | pmb->ctx_buf = NULL; | 3882 | pmb->ctx_buf = NULL; |
| 3882 | 3883 | ||
| 3883 | if (mb->mbxStatus) { | 3884 | if (mb->mbxStatus) { |
| 3884 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 3885 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3885 | "0258 Register Fabric login error: 0x%x\n", | 3886 | "0258 Register Fabric login error: 0x%x\n", |
| 3886 | mb->mbxStatus); | 3887 | mb->mbxStatus); |
| 3887 | lpfc_mbuf_free(phba, mp->virt, mp->phys); | 3888 | lpfc_mbuf_free(phba, mp->virt, mp->phys); |
| @@ -3954,7 +3955,8 @@ lpfc_issue_gidft(struct lpfc_vport *vport) · 66 unmodified lines | |||
| 3954 | /* Cannot issue NameServer FCP Query, so finish up | 3955 | /* Cannot issue NameServer FCP Query, so finish up |
| 3955 | * discovery | 3956 | * discovery |
| 3956 | */ | 3957 | */ |
| 3957 | lpfc_printf_vlog(vport, KERN_ERR, LOG_SLI, | 3958 | lpfc_printf_vlog(vport, KERN_ERR, |
| 3959 | LOG_TRACE_EVENT, | ||
| 3958 | "0604 %s FC TYPE %x %s\n", | 3960 | "0604 %s FC TYPE %x %s\n", |
| 3959 | "Failed to issue GID_FT to ", | 3961 | "Failed to issue GID_FT to ", |
| 3960 | FC_TYPE_FCP, | 3962 | FC_TYPE_FCP, |
| @@ -3970,7 +3972,8 @@ lpfc_issue_gidft(struct lpfc_vport *vport) · 9 unmodified lines | |||
| 3970 | /* Cannot issue NameServer NVME Query, so finish up | 3972 | /* Cannot issue NameServer NVME Query, so finish up |
| 3971 | * discovery | 3973 | * discovery |
| 3972 | */ | 3974 | */ |
| 3973 | lpfc_printf_vlog(vport, KERN_ERR, LOG_SLI, | 3975 | lpfc_printf_vlog(vport, KERN_ERR, |
| 3976 | LOG_TRACE_EVENT, | ||
| 3974 | "0605 %s FC_TYPE %x %s %d\n", | 3977 | "0605 %s FC_TYPE %x %s %d\n", |
| 3975 | "Failed to issue GID_FT to ", | 3978 | "Failed to issue GID_FT to ", |
| 3976 | FC_TYPE_NVME, | 3979 | FC_TYPE_NVME, |
| @@ -4002,7 +4005,7 @@ lpfc_issue_gidpt(struct lpfc_vport *vport) · 25 unmodified lines | |||
| 4002 | /* Cannot issue NameServer FCP Query, so finish up | 4005 | /* Cannot issue NameServer FCP Query, so finish up |
| 4003 | * discovery | 4006 | * discovery |
| 4004 | */ | 4007 | */ |
| 4005 | lpfc_printf_vlog(vport, KERN_ERR, LOG_SLI, | 4008 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 4006 | "0606 %s Port TYPE %x %s\n", | 4009 | "0606 %s Port TYPE %x %s\n", |
| 4007 | "Failed to issue GID_PT to ", | 4010 | "Failed to issue GID_PT to ", |
| 4008 | GID_PT_N_PORT, | 4011 | GID_PT_N_PORT, |
| @@ -4032,7 +4035,7 @@ lpfc_mbx_cmpl_ns_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 23 unmodified lines | |||
| 4032 | vport->gidft_inp = 0; | 4035 | vport->gidft_inp = 0; |
| 4033 | 4036 | ||
| 4034 | if (mb->mbxStatus) { | 4037 | if (mb->mbxStatus) { |
| 4035 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 4038 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 4036 | "0260 Register NameServer error: 0x%x\n", | 4039 | "0260 Register NameServer error: 0x%x\n", |
| 4037 | mb->mbxStatus); | 4040 | mb->mbxStatus); |
| 4038 | 4041 | ||
| @@ -4344,7 +4347,7 @@ lpfc_nlp_state_cleanup(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 305 unmodified lines | |||
| 4344 | GFP_KERNEL); | 4347 | GFP_KERNEL); |
| 4345 | 4348 | ||
| 4346 | if (!ndlp->lat_data) | 4349 | if (!ndlp->lat_data) |
| 4347 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE, | 4350 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 4348 | "0286 lpfc_nlp_state_cleanup failed to " | 4351 | "0286 lpfc_nlp_state_cleanup failed to " |
| 4349 | "allocate statistical data buffer DID " | 4352 | "allocate statistical data buffer DID " |
| 4350 | "0x%x\n", ndlp->nlp_DID); | 4353 | "0x%x\n", ndlp->nlp_DID); |
| @@ -5013,8 +5016,8 @@ lpfc_unreg_hba_rpis(struct lpfc_hba *phba) · 662 unmodified lines | |||
| 5013 | 5016 | ||
| 5014 | vports = lpfc_create_vport_work_array(phba); | 5017 | vports = lpfc_create_vport_work_array(phba); |
| 5015 | if (!vports) { | 5018 | if (!vports) { |
| 5016 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 5019 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5017 | "2884 Vport array allocation failed \n"); | 5020 | "2884 Vport array allocation failed \n"); |
| 5018 | return; | 5021 | return; |
| 5019 | } | 5022 | } |
| 5020 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { | 5023 | for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) { |
| @@ -5057,9 +5060,10 @@ lpfc_unreg_all_rpis(struct lpfc_vport *vport) · 36 unmodified lines | |||
| 5057 | mempool_free(mbox, phba->mbox_mem_pool); | 5060 | mempool_free(mbox, phba->mbox_mem_pool); |
| 5058 | 5061 | ||
| 5059 | if ((rc == MBX_TIMEOUT) || (rc == MBX_NOT_FINISHED)) | 5062 | if ((rc == MBX_TIMEOUT) || (rc == MBX_NOT_FINISHED)) |
| 5060 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_VPORT, | 5063 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5061 | "1836 Could not issue " | 5064 | "1836 Could not issue " |
| 5062 | "unreg_login(all_rpis) status %d\n", rc); | 5065 | "unreg_login(all_rpis) status %d\n", |
| 5066 | rc); | ||
| 5063 | } | 5067 | } |
| 5064 | } | 5068 | } |
| 5065 | 5069 | ||
| @@ -5086,7 +5090,7 @@ lpfc_unreg_default_rpis(struct lpfc_vport *vport) · 20 unmodified lines | |||
| 5086 | mempool_free(mbox, phba->mbox_mem_pool); | 5090 | mempool_free(mbox, phba->mbox_mem_pool); |
| 5087 | 5091 | ||
| 5088 | if ((rc == MBX_TIMEOUT) || (rc == MBX_NOT_FINISHED)) | 5092 | if ((rc == MBX_TIMEOUT) || (rc == MBX_NOT_FINISHED)) |
| 5089 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_VPORT, | 5093 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5090 | "1815 Could not issue " | 5094 | "1815 Could not issue " |
| 5091 | "unreg_did (default rpis) status %d\n", | 5095 | "unreg_did (default rpis) status %d\n", |
| 5092 | rc); | 5096 | rc); |
| @@ -5907,7 +5911,8 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) · 814 unmodified lines | |||
| 5907 | case LPFC_FLOGI: | 5911 | case LPFC_FLOGI: |
| 5908 | /* port_state is identically LPFC_FLOGI while waiting for FLOGI cmpl */ | 5912 | /* port_state is identically LPFC_FLOGI while waiting for FLOGI cmpl */ |
| 5909 | /* Initial FLOGI timeout */ | 5913 | /* Initial FLOGI timeout */ |
| 5910 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 5914 | lpfc_printf_vlog(vport, KERN_ERR, |
| 5915 | LOG_TRACE_EVENT, | ||
| 5911 | "0222 Initial %s timeout\n", | 5916 | "0222 Initial %s timeout\n", |
| 5912 | vport->vpi ? "FDISC" : "FLOGI"); | 5917 | vport->vpi ? "FDISC" : "FLOGI"); |
| 5913 | 5918 | ||
| @@ -5925,7 +5930,8 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) · 11 unmodified lines | |||
| 5925 | case LPFC_FABRIC_CFG_LINK: | 5930 | case LPFC_FABRIC_CFG_LINK: |
| 5926 | /* hba_state is identically LPFC_FABRIC_CFG_LINK while waiting for | 5931 | /* hba_state is identically LPFC_FABRIC_CFG_LINK while waiting for |
| 5927 | NameServer login */ | 5932 | NameServer login */ |
| 5928 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 5933 | lpfc_printf_vlog(vport, KERN_ERR, |
| 5934 | LOG_TRACE_EVENT, | ||
| 5929 | "0223 Timeout while waiting for " | 5935 | "0223 Timeout while waiting for " |
| 5930 | "NameServer login\n"); | 5936 | "NameServer login\n"); |
| 5931 | /* Next look for NameServer ndlp */ | 5937 | /* Next look for NameServer ndlp */ |
| @@ -5938,7 +5944,8 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) · 6 unmodified lines | |||
| 5938 | 5944 | ||
| 5939 | case LPFC_NS_QRY: | 5945 | case LPFC_NS_QRY: |
| 5940 | /* Check for wait for NameServer Rsp timeout */ | 5946 | /* Check for wait for NameServer Rsp timeout */ |
| 5941 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 5947 | lpfc_printf_vlog(vport, KERN_ERR, |
| 5948 | LOG_TRACE_EVENT, | ||
| 5942 | "0224 NameServer Query timeout " | 5949 | "0224 NameServer Query timeout " |
| 5943 | "Data: x%x x%x\n", | 5950 | "Data: x%x x%x\n", |
| 5944 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); | 5951 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); |
| @@ -5971,7 +5978,8 @@ restart_disc: · 26 unmodified lines | |||
| 5971 | /* Setup and issue mailbox INITIALIZE LINK command */ | 5978 | /* Setup and issue mailbox INITIALIZE LINK command */ |
| 5972 | initlinkmbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 5979 | initlinkmbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 5973 | if (!initlinkmbox) { | 5980 | if (!initlinkmbox) { |
| 5974 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 5981 | lpfc_printf_vlog(vport, KERN_ERR, |
| 5982 | LOG_TRACE_EVENT, | ||
| 5975 | "0206 Device Discovery " | 5983 | "0206 Device Discovery " |
| 5976 | "completion error\n"); | 5984 | "completion error\n"); |
| 5977 | phba->link_state = LPFC_HBA_ERROR; | 5985 | phba->link_state = LPFC_HBA_ERROR; |
| @@ -5993,7 +6001,8 @@ restart_disc: · 15 unmodified lines | |||
| 5993 | 6001 | ||
| 5994 | case LPFC_DISC_AUTH: | 6002 | case LPFC_DISC_AUTH: |
| 5995 | /* Node Authentication timeout */ | 6003 | /* Node Authentication timeout */ |
| 5996 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 6004 | lpfc_printf_vlog(vport, KERN_ERR, |
| 6005 | LOG_TRACE_EVENT, | ||
| 5997 | "0227 Node Authentication timeout\n"); | 6006 | "0227 Node Authentication timeout\n"); |
| 5998 | lpfc_disc_flush_list(vport); | 6007 | lpfc_disc_flush_list(vport); |
| 5999 | 6008 | ||
| @@ -6013,7 +6022,8 @@ restart_disc: · 13 unmodified lines | |||
| 6013 | 6022 | ||
| 6014 | case LPFC_VPORT_READY: | 6023 | case LPFC_VPORT_READY: |
| 6015 | if (vport->fc_flag & FC_RSCN_MODE) { | 6024 | if (vport->fc_flag & FC_RSCN_MODE) { |
| 6016 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 6025 | lpfc_printf_vlog(vport, KERN_ERR, |
| 6026 | LOG_TRACE_EVENT, | ||
| 6017 | "0231 RSCN timeout Data: x%x " | 6027 | "0231 RSCN timeout Data: x%x " |
| 6018 | "x%x\n", | 6028 | "x%x\n", |
| 6019 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); | 6029 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); |
| @@ -6027,7 +6037,8 @@ restart_disc: · 7 unmodified lines | |||
| 6027 | break; | 6037 | break; |
| 6028 | 6038 | ||
| 6029 | default: | 6039 | default: |
| 6030 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 6040 | lpfc_printf_vlog(vport, KERN_ERR, |
| 6041 | LOG_TRACE_EVENT, | ||
| 6031 | "0273 Unexpected discovery timeout, " | 6042 | "0273 Unexpected discovery timeout, " |
| 6032 | "vport State x%x\n", vport->port_state); | 6043 | "vport State x%x\n", vport->port_state); |
| 6033 | break; | 6044 | break; |
| @@ -6036,7 +6047,8 @@ restart_disc: · 2 unmodified lines | |||
| 6036 | switch (phba->link_state) { | 6047 | switch (phba->link_state) { |
| 6037 | case LPFC_CLEAR_LA: | 6048 | case LPFC_CLEAR_LA: |
| 6038 | /* CLEAR LA timeout */ | 6049 | /* CLEAR LA timeout */ |
| 6039 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 6050 | lpfc_printf_vlog(vport, KERN_ERR, |
| 6051 | LOG_TRACE_EVENT, | ||
| 6040 | "0228 CLEAR LA timeout\n"); | 6052 | "0228 CLEAR LA timeout\n"); |
| 6041 | clrlaerr = 1; | 6053 | clrlaerr = 1; |
| 6042 | break; | 6054 | break; |
| @@ -6050,7 +6062,8 @@ restart_disc: · 7 unmodified lines | |||
| 6050 | case LPFC_INIT_MBX_CMDS: | 6062 | case LPFC_INIT_MBX_CMDS: |
| 6051 | case LPFC_LINK_DOWN: | 6063 | case LPFC_LINK_DOWN: |
| 6052 | case LPFC_HBA_ERROR: | 6064 | case LPFC_HBA_ERROR: |
| 6053 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 6065 | lpfc_printf_vlog(vport, KERN_ERR, |
| 6066 | LOG_TRACE_EVENT, | ||
| 6054 | "0230 Unexpected timeout, hba link " | 6067 | "0230 Unexpected timeout, hba link " |
| 6055 | "state x%x\n", phba->link_state); | 6068 | "state x%x\n", phba->link_state); |
| 6056 | clrlaerr = 1; | 6069 | clrlaerr = 1; |
| @@ -6241,9 +6254,9 @@ lpfc_find_vport_by_vpid(struct lpfc_hba *phba, uint16_t vpi) · 184 unmodified lines | |||
| 6241 | } | 6254 | } |
| 6242 | 6255 | ||
| 6243 | if (i >= phba->max_vpi) { | 6256 | if (i >= phba->max_vpi) { |
| 6244 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 6257 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6245 | "2936 Could not find Vport mapped " | 6258 | "2936 Could not find Vport mapped " |
| 6246 | "to vpi %d\n", vpi); | 6259 | "to vpi %d\n", vpi); |
| 6247 | return NULL; | 6260 | return NULL; |
| 6248 | } | 6261 | } |
| 6249 | } | 6262 | } |
| @@ -6547,10 +6560,10 @@ lpfc_unregister_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 297 unmodified lines | |||
| 6547 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 6560 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
| 6548 | 6561 | ||
| 6549 | if (mboxq->u.mb.mbxStatus) { | 6562 | if (mboxq->u.mb.mbxStatus) { |
| 6550 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, | 6563 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6551 | "2555 UNREG_VFI mbxStatus error x%x " | 6564 | "2555 UNREG_VFI mbxStatus error x%x " |
| 6552 | "HBA state x%x\n", | 6565 | "HBA state x%x\n", |
| 6553 | mboxq->u.mb.mbxStatus, vport->port_state); | 6566 | mboxq->u.mb.mbxStatus, vport->port_state); |
| 6554 | } | 6567 | } |
| 6555 | spin_lock_irq(shost->host_lock); | 6568 | spin_lock_irq(shost->host_lock); |
| 6556 | phba->pport->fc_flag &= ~FC_VFI_REGISTERED; | 6569 | phba->pport->fc_flag &= ~FC_VFI_REGISTERED; |
| @@ -6572,10 +6585,10 @@ lpfc_unregister_fcfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 15 unmodified lines | |||
| 6572 | struct lpfc_vport *vport = mboxq->vport; | 6585 | struct lpfc_vport *vport = mboxq->vport; |
| 6573 | 6586 | ||
| 6574 | if (mboxq->u.mb.mbxStatus) { | 6587 | if (mboxq->u.mb.mbxStatus) { |
| 6575 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, | 6588 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6576 | "2550 UNREG_FCFI mbxStatus error x%x " | 6589 | "2550 UNREG_FCFI mbxStatus error x%x " |
| 6577 | "HBA state x%x\n", | 6590 | "HBA state x%x\n", |
| 6578 | mboxq->u.mb.mbxStatus, vport->port_state); | 6591 | mboxq->u.mb.mbxStatus, vport->port_state); |
| 6579 | } | 6592 | } |
| 6580 | mempool_free(mboxq, phba->mbox_mem_pool); | 6593 | mempool_free(mboxq, phba->mbox_mem_pool); |
| 6581 | return; | 6594 | return; |
| @@ -6664,7 +6677,7 @@ lpfc_sli4_unregister_fcf(struct lpfc_hba *phba) · 82 unmodified lines | |||
| 6664 | 6677 | ||
| 6665 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 6678 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 6666 | if (!mbox) { | 6679 | if (!mbox) { |
| 6667 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, | 6680 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6668 | "2551 UNREG_FCFI mbox allocation failed" | 6681 | "2551 UNREG_FCFI mbox allocation failed" |
| 6669 | "HBA state x%x\n", phba->pport->port_state); | 6682 | "HBA state x%x\n", phba->pport->port_state); |
| 6670 | return -ENOMEM; | 6683 | return -ENOMEM; |
| @@ -6675,7 +6688,7 @@ lpfc_sli4_unregister_fcf(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 6675 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); | 6688 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); |
| 6676 | 6689 | ||
| 6677 | if (rc == MBX_NOT_FINISHED) { | 6690 | if (rc == MBX_NOT_FINISHED) { |
| 6678 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 6691 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6679 | "2552 Unregister FCFI command failed rc x%x " | 6692 | "2552 Unregister FCFI command failed rc x%x " |
| 6680 | "HBA state x%x\n", | 6693 | "HBA state x%x\n", |
| 6681 | rc, phba->pport->port_state); | 6694 | rc, phba->pport->port_state); |
| @@ -6699,7 +6712,7 @@ lpfc_unregister_fcf_rescan(struct lpfc_hba *phba) · 17 unmodified lines | |||
| 6699 | /* Preparation for unregistering fcf */ | 6712 | /* Preparation for unregistering fcf */ |
| 6700 | rc = lpfc_unregister_fcf_prep(phba); | 6713 | rc = lpfc_unregister_fcf_prep(phba); |
| 6701 | if (rc) { | 6714 | if (rc) { |
| 6702 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 6715 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6703 | "2748 Failed to prepare for unregistering " | 6716 | "2748 Failed to prepare for unregistering " |
| 6704 | "HBA's FCF record: rc=%d\n", rc); | 6717 | "HBA's FCF record: rc=%d\n", rc); |
| 6705 | return; | 6718 | return; |
| @@ -6735,7 +6748,7 @@ lpfc_unregister_fcf_rescan(struct lpfc_hba *phba) · 29 unmodified lines | |||
| 6735 | spin_lock_irq(&phba->hbalock); | 6748 | spin_lock_irq(&phba->hbalock); |
| 6736 | phba->fcf.fcf_flag &= ~FCF_INIT_DISC; | 6749 | phba->fcf.fcf_flag &= ~FCF_INIT_DISC; |
| 6737 | spin_unlock_irq(&phba->hbalock); | 6750 | spin_unlock_irq(&phba->hbalock); |
| 6738 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY|LOG_MBOX, | 6751 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6739 | "2553 lpfc_unregister_unused_fcf failed " | 6752 | "2553 lpfc_unregister_unused_fcf failed " |
| 6740 | "to read FCF record HBA state x%x\n", | 6753 | "to read FCF record HBA state x%x\n", |
| 6741 | phba->pport->port_state); | 6754 | phba->pport->port_state); |
| @@ -6757,7 +6770,7 @@ lpfc_unregister_fcf(struct lpfc_hba *phba) · 15 unmodified lines | |||
| 6757 | /* Preparation for unregistering fcf */ | 6770 | /* Preparation for unregistering fcf */ |
| 6758 | rc = lpfc_unregister_fcf_prep(phba); | 6771 | rc = lpfc_unregister_fcf_prep(phba); |
| 6759 | if (rc) { | 6772 | if (rc) { |
| 6760 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 6773 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6761 | "2749 Failed to prepare for unregistering " | 6774 | "2749 Failed to prepare for unregistering " |
| 6762 | "HBA's FCF record: rc=%d\n", rc); | 6775 | "HBA's FCF record: rc=%d\n", rc); |
| 6763 | return; | 6776 | return; |
| @@ -6844,9 +6857,9 @@ lpfc_read_fcf_conn_tbl(struct lpfc_hba *phba, · 80 unmodified lines | |||
| 6844 | conn_entry = kzalloc(sizeof(struct lpfc_fcf_conn_entry), | 6857 | conn_entry = kzalloc(sizeof(struct lpfc_fcf_conn_entry), |
| 6845 | GFP_KERNEL); | 6858 | GFP_KERNEL); |
| 6846 | if (!conn_entry) { | 6859 | if (!conn_entry) { |
| 6847 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6860 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6848 | "2566 Failed to allocate connection" | 6861 | "2566 Failed to allocate connection" |
| 6849 | " table entry\n"); | 6862 | " table entry\n"); |
| 6850 | return; | 6863 | return; |
| 6851 | } | 6864 | } |
| 6852 | 6865 | ||
| @@ -6990,7 +7003,7 @@ lpfc_parse_fcoe_conf(struct lpfc_hba *phba, · 137 unmodified lines | |||
| 6990 | 7003 | ||
| 6991 | /* Check the region signature first */ | 7004 | /* Check the region signature first */ |
| 6992 | if (memcmp(buff, LPFC_REGION23_SIGNATURE, 4)) { | 7005 | if (memcmp(buff, LPFC_REGION23_SIGNATURE, 4)) { |
| 6993 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7006 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6994 | "2567 Config region 23 has bad signature\n"); | 7007 | "2567 Config region 23 has bad signature\n"); |
| 6995 | return; | 7008 | return; |
| 6996 | } | 7009 | } |
| @@ -6999,8 +7012,8 @@ lpfc_parse_fcoe_conf(struct lpfc_hba *phba, · 2 unmodified lines | |||
| 6999 | 7012 | ||
| 7000 | /* Check the data structure version */ | 7013 | /* Check the data structure version */ |
| 7001 | if (buff[offset] != LPFC_REGION23_VERSION) { | 7014 | if (buff[offset] != LPFC_REGION23_VERSION) { |
| 7002 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7015 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7003 | "2568 Config region 23 has bad version\n"); | 7016 | "2568 Config region 23 has bad version\n"); |
| 7004 | return; | 7017 | return; |
| 7005 | } | 7018 | } |
| 7006 | offset += 4; | 7019 | offset += 4; |
| @@ -650,6 +650,9 @@ struct lpfc_register { · 649 unmodified lines | |||
| 650 | #define lpfc_sliport_status_oti_SHIFT 29 | 650 | #define lpfc_sliport_status_oti_SHIFT 29 |
| 651 | #define lpfc_sliport_status_oti_MASK 0x1 | 651 | #define lpfc_sliport_status_oti_MASK 0x1 |
| 652 | #define lpfc_sliport_status_oti_WORD word0 | 652 | #define lpfc_sliport_status_oti_WORD word0 |
| 653 | #define lpfc_sliport_status_dip_SHIFT 25 | ||
| 654 | #define lpfc_sliport_status_dip_MASK 0x1 | ||
| 655 | #define lpfc_sliport_status_dip_WORD word0 | ||
| 653 | #define lpfc_sliport_status_rn_SHIFT 24 | 656 | #define lpfc_sliport_status_rn_SHIFT 24 |
| 654 | #define lpfc_sliport_status_rn_MASK 0x1 | 657 | #define lpfc_sliport_status_rn_MASK 0x1 |
| 655 | #define lpfc_sliport_status_rn_WORD word0 | 658 | #define lpfc_sliport_status_rn_WORD word0 |
| @@ -3531,7 +3534,7 @@ struct lpfc_sli4_parameters { · 2875 unmodified lines | |||
| 3531 | }; | 3534 | }; |
| 3532 | 3535 | ||
| 3533 | #define LPFC_SET_UE_RECOVERY 0x10 | 3536 | #define LPFC_SET_UE_RECOVERY 0x10 |
| 3534 | #define LPFC_SET_MDS_DIAGS 0x11 | 3537 | #define LPFC_SET_MDS_DIAGS 0x12 |
| 3535 | #define LPFC_SET_DUAL_DUMP 0x1e | 3538 | #define LPFC_SET_DUAL_DUMP 0x1e |
| 3536 | struct lpfc_mbx_set_feature { | 3539 | struct lpfc_mbx_set_feature { |
| 3537 | struct mbox_header header; | 3540 | struct mbox_header header; |
| @@ -153,7 +153,7 @@ lpfc_config_port_prep(struct lpfc_hba *phba) · 152 unmodified lines | |||
| 153 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 153 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
| 154 | 154 | ||
| 155 | if (rc != MBX_SUCCESS) { | 155 | if (rc != MBX_SUCCESS) { |
| 156 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 156 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 157 | "0324 Config Port initialization " | 157 | "0324 Config Port initialization " |
| 158 | "error, mbxCmd x%x READ_NVPARM, " | 158 | "error, mbxCmd x%x READ_NVPARM, " |
| 159 | "mbxStatus x%x\n", | 159 | "mbxStatus x%x\n", |
| @@ -177,7 +177,7 @@ lpfc_config_port_prep(struct lpfc_hba *phba) · 17 unmodified lines | |||
| 177 | lpfc_read_rev(phba, pmb); | 177 | lpfc_read_rev(phba, pmb); |
| 178 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 178 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
| 179 | if (rc != MBX_SUCCESS) { | 179 | if (rc != MBX_SUCCESS) { |
| 180 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 180 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 181 | "0439 Adapter failed to init, mbxCmd x%x " | 181 | "0439 Adapter failed to init, mbxCmd x%x " |
| 182 | "READ_REV, mbxStatus x%x\n", | 182 | "READ_REV, mbxStatus x%x\n", |
| 183 | mb->mbxCommand, mb->mbxStatus); | 183 | mb->mbxCommand, mb->mbxStatus); |
| @@ -192,7 +192,7 @@ lpfc_config_port_prep(struct lpfc_hba *phba) · 8 unmodified lines | |||
| 192 | */ | 192 | */ |
| 193 | if (mb->un.varRdRev.rr == 0) { | 193 | if (mb->un.varRdRev.rr == 0) { |
| 194 | vp->rev.rBit = 0; | 194 | vp->rev.rBit = 0; |
| 195 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 195 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 196 | "0440 Adapter failed to init, READ_REV has " | 196 | "0440 Adapter failed to init, READ_REV has " |
| 197 | "missing revision information.\n"); | 197 | "missing revision information.\n"); |
| 198 | mempool_free(pmb, phba->mbox_mem_pool); | 198 | mempool_free(pmb, phba->mbox_mem_pool); |
| @@ -253,13 +253,15 @@ lpfc_config_port_prep(struct lpfc_hba *phba) · 54 unmodified lines | |||
| 253 | */ | 253 | */ |
| 254 | if (mb->un.varDmp.word_cnt == 0) | 254 | if (mb->un.varDmp.word_cnt == 0) |
| 255 | break; | 255 | break; |
| 256 | if (mb->un.varDmp.word_cnt > DMP_VPD_SIZE - offset) | 256 | |
| 257 | mb->un.varDmp.word_cnt = DMP_VPD_SIZE - offset; | 257 | i = mb->un.varDmp.word_cnt * sizeof(uint32_t); |
| 258 | if (offset + i > DMP_VPD_SIZE) | ||
| 259 | i = DMP_VPD_SIZE - offset; | ||
| 258 | lpfc_sli_pcimem_bcopy(((uint8_t *)mb) + DMP_RSP_OFFSET, | 260 | lpfc_sli_pcimem_bcopy(((uint8_t *)mb) + DMP_RSP_OFFSET, |
| 259 | lpfc_vpd_data + offset, | 261 | lpfc_vpd_data + offset, i); |
| 260 | mb->un.varDmp.word_cnt); | 262 | offset += i; |
| 261 | offset += mb->un.varDmp.word_cnt; | 263 | } while (offset < DMP_VPD_SIZE); |
| 262 | } while (mb->un.varDmp.word_cnt && offset < DMP_VPD_SIZE); | 264 | |
| 263 | lpfc_parse_vpd(phba, lpfc_vpd_data, offset); | 265 | lpfc_parse_vpd(phba, lpfc_vpd_data, offset); |
| 264 | 266 | ||
| 265 | kfree(lpfc_vpd_data); | 267 | kfree(lpfc_vpd_data); |
| @@ -442,7 +444,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) · 176 unmodified lines | |||
| 442 | 444 | ||
| 443 | pmb->vport = vport; | 445 | pmb->vport = vport; |
| 444 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { | 446 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { |
| 445 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 447 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 446 | "0448 Adapter failed init, mbxCmd x%x " | 448 | "0448 Adapter failed init, mbxCmd x%x " |
| 447 | "READ_SPARM mbxStatus x%x\n", | 449 | "READ_SPARM mbxStatus x%x\n", |
| 448 | mb->mbxCommand, mb->mbxStatus); | 450 | mb->mbxCommand, mb->mbxStatus); |
| @@ -496,7 +498,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) · 47 unmodified lines | |||
| 496 | lpfc_read_config(phba, pmb); | 498 | lpfc_read_config(phba, pmb); |
| 497 | pmb->vport = vport; | 499 | pmb->vport = vport; |
| 498 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { | 500 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { |
| 499 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 501 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 500 | "0453 Adapter failed to init, mbxCmd x%x " | 502 | "0453 Adapter failed to init, mbxCmd x%x " |
| 501 | "READ_CONFIG, mbxStatus x%x\n", | 503 | "READ_CONFIG, mbxStatus x%x\n", |
| 502 | mb->mbxCommand, mb->mbxStatus); | 504 | mb->mbxCommand, mb->mbxStatus); |
| @@ -545,7 +547,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) · 42 unmodified lines | |||
| 545 | } | 547 | } |
| 546 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 548 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
| 547 | if (rc != MBX_SUCCESS) { | 549 | if (rc != MBX_SUCCESS) { |
| 548 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 550 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 549 | "0352 Config MSI mailbox command " | 551 | "0352 Config MSI mailbox command " |
| 550 | "failed, mbxCmd x%x, mbxStatus x%x\n", | 552 | "failed, mbxCmd x%x, mbxStatus x%x\n", |
| 551 | pmb->u.mb.mbxCommand, | 553 | pmb->u.mb.mbxCommand, |
| @@ -596,17 +598,15 @@ lpfc_config_port_post(struct lpfc_hba *phba) · 44 unmodified lines | |||
| 596 | jiffies + msecs_to_jiffies(1000 * phba->eratt_poll_interval)); | 598 | jiffies + msecs_to_jiffies(1000 * phba->eratt_poll_interval)); |
| 597 | 599 | ||
| 598 | if (phba->hba_flag & LINK_DISABLED) { | 600 | if (phba->hba_flag & LINK_DISABLED) { |
| 599 | lpfc_printf_log(phba, | 601 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 600 | KERN_ERR, LOG_INIT, | 602 | "2598 Adapter Link is disabled.\n"); |
| 601 | "2598 Adapter Link is disabled.\n"); | ||
| 602 | lpfc_down_link(phba, pmb); | 603 | lpfc_down_link(phba, pmb); |
| 603 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; | 604 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; |
| 604 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); | 605 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); |
| 605 | if ((rc != MBX_SUCCESS) && (rc != MBX_BUSY)) { | 606 | if ((rc != MBX_SUCCESS) && (rc != MBX_BUSY)) { |
| 606 | lpfc_printf_log(phba, | 607 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 607 | KERN_ERR, LOG_INIT, | 608 | "2599 Adapter failed to issue DOWN_LINK" |
| 608 | "2599 Adapter failed to issue DOWN_LINK" | 609 | " mbox command rc 0x%x\n", rc); |
| 609 | " mbox command rc 0x%x\n", rc); | ||
| 610 | 610 | ||
| 611 | mempool_free(pmb, phba->mbox_mem_pool); | 611 | mempool_free(pmb, phba->mbox_mem_pool); |
| 612 | return -EIO; | 612 | return -EIO; |
| @@ -630,9 +630,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) · 17 unmodified lines | |||
| 630 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); | 630 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); |
| 631 | 631 | ||
| 632 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { | 632 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { |
| 633 | lpfc_printf_log(phba, | 633 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 634 | KERN_ERR, | ||
| 635 | LOG_INIT, | ||
| 636 | "0456 Adapter failed to issue " | 634 | "0456 Adapter failed to issue " |
| 637 | "ASYNCEVT_ENABLE mbox status x%x\n", | 635 | "ASYNCEVT_ENABLE mbox status x%x\n", |
| 638 | rc); | 636 | rc); |
| @@ -652,7 +650,8 @@ lpfc_config_port_post(struct lpfc_hba *phba) · 13 unmodified lines | |||
| 652 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); | 650 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); |
| 653 | 651 | ||
| 654 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { | 652 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { |
| 655 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, "0435 Adapter failed " | 653 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 654 | "0435 Adapter failed " | ||
| 656 | "to get Option ROM version status x%x\n", rc); | 655 | "to get Option ROM version status x%x\n", rc); |
| 657 | mempool_free(pmb, phba->mbox_mem_pool); | 656 | mempool_free(pmb, phba->mbox_mem_pool); |
| 658 | } | 657 | } |
| @@ -730,10 +729,10 @@ lpfc_hba_init_link_fc_topology(struct lpfc_hba *phba, uint32_t fc_topology, · 71 unmodified lines | |||
| 730 | ((phba->cfg_link_speed == LPFC_USER_LINK_SPEED_64G) && | 729 | ((phba->cfg_link_speed == LPFC_USER_LINK_SPEED_64G) && |
| 731 | !(phba->lmt & LMT_64Gb))) { | 730 | !(phba->lmt & LMT_64Gb))) { |
| 732 | /* Reset link speed to auto */ | 731 | /* Reset link speed to auto */ |
| 733 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, | 732 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 734 | "1302 Invalid speed for this board:%d " | 733 | "1302 Invalid speed for this board:%d " |
| 735 | "Reset link speed to auto.\n", | 734 | "Reset link speed to auto.\n", |
| 736 | phba->cfg_link_speed); | 735 | phba->cfg_link_speed); |
| 737 | phba->cfg_link_speed = LPFC_USER_LINK_SPEED_AUTO; | 736 | phba->cfg_link_speed = LPFC_USER_LINK_SPEED_AUTO; |
| 738 | } | 737 | } |
| 739 | lpfc_init_link(phba, pmb, fc_topology, phba->cfg_link_speed); | 738 | lpfc_init_link(phba, pmb, fc_topology, phba->cfg_link_speed); |
| @@ -742,10 +741,10 @@ lpfc_hba_init_link_fc_topology(struct lpfc_hba *phba, uint32_t fc_topology, · 2 unmodified lines | |||
| 742 | lpfc_set_loopback_flag(phba); | 741 | lpfc_set_loopback_flag(phba); |
| 743 | rc = lpfc_sli_issue_mbox(phba, pmb, flag); | 742 | rc = lpfc_sli_issue_mbox(phba, pmb, flag); |
| 744 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { | 743 | if ((rc != MBX_BUSY) && (rc != MBX_SUCCESS)) { |
| 745 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 744 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 746 | "0498 Adapter failed to init, mbxCmd x%x " | 745 | "0498 Adapter failed to init, mbxCmd x%x " |
| 747 | "INIT_LINK, mbxStatus x%x\n", | 746 | "INIT_LINK, mbxStatus x%x\n", |
| 748 | mb->mbxCommand, mb->mbxStatus); | 747 | mb->mbxCommand, mb->mbxStatus); |
| 749 | if (phba->sli_rev <= LPFC_SLI_REV3) { | 748 | if (phba->sli_rev <= LPFC_SLI_REV3) { |
| 750 | /* Clear all interrupt enable conditions */ | 749 | /* Clear all interrupt enable conditions */ |
| 751 | writel(0, phba->HCregaddr); | 750 | writel(0, phba->HCregaddr); |
| @@ -791,17 +790,15 @@ lpfc_hba_down_link(struct lpfc_hba *phba, uint32_t flag) · 39 unmodified lines | |||
| 791 | return -ENOMEM; | 790 | return -ENOMEM; |
| 792 | } | 791 | } |
| 793 | 792 | ||
| 794 | lpfc_printf_log(phba, | 793 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 795 | KERN_ERR, LOG_INIT, | 794 | "0491 Adapter Link is disabled.\n"); |
| 796 | "0491 Adapter Link is disabled.\n"); | ||
| 797 | lpfc_down_link(phba, pmb); | 795 | lpfc_down_link(phba, pmb); |
| 798 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; | 796 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; |
| 799 | rc = lpfc_sli_issue_mbox(phba, pmb, flag); | 797 | rc = lpfc_sli_issue_mbox(phba, pmb, flag); |
| 800 | if ((rc != MBX_SUCCESS) && (rc != MBX_BUSY)) { | 798 | if ((rc != MBX_SUCCESS) && (rc != MBX_BUSY)) { |
| 801 | lpfc_printf_log(phba, | 799 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 802 | KERN_ERR, LOG_INIT, | 800 | "2522 Adapter failed to issue DOWN_LINK" |
| 803 | "2522 Adapter failed to issue DOWN_LINK" | 801 | " mbox command rc 0x%x\n", rc); |
| 804 | " mbox command rc 0x%x\n", rc); | ||
| 805 | 802 | ||
| 806 | mempool_free(pmb, phba->mbox_mem_pool); | 803 | mempool_free(pmb, phba->mbox_mem_pool); |
| 807 | return -EIO; | 804 | return -EIO; |
| @@ -996,7 +993,6 @@ lpfc_hba_clean_txcmplq(struct lpfc_hba *phba) · 188 unmodified lines | |||
| 996 | 993 | ||
| 997 | /** | 994 | /** |
| 998 | * lpfc_hba_down_post_s3 - Perform lpfc uninitialization after HBA reset | 995 | * lpfc_hba_down_post_s3 - Perform lpfc uninitialization after HBA reset |
| 999 | int i; | ||
| 1000 | * @phba: pointer to lpfc HBA data structure. | 996 | * @phba: pointer to lpfc HBA data structure. |
| 1001 | * | 997 | * |
| 1002 | * This routine will do uninitialization after the HBA is reset when bring | 998 | * This routine will do uninitialization after the HBA is reset when bring |
| @@ -1124,7 +1120,7 @@ lpfc_hba_down_post(struct lpfc_hba *phba) · 121 unmodified lines | |||
| 1124 | 1120 | ||
| 1125 | /** | 1121 | /** |
| 1126 | * lpfc_hb_timeout - The HBA-timer timeout handler | 1122 | * lpfc_hb_timeout - The HBA-timer timeout handler |
| 1127 | * @ptr: unsigned long holds the pointer to lpfc hba data structure. | 1123 | * @t: timer context used to obtain the pointer to lpfc hba data structure. |
| 1128 | * | 1124 | * |
| 1129 | * This is the HBA-timer timeout handler registered to the lpfc driver. When | 1125 | * This is the HBA-timer timeout handler registered to the lpfc driver. When |
| 1130 | * this timer fires, a HBA timeout event shall be posted to the lpfc driver | 1126 | * this timer fires, a HBA timeout event shall be posted to the lpfc driver |
| @@ -1158,7 +1154,7 @@ lpfc_hb_timeout(struct timer_list *t) · 27 unmodified lines | |||
| 1158 | 1154 | ||
| 1159 | /** | 1155 | /** |
| 1160 | * lpfc_rrq_timeout - The RRQ-timer timeout handler | 1156 | * lpfc_rrq_timeout - The RRQ-timer timeout handler |
| 1161 | * @ptr: unsigned long holds the pointer to lpfc hba data structure. | 1157 | * @t: timer context used to obtain the pointer to lpfc hba data structure. |
| 1162 | * | 1158 | * |
| 1163 | * This is the RRQ-timer timeout handler registered to the lpfc driver. When | 1159 | * This is the RRQ-timer timeout handler registered to the lpfc driver. When |
| 1164 | * this timer fires, a RRQ timeout event shall be posted to the lpfc driver | 1160 | * this timer fires, a RRQ timeout event shall be posted to the lpfc driver |
| @@ -1222,6 +1218,75 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq) · 57 unmodified lines | |||
| 1222 | return; | 1218 | return; |
| 1223 | } | 1219 | } |
| 1224 | 1220 | ||
| 1221 | /* | ||
| 1222 | * lpfc_idle_stat_delay_work - idle_stat tracking | ||
| 1223 | * | ||
| 1224 | * This routine tracks per-cq idle_stat and determines polling decisions. | ||
| 1225 | * | ||
| 1226 | * Return codes: | ||
| 1227 | * None | ||
| 1228 | **/ | ||
| 1229 | static void | ||
| 1230 | lpfc_idle_stat_delay_work(struct work_struct *work) | ||
| 1231 | { | ||
| 1232 | struct lpfc_hba *phba = container_of(to_delayed_work(work), | ||
| 1233 | struct lpfc_hba, | ||
| 1234 | idle_stat_delay_work); | ||
| 1235 | struct lpfc_queue *cq; | ||
| 1236 | struct lpfc_sli4_hdw_queue *hdwq; | ||
| 1237 | struct lpfc_idle_stat *idle_stat; | ||
| 1238 | u32 i, idle_percent; | ||
| 1239 | u64 wall, wall_idle, diff_wall, diff_idle, busy_time; | ||
| 1240 | |||
| 1241 | if (phba->pport->load_flag & FC_UNLOADING) | ||
| 1242 | return; | ||
| 1243 | |||
| 1244 | if (phba->link_state == LPFC_HBA_ERROR || | ||
| 1245 | phba->pport->fc_flag & FC_OFFLINE_MODE) | ||
| 1246 | goto requeue; | ||
| 1247 | |||
| 1248 | for_each_present_cpu(i) { | ||
| 1249 | hdwq = &phba->sli4_hba.hdwq[phba->sli4_hba.cpu_map[i].hdwq]; | ||
| 1250 | cq = hdwq->io_cq; | ||
| 1251 | |||
| 1252 | /* Skip if we've already handled this cq's primary CPU */ | ||
| 1253 | if (cq->chann != i) | ||
| 1254 | continue; | ||
| 1255 | |||
| 1256 | idle_stat = &phba->sli4_hba.idle_stat[i]; | ||
| 1257 | |||
| 1258 | /* get_cpu_idle_time returns values as running counters. Thus, | ||
| 1259 | * to know the amount for this period, the prior counter values | ||
| 1260 | * need to be subtracted from the current counter values. | ||
| 1261 | * From there, the idle time stat can be calculated as a | ||
| 1262 | * percentage of 100 - the sum of the other consumption times. | ||
| 1263 | */ | ||
| 1264 | wall_idle = get_cpu_idle_time(i, &wall, 1); | ||
| 1265 | diff_idle = wall_idle - idle_stat->prev_idle; | ||
| 1266 | diff_wall = wall - idle_stat->prev_wall; | ||
| 1267 | |||
| 1268 | if (diff_wall <= diff_idle) | ||
| 1269 | busy_time = 0; | ||
| 1270 | else | ||
| 1271 | busy_time = diff_wall - diff_idle; | ||
| 1272 | |||
| 1273 | idle_percent = div64_u64(100 * busy_time, diff_wall); | ||
| 1274 | idle_percent = 100 - idle_percent; | ||
| 1275 | |||
| 1276 | if (idle_percent < 15) | ||
| 1277 | cq->poll_mode = LPFC_QUEUE_WORK; | ||
| 1278 | else | ||
| 1279 | cq->poll_mode = LPFC_IRQ_POLL; | ||
| 1280 | |||
| 1281 | idle_stat->prev_idle = wall_idle; | ||
| 1282 | idle_stat->prev_wall = wall; | ||
| 1283 | } | ||
| 1284 | |||
| 1285 | requeue: | ||
| 1286 | schedule_delayed_work(&phba->idle_stat_delay_work, | ||
| 1287 | msecs_to_jiffies(LPFC_IDLE_STAT_DELAY)); | ||
| 1288 | } | ||
| 1289 | |||
| 1225 | static void | 1290 | static void |
| 1226 | lpfc_hb_eq_delay_work(struct work_struct *work) | 1291 | lpfc_hb_eq_delay_work(struct work_struct *work) |
| 1227 | { | 1292 | { |
| @@ -1538,11 +1603,11 @@ lpfc_handle_deferred_eratt(struct lpfc_hba *phba) · 310 unmodified lines | |||
| 1538 | return; | 1603 | return; |
| 1539 | } | 1604 | } |
| 1540 | 1605 | ||
| 1541 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1606 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1542 | "0479 Deferred Adapter Hardware Error " | 1607 | "0479 Deferred Adapter Hardware Error " |
| 1543 | "Data: x%x x%x x%x\n", | 1608 | "Data: x%x x%x x%x\n", |
| 1544 | phba->work_hs, | 1609 | phba->work_hs, phba->work_status[0], |
| 1545 | phba->work_status[0], phba->work_status[1]); | 1610 | phba->work_status[1]); |
| 1546 | 1611 | ||
| 1547 | spin_lock_irq(&phba->hbalock); | 1612 | spin_lock_irq(&phba->hbalock); |
| 1548 | psli->sli_flag &= ~LPFC_SLI_ACTIVE; | 1613 | psli->sli_flag &= ~LPFC_SLI_ACTIVE; |
| @@ -1693,7 +1758,7 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba) · 144 unmodified lines | |||
| 1693 | temp_event_data.event_code = LPFC_CRIT_TEMP; | 1758 | temp_event_data.event_code = LPFC_CRIT_TEMP; |
| 1694 | temp_event_data.data = (uint32_t)temperature; | 1759 | temp_event_data.data = (uint32_t)temperature; |
| 1695 | 1760 | ||
| 1696 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1761 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1697 | "0406 Adapter maximum temperature exceeded " | 1762 | "0406 Adapter maximum temperature exceeded " |
| 1698 | "(%ld), taking this port offline " | 1763 | "(%ld), taking this port offline " |
| 1699 | "Data: x%x x%x x%x\n", | 1764 | "Data: x%x x%x x%x\n", |
| @@ -1717,7 +1782,7 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba) · 17 unmodified lines | |||
| 1717 | * failure is a value other than FFER6. Do not call the offline | 1782 | * failure is a value other than FFER6. Do not call the offline |
| 1718 | * twice. This is the adapter hardware error path. | 1783 | * twice. This is the adapter hardware error path. |
| 1719 | */ | 1784 | */ |
| 1720 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1785 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1721 | "0457 Adapter Hardware Error " | 1786 | "0457 Adapter Hardware Error " |
| 1722 | "Data: x%x x%x x%x\n", | 1787 | "Data: x%x x%x x%x\n", |
| 1723 | phba->work_hs, | 1788 | phba->work_hs, |
| @@ -1738,7 +1803,7 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba) · 14 unmodified lines | |||
| 1738 | * lpfc_sli4_port_sta_fn_reset - The SLI4 function reset due to port status reg | 1803 | * lpfc_sli4_port_sta_fn_reset - The SLI4 function reset due to port status reg |
| 1739 | * @phba: pointer to lpfc hba data structure. | 1804 | * @phba: pointer to lpfc hba data structure. |
| 1740 | * @mbx_action: flag for mailbox shutdown action. | 1805 | * @mbx_action: flag for mailbox shutdown action. |
| 1741 | * | 1806 | * @en_rn_msg: send reset/port recovery message. |
| 1742 | * This routine is invoked to perform an SLI4 port PCI function reset in | 1807 | * This routine is invoked to perform an SLI4 port PCI function reset in |
| 1743 | * response to port status register polling attention. It waits for port | 1808 | * response to port status register polling attention. It waits for port |
| 1744 | * status register (ERR, RDY, RN) bits before proceeding with function reset. | 1809 | * status register (ERR, RDY, RN) bits before proceeding with function reset. |
| @@ -1765,7 +1830,7 @@ lpfc_sli4_port_sta_fn_reset(struct lpfc_hba *phba, int mbx_action, · 20 unmodified lines | |||
| 1765 | 1830 | ||
| 1766 | /* need reset: attempt for port recovery */ | 1831 | /* need reset: attempt for port recovery */ |
| 1767 | if (en_rn_msg) | 1832 | if (en_rn_msg) |
| 1768 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1833 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1769 | "2887 Reset Needed: Attempting Port " | 1834 | "2887 Reset Needed: Attempting Port " |
| 1770 | "Recovery...\n"); | 1835 | "Recovery...\n"); |
| 1771 | lpfc_offline_prep(phba, mbx_action); | 1836 | lpfc_offline_prep(phba, mbx_action); |
| @@ -1775,14 +1840,14 @@ lpfc_sli4_port_sta_fn_reset(struct lpfc_hba *phba, int mbx_action, · 3 unmodified lines | |||
| 1775 | lpfc_sli4_disable_intr(phba); | 1840 | lpfc_sli4_disable_intr(phba); |
| 1776 | rc = lpfc_sli_brdrestart(phba); | 1841 | rc = lpfc_sli_brdrestart(phba); |
| 1777 | if (rc) { | 1842 | if (rc) { |
| 1778 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1843 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1779 | "6309 Failed to restart board\n"); | 1844 | "6309 Failed to restart board\n"); |
| 1780 | return rc; | 1845 | return rc; |
| 1781 | } | 1846 | } |
| 1782 | /* request and enable interrupt */ | 1847 | /* request and enable interrupt */ |
| 1783 | intr_mode = lpfc_sli4_enable_intr(phba, phba->intr_mode); | 1848 | intr_mode = lpfc_sli4_enable_intr(phba, phba->intr_mode); |
| 1784 | if (intr_mode == LPFC_INTR_ERROR) { | 1849 | if (intr_mode == LPFC_INTR_ERROR) { |
| 1785 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1850 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1786 | "3175 Failed to enable interrupt\n"); | 1851 | "3175 Failed to enable interrupt\n"); |
| 1787 | return -EIO; | 1852 | return -EIO; |
| 1788 | } | 1853 | } |
| @@ -1821,7 +1886,7 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 32 unmodified lines | |||
| 1821 | * we cannot communicate with the pci card anyway. | 1886 | * we cannot communicate with the pci card anyway. |
| 1822 | */ | 1887 | */ |
| 1823 | if (pci_channel_offline(phba->pcidev)) { | 1888 | if (pci_channel_offline(phba->pcidev)) { |
| 1824 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1889 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1825 | "3166 pci channel is offline\n"); | 1890 | "3166 pci channel is offline\n"); |
| 1826 | lpfc_sli4_offline_eratt(phba); | 1891 | lpfc_sli4_offline_eratt(phba); |
| 1827 | return; | 1892 | return; |
| @@ -1844,7 +1909,7 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 16 unmodified lines | |||
| 1844 | lpfc_sli4_offline_eratt(phba); | 1909 | lpfc_sli4_offline_eratt(phba); |
| 1845 | return; | 1910 | return; |
| 1846 | } | 1911 | } |
| 1847 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1912 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1848 | "7623 Checking UE recoverable"); | 1913 | "7623 Checking UE recoverable"); |
| 1849 | 1914 | ||
| 1850 | for (i = 0; i < phba->sli4_hba.ue_to_sr / 1000; i++) { | 1915 | for (i = 0; i < phba->sli4_hba.ue_to_sr / 1000; i++) { |
| @@ -1861,7 +1926,7 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 10 unmodified lines | |||
| 1861 | msleep(1000); | 1926 | msleep(1000); |
| 1862 | } | 1927 | } |
| 1863 | 1928 | ||
| 1864 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1929 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1865 | "4827 smphr_port_status x%x : Waited %dSec", | 1930 | "4827 smphr_port_status x%x : Waited %dSec", |
| 1866 | smphr_port_status, i); | 1931 | smphr_port_status, i); |
| 1867 | 1932 | ||
| @@ -1879,14 +1944,14 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 11 unmodified lines | |||
| 1879 | LPFC_MBX_NO_WAIT, en_rn_msg); | 1944 | LPFC_MBX_NO_WAIT, en_rn_msg); |
| 1880 | if (rc == 0) | 1945 | if (rc == 0) |
| 1881 | return; | 1946 | return; |
| 1882 | lpfc_printf_log(phba, | 1947 | lpfc_printf_log(phba, KERN_ERR, |
| 1883 | KERN_ERR, LOG_INIT, | 1948 | LOG_TRACE_EVENT, |
| 1884 | "4215 Failed to recover UE"); | 1949 | "4215 Failed to recover UE"); |
| 1885 | break; | 1950 | break; |
| 1886 | } | 1951 | } |
| 1887 | } | 1952 | } |
| 1888 | } | 1953 | } |
| 1889 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1954 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1890 | "7624 Firmware not ready: Failing UE recovery," | 1955 | "7624 Firmware not ready: Failing UE recovery," |
| 1891 | " waited %dSec", i); | 1956 | " waited %dSec", i); |
| 1892 | phba->link_state = LPFC_HBA_ERROR; | 1957 | phba->link_state = LPFC_HBA_ERROR; |
| @@ -1899,7 +1964,7 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 6 unmodified lines | |||
| 1899 | &portstat_reg.word0); | 1964 | &portstat_reg.word0); |
| 1900 | /* consider PCI bus read error as pci_channel_offline */ | 1965 | /* consider PCI bus read error as pci_channel_offline */ |
| 1901 | if (pci_rd_rc1 == -EIO) { | 1966 | if (pci_rd_rc1 == -EIO) { |
| 1902 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1967 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1903 | "3151 PCI bus read access failure: x%x\n", | 1968 | "3151 PCI bus read access failure: x%x\n", |
| 1904 | readl(phba->sli4_hba.u.if_type2.STATUSregaddr)); | 1969 | readl(phba->sli4_hba.u.if_type2.STATUSregaddr)); |
| 1905 | lpfc_sli4_offline_eratt(phba); | 1970 | lpfc_sli4_offline_eratt(phba); |
| @@ -1908,10 +1973,10 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 2 unmodified lines | |||
| 1908 | reg_err1 = readl(phba->sli4_hba.u.if_type2.ERR1regaddr); | 1973 | reg_err1 = readl(phba->sli4_hba.u.if_type2.ERR1regaddr); |
| 1909 | reg_err2 = readl(phba->sli4_hba.u.if_type2.ERR2regaddr); | 1974 | reg_err2 = readl(phba->sli4_hba.u.if_type2.ERR2regaddr); |
| 1910 | if (bf_get(lpfc_sliport_status_oti, &portstat_reg)) { | 1975 | if (bf_get(lpfc_sliport_status_oti, &portstat_reg)) { |
| 1911 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1976 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1912 | "2889 Port Overtemperature event, " | 1977 | "2889 Port Overtemperature event, " |
| 1913 | "taking port offline Data: x%x x%x\n", | 1978 | "taking port offline Data: x%x x%x\n", |
| 1914 | reg_err1, reg_err2); | 1979 | reg_err1, reg_err2); |
| 1915 | 1980 | ||
| 1916 | phba->sfp_alarm |= LPFC_TRANSGRESSION_HIGH_TEMPERATURE; | 1981 | phba->sfp_alarm |= LPFC_TRANSGRESSION_HIGH_TEMPERATURE; |
| 1917 | temp_event_data.event_type = FC_REG_TEMPERATURE_EVENT; | 1982 | temp_event_data.event_type = FC_REG_TEMPERATURE_EVENT; |
| @@ -1933,17 +1998,17 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 15 unmodified lines | |||
| 1933 | } | 1998 | } |
| 1934 | if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 && | 1999 | if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 && |
| 1935 | reg_err2 == SLIPORT_ERR2_REG_FW_RESTART) { | 2000 | reg_err2 == SLIPORT_ERR2_REG_FW_RESTART) { |
| 1936 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2001 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1937 | "3143 Port Down: Firmware Update " | 2002 | "3143 Port Down: Firmware Update " |
| 1938 | "Detected\n"); | 2003 | "Detected\n"); |
| 1939 | en_rn_msg = false; | 2004 | en_rn_msg = false; |
| 1940 | } else if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 && | 2005 | } else if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 && |
| 1941 | reg_err2 == SLIPORT_ERR2_REG_FORCED_DUMP) | 2006 | reg_err2 == SLIPORT_ERR2_REG_FORCED_DUMP) |
| 1942 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2007 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1943 | "3144 Port Down: Debug Dump\n"); | 2008 | "3144 Port Down: Debug Dump\n"); |
| 1944 | else if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 && | 2009 | else if (reg_err1 == SLIPORT_ERR1_REG_ERR_CODE_2 && |
| 1945 | reg_err2 == SLIPORT_ERR2_REG_FUNC_PROVISON) | 2010 | reg_err2 == SLIPORT_ERR2_REG_FUNC_PROVISON) |
| 1946 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2011 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1947 | "3145 Port Down: Provisioning\n"); | 2012 | "3145 Port Down: Provisioning\n"); |
| 1948 | 2013 | ||
| 1949 | /* If resets are disabled then leave the HBA alone and return */ | 2014 | /* If resets are disabled then leave the HBA alone and return */ |
| @@ -1962,7 +2027,7 @@ lpfc_handle_eratt_s4(struct lpfc_hba *phba) · 12 unmodified lines | |||
| 1962 | break; | 2027 | break; |
| 1963 | } | 2028 | } |
| 1964 | /* fall through for not able to recover */ | 2029 | /* fall through for not able to recover */ |
| 1965 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2030 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1966 | "3152 Unrecoverable error\n"); | 2031 | "3152 Unrecoverable error\n"); |
| 1967 | phba->link_state = LPFC_HBA_ERROR; | 2032 | phba->link_state = LPFC_HBA_ERROR; |
| 1968 | break; | 2033 | break; |
| @@ -2080,8 +2145,8 @@ lpfc_handle_latt_err_exit: · 111 unmodified lines | |||
| 2080 | lpfc_linkdown(phba); | 2145 | lpfc_linkdown(phba); |
| 2081 | phba->link_state = LPFC_HBA_ERROR; | 2146 | phba->link_state = LPFC_HBA_ERROR; |
| 2082 | 2147 | ||
| 2083 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 2148 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2084 | "0300 LATT: Cannot issue READ_LA: Data:%d\n", rc); | 2149 | "0300 LATT: Cannot issue READ_LA: Data:%d\n", rc); |
| 2085 | 2150 | ||
| 2086 | return; | 2151 | return; |
| 2087 | } | 2152 | } |
| @@ -2830,12 +2895,13 @@ lpfc_cleanup(struct lpfc_vport *vport) · 742 unmodified lines | |||
| 2830 | */ | 2895 | */ |
| 2831 | while (!list_empty(&vport->fc_nodes)) { | 2896 | while (!list_empty(&vport->fc_nodes)) { |
| 2832 | if (i++ > 3000) { | 2897 | if (i++ > 3000) { |
| 2833 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 2898 | lpfc_printf_vlog(vport, KERN_ERR, |
| 2899 | LOG_TRACE_EVENT, | ||
| 2834 | "0233 Nodelist not empty\n"); | 2900 | "0233 Nodelist not empty\n"); |
| 2835 | list_for_each_entry_safe(ndlp, next_ndlp, | 2901 | list_for_each_entry_safe(ndlp, next_ndlp, |
| 2836 | &vport->fc_nodes, nlp_listp) { | 2902 | &vport->fc_nodes, nlp_listp) { |
| 2837 | lpfc_printf_vlog(ndlp->vport, KERN_ERR, | 2903 | lpfc_printf_vlog(ndlp->vport, KERN_ERR, |
| 2838 | LOG_NODE, | 2904 | LOG_TRACE_EVENT, |
| 2839 | "0282 did:x%x ndlp:x%px " | 2905 | "0282 did:x%x ndlp:x%px " |
| 2840 | "usgmap:x%x refcnt:%d\n", | 2906 | "usgmap:x%x refcnt:%d\n", |
| 2841 | ndlp->nlp_DID, (void *)ndlp, | 2907 | ndlp->nlp_DID, (void *)ndlp, |
| @@ -2922,6 +2988,7 @@ lpfc_stop_hba_timers(struct lpfc_hba *phba) · 80 unmodified lines | |||
| 2922 | if (phba->pport) | 2988 | if (phba->pport) |
| 2923 | lpfc_stop_vport_timers(phba->pport); | 2989 | lpfc_stop_vport_timers(phba->pport); |
| 2924 | cancel_delayed_work_sync(&phba->eq_delay_work); | 2990 | cancel_delayed_work_sync(&phba->eq_delay_work); |
| 2991 | cancel_delayed_work_sync(&phba->idle_stat_delay_work); | ||
| 2925 | del_timer_sync(&phba->sli.mbox_tmo); | 2992 | del_timer_sync(&phba->sli.mbox_tmo); |
| 2926 | del_timer_sync(&phba->fabric_block_timer); | 2993 | del_timer_sync(&phba->fabric_block_timer); |
| 2927 | del_timer_sync(&phba->eratt_poll); | 2994 | del_timer_sync(&phba->eratt_poll); |
| @@ -2942,7 +3009,7 @@ lpfc_stop_hba_timers(struct lpfc_hba *phba) · 14 unmodified lines | |||
| 2942 | lpfc_sli4_stop_fcf_redisc_wait_timer(phba); | 3009 | lpfc_sli4_stop_fcf_redisc_wait_timer(phba); |
| 2943 | break; | 3010 | break; |
| 2944 | default: | 3011 | default: |
| 2945 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3012 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2946 | "0297 Invalid device group (x%x)\n", | 3013 | "0297 Invalid device group (x%x)\n", |
| 2947 | phba->pci_dev_grp); | 3014 | phba->pci_dev_grp); |
| 2948 | break; | 3015 | break; |
| @@ -2953,6 +3020,7 @@ lpfc_stop_hba_timers(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 2953 | /** | 3020 | /** |
| 2954 | * lpfc_block_mgmt_io - Mark a HBA's management interface as blocked | 3021 | * lpfc_block_mgmt_io - Mark a HBA's management interface as blocked |
| 2955 | * @phba: pointer to lpfc hba data structure. | 3022 | * @phba: pointer to lpfc hba data structure. |
| 3023 | * @mbx_action: flag for mailbox no wait action. | ||
| 2956 | * | 3024 | * |
| 2957 | * This routine marks a HBA's management interface as blocked. Once the HBA's | 3025 | * This routine marks a HBA's management interface as blocked. Once the HBA's |
| 2958 | * management interface is marked as blocked, all the user space access to | 3026 | * management interface is marked as blocked, all the user space access to |
| @@ -2989,10 +3057,10 @@ lpfc_block_mgmt_io(struct lpfc_hba *phba, int mbx_action) · 30 unmodified lines | |||
| 2989 | /* Check active mailbox complete status every 2ms */ | 3057 | /* Check active mailbox complete status every 2ms */ |
| 2990 | msleep(2); | 3058 | msleep(2); |
| 2991 | if (time_after(jiffies, timeout)) { | 3059 | if (time_after(jiffies, timeout)) { |
| 2992 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3060 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2993 | "2813 Mgmt IO is Blocked %x " | 3061 | "2813 Mgmt IO is Blocked %x " |
| 2994 | "- mbox cmd %x still active\n", | 3062 | "- mbox cmd %x still active\n", |
| 2995 | phba->sli.sli_flag, actcmd); | 3063 | phba->sli.sli_flag, actcmd); |
| 2996 | break; | 3064 | break; |
| 2997 | } | 3065 | } |
| 2998 | } | 3066 | } |
| @@ -3337,7 +3405,7 @@ lpfc_online(struct lpfc_hba *phba) · 338 unmodified lines | |||
| 3337 | !phba->nvmet_support) { | 3405 | !phba->nvmet_support) { |
| 3338 | error = lpfc_nvme_create_localport(phba->pport); | 3406 | error = lpfc_nvme_create_localport(phba->pport); |
| 3339 | if (error) | 3407 | if (error) |
| 3340 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3408 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3341 | "6132 NVME restore reg failed " | 3409 | "6132 NVME restore reg failed " |
| 3342 | "on nvmei error x%x\n", error); | 3410 | "on nvmei error x%x\n", error); |
| 3343 | } | 3411 | } |
| @@ -3403,6 +3471,7 @@ lpfc_unblock_mgmt_io(struct lpfc_hba * phba) · 59 unmodified lines | |||
| 3403 | /** | 3471 | /** |
| 3404 | * lpfc_offline_prep - Prepare a HBA to be brought offline | 3472 | * lpfc_offline_prep - Prepare a HBA to be brought offline |
| 3405 | * @phba: pointer to lpfc hba data structure. | 3473 | * @phba: pointer to lpfc hba data structure. |
| 3474 | * @mbx_action: flag for mailbox shutdown action. | ||
| 3406 | * | 3475 | * |
| 3407 | * This routine is invoked to prepare a HBA to be brought offline. It performs | 3476 | * This routine is invoked to prepare a HBA to be brought offline. It performs |
| 3408 | * unregistration login to all the nodes on all vports and flushes the mailbox | 3477 | * unregistration login to all the nodes on all vports and flushes the mailbox |
| @@ -3677,7 +3746,8 @@ lpfc_sli4_els_sgl_update(struct lpfc_hba *phba) · 268 unmodified lines | |||
| 3677 | sglq_entry = kzalloc(sizeof(struct lpfc_sglq), | 3746 | sglq_entry = kzalloc(sizeof(struct lpfc_sglq), |
| 3678 | GFP_KERNEL); | 3747 | GFP_KERNEL); |
| 3679 | if (sglq_entry == NULL) { | 3748 | if (sglq_entry == NULL) { |
| 3680 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3749 | lpfc_printf_log(phba, KERN_ERR, |
| 3750 | LOG_TRACE_EVENT, | ||
| 3681 | "2562 Failure to allocate an " | 3751 | "2562 Failure to allocate an " |
| 3682 | "ELS sgl entry:%d\n", i); | 3752 | "ELS sgl entry:%d\n", i); |
| 3683 | rc = -ENOMEM; | 3753 | rc = -ENOMEM; |
| @@ -3688,7 +3758,8 @@ lpfc_sli4_els_sgl_update(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 3688 | &sglq_entry->phys); | 3758 | &sglq_entry->phys); |
| 3689 | if (sglq_entry->virt == NULL) { | 3759 | if (sglq_entry->virt == NULL) { |
| 3690 | kfree(sglq_entry); | 3760 | kfree(sglq_entry); |
| 3691 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3761 | lpfc_printf_log(phba, KERN_ERR, |
| 3762 | LOG_TRACE_EVENT, | ||
| 3692 | "2563 Failure to allocate an " | 3763 | "2563 Failure to allocate an " |
| 3693 | "ELS mbuf:%d\n", i); | 3764 | "ELS mbuf:%d\n", i); |
| 3694 | rc = -ENOMEM; | 3765 | rc = -ENOMEM; |
| @@ -3743,7 +3814,8 @@ lpfc_sli4_els_sgl_update(struct lpfc_hba *phba) · 48 unmodified lines | |||
| 3743 | &phba->sli4_hba.lpfc_els_sgl_list, list) { | 3814 | &phba->sli4_hba.lpfc_els_sgl_list, list) { |
| 3744 | lxri = lpfc_sli4_next_xritag(phba); | 3815 | lxri = lpfc_sli4_next_xritag(phba); |
| 3745 | if (lxri == NO_XRI) { | 3816 | if (lxri == NO_XRI) { |
| 3746 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3817 | lpfc_printf_log(phba, KERN_ERR, |
| 3818 | LOG_TRACE_EVENT, | ||
| 3747 | "2400 Failed to allocate xri for " | 3819 | "2400 Failed to allocate xri for " |
| 3748 | "ELS sgl\n"); | 3820 | "ELS sgl\n"); |
| 3749 | rc = -ENOMEM; | 3821 | rc = -ENOMEM; |
| @@ -3798,7 +3870,8 @@ lpfc_sli4_nvmet_sgl_update(struct lpfc_hba *phba) · 48 unmodified lines | |||
| 3798 | sglq_entry = kzalloc(sizeof(struct lpfc_sglq), | 3870 | sglq_entry = kzalloc(sizeof(struct lpfc_sglq), |
| 3799 | GFP_KERNEL); | 3871 | GFP_KERNEL); |
| 3800 | if (sglq_entry == NULL) { | 3872 | if (sglq_entry == NULL) { |
| 3801 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3873 | lpfc_printf_log(phba, KERN_ERR, |
| 3874 | LOG_TRACE_EVENT, | ||
| 3802 | "6303 Failure to allocate an " | 3875 | "6303 Failure to allocate an " |
| 3803 | "NVMET sgl entry:%d\n", i); | 3876 | "NVMET sgl entry:%d\n", i); |
| 3804 | rc = -ENOMEM; | 3877 | rc = -ENOMEM; |
| @@ -3809,7 +3882,8 @@ lpfc_sli4_nvmet_sgl_update(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 3809 | &sglq_entry->phys); | 3882 | &sglq_entry->phys); |
| 3810 | if (sglq_entry->virt == NULL) { | 3883 | if (sglq_entry->virt == NULL) { |
| 3811 | kfree(sglq_entry); | 3884 | kfree(sglq_entry); |
| 3812 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3885 | lpfc_printf_log(phba, KERN_ERR, |
| 3886 | LOG_TRACE_EVENT, | ||
| 3813 | "6304 Failure to allocate an " | 3887 | "6304 Failure to allocate an " |
| 3814 | "NVMET buf:%d\n", i); | 3888 | "NVMET buf:%d\n", i); |
| 3815 | rc = -ENOMEM; | 3889 | rc = -ENOMEM; |
| @@ -3865,7 +3939,8 @@ lpfc_sli4_nvmet_sgl_update(struct lpfc_hba *phba) · 49 unmodified lines | |||
| 3865 | &phba->sli4_hba.lpfc_nvmet_sgl_list, list) { | 3939 | &phba->sli4_hba.lpfc_nvmet_sgl_list, list) { |
| 3866 | lxri = lpfc_sli4_next_xritag(phba); | 3940 | lxri = lpfc_sli4_next_xritag(phba); |
| 3867 | if (lxri == NO_XRI) { | 3941 | if (lxri == NO_XRI) { |
| 3868 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3942 | lpfc_printf_log(phba, KERN_ERR, |
| 3943 | LOG_TRACE_EVENT, | ||
| 3869 | "6307 Failed to allocate xri for " | 3944 | "6307 Failed to allocate xri for " |
| 3870 | "NVMET sgl\n"); | 3945 | "NVMET sgl\n"); |
| 3871 | rc = -ENOMEM; | 3946 | rc = -ENOMEM; |
| @@ -4039,7 +4114,8 @@ lpfc_sli4_io_sgl_update(struct lpfc_hba *phba) · 167 unmodified lines | |||
| 4039 | &io_sgl_list, list) { | 4114 | &io_sgl_list, list) { |
| 4040 | lxri = lpfc_sli4_next_xritag(phba); | 4115 | lxri = lpfc_sli4_next_xritag(phba); |
| 4041 | if (lxri == NO_XRI) { | 4116 | if (lxri == NO_XRI) { |
| 4042 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 4117 | lpfc_printf_log(phba, KERN_ERR, |
| 4118 | LOG_TRACE_EVENT, | ||
| 4043 | "6075 Failed to allocate xri for " | 4119 | "6075 Failed to allocate xri for " |
| 4044 | "nvme buffer\n"); | 4120 | "nvme buffer\n"); |
| 4045 | rc = -ENOMEM; | 4121 | rc = -ENOMEM; |
| @@ -4058,8 +4134,8 @@ out_free_mem: · 12 unmodified lines | |||
| 4058 | 4134 | ||
| 4059 | /** | 4135 | /** |
| 4060 | * lpfc_new_io_buf - IO buffer allocator for HBA with SLI4 IF spec | 4136 | * lpfc_new_io_buf - IO buffer allocator for HBA with SLI4 IF spec |
| 4061 | * @vport: The virtual port for which this call being executed. | 4137 | * @phba: Pointer to lpfc hba data structure. |
| 4062 | * @num_to_allocate: The requested number of buffers to allocate. | 4138 | * @num_to_alloc: The requested number of buffers to allocate. |
| 4063 | * | 4139 | * |
| 4064 | * This routine allocates nvme buffers for device with SLI-4 interface spec, | 4140 | * This routine allocates nvme buffers for device with SLI-4 interface spec, |
| 4065 | * the nvme buffer contains all the necessary information needed to initiate | 4141 | * the nvme buffer contains all the necessary information needed to initiate |
| @@ -4109,7 +4185,8 @@ lpfc_new_io_buf(struct lpfc_hba *phba, int num_to_alloc) · 43 unmodified lines | |||
| 4109 | if ((phba->sli3_options & LPFC_SLI3_BG_ENABLED) && | 4185 | if ((phba->sli3_options & LPFC_SLI3_BG_ENABLED) && |
| 4110 | (((unsigned long)(lpfc_ncmd->data) & | 4186 | (((unsigned long)(lpfc_ncmd->data) & |
| 4111 | (unsigned long)(SLI4_PAGE_SIZE - 1)) != 0)) { | 4187 | (unsigned long)(SLI4_PAGE_SIZE - 1)) != 0)) { |
| 4112 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 4188 | lpfc_printf_log(phba, KERN_ERR, |
| 4189 | LOG_TRACE_EVENT, | ||
| 4113 | "3369 Memory alignment err: " | 4190 | "3369 Memory alignment err: " |
| 4114 | "addr=%lx\n", | 4191 | "addr=%lx\n", |
| 4115 | (unsigned long)lpfc_ncmd->data); | 4192 | (unsigned long)lpfc_ncmd->data); |
| @@ -4138,7 +4215,7 @@ lpfc_new_io_buf(struct lpfc_hba *phba, int num_to_alloc) · 22 unmodified lines | |||
| 4138 | dma_pool_free(phba->lpfc_sg_dma_buf_pool, | 4215 | dma_pool_free(phba->lpfc_sg_dma_buf_pool, |
| 4139 | lpfc_ncmd->data, lpfc_ncmd->dma_handle); | 4216 | lpfc_ncmd->data, lpfc_ncmd->dma_handle); |
| 4140 | kfree(lpfc_ncmd); | 4217 | kfree(lpfc_ncmd); |
| 4141 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 4218 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4142 | "6121 Failed to allocate IOTAG for" | 4219 | "6121 Failed to allocate IOTAG for" |
| 4143 | " XRI:0x%x\n", lxri); | 4220 | " XRI:0x%x\n", lxri); |
| 4144 | lpfc_sli4_free_xri(phba, lxri); | 4221 | lpfc_sli4_free_xri(phba, lxri); |
| @@ -4189,7 +4266,7 @@ lpfc_get_wwpn(struct lpfc_hba *phba) · 44 unmodified lines | |||
| 4189 | lpfc_read_nv(phba, mboxq); | 4266 | lpfc_read_nv(phba, mboxq); |
| 4190 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); | 4267 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); |
| 4191 | if (rc != MBX_SUCCESS) { | 4268 | if (rc != MBX_SUCCESS) { |
| 4192 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 4269 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4193 | "6019 Mailbox failed , mbxCmd x%x " | 4270 | "6019 Mailbox failed , mbxCmd x%x " |
| 4194 | "READ_NV, mbxStatus x%x\n", | 4271 | "READ_NV, mbxStatus x%x\n", |
| 4195 | bf_get(lpfc_mqe_command, &mboxq->u.mqe), | 4272 | bf_get(lpfc_mqe_command, &mboxq->u.mqe), |
| @@ -4249,7 +4326,8 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev) · 53 unmodified lines | |||
| 4249 | 4326 | ||
| 4250 | for (i = 0; i < lpfc_no_hba_reset_cnt; i++) { | 4327 | for (i = 0; i < lpfc_no_hba_reset_cnt; i++) { |
| 4251 | if (wwn == lpfc_no_hba_reset[i]) { | 4328 | if (wwn == lpfc_no_hba_reset[i]) { |
| 4252 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 4329 | lpfc_printf_log(phba, KERN_ERR, |
| 4330 | LOG_TRACE_EVENT, | ||
| 4253 | "6020 Setting use_no_reset port=%llx\n", | 4331 | "6020 Setting use_no_reset port=%llx\n", |
| 4254 | wwn); | 4332 | wwn); |
| 4255 | use_no_reset_hba = true; | 4333 | use_no_reset_hba = true; |
| @@ -4646,7 +4724,7 @@ lpfc_fcf_redisc_wait_start_timer(struct lpfc_hba *phba) · 390 unmodified lines | |||
| 4646 | 4724 | ||
| 4647 | /** | 4725 | /** |
| 4648 | * lpfc_sli4_fcf_redisc_wait_tmo - FCF table rediscover wait timeout | 4726 | * lpfc_sli4_fcf_redisc_wait_tmo - FCF table rediscover wait timeout |
| 4649 | * @ptr: Map to lpfc_hba data structure pointer. | 4727 | * @t: Timer context used to obtain the pointer to lpfc hba data structure. |
| 4650 | * | 4728 | * |
| 4651 | * This routine is invoked when waiting for FCF table rediscover has been | 4729 | * This routine is invoked when waiting for FCF table rediscover has been |
| 4652 | * timed out. If new FCF record(s) has (have) been discovered during the | 4730 | * timed out. If new FCF record(s) has (have) been discovered during the |
| @@ -4694,7 +4772,7 @@ lpfc_sli4_parse_latt_fault(struct lpfc_hba *phba, · 41 unmodified lines | |||
| 4694 | case LPFC_ASYNC_LINK_FAULT_LR_LRR: | 4772 | case LPFC_ASYNC_LINK_FAULT_LR_LRR: |
| 4695 | break; | 4773 | break; |
| 4696 | default: | 4774 | default: |
| 4697 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 4775 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4698 | "0398 Unknown link fault code: x%x\n", | 4776 | "0398 Unknown link fault code: x%x\n", |
| 4699 | bf_get(lpfc_acqe_link_fault, acqe_link)); | 4777 | bf_get(lpfc_acqe_link_fault, acqe_link)); |
| 4700 | break; | 4778 | break; |
| @@ -4730,7 +4808,7 @@ lpfc_sli4_parse_latt_type(struct lpfc_hba *phba, · 29 unmodified lines | |||
| 4730 | att_type = LPFC_ATT_LINK_UP; | 4808 | att_type = LPFC_ATT_LINK_UP; |
| 4731 | break; | 4809 | break; |
| 4732 | default: | 4810 | default: |
| 4733 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 4811 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4734 | "0399 Invalid link attention type: x%x\n", | 4812 | "0399 Invalid link attention type: x%x\n", |
| 4735 | bf_get(lpfc_acqe_link_status, acqe_link)); | 4813 | bf_get(lpfc_acqe_link_status, acqe_link)); |
| 4736 | att_type = LPFC_ATT_RESERVED; | 4814 | att_type = LPFC_ATT_RESERVED; |
| @@ -4902,19 +4980,19 @@ lpfc_sli4_async_link_evt(struct lpfc_hba *phba, · 165 unmodified lines | |||
| 4902 | phba->fcoe_eventtag = acqe_link->event_tag; | 4980 | phba->fcoe_eventtag = acqe_link->event_tag; |
| 4903 | pmb = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 4981 | pmb = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 4904 | if (!pmb) { | 4982 | if (!pmb) { |
| 4905 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 4983 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4906 | "0395 The mboxq allocation failed\n"); | 4984 | "0395 The mboxq allocation failed\n"); |
| 4907 | return; | 4985 | return; |
| 4908 | } | 4986 | } |
| 4909 | mp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); | 4987 | mp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); |
| 4910 | if (!mp) { | 4988 | if (!mp) { |
| 4911 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 4989 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4912 | "0396 The lpfc_dmabuf allocation failed\n"); | 4990 | "0396 The lpfc_dmabuf allocation failed\n"); |
| 4913 | goto out_free_pmb; | 4991 | goto out_free_pmb; |
| 4914 | } | 4992 | } |
| 4915 | mp->virt = lpfc_mbuf_alloc(phba, 0, &mp->phys); | 4993 | mp->virt = lpfc_mbuf_alloc(phba, 0, &mp->phys); |
| 4916 | if (!mp->virt) { | 4994 | if (!mp->virt) { |
| 4917 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 4995 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4918 | "0397 The mbuf allocation failed\n"); | 4996 | "0397 The mbuf allocation failed\n"); |
| 4919 | goto out_free_dmabuf; | 4997 | goto out_free_dmabuf; |
| 4920 | } | 4998 | } |
| @@ -5013,7 +5091,6 @@ out_free_pmb: · 92 unmodified lines | |||
| 5013 | * lpfc_async_link_speed_to_read_top - Parse async evt link speed code to read | 5091 | * lpfc_async_link_speed_to_read_top - Parse async evt link speed code to read |
| 5014 | * topology. | 5092 | * topology. |
| 5015 | * @phba: pointer to lpfc hba data structure. | 5093 | * @phba: pointer to lpfc hba data structure. |
| 5016 | * @evt_code: asynchronous event code. | ||
| 5017 | * @speed_code: asynchronous event link speed code. | 5094 | * @speed_code: asynchronous event link speed code. |
| 5018 | * | 5095 | * |
| 5019 | * This routine is to parse the giving SLI4 async event link speed code into | 5096 | * This routine is to parse the giving SLI4 async event link speed code into |
| @@ -5115,7 +5192,7 @@ lpfc_update_trunk_link_status(struct lpfc_hba *phba, · 95 unmodified lines | |||
| 5115 | phba->trunk_link.link3.fault = port_fault & 0x8 ? err : 0; | 5192 | phba->trunk_link.link3.fault = port_fault & 0x8 ? err : 0; |
| 5116 | } | 5193 | } |
| 5117 | 5194 | ||
| 5118 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5195 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5119 | "2910 Async FC Trunking Event - Speed:%d\n" | 5196 | "2910 Async FC Trunking Event - Speed:%d\n" |
| 5120 | "\tLogical speed:%d " | 5197 | "\tLogical speed:%d " |
| 5121 | "port0: %s port1: %s port2: %s port3: %s\n", | 5198 | "port0: %s port1: %s port2: %s port3: %s\n", |
| @@ -5125,7 +5202,7 @@ lpfc_update_trunk_link_status(struct lpfc_hba *phba, · 3 unmodified lines | |||
| 5125 | trunk_link_status(2), trunk_link_status(3)); | 5202 | trunk_link_status(2), trunk_link_status(3)); |
| 5126 | 5203 | ||
| 5127 | if (port_fault) | 5204 | if (port_fault) |
| 5128 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5205 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5129 | "3202 trunk error:0x%x (%s) seen on port0:%s " | 5206 | "3202 trunk error:0x%x (%s) seen on port0:%s " |
| 5130 | /* | 5207 | /* |
| 5131 | * SLI-4: We have only 0xA error codes | 5208 | * SLI-4: We have only 0xA error codes |
| @@ -5159,7 +5236,7 @@ lpfc_sli4_async_fc_evt(struct lpfc_hba *phba, struct lpfc_acqe_fc_la *acqe_fc) · 27 unmodified lines | |||
| 5159 | 5236 | ||
| 5160 | if (bf_get(lpfc_trailer_type, acqe_fc) != | 5237 | if (bf_get(lpfc_trailer_type, acqe_fc) != |
| 5161 | LPFC_FC_LA_EVENT_TYPE_FC_LINK) { | 5238 | LPFC_FC_LA_EVENT_TYPE_FC_LINK) { |
| 5162 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5239 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5163 | "2895 Non FC link Event detected.(%d)\n", | 5240 | "2895 Non FC link Event detected.(%d)\n", |
| 5164 | bf_get(lpfc_trailer_type, acqe_fc)); | 5241 | bf_get(lpfc_trailer_type, acqe_fc)); |
| 5165 | return; | 5242 | return; |
| @@ -5207,19 +5284,19 @@ lpfc_sli4_async_fc_evt(struct lpfc_hba *phba, struct lpfc_acqe_fc_la *acqe_fc) · 41 unmodified lines | |||
| 5207 | phba->sli4_hba.link_state.fault); | 5284 | phba->sli4_hba.link_state.fault); |
| 5208 | pmb = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 5285 | pmb = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 5209 | if (!pmb) { | 5286 | if (!pmb) { |
| 5210 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5287 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5211 | "2897 The mboxq allocation failed\n"); | 5288 | "2897 The mboxq allocation failed\n"); |
| 5212 | return; | 5289 | return; |
| 5213 | } | 5290 | } |
| 5214 | mp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); | 5291 | mp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); |
| 5215 | if (!mp) { | 5292 | if (!mp) { |
| 5216 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5293 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5217 | "2898 The lpfc_dmabuf allocation failed\n"); | 5294 | "2898 The lpfc_dmabuf allocation failed\n"); |
| 5218 | goto out_free_pmb; | 5295 | goto out_free_pmb; |
| 5219 | } | 5296 | } |
| 5220 | mp->virt = lpfc_mbuf_alloc(phba, 0, &mp->phys); | 5297 | mp->virt = lpfc_mbuf_alloc(phba, 0, &mp->phys); |
| 5221 | if (!mp->virt) { | 5298 | if (!mp->virt) { |
| 5222 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5299 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5223 | "2899 The mbuf allocation failed\n"); | 5300 | "2899 The mbuf allocation failed\n"); |
| 5224 | goto out_free_dmabuf; | 5301 | goto out_free_dmabuf; |
| 5225 | } | 5302 | } |
| @@ -5291,7 +5368,7 @@ out_free_pmb: · 65 unmodified lines | |||
| 5291 | /** | 5368 | /** |
| 5292 | * lpfc_sli4_async_sli_evt - Process the asynchronous SLI link event | 5369 | * lpfc_sli4_async_sli_evt - Process the asynchronous SLI link event |
| 5293 | * @phba: pointer to lpfc hba data structure. | 5370 | * @phba: pointer to lpfc hba data structure. |
| 5294 | * @acqe_fc: pointer to the async SLI completion queue entry. | 5371 | * @acqe_sli: pointer to the async SLI completion queue entry. |
| 5295 | * | 5372 | * |
| 5296 | * This routine is to handle the SLI4 asynchronous SLI events. | 5373 | * This routine is to handle the SLI4 asynchronous SLI events. |
| 5297 | **/ | 5374 | **/ |
| @@ -5386,7 +5463,7 @@ lpfc_sli4_async_sli_evt(struct lpfc_hba *phba, struct lpfc_acqe_sli *acqe_sli) · 88 unmodified lines | |||
| 5386 | &misconfigured->theEvent); | 5463 | &misconfigured->theEvent); |
| 5387 | break; | 5464 | break; |
| 5388 | default: | 5465 | default: |
| 5389 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5466 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5390 | "3296 " | 5467 | "3296 " |
| 5391 | "LPFC_SLI_EVENT_TYPE_MISCONFIGURED " | 5468 | "LPFC_SLI_EVENT_TYPE_MISCONFIGURED " |
| 5392 | "event: Invalid link %d", | 5469 | "event: Invalid link %d", |
| @@ -5438,7 +5515,8 @@ lpfc_sli4_async_sli_evt(struct lpfc_hba *phba, struct lpfc_acqe_sli *acqe_sli) · 45 unmodified lines | |||
| 5438 | rc = lpfc_sli4_read_config(phba); | 5515 | rc = lpfc_sli4_read_config(phba); |
| 5439 | if (rc) { | 5516 | if (rc) { |
| 5440 | phba->lmt = 0; | 5517 | phba->lmt = 0; |
| 5441 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5518 | lpfc_printf_log(phba, KERN_ERR, |
| 5519 | LOG_TRACE_EVENT, | ||
| 5442 | "3194 Unable to retrieve supported " | 5520 | "3194 Unable to retrieve supported " |
| 5443 | "speeds, rc = 0x%x\n", rc); | 5521 | "speeds, rc = 0x%x\n", rc); |
| 5444 | } | 5522 | } |
| @@ -5546,7 +5624,7 @@ lpfc_sli4_perform_vport_cvl(struct lpfc_vport *vport) · 101 unmodified lines | |||
| 5546 | 5624 | ||
| 5547 | /** | 5625 | /** |
| 5548 | * lpfc_sli4_perform_all_vport_cvl - Perform clear virtual link on all vports | 5626 | * lpfc_sli4_perform_all_vport_cvl - Perform clear virtual link on all vports |
| 5549 | * @vport: pointer to lpfc hba data structure. | 5627 | * @phba: pointer to lpfc hba data structure. |
| 5550 | * | 5628 | * |
| 5551 | * This routine is to perform Clear Virtual Link (CVL) on all vports in | 5629 | * This routine is to perform Clear Virtual Link (CVL) on all vports in |
| 5552 | * response to a FCF dead event. | 5630 | * response to a FCF dead event. |
| @@ -5567,7 +5645,7 @@ lpfc_sli4_perform_all_vport_cvl(struct lpfc_hba *phba) · 14 unmodified lines | |||
| 5567 | /** | 5645 | /** |
| 5568 | * lpfc_sli4_async_fip_evt - Process the asynchronous FCoE FIP event | 5646 | * lpfc_sli4_async_fip_evt - Process the asynchronous FCoE FIP event |
| 5569 | * @phba: pointer to lpfc hba data structure. | 5647 | * @phba: pointer to lpfc hba data structure. |
| 5570 | * @acqe_link: pointer to the async fcoe completion queue entry. | 5648 | * @acqe_fip: pointer to the async fcoe completion queue entry. |
| 5571 | * | 5649 | * |
| 5572 | * This routine is to handle the SLI4 asynchronous fcoe event. | 5650 | * This routine is to handle the SLI4 asynchronous fcoe event. |
| 5573 | **/ | 5651 | **/ |
| @@ -5590,8 +5668,7 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, · 16 unmodified lines | |||
| 5590 | case LPFC_FIP_EVENT_TYPE_NEW_FCF: | 5668 | case LPFC_FIP_EVENT_TYPE_NEW_FCF: |
| 5591 | case LPFC_FIP_EVENT_TYPE_FCF_PARAM_MOD: | 5669 | case LPFC_FIP_EVENT_TYPE_FCF_PARAM_MOD: |
| 5592 | if (event_type == LPFC_FIP_EVENT_TYPE_NEW_FCF) | 5670 | if (event_type == LPFC_FIP_EVENT_TYPE_NEW_FCF) |
| 5593 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | | 5671 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5594 | LOG_DISCOVERY, | ||
| 5595 | "2546 New FCF event, evt_tag:x%x, " | 5672 | "2546 New FCF event, evt_tag:x%x, " |
| 5596 | "index:x%x\n", | 5673 | "index:x%x\n", |
| 5597 | acqe_fip->event_tag, | 5674 | acqe_fip->event_tag, |
| @@ -5644,23 +5721,24 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, · 46 unmodified lines | |||
| 5644 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, | 5721 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, |
| 5645 | LPFC_FCOE_FCF_GET_FIRST); | 5722 | LPFC_FCOE_FCF_GET_FIRST); |
| 5646 | if (rc) | 5723 | if (rc) |
| 5647 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY, | 5724 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5648 | "2547 Issue FCF scan read FCF mailbox " | 5725 | "2547 Issue FCF scan read FCF mailbox " |
| 5649 | "command failed (x%x)\n", rc); | 5726 | "command failed (x%x)\n", rc); |
| 5650 | break; | 5727 | break; |
| 5651 | 5728 | ||
| 5652 | case LPFC_FIP_EVENT_TYPE_FCF_TABLE_FULL: | 5729 | case LPFC_FIP_EVENT_TYPE_FCF_TABLE_FULL: |
| 5653 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5730 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5654 | "2548 FCF Table full count 0x%x tag 0x%x\n", | 5731 | "2548 FCF Table full count 0x%x tag 0x%x\n", |
| 5655 | bf_get(lpfc_acqe_fip_fcf_count, acqe_fip), | 5732 | bf_get(lpfc_acqe_fip_fcf_count, acqe_fip), |
| 5656 | acqe_fip->event_tag); | 5733 | acqe_fip->event_tag); |
| 5657 | break; | 5734 | break; |
| 5658 | 5735 | ||
| 5659 | case LPFC_FIP_EVENT_TYPE_FCF_DEAD: | 5736 | case LPFC_FIP_EVENT_TYPE_FCF_DEAD: |
| 5660 | phba->fcoe_cvl_eventtag = acqe_fip->event_tag; | 5737 | phba->fcoe_cvl_eventtag = acqe_fip->event_tag; |
| 5661 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY, | 5738 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5662 | "2549 FCF (x%x) disconnected from network, " | 5739 | "2549 FCF (x%x) disconnected from network, " |
| 5663 | "tag:x%x\n", acqe_fip->index, acqe_fip->event_tag); | 5740 | "tag:x%x\n", acqe_fip->index, |
| 5741 | acqe_fip->event_tag); | ||
| 5664 | /* | 5742 | /* |
| 5665 | * If we are in the middle of FCF failover process, clear | 5743 | * If we are in the middle of FCF failover process, clear |
| 5666 | * the corresponding FCF bit in the roundrobin bitmap. | 5744 | * the corresponding FCF bit in the roundrobin bitmap. |
| @@ -5697,7 +5775,7 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, · 30 unmodified lines | |||
| 5697 | rc = lpfc_sli4_redisc_fcf_table(phba); | 5775 | rc = lpfc_sli4_redisc_fcf_table(phba); |
| 5698 | if (rc) { | 5776 | if (rc) { |
| 5699 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | | 5777 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | |
| 5700 | LOG_DISCOVERY, | 5778 | LOG_TRACE_EVENT, |
| 5701 | "2772 Issue FCF rediscover mailbox " | 5779 | "2772 Issue FCF rediscover mailbox " |
| 5702 | "command failed, fail through to FCF " | 5780 | "command failed, fail through to FCF " |
| 5703 | "dead event\n"); | 5781 | "dead event\n"); |
| @@ -5721,7 +5799,8 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, · 17 unmodified lines | |||
| 5721 | break; | 5799 | break; |
| 5722 | case LPFC_FIP_EVENT_TYPE_CVL: | 5800 | case LPFC_FIP_EVENT_TYPE_CVL: |
| 5723 | phba->fcoe_cvl_eventtag = acqe_fip->event_tag; | 5801 | phba->fcoe_cvl_eventtag = acqe_fip->event_tag; |
| 5724 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY, | 5802 | lpfc_printf_log(phba, KERN_ERR, |
| 5803 | LOG_TRACE_EVENT, | ||
| 5725 | "2718 Clear Virtual Link Received for VPI 0x%x" | 5804 | "2718 Clear Virtual Link Received for VPI 0x%x" |
| 5726 | " tag 0x%x\n", acqe_fip->index, acqe_fip->event_tag); | 5805 | " tag 0x%x\n", acqe_fip->index, acqe_fip->event_tag); |
| 5727 | 5806 | ||
| @@ -5788,7 +5867,7 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, · 60 unmodified lines | |||
| 5788 | rc = lpfc_sli4_redisc_fcf_table(phba); | 5867 | rc = lpfc_sli4_redisc_fcf_table(phba); |
| 5789 | if (rc) { | 5868 | if (rc) { |
| 5790 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | | 5869 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | |
| 5791 | LOG_DISCOVERY, | 5870 | LOG_TRACE_EVENT, |
| 5792 | "2774 Issue FCF rediscover " | 5871 | "2774 Issue FCF rediscover " |
| 5793 | "mailbox command failed, " | 5872 | "mailbox command failed, " |
| 5794 | "through to CVL event\n"); | 5873 | "through to CVL event\n"); |
| @@ -5809,9 +5888,9 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, · 14 unmodified lines | |||
| 5809 | } | 5888 | } |
| 5810 | break; | 5889 | break; |
| 5811 | default: | 5890 | default: |
| 5812 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5891 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5813 | "0288 Unknown FCoE event type 0x%x event tag " | 5892 | "0288 Unknown FCoE event type 0x%x event tag " |
| 5814 | "0x%x\n", event_type, acqe_fip->event_tag); | 5893 | "0x%x\n", event_type, acqe_fip->event_tag); |
| 5815 | break; | 5894 | break; |
| 5816 | } | 5895 | } |
| 5817 | } | 5896 | } |
| @@ -5819,7 +5898,7 @@ lpfc_sli4_async_fip_evt(struct lpfc_hba *phba, · 1 unmodified line | |||
| 5819 | /** | 5898 | /** |
| 5820 | * lpfc_sli4_async_dcbx_evt - Process the asynchronous dcbx event | 5899 | * lpfc_sli4_async_dcbx_evt - Process the asynchronous dcbx event |
| 5821 | * @phba: pointer to lpfc hba data structure. | 5900 | * @phba: pointer to lpfc hba data structure. |
| 5822 | * @acqe_link: pointer to the async dcbx completion queue entry. | 5901 | * @acqe_dcbx: pointer to the async dcbx completion queue entry. |
| 5823 | * | 5902 | * |
| 5824 | * This routine is to handle the SLI4 asynchronous dcbx event. | 5903 | * This routine is to handle the SLI4 asynchronous dcbx event. |
| 5825 | **/ | 5904 | **/ |
| @@ -5828,7 +5907,7 @@ lpfc_sli4_async_dcbx_evt(struct lpfc_hba *phba, · 2 unmodified lines | |||
| 5828 | struct lpfc_acqe_dcbx *acqe_dcbx) | 5907 | struct lpfc_acqe_dcbx *acqe_dcbx) |
| 5829 | { | 5908 | { |
| 5830 | phba->fc_eventTag = acqe_dcbx->event_tag; | 5909 | phba->fc_eventTag = acqe_dcbx->event_tag; |
| 5831 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5910 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5832 | "0290 The SLI4 DCBX asynchronous event is not " | 5911 | "0290 The SLI4 DCBX asynchronous event is not " |
| 5833 | "handled yet\n"); | 5912 | "handled yet\n"); |
| 5834 | } | 5913 | } |
| @@ -5836,7 +5915,7 @@ lpfc_sli4_async_dcbx_evt(struct lpfc_hba *phba, · 1 unmodified line | |||
| 5836 | /** | 5915 | /** |
| 5837 | * lpfc_sli4_async_grp5_evt - Process the asynchronous group5 event | 5916 | * lpfc_sli4_async_grp5_evt - Process the asynchronous group5 event |
| 5838 | * @phba: pointer to lpfc hba data structure. | 5917 | * @phba: pointer to lpfc hba data structure. |
| 5839 | * @acqe_link: pointer to the async grp5 completion queue entry. | 5918 | * @acqe_grp5: pointer to the async grp5 completion queue entry. |
| 5840 | * | 5919 | * |
| 5841 | * This routine is to handle the SLI4 asynchronous grp5 event. A grp5 event | 5920 | * This routine is to handle the SLI4 asynchronous grp5 event. A grp5 event |
| 5842 | * is an asynchronous notified of a logical link speed change. The Port | 5921 | * is an asynchronous notified of a logical link speed change. The Port |
| @@ -5905,7 +5984,8 @@ void lpfc_sli4_async_event_proc(struct lpfc_hba *phba) · 62 unmodified lines | |||
| 5905 | lpfc_sli4_async_sli_evt(phba, &cq_event->cqe.acqe_sli); | 5984 | lpfc_sli4_async_sli_evt(phba, &cq_event->cqe.acqe_sli); |
| 5906 | break; | 5985 | break; |
| 5907 | default: | 5986 | default: |
| 5908 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5987 | lpfc_printf_log(phba, KERN_ERR, |
| 5988 | LOG_TRACE_EVENT, | ||
| 5909 | "1804 Invalid asynchronous event code: " | 5989 | "1804 Invalid asynchronous event code: " |
| 5910 | "x%x\n", bf_get(lpfc_trailer_code, | 5990 | "x%x\n", bf_get(lpfc_trailer_code, |
| 5911 | &cq_event->cqe.mcqe_cmpl)); | 5991 | &cq_event->cqe.mcqe_cmpl)); |
| @@ -5941,7 +6021,7 @@ void lpfc_sli4_fcf_redisc_event_proc(struct lpfc_hba *phba) · 29 unmodified lines | |||
| 5941 | "2777 Start post-quiescent FCF table scan\n"); | 6021 | "2777 Start post-quiescent FCF table scan\n"); |
| 5942 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, LPFC_FCOE_FCF_GET_FIRST); | 6022 | rc = lpfc_sli4_fcf_scan_read_fcf_rec(phba, LPFC_FCOE_FCF_GET_FIRST); |
| 5943 | if (rc) | 6023 | if (rc) |
| 5944 | lpfc_printf_log(phba, KERN_ERR, LOG_FIP | LOG_DISCOVERY, | 6024 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5945 | "2747 Issue FCF scan read FCF mailbox " | 6025 | "2747 Issue FCF scan read FCF mailbox " |
| 5946 | "command failed 0x%x\n", rc); | 6026 | "command failed 0x%x\n", rc); |
| 5947 | } | 6027 | } |
| @@ -6012,7 +6092,7 @@ static void lpfc_log_intr_mode(struct lpfc_hba *phba, uint32_t intr_mode) · 64 unmodified lines | |||
| 6012 | "0480 Enabled MSI-X interrupt mode.\n"); | 6092 | "0480 Enabled MSI-X interrupt mode.\n"); |
| 6013 | break; | 6093 | break; |
| 6014 | default: | 6094 | default: |
| 6015 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6095 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6016 | "0482 Illegal interrupt mode.\n"); | 6096 | "0482 Illegal interrupt mode.\n"); |
| 6017 | break; | 6097 | break; |
| 6018 | } | 6098 | } |
| @@ -6060,7 +6140,7 @@ lpfc_enable_pci_dev(struct lpfc_hba *phba) · 41 unmodified lines | |||
| 6060 | out_disable_device: | 6140 | out_disable_device: |
| 6061 | pci_disable_device(pdev); | 6141 | pci_disable_device(pdev); |
| 6062 | out_error: | 6142 | out_error: |
| 6063 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6143 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6064 | "1401 Failed to enable pci device\n"); | 6144 | "1401 Failed to enable pci device\n"); |
| 6065 | return -ENODEV; | 6145 | return -ENODEV; |
| 6066 | } | 6146 | } |
| @@ -6161,7 +6241,7 @@ lpfc_sli_probe_sriov_nr_virtfn(struct lpfc_hba *phba, int nr_vfn) · 94 unmodified lines | |||
| 6161 | 6241 | ||
| 6162 | max_nr_vfn = lpfc_sli_sriov_nr_virtfn_get(phba); | 6242 | max_nr_vfn = lpfc_sli_sriov_nr_virtfn_get(phba); |
| 6163 | if (nr_vfn > max_nr_vfn) { | 6243 | if (nr_vfn > max_nr_vfn) { |
| 6164 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6244 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6165 | "3057 Requested vfs (%d) greater than " | 6245 | "3057 Requested vfs (%d) greater than " |
| 6166 | "supported vfs (%d)", nr_vfn, max_nr_vfn); | 6246 | "supported vfs (%d)", nr_vfn, max_nr_vfn); |
| 6167 | return -EINVAL; | 6247 | return -EINVAL; |
| @@ -6200,6 +6280,9 @@ lpfc_setup_driver_resource_phase1(struct lpfc_hba *phba) · 32 unmodified lines | |||
| 6200 | * Driver resources common to all SLI revisions | 6280 | * Driver resources common to all SLI revisions |
| 6201 | */ | 6281 | */ |
| 6202 | atomic_set(&phba->fast_event_count, 0); | 6282 | atomic_set(&phba->fast_event_count, 0); |
| 6283 | atomic_set(&phba->dbg_log_idx, 0); | ||
| 6284 | atomic_set(&phba->dbg_log_cnt, 0); | ||
| 6285 | atomic_set(&phba->dbg_log_dmping, 0); | ||
| 6203 | spin_lock_init(&phba->hbalock); | 6286 | spin_lock_init(&phba->hbalock); |
| 6204 | 6287 | ||
| 6205 | /* Initialize ndlp management spinlock */ | 6288 | /* Initialize ndlp management spinlock */ |
| @@ -6253,6 +6336,9 @@ lpfc_setup_driver_resource_phase1(struct lpfc_hba *phba) · 47 unmodified lines | |||
| 6253 | 6336 | ||
| 6254 | INIT_DELAYED_WORK(&phba->eq_delay_work, lpfc_hb_eq_delay_work); | 6337 | INIT_DELAYED_WORK(&phba->eq_delay_work, lpfc_hb_eq_delay_work); |
| 6255 | 6338 | ||
| 6339 | INIT_DELAYED_WORK(&phba->idle_stat_delay_work, | ||
| 6340 | lpfc_idle_stat_delay_work); | ||
| 6341 | |||
| 6256 | return 0; | 6342 | return 0; |
| 6257 | } | 6343 | } |
| 6258 | 6344 | ||
| @@ -6624,7 +6710,8 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 365 unmodified lines | |||
| 6624 | lpfc_read_nv(phba, mboxq); | 6710 | lpfc_read_nv(phba, mboxq); |
| 6625 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); | 6711 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); |
| 6626 | if (rc != MBX_SUCCESS) { | 6712 | if (rc != MBX_SUCCESS) { |
| 6627 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 6713 | lpfc_printf_log(phba, KERN_ERR, |
| 6714 | LOG_TRACE_EVENT, | ||
| 6628 | "6016 Mailbox failed , mbxCmd x%x " | 6715 | "6016 Mailbox failed , mbxCmd x%x " |
| 6629 | "READ_NV, mbxStatus x%x\n", | 6716 | "READ_NV, mbxStatus x%x\n", |
| 6630 | bf_get(lpfc_mqe_command, &mboxq->u.mqe), | 6717 | bf_get(lpfc_mqe_command, &mboxq->u.mqe), |
| @@ -6653,11 +6740,13 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 22 unmodified lines | |||
| 6653 | 6740 | ||
| 6654 | phba->nvmet_support = 1; /* a match */ | 6741 | phba->nvmet_support = 1; /* a match */ |
| 6655 | 6742 | ||
| 6656 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6743 | lpfc_printf_log(phba, KERN_ERR, |
| 6744 | LOG_TRACE_EVENT, | ||
| 6657 | "6017 NVME Target %016llx\n", | 6745 | "6017 NVME Target %016llx\n", |
| 6658 | wwn); | 6746 | wwn); |
| 6659 | #else | 6747 | #else |
| 6660 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6748 | lpfc_printf_log(phba, KERN_ERR, |
| 6749 | LOG_TRACE_EVENT, | ||
| 6661 | "6021 Can't enable NVME Target." | 6750 | "6021 Can't enable NVME Target." |
| 6662 | " NVME_TARGET_FC infrastructure" | 6751 | " NVME_TARGET_FC infrastructure" |
| 6663 | " is not in kernel\n"); | 6752 | " is not in kernel\n"); |
| @@ -6717,9 +6806,9 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 53 unmodified lines | |||
| 6717 | &phba->sli4_hba.sli_intf); | 6806 | &phba->sli4_hba.sli_intf); |
| 6718 | if (phba->sli4_hba.extents_in_use && | 6807 | if (phba->sli4_hba.extents_in_use && |
| 6719 | phba->sli4_hba.rpi_hdrs_in_use) { | 6808 | phba->sli4_hba.rpi_hdrs_in_use) { |
| 6720 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6809 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6721 | "2999 Unsupported SLI4 Parameters " | 6810 | "2999 Unsupported SLI4 Parameters " |
| 6722 | "Extents and RPI headers enabled.\n"); | 6811 | "Extents and RPI headers enabled.\n"); |
| 6723 | if (if_type == LPFC_SLI_INTF_IF_TYPE_0 && | 6812 | if (if_type == LPFC_SLI_INTF_IF_TYPE_0 && |
| 6724 | if_fam == LPFC_SLI_INTF_FAMILY_BE2) { | 6813 | if_fam == LPFC_SLI_INTF_FAMILY_BE2) { |
| 6725 | mempool_free(mboxq, phba->mbox_mem_pool); | 6814 | mempool_free(mboxq, phba->mbox_mem_pool); |
| @@ -6879,13 +6968,13 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 153 unmodified lines | |||
| 6879 | /* Allocate and initialize active sgl array */ | 6968 | /* Allocate and initialize active sgl array */ |
| 6880 | rc = lpfc_init_active_sgl_array(phba); | 6969 | rc = lpfc_init_active_sgl_array(phba); |
| 6881 | if (rc) { | 6970 | if (rc) { |
| 6882 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6971 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6883 | "1430 Failed to initialize sgl list.\n"); | 6972 | "1430 Failed to initialize sgl list.\n"); |
| 6884 | goto out_destroy_cq_event_pool; | 6973 | goto out_destroy_cq_event_pool; |
| 6885 | } | 6974 | } |
| 6886 | rc = lpfc_sli4_init_rpi_hdrs(phba); | 6975 | rc = lpfc_sli4_init_rpi_hdrs(phba); |
| 6887 | if (rc) { | 6976 | if (rc) { |
| 6888 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6977 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6889 | "1432 Failed to initialize rpi headers.\n"); | 6978 | "1432 Failed to initialize rpi headers.\n"); |
| 6890 | goto out_free_active_sgl; | 6979 | goto out_free_active_sgl; |
| 6891 | } | 6980 | } |
| @@ -6895,7 +6984,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 3 unmodified lines | |||
| 6895 | phba->fcf.fcf_rr_bmask = kcalloc(longs, sizeof(unsigned long), | 6984 | phba->fcf.fcf_rr_bmask = kcalloc(longs, sizeof(unsigned long), |
| 6896 | GFP_KERNEL); | 6985 | GFP_KERNEL); |
| 6897 | if (!phba->fcf.fcf_rr_bmask) { | 6986 | if (!phba->fcf.fcf_rr_bmask) { |
| 6898 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6987 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6899 | "2759 Failed allocate memory for FCF round " | 6988 | "2759 Failed allocate memory for FCF round " |
| 6900 | "robin failover bmask\n"); | 6989 | "robin failover bmask\n"); |
| 6901 | rc = -ENOMEM; | 6990 | rc = -ENOMEM; |
| @@ -6906,7 +6995,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 6906 | sizeof(struct lpfc_hba_eq_hdl), | 6995 | sizeof(struct lpfc_hba_eq_hdl), |
| 6907 | GFP_KERNEL); | 6996 | GFP_KERNEL); |
| 6908 | if (!phba->sli4_hba.hba_eq_hdl) { | 6997 | if (!phba->sli4_hba.hba_eq_hdl) { |
| 6909 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6998 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6910 | "2572 Failed allocate memory for " | 6999 | "2572 Failed allocate memory for " |
| 6911 | "fast-path per-EQ handle array\n"); | 7000 | "fast-path per-EQ handle array\n"); |
| 6912 | rc = -ENOMEM; | 7001 | rc = -ENOMEM; |
| @@ -6917,7 +7006,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 6917 | sizeof(struct lpfc_vector_map_info), | 7006 | sizeof(struct lpfc_vector_map_info), |
| 6918 | GFP_KERNEL); | 7007 | GFP_KERNEL); |
| 6919 | if (!phba->sli4_hba.cpu_map) { | 7008 | if (!phba->sli4_hba.cpu_map) { |
| 6920 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7009 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6921 | "3327 Failed allocate memory for msi-x " | 7010 | "3327 Failed allocate memory for msi-x " |
| 6922 | "interrupt vector mapping\n"); | 7011 | "interrupt vector mapping\n"); |
| 6923 | rc = -ENOMEM; | 7012 | rc = -ENOMEM; |
| @@ -6926,19 +7015,29 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 2 unmodified lines | |||
| 6926 | 7015 | ||
| 6927 | phba->sli4_hba.eq_info = alloc_percpu(struct lpfc_eq_intr_info); | 7016 | phba->sli4_hba.eq_info = alloc_percpu(struct lpfc_eq_intr_info); |
| 6928 | if (!phba->sli4_hba.eq_info) { | 7017 | if (!phba->sli4_hba.eq_info) { |
| 6929 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7018 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6930 | "3321 Failed allocation for per_cpu stats\n"); | 7019 | "3321 Failed allocation for per_cpu stats\n"); |
| 6931 | rc = -ENOMEM; | 7020 | rc = -ENOMEM; |
| 6932 | goto out_free_hba_cpu_map; | 7021 | goto out_free_hba_cpu_map; |
| 6933 | } | 7022 | } |
| 6934 | 7023 | ||
| 7024 | phba->sli4_hba.idle_stat = kcalloc(phba->sli4_hba.num_possible_cpu, | ||
| 7025 | sizeof(*phba->sli4_hba.idle_stat), | ||
| 7026 | GFP_KERNEL); | ||
| 7027 | if (!phba->sli4_hba.idle_stat) { | ||
| 7028 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, | ||
| 7029 | "3390 Failed allocation for idle_stat\n"); | ||
| 7030 | rc = -ENOMEM; | ||
| 7031 | goto out_free_hba_eq_info; | ||
| 7032 | } | ||
| 7033 | |||
| 6935 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS | 7034 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS |
| 6936 | phba->sli4_hba.c_stat = alloc_percpu(struct lpfc_hdwq_stat); | 7035 | phba->sli4_hba.c_stat = alloc_percpu(struct lpfc_hdwq_stat); |
| 6937 | if (!phba->sli4_hba.c_stat) { | 7036 | if (!phba->sli4_hba.c_stat) { |
| 6938 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7037 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6939 | "3332 Failed allocating per cpu hdwq stats\n"); | 7038 | "3332 Failed allocating per cpu hdwq stats\n"); |
| 6940 | rc = -ENOMEM; | 7039 | rc = -ENOMEM; |
| 6941 | goto out_free_hba_eq_info; | 7040 | goto out_free_hba_idle_stat; |
| 6942 | } | 7041 | } |
| 6943 | #endif | 7042 | #endif |
| 6944 | 7043 | ||
| @@ -6962,9 +7061,11 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) · 17 unmodified lines | |||
| 6962 | return 0; | 7061 | return 0; |
| 6963 | 7062 | ||
| 6964 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS | 7063 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS |
| 7064 | out_free_hba_idle_stat: | ||
| 7065 | kfree(phba->sli4_hba.idle_stat); | ||
| 7066 | #endif | ||
| 6965 | out_free_hba_eq_info: | 7067 | out_free_hba_eq_info: |
| 6966 | free_percpu(phba->sli4_hba.eq_info); | 7068 | free_percpu(phba->sli4_hba.eq_info); |
| 6967 | #endif | ||
| 6968 | out_free_hba_cpu_map: | 7069 | out_free_hba_cpu_map: |
| 6969 | kfree(phba->sli4_hba.cpu_map); | 7070 | kfree(phba->sli4_hba.cpu_map); |
| 6970 | out_free_hba_eq_hdl: | 7071 | out_free_hba_eq_hdl: |
| @@ -7006,6 +7107,7 @@ lpfc_sli4_driver_resource_unset(struct lpfc_hba *phba) · 35 unmodified lines | |||
| 7006 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS | 7107 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS |
| 7007 | free_percpu(phba->sli4_hba.c_stat); | 7108 | free_percpu(phba->sli4_hba.c_stat); |
| 7008 | #endif | 7109 | #endif |
| 7110 | kfree(phba->sli4_hba.idle_stat); | ||
| 7009 | 7111 | ||
| 7010 | /* Free memory allocated for msi-x interrupt vector to CPU mapping */ | 7112 | /* Free memory allocated for msi-x interrupt vector to CPU mapping */ |
| 7011 | kfree(phba->sli4_hba.cpu_map); | 7113 | kfree(phba->sli4_hba.cpu_map); |
| @@ -7080,7 +7182,7 @@ lpfc_init_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp) · 68 unmodified lines | |||
| 7080 | phba->lpfc_stop_port = lpfc_stop_port_s4; | 7182 | phba->lpfc_stop_port = lpfc_stop_port_s4; |
| 7081 | break; | 7183 | break; |
| 7082 | default: | 7184 | default: |
| 7083 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7185 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7084 | "1431 Invalid HBA PCI-device group: 0x%x\n", | 7186 | "1431 Invalid HBA PCI-device group: 0x%x\n", |
| 7085 | dev_grp); | 7187 | dev_grp); |
| 7086 | return -ENODEV; | 7188 | return -ENODEV; |
| @@ -7164,6 +7266,7 @@ lpfc_free_iocb_list(struct lpfc_hba *phba) · 77 unmodified lines | |||
| 7164 | /** | 7266 | /** |
| 7165 | * lpfc_init_iocb_list - Allocate and initialize iocb list. | 7267 | * lpfc_init_iocb_list - Allocate and initialize iocb list. |
| 7166 | * @phba: pointer to lpfc hba data structure. | 7268 | * @phba: pointer to lpfc hba data structure. |
| 7269 | * @iocb_count: number of requested iocbs | ||
| 7167 | * | 7270 | * |
| 7168 | * This routine is invoked to allocate and initizlize the driver's IOCB | 7271 | * This routine is invoked to allocate and initizlize the driver's IOCB |
| 7169 | * list and set up the IOCB tag array accordingly. | 7272 | * list and set up the IOCB tag array accordingly. |
| @@ -7375,7 +7478,7 @@ lpfc_sli4_init_rpi_hdrs(struct lpfc_hba *phba) · 205 unmodified lines | |||
| 7375 | 7478 | ||
| 7376 | rpi_hdr = lpfc_sli4_create_rpi_hdr(phba); | 7479 | rpi_hdr = lpfc_sli4_create_rpi_hdr(phba); |
| 7377 | if (!rpi_hdr) { | 7480 | if (!rpi_hdr) { |
| 7378 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7481 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7379 | "0391 Error during rpi post operation\n"); | 7482 | "0391 Error during rpi post operation\n"); |
| 7380 | lpfc_sli4_remove_rpis(phba); | 7483 | lpfc_sli4_remove_rpis(phba); |
| 7381 | rc = -ENODEV; | 7484 | rc = -ENODEV; |
| @@ -7687,7 +7790,7 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) · 305 unmodified lines | |||
| 7687 | if (phba->cfg_prot_mask && phba->cfg_prot_guard) { | 7790 | if (phba->cfg_prot_mask && phba->cfg_prot_guard) { |
| 7688 | if ((old_mask != phba->cfg_prot_mask) || | 7791 | if ((old_mask != phba->cfg_prot_mask) || |
| 7689 | (old_guard != phba->cfg_prot_guard)) | 7792 | (old_guard != phba->cfg_prot_guard)) |
| 7690 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7793 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7691 | "1475 Registering BlockGuard with the " | 7794 | "1475 Registering BlockGuard with the " |
| 7692 | "SCSI layer: mask %d guard %d\n", | 7795 | "SCSI layer: mask %d guard %d\n", |
| 7693 | phba->cfg_prot_mask, | 7796 | phba->cfg_prot_mask, |
| @@ -7696,7 +7799,7 @@ lpfc_setup_bg(struct lpfc_hba *phba, struct Scsi_Host *shost) · 2 unmodified lines | |||
| 7696 | scsi_host_set_prot(shost, phba->cfg_prot_mask); | 7799 | scsi_host_set_prot(shost, phba->cfg_prot_mask); |
| 7697 | scsi_host_set_guard(shost, phba->cfg_prot_guard); | 7800 | scsi_host_set_guard(shost, phba->cfg_prot_guard); |
| 7698 | } else | 7801 | } else |
| 7699 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7802 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7700 | "1479 Not Registering BlockGuard with the SCSI " | 7803 | "1479 Not Registering BlockGuard with the SCSI " |
| 7701 | "layer, Bad protection parameters: %d %d\n", | 7804 | "layer, Bad protection parameters: %d %d\n", |
| 7702 | old_mask, old_guard); | 7805 | old_mask, old_guard); |
| @@ -7927,7 +8030,7 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba) · 224 unmodified lines | |||
| 7927 | * other register reads as the data may not be valid. Just exit. | 8030 | * other register reads as the data may not be valid. Just exit. |
| 7928 | */ | 8031 | */ |
| 7929 | if (port_error) { | 8032 | if (port_error) { |
| 7930 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8033 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7931 | "1408 Port Failed POST - portsmphr=0x%x, " | 8034 | "1408 Port Failed POST - portsmphr=0x%x, " |
| 7932 | "perr=x%x, sfi=x%x, nip=x%x, ipc=x%x, scr1=x%x, " | 8035 | "perr=x%x, sfi=x%x, nip=x%x, ipc=x%x, scr1=x%x, " |
| 7933 | "scr2=x%x, hscratch=x%x, pstatus=x%x\n", | 8036 | "scr2=x%x, hscratch=x%x, pstatus=x%x\n", |
| @@ -7976,7 +8079,8 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba) · 42 unmodified lines | |||
| 7976 | readl(phba->sli4_hba.u.if_type0.UERRHIregaddr); | 8079 | readl(phba->sli4_hba.u.if_type0.UERRHIregaddr); |
| 7977 | if ((~phba->sli4_hba.ue_mask_lo & uerrlo_reg.word0) || | 8080 | if ((~phba->sli4_hba.ue_mask_lo & uerrlo_reg.word0) || |
| 7978 | (~phba->sli4_hba.ue_mask_hi & uerrhi_reg.word0)) { | 8081 | (~phba->sli4_hba.ue_mask_hi & uerrhi_reg.word0)) { |
| 7979 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8082 | lpfc_printf_log(phba, KERN_ERR, |
| 8083 | LOG_TRACE_EVENT, | ||
| 7980 | "1422 Unrecoverable Error " | 8084 | "1422 Unrecoverable Error " |
| 7981 | "Detected during POST " | 8085 | "Detected during POST " |
| 7982 | "uerr_lo_reg=0x%x, " | 8086 | "uerr_lo_reg=0x%x, " |
| @@ -8003,7 +8107,7 @@ lpfc_sli4_post_status_check(struct lpfc_hba *phba) · 20 unmodified lines | |||
| 8003 | phba->work_status[1] = | 8107 | phba->work_status[1] = |
| 8004 | readl(phba->sli4_hba.u.if_type2. | 8108 | readl(phba->sli4_hba.u.if_type2. |
| 8005 | ERR2regaddr); | 8109 | ERR2regaddr); |
| 8006 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8110 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8007 | "2888 Unrecoverable port error " | 8111 | "2888 Unrecoverable port error " |
| 8008 | "following POST: port status reg " | 8112 | "following POST: port status reg " |
| 8009 | "0x%x, port_smphr reg 0x%x, " | 8113 | "0x%x, port_smphr reg 0x%x, " |
| @@ -8116,6 +8220,7 @@ lpfc_sli4_bar0_register_memmap(struct lpfc_hba *phba, uint32_t if_type) · 106 unmodified lines | |||
| 8116 | /** | 8220 | /** |
| 8117 | * lpfc_sli4_bar1_register_memmap - Set up SLI4 BAR1 register memory map. | 8221 | * lpfc_sli4_bar1_register_memmap - Set up SLI4 BAR1 register memory map. |
| 8118 | * @phba: pointer to lpfc hba data structure. | 8222 | * @phba: pointer to lpfc hba data structure. |
| 8223 | * @if_type: sli if type to operate on. | ||
| 8119 | * | 8224 | * |
| 8120 | * This routine is invoked to set up SLI4 BAR1 register memory map. | 8225 | * This routine is invoked to set up SLI4 BAR1 register memory map. |
| 8121 | **/ | 8226 | **/ |
| @@ -8297,20 +8402,19 @@ static const char * const lpfc_topo_to_str[] = { · 175 unmodified lines | |||
| 8297 | "P2P then Loop", | 8402 | "P2P then Loop", |
| 8298 | }; | 8403 | }; |
| 8299 | 8404 | ||
| 8405 | #define LINK_FLAGS_DEF 0x0 | ||
| 8406 | #define LINK_FLAGS_P2P 0x1 | ||
| 8407 | #define LINK_FLAGS_LOOP 0x2 | ||
| 8300 | /** | 8408 | /** |
| 8301 | * lpfc_map_topology - Map the topology read from READ_CONFIG | 8409 | * lpfc_map_topology - Map the topology read from READ_CONFIG |
| 8302 | * @phba: pointer to lpfc hba data structure. | 8410 | * @phba: pointer to lpfc hba data structure. |
| 8303 | * @rdconf: pointer to read config data | 8411 | * @rd_config: pointer to read config data |
| 8304 | * | 8412 | * |
| 8305 | * This routine is invoked to map the topology values as read | 8413 | * This routine is invoked to map the topology values as read |
| 8306 | * from the read config mailbox command. If the persistent | 8414 | * from the read config mailbox command. If the persistent |
| 8307 | * topology feature is supported, the firmware will provide the | 8415 | * topology feature is supported, the firmware will provide the |
| 8308 | * saved topology information to be used in INIT_LINK | 8416 | * saved topology information to be used in INIT_LINK |
| 8309 | * | ||
| 8310 | **/ | 8417 | **/ |
| 8311 | #define LINK_FLAGS_DEF 0x0 | ||
| 8312 | #define LINK_FLAGS_P2P 0x1 | ||
| 8313 | #define LINK_FLAGS_LOOP 0x2 | ||
| 8314 | static void | 8418 | static void |
| 8315 | lpfc_map_topology(struct lpfc_hba *phba, struct lpfc_mbx_read_config *rd_config) | 8419 | lpfc_map_topology(struct lpfc_hba *phba, struct lpfc_mbx_read_config *rd_config) |
| 8316 | { | 8420 | { |
| @@ -8397,7 +8501,7 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) · 80 unmodified lines | |||
| 8397 | 8501 | ||
| 8398 | pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 8502 | pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 8399 | if (!pmb) { | 8503 | if (!pmb) { |
| 8400 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 8504 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8401 | "2011 Unable to allocate memory for issuing " | 8505 | "2011 Unable to allocate memory for issuing " |
| 8402 | "SLI_CONFIG_SPECIAL mailbox command\n"); | 8506 | "SLI_CONFIG_SPECIAL mailbox command\n"); |
| 8403 | return -ENOMEM; | 8507 | return -ENOMEM; |
| @@ -8407,11 +8511,11 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) · 3 unmodified lines | |||
| 8407 | 8511 | ||
| 8408 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 8512 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
| 8409 | if (rc != MBX_SUCCESS) { | 8513 | if (rc != MBX_SUCCESS) { |
| 8410 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 8514 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8411 | "2012 Mailbox failed , mbxCmd x%x " | 8515 | "2012 Mailbox failed , mbxCmd x%x " |
| 8412 | "READ_CONFIG, mbxStatus x%x\n", | 8516 | "READ_CONFIG, mbxStatus x%x\n", |
| 8413 | bf_get(lpfc_mqe_command, &pmb->u.mqe), | 8517 | bf_get(lpfc_mqe_command, &pmb->u.mqe), |
| 8414 | bf_get(lpfc_mqe_status, &pmb->u.mqe)); | 8518 | bf_get(lpfc_mqe_status, &pmb->u.mqe)); |
| 8415 | rc = -EIO; | 8519 | rc = -EIO; |
| 8416 | } else { | 8520 | } else { |
| 8417 | rd_config = &pmb->u.mqe.un.rd_config; | 8521 | rd_config = &pmb->u.mqe.un.rd_config; |
| @@ -8521,7 +8625,7 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) · 103 unmodified lines | |||
| 8521 | /* Check to see if there is enough for NVME */ | 8625 | /* Check to see if there is enough for NVME */ |
| 8522 | if ((phba->cfg_irq_chann > qmin) || | 8626 | if ((phba->cfg_irq_chann > qmin) || |
| 8523 | (phba->cfg_hdw_queue > qmin)) { | 8627 | (phba->cfg_hdw_queue > qmin)) { |
| 8524 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 8628 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8525 | "2005 Reducing Queues: " | 8629 | "2005 Reducing Queues: " |
| 8526 | "WQ %d CQ %d EQ %d: min %d: " | 8630 | "WQ %d CQ %d EQ %d: min %d: " |
| 8527 | "IRQ %d HDWQ %d\n", | 8631 | "IRQ %d HDWQ %d\n", |
| @@ -8587,7 +8691,8 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) · 59 unmodified lines | |||
| 8587 | LPFC_USER_LINK_SPEED_AUTO; | 8691 | LPFC_USER_LINK_SPEED_AUTO; |
| 8588 | break; | 8692 | break; |
| 8589 | default: | 8693 | default: |
| 8590 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 8694 | lpfc_printf_log(phba, KERN_ERR, |
| 8695 | LOG_TRACE_EVENT, | ||
| 8591 | "0047 Unrecognized link " | 8696 | "0047 Unrecognized link " |
| 8592 | "speed : %d\n", | 8697 | "speed : %d\n", |
| 8593 | forced_link_speed); | 8698 | forced_link_speed); |
| @@ -8624,7 +8729,7 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) · 30 unmodified lines | |||
| 8624 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 8729 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 8625 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 8730 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 8626 | if (rc2 || shdr_status || shdr_add_status) { | 8731 | if (rc2 || shdr_status || shdr_add_status) { |
| 8627 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 8732 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8628 | "3026 Mailbox failed , mbxCmd x%x " | 8733 | "3026 Mailbox failed , mbxCmd x%x " |
| 8629 | "GET_FUNCTION_CONFIG, mbxStatus x%x\n", | 8734 | "GET_FUNCTION_CONFIG, mbxStatus x%x\n", |
| 8630 | bf_get(lpfc_mqe_command, &pmb->u.mqe), | 8735 | bf_get(lpfc_mqe_command, &pmb->u.mqe), |
| @@ -8661,7 +8766,7 @@ lpfc_sli4_read_config(struct lpfc_hba *phba) · 30 unmodified lines | |||
| 8661 | "vf_number:%d\n", phba->sli4_hba.iov.pf_number, | 8766 | "vf_number:%d\n", phba->sli4_hba.iov.pf_number, |
| 8662 | phba->sli4_hba.iov.vf_number); | 8767 | phba->sli4_hba.iov.vf_number); |
| 8663 | else | 8768 | else |
| 8664 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 8769 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8665 | "3028 GET_FUNCTION_CONFIG: failed to find " | 8770 | "3028 GET_FUNCTION_CONFIG: failed to find " |
| 8666 | "Resource Descriptor:x%x\n", | 8771 | "Resource Descriptor:x%x\n", |
| 8667 | LPFC_RSRC_DESC_TYPE_FCFCOE); | 8772 | LPFC_RSRC_DESC_TYPE_FCFCOE); |
| @@ -8698,7 +8803,7 @@ lpfc_setup_endian_order(struct lpfc_hba *phba) · 30 unmodified lines | |||
| 8698 | mboxq = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, | 8803 | mboxq = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, |
| 8699 | GFP_KERNEL); | 8804 | GFP_KERNEL); |
| 8700 | if (!mboxq) { | 8805 | if (!mboxq) { |
| 8701 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8806 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8702 | "0492 Unable to allocate memory for " | 8807 | "0492 Unable to allocate memory for " |
| 8703 | "issuing SLI_CONFIG_SPECIAL mailbox " | 8808 | "issuing SLI_CONFIG_SPECIAL mailbox " |
| 8704 | "command\n"); | 8809 | "command\n"); |
| @@ -8713,7 +8818,7 @@ lpfc_setup_endian_order(struct lpfc_hba *phba) · 8 unmodified lines | |||
| 8713 | memcpy(&mboxq->u.mqe, &endian_mb_data, sizeof(endian_mb_data)); | 8818 | memcpy(&mboxq->u.mqe, &endian_mb_data, sizeof(endian_mb_data)); |
| 8714 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); | 8819 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); |
| 8715 | if (rc != MBX_SUCCESS) { | 8820 | if (rc != MBX_SUCCESS) { |
| 8716 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8821 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8717 | "0493 SLI_CONFIG_SPECIAL mailbox " | 8822 | "0493 SLI_CONFIG_SPECIAL mailbox " |
| 8718 | "failed with status x%x\n", | 8823 | "failed with status x%x\n", |
| 8719 | rc); | 8824 | rc); |
| @@ -8793,8 +8898,9 @@ lpfc_alloc_io_wq_cq(struct lpfc_hba *phba, int idx) · 73 unmodified lines | |||
| 8793 | phba->sli4_hba.cq_esize, | 8898 | phba->sli4_hba.cq_esize, |
| 8794 | phba->sli4_hba.cq_ecount, cpu); | 8899 | phba->sli4_hba.cq_ecount, cpu); |
| 8795 | if (!qdesc) { | 8900 | if (!qdesc) { |
| 8796 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8901 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8797 | "0499 Failed allocate fast-path IO CQ (%d)\n", idx); | 8902 | "0499 Failed allocate fast-path IO CQ (%d)\n", |
| 8903 | idx); | ||
| 8798 | return 1; | 8904 | return 1; |
| 8799 | } | 8905 | } |
| 8800 | qdesc->qe_valid = 1; | 8906 | qdesc->qe_valid = 1; |
| @@ -8816,7 +8922,7 @@ lpfc_alloc_io_wq_cq(struct lpfc_hba *phba, int idx) · 15 unmodified lines | |||
| 8816 | phba->sli4_hba.wq_ecount, cpu); | 8922 | phba->sli4_hba.wq_ecount, cpu); |
| 8817 | 8923 | ||
| 8818 | if (!qdesc) { | 8924 | if (!qdesc) { |
| 8819 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8925 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8820 | "0503 Failed allocate fast-path IO WQ (%d)\n", | 8926 | "0503 Failed allocate fast-path IO WQ (%d)\n", |
| 8821 | idx); | 8927 | idx); |
| 8822 | return 1; | 8928 | return 1; |
| @@ -8872,7 +8978,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 49 unmodified lines | |||
| 8872 | phba->cfg_hdw_queue, sizeof(struct lpfc_sli4_hdw_queue), | 8978 | phba->cfg_hdw_queue, sizeof(struct lpfc_sli4_hdw_queue), |
| 8873 | GFP_KERNEL); | 8979 | GFP_KERNEL); |
| 8874 | if (!phba->sli4_hba.hdwq) { | 8980 | if (!phba->sli4_hba.hdwq) { |
| 8875 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 8981 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8876 | "6427 Failed allocate memory for " | 8982 | "6427 Failed allocate memory for " |
| 8877 | "fast-path Hardware Queue array\n"); | 8983 | "fast-path Hardware Queue array\n"); |
| 8878 | goto out_error; | 8984 | goto out_error; |
| @@ -8904,7 +9010,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 25 unmodified lines | |||
| 8904 | sizeof(struct lpfc_queue *), | 9010 | sizeof(struct lpfc_queue *), |
| 8905 | GFP_KERNEL); | 9011 | GFP_KERNEL); |
| 8906 | if (!phba->sli4_hba.nvmet_cqset) { | 9012 | if (!phba->sli4_hba.nvmet_cqset) { |
| 8907 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9013 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8908 | "3121 Fail allocate memory for " | 9014 | "3121 Fail allocate memory for " |
| 8909 | "fast-path CQ set array\n"); | 9015 | "fast-path CQ set array\n"); |
| 8910 | goto out_error; | 9016 | goto out_error; |
| @@ -8914,7 +9020,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 3 unmodified lines | |||
| 8914 | sizeof(struct lpfc_queue *), | 9020 | sizeof(struct lpfc_queue *), |
| 8915 | GFP_KERNEL); | 9021 | GFP_KERNEL); |
| 8916 | if (!phba->sli4_hba.nvmet_mrq_hdr) { | 9022 | if (!phba->sli4_hba.nvmet_mrq_hdr) { |
| 8917 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9023 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8918 | "3122 Fail allocate memory for " | 9024 | "3122 Fail allocate memory for " |
| 8919 | "fast-path RQ set hdr array\n"); | 9025 | "fast-path RQ set hdr array\n"); |
| 8920 | goto out_error; | 9026 | goto out_error; |
| @@ -8924,7 +9030,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 3 unmodified lines | |||
| 8924 | sizeof(struct lpfc_queue *), | 9030 | sizeof(struct lpfc_queue *), |
| 8925 | GFP_KERNEL); | 9031 | GFP_KERNEL); |
| 8926 | if (!phba->sli4_hba.nvmet_mrq_data) { | 9032 | if (!phba->sli4_hba.nvmet_mrq_data) { |
| 8927 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9033 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8928 | "3124 Fail allocate memory for " | 9034 | "3124 Fail allocate memory for " |
| 8929 | "fast-path RQ set data array\n"); | 9035 | "fast-path RQ set data array\n"); |
| 8930 | goto out_error; | 9036 | goto out_error; |
| @@ -8952,7 +9058,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 21 unmodified lines | |||
| 8952 | phba->sli4_hba.eq_esize, | 9058 | phba->sli4_hba.eq_esize, |
| 8953 | phba->sli4_hba.eq_ecount, cpu); | 9059 | phba->sli4_hba.eq_ecount, cpu); |
| 8954 | if (!qdesc) { | 9060 | if (!qdesc) { |
| 8955 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9061 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8956 | "0497 Failed allocate EQ (%d)\n", | 9062 | "0497 Failed allocate EQ (%d)\n", |
| 8957 | cpup->hdwq); | 9063 | cpup->hdwq); |
| 8958 | goto out_error; | 9064 | goto out_error; |
| @@ -9006,7 +9112,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 47 unmodified lines | |||
| 9006 | phba->sli4_hba.cq_ecount, | 9112 | phba->sli4_hba.cq_ecount, |
| 9007 | cpu); | 9113 | cpu); |
| 9008 | if (!qdesc) { | 9114 | if (!qdesc) { |
| 9009 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9115 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9010 | "3142 Failed allocate NVME " | 9116 | "3142 Failed allocate NVME " |
| 9011 | "CQ Set (%d)\n", idx); | 9117 | "CQ Set (%d)\n", idx); |
| 9012 | goto out_error; | 9118 | goto out_error; |
| @@ -9028,7 +9134,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 15 unmodified lines | |||
| 9028 | phba->sli4_hba.cq_esize, | 9134 | phba->sli4_hba.cq_esize, |
| 9029 | phba->sli4_hba.cq_ecount, cpu); | 9135 | phba->sli4_hba.cq_ecount, cpu); |
| 9030 | if (!qdesc) { | 9136 | if (!qdesc) { |
| 9031 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9137 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9032 | "0500 Failed allocate slow-path mailbox CQ\n"); | 9138 | "0500 Failed allocate slow-path mailbox CQ\n"); |
| 9033 | goto out_error; | 9139 | goto out_error; |
| 9034 | } | 9140 | } |
| @@ -9040,7 +9146,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 5 unmodified lines | |||
| 9040 | phba->sli4_hba.cq_esize, | 9146 | phba->sli4_hba.cq_esize, |
| 9041 | phba->sli4_hba.cq_ecount, cpu); | 9147 | phba->sli4_hba.cq_ecount, cpu); |
| 9042 | if (!qdesc) { | 9148 | if (!qdesc) { |
| 9043 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9149 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9044 | "0501 Failed allocate slow-path ELS CQ\n"); | 9150 | "0501 Failed allocate slow-path ELS CQ\n"); |
| 9045 | goto out_error; | 9151 | goto out_error; |
| 9046 | } | 9152 | } |
| @@ -9059,7 +9165,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 12 unmodified lines | |||
| 9059 | phba->sli4_hba.mq_esize, | 9165 | phba->sli4_hba.mq_esize, |
| 9060 | phba->sli4_hba.mq_ecount, cpu); | 9166 | phba->sli4_hba.mq_ecount, cpu); |
| 9061 | if (!qdesc) { | 9167 | if (!qdesc) { |
| 9062 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9168 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9063 | "0505 Failed allocate slow-path MQ\n"); | 9169 | "0505 Failed allocate slow-path MQ\n"); |
| 9064 | goto out_error; | 9170 | goto out_error; |
| 9065 | } | 9171 | } |
| @@ -9075,7 +9181,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 9 unmodified lines | |||
| 9075 | phba->sli4_hba.wq_esize, | 9181 | phba->sli4_hba.wq_esize, |
| 9076 | phba->sli4_hba.wq_ecount, cpu); | 9182 | phba->sli4_hba.wq_ecount, cpu); |
| 9077 | if (!qdesc) { | 9183 | if (!qdesc) { |
| 9078 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9184 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9079 | "0504 Failed allocate slow-path ELS WQ\n"); | 9185 | "0504 Failed allocate slow-path ELS WQ\n"); |
| 9080 | goto out_error; | 9186 | goto out_error; |
| 9081 | } | 9187 | } |
| @@ -9089,7 +9195,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 7 unmodified lines | |||
| 9089 | phba->sli4_hba.cq_esize, | 9195 | phba->sli4_hba.cq_esize, |
| 9090 | phba->sli4_hba.cq_ecount, cpu); | 9196 | phba->sli4_hba.cq_ecount, cpu); |
| 9091 | if (!qdesc) { | 9197 | if (!qdesc) { |
| 9092 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9198 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9093 | "6079 Failed allocate NVME LS CQ\n"); | 9199 | "6079 Failed allocate NVME LS CQ\n"); |
| 9094 | goto out_error; | 9200 | goto out_error; |
| 9095 | } | 9201 | } |
| @@ -9102,7 +9208,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 6 unmodified lines | |||
| 9102 | phba->sli4_hba.wq_esize, | 9208 | phba->sli4_hba.wq_esize, |
| 9103 | phba->sli4_hba.wq_ecount, cpu); | 9209 | phba->sli4_hba.wq_ecount, cpu); |
| 9104 | if (!qdesc) { | 9210 | if (!qdesc) { |
| 9105 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9211 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9106 | "6080 Failed allocate NVME LS WQ\n"); | 9212 | "6080 Failed allocate NVME LS WQ\n"); |
| 9107 | goto out_error; | 9213 | goto out_error; |
| 9108 | } | 9214 | } |
| @@ -9120,7 +9226,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 11 unmodified lines | |||
| 9120 | phba->sli4_hba.rq_esize, | 9226 | phba->sli4_hba.rq_esize, |
| 9121 | phba->sli4_hba.rq_ecount, cpu); | 9227 | phba->sli4_hba.rq_ecount, cpu); |
| 9122 | if (!qdesc) { | 9228 | if (!qdesc) { |
| 9123 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9229 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9124 | "0506 Failed allocate receive HRQ\n"); | 9230 | "0506 Failed allocate receive HRQ\n"); |
| 9125 | goto out_error; | 9231 | goto out_error; |
| 9126 | } | 9232 | } |
| @@ -9131,7 +9237,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 9131 | phba->sli4_hba.rq_esize, | 9237 | phba->sli4_hba.rq_esize, |
| 9132 | phba->sli4_hba.rq_ecount, cpu); | 9238 | phba->sli4_hba.rq_ecount, cpu); |
| 9133 | if (!qdesc) { | 9239 | if (!qdesc) { |
| 9134 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9240 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9135 | "0507 Failed allocate receive DRQ\n"); | 9241 | "0507 Failed allocate receive DRQ\n"); |
| 9136 | goto out_error; | 9242 | goto out_error; |
| 9137 | } | 9243 | } |
| @@ -9149,7 +9255,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 11 unmodified lines | |||
| 9149 | LPFC_NVMET_RQE_DEF_COUNT, | 9255 | LPFC_NVMET_RQE_DEF_COUNT, |
| 9150 | cpu); | 9256 | cpu); |
| 9151 | if (!qdesc) { | 9257 | if (!qdesc) { |
| 9152 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9258 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9153 | "3146 Failed allocate " | 9259 | "3146 Failed allocate " |
| 9154 | "receive HRQ\n"); | 9260 | "receive HRQ\n"); |
| 9155 | goto out_error; | 9261 | goto out_error; |
| @@ -9162,7 +9268,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 6 unmodified lines | |||
| 9162 | GFP_KERNEL, | 9268 | GFP_KERNEL, |
| 9163 | cpu_to_node(cpu)); | 9269 | cpu_to_node(cpu)); |
| 9164 | if (qdesc->rqbp == NULL) { | 9270 | if (qdesc->rqbp == NULL) { |
| 9165 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9271 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9166 | "6131 Failed allocate " | 9272 | "6131 Failed allocate " |
| 9167 | "Header RQBP\n"); | 9273 | "Header RQBP\n"); |
| 9168 | goto out_error; | 9274 | goto out_error; |
| @@ -9178,7 +9284,7 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba) · 9 unmodified lines | |||
| 9178 | LPFC_NVMET_RQE_DEF_COUNT, | 9284 | LPFC_NVMET_RQE_DEF_COUNT, |
| 9179 | cpu); | 9285 | cpu); |
| 9180 | if (!qdesc) { | 9286 | if (!qdesc) { |
| 9181 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9287 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9182 | "3156 Failed allocate " | 9288 | "3156 Failed allocate " |
| 9183 | "receive DRQ\n"); | 9289 | "receive DRQ\n"); |
| 9184 | goto out_error; | 9290 | goto out_error; |
| @@ -9369,7 +9475,7 @@ lpfc_create_wq_cq(struct lpfc_hba *phba, struct lpfc_queue *eq, · 184 unmodified lines | |||
| 9369 | int rc; | 9475 | int rc; |
| 9370 | 9476 | ||
| 9371 | if (!eq || !cq || !wq) { | 9477 | if (!eq || !cq || !wq) { |
| 9372 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9478 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9373 | "6085 Fast-path %s (%d) not allocated\n", | 9479 | "6085 Fast-path %s (%d) not allocated\n", |
| 9374 | ((eq) ? ((cq) ? "WQ" : "CQ") : "EQ"), qidx); | 9480 | ((eq) ? ((cq) ? "WQ" : "CQ") : "EQ"), qidx); |
| 9375 | return -ENOMEM; | 9481 | return -ENOMEM; |
| @@ -9379,9 +9485,9 @@ lpfc_create_wq_cq(struct lpfc_hba *phba, struct lpfc_queue *eq, · 3 unmodified lines | |||
| 9379 | rc = lpfc_cq_create(phba, cq, eq, | 9485 | rc = lpfc_cq_create(phba, cq, eq, |
| 9380 | (qtype == LPFC_MBOX) ? LPFC_MCQ : LPFC_WCQ, qtype); | 9486 | (qtype == LPFC_MBOX) ? LPFC_MCQ : LPFC_WCQ, qtype); |
| 9381 | if (rc) { | 9487 | if (rc) { |
| 9382 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9488 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9383 | "6086 Failed setup of CQ (%d), rc = 0x%x\n", | 9489 | "6086 Failed setup of CQ (%d), rc = 0x%x\n", |
| 9384 | qidx, (uint32_t)rc); | 9490 | qidx, (uint32_t)rc); |
| 9385 | return rc; | 9491 | return rc; |
| 9386 | } | 9492 | } |
| 9387 | 9493 | ||
| @@ -9397,7 +9503,7 @@ lpfc_create_wq_cq(struct lpfc_hba *phba, struct lpfc_queue *eq, · 9 unmodified lines | |||
| 9397 | /* create the wq */ | 9503 | /* create the wq */ |
| 9398 | rc = lpfc_wq_create(phba, wq, cq, qtype); | 9504 | rc = lpfc_wq_create(phba, wq, cq, qtype); |
| 9399 | if (rc) { | 9505 | if (rc) { |
| 9400 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9506 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9401 | "4618 Fail setup fastpath WQ (%d), rc = 0x%x\n", | 9507 | "4618 Fail setup fastpath WQ (%d), rc = 0x%x\n", |
| 9402 | qidx, (uint32_t)rc); | 9508 | qidx, (uint32_t)rc); |
| 9403 | /* no need to tear down cq - caller will do so */ | 9509 | /* no need to tear down cq - caller will do so */ |
| @@ -9415,9 +9521,9 @@ lpfc_create_wq_cq(struct lpfc_hba *phba, struct lpfc_queue *eq, · 11 unmodified lines | |||
| 9415 | } else { | 9521 | } else { |
| 9416 | rc = lpfc_mq_create(phba, wq, cq, LPFC_MBOX); | 9522 | rc = lpfc_mq_create(phba, wq, cq, LPFC_MBOX); |
| 9417 | if (rc) { | 9523 | if (rc) { |
| 9418 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9524 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9419 | "0539 Failed setup of slow-path MQ: " | 9525 | "0539 Failed setup of slow-path MQ: " |
| 9420 | "rc = 0x%x\n", rc); | 9526 | "rc = 0x%x\n", rc); |
| 9421 | /* no need to tear down cq - caller will do so */ | 9527 | /* no need to tear down cq - caller will do so */ |
| 9422 | return rc; | 9528 | return rc; |
| 9423 | } | 9529 | } |
| @@ -9490,7 +9596,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 66 unmodified lines | |||
| 9490 | /* Check for dual-ULP support */ | 9596 | /* Check for dual-ULP support */ |
| 9491 | mboxq = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 9597 | mboxq = (LPFC_MBOXQ_t *)mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 9492 | if (!mboxq) { | 9598 | if (!mboxq) { |
| 9493 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9599 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9494 | "3249 Unable to allocate memory for " | 9600 | "3249 Unable to allocate memory for " |
| 9495 | "QUERY_FW_CFG mailbox command\n"); | 9601 | "QUERY_FW_CFG mailbox command\n"); |
| 9496 | return -ENOMEM; | 9602 | return -ENOMEM; |
| @@ -9508,7 +9614,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 11 unmodified lines | |||
| 9508 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 9614 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 9509 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 9615 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 9510 | if (shdr_status || shdr_add_status || rc) { | 9616 | if (shdr_status || shdr_add_status || rc) { |
| 9511 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9617 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9512 | "3250 QUERY_FW_CFG mailbox failed with status " | 9618 | "3250 QUERY_FW_CFG mailbox failed with status " |
| 9513 | "x%x add_status x%x, mbx status x%x\n", | 9619 | "x%x add_status x%x, mbx status x%x\n", |
| 9514 | shdr_status, shdr_add_status, rc); | 9620 | shdr_status, shdr_add_status, rc); |
| @@ -9539,7 +9645,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 24 unmodified lines | |||
| 9539 | 9645 | ||
| 9540 | /* Set up HBA event queue */ | 9646 | /* Set up HBA event queue */ |
| 9541 | if (!qp) { | 9647 | if (!qp) { |
| 9542 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9648 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9543 | "3147 Fast-path EQs not allocated\n"); | 9649 | "3147 Fast-path EQs not allocated\n"); |
| 9544 | rc = -ENOMEM; | 9650 | rc = -ENOMEM; |
| 9545 | goto out_error; | 9651 | goto out_error; |
| @@ -9563,7 +9669,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 17 unmodified lines | |||
| 9563 | rc = lpfc_eq_create(phba, qp[cpup->hdwq].hba_eq, | 9669 | rc = lpfc_eq_create(phba, qp[cpup->hdwq].hba_eq, |
| 9564 | phba->cfg_fcp_imax); | 9670 | phba->cfg_fcp_imax); |
| 9565 | if (rc) { | 9671 | if (rc) { |
| 9566 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9672 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9567 | "0523 Failed setup of fast-path" | 9673 | "0523 Failed setup of fast-path" |
| 9568 | " EQ (%d), rc = 0x%x\n", | 9674 | " EQ (%d), rc = 0x%x\n", |
| 9569 | cpup->eq, (uint32_t)rc); | 9675 | cpup->eq, (uint32_t)rc); |
| @@ -9595,7 +9701,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 25 unmodified lines | |||
| 9595 | qidx, | 9701 | qidx, |
| 9596 | LPFC_IO); | 9702 | LPFC_IO); |
| 9597 | if (rc) { | 9703 | if (rc) { |
| 9598 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9704 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9599 | "0535 Failed to setup fastpath " | 9705 | "0535 Failed to setup fastpath " |
| 9600 | "IO WQ/CQ (%d), rc = 0x%x\n", | 9706 | "IO WQ/CQ (%d), rc = 0x%x\n", |
| 9601 | qidx, (uint32_t)rc); | 9707 | qidx, (uint32_t)rc); |
| @@ -9610,7 +9716,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 8 unmodified lines | |||
| 9610 | /* Set up slow-path MBOX CQ/MQ */ | 9716 | /* Set up slow-path MBOX CQ/MQ */ |
| 9611 | 9717 | ||
| 9612 | if (!phba->sli4_hba.mbx_cq || !phba->sli4_hba.mbx_wq) { | 9718 | if (!phba->sli4_hba.mbx_cq || !phba->sli4_hba.mbx_wq) { |
| 9613 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9719 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9614 | "0528 %s not allocated\n", | 9720 | "0528 %s not allocated\n", |
| 9615 | phba->sli4_hba.mbx_cq ? | 9721 | phba->sli4_hba.mbx_cq ? |
| 9616 | "Mailbox WQ" : "Mailbox CQ"); | 9722 | "Mailbox WQ" : "Mailbox CQ"); |
| @@ -9623,14 +9729,14 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 6 unmodified lines | |||
| 9623 | phba->sli4_hba.mbx_wq, | 9729 | phba->sli4_hba.mbx_wq, |
| 9624 | NULL, 0, LPFC_MBOX); | 9730 | NULL, 0, LPFC_MBOX); |
| 9625 | if (rc) { | 9731 | if (rc) { |
| 9626 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9732 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9627 | "0529 Failed setup of mailbox WQ/CQ: rc = 0x%x\n", | 9733 | "0529 Failed setup of mailbox WQ/CQ: rc = 0x%x\n", |
| 9628 | (uint32_t)rc); | 9734 | (uint32_t)rc); |
| 9629 | goto out_destroy; | 9735 | goto out_destroy; |
| 9630 | } | 9736 | } |
| 9631 | if (phba->nvmet_support) { | 9737 | if (phba->nvmet_support) { |
| 9632 | if (!phba->sli4_hba.nvmet_cqset) { | 9738 | if (!phba->sli4_hba.nvmet_cqset) { |
| 9633 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9739 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9634 | "3165 Fast-path NVME CQ Set " | 9740 | "3165 Fast-path NVME CQ Set " |
| 9635 | "array not allocated\n"); | 9741 | "array not allocated\n"); |
| 9636 | rc = -ENOMEM; | 9742 | rc = -ENOMEM; |
| @@ -9642,7 +9748,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 5 unmodified lines | |||
| 9642 | qp, | 9748 | qp, |
| 9643 | LPFC_WCQ, LPFC_NVMET); | 9749 | LPFC_WCQ, LPFC_NVMET); |
| 9644 | if (rc) { | 9750 | if (rc) { |
| 9645 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9751 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9646 | "3164 Failed setup of NVME CQ " | 9752 | "3164 Failed setup of NVME CQ " |
| 9647 | "Set, rc = 0x%x\n", | 9753 | "Set, rc = 0x%x\n", |
| 9648 | (uint32_t)rc); | 9754 | (uint32_t)rc); |
| @@ -9654,7 +9760,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 5 unmodified lines | |||
| 9654 | qp[0].hba_eq, | 9760 | qp[0].hba_eq, |
| 9655 | LPFC_WCQ, LPFC_NVMET); | 9761 | LPFC_WCQ, LPFC_NVMET); |
| 9656 | if (rc) { | 9762 | if (rc) { |
| 9657 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9763 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9658 | "6089 Failed setup NVMET CQ: " | 9764 | "6089 Failed setup NVMET CQ: " |
| 9659 | "rc = 0x%x\n", (uint32_t)rc); | 9765 | "rc = 0x%x\n", (uint32_t)rc); |
| 9660 | goto out_destroy; | 9766 | goto out_destroy; |
| @@ -9671,7 +9777,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 10 unmodified lines | |||
| 9671 | 9777 | ||
| 9672 | /* Set up slow-path ELS WQ/CQ */ | 9778 | /* Set up slow-path ELS WQ/CQ */ |
| 9673 | if (!phba->sli4_hba.els_cq || !phba->sli4_hba.els_wq) { | 9779 | if (!phba->sli4_hba.els_cq || !phba->sli4_hba.els_wq) { |
| 9674 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9780 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9675 | "0530 ELS %s not allocated\n", | 9781 | "0530 ELS %s not allocated\n", |
| 9676 | phba->sli4_hba.els_cq ? "WQ" : "CQ"); | 9782 | phba->sli4_hba.els_cq ? "WQ" : "CQ"); |
| 9677 | rc = -ENOMEM; | 9783 | rc = -ENOMEM; |
| @@ -9682,7 +9788,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 9682 | phba->sli4_hba.els_wq, | 9788 | phba->sli4_hba.els_wq, |
| 9683 | NULL, 0, LPFC_ELS); | 9789 | NULL, 0, LPFC_ELS); |
| 9684 | if (rc) { | 9790 | if (rc) { |
| 9685 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9791 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9686 | "0525 Failed setup of ELS WQ/CQ: rc = 0x%x\n", | 9792 | "0525 Failed setup of ELS WQ/CQ: rc = 0x%x\n", |
| 9687 | (uint32_t)rc); | 9793 | (uint32_t)rc); |
| 9688 | goto out_destroy; | 9794 | goto out_destroy; |
| @@ -9695,7 +9801,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 6 unmodified lines | |||
| 9695 | if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME) { | 9801 | if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME) { |
| 9696 | /* Set up NVME LS Complete Queue */ | 9802 | /* Set up NVME LS Complete Queue */ |
| 9697 | if (!phba->sli4_hba.nvmels_cq || !phba->sli4_hba.nvmels_wq) { | 9803 | if (!phba->sli4_hba.nvmels_cq || !phba->sli4_hba.nvmels_wq) { |
| 9698 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9804 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9699 | "6091 LS %s not allocated\n", | 9805 | "6091 LS %s not allocated\n", |
| 9700 | phba->sli4_hba.nvmels_cq ? "WQ" : "CQ"); | 9806 | phba->sli4_hba.nvmels_cq ? "WQ" : "CQ"); |
| 9701 | rc = -ENOMEM; | 9807 | rc = -ENOMEM; |
| @@ -9706,7 +9812,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 9706 | phba->sli4_hba.nvmels_wq, | 9812 | phba->sli4_hba.nvmels_wq, |
| 9707 | NULL, 0, LPFC_NVME_LS); | 9813 | NULL, 0, LPFC_NVME_LS); |
| 9708 | if (rc) { | 9814 | if (rc) { |
| 9709 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9815 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9710 | "0526 Failed setup of NVVME LS WQ/CQ: " | 9816 | "0526 Failed setup of NVVME LS WQ/CQ: " |
| 9711 | "rc = 0x%x\n", (uint32_t)rc); | 9817 | "rc = 0x%x\n", (uint32_t)rc); |
| 9712 | goto out_destroy; | 9818 | goto out_destroy; |
| @@ -9726,7 +9832,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 13 unmodified lines | |||
| 9726 | if ((!phba->sli4_hba.nvmet_cqset) || | 9832 | if ((!phba->sli4_hba.nvmet_cqset) || |
| 9727 | (!phba->sli4_hba.nvmet_mrq_hdr) || | 9833 | (!phba->sli4_hba.nvmet_mrq_hdr) || |
| 9728 | (!phba->sli4_hba.nvmet_mrq_data)) { | 9834 | (!phba->sli4_hba.nvmet_mrq_data)) { |
| 9729 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9835 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9730 | "6130 MRQ CQ Queues not " | 9836 | "6130 MRQ CQ Queues not " |
| 9731 | "allocated\n"); | 9837 | "allocated\n"); |
| 9732 | rc = -ENOMEM; | 9838 | rc = -ENOMEM; |
| @@ -9739,7 +9845,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 6 unmodified lines | |||
| 9739 | phba->sli4_hba.nvmet_cqset, | 9845 | phba->sli4_hba.nvmet_cqset, |
| 9740 | LPFC_NVMET); | 9846 | LPFC_NVMET); |
| 9741 | if (rc) { | 9847 | if (rc) { |
| 9742 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9848 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9743 | "6098 Failed setup of NVMET " | 9849 | "6098 Failed setup of NVMET " |
| 9744 | "MRQ: rc = 0x%x\n", | 9850 | "MRQ: rc = 0x%x\n", |
| 9745 | (uint32_t)rc); | 9851 | (uint32_t)rc); |
| @@ -9753,7 +9859,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 7 unmodified lines | |||
| 9753 | phba->sli4_hba.nvmet_cqset[0], | 9859 | phba->sli4_hba.nvmet_cqset[0], |
| 9754 | LPFC_NVMET); | 9860 | LPFC_NVMET); |
| 9755 | if (rc) { | 9861 | if (rc) { |
| 9756 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9862 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9757 | "6057 Failed setup of NVMET " | 9863 | "6057 Failed setup of NVMET " |
| 9758 | "Receive Queue: rc = 0x%x\n", | 9864 | "Receive Queue: rc = 0x%x\n", |
| 9759 | (uint32_t)rc); | 9865 | (uint32_t)rc); |
| @@ -9772,7 +9878,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 12 unmodified lines | |||
| 9772 | } | 9878 | } |
| 9773 | 9879 | ||
| 9774 | if (!phba->sli4_hba.hdr_rq || !phba->sli4_hba.dat_rq) { | 9880 | if (!phba->sli4_hba.hdr_rq || !phba->sli4_hba.dat_rq) { |
| 9775 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9881 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9776 | "0540 Receive Queue not allocated\n"); | 9882 | "0540 Receive Queue not allocated\n"); |
| 9777 | rc = -ENOMEM; | 9883 | rc = -ENOMEM; |
| 9778 | goto out_destroy; | 9884 | goto out_destroy; |
| @@ -9781,7 +9887,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 2 unmodified lines | |||
| 9781 | rc = lpfc_rq_create(phba, phba->sli4_hba.hdr_rq, phba->sli4_hba.dat_rq, | 9887 | rc = lpfc_rq_create(phba, phba->sli4_hba.hdr_rq, phba->sli4_hba.dat_rq, |
| 9782 | phba->sli4_hba.els_cq, LPFC_USOL); | 9888 | phba->sli4_hba.els_cq, LPFC_USOL); |
| 9783 | if (rc) { | 9889 | if (rc) { |
| 9784 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9890 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9785 | "0541 Failed setup of Receive Queue: " | 9891 | "0541 Failed setup of Receive Queue: " |
| 9786 | "rc = 0x%x\n", (uint32_t)rc); | 9892 | "rc = 0x%x\n", (uint32_t)rc); |
| 9787 | goto out_destroy; | 9893 | goto out_destroy; |
| @@ -9809,7 +9915,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) · 21 unmodified lines | |||
| 9809 | phba->sli4_hba.cq_lookup = kcalloc((phba->sli4_hba.cq_max + 1), | 9915 | phba->sli4_hba.cq_lookup = kcalloc((phba->sli4_hba.cq_max + 1), |
| 9810 | sizeof(struct lpfc_queue *), GFP_KERNEL); | 9916 | sizeof(struct lpfc_queue *), GFP_KERNEL); |
| 9811 | if (!phba->sli4_hba.cq_lookup) { | 9917 | if (!phba->sli4_hba.cq_lookup) { |
| 9812 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9918 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9813 | "0549 Failed setup of CQ Lookup table: " | 9919 | "0549 Failed setup of CQ Lookup table: " |
| 9814 | "size 0x%x\n", phba->sli4_hba.cq_max); | 9920 | "size 0x%x\n", phba->sli4_hba.cq_max); |
| 9815 | rc = -ENOMEM; | 9921 | rc = -ENOMEM; |
| @@ -10109,7 +10215,7 @@ lpfc_pci_function_reset(struct lpfc_hba *phba) · 293 unmodified lines | |||
| 10109 | mboxq = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, | 10215 | mboxq = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, |
| 10110 | GFP_KERNEL); | 10216 | GFP_KERNEL); |
| 10111 | if (!mboxq) { | 10217 | if (!mboxq) { |
| 10112 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10218 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10113 | "0494 Unable to allocate memory for " | 10219 | "0494 Unable to allocate memory for " |
| 10114 | "issuing SLI_FUNCTION_RESET mailbox " | 10220 | "issuing SLI_FUNCTION_RESET mailbox " |
| 10115 | "command\n"); | 10221 | "command\n"); |
| @@ -10129,7 +10235,7 @@ lpfc_pci_function_reset(struct lpfc_hba *phba) · 13 unmodified lines | |||
| 10129 | if (rc != MBX_TIMEOUT) | 10235 | if (rc != MBX_TIMEOUT) |
| 10130 | mempool_free(mboxq, phba->mbox_mem_pool); | 10236 | mempool_free(mboxq, phba->mbox_mem_pool); |
| 10131 | if (shdr_status || shdr_add_status || rc) { | 10237 | if (shdr_status || shdr_add_status || rc) { |
| 10132 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10238 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10133 | "0495 SLI_FUNCTION_RESET mailbox " | 10239 | "0495 SLI_FUNCTION_RESET mailbox " |
| 10134 | "failed with status x%x add_status x%x," | 10240 | "failed with status x%x add_status x%x," |
| 10135 | " mbx status x%x\n", | 10241 | " mbx status x%x\n", |
| @@ -10161,7 +10267,7 @@ wait: · 25 unmodified lines | |||
| 10161 | phba->sli4_hba.u.if_type2.ERR1regaddr); | 10267 | phba->sli4_hba.u.if_type2.ERR1regaddr); |
| 10162 | phba->work_status[1] = readl( | 10268 | phba->work_status[1] = readl( |
| 10163 | phba->sli4_hba.u.if_type2.ERR2regaddr); | 10269 | phba->sli4_hba.u.if_type2.ERR2regaddr); |
| 10164 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10270 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10165 | "2890 Port not ready, port status reg " | 10271 | "2890 Port not ready, port status reg " |
| 10166 | "0x%x error 1=0x%x, error 2=0x%x\n", | 10272 | "0x%x error 1=0x%x, error 2=0x%x\n", |
| 10167 | reg_data.word0, | 10273 | reg_data.word0, |
| @@ -10203,7 +10309,7 @@ wait: · 35 unmodified lines | |||
| 10203 | out: | 10309 | out: |
| 10204 | /* Catch the not-ready port failure after a port reset. */ | 10310 | /* Catch the not-ready port failure after a port reset. */ |
| 10205 | if (rc) { | 10311 | if (rc) { |
| 10206 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10312 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10207 | "3317 HBA not functional: IP Reset Failed " | 10313 | "3317 HBA not functional: IP Reset Failed " |
| 10208 | "try: echo fw_reset > board_mode\n"); | 10314 | "try: echo fw_reset > board_mode\n"); |
| 10209 | rc = -ENODEV; | 10315 | rc = -ENODEV; |
| @@ -10253,7 +10359,7 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba) · 43 unmodified lines | |||
| 10253 | /* There is no SLI3 failback for SLI4 devices. */ | 10359 | /* There is no SLI3 failback for SLI4 devices. */ |
| 10254 | if (bf_get(lpfc_sli_intf_valid, &phba->sli4_hba.sli_intf) != | 10360 | if (bf_get(lpfc_sli_intf_valid, &phba->sli4_hba.sli_intf) != |
| 10255 | LPFC_SLI_INTF_VALID) { | 10361 | LPFC_SLI_INTF_VALID) { |
| 10256 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10362 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10257 | "2894 SLI_INTF reg contents invalid " | 10363 | "2894 SLI_INTF reg contents invalid " |
| 10258 | "sli_intf reg 0x%x\n", | 10364 | "sli_intf reg 0x%x\n", |
| 10259 | phba->sli4_hba.sli_intf.word0); | 10365 | phba->sli4_hba.sli_intf.word0); |
| @@ -10528,7 +10634,7 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba) · 268 unmodified lines | |||
| 10528 | 10634 | ||
| 10529 | if (!pmb) { | 10635 | if (!pmb) { |
| 10530 | rc = -ENOMEM; | 10636 | rc = -ENOMEM; |
| 10531 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10637 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10532 | "0474 Unable to allocate memory for issuing " | 10638 | "0474 Unable to allocate memory for issuing " |
| 10533 | "MBOX_CONFIG_MSI command\n"); | 10639 | "MBOX_CONFIG_MSI command\n"); |
| 10534 | goto mem_fail_out; | 10640 | goto mem_fail_out; |
| @@ -10611,6 +10717,7 @@ lpfc_sli_enable_msi(struct lpfc_hba *phba) · 76 unmodified lines | |||
| 10611 | /** | 10717 | /** |
| 10612 | * lpfc_sli_enable_intr - Enable device interrupt to SLI-3 device. | 10718 | * lpfc_sli_enable_intr - Enable device interrupt to SLI-3 device. |
| 10613 | * @phba: pointer to lpfc hba data structure. | 10719 | * @phba: pointer to lpfc hba data structure. |
| 10720 | * @cfg_mode: Interrupt configuration mode (INTx, MSI or MSI-X). | ||
| 10614 | * | 10721 | * |
| 10615 | * This routine is invoked to enable device interrupt and associate driver's | 10722 | * This routine is invoked to enable device interrupt and associate driver's |
| 10616 | * interrupt handler(s) to interrupt vector(s) to device with SLI-3 interface | 10723 | * interrupt handler(s) to interrupt vector(s) to device with SLI-3 interface |
| @@ -11008,7 +11115,7 @@ found_any: · 391 unmodified lines | |||
| 11008 | /* 1 to 1, the first LPFC_CPU_FIRST_IRQ cpus to a unique hdwq */ | 11115 | /* 1 to 1, the first LPFC_CPU_FIRST_IRQ cpus to a unique hdwq */ |
| 11009 | cpup->hdwq = idx; | 11116 | cpup->hdwq = idx; |
| 11010 | idx++; | 11117 | idx++; |
| 11011 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11118 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
| 11012 | "3333 Set Affinity: CPU %d (phys %d core %d): " | 11119 | "3333 Set Affinity: CPU %d (phys %d core %d): " |
| 11013 | "hdwq %d eq %d flg x%x\n", | 11120 | "hdwq %d eq %d flg x%x\n", |
| 11014 | cpu, cpup->phys_id, cpup->core_id, | 11121 | cpu, cpup->phys_id, cpup->core_id, |
| @@ -11086,7 +11193,7 @@ found_any: · 71 unmodified lines | |||
| 11086 | start_cpu = first_cpu; | 11193 | start_cpu = first_cpu; |
| 11087 | cpup->hdwq = new_cpup->hdwq; | 11194 | cpup->hdwq = new_cpup->hdwq; |
| 11088 | logit: | 11195 | logit: |
| 11089 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11196 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
| 11090 | "3335 Set Affinity: CPU %d (phys %d core %d): " | 11197 | "3335 Set Affinity: CPU %d (phys %d core %d): " |
| 11091 | "hdwq %d eq %d flg x%x\n", | 11198 | "hdwq %d eq %d flg x%x\n", |
| 11092 | cpu, cpup->phys_id, cpup->core_id, | 11199 | cpu, cpup->phys_id, cpup->core_id, |
| @@ -11128,7 +11235,7 @@ found_any: · 35 unmodified lines | |||
| 11128 | * | 11235 | * |
| 11129 | * @phba: pointer to lpfc hba data structure. | 11236 | * @phba: pointer to lpfc hba data structure. |
| 11130 | * @cpu: cpu going offline | 11237 | * @cpu: cpu going offline |
| 11131 | * @eqlist: | 11238 | * @eqlist: eq list to append to |
| 11132 | */ | 11239 | */ |
| 11133 | static int | 11240 | static int |
| 11134 | lpfc_cpuhp_get_eq(struct lpfc_hba *phba, unsigned int cpu, | 11241 | lpfc_cpuhp_get_eq(struct lpfc_hba *phba, unsigned int cpu, |
| @@ -11417,9 +11524,9 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba) · 282 unmodified lines | |||
| 11417 | char *name; | 11524 | char *name; |
| 11418 | const struct cpumask *aff_mask = NULL; | 11525 | const struct cpumask *aff_mask = NULL; |
| 11419 | unsigned int cpu = 0, cpu_cnt = 0, cpu_select = nr_cpu_ids; | 11526 | unsigned int cpu = 0, cpu_cnt = 0, cpu_select = nr_cpu_ids; |
| 11527 | struct lpfc_vector_map_info *cpup; | ||
| 11420 | struct lpfc_hba_eq_hdl *eqhdl; | 11528 | struct lpfc_hba_eq_hdl *eqhdl; |
| 11421 | const struct cpumask *maskp; | 11529 | const struct cpumask *maskp; |
| 11422 | bool first; | ||
| 11423 | unsigned int flags = PCI_IRQ_MSIX; | 11530 | unsigned int flags = PCI_IRQ_MSIX; |
| 11424 | 11531 | ||
| 11425 | /* Set up MSI-X multi-message vectors */ | 11532 | /* Set up MSI-X multi-message vectors */ |
| @@ -11492,24 +11599,34 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba) · 66 unmodified lines | |||
| 11492 | } else { | 11599 | } else { |
| 11493 | maskp = pci_irq_get_affinity(phba->pcidev, index); | 11600 | maskp = pci_irq_get_affinity(phba->pcidev, index); |
| 11494 | 11601 | ||
| 11495 | first = true; | ||
| 11496 | /* Loop through all CPUs associated with vector index */ | 11602 | /* Loop through all CPUs associated with vector index */ |
| 11497 | for_each_cpu_and(cpu, maskp, cpu_present_mask) { | 11603 | for_each_cpu_and(cpu, maskp, cpu_present_mask) { |
| 11604 | cpup = &phba->sli4_hba.cpu_map[cpu]; | ||
| 11605 | |||
| 11498 | /* If this is the first CPU thats assigned to | 11606 | /* If this is the first CPU thats assigned to |
| 11499 | * this vector, set LPFC_CPU_FIRST_IRQ. | 11607 | * this vector, set LPFC_CPU_FIRST_IRQ. |
| 11608 | * | ||
| 11609 | * With certain platforms its possible that irq | ||
| 11610 | * vectors are affinitized to all the cpu's. | ||
| 11611 | * This can result in each cpu_map.eq to be set | ||
| 11612 | * to the last vector, resulting in overwrite | ||
| 11613 | * of all the previous cpu_map.eq. Ensure that | ||
| 11614 | * each vector receives a place in cpu_map. | ||
| 11615 | * Later call to lpfc_cpu_affinity_check will | ||
| 11616 | * ensure we are nicely balanced out. | ||
| 11500 | */ | 11617 | */ |
| 11618 | if (cpup->eq != LPFC_VECTOR_MAP_EMPTY) | ||
| 11619 | continue; | ||
| 11501 | lpfc_assign_eq_map_info(phba, index, | 11620 | lpfc_assign_eq_map_info(phba, index, |
| 11502 | first ? | 11621 | LPFC_CPU_FIRST_IRQ, |
| 11503 | LPFC_CPU_FIRST_IRQ : 0, | ||
| 11504 | cpu); | 11622 | cpu); |
| 11505 | if (first) | 11623 | break; |
| 11506 | first = false; | ||
| 11507 | } | 11624 | } |
| 11508 | } | 11625 | } |
| 11509 | } | 11626 | } |
| 11510 | 11627 | ||
| 11511 | if (vectors != phba->cfg_irq_chann) { | 11628 | if (vectors != phba->cfg_irq_chann) { |
| 11512 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11629 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 11513 | "3238 Reducing IO channels to match number of " | 11630 | "3238 Reducing IO channels to match number of " |
| 11514 | "MSI-X vectors, requested %d got %d\n", | 11631 | "MSI-X vectors, requested %d got %d\n", |
| 11515 | phba->cfg_irq_chann, vectors); | 11632 | phba->cfg_irq_chann, vectors); |
| @@ -11593,6 +11710,7 @@ lpfc_sli4_enable_msi(struct lpfc_hba *phba) · 77 unmodified lines | |||
| 11593 | /** | 11710 | /** |
| 11594 | * lpfc_sli4_enable_intr - Enable device interrupt to SLI-4 device | 11711 | * lpfc_sli4_enable_intr - Enable device interrupt to SLI-4 device |
| 11595 | * @phba: pointer to lpfc hba data structure. | 11712 | * @phba: pointer to lpfc hba data structure. |
| 11713 | * @cfg_mode: Interrupt configuration mode (INTx, MSI or MSI-X). | ||
| 11596 | * | 11714 | * |
| 11597 | * This routine is invoked to enable device interrupt and associate driver's | 11715 | * This routine is invoked to enable device interrupt and associate driver's |
| 11598 | * interrupt handler(s) to interrupt vector(s) to device with SLI-4 | 11716 | * interrupt handler(s) to interrupt vector(s) to device with SLI-4 |
| @@ -11782,17 +11900,17 @@ lpfc_sli4_xri_exchange_busy_wait(struct lpfc_hba *phba) · 183 unmodified lines | |||
| 11782 | while (!els_xri_cmpl || !io_xri_cmpl || !nvmet_xri_cmpl) { | 11900 | while (!els_xri_cmpl || !io_xri_cmpl || !nvmet_xri_cmpl) { |
| 11783 | if (wait_time > LPFC_XRI_EXCH_BUSY_WAIT_TMO) { | 11901 | if (wait_time > LPFC_XRI_EXCH_BUSY_WAIT_TMO) { |
| 11784 | if (!nvmet_xri_cmpl) | 11902 | if (!nvmet_xri_cmpl) |
| 11785 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11903 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 11786 | "6424 NVMET XRI exchange busy " | 11904 | "6424 NVMET XRI exchange busy " |
| 11787 | "wait time: %d seconds.\n", | 11905 | "wait time: %d seconds.\n", |
| 11788 | wait_time/1000); | 11906 | wait_time/1000); |
| 11789 | if (!io_xri_cmpl) | 11907 | if (!io_xri_cmpl) |
| 11790 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11908 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 11791 | "6100 IO XRI exchange busy " | 11909 | "6100 IO XRI exchange busy " |
| 11792 | "wait time: %d seconds.\n", | 11910 | "wait time: %d seconds.\n", |
| 11793 | wait_time/1000); | 11911 | wait_time/1000); |
| 11794 | if (!els_xri_cmpl) | 11912 | if (!els_xri_cmpl) |
| 11795 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11913 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 11796 | "2878 ELS XRI exchange busy " | 11914 | "2878 ELS XRI exchange busy " |
| 11797 | "wait time: %d seconds.\n", | 11915 | "wait time: %d seconds.\n", |
| 11798 | wait_time/1000); | 11916 | wait_time/1000); |
| @@ -12287,14 +12405,14 @@ lpfc_pci_probe_one_s3(struct pci_dev *pdev, const struct pci_device_id *pid) · 488 unmodified lines | |||
| 12287 | /* Configure and enable interrupt */ | 12405 | /* Configure and enable interrupt */ |
| 12288 | intr_mode = lpfc_sli_enable_intr(phba, cfg_mode); | 12406 | intr_mode = lpfc_sli_enable_intr(phba, cfg_mode); |
| 12289 | if (intr_mode == LPFC_INTR_ERROR) { | 12407 | if (intr_mode == LPFC_INTR_ERROR) { |
| 12290 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12408 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12291 | "0431 Failed to enable interrupt.\n"); | 12409 | "0431 Failed to enable interrupt.\n"); |
| 12292 | error = -ENODEV; | 12410 | error = -ENODEV; |
| 12293 | goto out_free_sysfs_attr; | 12411 | goto out_free_sysfs_attr; |
| 12294 | } | 12412 | } |
| 12295 | /* SLI-3 HBA setup */ | 12413 | /* SLI-3 HBA setup */ |
| 12296 | if (lpfc_sli_hba_setup(phba)) { | 12414 | if (lpfc_sli_hba_setup(phba)) { |
| 12297 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12415 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12298 | "1477 Failed to set up hba\n"); | 12416 | "1477 Failed to set up hba\n"); |
| 12299 | error = -ENODEV; | 12417 | error = -ENODEV; |
| 12300 | goto out_remove_device; | 12418 | goto out_remove_device; |
| @@ -12552,7 +12670,7 @@ lpfc_pci_resume_one_s3(struct pci_dev *pdev) · 251 unmodified lines | |||
| 12552 | /* Configure and enable interrupt */ | 12670 | /* Configure and enable interrupt */ |
| 12553 | intr_mode = lpfc_sli_enable_intr(phba, phba->intr_mode); | 12671 | intr_mode = lpfc_sli_enable_intr(phba, phba->intr_mode); |
| 12554 | if (intr_mode == LPFC_INTR_ERROR) { | 12672 | if (intr_mode == LPFC_INTR_ERROR) { |
| 12555 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12673 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12556 | "0430 PM resume Failed to enable interrupt\n"); | 12674 | "0430 PM resume Failed to enable interrupt\n"); |
| 12557 | return -EIO; | 12675 | return -EIO; |
| 12558 | } else | 12676 | } else |
| @@ -12578,7 +12696,7 @@ lpfc_pci_resume_one_s3(struct pci_dev *pdev) · 19 unmodified lines | |||
| 12578 | static void | 12696 | static void |
| 12579 | lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba) | 12697 | lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba) |
| 12580 | { | 12698 | { |
| 12581 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12699 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12582 | "2723 PCI channel I/O abort preparing for recovery\n"); | 12700 | "2723 PCI channel I/O abort preparing for recovery\n"); |
| 12583 | 12701 | ||
| 12584 | /* | 12702 | /* |
| @@ -12599,7 +12717,7 @@ lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba) · 14 unmodified lines | |||
| 12599 | static void | 12717 | static void |
| 12600 | lpfc_sli_prep_dev_for_reset(struct lpfc_hba *phba) | 12718 | lpfc_sli_prep_dev_for_reset(struct lpfc_hba *phba) |
| 12601 | { | 12719 | { |
| 12602 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12720 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12603 | "2710 PCI channel disable preparing for reset\n"); | 12721 | "2710 PCI channel disable preparing for reset\n"); |
| 12604 | 12722 | ||
| 12605 | /* Block any management I/Os to the device */ | 12723 | /* Block any management I/Os to the device */ |
| @@ -12630,7 +12748,7 @@ lpfc_sli_prep_dev_for_reset(struct lpfc_hba *phba) · 24 unmodified lines | |||
| 12630 | static void | 12748 | static void |
| 12631 | lpfc_sli_prep_dev_for_perm_failure(struct lpfc_hba *phba) | 12749 | lpfc_sli_prep_dev_for_perm_failure(struct lpfc_hba *phba) |
| 12632 | { | 12750 | { |
| 12633 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12751 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12634 | "2711 PCI channel permanent disable for failure\n"); | 12752 | "2711 PCI channel permanent disable for failure\n"); |
| 12635 | /* Block all SCSI devices' I/Os on the host */ | 12753 | /* Block all SCSI devices' I/Os on the host */ |
| 12636 | lpfc_scsi_dev_block(phba); | 12754 | lpfc_scsi_dev_block(phba); |
| @@ -12681,7 +12799,7 @@ lpfc_io_error_detected_s3(struct pci_dev *pdev, pci_channel_state_t state) · 44 unmodified lines | |||
| 12681 | return PCI_ERS_RESULT_DISCONNECT; | 12799 | return PCI_ERS_RESULT_DISCONNECT; |
| 12682 | default: | 12800 | default: |
| 12683 | /* Unknown state, prepare and request slot reset */ | 12801 | /* Unknown state, prepare and request slot reset */ |
| 12684 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12802 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12685 | "0472 Unknown PCI error state: x%x\n", state); | 12803 | "0472 Unknown PCI error state: x%x\n", state); |
| 12686 | lpfc_sli_prep_dev_for_reset(phba); | 12804 | lpfc_sli_prep_dev_for_reset(phba); |
| 12687 | return PCI_ERS_RESULT_NEED_RESET; | 12805 | return PCI_ERS_RESULT_NEED_RESET; |
| @@ -12739,7 +12857,7 @@ lpfc_io_slot_reset_s3(struct pci_dev *pdev) · 51 unmodified lines | |||
| 12739 | /* Configure and enable interrupt */ | 12857 | /* Configure and enable interrupt */ |
| 12740 | intr_mode = lpfc_sli_enable_intr(phba, phba->intr_mode); | 12858 | intr_mode = lpfc_sli_enable_intr(phba, phba->intr_mode); |
| 12741 | if (intr_mode == LPFC_INTR_ERROR) { | 12859 | if (intr_mode == LPFC_INTR_ERROR) { |
| 12742 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12860 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12743 | "0427 Cannot re-enable interrupt after " | 12861 | "0427 Cannot re-enable interrupt after " |
| 12744 | "slot reset.\n"); | 12862 | "slot reset.\n"); |
| 12745 | return PCI_ERS_RESULT_DISCONNECT; | 12863 | return PCI_ERS_RESULT_DISCONNECT; |
| @@ -12842,7 +12960,7 @@ lpfc_log_write_firmware_error(struct lpfc_hba *phba, uint32_t offset, · 96 unmodified lines | |||
| 12842 | magic_number != MAGIC_NUMBER_G6) || | 12960 | magic_number != MAGIC_NUMBER_G6) || |
| 12843 | (phba->pcidev->device == PCI_DEVICE_ID_LANCER_G7_FC && | 12961 | (phba->pcidev->device == PCI_DEVICE_ID_LANCER_G7_FC && |
| 12844 | magic_number != MAGIC_NUMBER_G7)) { | 12962 | magic_number != MAGIC_NUMBER_G7)) { |
| 12845 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12963 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12846 | "3030 This firmware version is not supported on" | 12964 | "3030 This firmware version is not supported on" |
| 12847 | " this HBA model. Device:%x Magic:%x Type:%x " | 12965 | " this HBA model. Device:%x Magic:%x Type:%x " |
| 12848 | "ID:%x Size %d %zd\n", | 12966 | "ID:%x Size %d %zd\n", |
| @@ -12850,7 +12968,7 @@ lpfc_log_write_firmware_error(struct lpfc_hba *phba, uint32_t offset, · 1 unmodified line | |||
| 12850 | fsize, fw->size); | 12968 | fsize, fw->size); |
| 12851 | rc = -EINVAL; | 12969 | rc = -EINVAL; |
| 12852 | } else if (offset == ADD_STATUS_FW_DOWNLOAD_HW_DISABLED) { | 12970 | } else if (offset == ADD_STATUS_FW_DOWNLOAD_HW_DISABLED) { |
| 12853 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12971 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12854 | "3021 Firmware downloads have been prohibited " | 12972 | "3021 Firmware downloads have been prohibited " |
| 12855 | "by a system configuration setting on " | 12973 | "by a system configuration setting on " |
| 12856 | "Device:%x Magic:%x Type:%x ID:%x Size %d " | 12974 | "Device:%x Magic:%x Type:%x ID:%x Size %d " |
| @@ -12859,7 +12977,7 @@ lpfc_log_write_firmware_error(struct lpfc_hba *phba, uint32_t offset, · 2 unmodified lines | |||
| 12859 | fsize, fw->size); | 12977 | fsize, fw->size); |
| 12860 | rc = -EACCES; | 12978 | rc = -EACCES; |
| 12861 | } else { | 12979 | } else { |
| 12862 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12980 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12863 | "3022 FW Download failed. Add Status x%x " | 12981 | "3022 FW Download failed. Add Status x%x " |
| 12864 | "Device:%x Magic:%x Type:%x ID:%x Size %d " | 12982 | "Device:%x Magic:%x Type:%x ID:%x Size %d " |
| 12865 | "%zd\n", | 12983 | "%zd\n", |
| @@ -12874,7 +12992,6 @@ lpfc_log_write_firmware_error(struct lpfc_hba *phba, uint32_t offset, · 8 unmodified lines | |||
| 12874 | * lpfc_write_firmware - attempt to write a firmware image to the port | 12992 | * lpfc_write_firmware - attempt to write a firmware image to the port |
| 12875 | * @fw: pointer to firmware image returned from request_firmware. | 12993 | * @fw: pointer to firmware image returned from request_firmware. |
| 12876 | * @context: pointer to firmware image returned from request_firmware. | 12994 | * @context: pointer to firmware image returned from request_firmware. |
| 12877 | * @ret: return value this routine provides to the caller. | ||
| 12878 | * | 12995 | * |
| 12879 | **/ | 12996 | **/ |
| 12880 | static void | 12997 | static void |
| @@ -12904,7 +13021,7 @@ lpfc_write_firmware(const struct firmware *fw, void *context) · 23 unmodified lines | |||
| 12904 | INIT_LIST_HEAD(&dma_buffer_list); | 13021 | INIT_LIST_HEAD(&dma_buffer_list); |
| 12905 | lpfc_decode_firmware_rev(phba, fwrev, 1); | 13022 | lpfc_decode_firmware_rev(phba, fwrev, 1); |
| 12906 | if (strncmp(fwrev, image->revision, strnlen(image->revision, 16))) { | 13023 | if (strncmp(fwrev, image->revision, strnlen(image->revision, 16))) { |
| 12907 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13024 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12908 | "3023 Updating Firmware, Current Version:%s " | 13025 | "3023 Updating Firmware, Current Version:%s " |
| 12909 | "New Version:%s\n", | 13026 | "New Version:%s\n", |
| 12910 | fwrev, image->revision); | 13027 | fwrev, image->revision); |
| @@ -12954,7 +13071,7 @@ lpfc_write_firmware(const struct firmware *fw, void *context) · 43 unmodified lines | |||
| 12954 | } | 13071 | } |
| 12955 | rc = offset; | 13072 | rc = offset; |
| 12956 | } else | 13073 | } else |
| 12957 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13074 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12958 | "3029 Skipped Firmware update, Current " | 13075 | "3029 Skipped Firmware update, Current " |
| 12959 | "Version:%s New Version:%s\n", | 13076 | "Version:%s New Version:%s\n", |
| 12960 | fwrev, image->revision); | 13077 | fwrev, image->revision); |
| @@ -12969,16 +13086,17 @@ release_out: · 8 unmodified lines | |||
| 12969 | release_firmware(fw); | 13086 | release_firmware(fw); |
| 12970 | out: | 13087 | out: |
| 12971 | if (rc < 0) | 13088 | if (rc < 0) |
| 12972 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13089 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12973 | "3062 Firmware update error, status %d.\n", rc); | 13090 | "3062 Firmware update error, status %d.\n", rc); |
| 12974 | else | 13091 | else |
| 12975 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13092 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12976 | "3024 Firmware update success: size %d.\n", rc); | 13093 | "3024 Firmware update success: size %d.\n", rc); |
| 12977 | } | 13094 | } |
| 12978 | 13095 | ||
| 12979 | /** | 13096 | /** |
| 12980 | * lpfc_sli4_request_firmware_update - Request linux generic firmware upgrade | 13097 | * lpfc_sli4_request_firmware_update - Request linux generic firmware upgrade |
| 12981 | * @phba: pointer to lpfc hba data structure. | 13098 | * @phba: pointer to lpfc hba data structure. |
| 13099 | * @fw_upgrade: which firmware to update. | ||
| 12982 | * | 13100 | * |
| 12983 | * This routine is called to perform Linux generic firmware upgrade on device | 13101 | * This routine is called to perform Linux generic firmware upgrade on device |
| 12984 | * that supports such feature. | 13102 | * that supports such feature. |
| @@ -13101,7 +13219,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) · 116 unmodified lines | |||
| 13101 | /* Configure and enable interrupt */ | 13219 | /* Configure and enable interrupt */ |
| 13102 | intr_mode = lpfc_sli4_enable_intr(phba, cfg_mode); | 13220 | intr_mode = lpfc_sli4_enable_intr(phba, cfg_mode); |
| 13103 | if (intr_mode == LPFC_INTR_ERROR) { | 13221 | if (intr_mode == LPFC_INTR_ERROR) { |
| 13104 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13222 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13105 | "0426 Failed to enable interrupt.\n"); | 13223 | "0426 Failed to enable interrupt.\n"); |
| 13106 | error = -ENODEV; | 13224 | error = -ENODEV; |
| 13107 | goto out_unset_driver_resource; | 13225 | goto out_unset_driver_resource; |
| @@ -13136,7 +13254,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) · 28 unmodified lines | |||
| 13136 | 13254 | ||
| 13137 | /* Set up SLI-4 HBA */ | 13255 | /* Set up SLI-4 HBA */ |
| 13138 | if (lpfc_sli4_hba_setup(phba)) { | 13256 | if (lpfc_sli4_hba_setup(phba)) { |
| 13139 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13257 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13140 | "1421 Failed to set up hba\n"); | 13258 | "1421 Failed to set up hba\n"); |
| 13141 | error = -ENODEV; | 13259 | error = -ENODEV; |
| 13142 | goto out_free_sysfs_attr; | 13260 | goto out_free_sysfs_attr; |
| @@ -13161,7 +13279,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid) · 18 unmodified lines | |||
| 13161 | */ | 13279 | */ |
| 13162 | error = lpfc_nvme_create_localport(vport); | 13280 | error = lpfc_nvme_create_localport(vport); |
| 13163 | if (error) { | 13281 | if (error) { |
| 13164 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13282 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13165 | "6004 NVME registration " | 13283 | "6004 NVME registration " |
| 13166 | "failed, error x%x\n", | 13284 | "failed, error x%x\n", |
| 13167 | error); | 13285 | error); |
| @@ -13395,7 +13513,7 @@ lpfc_pci_resume_one_s4(struct pci_dev *pdev) · 227 unmodified lines | |||
| 13395 | /* Configure and enable interrupt */ | 13513 | /* Configure and enable interrupt */ |
| 13396 | intr_mode = lpfc_sli4_enable_intr(phba, phba->intr_mode); | 13514 | intr_mode = lpfc_sli4_enable_intr(phba, phba->intr_mode); |
| 13397 | if (intr_mode == LPFC_INTR_ERROR) { | 13515 | if (intr_mode == LPFC_INTR_ERROR) { |
| 13398 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13516 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13399 | "0294 PM resume Failed to enable interrupt\n"); | 13517 | "0294 PM resume Failed to enable interrupt\n"); |
| 13400 | return -EIO; | 13518 | return -EIO; |
| 13401 | } else | 13519 | } else |
| @@ -13421,7 +13539,7 @@ lpfc_pci_resume_one_s4(struct pci_dev *pdev) · 19 unmodified lines | |||
| 13421 | static void | 13539 | static void |
| 13422 | lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba) | 13540 | lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba) |
| 13423 | { | 13541 | { |
| 13424 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13542 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13425 | "2828 PCI channel I/O abort preparing for recovery\n"); | 13543 | "2828 PCI channel I/O abort preparing for recovery\n"); |
| 13426 | /* | 13544 | /* |
| 13427 | * There may be errored I/Os through HBA, abort all I/Os on txcmplq | 13545 | * There may be errored I/Os through HBA, abort all I/Os on txcmplq |
| @@ -13441,7 +13559,7 @@ lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba) · 13 unmodified lines | |||
| 13441 | static void | 13559 | static void |
| 13442 | lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba) | 13560 | lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba) |
| 13443 | { | 13561 | { |
| 13444 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13562 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13445 | "2826 PCI channel disable preparing for reset\n"); | 13563 | "2826 PCI channel disable preparing for reset\n"); |
| 13446 | 13564 | ||
| 13447 | /* Block any management I/Os to the device */ | 13565 | /* Block any management I/Os to the device */ |
| @@ -13473,7 +13591,7 @@ lpfc_sli4_prep_dev_for_reset(struct lpfc_hba *phba) · 25 unmodified lines | |||
| 13473 | static void | 13591 | static void |
| 13474 | lpfc_sli4_prep_dev_for_perm_failure(struct lpfc_hba *phba) | 13592 | lpfc_sli4_prep_dev_for_perm_failure(struct lpfc_hba *phba) |
| 13475 | { | 13593 | { |
| 13476 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13594 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13477 | "2827 PCI channel permanent disable for failure\n"); | 13595 | "2827 PCI channel permanent disable for failure\n"); |
| 13478 | 13596 | ||
| 13479 | /* Block all SCSI devices' I/Os on the host */ | 13597 | /* Block all SCSI devices' I/Os on the host */ |
| @@ -13523,7 +13641,7 @@ lpfc_io_error_detected_s4(struct pci_dev *pdev, pci_channel_state_t state) · 43 unmodified lines | |||
| 13523 | return PCI_ERS_RESULT_DISCONNECT; | 13641 | return PCI_ERS_RESULT_DISCONNECT; |
| 13524 | default: | 13642 | default: |
| 13525 | /* Unknown state, prepare and request slot reset */ | 13643 | /* Unknown state, prepare and request slot reset */ |
| 13526 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13644 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13527 | "2825 Unknown PCI error state: x%x\n", state); | 13645 | "2825 Unknown PCI error state: x%x\n", state); |
| 13528 | lpfc_sli4_prep_dev_for_reset(phba); | 13646 | lpfc_sli4_prep_dev_for_reset(phba); |
| 13529 | return PCI_ERS_RESULT_NEED_RESET; | 13647 | return PCI_ERS_RESULT_NEED_RESET; |
| @@ -13581,7 +13699,7 @@ lpfc_io_slot_reset_s4(struct pci_dev *pdev) · 51 unmodified lines | |||
| 13581 | /* Configure and enable interrupt */ | 13699 | /* Configure and enable interrupt */ |
| 13582 | intr_mode = lpfc_sli4_enable_intr(phba, phba->intr_mode); | 13700 | intr_mode = lpfc_sli4_enable_intr(phba, phba->intr_mode); |
| 13583 | if (intr_mode == LPFC_INTR_ERROR) { | 13701 | if (intr_mode == LPFC_INTR_ERROR) { |
| 13584 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13702 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13585 | "2824 Cannot re-enable interrupt after " | 13703 | "2824 Cannot re-enable interrupt after " |
| 13586 | "slot reset.\n"); | 13704 | "slot reset.\n"); |
| 13587 | return PCI_ERS_RESULT_DISCONNECT; | 13705 | return PCI_ERS_RESULT_DISCONNECT; |
| @@ -13686,7 +13804,7 @@ lpfc_pci_remove_one(struct pci_dev *pdev) · 98 unmodified lines | |||
| 13686 | lpfc_pci_remove_one_s4(pdev); | 13804 | lpfc_pci_remove_one_s4(pdev); |
| 13687 | break; | 13805 | break; |
| 13688 | default: | 13806 | default: |
| 13689 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13807 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13690 | "1424 Invalid PCI device group: 0x%x\n", | 13808 | "1424 Invalid PCI device group: 0x%x\n", |
| 13691 | phba->pci_dev_grp); | 13809 | phba->pci_dev_grp); |
| 13692 | break; | 13810 | break; |
| @@ -13723,7 +13841,7 @@ lpfc_pci_suspend_one(struct pci_dev *pdev, pm_message_t msg) · 30 unmodified lines | |||
| 13723 | rc = lpfc_pci_suspend_one_s4(pdev, msg); | 13841 | rc = lpfc_pci_suspend_one_s4(pdev, msg); |
| 13724 | break; | 13842 | break; |
| 13725 | default: | 13843 | default: |
| 13726 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13844 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13727 | "1425 Invalid PCI device group: 0x%x\n", | 13845 | "1425 Invalid PCI device group: 0x%x\n", |
| 13728 | phba->pci_dev_grp); | 13846 | phba->pci_dev_grp); |
| 13729 | break; | 13847 | break; |
| @@ -13759,7 +13877,7 @@ lpfc_pci_resume_one(struct pci_dev *pdev) · 29 unmodified lines | |||
| 13759 | rc = lpfc_pci_resume_one_s4(pdev); | 13877 | rc = lpfc_pci_resume_one_s4(pdev); |
| 13760 | break; | 13878 | break; |
| 13761 | default: | 13879 | default: |
| 13762 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13880 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13763 | "1426 Invalid PCI device group: 0x%x\n", | 13881 | "1426 Invalid PCI device group: 0x%x\n", |
| 13764 | phba->pci_dev_grp); | 13882 | phba->pci_dev_grp); |
| 13765 | break; | 13883 | break; |
| @@ -13797,7 +13915,7 @@ lpfc_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) · 31 unmodified lines | |||
| 13797 | rc = lpfc_io_error_detected_s4(pdev, state); | 13915 | rc = lpfc_io_error_detected_s4(pdev, state); |
| 13798 | break; | 13916 | break; |
| 13799 | default: | 13917 | default: |
| 13800 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13918 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13801 | "1427 Invalid PCI device group: 0x%x\n", | 13919 | "1427 Invalid PCI device group: 0x%x\n", |
| 13802 | phba->pci_dev_grp); | 13920 | phba->pci_dev_grp); |
| 13803 | break; | 13921 | break; |
| @@ -13834,7 +13952,7 @@ lpfc_io_slot_reset(struct pci_dev *pdev) · 30 unmodified lines | |||
| 13834 | rc = lpfc_io_slot_reset_s4(pdev); | 13952 | rc = lpfc_io_slot_reset_s4(pdev); |
| 13835 | break; | 13953 | break; |
| 13836 | default: | 13954 | default: |
| 13837 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13955 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13838 | "1428 Invalid PCI device group: 0x%x\n", | 13956 | "1428 Invalid PCI device group: 0x%x\n", |
| 13839 | phba->pci_dev_grp); | 13957 | phba->pci_dev_grp); |
| 13840 | break; | 13958 | break; |
| @@ -13866,7 +13984,7 @@ lpfc_io_resume(struct pci_dev *pdev) · 25 unmodified lines | |||
| 13866 | lpfc_io_resume_s4(pdev); | 13984 | lpfc_io_resume_s4(pdev); |
| 13867 | break; | 13985 | break; |
| 13868 | default: | 13986 | default: |
| 13869 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 13987 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13870 | "1429 Invalid PCI device group: 0x%x\n", | 13988 | "1429 Invalid PCI device group: 0x%x\n", |
| 13871 | phba->pci_dev_grp); | 13989 | phba->pci_dev_grp); |
| 13872 | break; | 13990 | break; |
| @@ -13974,8 +14092,8 @@ lpfc_init(void) · 101 unmodified lines | |||
| 13974 | { | 14092 | { |
| 13975 | int error = 0; | 14093 | int error = 0; |
| 13976 | 14094 | ||
| 13977 | printk(LPFC_MODULE_DESC "\n"); | 14095 | pr_info(LPFC_MODULE_DESC "\n"); |
| 13978 | printk(LPFC_COPYRIGHT "\n"); | 14096 | pr_info(LPFC_COPYRIGHT "\n"); |
| 13979 | 14097 | ||
| 13980 | error = misc_register(&lpfc_mgmt_dev); | 14098 | error = misc_register(&lpfc_mgmt_dev); |
| 13981 | if (error) | 14099 | if (error) |
| @@ -14022,6 +14140,85 @@ cpuhp_failure: · 40 unmodified lines | |||
| 14022 | return error; | 14140 | return error; |
| 14023 | } | 14141 | } |
| 14024 | 14142 | ||
| 14143 | void lpfc_dmp_dbg(struct lpfc_hba *phba) | ||
| 14144 | { | ||
| 14145 | unsigned int start_idx; | ||
| 14146 | unsigned int dbg_cnt; | ||
| 14147 | unsigned int temp_idx; | ||
| 14148 | int i; | ||
| 14149 | int j = 0; | ||
| 14150 | unsigned long rem_nsec; | ||
| 14151 | |||
| 14152 | if (phba->cfg_log_verbose) | ||
| 14153 | return; | ||
| 14154 | |||
| 14155 | if (atomic_cmpxchg(&phba->dbg_log_dmping, 0, 1) != 0) | ||
| 14156 | return; | ||
| 14157 | |||
| 14158 | start_idx = (unsigned int)atomic_read(&phba->dbg_log_idx) % DBG_LOG_SZ; | ||
| 14159 | dbg_cnt = (unsigned int)atomic_read(&phba->dbg_log_cnt); | ||
| 14160 | temp_idx = start_idx; | ||
| 14161 | if (dbg_cnt >= DBG_LOG_SZ) { | ||
| 14162 | dbg_cnt = DBG_LOG_SZ; | ||
| 14163 | temp_idx -= 1; | ||
| 14164 | } else { | ||
| 14165 | if ((start_idx + dbg_cnt) > (DBG_LOG_SZ - 1)) { | ||
| 14166 | temp_idx = (start_idx + dbg_cnt) % DBG_LOG_SZ; | ||
| 14167 | } else { | ||
| 14168 | if (start_idx < dbg_cnt) | ||
| 14169 | start_idx = DBG_LOG_SZ - (dbg_cnt - start_idx); | ||
| 14170 | else | ||
| 14171 | start_idx -= dbg_cnt; | ||
| 14172 | } | ||
| 14173 | } | ||
| 14174 | dev_info(&phba->pcidev->dev, "start %d end %d cnt %d\n", | ||
| 14175 | start_idx, temp_idx, dbg_cnt); | ||
| 14176 | |||
| 14177 | for (i = 0; i < dbg_cnt; i++) { | ||
| 14178 | if ((start_idx + i) < DBG_LOG_SZ) | ||
| 14179 | temp_idx = (start_idx + i) % DBG_LOG_SZ; | ||
| 14180 | else | ||
| 14181 | temp_idx = j++; | ||
| 14182 | rem_nsec = do_div(phba->dbg_log[temp_idx].t_ns, NSEC_PER_SEC); | ||
| 14183 | dev_info(&phba->pcidev->dev, "%d: [%5lu.%06lu] %s", | ||
| 14184 | temp_idx, | ||
| 14185 | (unsigned long)phba->dbg_log[temp_idx].t_ns, | ||
| 14186 | rem_nsec / 1000, | ||
| 14187 | phba->dbg_log[temp_idx].log); | ||
| 14188 | } | ||
| 14189 | atomic_set(&phba->dbg_log_cnt, 0); | ||
| 14190 | atomic_set(&phba->dbg_log_dmping, 0); | ||
| 14191 | } | ||
| 14192 | |||
| 14193 | __printf(2, 3) | ||
| 14194 | void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...) | ||
| 14195 | { | ||
| 14196 | unsigned int idx; | ||
| 14197 | va_list args; | ||
| 14198 | int dbg_dmping = atomic_read(&phba->dbg_log_dmping); | ||
| 14199 | struct va_format vaf; | ||
| 14200 | |||
| 14201 | |||
| 14202 | va_start(args, fmt); | ||
| 14203 | if (unlikely(dbg_dmping)) { | ||
| 14204 | vaf.fmt = fmt; | ||
| 14205 | vaf.va = &args; | ||
| 14206 | dev_info(&phba->pcidev->dev, "%pV", &vaf); | ||
| 14207 | va_end(args); | ||
| 14208 | return; | ||
| 14209 | } | ||
| 14210 | idx = (unsigned int)atomic_fetch_add(1, &phba->dbg_log_idx) % | ||
| 14211 | DBG_LOG_SZ; | ||
| 14212 | |||
| 14213 | atomic_inc(&phba->dbg_log_cnt); | ||
| 14214 | |||
| 14215 | vscnprintf(phba->dbg_log[idx].log, | ||
| 14216 | sizeof(phba->dbg_log[idx].log), fmt, args); | ||
| 14217 | va_end(args); | ||
| 14218 | |||
| 14219 | phba->dbg_log[idx].t_ns = local_clock(); | ||
| 14220 | } | ||
| 14221 | |||
| 14025 | /** | 14222 | /** |
| 14026 | * lpfc_exit - lpfc module removal routine | 14223 | * lpfc_exit - lpfc module removal routine |
| 14027 | * | 14224 | * |
| @@ -44,7 +44,11 @@ · 43 unmodified lines | |||
| 44 | #define LOG_NVME_DISC 0x00200000 /* NVME Discovery/Connect events. */ | 44 | #define LOG_NVME_DISC 0x00200000 /* NVME Discovery/Connect events. */ |
| 45 | #define LOG_NVME_ABTS 0x00400000 /* NVME ABTS events. */ | 45 | #define LOG_NVME_ABTS 0x00400000 /* NVME ABTS events. */ |
| 46 | #define LOG_NVME_IOERR 0x00800000 /* NVME IO Error events. */ | 46 | #define LOG_NVME_IOERR 0x00800000 /* NVME IO Error events. */ |
| 47 | #define LOG_ALL_MSG 0xffffffff /* LOG all messages */ | 47 | #define LOG_TRACE_EVENT 0x80000000 /* Dmp the DBG log on this err */ |
| 48 | #define LOG_ALL_MSG 0x7fffffff /* LOG all messages */ | ||
| 49 | |||
| 50 | void lpfc_dmp_dbg(struct lpfc_hba *phba); | ||
| 51 | void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...); | ||
| 48 | 52 | ||
| 49 | /* generate message by verbose log setting or severity */ | 53 | /* generate message by verbose log setting or severity */ |
| 50 | #define lpfc_vlog_msg(vport, level, mask, fmt, arg...) \ | 54 | #define lpfc_vlog_msg(vport, level, mask, fmt, arg...) \ |
| @@ -65,9 +69,15 @@ do { \ · 14 unmodified lines | |||
| 65 | 69 | ||
| 66 | #define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \ | 70 | #define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \ |
| 67 | do { \ | 71 | do { \ |
| 68 | { if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '3')) \ | 72 | { if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '3')) { \ |
| 73 | if ((mask) & LOG_TRACE_EVENT) \ | ||
| 74 | lpfc_dmp_dbg((vport)->phba); \ | ||
| 69 | dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \ | 75 | dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \ |
| 70 | fmt, (vport)->phba->brd_no, vport->vpi, ##arg); } \ | 76 | fmt, (vport)->phba->brd_no, vport->vpi, ##arg); \ |
| 77 | } else if (!(vport)->cfg_log_verbose) \ | ||
| 78 | lpfc_dbg_print((vport)->phba, "%d:(%d):" fmt, \ | ||
| 79 | (vport)->phba->brd_no, (vport)->vpi, ##arg); \ | ||
| 80 | } \ | ||
| 71 | } while (0) | 81 | } while (0) |
| 72 | 82 | ||
| 73 | #define lpfc_printf_log(phba, level, mask, fmt, arg...) \ | 83 | #define lpfc_printf_log(phba, level, mask, fmt, arg...) \ |
| @@ -75,8 +85,12 @@ do { \ · 1 unmodified line | |||
| 75 | { uint32_t log_verbose = (phba)->pport ? \ | 85 | { uint32_t log_verbose = (phba)->pport ? \ |
| 76 | (phba)->pport->cfg_log_verbose : \ | 86 | (phba)->pport->cfg_log_verbose : \ |
| 77 | (phba)->cfg_log_verbose; \ | 87 | (phba)->cfg_log_verbose; \ |
| 78 | if (((mask) & log_verbose) || (level[1] <= '3')) \ | 88 | if (((mask) & log_verbose) || (level[1] <= '3')) { \ |
| 89 | if ((mask) & LOG_TRACE_EVENT) \ | ||
| 90 | lpfc_dmp_dbg(phba); \ | ||
| 79 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \ | 91 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \ |
| 80 | fmt, phba->brd_no, ##arg); \ | 92 | fmt, phba->brd_no, ##arg); \ |
| 93 | } else if (!(phba)->cfg_log_verbose)\ | ||
| 94 | lpfc_dbg_print(phba, "%d:" fmt, phba->brd_no, ##arg); \ | ||
| 81 | } \ | 95 | } \ |
| 82 | } while (0) | 96 | } while (0) |
| @@ -868,9 +868,7 @@ lpfc_sli4_unreg_all_rpis(struct lpfc_vport *vport) · 867 unmodified lines | |||
| 868 | 868 | ||
| 869 | /** | 869 | /** |
| 870 | * lpfc_reg_vpi - Prepare a mailbox command for registering vport identifier | 870 | * lpfc_reg_vpi - Prepare a mailbox command for registering vport identifier |
| 871 | * @phba: pointer to lpfc hba data structure. | 871 | * @vport: pointer to a vport object. |
| 872 | * @vpi: virtual N_Port identifier. | ||
| 873 | * @sid: Fibre Channel S_ID (N_Port_ID assigned to a virtual N_Port). | ||
| 874 | * @pmb: pointer to the driver internal queue element for mailbox command. | 872 | * @pmb: pointer to the driver internal queue element for mailbox command. |
| 875 | * | 873 | * |
| 876 | * The registration vport identifier mailbox command is used to activate a | 874 | * The registration vport identifier mailbox command is used to activate a |
| @@ -1199,7 +1197,7 @@ lpfc_config_hbq(struct lpfc_hba *phba, uint32_t id, · 322 unmodified lines | |||
| 1199 | /** | 1197 | /** |
| 1200 | * lpfc_config_ring - Prepare a mailbox command for configuring an IOCB ring | 1198 | * lpfc_config_ring - Prepare a mailbox command for configuring an IOCB ring |
| 1201 | * @phba: pointer to lpfc hba data structure. | 1199 | * @phba: pointer to lpfc hba data structure. |
| 1202 | * @ring: | 1200 | * @ring: ring number/index |
| 1203 | * @pmb: pointer to the driver internal queue element for mailbox command. | 1201 | * @pmb: pointer to the driver internal queue element for mailbox command. |
| 1204 | * | 1202 | * |
| 1205 | * The configure ring mailbox command is used to configure an IOCB ring. This | 1203 | * The configure ring mailbox command is used to configure an IOCB ring. This |
| @@ -1613,7 +1611,7 @@ lpfc_mbox_dev_check(struct lpfc_hba *phba) · 407 unmodified lines | |||
| 1613 | /** | 1611 | /** |
| 1614 | * lpfc_mbox_tmo_val - Retrieve mailbox command timeout value | 1612 | * lpfc_mbox_tmo_val - Retrieve mailbox command timeout value |
| 1615 | * @phba: pointer to lpfc hba data structure. | 1613 | * @phba: pointer to lpfc hba data structure. |
| 1616 | * @cmd: mailbox command code. | 1614 | * @mboxq: pointer to the driver internal queue element for mailbox command. |
| 1617 | * | 1615 | * |
| 1618 | * This routine retrieves the proper timeout value according to the mailbox | 1616 | * This routine retrieves the proper timeout value according to the mailbox |
| 1619 | * command code. | 1617 | * command code. |
| @@ -1700,6 +1698,7 @@ lpfc_sli4_mbx_sge_set(struct lpfcMboxq *mbox, uint32_t sgentry, · 80 unmodified lines | |||
| 1700 | * lpfc_sli4_mbx_sge_get - Get a sge entry from non-embedded mailbox command | 1698 | * lpfc_sli4_mbx_sge_get - Get a sge entry from non-embedded mailbox command |
| 1701 | * @mbox: pointer to lpfc mbox command. | 1699 | * @mbox: pointer to lpfc mbox command. |
| 1702 | * @sgentry: sge entry index. | 1700 | * @sgentry: sge entry index. |
| 1701 | * @sge: pointer to lpfc mailbox sge to load into. | ||
| 1703 | * | 1702 | * |
| 1704 | * This routine gets an entry from the non-embedded mailbox command at the sge | 1703 | * This routine gets an entry from the non-embedded mailbox command at the sge |
| 1705 | * index location. | 1704 | * index location. |
| @@ -1767,6 +1766,7 @@ lpfc_sli4_mbox_cmd_free(struct lpfc_hba *phba, struct lpfcMboxq *mbox) · 61 unmodified lines | |||
| 1767 | * @subsystem: The sli4 config sub mailbox subsystem. | 1766 | * @subsystem: The sli4 config sub mailbox subsystem. |
| 1768 | * @opcode: The sli4 config sub mailbox command opcode. | 1767 | * @opcode: The sli4 config sub mailbox command opcode. |
| 1769 | * @length: Length of the sli4 config mailbox command (including sub-header). | 1768 | * @length: Length of the sli4 config mailbox command (including sub-header). |
| 1769 | * @emb: True if embedded mbox command should be setup. | ||
| 1770 | * | 1770 | * |
| 1771 | * This routine sets up the header fields of SLI4 specific mailbox command | 1771 | * This routine sets up the header fields of SLI4 specific mailbox command |
| 1772 | * for sending IOCTL command. | 1772 | * for sending IOCTL command. |
| @@ -2012,6 +2012,7 @@ lpfc_sli_config_mbox_opcode_get(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) · 239 unmodified lines | |||
| 2012 | /** | 2012 | /** |
| 2013 | * lpfc_sli4_mbx_read_fcf_rec - Allocate and construct read fcf mbox cmd | 2013 | * lpfc_sli4_mbx_read_fcf_rec - Allocate and construct read fcf mbox cmd |
| 2014 | * @phba: pointer to lpfc hba data structure. | 2014 | * @phba: pointer to lpfc hba data structure. |
| 2015 | * @mboxq: pointer to lpfc mbox command. | ||
| 2015 | * @fcf_index: index to fcf table. | 2016 | * @fcf_index: index to fcf table. |
| 2016 | * | 2017 | * |
| 2017 | * This routine routine allocates and constructs non-embedded mailbox command | 2018 | * This routine routine allocates and constructs non-embedded mailbox command |
| @@ -2068,6 +2069,7 @@ lpfc_sli4_mbx_read_fcf_rec(struct lpfc_hba *phba, · 50 unmodified lines | |||
| 2068 | 2069 | ||
| 2069 | /** | 2070 | /** |
| 2070 | * lpfc_request_features: Configure SLI4 REQUEST_FEATURES mailbox | 2071 | * lpfc_request_features: Configure SLI4 REQUEST_FEATURES mailbox |
| 2072 | * @phba: pointer to lpfc hba data structure. | ||
| 2071 | * @mboxq: pointer to lpfc mbox command. | 2073 | * @mboxq: pointer to lpfc mbox command. |
| 2072 | * | 2074 | * |
| 2073 | * This routine sets up the mailbox for an SLI4 REQUEST_FEATURES | 2075 | * This routine sets up the mailbox for an SLI4 REQUEST_FEATURES |
| @@ -45,6 +45,7 @@ · 44 unmodified lines | |||
| 45 | #define LPFC_MBUF_POOL_SIZE 64 /* max elements in MBUF safety pool */ | 45 | #define LPFC_MBUF_POOL_SIZE 64 /* max elements in MBUF safety pool */ |
| 46 | #define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA safety pool */ | 46 | #define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA safety pool */ |
| 47 | #define LPFC_DEVICE_DATA_POOL_SIZE 64 /* max elements in device data pool */ | 47 | #define LPFC_DEVICE_DATA_POOL_SIZE 64 /* max elements in device data pool */ |
| 48 | #define LPFC_RRQ_POOL_SIZE 256 /* max elements in non-DMA pool */ | ||
| 48 | 49 | ||
| 49 | int | 50 | int |
| 50 | lpfc_mem_alloc_active_rrq_pool_s4(struct lpfc_hba *phba) { | 51 | lpfc_mem_alloc_active_rrq_pool_s4(struct lpfc_hba *phba) { |
| @@ -67,6 +68,7 @@ lpfc_mem_alloc_active_rrq_pool_s4(struct lpfc_hba *phba) { · 16 unmodified lines | |||
| 67 | /** | 68 | /** |
| 68 | * lpfc_mem_alloc - create and allocate all PCI and memory pools | 69 | * lpfc_mem_alloc - create and allocate all PCI and memory pools |
| 69 | * @phba: HBA to allocate pools for | 70 | * @phba: HBA to allocate pools for |
| 71 | * @align: alignment requirement for blocks; must be a power of two | ||
| 70 | * | 72 | * |
| 71 | * Description: Creates and allocates PCI pools lpfc_mbuf_pool, | 73 | * Description: Creates and allocates PCI pools lpfc_mbuf_pool, |
| 72 | * lpfc_hrb_pool. Creates and allocates kmalloc-backed mempools | 74 | * lpfc_hrb_pool. Creates and allocates kmalloc-backed mempools |
| @@ -121,7 +123,7 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align) · 48 unmodified lines | |||
| 121 | 123 | ||
| 122 | if (phba->sli_rev == LPFC_SLI_REV4) { | 124 | if (phba->sli_rev == LPFC_SLI_REV4) { |
| 123 | phba->rrq_pool = | 125 | phba->rrq_pool = |
| 124 | mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE, | 126 | mempool_create_kmalloc_pool(LPFC_RRQ_POOL_SIZE, |
| 125 | sizeof(struct lpfc_node_rrq)); | 127 | sizeof(struct lpfc_node_rrq)); |
| 126 | if (!phba->rrq_pool) | 128 | if (!phba->rrq_pool) |
| 127 | goto fail_free_nlp_mem_pool; | 129 | goto fail_free_nlp_mem_pool; |
| @@ -152,7 +152,7 @@ lpfc_check_sparm(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 151 unmodified lines | |||
| 152 | memcpy(&ndlp->nlp_portname, &sp->portName, sizeof (struct lpfc_name)); | 152 | memcpy(&ndlp->nlp_portname, &sp->portName, sizeof (struct lpfc_name)); |
| 153 | return 1; | 153 | return 1; |
| 154 | bad_service_param: | 154 | bad_service_param: |
| 155 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 155 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 156 | "0207 Device %x " | 156 | "0207 Device %x " |
| 157 | "(%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x) sent " | 157 | "(%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x) sent " |
| 158 | "invalid service parameters. Ignoring device.\n", | 158 | "invalid service parameters. Ignoring device.\n", |
| @@ -301,7 +301,7 @@ lpfc_defer_pt2pt_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *link_mbox) · 142 unmodified lines | |||
| 301 | 301 | ||
| 302 | /* Check for CONFIG_LINK error */ | 302 | /* Check for CONFIG_LINK error */ |
| 303 | if (mb->mbxStatus) { | 303 | if (mb->mbxStatus) { |
| 304 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 304 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 305 | "4575 CONFIG_LINK fails pt2pt discovery: %x\n", | 305 | "4575 CONFIG_LINK fails pt2pt discovery: %x\n", |
| 306 | mb->mbxStatus); | 306 | mb->mbxStatus); |
| 307 | mempool_free(login_mbox, phba->mbox_mem_pool); | 307 | mempool_free(login_mbox, phba->mbox_mem_pool); |
| @@ -316,7 +316,7 @@ lpfc_defer_pt2pt_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *link_mbox) · 8 unmodified lines | |||
| 316 | rc = lpfc_els_rsp_acc(link_mbox->vport, ELS_CMD_PLOGI, | 316 | rc = lpfc_els_rsp_acc(link_mbox->vport, ELS_CMD_PLOGI, |
| 317 | save_iocb, ndlp, login_mbox); | 317 | save_iocb, ndlp, login_mbox); |
| 318 | if (rc) { | 318 | if (rc) { |
| 319 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 319 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 320 | "4576 PLOGI ACC fails pt2pt discovery: %x\n", | 320 | "4576 PLOGI ACC fails pt2pt discovery: %x\n", |
| 321 | rc); | 321 | rc); |
| 322 | mempool_free(login_mbox, phba->mbox_mem_pool); | 322 | mempool_free(login_mbox, phba->mbox_mem_pool); |
| @@ -361,7 +361,7 @@ lpfc_defer_acc_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 38 unmodified lines | |||
| 361 | lpfc_sli4_unreg_rpi_cmpl_clr(phba, pmb); | 361 | lpfc_sli4_unreg_rpi_cmpl_clr(phba, pmb); |
| 362 | 362 | ||
| 363 | if (!piocb) { | 363 | if (!piocb) { |
| 364 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY | LOG_ELS, | 364 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 365 | "4578 PLOGI ACC fail\n"); | 365 | "4578 PLOGI ACC fail\n"); |
| 366 | if (mbox) | 366 | if (mbox) |
| 367 | mempool_free(mbox, phba->mbox_mem_pool); | 367 | mempool_free(mbox, phba->mbox_mem_pool); |
| @@ -370,7 +370,7 @@ lpfc_defer_acc_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 2 unmodified lines | |||
| 370 | 370 | ||
| 371 | rc = lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, piocb, ndlp, mbox); | 371 | rc = lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, piocb, ndlp, mbox); |
| 372 | if (rc) { | 372 | if (rc) { |
| 373 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY | LOG_ELS, | 373 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 374 | "4579 PLOGI ACC fail %x\n", rc); | 374 | "4579 PLOGI ACC fail %x\n", rc); |
| 375 | if (mbox) | 375 | if (mbox) |
| 376 | mempool_free(mbox, phba->mbox_mem_pool); | 376 | mempool_free(mbox, phba->mbox_mem_pool); |
| @@ -405,7 +405,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 28 unmodified lines | |||
| 405 | lp = (uint32_t *) pcmd->virt; | 405 | lp = (uint32_t *) pcmd->virt; |
| 406 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); | 406 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); |
| 407 | if (wwn_to_u64(sp->portName.u.wwn) == 0) { | 407 | if (wwn_to_u64(sp->portName.u.wwn) == 0) { |
| 408 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 408 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 409 | "0140 PLOGI Reject: invalid nname\n"); | 409 | "0140 PLOGI Reject: invalid nname\n"); |
| 410 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 410 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
| 411 | stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_PNAME; | 411 | stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_PNAME; |
| @@ -414,7 +414,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 2 unmodified lines | |||
| 414 | return 0; | 414 | return 0; |
| 415 | } | 415 | } |
| 416 | if (wwn_to_u64(sp->nodeName.u.wwn) == 0) { | 416 | if (wwn_to_u64(sp->nodeName.u.wwn) == 0) { |
| 417 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 417 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 418 | "0141 PLOGI Reject: invalid pname\n"); | 418 | "0141 PLOGI Reject: invalid pname\n"); |
| 419 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; | 419 | stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; |
| 420 | stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_NNAME; | 420 | stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_NNAME; |
| @@ -481,7 +481,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 60 unmodified lines | |||
| 481 | } | 481 | } |
| 482 | if (nlp_portwwn != 0 && | 482 | if (nlp_portwwn != 0 && |
| 483 | nlp_portwwn != wwn_to_u64(sp->portName.u.wwn)) | 483 | nlp_portwwn != wwn_to_u64(sp->portName.u.wwn)) |
| 484 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 484 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 485 | "0143 PLOGI recv'd from DID: x%x " | 485 | "0143 PLOGI recv'd from DID: x%x " |
| 486 | "WWPN changed: old %llx new %llx\n", | 486 | "WWPN changed: old %llx new %llx\n", |
| 487 | ndlp->nlp_DID, | 487 | ndlp->nlp_DID, |
| @@ -689,7 +689,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 201 unmodified lines | |||
| 689 | return 1; | 689 | return 1; |
| 690 | out: | 690 | out: |
| 691 | if (defer_acc) | 691 | if (defer_acc) |
| 692 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 692 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 693 | "4577 discovery failure: %p %p %p\n", | 693 | "4577 discovery failure: %p %p %p\n", |
| 694 | save_iocb, link_mbox, login_mbox); | 694 | save_iocb, link_mbox, login_mbox); |
| 695 | kfree(save_iocb); | 695 | kfree(save_iocb); |
| @@ -797,11 +797,17 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 101 unmodified lines | |||
| 797 | ndlp, NULL); | 797 | ndlp, NULL); |
| 798 | } | 798 | } |
| 799 | out: | 799 | out: |
| 800 | /* If we are authenticated, move to the proper state */ | 800 | /* If we are authenticated, move to the proper state. |
| 801 | if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET)) | 801 | * It is possible an ADISC arrived and the remote nport |
| 802 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE); | 802 | * is already in MAPPED or UNMAPPED state. Catch this |
| 803 | else | 803 | * condition and don't set the nlp_state again because |
| 804 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE); | 804 | * it causes an unnecessary transport unregister/register. |
| 805 | */ | ||
| 806 | if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET)) { | ||
| 807 | if (ndlp->nlp_state != NLP_STE_MAPPED_NODE) | ||
| 808 | lpfc_nlp_set_state(vport, ndlp, | ||
| 809 | NLP_STE_MAPPED_NODE); | ||
| 810 | } | ||
| 805 | 811 | ||
| 806 | return 1; | 812 | return 1; |
| 807 | } | 813 | } |
| @@ -1062,6 +1068,7 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 254 unmodified lines | |||
| 1062 | * lpfc_release_rpi - Release a RPI by issuing unreg_login mailbox cmd. | 1068 | * lpfc_release_rpi - Release a RPI by issuing unreg_login mailbox cmd. |
| 1063 | * @phba : Pointer to lpfc_hba structure. | 1069 | * @phba : Pointer to lpfc_hba structure. |
| 1064 | * @vport: Pointer to lpfc_vport structure. | 1070 | * @vport: Pointer to lpfc_vport structure. |
| 1071 | * @ndlp: Pointer to lpfc_nodelist structure. | ||
| 1065 | * @rpi : rpi to be release. | 1072 | * @rpi : rpi to be release. |
| 1066 | * | 1073 | * |
| 1067 | * This function will send a unreg_login mailbox command to the firmware | 1074 | * This function will send a unreg_login mailbox command to the firmware |
| @@ -1091,8 +1098,8 @@ lpfc_release_rpi(struct lpfc_hba *phba, struct lpfc_vport *vport, · 23 unmodified lines | |||
| 1091 | pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, | 1098 | pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, |
| 1092 | GFP_KERNEL); | 1099 | GFP_KERNEL); |
| 1093 | if (!pmb) | 1100 | if (!pmb) |
| 1094 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | 1101 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1095 | "2796 mailbox memory allocation failed \n"); | 1102 | "2796 mailbox memory allocation failed \n"); |
| 1096 | else { | 1103 | else { |
| 1097 | lpfc_unreg_login(phba, vport->vpi, rpi, pmb); | 1104 | lpfc_unreg_login(phba, vport->vpi, rpi, pmb); |
| 1098 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; | 1105 | pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; |
| @@ -1130,7 +1137,7 @@ lpfc_disc_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 31 unmodified lines | |||
| 1130 | rpi = pmb->u.mb.un.varWords[0]; | 1137 | rpi = pmb->u.mb.un.varWords[0]; |
| 1131 | lpfc_release_rpi(phba, vport, ndlp, rpi); | 1138 | lpfc_release_rpi(phba, vport, ndlp, rpi); |
| 1132 | } | 1139 | } |
| 1133 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1140 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1134 | "0271 Illegal State Transition: node x%x " | 1141 | "0271 Illegal State Transition: node x%x " |
| 1135 | "event x%x, state x%x Data: x%x x%x\n", | 1142 | "event x%x, state x%x Data: x%x x%x\n", |
| 1136 | ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi, | 1143 | ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi, |
| @@ -1148,11 +1155,11 @@ lpfc_cmpl_plogi_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 11 unmodified lines | |||
| 1148 | * to stop it. | 1155 | * to stop it. |
| 1149 | */ | 1156 | */ |
| 1150 | if (!(ndlp->nlp_flag & NLP_RCV_PLOGI)) { | 1157 | if (!(ndlp->nlp_flag & NLP_RCV_PLOGI)) { |
| 1151 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1158 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1152 | "0272 Illegal State Transition: node x%x " | 1159 | "0272 Illegal State Transition: node x%x " |
| 1153 | "event x%x, state x%x Data: x%x x%x\n", | 1160 | "event x%x, state x%x Data: x%x x%x\n", |
| 1154 | ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi, | 1161 | ndlp->nlp_DID, evt, ndlp->nlp_state, |
| 1155 | ndlp->nlp_flag); | 1162 | ndlp->nlp_rpi, ndlp->nlp_flag); |
| 1156 | } | 1163 | } |
| 1157 | return ndlp->nlp_state; | 1164 | return ndlp->nlp_state; |
| 1158 | } | 1165 | } |
| @@ -1372,7 +1379,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, · 213 unmodified lines | |||
| 1372 | if ((ndlp->nlp_DID != FDMI_DID) && | 1379 | if ((ndlp->nlp_DID != FDMI_DID) && |
| 1373 | (wwn_to_u64(sp->portName.u.wwn) == 0 || | 1380 | (wwn_to_u64(sp->portName.u.wwn) == 0 || |
| 1374 | wwn_to_u64(sp->nodeName.u.wwn) == 0)) { | 1381 | wwn_to_u64(sp->nodeName.u.wwn) == 0)) { |
| 1375 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1382 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1376 | "0142 PLOGI RSP: Invalid WWN.\n"); | 1383 | "0142 PLOGI RSP: Invalid WWN.\n"); |
| 1377 | goto out; | 1384 | goto out; |
| 1378 | } | 1385 | } |
| @@ -1434,7 +1441,8 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, · 55 unmodified lines | |||
| 1434 | } else { | 1441 | } else { |
| 1435 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 1442 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 1436 | if (!mbox) { | 1443 | if (!mbox) { |
| 1437 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1444 | lpfc_printf_vlog(vport, KERN_ERR, |
| 1445 | LOG_TRACE_EVENT, | ||
| 1438 | "0133 PLOGI: no memory " | 1446 | "0133 PLOGI: no memory " |
| 1439 | "for config_link " | 1447 | "for config_link " |
| 1440 | "Data: x%x x%x x%x x%x\n", | 1448 | "Data: x%x x%x x%x x%x\n", |
| @@ -1459,7 +1467,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, · 18 unmodified lines | |||
| 1459 | 1467 | ||
| 1460 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 1468 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 1461 | if (!mbox) { | 1469 | if (!mbox) { |
| 1462 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1470 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1463 | "0018 PLOGI: no memory for reg_login " | 1471 | "0018 PLOGI: no memory for reg_login " |
| 1464 | "Data: x%x x%x x%x x%x\n", | 1472 | "Data: x%x x%x x%x x%x\n", |
| 1465 | ndlp->nlp_DID, ndlp->nlp_state, | 1473 | ndlp->nlp_DID, ndlp->nlp_state, |
| @@ -1499,7 +1507,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, · 33 unmodified lines | |||
| 1499 | kfree(mp); | 1507 | kfree(mp); |
| 1500 | mempool_free(mbox, phba->mbox_mem_pool); | 1508 | mempool_free(mbox, phba->mbox_mem_pool); |
| 1501 | 1509 | ||
| 1502 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1510 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1503 | "0134 PLOGI: cannot issue reg_login " | 1511 | "0134 PLOGI: cannot issue reg_login " |
| 1504 | "Data: x%x x%x x%x x%x\n", | 1512 | "Data: x%x x%x x%x x%x\n", |
| 1505 | ndlp->nlp_DID, ndlp->nlp_state, | 1513 | ndlp->nlp_DID, ndlp->nlp_state, |
| @@ -1507,7 +1515,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, · 1 unmodified line | |||
| 1507 | } else { | 1515 | } else { |
| 1508 | mempool_free(mbox, phba->mbox_mem_pool); | 1516 | mempool_free(mbox, phba->mbox_mem_pool); |
| 1509 | 1517 | ||
| 1510 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1518 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1511 | "0135 PLOGI: cannot format reg_login " | 1519 | "0135 PLOGI: cannot format reg_login " |
| 1512 | "Data: x%x x%x x%x x%x\n", | 1520 | "Data: x%x x%x x%x x%x\n", |
| 1513 | ndlp->nlp_DID, ndlp->nlp_state, | 1521 | ndlp->nlp_DID, ndlp->nlp_state, |
| @@ -1518,7 +1526,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, · 4 unmodified lines | |||
| 1518 | out: | 1526 | out: |
| 1519 | if (ndlp->nlp_DID == NameServer_DID) { | 1527 | if (ndlp->nlp_DID == NameServer_DID) { |
| 1520 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 1528 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
| 1521 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 1529 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1522 | "0261 Cannot Register NameServer login\n"); | 1530 | "0261 Cannot Register NameServer login\n"); |
| 1523 | } | 1531 | } |
| 1524 | 1532 | ||
| @@ -1940,8 +1948,8 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, · 415 unmodified lines | |||
| 1940 | 1948 | ||
| 1941 | if (mb->mbxStatus) { | 1949 | if (mb->mbxStatus) { |
| 1942 | /* RegLogin failed */ | 1950 | /* RegLogin failed */ |
| 1943 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, | 1951 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1944 | "0246 RegLogin failed Data: x%x x%x x%x x%x " | 1952 | "0246 RegLogin failed Data: x%x x%x x%x x%x " |
| 1945 | "x%x\n", | 1953 | "x%x\n", |
| 1946 | did, mb->mbxStatus, vport->port_state, | 1954 | did, mb->mbxStatus, vport->port_state, |
| 1947 | mb->un.varRegLogin.vpi, | 1955 | mb->un.varRegLogin.vpi, |
| @@ -234,8 +234,10 @@ lpfc_nvme_prep_abort_wqe(struct lpfc_iocbq *pwqeq, u16 xritag, u8 opt) · 233 unmodified lines | |||
| 234 | 234 | ||
| 235 | /** | 235 | /** |
| 236 | * lpfc_nvme_create_queue - | 236 | * lpfc_nvme_create_queue - |
| 237 | * @pnvme_lport: Transport localport that LS is to be issued from | ||
| 237 | * @lpfc_pnvme: Pointer to the driver's nvme instance data | 238 | * @lpfc_pnvme: Pointer to the driver's nvme instance data |
| 238 | * @qidx: An cpu index used to affinitize IO queues and MSIX vectors. | 239 | * @qidx: An cpu index used to affinitize IO queues and MSIX vectors. |
| 240 | * @qsize: Size of the queue in bytes | ||
| 239 | * @handle: An opaque driver handle used in follow-up calls. | 241 | * @handle: An opaque driver handle used in follow-up calls. |
| 240 | * | 242 | * |
| 241 | * Driver registers this routine to preallocate and initialize any | 243 | * Driver registers this routine to preallocate and initialize any |
| @@ -292,7 +294,7 @@ lpfc_nvme_create_queue(struct nvme_fc_local_port *pnvme_lport, · 50 unmodified lines | |||
| 292 | 294 | ||
| 293 | /** | 295 | /** |
| 294 | * lpfc_nvme_delete_queue - | 296 | * lpfc_nvme_delete_queue - |
| 295 | * @lpfc_pnvme: Pointer to the driver's nvme instance data | 297 | * @pnvme_lport: Transport localport that LS is to be issued from |
| 296 | * @qidx: An cpu index used to affinitize IO queues and MSIX vectors. | 298 | * @qidx: An cpu index used to affinitize IO queues and MSIX vectors. |
| 297 | * @handle: An opaque driver handle from lpfc_nvme_create_queue | 299 | * @handle: An opaque driver handle from lpfc_nvme_create_queue |
| 298 | * | 300 | * |
| @@ -498,7 +500,7 @@ __lpfc_nvme_ls_req_cmp(struct lpfc_hba *phba, struct lpfc_vport *vport, · 199 unmodified lines | |||
| 498 | if (pnvme_lsreq->done) | 500 | if (pnvme_lsreq->done) |
| 499 | pnvme_lsreq->done(pnvme_lsreq, status); | 501 | pnvme_lsreq->done(pnvme_lsreq, status); |
| 500 | else | 502 | else |
| 501 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_DISC, | 503 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 502 | "6046 NVMEx cmpl without done call back? " | 504 | "6046 NVMEx cmpl without done call back? " |
| 503 | "Data %px DID %x Xri: %x status %x\n", | 505 | "Data %px DID %x Xri: %x status %x\n", |
| 504 | pnvme_lsreq, ndlp ? ndlp->nlp_DID : 0, | 506 | pnvme_lsreq, ndlp ? ndlp->nlp_DID : 0, |
| @@ -647,7 +649,7 @@ lpfc_nvme_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, · 142 unmodified lines | |||
| 647 | 649 | ||
| 648 | rc = lpfc_sli4_issue_wqe(phba, &phba->sli4_hba.hdwq[0], genwqe); | 650 | rc = lpfc_sli4_issue_wqe(phba, &phba->sli4_hba.hdwq[0], genwqe); |
| 649 | if (rc) { | 651 | if (rc) { |
| 650 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_DISC | LOG_ELS, | 652 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 651 | "6045 Issue GEN REQ WQE to NPORT x%x " | 653 | "6045 Issue GEN REQ WQE to NPORT x%x " |
| 652 | "Data: x%x x%x rc x%x\n", | 654 | "Data: x%x x%x rc x%x\n", |
| 653 | ndlp->nlp_DID, genwqe->iotag, | 655 | ndlp->nlp_DID, genwqe->iotag, |
| @@ -672,6 +674,7 @@ lpfc_nvme_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, · 18 unmodified lines | |||
| 672 | * @vport: The local port issuing the LS | 674 | * @vport: The local port issuing the LS |
| 673 | * @ndlp: The remote port to send the LS to | 675 | * @ndlp: The remote port to send the LS to |
| 674 | * @pnvme_lsreq: Pointer to LS request structure from the transport | 676 | * @pnvme_lsreq: Pointer to LS request structure from the transport |
| 677 | * @gen_req_cmp: Completion call-back | ||
| 675 | * | 678 | * |
| 676 | * Routine validates the ndlp, builds buffers and sends a GEN_REQUEST | 679 | * Routine validates the ndlp, builds buffers and sends a GEN_REQUEST |
| 677 | * WQE to perform the LS operation. | 680 | * WQE to perform the LS operation. |
| @@ -693,8 +696,7 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 15 unmodified lines | |||
| 693 | uint16_t ntype, nstate; | 696 | uint16_t ntype, nstate; |
| 694 | 697 | ||
| 695 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { | 698 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { |
| 696 | lpfc_printf_vlog(vport, KERN_ERR, | 699 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 697 | LOG_NVME_DISC | LOG_NODE | LOG_NVME_IOERR, | ||
| 698 | "6051 NVMEx LS REQ: Bad NDLP x%px, Failing " | 700 | "6051 NVMEx LS REQ: Bad NDLP x%px, Failing " |
| 699 | "LS Req\n", | 701 | "LS Req\n", |
| 700 | ndlp); | 702 | ndlp); |
| @@ -705,8 +707,7 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 4 unmodified lines | |||
| 705 | nstate = ndlp->nlp_state; | 707 | nstate = ndlp->nlp_state; |
| 706 | if ((ntype & NLP_NVME_TARGET && nstate != NLP_STE_MAPPED_NODE) || | 708 | if ((ntype & NLP_NVME_TARGET && nstate != NLP_STE_MAPPED_NODE) || |
| 707 | (ntype & NLP_NVME_INITIATOR && nstate != NLP_STE_UNMAPPED_NODE)) { | 709 | (ntype & NLP_NVME_INITIATOR && nstate != NLP_STE_UNMAPPED_NODE)) { |
| 708 | lpfc_printf_vlog(vport, KERN_ERR, | 710 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 709 | LOG_NVME_DISC | LOG_NODE | LOG_NVME_IOERR, | ||
| 710 | "6088 NVMEx LS REQ: Fail DID x%06x not " | 711 | "6088 NVMEx LS REQ: Fail DID x%06x not " |
| 711 | "ready for IO. Type x%x, State x%x\n", | 712 | "ready for IO. Type x%x, State x%x\n", |
| 712 | ndlp->nlp_DID, ntype, nstate); | 713 | ndlp->nlp_DID, ntype, nstate); |
| @@ -727,9 +728,7 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 14 unmodified lines | |||
| 727 | 728 | ||
| 728 | bmp = kmalloc(sizeof(*bmp), GFP_KERNEL); | 729 | bmp = kmalloc(sizeof(*bmp), GFP_KERNEL); |
| 729 | if (!bmp) { | 730 | if (!bmp) { |
| 730 | 731 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, | |
| 731 | lpfc_printf_vlog(vport, KERN_ERR, | ||
| 732 | LOG_NVME_DISC | LOG_NVME_IOERR, | ||
| 733 | "6044 NVMEx LS REQ: Could not alloc LS buf " | 732 | "6044 NVMEx LS REQ: Could not alloc LS buf " |
| 734 | "for DID %x\n", | 733 | "for DID %x\n", |
| 735 | ndlp->nlp_DID); | 734 | ndlp->nlp_DID); |
| @@ -738,8 +737,7 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 2 unmodified lines | |||
| 738 | 737 | ||
| 739 | bmp->virt = lpfc_mbuf_alloc(vport->phba, MEM_PRI, &(bmp->phys)); | 738 | bmp->virt = lpfc_mbuf_alloc(vport->phba, MEM_PRI, &(bmp->phys)); |
| 740 | if (!bmp->virt) { | 739 | if (!bmp->virt) { |
| 741 | lpfc_printf_vlog(vport, KERN_ERR, | 740 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 742 | LOG_NVME_DISC | LOG_NVME_IOERR, | ||
| 743 | "6042 NVMEx LS REQ: Could not alloc mbuf " | 741 | "6042 NVMEx LS REQ: Could not alloc mbuf " |
| 744 | "for DID %x\n", | 742 | "for DID %x\n", |
| 745 | ndlp->nlp_DID); | 743 | ndlp->nlp_DID); |
| @@ -774,8 +772,7 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 28 unmodified lines | |||
| 774 | pnvme_lsreq, gen_req_cmp, ndlp, 2, | 772 | pnvme_lsreq, gen_req_cmp, ndlp, 2, |
| 775 | LPFC_NVME_LS_TIMEOUT, 0); | 773 | LPFC_NVME_LS_TIMEOUT, 0); |
| 776 | if (ret != WQE_SUCCESS) { | 774 | if (ret != WQE_SUCCESS) { |
| 777 | lpfc_printf_vlog(vport, KERN_ERR, | 775 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 778 | LOG_NVME_DISC | LOG_NVME_IOERR, | ||
| 779 | "6052 NVMEx REQ: EXIT. issue ls wqe failed " | 776 | "6052 NVMEx REQ: EXIT. issue ls wqe failed " |
| 780 | "lsreq x%px Status %x DID %x\n", | 777 | "lsreq x%px Status %x DID %x\n", |
| 781 | pnvme_lsreq, ret, ndlp->nlp_DID); | 778 | pnvme_lsreq, ret, ndlp->nlp_DID); |
| @@ -789,9 +786,9 @@ __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 7 unmodified lines | |||
| 789 | 786 | ||
| 790 | /** | 787 | /** |
| 791 | * lpfc_nvme_ls_req - Issue an NVME Link Service request | 788 | * lpfc_nvme_ls_req - Issue an NVME Link Service request |
| 792 | * @lpfc_nvme_lport: Transport localport that LS is to be issued from. | 789 | * @pnvme_lport: Transport localport that LS is to be issued from. |
| 793 | * @lpfc_nvme_rport: Transport remoteport that LS is to be sent to. | 790 | * @nvme_rport: Transport remoteport that LS is to be sent to. |
| 794 | * @pnvme_lsreq - the transport nvme_ls_req structure for the LS | 791 | * @pnvme_lsreq: the transport nvme_ls_req structure for the LS |
| 795 | * | 792 | * |
| 796 | * Driver registers this routine to handle any link service request | 793 | * Driver registers this routine to handle any link service request |
| 797 | * from the nvme_fc transport to a remote nvme-aware port. | 794 | * from the nvme_fc transport to a remote nvme-aware port. |
| @@ -853,9 +850,7 @@ __lpfc_nvme_ls_abort(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, · 55 unmodified lines | |||
| 853 | bool foundit = false; | 850 | bool foundit = false; |
| 854 | 851 | ||
| 855 | if (!ndlp) { | 852 | if (!ndlp) { |
| 856 | lpfc_printf_log(phba, KERN_ERR, | 853 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 857 | LOG_NVME_DISC | LOG_NODE | | ||
| 858 | LOG_NVME_IOERR | LOG_NVME_ABTS, | ||
| 859 | "6049 NVMEx LS REQ Abort: Bad NDLP x%px DID " | 854 | "6049 NVMEx LS REQ Abort: Bad NDLP x%px DID " |
| 860 | "x%06x, Failing LS Req\n", | 855 | "x%06x, Failing LS Req\n", |
| 861 | ndlp, ndlp ? ndlp->nlp_DID : 0); | 856 | ndlp, ndlp ? ndlp->nlp_DID : 0); |
| @@ -931,9 +926,9 @@ lpfc_nvme_xmt_ls_rsp(struct nvme_fc_local_port *localport, · 69 unmodified lines | |||
| 931 | 926 | ||
| 932 | /** | 927 | /** |
| 933 | * lpfc_nvme_ls_abort - Abort a prior NVME LS request | 928 | * lpfc_nvme_ls_abort - Abort a prior NVME LS request |
| 934 | * @lpfc_nvme_lport: Transport localport that LS is to be issued from. | 929 | * @pnvme_lport: Transport localport that LS is to be issued from. |
| 935 | * @lpfc_nvme_rport: Transport remoteport that LS is to be sent to. | 930 | * @pnvme_rport: Transport remoteport that LS is to be sent to. |
| 936 | * @pnvme_lsreq - the transport nvme_ls_req structure for the LS | 931 | * @pnvme_lsreq: the transport nvme_ls_req structure for the LS |
| 937 | * | 932 | * |
| 938 | * Driver registers this routine to abort a NVME LS request that is | 933 | * Driver registers this routine to abort a NVME LS request that is |
| 939 | * in progress (from the transports perspective). | 934 | * in progress (from the transports perspective). |
| @@ -1063,11 +1058,8 @@ lpfc_nvme_adj_fcp_sgls(struct lpfc_vport *vport, · 123 unmodified lines | |||
| 1063 | } | 1058 | } |
| 1064 | 1059 | ||
| 1065 | 1060 | ||
| 1066 | /** | 1061 | /* |
| 1067 | * lpfc_nvme_io_cmd_wqe_cmpl - Complete an NVME-over-FCP IO | 1062 | * lpfc_nvme_io_cmd_wqe_cmpl - Complete an NVME-over-FCP IO |
| 1068 | * @lpfc_pnvme: Pointer to the driver's nvme instance data | ||
| 1069 | * @lpfc_nvme_lport: Pointer to the driver's local port data | ||
| 1070 | * @lpfc_nvme_rport: Pointer to the rport getting the @lpfc_nvme_ereq | ||
| 1071 | * | 1063 | * |
| 1072 | * Driver registers this routine as it io request handler. This | 1064 | * Driver registers this routine as it io request handler. This |
| 1073 | * routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq | 1065 | * routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq |
| @@ -1099,8 +1091,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, · 25 unmodified lines | |||
| 1099 | 1091 | ||
| 1100 | /* Sanity check on return of outstanding command */ | 1092 | /* Sanity check on return of outstanding command */ |
| 1101 | if (!lpfc_ncmd) { | 1093 | if (!lpfc_ncmd) { |
| 1102 | lpfc_printf_vlog(vport, KERN_ERR, | 1094 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1103 | LOG_NODE | LOG_NVME_IOERR, | ||
| 1104 | "6071 Null lpfc_ncmd pointer. No " | 1095 | "6071 Null lpfc_ncmd pointer. No " |
| 1105 | "release, skip completion\n"); | 1096 | "release, skip completion\n"); |
| 1106 | return; | 1097 | return; |
| @@ -1111,7 +1102,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, · 4 unmodified lines | |||
| 1111 | 1102 | ||
| 1112 | if (!lpfc_ncmd->nvmeCmd) { | 1103 | if (!lpfc_ncmd->nvmeCmd) { |
| 1113 | spin_unlock(&lpfc_ncmd->buf_lock); | 1104 | spin_unlock(&lpfc_ncmd->buf_lock); |
| 1114 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE | LOG_NVME_IOERR, | 1105 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1115 | "6066 Missing cmpl ptrs: lpfc_ncmd x%px, " | 1106 | "6066 Missing cmpl ptrs: lpfc_ncmd x%px, " |
| 1116 | "nvmeCmd x%px\n", | 1107 | "nvmeCmd x%px\n", |
| 1117 | lpfc_ncmd, lpfc_ncmd->nvmeCmd); | 1108 | lpfc_ncmd, lpfc_ncmd->nvmeCmd); |
| @@ -1144,7 +1135,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, · 26 unmodified lines | |||
| 1144 | */ | 1135 | */ |
| 1145 | ndlp = lpfc_ncmd->ndlp; | 1136 | ndlp = lpfc_ncmd->ndlp; |
| 1146 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { | 1137 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { |
| 1147 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_IOERR, | 1138 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1148 | "6062 Ignoring NVME cmpl. No ndlp\n"); | 1139 | "6062 Ignoring NVME cmpl. No ndlp\n"); |
| 1149 | goto out_err; | 1140 | goto out_err; |
| 1150 | } | 1141 | } |
| @@ -1215,7 +1206,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn, · 64 unmodified lines | |||
| 1215 | /* Sanity check */ | 1206 | /* Sanity check */ |
| 1216 | if (nCmd->rcv_rsplen == LPFC_NVME_ERSP_LEN) | 1207 | if (nCmd->rcv_rsplen == LPFC_NVME_ERSP_LEN) |
| 1217 | break; | 1208 | break; |
| 1218 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_IOERR, | 1209 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1219 | "6081 NVME Completion Protocol Error: " | 1210 | "6081 NVME Completion Protocol Error: " |
| 1220 | "xri %x status x%x result x%x " | 1211 | "xri %x status x%x result x%x " |
| 1221 | "placed x%x\n", | 1212 | "placed x%x\n", |
| @@ -1300,11 +1291,10 @@ out_err: · 78 unmodified lines | |||
| 1300 | 1291 | ||
| 1301 | /** | 1292 | /** |
| 1302 | * lpfc_nvme_prep_io_cmd - Issue an NVME-over-FCP IO | 1293 | * lpfc_nvme_prep_io_cmd - Issue an NVME-over-FCP IO |
| 1303 | * @lpfc_pnvme: Pointer to the driver's nvme instance data | 1294 | * @vport: pointer to a host virtual N_Port data structure |
| 1304 | * @lpfc_nvme_lport: Pointer to the driver's local port data | 1295 | * @lpfcn_cmd: Pointer to lpfc scsi command |
| 1305 | * @lpfc_nvme_rport: Pointer to the rport getting the @lpfc_nvme_ereq | 1296 | * @pnode: pointer to a node-list data structure |
| 1306 | * @lpfc_nvme_fcreq: IO request from nvme fc to driver. | 1297 | * @cstat: pointer to the control status structure |
| 1307 | * @hw_queue_handle: Driver-returned handle in lpfc_nvme_create_queue | ||
| 1308 | * | 1298 | * |
| 1309 | * Driver registers this routine as it io request handler. This | 1299 | * Driver registers this routine as it io request handler. This |
| 1310 | * routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq | 1300 | * routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq |
| @@ -1409,11 +1399,8 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, · 98 unmodified lines | |||
| 1409 | 1399 | ||
| 1410 | /** | 1400 | /** |
| 1411 | * lpfc_nvme_prep_io_dma - Issue an NVME-over-FCP IO | 1401 | * lpfc_nvme_prep_io_dma - Issue an NVME-over-FCP IO |
| 1412 | * @lpfc_pnvme: Pointer to the driver's nvme instance data | 1402 | * @vport: pointer to a host virtual N_Port data structure |
| 1413 | * @lpfc_nvme_lport: Pointer to the driver's local port data | 1403 | * @lpfcn_cmd: Pointer to lpfc scsi command |
| 1414 | * @lpfc_nvme_rport: Pointer to the rport getting the @lpfc_nvme_ereq | ||
| 1415 | * @lpfc_nvme_fcreq: IO request from nvme fc to driver. | ||
| 1416 | * @hw_queue_handle: Driver-returned handle in lpfc_nvme_create_queue | ||
| 1417 | * | 1404 | * |
| 1418 | * Driver registers this routine as it io request handler. This | 1405 | * Driver registers this routine as it io request handler. This |
| 1419 | * routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq | 1406 | * routine issues an fcp WQE with data from the @lpfc_nvme_fcpreq |
| @@ -1459,7 +1446,7 @@ lpfc_nvme_prep_io_dma(struct lpfc_vport *vport, · 39 unmodified lines | |||
| 1459 | first_data_sgl = sgl; | 1446 | first_data_sgl = sgl; |
| 1460 | lpfc_ncmd->seg_cnt = nCmd->sg_cnt; | 1447 | lpfc_ncmd->seg_cnt = nCmd->sg_cnt; |
| 1461 | if (lpfc_ncmd->seg_cnt > lpfc_nvme_template.max_sgl_segments) { | 1448 | if (lpfc_ncmd->seg_cnt > lpfc_nvme_template.max_sgl_segments) { |
| 1462 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 1449 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1463 | "6058 Too many sg segments from " | 1450 | "6058 Too many sg segments from " |
| 1464 | "NVME Transport. Max %d, " | 1451 | "NVME Transport. Max %d, " |
| 1465 | "nvmeIO sg_cnt %d\n", | 1452 | "nvmeIO sg_cnt %d\n", |
| @@ -1482,7 +1469,7 @@ lpfc_nvme_prep_io_dma(struct lpfc_vport *vport, · 16 unmodified lines | |||
| 1482 | j = 2; | 1469 | j = 2; |
| 1483 | for (i = 0; i < nseg; i++) { | 1470 | for (i = 0; i < nseg; i++) { |
| 1484 | if (data_sg == NULL) { | 1471 | if (data_sg == NULL) { |
| 1485 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 1472 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1486 | "6059 dptr err %d, nseg %d\n", | 1473 | "6059 dptr err %d, nseg %d\n", |
| 1487 | i, nseg); | 1474 | i, nseg); |
| 1488 | lpfc_ncmd->seg_cnt = 0; | 1475 | lpfc_ncmd->seg_cnt = 0; |
| @@ -1583,7 +1570,7 @@ lpfc_nvme_prep_io_dma(struct lpfc_vport *vport, · 94 unmodified lines | |||
| 1583 | * and sg_cnt must zero. | 1570 | * and sg_cnt must zero. |
| 1584 | */ | 1571 | */ |
| 1585 | if (nCmd->payload_length != 0) { | 1572 | if (nCmd->payload_length != 0) { |
| 1586 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 1573 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1587 | "6063 NVME DMA Prep Err: sg_cnt %d " | 1574 | "6063 NVME DMA Prep Err: sg_cnt %d " |
| 1588 | "payload_length x%x\n", | 1575 | "payload_length x%x\n", |
| 1589 | nCmd->sg_cnt, nCmd->payload_length); | 1576 | nCmd->sg_cnt, nCmd->payload_length); |
| @@ -1946,7 +1933,7 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, · 356 unmodified lines | |||
| 1946 | /* driver queued commands are in process of being flushed */ | 1933 | /* driver queued commands are in process of being flushed */ |
| 1947 | if (phba->hba_flag & HBA_IOQ_FLUSH) { | 1934 | if (phba->hba_flag & HBA_IOQ_FLUSH) { |
| 1948 | spin_unlock_irqrestore(&phba->hbalock, flags); | 1935 | spin_unlock_irqrestore(&phba->hbalock, flags); |
| 1949 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 1936 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1950 | "6139 Driver in reset cleanup - flushing " | 1937 | "6139 Driver in reset cleanup - flushing " |
| 1951 | "NVME Req now. hba_flag x%x\n", | 1938 | "NVME Req now. hba_flag x%x\n", |
| 1952 | phba->hba_flag); | 1939 | phba->hba_flag); |
| @@ -1956,13 +1943,13 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, · 3 unmodified lines | |||
| 1956 | lpfc_nbuf = freqpriv->nvme_buf; | 1943 | lpfc_nbuf = freqpriv->nvme_buf; |
| 1957 | if (!lpfc_nbuf) { | 1944 | if (!lpfc_nbuf) { |
| 1958 | spin_unlock_irqrestore(&phba->hbalock, flags); | 1945 | spin_unlock_irqrestore(&phba->hbalock, flags); |
| 1959 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 1946 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1960 | "6140 NVME IO req has no matching lpfc nvme " | 1947 | "6140 NVME IO req has no matching lpfc nvme " |
| 1961 | "io buffer. Skipping abort req.\n"); | 1948 | "io buffer. Skipping abort req.\n"); |
| 1962 | return; | 1949 | return; |
| 1963 | } else if (!lpfc_nbuf->nvmeCmd) { | 1950 | } else if (!lpfc_nbuf->nvmeCmd) { |
| 1964 | spin_unlock_irqrestore(&phba->hbalock, flags); | 1951 | spin_unlock_irqrestore(&phba->hbalock, flags); |
| 1965 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 1952 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1966 | "6141 lpfc NVME IO req has no nvme_fcreq " | 1953 | "6141 lpfc NVME IO req has no nvme_fcreq " |
| 1967 | "io buffer. Skipping abort req.\n"); | 1954 | "io buffer. Skipping abort req.\n"); |
| 1968 | return; | 1955 | return; |
| @@ -1980,7 +1967,7 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, · 11 unmodified lines | |||
| 1980 | * has not seen it yet. | 1967 | * has not seen it yet. |
| 1981 | */ | 1968 | */ |
| 1982 | if (lpfc_nbuf->nvmeCmd != pnvme_fcreq) { | 1969 | if (lpfc_nbuf->nvmeCmd != pnvme_fcreq) { |
| 1983 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 1970 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1984 | "6143 NVME req mismatch: " | 1971 | "6143 NVME req mismatch: " |
| 1985 | "lpfc_nbuf x%px nvmeCmd x%px, " | 1972 | "lpfc_nbuf x%px nvmeCmd x%px, " |
| 1986 | "pnvme_fcreq x%px. Skipping Abort xri x%x\n", | 1973 | "pnvme_fcreq x%px. Skipping Abort xri x%x\n", |
| @@ -1991,7 +1978,7 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, · 4 unmodified lines | |||
| 1991 | 1978 | ||
| 1992 | /* Don't abort IOs no longer on the pending queue. */ | 1979 | /* Don't abort IOs no longer on the pending queue. */ |
| 1993 | if (!(nvmereq_wqe->iocb_flag & LPFC_IO_ON_TXCMPLQ)) { | 1980 | if (!(nvmereq_wqe->iocb_flag & LPFC_IO_ON_TXCMPLQ)) { |
| 1994 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 1981 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 1995 | "6142 NVME IO req x%px not queued - skipping " | 1982 | "6142 NVME IO req x%px not queued - skipping " |
| 1996 | "abort req xri x%x\n", | 1983 | "abort req xri x%x\n", |
| 1997 | pnvme_fcreq, nvmereq_wqe->sli4_xritag); | 1984 | pnvme_fcreq, nvmereq_wqe->sli4_xritag); |
| @@ -2005,7 +1992,7 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, · 7 unmodified lines | |||
| 2005 | 1992 | ||
| 2006 | /* Outstanding abort is in progress */ | 1993 | /* Outstanding abort is in progress */ |
| 2007 | if (nvmereq_wqe->iocb_flag & LPFC_DRIVER_ABORTED) { | 1994 | if (nvmereq_wqe->iocb_flag & LPFC_DRIVER_ABORTED) { |
| 2008 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 1995 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2009 | "6144 Outstanding NVME I/O Abort Request " | 1996 | "6144 Outstanding NVME I/O Abort Request " |
| 2010 | "still pending on nvme_fcreq x%px, " | 1997 | "still pending on nvme_fcreq x%px, " |
| 2011 | "lpfc_ncmd %px xri x%x\n", | 1998 | "lpfc_ncmd %px xri x%x\n", |
| @@ -2016,7 +2003,7 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, · 4 unmodified lines | |||
| 2016 | 2003 | ||
| 2017 | abts_buf = __lpfc_sli_get_iocbq(phba); | 2004 | abts_buf = __lpfc_sli_get_iocbq(phba); |
| 2018 | if (!abts_buf) { | 2005 | if (!abts_buf) { |
| 2019 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 2006 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2020 | "6136 No available abort wqes. Skipping " | 2007 | "6136 No available abort wqes. Skipping " |
| 2021 | "Abts req for nvme_fcreq x%px xri x%x\n", | 2008 | "Abts req for nvme_fcreq x%px xri x%x\n", |
| 2022 | pnvme_fcreq, nvmereq_wqe->sli4_xritag); | 2009 | pnvme_fcreq, nvmereq_wqe->sli4_xritag); |
| @@ -2037,7 +2024,7 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport, · 14 unmodified lines | |||
| 2037 | spin_unlock(&lpfc_nbuf->buf_lock); | 2024 | spin_unlock(&lpfc_nbuf->buf_lock); |
| 2038 | spin_unlock_irqrestore(&phba->hbalock, flags); | 2025 | spin_unlock_irqrestore(&phba->hbalock, flags); |
| 2039 | if (ret_val) { | 2026 | if (ret_val) { |
| 2040 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_ABTS, | 2027 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2041 | "6137 Failed abts issue_wqe with status x%x " | 2028 | "6137 Failed abts issue_wqe with status x%x " |
| 2042 | "for nvme_fcreq x%px.\n", | 2029 | "for nvme_fcreq x%px.\n", |
| 2043 | ret_val, pnvme_fcreq); | 2030 | ret_val, pnvme_fcreq); |
| @@ -2310,7 +2297,7 @@ lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport, · 266 unmodified lines | |||
| 2310 | if (pring->txcmplq_cnt) | 2297 | if (pring->txcmplq_cnt) |
| 2311 | pending += pring->txcmplq_cnt; | 2298 | pending += pring->txcmplq_cnt; |
| 2312 | } | 2299 | } |
| 2313 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_IOERR, | 2300 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2314 | "6176 Lport x%px Localport x%px wait " | 2301 | "6176 Lport x%px Localport x%px wait " |
| 2315 | "timed out. Pending %d. Renewing.\n", | 2302 | "timed out. Pending %d. Renewing.\n", |
| 2316 | lport, vport->localport, pending); | 2303 | lport, vport->localport, pending); |
| @@ -2432,6 +2419,7 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 115 unmodified lines | |||
| 2432 | struct nvme_fc_remote_port *remote_port; | 2419 | struct nvme_fc_remote_port *remote_port; |
| 2433 | struct nvme_fc_port_info rpinfo; | 2420 | struct nvme_fc_port_info rpinfo; |
| 2434 | struct lpfc_nodelist *prev_ndlp = NULL; | 2421 | struct lpfc_nodelist *prev_ndlp = NULL; |
| 2422 | struct fc_rport *srport = ndlp->rport; | ||
| 2435 | 2423 | ||
| 2436 | lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NVME_DISC, | 2424 | lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NVME_DISC, |
| 2437 | "6006 Register NVME PORT. DID x%06x nlptype x%x\n", | 2425 | "6006 Register NVME PORT. DID x%06x nlptype x%x\n", |
| @@ -2461,6 +2449,10 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 23 unmodified lines | |||
| 2461 | 2449 | ||
| 2462 | rpinfo.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn); | 2450 | rpinfo.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn); |
| 2463 | rpinfo.node_name = wwn_to_u64(ndlp->nlp_nodename.u.wwn); | 2451 | rpinfo.node_name = wwn_to_u64(ndlp->nlp_nodename.u.wwn); |
| 2452 | if (srport) | ||
| 2453 | rpinfo.dev_loss_tmo = srport->dev_loss_tmo; | ||
| 2454 | else | ||
| 2455 | rpinfo.dev_loss_tmo = vport->cfg_devloss_tmo; | ||
| 2464 | 2456 | ||
| 2465 | spin_lock_irq(&vport->phba->hbalock); | 2457 | spin_lock_irq(&vport->phba->hbalock); |
| 2466 | oldrport = lpfc_ndlp_get_nrport(ndlp); | 2458 | oldrport = lpfc_ndlp_get_nrport(ndlp); |
| @@ -2528,7 +2520,7 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 61 unmodified lines | |||
| 2528 | ndlp, prev_ndlp); | 2520 | ndlp, prev_ndlp); |
| 2529 | } else { | 2521 | } else { |
| 2530 | lpfc_printf_vlog(vport, KERN_ERR, | 2522 | lpfc_printf_vlog(vport, KERN_ERR, |
| 2531 | LOG_NVME_DISC | LOG_NODE, | 2523 | LOG_TRACE_EVENT, |
| 2532 | "6031 RemotePort Registration failed " | 2524 | "6031 RemotePort Registration failed " |
| 2533 | "err: %d, DID x%06x\n", | 2525 | "err: %d, DID x%06x\n", |
| 2534 | ret, ndlp->nlp_DID); | 2526 | ret, ndlp->nlp_DID); |
| @@ -2574,7 +2566,7 @@ lpfc_nvme_rescan_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 39 unmodified lines | |||
| 2574 | ndlp->nlp_state == NLP_STE_MAPPED_NODE) { | 2566 | ndlp->nlp_state == NLP_STE_MAPPED_NODE) { |
| 2575 | nvme_fc_rescan_remoteport(remoteport); | 2567 | nvme_fc_rescan_remoteport(remoteport); |
| 2576 | 2568 | ||
| 2577 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_DISC, | 2569 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2578 | "6172 NVME rescanned DID x%06x " | 2570 | "6172 NVME rescanned DID x%06x " |
| 2579 | "port_state x%x\n", | 2571 | "port_state x%x\n", |
| 2580 | ndlp->nlp_DID, remoteport->port_state); | 2572 | ndlp->nlp_DID, remoteport->port_state); |
| @@ -2657,7 +2649,7 @@ lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 76 unmodified lines | |||
| 2657 | ret = nvme_fc_unregister_remoteport(remoteport); | 2649 | ret = nvme_fc_unregister_remoteport(remoteport); |
| 2658 | if (ret != 0) { | 2650 | if (ret != 0) { |
| 2659 | lpfc_nlp_put(ndlp); | 2651 | lpfc_nlp_put(ndlp); |
| 2660 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_DISC, | 2652 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2661 | "6167 NVME unregister failed %d " | 2653 | "6167 NVME unregister failed %d " |
| 2662 | "port_state x%x\n", | 2654 | "port_state x%x\n", |
| 2663 | ret, remoteport->port_state); | 2655 | ret, remoteport->port_state); |
| @@ -2667,7 +2659,7 @@ lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 3 unmodified lines | |||
| 2667 | 2659 | ||
| 2668 | input_err: | 2660 | input_err: |
| 2669 | #endif | 2661 | #endif |
| 2670 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_DISC, | 2662 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 2671 | "6168 State error: lport x%px, rport x%px FCID x%06x\n", | 2663 | "6168 State error: lport x%px, rport x%px FCID x%06x\n", |
| 2672 | vport->localport, ndlp->rport, ndlp->nlp_DID); | 2664 | vport->localport, ndlp->rport, ndlp->nlp_DID); |
| 2673 | } | 2665 | } |
| @@ -2752,7 +2744,7 @@ lpfc_nvme_wait_for_io_drain(struct lpfc_hba *phba) · 78 unmodified lines | |||
| 2752 | * dump a message. Something is wrong. | 2744 | * dump a message. Something is wrong. |
| 2753 | */ | 2745 | */ |
| 2754 | if ((wait_cnt % 1000) == 0) { | 2746 | if ((wait_cnt % 1000) == 0) { |
| 2755 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2747 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2756 | "6178 NVME IO not empty, " | 2748 | "6178 NVME IO not empty, " |
| 2757 | "cnt %d\n", wait_cnt); | 2749 | "cnt %d\n", wait_cnt); |
| 2758 | } | 2750 | } |
| @@ -303,7 +303,7 @@ __lpfc_nvme_xmt_ls_rsp_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, · 302 unmodified lines | |||
| 303 | result = wcqe->parameter; | 303 | result = wcqe->parameter; |
| 304 | 304 | ||
| 305 | if (axchg->state != LPFC_NVME_STE_LS_RSP || axchg->entry_cnt != 2) { | 305 | if (axchg->state != LPFC_NVME_STE_LS_RSP || axchg->entry_cnt != 2) { |
| 306 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC | LOG_NVME_IOERR, | 306 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 307 | "6410 NVMEx LS cmpl state mismatch IO x%x: " | 307 | "6410 NVMEx LS cmpl state mismatch IO x%x: " |
| 308 | "%d %d\n", | 308 | "%d %d\n", |
| 309 | axchg->oxid, axchg->state, axchg->entry_cnt); | 309 | axchg->oxid, axchg->state, axchg->entry_cnt); |
| @@ -395,7 +395,7 @@ lpfc_nvmet_ctxbuf_post(struct lpfc_hba *phba, struct lpfc_nvmet_ctxbuf *ctx_buf) · 85 unmodified lines | |||
| 395 | unsigned long iflag; | 395 | unsigned long iflag; |
| 396 | 396 | ||
| 397 | if (ctxp->state == LPFC_NVME_STE_FREE) { | 397 | if (ctxp->state == LPFC_NVME_STE_FREE) { |
| 398 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 398 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 399 | "6411 NVMET free, already free IO x%x: %d %d\n", | 399 | "6411 NVMET free, already free IO x%x: %d %d\n", |
| 400 | ctxp->oxid, ctxp->state, ctxp->entry_cnt); | 400 | ctxp->oxid, ctxp->state, ctxp->entry_cnt); |
| 401 | } | 401 | } |
| @@ -474,7 +474,7 @@ lpfc_nvmet_ctxbuf_post(struct lpfc_hba *phba, struct lpfc_nvmet_ctxbuf *ctx_buf) · 72 unmodified lines | |||
| 474 | 474 | ||
| 475 | if (!queue_work(phba->wq, &ctx_buf->defer_work)) { | 475 | if (!queue_work(phba->wq, &ctx_buf->defer_work)) { |
| 476 | atomic_inc(&tgtp->rcv_fcp_cmd_drop); | 476 | atomic_inc(&tgtp->rcv_fcp_cmd_drop); |
| 477 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 477 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 478 | "6181 Unable to queue deferred work " | 478 | "6181 Unable to queue deferred work " |
| 479 | "for oxid x%x. " | 479 | "for oxid x%x. " |
| 480 | "FCP Drop IO [x%x x%x x%x]\n", | 480 | "FCP Drop IO [x%x x%x x%x]\n", |
| @@ -879,7 +879,7 @@ __lpfc_nvme_xmt_ls_rsp(struct lpfc_async_xchg_ctx *axchg, · 398 unmodified lines | |||
| 879 | "6023 NVMEx LS rsp oxid x%x\n", axchg->oxid); | 879 | "6023 NVMEx LS rsp oxid x%x\n", axchg->oxid); |
| 880 | 880 | ||
| 881 | if (axchg->state != LPFC_NVME_STE_LS_RCV || axchg->entry_cnt != 1) { | 881 | if (axchg->state != LPFC_NVME_STE_LS_RCV || axchg->entry_cnt != 1) { |
| 882 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC | LOG_NVME_IOERR, | 882 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 883 | "6412 NVMEx LS rsp state mismatch " | 883 | "6412 NVMEx LS rsp state mismatch " |
| 884 | "oxid x%x: %d %d\n", | 884 | "oxid x%x: %d %d\n", |
| 885 | axchg->oxid, axchg->state, axchg->entry_cnt); | 885 | axchg->oxid, axchg->state, axchg->entry_cnt); |
| @@ -891,8 +891,7 @@ __lpfc_nvme_xmt_ls_rsp(struct lpfc_async_xchg_ctx *axchg, · 5 unmodified lines | |||
| 891 | nvmewqeq = lpfc_nvmet_prep_ls_wqe(phba, axchg, ls_rsp->rspdma, | 891 | nvmewqeq = lpfc_nvmet_prep_ls_wqe(phba, axchg, ls_rsp->rspdma, |
| 892 | ls_rsp->rsplen); | 892 | ls_rsp->rsplen); |
| 893 | if (nvmewqeq == NULL) { | 893 | if (nvmewqeq == NULL) { |
| 894 | lpfc_printf_log(phba, KERN_ERR, | 894 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 895 | LOG_NVME_DISC | LOG_NVME_IOERR | LOG_NVME_ABTS, | ||
| 896 | "6150 NVMEx LS Drop Rsp x%x: Prep\n", | 895 | "6150 NVMEx LS Drop Rsp x%x: Prep\n", |
| 897 | axchg->oxid); | 896 | axchg->oxid); |
| 898 | rc = -ENOMEM; | 897 | rc = -ENOMEM; |
| @@ -936,8 +935,7 @@ __lpfc_nvme_xmt_ls_rsp(struct lpfc_async_xchg_ctx *axchg, · 37 unmodified lines | |||
| 936 | return 0; | 935 | return 0; |
| 937 | } | 936 | } |
| 938 | 937 | ||
| 939 | lpfc_printf_log(phba, KERN_ERR, | 938 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 940 | LOG_NVME_DISC | LOG_NVME_IOERR | LOG_NVME_ABTS, | ||
| 941 | "6151 NVMEx LS RSP x%x: failed to transmit %d\n", | 939 | "6151 NVMEx LS RSP x%x: failed to transmit %d\n", |
| 942 | axchg->oxid, rc); | 940 | axchg->oxid, rc); |
| 943 | 941 | ||
| @@ -1058,7 +1056,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, · 114 unmodified lines | |||
| 1058 | if ((ctxp->flag & LPFC_NVME_ABTS_RCV) || | 1056 | if ((ctxp->flag & LPFC_NVME_ABTS_RCV) || |
| 1059 | (ctxp->state == LPFC_NVME_STE_ABORT)) { | 1057 | (ctxp->state == LPFC_NVME_STE_ABORT)) { |
| 1060 | atomic_inc(&lpfc_nvmep->xmt_fcp_drop); | 1058 | atomic_inc(&lpfc_nvmep->xmt_fcp_drop); |
| 1061 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 1059 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1062 | "6102 IO oxid x%x aborted\n", | 1060 | "6102 IO oxid x%x aborted\n", |
| 1063 | ctxp->oxid); | 1061 | ctxp->oxid); |
| 1064 | rc = -ENXIO; | 1062 | rc = -ENXIO; |
| @@ -1068,7 +1066,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, · 3 unmodified lines | |||
| 1068 | nvmewqeq = lpfc_nvmet_prep_fcp_wqe(phba, ctxp); | 1066 | nvmewqeq = lpfc_nvmet_prep_fcp_wqe(phba, ctxp); |
| 1069 | if (nvmewqeq == NULL) { | 1067 | if (nvmewqeq == NULL) { |
| 1070 | atomic_inc(&lpfc_nvmep->xmt_fcp_drop); | 1068 | atomic_inc(&lpfc_nvmep->xmt_fcp_drop); |
| 1071 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 1069 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1072 | "6152 FCP Drop IO x%x: Prep\n", | 1070 | "6152 FCP Drop IO x%x: Prep\n", |
| 1073 | ctxp->oxid); | 1071 | ctxp->oxid); |
| 1074 | rc = -ENXIO; | 1072 | rc = -ENXIO; |
| @@ -1116,7 +1114,7 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport, · 41 unmodified lines | |||
| 1116 | 1114 | ||
| 1117 | /* Give back resources */ | 1115 | /* Give back resources */ |
| 1118 | atomic_inc(&lpfc_nvmep->xmt_fcp_drop); | 1116 | atomic_inc(&lpfc_nvmep->xmt_fcp_drop); |
| 1119 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 1117 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1120 | "6153 FCP Drop IO x%x: Issue: %d\n", | 1118 | "6153 FCP Drop IO x%x: Issue: %d\n", |
| 1121 | ctxp->oxid, rc); | 1119 | ctxp->oxid, rc); |
| 1122 | 1120 | ||
| @@ -1216,7 +1214,7 @@ lpfc_nvmet_xmt_fcp_release(struct nvmet_fc_target_port *tgtport, · 93 unmodified lines | |||
| 1216 | ctxp->flag, ctxp->oxid); | 1214 | ctxp->flag, ctxp->oxid); |
| 1217 | else if (ctxp->state != LPFC_NVME_STE_DONE && | 1215 | else if (ctxp->state != LPFC_NVME_STE_DONE && |
| 1218 | ctxp->state != LPFC_NVME_STE_ABORT) | 1216 | ctxp->state != LPFC_NVME_STE_ABORT) |
| 1219 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 1217 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1220 | "6413 NVMET release bad state %d %d oxid x%x\n", | 1218 | "6413 NVMET release bad state %d %d oxid x%x\n", |
| 1221 | ctxp->state, ctxp->entry_cnt, ctxp->oxid); | 1219 | ctxp->state, ctxp->entry_cnt, ctxp->oxid); |
| 1222 | 1220 | ||
| @@ -1395,7 +1393,7 @@ lpfc_nvmet_discovery_event(struct nvmet_fc_target_port *tgtport) · 172 unmodified lines | |||
| 1395 | phba = tgtp->phba; | 1393 | phba = tgtp->phba; |
| 1396 | 1394 | ||
| 1397 | rc = lpfc_issue_els_rscn(phba->pport, 0); | 1395 | rc = lpfc_issue_els_rscn(phba->pport, 0); |
| 1398 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 1396 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1399 | "6420 NVMET subsystem change: Notification %s\n", | 1397 | "6420 NVMET subsystem change: Notification %s\n", |
| 1400 | (rc) ? "Failed" : "Sent"); | 1398 | (rc) ? "Failed" : "Sent"); |
| 1401 | } | 1399 | } |
| @@ -1493,7 +1491,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) · 91 unmodified lines | |||
| 1493 | phba->sli4_hba.num_possible_cpu * phba->cfg_nvmet_mrq, | 1491 | phba->sli4_hba.num_possible_cpu * phba->cfg_nvmet_mrq, |
| 1494 | sizeof(struct lpfc_nvmet_ctx_info), GFP_KERNEL); | 1492 | sizeof(struct lpfc_nvmet_ctx_info), GFP_KERNEL); |
| 1495 | if (!phba->sli4_hba.nvmet_ctx_info) { | 1493 | if (!phba->sli4_hba.nvmet_ctx_info) { |
| 1496 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1494 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1497 | "6419 Failed allocate memory for " | 1495 | "6419 Failed allocate memory for " |
| 1498 | "nvmet context lists\n"); | 1496 | "nvmet context lists\n"); |
| 1499 | return -ENOMEM; | 1497 | return -ENOMEM; |
| @@ -1551,7 +1549,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) · 51 unmodified lines | |||
| 1551 | for (i = 0; i < phba->sli4_hba.nvmet_xri_cnt; i++) { | 1549 | for (i = 0; i < phba->sli4_hba.nvmet_xri_cnt; i++) { |
| 1552 | ctx_buf = kzalloc(sizeof(*ctx_buf), GFP_KERNEL); | 1550 | ctx_buf = kzalloc(sizeof(*ctx_buf), GFP_KERNEL); |
| 1553 | if (!ctx_buf) { | 1551 | if (!ctx_buf) { |
| 1554 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 1552 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1555 | "6404 Ran out of memory for NVMET\n"); | 1553 | "6404 Ran out of memory for NVMET\n"); |
| 1556 | return -ENOMEM; | 1554 | return -ENOMEM; |
| 1557 | } | 1555 | } |
| @@ -1560,7 +1558,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) · 2 unmodified lines | |||
| 1560 | GFP_KERNEL); | 1558 | GFP_KERNEL); |
| 1561 | if (!ctx_buf->context) { | 1559 | if (!ctx_buf->context) { |
| 1562 | kfree(ctx_buf); | 1560 | kfree(ctx_buf); |
| 1563 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 1561 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1564 | "6405 Ran out of NVMET " | 1562 | "6405 Ran out of NVMET " |
| 1565 | "context memory\n"); | 1563 | "context memory\n"); |
| 1566 | return -ENOMEM; | 1564 | return -ENOMEM; |
| @@ -1572,7 +1570,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) · 5 unmodified lines | |||
| 1572 | if (!ctx_buf->iocbq) { | 1570 | if (!ctx_buf->iocbq) { |
| 1573 | kfree(ctx_buf->context); | 1571 | kfree(ctx_buf->context); |
| 1574 | kfree(ctx_buf); | 1572 | kfree(ctx_buf); |
| 1575 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 1573 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1576 | "6406 Ran out of NVMET iocb/WQEs\n"); | 1574 | "6406 Ran out of NVMET iocb/WQEs\n"); |
| 1577 | return -ENOMEM; | 1575 | return -ENOMEM; |
| 1578 | } | 1576 | } |
| @@ -1591,7 +1589,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) · 12 unmodified lines | |||
| 1591 | lpfc_sli_release_iocbq(phba, ctx_buf->iocbq); | 1589 | lpfc_sli_release_iocbq(phba, ctx_buf->iocbq); |
| 1592 | kfree(ctx_buf->context); | 1590 | kfree(ctx_buf->context); |
| 1593 | kfree(ctx_buf); | 1591 | kfree(ctx_buf); |
| 1594 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 1592 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1595 | "6407 Ran out of NVMET XRIs\n"); | 1593 | "6407 Ran out of NVMET XRIs\n"); |
| 1596 | return -ENOMEM; | 1594 | return -ENOMEM; |
| 1597 | } | 1595 | } |
| @@ -1670,7 +1668,7 @@ lpfc_nvmet_create_targetport(struct lpfc_hba *phba) · 72 unmodified lines | |||
| 1670 | error = -ENOENT; | 1668 | error = -ENOENT; |
| 1671 | #endif | 1669 | #endif |
| 1672 | if (error) { | 1670 | if (error) { |
| 1673 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC, | 1671 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1674 | "6025 Cannot register NVME targetport x%x: " | 1672 | "6025 Cannot register NVME targetport x%x: " |
| 1675 | "portnm %llx nodenm %llx segs %d qs %d\n", | 1673 | "portnm %llx nodenm %llx segs %d qs %d\n", |
| 1676 | error, | 1674 | error, |
| @@ -2114,7 +2112,7 @@ lpfc_nvmet_destroy_targetport(struct lpfc_hba *phba) · 437 unmodified lines | |||
| 2114 | nvmet_fc_unregister_targetport(phba->targetport); | 2112 | nvmet_fc_unregister_targetport(phba->targetport); |
| 2115 | if (!wait_for_completion_timeout(tgtp->tport_unreg_cmp, | 2113 | if (!wait_for_completion_timeout(tgtp->tport_unreg_cmp, |
| 2116 | msecs_to_jiffies(LPFC_NVMET_WAIT_TMO))) | 2114 | msecs_to_jiffies(LPFC_NVMET_WAIT_TMO))) |
| 2117 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 2115 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2118 | "6179 Unreg targetport x%px timeout " | 2116 | "6179 Unreg targetport x%px timeout " |
| 2119 | "reached.\n", phba->targetport); | 2117 | "reached.\n", phba->targetport); |
| 2120 | lpfc_nvmet_cleanup_io_context(phba); | 2118 | lpfc_nvmet_cleanup_io_context(phba); |
| @@ -2187,7 +2185,7 @@ lpfc_nvmet_process_rcv_fcp_req(struct lpfc_nvmet_ctxbuf *ctx_buf) · 66 unmodified lines | |||
| 2187 | unsigned long iflags; | 2185 | unsigned long iflags; |
| 2188 | 2186 | ||
| 2189 | if (!nvmebuf) { | 2187 | if (!nvmebuf) { |
| 2190 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2188 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2191 | "6159 process_rcv_fcp_req, nvmebuf is NULL, " | 2189 | "6159 process_rcv_fcp_req, nvmebuf is NULL, " |
| 2192 | "oxid: x%x flg: x%x state: x%x\n", | 2190 | "oxid: x%x flg: x%x state: x%x\n", |
| 2193 | ctxp->oxid, ctxp->flag, ctxp->state); | 2191 | ctxp->oxid, ctxp->flag, ctxp->state); |
| @@ -2200,7 +2198,7 @@ lpfc_nvmet_process_rcv_fcp_req(struct lpfc_nvmet_ctxbuf *ctx_buf) · 6 unmodified lines | |||
| 2200 | } | 2198 | } |
| 2201 | 2199 | ||
| 2202 | if (ctxp->flag & LPFC_NVME_ABTS_RCV) { | 2200 | if (ctxp->flag & LPFC_NVME_ABTS_RCV) { |
| 2203 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2201 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2204 | "6324 IO oxid x%x aborted\n", | 2202 | "6324 IO oxid x%x aborted\n", |
| 2205 | ctxp->oxid); | 2203 | ctxp->oxid); |
| 2206 | return; | 2204 | return; |
| @@ -2264,7 +2262,7 @@ lpfc_nvmet_process_rcv_fcp_req(struct lpfc_nvmet_ctxbuf *ctx_buf) · 57 unmodified lines | |||
| 2264 | } | 2262 | } |
| 2265 | ctxp->flag &= ~LPFC_NVME_TNOTIFY; | 2263 | ctxp->flag &= ~LPFC_NVME_TNOTIFY; |
| 2266 | atomic_inc(&tgtp->rcv_fcp_cmd_drop); | 2264 | atomic_inc(&tgtp->rcv_fcp_cmd_drop); |
| 2267 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2265 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2268 | "2582 FCP Drop IO x%x: err x%x: x%x x%x x%x\n", | 2266 | "2582 FCP Drop IO x%x: err x%x: x%x x%x x%x\n", |
| 2269 | ctxp->oxid, rc, | 2267 | ctxp->oxid, rc, |
| 2270 | atomic_read(&tgtp->rcv_fcp_cmd_in), | 2268 | atomic_read(&tgtp->rcv_fcp_cmd_in), |
| @@ -2383,7 +2381,7 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba, · 112 unmodified lines | |||
| 2383 | 2381 | ||
| 2384 | ctx_buf = NULL; | 2382 | ctx_buf = NULL; |
| 2385 | if (!nvmebuf || !phba->targetport) { | 2383 | if (!nvmebuf || !phba->targetport) { |
| 2386 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2384 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2387 | "6157 NVMET FCP Drop IO\n"); | 2385 | "6157 NVMET FCP Drop IO\n"); |
| 2388 | if (nvmebuf) | 2386 | if (nvmebuf) |
| 2389 | lpfc_rq_buf_free(phba, &nvmebuf->hbuf); | 2387 | lpfc_rq_buf_free(phba, &nvmebuf->hbuf); |
| @@ -2456,7 +2454,7 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba, · 66 unmodified lines | |||
| 2456 | list_add_tail(&ctxp->list, &phba->sli4_hba.t_active_ctx_list); | 2454 | list_add_tail(&ctxp->list, &phba->sli4_hba.t_active_ctx_list); |
| 2457 | spin_unlock_irqrestore(&phba->sli4_hba.t_active_list_lock, iflag); | 2455 | spin_unlock_irqrestore(&phba->sli4_hba.t_active_list_lock, iflag); |
| 2458 | if (ctxp->state != LPFC_NVME_STE_FREE) { | 2456 | if (ctxp->state != LPFC_NVME_STE_FREE) { |
| 2459 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2457 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2460 | "6414 NVMET Context corrupt %d %d oxid x%x\n", | 2458 | "6414 NVMET Context corrupt %d %d oxid x%x\n", |
| 2461 | ctxp->state, ctxp->entry_cnt, ctxp->oxid); | 2459 | ctxp->state, ctxp->entry_cnt, ctxp->oxid); |
| 2462 | } | 2460 | } |
| @@ -2498,7 +2496,7 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba, · 35 unmodified lines | |||
| 2498 | 2496 | ||
| 2499 | if (!queue_work(phba->wq, &ctx_buf->defer_work)) { | 2497 | if (!queue_work(phba->wq, &ctx_buf->defer_work)) { |
| 2500 | atomic_inc(&tgtp->rcv_fcp_cmd_drop); | 2498 | atomic_inc(&tgtp->rcv_fcp_cmd_drop); |
| 2501 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 2499 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2502 | "6325 Unable to queue work for oxid x%x. " | 2500 | "6325 Unable to queue work for oxid x%x. " |
| 2503 | "FCP Drop IO [x%x x%x x%x]\n", | 2501 | "FCP Drop IO [x%x x%x x%x]\n", |
| 2504 | ctxp->oxid, | 2502 | ctxp->oxid, |
| @@ -2535,7 +2533,7 @@ lpfc_nvmet_unsol_fcp_event(struct lpfc_hba *phba, · 30 unmodified lines | |||
| 2535 | uint8_t cqflag) | 2533 | uint8_t cqflag) |
| 2536 | { | 2534 | { |
| 2537 | if (!nvmebuf) { | 2535 | if (!nvmebuf) { |
| 2538 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2536 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2539 | "3167 NVMET FCP Drop IO\n"); | 2537 | "3167 NVMET FCP Drop IO\n"); |
| 2540 | return; | 2538 | return; |
| 2541 | } | 2539 | } |
| @@ -2581,7 +2579,7 @@ lpfc_nvmet_prep_ls_wqe(struct lpfc_hba *phba, · 39 unmodified lines | |||
| 2581 | union lpfc_wqe128 *wqe; | 2579 | union lpfc_wqe128 *wqe; |
| 2582 | 2580 | ||
| 2583 | if (!lpfc_is_link_up(phba)) { | 2581 | if (!lpfc_is_link_up(phba)) { |
| 2584 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC, | 2582 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2585 | "6104 NVMET prep LS wqe: link err: " | 2583 | "6104 NVMET prep LS wqe: link err: " |
| 2586 | "NPORT x%x oxid:x%x ste %d\n", | 2584 | "NPORT x%x oxid:x%x ste %d\n", |
| 2587 | ctxp->sid, ctxp->oxid, ctxp->state); | 2585 | ctxp->sid, ctxp->oxid, ctxp->state); |
| @@ -2591,7 +2589,7 @@ lpfc_nvmet_prep_ls_wqe(struct lpfc_hba *phba, · 3 unmodified lines | |||
| 2591 | /* Allocate buffer for command wqe */ | 2589 | /* Allocate buffer for command wqe */ |
| 2592 | nvmewqe = lpfc_sli_get_iocbq(phba); | 2590 | nvmewqe = lpfc_sli_get_iocbq(phba); |
| 2593 | if (nvmewqe == NULL) { | 2591 | if (nvmewqe == NULL) { |
| 2594 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC, | 2592 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2595 | "6105 NVMET prep LS wqe: No WQE: " | 2593 | "6105 NVMET prep LS wqe: No WQE: " |
| 2596 | "NPORT x%x oxid x%x ste %d\n", | 2594 | "NPORT x%x oxid x%x ste %d\n", |
| 2597 | ctxp->sid, ctxp->oxid, ctxp->state); | 2595 | ctxp->sid, ctxp->oxid, ctxp->state); |
| @@ -2602,7 +2600,7 @@ lpfc_nvmet_prep_ls_wqe(struct lpfc_hba *phba, · 4 unmodified lines | |||
| 2602 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp) || | 2600 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp) || |
| 2603 | ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && | 2601 | ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && |
| 2604 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { | 2602 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { |
| 2605 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC, | 2603 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2606 | "6106 NVMET prep LS wqe: No ndlp: " | 2604 | "6106 NVMET prep LS wqe: No ndlp: " |
| 2607 | "NPORT x%x oxid x%x ste %d\n", | 2605 | "NPORT x%x oxid x%x ste %d\n", |
| 2608 | ctxp->sid, ctxp->oxid, ctxp->state); | 2606 | ctxp->sid, ctxp->oxid, ctxp->state); |
| @@ -2711,7 +2709,7 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, · 102 unmodified lines | |||
| 2711 | int xc = 1; | 2709 | int xc = 1; |
| 2712 | 2710 | ||
| 2713 | if (!lpfc_is_link_up(phba)) { | 2711 | if (!lpfc_is_link_up(phba)) { |
| 2714 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2712 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2715 | "6107 NVMET prep FCP wqe: link err:" | 2713 | "6107 NVMET prep FCP wqe: link err:" |
| 2716 | "NPORT x%x oxid x%x ste %d\n", | 2714 | "NPORT x%x oxid x%x ste %d\n", |
| 2717 | ctxp->sid, ctxp->oxid, ctxp->state); | 2715 | ctxp->sid, ctxp->oxid, ctxp->state); |
| @@ -2722,7 +2720,7 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, · 4 unmodified lines | |||
| 2722 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp) || | 2720 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp) || |
| 2723 | ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && | 2721 | ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && |
| 2724 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { | 2722 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { |
| 2725 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2723 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2726 | "6108 NVMET prep FCP wqe: no ndlp: " | 2724 | "6108 NVMET prep FCP wqe: no ndlp: " |
| 2727 | "NPORT x%x oxid x%x ste %d\n", | 2725 | "NPORT x%x oxid x%x ste %d\n", |
| 2728 | ctxp->sid, ctxp->oxid, ctxp->state); | 2726 | ctxp->sid, ctxp->oxid, ctxp->state); |
| @@ -2730,7 +2728,7 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, · 1 unmodified line | |||
| 2730 | } | 2728 | } |
| 2731 | 2729 | ||
| 2732 | if (rsp->sg_cnt > lpfc_tgttemplate.max_sgl_segments) { | 2730 | if (rsp->sg_cnt > lpfc_tgttemplate.max_sgl_segments) { |
| 2733 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2731 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2734 | "6109 NVMET prep FCP wqe: seg cnt err: " | 2732 | "6109 NVMET prep FCP wqe: seg cnt err: " |
| 2735 | "NPORT x%x oxid x%x ste %d cnt %d\n", | 2733 | "NPORT x%x oxid x%x ste %d cnt %d\n", |
| 2736 | ctxp->sid, ctxp->oxid, ctxp->state, | 2734 | ctxp->sid, ctxp->oxid, ctxp->state, |
| @@ -2745,7 +2743,7 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, · 8 unmodified lines | |||
| 2745 | /* Allocate buffer for command wqe */ | 2743 | /* Allocate buffer for command wqe */ |
| 2746 | nvmewqe = ctxp->ctxbuf->iocbq; | 2744 | nvmewqe = ctxp->ctxbuf->iocbq; |
| 2747 | if (nvmewqe == NULL) { | 2745 | if (nvmewqe == NULL) { |
| 2748 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2746 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2749 | "6110 NVMET prep FCP wqe: No " | 2747 | "6110 NVMET prep FCP wqe: No " |
| 2750 | "WQE: NPORT x%x oxid x%x ste %d\n", | 2748 | "WQE: NPORT x%x oxid x%x ste %d\n", |
| 2751 | ctxp->sid, ctxp->oxid, ctxp->state); | 2749 | ctxp->sid, ctxp->oxid, ctxp->state); |
| @@ -2763,7 +2761,7 @@ lpfc_nvmet_prep_fcp_wqe(struct lpfc_hba *phba, · 11 unmodified lines | |||
| 2763 | (ctxp->state == LPFC_NVME_STE_DATA)) { | 2761 | (ctxp->state == LPFC_NVME_STE_DATA)) { |
| 2764 | wqe = &nvmewqe->wqe; | 2762 | wqe = &nvmewqe->wqe; |
| 2765 | } else { | 2763 | } else { |
| 2766 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 2764 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2767 | "6111 Wrong state NVMET FCP: %d cnt %d\n", | 2765 | "6111 Wrong state NVMET FCP: %d cnt %d\n", |
| 2768 | ctxp->state, ctxp->entry_cnt); | 2766 | ctxp->state, ctxp->entry_cnt); |
| 2769 | return NULL; | 2767 | return NULL; |
| @@ -3136,7 +3134,7 @@ lpfc_nvmet_unsol_fcp_abort_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, · 366 unmodified lines | |||
| 3136 | 3134 | ||
| 3137 | /* Sanity check */ | 3135 | /* Sanity check */ |
| 3138 | if (ctxp->state != LPFC_NVME_STE_ABORT) { | 3136 | if (ctxp->state != LPFC_NVME_STE_ABORT) { |
| 3139 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3137 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3140 | "6112 ABTS Wrong state:%d oxid x%x\n", | 3138 | "6112 ABTS Wrong state:%d oxid x%x\n", |
| 3141 | ctxp->state, ctxp->oxid); | 3139 | ctxp->state, ctxp->oxid); |
| 3142 | } | 3140 | } |
| @@ -3210,7 +3208,7 @@ lpfc_nvmet_xmt_ls_abort_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, · 67 unmodified lines | |||
| 3210 | result, wcqe->word3); | 3208 | result, wcqe->word3); |
| 3211 | 3209 | ||
| 3212 | if (!ctxp) { | 3210 | if (!ctxp) { |
| 3213 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3211 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3214 | "6415 NVMET LS Abort No ctx: WCQE: " | 3212 | "6415 NVMET LS Abort No ctx: WCQE: " |
| 3215 | "%08x %08x %08x %08x\n", | 3213 | "%08x %08x %08x %08x\n", |
| 3216 | wcqe->word0, wcqe->total_data_placed, | 3214 | wcqe->word0, wcqe->total_data_placed, |
| @@ -3221,7 +3219,7 @@ lpfc_nvmet_xmt_ls_abort_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe, · 4 unmodified lines | |||
| 3221 | } | 3219 | } |
| 3222 | 3220 | ||
| 3223 | if (ctxp->state != LPFC_NVME_STE_LS_ABORT) { | 3221 | if (ctxp->state != LPFC_NVME_STE_LS_ABORT) { |
| 3224 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 3222 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3225 | "6416 NVMET LS abort cmpl state mismatch: " | 3223 | "6416 NVMET LS abort cmpl state mismatch: " |
| 3226 | "oxid x%x: %d %d\n", | 3224 | "oxid x%x: %d %d\n", |
| 3227 | ctxp->oxid, ctxp->state, ctxp->entry_cnt); | 3225 | ctxp->oxid, ctxp->state, ctxp->entry_cnt); |
| @@ -3256,7 +3254,7 @@ lpfc_nvmet_unsol_issue_abort(struct lpfc_hba *phba, · 28 unmodified lines | |||
| 3256 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { | 3254 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { |
| 3257 | if (tgtp) | 3255 | if (tgtp) |
| 3258 | atomic_inc(&tgtp->xmt_abort_rsp_error); | 3256 | atomic_inc(&tgtp->xmt_abort_rsp_error); |
| 3259 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3257 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3260 | "6134 Drop ABTS - wrong NDLP state x%x.\n", | 3258 | "6134 Drop ABTS - wrong NDLP state x%x.\n", |
| 3261 | (ndlp) ? ndlp->nlp_state : NLP_STE_MAX_STATE); | 3259 | (ndlp) ? ndlp->nlp_state : NLP_STE_MAX_STATE); |
| 3262 | 3260 | ||
| @@ -3353,7 +3351,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, · 90 unmodified lines | |||
| 3353 | ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && | 3351 | ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && |
| 3354 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { | 3352 | (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { |
| 3355 | atomic_inc(&tgtp->xmt_abort_rsp_error); | 3353 | atomic_inc(&tgtp->xmt_abort_rsp_error); |
| 3356 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3354 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3357 | "6160 Drop ABORT - wrong NDLP state x%x.\n", | 3355 | "6160 Drop ABORT - wrong NDLP state x%x.\n", |
| 3358 | (ndlp) ? ndlp->nlp_state : NLP_STE_MAX_STATE); | 3356 | (ndlp) ? ndlp->nlp_state : NLP_STE_MAX_STATE); |
| 3359 | 3357 | ||
| @@ -3369,7 +3367,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, · 9 unmodified lines | |||
| 3369 | spin_lock_irqsave(&ctxp->ctxlock, flags); | 3367 | spin_lock_irqsave(&ctxp->ctxlock, flags); |
| 3370 | if (!ctxp->abort_wqeq) { | 3368 | if (!ctxp->abort_wqeq) { |
| 3371 | atomic_inc(&tgtp->xmt_abort_rsp_error); | 3369 | atomic_inc(&tgtp->xmt_abort_rsp_error); |
| 3372 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3370 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3373 | "6161 ABORT failed: No wqeqs: " | 3371 | "6161 ABORT failed: No wqeqs: " |
| 3374 | "xri: x%x\n", ctxp->oxid); | 3372 | "xri: x%x\n", ctxp->oxid); |
| 3375 | /* No failure to an ABTS request. */ | 3373 | /* No failure to an ABTS request. */ |
| @@ -3396,7 +3394,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, · 20 unmodified lines | |||
| 3396 | if (phba->hba_flag & HBA_IOQ_FLUSH) { | 3394 | if (phba->hba_flag & HBA_IOQ_FLUSH) { |
| 3397 | spin_unlock_irqrestore(&phba->hbalock, flags); | 3395 | spin_unlock_irqrestore(&phba->hbalock, flags); |
| 3398 | atomic_inc(&tgtp->xmt_abort_rsp_error); | 3396 | atomic_inc(&tgtp->xmt_abort_rsp_error); |
| 3399 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 3397 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3400 | "6163 Driver in reset cleanup - flushing " | 3398 | "6163 Driver in reset cleanup - flushing " |
| 3401 | "NVME Req now. hba_flag x%x oxid x%x\n", | 3399 | "NVME Req now. hba_flag x%x oxid x%x\n", |
| 3402 | phba->hba_flag, ctxp->oxid); | 3400 | phba->hba_flag, ctxp->oxid); |
| @@ -3411,7 +3409,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, · 8 unmodified lines | |||
| 3411 | if (abts_wqeq->iocb_flag & LPFC_DRIVER_ABORTED) { | 3409 | if (abts_wqeq->iocb_flag & LPFC_DRIVER_ABORTED) { |
| 3412 | spin_unlock_irqrestore(&phba->hbalock, flags); | 3410 | spin_unlock_irqrestore(&phba->hbalock, flags); |
| 3413 | atomic_inc(&tgtp->xmt_abort_rsp_error); | 3411 | atomic_inc(&tgtp->xmt_abort_rsp_error); |
| 3414 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME, | 3412 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3415 | "6164 Outstanding NVME I/O Abort Request " | 3413 | "6164 Outstanding NVME I/O Abort Request " |
| 3416 | "still pending on oxid x%x\n", | 3414 | "still pending on oxid x%x\n", |
| 3417 | ctxp->oxid); | 3415 | ctxp->oxid); |
| @@ -3449,7 +3447,7 @@ lpfc_nvmet_sol_fcp_issue_abort(struct lpfc_hba *phba, · 31 unmodified lines | |||
| 3449 | ctxp->flag &= ~LPFC_NVME_ABORT_OP; | 3447 | ctxp->flag &= ~LPFC_NVME_ABORT_OP; |
| 3450 | spin_unlock_irqrestore(&ctxp->ctxlock, flags); | 3448 | spin_unlock_irqrestore(&ctxp->ctxlock, flags); |
| 3451 | lpfc_sli_release_iocbq(phba, abts_wqeq); | 3449 | lpfc_sli_release_iocbq(phba, abts_wqeq); |
| 3452 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3450 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3453 | "6166 Failed ABORT issue_wqe with status x%x " | 3451 | "6166 Failed ABORT issue_wqe with status x%x " |
| 3454 | "for oxid x%x.\n", | 3452 | "for oxid x%x.\n", |
| 3455 | rc, ctxp->oxid); | 3453 | rc, ctxp->oxid); |
| @@ -3474,7 +3472,7 @@ lpfc_nvmet_unsol_fcp_issue_abort(struct lpfc_hba *phba, · 18 unmodified lines | |||
| 3474 | } | 3472 | } |
| 3475 | 3473 | ||
| 3476 | if (ctxp->state == LPFC_NVME_STE_FREE) { | 3474 | if (ctxp->state == LPFC_NVME_STE_FREE) { |
| 3477 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 3475 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3478 | "6417 NVMET ABORT ctx freed %d %d oxid x%x\n", | 3476 | "6417 NVMET ABORT ctx freed %d %d oxid x%x\n", |
| 3479 | ctxp->state, ctxp->entry_cnt, ctxp->oxid); | 3477 | ctxp->state, ctxp->entry_cnt, ctxp->oxid); |
| 3480 | rc = WQE_BUSY; | 3478 | rc = WQE_BUSY; |
| @@ -3512,7 +3510,7 @@ aerr: · 31 unmodified lines | |||
| 3512 | spin_unlock_irqrestore(&ctxp->ctxlock, flags); | 3510 | spin_unlock_irqrestore(&ctxp->ctxlock, flags); |
| 3513 | 3511 | ||
| 3514 | atomic_inc(&tgtp->xmt_abort_rsp_error); | 3512 | atomic_inc(&tgtp->xmt_abort_rsp_error); |
| 3515 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3513 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3516 | "6135 Failed to Issue ABTS for oxid x%x. Status x%x " | 3514 | "6135 Failed to Issue ABTS for oxid x%x. Status x%x " |
| 3517 | "(%x)\n", | 3515 | "(%x)\n", |
| 3518 | ctxp->oxid, rc, released); | 3516 | ctxp->oxid, rc, released); |
| @@ -3544,7 +3542,7 @@ lpfc_nvme_unsol_ls_issue_abort(struct lpfc_hba *phba, · 25 unmodified lines | |||
| 3544 | ctxp->state = LPFC_NVME_STE_LS_ABORT; | 3542 | ctxp->state = LPFC_NVME_STE_LS_ABORT; |
| 3545 | ctxp->entry_cnt++; | 3543 | ctxp->entry_cnt++; |
| 3546 | } else { | 3544 | } else { |
| 3547 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, | 3545 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3548 | "6418 NVMET LS abort state mismatch " | 3546 | "6418 NVMET LS abort state mismatch " |
| 3549 | "IO x%x: %d %d\n", | 3547 | "IO x%x: %d %d\n", |
| 3550 | ctxp->oxid, ctxp->state, ctxp->entry_cnt); | 3548 | ctxp->oxid, ctxp->state, ctxp->entry_cnt); |
| @@ -3558,7 +3556,7 @@ lpfc_nvme_unsol_ls_issue_abort(struct lpfc_hba *phba, · 7 unmodified lines | |||
| 3558 | /* Issue ABTS for this WQE based on iotag */ | 3556 | /* Issue ABTS for this WQE based on iotag */ |
| 3559 | ctxp->wqeq = lpfc_sli_get_iocbq(phba); | 3557 | ctxp->wqeq = lpfc_sli_get_iocbq(phba); |
| 3560 | if (!ctxp->wqeq) { | 3558 | if (!ctxp->wqeq) { |
| 3561 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3559 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3562 | "6068 Abort failed: No wqeqs: " | 3560 | "6068 Abort failed: No wqeqs: " |
| 3563 | "xri: x%x\n", xri); | 3561 | "xri: x%x\n", xri); |
| 3564 | /* No failure to an ABTS request. */ | 3562 | /* No failure to an ABTS request. */ |
| @@ -3590,7 +3588,7 @@ out: · 25 unmodified lines | |||
| 3590 | abts_wqeq->context2 = NULL; | 3588 | abts_wqeq->context2 = NULL; |
| 3591 | abts_wqeq->context3 = NULL; | 3589 | abts_wqeq->context3 = NULL; |
| 3592 | lpfc_sli_release_iocbq(phba, abts_wqeq); | 3590 | lpfc_sli_release_iocbq(phba, abts_wqeq); |
| 3593 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS, | 3591 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3594 | "6056 Failed to Issue ABTS. Status x%x\n", rc); | 3592 | "6056 Failed to Issue ABTS. Status x%x\n", rc); |
| 3595 | return 1; | 3593 | return 1; |
| 3596 | } | 3594 | } |
| @@ -867,11 +867,11 @@ lpfc_scsi_prep_dma_buf_s3(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd) · 866 unmodified lines | |||
| 867 | 867 | ||
| 868 | lpfc_cmd->seg_cnt = nseg; | 868 | lpfc_cmd->seg_cnt = nseg; |
| 869 | if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) { | 869 | if (lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) { |
| 870 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 870 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 871 | "9064 BLKGRD: %s: Too many sg segments from " | 871 | "9064 BLKGRD: %s: Too many sg segments" |
| 872 | "dma_map_sg. Config %d, seg_cnt %d\n", | 872 | " from dma_map_sg. Config %d, seg_cnt" |
| 873 | __func__, phba->cfg_sg_seg_cnt, | 873 | " %d\n", __func__, phba->cfg_sg_seg_cnt, |
| 874 | lpfc_cmd->seg_cnt); | 874 | lpfc_cmd->seg_cnt); |
| 875 | WARN_ON_ONCE(lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt); | 875 | WARN_ON_ONCE(lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt); |
| 876 | lpfc_cmd->seg_cnt = 0; | 876 | lpfc_cmd->seg_cnt = 0; |
| 877 | scsi_dma_unmap(scsi_cmnd); | 877 | scsi_dma_unmap(scsi_cmnd); |
| @@ -1061,7 +1061,8 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 183 unmodified lines | |||
| 1061 | * inserted in middle of the IO. | 1061 | * inserted in middle of the IO. |
| 1062 | */ | 1062 | */ |
| 1063 | 1063 | ||
| 1064 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1064 | lpfc_printf_log(phba, KERN_ERR, |
| 1065 | LOG_TRACE_EVENT, | ||
| 1065 | "9076 BLKGRD: Injecting reftag error: " | 1066 | "9076 BLKGRD: Injecting reftag error: " |
| 1066 | "write lba x%lx + x%x oldrefTag x%x\n", | 1067 | "write lba x%lx + x%x oldrefTag x%x\n", |
| 1067 | (unsigned long)lba, blockoff, | 1068 | (unsigned long)lba, blockoff, |
| @@ -1111,7 +1112,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 43 unmodified lines | |||
| 1111 | } | 1112 | } |
| 1112 | rc = BG_ERR_TGT | BG_ERR_CHECK; | 1113 | rc = BG_ERR_TGT | BG_ERR_CHECK; |
| 1113 | 1114 | ||
| 1114 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1115 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1115 | "9078 BLKGRD: Injecting reftag error: " | 1116 | "9078 BLKGRD: Injecting reftag error: " |
| 1116 | "write lba x%lx\n", (unsigned long)lba); | 1117 | "write lba x%lx\n", (unsigned long)lba); |
| 1117 | break; | 1118 | break; |
| @@ -1132,7 +1133,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 14 unmodified lines | |||
| 1132 | } | 1133 | } |
| 1133 | rc = BG_ERR_INIT; | 1134 | rc = BG_ERR_INIT; |
| 1134 | 1135 | ||
| 1135 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1136 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1136 | "9077 BLKGRD: Injecting reftag error: " | 1137 | "9077 BLKGRD: Injecting reftag error: " |
| 1137 | "write lba x%lx\n", (unsigned long)lba); | 1138 | "write lba x%lx\n", (unsigned long)lba); |
| 1138 | break; | 1139 | break; |
| @@ -1159,7 +1160,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 20 unmodified lines | |||
| 1159 | } | 1160 | } |
| 1160 | rc = BG_ERR_INIT; | 1161 | rc = BG_ERR_INIT; |
| 1161 | 1162 | ||
| 1162 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1163 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1163 | "9079 BLKGRD: Injecting reftag error: " | 1164 | "9079 BLKGRD: Injecting reftag error: " |
| 1164 | "read lba x%lx\n", (unsigned long)lba); | 1165 | "read lba x%lx\n", (unsigned long)lba); |
| 1165 | break; | 1166 | break; |
| @@ -1181,7 +1182,8 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 15 unmodified lines | |||
| 1181 | * inserted in middle of the IO. | 1182 | * inserted in middle of the IO. |
| 1182 | */ | 1183 | */ |
| 1183 | 1184 | ||
| 1184 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1185 | lpfc_printf_log(phba, KERN_ERR, |
| 1186 | LOG_TRACE_EVENT, | ||
| 1185 | "9080 BLKGRD: Injecting apptag error: " | 1187 | "9080 BLKGRD: Injecting apptag error: " |
| 1186 | "write lba x%lx + x%x oldappTag x%x\n", | 1188 | "write lba x%lx + x%x oldappTag x%x\n", |
| 1187 | (unsigned long)lba, blockoff, | 1189 | (unsigned long)lba, blockoff, |
| @@ -1230,7 +1232,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 42 unmodified lines | |||
| 1230 | } | 1232 | } |
| 1231 | rc = BG_ERR_TGT | BG_ERR_CHECK; | 1233 | rc = BG_ERR_TGT | BG_ERR_CHECK; |
| 1232 | 1234 | ||
| 1233 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1235 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1234 | "0813 BLKGRD: Injecting apptag error: " | 1236 | "0813 BLKGRD: Injecting apptag error: " |
| 1235 | "write lba x%lx\n", (unsigned long)lba); | 1237 | "write lba x%lx\n", (unsigned long)lba); |
| 1236 | break; | 1238 | break; |
| @@ -1251,7 +1253,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 14 unmodified lines | |||
| 1251 | } | 1253 | } |
| 1252 | rc = BG_ERR_INIT; | 1254 | rc = BG_ERR_INIT; |
| 1253 | 1255 | ||
| 1254 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1256 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1255 | "0812 BLKGRD: Injecting apptag error: " | 1257 | "0812 BLKGRD: Injecting apptag error: " |
| 1256 | "write lba x%lx\n", (unsigned long)lba); | 1258 | "write lba x%lx\n", (unsigned long)lba); |
| 1257 | break; | 1259 | break; |
| @@ -1278,7 +1280,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 20 unmodified lines | |||
| 1278 | } | 1280 | } |
| 1279 | rc = BG_ERR_INIT; | 1281 | rc = BG_ERR_INIT; |
| 1280 | 1282 | ||
| 1281 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1283 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1282 | "0814 BLKGRD: Injecting apptag error: " | 1284 | "0814 BLKGRD: Injecting apptag error: " |
| 1283 | "read lba x%lx\n", (unsigned long)lba); | 1285 | "read lba x%lx\n", (unsigned long)lba); |
| 1284 | break; | 1286 | break; |
| @@ -1313,7 +1315,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 28 unmodified lines | |||
| 1313 | rc |= BG_ERR_TGT | BG_ERR_SWAP; | 1315 | rc |= BG_ERR_TGT | BG_ERR_SWAP; |
| 1314 | /* Signals the caller to swap CRC->CSUM */ | 1316 | /* Signals the caller to swap CRC->CSUM */ |
| 1315 | 1317 | ||
| 1316 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1318 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1317 | "0817 BLKGRD: Injecting guard error: " | 1319 | "0817 BLKGRD: Injecting guard error: " |
| 1318 | "write lba x%lx\n", (unsigned long)lba); | 1320 | "write lba x%lx\n", (unsigned long)lba); |
| 1319 | break; | 1321 | break; |
| @@ -1335,7 +1337,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 15 unmodified lines | |||
| 1335 | rc = BG_ERR_INIT | BG_ERR_SWAP; | 1337 | rc = BG_ERR_INIT | BG_ERR_SWAP; |
| 1336 | /* Signals the caller to swap CRC->CSUM */ | 1338 | /* Signals the caller to swap CRC->CSUM */ |
| 1337 | 1339 | ||
| 1338 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1340 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1339 | "0816 BLKGRD: Injecting guard error: " | 1341 | "0816 BLKGRD: Injecting guard error: " |
| 1340 | "write lba x%lx\n", (unsigned long)lba); | 1342 | "write lba x%lx\n", (unsigned long)lba); |
| 1341 | break; | 1343 | break; |
| @@ -1363,7 +1365,7 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 21 unmodified lines | |||
| 1363 | rc = BG_ERR_INIT | BG_ERR_SWAP; | 1365 | rc = BG_ERR_INIT | BG_ERR_SWAP; |
| 1364 | /* Signals the caller to swap CRC->CSUM */ | 1366 | /* Signals the caller to swap CRC->CSUM */ |
| 1365 | 1367 | ||
| 1366 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1368 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1367 | "0818 BLKGRD: Injecting guard error: " | 1369 | "0818 BLKGRD: Injecting guard error: " |
| 1368 | "read lba x%lx\n", (unsigned long)lba); | 1370 | "read lba x%lx\n", (unsigned long)lba); |
| 1369 | } | 1371 | } |
| @@ -1413,7 +1415,7 @@ lpfc_sc_to_bg_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 43 unmodified lines | |||
| 1413 | 1415 | ||
| 1414 | case SCSI_PROT_NORMAL: | 1416 | case SCSI_PROT_NORMAL: |
| 1415 | default: | 1417 | default: |
| 1416 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1418 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1417 | "9063 BLKGRD: Bad op/guard:%d/IP combination\n", | 1419 | "9063 BLKGRD: Bad op/guard:%d/IP combination\n", |
| 1418 | scsi_get_prot_op(sc)); | 1420 | scsi_get_prot_op(sc)); |
| 1419 | ret = 1; | 1421 | ret = 1; |
| @@ -1442,7 +1444,7 @@ lpfc_sc_to_bg_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 22 unmodified lines | |||
| 1442 | 1444 | ||
| 1443 | case SCSI_PROT_NORMAL: | 1445 | case SCSI_PROT_NORMAL: |
| 1444 | default: | 1446 | default: |
| 1445 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1447 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1446 | "9075 BLKGRD: Bad op/guard:%d/CRC combination\n", | 1448 | "9075 BLKGRD: Bad op/guard:%d/CRC combination\n", |
| 1447 | scsi_get_prot_op(sc)); | 1449 | scsi_get_prot_op(sc)); |
| 1448 | ret = 1; | 1450 | ret = 1; |
| @@ -1728,7 +1730,7 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 279 unmodified lines | |||
| 1728 | sgde = scsi_sglist(sc); | 1730 | sgde = scsi_sglist(sc); |
| 1729 | 1731 | ||
| 1730 | if (!sgpe || !sgde) { | 1732 | if (!sgpe || !sgde) { |
| 1731 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1733 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1732 | "9020 Invalid s/g entry: data=x%px prot=x%px\n", | 1734 | "9020 Invalid s/g entry: data=x%px prot=x%px\n", |
| 1733 | sgpe, sgde); | 1735 | sgpe, sgde); |
| 1734 | return 0; | 1736 | return 0; |
| @@ -1840,7 +1842,7 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 105 unmodified lines | |||
| 1840 | return num_bde + 1; | 1842 | return num_bde + 1; |
| 1841 | 1843 | ||
| 1842 | if (!sgde) { | 1844 | if (!sgde) { |
| 1843 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1845 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1844 | "9065 BLKGRD:%s Invalid data segment\n", | 1846 | "9065 BLKGRD:%s Invalid data segment\n", |
| 1845 | __func__); | 1847 | __func__); |
| 1846 | return 0; | 1848 | return 0; |
| @@ -1903,8 +1905,8 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 56 unmodified lines | |||
| 1903 | reftag += protgrp_blks; | 1905 | reftag += protgrp_blks; |
| 1904 | } else { | 1906 | } else { |
| 1905 | /* if we're here, we have a bug */ | 1907 | /* if we're here, we have a bug */ |
| 1906 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 1908 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1907 | "9054 BLKGRD: bug in %s\n", __func__); | 1909 | "9054 BLKGRD: bug in %s\n", __func__); |
| 1908 | } | 1910 | } |
| 1909 | 1911 | ||
| 1910 | } while (!alldone); | 1912 | } while (!alldone); |
| @@ -2154,7 +2156,7 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 243 unmodified lines | |||
| 2154 | sgde = scsi_sglist(sc); | 2156 | sgde = scsi_sglist(sc); |
| 2155 | 2157 | ||
| 2156 | if (!sgpe || !sgde) { | 2158 | if (!sgpe || !sgde) { |
| 2157 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 2159 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2158 | "9082 Invalid s/g entry: data=x%px prot=x%px\n", | 2160 | "9082 Invalid s/g entry: data=x%px prot=x%px\n", |
| 2159 | sgpe, sgde); | 2161 | sgpe, sgde); |
| 2160 | return 0; | 2162 | return 0; |
| @@ -2307,7 +2309,7 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 146 unmodified lines | |||
| 2307 | return num_sge + 1; | 2309 | return num_sge + 1; |
| 2308 | 2310 | ||
| 2309 | if (!sgde) { | 2311 | if (!sgde) { |
| 2310 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 2312 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2311 | "9086 BLKGRD:%s Invalid data segment\n", | 2313 | "9086 BLKGRD:%s Invalid data segment\n", |
| 2312 | __func__); | 2314 | __func__); |
| 2313 | return 0; | 2315 | return 0; |
| @@ -2412,8 +2414,8 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc, · 98 unmodified lines | |||
| 2412 | reftag += protgrp_blks; | 2414 | reftag += protgrp_blks; |
| 2413 | } else { | 2415 | } else { |
| 2414 | /* if we're here, we have a bug */ | 2416 | /* if we're here, we have a bug */ |
| 2415 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 2417 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2416 | "9085 BLKGRD: bug in %s\n", __func__); | 2418 | "9085 BLKGRD: bug in %s\n", __func__); |
| 2417 | } | 2419 | } |
| 2418 | 2420 | ||
| 2419 | } while (!alldone); | 2421 | } while (!alldone); |
| @@ -2453,7 +2455,7 @@ lpfc_prot_group_type(struct lpfc_hba *phba, struct scsi_cmnd *sc) · 33 unmodified lines | |||
| 2453 | break; | 2455 | break; |
| 2454 | default: | 2456 | default: |
| 2455 | if (phba) | 2457 | if (phba) |
| 2456 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 2458 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2457 | "9021 Unsupported protection op:%d\n", | 2459 | "9021 Unsupported protection op:%d\n", |
| 2458 | op); | 2460 | op); |
| 2459 | break; | 2461 | break; |
| @@ -2617,7 +2619,7 @@ lpfc_bg_scsi_prep_dma_buf_s3(struct lpfc_hba *phba, · 157 unmodified lines | |||
| 2617 | scsi_dma_unmap(scsi_cmnd); | 2619 | scsi_dma_unmap(scsi_cmnd); |
| 2618 | lpfc_cmd->seg_cnt = 0; | 2620 | lpfc_cmd->seg_cnt = 0; |
| 2619 | 2621 | ||
| 2620 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 2622 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2621 | "9022 Unexpected protection group %i\n", | 2623 | "9022 Unexpected protection group %i\n", |
| 2622 | prot_group_type); | 2624 | prot_group_type); |
| 2623 | return 2; | 2625 | return 2; |
| @@ -2661,7 +2663,7 @@ err: · 37 unmodified lines | |||
| 2661 | scsi_prot_sg_count(scsi_cmnd), | 2663 | scsi_prot_sg_count(scsi_cmnd), |
| 2662 | scsi_cmnd->sc_data_direction); | 2664 | scsi_cmnd->sc_data_direction); |
| 2663 | 2665 | ||
| 2664 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 2666 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2665 | "9023 Cannot setup S/G List for HBA" | 2667 | "9023 Cannot setup S/G List for HBA" |
| 2666 | "IO segs %d/%d BPL %d SCSI %d: %d %d\n", | 2668 | "IO segs %d/%d BPL %d SCSI %d: %d %d\n", |
| 2667 | lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, | 2669 | lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, |
| @@ -3085,11 +3087,12 @@ lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd) · 417 unmodified lines | |||
| 3085 | lpfc_cmd->seg_cnt = nseg; | 3087 | lpfc_cmd->seg_cnt = nseg; |
| 3086 | if (!phba->cfg_xpsgl && | 3088 | if (!phba->cfg_xpsgl && |
| 3087 | lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) { | 3089 | lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt) { |
| 3088 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, "9074 BLKGRD:" | 3090 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3089 | " %s: Too many sg segments from " | 3091 | "9074 BLKGRD:" |
| 3090 | "dma_map_sg. Config %d, seg_cnt %d\n", | 3092 | " %s: Too many sg segments from " |
| 3091 | __func__, phba->cfg_sg_seg_cnt, | 3093 | "dma_map_sg. Config %d, seg_cnt %d\n", |
| 3092 | lpfc_cmd->seg_cnt); | 3094 | __func__, phba->cfg_sg_seg_cnt, |
| 3095 | lpfc_cmd->seg_cnt); | ||
| 3093 | WARN_ON_ONCE(lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt); | 3096 | WARN_ON_ONCE(lpfc_cmd->seg_cnt > phba->cfg_sg_seg_cnt); |
| 3094 | lpfc_cmd->seg_cnt = 0; | 3097 | lpfc_cmd->seg_cnt = 0; |
| 3095 | scsi_dma_unmap(scsi_cmnd); | 3098 | scsi_dma_unmap(scsi_cmnd); |
| @@ -3366,7 +3369,7 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, · 270 unmodified lines | |||
| 3366 | scsi_dma_unmap(scsi_cmnd); | 3369 | scsi_dma_unmap(scsi_cmnd); |
| 3367 | lpfc_cmd->seg_cnt = 0; | 3370 | lpfc_cmd->seg_cnt = 0; |
| 3368 | 3371 | ||
| 3369 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 3372 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3370 | "9083 Unexpected protection group %i\n", | 3373 | "9083 Unexpected protection group %i\n", |
| 3371 | prot_group_type); | 3374 | prot_group_type); |
| 3372 | return 2; | 3375 | return 2; |
| @@ -3422,7 +3425,7 @@ err: · 49 unmodified lines | |||
| 3422 | scsi_prot_sg_count(scsi_cmnd), | 3425 | scsi_prot_sg_count(scsi_cmnd), |
| 3423 | scsi_cmnd->sc_data_direction); | 3426 | scsi_cmnd->sc_data_direction); |
| 3424 | 3427 | ||
| 3425 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 3428 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3426 | "9084 Cannot setup S/G List for HBA" | 3429 | "9084 Cannot setup S/G List for HBA" |
| 3427 | "IO segs %d/%d SGL %d SCSI %d: %d %d\n", | 3430 | "IO segs %d/%d SGL %d SCSI %d: %d %d\n", |
| 3428 | lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, | 3431 | lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, |
| @@ -3632,17 +3635,17 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_io_buf *lpfc_cmd, · 203 unmodified lines | |||
| 3632 | if (resp_info & RSP_LEN_VALID) { | 3635 | if (resp_info & RSP_LEN_VALID) { |
| 3633 | rsplen = be32_to_cpu(fcprsp->rspRspLen); | 3636 | rsplen = be32_to_cpu(fcprsp->rspRspLen); |
| 3634 | if (rsplen != 0 && rsplen != 4 && rsplen != 8) { | 3637 | if (rsplen != 0 && rsplen != 4 && rsplen != 8) { |
| 3635 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 3638 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3636 | "2719 Invalid response length: " | 3639 | "2719 Invalid response length: " |
| 3637 | "tgt x%x lun x%llx cmnd x%x rsplen x%x\n", | 3640 | "tgt x%x lun x%llx cmnd x%x rsplen " |
| 3638 | cmnd->device->id, | 3641 | "x%x\n", cmnd->device->id, |
| 3639 | cmnd->device->lun, cmnd->cmnd[0], | 3642 | cmnd->device->lun, cmnd->cmnd[0], |
| 3640 | rsplen); | 3643 | rsplen); |
| 3641 | host_status = DID_ERROR; | 3644 | host_status = DID_ERROR; |
| 3642 | goto out; | 3645 | goto out; |
| 3643 | } | 3646 | } |
| 3644 | if (fcprsp->rspInfo3 != RSP_NO_FAILURE) { | 3647 | if (fcprsp->rspInfo3 != RSP_NO_FAILURE) { |
| 3645 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 3648 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3646 | "2757 Protocol failure detected during " | 3649 | "2757 Protocol failure detected during " |
| 3647 | "processing of FCP I/O op: " | 3650 | "processing of FCP I/O op: " |
| 3648 | "tgt x%x lun x%llx cmnd x%x rspInfo3 x%x\n", | 3651 | "tgt x%x lun x%llx cmnd x%x rspInfo3 x%x\n", |
| @@ -3812,7 +3815,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, · 163 unmodified lines | |||
| 3812 | /* Sanity check on return of outstanding command */ | 3815 | /* Sanity check on return of outstanding command */ |
| 3813 | cmd = lpfc_cmd->pCmd; | 3816 | cmd = lpfc_cmd->pCmd; |
| 3814 | if (!cmd || !phba) { | 3817 | if (!cmd || !phba) { |
| 3815 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, | 3818 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 3816 | "2621 IO completion: Not an active IO\n"); | 3819 | "2621 IO completion: Not an active IO\n"); |
| 3817 | spin_unlock(&lpfc_cmd->buf_lock); | 3820 | spin_unlock(&lpfc_cmd->buf_lock); |
| 3818 | return; | 3821 | return; |
| @@ -4277,7 +4280,7 @@ lpfc_scsi_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp) · 458 unmodified lines | |||
| 4277 | phba->lpfc_get_scsi_buf = lpfc_get_scsi_buf_s4; | 4280 | phba->lpfc_get_scsi_buf = lpfc_get_scsi_buf_s4; |
| 4278 | break; | 4281 | break; |
| 4279 | default: | 4282 | default: |
| 4280 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 4283 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4281 | "1418 Invalid HBA PCI-device group: 0x%x\n", | 4284 | "1418 Invalid HBA PCI-device group: 0x%x\n", |
| 4282 | dev_grp); | 4285 | dev_grp); |
| 4283 | return -ENODEV; | 4286 | return -ENODEV; |
| @@ -4324,7 +4327,7 @@ lpfc_tskmgmt_def_cmpl(struct lpfc_hba *phba, · 40 unmodified lines | |||
| 4324 | * 0, successful | 4327 | * 0, successful |
| 4325 | */ | 4328 | */ |
| 4326 | int | 4329 | int |
| 4327 | lpfc_check_pci_resettable(const struct lpfc_hba *phba) | 4330 | lpfc_check_pci_resettable(struct lpfc_hba *phba) |
| 4328 | { | 4331 | { |
| 4329 | const struct pci_dev *pdev = phba->pcidev; | 4332 | const struct pci_dev *pdev = phba->pcidev; |
| 4330 | struct pci_dev *ptr = NULL; | 4333 | struct pci_dev *ptr = NULL; |
| @@ -4528,7 +4531,7 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) · 197 unmodified lines | |||
| 4528 | if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && | 4531 | if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) && |
| 4529 | (!(phba->sli3_options & LPFC_SLI3_BG_ENABLED))) { | 4532 | (!(phba->sli3_options & LPFC_SLI3_BG_ENABLED))) { |
| 4530 | 4533 | ||
| 4531 | lpfc_printf_log(phba, KERN_ERR, LOG_BG, | 4534 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4532 | "9058 BLKGRD: ERROR: rcvd protected cmd:%02x" | 4535 | "9058 BLKGRD: ERROR: rcvd protected cmd:%02x" |
| 4533 | " op:%02x str=%s without registering for" | 4536 | " op:%02x str=%s without registering for" |
| 4534 | " BlockGuard - Rejecting command\n", | 4537 | " BlockGuard - Rejecting command\n", |
| @@ -4887,7 +4890,7 @@ wait_for_cmpl: · 352 unmodified lines | |||
| 4887 | 4890 | ||
| 4888 | if (lpfc_cmd->pCmd == cmnd) { | 4891 | if (lpfc_cmd->pCmd == cmnd) { |
| 4889 | ret = FAILED; | 4892 | ret = FAILED; |
| 4890 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 4893 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 4891 | "0748 abort handler timed out waiting " | 4894 | "0748 abort handler timed out waiting " |
| 4892 | "for aborting I/O (xri:x%x) to complete: " | 4895 | "for aborting I/O (xri:x%x) to complete: " |
| 4893 | "ret %#x, ID %d, LUN %llu\n", | 4896 | "ret %#x, ID %d, LUN %llu\n", |
| @@ -5080,7 +5083,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct scsi_cmnd *cmnd, · 186 unmodified lines | |||
| 5080 | (iocbqrsp->iocb.ulpStatus != IOSTAT_SUCCESS)) { | 5083 | (iocbqrsp->iocb.ulpStatus != IOSTAT_SUCCESS)) { |
| 5081 | if (status != IOCB_SUCCESS || | 5084 | if (status != IOCB_SUCCESS || |
| 5082 | iocbqrsp->iocb.ulpStatus != IOSTAT_FCP_RSP_ERROR) | 5085 | iocbqrsp->iocb.ulpStatus != IOSTAT_FCP_RSP_ERROR) |
| 5083 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5086 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5084 | "0727 TMF %s to TGT %d LUN %llu " | 5087 | "0727 TMF %s to TGT %d LUN %llu " |
| 5085 | "failed (%d, %d) iocb_flag x%x\n", | 5088 | "failed (%d, %d) iocb_flag x%x\n", |
| 5086 | lpfc_taskmgmt_name(task_mgmt_cmd), | 5089 | lpfc_taskmgmt_name(task_mgmt_cmd), |
| @@ -5195,7 +5198,7 @@ lpfc_reset_flush_io_context(struct lpfc_vport *vport, uint16_t tgt_id, · 108 unmodified lines | |||
| 5195 | cnt = lpfc_sli_sum_iocb(vport, tgt_id, lun_id, context); | 5198 | cnt = lpfc_sli_sum_iocb(vport, tgt_id, lun_id, context); |
| 5196 | } | 5199 | } |
| 5197 | if (cnt) { | 5200 | if (cnt) { |
| 5198 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5201 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5199 | "0724 I/O flush failure for context %s : cnt x%x\n", | 5202 | "0724 I/O flush failure for context %s : cnt x%x\n", |
| 5200 | ((context == LPFC_CTX_LUN) ? "LUN" : | 5203 | ((context == LPFC_CTX_LUN) ? "LUN" : |
| 5201 | ((context == LPFC_CTX_TGT) ? "TGT" : | 5204 | ((context == LPFC_CTX_TGT) ? "TGT" : |
| @@ -5231,7 +5234,7 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) · 29 unmodified lines | |||
| 5231 | 5234 | ||
| 5232 | rdata = lpfc_rport_data_from_scsi_device(cmnd->device); | 5235 | rdata = lpfc_rport_data_from_scsi_device(cmnd->device); |
| 5233 | if (!rdata || !rdata->pnode) { | 5236 | if (!rdata || !rdata->pnode) { |
| 5234 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5237 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5235 | "0798 Device Reset rdata failure: rdata x%px\n", | 5238 | "0798 Device Reset rdata failure: rdata x%px\n", |
| 5236 | rdata); | 5239 | rdata); |
| 5237 | return FAILED; | 5240 | return FAILED; |
| @@ -5243,7 +5246,7 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) · 5 unmodified lines | |||
| 5243 | 5246 | ||
| 5244 | status = lpfc_chk_tgt_mapped(vport, cmnd); | 5247 | status = lpfc_chk_tgt_mapped(vport, cmnd); |
| 5245 | if (status == FAILED) { | 5248 | if (status == FAILED) { |
| 5246 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5249 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5247 | "0721 Device Reset rport failure: rdata x%px\n", rdata); | 5250 | "0721 Device Reset rport failure: rdata x%px\n", rdata); |
| 5248 | return FAILED; | 5251 | return FAILED; |
| 5249 | } | 5252 | } |
| @@ -5260,7 +5263,7 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) · 10 unmodified lines | |||
| 5260 | status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, | 5263 | status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, |
| 5261 | FCP_LUN_RESET); | 5264 | FCP_LUN_RESET); |
| 5262 | 5265 | ||
| 5263 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5266 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5264 | "0713 SCSI layer issued Device Reset (%d, %llu) " | 5267 | "0713 SCSI layer issued Device Reset (%d, %llu) " |
| 5265 | "return x%x\n", tgt_id, lun_id, status); | 5268 | "return x%x\n", tgt_id, lun_id, status); |
| 5266 | 5269 | ||
| @@ -5302,7 +5305,7 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) · 35 unmodified lines | |||
| 5302 | 5305 | ||
| 5303 | rdata = lpfc_rport_data_from_scsi_device(cmnd->device); | 5306 | rdata = lpfc_rport_data_from_scsi_device(cmnd->device); |
| 5304 | if (!rdata || !rdata->pnode) { | 5307 | if (!rdata || !rdata->pnode) { |
| 5305 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5308 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5306 | "0799 Target Reset rdata failure: rdata x%px\n", | 5309 | "0799 Target Reset rdata failure: rdata x%px\n", |
| 5307 | rdata); | 5310 | rdata); |
| 5308 | return FAILED; | 5311 | return FAILED; |
| @@ -5314,7 +5317,7 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) · 5 unmodified lines | |||
| 5314 | 5317 | ||
| 5315 | status = lpfc_chk_tgt_mapped(vport, cmnd); | 5318 | status = lpfc_chk_tgt_mapped(vport, cmnd); |
| 5316 | if (status == FAILED) { | 5319 | if (status == FAILED) { |
| 5317 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5320 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5318 | "0722 Target Reset rport failure: rdata x%px\n", rdata); | 5321 | "0722 Target Reset rport failure: rdata x%px\n", rdata); |
| 5319 | if (pnode) { | 5322 | if (pnode) { |
| 5320 | spin_lock_irq(shost->host_lock); | 5323 | spin_lock_irq(shost->host_lock); |
| @@ -5339,7 +5342,7 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) · 18 unmodified lines | |||
| 5339 | status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, | 5342 | status = lpfc_send_taskmgmt(vport, cmnd, tgt_id, lun_id, |
| 5340 | FCP_TARGET_RESET); | 5343 | FCP_TARGET_RESET); |
| 5341 | 5344 | ||
| 5342 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5345 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5343 | "0723 SCSI layer issued Target Reset (%d, %llu) " | 5346 | "0723 SCSI layer issued Target Reset (%d, %llu) " |
| 5344 | "return x%x\n", tgt_id, lun_id, status); | 5347 | "return x%x\n", tgt_id, lun_id, status); |
| 5345 | 5348 | ||
| @@ -5420,7 +5423,7 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) · 74 unmodified lines | |||
| 5420 | i, 0, FCP_TARGET_RESET); | 5423 | i, 0, FCP_TARGET_RESET); |
| 5421 | 5424 | ||
| 5422 | if (status != SUCCESS) { | 5425 | if (status != SUCCESS) { |
| 5423 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5426 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5424 | "0700 Bus Reset on target %d failed\n", | 5427 | "0700 Bus Reset on target %d failed\n", |
| 5425 | i); | 5428 | i); |
| 5426 | ret = FAILED; | 5429 | ret = FAILED; |
| @@ -5437,7 +5440,7 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) · 10 unmodified lines | |||
| 5437 | if (status != SUCCESS) | 5440 | if (status != SUCCESS) |
| 5438 | ret = FAILED; | 5441 | ret = FAILED; |
| 5439 | 5442 | ||
| 5440 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5443 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5441 | "0714 SCSI layer issued Bus Reset Data: x%x\n", ret); | 5444 | "0714 SCSI layer issued Bus Reset Data: x%x\n", ret); |
| 5442 | return ret; | 5445 | return ret; |
| 5443 | } | 5446 | } |
| @@ -5466,7 +5469,7 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) · 22 unmodified lines | |||
| 5466 | struct lpfc_hba *phba = vport->phba; | 5469 | struct lpfc_hba *phba = vport->phba; |
| 5467 | int rc, ret = SUCCESS; | 5470 | int rc, ret = SUCCESS; |
| 5468 | 5471 | ||
| 5469 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5472 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5470 | "3172 SCSI layer issued Host Reset Data:\n"); | 5473 | "3172 SCSI layer issued Host Reset Data:\n"); |
| 5471 | 5474 | ||
| 5472 | lpfc_offline_prep(phba, LPFC_MBX_WAIT); | 5475 | lpfc_offline_prep(phba, LPFC_MBX_WAIT); |
| @@ -5483,7 +5486,7 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) · 10 unmodified lines | |||
| 5483 | 5486 | ||
| 5484 | return ret; | 5487 | return ret; |
| 5485 | error: | 5488 | error: |
| 5486 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5489 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5487 | "3323 Failed host reset\n"); | 5490 | "3323 Failed host reset\n"); |
| 5488 | lpfc_unblock_mgmt_io(phba); | 5491 | lpfc_unblock_mgmt_io(phba); |
| 5489 | return FAILED; | 5492 | return FAILED; |
| @@ -5594,7 +5597,7 @@ lpfc_slave_alloc(struct scsi_device *sdev) · 104 unmodified lines | |||
| 5594 | } | 5597 | } |
| 5595 | num_allocated = lpfc_new_scsi_buf_s3(vport, num_to_alloc); | 5598 | num_allocated = lpfc_new_scsi_buf_s3(vport, num_to_alloc); |
| 5596 | if (num_to_alloc != num_allocated) { | 5599 | if (num_to_alloc != num_allocated) { |
| 5597 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5600 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 5598 | "0708 Allocation request of %d " | 5601 | "0708 Allocation request of %d " |
| 5599 | "command buffers did not succeed. " | 5602 | "command buffers did not succeed. " |
| 5600 | "Allocated %d buffers.\n", | 5603 | "Allocated %d buffers.\n", |
| @@ -35,6 +35,7 @@ · 34 unmodified lines | |||
| 35 | #include <scsi/scsi_transport_fc.h> | 35 | #include <scsi/scsi_transport_fc.h> |
| 36 | #include <scsi/fc/fc_fs.h> | 36 | #include <scsi/fc/fc_fs.h> |
| 37 | #include <linux/aer.h> | 37 | #include <linux/aer.h> |
| 38 | #include <linux/crash_dump.h> | ||
| 38 | #ifdef CONFIG_X86 | 39 | #ifdef CONFIG_X86 |
| 39 | #include <asm/set_memory.h> | 40 | #include <asm/set_memory.h> |
| 40 | #endif | 41 | #endif |
| @@ -242,7 +243,7 @@ lpfc_sli4_wq_release(struct lpfc_queue *q, uint32_t index) · 201 unmodified lines | |||
| 242 | /** | 243 | /** |
| 243 | * lpfc_sli4_mq_put - Put a Mailbox Queue Entry on an Mailbox Queue | 244 | * lpfc_sli4_mq_put - Put a Mailbox Queue Entry on an Mailbox Queue |
| 244 | * @q: The Mailbox Queue to operate on. | 245 | * @q: The Mailbox Queue to operate on. |
| 245 | * @wqe: The Mailbox Queue Entry to put on the Work queue. | 246 | * @mqe: The Mailbox Queue Entry to put on the Work queue. |
| 246 | * | 247 | * |
| 247 | * This routine will copy the contents of @mqe to the next available entry on | 248 | * This routine will copy the contents of @mqe to the next available entry on |
| 248 | * the @q. This function will then ring the Work Queue Doorbell to signal the | 249 | * the @q. This function will then ring the Work Queue Doorbell to signal the |
| @@ -656,10 +657,8 @@ lpfc_sli4_if6_write_cq_db(struct lpfc_hba *phba, struct lpfc_queue *q, · 407 unmodified lines | |||
| 656 | writel(doorbell.word0, q->phba->sli4_hba.CQDBregaddr); | 657 | writel(doorbell.word0, q->phba->sli4_hba.CQDBregaddr); |
| 657 | } | 658 | } |
| 658 | 659 | ||
| 659 | /** | 660 | /* |
| 660 | * lpfc_sli4_rq_put - Put a Receive Buffer Queue Entry on a Receive Queue | 661 | * lpfc_sli4_rq_put - Put a Receive Buffer Queue Entry on a Receive Queue |
| 661 | * @q: The Header Receive Queue to operate on. | ||
| 662 | * @wqe: The Receive Queue Entry to put on the Receive queue. | ||
| 663 | * | 662 | * |
| 664 | * This routine will copy the contents of @wqe to the next available entry on | 663 | * This routine will copy the contents of @wqe to the next available entry on |
| 665 | * the @q. This function will then ring the Receive Queue Doorbell to signal the | 664 | * the @q. This function will then ring the Receive Queue Doorbell to signal the |
| @@ -722,9 +721,8 @@ lpfc_sli4_rq_put(struct lpfc_queue *hq, struct lpfc_queue *dq, · 56 unmodified lines | |||
| 722 | return hq_put_index; | 721 | return hq_put_index; |
| 723 | } | 722 | } |
| 724 | 723 | ||
| 725 | /** | 724 | /* |
| 726 | * lpfc_sli4_rq_release - Updates internal hba index for RQ | 725 | * lpfc_sli4_rq_release - Updates internal hba index for RQ |
| 727 | * @q: The Header Receive Queue to operate on. | ||
| 728 | * | 726 | * |
| 729 | * This routine will update the HBA index of a queue to reflect consumption of | 727 | * This routine will update the HBA index of a queue to reflect consumption of |
| 730 | * one Receive Queue Entry by the HBA. When the HBA indicates that it has | 728 | * one Receive Queue Entry by the HBA. When the HBA indicates that it has |
| @@ -1008,7 +1006,7 @@ lpfc_cleanup_vports_rrqs(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) · 277 unmodified lines | |||
| 1008 | * lpfc_test_rrq_active - Test RRQ bit in xri_bitmap. | 1006 | * lpfc_test_rrq_active - Test RRQ bit in xri_bitmap. |
| 1009 | * @phba: Pointer to HBA context object. | 1007 | * @phba: Pointer to HBA context object. |
| 1010 | * @ndlp: Targets nodelist pointer for this exchange. | 1008 | * @ndlp: Targets nodelist pointer for this exchange. |
| 1011 | * @xritag the xri in the bitmap to test. | 1009 | * @xritag: the xri in the bitmap to test. |
| 1012 | * | 1010 | * |
| 1013 | * This function returns: | 1011 | * This function returns: |
| 1014 | * 0 = rrq not active for this xri | 1012 | * 0 = rrq not active for this xri |
| @@ -1079,7 +1077,7 @@ lpfc_set_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, · 64 unmodified lines | |||
| 1079 | goto out; | 1077 | goto out; |
| 1080 | 1078 | ||
| 1081 | spin_unlock_irqrestore(&phba->hbalock, iflags); | 1079 | spin_unlock_irqrestore(&phba->hbalock, iflags); |
| 1082 | rrq = mempool_alloc(phba->rrq_pool, GFP_KERNEL); | 1080 | rrq = mempool_alloc(phba->rrq_pool, GFP_ATOMIC); |
| 1083 | if (!rrq) { | 1081 | if (!rrq) { |
| 1084 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 1082 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
| 1085 | "3155 Unable to allocate RRQ xri:0x%x rxid:0x%x" | 1083 | "3155 Unable to allocate RRQ xri:0x%x rxid:0x%x" |
| @@ -1118,7 +1116,7 @@ out: · 32 unmodified lines | |||
| 1118 | /** | 1116 | /** |
| 1119 | * __lpfc_sli_get_els_sglq - Allocates an iocb object from sgl pool | 1117 | * __lpfc_sli_get_els_sglq - Allocates an iocb object from sgl pool |
| 1120 | * @phba: Pointer to HBA context object. | 1118 | * @phba: Pointer to HBA context object. |
| 1121 | * @piocb: Pointer to the iocbq. | 1119 | * @piocbq: Pointer to the iocbq. |
| 1122 | * | 1120 | * |
| 1123 | * The driver calls this function with either the nvme ls ring lock | 1121 | * The driver calls this function with either the nvme ls ring lock |
| 1124 | * or the fc els ring lock held depending on the iocb usage. This function | 1122 | * or the fc els ring lock held depending on the iocb usage. This function |
| @@ -1194,7 +1192,7 @@ __lpfc_sli_get_els_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq) · 69 unmodified lines | |||
| 1194 | /** | 1192 | /** |
| 1195 | * __lpfc_sli_get_nvmet_sglq - Allocates an iocb object from sgl pool | 1193 | * __lpfc_sli_get_nvmet_sglq - Allocates an iocb object from sgl pool |
| 1196 | * @phba: Pointer to HBA context object. | 1194 | * @phba: Pointer to HBA context object. |
| 1197 | * @piocb: Pointer to the iocbq. | 1195 | * @piocbq: Pointer to the iocbq. |
| 1198 | * | 1196 | * |
| 1199 | * This function is called with the sgl_list lock held. This function | 1197 | * This function is called with the sgl_list lock held. This function |
| 1200 | * gets a new driver sglq object from the sglq list. If the | 1198 | * gets a new driver sglq object from the sglq list. If the |
| @@ -1491,6 +1489,7 @@ lpfc_sli_iocb_cmd_type(uint8_t iocb_cmnd) · 290 unmodified lines | |||
| 1491 | case DSSCMD_IWRITE64_CX: | 1489 | case DSSCMD_IWRITE64_CX: |
| 1492 | case DSSCMD_IREAD64_CR: | 1490 | case DSSCMD_IREAD64_CR: |
| 1493 | case DSSCMD_IREAD64_CX: | 1491 | case DSSCMD_IREAD64_CX: |
| 1492 | case CMD_SEND_FRAME: | ||
| 1494 | type = LPFC_SOL_IOCB; | 1493 | type = LPFC_SOL_IOCB; |
| 1495 | break; | 1494 | break; |
| 1496 | case CMD_ABORT_XRI_CN: | 1495 | case CMD_ABORT_XRI_CN: |
| @@ -1565,7 +1564,7 @@ lpfc_sli_ring_map(struct lpfc_hba *phba) · 68 unmodified lines | |||
| 1565 | lpfc_config_ring(phba, i, pmb); | 1564 | lpfc_config_ring(phba, i, pmb); |
| 1566 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 1565 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
| 1567 | if (rc != MBX_SUCCESS) { | 1566 | if (rc != MBX_SUCCESS) { |
| 1568 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1567 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1569 | "0446 Adapter failed to init (%d), " | 1568 | "0446 Adapter failed to init (%d), " |
| 1570 | "mbxCmd x%x CFG_RING, mbxStatus x%x, " | 1569 | "mbxCmd x%x CFG_RING, mbxStatus x%x, " |
| 1571 | "ring %d\n", | 1570 | "ring %d\n", |
| @@ -1674,7 +1673,7 @@ lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring) · 102 unmodified lines | |||
| 1674 | pring->sli.sli3.local_getidx = le32_to_cpu(pgp->cmdGetInx); | 1673 | pring->sli.sli3.local_getidx = le32_to_cpu(pgp->cmdGetInx); |
| 1675 | 1674 | ||
| 1676 | if (unlikely(pring->sli.sli3.local_getidx >= max_cmd_idx)) { | 1675 | if (unlikely(pring->sli.sli3.local_getidx >= max_cmd_idx)) { |
| 1677 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 1676 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1678 | "0315 Ring %d issue: portCmdGet %d " | 1677 | "0315 Ring %d issue: portCmdGet %d " |
| 1679 | "is bigger than cmd ring %d\n", | 1678 | "is bigger than cmd ring %d\n", |
| 1680 | pring->ringno, | 1679 | pring->ringno, |
| @@ -1960,8 +1959,7 @@ lpfc_sli_next_hbq_slot(struct lpfc_hba *phba, uint32_t hbqno) · 279 unmodified lines | |||
| 1960 | hbqp->local_hbqGetIdx = getidx; | 1959 | hbqp->local_hbqGetIdx = getidx; |
| 1961 | 1960 | ||
| 1962 | if (unlikely(hbqp->local_hbqGetIdx >= hbqp->entry_count)) { | 1961 | if (unlikely(hbqp->local_hbqGetIdx >= hbqp->entry_count)) { |
| 1963 | lpfc_printf_log(phba, KERN_ERR, | 1962 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 1964 | LOG_SLI | LOG_VPORT, | ||
| 1965 | "1802 HBQ %d: local_hbqGetIdx " | 1963 | "1802 HBQ %d: local_hbqGetIdx " |
| 1966 | "%u is > than hbqp->entry_count %u\n", | 1964 | "%u is > than hbqp->entry_count %u\n", |
| 1967 | hbqno, hbqp->local_hbqGetIdx, | 1965 | hbqno, hbqp->local_hbqGetIdx, |
| @@ -2229,10 +2227,8 @@ lpfc_sli_hbqbuf_init_hbqs(struct lpfc_hba *phba, uint32_t qno) · 261 unmodified lines | |||
| 2229 | lpfc_hbq_defs[qno]->init_count); | 2227 | lpfc_hbq_defs[qno]->init_count); |
| 2230 | } | 2228 | } |
| 2231 | 2229 | ||
| 2232 | /** | 2230 | /* |
| 2233 | * lpfc_sli_hbqbuf_get - Remove the first hbq off of an hbq list | 2231 | * lpfc_sli_hbqbuf_get - Remove the first hbq off of an hbq list |
| 2234 | * @phba: Pointer to HBA context object. | ||
| 2235 | * @hbqno: HBQ number. | ||
| 2236 | * | 2232 | * |
| 2237 | * This function removes the first hbq buffer on an hbq list and returns a | 2233 | * This function removes the first hbq buffer on an hbq list and returns a |
| 2238 | * pointer to that buffer. If it finds no buffers on the list it returns NULL. | 2234 | * pointer to that buffer. If it finds no buffers on the list it returns NULL. |
| @@ -2251,7 +2247,7 @@ lpfc_sli_hbqbuf_get(struct list_head *rb_list) · 12 unmodified lines | |||
| 2251 | /** | 2247 | /** |
| 2252 | * lpfc_sli_rqbuf_get - Remove the first dma buffer off of an RQ list | 2248 | * lpfc_sli_rqbuf_get - Remove the first dma buffer off of an RQ list |
| 2253 | * @phba: Pointer to HBA context object. | 2249 | * @phba: Pointer to HBA context object. |
| 2254 | * @hbqno: HBQ number. | 2250 | * @hrq: HBQ number. |
| 2255 | * | 2251 | * |
| 2256 | * This function removes the first RQ buffer on an RQ buffer list and returns a | 2252 | * This function removes the first RQ buffer on an RQ buffer list and returns a |
| 2257 | * pointer to that buffer. If it finds no buffers on the list it returns NULL. | 2253 | * pointer to that buffer. If it finds no buffers on the list it returns NULL. |
| @@ -2300,7 +2296,7 @@ lpfc_sli_hbqbuf_find(struct lpfc_hba *phba, uint32_t tag) · 42 unmodified lines | |||
| 2300 | } | 2296 | } |
| 2301 | } | 2297 | } |
| 2302 | spin_unlock_irq(&phba->hbalock); | 2298 | spin_unlock_irq(&phba->hbalock); |
| 2303 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI | LOG_VPORT, | 2299 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2304 | "1803 Bad hbq tag. Data: x%x x%x\n", | 2300 | "1803 Bad hbq tag. Data: x%x x%x\n", |
| 2305 | tag, phba->hbqs[tag >> 16].buffer_count); | 2301 | tag, phba->hbqs[tag >> 16].buffer_count); |
| 2306 | return NULL; | 2302 | return NULL; |
| @@ -2554,7 +2550,7 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 247 unmodified lines | |||
| 2554 | /* Check security permission status on INIT_LINK mailbox command */ | 2550 | /* Check security permission status on INIT_LINK mailbox command */ |
| 2555 | if ((pmb->u.mb.mbxCommand == MBX_INIT_LINK) && | 2551 | if ((pmb->u.mb.mbxCommand == MBX_INIT_LINK) && |
| 2556 | (pmb->u.mb.mbxStatus == MBXERR_SEC_NO_PERMISSION)) | 2552 | (pmb->u.mb.mbxStatus == MBXERR_SEC_NO_PERMISSION)) |
| 2557 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 2553 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2558 | "2860 SLI authentication is required " | 2554 | "2860 SLI authentication is required " |
| 2559 | "for INIT_LINK but has not done yet\n"); | 2555 | "for INIT_LINK but has not done yet\n"); |
| 2560 | 2556 | ||
| @@ -2690,7 +2686,7 @@ lpfc_sli_handle_mb_event(struct lpfc_hba *phba) · 129 unmodified lines | |||
| 2690 | if (lpfc_sli_chk_mbx_command(pmbox->mbxCommand) == | 2686 | if (lpfc_sli_chk_mbx_command(pmbox->mbxCommand) == |
| 2691 | MBX_SHUTDOWN) { | 2687 | MBX_SHUTDOWN) { |
| 2692 | /* Unknown mailbox command compl */ | 2688 | /* Unknown mailbox command compl */ |
| 2693 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 2689 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2694 | "(%d):0323 Unknown Mailbox command " | 2690 | "(%d):0323 Unknown Mailbox command " |
| 2695 | "x%x (x%x/x%x) Cmpl\n", | 2691 | "x%x (x%x/x%x) Cmpl\n", |
| 2696 | pmb->vport ? pmb->vport->vpi : | 2692 | pmb->vport ? pmb->vport->vpi : |
| @@ -2848,7 +2844,7 @@ lpfc_nvme_unsol_ls_handler(struct lpfc_hba *phba, struct lpfc_iocbq *piocb) · 151 unmodified lines | |||
| 2848 | } | 2844 | } |
| 2849 | 2845 | ||
| 2850 | if (unlikely(failwhy)) { | 2846 | if (unlikely(failwhy)) { |
| 2851 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC | LOG_NVME_IOERR, | 2847 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2852 | "6154 Drop NVME LS: SID %06X OXID x%X: %s\n", | 2848 | "6154 Drop NVME LS: SID %06X OXID x%X: %s\n", |
| 2853 | sid, oxid, failwhy); | 2849 | sid, oxid, failwhy); |
| 2854 | goto out_fail; | 2850 | goto out_fail; |
| @@ -2888,7 +2884,7 @@ lpfc_nvme_unsol_ls_handler(struct lpfc_hba *phba, struct lpfc_iocbq *piocb) · 33 unmodified lines | |||
| 2888 | if (!ret) | 2884 | if (!ret) |
| 2889 | return; | 2885 | return; |
| 2890 | 2886 | ||
| 2891 | lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC | LOG_NVME_IOERR, | 2887 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 2892 | "6155 Drop NVME LS from DID %06X: SID %06X OXID x%X " | 2888 | "6155 Drop NVME LS from DID %06X: SID %06X OXID x%X " |
| 2893 | "NVMe%s handler failed %d\n", | 2889 | "NVMe%s handler failed %d\n", |
| 2894 | did, sid, oxid, | 2890 | did, sid, oxid, |
| @@ -3171,7 +3167,7 @@ lpfc_sli_iocbq_lookup(struct lpfc_hba *phba, · 276 unmodified lines | |||
| 3171 | } | 3167 | } |
| 3172 | 3168 | ||
| 3173 | spin_unlock_irqrestore(temp_lock, iflag); | 3169 | spin_unlock_irqrestore(temp_lock, iflag); |
| 3174 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3170 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3175 | "0317 iotag x%x is out of " | 3171 | "0317 iotag x%x is out of " |
| 3176 | "range: max iotag x%x wd0 x%x\n", | 3172 | "range: max iotag x%x wd0 x%x\n", |
| 3177 | iotag, phba->sli.last_iotag, | 3173 | iotag, phba->sli.last_iotag, |
| @@ -3218,7 +3214,7 @@ lpfc_sli_iocbq_lookup_by_tag(struct lpfc_hba *phba, · 40 unmodified lines | |||
| 3218 | } | 3214 | } |
| 3219 | 3215 | ||
| 3220 | spin_unlock_irqrestore(temp_lock, iflag); | 3216 | spin_unlock_irqrestore(temp_lock, iflag); |
| 3221 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3217 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3222 | "0372 iotag x%x lookup error: max iotag (x%x) " | 3218 | "0372 iotag x%x lookup error: max iotag (x%x) " |
| 3223 | "iocb_flag x%x\n", | 3219 | "iocb_flag x%x\n", |
| 3224 | iotag, phba->sli.last_iotag, | 3220 | iotag, phba->sli.last_iotag, |
| @@ -3394,7 +3390,7 @@ lpfc_sli_rsp_pointers_error(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) · 169 unmodified lines | |||
| 3394 | * Ring <ringno> handler: portRspPut <portRspPut> is bigger than | 3390 | * Ring <ringno> handler: portRspPut <portRspPut> is bigger than |
| 3395 | * rsp ring <portRspMax> | 3391 | * rsp ring <portRspMax> |
| 3396 | */ | 3392 | */ |
| 3397 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3393 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3398 | "0312 Ring %d handler: portRspPut %d " | 3394 | "0312 Ring %d handler: portRspPut %d " |
| 3399 | "is bigger than rsp ring %d\n", | 3395 | "is bigger than rsp ring %d\n", |
| 3400 | pring->ringno, le32_to_cpu(pgp->rspPutInx), | 3396 | pring->ringno, le32_to_cpu(pgp->rspPutInx), |
| @@ -3416,7 +3412,7 @@ lpfc_sli_rsp_pointers_error(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) · 15 unmodified lines | |||
| 3416 | 3412 | ||
| 3417 | /** | 3413 | /** |
| 3418 | * lpfc_poll_eratt - Error attention polling timer timeout handler | 3414 | * lpfc_poll_eratt - Error attention polling timer timeout handler |
| 3419 | * @ptr: Pointer to address of HBA context object. | 3415 | * @t: Context to fetch pointer to address of HBA context object from. |
| 3420 | * | 3416 | * |
| 3421 | * This function is invoked by the Error Attention polling timer when the | 3417 | * This function is invoked by the Error Attention polling timer when the |
| 3422 | * timer times out. It will check the SLI Error Attention register for | 3418 | * timer times out. It will check the SLI Error Attention register for |
| @@ -3613,7 +3609,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba *phba, · 190 unmodified lines | |||
| 3613 | phba->brd_no, adaptermsg); | 3609 | phba->brd_no, adaptermsg); |
| 3614 | } else { | 3610 | } else { |
| 3615 | /* Unknown IOCB command */ | 3611 | /* Unknown IOCB command */ |
| 3616 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3612 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3617 | "0334 Unknown IOCB command " | 3613 | "0334 Unknown IOCB command " |
| 3618 | "Data: x%x, x%x x%x x%x x%x\n", | 3614 | "Data: x%x, x%x x%x x%x x%x\n", |
| 3619 | type, irsp->ulpCommand, | 3615 | type, irsp->ulpCommand, |
| @@ -3811,7 +3807,7 @@ lpfc_sli_sp_handle_rspiocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, · 191 unmodified lines | |||
| 3811 | phba->brd_no, adaptermsg); | 3807 | phba->brd_no, adaptermsg); |
| 3812 | } else { | 3808 | } else { |
| 3813 | /* Unknown IOCB command */ | 3809 | /* Unknown IOCB command */ |
| 3814 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3810 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3815 | "0335 Unknown IOCB " | 3811 | "0335 Unknown IOCB " |
| 3816 | "command Data: x%x " | 3812 | "command Data: x%x " |
| 3817 | "x%x x%x x%x\n", | 3813 | "x%x x%x x%x\n", |
| @@ -3891,7 +3887,7 @@ lpfc_sli_handle_slow_ring_event_s3(struct lpfc_hba *phba, · 73 unmodified lines | |||
| 3891 | * Ring <ringno> handler: portRspPut <portRspPut> is bigger than | 3887 | * Ring <ringno> handler: portRspPut <portRspPut> is bigger than |
| 3892 | * rsp ring <portRspMax> | 3888 | * rsp ring <portRspMax> |
| 3893 | */ | 3889 | */ |
| 3894 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3890 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 3895 | "0303 Ring %d handler: portRspPut %d " | 3891 | "0303 Ring %d handler: portRspPut %d " |
| 3896 | "is bigger than rsp ring %d\n", | 3892 | "is bigger than rsp ring %d\n", |
| 3897 | pring->ringno, portRspPut, portRspMax); | 3893 | pring->ringno, portRspPut, portRspMax); |
| @@ -4102,7 +4098,6 @@ lpfc_sli_abort_iocb_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) · 204 unmodified lines | |||
| 4102 | /** | 4098 | /** |
| 4103 | * lpfc_sli_abort_fcp_rings - Abort all iocbs in all FCP rings | 4099 | * lpfc_sli_abort_fcp_rings - Abort all iocbs in all FCP rings |
| 4104 | * @phba: Pointer to HBA context object. | 4100 | * @phba: Pointer to HBA context object. |
| 4105 | * @pring: Pointer to driver SLI ring object. | ||
| 4106 | * | 4101 | * |
| 4107 | * This function aborts all iocbs in FCP rings and frees all the iocb | 4102 | * This function aborts all iocbs in FCP rings and frees all the iocb |
| 4108 | * objects in txq. This function issues an abort iocb for all the iocb commands | 4103 | * objects in txq. This function issues an abort iocb for all the iocb commands |
| @@ -4263,7 +4258,7 @@ lpfc_sli_brdready_s3(struct lpfc_hba *phba, uint32_t mask) · 154 unmodified lines | |||
| 4263 | 4258 | ||
| 4264 | /* Check to see if any errors occurred during init */ | 4259 | /* Check to see if any errors occurred during init */ |
| 4265 | if ((status & HS_FFERM) || (i >= 20)) { | 4260 | if ((status & HS_FFERM) || (i >= 20)) { |
| 4266 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 4261 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4267 | "2751 Adapter failed to restart, " | 4262 | "2751 Adapter failed to restart, " |
| 4268 | "status reg x%x, FW Data: A8 x%x AC x%x\n", | 4263 | "status reg x%x, FW Data: A8 x%x AC x%x\n", |
| 4269 | status, | 4264 | status, |
| @@ -4485,7 +4480,7 @@ lpfc_sli_brdkill(struct lpfc_hba *phba) · 215 unmodified lines | |||
| 4485 | if (retval != MBX_SUCCESS) { | 4480 | if (retval != MBX_SUCCESS) { |
| 4486 | if (retval != MBX_BUSY) | 4481 | if (retval != MBX_BUSY) |
| 4487 | mempool_free(pmb, phba->mbox_mem_pool); | 4482 | mempool_free(pmb, phba->mbox_mem_pool); |
| 4488 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 4483 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4489 | "2752 KILL_BOARD command failed retval %d\n", | 4484 | "2752 KILL_BOARD command failed retval %d\n", |
| 4490 | retval); | 4485 | retval); |
| 4491 | spin_lock_irq(&phba->hbalock); | 4486 | spin_lock_irq(&phba->hbalock); |
| @@ -4837,7 +4832,7 @@ lpfc_sli_chipset_init(struct lpfc_hba *phba) · 345 unmodified lines | |||
| 4837 | if (i++ >= 200) { | 4832 | if (i++ >= 200) { |
| 4838 | /* Adapter failed to init, timeout, status reg | 4833 | /* Adapter failed to init, timeout, status reg |
| 4839 | <status> */ | 4834 | <status> */ |
| 4840 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 4835 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4841 | "0436 Adapter failed to init, " | 4836 | "0436 Adapter failed to init, " |
| 4842 | "timeout, status reg x%x, " | 4837 | "timeout, status reg x%x, " |
| 4843 | "FW Data: A8 x%x AC x%x\n", status, | 4838 | "FW Data: A8 x%x AC x%x\n", status, |
| @@ -4852,7 +4847,7 @@ lpfc_sli_chipset_init(struct lpfc_hba *phba) · 8 unmodified lines | |||
| 4852 | /* ERROR: During chipset initialization */ | 4847 | /* ERROR: During chipset initialization */ |
| 4853 | /* Adapter failed to init, chipset, status reg | 4848 | /* Adapter failed to init, chipset, status reg |
| 4854 | <status> */ | 4849 | <status> */ |
| 4855 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 4850 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4856 | "0437 Adapter failed to init, " | 4851 | "0437 Adapter failed to init, " |
| 4857 | "chipset, status reg x%x, " | 4852 | "chipset, status reg x%x, " |
| 4858 | "FW Data: A8 x%x AC x%x\n", status, | 4853 | "FW Data: A8 x%x AC x%x\n", status, |
| @@ -4883,7 +4878,7 @@ lpfc_sli_chipset_init(struct lpfc_hba *phba) · 24 unmodified lines | |||
| 4883 | if (status & HS_FFERM) { | 4878 | if (status & HS_FFERM) { |
| 4884 | /* ERROR: During chipset initialization */ | 4879 | /* ERROR: During chipset initialization */ |
| 4885 | /* Adapter failed to init, chipset, status reg <status> */ | 4880 | /* Adapter failed to init, chipset, status reg <status> */ |
| 4886 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 4881 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 4887 | "0438 Adapter failed to init, chipset, " | 4882 | "0438 Adapter failed to init, chipset, " |
| 4888 | "status reg x%x, " | 4883 | "status reg x%x, " |
| 4889 | "FW Data: A8 x%x AC x%x\n", status, | 4884 | "FW Data: A8 x%x AC x%x\n", status, |
| @@ -5106,7 +5101,7 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode) · 216 unmodified lines | |||
| 5106 | LPFC_SLI3_CRP_ENABLED | | 5101 | LPFC_SLI3_CRP_ENABLED | |
| 5107 | LPFC_SLI3_DSS_ENABLED); | 5102 | LPFC_SLI3_DSS_ENABLED); |
| 5108 | if (rc != MBX_SUCCESS) { | 5103 | if (rc != MBX_SUCCESS) { |
| 5109 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 5104 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5110 | "0442 Adapter failed to init, mbxCmd x%x " | 5105 | "0442 Adapter failed to init, mbxCmd x%x " |
| 5111 | "CONFIG_PORT, mbxStatus x%x Data: x%x\n", | 5106 | "CONFIG_PORT, mbxStatus x%x Data: x%x\n", |
| 5112 | pmb->u.mb.mbxCommand, pmb->u.mb.mbxStatus, 0); | 5107 | pmb->u.mb.mbxCommand, pmb->u.mb.mbxStatus, 0); |
| @@ -5156,7 +5151,7 @@ lpfc_sli_config_port(struct lpfc_hba *phba, int sli_mode) · 43 unmodified lines | |||
| 5156 | if (pmb->u.mb.un.varCfgPort.gbg == 0) { | 5151 | if (pmb->u.mb.un.varCfgPort.gbg == 0) { |
| 5157 | phba->cfg_enable_bg = 0; | 5152 | phba->cfg_enable_bg = 0; |
| 5158 | phba->sli3_options &= ~LPFC_SLI3_BG_ENABLED; | 5153 | phba->sli3_options &= ~LPFC_SLI3_BG_ENABLED; |
| 5159 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 5154 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5160 | "0443 Adapter did not grant " | 5155 | "0443 Adapter did not grant " |
| 5161 | "BlockGuard\n"); | 5156 | "BlockGuard\n"); |
| 5162 | } | 5157 | } |
| @@ -5195,7 +5190,7 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) · 32 unmodified lines | |||
| 5195 | switch (phba->cfg_sli_mode) { | 5190 | switch (phba->cfg_sli_mode) { |
| 5196 | case 2: | 5191 | case 2: |
| 5197 | if (phba->cfg_enable_npiv) { | 5192 | if (phba->cfg_enable_npiv) { |
| 5198 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, | 5193 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5199 | "1824 NPIV enabled: Override sli_mode " | 5194 | "1824 NPIV enabled: Override sli_mode " |
| 5200 | "parameter (%d) to auto (0).\n", | 5195 | "parameter (%d) to auto (0).\n", |
| 5201 | phba->cfg_sli_mode); | 5196 | phba->cfg_sli_mode); |
| @@ -5207,7 +5202,7 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) · 5 unmodified lines | |||
| 5207 | case 3: | 5202 | case 3: |
| 5208 | break; | 5203 | break; |
| 5209 | default: | 5204 | default: |
| 5210 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, | 5205 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5211 | "1819 Unrecognized sli_mode parameter: %d.\n", | 5206 | "1819 Unrecognized sli_mode parameter: %d.\n", |
| 5212 | phba->cfg_sli_mode); | 5207 | phba->cfg_sli_mode); |
| 5213 | 5208 | ||
| @@ -5218,7 +5213,7 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 5218 | rc = lpfc_sli_config_port(phba, mode); | 5213 | rc = lpfc_sli_config_port(phba, mode); |
| 5219 | 5214 | ||
| 5220 | if (rc && phba->cfg_sli_mode == 3) | 5215 | if (rc && phba->cfg_sli_mode == 3) |
| 5221 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, | 5216 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5222 | "1820 Unable to select SLI-3. " | 5217 | "1820 Unable to select SLI-3. " |
| 5223 | "Not supported by adapter.\n"); | 5218 | "Not supported by adapter.\n"); |
| 5224 | if (rc && mode != 2) | 5219 | if (rc && mode != 2) |
| @@ -5312,7 +5307,7 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) · 87 unmodified lines | |||
| 5312 | 5307 | ||
| 5313 | lpfc_sli_hba_setup_error: | 5308 | lpfc_sli_hba_setup_error: |
| 5314 | phba->link_state = LPFC_HBA_ERROR; | 5309 | phba->link_state = LPFC_HBA_ERROR; |
| 5315 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 5310 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5316 | "0445 Firmware initialization failed\n"); | 5311 | "0445 Firmware initialization failed\n"); |
| 5317 | return rc; | 5312 | return rc; |
| 5318 | } | 5313 | } |
| @@ -5320,7 +5315,7 @@ lpfc_sli_hba_setup_error: · 1 unmodified line | |||
| 5320 | /** | 5315 | /** |
| 5321 | * lpfc_sli4_read_fcoe_params - Read fcoe params from conf region | 5316 | * lpfc_sli4_read_fcoe_params - Read fcoe params from conf region |
| 5322 | * @phba: Pointer to HBA context object. | 5317 | * @phba: Pointer to HBA context object. |
| 5323 | * @mboxq: mailbox pointer. | 5318 | * |
| 5324 | * This function issue a dump mailbox command to read config region | 5319 | * This function issue a dump mailbox command to read config region |
| 5325 | * 23 and parse the records in the region and populate driver | 5320 | * 23 and parse the records in the region and populate driver |
| 5326 | * data structure. | 5321 | * data structure. |
| @@ -5509,7 +5504,7 @@ lpfc_sli4_get_ctl_attr(struct lpfc_hba *phba) · 182 unmodified lines | |||
| 5509 | LPFC_SLI4_MBX_NEMBED); | 5504 | LPFC_SLI4_MBX_NEMBED); |
| 5510 | 5505 | ||
| 5511 | if (alloclen < reqlen) { | 5506 | if (alloclen < reqlen) { |
| 5512 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 5507 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5513 | "3084 Allocated DMA memory size (%d) is " | 5508 | "3084 Allocated DMA memory size (%d) is " |
| 5514 | "less than the requested DMA memory size " | 5509 | "less than the requested DMA memory size " |
| 5515 | "(%d)\n", alloclen, reqlen); | 5510 | "(%d)\n", alloclen, reqlen); |
| @@ -5769,7 +5764,7 @@ lpfc_sli4_get_avail_extnt_rsrc(struct lpfc_hba *phba, uint16_t type, · 253 unmodified lines | |||
| 5769 | rsrc_info = &mbox->u.mqe.un.rsrc_extent_info; | 5764 | rsrc_info = &mbox->u.mqe.un.rsrc_extent_info; |
| 5770 | if (bf_get(lpfc_mbox_hdr_status, | 5765 | if (bf_get(lpfc_mbox_hdr_status, |
| 5771 | &rsrc_info->header.cfg_shdr.response)) { | 5766 | &rsrc_info->header.cfg_shdr.response)) { |
| 5772 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_INIT, | 5767 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5773 | "2930 Failed to get resource extents " | 5768 | "2930 Failed to get resource extents " |
| 5774 | "Status 0x%x Add'l Status 0x%x\n", | 5769 | "Status 0x%x Add'l Status 0x%x\n", |
| 5775 | bf_get(lpfc_mbox_hdr_status, | 5770 | bf_get(lpfc_mbox_hdr_status, |
| @@ -5858,10 +5853,10 @@ lpfc_sli4_chk_avail_extnt_rsrc(struct lpfc_hba *phba, uint16_t type) · 82 unmodified lines | |||
| 5858 | /** | 5853 | /** |
| 5859 | * lpfc_sli4_cfg_post_extnts - | 5854 | * lpfc_sli4_cfg_post_extnts - |
| 5860 | * @phba: Pointer to HBA context object. | 5855 | * @phba: Pointer to HBA context object. |
| 5861 | * @extnt_cnt - number of available extents. | 5856 | * @extnt_cnt: number of available extents. |
| 5862 | * @type - the extent type (rpi, xri, vfi, vpi). | 5857 | * @type: the extent type (rpi, xri, vfi, vpi). |
| 5863 | * @emb - buffer to hold either MBX_EMBED or MBX_NEMBED operation. | 5858 | * @emb: buffer to hold either MBX_EMBED or MBX_NEMBED operation. |
| 5864 | * @mbox - pointer to the caller's allocated mailbox structure. | 5859 | * @mbox: pointer to the caller's allocated mailbox structure. |
| 5865 | * | 5860 | * |
| 5866 | * This function executes the extents allocation request. It also | 5861 | * This function executes the extents allocation request. It also |
| 5867 | * takes care of the amount of memory needed to allocate or get the | 5862 | * takes care of the amount of memory needed to allocate or get the |
| @@ -5907,7 +5902,7 @@ lpfc_sli4_cfg_post_extnts(struct lpfc_hba *phba, uint16_t extnt_cnt, · 39 unmodified lines | |||
| 5907 | LPFC_MBOX_OPCODE_ALLOC_RSRC_EXTENT, | 5902 | LPFC_MBOX_OPCODE_ALLOC_RSRC_EXTENT, |
| 5908 | req_len, *emb); | 5903 | req_len, *emb); |
| 5909 | if (alloc_len < req_len) { | 5904 | if (alloc_len < req_len) { |
| 5910 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 5905 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5911 | "2982 Allocated DMA memory size (x%x) is " | 5906 | "2982 Allocated DMA memory size (x%x) is " |
| 5912 | "less than the requested DMA memory " | 5907 | "less than the requested DMA memory " |
| 5913 | "size (x%x)\n", alloc_len, req_len); | 5908 | "size (x%x)\n", alloc_len, req_len); |
| @@ -5963,7 +5958,7 @@ lpfc_sli4_alloc_extent(struct lpfc_hba *phba, uint16_t type) · 49 unmodified lines | |||
| 5963 | return -EIO; | 5958 | return -EIO; |
| 5964 | 5959 | ||
| 5965 | if ((rsrc_cnt == 0) || (rsrc_size == 0)) { | 5960 | if ((rsrc_cnt == 0) || (rsrc_size == 0)) { |
| 5966 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_INIT, | 5961 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 5967 | "3009 No available Resource Extents " | 5962 | "3009 No available Resource Extents " |
| 5968 | "for resource type 0x%x: Count: 0x%x, " | 5963 | "for resource type 0x%x: Count: 0x%x, " |
| 5969 | "Size 0x%x\n", type, rsrc_cnt, | 5964 | "Size 0x%x\n", type, rsrc_cnt, |
| @@ -6214,7 +6209,7 @@ lpfc_sli4_dealloc_extent(struct lpfc_hba *phba, uint16_t type) · 244 unmodified lines | |||
| 6214 | dealloc_rsrc = &mbox->u.mqe.un.dealloc_rsrc_extents; | 6209 | dealloc_rsrc = &mbox->u.mqe.un.dealloc_rsrc_extents; |
| 6215 | if (bf_get(lpfc_mbox_hdr_status, | 6210 | if (bf_get(lpfc_mbox_hdr_status, |
| 6216 | &dealloc_rsrc->header.cfg_shdr.response)) { | 6211 | &dealloc_rsrc->header.cfg_shdr.response)) { |
| 6217 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_INIT, | 6212 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6218 | "2919 Failed to release resource extents " | 6213 | "2919 Failed to release resource extents " |
| 6219 | "for type %d - Status 0x%x Add'l Status 0x%x. " | 6214 | "for type %d - Status 0x%x Add'l Status 0x%x. " |
| 6220 | "Resource memory not released.\n", | 6215 | "Resource memory not released.\n", |
| @@ -6408,7 +6403,7 @@ lpfc_sli4_ras_dma_alloc(struct lpfc_hba *phba, · 187 unmodified lines | |||
| 6408 | &ras_fwlog->lwpd.phys, | 6403 | &ras_fwlog->lwpd.phys, |
| 6409 | GFP_KERNEL); | 6404 | GFP_KERNEL); |
| 6410 | if (!ras_fwlog->lwpd.virt) { | 6405 | if (!ras_fwlog->lwpd.virt) { |
| 6411 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6406 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6412 | "6185 LWPD Memory Alloc Failed\n"); | 6407 | "6185 LWPD Memory Alloc Failed\n"); |
| 6413 | 6408 | ||
| 6414 | return -ENOMEM; | 6409 | return -ENOMEM; |
| @@ -6449,7 +6444,7 @@ free_mem: · 34 unmodified lines | |||
| 6449 | /** | 6444 | /** |
| 6450 | * lpfc_sli4_ras_mbox_cmpl: Completion handler for RAS MBX command | 6445 | * lpfc_sli4_ras_mbox_cmpl: Completion handler for RAS MBX command |
| 6451 | * @phba: pointer to lpfc hba data structure. | 6446 | * @phba: pointer to lpfc hba data structure. |
| 6452 | * @pmboxq: pointer to the driver internal queue element for mailbox command. | 6447 | * @pmb: pointer to the driver internal queue element for mailbox command. |
| 6453 | * | 6448 | * |
| 6454 | * Completion handler for driver's RAS MBX command to the device. | 6449 | * Completion handler for driver's RAS MBX command to the device. |
| 6455 | **/ | 6450 | **/ |
| @@ -6469,7 +6464,7 @@ lpfc_sli4_ras_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) · 13 unmodified lines | |||
| 6469 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 6464 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 6470 | 6465 | ||
| 6471 | if (mb->mbxStatus != MBX_SUCCESS || shdr_status) { | 6466 | if (mb->mbxStatus != MBX_SUCCESS || shdr_status) { |
| 6472 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 6467 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6473 | "6188 FW LOG mailbox " | 6468 | "6188 FW LOG mailbox " |
| 6474 | "completed with status x%x add_status x%x," | 6469 | "completed with status x%x add_status x%x," |
| 6475 | " mbx status x%x\n", | 6470 | " mbx status x%x\n", |
| @@ -6537,7 +6532,7 @@ lpfc_sli4_ras_fwlog_init(struct lpfc_hba *phba, · 61 unmodified lines | |||
| 6537 | /* Setup Mailbox command */ | 6532 | /* Setup Mailbox command */ |
| 6538 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 6533 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 6539 | if (!mbox) { | 6534 | if (!mbox) { |
| 6540 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6535 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6541 | "6190 RAS MBX Alloc Failed"); | 6536 | "6190 RAS MBX Alloc Failed"); |
| 6542 | rc = -ENOMEM; | 6537 | rc = -ENOMEM; |
| 6543 | goto mem_free; | 6538 | goto mem_free; |
| @@ -6585,7 +6580,7 @@ lpfc_sli4_ras_fwlog_init(struct lpfc_hba *phba, · 41 unmodified lines | |||
| 6585 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); | 6580 | rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); |
| 6586 | 6581 | ||
| 6587 | if (rc == MBX_NOT_FINISHED) { | 6582 | if (rc == MBX_NOT_FINISHED) { |
| 6588 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6583 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6589 | "6191 FW-Log Mailbox failed. " | 6584 | "6191 FW-Log Mailbox failed. " |
| 6590 | "status %d mbxStatus : x%x", rc, | 6585 | "status %d mbxStatus : x%x", rc, |
| 6591 | bf_get(lpfc_mqe_status, &mbox->u.mqe)); | 6586 | bf_get(lpfc_mqe_status, &mbox->u.mqe)); |
| @@ -6721,7 +6716,7 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba) · 129 unmodified lines | |||
| 6721 | /* RPIs. */ | 6716 | /* RPIs. */ |
| 6722 | count = phba->sli4_hba.max_cfg_param.max_rpi; | 6717 | count = phba->sli4_hba.max_cfg_param.max_rpi; |
| 6723 | if (count <= 0) { | 6718 | if (count <= 0) { |
| 6724 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 6719 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6725 | "3279 Invalid provisioning of " | 6720 | "3279 Invalid provisioning of " |
| 6726 | "rpi:%d\n", count); | 6721 | "rpi:%d\n", count); |
| 6727 | rc = -EINVAL; | 6722 | rc = -EINVAL; |
| @@ -6749,7 +6744,7 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba) · 21 unmodified lines | |||
| 6749 | /* VPIs. */ | 6744 | /* VPIs. */ |
| 6750 | count = phba->sli4_hba.max_cfg_param.max_vpi; | 6745 | count = phba->sli4_hba.max_cfg_param.max_vpi; |
| 6751 | if (count <= 0) { | 6746 | if (count <= 0) { |
| 6752 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 6747 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6753 | "3280 Invalid provisioning of " | 6748 | "3280 Invalid provisioning of " |
| 6754 | "vpi:%d\n", count); | 6749 | "vpi:%d\n", count); |
| 6755 | rc = -EINVAL; | 6750 | rc = -EINVAL; |
| @@ -6776,7 +6771,7 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba) · 20 unmodified lines | |||
| 6776 | /* XRIs. */ | 6771 | /* XRIs. */ |
| 6777 | count = phba->sli4_hba.max_cfg_param.max_xri; | 6772 | count = phba->sli4_hba.max_cfg_param.max_xri; |
| 6778 | if (count <= 0) { | 6773 | if (count <= 0) { |
| 6779 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 6774 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6780 | "3281 Invalid provisioning of " | 6775 | "3281 Invalid provisioning of " |
| 6781 | "xri:%d\n", count); | 6776 | "xri:%d\n", count); |
| 6782 | rc = -EINVAL; | 6777 | rc = -EINVAL; |
| @@ -6805,7 +6800,7 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba) · 22 unmodified lines | |||
| 6805 | /* VFIs. */ | 6800 | /* VFIs. */ |
| 6806 | count = phba->sli4_hba.max_cfg_param.max_vfi; | 6801 | count = phba->sli4_hba.max_cfg_param.max_vfi; |
| 6807 | if (count <= 0) { | 6802 | if (count <= 0) { |
| 6808 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 6803 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6809 | "3282 Invalid provisioning of " | 6804 | "3282 Invalid provisioning of " |
| 6810 | "vfi:%d\n", count); | 6805 | "vfi:%d\n", count); |
| 6811 | rc = -EINVAL; | 6806 | rc = -EINVAL; |
| @@ -6899,7 +6894,7 @@ lpfc_sli4_dealloc_resource_identifiers(struct lpfc_hba *phba) · 87 unmodified lines | |||
| 6899 | * lpfc_sli4_get_allocated_extnts - Get the port's allocated extents. | 6894 | * lpfc_sli4_get_allocated_extnts - Get the port's allocated extents. |
| 6900 | * @phba: Pointer to HBA context object. | 6895 | * @phba: Pointer to HBA context object. |
| 6901 | * @type: The resource extent type. | 6896 | * @type: The resource extent type. |
| 6902 | * @extnt_count: buffer to hold port extent count response | 6897 | * @extnt_cnt: buffer to hold port extent count response |
| 6903 | * @extnt_size: buffer to hold port extent size response. | 6898 | * @extnt_size: buffer to hold port extent size response. |
| 6904 | * | 6899 | * |
| 6905 | * This function calls the port to read the host allocated extents | 6900 | * This function calls the port to read the host allocated extents |
| @@ -6983,7 +6978,7 @@ lpfc_sli4_get_allocated_extnts(struct lpfc_hba *phba, uint16_t type, · 77 unmodified lines | |||
| 6983 | LPFC_MBOX_OPCODE_GET_ALLOC_RSRC_EXTENT, | 6978 | LPFC_MBOX_OPCODE_GET_ALLOC_RSRC_EXTENT, |
| 6984 | req_len, emb); | 6979 | req_len, emb); |
| 6985 | if (alloc_len < req_len) { | 6980 | if (alloc_len < req_len) { |
| 6986 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 6981 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 6987 | "2983 Allocated DMA memory size (x%x) is " | 6982 | "2983 Allocated DMA memory size (x%x) is " |
| 6988 | "less than the requested DMA memory " | 6983 | "less than the requested DMA memory " |
| 6989 | "size (x%x)\n", alloc_len, req_len); | 6984 | "size (x%x)\n", alloc_len, req_len); |
| @@ -7026,7 +7021,7 @@ lpfc_sli4_get_allocated_extnts(struct lpfc_hba *phba, uint16_t type, · 36 unmodified lines | |||
| 7026 | } | 7021 | } |
| 7027 | 7022 | ||
| 7028 | if (bf_get(lpfc_mbox_hdr_status, &shdr->response)) { | 7023 | if (bf_get(lpfc_mbox_hdr_status, &shdr->response)) { |
| 7029 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_INIT, | 7024 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7030 | "2984 Failed to read allocated resources " | 7025 | "2984 Failed to read allocated resources " |
| 7031 | "for type %d - Status 0x%x Add'l Status 0x%x.\n", | 7026 | "for type %d - Status 0x%x Add'l Status 0x%x.\n", |
| 7032 | type, | 7027 | type, |
| @@ -7043,7 +7038,6 @@ lpfc_sli4_get_allocated_extnts(struct lpfc_hba *phba, uint16_t type, · 10 unmodified lines | |||
| 7043 | /** | 7038 | /** |
| 7044 | * lpfc_sli4_repost_sgl_list - Repost the buffers sgl pages as block | 7039 | * lpfc_sli4_repost_sgl_list - Repost the buffers sgl pages as block |
| 7045 | * @phba: pointer to lpfc hba data structure. | 7040 | * @phba: pointer to lpfc hba data structure. |
| 7046 | * @pring: Pointer to driver SLI ring object. | ||
| 7047 | * @sgl_list: linked link of sgl buffers to post | 7041 | * @sgl_list: linked link of sgl buffers to post |
| 7048 | * @cnt: number of linked list buffers | 7042 | * @cnt: number of linked list buffers |
| 7049 | * | 7043 | * |
| @@ -7181,7 +7175,7 @@ lpfc_sli4_repost_sgl_list(struct lpfc_hba *phba, · 131 unmodified lines | |||
| 7181 | spin_unlock(&phba->sli4_hba.sgl_list_lock); | 7175 | spin_unlock(&phba->sli4_hba.sgl_list_lock); |
| 7182 | spin_unlock_irq(&phba->hbalock); | 7176 | spin_unlock_irq(&phba->hbalock); |
| 7183 | } else { | 7177 | } else { |
| 7184 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 7178 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7185 | "3161 Failure to post sgl to port.\n"); | 7179 | "3161 Failure to post sgl to port.\n"); |
| 7186 | return -EIO; | 7180 | return -EIO; |
| 7187 | } | 7181 | } |
| @@ -7278,7 +7272,7 @@ lpfc_post_rq_buffer(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 90 unmodified lines | |||
| 7278 | drqe.address_hi = putPaddrHigh(rqb_buffer->dbuf.phys); | 7272 | drqe.address_hi = putPaddrHigh(rqb_buffer->dbuf.phys); |
| 7279 | rc = lpfc_sli4_rq_put(hrq, drq, &hrqe, &drqe); | 7273 | rc = lpfc_sli4_rq_put(hrq, drq, &hrqe, &drqe); |
| 7280 | if (rc < 0) { | 7274 | if (rc < 0) { |
| 7281 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7275 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7282 | "6421 Cannot post to HRQ %d: %x %x %x " | 7276 | "6421 Cannot post to HRQ %d: %x %x %x " |
| 7283 | "DRQ %x %x\n", | 7277 | "DRQ %x %x\n", |
| 7284 | hrq->queue_id, | 7278 | hrq->queue_id, |
| @@ -7298,6 +7292,68 @@ lpfc_post_rq_buffer(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 13 unmodified lines | |||
| 7298 | return 1; | 7292 | return 1; |
| 7299 | } | 7293 | } |
| 7300 | 7294 | ||
| 7295 | /** | ||
| 7296 | * lpfc_init_idle_stat_hb - Initialize idle_stat tracking | ||
| 7297 | * @phba: pointer to lpfc hba data structure. | ||
| 7298 | * | ||
| 7299 | * This routine initializes the per-cq idle_stat to dynamically dictate | ||
| 7300 | * polling decisions. | ||
| 7301 | * | ||
| 7302 | * Return codes: | ||
| 7303 | * None | ||
| 7304 | **/ | ||
| 7305 | static void lpfc_init_idle_stat_hb(struct lpfc_hba *phba) | ||
| 7306 | { | ||
| 7307 | int i; | ||
| 7308 | struct lpfc_sli4_hdw_queue *hdwq; | ||
| 7309 | struct lpfc_queue *cq; | ||
| 7310 | struct lpfc_idle_stat *idle_stat; | ||
| 7311 | u64 wall; | ||
| 7312 | |||
| 7313 | for_each_present_cpu(i) { | ||
| 7314 | hdwq = &phba->sli4_hba.hdwq[phba->sli4_hba.cpu_map[i].hdwq]; | ||
| 7315 | cq = hdwq->io_cq; | ||
| 7316 | |||
| 7317 | /* Skip if we've already handled this cq's primary CPU */ | ||
| 7318 | if (cq->chann != i) | ||
| 7319 | continue; | ||
| 7320 | |||
| 7321 | idle_stat = &phba->sli4_hba.idle_stat[i]; | ||
| 7322 | |||
| 7323 | idle_stat->prev_idle = get_cpu_idle_time(i, &wall, 1); | ||
| 7324 | idle_stat->prev_wall = wall; | ||
| 7325 | |||
| 7326 | if (phba->nvmet_support) | ||
| 7327 | cq->poll_mode = LPFC_QUEUE_WORK; | ||
| 7328 | else | ||
| 7329 | cq->poll_mode = LPFC_IRQ_POLL; | ||
| 7330 | } | ||
| 7331 | |||
| 7332 | if (!phba->nvmet_support) | ||
| 7333 | schedule_delayed_work(&phba->idle_stat_delay_work, | ||
| 7334 | msecs_to_jiffies(LPFC_IDLE_STAT_DELAY)); | ||
| 7335 | } | ||
| 7336 | |||
| 7337 | static void lpfc_sli4_dip(struct lpfc_hba *phba) | ||
| 7338 | { | ||
| 7339 | uint32_t if_type; | ||
| 7340 | |||
| 7341 | if_type = bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf); | ||
| 7342 | if (if_type == LPFC_SLI_INTF_IF_TYPE_2 || | ||
| 7343 | if_type == LPFC_SLI_INTF_IF_TYPE_6) { | ||
| 7344 | struct lpfc_register reg_data; | ||
| 7345 | |||
| 7346 | if (lpfc_readl(phba->sli4_hba.u.if_type2.STATUSregaddr, | ||
| 7347 | ®_data.word0)) | ||
| 7348 | return; | ||
| 7349 | |||
| 7350 | if (bf_get(lpfc_sliport_status_dip, ®_data)) | ||
| 7351 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, | ||
| 7352 | "2904 Firmware Dump Image Present" | ||
| 7353 | " on Adapter"); | ||
| 7354 | } | ||
| 7355 | } | ||
| 7356 | |||
| 7301 | /** | 7357 | /** |
| 7302 | * lpfc_sli4_hba_setup - SLI4 device initialization PCI function | 7358 | * lpfc_sli4_hba_setup - SLI4 device initialization PCI function |
| 7303 | * @phba: Pointer to HBA context object. | 7359 | * @phba: Pointer to HBA context object. |
| @@ -7336,6 +7392,8 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 32 unmodified lines | |||
| 7336 | spin_unlock_irq(&phba->hbalock); | 7392 | spin_unlock_irq(&phba->hbalock); |
| 7337 | } | 7393 | } |
| 7338 | 7394 | ||
| 7395 | lpfc_sli4_dip(phba); | ||
| 7396 | |||
| 7339 | /* | 7397 | /* |
| 7340 | * Allocate a single mailbox container for initializing the | 7398 | * Allocate a single mailbox container for initializing the |
| 7341 | * port. | 7399 | * port. |
| @@ -7376,7 +7434,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 34 unmodified lines | |||
| 7376 | phba->hba_flag &= ~HBA_IOQ_FLUSH; | 7434 | phba->hba_flag &= ~HBA_IOQ_FLUSH; |
| 7377 | 7435 | ||
| 7378 | if (phba->sli_rev != LPFC_SLI_REV4) { | 7436 | if (phba->sli_rev != LPFC_SLI_REV4) { |
| 7379 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7437 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7380 | "0376 READ_REV Error. SLI Level %d " | 7438 | "0376 READ_REV Error. SLI Level %d " |
| 7381 | "FCoE enabled %d\n", | 7439 | "FCoE enabled %d\n", |
| 7382 | phba->sli_rev, phba->hba_flag & HBA_FCOE_MODE); | 7440 | phba->sli_rev, phba->hba_flag & HBA_FCOE_MODE); |
| @@ -7418,7 +7476,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 35 unmodified lines | |||
| 7418 | */ | 7476 | */ |
| 7419 | rc = lpfc_parse_vpd(phba, vpd, vpd_size); | 7477 | rc = lpfc_parse_vpd(phba, vpd, vpd_size); |
| 7420 | if (unlikely(!rc)) { | 7478 | if (unlikely(!rc)) { |
| 7421 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7479 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7422 | "0377 Error %d parsing vpd. " | 7480 | "0377 Error %d parsing vpd. " |
| 7423 | "Using defaults.\n", rc); | 7481 | "Using defaults.\n", rc); |
| 7424 | rc = 0; | 7482 | rc = 0; |
| @@ -7557,7 +7615,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 132 unmodified lines | |||
| 7557 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); | 7615 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); |
| 7558 | dd = bf_get(lpfc_mbx_set_feature_dd, &mboxq->u.mqe.un.set_feature); | 7616 | dd = bf_get(lpfc_mbx_set_feature_dd, &mboxq->u.mqe.un.set_feature); |
| 7559 | if ((rc == MBX_SUCCESS) && (dd == LPFC_ENABLE_DUAL_DUMP)) | 7617 | if ((rc == MBX_SUCCESS) && (dd == LPFC_ENABLE_DUAL_DUMP)) |
| 7560 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI | LOG_INIT, | 7618 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
| 7561 | "6448 Dual Dump is enabled\n"); | 7619 | "6448 Dual Dump is enabled\n"); |
| 7562 | else | 7620 | else |
| 7563 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI | LOG_INIT, | 7621 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI | LOG_INIT, |
| @@ -7575,7 +7633,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 11 unmodified lines | |||
| 7575 | */ | 7633 | */ |
| 7576 | rc = lpfc_sli4_alloc_resource_identifiers(phba); | 7634 | rc = lpfc_sli4_alloc_resource_identifiers(phba); |
| 7577 | if (rc) { | 7635 | if (rc) { |
| 7578 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7636 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7579 | "2920 Failed to alloc Resource IDs " | 7637 | "2920 Failed to alloc Resource IDs " |
| 7580 | "rc = x%x\n", rc); | 7638 | "rc = x%x\n", rc); |
| 7581 | goto out_free_mbox; | 7639 | goto out_free_mbox; |
| @@ -7614,7 +7672,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 32 unmodified lines | |||
| 7614 | kfree(mp); | 7672 | kfree(mp); |
| 7615 | mboxq->ctx_buf = NULL; | 7673 | mboxq->ctx_buf = NULL; |
| 7616 | if (unlikely(rc)) { | 7674 | if (unlikely(rc)) { |
| 7617 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7675 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7618 | "0382 READ_SPARAM command failed " | 7676 | "0382 READ_SPARAM command failed " |
| 7619 | "status %d, mbxStatus x%x\n", | 7677 | "status %d, mbxStatus x%x\n", |
| 7620 | rc, bf_get(lpfc_mqe_status, mqe)); | 7678 | rc, bf_get(lpfc_mqe_status, mqe)); |
| @@ -7632,7 +7690,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 11 unmodified lines | |||
| 7632 | /* Create all the SLI4 queues */ | 7690 | /* Create all the SLI4 queues */ |
| 7633 | rc = lpfc_sli4_queue_create(phba); | 7691 | rc = lpfc_sli4_queue_create(phba); |
| 7634 | if (rc) { | 7692 | if (rc) { |
| 7635 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7693 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7636 | "3089 Failed to allocate queues\n"); | 7694 | "3089 Failed to allocate queues\n"); |
| 7637 | rc = -ENODEV; | 7695 | rc = -ENODEV; |
| 7638 | goto out_free_mbox; | 7696 | goto out_free_mbox; |
| @@ -7640,7 +7698,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 1 unmodified line | |||
| 7640 | /* Set up all the queues to the device */ | 7698 | /* Set up all the queues to the device */ |
| 7641 | rc = lpfc_sli4_queue_setup(phba); | 7699 | rc = lpfc_sli4_queue_setup(phba); |
| 7642 | if (unlikely(rc)) { | 7700 | if (unlikely(rc)) { |
| 7643 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7701 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7644 | "0381 Error %d during queue setup.\n ", rc); | 7702 | "0381 Error %d during queue setup.\n ", rc); |
| 7645 | goto out_stop_timers; | 7703 | goto out_stop_timers; |
| 7646 | } | 7704 | } |
| @@ -7651,7 +7709,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 4 unmodified lines | |||
| 7651 | /* update host els xri-sgl sizes and mappings */ | 7709 | /* update host els xri-sgl sizes and mappings */ |
| 7652 | rc = lpfc_sli4_els_sgl_update(phba); | 7710 | rc = lpfc_sli4_els_sgl_update(phba); |
| 7653 | if (unlikely(rc)) { | 7711 | if (unlikely(rc)) { |
| 7654 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7712 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7655 | "1400 Failed to update xri-sgl size and " | 7713 | "1400 Failed to update xri-sgl size and " |
| 7656 | "mapping: %d\n", rc); | 7714 | "mapping: %d\n", rc); |
| 7657 | goto out_destroy_queue; | 7715 | goto out_destroy_queue; |
| @@ -7661,7 +7719,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 3 unmodified lines | |||
| 7661 | rc = lpfc_sli4_repost_sgl_list(phba, &phba->sli4_hba.lpfc_els_sgl_list, | 7719 | rc = lpfc_sli4_repost_sgl_list(phba, &phba->sli4_hba.lpfc_els_sgl_list, |
| 7662 | phba->sli4_hba.els_xri_cnt); | 7720 | phba->sli4_hba.els_xri_cnt); |
| 7663 | if (unlikely(rc < 0)) { | 7721 | if (unlikely(rc < 0)) { |
| 7664 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7722 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7665 | "0582 Error %d during els sgl post " | 7723 | "0582 Error %d during els sgl post " |
| 7666 | "operation\n", rc); | 7724 | "operation\n", rc); |
| 7667 | rc = -ENODEV; | 7725 | rc = -ENODEV; |
| @@ -7673,7 +7731,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 5 unmodified lines | |||
| 7673 | /* update host nvmet xri-sgl sizes and mappings */ | 7731 | /* update host nvmet xri-sgl sizes and mappings */ |
| 7674 | rc = lpfc_sli4_nvmet_sgl_update(phba); | 7732 | rc = lpfc_sli4_nvmet_sgl_update(phba); |
| 7675 | if (unlikely(rc)) { | 7733 | if (unlikely(rc)) { |
| 7676 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7734 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7677 | "6308 Failed to update nvmet-sgl size " | 7735 | "6308 Failed to update nvmet-sgl size " |
| 7678 | "and mapping: %d\n", rc); | 7736 | "and mapping: %d\n", rc); |
| 7679 | goto out_destroy_queue; | 7737 | goto out_destroy_queue; |
| @@ -7685,7 +7743,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 5 unmodified lines | |||
| 7685 | &phba->sli4_hba.lpfc_nvmet_sgl_list, | 7743 | &phba->sli4_hba.lpfc_nvmet_sgl_list, |
| 7686 | phba->sli4_hba.nvmet_xri_cnt); | 7744 | phba->sli4_hba.nvmet_xri_cnt); |
| 7687 | if (unlikely(rc < 0)) { | 7745 | if (unlikely(rc < 0)) { |
| 7688 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7746 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7689 | "3117 Error %d during nvmet " | 7747 | "3117 Error %d during nvmet " |
| 7690 | "sgl post\n", rc); | 7748 | "sgl post\n", rc); |
| 7691 | rc = -ENODEV; | 7749 | rc = -ENODEV; |
| @@ -7702,7 +7760,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 10 unmodified lines | |||
| 7702 | /* update host common xri-sgl sizes and mappings */ | 7760 | /* update host common xri-sgl sizes and mappings */ |
| 7703 | rc = lpfc_sli4_io_sgl_update(phba); | 7761 | rc = lpfc_sli4_io_sgl_update(phba); |
| 7704 | if (unlikely(rc)) { | 7762 | if (unlikely(rc)) { |
| 7705 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7763 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7706 | "6082 Failed to update nvme-sgl size " | 7764 | "6082 Failed to update nvme-sgl size " |
| 7707 | "and mapping: %d\n", rc); | 7765 | "and mapping: %d\n", rc); |
| 7708 | goto out_destroy_queue; | 7766 | goto out_destroy_queue; |
| @@ -7711,7 +7769,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 2 unmodified lines | |||
| 7711 | /* register the allocated common sgl pool to the port */ | 7769 | /* register the allocated common sgl pool to the port */ |
| 7712 | rc = lpfc_sli4_repost_io_sgl_list(phba); | 7770 | rc = lpfc_sli4_repost_io_sgl_list(phba); |
| 7713 | if (unlikely(rc)) { | 7771 | if (unlikely(rc)) { |
| 7714 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7772 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7715 | "6116 Error %d during nvme sgl post " | 7773 | "6116 Error %d during nvme sgl post " |
| 7716 | "operation\n", rc); | 7774 | "operation\n", rc); |
| 7717 | /* Some NVME buffers were moved to abort nvme list */ | 7775 | /* Some NVME buffers were moved to abort nvme list */ |
| @@ -7732,7 +7790,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 14 unmodified lines | |||
| 7732 | cnt); | 7790 | cnt); |
| 7733 | rc = lpfc_init_iocb_list(phba, cnt); | 7791 | rc = lpfc_init_iocb_list(phba, cnt); |
| 7734 | if (rc) { | 7792 | if (rc) { |
| 7735 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7793 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7736 | "1413 Failed to init iocb list.\n"); | 7794 | "1413 Failed to init iocb list.\n"); |
| 7737 | goto out_destroy_queue; | 7795 | goto out_destroy_queue; |
| 7738 | } | 7796 | } |
| @@ -7761,7 +7819,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 22 unmodified lines | |||
| 7761 | /* Post the rpi header region to the device. */ | 7819 | /* Post the rpi header region to the device. */ |
| 7762 | rc = lpfc_sli4_post_all_rpi_hdrs(phba); | 7820 | rc = lpfc_sli4_post_all_rpi_hdrs(phba); |
| 7763 | if (unlikely(rc)) { | 7821 | if (unlikely(rc)) { |
| 7764 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 7822 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7765 | "0393 Error %d during rpi post operation\n", | 7823 | "0393 Error %d during rpi post operation\n", |
| 7766 | rc); | 7824 | rc); |
| 7767 | rc = -ENODEV; | 7825 | rc = -ENODEV; |
| @@ -7853,6 +7911,9 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 85 unmodified lines | |||
| 7853 | queue_delayed_work(phba->wq, &phba->eq_delay_work, | 7911 | queue_delayed_work(phba->wq, &phba->eq_delay_work, |
| 7854 | msecs_to_jiffies(LPFC_EQ_DELAY_MSECS)); | 7912 | msecs_to_jiffies(LPFC_EQ_DELAY_MSECS)); |
| 7855 | 7913 | ||
| 7914 | /* start per phba idle_stat_delay heartbeat */ | ||
| 7915 | lpfc_init_idle_stat_hb(phba); | ||
| 7916 | |||
| 7856 | /* Start error attention (ERATT) polling timer */ | 7917 | /* Start error attention (ERATT) polling timer */ |
| 7857 | mod_timer(&phba->eratt_poll, | 7918 | mod_timer(&phba->eratt_poll, |
| 7858 | jiffies + msecs_to_jiffies(1000 * phba->eratt_poll_interval)); | 7919 | jiffies + msecs_to_jiffies(1000 * phba->eratt_poll_interval)); |
| @@ -7902,12 +7963,12 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) · 43 unmodified lines | |||
| 7902 | 7963 | ||
| 7903 | if (!(phba->hba_flag & HBA_FCOE_MODE) && | 7964 | if (!(phba->hba_flag & HBA_FCOE_MODE) && |
| 7904 | (phba->hba_flag & LINK_DISABLED)) { | 7965 | (phba->hba_flag & LINK_DISABLED)) { |
| 7905 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_SLI, | 7966 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7906 | "3103 Adapter Link is disabled.\n"); | 7967 | "3103 Adapter Link is disabled.\n"); |
| 7907 | lpfc_down_link(phba, mboxq); | 7968 | lpfc_down_link(phba, mboxq); |
| 7908 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); | 7969 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_POLL); |
| 7909 | if (rc != MBX_SUCCESS) { | 7970 | if (rc != MBX_SUCCESS) { |
| 7910 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_SLI, | 7971 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 7911 | "3104 Adapter failed to issue " | 7972 | "3104 Adapter failed to issue " |
| 7912 | "DOWN_LINK mbox cmd, rc:x%x\n", rc); | 7973 | "DOWN_LINK mbox cmd, rc:x%x\n", rc); |
| 7913 | goto out_io_buff_free; | 7974 | goto out_io_buff_free; |
| @@ -7940,7 +8001,7 @@ out_free_mbox: · 26 unmodified lines | |||
| 7940 | 8001 | ||
| 7941 | /** | 8002 | /** |
| 7942 | * lpfc_mbox_timeout - Timeout call back function for mbox timer | 8003 | * lpfc_mbox_timeout - Timeout call back function for mbox timer |
| 7943 | * @ptr: context object - pointer to hba structure. | 8004 | * @t: Context to fetch pointer to hba structure from. |
| 7944 | * | 8005 | * |
| 7945 | * This is the callback function for mailbox timer. The mailbox | 8006 | * This is the callback function for mailbox timer. The mailbox |
| 7946 | * timer is armed when a new mailbox command is issued and the timer | 8007 | * timer is armed when a new mailbox command is issued and the timer |
| @@ -8114,7 +8175,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) · 167 unmodified lines | |||
| 8114 | } | 8175 | } |
| 8115 | 8176 | ||
| 8116 | /* Mbox cmd <mbxCommand> timeout */ | 8177 | /* Mbox cmd <mbxCommand> timeout */ |
| 8117 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8178 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8118 | "0310 Mailbox command x%x timeout Data: x%x x%x x%px\n", | 8179 | "0310 Mailbox command x%x timeout Data: x%x x%x x%px\n", |
| 8119 | mb->mbxCommand, | 8180 | mb->mbxCommand, |
| 8120 | phba->pport->port_state, | 8181 | phba->pport->port_state, |
| @@ -8136,7 +8197,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) · 15 unmodified lines | |||
| 8136 | 8197 | ||
| 8137 | lpfc_sli_abort_fcp_rings(phba); | 8198 | lpfc_sli_abort_fcp_rings(phba); |
| 8138 | 8199 | ||
| 8139 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8200 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8140 | "0345 Resetting board due to mailbox timeout\n"); | 8201 | "0345 Resetting board due to mailbox timeout\n"); |
| 8141 | 8202 | ||
| 8142 | /* Reset the HBA device */ | 8203 | /* Reset the HBA device */ |
| @@ -8234,7 +8295,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, · 91 unmodified lines | |||
| 8234 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 8295 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
| 8235 | 8296 | ||
| 8236 | /* Mbox command <mbxCommand> cannot issue */ | 8297 | /* Mbox command <mbxCommand> cannot issue */ |
| 8237 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8298 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8238 | "(%d):0311 Mailbox command x%x cannot " | 8299 | "(%d):0311 Mailbox command x%x cannot " |
| 8239 | "issue Data: x%x x%x\n", | 8300 | "issue Data: x%x x%x\n", |
| 8240 | pmbox->vport ? pmbox->vport->vpi : 0, | 8301 | pmbox->vport ? pmbox->vport->vpi : 0, |
| @@ -8246,7 +8307,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, · 5 unmodified lines | |||
| 8246 | if (lpfc_readl(phba->HCregaddr, &hc_copy) || | 8307 | if (lpfc_readl(phba->HCregaddr, &hc_copy) || |
| 8247 | !(hc_copy & HC_MBINT_ENA)) { | 8308 | !(hc_copy & HC_MBINT_ENA)) { |
| 8248 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 8309 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
| 8249 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8310 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8250 | "(%d):2528 Mailbox command x%x cannot " | 8311 | "(%d):2528 Mailbox command x%x cannot " |
| 8251 | "issue Data: x%x x%x\n", | 8312 | "issue Data: x%x x%x\n", |
| 8252 | pmbox->vport ? pmbox->vport->vpi : 0, | 8313 | pmbox->vport ? pmbox->vport->vpi : 0, |
| @@ -8265,7 +8326,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, · 12 unmodified lines | |||
| 8265 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 8326 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
| 8266 | 8327 | ||
| 8267 | /* Mbox command <mbxCommand> cannot issue */ | 8328 | /* Mbox command <mbxCommand> cannot issue */ |
| 8268 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8329 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8269 | "(%d):2529 Mailbox command x%x " | 8330 | "(%d):2529 Mailbox command x%x " |
| 8270 | "cannot issue Data: x%x x%x\n", | 8331 | "cannot issue Data: x%x x%x\n", |
| 8271 | pmbox->vport ? pmbox->vport->vpi : 0, | 8332 | pmbox->vport ? pmbox->vport->vpi : 0, |
| @@ -8277,7 +8338,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, · 5 unmodified lines | |||
| 8277 | if (!(psli->sli_flag & LPFC_SLI_ACTIVE)) { | 8338 | if (!(psli->sli_flag & LPFC_SLI_ACTIVE)) { |
| 8278 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 8339 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
| 8279 | /* Mbox command <mbxCommand> cannot issue */ | 8340 | /* Mbox command <mbxCommand> cannot issue */ |
| 8280 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8341 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8281 | "(%d):2530 Mailbox command x%x " | 8342 | "(%d):2530 Mailbox command x%x " |
| 8282 | "cannot issue Data: x%x x%x\n", | 8343 | "cannot issue Data: x%x x%x\n", |
| 8283 | pmbox->vport ? pmbox->vport->vpi : 0, | 8344 | pmbox->vport ? pmbox->vport->vpi : 0, |
| @@ -8330,7 +8391,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, · 46 unmodified lines | |||
| 8330 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; | 8391 | psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; |
| 8331 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); | 8392 | spin_unlock_irqrestore(&phba->hbalock, drvr_flag); |
| 8332 | /* Mbox command <mbxCommand> cannot issue */ | 8393 | /* Mbox command <mbxCommand> cannot issue */ |
| 8333 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8394 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8334 | "(%d):2531 Mailbox command x%x " | 8395 | "(%d):2531 Mailbox command x%x " |
| 8335 | "cannot issue Data: x%x x%x\n", | 8396 | "cannot issue Data: x%x x%x\n", |
| 8336 | pmbox->vport ? pmbox->vport->vpi : 0, | 8397 | pmbox->vport ? pmbox->vport->vpi : 0, |
| @@ -8721,7 +8782,7 @@ lpfc_sli4_post_sync_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 384 unmodified lines | |||
| 8721 | spin_lock_irqsave(&phba->hbalock, iflag); | 8782 | spin_lock_irqsave(&phba->hbalock, iflag); |
| 8722 | if (psli->sli_flag & LPFC_SLI_MBOX_ACTIVE) { | 8783 | if (psli->sli_flag & LPFC_SLI_MBOX_ACTIVE) { |
| 8723 | spin_unlock_irqrestore(&phba->hbalock, iflag); | 8784 | spin_unlock_irqrestore(&phba->hbalock, iflag); |
| 8724 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8785 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8725 | "(%d):2532 Mailbox command x%x (x%x/x%x) " | 8786 | "(%d):2532 Mailbox command x%x (x%x/x%x) " |
| 8726 | "cannot issue Data: x%x x%x\n", | 8787 | "cannot issue Data: x%x x%x\n", |
| 8727 | mboxq->vport ? mboxq->vport->vpi : 0, | 8788 | mboxq->vport ? mboxq->vport->vpi : 0, |
| @@ -8820,7 +8881,7 @@ exit: · 92 unmodified lines | |||
| 8820 | /** | 8881 | /** |
| 8821 | * lpfc_sli_issue_mbox_s4 - Issue an SLI4 mailbox command to firmware | 8882 | * lpfc_sli_issue_mbox_s4 - Issue an SLI4 mailbox command to firmware |
| 8822 | * @phba: Pointer to HBA context object. | 8883 | * @phba: Pointer to HBA context object. |
| 8823 | * @pmbox: Pointer to mailbox object. | 8884 | * @mboxq: Pointer to mailbox object. |
| 8824 | * @flag: Flag indicating how the mailbox need to be processed. | 8885 | * @flag: Flag indicating how the mailbox need to be processed. |
| 8825 | * | 8886 | * |
| 8826 | * This function is called by discovery code and HBA management code to submit | 8887 | * This function is called by discovery code and HBA management code to submit |
| @@ -8842,7 +8903,7 @@ lpfc_sli_issue_mbox_s4(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq, · 15 unmodified lines | |||
| 8842 | 8903 | ||
| 8843 | rc = lpfc_mbox_dev_check(phba); | 8904 | rc = lpfc_mbox_dev_check(phba); |
| 8844 | if (unlikely(rc)) { | 8905 | if (unlikely(rc)) { |
| 8845 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8906 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8846 | "(%d):2544 Mailbox command x%x (x%x/x%x) " | 8907 | "(%d):2544 Mailbox command x%x (x%x/x%x) " |
| 8847 | "cannot issue Data: x%x x%x\n", | 8908 | "cannot issue Data: x%x x%x\n", |
| 8848 | mboxq->vport ? mboxq->vport->vpi : 0, | 8909 | mboxq->vport ? mboxq->vport->vpi : 0, |
| @@ -8919,7 +8980,7 @@ lpfc_sli_issue_mbox_s4(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq, · 70 unmodified lines | |||
| 8919 | /* Now, interrupt mode asynchronous mailbox command */ | 8980 | /* Now, interrupt mode asynchronous mailbox command */ |
| 8920 | rc = lpfc_mbox_cmd_check(phba, mboxq); | 8981 | rc = lpfc_mbox_cmd_check(phba, mboxq); |
| 8921 | if (rc) { | 8982 | if (rc) { |
| 8922 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 8983 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8923 | "(%d):2543 Mailbox command x%x (x%x/x%x) " | 8984 | "(%d):2543 Mailbox command x%x (x%x/x%x) " |
| 8924 | "cannot issue Data: x%x x%x\n", | 8985 | "cannot issue Data: x%x x%x\n", |
| 8925 | mboxq->vport ? mboxq->vport->vpi : 0, | 8986 | mboxq->vport ? mboxq->vport->vpi : 0, |
| @@ -8987,7 +9048,7 @@ lpfc_sli4_post_async_mbox(struct lpfc_hba *phba) · 61 unmodified lines | |||
| 8987 | } | 9048 | } |
| 8988 | if (unlikely(phba->sli.mbox_active)) { | 9049 | if (unlikely(phba->sli.mbox_active)) { |
| 8989 | spin_unlock_irqrestore(&phba->hbalock, iflags); | 9050 | spin_unlock_irqrestore(&phba->hbalock, iflags); |
| 8990 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 9051 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 8991 | "0384 There is pending active mailbox cmd\n"); | 9052 | "0384 There is pending active mailbox cmd\n"); |
| 8992 | return MBX_NOT_FINISHED; | 9053 | return MBX_NOT_FINISHED; |
| 8993 | } | 9054 | } |
| @@ -9048,7 +9109,7 @@ lpfc_sli4_post_async_mbox(struct lpfc_hba *phba) · 54 unmodified lines | |||
| 9048 | /* Post the mailbox command to the port */ | 9109 | /* Post the mailbox command to the port */ |
| 9049 | rc = lpfc_sli4_mq_put(phba->sli4_hba.mbx_wq, mqe); | 9110 | rc = lpfc_sli4_mq_put(phba->sli4_hba.mbx_wq, mqe); |
| 9050 | if (rc != MBX_SUCCESS) { | 9111 | if (rc != MBX_SUCCESS) { |
| 9051 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 9112 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9052 | "(%d):2533 Mailbox command x%x (x%x/x%x) " | 9113 | "(%d):2533 Mailbox command x%x (x%x/x%x) " |
| 9053 | "cannot issue Data: x%x x%x\n", | 9114 | "cannot issue Data: x%x x%x\n", |
| 9054 | mboxq->vport ? mboxq->vport->vpi : 0, | 9115 | mboxq->vport ? mboxq->vport->vpi : 0, |
| @@ -9124,7 +9185,7 @@ lpfc_mbox_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp) · 69 unmodified lines | |||
| 9124 | phba->lpfc_sli_brdready = lpfc_sli_brdready_s4; | 9185 | phba->lpfc_sli_brdready = lpfc_sli_brdready_s4; |
| 9125 | break; | 9186 | break; |
| 9126 | default: | 9187 | default: |
| 9127 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9188 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9128 | "1420 Invalid HBA PCI-device group: 0x%x\n", | 9189 | "1420 Invalid HBA PCI-device group: 0x%x\n", |
| 9129 | dev_grp); | 9190 | dev_grp); |
| 9130 | return -ENODEV; | 9191 | return -ENODEV; |
| @@ -9225,8 +9286,7 @@ __lpfc_sli_issue_iocb_s3(struct lpfc_hba *phba, uint32_t ring_number, · 94 unmodified lines | |||
| 9225 | if (piocb->iocb_cmpl && (!piocb->vport) && | 9286 | if (piocb->iocb_cmpl && (!piocb->vport) && |
| 9226 | (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) && | 9287 | (piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) && |
| 9227 | (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) { | 9288 | (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) { |
| 9228 | lpfc_printf_log(phba, KERN_ERR, | 9289 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9229 | LOG_SLI | LOG_VPORT, | ||
| 9230 | "1807 IOCB x%x failed. No vport\n", | 9290 | "1807 IOCB x%x failed. No vport\n", |
| 9231 | piocb->iocb.ulpCommand); | 9291 | piocb->iocb.ulpCommand); |
| 9232 | dump_stack(); | 9292 | dump_stack(); |
| @@ -9327,7 +9387,7 @@ __lpfc_sli_issue_iocb_s3(struct lpfc_hba *phba, uint32_t ring_number, · 94 unmodified lines | |||
| 9327 | /** | 9387 | /** |
| 9328 | * lpfc_sli4_bpl2sgl - Convert the bpl/bde to a sgl. | 9388 | * lpfc_sli4_bpl2sgl - Convert the bpl/bde to a sgl. |
| 9329 | * @phba: Pointer to HBA context object. | 9389 | * @phba: Pointer to HBA context object. |
| 9330 | * @piocb: Pointer to command iocb. | 9390 | * @piocbq: Pointer to command iocb. |
| 9331 | * @sglq: Pointer to the scatter gather queue object. | 9391 | * @sglq: Pointer to the scatter gather queue object. |
| 9332 | * | 9392 | * |
| 9333 | * This routine converts the bpl or bde that is in the IOCB | 9393 | * This routine converts the bpl or bde that is in the IOCB |
| @@ -9435,7 +9495,7 @@ lpfc_sli4_bpl2sgl(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq, · 101 unmodified lines | |||
| 9435 | /** | 9495 | /** |
| 9436 | * lpfc_sli_iocb2wqe - Convert the IOCB to a work queue entry. | 9496 | * lpfc_sli_iocb2wqe - Convert the IOCB to a work queue entry. |
| 9437 | * @phba: Pointer to HBA context object. | 9497 | * @phba: Pointer to HBA context object. |
| 9438 | * @piocb: Pointer to command iocb. | 9498 | * @iocbq: Pointer to command iocb. |
| 9439 | * @wqe: Pointer to the work queue entry. | 9499 | * @wqe: Pointer to the work queue entry. |
| 9440 | * | 9500 | * |
| 9441 | * This routine converts the iocb command to its Work Queue Entry | 9501 | * This routine converts the iocb command to its Work Queue Entry |
| @@ -9521,7 +9581,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, · 79 unmodified lines | |||
| 9521 | else | 9581 | else |
| 9522 | ndlp = (struct lpfc_nodelist *)iocbq->context1; | 9582 | ndlp = (struct lpfc_nodelist *)iocbq->context1; |
| 9523 | if (!iocbq->iocb.ulpLe) { | 9583 | if (!iocbq->iocb.ulpLe) { |
| 9524 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 9584 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9525 | "2007 Only Limited Edition cmd Format" | 9585 | "2007 Only Limited Edition cmd Format" |
| 9526 | " supported 0x%x\n", | 9586 | " supported 0x%x\n", |
| 9527 | iocbq->iocb.ulpCommand); | 9587 | iocbq->iocb.ulpCommand); |
| @@ -9829,7 +9889,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, · 301 unmodified lines | |||
| 9829 | /* word6 context tag copied in memcpy */ | 9889 | /* word6 context tag copied in memcpy */ |
| 9830 | if (iocbq->iocb.ulpCt_h || iocbq->iocb.ulpCt_l) { | 9890 | if (iocbq->iocb.ulpCt_h || iocbq->iocb.ulpCt_l) { |
| 9831 | ct = ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l); | 9891 | ct = ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l); |
| 9832 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 9892 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 9833 | "2015 Invalid CT %x command 0x%x\n", | 9893 | "2015 Invalid CT %x command 0x%x\n", |
| 9834 | ct, iocbq->iocb.ulpCommand); | 9894 | ct, iocbq->iocb.ulpCommand); |
| 9835 | return IOCB_ERROR; | 9895 | return IOCB_ERROR; |
| @@ -10008,7 +10068,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, · 172 unmodified lines | |||
| 10008 | case CMD_FCP_TRSP64_CX: /* Target mode rcv */ | 10068 | case CMD_FCP_TRSP64_CX: /* Target mode rcv */ |
| 10009 | case CMD_FCP_AUTO_TRSP_CX: /* Auto target rsp */ | 10069 | case CMD_FCP_AUTO_TRSP_CX: /* Auto target rsp */ |
| 10010 | default: | 10070 | default: |
| 10011 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 10071 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10012 | "2014 Invalid command 0x%x\n", | 10072 | "2014 Invalid command 0x%x\n", |
| 10013 | iocbq->iocb.ulpCommand); | 10073 | iocbq->iocb.ulpCommand); |
| 10014 | return IOCB_ERROR; | 10074 | return IOCB_ERROR; |
| @@ -10129,7 +10189,7 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, · 114 unmodified lines | |||
| 10129 | return 0; | 10189 | return 0; |
| 10130 | } | 10190 | } |
| 10131 | 10191 | ||
| 10132 | /** | 10192 | /* |
| 10133 | * __lpfc_sli_issue_iocb - Wrapper func of lockless version for issuing iocb | 10193 | * __lpfc_sli_issue_iocb - Wrapper func of lockless version for issuing iocb |
| 10134 | * | 10194 | * |
| 10135 | * This routine wraps the actual lockless version for issusing IOCB function | 10195 | * This routine wraps the actual lockless version for issusing IOCB function |
| @@ -10170,7 +10230,7 @@ lpfc_sli_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp) · 34 unmodified lines | |||
| 10170 | phba->__lpfc_sli_release_iocbq = __lpfc_sli_release_iocbq_s4; | 10230 | phba->__lpfc_sli_release_iocbq = __lpfc_sli_release_iocbq_s4; |
| 10171 | break; | 10231 | break; |
| 10172 | default: | 10232 | default: |
| 10173 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10233 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10174 | "1419 Invalid HBA PCI-device group: 0x%x\n", | 10234 | "1419 Invalid HBA PCI-device group: 0x%x\n", |
| 10175 | dev_grp); | 10235 | dev_grp); |
| 10176 | return -ENODEV; | 10236 | return -ENODEV; |
| @@ -10218,7 +10278,7 @@ lpfc_sli4_calc_ring(struct lpfc_hba *phba, struct lpfc_iocbq *piocb) · 41 unmodified lines | |||
| 10218 | /** | 10278 | /** |
| 10219 | * lpfc_sli_issue_iocb - Wrapper function for __lpfc_sli_issue_iocb | 10279 | * lpfc_sli_issue_iocb - Wrapper function for __lpfc_sli_issue_iocb |
| 10220 | * @phba: Pointer to HBA context object. | 10280 | * @phba: Pointer to HBA context object. |
| 10221 | * @pring: Pointer to driver SLI ring object. | 10281 | * @ring_number: Ring number |
| 10222 | * @piocb: Pointer to command iocb. | 10282 | * @piocb: Pointer to command iocb. |
| 10223 | * @flag: Flag indicating if this command can be put into txq. | 10283 | * @flag: Flag indicating if this command can be put into txq. |
| 10224 | * | 10284 | * |
| @@ -10430,13 +10490,13 @@ lpfc_sli_async_event_handler(struct lpfc_hba * phba, · 205 unmodified lines | |||
| 10430 | temp_event_data.event_type = FC_REG_TEMPERATURE_EVENT; | 10490 | temp_event_data.event_type = FC_REG_TEMPERATURE_EVENT; |
| 10431 | if (evt_code == ASYNC_TEMP_WARN) { | 10491 | if (evt_code == ASYNC_TEMP_WARN) { |
| 10432 | temp_event_data.event_code = LPFC_THRESHOLD_TEMP; | 10492 | temp_event_data.event_code = LPFC_THRESHOLD_TEMP; |
| 10433 | lpfc_printf_log(phba, KERN_ERR, LOG_TEMP, | 10493 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10434 | "0347 Adapter is very hot, please take " | 10494 | "0347 Adapter is very hot, please take " |
| 10435 | "corrective action. temperature : %d Celsius\n", | 10495 | "corrective action. temperature : %d Celsius\n", |
| 10436 | (uint32_t) icmd->ulpContext); | 10496 | (uint32_t) icmd->ulpContext); |
| 10437 | } else { | 10497 | } else { |
| 10438 | temp_event_data.event_code = LPFC_NORMAL_TEMP; | 10498 | temp_event_data.event_code = LPFC_NORMAL_TEMP; |
| 10439 | lpfc_printf_log(phba, KERN_ERR, LOG_TEMP, | 10499 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10440 | "0340 Adapter temperature is OK now. " | 10500 | "0340 Adapter temperature is OK now. " |
| 10441 | "temperature : %d Celsius\n", | 10501 | "temperature : %d Celsius\n", |
| 10442 | (uint32_t) icmd->ulpContext); | 10502 | (uint32_t) icmd->ulpContext); |
| @@ -10453,7 +10513,7 @@ lpfc_sli_async_event_handler(struct lpfc_hba * phba, · 10 unmodified lines | |||
| 10453 | break; | 10513 | break; |
| 10454 | default: | 10514 | default: |
| 10455 | iocb_w = (uint32_t *) icmd; | 10515 | iocb_w = (uint32_t *) icmd; |
| 10456 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 10516 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 10457 | "0346 Ring %d handler: unexpected ASYNC_STATUS" | 10517 | "0346 Ring %d handler: unexpected ASYNC_STATUS" |
| 10458 | " evt_code 0x%x\n" | 10518 | " evt_code 0x%x\n" |
| 10459 | "W0 0x%08x W1 0x%08x W2 0x%08x W3 0x%08x\n" | 10519 | "W0 0x%08x W1 0x%08x W2 0x%08x W3 0x%08x\n" |
| @@ -11127,7 +11187,7 @@ lpfc_sli_ring_taggedbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, · 667 unmodified lines | |||
| 11127 | } | 11187 | } |
| 11128 | 11188 | ||
| 11129 | spin_unlock_irq(&phba->hbalock); | 11189 | spin_unlock_irq(&phba->hbalock); |
| 11130 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11190 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 11131 | "0402 Cannot find virtual addr for buffer tag on " | 11191 | "0402 Cannot find virtual addr for buffer tag on " |
| 11132 | "ring %d Data x%lx x%px x%px x%x\n", | 11192 | "ring %d Data x%lx x%px x%px x%x\n", |
| 11133 | pring->ringno, (unsigned long) tag, | 11193 | pring->ringno, (unsigned long) tag, |
| @@ -11171,7 +11231,7 @@ lpfc_sli_ringpostbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, · 37 unmodified lines | |||
| 11171 | } | 11231 | } |
| 11172 | 11232 | ||
| 11173 | spin_unlock_irq(&phba->hbalock); | 11233 | spin_unlock_irq(&phba->hbalock); |
| 11174 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 11234 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 11175 | "0410 Cannot find virtual addr for mapped buf on " | 11235 | "0410 Cannot find virtual addr for mapped buf on " |
| 11176 | "ring %d Data x%llx x%px x%px x%x\n", | 11236 | "ring %d Data x%llx x%px x%px x%x\n", |
| 11177 | pring->ringno, (unsigned long long)phys, | 11237 | pring->ringno, (unsigned long long)phys, |
| @@ -11719,7 +11779,7 @@ lpfc_sli_abort_iocb(struct lpfc_vport *vport, struct lpfc_sli_ring *pring, · 541 unmodified lines | |||
| 11719 | * @pring: Pointer to driver SLI ring object. | 11779 | * @pring: Pointer to driver SLI ring object. |
| 11720 | * @tgt_id: SCSI ID of the target. | 11780 | * @tgt_id: SCSI ID of the target. |
| 11721 | * @lun_id: LUN ID of the scsi device. | 11781 | * @lun_id: LUN ID of the scsi device. |
| 11722 | * @taskmgmt_cmd: LPFC_CTX_LUN/LPFC_CTX_TGT/LPFC_CTX_HOST. | 11782 | * @cmd: LPFC_CTX_LUN/LPFC_CTX_TGT/LPFC_CTX_HOST. |
| 11723 | * | 11783 | * |
| 11724 | * This function sends an abort command for every SCSI command | 11784 | * This function sends an abort command for every SCSI command |
| 11725 | * associated with the given virtual port pending on the ring | 11785 | * associated with the given virtual port pending on the ring |
| @@ -11959,7 +12019,7 @@ lpfc_chk_iocb_flg(struct lpfc_hba *phba, · 233 unmodified lines | |||
| 11959 | /** | 12019 | /** |
| 11960 | * lpfc_sli_issue_iocb_wait - Synchronous function to issue iocb commands | 12020 | * lpfc_sli_issue_iocb_wait - Synchronous function to issue iocb commands |
| 11961 | * @phba: Pointer to HBA context object.. | 12021 | * @phba: Pointer to HBA context object.. |
| 11962 | * @pring: Pointer to sli ring. | 12022 | * @ring_number: Ring number |
| 11963 | * @piocb: Pointer to command iocb. | 12023 | * @piocb: Pointer to command iocb. |
| 11964 | * @prspiocbq: Pointer to response iocb. | 12024 | * @prspiocbq: Pointer to response iocb. |
| 11965 | * @timeout: Timeout in number of seconds. | 12025 | * @timeout: Timeout in number of seconds. |
| @@ -12065,12 +12125,12 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba *phba, · 99 unmodified lines | |||
| 12065 | * completed. Not that it completed successfully. | 12125 | * completed. Not that it completed successfully. |
| 12066 | * */ | 12126 | * */ |
| 12067 | } else if (timeleft == 0) { | 12127 | } else if (timeleft == 0) { |
| 12068 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 12128 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12069 | "0338 IOCB wait timeout error - no " | 12129 | "0338 IOCB wait timeout error - no " |
| 12070 | "wake response Data x%x\n", timeout); | 12130 | "wake response Data x%x\n", timeout); |
| 12071 | retval = IOCB_TIMEDOUT; | 12131 | retval = IOCB_TIMEDOUT; |
| 12072 | } else { | 12132 | } else { |
| 12073 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 12133 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12074 | "0330 IOCB wake NOT set, " | 12134 | "0330 IOCB wake NOT set, " |
| 12075 | "Data x%x x%lx\n", | 12135 | "Data x%x x%lx\n", |
| 12076 | timeout, (timeleft / jiffies)); | 12136 | timeout, (timeleft / jiffies)); |
| @@ -12179,6 +12239,7 @@ lpfc_sli_issue_mbox_wait(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq, · 102 unmodified lines | |||
| 12179 | /** | 12239 | /** |
| 12180 | * lpfc_sli_mbox_sys_shutdown - shutdown mailbox command sub-system | 12240 | * lpfc_sli_mbox_sys_shutdown - shutdown mailbox command sub-system |
| 12181 | * @phba: Pointer to HBA context. | 12241 | * @phba: Pointer to HBA context. |
| 12242 | * @mbx_action: Mailbox shutdown options. | ||
| 12182 | * | 12243 | * |
| 12183 | * This function is called to shutdown the driver's mailbox sub-system. | 12244 | * This function is called to shutdown the driver's mailbox sub-system. |
| 12184 | * It first marks the mailbox sub-system is in a block state to prevent | 12245 | * It first marks the mailbox sub-system is in a block state to prevent |
| @@ -12332,7 +12393,7 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba) · 147 unmodified lines | |||
| 12332 | } | 12393 | } |
| 12333 | if ((~phba->sli4_hba.ue_mask_lo & uerr_sta_lo) || | 12394 | if ((~phba->sli4_hba.ue_mask_lo & uerr_sta_lo) || |
| 12334 | (~phba->sli4_hba.ue_mask_hi & uerr_sta_hi)) { | 12395 | (~phba->sli4_hba.ue_mask_hi & uerr_sta_hi)) { |
| 12335 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12396 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12336 | "1423 HBA Unrecoverable error: " | 12397 | "1423 HBA Unrecoverable error: " |
| 12337 | "uerr_lo_reg=0x%x, uerr_hi_reg=0x%x, " | 12398 | "uerr_lo_reg=0x%x, uerr_hi_reg=0x%x, " |
| 12338 | "ue_mask_lo_reg=0x%x, " | 12399 | "ue_mask_lo_reg=0x%x, " |
| @@ -12363,7 +12424,7 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba) · 24 unmodified lines | |||
| 12363 | readl(phba->sli4_hba.u.if_type2.ERR1regaddr); | 12424 | readl(phba->sli4_hba.u.if_type2.ERR1regaddr); |
| 12364 | phba->work_status[1] = | 12425 | phba->work_status[1] = |
| 12365 | readl(phba->sli4_hba.u.if_type2.ERR2regaddr); | 12426 | readl(phba->sli4_hba.u.if_type2.ERR2regaddr); |
| 12366 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12427 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12367 | "2885 Port Status Event: " | 12428 | "2885 Port Status Event: " |
| 12368 | "port status reg 0x%x, " | 12429 | "port status reg 0x%x, " |
| 12369 | "port smphr reg 0x%x, " | 12430 | "port smphr reg 0x%x, " |
| @@ -12379,7 +12440,7 @@ lpfc_sli4_eratt_read(struct lpfc_hba *phba) · 9 unmodified lines | |||
| 12379 | break; | 12440 | break; |
| 12380 | case LPFC_SLI_INTF_IF_TYPE_1: | 12441 | case LPFC_SLI_INTF_IF_TYPE_1: |
| 12381 | default: | 12442 | default: |
| 12382 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12443 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12383 | "2886 HBA Error Attention on unsupported " | 12444 | "2886 HBA Error Attention on unsupported " |
| 12384 | "if type %d.", if_type); | 12445 | "if type %d.", if_type); |
| 12385 | return 1; | 12446 | return 1; |
| @@ -12443,7 +12504,7 @@ lpfc_sli_check_eratt(struct lpfc_hba *phba) · 57 unmodified lines | |||
| 12443 | ha_copy = lpfc_sli4_eratt_read(phba); | 12504 | ha_copy = lpfc_sli4_eratt_read(phba); |
| 12444 | break; | 12505 | break; |
| 12445 | default: | 12506 | default: |
| 12446 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 12507 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12447 | "0299 Invalid SLI revision (%d)\n", | 12508 | "0299 Invalid SLI revision (%d)\n", |
| 12448 | phba->sli_rev); | 12509 | phba->sli_rev); |
| 12449 | ha_copy = 0; | 12510 | ha_copy = 0; |
| @@ -12676,8 +12737,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id) · 226 unmodified lines | |||
| 12676 | * Stray Mailbox Interrupt, mbxCommand <cmd> | 12737 | * Stray Mailbox Interrupt, mbxCommand <cmd> |
| 12677 | * mbxStatus <status> | 12738 | * mbxStatus <status> |
| 12678 | */ | 12739 | */ |
| 12679 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | | 12740 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 12680 | LOG_SLI, | ||
| 12681 | "(%d):0304 Stray Mailbox " | 12741 | "(%d):0304 Stray Mailbox " |
| 12682 | "Interrupt mbxCommand x%x " | 12742 | "Interrupt mbxCommand x%x " |
| 12683 | "mbxStatus x%x\n", | 12743 | "mbxStatus x%x\n", |
| @@ -12737,7 +12797,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id) · 53 unmodified lines | |||
| 12737 | if (rc != MBX_BUSY) | 12797 | if (rc != MBX_BUSY) |
| 12738 | lpfc_printf_log(phba, | 12798 | lpfc_printf_log(phba, |
| 12739 | KERN_ERR, | 12799 | KERN_ERR, |
| 12740 | LOG_MBOX | LOG_SLI, | 12800 | LOG_TRACE_EVENT, |
| 12741 | "0350 rc should have" | 12801 | "0350 rc should have" |
| 12742 | "been MBX_BUSY\n"); | 12802 | "been MBX_BUSY\n"); |
| 12743 | if (rc != MBX_NOT_FINISHED) | 12803 | if (rc != MBX_NOT_FINISHED) |
| @@ -12766,8 +12826,9 @@ send_current_mbox: · 22 unmodified lines | |||
| 12766 | MBX_NOWAIT); | 12826 | MBX_NOWAIT); |
| 12767 | } while (rc == MBX_NOT_FINISHED); | 12827 | } while (rc == MBX_NOT_FINISHED); |
| 12768 | if (rc != MBX_SUCCESS) | 12828 | if (rc != MBX_SUCCESS) |
| 12769 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | | 12829 | lpfc_printf_log(phba, KERN_ERR, |
| 12770 | LOG_SLI, "0349 rc should be " | 12830 | LOG_TRACE_EVENT, |
| 12831 | "0349 rc should be " | ||
| 12771 | "MBX_SUCCESS\n"); | 12832 | "MBX_SUCCESS\n"); |
| 12772 | } | 12833 | } |
| 12773 | 12834 | ||
| @@ -13139,7 +13200,7 @@ lpfc_sli4_iocb_param_transfer(struct lpfc_hba *phba, · 365 unmodified lines | |||
| 13139 | /** | 13200 | /** |
| 13140 | * lpfc_sli4_els_wcqe_to_rspiocbq - Get response iocbq from els wcqe | 13201 | * lpfc_sli4_els_wcqe_to_rspiocbq - Get response iocbq from els wcqe |
| 13141 | * @phba: Pointer to HBA context object. | 13202 | * @phba: Pointer to HBA context object. |
| 13142 | * @wcqe: Pointer to work-queue completion queue entry. | 13203 | * @irspiocbq: Pointer to work-queue completion queue entry. |
| 13143 | * | 13204 | * |
| 13144 | * This routine handles an ELS work-queue completion event and construct | 13205 | * This routine handles an ELS work-queue completion event and construct |
| 13145 | * a pseudo response ELS IODBQ from the SLI4 ELS WCQE for the common | 13206 | * a pseudo response ELS IODBQ from the SLI4 ELS WCQE for the common |
| @@ -13194,7 +13255,7 @@ lpfc_cq_event_setup(struct lpfc_hba *phba, void *entry, int size) · 48 unmodified lines | |||
| 13194 | /* Allocate a new internal CQ_EVENT entry */ | 13255 | /* Allocate a new internal CQ_EVENT entry */ |
| 13195 | cq_event = lpfc_sli4_cq_event_alloc(phba); | 13256 | cq_event = lpfc_sli4_cq_event_alloc(phba); |
| 13196 | if (!cq_event) { | 13257 | if (!cq_event) { |
| 13197 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13258 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13198 | "0602 Failed to alloc CQ_EVENT entry\n"); | 13259 | "0602 Failed to alloc CQ_EVENT entry\n"); |
| 13199 | return NULL; | 13260 | return NULL; |
| 13200 | } | 13261 | } |
| @@ -13207,7 +13268,7 @@ lpfc_cq_event_setup(struct lpfc_hba *phba, void *entry, int size) · 6 unmodified lines | |||
| 13207 | /** | 13268 | /** |
| 13208 | * lpfc_sli4_sp_handle_async_event - Handle an asynchronous event | 13269 | * lpfc_sli4_sp_handle_async_event - Handle an asynchronous event |
| 13209 | * @phba: Pointer to HBA context object. | 13270 | * @phba: Pointer to HBA context object. |
| 13210 | * @cqe: Pointer to mailbox completion queue entry. | 13271 | * @mcqe: Pointer to mailbox completion queue entry. |
| 13211 | * | 13272 | * |
| 13212 | * This routine process a mailbox completion queue entry with asynchronous | 13273 | * This routine process a mailbox completion queue entry with asynchronous |
| 13213 | * event. | 13274 | * event. |
| @@ -13240,7 +13301,7 @@ lpfc_sli4_sp_handle_async_event(struct lpfc_hba *phba, struct lpfc_mcqe *mcqe) · 26 unmodified lines | |||
| 13240 | /** | 13301 | /** |
| 13241 | * lpfc_sli4_sp_handle_mbox_event - Handle a mailbox completion event | 13302 | * lpfc_sli4_sp_handle_mbox_event - Handle a mailbox completion event |
| 13242 | * @phba: Pointer to HBA context object. | 13303 | * @phba: Pointer to HBA context object. |
| 13243 | * @cqe: Pointer to mailbox completion queue entry. | 13304 | * @mcqe: Pointer to mailbox completion queue entry. |
| 13244 | * | 13305 | * |
| 13245 | * This routine process a mailbox completion queue entry with mailbox | 13306 | * This routine process a mailbox completion queue entry with mailbox |
| 13246 | * completion event. | 13307 | * completion event. |
| @@ -13269,7 +13330,7 @@ lpfc_sli4_sp_handle_mbox_event(struct lpfc_hba *phba, struct lpfc_mcqe *mcqe) · 22 unmodified lines | |||
| 13269 | spin_lock_irqsave(&phba->hbalock, iflags); | 13330 | spin_lock_irqsave(&phba->hbalock, iflags); |
| 13270 | pmb = phba->sli.mbox_active; | 13331 | pmb = phba->sli.mbox_active; |
| 13271 | if (unlikely(!pmb)) { | 13332 | if (unlikely(!pmb)) { |
| 13272 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 13333 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13273 | "1832 No pending MBOX command to handle\n"); | 13334 | "1832 No pending MBOX command to handle\n"); |
| 13274 | spin_unlock_irqrestore(&phba->hbalock, iflags); | 13335 | spin_unlock_irqrestore(&phba->hbalock, iflags); |
| 13275 | goto out_no_mqe_complete; | 13336 | goto out_no_mqe_complete; |
| @@ -13318,8 +13379,9 @@ lpfc_sli4_sp_handle_mbox_event(struct lpfc_hba *phba, struct lpfc_mcqe *mcqe) · 42 unmodified lines | |||
| 13318 | pmb->vport = vport; | 13379 | pmb->vport = vport; |
| 13319 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); | 13380 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); |
| 13320 | if (rc != MBX_BUSY) | 13381 | if (rc != MBX_BUSY) |
| 13321 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | | 13382 | lpfc_printf_log(phba, KERN_ERR, |
| 13322 | LOG_SLI, "0385 rc should " | 13383 | LOG_TRACE_EVENT, |
| 13384 | "0385 rc should " | ||
| 13323 | "have been MBX_BUSY\n"); | 13385 | "have been MBX_BUSY\n"); |
| 13324 | if (rc != MBX_NOT_FINISHED) | 13386 | if (rc != MBX_NOT_FINISHED) |
| 13325 | goto send_current_mbox; | 13387 | goto send_current_mbox; |
| @@ -13360,6 +13422,7 @@ out_no_mqe_complete: · 34 unmodified lines | |||
| 13360 | /** | 13422 | /** |
| 13361 | * lpfc_sli4_sp_handle_mcqe - Process a mailbox completion queue entry | 13423 | * lpfc_sli4_sp_handle_mcqe - Process a mailbox completion queue entry |
| 13362 | * @phba: Pointer to HBA context object. | 13424 | * @phba: Pointer to HBA context object. |
| 13425 | * @cq: Pointer to associated CQ | ||
| 13363 | * @cqe: Pointer to mailbox completion queue entry. | 13426 | * @cqe: Pointer to mailbox completion queue entry. |
| 13364 | * | 13427 | * |
| 13365 | * This routine process a mailbox completion queue entry, it invokes the | 13428 | * This routine process a mailbox completion queue entry, it invokes the |
| @@ -13426,7 +13489,7 @@ lpfc_sli4_sp_handle_els_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 60 unmodified lines | |||
| 13426 | txq_cnt++; | 13489 | txq_cnt++; |
| 13427 | if (!list_empty(&pring->txcmplq)) | 13490 | if (!list_empty(&pring->txcmplq)) |
| 13428 | txcmplq_cnt++; | 13491 | txcmplq_cnt++; |
| 13429 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13492 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13430 | "0387 NO IOCBQ data: txq_cnt=%d iocb_cnt=%d " | 13493 | "0387 NO IOCBQ data: txq_cnt=%d iocb_cnt=%d " |
| 13431 | "els_txcmplq_cnt=%d\n", | 13494 | "els_txcmplq_cnt=%d\n", |
| 13432 | txq_cnt, phba->iocb_cnt, | 13495 | txq_cnt, phba->iocb_cnt, |
| @@ -13517,7 +13580,7 @@ lpfc_sli4_sp_handle_abort_xri_wcqe(struct lpfc_hba *phba, · 84 unmodified lines | |||
| 13517 | workposted = true; | 13580 | workposted = true; |
| 13518 | break; | 13581 | break; |
| 13519 | default: | 13582 | default: |
| 13520 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13583 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13521 | "0603 Invalid CQ subtype %d: " | 13584 | "0603 Invalid CQ subtype %d: " |
| 13522 | "%08x %08x %08x %08x\n", | 13585 | "%08x %08x %08x %08x\n", |
| 13523 | cq->subtype, wcqe->word0, wcqe->parameter, | 13586 | cq->subtype, wcqe->word0, wcqe->parameter, |
| @@ -13565,7 +13628,7 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe) · 41 unmodified lines | |||
| 13565 | status = bf_get(lpfc_rcqe_status, rcqe); | 13628 | status = bf_get(lpfc_rcqe_status, rcqe); |
| 13566 | switch (status) { | 13629 | switch (status) { |
| 13567 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: | 13630 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: |
| 13568 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13631 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13569 | "2537 Receive Frame Truncated!!\n"); | 13632 | "2537 Receive Frame Truncated!!\n"); |
| 13570 | /* fall through */ | 13633 | /* fall through */ |
| 13571 | case FC_STATUS_RQ_SUCCESS: | 13634 | case FC_STATUS_RQ_SUCCESS: |
| @@ -13602,7 +13665,7 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe) · 30 unmodified lines | |||
| 13602 | case FC_STATUS_INSUFF_BUF_FRM_DISC: | 13665 | case FC_STATUS_INSUFF_BUF_FRM_DISC: |
| 13603 | if (phba->nvmet_support) { | 13666 | if (phba->nvmet_support) { |
| 13604 | tgtp = phba->targetport->private; | 13667 | tgtp = phba->targetport->private; |
| 13605 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI | LOG_NVME, | 13668 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13606 | "6402 RQE Error x%x, posted %d err_cnt " | 13669 | "6402 RQE Error x%x, posted %d err_cnt " |
| 13607 | "%d: %x %x %x\n", | 13670 | "%d: %x %x %x\n", |
| 13608 | status, hrq->RQ_buf_posted, | 13671 | status, hrq->RQ_buf_posted, |
| @@ -13674,7 +13737,7 @@ lpfc_sli4_sp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 65 unmodified lines | |||
| 13674 | (struct lpfc_rcqe *)&cqevt); | 13737 | (struct lpfc_rcqe *)&cqevt); |
| 13675 | break; | 13738 | break; |
| 13676 | default: | 13739 | default: |
| 13677 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13740 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13678 | "0388 Not a valid WCQE code: x%x\n", | 13741 | "0388 Not a valid WCQE code: x%x\n", |
| 13679 | bf_get(lpfc_cqe_code, &cqevt)); | 13742 | bf_get(lpfc_cqe_code, &cqevt)); |
| 13680 | break; | 13743 | break; |
| @@ -13686,6 +13749,7 @@ lpfc_sli4_sp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 5 unmodified lines | |||
| 13686 | * lpfc_sli4_sp_handle_eqe - Process a slow-path event queue entry | 13749 | * lpfc_sli4_sp_handle_eqe - Process a slow-path event queue entry |
| 13687 | * @phba: Pointer to HBA context object. | 13750 | * @phba: Pointer to HBA context object. |
| 13688 | * @eqe: Pointer to fast-path event queue entry. | 13751 | * @eqe: Pointer to fast-path event queue entry. |
| 13752 | * @speq: Pointer to slow-path event queue. | ||
| 13689 | * | 13753 | * |
| 13690 | * This routine process a event queue entry from the slow-path event queue. | 13754 | * This routine process a event queue entry from the slow-path event queue. |
| 13691 | * It will check the MajorCode and MinorCode to determine this is for a | 13755 | * It will check the MajorCode and MinorCode to determine this is for a |
| @@ -13701,6 +13765,7 @@ lpfc_sli4_sp_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe, · 9 unmodified lines | |||
| 13701 | { | 13765 | { |
| 13702 | struct lpfc_queue *cq = NULL, *childq; | 13766 | struct lpfc_queue *cq = NULL, *childq; |
| 13703 | uint16_t cqid; | 13767 | uint16_t cqid; |
| 13768 | int ret = 0; | ||
| 13704 | 13769 | ||
| 13705 | /* Get the reference to the corresponding CQ */ | 13770 | /* Get the reference to the corresponding CQ */ |
| 13706 | cqid = bf_get_le32(lpfc_eqe_resource_id, eqe); | 13771 | cqid = bf_get_le32(lpfc_eqe_resource_id, eqe); |
| @@ -13713,7 +13778,7 @@ lpfc_sli4_sp_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe, · 6 unmodified lines | |||
| 13713 | } | 13778 | } |
| 13714 | if (unlikely(!cq)) { | 13779 | if (unlikely(!cq)) { |
| 13715 | if (phba->sli.sli_flag & LPFC_SLI_ACTIVE) | 13780 | if (phba->sli.sli_flag & LPFC_SLI_ACTIVE) |
| 13716 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13781 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13717 | "0365 Slow-path CQ identifier " | 13782 | "0365 Slow-path CQ identifier " |
| 13718 | "(%d) does not exist\n", cqid); | 13783 | "(%d) does not exist\n", cqid); |
| 13719 | return; | 13784 | return; |
| @@ -13722,9 +13787,14 @@ lpfc_sli4_sp_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe, · 2 unmodified lines | |||
| 13722 | /* Save EQ associated with this CQ */ | 13787 | /* Save EQ associated with this CQ */ |
| 13723 | cq->assoc_qp = speq; | 13788 | cq->assoc_qp = speq; |
| 13724 | 13789 | ||
| 13725 | if (!queue_work_on(cq->chann, phba->wq, &cq->spwork)) | 13790 | if (is_kdump_kernel()) |
| 13726 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13791 | ret = queue_work(phba->wq, &cq->spwork); |
| 13727 | "0390 Cannot schedule soft IRQ " | 13792 | else |
| 13793 | ret = queue_work_on(cq->chann, phba->wq, &cq->spwork); | ||
| 13794 | |||
| 13795 | if (!ret) | ||
| 13796 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, | ||
| 13797 | "0390 Cannot schedule queue work " | ||
| 13728 | "for CQ eqcqid=%d, cqid=%d on CPU %d\n", | 13798 | "for CQ eqcqid=%d, cqid=%d on CPU %d\n", |
| 13729 | cqid, cq->queue_id, raw_smp_processor_id()); | 13799 | cqid, cq->queue_id, raw_smp_processor_id()); |
| 13730 | } | 13800 | } |
| @@ -13735,6 +13805,7 @@ lpfc_sli4_sp_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe, · 4 unmodified lines | |||
| 13735 | * @cq: Pointer to CQ to be processed | 13805 | * @cq: Pointer to CQ to be processed |
| 13736 | * @handler: Routine to process each cqe | 13806 | * @handler: Routine to process each cqe |
| 13737 | * @delay: Pointer to usdelay to set in case of rescheduling of the handler | 13807 | * @delay: Pointer to usdelay to set in case of rescheduling of the handler |
| 13808 | * @poll_mode: Polling mode we were called from | ||
| 13738 | * | 13809 | * |
| 13739 | * This routine processes completion queue entries in a CQ. While a valid | 13810 | * This routine processes completion queue entries in a CQ. While a valid |
| 13740 | * queue element is found, the handler is called. During processing checks | 13811 | * queue element is found, the handler is called. During processing checks |
| @@ -13752,7 +13823,8 @@ lpfc_sli4_sp_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe, · 11 unmodified lines | |||
| 13752 | static bool | 13823 | static bool |
| 13753 | __lpfc_sli4_process_cq(struct lpfc_hba *phba, struct lpfc_queue *cq, | 13824 | __lpfc_sli4_process_cq(struct lpfc_hba *phba, struct lpfc_queue *cq, |
| 13754 | bool (*handler)(struct lpfc_hba *, struct lpfc_queue *, | 13825 | bool (*handler)(struct lpfc_hba *, struct lpfc_queue *, |
| 13755 | struct lpfc_cqe *), unsigned long *delay) | 13826 | struct lpfc_cqe *), unsigned long *delay, |
| 13827 | enum lpfc_poll_mode poll_mode) | ||
| 13756 | { | 13828 | { |
| 13757 | struct lpfc_cqe *cqe; | 13829 | struct lpfc_cqe *cqe; |
| 13758 | bool workposted = false; | 13830 | bool workposted = false; |
| @@ -13793,6 +13865,10 @@ __lpfc_sli4_process_cq(struct lpfc_hba *phba, struct lpfc_queue *cq, · 34 unmodified lines | |||
| 13793 | arm = false; | 13865 | arm = false; |
| 13794 | } | 13866 | } |
| 13795 | 13867 | ||
| 13868 | /* Note: complete the irq_poll softirq before rearming CQ */ | ||
| 13869 | if (poll_mode == LPFC_IRQ_POLL) | ||
| 13870 | irq_poll_complete(&cq->iop); | ||
| 13871 | |||
| 13796 | /* Track the max number of CQEs processed in 1 EQ */ | 13872 | /* Track the max number of CQEs processed in 1 EQ */ |
| 13797 | if (count > cq->CQ_max_cqe) | 13873 | if (count > cq->CQ_max_cqe) |
| 13798 | cq->CQ_max_cqe = count; | 13874 | cq->CQ_max_cqe = count; |
| @@ -13835,36 +13911,42 @@ __lpfc_sli4_sp_process_cq(struct lpfc_queue *cq) · 36 unmodified lines | |||
| 13835 | struct lpfc_hba *phba = cq->phba; | 13911 | struct lpfc_hba *phba = cq->phba; |
| 13836 | unsigned long delay; | 13912 | unsigned long delay; |
| 13837 | bool workposted = false; | 13913 | bool workposted = false; |
| 13914 | int ret = 0; | ||
| 13838 | 13915 | ||
| 13839 | /* Process and rearm the CQ */ | 13916 | /* Process and rearm the CQ */ |
| 13840 | switch (cq->type) { | 13917 | switch (cq->type) { |
| 13841 | case LPFC_MCQ: | 13918 | case LPFC_MCQ: |
| 13842 | workposted |= __lpfc_sli4_process_cq(phba, cq, | 13919 | workposted |= __lpfc_sli4_process_cq(phba, cq, |
| 13843 | lpfc_sli4_sp_handle_mcqe, | 13920 | lpfc_sli4_sp_handle_mcqe, |
| 13844 | &delay); | 13921 | &delay, LPFC_QUEUE_WORK); |
| 13845 | break; | 13922 | break; |
| 13846 | case LPFC_WCQ: | 13923 | case LPFC_WCQ: |
| 13847 | if (cq->subtype == LPFC_IO) | 13924 | if (cq->subtype == LPFC_IO) |
| 13848 | workposted |= __lpfc_sli4_process_cq(phba, cq, | 13925 | workposted |= __lpfc_sli4_process_cq(phba, cq, |
| 13849 | lpfc_sli4_fp_handle_cqe, | 13926 | lpfc_sli4_fp_handle_cqe, |
| 13850 | &delay); | 13927 | &delay, LPFC_QUEUE_WORK); |
| 13851 | else | 13928 | else |
| 13852 | workposted |= __lpfc_sli4_process_cq(phba, cq, | 13929 | workposted |= __lpfc_sli4_process_cq(phba, cq, |
| 13853 | lpfc_sli4_sp_handle_cqe, | 13930 | lpfc_sli4_sp_handle_cqe, |
| 13854 | &delay); | 13931 | &delay, LPFC_QUEUE_WORK); |
| 13855 | break; | 13932 | break; |
| 13856 | default: | 13933 | default: |
| 13857 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13934 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 13858 | "0370 Invalid completion queue type (%d)\n", | 13935 | "0370 Invalid completion queue type (%d)\n", |
| 13859 | cq->type); | 13936 | cq->type); |
| 13860 | return; | 13937 | return; |
| 13861 | } | 13938 | } |
| 13862 | 13939 | ||
| 13863 | if (delay) { | 13940 | if (delay) { |
| 13864 | if (!queue_delayed_work_on(cq->chann, phba->wq, | 13941 | if (is_kdump_kernel()) |
| 13865 | &cq->sched_spwork, delay)) | 13942 | ret = queue_delayed_work(phba->wq, &cq->sched_spwork, |
| 13866 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 13943 | delay); |
| 13867 | "0394 Cannot schedule soft IRQ " | 13944 | else |
| 13945 | ret = queue_delayed_work_on(cq->chann, phba->wq, | ||
| 13946 | &cq->sched_spwork, delay); | ||
| 13947 | if (!ret) | ||
| 13948 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, | ||
| 13949 | "0394 Cannot schedule queue work " | ||
| 13868 | "for cqid=%d on CPU %d\n", | 13950 | "for cqid=%d on CPU %d\n", |
| 13869 | cq->queue_id, cq->chann); | 13951 | cq->queue_id, cq->chann); |
| 13870 | } | 13952 | } |
| @@ -13933,9 +14015,9 @@ lpfc_sli4_fp_handle_fcp_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 62 unmodified lines | |||
| 13933 | IOERR_NO_RESOURCES)) | 14015 | IOERR_NO_RESOURCES)) |
| 13934 | phba->lpfc_rampdown_queue_depth(phba); | 14016 | phba->lpfc_rampdown_queue_depth(phba); |
| 13935 | 14017 | ||
| 13936 | /* Log the error status */ | 14018 | /* Log the cmpl status */ |
| 13937 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 14019 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
| 13938 | "0373 FCP CQE error: status=x%x: " | 14020 | "0373 FCP CQE cmpl: status=x%x: " |
| 13939 | "CQE: %08x %08x %08x %08x\n", | 14021 | "CQE: %08x %08x %08x %08x\n", |
| 13940 | bf_get(lpfc_wcqe_c_status, wcqe), | 14022 | bf_get(lpfc_wcqe_c_status, wcqe), |
| 13941 | wcqe->word0, wcqe->total_data_placed, | 14023 | wcqe->word0, wcqe->total_data_placed, |
| @@ -14029,6 +14111,7 @@ lpfc_sli4_fp_handle_rel_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 87 unmodified lines | |||
| 14029 | /** | 14111 | /** |
| 14030 | * lpfc_sli4_nvmet_handle_rcqe - Process a receive-queue completion queue entry | 14112 | * lpfc_sli4_nvmet_handle_rcqe - Process a receive-queue completion queue entry |
| 14031 | * @phba: Pointer to HBA context object. | 14113 | * @phba: Pointer to HBA context object. |
| 14114 | * @cq: Pointer to completion queue. | ||
| 14032 | * @rcqe: Pointer to receive-queue completion queue entry. | 14115 | * @rcqe: Pointer to receive-queue completion queue entry. |
| 14033 | * | 14116 | * |
| 14034 | * This routine process a receive-queue completion queue entry. | 14117 | * This routine process a receive-queue completion queue entry. |
| @@ -14073,7 +14156,7 @@ lpfc_sli4_nvmet_handle_rcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 38 unmodified lines | |||
| 14073 | status = bf_get(lpfc_rcqe_status, rcqe); | 14156 | status = bf_get(lpfc_rcqe_status, rcqe); |
| 14074 | switch (status) { | 14157 | switch (status) { |
| 14075 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: | 14158 | case FC_STATUS_RQ_BUF_LEN_EXCEEDED: |
| 14076 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 14159 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14077 | "6126 Receive Frame Truncated!!\n"); | 14160 | "6126 Receive Frame Truncated!!\n"); |
| 14078 | /* fall through */ | 14161 | /* fall through */ |
| 14079 | case FC_STATUS_RQ_SUCCESS: | 14162 | case FC_STATUS_RQ_SUCCESS: |
| @@ -14113,7 +14196,7 @@ drop: · 33 unmodified lines | |||
| 14113 | case FC_STATUS_INSUFF_BUF_FRM_DISC: | 14196 | case FC_STATUS_INSUFF_BUF_FRM_DISC: |
| 14114 | if (phba->nvmet_support) { | 14197 | if (phba->nvmet_support) { |
| 14115 | tgtp = phba->targetport->private; | 14198 | tgtp = phba->targetport->private; |
| 14116 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI | LOG_NVME, | 14199 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14117 | "6401 RQE Error x%x, posted %d err_cnt " | 14200 | "6401 RQE Error x%x, posted %d err_cnt " |
| 14118 | "%d: %x %x %x\n", | 14201 | "%d: %x %x %x\n", |
| 14119 | status, hrq->RQ_buf_posted, | 14202 | status, hrq->RQ_buf_posted, |
| @@ -14137,7 +14220,7 @@ out: · 17 unmodified lines | |||
| 14137 | * lpfc_sli4_fp_handle_cqe - Process fast-path work queue completion entry | 14220 | * lpfc_sli4_fp_handle_cqe - Process fast-path work queue completion entry |
| 14138 | * @phba: adapter with cq | 14221 | * @phba: adapter with cq |
| 14139 | * @cq: Pointer to the completion queue. | 14222 | * @cq: Pointer to the completion queue. |
| 14140 | * @eqe: Pointer to fast-path completion queue entry. | 14223 | * @cqe: Pointer to fast-path completion queue entry. |
| 14141 | * | 14224 | * |
| 14142 | * This routine process a fast-path work queue completion entry from fast-path | 14225 | * This routine process a fast-path work queue completion entry from fast-path |
| 14143 | * event queue for FCP command response completion. | 14226 | * event queue for FCP command response completion. |
| @@ -14187,7 +14270,7 @@ lpfc_sli4_fp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 43 unmodified lines | |||
| 14187 | } | 14270 | } |
| 14188 | break; | 14271 | break; |
| 14189 | default: | 14272 | default: |
| 14190 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 14273 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14191 | "0144 Not a valid CQE code: x%x\n", | 14274 | "0144 Not a valid CQE code: x%x\n", |
| 14192 | bf_get(lpfc_wcqe_c_code, &wcqe)); | 14275 | bf_get(lpfc_wcqe_c_code, &wcqe)); |
| 14193 | break; | 14276 | break; |
| @@ -14195,9 +14278,48 @@ lpfc_sli4_fp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq, · 1 unmodified line | |||
| 14195 | return workposted; | 14278 | return workposted; |
| 14196 | } | 14279 | } |
| 14197 | 14280 | ||
| 14281 | /** | ||
| 14282 | * lpfc_sli4_sched_cq_work - Schedules cq work | ||
| 14283 | * @phba: Pointer to HBA context object. | ||
| 14284 | * @cq: Pointer to CQ | ||
| 14285 | * @cqid: CQ ID | ||
| 14286 | * | ||
| 14287 | * This routine checks the poll mode of the CQ corresponding to | ||
| 14288 | * cq->chann, then either schedules a softirq or queue_work to complete | ||
| 14289 | * cq work. | ||
| 14290 | * | ||
| 14291 | * queue_work path is taken if in NVMET mode, or if poll_mode is in | ||
| 14292 | * LPFC_QUEUE_WORK mode. Otherwise, softirq path is taken. | ||
| 14293 | * | ||
| 14294 | **/ | ||
| 14295 | static void lpfc_sli4_sched_cq_work(struct lpfc_hba *phba, | ||
| 14296 | struct lpfc_queue *cq, uint16_t cqid) | ||
| 14297 | { | ||
| 14298 | int ret = 0; | ||
| 14299 | |||
| 14300 | switch (cq->poll_mode) { | ||
| 14301 | case LPFC_IRQ_POLL: | ||
| 14302 | irq_poll_sched(&cq->iop); | ||
| 14303 | break; | ||
| 14304 | case LPFC_QUEUE_WORK: | ||
| 14305 | default: | ||
| 14306 | if (is_kdump_kernel()) | ||
| 14307 | ret = queue_work(phba->wq, &cq->irqwork); | ||
| 14308 | else | ||
| 14309 | ret = queue_work_on(cq->chann, phba->wq, &cq->irqwork); | ||
| 14310 | if (!ret) | ||
| 14311 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, | ||
| 14312 | "0383 Cannot schedule queue work " | ||
| 14313 | "for CQ eqcqid=%d, cqid=%d on CPU %d\n", | ||
| 14314 | cqid, cq->queue_id, | ||
| 14315 | raw_smp_processor_id()); | ||
| 14316 | } | ||
| 14317 | } | ||
| 14318 | |||
| 14198 | /** | 14319 | /** |
| 14199 | * lpfc_sli4_hba_handle_eqe - Process a fast-path event queue entry | 14320 | * lpfc_sli4_hba_handle_eqe - Process a fast-path event queue entry |
| 14200 | * @phba: Pointer to HBA context object. | 14321 | * @phba: Pointer to HBA context object. |
| 14322 | * @eq: Pointer to the queue structure. | ||
| 14201 | * @eqe: Pointer to fast-path event queue entry. | 14323 | * @eqe: Pointer to fast-path event queue entry. |
| 14202 | * | 14324 | * |
| 14203 | * This routine process a event queue entry from the fast-path event queue. | 14325 | * This routine process a event queue entry from the fast-path event queue. |
| @@ -14216,7 +14338,7 @@ lpfc_sli4_hba_handle_eqe(struct lpfc_hba *phba, struct lpfc_queue *eq, · 12 unmodified lines | |||
| 14216 | uint16_t cqid, id; | 14338 | uint16_t cqid, id; |
| 14217 | 14339 | ||
| 14218 | if (unlikely(bf_get_le32(lpfc_eqe_major_code, eqe) != 0)) { | 14340 | if (unlikely(bf_get_le32(lpfc_eqe_major_code, eqe) != 0)) { |
| 14219 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 14341 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14220 | "0366 Not a valid completion " | 14342 | "0366 Not a valid completion " |
| 14221 | "event: majorcode=x%x, minorcode=x%x\n", | 14343 | "event: majorcode=x%x, minorcode=x%x\n", |
| 14222 | bf_get_le32(lpfc_eqe_major_code, eqe), | 14344 | bf_get_le32(lpfc_eqe_major_code, eqe), |
| @@ -14259,7 +14381,7 @@ lpfc_sli4_hba_handle_eqe(struct lpfc_hba *phba, struct lpfc_queue *eq, · 36 unmodified lines | |||
| 14259 | 14381 | ||
| 14260 | process_cq: | 14382 | process_cq: |
| 14261 | if (unlikely(cqid != cq->queue_id)) { | 14383 | if (unlikely(cqid != cq->queue_id)) { |
| 14262 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 14384 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14263 | "0368 Miss-matched fast-path completion " | 14385 | "0368 Miss-matched fast-path completion " |
| 14264 | "queue identifier: eqcqid=%d, fcpcqid=%d\n", | 14386 | "queue identifier: eqcqid=%d, fcpcqid=%d\n", |
| 14265 | cqid, cq->queue_id); | 14387 | cqid, cq->queue_id); |
| @@ -14273,16 +14395,13 @@ work_cq: · 7 unmodified lines | |||
| 14273 | else | 14395 | else |
| 14274 | cq->isr_timestamp = 0; | 14396 | cq->isr_timestamp = 0; |
| 14275 | #endif | 14397 | #endif |
| 14276 | if (!queue_work_on(cq->chann, phba->wq, &cq->irqwork)) | 14398 | lpfc_sli4_sched_cq_work(phba, cq, cqid); |
| 14277 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | ||
| 14278 | "0363 Cannot schedule soft IRQ " | ||
| 14279 | "for CQ eqcqid=%d, cqid=%d on CPU %d\n", | ||
| 14280 | cqid, cq->queue_id, raw_smp_processor_id()); | ||
| 14281 | } | 14399 | } |
| 14282 | 14400 | ||
| 14283 | /** | 14401 | /** |
| 14284 | * __lpfc_sli4_hba_process_cq - Process a fast-path event queue entry | 14402 | * __lpfc_sli4_hba_process_cq - Process a fast-path event queue entry |
| 14285 | * @cq: Pointer to CQ to be processed | 14403 | * @cq: Pointer to CQ to be processed |
| 14404 | * @poll_mode: Enum lpfc_poll_state to determine poll mode | ||
| 14286 | * | 14405 | * |
| 14287 | * This routine calls the cq processing routine with the handler for | 14406 | * This routine calls the cq processing routine with the handler for |
| 14288 | * fast path CQEs. | 14407 | * fast path CQEs. |
| @@ -14296,23 +14415,30 @@ work_cq: · 7 unmodified lines | |||
| 14296 | * the delay indicates when to reschedule it. | 14415 | * the delay indicates when to reschedule it. |
| 14297 | **/ | 14416 | **/ |
| 14298 | static void | 14417 | static void |
| 14299 | __lpfc_sli4_hba_process_cq(struct lpfc_queue *cq) | 14418 | __lpfc_sli4_hba_process_cq(struct lpfc_queue *cq, |
| 14419 | enum lpfc_poll_mode poll_mode) | ||
| 14300 | { | 14420 | { |
| 14301 | struct lpfc_hba *phba = cq->phba; | 14421 | struct lpfc_hba *phba = cq->phba; |
| 14302 | unsigned long delay; | 14422 | unsigned long delay; |
| 14303 | bool workposted = false; | 14423 | bool workposted = false; |
| 14424 | int ret = 0; | ||
| 14304 | 14425 | ||
| 14305 | /* process and rearm the CQ */ | 14426 | /* process and rearm the CQ */ |
| 14306 | workposted |= __lpfc_sli4_process_cq(phba, cq, lpfc_sli4_fp_handle_cqe, | 14427 | workposted |= __lpfc_sli4_process_cq(phba, cq, lpfc_sli4_fp_handle_cqe, |
| 14307 | &delay); | 14428 | &delay, poll_mode); |
| 14308 | 14429 | ||
| 14309 | if (delay) { | 14430 | if (delay) { |
| 14310 | if (!queue_delayed_work_on(cq->chann, phba->wq, | 14431 | if (is_kdump_kernel()) |
| 14311 | &cq->sched_irqwork, delay)) | 14432 | ret = queue_delayed_work(phba->wq, &cq->sched_irqwork, |
| 14312 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 14433 | delay); |
| 14313 | "0367 Cannot schedule soft IRQ " | 14434 | else |
| 14314 | "for cqid=%d on CPU %d\n", | 14435 | ret = queue_delayed_work_on(cq->chann, phba->wq, |
| 14315 | cq->queue_id, cq->chann); | 14436 | &cq->sched_irqwork, delay); |
| 14437 | if (!ret) | ||
| 14438 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, | ||
| 14439 | "0367 Cannot schedule queue work " | ||
| 14440 | "for cqid=%d on CPU %d\n", | ||
| 14441 | cq->queue_id, cq->chann); | ||
| 14316 | } | 14442 | } |
| 14317 | 14443 | ||
| 14318 | /* wake up worker thread if there are works to be done */ | 14444 | /* wake up worker thread if there are works to be done */ |
| @@ -14332,7 +14458,7 @@ lpfc_sli4_hba_process_cq(struct work_struct *work) · 13 unmodified lines | |||
| 14332 | { | 14458 | { |
| 14333 | struct lpfc_queue *cq = container_of(work, struct lpfc_queue, irqwork); | 14459 | struct lpfc_queue *cq = container_of(work, struct lpfc_queue, irqwork); |
| 14334 | 14460 | ||
| 14335 | __lpfc_sli4_hba_process_cq(cq); | 14461 | __lpfc_sli4_hba_process_cq(cq, LPFC_QUEUE_WORK); |
| 14336 | } | 14462 | } |
| 14337 | 14463 | ||
| 14338 | /** | 14464 | /** |
| @@ -14347,7 +14473,7 @@ lpfc_sli4_dly_hba_process_cq(struct work_struct *work) · 8 unmodified lines | |||
| 14347 | struct lpfc_queue *cq = container_of(to_delayed_work(work), | 14473 | struct lpfc_queue *cq = container_of(to_delayed_work(work), |
| 14348 | struct lpfc_queue, sched_irqwork); | 14474 | struct lpfc_queue, sched_irqwork); |
| 14349 | 14475 | ||
| 14350 | __lpfc_sli4_hba_process_cq(cq); | 14476 | __lpfc_sli4_hba_process_cq(cq, LPFC_QUEUE_WORK); |
| 14351 | } | 14477 | } |
| 14352 | 14478 | ||
| 14353 | /** | 14479 | /** |
| @@ -14668,7 +14794,7 @@ lpfc_sli4_queue_free(struct lpfc_queue *queue) · 314 unmodified lines | |||
| 14668 | * @phba: The HBA that this queue is being created on. | 14794 | * @phba: The HBA that this queue is being created on. |
| 14669 | * @page_size: The size of a queue page | 14795 | * @page_size: The size of a queue page |
| 14670 | * @entry_size: The size of each queue entry for this queue. | 14796 | * @entry_size: The size of each queue entry for this queue. |
| 14671 | * @entry count: The number of entries that this queue will handle. | 14797 | * @entry_count: The number of entries that this queue will handle. |
| 14672 | * @cpu: The cpu that will primarily utilize this queue. | 14798 | * @cpu: The cpu that will primarily utilize this queue. |
| 14673 | * | 14799 | * |
| 14674 | * This function allocates a queue structure and the DMAable memory used for | 14800 | * This function allocates a queue structure and the DMAable memory used for |
| @@ -14840,7 +14966,7 @@ lpfc_modify_hba_eq_delay(struct lpfc_hba *phba, uint32_t startq, · 165 unmodified lines | |||
| 14840 | 14966 | ||
| 14841 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 14967 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 14842 | if (!mbox) { | 14968 | if (!mbox) { |
| 14843 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_FCP | LOG_NVME, | 14969 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14844 | "6428 Failed allocating mailbox cmd buffer." | 14970 | "6428 Failed allocating mailbox cmd buffer." |
| 14845 | " EQ delay was not set.\n"); | 14971 | " EQ delay was not set.\n"); |
| 14846 | return; | 14972 | return; |
| @@ -14882,7 +15008,7 @@ lpfc_modify_hba_eq_delay(struct lpfc_hba *phba, uint32_t startq, · 35 unmodified lines | |||
| 14882 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 15008 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 14883 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 15009 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 14884 | if (shdr_status || shdr_add_status || rc) { | 15010 | if (shdr_status || shdr_add_status || rc) { |
| 14885 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15011 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14886 | "2512 MODIFY_EQ_DELAY mailbox failed with " | 15012 | "2512 MODIFY_EQ_DELAY mailbox failed with " |
| 14887 | "status x%x add_status x%x, mbx status x%x\n", | 15013 | "status x%x add_status x%x, mbx status x%x\n", |
| 14888 | shdr_status, shdr_add_status, rc); | 15014 | shdr_status, shdr_add_status, rc); |
| @@ -14959,7 +15085,7 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax) · 70 unmodified lines | |||
| 14959 | dmult); | 15085 | dmult); |
| 14960 | switch (eq->entry_count) { | 15086 | switch (eq->entry_count) { |
| 14961 | default: | 15087 | default: |
| 14962 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 15088 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 14963 | "0360 Unsupported EQ count. (%d)\n", | 15089 | "0360 Unsupported EQ count. (%d)\n", |
| 14964 | eq->entry_count); | 15090 | eq->entry_count); |
| 14965 | if (eq->entry_count < 256) { | 15091 | if (eq->entry_count < 256) { |
| @@ -15003,7 +15129,7 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax) · 37 unmodified lines | |||
| 15003 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 15129 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 15004 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 15130 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 15005 | if (shdr_status || shdr_add_status || rc) { | 15131 | if (shdr_status || shdr_add_status || rc) { |
| 15006 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15132 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15007 | "2500 EQ_CREATE mailbox failed with " | 15133 | "2500 EQ_CREATE mailbox failed with " |
| 15008 | "status x%x add_status x%x, mbx status x%x\n", | 15134 | "status x%x add_status x%x, mbx status x%x\n", |
| 15009 | shdr_status, shdr_add_status, rc); | 15135 | shdr_status, shdr_add_status, rc); |
| @@ -15022,11 +15148,22 @@ out: · 12 unmodified lines | |||
| 15022 | return status; | 15148 | return status; |
| 15023 | } | 15149 | } |
| 15024 | 15150 | ||
| 15151 | static int lpfc_cq_poll_hdler(struct irq_poll *iop, int budget) | ||
| 15152 | { | ||
| 15153 | struct lpfc_queue *cq = container_of(iop, struct lpfc_queue, iop); | ||
| 15154 | |||
| 15155 | __lpfc_sli4_hba_process_cq(cq, LPFC_IRQ_POLL); | ||
| 15156 | |||
| 15157 | return 1; | ||
| 15158 | } | ||
| 15159 | |||
| 15025 | /** | 15160 | /** |
| 15026 | * lpfc_cq_create - Create a Completion Queue on the HBA | 15161 | * lpfc_cq_create - Create a Completion Queue on the HBA |
| 15027 | * @phba: HBA structure that indicates port to create a queue on. | 15162 | * @phba: HBA structure that indicates port to create a queue on. |
| 15028 | * @cq: The queue structure to use to create the completion queue. | 15163 | * @cq: The queue structure to use to create the completion queue. |
| 15029 | * @eq: The event queue to bind this completion queue to. | 15164 | * @eq: The event queue to bind this completion queue to. |
| 15165 | * @type: Type of queue (EQ, GCQ, MCQ, WCQ, etc). | ||
| 15166 | * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc). | ||
| 15030 | * | 15167 | * |
| 15031 | * This function creates a completion queue, as detailed in @wq, on a port, | 15168 | * This function creates a completion queue, as detailed in @wq, on a port, |
| 15032 | * described by @phba by sending a CQ_CREATE mailbox command to the HBA. | 15169 | * described by @phba by sending a CQ_CREATE mailbox command to the HBA. |
| @@ -15099,7 +15236,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq, · 66 unmodified lines | |||
| 15099 | } | 15236 | } |
| 15100 | /* fall through */ | 15237 | /* fall through */ |
| 15101 | default: | 15238 | default: |
| 15102 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 15239 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15103 | "0361 Unsupported CQ count: " | 15240 | "0361 Unsupported CQ count: " |
| 15104 | "entry cnt %d sz %d pg cnt %d\n", | 15241 | "entry cnt %d sz %d pg cnt %d\n", |
| 15105 | cq->entry_count, cq->entry_size, | 15242 | cq->entry_count, cq->entry_size, |
| @@ -15135,7 +15272,7 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq, · 29 unmodified lines | |||
| 15135 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 15272 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 15136 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 15273 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 15137 | if (shdr_status || shdr_add_status || rc) { | 15274 | if (shdr_status || shdr_add_status || rc) { |
| 15138 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15275 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15139 | "2501 CQ_CREATE mailbox failed with " | 15276 | "2501 CQ_CREATE mailbox failed with " |
| 15140 | "status x%x add_status x%x, mbx status x%x\n", | 15277 | "status x%x add_status x%x, mbx status x%x\n", |
| 15141 | shdr_status, shdr_add_status, rc); | 15278 | shdr_status, shdr_add_status, rc); |
| @@ -15161,6 +15298,8 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq, · 19 unmodified lines | |||
| 15161 | 15298 | ||
| 15162 | if (cq->queue_id > phba->sli4_hba.cq_max) | 15299 | if (cq->queue_id > phba->sli4_hba.cq_max) |
| 15163 | phba->sli4_hba.cq_max = cq->queue_id; | 15300 | phba->sli4_hba.cq_max = cq->queue_id; |
| 15301 | |||
| 15302 | irq_poll_init(&cq->iop, LPFC_IRQ_POLL_WEIGHT, lpfc_cq_poll_hdler); | ||
| 15164 | out: | 15303 | out: |
| 15165 | mempool_free(mbox, phba->mbox_mem_pool); | 15304 | mempool_free(mbox, phba->mbox_mem_pool); |
| 15166 | return status; | 15305 | return status; |
| @@ -15171,6 +15310,8 @@ out: · 4 unmodified lines | |||
| 15171 | * @phba: HBA structure that indicates port to create a queue on. | 15310 | * @phba: HBA structure that indicates port to create a queue on. |
| 15172 | * @cqp: The queue structure array to use to create the completion queues. | 15311 | * @cqp: The queue structure array to use to create the completion queues. |
| 15173 | * @hdwq: The hardware queue array with the EQ to bind completion queues to. | 15312 | * @hdwq: The hardware queue array with the EQ to bind completion queues to. |
| 15313 | * @type: Type of queue (EQ, GCQ, MCQ, WCQ, etc). | ||
| 15314 | * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc). | ||
| 15174 | * | 15315 | * |
| 15175 | * This function creates a set of completion queue, s to support MRQ | 15316 | * This function creates a set of completion queue, s to support MRQ |
| 15176 | * as detailed in @cqp, on a port, | 15317 | * as detailed in @cqp, on a port, |
| @@ -15220,7 +15361,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp, · 43 unmodified lines | |||
| 15220 | LPFC_MBOX_OPCODE_FCOE_CQ_CREATE_SET, length, | 15361 | LPFC_MBOX_OPCODE_FCOE_CQ_CREATE_SET, length, |
| 15221 | LPFC_SLI4_MBX_NEMBED); | 15362 | LPFC_SLI4_MBX_NEMBED); |
| 15222 | if (alloclen < length) { | 15363 | if (alloclen < length) { |
| 15223 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 15364 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15224 | "3098 Allocated DMA memory size (%d) is " | 15365 | "3098 Allocated DMA memory size (%d) is " |
| 15225 | "less than the requested DMA memory size " | 15366 | "less than the requested DMA memory size " |
| 15226 | "(%d)\n", alloclen, length); | 15367 | "(%d)\n", alloclen, length); |
| @@ -15274,7 +15415,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp, · 47 unmodified lines | |||
| 15274 | } | 15415 | } |
| 15275 | /* fall through */ | 15416 | /* fall through */ |
| 15276 | default: | 15417 | default: |
| 15277 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 15418 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15278 | "3118 Bad CQ count. (%d)\n", | 15419 | "3118 Bad CQ count. (%d)\n", |
| 15279 | cq->entry_count); | 15420 | cq->entry_count); |
| 15280 | if (cq->entry_count < 256) { | 15421 | if (cq->entry_count < 256) { |
| @@ -15392,7 +15533,7 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp, · 111 unmodified lines | |||
| 15392 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 15533 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 15393 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 15534 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 15394 | if (shdr_status || shdr_add_status || rc) { | 15535 | if (shdr_status || shdr_add_status || rc) { |
| 15395 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15536 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15396 | "3119 CQ_CREATE_SET mailbox failed with " | 15537 | "3119 CQ_CREATE_SET mailbox failed with " |
| 15397 | "status x%x add_status x%x, mbx status x%x\n", | 15538 | "status x%x add_status x%x, mbx status x%x\n", |
| 15398 | shdr_status, shdr_add_status, rc); | 15539 | shdr_status, shdr_add_status, rc); |
| @@ -15550,7 +15691,7 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq, · 151 unmodified lines | |||
| 15550 | cq->queue_id); | 15691 | cq->queue_id); |
| 15551 | switch (mq->entry_count) { | 15692 | switch (mq->entry_count) { |
| 15552 | default: | 15693 | default: |
| 15553 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 15694 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15554 | "0362 Unsupported MQ count. (%d)\n", | 15695 | "0362 Unsupported MQ count. (%d)\n", |
| 15555 | mq->entry_count); | 15696 | mq->entry_count); |
| 15556 | if (mq->entry_count < 16) { | 15697 | if (mq->entry_count < 16) { |
| @@ -15606,7 +15747,7 @@ lpfc_mq_create(struct lpfc_hba *phba, struct lpfc_queue *mq, · 49 unmodified lines | |||
| 15606 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 15747 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 15607 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 15748 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 15608 | if (shdr_status || shdr_add_status || rc) { | 15749 | if (shdr_status || shdr_add_status || rc) { |
| 15609 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15750 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15610 | "2502 MQ_CREATE mailbox failed with " | 15751 | "2502 MQ_CREATE mailbox failed with " |
| 15611 | "status x%x add_status x%x, mbx status x%x\n", | 15752 | "status x%x add_status x%x, mbx status x%x\n", |
| 15612 | shdr_status, shdr_add_status, rc); | 15753 | shdr_status, shdr_add_status, rc); |
| @@ -15669,8 +15810,10 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 56 unmodified lines | |||
| 15669 | uint16_t pci_barset; | 15810 | uint16_t pci_barset; |
| 15670 | uint8_t dpp_barset; | 15811 | uint8_t dpp_barset; |
| 15671 | uint32_t dpp_offset; | 15812 | uint32_t dpp_offset; |
| 15672 | unsigned long pg_addr; | ||
| 15673 | uint8_t wq_create_version; | 15813 | uint8_t wq_create_version; |
| 15814 | #ifdef CONFIG_X86 | ||
| 15815 | unsigned long pg_addr; | ||
| 15816 | #endif | ||
| 15674 | 15817 | ||
| 15675 | /* sanity check on queue memory */ | 15818 | /* sanity check on queue memory */ |
| 15676 | if (!wq || !cq) | 15819 | if (!wq || !cq) |
| @@ -15755,7 +15898,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 78 unmodified lines | |||
| 15755 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 15898 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 15756 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 15899 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 15757 | if (shdr_status || shdr_add_status || rc) { | 15900 | if (shdr_status || shdr_add_status || rc) { |
| 15758 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15901 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15759 | "2503 WQ_CREATE mailbox failed with " | 15902 | "2503 WQ_CREATE mailbox failed with " |
| 15760 | "status x%x add_status x%x, mbx status x%x\n", | 15903 | "status x%x add_status x%x, mbx status x%x\n", |
| 15761 | shdr_status, shdr_add_status, rc); | 15904 | shdr_status, shdr_add_status, rc); |
| @@ -15782,7 +15925,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 20 unmodified lines | |||
| 15782 | &wq_create->u.response); | 15925 | &wq_create->u.response); |
| 15783 | if ((wq->db_format != LPFC_DB_LIST_FORMAT) && | 15926 | if ((wq->db_format != LPFC_DB_LIST_FORMAT) && |
| 15784 | (wq->db_format != LPFC_DB_RING_FORMAT)) { | 15927 | (wq->db_format != LPFC_DB_RING_FORMAT)) { |
| 15785 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15928 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15786 | "3265 WQ[%d] doorbell format " | 15929 | "3265 WQ[%d] doorbell format " |
| 15787 | "not supported: x%x\n", | 15930 | "not supported: x%x\n", |
| 15788 | wq->queue_id, wq->db_format); | 15931 | wq->queue_id, wq->db_format); |
| @@ -15794,7 +15937,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 5 unmodified lines | |||
| 15794 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, | 15937 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, |
| 15795 | pci_barset); | 15938 | pci_barset); |
| 15796 | if (!bar_memmap_p) { | 15939 | if (!bar_memmap_p) { |
| 15797 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15940 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15798 | "3263 WQ[%d] failed to memmap " | 15941 | "3263 WQ[%d] failed to memmap " |
| 15799 | "pci barset:x%x\n", | 15942 | "pci barset:x%x\n", |
| 15800 | wq->queue_id, pci_barset); | 15943 | wq->queue_id, pci_barset); |
| @@ -15804,7 +15947,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 3 unmodified lines | |||
| 15804 | db_offset = wq_create->u.response.doorbell_offset; | 15947 | db_offset = wq_create->u.response.doorbell_offset; |
| 15805 | if ((db_offset != LPFC_ULP0_WQ_DOORBELL) && | 15948 | if ((db_offset != LPFC_ULP0_WQ_DOORBELL) && |
| 15806 | (db_offset != LPFC_ULP1_WQ_DOORBELL)) { | 15949 | (db_offset != LPFC_ULP1_WQ_DOORBELL)) { |
| 15807 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15950 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15808 | "3252 WQ[%d] doorbell offset " | 15951 | "3252 WQ[%d] doorbell offset " |
| 15809 | "not supported: x%x\n", | 15952 | "not supported: x%x\n", |
| 15810 | wq->queue_id, db_offset); | 15953 | wq->queue_id, db_offset); |
| @@ -15828,7 +15971,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 17 unmodified lines | |||
| 15828 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, | 15971 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, |
| 15829 | pci_barset); | 15972 | pci_barset); |
| 15830 | if (!bar_memmap_p) { | 15973 | if (!bar_memmap_p) { |
| 15831 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15974 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15832 | "3267 WQ[%d] failed to memmap " | 15975 | "3267 WQ[%d] failed to memmap " |
| 15833 | "pci barset:x%x\n", | 15976 | "pci barset:x%x\n", |
| 15834 | wq->queue_id, pci_barset); | 15977 | wq->queue_id, pci_barset); |
| @@ -15844,7 +15987,7 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 9 unmodified lines | |||
| 15844 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, | 15987 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, |
| 15845 | dpp_barset); | 15988 | dpp_barset); |
| 15846 | if (!bar_memmap_p) { | 15989 | if (!bar_memmap_p) { |
| 15847 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 15990 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15848 | "3268 WQ[%d] failed to memmap " | 15991 | "3268 WQ[%d] failed to memmap " |
| 15849 | "pci barset:x%x\n", | 15992 | "pci barset:x%x\n", |
| 15850 | wq->queue_id, dpp_barset); | 15993 | wq->queue_id, dpp_barset); |
| @@ -15860,9 +16003,9 @@ lpfc_wq_create(struct lpfc_hba *phba, struct lpfc_queue *wq, · 9 unmodified lines | |||
| 15860 | wq->queue_id, pci_barset, db_offset, | 16003 | wq->queue_id, pci_barset, db_offset, |
| 15861 | wq->dpp_id, dpp_barset, dpp_offset); | 16004 | wq->dpp_id, dpp_barset, dpp_offset); |
| 15862 | 16005 | ||
| 16006 | #ifdef CONFIG_X86 | ||
| 15863 | /* Enable combined writes for DPP aperture */ | 16007 | /* Enable combined writes for DPP aperture */ |
| 15864 | pg_addr = (unsigned long)(wq->dpp_regaddr) & PAGE_MASK; | 16008 | pg_addr = (unsigned long)(wq->dpp_regaddr) & PAGE_MASK; |
| 15865 | #ifdef CONFIG_X86 | ||
| 15866 | rc = set_memory_wc(pg_addr, 1); | 16009 | rc = set_memory_wc(pg_addr, 1); |
| 15867 | if (rc) { | 16010 | if (rc) { |
| 15868 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16011 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
| @@ -15902,6 +16045,7 @@ out: · 33 unmodified lines | |||
| 15902 | * @hrq: The queue structure to use to create the header receive queue. | 16045 | * @hrq: The queue structure to use to create the header receive queue. |
| 15903 | * @drq: The queue structure to use to create the data receive queue. | 16046 | * @drq: The queue structure to use to create the data receive queue. |
| 15904 | * @cq: The completion queue to bind this work queue to. | 16047 | * @cq: The completion queue to bind this work queue to. |
| 16048 | * @subtype: The subtype of the work queue indicating its functionality. | ||
| 15905 | * | 16049 | * |
| 15906 | * This function creates a receive buffer queue pair , as detailed in @hrq and | 16050 | * This function creates a receive buffer queue pair , as detailed in @hrq and |
| 15907 | * @drq, on a port, described by @phba by sending a RQ_CREATE mailbox command | 16051 | * @drq, on a port, described by @phba by sending a RQ_CREATE mailbox command |
| @@ -15968,7 +16112,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 60 unmodified lines | |||
| 15968 | } else { | 16112 | } else { |
| 15969 | switch (hrq->entry_count) { | 16113 | switch (hrq->entry_count) { |
| 15970 | default: | 16114 | default: |
| 15971 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 16115 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 15972 | "2535 Unsupported RQ count. (%d)\n", | 16116 | "2535 Unsupported RQ count. (%d)\n", |
| 15973 | hrq->entry_count); | 16117 | hrq->entry_count); |
| 15974 | if (hrq->entry_count < 512) { | 16118 | if (hrq->entry_count < 512) { |
| @@ -16019,7 +16163,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 44 unmodified lines | |||
| 16019 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16163 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16020 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16164 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16021 | if (shdr_status || shdr_add_status || rc) { | 16165 | if (shdr_status || shdr_add_status || rc) { |
| 16022 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16166 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16023 | "2504 RQ_CREATE mailbox failed with " | 16167 | "2504 RQ_CREATE mailbox failed with " |
| 16024 | "status x%x add_status x%x, mbx status x%x\n", | 16168 | "status x%x add_status x%x, mbx status x%x\n", |
| 16025 | shdr_status, shdr_add_status, rc); | 16169 | shdr_status, shdr_add_status, rc); |
| @@ -16037,7 +16181,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 11 unmodified lines | |||
| 16037 | &rq_create->u.response); | 16181 | &rq_create->u.response); |
| 16038 | if ((hrq->db_format != LPFC_DB_LIST_FORMAT) && | 16182 | if ((hrq->db_format != LPFC_DB_LIST_FORMAT) && |
| 16039 | (hrq->db_format != LPFC_DB_RING_FORMAT)) { | 16183 | (hrq->db_format != LPFC_DB_RING_FORMAT)) { |
| 16040 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16184 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16041 | "3262 RQ [%d] doorbell format not " | 16185 | "3262 RQ [%d] doorbell format not " |
| 16042 | "supported: x%x\n", hrq->queue_id, | 16186 | "supported: x%x\n", hrq->queue_id, |
| 16043 | hrq->db_format); | 16187 | hrq->db_format); |
| @@ -16049,7 +16193,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 5 unmodified lines | |||
| 16049 | &rq_create->u.response); | 16193 | &rq_create->u.response); |
| 16050 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, pci_barset); | 16194 | bar_memmap_p = lpfc_dual_chute_pci_bar_map(phba, pci_barset); |
| 16051 | if (!bar_memmap_p) { | 16195 | if (!bar_memmap_p) { |
| 16052 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16196 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16053 | "3269 RQ[%d] failed to memmap pci " | 16197 | "3269 RQ[%d] failed to memmap pci " |
| 16054 | "barset:x%x\n", hrq->queue_id, | 16198 | "barset:x%x\n", hrq->queue_id, |
| 16055 | pci_barset); | 16199 | pci_barset); |
| @@ -16060,7 +16204,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 4 unmodified lines | |||
| 16060 | db_offset = rq_create->u.response.doorbell_offset; | 16204 | db_offset = rq_create->u.response.doorbell_offset; |
| 16061 | if ((db_offset != LPFC_ULP0_RQ_DOORBELL) && | 16205 | if ((db_offset != LPFC_ULP0_RQ_DOORBELL) && |
| 16062 | (db_offset != LPFC_ULP1_RQ_DOORBELL)) { | 16206 | (db_offset != LPFC_ULP1_RQ_DOORBELL)) { |
| 16063 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16207 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16064 | "3270 RQ[%d] doorbell offset not " | 16208 | "3270 RQ[%d] doorbell offset not " |
| 16065 | "supported: x%x\n", hrq->queue_id, | 16209 | "supported: x%x\n", hrq->queue_id, |
| 16066 | db_offset); | 16210 | db_offset); |
| @@ -16105,7 +16249,7 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 38 unmodified lines | |||
| 16105 | } else { | 16249 | } else { |
| 16106 | switch (drq->entry_count) { | 16250 | switch (drq->entry_count) { |
| 16107 | default: | 16251 | default: |
| 16108 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 16252 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16109 | "2536 Unsupported RQ count. (%d)\n", | 16253 | "2536 Unsupported RQ count. (%d)\n", |
| 16110 | drq->entry_count); | 16254 | drq->entry_count); |
| 16111 | if (drq->entry_count < 512) { | 16255 | if (drq->entry_count < 512) { |
| @@ -16191,6 +16335,7 @@ out: · 79 unmodified lines | |||
| 16191 | * @hrqp: The queue structure array to use to create the header receive queues. | 16335 | * @hrqp: The queue structure array to use to create the header receive queues. |
| 16192 | * @drqp: The queue structure array to use to create the data receive queues. | 16336 | * @drqp: The queue structure array to use to create the data receive queues. |
| 16193 | * @cqp: The completion queue array to bind these receive queues to. | 16337 | * @cqp: The completion queue array to bind these receive queues to. |
| 16338 | * @subtype: Functional purpose of the queue (MBOX, IO, ELS, NVMET, etc). | ||
| 16194 | * | 16339 | * |
| 16195 | * This function creates a receive buffer queue pair , as detailed in @hrq and | 16340 | * This function creates a receive buffer queue pair , as detailed in @hrq and |
| 16196 | * @drq, on a port, described by @phba by sending a RQ_CREATE mailbox command | 16341 | * @drq, on a port, described by @phba by sending a RQ_CREATE mailbox command |
| @@ -16242,7 +16387,7 @@ lpfc_mrq_create(struct lpfc_hba *phba, struct lpfc_queue **hrqp, · 45 unmodified lines | |||
| 16242 | LPFC_MBOX_OPCODE_FCOE_RQ_CREATE, length, | 16387 | LPFC_MBOX_OPCODE_FCOE_RQ_CREATE, length, |
| 16243 | LPFC_SLI4_MBX_NEMBED); | 16388 | LPFC_SLI4_MBX_NEMBED); |
| 16244 | if (alloclen < length) { | 16389 | if (alloclen < length) { |
| 16245 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 16390 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16246 | "3099 Allocated DMA memory size (%d) is " | 16391 | "3099 Allocated DMA memory size (%d) is " |
| 16247 | "less than the requested DMA memory size " | 16392 | "less than the requested DMA memory size " |
| 16248 | "(%d)\n", alloclen, length); | 16393 | "(%d)\n", alloclen, length); |
| @@ -16352,7 +16497,7 @@ lpfc_mrq_create(struct lpfc_hba *phba, struct lpfc_queue **hrqp, · 103 unmodified lines | |||
| 16352 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16497 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16353 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16498 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16354 | if (shdr_status || shdr_add_status || rc) { | 16499 | if (shdr_status || shdr_add_status || rc) { |
| 16355 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16500 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16356 | "3120 RQ_CREATE mailbox failed with " | 16501 | "3120 RQ_CREATE mailbox failed with " |
| 16357 | "status x%x add_status x%x, mbx status x%x\n", | 16502 | "status x%x add_status x%x, mbx status x%x\n", |
| 16358 | shdr_status, shdr_add_status, rc); | 16503 | shdr_status, shdr_add_status, rc); |
| @@ -16380,6 +16525,7 @@ out: · 21 unmodified lines | |||
| 16380 | 16525 | ||
| 16381 | /** | 16526 | /** |
| 16382 | * lpfc_eq_destroy - Destroy an event Queue on the HBA | 16527 | * lpfc_eq_destroy - Destroy an event Queue on the HBA |
| 16528 | * @phba: HBA structure that indicates port to destroy a queue on. | ||
| 16383 | * @eq: The queue structure associated with the queue to destroy. | 16529 | * @eq: The queue structure associated with the queue to destroy. |
| 16384 | * | 16530 | * |
| 16385 | * This function destroys a queue, as detailed in @eq by sending an mailbox | 16531 | * This function destroys a queue, as detailed in @eq by sending an mailbox |
| @@ -16422,7 +16568,7 @@ lpfc_eq_destroy(struct lpfc_hba *phba, struct lpfc_queue *eq) · 36 unmodified lines | |||
| 16422 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16568 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16423 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16569 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16424 | if (shdr_status || shdr_add_status || rc) { | 16570 | if (shdr_status || shdr_add_status || rc) { |
| 16425 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16571 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16426 | "2505 EQ_DESTROY mailbox failed with " | 16572 | "2505 EQ_DESTROY mailbox failed with " |
| 16427 | "status x%x add_status x%x, mbx status x%x\n", | 16573 | "status x%x add_status x%x, mbx status x%x\n", |
| 16428 | shdr_status, shdr_add_status, rc); | 16574 | shdr_status, shdr_add_status, rc); |
| @@ -16437,6 +16583,7 @@ lpfc_eq_destroy(struct lpfc_hba *phba, struct lpfc_queue *eq) · 8 unmodified lines | |||
| 16437 | 16583 | ||
| 16438 | /** | 16584 | /** |
| 16439 | * lpfc_cq_destroy - Destroy a Completion Queue on the HBA | 16585 | * lpfc_cq_destroy - Destroy a Completion Queue on the HBA |
| 16586 | * @phba: HBA structure that indicates port to destroy a queue on. | ||
| 16440 | * @cq: The queue structure associated with the queue to destroy. | 16587 | * @cq: The queue structure associated with the queue to destroy. |
| 16441 | * | 16588 | * |
| 16442 | * This function destroys a queue, as detailed in @cq by sending an mailbox | 16589 | * This function destroys a queue, as detailed in @cq by sending an mailbox |
| @@ -16477,7 +16624,7 @@ lpfc_cq_destroy(struct lpfc_hba *phba, struct lpfc_queue *cq) · 34 unmodified lines | |||
| 16477 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16624 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16478 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16625 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16479 | if (shdr_status || shdr_add_status || rc) { | 16626 | if (shdr_status || shdr_add_status || rc) { |
| 16480 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16627 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16481 | "2506 CQ_DESTROY mailbox failed with " | 16628 | "2506 CQ_DESTROY mailbox failed with " |
| 16482 | "status x%x add_status x%x, mbx status x%x\n", | 16629 | "status x%x add_status x%x, mbx status x%x\n", |
| 16483 | shdr_status, shdr_add_status, rc); | 16630 | shdr_status, shdr_add_status, rc); |
| @@ -16491,7 +16638,8 @@ lpfc_cq_destroy(struct lpfc_hba *phba, struct lpfc_queue *cq) · 7 unmodified lines | |||
| 16491 | 16638 | ||
| 16492 | /** | 16639 | /** |
| 16493 | * lpfc_mq_destroy - Destroy a Mailbox Queue on the HBA | 16640 | * lpfc_mq_destroy - Destroy a Mailbox Queue on the HBA |
| 16494 | * @qm: The queue structure associated with the queue to destroy. | 16641 | * @phba: HBA structure that indicates port to destroy a queue on. |
| 16642 | * @mq: The queue structure associated with the queue to destroy. | ||
| 16495 | * | 16643 | * |
| 16496 | * This function destroys a queue, as detailed in @mq by sending an mailbox | 16644 | * This function destroys a queue, as detailed in @mq by sending an mailbox |
| 16497 | * command, specific to the type of queue, to the HBA. | 16645 | * command, specific to the type of queue, to the HBA. |
| @@ -16531,7 +16679,7 @@ lpfc_mq_destroy(struct lpfc_hba *phba, struct lpfc_queue *mq) · 33 unmodified lines | |||
| 16531 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16679 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16532 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16680 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16533 | if (shdr_status || shdr_add_status || rc) { | 16681 | if (shdr_status || shdr_add_status || rc) { |
| 16534 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16682 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16535 | "2507 MQ_DESTROY mailbox failed with " | 16683 | "2507 MQ_DESTROY mailbox failed with " |
| 16536 | "status x%x add_status x%x, mbx status x%x\n", | 16684 | "status x%x add_status x%x, mbx status x%x\n", |
| 16537 | shdr_status, shdr_add_status, rc); | 16685 | shdr_status, shdr_add_status, rc); |
| @@ -16545,6 +16693,7 @@ lpfc_mq_destroy(struct lpfc_hba *phba, struct lpfc_queue *mq) · 7 unmodified lines | |||
| 16545 | 16693 | ||
| 16546 | /** | 16694 | /** |
| 16547 | * lpfc_wq_destroy - Destroy a Work Queue on the HBA | 16695 | * lpfc_wq_destroy - Destroy a Work Queue on the HBA |
| 16696 | * @phba: HBA structure that indicates port to destroy a queue on. | ||
| 16548 | * @wq: The queue structure associated with the queue to destroy. | 16697 | * @wq: The queue structure associated with the queue to destroy. |
| 16549 | * | 16698 | * |
| 16550 | * This function destroys a queue, as detailed in @wq by sending an mailbox | 16699 | * This function destroys a queue, as detailed in @wq by sending an mailbox |
| @@ -16584,7 +16733,7 @@ lpfc_wq_destroy(struct lpfc_hba *phba, struct lpfc_queue *wq) · 33 unmodified lines | |||
| 16584 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16733 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16585 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16734 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16586 | if (shdr_status || shdr_add_status || rc) { | 16735 | if (shdr_status || shdr_add_status || rc) { |
| 16587 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16736 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16588 | "2508 WQ_DESTROY mailbox failed with " | 16737 | "2508 WQ_DESTROY mailbox failed with " |
| 16589 | "status x%x add_status x%x, mbx status x%x\n", | 16738 | "status x%x add_status x%x, mbx status x%x\n", |
| 16590 | shdr_status, shdr_add_status, rc); | 16739 | shdr_status, shdr_add_status, rc); |
| @@ -16600,7 +16749,9 @@ lpfc_wq_destroy(struct lpfc_hba *phba, struct lpfc_queue *wq) · 9 unmodified lines | |||
| 16600 | 16749 | ||
| 16601 | /** | 16750 | /** |
| 16602 | * lpfc_rq_destroy - Destroy a Receive Queue on the HBA | 16751 | * lpfc_rq_destroy - Destroy a Receive Queue on the HBA |
| 16603 | * @rq: The queue structure associated with the queue to destroy. | 16752 | * @phba: HBA structure that indicates port to destroy a queue on. |
| 16753 | * @hrq: The queue structure associated with the queue to destroy. | ||
| 16754 | * @drq: The queue structure associated with the queue to destroy. | ||
| 16604 | * | 16755 | * |
| 16605 | * This function destroys a queue, as detailed in @rq by sending an mailbox | 16756 | * This function destroys a queue, as detailed in @rq by sending an mailbox |
| 16606 | * command, specific to the type of queue, to the HBA. | 16757 | * command, specific to the type of queue, to the HBA. |
| @@ -16641,7 +16792,7 @@ lpfc_rq_destroy(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 34 unmodified lines | |||
| 16641 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16792 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16642 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16793 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16643 | if (shdr_status || shdr_add_status || rc) { | 16794 | if (shdr_status || shdr_add_status || rc) { |
| 16644 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16795 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16645 | "2509 RQ_DESTROY mailbox failed with " | 16796 | "2509 RQ_DESTROY mailbox failed with " |
| 16646 | "status x%x add_status x%x, mbx status x%x\n", | 16797 | "status x%x add_status x%x, mbx status x%x\n", |
| 16647 | shdr_status, shdr_add_status, rc); | 16798 | shdr_status, shdr_add_status, rc); |
| @@ -16657,7 +16808,7 @@ lpfc_rq_destroy(struct lpfc_hba *phba, struct lpfc_queue *hrq, · 9 unmodified lines | |||
| 16657 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); | 16808 | shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response); |
| 16658 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); | 16809 | shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response); |
| 16659 | if (shdr_status || shdr_add_status || rc) { | 16810 | if (shdr_status || shdr_add_status || rc) { |
| 16660 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16811 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16661 | "2510 RQ_DESTROY mailbox failed with " | 16812 | "2510 RQ_DESTROY mailbox failed with " |
| 16662 | "status x%x add_status x%x, mbx status x%x\n", | 16813 | "status x%x add_status x%x, mbx status x%x\n", |
| 16663 | shdr_status, shdr_add_status, rc); | 16814 | shdr_status, shdr_add_status, rc); |
| @@ -16705,7 +16856,7 @@ lpfc_sli4_post_sgl(struct lpfc_hba *phba, · 41 unmodified lines | |||
| 16705 | union lpfc_sli4_cfg_shdr *shdr; | 16856 | union lpfc_sli4_cfg_shdr *shdr; |
| 16706 | 16857 | ||
| 16707 | if (xritag == NO_XRI) { | 16858 | if (xritag == NO_XRI) { |
| 16708 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 16859 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16709 | "0364 Invalid param:\n"); | 16860 | "0364 Invalid param:\n"); |
| 16710 | return -EINVAL; | 16861 | return -EINVAL; |
| 16711 | } | 16862 | } |
| @@ -16746,7 +16897,7 @@ lpfc_sli4_post_sgl(struct lpfc_hba *phba, · 34 unmodified lines | |||
| 16746 | if (rc != MBX_TIMEOUT) | 16897 | if (rc != MBX_TIMEOUT) |
| 16747 | mempool_free(mbox, phba->mbox_mem_pool); | 16898 | mempool_free(mbox, phba->mbox_mem_pool); |
| 16748 | if (shdr_status || shdr_add_status || rc) { | 16899 | if (shdr_status || shdr_add_status || rc) { |
| 16749 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 16900 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16750 | "2511 POST_SGL mailbox failed with " | 16901 | "2511 POST_SGL mailbox failed with " |
| 16751 | "status x%x add_status x%x, mbx status x%x\n", | 16902 | "status x%x add_status x%x, mbx status x%x\n", |
| 16752 | shdr_status, shdr_add_status, rc); | 16903 | shdr_status, shdr_add_status, rc); |
| @@ -16793,6 +16944,7 @@ lpfc_sli4_alloc_xri(struct lpfc_hba *phba) · 40 unmodified lines | |||
| 16793 | /** | 16944 | /** |
| 16794 | * lpfc_sli4_free_xri - Release an xri for reuse. | 16945 | * lpfc_sli4_free_xri - Release an xri for reuse. |
| 16795 | * @phba: pointer to lpfc hba data structure. | 16946 | * @phba: pointer to lpfc hba data structure. |
| 16947 | * @xri: xri to release. | ||
| 16796 | * | 16948 | * |
| 16797 | * This routine is invoked to release an xri to the pool of | 16949 | * This routine is invoked to release an xri to the pool of |
| 16798 | * available rpis maintained by the driver. | 16950 | * available rpis maintained by the driver. |
| @@ -16808,6 +16960,7 @@ __lpfc_sli4_free_xri(struct lpfc_hba *phba, int xri) · 9 unmodified lines | |||
| 16808 | /** | 16960 | /** |
| 16809 | * lpfc_sli4_free_xri - Release an xri for reuse. | 16961 | * lpfc_sli4_free_xri - Release an xri for reuse. |
| 16810 | * @phba: pointer to lpfc hba data structure. | 16962 | * @phba: pointer to lpfc hba data structure. |
| 16963 | * @xri: xri to release. | ||
| 16811 | * | 16964 | * |
| 16812 | * This routine is invoked to release an xri to the pool of | 16965 | * This routine is invoked to release an xri to the pool of |
| 16813 | * available rpis maintained by the driver. | 16966 | * available rpis maintained by the driver. |
| @@ -16850,7 +17003,7 @@ lpfc_sli4_next_xritag(struct lpfc_hba *phba) · 36 unmodified lines | |||
| 16850 | * lpfc_sli4_post_sgl_list - post a block of ELS sgls to the port. | 17003 | * lpfc_sli4_post_sgl_list - post a block of ELS sgls to the port. |
| 16851 | * @phba: pointer to lpfc hba data structure. | 17004 | * @phba: pointer to lpfc hba data structure. |
| 16852 | * @post_sgl_list: pointer to els sgl entry list. | 17005 | * @post_sgl_list: pointer to els sgl entry list. |
| 16853 | * @count: number of els sgl entries on the list. | 17006 | * @post_cnt: number of els sgl entries on the list. |
| 16854 | * | 17007 | * |
| 16855 | * This routine is invoked to post a block of driver's sgl pages to the | 17008 | * This routine is invoked to post a block of driver's sgl pages to the |
| 16856 | * HBA using non-embedded mailbox command. No Lock is held. This routine | 17009 | * HBA using non-embedded mailbox command. No Lock is held. This routine |
| @@ -16877,7 +17030,7 @@ lpfc_sli4_post_sgl_list(struct lpfc_hba *phba, · 20 unmodified lines | |||
| 16877 | reqlen = post_cnt * sizeof(struct sgl_page_pairs) + | 17030 | reqlen = post_cnt * sizeof(struct sgl_page_pairs) + |
| 16878 | sizeof(union lpfc_sli4_cfg_shdr) + sizeof(uint32_t); | 17031 | sizeof(union lpfc_sli4_cfg_shdr) + sizeof(uint32_t); |
| 16879 | if (reqlen > SLI4_PAGE_SIZE) { | 17032 | if (reqlen > SLI4_PAGE_SIZE) { |
| 16880 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 17033 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16881 | "2559 Block sgl registration required DMA " | 17034 | "2559 Block sgl registration required DMA " |
| 16882 | "size (%d) great than a page\n", reqlen); | 17035 | "size (%d) great than a page\n", reqlen); |
| 16883 | return -ENOMEM; | 17036 | return -ENOMEM; |
| @@ -16893,7 +17046,7 @@ lpfc_sli4_post_sgl_list(struct lpfc_hba *phba, · 9 unmodified lines | |||
| 16893 | LPFC_SLI4_MBX_NEMBED); | 17046 | LPFC_SLI4_MBX_NEMBED); |
| 16894 | 17047 | ||
| 16895 | if (alloclen < reqlen) { | 17048 | if (alloclen < reqlen) { |
| 16896 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 17049 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16897 | "0285 Allocated DMA memory size (%d) is " | 17050 | "0285 Allocated DMA memory size (%d) is " |
| 16898 | "less than the requested DMA memory " | 17051 | "less than the requested DMA memory " |
| 16899 | "size (%d)\n", alloclen, reqlen); | 17052 | "size (%d)\n", alloclen, reqlen); |
| @@ -16941,7 +17094,7 @@ lpfc_sli4_post_sgl_list(struct lpfc_hba *phba, · 41 unmodified lines | |||
| 16941 | if (rc != MBX_TIMEOUT) | 17094 | if (rc != MBX_TIMEOUT) |
| 16942 | lpfc_sli4_mbox_cmd_free(phba, mbox); | 17095 | lpfc_sli4_mbox_cmd_free(phba, mbox); |
| 16943 | if (shdr_status || shdr_add_status || rc) { | 17096 | if (shdr_status || shdr_add_status || rc) { |
| 16944 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 17097 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16945 | "2513 POST_SGL_BLOCK mailbox command failed " | 17098 | "2513 POST_SGL_BLOCK mailbox command failed " |
| 16946 | "status x%x add_status x%x mbx status x%x\n", | 17099 | "status x%x add_status x%x mbx status x%x\n", |
| 16947 | shdr_status, shdr_add_status, rc); | 17100 | shdr_status, shdr_add_status, rc); |
| @@ -16989,7 +17142,7 @@ lpfc_sli4_post_io_sgl_block(struct lpfc_hba *phba, struct list_head *nblist, · 41 unmodified lines | |||
| 16989 | } | 17142 | } |
| 16990 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 17143 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 16991 | if (!mbox) { | 17144 | if (!mbox) { |
| 16992 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 17145 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 16993 | "6119 Failed to allocate mbox cmd memory\n"); | 17146 | "6119 Failed to allocate mbox cmd memory\n"); |
| 16994 | return -ENOMEM; | 17147 | return -ENOMEM; |
| 16995 | } | 17148 | } |
| @@ -17000,7 +17153,7 @@ lpfc_sli4_post_io_sgl_block(struct lpfc_hba *phba, struct list_head *nblist, · 4 unmodified lines | |||
| 17000 | reqlen, LPFC_SLI4_MBX_NEMBED); | 17153 | reqlen, LPFC_SLI4_MBX_NEMBED); |
| 17001 | 17154 | ||
| 17002 | if (alloclen < reqlen) { | 17155 | if (alloclen < reqlen) { |
| 17003 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 17156 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 17004 | "6120 Allocated DMA memory size (%d) is " | 17157 | "6120 Allocated DMA memory size (%d) is " |
| 17005 | "less than the requested DMA memory " | 17158 | "less than the requested DMA memory " |
| 17006 | "size (%d)\n", alloclen, reqlen); | 17159 | "size (%d)\n", alloclen, reqlen); |
| @@ -17054,7 +17207,7 @@ lpfc_sli4_post_io_sgl_block(struct lpfc_hba *phba, struct list_head *nblist, · 47 unmodified lines | |||
| 17054 | if (rc != MBX_TIMEOUT) | 17207 | if (rc != MBX_TIMEOUT) |
| 17055 | lpfc_sli4_mbox_cmd_free(phba, mbox); | 17208 | lpfc_sli4_mbox_cmd_free(phba, mbox); |
| 17056 | if (shdr_status || shdr_add_status || rc) { | 17209 | if (shdr_status || shdr_add_status || rc) { |
| 17057 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 17210 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 17058 | "6125 POST_SGL_BLOCK mailbox command failed " | 17211 | "6125 POST_SGL_BLOCK mailbox command failed " |
| 17059 | "status x%x add_status x%x mbx status x%x\n", | 17212 | "status x%x add_status x%x mbx status x%x\n", |
| 17060 | shdr_status, shdr_add_status, rc); | 17213 | shdr_status, shdr_add_status, rc); |
| @@ -17067,6 +17220,7 @@ lpfc_sli4_post_io_sgl_block(struct lpfc_hba *phba, struct list_head *nblist, · 6 unmodified lines | |||
| 17067 | * lpfc_sli4_post_io_sgl_list - Post blocks of nvme buffer sgls from a list | 17220 | * lpfc_sli4_post_io_sgl_list - Post blocks of nvme buffer sgls from a list |
| 17068 | * @phba: pointer to lpfc hba data structure. | 17221 | * @phba: pointer to lpfc hba data structure. |
| 17069 | * @post_nblist: pointer to the nvme buffer list. | 17222 | * @post_nblist: pointer to the nvme buffer list. |
| 17223 | * @sb_count: number of nvme buffers. | ||
| 17070 | * | 17224 | * |
| 17071 | * This routine walks a list of nvme buffers that was passed in. It attempts | 17225 | * This routine walks a list of nvme buffers that was passed in. It attempts |
| 17072 | * to construct blocks of nvme buffer sgls which contains contiguous xris and | 17226 | * to construct blocks of nvme buffer sgls which contains contiguous xris and |
| @@ -17300,6 +17454,7 @@ lpfc_fc_hdr_get_vfi(struct fc_frame_header *fc_hdr) · 227 unmodified lines | |||
| 17300 | * @phba: Pointer to the HBA structure to search for the vport on | 17454 | * @phba: Pointer to the HBA structure to search for the vport on |
| 17301 | * @fc_hdr: A pointer to the FC Header data (In Big Endian Format) | 17455 | * @fc_hdr: A pointer to the FC Header data (In Big Endian Format) |
| 17302 | * @fcfi: The FC Fabric ID that the frame came from | 17456 | * @fcfi: The FC Fabric ID that the frame came from |
| 17457 | * @did: Destination ID to match against | ||
| 17303 | * | 17458 | * |
| 17304 | * This function searches the @phba for a vport that matches the content of the | 17459 | * This function searches the @phba for a vport that matches the content of the |
| 17305 | * @fc_hdr passed in and the @fcfi. This function uses the @fc_hdr to fetch the | 17460 | * @fc_hdr passed in and the @fcfi. This function uses the @fc_hdr to fetch the |
| @@ -17437,6 +17592,7 @@ lpfc_rcv_seq_check_edtov(struct lpfc_vport *vport) · 131 unmodified lines | |||
| 17437 | 17592 | ||
| 17438 | /** | 17593 | /** |
| 17439 | * lpfc_fc_frame_add - Adds a frame to the vport's list of received sequences | 17594 | * lpfc_fc_frame_add - Adds a frame to the vport's list of received sequences |
| 17595 | * @vport: pointer to a vitural port | ||
| 17440 | * @dmabuf: pointer to a dmabuf that describes the hdr and data of the FC frame | 17596 | * @dmabuf: pointer to a dmabuf that describes the hdr and data of the FC frame |
| 17441 | * | 17597 | * |
| 17442 | * This function searches through the existing incomplete sequences that have | 17598 | * This function searches through the existing incomplete sequences that have |
| @@ -17638,7 +17794,7 @@ lpfc_sli4_seq_abort_rsp_cmpl(struct lpfc_hba *phba, · 195 unmodified lines | |||
| 17638 | 17794 | ||
| 17639 | /* Failure means BLS ABORT RSP did not get delivered to remote node*/ | 17795 | /* Failure means BLS ABORT RSP did not get delivered to remote node*/ |
| 17640 | if (rsp_iocbq && rsp_iocbq->iocb.ulpStatus) | 17796 | if (rsp_iocbq && rsp_iocbq->iocb.ulpStatus) |
| 17641 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 17797 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 17642 | "3154 BLS ABORT RSP failed, data: x%x/x%x\n", | 17798 | "3154 BLS ABORT RSP failed, data: x%x/x%x\n", |
| 17643 | rsp_iocbq->iocb.ulpStatus, | 17799 | rsp_iocbq->iocb.ulpStatus, |
| 17644 | rsp_iocbq->iocb.un.ulpWord[4]); | 17800 | rsp_iocbq->iocb.un.ulpWord[4]); |
| @@ -17667,8 +17823,9 @@ lpfc_sli4_xri_inrange(struct lpfc_hba *phba, · 22 unmodified lines | |||
| 17667 | 17823 | ||
| 17668 | /** | 17824 | /** |
| 17669 | * lpfc_sli4_seq_abort_rsp - bls rsp to sequence abort | 17825 | * lpfc_sli4_seq_abort_rsp - bls rsp to sequence abort |
| 17670 | * @phba: Pointer to HBA context object. | 17826 | * @vport: pointer to a vitural port. |
| 17671 | * @fc_hdr: pointer to a FC frame header. | 17827 | * @fc_hdr: pointer to a FC frame header. |
| 17828 | * @aborted: was the partially assembled receive sequence successfully aborted | ||
| 17672 | * | 17829 | * |
| 17673 | * This function sends a basic response to a previous unsol sequence abort | 17830 | * This function sends a basic response to a previous unsol sequence abort |
| 17674 | * event after aborting the sequence handling. | 17831 | * event after aborting the sequence handling. |
| @@ -17800,7 +17957,7 @@ lpfc_sli4_seq_abort_rsp(struct lpfc_vport *vport, · 125 unmodified lines | |||
| 17800 | 17957 | ||
| 17801 | rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, ctiocb, 0); | 17958 | rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, ctiocb, 0); |
| 17802 | if (rc == IOCB_ERROR) { | 17959 | if (rc == IOCB_ERROR) { |
| 17803 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 17960 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 17804 | "2925 Failed to issue CT ABTS RSP x%x on " | 17961 | "2925 Failed to issue CT ABTS RSP x%x on " |
| 17805 | "xri x%x, Data x%x\n", | 17962 | "xri x%x, Data x%x\n", |
| 17806 | icmd->un.xseq64.w5.hcsw.Rctl, oxid, | 17963 | icmd->un.xseq64.w5.hcsw.Rctl, oxid, |
| @@ -17820,7 +17977,7 @@ lpfc_sli4_seq_abort_rsp(struct lpfc_vport *vport, · 13 unmodified lines | |||
| 17820 | * receive sequence is only partially assembed by the driver, it shall abort | 17977 | * receive sequence is only partially assembed by the driver, it shall abort |
| 17821 | * the partially assembled frames for the sequence. Otherwise, if the | 17978 | * the partially assembled frames for the sequence. Otherwise, if the |
| 17822 | * unsolicited receive sequence has been completely assembled and passed to | 17979 | * unsolicited receive sequence has been completely assembled and passed to |
| 17823 | * the Upper Layer Protocol (UPL), it then mark the per oxid status for the | 17980 | * the Upper Layer Protocol (ULP), it then mark the per oxid status for the |
| 17824 | * unsolicited sequence has been aborted. After that, it will issue a basic | 17981 | * unsolicited sequence has been aborted. After that, it will issue a basic |
| 17825 | * accept to accept the abort. | 17982 | * accept to accept the abort. |
| 17826 | **/ | 17983 | **/ |
| @@ -17907,7 +18064,7 @@ lpfc_seq_complete(struct hbq_dmabuf *dmabuf) · 80 unmodified lines | |||
| 17907 | /** | 18064 | /** |
| 17908 | * lpfc_prep_seq - Prep sequence for ULP processing | 18065 | * lpfc_prep_seq - Prep sequence for ULP processing |
| 17909 | * @vport: Pointer to the vport on which this sequence was received | 18066 | * @vport: Pointer to the vport on which this sequence was received |
| 17910 | * @dmabuf: pointer to a dmabuf that describes the FC sequence | 18067 | * @seq_dmabuf: pointer to a dmabuf that describes the FC sequence |
| 17911 | * | 18068 | * |
| 17912 | * This function takes a sequence, described by a list of frames, and creates | 18069 | * This function takes a sequence, described by a list of frames, and creates |
| 17913 | * a list of iocbq structures to describe the sequence. This iocbq list will be | 18070 | * a list of iocbq structures to describe the sequence. This iocbq list will be |
| @@ -18050,7 +18207,7 @@ lpfc_sli4_send_seq_to_ulp(struct lpfc_vport *vport, · 136 unmodified lines | |||
| 18050 | fc_hdr = (struct fc_frame_header *)seq_dmabuf->hbuf.virt; | 18207 | fc_hdr = (struct fc_frame_header *)seq_dmabuf->hbuf.virt; |
| 18051 | iocbq = lpfc_prep_seq(vport, seq_dmabuf); | 18208 | iocbq = lpfc_prep_seq(vport, seq_dmabuf); |
| 18052 | if (!iocbq) { | 18209 | if (!iocbq) { |
| 18053 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 18210 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18054 | "2707 Ring %d handler: Failed to allocate " | 18211 | "2707 Ring %d handler: Failed to allocate " |
| 18055 | "iocb Rctl x%x Type x%x received\n", | 18212 | "iocb Rctl x%x Type x%x received\n", |
| 18056 | LPFC_ELS_RING, | 18213 | LPFC_ELS_RING, |
| @@ -18061,7 +18218,7 @@ lpfc_sli4_send_seq_to_ulp(struct lpfc_vport *vport, · 4 unmodified lines | |||
| 18061 | phba->sli4_hba.els_wq->pring, | 18218 | phba->sli4_hba.els_wq->pring, |
| 18062 | iocbq, fc_hdr->fh_r_ctl, | 18219 | iocbq, fc_hdr->fh_r_ctl, |
| 18063 | fc_hdr->fh_type)) | 18220 | fc_hdr->fh_type)) |
| 18064 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 18221 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18065 | "2540 Ring %d handler: unexpected Rctl " | 18222 | "2540 Ring %d handler: unexpected Rctl " |
| 18066 | "x%x Type x%x received\n", | 18223 | "x%x Type x%x received\n", |
| 18067 | LPFC_ELS_RING, | 18224 | LPFC_ELS_RING, |
| @@ -18180,6 +18337,7 @@ exit: · 112 unmodified lines | |||
| 18180 | /** | 18337 | /** |
| 18181 | * lpfc_sli4_handle_received_buffer - Handle received buffers from firmware | 18338 | * lpfc_sli4_handle_received_buffer - Handle received buffers from firmware |
| 18182 | * @phba: Pointer to HBA context object. | 18339 | * @phba: Pointer to HBA context object. |
| 18340 | * @dmabuf: Pointer to a dmabuf that describes the FC sequence. | ||
| 18183 | * | 18341 | * |
| 18184 | * This function is called with no lock held. This function processes all | 18342 | * This function is called with no lock held. This function processes all |
| 18185 | * the received buffers and gives it to upper layers when a received buffer | 18343 | * the received buffers and gives it to upper layers when a received buffer |
| @@ -18326,7 +18484,7 @@ lpfc_sli4_post_all_rpi_hdrs(struct lpfc_hba *phba) · 140 unmodified lines | |||
| 18326 | 18484 | ||
| 18327 | rc = lpfc_sli4_post_rpi_hdr(phba, rpi_page); | 18485 | rc = lpfc_sli4_post_rpi_hdr(phba, rpi_page); |
| 18328 | if (rc != MBX_SUCCESS) { | 18486 | if (rc != MBX_SUCCESS) { |
| 18329 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 18487 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18330 | "2008 Error %d posting all rpi " | 18488 | "2008 Error %d posting all rpi " |
| 18331 | "headers\n", rc); | 18489 | "headers\n", rc); |
| 18332 | rc = -EIO; | 18490 | rc = -EIO; |
| @@ -18372,7 +18530,7 @@ lpfc_sli4_post_rpi_hdr(struct lpfc_hba *phba, struct lpfc_rpi_hdr *rpi_page) · 39 unmodified lines | |||
| 18372 | /* The port is notified of the header region via a mailbox command. */ | 18530 | /* The port is notified of the header region via a mailbox command. */ |
| 18373 | mboxq = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 18531 | mboxq = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 18374 | if (!mboxq) { | 18532 | if (!mboxq) { |
| 18375 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 18533 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18376 | "2001 Unable to allocate memory for issuing " | 18534 | "2001 Unable to allocate memory for issuing " |
| 18377 | "SLI_CONFIG_SPECIAL mailbox command\n"); | 18535 | "SLI_CONFIG_SPECIAL mailbox command\n"); |
| 18378 | return -ENOMEM; | 18536 | return -ENOMEM; |
| @@ -18402,7 +18560,7 @@ lpfc_sli4_post_rpi_hdr(struct lpfc_hba *phba, struct lpfc_rpi_hdr *rpi_page) · 23 unmodified lines | |||
| 18402 | if (rc != MBX_TIMEOUT) | 18560 | if (rc != MBX_TIMEOUT) |
| 18403 | mempool_free(mboxq, phba->mbox_mem_pool); | 18561 | mempool_free(mboxq, phba->mbox_mem_pool); |
| 18404 | if (shdr_status || shdr_add_status || rc) { | 18562 | if (shdr_status || shdr_add_status || rc) { |
| 18405 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 18563 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18406 | "2514 POST_RPI_HDR mailbox failed with " | 18564 | "2514 POST_RPI_HDR mailbox failed with " |
| 18407 | "status x%x add_status x%x, mbx status x%x\n", | 18565 | "status x%x add_status x%x, mbx status x%x\n", |
| 18408 | shdr_status, shdr_add_status, rc); | 18566 | shdr_status, shdr_add_status, rc); |
| @@ -18492,7 +18650,7 @@ lpfc_sli4_alloc_rpi(struct lpfc_hba *phba) · 83 unmodified lines | |||
| 18492 | if (rpi_remaining < LPFC_RPI_LOW_WATER_MARK) { | 18650 | if (rpi_remaining < LPFC_RPI_LOW_WATER_MARK) { |
| 18493 | rpi_hdr = lpfc_sli4_create_rpi_hdr(phba); | 18651 | rpi_hdr = lpfc_sli4_create_rpi_hdr(phba); |
| 18494 | if (!rpi_hdr) { | 18652 | if (!rpi_hdr) { |
| 18495 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 18653 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18496 | "2002 Error Could not grow rpi " | 18654 | "2002 Error Could not grow rpi " |
| 18497 | "count\n"); | 18655 | "count\n"); |
| 18498 | } else { | 18656 | } else { |
| @@ -18508,6 +18666,7 @@ lpfc_sli4_alloc_rpi(struct lpfc_hba *phba) · 9 unmodified lines | |||
| 18508 | /** | 18666 | /** |
| 18509 | * lpfc_sli4_free_rpi - Release an rpi for reuse. | 18667 | * lpfc_sli4_free_rpi - Release an rpi for reuse. |
| 18510 | * @phba: pointer to lpfc hba data structure. | 18668 | * @phba: pointer to lpfc hba data structure. |
| 18669 | * @rpi: rpi to free | ||
| 18511 | * | 18670 | * |
| 18512 | * This routine is invoked to release an rpi to the pool of | 18671 | * This routine is invoked to release an rpi to the pool of |
| 18513 | * available rpis maintained by the driver. | 18672 | * available rpis maintained by the driver. |
| @@ -18536,6 +18695,7 @@ __lpfc_sli4_free_rpi(struct lpfc_hba *phba, int rpi) · 22 unmodified lines | |||
| 18536 | /** | 18695 | /** |
| 18537 | * lpfc_sli4_free_rpi - Release an rpi for reuse. | 18696 | * lpfc_sli4_free_rpi - Release an rpi for reuse. |
| 18538 | * @phba: pointer to lpfc hba data structure. | 18697 | * @phba: pointer to lpfc hba data structure. |
| 18698 | * @rpi: rpi to free | ||
| 18539 | * | 18699 | * |
| 18540 | * This routine is invoked to release an rpi to the pool of | 18700 | * This routine is invoked to release an rpi to the pool of |
| 18541 | * available rpis maintained by the driver. | 18701 | * available rpis maintained by the driver. |
| @@ -18565,7 +18725,9 @@ lpfc_sli4_remove_rpis(struct lpfc_hba *phba) · 23 unmodified lines | |||
| 18565 | 18725 | ||
| 18566 | /** | 18726 | /** |
| 18567 | * lpfc_sli4_resume_rpi - Remove the rpi bitmask region | 18727 | * lpfc_sli4_resume_rpi - Remove the rpi bitmask region |
| 18568 | * @phba: pointer to lpfc hba data structure. | 18728 | * @ndlp: pointer to lpfc nodelist data structure. |
| 18729 | * @cmpl: completion call-back. | ||
| 18730 | * @arg: data to load as MBox 'caller buffer information' | ||
| 18569 | * | 18731 | * |
| 18570 | * This routine is invoked to remove the memory region that | 18732 | * This routine is invoked to remove the memory region that |
| 18571 | * provided rpi via a bitmask. | 18733 | * provided rpi via a bitmask. |
| @@ -18594,7 +18756,7 @@ lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp, · 22 unmodified lines | |||
| 18594 | mboxq->vport = ndlp->vport; | 18756 | mboxq->vport = ndlp->vport; |
| 18595 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); | 18757 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); |
| 18596 | if (rc == MBX_NOT_FINISHED) { | 18758 | if (rc == MBX_NOT_FINISHED) { |
| 18597 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 18759 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18598 | "2010 Resume RPI Mailbox failed " | 18760 | "2010 Resume RPI Mailbox failed " |
| 18599 | "status %d, mbxStatus x%x\n", rc, | 18761 | "status %d, mbxStatus x%x\n", rc, |
| 18600 | bf_get(lpfc_mqe_status, &mboxq->u.mqe)); | 18762 | bf_get(lpfc_mqe_status, &mboxq->u.mqe)); |
| @@ -18629,7 +18791,7 @@ lpfc_sli4_init_vpi(struct lpfc_vport *vport) · 28 unmodified lines | |||
| 18629 | mbox_tmo = lpfc_mbox_tmo_val(phba, mboxq); | 18791 | mbox_tmo = lpfc_mbox_tmo_val(phba, mboxq); |
| 18630 | rc = lpfc_sli_issue_mbox_wait(phba, mboxq, mbox_tmo); | 18792 | rc = lpfc_sli_issue_mbox_wait(phba, mboxq, mbox_tmo); |
| 18631 | if (rc != MBX_SUCCESS) { | 18793 | if (rc != MBX_SUCCESS) { |
| 18632 | lpfc_printf_vlog(vport, KERN_ERR, LOG_SLI, | 18794 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 18633 | "2022 INIT VPI Mailbox failed " | 18795 | "2022 INIT VPI Mailbox failed " |
| 18634 | "status %d, mbxStatus x%x\n", rc, | 18796 | "status %d, mbxStatus x%x\n", rc, |
| 18635 | bf_get(lpfc_mqe_status, &mboxq->u.mqe)); | 18797 | bf_get(lpfc_mqe_status, &mboxq->u.mqe)); |
| @@ -18665,7 +18827,7 @@ lpfc_mbx_cmpl_add_fcf_record(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq) · 29 unmodified lines | |||
| 18665 | 18827 | ||
| 18666 | if ((shdr_status || shdr_add_status) && | 18828 | if ((shdr_status || shdr_add_status) && |
| 18667 | (shdr_status != STATUS_FCF_IN_USE)) | 18829 | (shdr_status != STATUS_FCF_IN_USE)) |
| 18668 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 18830 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18669 | "2558 ADD_FCF_RECORD mailbox failed with " | 18831 | "2558 ADD_FCF_RECORD mailbox failed with " |
| 18670 | "status x%x add_status x%x\n", | 18832 | "status x%x add_status x%x\n", |
| 18671 | shdr_status, shdr_add_status); | 18833 | shdr_status, shdr_add_status); |
| @@ -18695,7 +18857,7 @@ lpfc_sli4_add_fcf_record(struct lpfc_hba *phba, struct fcf_record *fcf_record) · 23 unmodified lines | |||
| 18695 | 18857 | ||
| 18696 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 18858 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 18697 | if (!mboxq) { | 18859 | if (!mboxq) { |
| 18698 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 18860 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18699 | "2009 Failed to allocate mbox for ADD_FCF cmd\n"); | 18861 | "2009 Failed to allocate mbox for ADD_FCF cmd\n"); |
| 18700 | return -ENOMEM; | 18862 | return -ENOMEM; |
| 18701 | } | 18863 | } |
| @@ -18708,7 +18870,7 @@ lpfc_sli4_add_fcf_record(struct lpfc_hba *phba, struct fcf_record *fcf_record) · 6 unmodified lines | |||
| 18708 | LPFC_MBOX_OPCODE_FCOE_ADD_FCF, | 18870 | LPFC_MBOX_OPCODE_FCOE_ADD_FCF, |
| 18709 | req_len, LPFC_SLI4_MBX_NEMBED); | 18871 | req_len, LPFC_SLI4_MBX_NEMBED); |
| 18710 | if (alloc_len < req_len) { | 18872 | if (alloc_len < req_len) { |
| 18711 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 18873 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18712 | "2523 Allocated DMA memory size (x%x) is " | 18874 | "2523 Allocated DMA memory size (x%x) is " |
| 18713 | "less than the requested DMA memory " | 18875 | "less than the requested DMA memory " |
| 18714 | "size (x%x)\n", alloc_len, req_len); | 18876 | "size (x%x)\n", alloc_len, req_len); |
| @@ -18741,7 +18903,7 @@ lpfc_sli4_add_fcf_record(struct lpfc_hba *phba, struct fcf_record *fcf_record) · 26 unmodified lines | |||
| 18741 | mboxq->mbox_cmpl = lpfc_mbx_cmpl_add_fcf_record; | 18903 | mboxq->mbox_cmpl = lpfc_mbx_cmpl_add_fcf_record; |
| 18742 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); | 18904 | rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT); |
| 18743 | if (rc == MBX_NOT_FINISHED) { | 18905 | if (rc == MBX_NOT_FINISHED) { |
| 18744 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 18906 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18745 | "2515 ADD_FCF_RECORD mailbox failed with " | 18907 | "2515 ADD_FCF_RECORD mailbox failed with " |
| 18746 | "status 0x%x\n", rc); | 18908 | "status 0x%x\n", rc); |
| 18747 | lpfc_sli4_mbox_cmd_free(phba, mboxq); | 18909 | lpfc_sli4_mbox_cmd_free(phba, mboxq); |
| @@ -18814,7 +18976,7 @@ lpfc_sli4_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, uint16_t fcf_index) · 66 unmodified lines | |||
| 18814 | phba->fcoe_cvl_eventtag_attn = phba->fcoe_cvl_eventtag; | 18976 | phba->fcoe_cvl_eventtag_attn = phba->fcoe_cvl_eventtag; |
| 18815 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 18977 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 18816 | if (!mboxq) { | 18978 | if (!mboxq) { |
| 18817 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 18979 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 18818 | "2000 Failed to allocate mbox for " | 18980 | "2000 Failed to allocate mbox for " |
| 18819 | "READ_FCF cmd\n"); | 18981 | "READ_FCF cmd\n"); |
| 18820 | error = -ENOMEM; | 18982 | error = -ENOMEM; |
| @@ -18949,7 +19111,7 @@ fail_fcf_read: · 128 unmodified lines | |||
| 18949 | 19111 | ||
| 18950 | /** | 19112 | /** |
| 18951 | * lpfc_check_next_fcf_pri_level | 19113 | * lpfc_check_next_fcf_pri_level |
| 18952 | * phba pointer to the lpfc_hba struct for this port. | 19114 | * @phba: pointer to the lpfc_hba struct for this port. |
| 18953 | * This routine is called from the lpfc_sli4_fcf_rr_next_index_get | 19115 | * This routine is called from the lpfc_sli4_fcf_rr_next_index_get |
| 18954 | * routine when the rr_bmask is empty. The FCF indecies are put into the | 19116 | * routine when the rr_bmask is empty. The FCF indecies are put into the |
| 18955 | * rr_bmask based on their priority level. Starting from the highest priority | 19117 | * rr_bmask based on their priority level. Starting from the highest priority |
| @@ -19114,6 +19276,7 @@ next_priority: · 158 unmodified lines | |||
| 19114 | /** | 19276 | /** |
| 19115 | * lpfc_sli4_fcf_rr_index_set - Set bmask with eligible fcf record index | 19277 | * lpfc_sli4_fcf_rr_index_set - Set bmask with eligible fcf record index |
| 19116 | * @phba: pointer to lpfc hba data structure. | 19278 | * @phba: pointer to lpfc hba data structure. |
| 19279 | * @fcf_index: index into the FCF table to 'set' | ||
| 19117 | * | 19280 | * |
| 19118 | * This routine sets the FCF record index in to the eligible bmask for | 19281 | * This routine sets the FCF record index in to the eligible bmask for |
| 19119 | * roundrobin failover search. It checks to make sure that the index | 19282 | * roundrobin failover search. It checks to make sure that the index |
| @@ -19146,6 +19309,7 @@ lpfc_sli4_fcf_rr_index_set(struct lpfc_hba *phba, uint16_t fcf_index) · 26 unmodified lines | |||
| 19146 | /** | 19309 | /** |
| 19147 | * lpfc_sli4_fcf_rr_index_clear - Clear bmask from eligible fcf record index | 19310 | * lpfc_sli4_fcf_rr_index_clear - Clear bmask from eligible fcf record index |
| 19148 | * @phba: pointer to lpfc hba data structure. | 19311 | * @phba: pointer to lpfc hba data structure. |
| 19312 | * @fcf_index: index into the FCF table to 'clear' | ||
| 19149 | * | 19313 | * |
| 19150 | * This routine clears the FCF record index from the eligible bmask for | 19314 | * This routine clears the FCF record index from the eligible bmask for |
| 19151 | * roundrobin failover search. It checks to make sure that the index | 19315 | * roundrobin failover search. It checks to make sure that the index |
| @@ -19183,6 +19347,7 @@ lpfc_sli4_fcf_rr_index_clear(struct lpfc_hba *phba, uint16_t fcf_index) · 31 unmodified lines | |||
| 19183 | /** | 19347 | /** |
| 19184 | * lpfc_mbx_cmpl_redisc_fcf_table - completion routine for rediscover FCF table | 19348 | * lpfc_mbx_cmpl_redisc_fcf_table - completion routine for rediscover FCF table |
| 19185 | * @phba: pointer to lpfc hba data structure. | 19349 | * @phba: pointer to lpfc hba data structure. |
| 19350 | * @mbox: An allocated pointer to type LPFC_MBOXQ_t | ||
| 19186 | * | 19351 | * |
| 19187 | * This routine is the completion routine for the rediscover FCF table mailbox | 19352 | * This routine is the completion routine for the rediscover FCF table mailbox |
| 19188 | * command. If the mailbox command returned failure, it will try to stop the | 19353 | * command. If the mailbox command returned failure, it will try to stop the |
| @@ -19257,7 +19422,7 @@ lpfc_sli4_redisc_fcf_table(struct lpfc_hba *phba) · 68 unmodified lines | |||
| 19257 | 19422 | ||
| 19258 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 19423 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 19259 | if (!mbox) { | 19424 | if (!mbox) { |
| 19260 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 19425 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19261 | "2745 Failed to allocate mbox for " | 19426 | "2745 Failed to allocate mbox for " |
| 19262 | "requesting FCF rediscover.\n"); | 19427 | "requesting FCF rediscover.\n"); |
| 19263 | return -ENOMEM; | 19428 | return -ENOMEM; |
| @@ -19325,14 +19490,14 @@ lpfc_sli_get_config_region23(struct lpfc_hba *phba, char *rgn23_data) · 61 unmodified lines | |||
| 19325 | LPFC_MBOXQ_t *pmb = NULL; | 19490 | LPFC_MBOXQ_t *pmb = NULL; |
| 19326 | MAILBOX_t *mb; | 19491 | MAILBOX_t *mb; |
| 19327 | uint32_t offset = 0; | 19492 | uint32_t offset = 0; |
| 19328 | int rc; | 19493 | int i, rc; |
| 19329 | 19494 | ||
| 19330 | if (!rgn23_data) | 19495 | if (!rgn23_data) |
| 19331 | return 0; | 19496 | return 0; |
| 19332 | 19497 | ||
| 19333 | pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 19498 | pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 19334 | if (!pmb) { | 19499 | if (!pmb) { |
| 19335 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 19500 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19336 | "2600 failed to allocate mailbox memory\n"); | 19501 | "2600 failed to allocate mailbox memory\n"); |
| 19337 | return 0; | 19502 | return 0; |
| 19338 | } | 19503 | } |
| @@ -19355,14 +19520,14 @@ lpfc_sli_get_config_region23(struct lpfc_hba *phba, char *rgn23_data) · 16 unmodified lines | |||
| 19355 | */ | 19520 | */ |
| 19356 | if (mb->un.varDmp.word_cnt == 0) | 19521 | if (mb->un.varDmp.word_cnt == 0) |
| 19357 | break; | 19522 | break; |
| 19358 | if (mb->un.varDmp.word_cnt > DMP_RGN23_SIZE - offset) | ||
| 19359 | mb->un.varDmp.word_cnt = DMP_RGN23_SIZE - offset; | ||
| 19360 | 19523 | ||
| 19524 | i = mb->un.varDmp.word_cnt * sizeof(uint32_t); | ||
| 19525 | if (offset + i > DMP_RGN23_SIZE) | ||
| 19526 | i = DMP_RGN23_SIZE - offset; | ||
| 19361 | lpfc_sli_pcimem_bcopy(((uint8_t *)mb) + DMP_RSP_OFFSET, | 19527 | lpfc_sli_pcimem_bcopy(((uint8_t *)mb) + DMP_RSP_OFFSET, |
| 19362 | rgn23_data + offset, | 19528 | rgn23_data + offset, i); |
| 19363 | mb->un.varDmp.word_cnt); | 19529 | offset += i; |
| 19364 | offset += mb->un.varDmp.word_cnt; | 19530 | } while (offset < DMP_RGN23_SIZE); |
| 19365 | } while (mb->un.varDmp.word_cnt && offset < DMP_RGN23_SIZE); | ||
| 19366 | 19531 | ||
| 19367 | mempool_free(pmb, phba->mbox_mem_pool); | 19532 | mempool_free(pmb, phba->mbox_mem_pool); |
| 19368 | return offset; | 19533 | return offset; |
| @@ -19391,7 +19556,7 @@ lpfc_sli4_get_config_region23(struct lpfc_hba *phba, char *rgn23_data) · 22 unmodified lines | |||
| 19391 | 19556 | ||
| 19392 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 19557 | mboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
| 19393 | if (!mboxq) { | 19558 | if (!mboxq) { |
| 19394 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 19559 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19395 | "3105 failed to allocate mailbox memory\n"); | 19560 | "3105 failed to allocate mailbox memory\n"); |
| 19396 | return 0; | 19561 | return 0; |
| 19397 | } | 19562 | } |
| @@ -19455,7 +19620,7 @@ lpfc_sli_read_link_ste(struct lpfc_hba *phba) · 57 unmodified lines | |||
| 19455 | 19620 | ||
| 19456 | /* Check the region signature first */ | 19621 | /* Check the region signature first */ |
| 19457 | if (memcmp(&rgn23_data[offset], LPFC_REGION23_SIGNATURE, 4)) { | 19622 | if (memcmp(&rgn23_data[offset], LPFC_REGION23_SIGNATURE, 4)) { |
| 19458 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 19623 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19459 | "2619 Config region 23 has bad signature\n"); | 19624 | "2619 Config region 23 has bad signature\n"); |
| 19460 | goto out; | 19625 | goto out; |
| 19461 | } | 19626 | } |
| @@ -19463,7 +19628,7 @@ lpfc_sli_read_link_ste(struct lpfc_hba *phba) · 1 unmodified line | |||
| 19463 | 19628 | ||
| 19464 | /* Check the data structure version */ | 19629 | /* Check the data structure version */ |
| 19465 | if (rgn23_data[offset] != LPFC_REGION23_VERSION) { | 19630 | if (rgn23_data[offset] != LPFC_REGION23_VERSION) { |
| 19466 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 19631 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19467 | "2620 Config region 23 has bad version\n"); | 19632 | "2620 Config region 23 has bad version\n"); |
| 19468 | goto out; | 19633 | goto out; |
| 19469 | } | 19634 | } |
| @@ -19640,7 +19805,7 @@ lpfc_wr_object(struct lpfc_hba *phba, struct list_head *dmabuf_list, · 170 unmodified lines | |||
| 19640 | if (rc != MBX_TIMEOUT) | 19805 | if (rc != MBX_TIMEOUT) |
| 19641 | mempool_free(mbox, phba->mbox_mem_pool); | 19806 | mempool_free(mbox, phba->mbox_mem_pool); |
| 19642 | if (shdr_status || shdr_add_status || rc) { | 19807 | if (shdr_status || shdr_add_status || rc) { |
| 19643 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 19808 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19644 | "3025 Write Object mailbox failed with " | 19809 | "3025 Write Object mailbox failed with " |
| 19645 | "status x%x add_status x%x, mbx status x%x\n", | 19810 | "status x%x add_status x%x, mbx status x%x\n", |
| 19646 | shdr_status, shdr_add_status, rc); | 19811 | shdr_status, shdr_add_status, rc); |
| @@ -19820,7 +19985,7 @@ lpfc_drain_txq(struct lpfc_hba *phba) · 173 unmodified lines | |||
| 19820 | piocbq = lpfc_sli_ringtx_get(phba, pring); | 19985 | piocbq = lpfc_sli_ringtx_get(phba, pring); |
| 19821 | if (!piocbq) { | 19986 | if (!piocbq) { |
| 19822 | spin_unlock_irqrestore(&pring->ring_lock, iflags); | 19987 | spin_unlock_irqrestore(&pring->ring_lock, iflags); |
| 19823 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 19988 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19824 | "2823 txq empty and txq_cnt is %d\n ", | 19989 | "2823 txq empty and txq_cnt is %d\n ", |
| 19825 | txq_cnt); | 19990 | txq_cnt); |
| 19826 | break; | 19991 | break; |
| @@ -19849,7 +20014,7 @@ lpfc_drain_txq(struct lpfc_hba *phba) · 22 unmodified lines | |||
| 19849 | 20014 | ||
| 19850 | if (fail_msg) { | 20015 | if (fail_msg) { |
| 19851 | /* Failed means we can't issue and need to cancel */ | 20016 | /* Failed means we can't issue and need to cancel */ |
| 19852 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 20017 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 19853 | "2822 IOCB failed %s iotag 0x%x " | 20018 | "2822 IOCB failed %s iotag 0x%x " |
| 19854 | "xri 0x%x\n", | 20019 | "xri 0x%x\n", |
| 19855 | fail_msg, | 20020 | fail_msg, |
| @@ -19869,7 +20034,7 @@ lpfc_drain_txq(struct lpfc_hba *phba) · 13 unmodified lines | |||
| 19869 | /** | 20034 | /** |
| 19870 | * lpfc_wqe_bpl2sgl - Convert the bpl/bde to a sgl. | 20035 | * lpfc_wqe_bpl2sgl - Convert the bpl/bde to a sgl. |
| 19871 | * @phba: Pointer to HBA context object. | 20036 | * @phba: Pointer to HBA context object. |
| 19872 | * @pwqe: Pointer to command WQE. | 20037 | * @pwqeq: Pointer to command WQE. |
| 19873 | * @sglq: Pointer to the scatter gather queue object. | 20038 | * @sglq: Pointer to the scatter gather queue object. |
| 19874 | * | 20039 | * |
| 19875 | * This routine converts the bpl or bde that is in the WQE | 20040 | * This routine converts the bpl or bde that is in the WQE |
| @@ -19994,7 +20159,7 @@ lpfc_wqe_bpl2sgl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeq, · 118 unmodified lines | |||
| 19994 | /** | 20159 | /** |
| 19995 | * lpfc_sli4_issue_wqe - Issue an SLI4 Work Queue Entry (WQE) | 20160 | * lpfc_sli4_issue_wqe - Issue an SLI4 Work Queue Entry (WQE) |
| 19996 | * @phba: Pointer to HBA context object. | 20161 | * @phba: Pointer to HBA context object. |
| 19997 | * @ring_number: Base sli ring number | 20162 | * @qp: Pointer to HDW queue. |
| 19998 | * @pwqe: Pointer to command WQE. | 20163 | * @pwqe: Pointer to command WQE. |
| 19999 | **/ | 20164 | **/ |
| 20000 | int | 20165 | int |
| @@ -20276,6 +20441,7 @@ void lpfc_move_xri_pvt_to_pbl(struct lpfc_hba *phba, u32 hwqid) · 275 unmodified lines | |||
| 20276 | /** | 20441 | /** |
| 20277 | * _lpfc_move_xri_pbl_to_pvt - Move some XRIs from public to private pool | 20442 | * _lpfc_move_xri_pbl_to_pvt - Move some XRIs from public to private pool |
| 20278 | * @phba: pointer to lpfc hba data structure | 20443 | * @phba: pointer to lpfc hba data structure |
| 20444 | * @qp: pointer to HDW queue | ||
| 20279 | * @pbl_pool: specified public free XRI pool | 20445 | * @pbl_pool: specified public free XRI pool |
| 20280 | * @pvt_pool: specified private free XRI pool | 20446 | * @pvt_pool: specified private free XRI pool |
| 20281 | * @count: number of XRIs to move | 20447 | * @count: number of XRIs to move |
| @@ -20405,7 +20571,7 @@ void lpfc_move_xri_pbl_to_pvt(struct lpfc_hba *phba, u32 hwqid, u32 count) · 123 unmodified lines | |||
| 20405 | /** | 20571 | /** |
| 20406 | * lpfc_keep_pvt_pool_above_lowwm - Keep pvt_pool above low watermark | 20572 | * lpfc_keep_pvt_pool_above_lowwm - Keep pvt_pool above low watermark |
| 20407 | * @phba: pointer to lpfc hba data structure. | 20573 | * @phba: pointer to lpfc hba data structure. |
| 20408 | * @qp: belong to which HWQ. | 20574 | * @hwqid: belong to which HWQ. |
| 20409 | * | 20575 | * |
| 20410 | * This routine get a batch of XRIs from pbl_pool if pvt_pool is less than | 20576 | * This routine get a batch of XRIs from pbl_pool if pvt_pool is less than |
| 20411 | * low watermark. | 20577 | * low watermark. |
| @@ -20527,6 +20693,7 @@ void lpfc_release_io_buf(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_ncmd, · 115 unmodified lines | |||
| 20527 | /** | 20693 | /** |
| 20528 | * lpfc_get_io_buf_from_private_pool - Get one free IO buf from private pool | 20694 | * lpfc_get_io_buf_from_private_pool - Get one free IO buf from private pool |
| 20529 | * @phba: pointer to lpfc hba data structure. | 20695 | * @phba: pointer to lpfc hba data structure. |
| 20696 | * @qp: pointer to HDW queue | ||
| 20530 | * @pvt_pool: pointer to private pool data structure. | 20697 | * @pvt_pool: pointer to private pool data structure. |
| 20531 | * @ndlp: pointer to lpfc nodelist data structure. | 20698 | * @ndlp: pointer to lpfc nodelist data structure. |
| 20532 | * | 20699 | * |
| @@ -20,6 +20,9 @@ · 19 unmodified lines | |||
| 20 | * included with this package. * | 20 | * included with this package. * |
| 21 | *******************************************************************/ | 21 | *******************************************************************/ |
| 22 | 22 | ||
| 23 | #include <linux/irq_poll.h> | ||
| 24 | #include <linux/cpufreq.h> | ||
| 25 | |||
| 23 | #if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_SCSI_LPFC_DEBUG_FS) | 26 | #if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_SCSI_LPFC_DEBUG_FS) |
| 24 | #define CONFIG_SCSI_LPFC_DEBUG_FS | 27 | #define CONFIG_SCSI_LPFC_DEBUG_FS |
| 25 | #endif | 28 | #endif |
| @@ -135,6 +138,16 @@ struct lpfc_rqb { · 109 unmodified lines | |||
| 135 | struct rqb_dmabuf *); | 138 | struct rqb_dmabuf *); |
| 136 | }; | 139 | }; |
| 137 | 140 | ||
| 141 | enum lpfc_poll_mode { | ||
| 142 | LPFC_QUEUE_WORK, | ||
| 143 | LPFC_IRQ_POLL | ||
| 144 | }; | ||
| 145 | |||
| 146 | struct lpfc_idle_stat { | ||
| 147 | u64 prev_idle; | ||
| 148 | u64 prev_wall; | ||
| 149 | }; | ||
| 150 | |||
| 138 | struct lpfc_queue { | 151 | struct lpfc_queue { |
| 139 | struct list_head list; | 152 | struct list_head list; |
| 140 | struct list_head wq_list; | 153 | struct list_head wq_list; |
| @@ -265,6 +278,10 @@ struct lpfc_queue { · 124 unmodified lines | |||
| 265 | struct lpfc_queue *assoc_qp; | 278 | struct lpfc_queue *assoc_qp; |
| 266 | struct list_head _poll_list; | 279 | struct list_head _poll_list; |
| 267 | void **q_pgs; /* array to index entries per page */ | 280 | void **q_pgs; /* array to index entries per page */ |
| 281 | |||
| 282 | #define LPFC_IRQ_POLL_WEIGHT 256 | ||
| 283 | struct irq_poll iop; | ||
| 284 | enum lpfc_poll_mode poll_mode; | ||
| 268 | }; | 285 | }; |
| 269 | 286 | ||
| 270 | struct lpfc_sli4_link { | 287 | struct lpfc_sli4_link { |
| @@ -926,6 +943,7 @@ struct lpfc_sli4_hba { · 655 unmodified lines | |||
| 926 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS | 943 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS |
| 927 | struct lpfc_hdwq_stat __percpu *c_stat; | 944 | struct lpfc_hdwq_stat __percpu *c_stat; |
| 928 | #endif | 945 | #endif |
| 946 | struct lpfc_idle_stat *idle_stat; | ||
| 929 | uint32_t conf_trunk; | 947 | uint32_t conf_trunk; |
| 930 | #define lpfc_conf_trunk_port0_WORD conf_trunk | 948 | #define lpfc_conf_trunk_port0_WORD conf_trunk |
| 931 | #define lpfc_conf_trunk_port0_SHIFT 0 | 949 | #define lpfc_conf_trunk_port0_SHIFT 0 |
| @@ -20,7 +20,7 @@ · 19 unmodified lines | |||
| 20 | * included with this package. * | 20 | * included with this package. * |
| 21 | *******************************************************************/ | 21 | *******************************************************************/ |
| 22 | 22 | ||
| 23 | #define LPFC_DRIVER_VERSION "12.8.0.1" | 23 | #define LPFC_DRIVER_VERSION "12.8.0.2" |
| 24 | #define LPFC_DRIVER_NAME "lpfc" | 24 | #define LPFC_DRIVER_NAME "lpfc" |
| 25 | 25 | ||
| 26 | /* Used for SLI 2/3 */ | 26 | /* Used for SLI 2/3 */ |
| @@ -145,7 +145,7 @@ lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport) · 144 unmodified lines | |||
| 145 | rc = lpfc_sli_issue_mbox_wait(phba, pmb, phba->fc_ratov * 2); | 145 | rc = lpfc_sli_issue_mbox_wait(phba, pmb, phba->fc_ratov * 2); |
| 146 | if (rc != MBX_SUCCESS) { | 146 | if (rc != MBX_SUCCESS) { |
| 147 | if (signal_pending(current)) { | 147 | if (signal_pending(current)) { |
| 148 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT | LOG_VPORT, | 148 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 149 | "1830 Signal aborted mbxCmd x%x\n", | 149 | "1830 Signal aborted mbxCmd x%x\n", |
| 150 | mb->mbxCommand); | 150 | mb->mbxCommand); |
| 151 | lpfc_mbuf_free(phba, mp->virt, mp->phys); | 151 | lpfc_mbuf_free(phba, mp->virt, mp->phys); |
| @@ -154,7 +154,7 @@ lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport) · 2 unmodified lines | |||
| 154 | mempool_free(pmb, phba->mbox_mem_pool); | 154 | mempool_free(pmb, phba->mbox_mem_pool); |
| 155 | return -EINTR; | 155 | return -EINTR; |
| 156 | } else { | 156 | } else { |
| 157 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT | LOG_VPORT, | 157 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 158 | "1818 VPort failed init, mbxCmd x%x " | 158 | "1818 VPort failed init, mbxCmd x%x " |
| 159 | "READ_SPARM mbxStatus x%x, rc = x%x\n", | 159 | "READ_SPARM mbxStatus x%x, rc = x%x\n", |
| 160 | mb->mbxCommand, mb->mbxStatus, rc); | 160 | mb->mbxCommand, mb->mbxStatus, rc); |
| @@ -190,7 +190,7 @@ lpfc_valid_wwn_format(struct lpfc_hba *phba, struct lpfc_name *wwn, · 29 unmodified lines | |||
| 190 | ((wwn->u.wwn[0] & 0xf) != 0 || (wwn->u.wwn[1] & 0xf) != 0))) | 190 | ((wwn->u.wwn[0] & 0xf) != 0 || (wwn->u.wwn[1] & 0xf) != 0))) |
| 191 | return 1; | 191 | return 1; |
| 192 | 192 | ||
| 193 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 193 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 194 | "1822 Invalid %s: %02x:%02x:%02x:%02x:" | 194 | "1822 Invalid %s: %02x:%02x:%02x:%02x:" |
| 195 | "%02x:%02x:%02x:%02x\n", | 195 | "%02x:%02x:%02x:%02x\n", |
| 196 | name_type, | 196 | name_type, |
| @@ -284,11 +284,11 @@ static void lpfc_discovery_wait(struct lpfc_vport *vport) · 87 unmodified lines | |||
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | if (time_after(jiffies, wait_time_max)) | 286 | if (time_after(jiffies, wait_time_max)) |
| 287 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 287 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 288 | "1835 Vport discovery quiesce failed:" | 288 | "1835 Vport discovery quiesce failed:" |
| 289 | " state x%x fc_flags x%x wait msecs x%x\n", | 289 | " state x%x fc_flags x%x wait msecs x%x\n", |
| 290 | vport->port_state, vport->fc_flag, | 290 | vport->port_state, vport->fc_flag, |
| 291 | jiffies_to_msecs(jiffies - start_time)); | 291 | jiffies_to_msecs(jiffies - start_time)); |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | int | 294 | int |
| @@ -305,7 +305,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 10 unmodified lines | |||
| 305 | int status; | 305 | int status; |
| 306 | 306 | ||
| 307 | if ((phba->sli_rev < 3) || !(phba->cfg_enable_npiv)) { | 307 | if ((phba->sli_rev < 3) || !(phba->cfg_enable_npiv)) { |
| 308 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 308 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 309 | "1808 Create VPORT failed: " | 309 | "1808 Create VPORT failed: " |
| 310 | "NPIV is not enabled: SLImode:%d\n", | 310 | "NPIV is not enabled: SLImode:%d\n", |
| 311 | phba->sli_rev); | 311 | phba->sli_rev); |
| @@ -315,7 +315,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 3 unmodified lines | |||
| 315 | 315 | ||
| 316 | /* NPIV is not supported if HBA has NVME Target enabled */ | 316 | /* NPIV is not supported if HBA has NVME Target enabled */ |
| 317 | if (phba->nvmet_support) { | 317 | if (phba->nvmet_support) { |
| 318 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 318 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 319 | "3189 Create VPORT failed: " | 319 | "3189 Create VPORT failed: " |
| 320 | "NPIV is not supported on NVME Target\n"); | 320 | "NPIV is not supported on NVME Target\n"); |
| 321 | rc = VPORT_INVAL; | 321 | rc = VPORT_INVAL; |
| @@ -324,7 +324,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 2 unmodified lines | |||
| 324 | 324 | ||
| 325 | vpi = lpfc_alloc_vpi(phba); | 325 | vpi = lpfc_alloc_vpi(phba); |
| 326 | if (vpi == 0) { | 326 | if (vpi == 0) { |
| 327 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 327 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 328 | "1809 Create VPORT failed: " | 328 | "1809 Create VPORT failed: " |
| 329 | "Max VPORTs (%d) exceeded\n", | 329 | "Max VPORTs (%d) exceeded\n", |
| 330 | phba->max_vpi); | 330 | phba->max_vpi); |
| @@ -334,7 +334,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 3 unmodified lines | |||
| 334 | 334 | ||
| 335 | /* Assign an unused board number */ | 335 | /* Assign an unused board number */ |
| 336 | if ((instance = lpfc_get_instance()) < 0) { | 336 | if ((instance = lpfc_get_instance()) < 0) { |
| 337 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 337 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 338 | "1810 Create VPORT failed: Cannot get " | 338 | "1810 Create VPORT failed: Cannot get " |
| 339 | "instance number\n"); | 339 | "instance number\n"); |
| 340 | lpfc_free_vpi(phba, vpi); | 340 | lpfc_free_vpi(phba, vpi); |
| @@ -344,7 +344,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 3 unmodified lines | |||
| 344 | 344 | ||
| 345 | vport = lpfc_create_port(phba, instance, &fc_vport->dev); | 345 | vport = lpfc_create_port(phba, instance, &fc_vport->dev); |
| 346 | if (!vport) { | 346 | if (!vport) { |
| 347 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 347 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 348 | "1811 Create VPORT failed: vpi x%x\n", vpi); | 348 | "1811 Create VPORT failed: vpi x%x\n", vpi); |
| 349 | lpfc_free_vpi(phba, vpi); | 349 | lpfc_free_vpi(phba, vpi); |
| 350 | rc = VPORT_NORESOURCES; | 350 | rc = VPORT_NORESOURCES; |
| @@ -356,11 +356,11 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 5 unmodified lines | |||
| 356 | 356 | ||
| 357 | if ((status = lpfc_vport_sparm(phba, vport))) { | 357 | if ((status = lpfc_vport_sparm(phba, vport))) { |
| 358 | if (status == -EINTR) { | 358 | if (status == -EINTR) { |
| 359 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 359 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 360 | "1831 Create VPORT Interrupted.\n"); | 360 | "1831 Create VPORT Interrupted.\n"); |
| 361 | rc = VPORT_ERROR; | 361 | rc = VPORT_ERROR; |
| 362 | } else { | 362 | } else { |
| 363 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 363 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 364 | "1813 Create VPORT failed. " | 364 | "1813 Create VPORT failed. " |
| 365 | "Cannot get sparam\n"); | 365 | "Cannot get sparam\n"); |
| 366 | rc = VPORT_NORESOURCES; | 366 | rc = VPORT_NORESOURCES; |
| @@ -378,7 +378,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 11 unmodified lines | |||
| 378 | 378 | ||
| 379 | if (!lpfc_valid_wwn_format(phba, &vport->fc_sparam.nodeName, "WWNN") || | 379 | if (!lpfc_valid_wwn_format(phba, &vport->fc_sparam.nodeName, "WWNN") || |
| 380 | !lpfc_valid_wwn_format(phba, &vport->fc_sparam.portName, "WWPN")) { | 380 | !lpfc_valid_wwn_format(phba, &vport->fc_sparam.portName, "WWPN")) { |
| 381 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 381 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 382 | "1821 Create VPORT failed. " | 382 | "1821 Create VPORT failed. " |
| 383 | "Invalid WWN format\n"); | 383 | "Invalid WWN format\n"); |
| 384 | lpfc_free_vpi(phba, vpi); | 384 | lpfc_free_vpi(phba, vpi); |
| @@ -388,7 +388,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 3 unmodified lines | |||
| 388 | } | 388 | } |
| 389 | 389 | ||
| 390 | if (!lpfc_unique_wwpn(phba, vport)) { | 390 | if (!lpfc_unique_wwpn(phba, vport)) { |
| 391 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 391 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 392 | "1823 Create VPORT failed. " | 392 | "1823 Create VPORT failed. " |
| 393 | "Duplicate WWN on HBA\n"); | 393 | "Duplicate WWN on HBA\n"); |
| 394 | lpfc_free_vpi(phba, vpi); | 394 | lpfc_free_vpi(phba, vpi); |
| @@ -426,7 +426,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 31 unmodified lines | |||
| 426 | (pport->fc_flag & FC_VFI_REGISTERED)) { | 426 | (pport->fc_flag & FC_VFI_REGISTERED)) { |
| 427 | rc = lpfc_sli4_init_vpi(vport); | 427 | rc = lpfc_sli4_init_vpi(vport); |
| 428 | if (rc) { | 428 | if (rc) { |
| 429 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 429 | lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT, |
| 430 | "1838 Failed to INIT_VPI on vpi %d " | 430 | "1838 Failed to INIT_VPI on vpi %d " |
| 431 | "status %d\n", vpi, rc); | 431 | "status %d\n", vpi, rc); |
| 432 | rc = VPORT_NORESOURCES; | 432 | rc = VPORT_NORESOURCES; |
| @@ -469,7 +469,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 36 unmodified lines | |||
| 469 | lpfc_initial_fdisc(vport); | 469 | lpfc_initial_fdisc(vport); |
| 470 | } else { | 470 | } else { |
| 471 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); | 471 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); |
| 472 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 472 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 473 | "0262 No NPIV Fabric support\n"); | 473 | "0262 No NPIV Fabric support\n"); |
| 474 | } | 474 | } |
| 475 | } else { | 475 | } else { |
| @@ -478,8 +478,8 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) · 2 unmodified lines | |||
| 478 | rc = VPORT_OK; | 478 | rc = VPORT_OK; |
| 479 | 479 | ||
| 480 | out: | 480 | out: |
| 481 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 481 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 482 | "1825 Vport Created.\n"); | 482 | "1825 Vport Created.\n"); |
| 483 | lpfc_host_attrib_init(lpfc_shost_from_vport(vport)); | 483 | lpfc_host_attrib_init(lpfc_shost_from_vport(vport)); |
| 484 | error_out: | 484 | error_out: |
| 485 | return rc; | 485 | return rc; |
| @@ -534,7 +534,7 @@ disable_vport(struct fc_vport *fc_vport) · 48 unmodified lines | |||
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | lpfc_vport_set_state(vport, FC_VPORT_DISABLED); | 536 | lpfc_vport_set_state(vport, FC_VPORT_DISABLED); |
| 537 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 537 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 538 | "1826 Vport Disabled.\n"); | 538 | "1826 Vport Disabled.\n"); |
| 539 | return VPORT_OK; | 539 | return VPORT_OK; |
| 540 | } | 540 | } |
| @@ -575,7 +575,7 @@ enable_vport(struct fc_vport *fc_vport) · 34 unmodified lines | |||
| 575 | lpfc_initial_fdisc(vport); | 575 | lpfc_initial_fdisc(vport); |
| 576 | } else { | 576 | } else { |
| 577 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); | 577 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); |
| 578 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 578 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 579 | "0264 No NPIV Fabric support\n"); | 579 | "0264 No NPIV Fabric support\n"); |
| 580 | } | 580 | } |
| 581 | } else { | 581 | } else { |
| @@ -583,7 +583,7 @@ enable_vport(struct fc_vport *fc_vport) · 1 unmodified line | |||
| 583 | } | 583 | } |
| 584 | 584 | ||
| 585 | out: | 585 | out: |
| 586 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 586 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 587 | "1827 Vport Enabled.\n"); | 587 | "1827 Vport Enabled.\n"); |
| 588 | return VPORT_OK; | 588 | return VPORT_OK; |
| 589 | } | 589 | } |
| @@ -609,7 +609,7 @@ lpfc_vport_delete(struct fc_vport *fc_vport) · 19 unmodified lines | |||
| 609 | bool ns_ndlp_referenced = false; | 609 | bool ns_ndlp_referenced = false; |
| 610 | 610 | ||
| 611 | if (vport->port_type == LPFC_PHYSICAL_PORT) { | 611 | if (vport->port_type == LPFC_PHYSICAL_PORT) { |
| 612 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 612 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 613 | "1812 vport_delete failed: Cannot delete " | 613 | "1812 vport_delete failed: Cannot delete " |
| 614 | "physical host\n"); | 614 | "physical host\n"); |
| 615 | return VPORT_ERROR; | 615 | return VPORT_ERROR; |
| @@ -618,7 +618,7 @@ lpfc_vport_delete(struct fc_vport *fc_vport) · 2 unmodified lines | |||
| 618 | /* If the vport is a static vport fail the deletion. */ | 618 | /* If the vport is a static vport fail the deletion. */ |
| 619 | if ((vport->vport_flag & STATIC_VPORT) && | 619 | if ((vport->vport_flag & STATIC_VPORT) && |
| 620 | !(phba->pport->load_flag & FC_UNLOADING)) { | 620 | !(phba->pport->load_flag & FC_UNLOADING)) { |
| 621 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 621 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 622 | "1837 vport_delete failed: Cannot delete " | 622 | "1837 vport_delete failed: Cannot delete " |
| 623 | "static vport.\n"); | 623 | "static vport.\n"); |
| 624 | return VPORT_ERROR; | 624 | return VPORT_ERROR; |
| @@ -642,27 +642,16 @@ lpfc_vport_delete(struct fc_vport *fc_vport) · 17 unmodified lines | |||
| 642 | vport->port_state < LPFC_VPORT_READY) | 642 | vport->port_state < LPFC_VPORT_READY) |
| 643 | return -EAGAIN; | 643 | return -EAGAIN; |
| 644 | } | 644 | } |
| 645 | |||
| 645 | /* | 646 | /* |
| 646 | * This is a bit of a mess. We want to ensure the shost doesn't get | 647 | * Take early refcount for outstanding I/O requests we schedule during |
| 647 | * torn down until we're done with the embedded lpfc_vport structure. | 648 | * delete processing for unreg_vpi. Always keep this before |
| 648 | * | 649 | * scsi_remove_host() as we can no longer obtain a reference through |
| 649 | * Beyond holding a reference for this function, we also need a | 650 | * scsi_host_get() after scsi_host_remove as shost is set to SHOST_DEL. |
| 650 | * reference for outstanding I/O requests we schedule during delete | ||
| 651 | * processing. But once we scsi_remove_host() we can no longer obtain | ||
| 652 | * a reference through scsi_host_get(). | ||
| 653 | * | ||
| 654 | * So we take two references here. We release one reference at the | ||
| 655 | * bottom of the function -- after delinking the vport. And we | ||
| 656 | * release the other at the completion of the unreg_vpi that get's | ||
| 657 | * initiated after we've disposed of all other resources associated | ||
| 658 | * with the port. | ||
| 659 | */ | 651 | */ |
| 660 | if (!scsi_host_get(shost)) | 652 | if (!scsi_host_get(shost)) |
| 661 | return VPORT_INVAL; | 653 | return VPORT_INVAL; |
| 662 | if (!scsi_host_get(shost)) { | 654 | |
| 663 | scsi_host_put(shost); | ||
| 664 | return VPORT_INVAL; | ||
| 665 | } | ||
| 666 | lpfc_free_sysfs_attr(vport); | 655 | lpfc_free_sysfs_attr(vport); |
| 667 | 656 | ||
| 668 | lpfc_debugfs_terminate(vport); | 657 | lpfc_debugfs_terminate(vport); |
| @@ -809,15 +798,16 @@ skip_logo: · 140 unmodified lines | |||
| 809 | if (!(vport->vpi_state & LPFC_VPI_REGISTERED) || | 798 | if (!(vport->vpi_state & LPFC_VPI_REGISTERED) || |
| 810 | lpfc_mbx_unreg_vpi(vport)) | 799 | lpfc_mbx_unreg_vpi(vport)) |
| 811 | scsi_host_put(shost); | 800 | scsi_host_put(shost); |
| 812 | } else | 801 | } else { |
| 813 | scsi_host_put(shost); | 802 | scsi_host_put(shost); |
| 803 | } | ||
| 814 | 804 | ||
| 815 | lpfc_free_vpi(phba, vport->vpi); | 805 | lpfc_free_vpi(phba, vport->vpi); |
| 816 | vport->work_port_events = 0; | 806 | vport->work_port_events = 0; |
| 817 | spin_lock_irq(&phba->port_list_lock); | 807 | spin_lock_irq(&phba->port_list_lock); |
| 818 | list_del_init(&vport->listentry); | 808 | list_del_init(&vport->listentry); |
| 819 | spin_unlock_irq(&phba->port_list_lock); | 809 | spin_unlock_irq(&phba->port_list_lock); |
| 820 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, | 810 | lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, |
| 821 | "1828 Vport Deleted.\n"); | 811 | "1828 Vport Deleted.\n"); |
| 822 | scsi_host_put(shost); | 812 | scsi_host_put(shost); |
| 823 | return VPORT_OK; | 813 | return VPORT_OK; |
| @@ -838,7 +828,8 @@ lpfc_create_vport_work_array(struct lpfc_hba *phba) · 14 unmodified lines | |||
| 838 | if (port_iterator->load_flag & FC_UNLOADING) | 828 | if (port_iterator->load_flag & FC_UNLOADING) |
| 839 | continue; | 829 | continue; |
| 840 | if (!scsi_host_get(lpfc_shost_from_vport(port_iterator))) { | 830 | if (!scsi_host_get(lpfc_shost_from_vport(port_iterator))) { |
| 841 | lpfc_printf_vlog(port_iterator, KERN_ERR, LOG_VPORT, | 831 | lpfc_printf_vlog(port_iterator, KERN_ERR, |
| 832 | LOG_TRACE_EVENT, | ||
| 842 | "1801 Create vport work array FAILED: " | 833 | "1801 Create vport work array FAILED: " |
| 843 | "cannot do scsi_host_get\n"); | 834 | "cannot do scsi_host_get\n"); |
| 844 | continue; | 835 | continue; |
| @@ -908,7 +899,8 @@ lpfc_alloc_bucket(struct lpfc_vport *vport) · 63 unmodified lines | |||
| 908 | GFP_ATOMIC); | 899 | GFP_ATOMIC); |
| 909 | 900 | ||
| 910 | if (!ndlp->lat_data) | 901 | if (!ndlp->lat_data) |
| 911 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE, | 902 | lpfc_printf_vlog(vport, KERN_ERR, |
| 903 | LOG_TRACE_EVENT, | ||
| 912 | "0287 lpfc_alloc_bucket failed to " | 904 | "0287 lpfc_alloc_bucket failed to " |
| 913 | "allocate statistical data buffer DID " | 905 | "allocate statistical data buffer DID " |
| 914 | "0x%x\n", ndlp->nlp_DID); | 906 | "0x%x\n", ndlp->nlp_DID); |
| @@ -124,7 +124,7 @@ static int trace_level; · 123 unmodified lines | |||
| 124 | 124 | ||
| 125 | /** | 125 | /** |
| 126 | * mega_setup_mailbox() | 126 | * mega_setup_mailbox() |
| 127 | * @adapter - pointer to our soft state | 127 | * @adapter: pointer to our soft state |
| 128 | * | 128 | * |
| 129 | * Allocates a 8 byte aligned memory for the handshake mailbox. | 129 | * Allocates a 8 byte aligned memory for the handshake mailbox. |
| 130 | */ | 130 | */ |
| @@ -347,7 +347,7 @@ mega_query_adapter(adapter_t *adapter) · 216 unmodified lines | |||
| 347 | 347 | ||
| 348 | /** | 348 | /** |
| 349 | * mega_runpendq() | 349 | * mega_runpendq() |
| 350 | * @adapter - pointer to our soft state | 350 | * @adapter: pointer to our soft state |
| 351 | * | 351 | * |
| 352 | * Runs through the list of pending requests. | 352 | * Runs through the list of pending requests. |
| 353 | */ | 353 | */ |
| @@ -413,8 +413,8 @@ static DEF_SCSI_QCMD(megaraid_queue) · 59 unmodified lines | |||
| 413 | 413 | ||
| 414 | /** | 414 | /** |
| 415 | * mega_allocate_scb() | 415 | * mega_allocate_scb() |
| 416 | * @adapter - pointer to our soft state | 416 | * @adapter: pointer to our soft state |
| 417 | * @cmd - scsi command from the mid-layer | 417 | * @cmd: scsi command from the mid-layer |
| 418 | * | 418 | * |
| 419 | * Allocate a SCB structure. This is the central structure for controller | 419 | * Allocate a SCB structure. This is the central structure for controller |
| 420 | * commands. | 420 | * commands. |
| @@ -444,9 +444,9 @@ mega_allocate_scb(adapter_t *adapter, struct scsi_cmnd *cmd) · 23 unmodified lines | |||
| 444 | 444 | ||
| 445 | /** | 445 | /** |
| 446 | * mega_get_ldrv_num() | 446 | * mega_get_ldrv_num() |
| 447 | * @adapter - pointer to our soft state | 447 | * @adapter: pointer to our soft state |
| 448 | * @cmd - scsi mid layer command | 448 | * @cmd: scsi mid layer command |
| 449 | * @channel - channel on the controller | 449 | * @channel: channel on the controller |
| 450 | * | 450 | * |
| 451 | * Calculate the logical drive number based on the information in scsi command | 451 | * Calculate the logical drive number based on the information in scsi command |
| 452 | * and the channel number. | 452 | * and the channel number. |
| @@ -503,9 +503,9 @@ mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel) · 50 unmodified lines | |||
| 503 | 503 | ||
| 504 | /** | 504 | /** |
| 505 | * mega_build_cmd() | 505 | * mega_build_cmd() |
| 506 | * @adapter - pointer to our soft state | 506 | * @adapter: pointer to our soft state |
| 507 | * @cmd - Prepare using this scsi command | 507 | * @cmd: Prepare using this scsi command |
| 508 | * @busy - busy flag if no resources | 508 | * @busy: busy flag if no resources |
| 509 | * | 509 | * |
| 510 | * Prepares a command and scatter gather list for the controller. This routine | 510 | * Prepares a command and scatter gather list for the controller. This routine |
| 511 | * also finds out if the commands is intended for a logical drive or a | 511 | * also finds out if the commands is intended for a logical drive or a |
| @@ -517,7 +517,6 @@ mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel) · 5 unmodified lines | |||
| 517 | static scb_t * | 517 | static scb_t * |
| 518 | mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) | 518 | mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) |
| 519 | { | 519 | { |
| 520 | mega_ext_passthru *epthru; | ||
| 521 | mega_passthru *pthru; | 520 | mega_passthru *pthru; |
| 522 | scb_t *scb; | 521 | scb_t *scb; |
| 523 | mbox_t *mbox; | 522 | mbox_t *mbox; |
| @@ -905,7 +904,7 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) · 381 unmodified lines | |||
| 905 | 904 | ||
| 906 | if( adapter->support_ext_cdb ) { | 905 | if( adapter->support_ext_cdb ) { |
| 907 | 906 | ||
| 908 | epthru = mega_prepare_extpassthru(adapter, scb, cmd, | 907 | mega_prepare_extpassthru(adapter, scb, cmd, |
| 909 | channel, target); | 908 | channel, target); |
| 910 | 909 | ||
| 911 | mbox->m_out.cmd = MEGA_MBOXCMD_EXTPTHRU; | 910 | mbox->m_out.cmd = MEGA_MBOXCMD_EXTPTHRU; |
| @@ -937,11 +936,11 @@ mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy) · 25 unmodified lines | |||
| 937 | 936 | ||
| 938 | /** | 937 | /** |
| 939 | * mega_prepare_passthru() | 938 | * mega_prepare_passthru() |
| 940 | * @adapter - pointer to our soft state | 939 | * @adapter: pointer to our soft state |
| 941 | * @scb - our scsi control block | 940 | * @scb: our scsi control block |
| 942 | * @cmd - scsi command from the mid-layer | 941 | * @cmd: scsi command from the mid-layer |
| 943 | * @channel - actual channel on the controller | 942 | * @channel: actual channel on the controller |
| 944 | * @target - actual id on the controller. | 943 | * @target: actual id on the controller. |
| 945 | * | 944 | * |
| 946 | * prepare a command for the scsi physical devices. | 945 | * prepare a command for the scsi physical devices. |
| 947 | */ | 946 | */ |
| @@ -1000,11 +999,11 @@ mega_prepare_passthru(adapter_t *adapter, scb_t *scb, struct scsi_cmnd *cmd, · 52 unmodified lines | |||
| 1000 | 999 | ||
| 1001 | /** | 1000 | /** |
| 1002 | * mega_prepare_extpassthru() | 1001 | * mega_prepare_extpassthru() |
| 1003 | * @adapter - pointer to our soft state | 1002 | * @adapter: pointer to our soft state |
| 1004 | * @scb - our scsi control block | 1003 | * @scb: our scsi control block |
| 1005 | * @cmd - scsi command from the mid-layer | 1004 | * @cmd: scsi command from the mid-layer |
| 1006 | * @channel - actual channel on the controller | 1005 | * @channel: actual channel on the controller |
| 1007 | * @target - actual id on the controller. | 1006 | * @target: actual id on the controller. |
| 1008 | * | 1007 | * |
| 1009 | * prepare a command for the scsi physical devices. This rountine prepares | 1008 | * prepare a command for the scsi physical devices. This rountine prepares |
| 1010 | * commands for devices which can take extended CDBs (>10 bytes) | 1009 | * commands for devices which can take extended CDBs (>10 bytes) |
| @@ -1085,8 +1084,8 @@ __mega_runpendq(adapter_t *adapter) · 74 unmodified lines | |||
| 1085 | 1084 | ||
| 1086 | /** | 1085 | /** |
| 1087 | * issue_scb() | 1086 | * issue_scb() |
| 1088 | * @adapter - pointer to our soft state | 1087 | * @adapter: pointer to our soft state |
| 1089 | * @scb - scsi control block | 1088 | * @scb: scsi control block |
| 1090 | * | 1089 | * |
| 1091 | * Post a command to the card if the mailbox is available, otherwise return | 1090 | * Post a command to the card if the mailbox is available, otherwise return |
| 1092 | * busy. We also take the scb from the pending list if the mailbox is | 1091 | * busy. We also take the scb from the pending list if the mailbox is |
| @@ -1166,8 +1165,8 @@ mega_busywait_mbox (adapter_t *adapter) · 73 unmodified lines | |||
| 1166 | 1165 | ||
| 1167 | /** | 1166 | /** |
| 1168 | * issue_scb_block() | 1167 | * issue_scb_block() |
| 1169 | * @adapter - pointer to our soft state | 1168 | * @adapter: pointer to our soft state |
| 1170 | * @raw_mbox - the mailbox | 1169 | * @raw_mbox: the mailbox |
| 1171 | * | 1170 | * |
| 1172 | * Issue a scb in synchronous and non-interrupt mode | 1171 | * Issue a scb in synchronous and non-interrupt mode |
| 1173 | */ | 1172 | */ |
| @@ -1247,8 +1246,8 @@ bug_blocked_mailbox: · 73 unmodified lines | |||
| 1247 | 1246 | ||
| 1248 | /** | 1247 | /** |
| 1249 | * megaraid_isr_iomapped() | 1248 | * megaraid_isr_iomapped() |
| 1250 | * @irq - irq | 1249 | * @irq: irq |
| 1251 | * @devp - pointer to our soft state | 1250 | * @devp: pointer to our soft state |
| 1252 | * | 1251 | * |
| 1253 | * Interrupt service routine for io-mapped controllers. | 1252 | * Interrupt service routine for io-mapped controllers. |
| 1254 | * Find out if our device is interrupting. If yes, acknowledge the interrupt | 1253 | * Find out if our device is interrupting. If yes, acknowledge the interrupt |
| @@ -1323,8 +1322,8 @@ megaraid_isr_iomapped(int irq, void *devp) · 68 unmodified lines | |||
| 1323 | 1322 | ||
| 1324 | /** | 1323 | /** |
| 1325 | * megaraid_isr_memmapped() | 1324 | * megaraid_isr_memmapped() |
| 1326 | * @irq - irq | 1325 | * @irq: irq |
| 1327 | * @devp - pointer to our soft state | 1326 | * @devp: pointer to our soft state |
| 1328 | * | 1327 | * |
| 1329 | * Interrupt service routine for memory-mapped controllers. | 1328 | * Interrupt service routine for memory-mapped controllers. |
| 1330 | * Find out if our device is interrupting. If yes, acknowledge the interrupt | 1329 | * Find out if our device is interrupting. If yes, acknowledge the interrupt |
| @@ -1401,10 +1400,10 @@ megaraid_isr_memmapped(int irq, void *devp) · 70 unmodified lines | |||
| 1401 | } | 1400 | } |
| 1402 | /** | 1401 | /** |
| 1403 | * mega_cmd_done() | 1402 | * mega_cmd_done() |
| 1404 | * @adapter - pointer to our soft state | 1403 | * @adapter: pointer to our soft state |
| 1405 | * @completed - array of ids of completed commands | 1404 | * @completed: array of ids of completed commands |
| 1406 | * @nstatus - number of completed commands | 1405 | * @nstatus: number of completed commands |
| 1407 | * @status - status of the last command completed | 1406 | * @status: status of the last command completed |
| 1408 | * | 1407 | * |
| 1409 | * Complete the commands and call the scsi mid-layer callback hooks. | 1408 | * Complete the commands and call the scsi mid-layer callback hooks. |
| 1410 | */ | 1409 | */ |
| @@ -1921,9 +1920,9 @@ megaraid_reset(struct scsi_cmnd *cmd) · 510 unmodified lines | |||
| 1921 | 1920 | ||
| 1922 | /** | 1921 | /** |
| 1923 | * megaraid_abort_and_reset() | 1922 | * megaraid_abort_and_reset() |
| 1924 | * @adapter - megaraid soft state | 1923 | * @adapter: megaraid soft state |
| 1925 | * @cmd - scsi command to be aborted or reset | 1924 | * @cmd: scsi command to be aborted or reset |
| 1926 | * @aor - abort or reset flag | 1925 | * @aor: abort or reset flag |
| 1927 | * | 1926 | * |
| 1928 | * Try to locate the scsi command in the pending queue. If found and is not | 1927 | * Try to locate the scsi command in the pending queue. If found and is not |
| 1929 | * issued to the controller, abort/reset it. Otherwise return failure | 1928 | * issued to the controller, abort/reset it. Otherwise return failure |
| @@ -2021,8 +2020,8 @@ free_local_pdev(struct pci_dev *pdev) · 91 unmodified lines | |||
| 2021 | 2020 | ||
| 2022 | /** | 2021 | /** |
| 2023 | * mega_allocate_inquiry() | 2022 | * mega_allocate_inquiry() |
| 2024 | * @dma_handle - handle returned for dma address | 2023 | * @dma_handle: handle returned for dma address |
| 2025 | * @pdev - handle to pci device | 2024 | * @pdev: handle to pci device |
| 2026 | * | 2025 | * |
| 2027 | * allocates memory for inquiry structure | 2026 | * allocates memory for inquiry structure |
| 2028 | */ | 2027 | */ |
| @@ -2045,8 +2044,8 @@ mega_free_inquiry(void *inquiry, dma_addr_t dma_handle, struct pci_dev *pdev) · 16 unmodified lines | |||
| 2045 | 2044 | ||
| 2046 | /** | 2045 | /** |
| 2047 | * proc_show_config() | 2046 | * proc_show_config() |
| 2048 | * @m - Synthetic file construction data | 2047 | * @m: Synthetic file construction data |
| 2049 | * @v - File iterator | 2048 | * @v: File iterator |
| 2050 | * | 2049 | * |
| 2051 | * Display configuration information about the controller. | 2050 | * Display configuration information about the controller. |
| 2052 | */ | 2051 | */ |
| @@ -2109,8 +2108,8 @@ proc_show_config(struct seq_file *m, void *v) · 56 unmodified lines | |||
| 2109 | 2108 | ||
| 2110 | /** | 2109 | /** |
| 2111 | * proc_show_stat() | 2110 | * proc_show_stat() |
| 2112 | * @m - Synthetic file construction data | 2111 | * @m: Synthetic file construction data |
| 2113 | * @v - File iterator | 2112 | * @v: File iterator |
| 2114 | * | 2113 | * |
| 2115 | * Display statistical information about the I/O activity. | 2114 | * Display statistical information about the I/O activity. |
| 2116 | */ | 2115 | */ |
| @@ -2143,8 +2142,8 @@ proc_show_stat(struct seq_file *m, void *v) · 26 unmodified lines | |||
| 2143 | 2142 | ||
| 2144 | /** | 2143 | /** |
| 2145 | * proc_show_mbox() | 2144 | * proc_show_mbox() |
| 2146 | * @m - Synthetic file construction data | 2145 | * @m: Synthetic file construction data |
| 2147 | * @v - File iterator | 2146 | * @v: File iterator |
| 2148 | * | 2147 | * |
| 2149 | * Display mailbox information for the last command issued. This information | 2148 | * Display mailbox information for the last command issued. This information |
| 2150 | * is good for debugging. | 2149 | * is good for debugging. |
| @@ -2171,8 +2170,8 @@ proc_show_mbox(struct seq_file *m, void *v) · 20 unmodified lines | |||
| 2171 | 2170 | ||
| 2172 | /** | 2171 | /** |
| 2173 | * proc_show_rebuild_rate() | 2172 | * proc_show_rebuild_rate() |
| 2174 | * @m - Synthetic file construction data | 2173 | * @m: Synthetic file construction data |
| 2175 | * @v - File iterator | 2174 | * @v: File iterator |
| 2176 | * | 2175 | * |
| 2177 | * Display current rebuild rate | 2176 | * Display current rebuild rate |
| 2178 | */ | 2177 | */ |
| @@ -2214,8 +2213,8 @@ free_pdev: · 35 unmodified lines | |||
| 2214 | 2213 | ||
| 2215 | /** | 2214 | /** |
| 2216 | * proc_show_battery() | 2215 | * proc_show_battery() |
| 2217 | * @m - Synthetic file construction data | 2216 | * @m: Synthetic file construction data |
| 2218 | * @v - File iterator | 2217 | * @v: File iterator |
| 2219 | * | 2218 | * |
| 2220 | * Display information about the battery module on the controller. | 2219 | * Display information about the battery module on the controller. |
| 2221 | */ | 2220 | */ |
| @@ -2317,9 +2316,9 @@ mega_print_inquiry(struct seq_file *m, char *scsi_inq) · 95 unmodified lines | |||
| 2317 | 2316 | ||
| 2318 | /** | 2317 | /** |
| 2319 | * proc_show_pdrv() | 2318 | * proc_show_pdrv() |
| 2320 | * @m - Synthetic file construction data | 2319 | * @m: Synthetic file construction data |
| 2321 | * @page - buffer to write the data in | 2320 | * @adapter: pointer to our soft state |
| 2322 | * @adapter - pointer to our soft state | 2321 | * @channel: channel |
| 2323 | * | 2322 | * |
| 2324 | * Display information about the physical drives. | 2323 | * Display information about the physical drives. |
| 2325 | */ | 2324 | */ |
| @@ -2433,8 +2432,8 @@ free_pdev: · 107 unmodified lines | |||
| 2433 | 2432 | ||
| 2434 | /** | 2433 | /** |
| 2435 | * proc_show_pdrv_ch0() | 2434 | * proc_show_pdrv_ch0() |
| 2436 | * @m - Synthetic file construction data | 2435 | * @m: Synthetic file construction data |
| 2437 | * @v - File iterator | 2436 | * @v: File iterator |
| 2438 | * | 2437 | * |
| 2439 | * Display information about the physical drives on physical channel 0. | 2438 | * Display information about the physical drives on physical channel 0. |
| 2440 | */ | 2439 | */ |
| @@ -2447,8 +2446,8 @@ proc_show_pdrv_ch0(struct seq_file *m, void *v) · 6 unmodified lines | |||
| 2447 | 2446 | ||
| 2448 | /** | 2447 | /** |
| 2449 | * proc_show_pdrv_ch1() | 2448 | * proc_show_pdrv_ch1() |
| 2450 | * @m - Synthetic file construction data | 2449 | * @m: Synthetic file construction data |
| 2451 | * @v - File iterator | 2450 | * @v: File iterator |
| 2452 | * | 2451 | * |
| 2453 | * Display information about the physical drives on physical channel 1. | 2452 | * Display information about the physical drives on physical channel 1. |
| 2454 | */ | 2453 | */ |
| @@ -2461,8 +2460,8 @@ proc_show_pdrv_ch1(struct seq_file *m, void *v) · 6 unmodified lines | |||
| 2461 | 2460 | ||
| 2462 | /** | 2461 | /** |
| 2463 | * proc_show_pdrv_ch2() | 2462 | * proc_show_pdrv_ch2() |
| 2464 | * @m - Synthetic file construction data | 2463 | * @m: Synthetic file construction data |
| 2465 | * @v - File iterator | 2464 | * @v: File iterator |
| 2466 | * | 2465 | * |
| 2467 | * Display information about the physical drives on physical channel 2. | 2466 | * Display information about the physical drives on physical channel 2. |
| 2468 | */ | 2467 | */ |
| @@ -2475,8 +2474,8 @@ proc_show_pdrv_ch2(struct seq_file *m, void *v) · 6 unmodified lines | |||
| 2475 | 2474 | ||
| 2476 | /** | 2475 | /** |
| 2477 | * proc_show_pdrv_ch3() | 2476 | * proc_show_pdrv_ch3() |
| 2478 | * @m - Synthetic file construction data | 2477 | * @m: Synthetic file construction data |
| 2479 | * @v - File iterator | 2478 | * @v: File iterator |
| 2480 | * | 2479 | * |
| 2481 | * Display information about the physical drives on physical channel 3. | 2480 | * Display information about the physical drives on physical channel 3. |
| 2482 | */ | 2481 | */ |
| @@ -2489,10 +2488,10 @@ proc_show_pdrv_ch3(struct seq_file *m, void *v) · 6 unmodified lines | |||
| 2489 | 2488 | ||
| 2490 | /** | 2489 | /** |
| 2491 | * proc_show_rdrv() | 2490 | * proc_show_rdrv() |
| 2492 | * @m - Synthetic file construction data | 2491 | * @m: Synthetic file construction data |
| 2493 | * @adapter - pointer to our soft state | 2492 | * @adapter: pointer to our soft state |
| 2494 | * @start - starting logical drive to display | 2493 | * @start: starting logical drive to display |
| 2495 | * @end - ending logical drive to display | 2494 | * @end: ending logical drive to display |
| 2496 | * | 2495 | * |
| 2497 | * We do not print the inquiry information since its already available through | 2496 | * We do not print the inquiry information since its already available through |
| 2498 | * /proc/scsi/scsi interface | 2497 | * /proc/scsi/scsi interface |
| @@ -2674,8 +2673,8 @@ free_pdev: · 175 unmodified lines | |||
| 2674 | 2673 | ||
| 2675 | /** | 2674 | /** |
| 2676 | * proc_show_rdrv_10() | 2675 | * proc_show_rdrv_10() |
| 2677 | * @m - Synthetic file construction data | 2676 | * @m: Synthetic file construction data |
| 2678 | * @v - File iterator | 2677 | * @v: File iterator |
| 2679 | * | 2678 | * |
| 2680 | * Display real time information about the logical drives 0 through 9. | 2679 | * Display real time information about the logical drives 0 through 9. |
| 2681 | */ | 2680 | */ |
| @@ -2688,8 +2687,8 @@ proc_show_rdrv_10(struct seq_file *m, void *v) · 6 unmodified lines | |||
| 2688 | 2687 | ||
| 2689 | /** | 2688 | /** |
| 2690 | * proc_show_rdrv_20() | 2689 | * proc_show_rdrv_20() |
| 2691 | * @m - Synthetic file construction data | 2690 | * @m: Synthetic file construction data |
| 2692 | * @v - File iterator | 2691 | * @v: File iterator |
| 2693 | * | 2692 | * |
| 2694 | * Display real time information about the logical drives 0 through 9. | 2693 | * Display real time information about the logical drives 0 through 9. |
| 2695 | */ | 2694 | */ |
| @@ -2702,8 +2701,8 @@ proc_show_rdrv_20(struct seq_file *m, void *v) · 6 unmodified lines | |||
| 2702 | 2701 | ||
| 2703 | /** | 2702 | /** |
| 2704 | * proc_show_rdrv_30() | 2703 | * proc_show_rdrv_30() |
| 2705 | * @m - Synthetic file construction data | 2704 | * @m: Synthetic file construction data |
| 2706 | * @v - File iterator | 2705 | * @v: File iterator |
| 2707 | * | 2706 | * |
| 2708 | * Display real time information about the logical drives 0 through 9. | 2707 | * Display real time information about the logical drives 0 through 9. |
| 2709 | */ | 2708 | */ |
| @@ -2716,8 +2715,8 @@ proc_show_rdrv_30(struct seq_file *m, void *v) · 6 unmodified lines | |||
| 2716 | 2715 | ||
| 2717 | /** | 2716 | /** |
| 2718 | * proc_show_rdrv_40() | 2717 | * proc_show_rdrv_40() |
| 2719 | * @m - Synthetic file construction data | 2718 | * @m: Synthetic file construction data |
| 2720 | * @v - File iterator | 2719 | * @v: File iterator |
| 2721 | * | 2720 | * |
| 2722 | * Display real time information about the logical drives 0 through 9. | 2721 | * Display real time information about the logical drives 0 through 9. |
| 2723 | */ | 2722 | */ |
| @@ -2729,8 +2728,8 @@ proc_show_rdrv_40(struct seq_file *m, void *v) · 5 unmodified lines | |||
| 2729 | 2728 | ||
| 2730 | /** | 2729 | /** |
| 2731 | * mega_create_proc_entry() | 2730 | * mega_create_proc_entry() |
| 2732 | * @index - index in soft state array | 2731 | * @index: index in soft state array |
| 2733 | * @parent - parent node for this /proc entry | 2732 | * @parent: parent node for this /proc entry |
| 2734 | * | 2733 | * |
| 2735 | * Creates /proc entries for our controllers. | 2734 | * Creates /proc entries for our controllers. |
| 2736 | */ | 2735 | */ |
| @@ -2785,7 +2784,7 @@ static inline void mega_create_proc_entry(int index, struct proc_dir_entry *pare · 48 unmodified lines | |||
| 2785 | #endif | 2784 | #endif |
| 2786 | 2785 | ||
| 2787 | 2786 | ||
| 2788 | /** | 2787 | /* |
| 2789 | * megaraid_biosparam() | 2788 | * megaraid_biosparam() |
| 2790 | * | 2789 | * |
| 2791 | * Return the disk geometry for a particular disk | 2790 | * Return the disk geometry for a particular disk |
| @@ -2854,7 +2853,7 @@ megaraid_biosparam(struct scsi_device *sdev, struct block_device *bdev, · 62 unmodified lines | |||
| 2854 | 2853 | ||
| 2855 | /** | 2854 | /** |
| 2856 | * mega_init_scb() | 2855 | * mega_init_scb() |
| 2857 | * @adapter - pointer to our soft state | 2856 | * @adapter: pointer to our soft state |
| 2858 | * | 2857 | * |
| 2859 | * Allocate memory for the various pointers in the scb structures: | 2858 | * Allocate memory for the various pointers in the scb structures: |
| 2860 | * scatter-gather list pointer, passthru and extended passthru structure | 2859 | * scatter-gather list pointer, passthru and extended passthru structure |
| @@ -2934,8 +2933,8 @@ mega_init_scb(adapter_t *adapter) · 73 unmodified lines | |||
| 2934 | 2933 | ||
| 2935 | /** | 2934 | /** |
| 2936 | * megadev_open() | 2935 | * megadev_open() |
| 2937 | * @inode - unused | 2936 | * @inode: unused |
| 2938 | * @filep - unused | 2937 | * @filep: unused |
| 2939 | * | 2938 | * |
| 2940 | * Routines for the character/ioctl interface to the driver. Find out if this | 2939 | * Routines for the character/ioctl interface to the driver. Find out if this |
| 2941 | * is a valid open. | 2940 | * is a valid open. |
| @@ -2954,10 +2953,9 @@ megadev_open (struct inode *inode, struct file *filep) · 12 unmodified lines | |||
| 2954 | 2953 | ||
| 2955 | /** | 2954 | /** |
| 2956 | * megadev_ioctl() | 2955 | * megadev_ioctl() |
| 2957 | * @inode - Our device inode | 2956 | * @filep: Our device file |
| 2958 | * @filep - unused | 2957 | * @cmd: ioctl command |
| 2959 | * @cmd - ioctl command | 2958 | * @arg: user buffer |
| 2960 | * @arg - user buffer | ||
| 2961 | * | 2959 | * |
| 2962 | * ioctl entry point for our private ioctl interface. We move the data in from | 2960 | * ioctl entry point for our private ioctl interface. We move the data in from |
| 2963 | * the user space, prepare the command (if necessary, convert the old MIMD | 2961 | * the user space, prepare the command (if necessary, convert the old MIMD |
| @@ -2977,14 +2975,13 @@ megadev_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) · 13 unmodified lines | |||
| 2977 | void *data = NULL; /* data to be transferred */ | 2975 | void *data = NULL; /* data to be transferred */ |
| 2978 | dma_addr_t data_dma_hndl; /* dma handle for data xfer area */ | 2976 | dma_addr_t data_dma_hndl; /* dma handle for data xfer area */ |
| 2979 | megacmd_t mc; | 2977 | megacmd_t mc; |
| 2980 | megastat_t __user *ustats; | 2978 | #if MEGA_HAVE_STATS |
| 2981 | int num_ldrv; | 2979 | megastat_t __user *ustats = NULL; |
| 2980 | int num_ldrv = 0; | ||
| 2981 | #endif | ||
| 2982 | u32 uxferaddr = 0; | 2982 | u32 uxferaddr = 0; |
| 2983 | struct pci_dev *pdev; | 2983 | struct pci_dev *pdev; |
| 2984 | 2984 | ||
| 2985 | ustats = NULL; /* avoid compilation warnings */ | ||
| 2986 | num_ldrv = 0; | ||
| 2987 | |||
| 2988 | /* | 2985 | /* |
| 2989 | * Make sure only USCSICMD are issued through this interface. | 2986 | * Make sure only USCSICMD are issued through this interface. |
| 2990 | * MIMD application would still fire different command. | 2987 | * MIMD application would still fire different command. |
| @@ -3370,8 +3367,8 @@ megadev_unlocked_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) · 379 unmodified lines | |||
| 3370 | 3367 | ||
| 3371 | /** | 3368 | /** |
| 3372 | * mega_m_to_n() | 3369 | * mega_m_to_n() |
| 3373 | * @arg - user address | 3370 | * @arg: user address |
| 3374 | * @uioc - new ioctl structure | 3371 | * @uioc: new ioctl structure |
| 3375 | * | 3372 | * |
| 3376 | * A thin layer to convert older mimd interface ioctl structure to NIT ioctl | 3373 | * A thin layer to convert older mimd interface ioctl structure to NIT ioctl |
| 3377 | * structure | 3374 | * structure |
| @@ -3498,8 +3495,8 @@ mega_m_to_n(void __user *arg, nitioctl_t *uioc) · 120 unmodified lines | |||
| 3498 | 3495 | ||
| 3499 | /* | 3496 | /* |
| 3500 | * mega_n_to_m() | 3497 | * mega_n_to_m() |
| 3501 | * @arg - user address | 3498 | * @arg: user address |
| 3502 | * @mc - mailbox command | 3499 | * @mc: mailbox command |
| 3503 | * | 3500 | * |
| 3504 | * Updates the status information to the application, depending on application | 3501 | * Updates the status information to the application, depending on application |
| 3505 | * conforms to older mimd ioctl interface or newer NIT ioctl interface | 3502 | * conforms to older mimd ioctl interface or newer NIT ioctl interface |
| @@ -3565,7 +3562,7 @@ mega_n_to_m(void __user *arg, megacmd_t *mc) · 59 unmodified lines | |||
| 3565 | 3562 | ||
| 3566 | /** | 3563 | /** |
| 3567 | * mega_is_bios_enabled() | 3564 | * mega_is_bios_enabled() |
| 3568 | * @adapter - pointer to our soft state | 3565 | * @adapter: pointer to our soft state |
| 3569 | * | 3566 | * |
| 3570 | * issue command to find out if the BIOS is enabled for this controller | 3567 | * issue command to find out if the BIOS is enabled for this controller |
| 3571 | */ | 3568 | */ |
| @@ -3574,7 +3571,6 @@ mega_is_bios_enabled(adapter_t *adapter) · 2 unmodified lines | |||
| 3574 | { | 3571 | { |
| 3575 | unsigned char raw_mbox[sizeof(struct mbox_out)]; | 3572 | unsigned char raw_mbox[sizeof(struct mbox_out)]; |
| 3576 | mbox_t *mbox; | 3573 | mbox_t *mbox; |
| 3577 | int ret; | ||
| 3578 | 3574 | ||
| 3579 | mbox = (mbox_t *)raw_mbox; | 3575 | mbox = (mbox_t *)raw_mbox; |
| 3580 | 3576 | ||
| @@ -3587,8 +3583,7 @@ mega_is_bios_enabled(adapter_t *adapter) · 6 unmodified lines | |||
| 3587 | raw_mbox[0] = IS_BIOS_ENABLED; | 3583 | raw_mbox[0] = IS_BIOS_ENABLED; |
| 3588 | raw_mbox[2] = GET_BIOS; | 3584 | raw_mbox[2] = GET_BIOS; |
| 3589 | 3585 | ||
| 3590 | 3586 | issue_scb_block(adapter, raw_mbox); | |
| 3591 | ret = issue_scb_block(adapter, raw_mbox); | ||
| 3592 | 3587 | ||
| 3593 | return *(char *)adapter->mega_buffer; | 3588 | return *(char *)adapter->mega_buffer; |
| 3594 | } | 3589 | } |
| @@ -3596,7 +3591,7 @@ mega_is_bios_enabled(adapter_t *adapter) · 1 unmodified line | |||
| 3596 | 3591 | ||
| 3597 | /** | 3592 | /** |
| 3598 | * mega_enum_raid_scsi() | 3593 | * mega_enum_raid_scsi() |
| 3599 | * @adapter - pointer to our soft state | 3594 | * @adapter: pointer to our soft state |
| 3600 | * | 3595 | * |
| 3601 | * Find out what channels are RAID/SCSI. This information is used to | 3596 | * Find out what channels are RAID/SCSI. This information is used to |
| 3602 | * differentiate the virtual channels and physical channels and to support | 3597 | * differentiate the virtual channels and physical channels and to support |
| @@ -3651,7 +3646,7 @@ mega_enum_raid_scsi(adapter_t *adapter) · 48 unmodified lines | |||
| 3651 | 3646 | ||
| 3652 | /** | 3647 | /** |
| 3653 | * mega_get_boot_drv() | 3648 | * mega_get_boot_drv() |
| 3654 | * @adapter - pointer to our soft state | 3649 | * @adapter: pointer to our soft state |
| 3655 | * | 3650 | * |
| 3656 | * Find out which device is the boot device. Note, any logical drive or any | 3651 | * Find out which device is the boot device. Note, any logical drive or any |
| 3657 | * phyical device (e.g., a CDROM) can be designated as a boot device. | 3652 | * phyical device (e.g., a CDROM) can be designated as a boot device. |
| @@ -3718,7 +3713,7 @@ mega_get_boot_drv(adapter_t *adapter) · 60 unmodified lines | |||
| 3718 | 3713 | ||
| 3719 | /** | 3714 | /** |
| 3720 | * mega_support_random_del() | 3715 | * mega_support_random_del() |
| 3721 | * @adapter - pointer to our soft state | 3716 | * @adapter: pointer to our soft state |
| 3722 | * | 3717 | * |
| 3723 | * Find out if this controller supports random deletion and addition of | 3718 | * Find out if this controller supports random deletion and addition of |
| 3724 | * logical drives | 3719 | * logical drives |
| @@ -3748,7 +3743,7 @@ mega_support_random_del(adapter_t *adapter) · 23 unmodified lines | |||
| 3748 | 3743 | ||
| 3749 | /** | 3744 | /** |
| 3750 | * mega_support_ext_cdb() | 3745 | * mega_support_ext_cdb() |
| 3751 | * @adapter - pointer to our soft state | 3746 | * @adapter: pointer to our soft state |
| 3752 | * | 3747 | * |
| 3753 | * Find out if this firmware support cdblen > 10 | 3748 | * Find out if this firmware support cdblen > 10 |
| 3754 | */ | 3749 | */ |
| @@ -3776,8 +3771,8 @@ mega_support_ext_cdb(adapter_t *adapter) · 21 unmodified lines | |||
| 3776 | 3771 | ||
| 3777 | /** | 3772 | /** |
| 3778 | * mega_del_logdrv() | 3773 | * mega_del_logdrv() |
| 3779 | * @adapter - pointer to our soft state | 3774 | * @adapter: pointer to our soft state |
| 3780 | * @logdrv - logical drive to be deleted | 3775 | * @logdrv: logical drive to be deleted |
| 3781 | * | 3776 | * |
| 3782 | * Delete the specified logical drive. It is the responsibility of the user | 3777 | * Delete the specified logical drive. It is the responsibility of the user |
| 3783 | * app to let the OS know about this operation. | 3778 | * app to let the OS know about this operation. |
| @@ -3862,7 +3857,7 @@ mega_do_del_logdrv(adapter_t *adapter, int logdrv) · 78 unmodified lines | |||
| 3862 | 3857 | ||
| 3863 | /** | 3858 | /** |
| 3864 | * mega_get_max_sgl() | 3859 | * mega_get_max_sgl() |
| 3865 | * @adapter - pointer to our soft state | 3860 | * @adapter: pointer to our soft state |
| 3866 | * | 3861 | * |
| 3867 | * Find out the maximum number of scatter-gather elements supported by this | 3862 | * Find out the maximum number of scatter-gather elements supported by this |
| 3868 | * version of the firmware | 3863 | * version of the firmware |
| @@ -3908,7 +3903,7 @@ mega_get_max_sgl(adapter_t *adapter) · 39 unmodified lines | |||
| 3908 | 3903 | ||
| 3909 | /** | 3904 | /** |
| 3910 | * mega_support_cluster() | 3905 | * mega_support_cluster() |
| 3911 | * @adapter - pointer to our soft state | 3906 | * @adapter: pointer to our soft state |
| 3912 | * | 3907 | * |
| 3913 | * Find out if this firmware support cluster calls. | 3908 | * Find out if this firmware support cluster calls. |
| 3914 | */ | 3909 | */ |
| @@ -3950,8 +3945,8 @@ mega_support_cluster(adapter_t *adapter) · 35 unmodified lines | |||
| 3950 | #ifdef CONFIG_PROC_FS | 3945 | #ifdef CONFIG_PROC_FS |
| 3951 | /** | 3946 | /** |
| 3952 | * mega_adapinq() | 3947 | * mega_adapinq() |
| 3953 | * @adapter - pointer to our soft state | 3948 | * @adapter: pointer to our soft state |
| 3954 | * @dma_handle - DMA address of the buffer | 3949 | * @dma_handle: DMA address of the buffer |
| 3955 | * | 3950 | * |
| 3956 | * Issue internal commands while interrupts are available. | 3951 | * Issue internal commands while interrupts are available. |
| 3957 | * We only issue direct mailbox commands from within the driver. ioctl() | 3952 | * We only issue direct mailbox commands from within the driver. ioctl() |
| @@ -3983,11 +3978,12 @@ mega_adapinq(adapter_t *adapter, dma_addr_t dma_handle) · 25 unmodified lines | |||
| 3983 | } | 3978 | } |
| 3984 | 3979 | ||
| 3985 | 3980 | ||
| 3986 | /** mega_internal_dev_inquiry() | 3981 | /** |
| 3987 | * @adapter - pointer to our soft state | 3982 | * mega_internal_dev_inquiry() |
| 3988 | * @ch - channel for this device | 3983 | * @adapter: pointer to our soft state |
| 3989 | * @tgt - ID of this device | 3984 | * @ch: channel for this device |
| 3990 | * @buf_dma_handle - DMA address of the buffer | 3985 | * @tgt: ID of this device |
| 3986 | * @buf_dma_handle: DMA address of the buffer | ||
| 3991 | * | 3987 | * |
| 3992 | * Issue the scsi inquiry for the specified device. | 3988 | * Issue the scsi inquiry for the specified device. |
| 3993 | */ | 3989 | */ |
| @@ -4056,9 +4052,9 @@ mega_internal_dev_inquiry(adapter_t *adapter, u8 ch, u8 tgt, · 62 unmodified lines | |||
| 4056 | 4052 | ||
| 4057 | /** | 4053 | /** |
| 4058 | * mega_internal_command() | 4054 | * mega_internal_command() |
| 4059 | * @adapter - pointer to our soft state | 4055 | * @adapter: pointer to our soft state |
| 4060 | * @mc - the mailbox command | 4056 | * @mc: the mailbox command |
| 4061 | * @pthru - Passthru structure for DCDB commands | 4057 | * @pthru: Passthru structure for DCDB commands |
| 4062 | * | 4058 | * |
| 4063 | * Issue the internal commands in interrupt mode. | 4059 | * Issue the internal commands in interrupt mode. |
| 4064 | * The last argument is the address of the passthru structure if the command | 4060 | * The last argument is the address of the passthru structure if the command |
| @@ -3304,7 +3304,6 @@ blocked_mailbox: · 3303 unmodified lines | |||
| 3304 | * megaraid_mbox_display_scb - display SCB information, mostly debug purposes | 3304 | * megaraid_mbox_display_scb - display SCB information, mostly debug purposes |
| 3305 | * @adapter : controller's soft state | 3305 | * @adapter : controller's soft state |
| 3306 | * @scb : SCB to be displayed | 3306 | * @scb : SCB to be displayed |
| 3307 | * @level : debug level for console print | ||
| 3308 | * | 3307 | * |
| 3309 | * Diplay information about the given SCB iff the current debug level is | 3308 | * Diplay information about the given SCB iff the current debug level is |
| 3310 | * verbose. | 3309 | * verbose. |
| @@ -3972,7 +3971,8 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter) · 661 unmodified lines | |||
| 3972 | 3971 | ||
| 3973 | /** | 3972 | /** |
| 3974 | * megaraid_sysfs_show_app_hndl - display application handle for this adapter | 3973 | * megaraid_sysfs_show_app_hndl - display application handle for this adapter |
| 3975 | * @cdev : class device object representation for the host | 3974 | * @dev : class device object representation for the host |
| 3975 | * @attr : device attribute (unused) | ||
| 3976 | * @buf : buffer to send data to | 3976 | * @buf : buffer to send data to |
| 3977 | * | 3977 | * |
| 3978 | * Display the handle used by the applications while executing management | 3978 | * Display the handle used by the applications while executing management |
| @@ -95,7 +95,6 @@ mraid_mm_open(struct inode *inode, struct file *filep) · 94 unmodified lines | |||
| 95 | 95 | ||
| 96 | /** | 96 | /** |
| 97 | * mraid_mm_ioctl - module entry-point for ioctls | 97 | * mraid_mm_ioctl - module entry-point for ioctls |
| 98 | * @inode : inode (ignored) | ||
| 99 | * @filep : file operations pointer (ignored) | 98 | * @filep : file operations pointer (ignored) |
| 100 | * @cmd : ioctl command | 99 | * @cmd : ioctl command |
| 101 | * @arg : user ioctl packet | 100 | * @arg : user ioctl packet |
| @@ -2709,4 +2709,24 @@ int megasas_adp_reset_wait_for_ready(struct megasas_instance *instance, · 2708 unmodified lines | |||
| 2709 | int ocr_context); | 2709 | int ocr_context); |
| 2710 | int megasas_irqpoll(struct irq_poll *irqpoll, int budget); | 2710 | int megasas_irqpoll(struct irq_poll *irqpoll, int budget); |
| 2711 | void megasas_dump_fusion_io(struct scsi_cmnd *scmd); | 2711 | void megasas_dump_fusion_io(struct scsi_cmnd *scmd); |
| 2712 | u32 megasas_readl(struct megasas_instance *instance, | ||
| 2713 | const volatile void __iomem *addr); | ||
| 2714 | struct megasas_cmd *megasas_get_cmd(struct megasas_instance *instance); | ||
| 2715 | void megasas_return_cmd(struct megasas_instance *instance, | ||
| 2716 | struct megasas_cmd *cmd); | ||
| 2717 | int megasas_issue_polled(struct megasas_instance *instance, | ||
| 2718 | struct megasas_cmd *cmd); | ||
| 2719 | void megaraid_sas_kill_hba(struct megasas_instance *instance); | ||
| 2720 | void megasas_check_and_restore_queue_depth(struct megasas_instance *instance); | ||
| 2721 | void megasas_start_timer(struct megasas_instance *instance); | ||
| 2722 | int megasas_sriov_start_heartbeat(struct megasas_instance *instance, | ||
| 2723 | int initial); | ||
| 2724 | int megasas_alloc_cmds(struct megasas_instance *instance); | ||
| 2725 | void megasas_free_cmds(struct megasas_instance *instance); | ||
| 2726 | |||
| 2727 | void megasas_init_debugfs(void); | ||
| 2728 | void megasas_exit_debugfs(void); | ||
| 2729 | void megasas_setup_debugfs(struct megasas_instance *instance); | ||
| 2730 | void megasas_destroy_debugfs(struct megasas_instance *instance); | ||
| 2731 | |||
| 2712 | #endif /*LSI_MEGARAID_SAS_H */ | 2732 | #endif /*LSI_MEGARAID_SAS_H */ |
| @@ -202,10 +202,6 @@ static bool support_pci_lane_margining; · 201 unmodified lines | |||
| 202 | static spinlock_t poll_aen_lock; | 202 | static spinlock_t poll_aen_lock; |
| 203 | 203 | ||
| 204 | extern struct dentry *megasas_debugfs_root; | 204 | extern struct dentry *megasas_debugfs_root; |
| 205 | extern void megasas_init_debugfs(void); | ||
| 206 | extern void megasas_exit_debugfs(void); | ||
| 207 | extern void megasas_setup_debugfs(struct megasas_instance *instance); | ||
| 208 | extern void megasas_destroy_debugfs(struct megasas_instance *instance); | ||
| 209 | 205 | ||
| 210 | void | 206 | void |
| 211 | megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, | 207 | megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, |
| @@ -427,14 +423,14 @@ megasas_decode_evt(struct megasas_instance *instance) · 215 unmodified lines | |||
| 427 | evt_detail->description); | 423 | evt_detail->description); |
| 428 | } | 424 | } |
| 429 | 425 | ||
| 430 | /** | 426 | /* |
| 431 | * The following functions are defined for xscale | 427 | * The following functions are defined for xscale |
| 432 | * (deviceid : 1064R, PERC5) controllers | 428 | * (deviceid : 1064R, PERC5) controllers |
| 433 | */ | 429 | */ |
| 434 | 430 | ||
| 435 | /** | 431 | /** |
| 436 | * megasas_enable_intr_xscale - Enables interrupts | 432 | * megasas_enable_intr_xscale - Enables interrupts |
| 437 | * @regs: MFI register set | 433 | * @instance: Adapter soft state |
| 438 | */ | 434 | */ |
| 439 | static inline void | 435 | static inline void |
| 440 | megasas_enable_intr_xscale(struct megasas_instance *instance) | 436 | megasas_enable_intr_xscale(struct megasas_instance *instance) |
| @@ -450,7 +446,7 @@ megasas_enable_intr_xscale(struct megasas_instance *instance) · 9 unmodified lines | |||
| 450 | 446 | ||
| 451 | /** | 447 | /** |
| 452 | * megasas_disable_intr_xscale -Disables interrupt | 448 | * megasas_disable_intr_xscale -Disables interrupt |
| 453 | * @regs: MFI register set | 449 | * @instance: Adapter soft state |
| 454 | */ | 450 | */ |
| 455 | static inline void | 451 | static inline void |
| 456 | megasas_disable_intr_xscale(struct megasas_instance *instance) | 452 | megasas_disable_intr_xscale(struct megasas_instance *instance) |
| @@ -466,7 +462,7 @@ megasas_disable_intr_xscale(struct megasas_instance *instance) · 9 unmodified lines | |||
| 466 | 462 | ||
| 467 | /** | 463 | /** |
| 468 | * megasas_read_fw_status_reg_xscale - returns the current FW status value | 464 | * megasas_read_fw_status_reg_xscale - returns the current FW status value |
| 469 | * @regs: MFI register set | 465 | * @instance: Adapter soft state |
| 470 | */ | 466 | */ |
| 471 | static u32 | 467 | static u32 |
| 472 | megasas_read_fw_status_reg_xscale(struct megasas_instance *instance) | 468 | megasas_read_fw_status_reg_xscale(struct megasas_instance *instance) |
| @@ -475,7 +471,7 @@ megasas_read_fw_status_reg_xscale(struct megasas_instance *instance) · 2 unmodified lines | |||
| 475 | } | 471 | } |
| 476 | /** | 472 | /** |
| 477 | * megasas_clear_interrupt_xscale - Check & clear interrupt | 473 | * megasas_clear_interrupt_xscale - Check & clear interrupt |
| 478 | * @regs: MFI register set | 474 | * @instance: Adapter soft state |
| 479 | */ | 475 | */ |
| 480 | static int | 476 | static int |
| 481 | megasas_clear_intr_xscale(struct megasas_instance *instance) | 477 | megasas_clear_intr_xscale(struct megasas_instance *instance) |
| @@ -509,9 +505,10 @@ megasas_clear_intr_xscale(struct megasas_instance *instance) · 27 unmodified lines | |||
| 509 | 505 | ||
| 510 | /** | 506 | /** |
| 511 | * megasas_fire_cmd_xscale - Sends command to the FW | 507 | * megasas_fire_cmd_xscale - Sends command to the FW |
| 512 | * @frame_phys_addr : Physical address of cmd | 508 | * @instance: Adapter soft state |
| 513 | * @frame_count : Number of frames for the command | 509 | * @frame_phys_addr : Physical address of cmd |
| 514 | * @regs : MFI register set | 510 | * @frame_count : Number of frames for the command |
| 511 | * @regs : MFI register set | ||
| 515 | */ | 512 | */ |
| 516 | static inline void | 513 | static inline void |
| 517 | megasas_fire_cmd_xscale(struct megasas_instance *instance, | 514 | megasas_fire_cmd_xscale(struct megasas_instance *instance, |
| @@ -529,7 +526,8 @@ megasas_fire_cmd_xscale(struct megasas_instance *instance, · 11 unmodified lines | |||
| 529 | 526 | ||
| 530 | /** | 527 | /** |
| 531 | * megasas_adp_reset_xscale - For controller reset | 528 | * megasas_adp_reset_xscale - For controller reset |
| 532 | * @regs: MFI register set | 529 | * @instance: Adapter soft state |
| 530 | * @regs: MFI register set | ||
| 533 | */ | 531 | */ |
| 534 | static int | 532 | static int |
| 535 | megasas_adp_reset_xscale(struct megasas_instance *instance, | 533 | megasas_adp_reset_xscale(struct megasas_instance *instance, |
| @@ -570,7 +568,8 @@ megasas_adp_reset_xscale(struct megasas_instance *instance, · 34 unmodified lines | |||
| 570 | 568 | ||
| 571 | /** | 569 | /** |
| 572 | * megasas_check_reset_xscale - For controller reset check | 570 | * megasas_check_reset_xscale - For controller reset check |
| 573 | * @regs: MFI register set | 571 | * @instance: Adapter soft state |
| 572 | * @regs: MFI register set | ||
| 574 | */ | 573 | */ |
| 575 | static int | 574 | static int |
| 576 | megasas_check_reset_xscale(struct megasas_instance *instance, | 575 | megasas_check_reset_xscale(struct megasas_instance *instance, |
| @@ -599,19 +598,19 @@ static struct megasas_instance_template megasas_instance_template_xscale = { · 22 unmodified lines | |||
| 599 | .issue_dcmd = megasas_issue_dcmd, | 598 | .issue_dcmd = megasas_issue_dcmd, |
| 600 | }; | 599 | }; |
| 601 | 600 | ||
| 602 | /** | 601 | /* |
| 603 | * This is the end of set of functions & definitions specific | 602 | * This is the end of set of functions & definitions specific |
| 604 | * to xscale (deviceid : 1064R, PERC5) controllers | 603 | * to xscale (deviceid : 1064R, PERC5) controllers |
| 605 | */ | 604 | */ |
| 606 | 605 | ||
| 607 | /** | 606 | /* |
| 608 | * The following functions are defined for ppc (deviceid : 0x60) | 607 | * The following functions are defined for ppc (deviceid : 0x60) |
| 609 | * controllers | 608 | * controllers |
| 610 | */ | 609 | */ |
| 611 | 610 | ||
| 612 | /** | 611 | /** |
| 613 | * megasas_enable_intr_ppc - Enables interrupts | 612 | * megasas_enable_intr_ppc - Enables interrupts |
| 614 | * @regs: MFI register set | 613 | * @instance: Adapter soft state |
| 615 | */ | 614 | */ |
| 616 | static inline void | 615 | static inline void |
| 617 | megasas_enable_intr_ppc(struct megasas_instance *instance) | 616 | megasas_enable_intr_ppc(struct megasas_instance *instance) |
| @@ -629,7 +628,7 @@ megasas_enable_intr_ppc(struct megasas_instance *instance) · 11 unmodified lines | |||
| 629 | 628 | ||
| 630 | /** | 629 | /** |
| 631 | * megasas_disable_intr_ppc - Disable interrupt | 630 | * megasas_disable_intr_ppc - Disable interrupt |
| 632 | * @regs: MFI register set | 631 | * @instance: Adapter soft state |
| 633 | */ | 632 | */ |
| 634 | static inline void | 633 | static inline void |
| 635 | megasas_disable_intr_ppc(struct megasas_instance *instance) | 634 | megasas_disable_intr_ppc(struct megasas_instance *instance) |
| @@ -645,7 +644,7 @@ megasas_disable_intr_ppc(struct megasas_instance *instance) · 9 unmodified lines | |||
| 645 | 644 | ||
| 646 | /** | 645 | /** |
| 647 | * megasas_read_fw_status_reg_ppc - returns the current FW status value | 646 | * megasas_read_fw_status_reg_ppc - returns the current FW status value |
| 648 | * @regs: MFI register set | 647 | * @instance: Adapter soft state |
| 649 | */ | 648 | */ |
| 650 | static u32 | 649 | static u32 |
| 651 | megasas_read_fw_status_reg_ppc(struct megasas_instance *instance) | 650 | megasas_read_fw_status_reg_ppc(struct megasas_instance *instance) |
| @@ -655,7 +654,7 @@ megasas_read_fw_status_reg_ppc(struct megasas_instance *instance) · 3 unmodified lines | |||
| 655 | 654 | ||
| 656 | /** | 655 | /** |
| 657 | * megasas_clear_interrupt_ppc - Check & clear interrupt | 656 | * megasas_clear_interrupt_ppc - Check & clear interrupt |
| 658 | * @regs: MFI register set | 657 | * @instance: Adapter soft state |
| 659 | */ | 658 | */ |
| 660 | static int | 659 | static int |
| 661 | megasas_clear_intr_ppc(struct megasas_instance *instance) | 660 | megasas_clear_intr_ppc(struct megasas_instance *instance) |
| @@ -688,9 +687,10 @@ megasas_clear_intr_ppc(struct megasas_instance *instance) · 26 unmodified lines | |||
| 688 | 687 | ||
| 689 | /** | 688 | /** |
| 690 | * megasas_fire_cmd_ppc - Sends command to the FW | 689 | * megasas_fire_cmd_ppc - Sends command to the FW |
| 691 | * @frame_phys_addr : Physical address of cmd | 690 | * @instance: Adapter soft state |
| 692 | * @frame_count : Number of frames for the command | 691 | * @frame_phys_addr: Physical address of cmd |
| 693 | * @regs : MFI register set | 692 | * @frame_count: Number of frames for the command |
| 693 | * @regs: MFI register set | ||
| 694 | */ | 694 | */ |
| 695 | static inline void | 695 | static inline void |
| 696 | megasas_fire_cmd_ppc(struct megasas_instance *instance, | 696 | megasas_fire_cmd_ppc(struct megasas_instance *instance, |
| @@ -708,7 +708,8 @@ megasas_fire_cmd_ppc(struct megasas_instance *instance, · 11 unmodified lines | |||
| 708 | 708 | ||
| 709 | /** | 709 | /** |
| 710 | * megasas_check_reset_ppc - For controller reset check | 710 | * megasas_check_reset_ppc - For controller reset check |
| 711 | * @regs: MFI register set | 711 | * @instance: Adapter soft state |
| 712 | * @regs: MFI register set | ||
| 712 | */ | 713 | */ |
| 713 | static int | 714 | static int |
| 714 | megasas_check_reset_ppc(struct megasas_instance *instance, | 715 | megasas_check_reset_ppc(struct megasas_instance *instance, |
| @@ -738,7 +739,7 @@ static struct megasas_instance_template megasas_instance_template_ppc = { · 23 unmodified lines | |||
| 738 | 739 | ||
| 739 | /** | 740 | /** |
| 740 | * megasas_enable_intr_skinny - Enables interrupts | 741 | * megasas_enable_intr_skinny - Enables interrupts |
| 741 | * @regs: MFI register set | 742 | * @instance: Adapter soft state |
| 742 | */ | 743 | */ |
| 743 | static inline void | 744 | static inline void |
| 744 | megasas_enable_intr_skinny(struct megasas_instance *instance) | 745 | megasas_enable_intr_skinny(struct megasas_instance *instance) |
| @@ -756,7 +757,7 @@ megasas_enable_intr_skinny(struct megasas_instance *instance) · 11 unmodified lines | |||
| 756 | 757 | ||
| 757 | /** | 758 | /** |
| 758 | * megasas_disable_intr_skinny - Disables interrupt | 759 | * megasas_disable_intr_skinny - Disables interrupt |
| 759 | * @regs: MFI register set | 760 | * @instance: Adapter soft state |
| 760 | */ | 761 | */ |
| 761 | static inline void | 762 | static inline void |
| 762 | megasas_disable_intr_skinny(struct megasas_instance *instance) | 763 | megasas_disable_intr_skinny(struct megasas_instance *instance) |
| @@ -772,7 +773,7 @@ megasas_disable_intr_skinny(struct megasas_instance *instance) · 9 unmodified lines | |||
| 772 | 773 | ||
| 773 | /** | 774 | /** |
| 774 | * megasas_read_fw_status_reg_skinny - returns the current FW status value | 775 | * megasas_read_fw_status_reg_skinny - returns the current FW status value |
| 775 | * @regs: MFI register set | 776 | * @instance: Adapter soft state |
| 776 | */ | 777 | */ |
| 777 | static u32 | 778 | static u32 |
| 778 | megasas_read_fw_status_reg_skinny(struct megasas_instance *instance) | 779 | megasas_read_fw_status_reg_skinny(struct megasas_instance *instance) |
| @@ -782,7 +783,7 @@ megasas_read_fw_status_reg_skinny(struct megasas_instance *instance) · 3 unmodified lines | |||
| 782 | 783 | ||
| 783 | /** | 784 | /** |
| 784 | * megasas_clear_interrupt_skinny - Check & clear interrupt | 785 | * megasas_clear_interrupt_skinny - Check & clear interrupt |
| 785 | * @regs: MFI register set | 786 | * @instance: Adapter soft state |
| 786 | */ | 787 | */ |
| 787 | static int | 788 | static int |
| 788 | megasas_clear_intr_skinny(struct megasas_instance *instance) | 789 | megasas_clear_intr_skinny(struct megasas_instance *instance) |
| @@ -825,9 +826,10 @@ megasas_clear_intr_skinny(struct megasas_instance *instance) · 36 unmodified lines | |||
| 825 | 826 | ||
| 826 | /** | 827 | /** |
| 827 | * megasas_fire_cmd_skinny - Sends command to the FW | 828 | * megasas_fire_cmd_skinny - Sends command to the FW |
| 828 | * @frame_phys_addr : Physical address of cmd | 829 | * @instance: Adapter soft state |
| 829 | * @frame_count : Number of frames for the command | 830 | * @frame_phys_addr: Physical address of cmd |
| 830 | * @regs : MFI register set | 831 | * @frame_count: Number of frames for the command |
| 832 | * @regs: MFI register set | ||
| 831 | */ | 833 | */ |
| 832 | static inline void | 834 | static inline void |
| 833 | megasas_fire_cmd_skinny(struct megasas_instance *instance, | 835 | megasas_fire_cmd_skinny(struct megasas_instance *instance, |
| @@ -847,7 +849,8 @@ megasas_fire_cmd_skinny(struct megasas_instance *instance, · 13 unmodified lines | |||
| 847 | 849 | ||
| 848 | /** | 850 | /** |
| 849 | * megasas_check_reset_skinny - For controller reset check | 851 | * megasas_check_reset_skinny - For controller reset check |
| 850 | * @regs: MFI register set | 852 | * @instance: Adapter soft state |
| 853 | * @regs: MFI register set | ||
| 851 | */ | 854 | */ |
| 852 | static int | 855 | static int |
| 853 | megasas_check_reset_skinny(struct megasas_instance *instance, | 856 | megasas_check_reset_skinny(struct megasas_instance *instance, |
| @@ -876,14 +879,14 @@ static struct megasas_instance_template megasas_instance_template_skinny = { · 22 unmodified lines | |||
| 876 | }; | 879 | }; |
| 877 | 880 | ||
| 878 | 881 | ||
| 879 | /** | 882 | /* |
| 880 | * The following functions are defined for gen2 (deviceid : 0x78 0x79) | 883 | * The following functions are defined for gen2 (deviceid : 0x78 0x79) |
| 881 | * controllers | 884 | * controllers |
| 882 | */ | 885 | */ |
| 883 | 886 | ||
| 884 | /** | 887 | /** |
| 885 | * megasas_enable_intr_gen2 - Enables interrupts | 888 | * megasas_enable_intr_gen2 - Enables interrupts |
| 886 | * @regs: MFI register set | 889 | * @instance: Adapter soft state |
| 887 | */ | 890 | */ |
| 888 | static inline void | 891 | static inline void |
| 889 | megasas_enable_intr_gen2(struct megasas_instance *instance) | 892 | megasas_enable_intr_gen2(struct megasas_instance *instance) |
| @@ -902,7 +905,7 @@ megasas_enable_intr_gen2(struct megasas_instance *instance) · 12 unmodified lines | |||
| 902 | 905 | ||
| 903 | /** | 906 | /** |
| 904 | * megasas_disable_intr_gen2 - Disables interrupt | 907 | * megasas_disable_intr_gen2 - Disables interrupt |
| 905 | * @regs: MFI register set | 908 | * @instance: Adapter soft state |
| 906 | */ | 909 | */ |
| 907 | static inline void | 910 | static inline void |
| 908 | megasas_disable_intr_gen2(struct megasas_instance *instance) | 911 | megasas_disable_intr_gen2(struct megasas_instance *instance) |
| @@ -918,7 +921,7 @@ megasas_disable_intr_gen2(struct megasas_instance *instance) · 9 unmodified lines | |||
| 918 | 921 | ||
| 919 | /** | 922 | /** |
| 920 | * megasas_read_fw_status_reg_gen2 - returns the current FW status value | 923 | * megasas_read_fw_status_reg_gen2 - returns the current FW status value |
| 921 | * @regs: MFI register set | 924 | * @instance: Adapter soft state |
| 922 | */ | 925 | */ |
| 923 | static u32 | 926 | static u32 |
| 924 | megasas_read_fw_status_reg_gen2(struct megasas_instance *instance) | 927 | megasas_read_fw_status_reg_gen2(struct megasas_instance *instance) |
| @@ -928,7 +931,7 @@ megasas_read_fw_status_reg_gen2(struct megasas_instance *instance) · 3 unmodified lines | |||
| 928 | 931 | ||
| 929 | /** | 932 | /** |
| 930 | * megasas_clear_interrupt_gen2 - Check & clear interrupt | 933 | * megasas_clear_interrupt_gen2 - Check & clear interrupt |
| 931 | * @regs: MFI register set | 934 | * @instance: Adapter soft state |
| 932 | */ | 935 | */ |
| 933 | static int | 936 | static int |
| 934 | megasas_clear_intr_gen2(struct megasas_instance *instance) | 937 | megasas_clear_intr_gen2(struct megasas_instance *instance) |
| @@ -961,11 +964,13 @@ megasas_clear_intr_gen2(struct megasas_instance *instance) · 26 unmodified lines | |||
| 961 | 964 | ||
| 962 | return mfiStatus; | 965 | return mfiStatus; |
| 963 | } | 966 | } |
| 967 | |||
| 964 | /** | 968 | /** |
| 965 | * megasas_fire_cmd_gen2 - Sends command to the FW | 969 | * megasas_fire_cmd_gen2 - Sends command to the FW |
| 966 | * @frame_phys_addr : Physical address of cmd | 970 | * @instance: Adapter soft state |
| 967 | * @frame_count : Number of frames for the command | 971 | * @frame_phys_addr: Physical address of cmd |
| 968 | * @regs : MFI register set | 972 | * @frame_count: Number of frames for the command |
| 973 | * @regs: MFI register set | ||
| 969 | */ | 974 | */ |
| 970 | static inline void | 975 | static inline void |
| 971 | megasas_fire_cmd_gen2(struct megasas_instance *instance, | 976 | megasas_fire_cmd_gen2(struct megasas_instance *instance, |
| @@ -983,7 +988,8 @@ megasas_fire_cmd_gen2(struct megasas_instance *instance, · 11 unmodified lines | |||
| 983 | 988 | ||
| 984 | /** | 989 | /** |
| 985 | * megasas_adp_reset_gen2 - For controller reset | 990 | * megasas_adp_reset_gen2 - For controller reset |
| 986 | * @regs: MFI register set | 991 | * @instance: Adapter soft state |
| 992 | * @reg_set: MFI register set | ||
| 987 | */ | 993 | */ |
| 988 | static int | 994 | static int |
| 989 | megasas_adp_reset_gen2(struct megasas_instance *instance, | 995 | megasas_adp_reset_gen2(struct megasas_instance *instance, |
| @@ -1043,7 +1049,8 @@ megasas_adp_reset_gen2(struct megasas_instance *instance, · 53 unmodified lines | |||
| 1043 | 1049 | ||
| 1044 | /** | 1050 | /** |
| 1045 | * megasas_check_reset_gen2 - For controller reset check | 1051 | * megasas_check_reset_gen2 - For controller reset check |
| 1046 | * @regs: MFI register set | 1052 | * @instance: Adapter soft state |
| 1053 | * @regs: MFI register set | ||
| 1047 | */ | 1054 | */ |
| 1048 | static int | 1055 | static int |
| 1049 | megasas_check_reset_gen2(struct megasas_instance *instance, | 1056 | megasas_check_reset_gen2(struct megasas_instance *instance, |
| @@ -1071,10 +1078,10 @@ static struct megasas_instance_template megasas_instance_template_gen2 = { · 21 unmodified lines | |||
| 1071 | .issue_dcmd = megasas_issue_dcmd, | 1078 | .issue_dcmd = megasas_issue_dcmd, |
| 1072 | }; | 1079 | }; |
| 1073 | 1080 | ||
| 1074 | /** | 1081 | /* |
| 1075 | * This is the end of set of functions & definitions | 1082 | * This is the end of set of functions & definitions |
| 1076 | * specific to gen2 (deviceid : 0x78, 0x79) controllers | 1083 | * specific to gen2 (deviceid : 0x78, 0x79) controllers |
| 1077 | */ | 1084 | */ |
| 1078 | 1085 | ||
| 1079 | /* | 1086 | /* |
| 1080 | * Template added for TB (Fusion) | 1087 | * Template added for TB (Fusion) |
| @@ -1609,7 +1616,7 @@ megasas_build_ldio(struct megasas_instance *instance, struct scsi_cmnd *scp, · 528 unmodified lines | |||
| 1609 | /** | 1616 | /** |
| 1610 | * megasas_cmd_type - Checks if the cmd is for logical drive/sysPD | 1617 | * megasas_cmd_type - Checks if the cmd is for logical drive/sysPD |
| 1611 | * and whether it's RW or non RW | 1618 | * and whether it's RW or non RW |
| 1612 | * @scmd: SCSI command | 1619 | * @cmd: SCSI command |
| 1613 | * | 1620 | * |
| 1614 | */ | 1621 | */ |
| 1615 | inline int megasas_cmd_type(struct scsi_cmnd *cmd) | 1622 | inline int megasas_cmd_type(struct scsi_cmnd *cmd) |
| @@ -1749,8 +1756,8 @@ out_return_cmd: · 133 unmodified lines | |||
| 1749 | 1756 | ||
| 1750 | /** | 1757 | /** |
| 1751 | * megasas_queue_command - Queue entry point | 1758 | * megasas_queue_command - Queue entry point |
| 1759 | * @shost: adapter SCSI host | ||
| 1752 | * @scmd: SCSI command to be queued | 1760 | * @scmd: SCSI command to be queued |
| 1753 | * @done: Callback entry point | ||
| 1754 | */ | 1761 | */ |
| 1755 | static int | 1762 | static int |
| 1756 | megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) | 1763 | megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) |
| @@ -2916,11 +2923,7 @@ megasas_dump(void *buf, int sz, int format) · 1159 unmodified lines | |||
| 2916 | 2923 | ||
| 2917 | /** | 2924 | /** |
| 2918 | * megasas_dump_reg_set - This function will print hexdump of register set | 2925 | * megasas_dump_reg_set - This function will print hexdump of register set |
| 2919 | * @buf: Buffer to be dumped | 2926 | * @reg_set: Register set to be dumped |
| 2920 | * @sz: Size in bytes | ||
| 2921 | * @format: Different formats of dumping e.g. format=n will | ||
| 2922 | * cause only 'n' 32 bit words to be dumped in a | ||
| 2923 | * single line. | ||
| 2924 | */ | 2927 | */ |
| 2925 | inline void | 2928 | inline void |
| 2926 | megasas_dump_reg_set(void __iomem *reg_set) | 2929 | megasas_dump_reg_set(void __iomem *reg_set) |
| @@ -2997,6 +3000,7 @@ megasas_dump_sys_regs(void __iomem *reg_set, char *buf) · 70 unmodified lines | |||
| 2997 | 3000 | ||
| 2998 | /** | 3001 | /** |
| 2999 | * megasas_reset_bus_host - Bus & host reset handler entry point | 3002 | * megasas_reset_bus_host - Bus & host reset handler entry point |
| 3003 | * @scmd: Mid-layer SCSI command | ||
| 3000 | */ | 3004 | */ |
| 3001 | static int megasas_reset_bus_host(struct scsi_cmnd *scmd) | 3005 | static int megasas_reset_bus_host(struct scsi_cmnd *scmd) |
| 3002 | { | 3006 | { |
| @@ -3777,7 +3781,7 @@ megasas_issue_pending_cmds_again(struct megasas_instance *instance) · 774 unmodified lines | |||
| 3777 | megasas_register_aen(instance, seq_num, class_locale.word); | 3781 | megasas_register_aen(instance, seq_num, class_locale.word); |
| 3778 | } | 3782 | } |
| 3779 | 3783 | ||
| 3780 | /** | 3784 | /* |
| 3781 | * Move the internal reset pending commands to a deferred queue. | 3785 | * Move the internal reset pending commands to a deferred queue. |
| 3782 | * | 3786 | * |
| 3783 | * We move the commands pending at internal reset time to a | 3787 | * We move the commands pending at internal reset time to a |
| @@ -3785,7 +3789,7 @@ megasas_issue_pending_cmds_again(struct megasas_instance *instance) · 1 unmodified line | |||
| 3785 | * completion of the internal reset sequence. if the internal reset | 3789 | * completion of the internal reset sequence. if the internal reset |
| 3786 | * did not complete in time, the kernel reset handler would flush | 3790 | * did not complete in time, the kernel reset handler would flush |
| 3787 | * these commands. | 3791 | * these commands. |
| 3788 | **/ | 3792 | */ |
| 3789 | static void | 3793 | static void |
| 3790 | megasas_internal_reset_defer_cmds(struct megasas_instance *instance) | 3794 | megasas_internal_reset_defer_cmds(struct megasas_instance *instance) |
| 3791 | { | 3795 | { |
| @@ -3963,8 +3967,11 @@ megasas_deplete_reply_queue(struct megasas_instance *instance, · 171 unmodified lines | |||
| 3963 | tasklet_schedule(&instance->isr_tasklet); | 3967 | tasklet_schedule(&instance->isr_tasklet); |
| 3964 | return IRQ_HANDLED; | 3968 | return IRQ_HANDLED; |
| 3965 | } | 3969 | } |
| 3970 | |||
| 3966 | /** | 3971 | /** |
| 3967 | * megasas_isr - isr entry point | 3972 | * megasas_isr - isr entry point |
| 3973 | * @irq: IRQ number | ||
| 3974 | * @devp: IRQ context address | ||
| 3968 | */ | 3975 | */ |
| 3969 | static irqreturn_t megasas_isr(int irq, void *devp) | 3976 | static irqreturn_t megasas_isr(int irq, void *devp) |
| 3970 | { | 3977 | { |
| @@ -3986,6 +3993,7 @@ static irqreturn_t megasas_isr(int irq, void *devp) · 15 unmodified lines | |||
| 3986 | /** | 3993 | /** |
| 3987 | * megasas_transition_to_ready - Move the FW to READY state | 3994 | * megasas_transition_to_ready - Move the FW to READY state |
| 3988 | * @instance: Adapter soft state | 3995 | * @instance: Adapter soft state |
| 3996 | * @ocr: Adapter reset state | ||
| 3989 | * | 3997 | * |
| 3990 | * During the initialization, FW passes can potentially be in any one of | 3998 | * During the initialization, FW passes can potentially be in any one of |
| 3991 | * several possible states. If the FW in operational, waiting-for-handshake | 3999 | * several possible states. If the FW in operational, waiting-for-handshake |
| @@ -4743,7 +4751,7 @@ megasas_get_ld_list(struct megasas_instance *instance) · 751 unmodified lines | |||
| 4743 | /** | 4751 | /** |
| 4744 | * megasas_ld_list_query - Returns FW's ld_list structure | 4752 | * megasas_ld_list_query - Returns FW's ld_list structure |
| 4745 | * @instance: Adapter soft state | 4753 | * @instance: Adapter soft state |
| 4746 | * @ld_list: ld_list structure | 4754 | * @query_type: ld_list structure type |
| 4747 | * | 4755 | * |
| 4748 | * Issues an internal command (DCMD) to get the FW's controller PD | 4756 | * Issues an internal command (DCMD) to get the FW's controller PD |
| 4749 | * list structure. This information is mainly used to find out SYSTEM | 4757 | * list structure. This information is mainly used to find out SYSTEM |
| @@ -5602,9 +5610,13 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe) · 852 unmodified lines | |||
| 5602 | &instance->irq_context[i])) { | 5610 | &instance->irq_context[i])) { |
| 5603 | dev_err(&instance->pdev->dev, | 5611 | dev_err(&instance->pdev->dev, |
| 5604 | "Failed to register IRQ for vector %d.\n", i); | 5612 | "Failed to register IRQ for vector %d.\n", i); |
| 5605 | for (j = 0; j < i; j++) | 5613 | for (j = 0; j < i; j++) { |
| 5614 | if (j < instance->low_latency_index_start) | ||
| 5615 | irq_set_affinity_hint( | ||
| 5616 | pci_irq_vector(pdev, j), NULL); | ||
| 5606 | free_irq(pci_irq_vector(pdev, j), | 5617 | free_irq(pci_irq_vector(pdev, j), |
| 5607 | &instance->irq_context[j]); | 5618 | &instance->irq_context[j]); |
| 5619 | } | ||
| 5608 | /* Retry irq register for IO_APIC*/ | 5620 | /* Retry irq register for IO_APIC*/ |
| 5609 | instance->msix_vectors = 0; | 5621 | instance->msix_vectors = 0; |
| 5610 | instance->msix_load_balance = false; | 5622 | instance->msix_load_balance = false; |
| @@ -5642,6 +5654,9 @@ megasas_destroy_irqs(struct megasas_instance *instance) { · 31 unmodified lines | |||
| 5642 | 5654 | ||
| 5643 | if (instance->msix_vectors) | 5655 | if (instance->msix_vectors) |
| 5644 | for (i = 0; i < instance->msix_vectors; i++) { | 5656 | for (i = 0; i < instance->msix_vectors; i++) { |
| 5657 | if (i < instance->low_latency_index_start) | ||
| 5658 | irq_set_affinity_hint( | ||
| 5659 | pci_irq_vector(instance->pdev, i), NULL); | ||
| 5645 | free_irq(pci_irq_vector(instance->pdev, i), | 5660 | free_irq(pci_irq_vector(instance->pdev, i), |
| 5646 | &instance->irq_context[i]); | 5661 | &instance->irq_context[i]); |
| 5647 | } | 5662 | } |
| @@ -5653,7 +5668,6 @@ megasas_destroy_irqs(struct megasas_instance *instance) { · 5 unmodified lines | |||
| 5653 | /** | 5668 | /** |
| 5654 | * megasas_setup_jbod_map - setup jbod map for FP seq_number. | 5669 | * megasas_setup_jbod_map - setup jbod map for FP seq_number. |
| 5655 | * @instance: Adapter soft state | 5670 | * @instance: Adapter soft state |
| 5656 | * @is_probe: Driver probe check | ||
| 5657 | * | 5671 | * |
| 5658 | * Return 0 on success. | 5672 | * Return 0 on success. |
| 5659 | */ | 5673 | */ |
| @@ -6494,7 +6508,7 @@ dcmd_failed: · 834 unmodified lines | |||
| 6494 | * megasas_register_aen - Registers for asynchronous event notification | 6508 | * megasas_register_aen - Registers for asynchronous event notification |
| 6495 | * @instance: Adapter soft state | 6509 | * @instance: Adapter soft state |
| 6496 | * @seq_num: The starting sequence number | 6510 | * @seq_num: The starting sequence number |
| 6497 | * @class_locale: Class of the event | 6511 | * @class_locale_word: Class of the event |
| 6498 | * | 6512 | * |
| 6499 | * This function subscribes for AEN for events beyond the @seq_num. It requests | 6513 | * This function subscribes for AEN for events beyond the @seq_num. It requests |
| 6500 | * to be notified if and only if the event is of type @class_locale | 6514 | * to be notified if and only if the event is of type @class_locale |
| @@ -7014,8 +7028,9 @@ static inline void megasas_free_ctrl_mem(struct megasas_instance *instance) · 513 unmodified lines | |||
| 7014 | * megasas_alloc_ctrl_dma_buffers - Allocate consistent DMA buffers during | 7028 | * megasas_alloc_ctrl_dma_buffers - Allocate consistent DMA buffers during |
| 7015 | * driver load time | 7029 | * driver load time |
| 7016 | * | 7030 | * |
| 7017 | * @instance- Adapter soft instance | 7031 | * @instance: Adapter soft instance |
| 7018 | * @return- O for SUCCESS | 7032 | * |
| 7033 | * @return: O for SUCCESS | ||
| 7019 | */ | 7034 | */ |
| 7020 | static inline | 7035 | static inline |
| 7021 | int megasas_alloc_ctrl_dma_buffers(struct megasas_instance *instance) | 7036 | int megasas_alloc_ctrl_dma_buffers(struct megasas_instance *instance) |
| @@ -7931,7 +7946,7 @@ skip_firing_dcmds: · 909 unmodified lines | |||
| 7931 | 7946 | ||
| 7932 | /** | 7947 | /** |
| 7933 | * megasas_shutdown - Shutdown entry point | 7948 | * megasas_shutdown - Shutdown entry point |
| 7934 | * @device: Generic device structure | 7949 | * @pdev: Generic device structure |
| 7935 | */ | 7950 | */ |
| 7936 | static void megasas_shutdown(struct pci_dev *pdev) | 7951 | static void megasas_shutdown(struct pci_dev *pdev) |
| 7937 | { | 7952 | { |
| @@ -7956,8 +7971,10 @@ skip_firing_dcmds: · 18 unmodified lines | |||
| 7956 | pci_free_irq_vectors(instance->pdev); | 7971 | pci_free_irq_vectors(instance->pdev); |
| 7957 | } | 7972 | } |
| 7958 | 7973 | ||
| 7959 | /** | 7974 | /* |
| 7960 | * megasas_mgmt_open - char node "open" entry point | 7975 | * megasas_mgmt_open - char node "open" entry point |
| 7976 | * @inode: char node inode | ||
| 7977 | * @filep: char node file | ||
| 7961 | */ | 7978 | */ |
| 7962 | static int megasas_mgmt_open(struct inode *inode, struct file *filep) | 7979 | static int megasas_mgmt_open(struct inode *inode, struct file *filep) |
| 7963 | { | 7980 | { |
| @@ -7970,8 +7987,11 @@ static int megasas_mgmt_open(struct inode *inode, struct file *filep) · 6 unmodified lines | |||
| 7970 | return 0; | 7987 | return 0; |
| 7971 | } | 7988 | } |
| 7972 | 7989 | ||
| 7973 | /** | 7990 | /* |
| 7974 | * megasas_mgmt_fasync - Async notifier registration from applications | 7991 | * megasas_mgmt_fasync - Async notifier registration from applications |
| 7992 | * @fd: char node file descriptor number | ||
| 7993 | * @filep: char node file | ||
| 7994 | * @mode: notifier on/off | ||
| 7975 | * | 7995 | * |
| 7976 | * This function adds the calling process to a driver global queue. When an | 7996 | * This function adds the calling process to a driver global queue. When an |
| 7977 | * event occurs, SIGIO will be sent to all processes in this queue. | 7997 | * event occurs, SIGIO will be sent to all processes in this queue. |
| @@ -7997,9 +8017,11 @@ static int megasas_mgmt_fasync(int fd, struct file *filep, int mode) · 19 unmodified lines | |||
| 7997 | return rc; | 8017 | return rc; |
| 7998 | } | 8018 | } |
| 7999 | 8019 | ||
| 8000 | /** | 8020 | /* |
| 8001 | * megasas_mgmt_poll - char node "poll" entry point | 8021 | * megasas_mgmt_poll - char node "poll" entry point |
| 8002 | * */ | 8022 | * @filep: char node file |
| 8023 | * @wait: Events to poll for | ||
| 8024 | */ | ||
| 8003 | static __poll_t megasas_mgmt_poll(struct file *file, poll_table *wait) | 8025 | static __poll_t megasas_mgmt_poll(struct file *file, poll_table *wait) |
| 8004 | { | 8026 | { |
| 8005 | __poll_t mask; | 8027 | __poll_t mask; |
| @@ -8057,7 +8079,8 @@ static int megasas_set_crash_dump_params_ioctl(struct megasas_cmd *cmd) · 51 unmodified lines | |||
| 8057 | /** | 8079 | /** |
| 8058 | * megasas_mgmt_fw_ioctl - Issues management ioctls to FW | 8080 | * megasas_mgmt_fw_ioctl - Issues management ioctls to FW |
| 8059 | * @instance: Adapter soft state | 8081 | * @instance: Adapter soft state |
| 8060 | * @argp: User's ioctl packet | 8082 | * @user_ioc: User's ioctl packet |
| 8083 | * @ioc: ioctl packet | ||
| 8061 | */ | 8084 | */ |
| 8062 | static int | 8085 | static int |
| 8063 | megasas_mgmt_fw_ioctl(struct megasas_instance *instance, | 8086 | megasas_mgmt_fw_ioctl(struct megasas_instance *instance, |
| @@ -8397,6 +8420,9 @@ static int megasas_mgmt_ioctl_aen(struct file *file, unsigned long arg) · 333 unmodified lines | |||
| 8397 | 8420 | ||
| 8398 | /** | 8421 | /** |
| 8399 | * megasas_mgmt_ioctl - char node ioctl entry point | 8422 | * megasas_mgmt_ioctl - char node ioctl entry point |
| 8423 | * @file: char device file pointer | ||
| 8424 | * @cmd: ioctl command | ||
| 8425 | * @arg: ioctl command arguments address | ||
| 8400 | */ | 8426 | */ |
| 8401 | static long | 8427 | static long |
| 8402 | megasas_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 8428 | megasas_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
| @@ -80,21 +80,20 @@ u32 mega_mod64(u64 dividend, u32 divisor) · 79 unmodified lines | |||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /** | 82 | /** |
| 83 | * @param dividend : Dividend | 83 | * mega_div64_32 - Do a 64-bit division |
| 84 | * @param divisor : Divisor | 84 | * @dividend: Dividend |
| 85 | * @divisor: Divisor | ||
| 85 | * | 86 | * |
| 86 | * @return quotient | 87 | * @return quotient |
| 87 | **/ | 88 | **/ |
| 88 | static u64 mega_div64_32(uint64_t dividend, uint32_t divisor) | 89 | static u64 mega_div64_32(uint64_t dividend, uint32_t divisor) |
| 89 | { | 90 | { |
| 90 | u32 remainder; | 91 | u64 d = dividend; |
| 91 | u64 d; | ||
| 92 | 92 | ||
| 93 | if (!divisor) | 93 | if (!divisor) |
| 94 | printk(KERN_ERR "megasas : DIVISOR is zero in mod fn\n"); | 94 | printk(KERN_ERR "megasas : DIVISOR is zero in mod fn\n"); |
| 95 | 95 | ||
| 96 | d = dividend; | 96 | do_div(d, divisor); |
| 97 | remainder = do_div(d, divisor); | ||
| 98 | 97 | ||
| 99 | return d; | 98 | return d; |
| 100 | } | 99 | } |
| @@ -48,9 +48,6 @@ · 47 unmodified lines | |||
| 48 | #include "megaraid_sas.h" | 48 | #include "megaraid_sas.h" |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | extern void megasas_free_cmds(struct megasas_instance *instance); | ||
| 52 | extern struct megasas_cmd *megasas_get_cmd(struct megasas_instance | ||
| 53 | *instance); | ||
| 54 | extern void | 51 | extern void |
| 55 | megasas_complete_cmd(struct megasas_instance *instance, | 52 | megasas_complete_cmd(struct megasas_instance *instance, |
| 56 | struct megasas_cmd *cmd, u8 alt_status); | 53 | struct megasas_cmd *cmd, u8 alt_status); |
| @@ -58,24 +55,14 @@ int · 1 unmodified line | |||
| 58 | wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd, | 55 | wait_and_poll(struct megasas_instance *instance, struct megasas_cmd *cmd, |
| 59 | int seconds); | 56 | int seconds); |
| 60 | 57 | ||
| 61 | void | ||
| 62 | megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd); | ||
| 63 | int megasas_alloc_cmds(struct megasas_instance *instance); | ||
| 64 | int | 58 | int |
| 65 | megasas_clear_intr_fusion(struct megasas_instance *instance); | 59 | megasas_clear_intr_fusion(struct megasas_instance *instance); |
| 66 | int | ||
| 67 | megasas_issue_polled(struct megasas_instance *instance, | ||
| 68 | struct megasas_cmd *cmd); | ||
| 69 | void | ||
| 70 | megasas_check_and_restore_queue_depth(struct megasas_instance *instance); | ||
| 71 | 60 | ||
| 72 | int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); | 61 | int megasas_transition_to_ready(struct megasas_instance *instance, int ocr); |
| 73 | void megaraid_sas_kill_hba(struct megasas_instance *instance); | ||
| 74 | 62 | ||
| 75 | extern u32 megasas_dbg_lvl; | 63 | extern u32 megasas_dbg_lvl; |
| 76 | int megasas_sriov_start_heartbeat(struct megasas_instance *instance, | 64 | int megasas_sriov_start_heartbeat(struct megasas_instance *instance, |
| 77 | int initial); | 65 | int initial); |
| 78 | void megasas_start_timer(struct megasas_instance *instance); | ||
| 79 | extern struct megasas_mgmt_info megasas_mgmt_info; | 66 | extern struct megasas_mgmt_info megasas_mgmt_info; |
| 80 | extern unsigned int resetwaittime; | 67 | extern unsigned int resetwaittime; |
| 81 | extern unsigned int dual_qdepth_disable; | 68 | extern unsigned int dual_qdepth_disable; |
| @@ -84,15 +71,13 @@ static void megasas_free_reply_fusion(struct megasas_instance *instance); · 2 unmodified lines | |||
| 84 | static inline | 71 | static inline |
| 85 | void megasas_configure_queue_sizes(struct megasas_instance *instance); | 72 | void megasas_configure_queue_sizes(struct megasas_instance *instance); |
| 86 | static void megasas_fusion_crash_dump(struct megasas_instance *instance); | 73 | static void megasas_fusion_crash_dump(struct megasas_instance *instance); |
| 87 | extern u32 megasas_readl(struct megasas_instance *instance, | ||
| 88 | const volatile void __iomem *addr); | ||
| 89 | 74 | ||
| 90 | /** | 75 | /** |
| 91 | * megasas_adp_reset_wait_for_ready - initiate chip reset and wait for | 76 | * megasas_adp_reset_wait_for_ready - initiate chip reset and wait for |
| 92 | * controller to come to ready state | 77 | * controller to come to ready state |
| 93 | * @instance - adapter's soft state | 78 | * @instance: adapter's soft state |
| 94 | * @do_adp_reset - If true, do a chip reset | 79 | * @do_adp_reset: If true, do a chip reset |
| 95 | * @ocr_context - If called from OCR context this will | 80 | * @ocr_context: If called from OCR context this will |
| 96 | * be set to 1, else 0 | 81 | * be set to 1, else 0 |
| 97 | * | 82 | * |
| 98 | * This function initates a chip reset followed by a wait for controller to | 83 | * This function initates a chip reset followed by a wait for controller to |
| @@ -146,10 +131,10 @@ out: · 47 unmodified lines | |||
| 146 | /** | 131 | /** |
| 147 | * megasas_check_same_4gb_region - check if allocation | 132 | * megasas_check_same_4gb_region - check if allocation |
| 148 | * crosses same 4GB boundary or not | 133 | * crosses same 4GB boundary or not |
| 149 | * @instance - adapter's soft instance | 134 | * @instance: adapter's soft instance |
| 150 | * start_addr - start address of DMA allocation | 135 | * @start_addr: start address of DMA allocation |
| 151 | * size - size of allocation in bytes | 136 | * @size: size of allocation in bytes |
| 152 | * return - true : allocation does not cross same | 137 | * @return: true : allocation does not cross same |
| 153 | * 4GB boundary | 138 | * 4GB boundary |
| 154 | * false: allocation crosses same | 139 | * false: allocation crosses same |
| 155 | * 4GB boundary | 140 | * 4GB boundary |
| @@ -174,7 +159,7 @@ static inline bool megasas_check_same_4gb_region · 18 unmodified lines | |||
| 174 | 159 | ||
| 175 | /** | 160 | /** |
| 176 | * megasas_enable_intr_fusion - Enables interrupts | 161 | * megasas_enable_intr_fusion - Enables interrupts |
| 177 | * @regs: MFI register set | 162 | * @instance: adapter's soft instance |
| 178 | */ | 163 | */ |
| 179 | static void | 164 | static void |
| 180 | megasas_enable_intr_fusion(struct megasas_instance *instance) | 165 | megasas_enable_intr_fusion(struct megasas_instance *instance) |
| @@ -196,7 +181,7 @@ megasas_enable_intr_fusion(struct megasas_instance *instance) · 15 unmodified lines | |||
| 196 | 181 | ||
| 197 | /** | 182 | /** |
| 198 | * megasas_disable_intr_fusion - Disables interrupt | 183 | * megasas_disable_intr_fusion - Disables interrupt |
| 199 | * @regs: MFI register set | 184 | * @instance: adapter's soft instance |
| 200 | */ | 185 | */ |
| 201 | static void | 186 | static void |
| 202 | megasas_disable_intr_fusion(struct megasas_instance *instance) | 187 | megasas_disable_intr_fusion(struct megasas_instance *instance) |
| @@ -238,6 +223,7 @@ megasas_clear_intr_fusion(struct megasas_instance *instance) · 35 unmodified lines | |||
| 238 | /** | 223 | /** |
| 239 | * megasas_get_cmd_fusion - Get a command from the free pool | 224 | * megasas_get_cmd_fusion - Get a command from the free pool |
| 240 | * @instance: Adapter soft state | 225 | * @instance: Adapter soft state |
| 226 | * @blk_tag: Command tag | ||
| 241 | * | 227 | * |
| 242 | * Returns a blk_tag indexed mpt frame | 228 | * Returns a blk_tag indexed mpt frame |
| 243 | */ | 229 | */ |
| @@ -309,8 +295,8 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance, · 65 unmodified lines | |||
| 309 | 295 | ||
| 310 | /** | 296 | /** |
| 311 | * megasas_fusion_update_can_queue - Do all Adapter Queue depth related calculations here | 297 | * megasas_fusion_update_can_queue - Do all Adapter Queue depth related calculations here |
| 312 | * @instance: Adapter soft state | 298 | * @instance: Adapter soft state |
| 313 | * fw_boot_context: Whether this function called during probe or after OCR | 299 | * @fw_boot_context: Whether this function called during probe or after OCR |
| 314 | * | 300 | * |
| 315 | * This function is only for fusion controllers. | 301 | * This function is only for fusion controllers. |
| 316 | * Update host can queue, if firmware downgrade max supported firmware commands. | 302 | * Update host can queue, if firmware downgrade max supported firmware commands. |
| @@ -1016,6 +1002,7 @@ fail_exit: · 699 unmodified lines | |||
| 1016 | * wait_and_poll - Issues a polling command | 1002 | * wait_and_poll - Issues a polling command |
| 1017 | * @instance: Adapter soft state | 1003 | * @instance: Adapter soft state |
| 1018 | * @cmd: Command packet to be issued | 1004 | * @cmd: Command packet to be issued |
| 1005 | * @seconds: Maximum poll time | ||
| 1019 | * | 1006 | * |
| 1020 | * For polling, MFI requires the cmd_status to be set to 0xFF before posting. | 1007 | * For polling, MFI requires the cmd_status to be set to 0xFF before posting. |
| 1021 | */ | 1008 | */ |
| @@ -1906,6 +1893,7 @@ fail_alloc_mfi_cmds: · 884 unmodified lines | |||
| 1906 | /** | 1893 | /** |
| 1907 | * megasas_fault_detect_work - Worker function of | 1894 | * megasas_fault_detect_work - Worker function of |
| 1908 | * FW fault handling workqueue. | 1895 | * FW fault handling workqueue. |
| 1896 | * @work: FW fault work struct | ||
| 1909 | */ | 1897 | */ |
| 1910 | static void | 1898 | static void |
| 1911 | megasas_fault_detect_work(struct work_struct *work) | 1899 | megasas_fault_detect_work(struct work_struct *work) |
| @@ -1989,11 +1977,13 @@ megasas_fusion_stop_watchdog(struct megasas_instance *instance) · 77 unmodified lines | |||
| 1989 | 1977 | ||
| 1990 | /** | 1978 | /** |
| 1991 | * map_cmd_status - Maps FW cmd status to OS cmd status | 1979 | * map_cmd_status - Maps FW cmd status to OS cmd status |
| 1992 | * @cmd : Pointer to cmd | 1980 | * @fusion: fusion context |
| 1993 | * @status : status of cmd returned by FW | 1981 | * @scmd: Pointer to cmd |
| 1994 | * @ext_status : ext status of cmd returned by FW | 1982 | * @status: status of cmd returned by FW |
| 1983 | * @ext_status: ext status of cmd returned by FW | ||
| 1984 | * @data_length: command data length | ||
| 1985 | * @sense: command sense data | ||
| 1995 | */ | 1986 | */ |
| 1996 | |||
| 1997 | static void | 1987 | static void |
| 1998 | map_cmd_status(struct fusion_context *fusion, | 1988 | map_cmd_status(struct fusion_context *fusion, |
| 1999 | struct scsi_cmnd *scmd, u8 status, u8 ext_status, | 1989 | struct scsi_cmnd *scmd, u8 status, u8 ext_status, |
| @@ -2234,7 +2224,7 @@ megasas_make_prp_nvme(struct megasas_instance *instance, struct scsi_cmnd *scmd, · 234 unmodified lines | |||
| 2234 | * @scp: SCSI command from the mid-layer | 2224 | * @scp: SCSI command from the mid-layer |
| 2235 | * @sgl_ptr: SGL to be filled in | 2225 | * @sgl_ptr: SGL to be filled in |
| 2236 | * @cmd: cmd we are working on | 2226 | * @cmd: cmd we are working on |
| 2237 | * @sge_count sge count | 2227 | * @sge_count: sge count |
| 2238 | * | 2228 | * |
| 2239 | */ | 2229 | */ |
| 2240 | static void | 2230 | static void |
| @@ -2343,9 +2333,12 @@ int megasas_make_sgl(struct megasas_instance *instance, struct scsi_cmnd *scp, · 102 unmodified lines | |||
| 2343 | 2333 | ||
| 2344 | /** | 2334 | /** |
| 2345 | * megasas_set_pd_lba - Sets PD LBA | 2335 | * megasas_set_pd_lba - Sets PD LBA |
| 2346 | * @cdb: CDB | 2336 | * @io_request: IO request |
| 2347 | * @cdb_len: cdb length | 2337 | * @cdb_len: cdb length |
| 2348 | * @start_blk: Start block of IO | 2338 | * @io_info: IO information |
| 2339 | * @scp: SCSI command | ||
| 2340 | * @local_map_ptr: Raid map | ||
| 2341 | * @ref_tag: Primary reference tag | ||
| 2349 | * | 2342 | * |
| 2350 | * Used to set the PD LBA in CDB for FP IOs | 2343 | * Used to set the PD LBA in CDB for FP IOs |
| 2351 | */ | 2344 | */ |
| @@ -2603,10 +2596,12 @@ static void megasas_stream_detect(struct megasas_instance *instance, · 251 unmodified lines | |||
| 2603 | * affinity (cpu of the controller) and raid_flags in the raid context | 2596 | * affinity (cpu of the controller) and raid_flags in the raid context |
| 2604 | * based on IO type. | 2597 | * based on IO type. |
| 2605 | * | 2598 | * |
| 2599 | * @fusion: Fusion context | ||
| 2606 | * @praid_context: IO RAID context | 2600 | * @praid_context: IO RAID context |
| 2607 | * @raid: LD raid map | 2601 | * @raid: LD raid map |
| 2608 | * @fp_possible: Is fast path possible? | 2602 | * @fp_possible: Is fast path possible? |
| 2609 | * @is_read: Is read IO? | 2603 | * @is_read: Is read IO? |
| 2604 | * @scsi_buff_len: SCSI command buffer length | ||
| 2610 | * | 2605 | * |
| 2611 | */ | 2606 | */ |
| 2612 | static void | 2607 | static void |
| @@ -2940,7 +2935,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance, · 327 unmodified lines | |||
| 2940 | /** | 2935 | /** |
| 2941 | * megasas_build_ld_nonrw_fusion - prepares non rw ios for virtual disk | 2936 | * megasas_build_ld_nonrw_fusion - prepares non rw ios for virtual disk |
| 2942 | * @instance: Adapter soft state | 2937 | * @instance: Adapter soft state |
| 2943 | * @scp: SCSI command | 2938 | * @scmd: SCSI command |
| 2944 | * @cmd: Command to be prepared | 2939 | * @cmd: Command to be prepared |
| 2945 | * | 2940 | * |
| 2946 | * Prepares the io_request frame for non-rw io cmds for vd. | 2941 | * Prepares the io_request frame for non-rw io cmds for vd. |
| @@ -3028,7 +3023,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance, · 81 unmodified lines | |||
| 3028 | /** | 3023 | /** |
| 3029 | * megasas_build_syspd_fusion - prepares rw/non-rw ios for syspd | 3024 | * megasas_build_syspd_fusion - prepares rw/non-rw ios for syspd |
| 3030 | * @instance: Adapter soft state | 3025 | * @instance: Adapter soft state |
| 3031 | * @scp: SCSI command | 3026 | * @scmd: SCSI command |
| 3032 | * @cmd: Command to be prepared | 3027 | * @cmd: Command to be prepared |
| 3033 | * @fp_possible: parameter to detect fast path or firmware path io. | 3028 | * @fp_possible: parameter to detect fast path or firmware path io. |
| 3034 | * | 3029 | * |
| @@ -3405,7 +3400,7 @@ megasas_build_and_issue_cmd_fusion(struct megasas_instance *instance, · 370 unmodified lines | |||
| 3405 | * megasas_complete_r1_command - | 3400 | * megasas_complete_r1_command - |
| 3406 | * completes R1 FP write commands which has valid peer smid | 3401 | * completes R1 FP write commands which has valid peer smid |
| 3407 | * @instance: Adapter soft state | 3402 | * @instance: Adapter soft state |
| 3408 | * @cmd_fusion: MPT command frame | 3403 | * @cmd: MPT command frame |
| 3409 | * | 3404 | * |
| 3410 | */ | 3405 | */ |
| 3411 | static inline void | 3406 | static inline void |
| @@ -3459,6 +3454,9 @@ megasas_complete_r1_command(struct megasas_instance *instance, · 47 unmodified lines | |||
| 3459 | /** | 3454 | /** |
| 3460 | * complete_cmd_fusion - Completes command | 3455 | * complete_cmd_fusion - Completes command |
| 3461 | * @instance: Adapter soft state | 3456 | * @instance: Adapter soft state |
| 3457 | * @MSIxIndex: MSI number | ||
| 3458 | * @irq_context: IRQ context | ||
| 3459 | * | ||
| 3462 | * Completes all commands that is in reply descriptor queue | 3460 | * Completes all commands that is in reply descriptor queue |
| 3463 | */ | 3461 | */ |
| 3464 | static int | 3462 | static int |
| @@ -3634,6 +3632,7 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex, · 169 unmodified lines | |||
| 3634 | 3632 | ||
| 3635 | /** | 3633 | /** |
| 3636 | * megasas_enable_irq_poll() - enable irqpoll | 3634 | * megasas_enable_irq_poll() - enable irqpoll |
| 3635 | * @instance: Adapter soft state | ||
| 3637 | */ | 3636 | */ |
| 3638 | static void megasas_enable_irq_poll(struct megasas_instance *instance) | 3637 | static void megasas_enable_irq_poll(struct megasas_instance *instance) |
| 3639 | { | 3638 | { |
| @@ -3650,7 +3649,7 @@ static void megasas_enable_irq_poll(struct megasas_instance *instance) · 10 unmodified lines | |||
| 3650 | 3649 | ||
| 3651 | /** | 3650 | /** |
| 3652 | * megasas_sync_irqs - Synchronizes all IRQs owned by adapter | 3651 | * megasas_sync_irqs - Synchronizes all IRQs owned by adapter |
| 3653 | * @instance: Adapter soft state | 3652 | * @instance_addr: Adapter soft state address |
| 3654 | */ | 3653 | */ |
| 3655 | static void megasas_sync_irqs(unsigned long instance_addr) | 3654 | static void megasas_sync_irqs(unsigned long instance_addr) |
| 3656 | { | 3655 | { |
| @@ -3706,7 +3705,7 @@ int megasas_irqpoll(struct irq_poll *irqpoll, int budget) · 49 unmodified lines | |||
| 3706 | 3705 | ||
| 3707 | /** | 3706 | /** |
| 3708 | * megasas_complete_cmd_dpc_fusion - Completes command | 3707 | * megasas_complete_cmd_dpc_fusion - Completes command |
| 3709 | * @instance: Adapter soft state | 3708 | * @instance_addr: Adapter soft state address |
| 3710 | * | 3709 | * |
| 3711 | * Tasklet to complete cmds | 3710 | * Tasklet to complete cmds |
| 3712 | */ | 3711 | */ |
| @@ -3729,6 +3728,8 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr) · 16 unmodified lines | |||
| 3729 | 3728 | ||
| 3730 | /** | 3729 | /** |
| 3731 | * megasas_isr_fusion - isr entry point | 3730 | * megasas_isr_fusion - isr entry point |
| 3731 | * @irq: IRQ number | ||
| 3732 | * @devp: IRQ context | ||
| 3732 | */ | 3733 | */ |
| 3733 | static irqreturn_t megasas_isr_fusion(int irq, void *devp) | 3734 | static irqreturn_t megasas_isr_fusion(int irq, void *devp) |
| 3734 | { | 3735 | { |
| @@ -3761,7 +3762,7 @@ static irqreturn_t megasas_isr_fusion(int irq, void *devp) · 26 unmodified lines | |||
| 3761 | /** | 3762 | /** |
| 3762 | * build_mpt_mfi_pass_thru - builds a cmd fo MFI Pass thru | 3763 | * build_mpt_mfi_pass_thru - builds a cmd fo MFI Pass thru |
| 3763 | * @instance: Adapter soft state | 3764 | * @instance: Adapter soft state |
| 3764 | * mfi_cmd: megasas_cmd pointer | 3765 | * @mfi_cmd: megasas_cmd pointer |
| 3765 | * | 3766 | * |
| 3766 | */ | 3767 | */ |
| 3767 | static void | 3768 | static void |
| @@ -3878,7 +3879,7 @@ megasas_release_fusion(struct megasas_instance *instance) · 110 unmodified lines | |||
| 3878 | 3879 | ||
| 3879 | /** | 3880 | /** |
| 3880 | * megasas_read_fw_status_reg_fusion - returns the current FW status value | 3881 | * megasas_read_fw_status_reg_fusion - returns the current FW status value |
| 3881 | * @regs: MFI register set | 3882 | * @instance: Adapter soft state |
| 3882 | */ | 3883 | */ |
| 3883 | static u32 | 3884 | static u32 |
| 3884 | megasas_read_fw_status_reg_fusion(struct megasas_instance *instance) | 3885 | megasas_read_fw_status_reg_fusion(struct megasas_instance *instance) |
| @@ -3889,7 +3890,7 @@ megasas_read_fw_status_reg_fusion(struct megasas_instance *instance) · 4 unmodified lines | |||
| 3889 | /** | 3890 | /** |
| 3890 | * megasas_alloc_host_crash_buffer - Host buffers for Crash dump collection from Firmware | 3891 | * megasas_alloc_host_crash_buffer - Host buffers for Crash dump collection from Firmware |
| 3891 | * @instance: Controller's soft instance | 3892 | * @instance: Controller's soft instance |
| 3892 | * return: Number of allocated host crash buffers | 3893 | * @return: Number of allocated host crash buffers |
| 3893 | */ | 3894 | */ |
| 3894 | static void | 3895 | static void |
| 3895 | megasas_alloc_host_crash_buffer(struct megasas_instance *instance) | 3896 | megasas_alloc_host_crash_buffer(struct megasas_instance *instance) |
| @@ -3927,6 +3928,7 @@ megasas_free_host_crash_buffer(struct megasas_instance *instance) · 31 unmodified lines | |||
| 3927 | 3928 | ||
| 3928 | /** | 3929 | /** |
| 3929 | * megasas_adp_reset_fusion - For controller reset | 3930 | * megasas_adp_reset_fusion - For controller reset |
| 3931 | * @instance: Controller's soft instance | ||
| 3930 | * @regs: MFI register set | 3932 | * @regs: MFI register set |
| 3931 | */ | 3933 | */ |
| 3932 | static int | 3934 | static int |
| @@ -4004,6 +4006,7 @@ megasas_adp_reset_fusion(struct megasas_instance *instance, · 71 unmodified lines | |||
| 4004 | 4006 | ||
| 4005 | /** | 4007 | /** |
| 4006 | * megasas_check_reset_fusion - For controller reset check | 4008 | * megasas_check_reset_fusion - For controller reset check |
| 4009 | * @instance: Controller's soft instance | ||
| 4007 | * @regs: MFI register set | 4010 | * @regs: MFI register set |
| 4008 | */ | 4011 | */ |
| 4009 | static int | 4012 | static int |
| @@ -4333,8 +4336,8 @@ static int megasas_track_scsiio(struct megasas_instance *instance, · 323 unmodified lines | |||
| 4333 | 4336 | ||
| 4334 | /** | 4337 | /** |
| 4335 | * megasas_tm_response_code - translation of device response code | 4338 | * megasas_tm_response_code - translation of device response code |
| 4336 | * @ioc: per adapter object | 4339 | * @instance: Controller's soft instance |
| 4337 | * @mpi_reply: MPI reply returned by firmware | 4340 | * @mpi_reply: MPI reply returned by firmware |
| 4338 | * | 4341 | * |
| 4339 | * Return nothing. | 4342 | * Return nothing. |
| 4340 | */ | 4343 | */ |
| @@ -4389,9 +4392,9 @@ megasas_tm_response_code(struct megasas_instance *instance, · 48 unmodified lines | |||
| 4389 | * @device_handle: device handle | 4392 | * @device_handle: device handle |
| 4390 | * @channel: the channel assigned by the OS | 4393 | * @channel: the channel assigned by the OS |
| 4391 | * @id: the id assigned by the OS | 4394 | * @id: the id assigned by the OS |
| 4392 | * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in megaraid_sas_fusion.c) | ||
| 4393 | * @smid_task: smid assigned to the task | 4395 | * @smid_task: smid assigned to the task |
| 4394 | * @m_type: TM_MUTEX_ON or TM_MUTEX_OFF | 4396 | * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in megaraid_sas_fusion.c) |
| 4397 | * @mr_device_priv_data: private data | ||
| 4395 | * Context: user | 4398 | * Context: user |
| 4396 | * | 4399 | * |
| 4397 | * MegaRaid use MPT interface for Task Magement request. | 4400 | * MegaRaid use MPT interface for Task Magement request. |
| @@ -1045,6 +1045,8 @@ static void handle_error(struct mesh_state *ms) · 1044 unmodified lines | |||
| 1045 | while ((in_8(&mr->bus_status1) & BS1_RST) != 0) | 1045 | while ((in_8(&mr->bus_status1) & BS1_RST) != 0) |
| 1046 | udelay(1); | 1046 | udelay(1); |
| 1047 | printk("done\n"); | 1047 | printk("done\n"); |
| 1048 | if (ms->dma_started) | ||
| 1049 | halt_dma(ms); | ||
| 1048 | handle_reset(ms); | 1050 | handle_reset(ms); |
| 1049 | /* request_q is empty, no point in mesh_start() */ | 1051 | /* request_q is empty, no point in mesh_start() */ |
| 1050 | return; | 1052 | return; |
| @@ -1357,7 +1359,8 @@ static void halt_dma(struct mesh_state *ms) · 306 unmodified lines | |||
| 1357 | ms->conn_tgt, ms->data_ptr, scsi_bufflen(cmd), | 1359 | ms->conn_tgt, ms->data_ptr, scsi_bufflen(cmd), |
| 1358 | ms->tgts[ms->conn_tgt].data_goes_out); | 1360 | ms->tgts[ms->conn_tgt].data_goes_out); |
| 1359 | } | 1361 | } |
| 1360 | scsi_dma_unmap(cmd); | 1362 | if (cmd) |
| 1363 | scsi_dma_unmap(cmd); | ||
| 1361 | ms->dma_started = 0; | 1364 | ms->dma_started = 0; |
| 1362 | } | 1365 | } |
| 1363 | 1366 | ||
| @@ -1712,6 +1715,9 @@ static int mesh_host_reset(struct scsi_cmnd *cmd) · 348 unmodified lines | |||
| 1712 | 1715 | ||
| 1713 | spin_lock_irqsave(ms->host->host_lock, flags); | 1716 | spin_lock_irqsave(ms->host->host_lock, flags); |
| 1714 | 1717 | ||
| 1718 | if (ms->dma_started) | ||
| 1719 | halt_dma(ms); | ||
| 1720 | |||
| 1715 | /* Reset the controller & dbdma channel */ | 1721 | /* Reset the controller & dbdma channel */ |
| 1716 | out_le32(&md->control, (RUN|PAUSE|FLUSH|WAKE) << 16); /* stop dma */ | 1722 | out_le32(&md->control, (RUN|PAUSE|FLUSH|WAKE) << 16); /* stop dma */ |
| 1717 | out_8(&mr->exception, 0xff); /* clear all exception bits */ | 1723 | out_8(&mr->exception, 0xff); /* clear all exception bits */ |
| @@ -190,7 +190,7 @@ module_param_call(mpt3sas_fwfault_debug, _scsih_set_fwfault_debug, · 189 unmodified lines | |||
| 190 | 190 | ||
| 191 | /** | 191 | /** |
| 192 | * _base_readl_aero - retry readl for max three times. | 192 | * _base_readl_aero - retry readl for max three times. |
| 193 | * @addr - MPT Fusion system interface register address | 193 | * @addr: MPT Fusion system interface register address |
| 194 | * | 194 | * |
| 195 | * Retry the readl() for max three times if it gets zero value | 195 | * Retry the readl() for max three times if it gets zero value |
| 196 | * while reading the system interface register. | 196 | * while reading the system interface register. |
| @@ -817,6 +817,7 @@ mpt3sas_base_coredump_info(struct MPT3SAS_ADAPTER *ioc, u16 fault_code) · 620 unmodified lines | |||
| 817 | * mpt3sas_base_wait_for_coredump_completion - Wait until coredump | 817 | * mpt3sas_base_wait_for_coredump_completion - Wait until coredump |
| 818 | * completes or times out | 818 | * completes or times out |
| 819 | * @ioc: per adapter object | 819 | * @ioc: per adapter object |
| 820 | * @caller: caller function name | ||
| 820 | * | 821 | * |
| 821 | * Returns 0 for success, non-zero for failure. | 822 | * Returns 0 for success, non-zero for failure. |
| 822 | */ | 823 | */ |
| @@ -1718,8 +1719,8 @@ _base_interrupt(int irq, void *bus_id) · 895 unmodified lines | |||
| 1718 | 1719 | ||
| 1719 | /** | 1720 | /** |
| 1720 | * _base_irqpoll - IRQ poll callback handler | 1721 | * _base_irqpoll - IRQ poll callback handler |
| 1721 | * @irqpoll - irq_poll object | 1722 | * @irqpoll: irq_poll object |
| 1722 | * @budget - irq poll weight | 1723 | * @budget: irq poll weight |
| 1723 | * | 1724 | * |
| 1724 | * returns number of reply descriptors processed | 1725 | * returns number of reply descriptors processed |
| 1725 | */ | 1726 | */ |
| @@ -3048,8 +3049,8 @@ fall_back: · 1322 unmodified lines | |||
| 3048 | 3049 | ||
| 3049 | /** | 3050 | /** |
| 3050 | * _base_check_and_enable_high_iops_queues - enable high iops mode | 3051 | * _base_check_and_enable_high_iops_queues - enable high iops mode |
| 3051 | * @ ioc - per adapter object | 3052 | * @ioc: per adapter object |
| 3052 | * @ hba_msix_vector_count - msix vectors supported by HBA | 3053 | * @hba_msix_vector_count: msix vectors supported by HBA |
| 3053 | * | 3054 | * |
| 3054 | * Enable high iops queues only if | 3055 | * Enable high iops queues only if |
| 3055 | * - HBA is a SEA/AERO controller and | 3056 | * - HBA is a SEA/AERO controller and |
| @@ -5621,6 +5622,7 @@ _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, u32 ioc_state, int timeout) · 2565 unmodified lines | |||
| 5621 | * _base_wait_for_doorbell_int - waiting for controller interrupt(generated by | 5622 | * _base_wait_for_doorbell_int - waiting for controller interrupt(generated by |
| 5622 | * a write to the doorbell) | 5623 | * a write to the doorbell) |
| 5623 | * @ioc: per adapter object | 5624 | * @ioc: per adapter object |
| 5625 | * @timeout: timeout in seconds | ||
| 5624 | * | 5626 | * |
| 5625 | * Return: 0 for success, non-zero for failure. | 5627 | * Return: 0 for success, non-zero for failure. |
| 5626 | * | 5628 | * |
| @@ -5833,7 +5835,7 @@ _base_send_ioc_reset(struct MPT3SAS_ADAPTER *ioc, u8 reset_type, int timeout) · 206 unmodified lines | |||
| 5833 | /** | 5835 | /** |
| 5834 | * mpt3sas_wait_for_ioc - IOC's operational state is checked here. | 5836 | * mpt3sas_wait_for_ioc - IOC's operational state is checked here. |
| 5835 | * @ioc: per adapter object | 5837 | * @ioc: per adapter object |
| 5836 | * @wait_count: timeout in seconds | 5838 | * @timeout: timeout in seconds |
| 5837 | * | 5839 | * |
| 5838 | * Return: Waits up to timeout seconds for the IOC to | 5840 | * Return: Waits up to timeout seconds for the IOC to |
| 5839 | * become operational. Returns 0 if IOC is present | 5841 | * become operational. Returns 0 if IOC is present |
| @@ -1770,7 +1770,7 @@ void mpt3sas_send_trigger_data_event(struct MPT3SAS_ADAPTER *ioc, · 1769 unmodified lines | |||
| 1770 | void mpt3sas_process_trigger_data(struct MPT3SAS_ADAPTER *ioc, | 1770 | void mpt3sas_process_trigger_data(struct MPT3SAS_ADAPTER *ioc, |
| 1771 | struct SL_WH_TRIGGERS_EVENT_DATA_T *event_data); | 1771 | struct SL_WH_TRIGGERS_EVENT_DATA_T *event_data); |
| 1772 | void mpt3sas_trigger_master(struct MPT3SAS_ADAPTER *ioc, | 1772 | void mpt3sas_trigger_master(struct MPT3SAS_ADAPTER *ioc, |
| 1773 | u32 tigger_bitmask); | 1773 | u32 trigger_bitmask); |
| 1774 | void mpt3sas_trigger_event(struct MPT3SAS_ADAPTER *ioc, u16 event, | 1774 | void mpt3sas_trigger_event(struct MPT3SAS_ADAPTER *ioc, u16 event, |
| 1775 | u16 log_entry_qualifier); | 1775 | u16 log_entry_qualifier); |
| 1776 | void mpt3sas_trigger_scsi(struct MPT3SAS_ADAPTER *ioc, u8 sense_key, | 1776 | void mpt3sas_trigger_scsi(struct MPT3SAS_ADAPTER *ioc, u8 sense_key, |
| @@ -303,7 +303,6 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t · 302 unmodified lines | |||
| 303 | u8 retry_count, issue_host_reset = 0; | 303 | u8 retry_count, issue_host_reset = 0; |
| 304 | struct config_request mem; | 304 | struct config_request mem; |
| 305 | u32 ioc_status = UINT_MAX; | 305 | u32 ioc_status = UINT_MAX; |
| 306 | u8 issue_reset = 0; | ||
| 307 | 306 | ||
| 308 | mutex_lock(&ioc->config_cmds.mutex); | 307 | mutex_lock(&ioc->config_cmds.mutex); |
| 309 | if (ioc->config_cmds.status != MPT3_CMD_NOT_USED) { | 308 | if (ioc->config_cmds.status != MPT3_CMD_NOT_USED) { |
| @@ -386,9 +385,9 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t · 76 unmodified lines | |||
| 386 | if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) | 385 | if (!(ioc->logging_level & MPT_DEBUG_CONFIG)) |
| 387 | _config_display_some_debug(ioc, | 386 | _config_display_some_debug(ioc, |
| 388 | smid, "config_request", NULL); | 387 | smid, "config_request", NULL); |
| 389 | mpt3sas_check_cmd_timeout(ioc, | 388 | ioc_err(ioc, "%s: command timeout\n", __func__); |
| 390 | ioc->config_cmds.status, mpi_request, | 389 | mpt3sas_base_check_cmd_timeout(ioc, ioc->config_cmds.status, |
| 391 | sizeof(Mpi2ConfigRequest_t)/4, issue_reset); | 390 | mpi_request, sizeof(Mpi2ConfigRequest_t) / 4); |
| 392 | retry_count++; | 391 | retry_count++; |
| 393 | if (ioc->config_cmds.smid == smid) | 392 | if (ioc->config_cmds.smid == smid) |
| 394 | mpt3sas_base_free_smid(ioc, smid); | 393 | mpt3sas_base_free_smid(ioc, smid); |
| @@ -3662,8 +3662,9 @@ static DEVICE_ATTR_RW(diag_trigger_mpi); · 3661 unmodified lines | |||
| 3662 | 3662 | ||
| 3663 | /** | 3663 | /** |
| 3664 | * drv_support_bitmap_show - driver supported feature bitmap | 3664 | * drv_support_bitmap_show - driver supported feature bitmap |
| 3665 | * @cdev - pointer to embedded class device | 3665 | * @cdev: pointer to embedded class device |
| 3666 | * @buf - the buffer returned | 3666 | * @attr: unused |
| 3667 | * @buf: the buffer returned | ||
| 3667 | * | 3668 | * |
| 3668 | * A sysfs 'read-only' shost attribute. | 3669 | * A sysfs 'read-only' shost attribute. |
| 3669 | */ | 3670 | */ |
| @@ -3680,8 +3681,9 @@ static DEVICE_ATTR_RO(drv_support_bitmap); · 10 unmodified lines | |||
| 3680 | 3681 | ||
| 3681 | /** | 3682 | /** |
| 3682 | * enable_sdev_max_qd_show - display whether sdev max qd is enabled/disabled | 3683 | * enable_sdev_max_qd_show - display whether sdev max qd is enabled/disabled |
| 3683 | * @cdev - pointer to embedded class device | 3684 | * @cdev: pointer to embedded class device |
| 3684 | * @buf - the buffer returned | 3685 | * @attr: unused |
| 3686 | * @buf: the buffer returned | ||
| 3685 | * | 3687 | * |
| 3686 | * A sysfs read/write shost attribute. This attribute is used to set the | 3688 | * A sysfs read/write shost attribute. This attribute is used to set the |
| 3687 | * targets queue depth to HBA IO queue depth if this attribute is enabled. | 3689 | * targets queue depth to HBA IO queue depth if this attribute is enabled. |
| @@ -3698,8 +3700,10 @@ enable_sdev_max_qd_show(struct device *cdev, · 10 unmodified lines | |||
| 3698 | 3700 | ||
| 3699 | /** | 3701 | /** |
| 3700 | * enable_sdev_max_qd_store - Enable/disable sdev max qd | 3702 | * enable_sdev_max_qd_store - Enable/disable sdev max qd |
| 3701 | * @cdev - pointer to embedded class device | 3703 | * @cdev: pointer to embedded class device |
| 3702 | * @buf - the buffer returned | 3704 | * @attr: unused |
| 3705 | * @buf: the buffer returned | ||
| 3706 | * @count: unused | ||
| 3703 | * | 3707 | * |
| 3704 | * A sysfs read/write shost attribute. This attribute is used to set the | 3708 | * A sysfs read/write shost attribute. This attribute is used to set the |
| 3705 | * targets queue depth to HBA IO queue depth if this attribute is enabled. | 3709 | * targets queue depth to HBA IO queue depth if this attribute is enabled. |
| @@ -69,7 +69,7 @@ · 68 unmodified lines | |||
| 69 | #define MASTER_TRIGGER_TASK_MANAGMENT (0x00000004) | 69 | #define MASTER_TRIGGER_TASK_MANAGMENT (0x00000004) |
| 70 | #define MASTER_TRIGGER_DEVICE_REMOVAL (0x00000008) | 70 | #define MASTER_TRIGGER_DEVICE_REMOVAL (0x00000008) |
| 71 | 71 | ||
| 72 | /* fake firmware event for tigger */ | 72 | /* fake firmware event for trigger */ |
| 73 | #define MPI3_EVENT_DIAGNOSTIC_TRIGGER_FIRED (0x6E) | 73 | #define MPI3_EVENT_DIAGNOSTIC_TRIGGER_FIRED (0x6E) |
| 74 | 74 | ||
| 75 | /** | 75 | /** |
| @@ -177,15 +177,16 @@ out: · 176 unmodified lines | |||
| 177 | 177 | ||
| 178 | static irqreturn_t mvs_interrupt(int irq, void *opaque) | 178 | static irqreturn_t mvs_interrupt(int irq, void *opaque) |
| 179 | { | 179 | { |
| 180 | u32 core_nr; | ||
| 181 | u32 stat; | 180 | u32 stat; |
| 182 | struct mvs_info *mvi; | 181 | struct mvs_info *mvi; |
| 183 | struct sas_ha_struct *sha = opaque; | 182 | struct sas_ha_struct *sha = opaque; |
| 184 | #ifndef CONFIG_SCSI_MVSAS_TASKLET | 183 | #ifndef CONFIG_SCSI_MVSAS_TASKLET |
| 185 | u32 i; | 184 | u32 i; |
| 186 | #endif | 185 | u32 core_nr; |
| 187 | 186 | ||
| 188 | core_nr = ((struct mvs_prv_info *)sha->lldd_ha)->n_host; | 187 | core_nr = ((struct mvs_prv_info *)sha->lldd_ha)->n_host; |
| 188 | #endif | ||
| 189 | |||
| 189 | mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[0]; | 190 | mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[0]; |
| 190 | 191 | ||
| 191 | if (unlikely(!mvi)) | 192 | if (unlikely(!mvi)) |
| @@ -299,7 +300,7 @@ err_out: · 107 unmodified lines | |||
| 299 | 300 | ||
| 300 | int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex) | 301 | int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex) |
| 301 | { | 302 | { |
| 302 | unsigned long res_start, res_len, res_flag, res_flag_ex = 0; | 303 | unsigned long res_start, res_len, res_flag_ex = 0; |
| 303 | struct pci_dev *pdev = mvi->pdev; | 304 | struct pci_dev *pdev = mvi->pdev; |
| 304 | if (bar_ex != -1) { | 305 | if (bar_ex != -1) { |
| 305 | /* | 306 | /* |
| @@ -327,7 +328,6 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex) · 21 unmodified lines | |||
| 327 | goto err_out; | 328 | goto err_out; |
| 328 | } | 329 | } |
| 329 | 330 | ||
| 330 | res_flag = pci_resource_flags(pdev, bar); | ||
| 331 | mvi->regs = ioremap(res_start, res_len); | 331 | mvi->regs = ioremap(res_start, res_len); |
| 332 | 332 | ||
| 333 | if (!mvi->regs) { | 333 | if (!mvi->regs) { |
| @@ -87,7 +87,7 @@ static char *myrs_raid_level_name(enum myrs_raid_level level) · 86 unmodified lines | |||
| 87 | return NULL; | 87 | return NULL; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | /** | 90 | /* |
| 91 | * myrs_reset_cmd - clears critical fields in struct myrs_cmdblk | 91 | * myrs_reset_cmd - clears critical fields in struct myrs_cmdblk |
| 92 | */ | 92 | */ |
| 93 | static inline void myrs_reset_cmd(struct myrs_cmdblk *cmd_blk) | 93 | static inline void myrs_reset_cmd(struct myrs_cmdblk *cmd_blk) |
| @@ -98,7 +98,7 @@ static inline void myrs_reset_cmd(struct myrs_cmdblk *cmd_blk) · 4 unmodified lines | |||
| 98 | cmd_blk->status = 0; | 98 | cmd_blk->status = 0; |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | /** | 101 | /* |
| 102 | * myrs_qcmd - queues Command for DAC960 V2 Series Controllers. | 102 | * myrs_qcmd - queues Command for DAC960 V2 Series Controllers. |
| 103 | */ | 103 | */ |
| 104 | static void myrs_qcmd(struct myrs_hba *cs, struct myrs_cmdblk *cmd_blk) | 104 | static void myrs_qcmd(struct myrs_hba *cs, struct myrs_cmdblk *cmd_blk) |
| @@ -122,7 +122,7 @@ static void myrs_qcmd(struct myrs_hba *cs, struct myrs_cmdblk *cmd_blk) · 17 unmodified lines | |||
| 122 | cs->next_cmd_mbox = next_mbox; | 122 | cs->next_cmd_mbox = next_mbox; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | /** | 125 | /* |
| 126 | * myrs_exec_cmd - executes V2 Command and waits for completion. | 126 | * myrs_exec_cmd - executes V2 Command and waits for completion. |
| 127 | */ | 127 | */ |
| 128 | static void myrs_exec_cmd(struct myrs_hba *cs, | 128 | static void myrs_exec_cmd(struct myrs_hba *cs, |
| @@ -140,7 +140,7 @@ static void myrs_exec_cmd(struct myrs_hba *cs, · 11 unmodified lines | |||
| 140 | wait_for_completion(&complete); | 140 | wait_for_completion(&complete); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | /** | 143 | /* |
| 144 | * myrs_report_progress - prints progress message | 144 | * myrs_report_progress - prints progress message |
| 145 | */ | 145 | */ |
| 146 | static void myrs_report_progress(struct myrs_hba *cs, unsigned short ldev_num, | 146 | static void myrs_report_progress(struct myrs_hba *cs, unsigned short ldev_num, |
| @@ -153,7 +153,7 @@ static void myrs_report_progress(struct myrs_hba *cs, unsigned short ldev_num, · 6 unmodified lines | |||
| 153 | (100 * (int)(blocks >> 7)) / (int)(size >> 7)); | 153 | (100 * (int)(blocks >> 7)) / (int)(size >> 7)); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | /** | 156 | /* |
| 157 | * myrs_get_ctlr_info - executes a Controller Information IOCTL Command | 157 | * myrs_get_ctlr_info - executes a Controller Information IOCTL Command |
| 158 | */ | 158 | */ |
| 159 | static unsigned char myrs_get_ctlr_info(struct myrs_hba *cs) | 159 | static unsigned char myrs_get_ctlr_info(struct myrs_hba *cs) |
| @@ -214,7 +214,7 @@ static unsigned char myrs_get_ctlr_info(struct myrs_hba *cs) · 54 unmodified lines | |||
| 214 | return status; | 214 | return status; |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | /** | 217 | /* |
| 218 | * myrs_get_ldev_info - executes a Logical Device Information IOCTL Command | 218 | * myrs_get_ldev_info - executes a Logical Device Information IOCTL Command |
| 219 | */ | 219 | */ |
| 220 | static unsigned char myrs_get_ldev_info(struct myrs_hba *cs, | 220 | static unsigned char myrs_get_ldev_info(struct myrs_hba *cs, |
| @@ -301,7 +301,7 @@ static unsigned char myrs_get_ldev_info(struct myrs_hba *cs, · 80 unmodified lines | |||
| 301 | return status; | 301 | return status; |
| 302 | } | 302 | } |
| 303 | 303 | ||
| 304 | /** | 304 | /* |
| 305 | * myrs_get_pdev_info - executes a "Read Physical Device Information" Command | 305 | * myrs_get_pdev_info - executes a "Read Physical Device Information" Command |
| 306 | */ | 306 | */ |
| 307 | static unsigned char myrs_get_pdev_info(struct myrs_hba *cs, | 307 | static unsigned char myrs_get_pdev_info(struct myrs_hba *cs, |
| @@ -345,7 +345,7 @@ static unsigned char myrs_get_pdev_info(struct myrs_hba *cs, · 37 unmodified lines | |||
| 345 | return status; | 345 | return status; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | /** | 348 | /* |
| 349 | * myrs_dev_op - executes a "Device Operation" Command | 349 | * myrs_dev_op - executes a "Device Operation" Command |
| 350 | */ | 350 | */ |
| 351 | static unsigned char myrs_dev_op(struct myrs_hba *cs, | 351 | static unsigned char myrs_dev_op(struct myrs_hba *cs, |
| @@ -369,7 +369,7 @@ static unsigned char myrs_dev_op(struct myrs_hba *cs, · 17 unmodified lines | |||
| 369 | return status; | 369 | return status; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | /** | 372 | /* |
| 373 | * myrs_translate_pdev - translates a Physical Device Channel and | 373 | * myrs_translate_pdev - translates a Physical Device Channel and |
| 374 | * TargetID into a Logical Device. | 374 | * TargetID into a Logical Device. |
| 375 | */ | 375 | */ |
| @@ -414,7 +414,7 @@ static unsigned char myrs_translate_pdev(struct myrs_hba *cs, · 38 unmodified lines | |||
| 414 | return status; | 414 | return status; |
| 415 | } | 415 | } |
| 416 | 416 | ||
| 417 | /** | 417 | /* |
| 418 | * myrs_get_event - executes a Get Event Command | 418 | * myrs_get_event - executes a Get Event Command |
| 419 | */ | 419 | */ |
| 420 | static unsigned char myrs_get_event(struct myrs_hba *cs, | 420 | static unsigned char myrs_get_event(struct myrs_hba *cs, |
| @@ -476,7 +476,7 @@ static unsigned char myrs_get_fwstatus(struct myrs_hba *cs) · 55 unmodified lines | |||
| 476 | return status; | 476 | return status; |
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | /** | 479 | /* |
| 480 | * myrs_enable_mmio_mbox - enables the Memory Mailbox Interface | 480 | * myrs_enable_mmio_mbox - enables the Memory Mailbox Interface |
| 481 | */ | 481 | */ |
| 482 | static bool myrs_enable_mmio_mbox(struct myrs_hba *cs, | 482 | static bool myrs_enable_mmio_mbox(struct myrs_hba *cs, |
| @@ -577,7 +577,7 @@ out_free: · 94 unmodified lines | |||
| 577 | return (status == MYRS_STATUS_SUCCESS); | 577 | return (status == MYRS_STATUS_SUCCESS); |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | /** | 580 | /* |
| 581 | * myrs_get_config - reads the Configuration Information | 581 | * myrs_get_config - reads the Configuration Information |
| 582 | */ | 582 | */ |
| 583 | static int myrs_get_config(struct myrs_hba *cs) | 583 | static int myrs_get_config(struct myrs_hba *cs) |
| @@ -682,7 +682,7 @@ static int myrs_get_config(struct myrs_hba *cs) · 98 unmodified lines | |||
| 682 | return 0; | 682 | return 0; |
| 683 | } | 683 | } |
| 684 | 684 | ||
| 685 | /** | 685 | /* |
| 686 | * myrs_log_event - prints a Controller Event message | 686 | * myrs_log_event - prints a Controller Event message |
| 687 | */ | 687 | */ |
| 688 | static struct { | 688 | static struct { |
| @@ -2338,11 +2338,11 @@ Failure: · 1649 unmodified lines | |||
| 2338 | return NULL; | 2338 | return NULL; |
| 2339 | } | 2339 | } |
| 2340 | 2340 | ||
| 2341 | /** | 2341 | /* |
| 2342 | * myrs_err_status reports Controller BIOS Messages passed through | 2342 | * myrs_err_status reports Controller BIOS Messages passed through |
| 2343 | the Error Status Register when the driver performs the BIOS handshaking. | 2343 | * the Error Status Register when the driver performs the BIOS handshaking. |
| 2344 | It returns true for fatal errors and false otherwise. | 2344 | * It returns true for fatal errors and false otherwise. |
| 2345 | */ | 2345 | */ |
| 2346 | 2346 | ||
| 2347 | static bool myrs_err_status(struct myrs_hba *cs, unsigned char status, | 2347 | static bool myrs_err_status(struct myrs_hba *cs, unsigned char status, |
| 2348 | unsigned char parm0, unsigned char parm1) | 2348 | unsigned char parm0, unsigned char parm1) |
| @@ -134,6 +134,7 @@ static inline void nsp_inc_resid(struct scsi_cmnd *SCpnt, int residInc) · 133 unmodified lines | |||
| 134 | scsi_set_resid(SCpnt, scsi_get_resid(SCpnt) + residInc); | 134 | scsi_set_resid(SCpnt, scsi_get_resid(SCpnt) + residInc); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | __printf(4, 5) | ||
| 137 | static void nsp_cs_message(const char *func, int line, char *type, char *fmt, ...) | 138 | static void nsp_cs_message(const char *func, int line, char *type, char *fmt, ...) |
| 138 | { | 139 | { |
| 139 | va_list args; | 140 | va_list args; |
| @@ -689,14 +690,14 @@ static int nsp_fifo_count(struct scsi_cmnd *SCpnt) · 549 unmodified lines | |||
| 689 | { | 690 | { |
| 690 | unsigned int base = SCpnt->device->host->io_port; | 691 | unsigned int base = SCpnt->device->host->io_port; |
| 691 | unsigned int count; | 692 | unsigned int count; |
| 692 | unsigned int l, m, h, dummy; | 693 | unsigned int l, m, h; |
| 693 | 694 | ||
| 694 | nsp_index_write(base, POINTERCLR, POINTER_CLEAR | ACK_COUNTER); | 695 | nsp_index_write(base, POINTERCLR, POINTER_CLEAR | ACK_COUNTER); |
| 695 | 696 | ||
| 696 | l = nsp_index_read(base, TRANSFERCOUNT); | 697 | l = nsp_index_read(base, TRANSFERCOUNT); |
| 697 | m = nsp_index_read(base, TRANSFERCOUNT); | 698 | m = nsp_index_read(base, TRANSFERCOUNT); |
| 698 | h = nsp_index_read(base, TRANSFERCOUNT); | 699 | h = nsp_index_read(base, TRANSFERCOUNT); |
| 699 | dummy = nsp_index_read(base, TRANSFERCOUNT); /* required this! */ | 700 | nsp_index_read(base, TRANSFERCOUNT); /* required this! */ |
| 700 | 701 | ||
| 701 | count = (h << 16) | (m << 8) | (l << 0); | 702 | count = (h << 16) | (m << 8) | (l << 0); |
| 702 | 703 | ||
| @@ -47,6 +47,7 @@ · 46 unmodified lines | |||
| 47 | /** | 47 | /** |
| 48 | * pm8001_ctl_mpi_interface_rev_show - MPI interface revision number | 48 | * pm8001_ctl_mpi_interface_rev_show - MPI interface revision number |
| 49 | * @cdev: pointer to embedded class device | 49 | * @cdev: pointer to embedded class device |
| 50 | * @attr: device attribute (unused) | ||
| 50 | * @buf: the buffer returned | 51 | * @buf: the buffer returned |
| 51 | * | 52 | * |
| 52 | * A sysfs 'read-only' shost attribute. | 53 | * A sysfs 'read-only' shost attribute. |
| @@ -72,6 +73,7 @@ DEVICE_ATTR(interface_rev, S_IRUGO, pm8001_ctl_mpi_interface_rev_show, NULL); · 19 unmodified lines | |||
| 72 | /** | 73 | /** |
| 73 | * controller_fatal_error_show - check controller is under fatal err | 74 | * controller_fatal_error_show - check controller is under fatal err |
| 74 | * @cdev: pointer to embedded class device | 75 | * @cdev: pointer to embedded class device |
| 76 | * @attr: device attribute (unused) | ||
| 75 | * @buf: the buffer returned | 77 | * @buf: the buffer returned |
| 76 | * | 78 | * |
| 77 | * A sysfs 'read only' shost attribute. | 79 | * A sysfs 'read only' shost attribute. |
| @@ -91,6 +93,7 @@ static DEVICE_ATTR_RO(controller_fatal_error); · 13 unmodified lines | |||
| 91 | /** | 93 | /** |
| 92 | * pm8001_ctl_fw_version_show - firmware version | 94 | * pm8001_ctl_fw_version_show - firmware version |
| 93 | * @cdev: pointer to embedded class device | 95 | * @cdev: pointer to embedded class device |
| 96 | * @attr: device attribute (unused) | ||
| 94 | * @buf: the buffer returned | 97 | * @buf: the buffer returned |
| 95 | * | 98 | * |
| 96 | * A sysfs 'read-only' shost attribute. | 99 | * A sysfs 'read-only' shost attribute. |
| @@ -121,6 +124,7 @@ static DEVICE_ATTR(fw_version, S_IRUGO, pm8001_ctl_fw_version_show, NULL); · 24 unmodified lines | |||
| 121 | /** | 124 | /** |
| 122 | * pm8001_ctl_ila_version_show - ila version | 125 | * pm8001_ctl_ila_version_show - ila version |
| 123 | * @cdev: pointer to embedded class device | 126 | * @cdev: pointer to embedded class device |
| 127 | * @attr: device attribute (unused) | ||
| 124 | * @buf: the buffer returned | 128 | * @buf: the buffer returned |
| 125 | * | 129 | * |
| 126 | * A sysfs 'read-only' shost attribute. | 130 | * A sysfs 'read-only' shost attribute. |
| @@ -146,6 +150,7 @@ static DEVICE_ATTR(ila_version, 0444, pm8001_ctl_ila_version_show, NULL); · 19 unmodified lines | |||
| 146 | /** | 150 | /** |
| 147 | * pm8001_ctl_inactive_fw_version_show - Inacative firmware version number | 151 | * pm8001_ctl_inactive_fw_version_show - Inacative firmware version number |
| 148 | * @cdev: pointer to embedded class device | 152 | * @cdev: pointer to embedded class device |
| 153 | * @attr: device attribute (unused) | ||
| 149 | * @buf: the buffer returned | 154 | * @buf: the buffer returned |
| 150 | * | 155 | * |
| 151 | * A sysfs 'read-only' shost attribute. | 156 | * A sysfs 'read-only' shost attribute. |
| @@ -172,6 +177,7 @@ DEVICE_ATTR(inc_fw_ver, 0444, pm8001_ctl_inactive_fw_version_show, NULL); · 20 unmodified lines | |||
| 172 | /** | 177 | /** |
| 173 | * pm8001_ctl_max_out_io_show - max outstanding io supported | 178 | * pm8001_ctl_max_out_io_show - max outstanding io supported |
| 174 | * @cdev: pointer to embedded class device | 179 | * @cdev: pointer to embedded class device |
| 180 | * @attr: device attribute (unused) | ||
| 175 | * @buf: the buffer returned | 181 | * @buf: the buffer returned |
| 176 | * | 182 | * |
| 177 | * A sysfs 'read-only' shost attribute. | 183 | * A sysfs 'read-only' shost attribute. |
| @@ -195,6 +201,7 @@ static DEVICE_ATTR(max_out_io, S_IRUGO, pm8001_ctl_max_out_io_show, NULL); · 17 unmodified lines | |||
| 195 | /** | 201 | /** |
| 196 | * pm8001_ctl_max_devices_show - max devices support | 202 | * pm8001_ctl_max_devices_show - max devices support |
| 197 | * @cdev: pointer to embedded class device | 203 | * @cdev: pointer to embedded class device |
| 204 | * @attr: device attribute (unused) | ||
| 198 | * @buf: the buffer returned | 205 | * @buf: the buffer returned |
| 199 | * | 206 | * |
| 200 | * A sysfs 'read-only' shost attribute. | 207 | * A sysfs 'read-only' shost attribute. |
| @@ -221,6 +228,7 @@ static DEVICE_ATTR(max_devices, S_IRUGO, pm8001_ctl_max_devices_show, NULL); · 20 unmodified lines | |||
| 221 | * pm8001_ctl_max_sg_list_show - max sg list supported iff not 0.0 for no | 228 | * pm8001_ctl_max_sg_list_show - max sg list supported iff not 0.0 for no |
| 222 | * hardware limitation | 229 | * hardware limitation |
| 223 | * @cdev: pointer to embedded class device | 230 | * @cdev: pointer to embedded class device |
| 231 | * @attr: device attribute (unused) | ||
| 224 | * @buf: the buffer returned | 232 | * @buf: the buffer returned |
| 225 | * | 233 | * |
| 226 | * A sysfs 'read-only' shost attribute. | 234 | * A sysfs 'read-only' shost attribute. |
| @@ -265,6 +273,7 @@ show_sas_spec_support_status(unsigned int mode, char *buf) · 38 unmodified lines | |||
| 265 | /** | 273 | /** |
| 266 | * pm8001_ctl_sas_spec_support_show - sas spec supported | 274 | * pm8001_ctl_sas_spec_support_show - sas spec supported |
| 267 | * @cdev: pointer to embedded class device | 275 | * @cdev: pointer to embedded class device |
| 276 | * @attr: device attribute (unused) | ||
| 268 | * @buf: the buffer returned | 277 | * @buf: the buffer returned |
| 269 | * | 278 | * |
| 270 | * A sysfs 'read-only' shost attribute. | 279 | * A sysfs 'read-only' shost attribute. |
| @@ -292,6 +301,7 @@ static DEVICE_ATTR(sas_spec_support, S_IRUGO, · 21 unmodified lines | |||
| 292 | /** | 301 | /** |
| 293 | * pm8001_ctl_sas_address_show - sas address | 302 | * pm8001_ctl_sas_address_show - sas address |
| 294 | * @cdev: pointer to embedded class device | 303 | * @cdev: pointer to embedded class device |
| 304 | * @attr: device attribute (unused) | ||
| 295 | * @buf: the buffer returned | 305 | * @buf: the buffer returned |
| 296 | * | 306 | * |
| 297 | * This is the controller sas address | 307 | * This is the controller sas address |
| @@ -313,6 +323,7 @@ static DEVICE_ATTR(host_sas_address, S_IRUGO, · 15 unmodified lines | |||
| 313 | /** | 323 | /** |
| 314 | * pm8001_ctl_logging_level_show - logging level | 324 | * pm8001_ctl_logging_level_show - logging level |
| 315 | * @cdev: pointer to embedded class device | 325 | * @cdev: pointer to embedded class device |
| 326 | * @attr: device attribute (unused) | ||
| 316 | * @buf: the buffer returned | 327 | * @buf: the buffer returned |
| 317 | * | 328 | * |
| 318 | * A sysfs 'read/write' shost attribute. | 329 | * A sysfs 'read/write' shost attribute. |
| @@ -326,6 +337,7 @@ static ssize_t pm8001_ctl_logging_level_show(struct device *cdev, · 7 unmodified lines | |||
| 326 | 337 | ||
| 327 | return snprintf(buf, PAGE_SIZE, "%08xh\n", pm8001_ha->logging_level); | 338 | return snprintf(buf, PAGE_SIZE, "%08xh\n", pm8001_ha->logging_level); |
| 328 | } | 339 | } |
| 340 | |||
| 329 | static ssize_t pm8001_ctl_logging_level_store(struct device *cdev, | 341 | static ssize_t pm8001_ctl_logging_level_store(struct device *cdev, |
| 330 | struct device_attribute *attr, const char *buf, size_t count) | 342 | struct device_attribute *attr, const char *buf, size_t count) |
| 331 | { | 343 | { |
| @@ -346,6 +358,7 @@ static DEVICE_ATTR(logging_level, S_IRUGO | S_IWUSR, · 14 unmodified lines | |||
| 346 | /** | 358 | /** |
| 347 | * pm8001_ctl_aap_log_show - aap1 event log | 359 | * pm8001_ctl_aap_log_show - aap1 event log |
| 348 | * @cdev: pointer to embedded class device | 360 | * @cdev: pointer to embedded class device |
| 361 | * @attr: device attribute (unused) | ||
| 349 | * @buf: the buffer returned | 362 | * @buf: the buffer returned |
| 350 | * | 363 | * |
| 351 | * A sysfs 'read-only' shost attribute. | 364 | * A sysfs 'read-only' shost attribute. |
| @@ -382,6 +395,7 @@ static DEVICE_ATTR(aap_log, S_IRUGO, pm8001_ctl_aap_log_show, NULL); · 30 unmodified lines | |||
| 382 | /** | 395 | /** |
| 383 | * pm8001_ctl_ib_queue_log_show - Out bound Queue log | 396 | * pm8001_ctl_ib_queue_log_show - Out bound Queue log |
| 384 | * @cdev:pointer to embedded class device | 397 | * @cdev:pointer to embedded class device |
| 398 | * @attr: device attribute (unused) | ||
| 385 | * @buf: the buffer returned | 399 | * @buf: the buffer returned |
| 386 | * A sysfs 'read-only' shost attribute. | 400 | * A sysfs 'read-only' shost attribute. |
| 387 | */ | 401 | */ |
| @@ -414,6 +428,7 @@ static DEVICE_ATTR(ib_log, S_IRUGO, pm8001_ctl_ib_queue_log_show, NULL); · 26 unmodified lines | |||
| 414 | /** | 428 | /** |
| 415 | * pm8001_ctl_ob_queue_log_show - Out bound Queue log | 429 | * pm8001_ctl_ob_queue_log_show - Out bound Queue log |
| 416 | * @cdev:pointer to embedded class device | 430 | * @cdev:pointer to embedded class device |
| 431 | * @attr: device attribute (unused) | ||
| 417 | * @buf: the buffer returned | 432 | * @buf: the buffer returned |
| 418 | * A sysfs 'read-only' shost attribute. | 433 | * A sysfs 'read-only' shost attribute. |
| 419 | */ | 434 | */ |
| @@ -446,6 +461,7 @@ static DEVICE_ATTR(ob_log, S_IRUGO, pm8001_ctl_ob_queue_log_show, NULL); · 26 unmodified lines | |||
| 446 | /** | 461 | /** |
| 447 | * pm8001_ctl_bios_version_show - Bios version Display | 462 | * pm8001_ctl_bios_version_show - Bios version Display |
| 448 | * @cdev:pointer to embedded class device | 463 | * @cdev:pointer to embedded class device |
| 464 | * @attr: device attribute (unused) | ||
| 449 | * @buf:the buffer returned | 465 | * @buf:the buffer returned |
| 450 | * A sysfs 'read-only' shost attribute. | 466 | * A sysfs 'read-only' shost attribute. |
| 451 | */ | 467 | */ |
| @@ -483,6 +499,7 @@ static DEVICE_ATTR(bios_version, S_IRUGO, pm8001_ctl_bios_version_show, NULL); · 31 unmodified lines | |||
| 483 | /** | 499 | /** |
| 484 | * event_log_size_show - event log size | 500 | * event_log_size_show - event log size |
| 485 | * @cdev: pointer to embedded class device | 501 | * @cdev: pointer to embedded class device |
| 502 | * @attr: device attribute (unused) | ||
| 486 | * @buf: the buffer returned | 503 | * @buf: the buffer returned |
| 487 | * | 504 | * |
| 488 | * A sysfs read shost attribute. | 505 | * A sysfs read shost attribute. |
| @@ -501,6 +518,7 @@ static DEVICE_ATTR_RO(event_log_size); · 12 unmodified lines | |||
| 501 | /** | 518 | /** |
| 502 | * pm8001_ctl_aap_log_show - IOP event log | 519 | * pm8001_ctl_aap_log_show - IOP event log |
| 503 | * @cdev: pointer to embedded class device | 520 | * @cdev: pointer to embedded class device |
| 521 | * @attr: device attribute (unused) | ||
| 504 | * @buf: the buffer returned | 522 | * @buf: the buffer returned |
| 505 | * | 523 | * |
| 506 | * A sysfs 'read-only' shost attribute. | 524 | * A sysfs 'read-only' shost attribute. |
| @@ -538,6 +556,7 @@ static DEVICE_ATTR(iop_log, S_IRUGO, pm8001_ctl_iop_log_show, NULL); · 31 unmodified lines | |||
| 538 | /** | 556 | /** |
| 539 | ** pm8001_ctl_fatal_log_show - fatal error logging | 557 | ** pm8001_ctl_fatal_log_show - fatal error logging |
| 540 | ** @cdev:pointer to embedded class device | 558 | ** @cdev:pointer to embedded class device |
| 559 | ** @attr: device attribute | ||
| 541 | ** @buf: the buffer returned | 560 | ** @buf: the buffer returned |
| 542 | ** | 561 | ** |
| 543 | ** A sysfs 'read-only' shost attribute. | 562 | ** A sysfs 'read-only' shost attribute. |
| @@ -557,6 +576,7 @@ static DEVICE_ATTR(fatal_log, S_IRUGO, pm8001_ctl_fatal_log_show, NULL); · 13 unmodified lines | |||
| 557 | /** | 576 | /** |
| 558 | ** non_fatal_log_show - non fatal error logging | 577 | ** non_fatal_log_show - non fatal error logging |
| 559 | ** @cdev:pointer to embedded class device | 578 | ** @cdev:pointer to embedded class device |
| 579 | ** @attr: device attribute | ||
| 560 | ** @buf: the buffer returned | 580 | ** @buf: the buffer returned |
| 561 | ** | 581 | ** |
| 562 | ** A sysfs 'read-only' shost attribute. | 582 | ** A sysfs 'read-only' shost attribute. |
| @@ -601,8 +621,9 @@ static DEVICE_ATTR_RW(non_fatal_count); · 38 unmodified lines | |||
| 601 | /** | 621 | /** |
| 602 | ** pm8001_ctl_gsm_log_show - gsm dump collection | 622 | ** pm8001_ctl_gsm_log_show - gsm dump collection |
| 603 | ** @cdev:pointer to embedded class device | 623 | ** @cdev:pointer to embedded class device |
| 624 | ** @attr: device attribute (unused) | ||
| 604 | ** @buf: the buffer returned | 625 | ** @buf: the buffer returned |
| 605 | **A sysfs 'read-only' shost attribute. | 626 | ** A sysfs 'read-only' shost attribute. |
| 606 | **/ | 627 | **/ |
| 607 | static ssize_t pm8001_ctl_gsm_log_show(struct device *cdev, | 628 | static ssize_t pm8001_ctl_gsm_log_show(struct device *cdev, |
| 608 | struct device_attribute *attr, char *buf) | 629 | struct device_attribute *attr, char *buf) |
| @@ -333,6 +333,7 @@ static void update_main_config_table(struct pm8001_hba_info *pm8001_ha) · 332 unmodified lines | |||
| 333 | /** | 333 | /** |
| 334 | * update_inbnd_queue_table - update the inbound queue table to the HBA. | 334 | * update_inbnd_queue_table - update the inbound queue table to the HBA. |
| 335 | * @pm8001_ha: our hba card information | 335 | * @pm8001_ha: our hba card information |
| 336 | * @number: entry in the queue | ||
| 336 | */ | 337 | */ |
| 337 | static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, | 338 | static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 338 | int number) | 339 | int number) |
| @@ -354,6 +355,7 @@ static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, · 15 unmodified lines | |||
| 354 | /** | 355 | /** |
| 355 | * update_outbnd_queue_table - update the outbound queue table to the HBA. | 356 | * update_outbnd_queue_table - update the outbound queue table to the HBA. |
| 356 | * @pm8001_ha: our hba card information | 357 | * @pm8001_ha: our hba card information |
| 358 | * @number: entry in the queue | ||
| 357 | */ | 359 | */ |
| 358 | static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, | 360 | static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 359 | int number) | 361 | int number) |
| @@ -473,7 +475,7 @@ static void mpi_set_phys_g3_with_ssc(struct pm8001_hba_info *pm8001_ha, · 113 unmodified lines | |||
| 473 | /** | 475 | /** |
| 474 | * mpi_set_open_retry_interval_reg | 476 | * mpi_set_open_retry_interval_reg |
| 475 | * @pm8001_ha: our hba card information | 477 | * @pm8001_ha: our hba card information |
| 476 | * @interval - interval time for each OPEN_REJECT (RETRY). The units are in 1us. | 478 | * @interval: interval time for each OPEN_REJECT (RETRY). The units are in 1us. |
| 477 | */ | 479 | */ |
| 478 | static void mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha, | 480 | static void mpi_set_open_retry_interval_reg(struct pm8001_hba_info *pm8001_ha, |
| 479 | u32 interval) | 481 | u32 interval) |
| @@ -1231,6 +1233,7 @@ pm8001_chip_intx_interrupt_disable(struct pm8001_hba_info *pm8001_ha) · 751 unmodified lines | |||
| 1231 | /** | 1233 | /** |
| 1232 | * pm8001_chip_msix_interrupt_enable - enable PM8001 chip interrupt | 1234 | * pm8001_chip_msix_interrupt_enable - enable PM8001 chip interrupt |
| 1233 | * @pm8001_ha: our hba card information | 1235 | * @pm8001_ha: our hba card information |
| 1236 | * @int_vec_idx: interrupt number to enable | ||
| 1234 | */ | 1237 | */ |
| 1235 | static void | 1238 | static void |
| 1236 | pm8001_chip_msix_interrupt_enable(struct pm8001_hba_info *pm8001_ha, | 1239 | pm8001_chip_msix_interrupt_enable(struct pm8001_hba_info *pm8001_ha, |
| @@ -1249,6 +1252,7 @@ pm8001_chip_msix_interrupt_enable(struct pm8001_hba_info *pm8001_ha, · 12 unmodified lines | |||
| 1249 | /** | 1252 | /** |
| 1250 | * pm8001_chip_msix_interrupt_disable - disable PM8001 chip interrupt | 1253 | * pm8001_chip_msix_interrupt_disable - disable PM8001 chip interrupt |
| 1251 | * @pm8001_ha: our hba card information | 1254 | * @pm8001_ha: our hba card information |
| 1255 | * @int_vec_idx: interrupt number to disable | ||
| 1252 | */ | 1256 | */ |
| 1253 | static void | 1257 | static void |
| 1254 | pm8001_chip_msix_interrupt_disable(struct pm8001_hba_info *pm8001_ha, | 1258 | pm8001_chip_msix_interrupt_disable(struct pm8001_hba_info *pm8001_ha, |
| @@ -1264,6 +1268,7 @@ pm8001_chip_msix_interrupt_disable(struct pm8001_hba_info *pm8001_ha, · 9 unmodified lines | |||
| 1264 | /** | 1268 | /** |
| 1265 | * pm8001_chip_interrupt_enable - enable PM8001 chip interrupt | 1269 | * pm8001_chip_interrupt_enable - enable PM8001 chip interrupt |
| 1266 | * @pm8001_ha: our hba card information | 1270 | * @pm8001_ha: our hba card information |
| 1271 | * @vec: unused | ||
| 1267 | */ | 1272 | */ |
| 1268 | static void | 1273 | static void |
| 1269 | pm8001_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec) | 1274 | pm8001_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec) |
| @@ -1278,6 +1283,7 @@ pm8001_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec) · 8 unmodified lines | |||
| 1278 | /** | 1283 | /** |
| 1279 | * pm8001_chip_intx_interrupt_disable- disable PM8001 chip interrupt | 1284 | * pm8001_chip_intx_interrupt_disable- disable PM8001 chip interrupt |
| 1280 | * @pm8001_ha: our hba card information | 1285 | * @pm8001_ha: our hba card information |
| 1286 | * @vec: unused | ||
| 1281 | */ | 1287 | */ |
| 1282 | static void | 1288 | static void |
| 1283 | pm8001_chip_interrupt_disable(struct pm8001_hba_info *pm8001_ha, u8 vec) | 1289 | pm8001_chip_interrupt_disable(struct pm8001_hba_info *pm8001_ha, u8 vec) |
| @@ -4500,7 +4506,6 @@ static int pm8001_chip_sata_req(struct pm8001_hba_info *pm8001_ha, · 3216 unmodified lines | |||
| 4500 | /** | 4506 | /** |
| 4501 | * pm8001_chip_phy_start_req - start phy via PHY_START COMMAND | 4507 | * pm8001_chip_phy_start_req - start phy via PHY_START COMMAND |
| 4502 | * @pm8001_ha: our hba card information. | 4508 | * @pm8001_ha: our hba card information. |
| 4503 | * @num: the inbound queue number | ||
| 4504 | * @phy_id: the phy id which we wanted to start up. | 4509 | * @phy_id: the phy id which we wanted to start up. |
| 4505 | */ | 4510 | */ |
| 4506 | static int | 4511 | static int |
| @@ -4536,7 +4541,6 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id) · 29 unmodified lines | |||
| 4536 | /** | 4541 | /** |
| 4537 | * pm8001_chip_phy_stop_req - start phy via PHY_STOP COMMAND | 4542 | * pm8001_chip_phy_stop_req - start phy via PHY_STOP COMMAND |
| 4538 | * @pm8001_ha: our hba card information. | 4543 | * @pm8001_ha: our hba card information. |
| 4539 | * @num: the inbound queue number | ||
| 4540 | * @phy_id: the phy id which we wanted to start up. | 4544 | * @phy_id: the phy id which we wanted to start up. |
| 4541 | */ | 4545 | */ |
| 4542 | static int pm8001_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, | 4546 | static int pm8001_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, |
| @@ -4556,7 +4560,7 @@ static int pm8001_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, · 13 unmodified lines | |||
| 4556 | return ret; | 4560 | return ret; |
| 4557 | } | 4561 | } |
| 4558 | 4562 | ||
| 4559 | /** | 4563 | /* |
| 4560 | * see comments on pm8001_mpi_reg_resp. | 4564 | * see comments on pm8001_mpi_reg_resp. |
| 4561 | */ | 4565 | */ |
| 4562 | static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, | 4566 | static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, |
| @@ -4616,7 +4620,7 @@ static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, · 53 unmodified lines | |||
| 4616 | return rc; | 4620 | return rc; |
| 4617 | } | 4621 | } |
| 4618 | 4622 | ||
| 4619 | /** | 4623 | /* |
| 4620 | * see comments on pm8001_mpi_reg_resp. | 4624 | * see comments on pm8001_mpi_reg_resp. |
| 4621 | */ | 4625 | */ |
| 4622 | int pm8001_chip_dereg_dev_req(struct pm8001_hba_info *pm8001_ha, | 4626 | int pm8001_chip_dereg_dev_req(struct pm8001_hba_info *pm8001_ha, |
| @@ -4641,9 +4645,8 @@ int pm8001_chip_dereg_dev_req(struct pm8001_hba_info *pm8001_ha, · 18 unmodified lines | |||
| 4641 | /** | 4645 | /** |
| 4642 | * pm8001_chip_phy_ctl_req - support the local phy operation | 4646 | * pm8001_chip_phy_ctl_req - support the local phy operation |
| 4643 | * @pm8001_ha: our hba card information. | 4647 | * @pm8001_ha: our hba card information. |
| 4644 | * @num: the inbound queue number | 4648 | * @phyId: the phy id which we wanted to operate |
| 4645 | * @phy_id: the phy id which we wanted to operate | 4649 | * @phy_op: the phy operation to request |
| 4646 | * @phy_op: | ||
| 4647 | */ | 4650 | */ |
| 4648 | static int pm8001_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha, | 4651 | static int pm8001_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha, |
| 4649 | u32 phyId, u32 phy_op) | 4652 | u32 phyId, u32 phy_op) |
| @@ -4679,8 +4682,7 @@ static u32 pm8001_chip_is_our_interrupt(struct pm8001_hba_info *pm8001_ha) · 29 unmodified lines | |||
| 4679 | /** | 4682 | /** |
| 4680 | * pm8001_chip_isr - PM8001 isr handler. | 4683 | * pm8001_chip_isr - PM8001 isr handler. |
| 4681 | * @pm8001_ha: our hba card information. | 4684 | * @pm8001_ha: our hba card information. |
| 4682 | * @irq: irq number. | 4685 | * @vec: IRQ number |
| 4683 | * @stat: stat. | ||
| 4684 | */ | 4686 | */ |
| 4685 | static irqreturn_t | 4687 | static irqreturn_t |
| 4686 | pm8001_chip_isr(struct pm8001_hba_info *pm8001_ha, u8 vec) | 4688 | pm8001_chip_isr(struct pm8001_hba_info *pm8001_ha, u8 vec) |
| @@ -4717,10 +4719,8 @@ static int send_task_abort(struct pm8001_hba_info *pm8001_ha, u32 opc, · 30 unmodified lines | |||
| 4717 | return ret; | 4719 | return ret; |
| 4718 | } | 4720 | } |
| 4719 | 4721 | ||
| 4720 | /** | 4722 | /* |
| 4721 | * pm8001_chip_abort_task - SAS abort task when error or exception happened. | 4723 | * pm8001_chip_abort_task - SAS abort task when error or exception happened. |
| 4722 | * @task: the task we wanted to aborted. | ||
| 4723 | * @flag: the abort flag. | ||
| 4724 | */ | 4724 | */ |
| 4725 | int pm8001_chip_abort_task(struct pm8001_hba_info *pm8001_ha, | 4725 | int pm8001_chip_abort_task(struct pm8001_hba_info *pm8001_ha, |
| 4726 | struct pm8001_device *pm8001_dev, u8 flag, u32 task_tag, u32 cmd_tag) | 4726 | struct pm8001_device *pm8001_dev, u8 flag, u32 task_tag, u32 cmd_tag) |
| @@ -4959,6 +4959,7 @@ int pm8001_chip_set_nvmd_req(struct pm8001_hba_info *pm8001_ha, · 232 unmodified lines | |||
| 4959 | * pm8001_chip_fw_flash_update_build - support the firmware update operation | 4959 | * pm8001_chip_fw_flash_update_build - support the firmware update operation |
| 4960 | * @pm8001_ha: our hba card information. | 4960 | * @pm8001_ha: our hba card information. |
| 4961 | * @fw_flash_updata_info: firmware flash update param | 4961 | * @fw_flash_updata_info: firmware flash update param |
| 4962 | * @tag: Tag to apply to the payload | ||
| 4962 | */ | 4963 | */ |
| 4963 | int | 4964 | int |
| 4964 | pm8001_chip_fw_flash_update_build(struct pm8001_hba_info *pm8001_ha, | 4965 | pm8001_chip_fw_flash_update_build(struct pm8001_hba_info *pm8001_ha, |
| @@ -57,7 +57,7 @@ MODULE_PARM_DESC(link_rate, "Enable link rate.\n" · 56 unmodified lines | |||
| 57 | 57 | ||
| 58 | static struct scsi_transport_template *pm8001_stt; | 58 | static struct scsi_transport_template *pm8001_stt; |
| 59 | 59 | ||
| 60 | /** | 60 | /* |
| 61 | * chip info structure to identify chip key functionality as | 61 | * chip info structure to identify chip key functionality as |
| 62 | * encryption available/not, no of ports, hw specific function ref | 62 | * encryption available/not, no of ports, hw specific function ref |
| 63 | */ | 63 | */ |
| @@ -80,7 +80,7 @@ LIST_HEAD(hba_list); · 16 unmodified lines | |||
| 80 | 80 | ||
| 81 | struct workqueue_struct *pm8001_wq; | 81 | struct workqueue_struct *pm8001_wq; |
| 82 | 82 | ||
| 83 | /** | 83 | /* |
| 84 | * The main structure which LLDD must register for scsi core. | 84 | * The main structure which LLDD must register for scsi core. |
| 85 | */ | 85 | */ |
| 86 | static struct scsi_host_template pm8001_sht = { | 86 | static struct scsi_host_template pm8001_sht = { |
| @@ -109,7 +109,7 @@ static struct scsi_host_template pm8001_sht = { · 22 unmodified lines | |||
| 109 | .track_queue_depth = 1, | 109 | .track_queue_depth = 1, |
| 110 | }; | 110 | }; |
| 111 | 111 | ||
| 112 | /** | 112 | /* |
| 113 | * Sas layer call this function to execute specific task. | 113 | * Sas layer call this function to execute specific task. |
| 114 | */ | 114 | */ |
| 115 | static struct sas_domain_function_template pm8001_transport_ops = { | 115 | static struct sas_domain_function_template pm8001_transport_ops = { |
| @@ -129,9 +129,9 @@ static struct sas_domain_function_template pm8001_transport_ops = { · 13 unmodified lines | |||
| 129 | }; | 129 | }; |
| 130 | 130 | ||
| 131 | /** | 131 | /** |
| 132 | *pm8001_phy_init - initiate our adapter phys | 132 | * pm8001_phy_init - initiate our adapter phys |
| 133 | *@pm8001_ha: our hba structure. | 133 | * @pm8001_ha: our hba structure. |
| 134 | *@phy_id: phy id. | 134 | * @phy_id: phy id. |
| 135 | */ | 135 | */ |
| 136 | static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id) | 136 | static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id) |
| 137 | { | 137 | { |
| @@ -155,9 +155,8 @@ static void pm8001_phy_init(struct pm8001_hba_info *pm8001_ha, int phy_id) · 17 unmodified lines | |||
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | /** | 157 | /** |
| 158 | *pm8001_free - free hba | 158 | * pm8001_free - free hba |
| 159 | *@pm8001_ha: our hba structure. | 159 | * @pm8001_ha: our hba structure. |
| 160 | * | ||
| 161 | */ | 160 | */ |
| 162 | static void pm8001_free(struct pm8001_hba_info *pm8001_ha) | 161 | static void pm8001_free(struct pm8001_hba_info *pm8001_ha) |
| 163 | { | 162 | { |
| @@ -205,6 +204,7 @@ static void pm8001_tasklet(unsigned long opaque) · 41 unmodified lines | |||
| 205 | * pm8001_interrupt_handler_msix - main MSIX interrupt handler. | 204 | * pm8001_interrupt_handler_msix - main MSIX interrupt handler. |
| 206 | * It obtains the vector number and calls the equivalent bottom | 205 | * It obtains the vector number and calls the equivalent bottom |
| 207 | * half or services directly. | 206 | * half or services directly. |
| 207 | * @irq: interrupt number | ||
| 208 | * @opaque: the passed outbound queue/vector. Host structure is | 208 | * @opaque: the passed outbound queue/vector. Host structure is |
| 209 | * retrieved from the same. | 209 | * retrieved from the same. |
| 210 | */ | 210 | */ |
| @@ -230,6 +230,7 @@ static irqreturn_t pm8001_interrupt_handler_msix(int irq, void *opaque) · 19 unmodified lines | |||
| 230 | 230 | ||
| 231 | /** | 231 | /** |
| 232 | * pm8001_interrupt_handler_intx - main INTx interrupt handler. | 232 | * pm8001_interrupt_handler_intx - main INTx interrupt handler. |
| 233 | * @irq: interrupt number | ||
| 233 | * @dev_id: sas_ha structure. The HBA is retrieved from sas_has structure. | 234 | * @dev_id: sas_ha structure. The HBA is retrieved from sas_has structure. |
| 234 | */ | 235 | */ |
| 235 | 236 | ||
| @@ -257,8 +258,8 @@ static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha); · 21 unmodified lines | |||
| 257 | 258 | ||
| 258 | /** | 259 | /** |
| 259 | * pm8001_alloc - initiate our hba structure and 6 DMAs area. | 260 | * pm8001_alloc - initiate our hba structure and 6 DMAs area. |
| 260 | * @pm8001_ha:our hba structure. | 261 | * @pm8001_ha: our hba structure. |
| 261 | * | 262 | * @ent: PCI device ID structure to match on |
| 262 | */ | 263 | */ |
| 263 | static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha, | 264 | static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha, |
| 264 | const struct pci_device_id *ent) | 265 | const struct pci_device_id *ent) |
| @@ -615,7 +616,7 @@ static void pm8001_post_sas_ha_init(struct Scsi_Host *shost, · 350 unmodified lines | |||
| 615 | 616 | ||
| 616 | /** | 617 | /** |
| 617 | * pm8001_init_sas_add - initialize sas address | 618 | * pm8001_init_sas_add - initialize sas address |
| 618 | * @chip_info: our ha struct. | 619 | * @pm8001_ha: our ha struct. |
| 619 | * | 620 | * |
| 620 | * Currently we just set the fixed SAS address to our HBA,for manufacture, | 621 | * Currently we just set the fixed SAS address to our HBA,for manufacture, |
| 621 | * it should read from the EEPROM | 622 | * it should read from the EEPROM |
| @@ -893,8 +894,7 @@ static int pm8001_configure_phy_settings(struct pm8001_hba_info *pm8001_ha) · 271 unmodified lines | |||
| 893 | #ifdef PM8001_USE_MSIX | 894 | #ifdef PM8001_USE_MSIX |
| 894 | /** | 895 | /** |
| 895 | * pm8001_setup_msix - enable MSI-X interrupt | 896 | * pm8001_setup_msix - enable MSI-X interrupt |
| 896 | * @chip_info: our ha struct. | 897 | * @pm8001_ha: our ha struct. |
| 897 | * @irq_handler: irq_handler | ||
| 898 | */ | 898 | */ |
| 899 | static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha) | 899 | static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha) |
| 900 | { | 900 | { |
| @@ -975,7 +975,7 @@ static u32 pm8001_setup_irq(struct pm8001_hba_info *pm8001_ha) · 74 unmodified lines | |||
| 975 | 975 | ||
| 976 | /** | 976 | /** |
| 977 | * pm8001_request_irq - register interrupt | 977 | * pm8001_request_irq - register interrupt |
| 978 | * @chip_info: our ha struct. | 978 | * @pm8001_ha: our ha struct. |
| 979 | */ | 979 | */ |
| 980 | static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha) | 980 | static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha) |
| 981 | { | 981 | { |
| @@ -129,6 +129,7 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, · 128 unmodified lines | |||
| 129 | *pphys_addr_lo = lower_32_bits(phys_align); | 129 | *pphys_addr_lo = lower_32_bits(phys_align); |
| 130 | return 0; | 130 | return 0; |
| 131 | } | 131 | } |
| 132 | |||
| 132 | /** | 133 | /** |
| 133 | * pm8001_find_ha_by_dev - from domain device which come from sas layer to | 134 | * pm8001_find_ha_by_dev - from domain device which come from sas layer to |
| 134 | * find out our hba struct. | 135 | * find out our hba struct. |
| @@ -366,17 +367,15 @@ static int sas_find_local_port_id(struct domain_device *dev) · 231 unmodified lines | |||
| 366 | return 0; | 367 | return 0; |
| 367 | } | 368 | } |
| 368 | 369 | ||
| 370 | #define DEV_IS_GONE(pm8001_dev) \ | ||
| 371 | ((!pm8001_dev || (pm8001_dev->dev_type == SAS_PHY_UNUSED))) | ||
| 369 | /** | 372 | /** |
| 370 | * pm8001_task_exec - queue the task(ssp, smp && ata) to the hardware. | 373 | * pm8001_task_exec - queue the task(ssp, smp && ata) to the hardware. |
| 371 | * @task: the task to be execute. | 374 | * @task: the task to be execute. |
| 372 | * @num: if can_queue great than 1, the task can be queued up. for SMP task, | ||
| 373 | * we always execute one one time. | ||
| 374 | * @gfp_flags: gfp_flags. | 375 | * @gfp_flags: gfp_flags. |
| 375 | * @is_tmf: if it is task management task. | 376 | * @is_tmf: if it is task management task. |
| 376 | * @tmf: the task management IU | 377 | * @tmf: the task management IU |
| 377 | */ | 378 | */ |
| 378 | #define DEV_IS_GONE(pm8001_dev) \ | ||
| 379 | ((!pm8001_dev || (pm8001_dev->dev_type == SAS_PHY_UNUSED))) | ||
| 380 | static int pm8001_task_exec(struct sas_task *task, | 379 | static int pm8001_task_exec(struct sas_task *task, |
| 381 | gfp_t gfp_flags, int is_tmf, struct pm8001_tmf_task *tmf) | 380 | gfp_t gfp_flags, int is_tmf, struct pm8001_tmf_task *tmf) |
| 382 | { | 381 | { |
| @@ -577,6 +576,7 @@ static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha) · 194 unmodified lines | |||
| 577 | /** | 576 | /** |
| 578 | * pm8001_find_dev - find a matching pm8001_device | 577 | * pm8001_find_dev - find a matching pm8001_device |
| 579 | * @pm8001_ha: our hba card information | 578 | * @pm8001_ha: our hba card information |
| 579 | * @device_id: device ID to match against | ||
| 580 | */ | 580 | */ |
| 581 | struct pm8001_device *pm8001_find_dev(struct pm8001_hba_info *pm8001_ha, | 581 | struct pm8001_device *pm8001_find_dev(struct pm8001_hba_info *pm8001_ha, |
| 582 | u32 device_id) | 582 | u32 device_id) |
| @@ -995,6 +995,7 @@ void pm8001_open_reject_retry( · 412 unmodified lines | |||
| 995 | /** | 995 | /** |
| 996 | * Standard mandates link reset for ATA (type 0) and hard reset for | 996 | * Standard mandates link reset for ATA (type 0) and hard reset for |
| 997 | * SSP (type 1) , only for RECOVERY | 997 | * SSP (type 1) , only for RECOVERY |
| 998 | * @dev: the device structure for the device to reset. | ||
| 998 | */ | 999 | */ |
| 999 | int pm8001_I_T_nexus_reset(struct domain_device *dev) | 1000 | int pm8001_I_T_nexus_reset(struct domain_device *dev) |
| 1000 | { | 1001 | { |
| @@ -66,7 +66,7 @@ int pm80xx_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shift_value) · 65 unmodified lines | |||
| 66 | return 0; | 66 | return 0; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void pm80xx_pci_mem_copy(struct pm8001_hba_info *pm8001_ha, u32 soffset, | 69 | static void pm80xx_pci_mem_copy(struct pm8001_hba_info *pm8001_ha, u32 soffset, |
| 70 | const void *destination, | 70 | const void *destination, |
| 71 | u32 dw_count, u32 bus_base_number) | 71 | u32 dw_count, u32 bus_base_number) |
| 72 | { | 72 | { |
| @@ -912,6 +912,7 @@ static void update_main_config_table(struct pm8001_hba_info *pm8001_ha) · 839 unmodified lines | |||
| 912 | /** | 912 | /** |
| 913 | * update_inbnd_queue_table - update the inbound queue table to the HBA. | 913 | * update_inbnd_queue_table - update the inbound queue table to the HBA. |
| 914 | * @pm8001_ha: our hba card information | 914 | * @pm8001_ha: our hba card information |
| 915 | * @number: entry in the queue | ||
| 915 | */ | 916 | */ |
| 916 | static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, | 917 | static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 917 | int number) | 918 | int number) |
| @@ -948,6 +949,7 @@ static void update_inbnd_queue_table(struct pm8001_hba_info *pm8001_ha, · 30 unmodified lines | |||
| 948 | /** | 949 | /** |
| 949 | * update_outbnd_queue_table - update the outbound queue table to the HBA. | 950 | * update_outbnd_queue_table - update the outbound queue table to the HBA. |
| 950 | * @pm8001_ha: our hba card information | 951 | * @pm8001_ha: our hba card information |
| 952 | * @number: entry in the queue | ||
| 951 | */ | 953 | */ |
| 952 | static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, | 954 | static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, |
| 953 | int number) | 955 | int number) |
| @@ -1711,6 +1713,7 @@ pm80xx_chip_intx_interrupt_disable(struct pm8001_hba_info *pm8001_ha) · 757 unmodified lines | |||
| 1711 | /** | 1713 | /** |
| 1712 | * pm8001_chip_interrupt_enable - enable PM8001 chip interrupt | 1714 | * pm8001_chip_interrupt_enable - enable PM8001 chip interrupt |
| 1713 | * @pm8001_ha: our hba card information | 1715 | * @pm8001_ha: our hba card information |
| 1716 | * @vec: interrupt number to enable | ||
| 1714 | */ | 1717 | */ |
| 1715 | static void | 1718 | static void |
| 1716 | pm80xx_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec) | 1719 | pm80xx_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec) |
| @@ -1729,6 +1732,7 @@ pm80xx_chip_interrupt_enable(struct pm8001_hba_info *pm8001_ha, u8 vec) · 12 unmodified lines | |||
| 1729 | /** | 1732 | /** |
| 1730 | * pm8001_chip_interrupt_disable- disable PM8001 chip interrupt | 1733 | * pm8001_chip_interrupt_disable- disable PM8001 chip interrupt |
| 1731 | * @pm8001_ha: our hba card information | 1734 | * @pm8001_ha: our hba card information |
| 1735 | * @vec: interrupt number to disable | ||
| 1732 | */ | 1736 | */ |
| 1733 | static void | 1737 | static void |
| 1734 | pm80xx_chip_interrupt_disable(struct pm8001_hba_info *pm8001_ha, u8 vec) | 1738 | pm80xx_chip_interrupt_disable(struct pm8001_hba_info *pm8001_ha, u8 vec) |
| @@ -4822,7 +4826,6 @@ static int pm80xx_chip_sata_req(struct pm8001_hba_info *pm8001_ha, · 3087 unmodified lines | |||
| 4822 | /** | 4826 | /** |
| 4823 | * pm80xx_chip_phy_start_req - start phy via PHY_START COMMAND | 4827 | * pm80xx_chip_phy_start_req - start phy via PHY_START COMMAND |
| 4824 | * @pm8001_ha: our hba card information. | 4828 | * @pm8001_ha: our hba card information. |
| 4825 | * @num: the inbound queue number | ||
| 4826 | * @phy_id: the phy id which we wanted to start up. | 4829 | * @phy_id: the phy id which we wanted to start up. |
| 4827 | */ | 4830 | */ |
| 4828 | static int | 4831 | static int |
| @@ -4864,7 +4867,6 @@ pm80xx_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id) · 35 unmodified lines | |||
| 4864 | /** | 4867 | /** |
| 4865 | * pm8001_chip_phy_stop_req - start phy via PHY_STOP COMMAND | 4868 | * pm8001_chip_phy_stop_req - start phy via PHY_STOP COMMAND |
| 4866 | * @pm8001_ha: our hba card information. | 4869 | * @pm8001_ha: our hba card information. |
| 4867 | * @num: the inbound queue number | ||
| 4868 | * @phy_id: the phy id which we wanted to start up. | 4870 | * @phy_id: the phy id which we wanted to start up. |
| 4869 | */ | 4871 | */ |
| 4870 | static int pm80xx_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, | 4872 | static int pm80xx_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, |
| @@ -4884,7 +4886,7 @@ static int pm80xx_chip_phy_stop_req(struct pm8001_hba_info *pm8001_ha, · 13 unmodified lines | |||
| 4884 | return ret; | 4886 | return ret; |
| 4885 | } | 4887 | } |
| 4886 | 4888 | ||
| 4887 | /** | 4889 | /* |
| 4888 | * see comments on pm8001_mpi_reg_resp. | 4890 | * see comments on pm8001_mpi_reg_resp. |
| 4889 | */ | 4891 | */ |
| 4890 | static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, | 4892 | static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, |
| @@ -4957,9 +4959,8 @@ static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, · 66 unmodified lines | |||
| 4957 | /** | 4959 | /** |
| 4958 | * pm80xx_chip_phy_ctl_req - support the local phy operation | 4960 | * pm80xx_chip_phy_ctl_req - support the local phy operation |
| 4959 | * @pm8001_ha: our hba card information. | 4961 | * @pm8001_ha: our hba card information. |
| 4960 | * @num: the inbound queue number | 4962 | * @phyId: the phy id which we wanted to operate |
| 4961 | * @phy_id: the phy id which we wanted to operate | 4963 | * @phy_op: phy operation to request |
| 4962 | * @phy_op: | ||
| 4963 | */ | 4964 | */ |
| 4964 | static int pm80xx_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha, | 4965 | static int pm80xx_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha, |
| 4965 | u32 phyId, u32 phy_op) | 4966 | u32 phyId, u32 phy_op) |
| @@ -4998,8 +4999,7 @@ static u32 pm80xx_chip_is_our_interrupt(struct pm8001_hba_info *pm8001_ha) · 32 unmodified lines | |||
| 4998 | /** | 4999 | /** |
| 4999 | * pm8001_chip_isr - PM8001 isr handler. | 5000 | * pm8001_chip_isr - PM8001 isr handler. |
| 5000 | * @pm8001_ha: our hba card information. | 5001 | * @pm8001_ha: our hba card information. |
| 5001 | * @irq: irq number. | 5002 | * @vec: irq number. |
| 5002 | * @stat: stat. | ||
| 5003 | */ | 5003 | */ |
| 5004 | static irqreturn_t | 5004 | static irqreturn_t |
| 5005 | pm80xx_chip_isr(struct pm8001_hba_info *pm8001_ha, u8 vec) | 5005 | pm80xx_chip_isr(struct pm8001_hba_info *pm8001_ha, u8 vec) |
| @@ -5013,8 +5013,9 @@ pm80xx_chip_isr(struct pm8001_hba_info *pm8001_ha, u8 vec) · 7 unmodified lines | |||
| 5013 | return IRQ_HANDLED; | 5013 | return IRQ_HANDLED; |
| 5014 | } | 5014 | } |
| 5015 | 5015 | ||
| 5016 | void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha, | 5016 | static void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha, |
| 5017 | u32 operation, u32 phyid, u32 length, u32 *buf) | 5017 | u32 operation, u32 phyid, |
| 5018 | u32 length, u32 *buf) | ||
| 5018 | { | 5019 | { |
| 5019 | u32 tag , i, j = 0; | 5020 | u32 tag , i, j = 0; |
| 5020 | int rc; | 5021 | int rc; |
| @@ -779,7 +779,6 @@ static int ppa_engine(ppa_struct *dev, struct scsi_cmnd *cmd) · 778 unmodified lines | |||
| 779 | (DID_OK << 16) + (h << 8) + (l & STATUS_MASK); | 779 | (DID_OK << 16) + (h << 8) + (l & STATUS_MASK); |
| 780 | } | 780 | } |
| 781 | return 0; /* Finished */ | 781 | return 0; /* Finished */ |
| 782 | break; | ||
| 783 | 782 | ||
| 784 | default: | 783 | default: |
| 785 | printk(KERN_ERR "ppa: Invalid scsi phase\n"); | 784 | printk(KERN_ERR "ppa: Invalid scsi phase\n"); |
| @@ -847,10 +846,8 @@ static int ppa_abort(struct scsi_cmnd *cmd) · 61 unmodified lines | |||
| 847 | case 1: /* Have not connected to interface */ | 846 | case 1: /* Have not connected to interface */ |
| 848 | dev->cur_cmd = NULL; /* Forget the problem */ | 847 | dev->cur_cmd = NULL; /* Forget the problem */ |
| 849 | return SUCCESS; | 848 | return SUCCESS; |
| 850 | break; | ||
| 851 | default: /* SCSI command sent, can not abort */ | 849 | default: /* SCSI command sent, can not abort */ |
| 852 | return FAILED; | 850 | return FAILED; |
| 853 | break; | ||
| 854 | } | 851 | } |
| 855 | } | 852 | } |
| 856 | 853 | ||
| @@ -14,10 +14,9 @@ · 13 unmodified lines | |||
| 14 | 14 | ||
| 15 | static struct dentry *qedf_dbg_root; | 15 | static struct dentry *qedf_dbg_root; |
| 16 | 16 | ||
| 17 | /** | 17 | /* |
| 18 | * qedf_dbg_host_init - setup the debugfs file for the pf | 18 | * qedf_dbg_host_init - setup the debugfs file for the pf |
| 19 | * @pf: the pf that is starting up | 19 | */ |
| 20 | **/ | ||
| 21 | void | 20 | void |
| 22 | qedf_dbg_host_init(struct qedf_dbg_ctx *qedf, | 21 | qedf_dbg_host_init(struct qedf_dbg_ctx *qedf, |
| 23 | const struct qedf_debugfs_ops *dops, | 22 | const struct qedf_debugfs_ops *dops, |
| @@ -42,10 +41,9 @@ qedf_dbg_host_init(struct qedf_dbg_ctx *qedf, · 18 unmodified lines | |||
| 42 | } | 41 | } |
| 43 | } | 42 | } |
| 44 | 43 | ||
| 45 | /** | 44 | /* |
| 46 | * qedf_dbg_host_exit - clear out the pf's debugfs entries | 45 | * qedf_dbg_host_exit - clear out the pf's debugfs entries |
| 47 | * @pf: the pf that is stopping | 46 | */ |
| 48 | **/ | ||
| 49 | void | 47 | void |
| 50 | qedf_dbg_host_exit(struct qedf_dbg_ctx *qedf_dbg) | 48 | qedf_dbg_host_exit(struct qedf_dbg_ctx *qedf_dbg) |
| 51 | { | 49 | { |
| @@ -56,9 +54,9 @@ qedf_dbg_host_exit(struct qedf_dbg_ctx *qedf_dbg) · 4 unmodified lines | |||
| 56 | qedf_dbg->bdf_dentry = NULL; | 54 | qedf_dbg->bdf_dentry = NULL; |
| 57 | } | 55 | } |
| 58 | 56 | ||
| 59 | /** | 57 | /* |
| 60 | * qedf_dbg_init - start up debugfs for the driver | 58 | * qedf_dbg_init - start up debugfs for the driver |
| 61 | **/ | 59 | */ |
| 62 | void | 60 | void |
| 63 | qedf_dbg_init(char *drv_name) | 61 | qedf_dbg_init(char *drv_name) |
| 64 | { | 62 | { |
| @@ -68,9 +66,9 @@ qedf_dbg_init(char *drv_name) · 3 unmodified lines | |||
| 68 | qedf_dbg_root = debugfs_create_dir(drv_name, NULL); | 66 | qedf_dbg_root = debugfs_create_dir(drv_name, NULL); |
| 69 | } | 67 | } |
| 70 | 68 | ||
| 71 | /** | 69 | /* |
| 72 | * qedf_dbg_exit - clean out the driver's debugfs entries | 70 | * qedf_dbg_exit - clean out the driver's debugfs entries |
| 73 | **/ | 71 | */ |
| 74 | void | 72 | void |
| 75 | qedf_dbg_exit(void) | 73 | qedf_dbg_exit(void) |
| 76 | { | 74 | { |
| @@ -22,7 +22,6 @@ static void qedf_cmd_timeout(struct work_struct *work) · 21 unmodified lines | |||
| 22 | container_of(work, struct qedf_ioreq, timeout_work.work); | 22 | container_of(work, struct qedf_ioreq, timeout_work.work); |
| 23 | struct qedf_ctx *qedf; | 23 | struct qedf_ctx *qedf; |
| 24 | struct qedf_rport *fcport; | 24 | struct qedf_rport *fcport; |
| 25 | u8 op = 0; | ||
| 26 | 25 | ||
| 27 | if (io_req == NULL) { | 26 | if (io_req == NULL) { |
| 28 | QEDF_INFO(NULL, QEDF_LOG_IO, "io_req is NULL.\n"); | 27 | QEDF_INFO(NULL, QEDF_LOG_IO, "io_req is NULL.\n"); |
| @@ -89,7 +88,6 @@ static void qedf_cmd_timeout(struct work_struct *work) · 60 unmodified lines | |||
| 89 | io_req->event = QEDF_IOREQ_EV_ELS_TMO; | 88 | io_req->event = QEDF_IOREQ_EV_ELS_TMO; |
| 90 | /* Call callback function to complete command */ | 89 | /* Call callback function to complete command */ |
| 91 | if (io_req->cb_func && io_req->cb_arg) { | 90 | if (io_req->cb_func && io_req->cb_arg) { |
| 92 | op = io_req->cb_arg->op; | ||
| 93 | io_req->cb_func(io_req->cb_arg); | 91 | io_req->cb_func(io_req->cb_arg); |
| 94 | io_req->cb_arg = NULL; | 92 | io_req->cb_arg = NULL; |
| 95 | } | 93 | } |
| @@ -487,7 +485,7 @@ static int qedf_map_sg(struct qedf_ioreq *io_req) · 391 unmodified lines | |||
| 487 | int sg_count = 0; | 485 | int sg_count = 0; |
| 488 | int bd_count = 0; | 486 | int bd_count = 0; |
| 489 | u32 sg_len; | 487 | u32 sg_len; |
| 490 | u64 addr, end_addr; | 488 | u64 addr; |
| 491 | int i = 0; | 489 | int i = 0; |
| 492 | 490 | ||
| 493 | sg_count = dma_map_sg(&qedf->pdev->dev, scsi_sglist(sc), | 491 | sg_count = dma_map_sg(&qedf->pdev->dev, scsi_sglist(sc), |
| @@ -502,10 +500,9 @@ static int qedf_map_sg(struct qedf_ioreq *io_req) · 8 unmodified lines | |||
| 502 | scsi_for_each_sg(sc, sg, sg_count, i) { | 500 | scsi_for_each_sg(sc, sg, sg_count, i) { |
| 503 | sg_len = (u32)sg_dma_len(sg); | 501 | sg_len = (u32)sg_dma_len(sg); |
| 504 | addr = (u64)sg_dma_address(sg); | 502 | addr = (u64)sg_dma_address(sg); |
| 505 | end_addr = (u64)(addr + sg_len); | ||
| 506 | 503 | ||
| 507 | /* | 504 | /* |
| 508 | * Intermediate s/g element so check if start and end address | 505 | * Intermediate s/g element so check if start address |
| 509 | * is page aligned. Only required for writes and only if the | 506 | * is page aligned. Only required for writes and only if the |
| 510 | * number of scatter/gather elements is 8 or more. | 507 | * number of scatter/gather elements is 8 or more. |
| 511 | */ | 508 | */ |
| @@ -860,7 +857,6 @@ int qedf_post_io_req(struct qedf_rport *fcport, struct qedf_ioreq *io_req) · 348 unmodified lines | |||
| 860 | struct qedf_ctx *qedf = lport_priv(lport); | 857 | struct qedf_ctx *qedf = lport_priv(lport); |
| 861 | struct e4_fcoe_task_context *task_ctx; | 858 | struct e4_fcoe_task_context *task_ctx; |
| 862 | u16 xid; | 859 | u16 xid; |
| 863 | enum fcoe_task_type req_type = 0; | ||
| 864 | struct fcoe_wqe *sqe; | 860 | struct fcoe_wqe *sqe; |
| 865 | u16 sqe_idx; | 861 | u16 sqe_idx; |
| 866 | 862 | ||
| @@ -873,11 +869,9 @@ int qedf_post_io_req(struct qedf_rport *fcport, struct qedf_ioreq *io_req) · 6 unmodified lines | |||
| 873 | io_req->cpu = smp_processor_id(); | 869 | io_req->cpu = smp_processor_id(); |
| 874 | 870 | ||
| 875 | if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) { | 871 | if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) { |
| 876 | req_type = FCOE_TASK_TYPE_READ_INITIATOR; | ||
| 877 | io_req->io_req_flags = QEDF_READ; | 872 | io_req->io_req_flags = QEDF_READ; |
| 878 | qedf->input_requests++; | 873 | qedf->input_requests++; |
| 879 | } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) { | 874 | } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) { |
| 880 | req_type = FCOE_TASK_TYPE_WRITE_INITIATOR; | ||
| 881 | io_req->io_req_flags = QEDF_WRITE; | 875 | io_req->io_req_flags = QEDF_WRITE; |
| 882 | qedf->output_requests++; | 876 | qedf->output_requests++; |
| 883 | } else { | 877 | } else { |
| @@ -1130,8 +1124,6 @@ static void qedf_unmap_sg_list(struct qedf_ctx *qedf, struct qedf_ioreq *io_req) · 246 unmodified lines | |||
| 1130 | void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, | 1124 | void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, |
| 1131 | struct qedf_ioreq *io_req) | 1125 | struct qedf_ioreq *io_req) |
| 1132 | { | 1126 | { |
| 1133 | u16 xid; | ||
| 1134 | struct e4_fcoe_task_context *task_ctx; | ||
| 1135 | struct scsi_cmnd *sc_cmd; | 1127 | struct scsi_cmnd *sc_cmd; |
| 1136 | struct fcoe_cqe_rsp_info *fcp_rsp; | 1128 | struct fcoe_cqe_rsp_info *fcp_rsp; |
| 1137 | struct qedf_rport *fcport; | 1129 | struct qedf_rport *fcport; |
| @@ -1155,8 +1147,6 @@ void qedf_scsi_completion(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, · 17 unmodified lines | |||
| 1155 | return; | 1147 | return; |
| 1156 | } | 1148 | } |
| 1157 | 1149 | ||
| 1158 | xid = io_req->xid; | ||
| 1159 | task_ctx = qedf_get_task_mem(&qedf->tasks, xid); | ||
| 1160 | sc_cmd = io_req->sc_cmd; | 1150 | sc_cmd = io_req->sc_cmd; |
| 1161 | fcp_rsp = &cqe->cqe_info.rsp_info; | 1151 | fcp_rsp = &cqe->cqe_info.rsp_info; |
| 1162 | 1152 | ||
| @@ -1342,7 +1332,6 @@ out: · 179 unmodified lines | |||
| 1342 | void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, | 1332 | void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, |
| 1343 | int result) | 1333 | int result) |
| 1344 | { | 1334 | { |
| 1345 | u16 xid; | ||
| 1346 | struct scsi_cmnd *sc_cmd; | 1335 | struct scsi_cmnd *sc_cmd; |
| 1347 | int refcount; | 1336 | int refcount; |
| 1348 | 1337 | ||
| @@ -1364,7 +1353,6 @@ void qedf_scsi_done(struct qedf_ctx *qedf, struct qedf_ioreq *io_req, · 15 unmodified lines | |||
| 1364 | */ | 1353 | */ |
| 1365 | clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags); | 1354 | clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags); |
| 1366 | 1355 | ||
| 1367 | xid = io_req->xid; | ||
| 1368 | sc_cmd = io_req->sc_cmd; | 1356 | sc_cmd = io_req->sc_cmd; |
| 1369 | 1357 | ||
| 1370 | if (!sc_cmd) { | 1358 | if (!sc_cmd) { |
| @@ -1863,7 +1851,6 @@ int qedf_initiate_abts(struct qedf_ioreq *io_req, bool return_scsi_cmd_on_abts) · 492 unmodified lines | |||
| 1863 | struct fc_rport_priv *rdata; | 1851 | struct fc_rport_priv *rdata; |
| 1864 | struct qedf_ctx *qedf; | 1852 | struct qedf_ctx *qedf; |
| 1865 | u16 xid; | 1853 | u16 xid; |
| 1866 | u32 r_a_tov = 0; | ||
| 1867 | int rc = 0; | 1854 | int rc = 0; |
| 1868 | unsigned long flags; | 1855 | unsigned long flags; |
| 1869 | struct fcoe_wqe *sqe; | 1856 | struct fcoe_wqe *sqe; |
| @@ -1886,7 +1873,6 @@ int qedf_initiate_abts(struct qedf_ioreq *io_req, bool return_scsi_cmd_on_abts) · 16 unmodified lines | |||
| 1886 | goto out; | 1873 | goto out; |
| 1887 | } | 1874 | } |
| 1888 | 1875 | ||
| 1889 | r_a_tov = rdata->r_a_tov; | ||
| 1890 | lport = qedf->lport; | 1876 | lport = qedf->lport; |
| 1891 | 1877 | ||
| 1892 | if (lport->state != LPORT_ST_READY || !(lport->link_up)) { | 1878 | if (lport->state != LPORT_ST_READY || !(lport->link_up)) { |
| @@ -1964,14 +1950,12 @@ void qedf_process_abts_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, · 71 unmodified lines | |||
| 1964 | struct qedf_ioreq *io_req) | 1950 | struct qedf_ioreq *io_req) |
| 1965 | { | 1951 | { |
| 1966 | uint32_t r_ctl; | 1952 | uint32_t r_ctl; |
| 1967 | uint16_t xid; | ||
| 1968 | int rc; | 1953 | int rc; |
| 1969 | struct qedf_rport *fcport = io_req->fcport; | 1954 | struct qedf_rport *fcport = io_req->fcport; |
| 1970 | 1955 | ||
| 1971 | QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, "Entered with xid = " | 1956 | QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_SCSI_TM, "Entered with xid = " |
| 1972 | "0x%x cmd_type = %d\n", io_req->xid, io_req->cmd_type); | 1957 | "0x%x cmd_type = %d\n", io_req->xid, io_req->cmd_type); |
| 1973 | 1958 | ||
| 1974 | xid = io_req->xid; | ||
| 1975 | r_ctl = cqe->cqe_info.abts_info.r_ctl; | 1959 | r_ctl = cqe->cqe_info.abts_info.r_ctl; |
| 1976 | 1960 | ||
| 1977 | /* This was added at a point when we were scheduling abts_compl & | 1961 | /* This was added at a point when we were scheduling abts_compl & |
| @@ -2159,8 +2143,6 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req, · 181 unmodified lines | |||
| 2159 | { | 2143 | { |
| 2160 | struct qedf_rport *fcport; | 2144 | struct qedf_rport *fcport; |
| 2161 | struct qedf_ctx *qedf; | 2145 | struct qedf_ctx *qedf; |
| 2162 | uint16_t xid; | ||
| 2163 | struct e4_fcoe_task_context *task; | ||
| 2164 | int tmo = 0; | 2146 | int tmo = 0; |
| 2165 | int rc = SUCCESS; | 2147 | int rc = SUCCESS; |
| 2166 | unsigned long flags; | 2148 | unsigned long flags; |
| @@ -2220,12 +2202,9 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req, · 53 unmodified lines | |||
| 2220 | refcount, fcport, fcport->rdata->ids.port_id); | 2202 | refcount, fcport, fcport->rdata->ids.port_id); |
| 2221 | 2203 | ||
| 2222 | /* Cleanup cmds re-use the same TID as the original I/O */ | 2204 | /* Cleanup cmds re-use the same TID as the original I/O */ |
| 2223 | xid = io_req->xid; | ||
| 2224 | io_req->cmd_type = QEDF_CLEANUP; | 2205 | io_req->cmd_type = QEDF_CLEANUP; |
| 2225 | io_req->return_scsi_cmd_on_abts = return_scsi_cmd_on_abts; | 2206 | io_req->return_scsi_cmd_on_abts = return_scsi_cmd_on_abts; |
| 2226 | 2207 | ||
| 2227 | task = qedf_get_task_mem(&qedf->tasks, xid); | ||
| 2228 | |||
| 2229 | init_completion(&io_req->cleanup_done); | 2208 | init_completion(&io_req->cleanup_done); |
| 2230 | 2209 | ||
| 2231 | spin_lock_irqsave(&fcport->rport_lock, flags); | 2210 | spin_lock_irqsave(&fcport->rport_lock, flags); |
| @@ -2531,7 +2510,6 @@ void qedf_process_unsol_compl(struct qedf_ctx *qedf, uint16_t que_idx, · 299 unmodified lines | |||
| 2531 | struct fcoe_cqe *cqe) | 2510 | struct fcoe_cqe *cqe) |
| 2532 | { | 2511 | { |
| 2533 | unsigned long flags; | 2512 | unsigned long flags; |
| 2534 | uint16_t tmp; | ||
| 2535 | uint16_t pktlen = cqe->cqe_info.unsolic_info.pkt_len; | 2513 | uint16_t pktlen = cqe->cqe_info.unsolic_info.pkt_len; |
| 2536 | u32 payload_len, crc; | 2514 | u32 payload_len, crc; |
| 2537 | struct fc_frame_header *fh; | 2515 | struct fc_frame_header *fh; |
| @@ -2629,9 +2607,9 @@ increment_prod: · 91 unmodified lines | |||
| 2629 | qedf->bdq_prod_idx = 0; | 2607 | qedf->bdq_prod_idx = 0; |
| 2630 | 2608 | ||
| 2631 | writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod); | 2609 | writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod); |
| 2632 | tmp = readw(qedf->bdq_primary_prod); | 2610 | readw(qedf->bdq_primary_prod); |
| 2633 | writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod); | 2611 | writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod); |
| 2634 | tmp = readw(qedf->bdq_secondary_prod); | 2612 | readw(qedf->bdq_secondary_prod); |
| 2635 | 2613 | ||
| 2636 | spin_unlock_irqrestore(&qedf->hba_lock, flags); | 2614 | spin_unlock_irqrestore(&qedf->hba_lock, flags); |
| 2637 | } | 2615 | } |
| @@ -1041,9 +1041,8 @@ static int qedf_xmit_l2_frame(struct qedf_rport *fcport, struct fc_frame *fp) · 1040 unmodified lines | |||
| 1041 | return rc; | 1041 | return rc; |
| 1042 | } | 1042 | } |
| 1043 | 1043 | ||
| 1044 | /** | 1044 | /* |
| 1045 | * qedf_xmit - qedf FCoE frame transmit function | 1045 | * qedf_xmit - qedf FCoE frame transmit function |
| 1046 | * | ||
| 1047 | */ | 1046 | */ |
| 1048 | static int qedf_xmit(struct fc_lport *lport, struct fc_frame *fp) | 1047 | static int qedf_xmit(struct fc_lport *lport, struct fc_frame *fp) |
| 1049 | { | 1048 | { |
| @@ -1437,7 +1436,7 @@ static void qedf_cleanup_fcport(struct qedf_ctx *qedf, · 387 unmodified lines | |||
| 1437 | kref_put(&rdata->kref, fc_rport_destroy); | 1436 | kref_put(&rdata->kref, fc_rport_destroy); |
| 1438 | } | 1437 | } |
| 1439 | 1438 | ||
| 1440 | /** | 1439 | /* |
| 1441 | * This event_callback is called after successful completion of libfc | 1440 | * This event_callback is called after successful completion of libfc |
| 1442 | * initiated target login. qedf can proceed with initiating the session | 1441 | * initiated target login. qedf can proceed with initiating the session |
| 1443 | * establishment. | 1442 | * establishment. |
| @@ -3222,7 +3221,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) · 1778 unmodified lines | |||
| 3222 | void *task_start, *task_end; | 3221 | void *task_start, *task_end; |
| 3223 | struct qed_slowpath_params slowpath_params; | 3222 | struct qed_slowpath_params slowpath_params; |
| 3224 | struct qed_probe_params qed_params; | 3223 | struct qed_probe_params qed_params; |
| 3225 | u16 tmp; | ||
| 3226 | 3224 | ||
| 3227 | /* | 3225 | /* |
| 3228 | * When doing error recovery we didn't reap the lport so don't try | 3226 | * When doing error recovery we didn't reap the lport so don't try |
| @@ -3416,9 +3414,9 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) · 187 unmodified lines | |||
| 3416 | "Writing %d to primary and secondary BDQ doorbell registers.\n", | 3414 | "Writing %d to primary and secondary BDQ doorbell registers.\n", |
| 3417 | qedf->bdq_prod_idx); | 3415 | qedf->bdq_prod_idx); |
| 3418 | writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod); | 3416 | writew(qedf->bdq_prod_idx, qedf->bdq_primary_prod); |
| 3419 | tmp = readw(qedf->bdq_primary_prod); | 3417 | readw(qedf->bdq_primary_prod); |
| 3420 | writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod); | 3418 | writew(qedf->bdq_prod_idx, qedf->bdq_secondary_prod); |
| 3421 | tmp = readw(qedf->bdq_secondary_prod); | 3419 | readw(qedf->bdq_secondary_prod); |
| 3422 | 3420 | ||
| 3423 | qed_ops->common->set_power_state(qedf->cdev, PCI_D0); | 3421 | qed_ops->common->set_power_state(qedf->cdev, PCI_D0); |
| 3424 | 3422 | ||
| @@ -352,7 +352,6 @@ static void qedi_put_rq_bdq_buf(struct qedi_ctx *qedi, · 351 unmodified lines | |||
| 352 | struct iscsi_cqe_unsolicited *cqe, | 352 | struct iscsi_cqe_unsolicited *cqe, |
| 353 | int count) | 353 | int count) |
| 354 | { | 354 | { |
| 355 | u16 tmp; | ||
| 356 | u16 idx = 0; | 355 | u16 idx = 0; |
| 357 | struct scsi_bd *pbl; | 356 | struct scsi_bd *pbl; |
| 358 | 357 | ||
| @@ -381,10 +380,10 @@ static void qedi_put_rq_bdq_buf(struct qedi_ctx *qedi, · 22 unmodified lines | |||
| 381 | qedi->bdq_prod_idx += count; | 380 | qedi->bdq_prod_idx += count; |
| 382 | 381 | ||
| 383 | writew(qedi->bdq_prod_idx, qedi->bdq_primary_prod); | 382 | writew(qedi->bdq_prod_idx, qedi->bdq_primary_prod); |
| 384 | tmp = readw(qedi->bdq_primary_prod); | 383 | readw(qedi->bdq_primary_prod); |
| 385 | 384 | ||
| 386 | writew(qedi->bdq_prod_idx, qedi->bdq_secondary_prod); | 385 | writew(qedi->bdq_prod_idx, qedi->bdq_secondary_prod); |
| 387 | tmp = readw(qedi->bdq_secondary_prod); | 386 | readw(qedi->bdq_secondary_prod); |
| 388 | } | 387 | } |
| 389 | 388 | ||
| 390 | static void qedi_unsol_pdu_adjust_bdq(struct qedi_ctx *qedi, | 389 | static void qedi_unsol_pdu_adjust_bdq(struct qedi_ctx *qedi, |
| @@ -1546,7 +1546,7 @@ static const struct { · 1545 unmodified lines | |||
| 1546 | }, | 1546 | }, |
| 1547 | }; | 1547 | }; |
| 1548 | 1548 | ||
| 1549 | char *qedi_get_iscsi_error(enum iscsi_error_types err_code) | 1549 | static char *qedi_get_iscsi_error(enum iscsi_error_types err_code) |
| 1550 | { | 1550 | { |
| 1551 | int i; | 1551 | int i; |
| 1552 | char *msg = NULL; | 1552 | char *msg = NULL; |
| @@ -1155,7 +1155,6 @@ static int qedi_queue_cqe(struct qedi_ctx *qedi, union iscsi_cqe *cqe, · 1154 unmodified lines | |||
| 1155 | { | 1155 | { |
| 1156 | struct qedi_work *qedi_work; | 1156 | struct qedi_work *qedi_work; |
| 1157 | struct qedi_conn *q_conn; | 1157 | struct qedi_conn *q_conn; |
| 1158 | struct iscsi_conn *conn; | ||
| 1159 | struct qedi_cmd *qedi_cmd; | 1158 | struct qedi_cmd *qedi_cmd; |
| 1160 | u32 iscsi_cid; | 1159 | u32 iscsi_cid; |
| 1161 | int rc = 0; | 1160 | int rc = 0; |
| @@ -1168,7 +1167,6 @@ static int qedi_queue_cqe(struct qedi_ctx *qedi, union iscsi_cqe *cqe, · 6 unmodified lines | |||
| 1168 | iscsi_cid); | 1167 | iscsi_cid); |
| 1169 | return -1; | 1168 | return -1; |
| 1170 | } | 1169 | } |
| 1171 | conn = q_conn->cls_conn->dd_data; | ||
| 1172 | 1170 | ||
| 1173 | switch (cqe->cqe_common.cqe_type) { | 1171 | switch (cqe->cqe_common.cqe_type) { |
| 1174 | case ISCSI_CQE_TYPE_SOLICITED: | 1172 | case ISCSI_CQE_TYPE_SOLICITED: |
| @@ -1962,7 +1960,7 @@ void qedi_reset_host_mtu(struct qedi_ctx *qedi, u16 mtu) · 787 unmodified lines | |||
| 1962 | qedi_ops->ll2->start(qedi->cdev, ¶ms); | 1960 | qedi_ops->ll2->start(qedi->cdev, ¶ms); |
| 1963 | } | 1961 | } |
| 1964 | 1962 | ||
| 1965 | /** | 1963 | /* |
| 1966 | * qedi_get_nvram_block: - Scan through the iSCSI NVRAM block (while accounting | 1964 | * qedi_get_nvram_block: - Scan through the iSCSI NVRAM block (while accounting |
| 1967 | * for gaps) for the matching absolute-pf-id of the QEDI device. | 1965 | * for gaps) for the matching absolute-pf-id of the QEDI device. |
| 1968 | */ | 1966 | */ |
| @@ -2429,7 +2427,6 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) · 460 unmodified lines | |||
| 2429 | struct qed_probe_params qed_params; | 2427 | struct qed_probe_params qed_params; |
| 2430 | void *task_start, *task_end; | 2428 | void *task_start, *task_end; |
| 2431 | int rc; | 2429 | int rc; |
| 2432 | u16 tmp; | ||
| 2433 | 2430 | ||
| 2434 | if (mode != QEDI_MODE_RECOVERY) { | 2431 | if (mode != QEDI_MODE_RECOVERY) { |
| 2435 | qedi = qedi_host_alloc(pdev); | 2432 | qedi = qedi_host_alloc(pdev); |
| @@ -2528,9 +2525,9 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) · 92 unmodified lines | |||
| 2528 | "Writing %d to primary and secondary BDQ doorbell registers.\n", | 2525 | "Writing %d to primary and secondary BDQ doorbell registers.\n", |
| 2529 | qedi->bdq_prod_idx); | 2526 | qedi->bdq_prod_idx); |
| 2530 | writew(qedi->bdq_prod_idx, qedi->bdq_primary_prod); | 2527 | writew(qedi->bdq_prod_idx, qedi->bdq_primary_prod); |
| 2531 | tmp = readw(qedi->bdq_primary_prod); | 2528 | readw(qedi->bdq_primary_prod); |
| 2532 | writew(qedi->bdq_prod_idx, qedi->bdq_secondary_prod); | 2529 | writew(qedi->bdq_prod_idx, qedi->bdq_secondary_prod); |
| 2533 | tmp = readw(qedi->bdq_secondary_prod); | 2530 | readw(qedi->bdq_secondary_prod); |
| 2534 | 2531 | ||
| 2535 | ether_addr_copy(qedi->mac, qedi->dev_info.common.hw_mac); | 2532 | ether_addr_copy(qedi->mac, qedi->dev_info.common.hw_mac); |
| 2536 | QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "MAC address is %pM.\n", | 2533 | QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "MAC address is %pM.\n", |
| @@ -223,8 +223,7 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct bsg_job *bsg_job) · 222 unmodified lines | |||
| 223 | 223 | ||
| 224 | /* validate fcp priority data */ | 224 | /* validate fcp priority data */ |
| 225 | 225 | ||
| 226 | if (!qla24xx_fcp_prio_cfg_valid(vha, | 226 | if (!qla24xx_fcp_prio_cfg_valid(vha, ha->fcp_prio_cfg, 1)) { |
| 227 | (struct qla_fcp_prio_cfg *) ha->fcp_prio_cfg, 1)) { | ||
| 228 | bsg_reply->result = (DID_ERROR << 16); | 227 | bsg_reply->result = (DID_ERROR << 16); |
| 229 | ret = -EINVAL; | 228 | ret = -EINVAL; |
| 230 | /* If buffer was invalidatic int | 229 | /* If buffer was invalidatic int |
| @@ -11,10 +11,8 @@ · 10 unmodified lines | |||
| 11 | * ---------------------------------------------------------------------- | 11 | * ---------------------------------------------------------------------- |
| 12 | * | Level | Last Value Used | Holes | | 12 | * | Level | Last Value Used | Holes | |
| 13 | * ---------------------------------------------------------------------- | 13 | * ---------------------------------------------------------------------- |
| 14 | * | Module Init and Probe | 0x0193 | 0x0146 | | 14 | * | Module Init and Probe | 0x0199 | | |
| 15 | * | | | 0x015b-0x0160 | | 15 | * | Mailbox commands | 0x1206 | 0x11a5-0x11ff | |
| 16 | * | | | 0x016e | | ||
| 17 | * | Mailbox commands | 0x1206 | 0x11a2-0x11ff | | ||
| 18 | * | Device Discovery | 0x2134 | 0x210e-0x2116 | | 16 | * | Device Discovery | 0x2134 | 0x210e-0x2116 | |
| 19 | * | | | 0x211a | | 17 | * | | | 0x211a | |
| 20 | * | | | 0x211c-0x2128 | | 18 | * | | | 0x211c-0x2128 | |
| @@ -26,11 +24,7 @@ · 5 unmodified lines | |||
| 26 | * | | | 0x3036,0x3038 | | 24 | * | | | 0x3036,0x3038 | |
| 27 | * | | | 0x303a | | 25 | * | | | 0x303a | |
| 28 | * | DPC Thread | 0x4023 | 0x4002,0x4013 | | 26 | * | DPC Thread | 0x4023 | 0x4002,0x4013 | |
| 29 | * | Async Events | 0x5090 | 0x502b-0x502f | | 27 | * | Async Events | 0x509c | | |
| 30 | * | | | 0x5047 | | ||
| 31 | * | | | 0x5084,0x5075 | | ||
| 32 | * | | | 0x503d,0x5044 | | ||
| 33 | * | | | 0x505f | | ||
| 34 | * | Timer Routines | 0x6012 | | | 28 | * | Timer Routines | 0x6012 | | |
| 35 | * | User Space Interactions | 0x70e3 | 0x7018,0x702e | | 29 | * | User Space Interactions | 0x70e3 | 0x7018,0x702e | |
| 36 | * | | | 0x7020,0x7024 | | 30 | * | | | 0x7020,0x7024 | |
| @@ -1063,7 +1057,7 @@ qla2100_fw_dump(scsi_qla_host_t *vha) · 1026 unmodified lines | |||
| 1063 | } | 1057 | } |
| 1064 | 1058 | ||
| 1065 | if (rval == QLA_SUCCESS) | 1059 | if (rval == QLA_SUCCESS) |
| 1066 | qla2xxx_copy_queues(ha, &fw->risc_ram[cnt]); | 1060 | qla2xxx_copy_queues(ha, &fw->queue_dump[0]); |
| 1067 | 1061 | ||
| 1068 | qla2xxx_dump_post_process(base_vha, rval); | 1062 | qla2xxx_dump_post_process(base_vha, rval); |
| 1069 | } | 1063 | } |
| @@ -2447,6 +2441,23 @@ qla83xx_fw_dump_failed_0: · 1377 unmodified lines | |||
| 2447 | /* Driver Debug Functions. */ | 2441 | /* Driver Debug Functions. */ |
| 2448 | /****************************************************************************/ | 2442 | /****************************************************************************/ |
| 2449 | 2443 | ||
| 2444 | /* Write the debug message prefix into @pbuf. */ | ||
| 2445 | static void ql_dbg_prefix(char *pbuf, int pbuf_size, | ||
| 2446 | const scsi_qla_host_t *vha, uint msg_id) | ||
| 2447 | { | ||
| 2448 | if (vha) { | ||
| 2449 | const struct pci_dev *pdev = vha->hw->pdev; | ||
| 2450 | |||
| 2451 | /* <module-name> [<dev-name>]-<msg-id>:<host>: */ | ||
| 2452 | snprintf(pbuf, pbuf_size, "%s [%s]-%04x:%ld: ", QL_MSGHDR, | ||
| 2453 | dev_name(&(pdev->dev)), msg_id, vha->host_no); | ||
| 2454 | } else { | ||
| 2455 | /* <module-name> [<dev-name>]-<msg-id>: : */ | ||
| 2456 | snprintf(pbuf, pbuf_size, "%s [%s]-%04x: : ", QL_MSGHDR, | ||
| 2457 | "0000:00:00.0", msg_id); | ||
| 2458 | } | ||
| 2459 | } | ||
| 2460 | |||
| 2450 | /* | 2461 | /* |
| 2451 | * This function is for formatting and logging debug information. | 2462 | * This function is for formatting and logging debug information. |
| 2452 | * It is to be used when vha is available. It formats the message | 2463 | * It is to be used when vha is available. It formats the message |
| @@ -2465,41 +2476,19 @@ ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...) · 12 unmodified lines | |||
| 2465 | { | 2476 | { |
| 2466 | va_list va; | 2477 | va_list va; |
| 2467 | struct va_format vaf; | 2478 | struct va_format vaf; |
| 2479 | char pbuf[64]; | ||
| 2468 | 2480 | ||
| 2469 | va_start(va, fmt); | 2481 | va_start(va, fmt); |
| 2470 | 2482 | ||
| 2471 | vaf.fmt = fmt; | 2483 | vaf.fmt = fmt; |
| 2472 | vaf.va = &va; | 2484 | vaf.va = &va; |
| 2473 | 2485 | ||
| 2474 | if (!ql_mask_match(level)) { | 2486 | ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), vha, id); |
| 2475 | char pbuf[64]; | ||
| 2476 | 2487 | ||
| 2477 | if (vha != NULL) { | 2488 | if (!ql_mask_match(level)) |
| 2478 | const struct pci_dev *pdev = vha->hw->pdev; | ||
| 2479 | /* <module-name> <msg-id>:<host> Message */ | ||
| 2480 | snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x:%ld: ", | ||
| 2481 | QL_MSGHDR, dev_name(&(pdev->dev)), id, | ||
| 2482 | vha->host_no); | ||
| 2483 | } else { | ||
| 2484 | snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x: : ", | ||
| 2485 | QL_MSGHDR, "0000:00:00.0", id); | ||
| 2486 | } | ||
| 2487 | pbuf[sizeof(pbuf) - 1] = 0; | ||
| 2488 | trace_ql_dbg_log(pbuf, &vaf); | 2489 | trace_ql_dbg_log(pbuf, &vaf); |
| 2489 | va_end(va); | 2490 | else |
| 2490 | return; | 2491 | pr_warn("%s%pV", pbuf, &vaf); |
| 2491 | } | ||
| 2492 | |||
| 2493 | if (vha != NULL) { | ||
| 2494 | const struct pci_dev *pdev = vha->hw->pdev; | ||
| 2495 | /* <module-name> <pci-name> <msg-id>:<host> Message */ | ||
| 2496 | pr_warn("%s [%s]-%04x:%ld: %pV", | ||
| 2497 | QL_MSGHDR, dev_name(&(pdev->dev)), id + ql_dbg_offset, | ||
| 2498 | vha->host_no, &vaf); | ||
| 2499 | } else { | ||
| 2500 | pr_warn("%s [%s]-%04x: : %pV", | ||
| 2501 | QL_MSGHDR, "0000:00:00.0", id + ql_dbg_offset, &vaf); | ||
| 2502 | } | ||
| 2503 | 2492 | ||
| 2504 | va_end(va); | 2493 | va_end(va); |
| 2505 | 2494 | ||
| @@ -2524,6 +2513,7 @@ ql_dbg_pci(uint level, struct pci_dev *pdev, uint id, const char *fmt, ...) · 18 unmodified lines | |||
| 2524 | { | 2513 | { |
| 2525 | va_list va; | 2514 | va_list va; |
| 2526 | struct va_format vaf; | 2515 | struct va_format vaf; |
| 2516 | char pbuf[128]; | ||
| 2527 | 2517 | ||
| 2528 | if (pdev == NULL) | 2518 | if (pdev == NULL) |
| 2529 | return; | 2519 | return; |
| @@ -2535,9 +2525,8 @@ ql_dbg_pci(uint level, struct pci_dev *pdev, uint id, const char *fmt, ...) · 5 unmodified lines | |||
| 2535 | vaf.fmt = fmt; | 2525 | vaf.fmt = fmt; |
| 2536 | vaf.va = &va; | 2526 | vaf.va = &va; |
| 2537 | 2527 | ||
| 2538 | /* <module-name> <dev-name>:<msg-id> Message */ | 2528 | ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), NULL, id + ql_dbg_offset); |
| 2539 | pr_warn("%s [%s]-%04x: : %pV", | 2529 | pr_warn("%s%pV", pbuf, &vaf); |
| 2540 | QL_MSGHDR, dev_name(&(pdev->dev)), id + ql_dbg_offset, &vaf); | ||
| 2541 | 2530 | ||
| 2542 | va_end(va); | 2531 | va_end(va); |
| 2543 | } | 2532 | } |
| @@ -2565,16 +2554,7 @@ ql_log(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...) · 21 unmodified lines | |||
| 2565 | if (level > ql_errlev) | 2554 | if (level > ql_errlev) |
| 2566 | return; | 2555 | return; |
| 2567 | 2556 | ||
| 2568 | if (vha != NULL) { | 2557 | ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), vha, id); |
| 2569 | const struct pci_dev *pdev = vha->hw->pdev; | ||
| 2570 | /* <module-name> <msg-id>:<host> Message */ | ||
| 2571 | snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x:%ld: ", | ||
| 2572 | QL_MSGHDR, dev_name(&(pdev->dev)), id, vha->host_no); | ||
| 2573 | } else { | ||
| 2574 | snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x: : ", | ||
| 2575 | QL_MSGHDR, "0000:00:00.0", id); | ||
| 2576 | } | ||
| 2577 | pbuf[sizeof(pbuf) - 1] = 0; | ||
| 2578 | 2558 | ||
| 2579 | va_start(va, fmt); | 2559 | va_start(va, fmt); |
| 2580 | 2560 | ||
| @@ -2625,10 +2605,7 @@ ql_log_pci(uint level, struct pci_dev *pdev, uint id, const char *fmt, ...) · 44 unmodified lines | |||
| 2625 | if (level > ql_errlev) | 2605 | if (level > ql_errlev) |
| 2626 | return; | 2606 | return; |
| 2627 | 2607 | ||
| 2628 | /* <module-name> <dev-name>:<msg-id> Message */ | 2608 | ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), NULL, id); |
| 2629 | snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x: : ", | ||
| 2630 | QL_MSGHDR, dev_name(&(pdev->dev)), id); | ||
| 2631 | pbuf[sizeof(pbuf) - 1] = 0; | ||
| 2632 | 2609 | ||
| 2633 | va_start(va, fmt); | 2610 | va_start(va, fmt); |
| 2634 | 2611 | ||
| @@ -2679,7 +2656,6 @@ ql_dump_regs(uint level, scsi_qla_host_t *vha, uint id) · 44 unmodified lines | |||
| 2679 | "mbox[%d] %#04x\n", i, rd_reg_word(mbx_reg)); | 2656 | "mbox[%d] %#04x\n", i, rd_reg_word(mbx_reg)); |
| 2680 | } | 2657 | } |
| 2681 | 2658 | ||
| 2682 | |||
| 2683 | void | 2659 | void |
| 2684 | ql_dump_buffer(uint level, scsi_qla_host_t *vha, uint id, const void *buf, | 2660 | ql_dump_buffer(uint level, scsi_qla_host_t *vha, uint id, const void *buf, |
| 2685 | uint size) | 2661 | uint size) |
| @@ -2724,16 +2700,7 @@ ql_log_qp(uint32_t level, struct qla_qpair *qpair, int32_t id, · 38 unmodified lines | |||
| 2724 | if (level > ql_errlev) | 2700 | if (level > ql_errlev) |
| 2725 | return; | 2701 | return; |
| 2726 | 2702 | ||
| 2727 | if (qpair != NULL) { | 2703 | ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), qpair ? qpair->vha : NULL, id); |
| 2728 | const struct pci_dev *pdev = qpair->pdev; | ||
| 2729 | /* <module-name> <msg-id>:<host> Message */ | ||
| 2730 | snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x: ", | ||
| 2731 | QL_MSGHDR, dev_name(&(pdev->dev)), id); | ||
| 2732 | } else { | ||
| 2733 | snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x: : ", | ||
| 2734 | QL_MSGHDR, "0000:00:00.0", id); | ||
| 2735 | } | ||
| 2736 | pbuf[sizeof(pbuf) - 1] = 0; | ||
| 2737 | 2704 | ||
| 2738 | va_start(va, fmt); | 2705 | va_start(va, fmt); |
| 2739 | 2706 | ||
| @@ -2777,6 +2744,7 @@ ql_dbg_qp(uint32_t level, struct qla_qpair *qpair, int32_t id, · 37 unmodified lines | |||
| 2777 | { | 2744 | { |
| 2778 | va_list va; | 2745 | va_list va; |
| 2779 | struct va_format vaf; | 2746 | struct va_format vaf; |
| 2747 | char pbuf[128]; | ||
| 2780 | 2748 | ||
| 2781 | if (!ql_mask_match(level)) | 2749 | if (!ql_mask_match(level)) |
| 2782 | return; | 2750 | return; |
| @@ -2786,16 +2754,9 @@ ql_dbg_qp(uint32_t level, struct qla_qpair *qpair, int32_t id, · 3 unmodified lines | |||
| 2786 | vaf.fmt = fmt; | 2754 | vaf.fmt = fmt; |
| 2787 | vaf.va = &va; | 2755 | vaf.va = &va; |
| 2788 | 2756 | ||
| 2789 | if (qpair != NULL) { | 2757 | ql_dbg_prefix(pbuf, ARRAY_SIZE(pbuf), qpair ? qpair->vha : NULL, |
| 2790 | const struct pci_dev *pdev = qpair->pdev; | 2758 | id + ql_dbg_offset); |
| 2791 | /* <module-name> <pci-name> <msg-id>:<host> Message */ | 2759 | pr_warn("%s%pV", pbuf, &vaf); |
| 2792 | pr_warn("%s [%s]-%04x: %pV", | ||
| 2793 | QL_MSGHDR, dev_name(&(pdev->dev)), id + ql_dbg_offset, | ||
| 2794 | &vaf); | ||
| 2795 | } else { | ||
| 2796 | pr_warn("%s [%s]-%04x: : %pV", | ||
| 2797 | QL_MSGHDR, "0000:00:00.0", id + ql_dbg_offset, &vaf); | ||
| 2798 | } | ||
| 2799 | 2760 | ||
| 2800 | va_end(va); | 2761 | va_end(va); |
| 2801 | 2762 | ||
| @@ -53,6 +53,7 @@ struct qla2100_fw_dump { · 52 unmodified lines | |||
| 53 | __be16 fpm_b0_reg[64]; | 53 | __be16 fpm_b0_reg[64]; |
| 54 | __be16 fpm_b1_reg[64]; | 54 | __be16 fpm_b1_reg[64]; |
| 55 | __be16 risc_ram[0xf000]; | 55 | __be16 risc_ram[0xf000]; |
| 56 | u8 queue_dump[]; | ||
| 56 | }; | 57 | }; |
| 57 | 58 | ||
| 58 | struct qla24xx_fw_dump { | 59 | struct qla24xx_fw_dump { |
| @@ -34,6 +34,8 @@ · 33 unmodified lines | |||
| 34 | #include <scsi/scsi_transport_fc.h> | 34 | #include <scsi/scsi_transport_fc.h> |
| 35 | #include <scsi/scsi_bsg_fc.h> | 35 | #include <scsi/scsi_bsg_fc.h> |
| 36 | 36 | ||
| 37 | #include <uapi/scsi/fc/fc_els.h> | ||
| 38 | |||
| 37 | /* Big endian Fibre Channel S_ID (source ID) or D_ID (destination ID). */ | 39 | /* Big endian Fibre Channel S_ID (source ID) or D_ID (destination ID). */ |
| 38 | typedef struct { | 40 | typedef struct { |
| 39 | uint8_t domain; | 41 | uint8_t domain; |
| @@ -1053,6 +1055,7 @@ static inline bool qla2xxx_is_valid_mbs(unsigned int mbs) · 1013 unmodified lines | |||
| 1053 | #define MBA_LIP_F8 0x8016 /* Received a LIP F8. */ | 1055 | #define MBA_LIP_F8 0x8016 /* Received a LIP F8. */ |
| 1054 | #define MBA_LOOP_INIT_ERR 0x8017 /* Loop Initialization Error. */ | 1056 | #define MBA_LOOP_INIT_ERR 0x8017 /* Loop Initialization Error. */ |
| 1055 | #define MBA_FABRIC_AUTH_REQ 0x801b /* Fabric Authentication Required. */ | 1057 | #define MBA_FABRIC_AUTH_REQ 0x801b /* Fabric Authentication Required. */ |
| 1058 | #define MBA_CONGN_NOTI_RECV 0x801e /* Congestion Notification Received */ | ||
| 1056 | #define MBA_SCSI_COMPLETION 0x8020 /* SCSI Command Complete. */ | 1059 | #define MBA_SCSI_COMPLETION 0x8020 /* SCSI Command Complete. */ |
| 1057 | #define MBA_CTIO_COMPLETION 0x8021 /* CTIO Complete. */ | 1060 | #define MBA_CTIO_COMPLETION 0x8021 /* CTIO Complete. */ |
| 1058 | #define MBA_IP_COMPLETION 0x8022 /* IP Transmit Command Complete. */ | 1061 | #define MBA_IP_COMPLETION 0x8022 /* IP Transmit Command Complete. */ |
| @@ -1304,7 +1307,6 @@ static inline bool qla2xxx_is_valid_mbs(unsigned int mbs) · 245 unmodified lines | |||
| 1304 | #define RNID_TYPE_ASIC_TEMP 0xC | 1307 | #define RNID_TYPE_ASIC_TEMP 0xC |
| 1305 | 1308 | ||
| 1306 | #define ELS_CMD_MAP_SIZE 32 | 1309 | #define ELS_CMD_MAP_SIZE 32 |
| 1307 | #define ELS_COMMAND_RDP 0x18 | ||
| 1308 | 1310 | ||
| 1309 | /* | 1311 | /* |
| 1310 | * Firmware state codes from get firmware state mailbox command | 1312 | * Firmware state codes from get firmware state mailbox command |
| @@ -1509,6 +1511,25 @@ typedef struct { · 198 unmodified lines | |||
| 1509 | uint8_t reserved_3[26]; | 1511 | uint8_t reserved_3[26]; |
| 1510 | } init_cb_t; | 1512 | } init_cb_t; |
| 1511 | 1513 | ||
| 1514 | /* Special Features Control Block */ | ||
| 1515 | struct init_sf_cb { | ||
| 1516 | uint8_t format; | ||
| 1517 | uint8_t reserved0; | ||
| 1518 | /* | ||
| 1519 | * BIT 15-14 = Reserved | ||
| 1520 | * BIT_13 = SAN Congestion Management (1 - Enabled, 0 - Disabled) | ||
| 1521 | * BIT_12 = Remote Write Optimization (1 - Enabled, 0 - Disabled) | ||
| 1522 | * BIT 11-0 = Reserved | ||
| 1523 | */ | ||
| 1524 | uint16_t flags; | ||
| 1525 | uint8_t reserved1[32]; | ||
| 1526 | uint16_t discard_OHRB_timeout_value; | ||
| 1527 | uint16_t remote_write_opt_queue_num; | ||
| 1528 | uint8_t reserved2[40]; | ||
| 1529 | uint8_t scm_related_parameter[16]; | ||
| 1530 | uint8_t reserved3[32]; | ||
| 1531 | }; | ||
| 1532 | |||
| 1512 | /* | 1533 | /* |
| 1513 | * Get Link Status mailbox command return buffer. | 1534 | * Get Link Status mailbox command return buffer. |
| 1514 | */ | 1535 | */ |
| @@ -2182,6 +2203,8 @@ typedef struct { · 667 unmodified lines | |||
| 2182 | struct dsd64 rsp_dsd; | 2203 | struct dsd64 rsp_dsd; |
| 2183 | } ms_iocb_entry_t; | 2204 | } ms_iocb_entry_t; |
| 2184 | 2205 | ||
| 2206 | #define SCM_EDC_ACC_RECEIVED BIT_6 | ||
| 2207 | #define SCM_RDF_ACC_RECEIVED BIT_7 | ||
| 2185 | 2208 | ||
| 2186 | /* | 2209 | /* |
| 2187 | * ISP queue - Mailbox Command entry structure definition. | 2210 | * ISP queue - Mailbox Command entry structure definition. |
| @@ -3851,6 +3874,12 @@ struct qla_hw_data { · 1663 unmodified lines | |||
| 3851 | uint32_t n2n_bigger:1; | 3874 | uint32_t n2n_bigger:1; |
| 3852 | uint32_t secure_adapter:1; | 3875 | uint32_t secure_adapter:1; |
| 3853 | uint32_t secure_fw:1; | 3876 | uint32_t secure_fw:1; |
| 3877 | /* Supported by Adapter */ | ||
| 3878 | uint32_t scm_supported_a:1; | ||
| 3879 | /* Supported by Firmware */ | ||
| 3880 | uint32_t scm_supported_f:1; | ||
| 3881 | /* Enabled in Driver */ | ||
| 3882 | uint32_t scm_enabled:1; | ||
| 3854 | } flags; | 3883 | } flags; |
| 3855 | 3884 | ||
| 3856 | uint16_t max_exchg; | 3885 | uint16_t max_exchg; |
| @@ -4168,6 +4197,13 @@ struct qla_hw_data { · 311 unmodified lines | |||
| 4168 | int init_cb_size; | 4197 | int init_cb_size; |
| 4169 | dma_addr_t ex_init_cb_dma; | 4198 | dma_addr_t ex_init_cb_dma; |
| 4170 | struct ex_init_cb_81xx *ex_init_cb; | 4199 | struct ex_init_cb_81xx *ex_init_cb; |
| 4200 | dma_addr_t sf_init_cb_dma; | ||
| 4201 | struct init_sf_cb *sf_init_cb; | ||
| 4202 | |||
| 4203 | void *scm_fpin_els_buff; | ||
| 4204 | uint64_t scm_fpin_els_buff_size; | ||
| 4205 | bool scm_fpin_valid; | ||
| 4206 | bool scm_fpin_payload_size; | ||
| 4171 | 4207 | ||
| 4172 | void *async_pd; | 4208 | void *async_pd; |
| 4173 | dma_addr_t async_pd_dma; | 4209 | dma_addr_t async_pd_dma; |
| @@ -4230,6 +4266,12 @@ struct qla_hw_data { · 56 unmodified lines | |||
| 4230 | #define FW_ATTR_H_NVME BIT_10 | 4266 | #define FW_ATTR_H_NVME BIT_10 |
| 4231 | #define FW_ATTR_H_NVME_UPDATED BIT_14 | 4267 | #define FW_ATTR_H_NVME_UPDATED BIT_14 |
| 4232 | 4268 | ||
| 4269 | /* About firmware SCM support */ | ||
| 4270 | #define FW_ATTR_EXT0_SCM_SUPPORTED BIT_12 | ||
| 4271 | /* Brocade fabric attached */ | ||
| 4272 | #define FW_ATTR_EXT0_SCM_BROCADE 0x00001000 | ||
| 4273 | /* Cisco fabric attached */ | ||
| 4274 | #define FW_ATTR_EXT0_SCM_CISCO 0x00002000 | ||
| 4233 | uint16_t fw_attributes_ext[2]; | 4275 | uint16_t fw_attributes_ext[2]; |
| 4234 | uint32_t fw_memory_size; | 4276 | uint32_t fw_memory_size; |
| 4235 | uint32_t fw_transfer_size; | 4277 | uint32_t fw_transfer_size; |
| @@ -4522,15 +4564,31 @@ struct active_regions { · 286 unmodified lines | |||
| 4522 | #define QLA_SET_DATA_RATE_NOLR 1 | 4564 | #define QLA_SET_DATA_RATE_NOLR 1 |
| 4523 | #define QLA_SET_DATA_RATE_LR 2 /* Set speed and initiate LR */ | 4565 | #define QLA_SET_DATA_RATE_LR 2 /* Set speed and initiate LR */ |
| 4524 | 4566 | ||
| 4567 | #define QLA_DEFAULT_PAYLOAD_SIZE 64 | ||
| 4568 | /* | ||
| 4569 | * This item might be allocated with a size > sizeof(struct purex_item). | ||
| 4570 | * The "size" variable gives the size of the payload (which | ||
| 4571 | * is variable) starting at "iocb". | ||
| 4572 | */ | ||
| 4525 | struct purex_item { | 4573 | struct purex_item { |
| 4526 | struct list_head list; | 4574 | struct list_head list; |
| 4527 | struct scsi_qla_host *vha; | 4575 | struct scsi_qla_host *vha; |
| 4528 | void (*process_item)(struct scsi_qla_host *vha, void *pkt); | 4576 | void (*process_item)(struct scsi_qla_host *vha, |
| 4577 | struct purex_item *pkt); | ||
| 4578 | atomic_t in_use; | ||
| 4579 | uint16_t size; | ||
| 4529 | struct { | 4580 | struct { |
| 4530 | uint8_t iocb[64]; | 4581 | uint8_t iocb[64]; |
| 4531 | } iocb; | 4582 | } iocb; |
| 4532 | }; | 4583 | }; |
| 4533 | 4584 | ||
| 4585 | #define SCM_FLAG_RDF_REJECT 0x00 | ||
| 4586 | #define SCM_FLAG_RDF_COMPLETED 0x01 | ||
| 4587 | |||
| 4588 | #define QLA_CON_PRIMITIVE_RECEIVED 0x1 | ||
| 4589 | #define QLA_CONGESTION_ARB_WARNING 0x1 | ||
| 4590 | #define QLA_CONGESTION_ARB_ALARM 0X2 | ||
| 4591 | |||
| 4534 | /* | 4592 | /* |
| 4535 | * Qlogic scsi host structure | 4593 | * Qlogic scsi host structure |
| 4536 | */ | 4594 | */ |
| @@ -4725,6 +4783,7 @@ typedef struct scsi_qla_host { · 188 unmodified lines | |||
| 4725 | struct list_head head; | 4783 | struct list_head head; |
| 4726 | spinlock_t lock; | 4784 | spinlock_t lock; |
| 4727 | } purex_list; | 4785 | } purex_list; |
| 4786 | struct purex_item default_item; | ||
| 4728 | 4787 | ||
| 4729 | struct name_list_extended gnl; | 4788 | struct name_list_extended gnl; |
| 4730 | /* Count of active session/fcport */ | 4789 | /* Count of active session/fcport */ |
| @@ -4738,6 +4797,7 @@ typedef struct scsi_qla_host { · 7 unmodified lines | |||
| 4738 | __le16 dport_data[4]; | 4797 | __le16 dport_data[4]; |
| 4739 | struct list_head gpnid_list; | 4798 | struct list_head gpnid_list; |
| 4740 | struct fab_scan scan; | 4799 | struct fab_scan scan; |
| 4800 | uint8_t scm_fabric_connection_flags; | ||
| 4741 | 4801 | ||
| 4742 | unsigned int irq_offset; | 4802 | unsigned int irq_offset; |
| 4743 | } scsi_qla_host_t; | 4803 | } scsi_qla_host_t; |
| @@ -610,7 +610,7 @@ struct sts_entry_24xx { · 609 unmodified lines | |||
| 610 | __le32 residual_len; /* FW calc residual transfer length. */ | 610 | __le32 residual_len; /* FW calc residual transfer length. */ |
| 611 | 611 | ||
| 612 | union { | 612 | union { |
| 613 | uint16_t reserved_1; | 613 | __le16 reserved_1; |
| 614 | __le16 nvme_rsp_pyld_len; | 614 | __le16 nvme_rsp_pyld_len; |
| 615 | }; | 615 | }; |
| 616 | 616 | ||
| @@ -723,6 +723,8 @@ struct ct_entry_24xx { · 106 unmodified lines | |||
| 723 | struct dsd64 dsd[2]; | 723 | struct dsd64 dsd[2]; |
| 724 | }; | 724 | }; |
| 725 | 725 | ||
| 726 | #define PURX_ELS_HEADER_SIZE 0x18 | ||
| 727 | |||
| 726 | /* | 728 | /* |
| 727 | * ISP queue - PUREX IOCB entry structure definition | 729 | * ISP queue - PUREX IOCB entry structure definition |
| 728 | */ | 730 | */ |
| @@ -2020,7 +2022,9 @@ struct nvram_81xx { · 1291 unmodified lines | |||
| 2020 | * BIT 0 = Extended BB credits for LR | 2022 | * BIT 0 = Extended BB credits for LR |
| 2021 | * BIT 1 = Virtual Fabric Enable | 2023 | * BIT 1 = Virtual Fabric Enable |
| 2022 | * BIT 2-5 = Distance Support if BIT 0 is on | 2024 | * BIT 2-5 = Distance Support if BIT 0 is on |
| 2023 | * BIT 6-15 = Unused | 2025 | * BIT 6 = Prefer FCP |
| 2026 | * BIT 7 = SCM Disabled if BIT is set (1) | ||
| 2027 | * BIT 8-15 = Unused | ||
| 2024 | */ | 2028 | */ |
| 2025 | uint16_t enhanced_features; | 2029 | uint16_t enhanced_features; |
| 2026 | 2030 | ||
| @@ -127,6 +127,7 @@ int qla_post_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport); · 126 unmodified lines | |||
| 127 | void qla_do_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport); | 127 | void qla_do_iidma_work(struct scsi_qla_host *vha, fc_port_t *fcport); |
| 128 | int qla2x00_reserve_mgmt_server_loop_id(scsi_qla_host_t *); | 128 | int qla2x00_reserve_mgmt_server_loop_id(scsi_qla_host_t *); |
| 129 | void qla_rscn_replay(fc_port_t *fcport); | 129 | void qla_rscn_replay(fc_port_t *fcport); |
| 130 | void qla24xx_free_purex_item(struct purex_item *item); | ||
| 130 | extern bool qla24xx_risc_firmware_invalid(uint32_t *); | 131 | extern bool qla24xx_risc_firmware_invalid(uint32_t *); |
| 131 | 132 | ||
| 132 | /* | 133 | /* |
| @@ -229,7 +230,8 @@ void qla2x00_handle_login_done_event(struct scsi_qla_host *, fc_port_t *, · 96 unmodified lines | |||
| 229 | int qla24xx_post_gnl_work(struct scsi_qla_host *, fc_port_t *); | 230 | int qla24xx_post_gnl_work(struct scsi_qla_host *, fc_port_t *); |
| 230 | int qla24xx_post_relogin_work(struct scsi_qla_host *vha); | 231 | int qla24xx_post_relogin_work(struct scsi_qla_host *vha); |
| 231 | void qla2x00_wait_for_sess_deletion(scsi_qla_host_t *); | 232 | void qla2x00_wait_for_sess_deletion(scsi_qla_host_t *); |
| 232 | void qla24xx_process_purex_rdp(struct scsi_qla_host *vha, void *pkt); | 233 | void qla24xx_process_purex_rdp(struct scsi_qla_host *vha, |
| 234 | struct purex_item *pkt); | ||
| 233 | 235 | ||
| 234 | /* | 236 | /* |
| 235 | * Global Functions in qla_mid.c source file. | 237 | * Global Functions in qla_mid.c source file. |
| @@ -3749,7 +3749,7 @@ enable_82xx_npiv: · 3748 unmodified lines | |||
| 3749 | } | 3749 | } |
| 3750 | 3750 | ||
| 3751 | /* Enable PUREX PASSTHRU */ | 3751 | /* Enable PUREX PASSTHRU */ |
| 3752 | if (ql2xrdpenable) | 3752 | if (ql2xrdpenable || ha->flags.scm_supported_f) |
| 3753 | qla25xx_set_els_cmds_supported(vha); | 3753 | qla25xx_set_els_cmds_supported(vha); |
| 3754 | } else | 3754 | } else |
| 3755 | goto failed; | 3755 | goto failed; |
| @@ -3962,7 +3962,7 @@ qla24xx_update_fw_options(scsi_qla_host_t *vha) · 206 unmodified lines | |||
| 3962 | ha->fw_options[2] &= ~BIT_8; | 3962 | ha->fw_options[2] &= ~BIT_8; |
| 3963 | } | 3963 | } |
| 3964 | 3964 | ||
| 3965 | if (ql2xrdpenable) | 3965 | if (ql2xrdpenable || ha->flags.scm_supported_f) |
| 3966 | ha->fw_options[1] |= ADD_FO1_ENABLE_PUREX_IOCB; | 3966 | ha->fw_options[1] |= ADD_FO1_ENABLE_PUREX_IOCB; |
| 3967 | 3967 | ||
| 3968 | /* Enable Async 8130/8131 events -- transceiver insertion/removal */ | 3968 | /* Enable Async 8130/8131 events -- transceiver insertion/removal */ |
| @@ -6996,36 +6996,41 @@ qla2x00_abort_isp(scsi_qla_host_t *vha) · 3027 unmodified lines | |||
| 6996 | static int | 6996 | static int |
| 6997 | qla2x00_restart_isp(scsi_qla_host_t *vha) | 6997 | qla2x00_restart_isp(scsi_qla_host_t *vha) |
| 6998 | { | 6998 | { |
| 6999 | int status = 0; | 6999 | int status; |
| 7000 | struct qla_hw_data *ha = vha->hw; | 7000 | struct qla_hw_data *ha = vha->hw; |
| 7001 | 7001 | ||
| 7002 | /* If firmware needs to be loaded */ | 7002 | /* If firmware needs to be loaded */ |
| 7003 | if (qla2x00_isp_firmware(vha)) { | 7003 | if (qla2x00_isp_firmware(vha)) { |
| 7004 | vha->flags.online = 0; | 7004 | vha->flags.online = 0; |
| 7005 | status = ha->isp_ops->chip_diag(vha); | 7005 | status = ha->isp_ops->chip_diag(vha); |
| 7006 | if (!status) | 7006 | if (status) |
| 7007 | status = qla2x00_setup_chip(vha); | 7007 | return status; |
| 7008 | status = qla2x00_setup_chip(vha); | ||
| 7009 | if (status) | ||
| 7010 | return status; | ||
| 7008 | } | 7011 | } |
| 7009 | 7012 | ||
| 7010 | if (!status && !(status = qla2x00_init_rings(vha))) { | 7013 | status = qla2x00_init_rings(vha); |
| 7011 | clear_bit(RESET_MARKER_NEEDED, &vha->dpc_flags); | 7014 | if (status) |
| 7012 | ha->flags.chip_reset_done = 1; | 7015 | return status; |
| 7013 | 7016 | ||
| 7014 | /* Initialize the queues in use */ | 7017 | clear_bit(RESET_MARKER_NEEDED, &vha->dpc_flags); |
| 7015 | qla25xx_init_queues(ha); | 7018 | ha->flags.chip_reset_done = 1; |
| 7016 | 7019 | ||
| 7017 | status = qla2x00_fw_ready(vha); | 7020 | /* Initialize the queues in use */ |
| 7018 | if (!status) { | 7021 | qla25xx_init_queues(ha); |
| 7019 | /* Issue a marker after FW becomes ready. */ | ||
| 7020 | qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL); | ||
| 7021 | set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); | ||
| 7022 | } | ||
| 7023 | 7022 | ||
| 7023 | status = qla2x00_fw_ready(vha); | ||
| 7024 | if (status) { | ||
| 7024 | /* if no cable then assume it's good */ | 7025 | /* if no cable then assume it's good */ |
| 7025 | if ((vha->device_flags & DFLG_NO_CABLE)) | 7026 | return vha->device_flags & DFLG_NO_CABLE ? 0 : status; |
| 7026 | status = 0; | ||
| 7027 | } | 7027 | } |
| 7028 | return (status); | 7028 | |
| 7029 | /* Issue a marker after FW becomes ready. */ | ||
| 7030 | qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL); | ||
| 7031 | set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); | ||
| 7032 | |||
| 7033 | return 0; | ||
| 7029 | } | 7034 | } |
| 7030 | 7035 | ||
| 7031 | static int | 7036 | static int |
| @@ -8514,6 +8519,11 @@ qla81xx_nvram_config(scsi_qla_host_t *vha) · 1482 unmodified lines | |||
| 8514 | icb->node_name[0] &= 0xF0; | 8519 | icb->node_name[0] &= 0xF0; |
| 8515 | } | 8520 | } |
| 8516 | 8521 | ||
| 8522 | if (IS_QLA28XX(ha) || IS_QLA27XX(ha)) { | ||
| 8523 | if ((nv->enhanced_features & BIT_7) == 0) | ||
| 8524 | ha->flags.scm_supported_a = 1; | ||
| 8525 | } | ||
| 8526 | |||
| 8517 | /* Set host adapter parameters. */ | 8527 | /* Set host adapter parameters. */ |
| 8518 | ha->flags.disable_risc_code_load = 0; | 8528 | ha->flags.disable_risc_code_load = 0; |
| 8519 | ha->flags.enable_lip_reset = 0; | 8529 | ha->flags.enable_lip_reset = 0; |
| @@ -11,7 +11,7 @@ · 10 unmodified lines | |||
| 11 | * Continuation Type 1 IOCBs to allocate. | 11 | * Continuation Type 1 IOCBs to allocate. |
| 12 | * | 12 | * |
| 13 | * @vha: HA context | 13 | * @vha: HA context |
| 14 | * @dsds: number of data segment decriptors needed | 14 | * @dsds: number of data segment descriptors needed |
| 15 | * | 15 | * |
| 16 | * Returns the number of IOCB entries needed to store @dsds. | 16 | * Returns the number of IOCB entries needed to store @dsds. |
| 17 | */ | 17 | */ |
| @@ -44,7 +44,7 @@ qla2x00_get_cmd_direction(srb_t *sp) · 43 unmodified lines | |||
| 44 | * qla2x00_calc_iocbs_32() - Determine number of Command Type 2 and | 44 | * qla2x00_calc_iocbs_32() - Determine number of Command Type 2 and |
| 45 | * Continuation Type 0 IOCBs to allocate. | 45 | * Continuation Type 0 IOCBs to allocate. |
| 46 | * | 46 | * |
| 47 | * @dsds: number of data segment decriptors needed | 47 | * @dsds: number of data segment descriptors needed |
| 48 | * | 48 | * |
| 49 | * Returns the number of IOCB entries needed to store @dsds. | 49 | * Returns the number of IOCB entries needed to store @dsds. |
| 50 | */ | 50 | */ |
| @@ -66,7 +66,7 @@ qla2x00_calc_iocbs_32(uint16_t dsds) · 15 unmodified lines | |||
| 66 | * qla2x00_calc_iocbs_64() - Determine number of Command Type 3 and | 66 | * qla2x00_calc_iocbs_64() - Determine number of Command Type 3 and |
| 67 | * Continuation Type 1 IOCBs to allocate. | 67 | * Continuation Type 1 IOCBs to allocate. |
| 68 | * | 68 | * |
| 69 | * @dsds: number of data segment decriptors needed | 69 | * @dsds: number of data segment descriptors needed |
| 70 | * | 70 | * |
| 71 | * Returns the number of IOCB entries needed to store @dsds. | 71 | * Returns the number of IOCB entries needed to store @dsds. |
| 72 | */ | 72 | */ |
| @@ -669,7 +669,7 @@ qla24xx_build_scsi_type_6_iocbs(srb_t *sp, struct cmd_type_6 *cmd_pkt, · 596 unmodified lines | |||
| 669 | * qla24xx_calc_dsd_lists() - Determine number of DSD list required | 669 | * qla24xx_calc_dsd_lists() - Determine number of DSD list required |
| 670 | * for Command Type 6. | 670 | * for Command Type 6. |
| 671 | * | 671 | * |
| 672 | * @dsds: number of data segment decriptors needed | 672 | * @dsds: number of data segment descriptors needed |
| 673 | * | 673 | * |
| 674 | * Returns the number of dsd list needed to store @dsds. | 674 | * Returns the number of dsd list needed to store @dsds. |
| 675 | */ | 675 | */ |
| @@ -2305,8 +2305,8 @@ __qla2x00_alloc_iocbs(struct qla_qpair *qpair, srb_t *sp) · 1629 unmodified lines | |||
| 2305 | pkt = req->ring_ptr; | 2305 | pkt = req->ring_ptr; |
| 2306 | memset(pkt, 0, REQUEST_ENTRY_SIZE); | 2306 | memset(pkt, 0, REQUEST_ENTRY_SIZE); |
| 2307 | if (IS_QLAFX00(ha)) { | 2307 | if (IS_QLAFX00(ha)) { |
| 2308 | wrt_reg_byte((void __iomem *)&pkt->entry_count, req_cnt); | 2308 | wrt_reg_byte((u8 __force __iomem *)&pkt->entry_count, req_cnt); |
| 2309 | wrt_reg_word((void __iomem *)&pkt->handle, handle); | 2309 | wrt_reg_dword((__le32 __force __iomem *)&pkt->handle, handle); |
| 2310 | } else { | 2310 | } else { |
| 2311 | pkt->entry_count = req_cnt; | 2311 | pkt->entry_count = req_cnt; |
| 2312 | pkt->handle = handle; | 2312 | pkt->handle = handle; |
| @@ -22,6 +22,31 @@ static void qla2x00_status_entry(scsi_qla_host_t *, struct rsp_que *, void *); · 21 unmodified lines | |||
| 22 | static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *); | 22 | static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *); |
| 23 | static int qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *, | 23 | static int qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *, |
| 24 | sts_entry_t *); | 24 | sts_entry_t *); |
| 25 | static void qla27xx_process_purex_fpin(struct scsi_qla_host *vha, | ||
| 26 | struct purex_item *item); | ||
| 27 | static struct purex_item *qla24xx_alloc_purex_item(scsi_qla_host_t *vha, | ||
| 28 | uint16_t size); | ||
| 29 | static struct purex_item *qla24xx_copy_std_pkt(struct scsi_qla_host *vha, | ||
| 30 | void *pkt); | ||
| 31 | static struct purex_item *qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha, | ||
| 32 | void **pkt, struct rsp_que **rsp); | ||
| 33 | |||
| 34 | static void | ||
| 35 | qla27xx_process_purex_fpin(struct scsi_qla_host *vha, struct purex_item *item) | ||
| 36 | { | ||
| 37 | void *pkt = &item->iocb; | ||
| 38 | uint16_t pkt_size = item->size; | ||
| 39 | |||
| 40 | ql_dbg(ql_dbg_init + ql_dbg_verbose, vha, 0x508d, | ||
| 41 | "%s: Enter\n", __func__); | ||
| 42 | |||
| 43 | ql_dbg(ql_dbg_init + ql_dbg_verbose, vha, 0x508e, | ||
| 44 | "-------- ELS REQ -------\n"); | ||
| 45 | ql_dump_buffer(ql_dbg_init + ql_dbg_verbose, vha, 0x508f, | ||
| 46 | pkt, pkt_size); | ||
| 47 | |||
| 48 | fc_host_fpin_rcv(vha->host, pkt_size, (char *)pkt); | ||
| 49 | } | ||
| 25 | 50 | ||
| 26 | const char *const port_state_str[] = { | 51 | const char *const port_state_str[] = { |
| 27 | "Unknown", | 52 | "Unknown", |
| @@ -31,35 +56,11 @@ const char *const port_state_str[] = { · 3 unmodified lines | |||
| 31 | "ONLINE" | 56 | "ONLINE" |
| 32 | }; | 57 | }; |
| 33 | 58 | ||
| 34 | static void qla24xx_purex_iocb(scsi_qla_host_t *vha, void *pkt, | ||
| 35 | void (*process_item)(struct scsi_qla_host *vha, void *pkt)) | ||
| 36 | { | ||
| 37 | struct purex_list *list = &vha->purex_list; | ||
| 38 | struct purex_item *item; | ||
| 39 | ulong flags; | ||
| 40 | |||
| 41 | item = kzalloc(sizeof(*item), GFP_KERNEL); | ||
| 42 | if (!item) { | ||
| 43 | ql_log(ql_log_warn, vha, 0x5092, | ||
| 44 | ">> Failed allocate purex list item.\n"); | ||
| 45 | return; | ||
| 46 | } | ||
| 47 | |||
| 48 | item->vha = vha; | ||
| 49 | item->process_item = process_item; | ||
| 50 | memcpy(&item->iocb, pkt, sizeof(item->iocb)); | ||
| 51 | |||
| 52 | spin_lock_irqsave(&list->lock, flags); | ||
| 53 | list_add_tail(&item->list, &list->head); | ||
| 54 | spin_unlock_irqrestore(&list->lock, flags); | ||
| 55 | |||
| 56 | set_bit(PROCESS_PUREX_IOCB, &vha->dpc_flags); | ||
| 57 | } | ||
| 58 | |||
| 59 | static void | 59 | static void |
| 60 | qla24xx_process_abts(struct scsi_qla_host *vha, void *pkt) | 60 | qla24xx_process_abts(struct scsi_qla_host *vha, struct purex_item *pkt) |
| 61 | { | 61 | { |
| 62 | struct abts_entry_24xx *abts = pkt; | 62 | struct abts_entry_24xx *abts = |
| 63 | (struct abts_entry_24xx *)&pkt->iocb; | ||
| 63 | struct qla_hw_data *ha = vha->hw; | 64 | struct qla_hw_data *ha = vha->hw; |
| 64 | struct els_entry_24xx *rsp_els; | 65 | struct els_entry_24xx *rsp_els; |
| 65 | struct abts_entry_24xx *abts_rsp; | 66 | struct abts_entry_24xx *abts_rsp; |
| @@ -789,6 +790,179 @@ qla27xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb) · 723 unmodified lines | |||
| 789 | } | 790 | } |
| 790 | } | 791 | } |
| 791 | 792 | ||
| 793 | static struct purex_item * | ||
| 794 | qla24xx_alloc_purex_item(scsi_qla_host_t *vha, uint16_t size) | ||
| 795 | { | ||
| 796 | struct purex_item *item = NULL; | ||
| 797 | uint8_t item_hdr_size = sizeof(*item); | ||
| 798 | |||
| 799 | if (size > QLA_DEFAULT_PAYLOAD_SIZE) { | ||
| 800 | item = kzalloc(item_hdr_size + | ||
| 801 | (size - QLA_DEFAULT_PAYLOAD_SIZE), GFP_ATOMIC); | ||
| 802 | } else { | ||
| 803 | if (atomic_inc_return(&vha->default_item.in_use) == 1) { | ||
| 804 | item = &vha->default_item; | ||
| 805 | goto initialize_purex_header; | ||
| 806 | } else { | ||
| 807 | item = kzalloc(item_hdr_size, GFP_ATOMIC); | ||
| 808 | } | ||
| 809 | } | ||
| 810 | if (!item) { | ||
| 811 | ql_log(ql_log_warn, vha, 0x5092, | ||
| 812 | ">> Failed allocate purex list item.\n"); | ||
| 813 | |||
| 814 | return NULL; | ||
| 815 | } | ||
| 816 | |||
| 817 | initialize_purex_header: | ||
| 818 | item->vha = vha; | ||
| 819 | item->size = size; | ||
| 820 | return item; | ||
| 821 | } | ||
| 822 | |||
| 823 | static void | ||
| 824 | qla24xx_queue_purex_item(scsi_qla_host_t *vha, struct purex_item *pkt, | ||
| 825 | void (*process_item)(struct scsi_qla_host *vha, | ||
| 826 | struct purex_item *pkt)) | ||
| 827 | { | ||
| 828 | struct purex_list *list = &vha->purex_list; | ||
| 829 | ulong flags; | ||
| 830 | |||
| 831 | pkt->process_item = process_item; | ||
| 832 | |||
| 833 | spin_lock_irqsave(&list->lock, flags); | ||
| 834 | list_add_tail(&pkt->list, &list->head); | ||
| 835 | spin_unlock_irqrestore(&list->lock, flags); | ||
| 836 | |||
| 837 | set_bit(PROCESS_PUREX_IOCB, &vha->dpc_flags); | ||
| 838 | } | ||
| 839 | |||
| 840 | /** | ||
| 841 | * qla24xx_copy_std_pkt() - Copy over purex ELS which is | ||
| 842 | * contained in a single IOCB. | ||
| 843 | * purex packet. | ||
| 844 | * @vha: SCSI driver HA context | ||
| 845 | * @pkt: ELS packet | ||
| 846 | */ | ||
| 847 | static struct purex_item | ||
| 848 | *qla24xx_copy_std_pkt(struct scsi_qla_host *vha, void *pkt) | ||
| 849 | { | ||
| 850 | struct purex_item *item; | ||
| 851 | |||
| 852 | item = qla24xx_alloc_purex_item(vha, | ||
| 853 | QLA_DEFAULT_PAYLOAD_SIZE); | ||
| 854 | if (!item) | ||
| 855 | return item; | ||
| 856 | |||
| 857 | memcpy(&item->iocb, pkt, sizeof(item->iocb)); | ||
| 858 | return item; | ||
| 859 | } | ||
| 860 | |||
| 861 | /** | ||
| 862 | * qla27xx_copy_fpin_pkt() - Copy over fpin packets that can | ||
| 863 | * span over multiple IOCBs. | ||
| 864 | * @vha: SCSI driver HA context | ||
| 865 | * @pkt: ELS packet | ||
| 866 | * @rsp: Response queue | ||
| 867 | */ | ||
| 868 | static struct purex_item * | ||
| 869 | qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha, void **pkt, | ||
| 870 | struct rsp_que **rsp) | ||
| 871 | { | ||
| 872 | struct purex_entry_24xx *purex = *pkt; | ||
| 873 | struct rsp_que *rsp_q = *rsp; | ||
| 874 | sts_cont_entry_t *new_pkt; | ||
| 875 | uint16_t no_bytes = 0, total_bytes = 0, pending_bytes = 0; | ||
| 876 | uint16_t buffer_copy_offset = 0; | ||
| 877 | uint16_t entry_count, entry_count_remaining; | ||
| 878 | struct purex_item *item; | ||
| 879 | void *fpin_pkt = NULL; | ||
| 880 | |||
| 881 | total_bytes = (le16_to_cpu(purex->frame_size) & 0x0FFF) | ||
| 882 | - PURX_ELS_HEADER_SIZE; | ||
| 883 | pending_bytes = total_bytes; | ||
| 884 | entry_count = entry_count_remaining = purex->entry_count; | ||
| 885 | no_bytes = (pending_bytes > sizeof(purex->els_frame_payload)) ? | ||
| 886 | sizeof(purex->els_frame_payload) : pending_bytes; | ||
| 887 | ql_log(ql_log_info, vha, 0x509a, | ||
| 888 | "FPIN ELS, frame_size 0x%x, entry count %d\n", | ||
| 889 | total_bytes, entry_count); | ||
| 890 | |||
| 891 | item = qla24xx_alloc_purex_item(vha, total_bytes); | ||
| 892 | if (!item) | ||
| 893 | return item; | ||
| 894 | |||
| 895 | fpin_pkt = &item->iocb; | ||
| 896 | |||
| 897 | memcpy(fpin_pkt, &purex->els_frame_payload[0], no_bytes); | ||
| 898 | buffer_copy_offset += no_bytes; | ||
| 899 | pending_bytes -= no_bytes; | ||
| 900 | --entry_count_remaining; | ||
| 901 | |||
| 902 | ((response_t *)purex)->signature = RESPONSE_PROCESSED; | ||
| 903 | wmb(); | ||
| 904 | |||
| 905 | do { | ||
| 906 | while ((total_bytes > 0) && (entry_count_remaining > 0)) { | ||
| 907 | if (rsp_q->ring_ptr->signature == RESPONSE_PROCESSED) { | ||
| 908 | ql_dbg(ql_dbg_async, vha, 0x5084, | ||
| 909 | "Ran out of IOCBs, partial data 0x%x\n", | ||
| 910 | buffer_copy_offset); | ||
| 911 | cpu_relax(); | ||
| 912 | continue; | ||
| 913 | } | ||
| 914 | |||
| 915 | new_pkt = (sts_cont_entry_t *)rsp_q->ring_ptr; | ||
| 916 | *pkt = new_pkt; | ||
| 917 | |||
| 918 | if (new_pkt->entry_type != STATUS_CONT_TYPE) { | ||
| 919 | ql_log(ql_log_warn, vha, 0x507a, | ||
| 920 | "Unexpected IOCB type, partial data 0x%x\n", | ||
| 921 | buffer_copy_offset); | ||
| 922 | break; | ||
| 923 | } | ||
| 924 | |||
| 925 | rsp_q->ring_index++; | ||
| 926 | if (rsp_q->ring_index == rsp_q->length) { | ||
| 927 | rsp_q->ring_index = 0; | ||
| 928 | rsp_q->ring_ptr = rsp_q->ring; | ||
| 929 | } else { | ||
| 930 | rsp_q->ring_ptr++; | ||
| 931 | } | ||
| 932 | no_bytes = (pending_bytes > sizeof(new_pkt->data)) ? | ||
| 933 | sizeof(new_pkt->data) : pending_bytes; | ||
| 934 | if ((buffer_copy_offset + no_bytes) <= total_bytes) { | ||
| 935 | memcpy(((uint8_t *)fpin_pkt + | ||
| 936 | buffer_copy_offset), new_pkt->data, | ||
| 937 | no_bytes); | ||
| 938 | buffer_copy_offset += no_bytes; | ||
| 939 | pending_bytes -= no_bytes; | ||
| 940 | --entry_count_remaining; | ||
| 941 | } else { | ||
| 942 | ql_log(ql_log_warn, vha, 0x5044, | ||
| 943 | "Attempt to copy more that we got, optimizing..%x\n", | ||
| 944 | buffer_copy_offset); | ||
| 945 | memcpy(((uint8_t *)fpin_pkt + | ||
| 946 | buffer_copy_offset), new_pkt->data, | ||
| 947 | total_bytes - buffer_copy_offset); | ||
| 948 | } | ||
| 949 | |||
| 950 | ((response_t *)new_pkt)->signature = RESPONSE_PROCESSED; | ||
| 951 | wmb(); | ||
| 952 | } | ||
| 953 | |||
| 954 | if (pending_bytes != 0 || entry_count_remaining != 0) { | ||
| 955 | ql_log(ql_log_fatal, vha, 0x508b, | ||
| 956 | "Dropping partial FPIN, underrun bytes = 0x%x, entry cnts 0x%x\n", | ||
| 957 | total_bytes, entry_count_remaining); | ||
| 958 | qla24xx_free_purex_item(item); | ||
| 959 | return NULL; | ||
| 960 | } | ||
| 961 | } while (entry_count_remaining > 0); | ||
| 962 | host_to_fcp_swap((uint8_t *)&item->iocb, total_bytes); | ||
| 963 | return item; | ||
| 964 | } | ||
| 965 | |||
| 792 | /** | 966 | /** |
| 793 | * qla2x00_async_event() - Process aynchronous events. | 967 | * qla2x00_async_event() - Process aynchronous events. |
| 794 | * @vha: SCSI driver HA context | 968 | * @vha: SCSI driver HA context |
| @@ -1302,6 +1476,19 @@ global_port_update: · 507 unmodified lines | |||
| 1302 | qla2x00_post_aen_work(vha, FCH_EVT_RSCN, rscn_entry); | 1476 | qla2x00_post_aen_work(vha, FCH_EVT_RSCN, rscn_entry); |
| 1303 | } | 1477 | } |
| 1304 | break; | 1478 | break; |
| 1479 | case MBA_CONGN_NOTI_RECV: | ||
| 1480 | if (!ha->flags.scm_enabled || | ||
| 1481 | mb[1] != QLA_CON_PRIMITIVE_RECEIVED) | ||
| 1482 | break; | ||
| 1483 | |||
| 1484 | if (mb[2] == QLA_CONGESTION_ARB_WARNING) { | ||
| 1485 | ql_dbg(ql_dbg_async, vha, 0x509b, | ||
| 1486 | "Congestion Warning %04x %04x.\n", mb[1], mb[2]); | ||
| 1487 | } else if (mb[2] == QLA_CONGESTION_ARB_ALARM) { | ||
| 1488 | ql_log(ql_log_warn, vha, 0x509b, | ||
| 1489 | "Congestion Alarm %04x %04x.\n", mb[1], mb[2]); | ||
| 1490 | } | ||
| 1491 | break; | ||
| 1305 | /* case MBA_RIO_RESPONSE: */ | 1492 | /* case MBA_RIO_RESPONSE: */ |
| 1306 | case MBA_ZIO_RESPONSE: | 1493 | case MBA_ZIO_RESPONSE: |
| 1307 | ql_dbg(ql_dbg_async, vha, 0x5015, | 1494 | ql_dbg(ql_dbg_async, vha, 0x5015, |
| @@ -3229,6 +3416,8 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha, · 1921 unmodified lines | |||
| 3229 | { | 3416 | { |
| 3230 | struct sts_entry_24xx *pkt; | 3417 | struct sts_entry_24xx *pkt; |
| 3231 | struct qla_hw_data *ha = vha->hw; | 3418 | struct qla_hw_data *ha = vha->hw; |
| 3419 | struct purex_entry_24xx *purex_entry; | ||
| 3420 | struct purex_item *pure_item; | ||
| 3232 | 3421 | ||
| 3233 | if (!ha->flags.fw_started) | 3422 | if (!ha->flags.fw_started) |
| 3234 | return; | 3423 | return; |
| @@ -3280,8 +3469,11 @@ process_err: · 45 unmodified lines | |||
| 3280 | break; | 3469 | break; |
| 3281 | case ABTS_RECV_24XX: | 3470 | case ABTS_RECV_24XX: |
| 3282 | if (qla_ini_mode_enabled(vha)) { | 3471 | if (qla_ini_mode_enabled(vha)) { |
| 3283 | qla24xx_purex_iocb(vha, pkt, | 3472 | pure_item = qla24xx_copy_std_pkt(vha, pkt); |
| 3284 | qla24xx_process_abts); | 3473 | if (!pure_item) |
| 3474 | break; | ||
| 3475 | qla24xx_queue_purex_item(vha, pure_item, | ||
| 3476 | qla24xx_process_abts); | ||
| 3285 | break; | 3477 | break; |
| 3286 | } | 3478 | } |
| 3287 | if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || | 3479 | if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || |
| @@ -3329,24 +3521,40 @@ process_err: · 41 unmodified lines | |||
| 3329 | (struct vp_ctrl_entry_24xx *)pkt); | 3521 | (struct vp_ctrl_entry_24xx *)pkt); |
| 3330 | break; | 3522 | break; |
| 3331 | case PUREX_IOCB_TYPE: | 3523 | case PUREX_IOCB_TYPE: |
| 3332 | { | 3524 | purex_entry = (void *)pkt; |
| 3333 | struct purex_entry_24xx *purex = (void *)pkt; | 3525 | switch (purex_entry->els_frame_payload[3]) { |
| 3334 | 3526 | case ELS_RDP: | |
| 3335 | if (purex->els_frame_payload[3] != ELS_COMMAND_RDP) { | 3527 | pure_item = qla24xx_copy_std_pkt(vha, pkt); |
| 3336 | ql_dbg(ql_dbg_init, vha, 0x5091, | 3528 | if (!pure_item) |
| 3337 | "Discarding ELS Request opcode %#x...\n", | 3529 | break; |
| 3338 | purex->els_frame_payload[3]); | 3530 | qla24xx_queue_purex_item(vha, pure_item, |
| 3531 | qla24xx_process_purex_rdp); | ||
| 3532 | break; | ||
| 3533 | case ELS_FPIN: | ||
| 3534 | if (!vha->hw->flags.scm_enabled) { | ||
| 3535 | ql_log(ql_log_warn, vha, 0x5094, | ||
| 3536 | "SCM not active for this port\n"); | ||
| 3537 | break; | ||
| 3538 | } | ||
| 3539 | pure_item = qla27xx_copy_fpin_pkt(vha, | ||
| 3540 | (void **)&pkt, &rsp); | ||
| 3541 | if (!pure_item) | ||
| 3542 | break; | ||
| 3543 | qla24xx_queue_purex_item(vha, pure_item, | ||
| 3544 | qla27xx_process_purex_fpin); | ||
| 3339 | break; | 3545 | break; |
| 3546 | |||
| 3547 | default: | ||
| 3548 | ql_log(ql_log_warn, vha, 0x509c, | ||
| 3549 | "Discarding ELS Request opcode 0x%x\n", | ||
| 3550 | purex_entry->els_frame_payload[3]); | ||
| 3340 | } | 3551 | } |
| 3341 | qla24xx_purex_iocb(vha, pkt, qla24xx_process_purex_rdp); | ||
| 3342 | break; | 3552 | break; |
| 3343 | } | ||
| 3344 | default: | 3553 | default: |
| 3345 | /* Type Not Supported. */ | 3554 | /* Type Not Supported. */ |
| 3346 | ql_dbg(ql_dbg_async, vha, 0x5042, | 3555 | ql_dbg(ql_dbg_async, vha, 0x5042, |
| 3347 | "Received unknown response pkt type %x " | 3556 | "Received unknown response pkt type 0x%x entry status=%x.\n", |
| 3348 | "entry status=%x.\n", | 3557 | pkt->entry_type, pkt->entry_status); |
| 3349 | pkt->entry_type, pkt->entry_status); | ||
| 3350 | break; | 3558 | break; |
| 3351 | } | 3559 | } |
| 3352 | ((response_t *)pkt)->signature = RESPONSE_PROCESSED; | 3560 | ((response_t *)pkt)->signature = RESPONSE_PROCESSED; |
| @@ -59,6 +59,7 @@ static struct rom_cmd { · 58 unmodified lines | |||
| 59 | { MBC_IOCB_COMMAND_A64 }, | 59 | { MBC_IOCB_COMMAND_A64 }, |
| 60 | { MBC_GET_ADAPTER_LOOP_ID }, | 60 | { MBC_GET_ADAPTER_LOOP_ID }, |
| 61 | { MBC_READ_SFP }, | 61 | { MBC_READ_SFP }, |
| 62 | { MBC_SET_RNID_PARAMS }, | ||
| 62 | { MBC_GET_RNID_PARAMS }, | 63 | { MBC_GET_RNID_PARAMS }, |
| 63 | { MBC_GET_SET_ZIO_THRESHOLD }, | 64 | { MBC_GET_SET_ZIO_THRESHOLD }, |
| 64 | }; | 65 | }; |
| @@ -1124,6 +1125,16 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha) · 1059 unmodified lines | |||
| 1124 | (ha->flags.secure_fw) ? "Supported" : | 1125 | (ha->flags.secure_fw) ? "Supported" : |
| 1125 | "Not Supported"); | 1126 | "Not Supported"); |
| 1126 | } | 1127 | } |
| 1128 | |||
| 1129 | if (ha->flags.scm_supported_a && | ||
| 1130 | (ha->fw_attributes_ext[0] & FW_ATTR_EXT0_SCM_SUPPORTED)) { | ||
| 1131 | ha->flags.scm_supported_f = 1; | ||
| 1132 | memset(ha->sf_init_cb, 0, sizeof(struct init_sf_cb)); | ||
| 1133 | ha->sf_init_cb->flags |= BIT_13; | ||
| 1134 | } | ||
| 1135 | ql_log(ql_log_info, vha, 0x11a3, "SCM in FW: %s\n", | ||
| 1136 | (ha->flags.scm_supported_f) ? "Supported" : | ||
| 1137 | "Not Supported"); | ||
| 1127 | } | 1138 | } |
| 1128 | 1139 | ||
| 1129 | failed: | 1140 | failed: |
| @@ -1633,8 +1644,11 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa, · 503 unmodified lines | |||
| 1633 | mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10; | 1644 | mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10; |
| 1634 | if (IS_FWI2_CAPABLE(vha->hw)) | 1645 | if (IS_FWI2_CAPABLE(vha->hw)) |
| 1635 | mcp->in_mb |= MBX_19|MBX_18|MBX_17|MBX_16; | 1646 | mcp->in_mb |= MBX_19|MBX_18|MBX_17|MBX_16; |
| 1636 | if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) | 1647 | if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) { |
| 1637 | mcp->in_mb |= MBX_15; | 1648 | mcp->in_mb |= MBX_15; |
| 1649 | mcp->out_mb |= MBX_7|MBX_21|MBX_22|MBX_23; | ||
| 1650 | } | ||
| 1651 | |||
| 1638 | mcp->tov = MBX_TOV_SECONDS; | 1652 | mcp->tov = MBX_TOV_SECONDS; |
| 1639 | mcp->flags = 0; | 1653 | mcp->flags = 0; |
| 1640 | rval = qla2x00_mailbox_command(vha, mcp); | 1654 | rval = qla2x00_mailbox_command(vha, mcp); |
| @@ -1687,8 +1701,22 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa, · 46 unmodified lines | |||
| 1687 | } | 1701 | } |
| 1688 | } | 1702 | } |
| 1689 | 1703 | ||
| 1690 | if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) | 1704 | if (IS_QLA27XX(vha->hw) || IS_QLA28XX(vha->hw)) { |
| 1691 | vha->bbcr = mcp->mb[15]; | 1705 | vha->bbcr = mcp->mb[15]; |
| 1706 | if (mcp->mb[7] & SCM_EDC_ACC_RECEIVED) { | ||
| 1707 | ql_log(ql_log_info, vha, 0x11a4, | ||
| 1708 | "SCM: EDC ELS completed, flags 0x%x\n", | ||
| 1709 | mcp->mb[21]); | ||
| 1710 | } | ||
| 1711 | if (mcp->mb[7] & SCM_RDF_ACC_RECEIVED) { | ||
| 1712 | vha->hw->flags.scm_enabled = 1; | ||
| 1713 | vha->scm_fabric_connection_flags |= | ||
| 1714 | SCM_FLAG_RDF_COMPLETED; | ||
| 1715 | ql_log(ql_log_info, vha, 0x11a5, | ||
| 1716 | "SCM: RDF ELS completed, flags 0x%x\n", | ||
| 1717 | mcp->mb[23]); | ||
| 1718 | } | ||
| 1719 | } | ||
| 1692 | } | 1720 | } |
| 1693 | 1721 | ||
| 1694 | return rval; | 1722 | return rval; |
| @@ -1801,6 +1829,17 @@ qla2x00_init_firmware(scsi_qla_host_t *vha, uint16_t size) · 106 unmodified lines | |||
| 1801 | mcp->mb[14] = sizeof(*ha->ex_init_cb); | 1829 | mcp->mb[14] = sizeof(*ha->ex_init_cb); |
| 1802 | mcp->out_mb |= MBX_14|MBX_13|MBX_12|MBX_11|MBX_10; | 1830 | mcp->out_mb |= MBX_14|MBX_13|MBX_12|MBX_11|MBX_10; |
| 1803 | } | 1831 | } |
| 1832 | |||
| 1833 | if (ha->flags.scm_supported_f) { | ||
| 1834 | mcp->mb[1] |= BIT_1; | ||
| 1835 | mcp->mb[16] = MSW(ha->sf_init_cb_dma); | ||
| 1836 | mcp->mb[17] = LSW(ha->sf_init_cb_dma); | ||
| 1837 | mcp->mb[18] = MSW(MSD(ha->sf_init_cb_dma)); | ||
| 1838 | mcp->mb[19] = LSW(MSD(ha->sf_init_cb_dma)); | ||
| 1839 | mcp->mb[15] = sizeof(*ha->sf_init_cb); | ||
| 1840 | mcp->out_mb |= MBX_19|MBX_18|MBX_17|MBX_16|MBX_15; | ||
| 1841 | } | ||
| 1842 | |||
| 1804 | /* 1 and 2 should normally be captured. */ | 1843 | /* 1 and 2 should normally be captured. */ |
| 1805 | mcp->in_mb = MBX_2|MBX_1|MBX_0; | 1844 | mcp->in_mb = MBX_2|MBX_1|MBX_0; |
| 1806 | if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) | 1845 | if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) |
| @@ -4866,6 +4905,7 @@ qla24xx_get_port_login_templ(scsi_qla_host_t *vha, dma_addr_t buf_dma, · 3059 unmodified lines | |||
| 4866 | return rval; | 4905 | return rval; |
| 4867 | } | 4906 | } |
| 4868 | 4907 | ||
| 4908 | #define PUREX_CMD_COUNT 2 | ||
| 4869 | int | 4909 | int |
| 4870 | qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha) | 4910 | qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha) |
| 4871 | { | 4911 | { |
| @@ -4874,12 +4914,12 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha) · 2 unmodified lines | |||
| 4874 | mbx_cmd_t *mcp = &mc; | 4914 | mbx_cmd_t *mcp = &mc; |
| 4875 | uint8_t *els_cmd_map; | 4915 | uint8_t *els_cmd_map; |
| 4876 | dma_addr_t els_cmd_map_dma; | 4916 | dma_addr_t els_cmd_map_dma; |
| 4877 | uint cmd_opcode = ELS_COMMAND_RDP; | 4917 | uint8_t cmd_opcode[PUREX_CMD_COUNT]; |
| 4878 | uint index = cmd_opcode / 8; | 4918 | uint8_t i, index, purex_bit; |
| 4879 | uint bit = cmd_opcode % 8; | ||
| 4880 | struct qla_hw_data *ha = vha->hw; | 4919 | struct qla_hw_data *ha = vha->hw; |
| 4881 | 4920 | ||
| 4882 | if (!IS_QLA25XX(ha) && !IS_QLA2031(ha) && !IS_QLA27XX(ha)) | 4921 | if (!IS_QLA25XX(ha) && !IS_QLA2031(ha) && |
| 4922 | !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) | ||
| 4883 | return QLA_SUCCESS; | 4923 | return QLA_SUCCESS; |
| 4884 | 4924 | ||
| 4885 | ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1197, | 4925 | ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1197, |
| @@ -4893,7 +4933,17 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha) · 7 unmodified lines | |||
| 4893 | return QLA_MEMORY_ALLOC_FAILED; | 4933 | return QLA_MEMORY_ALLOC_FAILED; |
| 4894 | } | 4934 | } |
| 4895 | 4935 | ||
| 4896 | els_cmd_map[index] |= 1 << bit; | 4936 | memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE); |
| 4937 | |||
| 4938 | /* List of Purex ELS */ | ||
| 4939 | cmd_opcode[0] = ELS_FPIN; | ||
| 4940 | cmd_opcode[1] = ELS_RDP; | ||
| 4941 | |||
| 4942 | for (i = 0; i < PUREX_CMD_COUNT; i++) { | ||
| 4943 | index = cmd_opcode[i] / 8; | ||
| 4944 | purex_bit = cmd_opcode[i] % 8; | ||
| 4945 | els_cmd_map[index] |= 1 << purex_bit; | ||
| 4946 | } | ||
| 4897 | 4947 | ||
| 4898 | mcp->mb[0] = MBC_SET_RNID_PARAMS; | 4948 | mcp->mb[0] = MBC_SET_RNID_PARAMS; |
| 4899 | mcp->mb[1] = RNID_TYPE_ELS_CMD << 8; | 4949 | mcp->mb[1] = RNID_TYPE_ELS_CMD << 8; |
| @@ -966,26 +966,21 @@ qla82xx_read_status_reg(struct qla_hw_data *ha, uint32_t *val) · 965 unmodified lines | |||
| 966 | static int | 966 | static int |
| 967 | qla82xx_flash_wait_write_finish(struct qla_hw_data *ha) | 967 | qla82xx_flash_wait_write_finish(struct qla_hw_data *ha) |
| 968 | { | 968 | { |
| 969 | long timeout = 0; | ||
| 970 | uint32_t done = 1 ; | ||
| 971 | uint32_t val; | 969 | uint32_t val; |
| 972 | int ret = 0; | 970 | int i, ret; |
| 973 | scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); | 971 | scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); |
| 974 | 972 | ||
| 975 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 0); | 973 | qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_ABYTE_CNT, 0); |
| 976 | while ((done != 0) && (ret == 0)) { | 974 | for (i = 0; i < 50000; i++) { |
| 977 | ret = qla82xx_read_status_reg(ha, &val); | 975 | ret = qla82xx_read_status_reg(ha, &val); |
| 978 | done = val & 1; | 976 | if (ret < 0 || (val & 1) == 0) |
| 979 | timeout++; | 977 | return ret; |
| 980 | udelay(10); | 978 | udelay(10); |
| 981 | cond_resched(); | 979 | cond_resched(); |
| 982 | if (timeout >= 50000) { | ||
| 983 | ql_log(ql_log_warn, vha, 0xb00d, | ||
| 984 | "Timeout reached waiting for write finish.\n"); | ||
| 985 | return -1; | ||
| 986 | } | ||
| 987 | } | 980 | } |
| 988 | return ret; | 981 | ql_log(ql_log_warn, vha, 0xb00d, |
| 982 | "Timeout reached waiting for write finish.\n"); | ||
| 983 | return -1; | ||
| 989 | } | 984 | } |
| 990 | 985 | ||
| 991 | static int | 986 | static int |
| @@ -1172,6 +1167,7 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha) · 180 unmodified lines | |||
| 1172 | * Offset 4: Offset and number of addr/value pairs | 1167 | * Offset 4: Offset and number of addr/value pairs |
| 1173 | * that present in CRB initialize sequence | 1168 | * that present in CRB initialize sequence |
| 1174 | */ | 1169 | */ |
| 1170 | n = 0; | ||
| 1175 | if (qla82xx_rom_fast_read(ha, 0, &n) != 0 || n != 0xcafecafeUL || | 1171 | if (qla82xx_rom_fast_read(ha, 0, &n) != 0 || n != 0xcafecafeUL || |
| 1176 | qla82xx_rom_fast_read(ha, 4, &n) != 0) { | 1172 | qla82xx_rom_fast_read(ha, 4, &n) != 0) { |
| 1177 | ql_log(ql_log_fatal, vha, 0x006e, | 1173 | ql_log(ql_log_fatal, vha, 0x006e, |
| @@ -4218,6 +4218,16 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len, · 4217 unmodified lines | |||
| 4218 | "ex_init_cb=%p.\n", ha->ex_init_cb); | 4218 | "ex_init_cb=%p.\n", ha->ex_init_cb); |
| 4219 | } | 4219 | } |
| 4220 | 4220 | ||
| 4221 | /* Get consistent memory allocated for Special Features-CB. */ | ||
| 4222 | if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) { | ||
| 4223 | ha->sf_init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, | ||
| 4224 | &ha->sf_init_cb_dma); | ||
| 4225 | if (!ha->sf_init_cb) | ||
| 4226 | goto fail_sf_init_cb; | ||
| 4227 | ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0199, | ||
| 4228 | "sf_init_cb=%p.\n", ha->sf_init_cb); | ||
| 4229 | } | ||
| 4230 | |||
| 4221 | INIT_LIST_HEAD(&ha->gbl_dsd_list); | 4231 | INIT_LIST_HEAD(&ha->gbl_dsd_list); |
| 4222 | 4232 | ||
| 4223 | /* Get consistent memory allocated for Async Port-Database. */ | 4233 | /* Get consistent memory allocated for Async Port-Database. */ |
| @@ -4271,6 +4281,8 @@ fail_sfp_data: · 47 unmodified lines | |||
| 4271 | fail_loop_id_map: | 4281 | fail_loop_id_map: |
| 4272 | dma_pool_free(ha->s_dma_pool, ha->async_pd, ha->async_pd_dma); | 4282 | dma_pool_free(ha->s_dma_pool, ha->async_pd, ha->async_pd_dma); |
| 4273 | fail_async_pd: | 4283 | fail_async_pd: |
| 4284 | dma_pool_free(ha->s_dma_pool, ha->sf_init_cb, ha->sf_init_cb_dma); | ||
| 4285 | fail_sf_init_cb: | ||
| 4274 | dma_pool_free(ha->s_dma_pool, ha->ex_init_cb, ha->ex_init_cb_dma); | 4286 | dma_pool_free(ha->s_dma_pool, ha->ex_init_cb, ha->ex_init_cb_dma); |
| 4275 | fail_ex_init_cb: | 4287 | fail_ex_init_cb: |
| 4276 | kfree(ha->npiv_info); | 4288 | kfree(ha->npiv_info); |
| @@ -4693,6 +4705,10 @@ qla2x00_mem_free(struct qla_hw_data *ha) · 416 unmodified lines | |||
| 4693 | ha->ms_iocb = NULL; | 4705 | ha->ms_iocb = NULL; |
| 4694 | ha->ms_iocb_dma = 0; | 4706 | ha->ms_iocb_dma = 0; |
| 4695 | 4707 | ||
| 4708 | if (ha->sf_init_cb) | ||
| 4709 | dma_pool_free(ha->s_dma_pool, | ||
| 4710 | ha->sf_init_cb, ha->sf_init_cb_dma); | ||
| 4711 | |||
| 4696 | if (ha->ex_init_cb) | 4712 | if (ha->ex_init_cb) |
| 4697 | dma_pool_free(ha->s_dma_pool, | 4713 | dma_pool_free(ha->s_dma_pool, |
| 4698 | ha->ex_init_cb, ha->ex_init_cb_dma); | 4714 | ha->ex_init_cb, ha->ex_init_cb_dma); |
| @@ -4780,6 +4796,8 @@ qla2x00_mem_free(struct qla_hw_data *ha) · 81 unmodified lines | |||
| 4780 | kfree(ha->swl); | 4796 | kfree(ha->swl); |
| 4781 | ha->swl = NULL; | 4797 | ha->swl = NULL; |
| 4782 | kfree(ha->loop_id_map); | 4798 | kfree(ha->loop_id_map); |
| 4799 | ha->sf_init_cb = NULL; | ||
| 4800 | ha->sf_init_cb_dma = 0; | ||
| 4783 | ha->loop_id_map = NULL; | 4801 | ha->loop_id_map = NULL; |
| 4784 | } | 4802 | } |
| 4785 | 4803 | ||
| @@ -5893,10 +5911,12 @@ qla25xx_rdp_port_speed_currently(struct qla_hw_data *ha) · 1107 unmodified lines | |||
| 5893 | * vha: SCSI qla host | 5911 | * vha: SCSI qla host |
| 5894 | * purex: RDP request received by HBA | 5912 | * purex: RDP request received by HBA |
| 5895 | */ | 5913 | */ |
| 5896 | void qla24xx_process_purex_rdp(struct scsi_qla_host *vha, void *pkt) | 5914 | void qla24xx_process_purex_rdp(struct scsi_qla_host *vha, |
| 5915 | struct purex_item *item) | ||
| 5897 | { | 5916 | { |
| 5898 | struct qla_hw_data *ha = vha->hw; | 5917 | struct qla_hw_data *ha = vha->hw; |
| 5899 | struct purex_entry_24xx *purex = pkt; | 5918 | struct purex_entry_24xx *purex = |
| 5919 | (struct purex_entry_24xx *)&item->iocb; | ||
| 5900 | dma_addr_t rsp_els_dma; | 5920 | dma_addr_t rsp_els_dma; |
| 5901 | dma_addr_t rsp_payload_dma; | 5921 | dma_addr_t rsp_payload_dma; |
| 5902 | dma_addr_t stat_dma; | 5922 | dma_addr_t stat_dma; |
| @@ -6306,6 +6326,15 @@ dealloc: · 403 unmodified lines | |||
| 6306 | rsp_els, rsp_els_dma); | 6326 | rsp_els, rsp_els_dma); |
| 6307 | } | 6327 | } |
| 6308 | 6328 | ||
| 6329 | void | ||
| 6330 | qla24xx_free_purex_item(struct purex_item *item) | ||
| 6331 | { | ||
| 6332 | if (item == &item->vha->default_item) | ||
| 6333 | memset(&item->vha->default_item, 0, sizeof(struct purex_item)); | ||
| 6334 | else | ||
| 6335 | kfree(item); | ||
| 6336 | } | ||
| 6337 | |||
| 6309 | void qla24xx_process_purex_list(struct purex_list *list) | 6338 | void qla24xx_process_purex_list(struct purex_list *list) |
| 6310 | { | 6339 | { |
| 6311 | struct list_head head = LIST_HEAD_INIT(head); | 6340 | struct list_head head = LIST_HEAD_INIT(head); |
| @@ -6318,8 +6347,8 @@ void qla24xx_process_purex_list(struct purex_list *list) · 6 unmodified lines | |||
| 6318 | 6347 | ||
| 6319 | list_for_each_entry_safe(item, next, &head, list) { | 6348 | list_for_each_entry_safe(item, next, &head, list) { |
| 6320 | list_del(&item->list); | 6349 | list_del(&item->list); |
| 6321 | item->process_item(item->vha, &item->iocb); | 6350 | item->process_item(item->vha, item); |
| 6322 | kfree(item); | 6351 | qla24xx_free_purex_item(item); |
| 6323 | } | 6352 | } |
| 6324 | } | 6353 | } |
| 6325 | 6354 | ||
| @@ -258,7 +258,7 @@ struct fcp_hdr { · 257 unmodified lines | |||
| 258 | __be16 ox_id; | 258 | __be16 ox_id; |
| 259 | uint16_t rx_id; | 259 | uint16_t rx_id; |
| 260 | __le32 parameter; | 260 | __le32 parameter; |
| 261 | } __packed; | 261 | }; |
| 262 | 262 | ||
| 263 | struct fcp_hdr_le { | 263 | struct fcp_hdr_le { |
| 264 | le_id_t d_id; | 264 | le_id_t d_id; |
| @@ -273,7 +273,7 @@ struct fcp_hdr_le { · 8 unmodified lines | |||
| 273 | __le16 rx_id; | 273 | __le16 rx_id; |
| 274 | __le16 ox_id; | 274 | __le16 ox_id; |
| 275 | __le32 parameter; | 275 | __le32 parameter; |
| 276 | } __packed; | 276 | }; |
| 277 | 277 | ||
| 278 | #define F_CTL_EXCH_CONTEXT_RESP BIT_23 | 278 | #define F_CTL_EXCH_CONTEXT_RESP BIT_23 |
| 279 | #define F_CTL_SEQ_CONTEXT_RESIP BIT_22 | 279 | #define F_CTL_SEQ_CONTEXT_RESIP BIT_22 |
| @@ -1971,6 +1971,7 @@ static int __init tcm_qla2xxx_init(void) · 1970 unmodified lines | |||
| 1971 | BUILD_BUG_ON(sizeof(struct ctio_crc2_to_fw) != 64); | 1971 | BUILD_BUG_ON(sizeof(struct ctio_crc2_to_fw) != 64); |
| 1972 | BUILD_BUG_ON(sizeof(struct ctio_crc_from_fw) != 64); | 1972 | BUILD_BUG_ON(sizeof(struct ctio_crc_from_fw) != 64); |
| 1973 | BUILD_BUG_ON(sizeof(struct ctio_to_2xxx) != 64); | 1973 | BUILD_BUG_ON(sizeof(struct ctio_to_2xxx) != 64); |
| 1974 | BUILD_BUG_ON(sizeof(struct fcp_hdr) != 24); | ||
| 1974 | BUILD_BUG_ON(sizeof(struct fcp_hdr_le) != 24); | 1975 | BUILD_BUG_ON(sizeof(struct fcp_hdr_le) != 24); |
| 1975 | BUILD_BUG_ON(sizeof(struct nack_to_isp) != 64); | 1976 | BUILD_BUG_ON(sizeof(struct nack_to_isp) != 64); |
| 1976 | 1977 | ||
| @@ -1406,16 +1406,16 @@ exit_isp_reset: · 1405 unmodified lines | |||
| 1406 | static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) | 1406 | static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) |
| 1407 | { | 1407 | { |
| 1408 | u32 val = 0, val1 = 0; | 1408 | u32 val = 0, val1 = 0; |
| 1409 | int i, status = QLA_SUCCESS; | 1409 | int i; |
| 1410 | 1410 | ||
| 1411 | status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_SRE_SHIM_CONTROL, &val); | 1411 | qla4_83xx_rd_reg_indirect(ha, QLA83XX_SRE_SHIM_CONTROL, &val); |
| 1412 | DEBUG2(ql4_printk(KERN_INFO, ha, "SRE-Shim Ctrl:0x%x\n", val)); | 1412 | DEBUG2(ql4_printk(KERN_INFO, ha, "SRE-Shim Ctrl:0x%x\n", val)); |
| 1413 | 1413 | ||
| 1414 | /* Port 0 Rx Buffer Pause Threshold Registers. */ | 1414 | /* Port 0 Rx Buffer Pause Threshold Registers. */ |
| 1415 | DEBUG2(ql4_printk(KERN_INFO, ha, | 1415 | DEBUG2(ql4_printk(KERN_INFO, ha, |
| 1416 | "Port 0 Rx Buffer Pause Threshold Registers[TC7..TC0]:")); | 1416 | "Port 0 Rx Buffer Pause Threshold Registers[TC7..TC0]:")); |
| 1417 | for (i = 0; i < 8; i++) { | 1417 | for (i = 0; i < 8; i++) { |
| 1418 | status = qla4_83xx_rd_reg_indirect(ha, | 1418 | qla4_83xx_rd_reg_indirect(ha, |
| 1419 | QLA83XX_PORT0_RXB_PAUSE_THRS + (i * 0x4), &val); | 1419 | QLA83XX_PORT0_RXB_PAUSE_THRS + (i * 0x4), &val); |
| 1420 | DEBUG2(pr_info("0x%x ", val)); | 1420 | DEBUG2(pr_info("0x%x ", val)); |
| 1421 | } | 1421 | } |
| @@ -1426,7 +1426,7 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) · 4 unmodified lines | |||
| 1426 | DEBUG2(ql4_printk(KERN_INFO, ha, | 1426 | DEBUG2(ql4_printk(KERN_INFO, ha, |
| 1427 | "Port 1 Rx Buffer Pause Threshold Registers[TC7..TC0]:")); | 1427 | "Port 1 Rx Buffer Pause Threshold Registers[TC7..TC0]:")); |
| 1428 | for (i = 0; i < 8; i++) { | 1428 | for (i = 0; i < 8; i++) { |
| 1429 | status = qla4_83xx_rd_reg_indirect(ha, | 1429 | qla4_83xx_rd_reg_indirect(ha, |
| 1430 | QLA83XX_PORT1_RXB_PAUSE_THRS + (i * 0x4), &val); | 1430 | QLA83XX_PORT1_RXB_PAUSE_THRS + (i * 0x4), &val); |
| 1431 | DEBUG2(pr_info("0x%x ", val)); | 1431 | DEBUG2(pr_info("0x%x ", val)); |
| 1432 | } | 1432 | } |
| @@ -1437,7 +1437,7 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) · 4 unmodified lines | |||
| 1437 | DEBUG2(ql4_printk(KERN_INFO, ha, | 1437 | DEBUG2(ql4_printk(KERN_INFO, ha, |
| 1438 | "Port 0 RxB Traffic Class Max Cell Registers[3..0]:")); | 1438 | "Port 0 RxB Traffic Class Max Cell Registers[3..0]:")); |
| 1439 | for (i = 0; i < 4; i++) { | 1439 | for (i = 0; i < 4; i++) { |
| 1440 | status = qla4_83xx_rd_reg_indirect(ha, | 1440 | qla4_83xx_rd_reg_indirect(ha, |
| 1441 | QLA83XX_PORT0_RXB_TC_MAX_CELL + (i * 0x4), &val); | 1441 | QLA83XX_PORT0_RXB_TC_MAX_CELL + (i * 0x4), &val); |
| 1442 | DEBUG2(pr_info("0x%x ", val)); | 1442 | DEBUG2(pr_info("0x%x ", val)); |
| 1443 | } | 1443 | } |
| @@ -1448,7 +1448,7 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) · 4 unmodified lines | |||
| 1448 | DEBUG2(ql4_printk(KERN_INFO, ha, | 1448 | DEBUG2(ql4_printk(KERN_INFO, ha, |
| 1449 | "Port 1 RxB Traffic Class Max Cell Registers[3..0]:")); | 1449 | "Port 1 RxB Traffic Class Max Cell Registers[3..0]:")); |
| 1450 | for (i = 0; i < 4; i++) { | 1450 | for (i = 0; i < 4; i++) { |
| 1451 | status = qla4_83xx_rd_reg_indirect(ha, | 1451 | qla4_83xx_rd_reg_indirect(ha, |
| 1452 | QLA83XX_PORT1_RXB_TC_MAX_CELL + (i * 0x4), &val); | 1452 | QLA83XX_PORT1_RXB_TC_MAX_CELL + (i * 0x4), &val); |
| 1453 | DEBUG2(pr_info("0x%x ", val)); | 1453 | DEBUG2(pr_info("0x%x ", val)); |
| 1454 | } | 1454 | } |
| @@ -1459,15 +1459,11 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) · 4 unmodified lines | |||
| 1459 | DEBUG2(ql4_printk(KERN_INFO, ha, | 1459 | DEBUG2(ql4_printk(KERN_INFO, ha, |
| 1460 | "Port 0 RxB Rx Traffic Class Stats [TC7..TC0]")); | 1460 | "Port 0 RxB Rx Traffic Class Stats [TC7..TC0]")); |
| 1461 | for (i = 7; i >= 0; i--) { | 1461 | for (i = 7; i >= 0; i--) { |
| 1462 | status = qla4_83xx_rd_reg_indirect(ha, | 1462 | qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, &val); |
| 1463 | QLA83XX_PORT0_RXB_TC_STATS, | ||
| 1464 | &val); | ||
| 1465 | val &= ~(0x7 << 29); /* Reset bits 29 to 31 */ | 1463 | val &= ~(0x7 << 29); /* Reset bits 29 to 31 */ |
| 1466 | qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, | 1464 | qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, |
| 1467 | (val | (i << 29))); | 1465 | (val | (i << 29))); |
| 1468 | status = qla4_83xx_rd_reg_indirect(ha, | 1466 | qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT0_RXB_TC_STATS, &val); |
| 1469 | QLA83XX_PORT0_RXB_TC_STATS, | ||
| 1470 | &val); | ||
| 1471 | DEBUG2(pr_info("0x%x ", val)); | 1467 | DEBUG2(pr_info("0x%x ", val)); |
| 1472 | } | 1468 | } |
| 1473 | 1469 | ||
| @@ -1477,24 +1473,18 @@ static void qla4_83xx_dump_pause_control_regs(struct scsi_qla_host *ha) · 3 unmodified lines | |||
| 1477 | DEBUG2(ql4_printk(KERN_INFO, ha, | 1473 | DEBUG2(ql4_printk(KERN_INFO, ha, |
| 1478 | "Port 1 RxB Rx Traffic Class Stats [TC7..TC0]")); | 1474 | "Port 1 RxB Rx Traffic Class Stats [TC7..TC0]")); |
| 1479 | for (i = 7; i >= 0; i--) { | 1475 | for (i = 7; i >= 0; i--) { |
| 1480 | status = qla4_83xx_rd_reg_indirect(ha, | 1476 | qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, &val); |
| 1481 | QLA83XX_PORT1_RXB_TC_STATS, | ||
| 1482 | &val); | ||
| 1483 | val &= ~(0x7 << 29); /* Reset bits 29 to 31 */ | 1477 | val &= ~(0x7 << 29); /* Reset bits 29 to 31 */ |
| 1484 | qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, | 1478 | qla4_83xx_wr_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, |
| 1485 | (val | (i << 29))); | 1479 | (val | (i << 29))); |
| 1486 | status = qla4_83xx_rd_reg_indirect(ha, | 1480 | qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT1_RXB_TC_STATS, &val); |
| 1487 | QLA83XX_PORT1_RXB_TC_STATS, | ||
| 1488 | &val); | ||
| 1489 | DEBUG2(pr_info("0x%x ", val)); | 1481 | DEBUG2(pr_info("0x%x ", val)); |
| 1490 | } | 1482 | } |
| 1491 | 1483 | ||
| 1492 | DEBUG2(pr_info("\n")); | 1484 | DEBUG2(pr_info("\n")); |
| 1493 | 1485 | ||
| 1494 | status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT2_IFB_PAUSE_THRS, | 1486 | qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT2_IFB_PAUSE_THRS, &val); |
| 1495 | &val); | 1487 | qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT3_IFB_PAUSE_THRS, &val1); |
| 1496 | status = qla4_83xx_rd_reg_indirect(ha, QLA83XX_PORT3_IFB_PAUSE_THRS, | ||
| 1497 | &val1); | ||
| 1498 | 1488 | ||
| 1499 | DEBUG2(ql4_printk(KERN_INFO, ha, | 1489 | DEBUG2(ql4_printk(KERN_INFO, ha, |
| 1500 | "IFB-Pause Thresholds: Port 2:0x%x, Port 3:0x%x\n", | 1490 | "IFB-Pause Thresholds: Port 2:0x%x, Port 3:0x%x\n", |
| @@ -87,23 +87,6 @@ · 86 unmodified lines | |||
| 87 | #define QLA83XX_FW_API 0x356C | 87 | #define QLA83XX_FW_API 0x356C |
| 88 | #define QLA83XX_DRV_OP_MODE 0x3570 | 88 | #define QLA83XX_DRV_OP_MODE 0x3570 |
| 89 | 89 | ||
| 90 | static const uint32_t qla4_83xx_reg_tbl[] = { | ||
| 91 | QLA83XX_PEG_HALT_STATUS1, | ||
| 92 | QLA83XX_PEG_HALT_STATUS2, | ||
| 93 | QLA83XX_PEG_ALIVE_COUNTER, | ||
| 94 | QLA83XX_CRB_DRV_ACTIVE, | ||
| 95 | QLA83XX_CRB_DEV_STATE, | ||
| 96 | QLA83XX_CRB_DRV_STATE, | ||
| 97 | QLA83XX_CRB_DRV_SCRATCH, | ||
| 98 | QLA83XX_CRB_DEV_PART_INFO1, | ||
| 99 | QLA83XX_CRB_IDC_VER_MAJOR, | ||
| 100 | QLA83XX_FW_VER_MAJOR, | ||
| 101 | QLA83XX_FW_VER_MINOR, | ||
| 102 | QLA83XX_FW_VER_SUB, | ||
| 103 | QLA83XX_CMDPEG_STATE, | ||
| 104 | QLA83XX_ASIC_TEMP, | ||
| 105 | }; | ||
| 106 | |||
| 107 | #define QLA83XX_CRB_WIN_BASE 0x3800 | 90 | #define QLA83XX_CRB_WIN_BASE 0x3800 |
| 108 | #define QLA83XX_CRB_WIN_FUNC(f) (QLA83XX_CRB_WIN_BASE+((f)*4)) | 91 | #define QLA83XX_CRB_WIN_FUNC(f) (QLA83XX_CRB_WIN_BASE+((f)*4)) |
| 109 | #define QLA83XX_SEM_LOCK_BASE 0x3840 | 92 | #define QLA83XX_SEM_LOCK_BASE 0x3840 |
| @@ -805,7 +805,7 @@ static int qla4xxx_execute_diag_test(struct bsg_job *bsg_job) · 804 unmodified lines | |||
| 805 | 805 | ||
| 806 | /** | 806 | /** |
| 807 | * qla4xxx_process_vendor_specific - handle vendor specific bsg request | 807 | * qla4xxx_process_vendor_specific - handle vendor specific bsg request |
| 808 | * @job: iscsi_bsg_job to handle | 808 | * @bsg_job: iscsi_bsg_job to handle |
| 809 | **/ | 809 | **/ |
| 810 | int qla4xxx_process_vendor_specific(struct bsg_job *bsg_job) | 810 | int qla4xxx_process_vendor_specific(struct bsg_job *bsg_job) |
| 811 | { | 811 | { |
| @@ -852,7 +852,7 @@ int qla4xxx_process_vendor_specific(struct bsg_job *bsg_job) · 40 unmodified lines | |||
| 852 | 852 | ||
| 853 | /** | 853 | /** |
| 854 | * qla4xxx_bsg_request - handle bsg request from ISCSI transport | 854 | * qla4xxx_bsg_request - handle bsg request from ISCSI transport |
| 855 | * @job: iscsi_bsg_job to handle | 855 | * @bsg_job: iscsi_bsg_job to handle |
| 856 | */ | 856 | */ |
| 857 | int qla4xxx_bsg_request(struct bsg_job *bsg_job) | 857 | int qla4xxx_bsg_request(struct bsg_job *bsg_job) |
| 858 | { | 858 | { |
| @@ -14,7 +14,6 @@ · 13 unmodified lines | |||
| 14 | static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) | 14 | static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) |
| 15 | { | 15 | { |
| 16 | uint32_t value; | 16 | uint32_t value; |
| 17 | uint8_t func_number; | ||
| 18 | unsigned long flags; | 17 | unsigned long flags; |
| 19 | 18 | ||
| 20 | /* Get the function number */ | 19 | /* Get the function number */ |
| @@ -22,7 +21,6 @@ static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) · 1 unmodified line | |||
| 22 | value = readw(&ha->reg->ctrl_status); | 21 | value = readw(&ha->reg->ctrl_status); |
| 23 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 22 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
| 24 | 23 | ||
| 25 | func_number = (uint8_t) ((value >> 4) & 0x30); | ||
| 26 | switch (value & ISP_CONTROL_FN_MASK) { | 24 | switch (value & ISP_CONTROL_FN_MASK) { |
| 27 | case ISP_CONTROL_FN0_SCSI: | 25 | case ISP_CONTROL_FN0_SCSI: |
| 28 | ha->mac_index = 1; | 26 | ha->mac_index = 1; |
| @@ -667,6 +665,9 @@ void qla4xxx_pci_config(struct scsi_qla_host *ha) · 638 unmodified lines | |||
| 667 | 665 | ||
| 668 | pci_set_master(ha->pdev); | 666 | pci_set_master(ha->pdev); |
| 669 | status = pci_set_mwi(ha->pdev); | 667 | status = pci_set_mwi(ha->pdev); |
| 668 | if (status) | ||
| 669 | ql4_printk(KERN_WARNING, ha, "Failed to set MWI\n"); | ||
| 670 | |||
| 670 | /* | 671 | /* |
| 671 | * We want to respect framework's setting of PCI configuration space | 672 | * We want to respect framework's setting of PCI configuration space |
| 672 | * command register and also want to make sure that all bits of | 673 | * command register and also want to make sure that all bits of |
| @@ -945,6 +946,7 @@ void qla4xxx_free_ddb_index(struct scsi_qla_host *ha) · 272 unmodified lines | |||
| 945 | /** | 946 | /** |
| 946 | * qla4xxx_initialize_adapter - initiailizes hba | 947 | * qla4xxx_initialize_adapter - initiailizes hba |
| 947 | * @ha: Pointer to host adapter structure. | 948 | * @ha: Pointer to host adapter structure. |
| 949 | * @is_reset: Is this init path or reset path | ||
| 948 | * | 950 | * |
| 949 | * This routine parforms all of the steps necessary to initialize the adapter. | 951 | * This routine parforms all of the steps necessary to initialize the adapter. |
| 950 | * | 952 | * |
| @@ -1156,9 +1158,10 @@ int qla4xxx_flash_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index, · 205 unmodified lines | |||
| 1156 | 1158 | ||
| 1157 | /** | 1159 | /** |
| 1158 | * qla4xxx_process_ddb_changed - process ddb state change | 1160 | * qla4xxx_process_ddb_changed - process ddb state change |
| 1159 | * @ha - Pointer to host adapter structure. | 1161 | * @ha: Pointer to host adapter structure. |
| 1160 | * @fw_ddb_index - Firmware's device database index | 1162 | * @fw_ddb_index: Firmware's device database index |
| 1161 | * @state - Device state | 1163 | * @state: Device state |
| 1164 | * @conn_err: Unused | ||
| 1162 | * | 1165 | * |
| 1163 | * This routine processes a Decive Database Changed AEN Event. | 1166 | * This routine processes a Decive Database Changed AEN Event. |
| 1164 | **/ | 1167 | **/ |
| @@ -78,7 +78,7 @@ static int qla4xxx_get_req_pkt(struct scsi_qla_host *ha, · 77 unmodified lines | |||
| 78 | * @ha: Pointer to host adapter structure. | 78 | * @ha: Pointer to host adapter structure. |
| 79 | * @ddb_entry: Pointer to device database entry | 79 | * @ddb_entry: Pointer to device database entry |
| 80 | * @lun: SCSI LUN | 80 | * @lun: SCSI LUN |
| 81 | * @marker_type: marker identifier | 81 | * @mrkr_mod: marker identifier |
| 82 | * | 82 | * |
| 83 | * This routine issues a marker IOCB. | 83 | * This routine issues a marker IOCB. |
| 84 | **/ | 84 | **/ |
| @@ -582,7 +582,7 @@ exit_prq_error: · 581 unmodified lines | |||
| 582 | /** | 582 | /** |
| 583 | * qla4_83xx_loopback_in_progress: Is loopback in progress? | 583 | * qla4_83xx_loopback_in_progress: Is loopback in progress? |
| 584 | * @ha: Pointer to host adapter structure. | 584 | * @ha: Pointer to host adapter structure. |
| 585 | * @ret: 1 = loopback in progress, 0 = loopback not in progress | 585 | * returns: 1 = loopback in progress, 0 = loopback not in progress |
| 586 | **/ | 586 | **/ |
| 587 | static int qla4_83xx_loopback_in_progress(struct scsi_qla_host *ha) | 587 | static int qla4_83xx_loopback_in_progress(struct scsi_qla_host *ha) |
| 588 | { | 588 | { |
| @@ -651,7 +651,7 @@ static void qla4xxx_default_router_changed(struct scsi_qla_host *ha, · 62 unmodified lines | |||
| 651 | /** | 651 | /** |
| 652 | * qla4xxx_isr_decode_mailbox - decodes mailbox status | 652 | * qla4xxx_isr_decode_mailbox - decodes mailbox status |
| 653 | * @ha: Pointer to host adapter structure. | 653 | * @ha: Pointer to host adapter structure. |
| 654 | * @mailbox_status: Mailbox status. | 654 | * @mbox_status: Mailbox status. |
| 655 | * | 655 | * |
| 656 | * This routine decodes the mailbox status during the ISR. | 656 | * This routine decodes the mailbox status during the ISR. |
| 657 | * Hardware_lock locked upon entry. runs in interrupt context. | 657 | * Hardware_lock locked upon entry. runs in interrupt context. |
| @@ -1044,6 +1044,7 @@ void qla4_83xx_interrupt_service_routine(struct scsi_qla_host *ha, · 386 unmodified lines | |||
| 1044 | /** | 1044 | /** |
| 1045 | * qla4_82xx_interrupt_service_routine - isr | 1045 | * qla4_82xx_interrupt_service_routine - isr |
| 1046 | * @ha: pointer to host adapter structure. | 1046 | * @ha: pointer to host adapter structure. |
| 1047 | * @intr_status: Local interrupt status/type. | ||
| 1047 | * | 1048 | * |
| 1048 | * This is the main interrupt service routine. | 1049 | * This is the main interrupt service routine. |
| 1049 | * hardware_lock locked upon entry. runs in interrupt context. | 1050 | * hardware_lock locked upon entry. runs in interrupt context. |
| @@ -1069,6 +1070,7 @@ void qla4_82xx_interrupt_service_routine(struct scsi_qla_host *ha, · 19 unmodified lines | |||
| 1069 | /** | 1070 | /** |
| 1070 | * qla4xxx_interrupt_service_routine - isr | 1071 | * qla4xxx_interrupt_service_routine - isr |
| 1071 | * @ha: pointer to host adapter structure. | 1072 | * @ha: pointer to host adapter structure. |
| 1073 | * @intr_status: Local interrupt status/type. | ||
| 1072 | * | 1074 | * |
| 1073 | * This is the main interrupt service routine. | 1075 | * This is the main interrupt service routine. |
| 1074 | * hardware_lock locked upon entry. runs in interrupt context. | 1076 | * hardware_lock locked upon entry. runs in interrupt context. |
| @@ -47,7 +47,7 @@ void qla4xxx_process_mbox_intr(struct scsi_qla_host *ha, int out_count) · 46 unmodified lines | |||
| 47 | /** | 47 | /** |
| 48 | * qla4xxx_is_intr_poll_mode – Are we allowed to poll for interrupts? | 48 | * qla4xxx_is_intr_poll_mode – Are we allowed to poll for interrupts? |
| 49 | * @ha: Pointer to host adapter structure. | 49 | * @ha: Pointer to host adapter structure. |
| 50 | * @ret: 1=polling mode, 0=non-polling mode | 50 | * returns: 1=polling mode, 0=non-polling mode |
| 51 | **/ | 51 | **/ |
| 52 | static int qla4xxx_is_intr_poll_mode(struct scsi_qla_host *ha) | 52 | static int qla4xxx_is_intr_poll_mode(struct scsi_qla_host *ha) |
| 53 | { | 53 | { |
| @@ -810,7 +810,7 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha) · 756 unmodified lines | |||
| 810 | return QLA_SUCCESS; | 810 | return QLA_SUCCESS; |
| 811 | } | 811 | } |
| 812 | 812 | ||
| 813 | /** | 813 | /* |
| 814 | * qla4xxx_get_fwddb_entry - retrieves firmware ddb entry | 814 | * qla4xxx_get_fwddb_entry - retrieves firmware ddb entry |
| 815 | * @ha: Pointer to host adapter structure. | 815 | * @ha: Pointer to host adapter structure. |
| 816 | * @fw_ddb_index: Firmware's device database index | 816 | * @fw_ddb_index: Firmware's device database index |
| @@ -1259,8 +1259,7 @@ int qla4xxx_reset_lun(struct scsi_qla_host * ha, struct ddb_entry * ddb_entry, · 442 unmodified lines | |||
| 1259 | /** | 1259 | /** |
| 1260 | * qla4xxx_reset_target - issues target Reset | 1260 | * qla4xxx_reset_target - issues target Reset |
| 1261 | * @ha: Pointer to host adapter structure. | 1261 | * @ha: Pointer to host adapter structure. |
| 1262 | * @db_entry: Pointer to device database entry | 1262 | * @ddb_entry: Pointer to device database entry |
| 1263 | * @un_entry: Pointer to lun entry structure | ||
| 1264 | * | 1263 | * |
| 1265 | * This routine performs a TARGET RESET on the specified target. | 1264 | * This routine performs a TARGET RESET on the specified target. |
| 1266 | * The caller must ensure that the ddb_entry pointers | 1265 | * The caller must ensure that the ddb_entry pointers |
| @@ -974,10 +974,10 @@ qla4_82xx_rom_fast_read(struct scsi_qla_host *ha, int addr, int *valp) · 973 unmodified lines | |||
| 974 | return ret; | 974 | return ret; |
| 975 | } | 975 | } |
| 976 | 976 | ||
| 977 | /** | 977 | /* |
| 978 | * This routine does CRB initialize sequence | 978 | * This routine does CRB initialize sequence |
| 979 | * to put the ISP into operational state | 979 | * to put the ISP into operational state |
| 980 | **/ | 980 | */ |
| 981 | static int | 981 | static int |
| 982 | qla4_82xx_pinit_from_rom(struct scsi_qla_host *ha, int verbose) | 982 | qla4_82xx_pinit_from_rom(struct scsi_qla_host *ha, int verbose) |
| 983 | { | 983 | { |
| @@ -2645,7 +2645,7 @@ static uint32_t qla4_84xx_minidump_process_rddfe(struct scsi_qla_host *ha, · 1661 unmodified lines | |||
| 2645 | uint32_t addr1, addr2, value, data, temp, wrval; | 2645 | uint32_t addr1, addr2, value, data, temp, wrval; |
| 2646 | uint8_t stride, stride2; | 2646 | uint8_t stride, stride2; |
| 2647 | uint16_t count; | 2647 | uint16_t count; |
| 2648 | uint32_t poll, mask, data_size, modify_mask; | 2648 | uint32_t poll, mask, modify_mask; |
| 2649 | uint32_t wait_count = 0; | 2649 | uint32_t wait_count = 0; |
| 2650 | uint32_t *data_ptr = *d_ptr; | 2650 | uint32_t *data_ptr = *d_ptr; |
| 2651 | struct qla8044_minidump_entry_rddfe *rddfe; | 2651 | struct qla8044_minidump_entry_rddfe *rddfe; |
| @@ -2661,7 +2661,6 @@ static uint32_t qla4_84xx_minidump_process_rddfe(struct scsi_qla_host *ha, · 9 unmodified lines | |||
| 2661 | poll = le32_to_cpu(rddfe->poll); | 2661 | poll = le32_to_cpu(rddfe->poll); |
| 2662 | mask = le32_to_cpu(rddfe->mask); | 2662 | mask = le32_to_cpu(rddfe->mask); |
| 2663 | modify_mask = le32_to_cpu(rddfe->modify_mask); | 2663 | modify_mask = le32_to_cpu(rddfe->modify_mask); |
| 2664 | data_size = le32_to_cpu(rddfe->data_size); | ||
| 2665 | 2664 | ||
| 2666 | addr2 = addr1 + stride; | 2665 | addr2 = addr1 + stride; |
| 2667 | 2666 | ||
| @@ -2742,7 +2741,7 @@ static uint32_t qla4_84xx_minidump_process_rdmdio(struct scsi_qla_host *ha, · 74 unmodified lines | |||
| 2742 | uint8_t stride1, stride2; | 2741 | uint8_t stride1, stride2; |
| 2743 | uint32_t addr3, addr4, addr5, addr6, addr7; | 2742 | uint32_t addr3, addr4, addr5, addr6, addr7; |
| 2744 | uint16_t count, loop_cnt; | 2743 | uint16_t count, loop_cnt; |
| 2745 | uint32_t poll, mask; | 2744 | uint32_t mask; |
| 2746 | uint32_t *data_ptr = *d_ptr; | 2745 | uint32_t *data_ptr = *d_ptr; |
| 2747 | struct qla8044_minidump_entry_rdmdio *rdmdio; | 2746 | struct qla8044_minidump_entry_rdmdio *rdmdio; |
| 2748 | 2747 | ||
| @@ -2754,7 +2753,6 @@ static uint32_t qla4_84xx_minidump_process_rdmdio(struct scsi_qla_host *ha, · 5 unmodified lines | |||
| 2754 | stride2 = le32_to_cpu(rdmdio->stride_2); | 2753 | stride2 = le32_to_cpu(rdmdio->stride_2); |
| 2755 | count = le32_to_cpu(rdmdio->count); | 2754 | count = le32_to_cpu(rdmdio->count); |
| 2756 | 2755 | ||
| 2757 | poll = le32_to_cpu(rdmdio->poll); | ||
| 2758 | mask = le32_to_cpu(rdmdio->mask); | 2756 | mask = le32_to_cpu(rdmdio->mask); |
| 2759 | value2 = le32_to_cpu(rdmdio->value_2); | 2757 | value2 = le32_to_cpu(rdmdio->value_2); |
| 2760 | 2758 | ||
| @@ -2813,7 +2811,7 @@ static uint32_t qla4_84xx_minidump_process_pollwr(struct scsi_qla_host *ha, · 52 unmodified lines | |||
| 2813 | struct qla8xxx_minidump_entry_hdr *entry_hdr, | 2811 | struct qla8xxx_minidump_entry_hdr *entry_hdr, |
| 2814 | uint32_t **d_ptr) | 2812 | uint32_t **d_ptr) |
| 2815 | { | 2813 | { |
| 2816 | uint32_t addr1, addr2, value1, value2, poll, mask, r_value; | 2814 | uint32_t addr1, addr2, value1, value2, poll, r_value; |
| 2817 | struct qla8044_minidump_entry_pollwr *pollwr_hdr; | 2815 | struct qla8044_minidump_entry_pollwr *pollwr_hdr; |
| 2818 | uint32_t wait_count = 0; | 2816 | uint32_t wait_count = 0; |
| 2819 | uint32_t rval = QLA_SUCCESS; | 2817 | uint32_t rval = QLA_SUCCESS; |
| @@ -2825,7 +2823,6 @@ static uint32_t qla4_84xx_minidump_process_pollwr(struct scsi_qla_host *ha, · 5 unmodified lines | |||
| 2825 | value2 = le32_to_cpu(pollwr_hdr->value_2); | 2823 | value2 = le32_to_cpu(pollwr_hdr->value_2); |
| 2826 | 2824 | ||
| 2827 | poll = le32_to_cpu(pollwr_hdr->poll); | 2825 | poll = le32_to_cpu(pollwr_hdr->poll); |
| 2828 | mask = le32_to_cpu(pollwr_hdr->mask); | ||
| 2829 | 2826 | ||
| 2830 | while (wait_count < poll) { | 2827 | while (wait_count < poll) { |
| 2831 | ha->isp_ops->rd_reg_indirect(ha, addr1, &r_value); | 2828 | ha->isp_ops->rd_reg_indirect(ha, addr1, &r_value); |
| @@ -3220,6 +3217,7 @@ md_failed: · 388 unmodified lines | |||
| 3220 | /** | 3217 | /** |
| 3221 | * qla4_8xxx_uevent_emit - Send uevent when the firmware dump is ready. | 3218 | * qla4_8xxx_uevent_emit - Send uevent when the firmware dump is ready. |
| 3222 | * @ha: pointer to adapter structure | 3219 | * @ha: pointer to adapter structure |
| 3220 | * @code: uevent code to act upon | ||
| 3223 | **/ | 3221 | **/ |
| 3224 | static void qla4_8xxx_uevent_emit(struct scsi_qla_host *ha, u32 code) | 3222 | static void qla4_8xxx_uevent_emit(struct scsi_qla_host *ha, u32 code) |
| 3225 | { | 3223 | { |
| @@ -3688,9 +3686,9 @@ done_read: · 462 unmodified lines | |||
| 3688 | return dwptr; | 3686 | return dwptr; |
| 3689 | } | 3687 | } |
| 3690 | 3688 | ||
| 3691 | /** | 3689 | /* |
| 3692 | * Address and length are byte address | 3690 | * Address and length are byte address |
| 3693 | **/ | 3691 | */ |
| 3694 | static uint8_t * | 3692 | static uint8_t * |
| 3695 | qla4_82xx_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, | 3693 | qla4_82xx_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, |
| 3696 | uint32_t offset, uint32_t length) | 3694 | uint32_t offset, uint32_t length) |
| @@ -599,23 +599,6 @@ enum qla_regs { · 598 unmodified lines | |||
| 599 | QLA8XXX_CRB_TEMP_STATE, | 599 | QLA8XXX_CRB_TEMP_STATE, |
| 600 | }; | 600 | }; |
| 601 | 601 | ||
| 602 | static const uint32_t qla4_82xx_reg_tbl[] = { | ||
| 603 | QLA82XX_PEG_HALT_STATUS1, | ||
| 604 | QLA82XX_PEG_HALT_STATUS2, | ||
| 605 | QLA82XX_PEG_ALIVE_COUNTER, | ||
| 606 | QLA82XX_CRB_DRV_ACTIVE, | ||
| 607 | QLA82XX_CRB_DEV_STATE, | ||
| 608 | QLA82XX_CRB_DRV_STATE, | ||
| 609 | QLA82XX_CRB_DRV_SCRATCH, | ||
| 610 | QLA82XX_CRB_DEV_PART_INFO, | ||
| 611 | QLA82XX_CRB_DRV_IDC_VERSION, | ||
| 612 | QLA82XX_FW_VERSION_MAJOR, | ||
| 613 | QLA82XX_FW_VERSION_MINOR, | ||
| 614 | QLA82XX_FW_VERSION_SUB, | ||
| 615 | CRB_CMDPEG_STATE, | ||
| 616 | CRB_TEMP_STATE, | ||
| 617 | }; | ||
| 618 | |||
| 619 | /* Every driver should use these Device State */ | 602 | /* Every driver should use these Device State */ |
| 620 | #define QLA8XXX_DEV_COLD 1 | 603 | #define QLA8XXX_DEV_COLD 1 |
| 621 | #define QLA8XXX_DEV_INITIALIZING 2 | 604 | #define QLA8XXX_DEV_INITIALIZING 2 |
| @@ -188,6 +188,40 @@ static int qla4xxx_sysfs_ddb_logout_sid(struct iscsi_cls_session *cls_sess); · 187 unmodified lines | |||
| 188 | static struct qla4_8xxx_legacy_intr_set legacy_intr[] = | 188 | static struct qla4_8xxx_legacy_intr_set legacy_intr[] = |
| 189 | QLA82XX_LEGACY_INTR_CONFIG; | 189 | QLA82XX_LEGACY_INTR_CONFIG; |
| 190 | 190 | ||
| 191 | static const uint32_t qla4_82xx_reg_tbl[] = { | ||
| 192 | QLA82XX_PEG_HALT_STATUS1, | ||
| 193 | QLA82XX_PEG_HALT_STATUS2, | ||
| 194 | QLA82XX_PEG_ALIVE_COUNTER, | ||
| 195 | QLA82XX_CRB_DRV_ACTIVE, | ||
| 196 | QLA82XX_CRB_DEV_STATE, | ||
| 197 | QLA82XX_CRB_DRV_STATE, | ||
| 198 | QLA82XX_CRB_DRV_SCRATCH, | ||
| 199 | QLA82XX_CRB_DEV_PART_INFO, | ||
| 200 | QLA82XX_CRB_DRV_IDC_VERSION, | ||
| 201 | QLA82XX_FW_VERSION_MAJOR, | ||
| 202 | QLA82XX_FW_VERSION_MINOR, | ||
| 203 | QLA82XX_FW_VERSION_SUB, | ||
| 204 | CRB_CMDPEG_STATE, | ||
| 205 | CRB_TEMP_STATE, | ||
| 206 | }; | ||
| 207 | |||
| 208 | static const uint32_t qla4_83xx_reg_tbl[] = { | ||
| 209 | QLA83XX_PEG_HALT_STATUS1, | ||
| 210 | QLA83XX_PEG_HALT_STATUS2, | ||
| 211 | QLA83XX_PEG_ALIVE_COUNTER, | ||
| 212 | QLA83XX_CRB_DRV_ACTIVE, | ||
| 213 | QLA83XX_CRB_DEV_STATE, | ||
| 214 | QLA83XX_CRB_DRV_STATE, | ||
| 215 | QLA83XX_CRB_DRV_SCRATCH, | ||
| 216 | QLA83XX_CRB_DEV_PART_INFO1, | ||
| 217 | QLA83XX_CRB_IDC_VER_MAJOR, | ||
| 218 | QLA83XX_FW_VER_MAJOR, | ||
| 219 | QLA83XX_FW_VER_MINOR, | ||
| 220 | QLA83XX_FW_VER_SUB, | ||
| 221 | QLA83XX_CMDPEG_STATE, | ||
| 222 | QLA83XX_ASIC_TEMP, | ||
| 223 | }; | ||
| 224 | |||
| 191 | static struct scsi_host_template qla4xxx_driver_template = { | 225 | static struct scsi_host_template qla4xxx_driver_template = { |
| 192 | .module = THIS_MODULE, | 226 | .module = THIS_MODULE, |
| 193 | .name = DRIVER_NAME, | 227 | .name = DRIVER_NAME, |
| @@ -1845,12 +1879,10 @@ exit_get_stats: · 1651 unmodified lines | |||
| 1845 | static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc) | 1879 | static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc) |
| 1846 | { | 1880 | { |
| 1847 | struct iscsi_cls_session *session; | 1881 | struct iscsi_cls_session *session; |
| 1848 | struct iscsi_session *sess; | ||
| 1849 | unsigned long flags; | 1882 | unsigned long flags; |
| 1850 | enum blk_eh_timer_return ret = BLK_EH_DONE; | 1883 | enum blk_eh_timer_return ret = BLK_EH_DONE; |
| 1851 | 1884 | ||
| 1852 | session = starget_to_session(scsi_target(sc->device)); | 1885 | session = starget_to_session(scsi_target(sc->device)); |
| 1853 | sess = session->dd_data; | ||
| 1854 | 1886 | ||
| 1855 | spin_lock_irqsave(&session->lock, flags); | 1887 | spin_lock_irqsave(&session->lock, flags); |
| 1856 | if (session->state == ISCSI_SESSION_FAILED) | 1888 | if (session->state == ISCSI_SESSION_FAILED) |
| @@ -3059,7 +3091,6 @@ qla4xxx_session_create(struct iscsi_endpoint *ep, · 1202 unmodified lines | |||
| 3059 | struct ddb_entry *ddb_entry; | 3091 | struct ddb_entry *ddb_entry; |
| 3060 | uint16_t ddb_index; | 3092 | uint16_t ddb_index; |
| 3061 | struct iscsi_session *sess; | 3093 | struct iscsi_session *sess; |
| 3062 | struct sockaddr *dst_addr; | ||
| 3063 | int ret; | 3094 | int ret; |
| 3064 | 3095 | ||
| 3065 | if (!ep) { | 3096 | if (!ep) { |
| @@ -3068,7 +3099,6 @@ qla4xxx_session_create(struct iscsi_endpoint *ep, · 2 unmodified lines | |||
| 3068 | } | 3099 | } |
| 3069 | 3100 | ||
| 3070 | qla_ep = ep->dd_data; | 3101 | qla_ep = ep->dd_data; |
| 3071 | dst_addr = (struct sockaddr *)&qla_ep->dst_addr; | ||
| 3072 | ha = to_qla_host(qla_ep->host); | 3102 | ha = to_qla_host(qla_ep->host); |
| 3073 | DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, | 3103 | DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__, |
| 3074 | ha->host_no)); | 3104 | ha->host_no)); |
| @@ -4515,7 +4545,7 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess) · 1440 unmodified lines | |||
| 4515 | 4545 | ||
| 4516 | /** | 4546 | /** |
| 4517 | * qla4xxx_timer - checks every second for work to do. | 4547 | * qla4xxx_timer - checks every second for work to do. |
| 4518 | * @ha: Pointer to host adapter structure. | 4548 | * @t: Context to obtain pointer to host adapter structure. |
| 4519 | **/ | 4549 | **/ |
| 4520 | static void qla4xxx_timer(struct timer_list *t) | 4550 | static void qla4xxx_timer(struct timer_list *t) |
| 4521 | { | 4551 | { |
| @@ -5269,7 +5299,7 @@ static void qla4xxx_do_work(struct scsi_qla_host *ha) · 747 unmodified lines | |||
| 5269 | 5299 | ||
| 5270 | /** | 5300 | /** |
| 5271 | * qla4xxx_do_dpc - dpc routine | 5301 | * qla4xxx_do_dpc - dpc routine |
| 5272 | * @data: in our case pointer to adapter structure | 5302 | * @work: Context to obtain pointer to host adapter structure. |
| 5273 | * | 5303 | * |
| 5274 | * This routine is a task that is schedule by the interrupt handler | 5304 | * This routine is a task that is schedule by the interrupt handler |
| 5275 | * to perform the background processing for interrupts. We put it | 5305 | * to perform the background processing for interrupts. We put it |
| @@ -5492,7 +5522,7 @@ static void qla4xxx_free_adapter(struct scsi_qla_host *ha) · 216 unmodified lines | |||
| 5492 | int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) | 5522 | int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) |
| 5493 | { | 5523 | { |
| 5494 | int status = 0; | 5524 | int status = 0; |
| 5495 | unsigned long mem_base, mem_len, db_base, db_len; | 5525 | unsigned long mem_base, mem_len; |
| 5496 | struct pci_dev *pdev = ha->pdev; | 5526 | struct pci_dev *pdev = ha->pdev; |
| 5497 | 5527 | ||
| 5498 | status = pci_request_regions(pdev, DRIVER_NAME); | 5528 | status = pci_request_regions(pdev, DRIVER_NAME); |
| @@ -5536,9 +5566,6 @@ int qla4_8xxx_iospace_config(struct scsi_qla_host *ha) · 37 unmodified lines | |||
| 5536 | ((uint8_t *)ha->nx_pcibase); | 5566 | ((uint8_t *)ha->nx_pcibase); |
| 5537 | } | 5567 | } |
| 5538 | 5568 | ||
| 5539 | db_base = pci_resource_start(pdev, 4); /* doorbell is on bar 4 */ | ||
| 5540 | db_len = pci_resource_len(pdev, 4); | ||
| 5541 | |||
| 5542 | return 0; | 5569 | return 0; |
| 5543 | iospace_error_exit: | 5570 | iospace_error_exit: |
| 5544 | return -ENOMEM; | 5571 | return -ENOMEM; |
| @@ -6249,14 +6276,12 @@ kset_free: · 704 unmodified lines | |||
| 6249 | static void qla4xxx_get_param_ddb(struct ddb_entry *ddb_entry, | 6276 | static void qla4xxx_get_param_ddb(struct ddb_entry *ddb_entry, |
| 6250 | struct ql4_tuple_ddb *tddb) | 6277 | struct ql4_tuple_ddb *tddb) |
| 6251 | { | 6278 | { |
| 6252 | struct scsi_qla_host *ha; | ||
| 6253 | struct iscsi_cls_session *cls_sess; | 6279 | struct iscsi_cls_session *cls_sess; |
| 6254 | struct iscsi_cls_conn *cls_conn; | 6280 | struct iscsi_cls_conn *cls_conn; |
| 6255 | struct iscsi_session *sess; | 6281 | struct iscsi_session *sess; |
| 6256 | struct iscsi_conn *conn; | 6282 | struct iscsi_conn *conn; |
| 6257 | 6283 | ||
| 6258 | DEBUG2(printk(KERN_INFO "Func: %s\n", __func__)); | 6284 | DEBUG2(printk(KERN_INFO "Func: %s\n", __func__)); |
| 6259 | ha = ddb_entry->ha; | ||
| 6260 | cls_sess = ddb_entry->sess; | 6285 | cls_sess = ddb_entry->sess; |
| 6261 | sess = cls_sess->dd_data; | 6286 | sess = cls_sess->dd_data; |
| 6262 | cls_conn = ddb_entry->conn; | 6287 | cls_conn = ddb_entry->conn; |
| @@ -8591,7 +8616,7 @@ exit_login_resp: · 2328 unmodified lines | |||
| 8591 | /** | 8616 | /** |
| 8592 | * qla4xxx_probe_adapter - callback function to probe HBA | 8617 | * qla4xxx_probe_adapter - callback function to probe HBA |
| 8593 | * @pdev: pointer to pci_dev structure | 8618 | * @pdev: pointer to pci_dev structure |
| 8594 | * @pci_device_id: pointer to pci_device entry | 8619 | * @ent: pointer to pci_device entry |
| 8595 | * | 8620 | * |
| 8596 | * This routine will probe for Qlogic 4xxx iSCSI host adapters. | 8621 | * This routine will probe for Qlogic 4xxx iSCSI host adapters. |
| 8597 | * It returns zero if successful. It also initializes all data necessary for | 8622 | * It returns zero if successful. It also initializes all data necessary for |
| @@ -8977,7 +9002,7 @@ static void qla4xxx_destroy_fw_ddb_session(struct scsi_qla_host *ha) · 379 unmodified lines | |||
| 8977 | } | 9002 | } |
| 8978 | /** | 9003 | /** |
| 8979 | * qla4xxx_remove_adapter - callback function to remove adapter. | 9004 | * qla4xxx_remove_adapter - callback function to remove adapter. |
| 8980 | * @pci_dev: PCI device pointer | 9005 | * @pdev: PCI device pointer |
| 8981 | **/ | 9006 | **/ |
| 8982 | static void qla4xxx_remove_adapter(struct pci_dev *pdev) | 9007 | static void qla4xxx_remove_adapter(struct pci_dev *pdev) |
| 8983 | { | 9008 | { |
| @@ -9144,8 +9169,8 @@ static int qla4xxx_wait_for_hba_online(struct scsi_qla_host *ha) · 160 unmodified lines | |||
| 9144 | /** | 9169 | /** |
| 9145 | * qla4xxx_eh_wait_for_commands - wait for active cmds to finish. | 9170 | * qla4xxx_eh_wait_for_commands - wait for active cmds to finish. |
| 9146 | * @ha: pointer to HBA | 9171 | * @ha: pointer to HBA |
| 9147 | * @t: target id | 9172 | * @stgt: pointer to SCSI target |
| 9148 | * @l: lun id | 9173 | * @sdev: pointer to SCSI device |
| 9149 | * | 9174 | * |
| 9150 | * This function waits for all outstanding commands to a lun to complete. It | 9175 | * This function waits for all outstanding commands to a lun to complete. It |
| 9151 | * returns 0 if all pending commands are returned and 1 otherwise. | 9176 | * returns 0 if all pending commands are returned and 1 otherwise. |
| @@ -9615,6 +9640,7 @@ qla4xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state) · 463 unmodified lines | |||
| 9615 | * qla4xxx_pci_mmio_enabled() gets called if | 9640 | * qla4xxx_pci_mmio_enabled() gets called if |
| 9616 | * qla4xxx_pci_error_detected() returns PCI_ERS_RESULT_CAN_RECOVER | 9641 | * qla4xxx_pci_error_detected() returns PCI_ERS_RESULT_CAN_RECOVER |
| 9617 | * and read/write to the device still works. | 9642 | * and read/write to the device still works. |
| 9643 | * @pdev: PCI device pointer | ||
| 9618 | **/ | 9644 | **/ |
| 9619 | static pci_ers_result_t | 9645 | static pci_ers_result_t |
| 9620 | qla4xxx_pci_mmio_enabled(struct pci_dev *pdev) | 9646 | qla4xxx_pci_mmio_enabled(struct pci_dev *pdev) |
| @@ -754,9 +754,6 @@ static int __init init_scsi(void) · 753 unmodified lines | |||
| 754 | { | 754 | { |
| 755 | int error; | 755 | int error; |
| 756 | 756 | ||
| 757 | error = scsi_init_queue(); | ||
| 758 | if (error) | ||
| 759 | return error; | ||
| 760 | error = scsi_init_procfs(); | 757 | error = scsi_init_procfs(); |
| 761 | if (error) | 758 | if (error) |
| 762 | goto cleanup_queue; | 759 | goto cleanup_queue; |
| @@ -9,7 +9,7 @@ · 8 unmodified lines | |||
| 9 | * | 9 | * |
| 10 | * Copyright (C) 2001 - 2020 Douglas Gilbert | 10 | * Copyright (C) 2001 - 2020 Douglas Gilbert |
| 11 | * | 11 | * |
| 12 | * For documentation see http://sg.danny.cz/sg/sdebug26.html | 12 | * For documentation see http://sg.danny.cz/sg/scsi_debug.html |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | 15 | ||
| @@ -60,8 +60,8 @@ · 44 unmodified lines | |||
| 60 | #include "scsi_logging.h" | 60 | #include "scsi_logging.h" |
| 61 | 61 | ||
| 62 | /* make sure inq_product_rev string corresponds to this version */ | 62 | /* make sure inq_product_rev string corresponds to this version */ |
| 63 | #define SDEBUG_VERSION "0189" /* format to fit INQUIRY revision field */ | 63 | #define SDEBUG_VERSION "0190" /* format to fit INQUIRY revision field */ |
| 64 | static const char *sdebug_version_date = "20200421"; | 64 | static const char *sdebug_version_date = "20200710"; |
| 65 | 65 | ||
| 66 | #define MY_NAME "scsi_debug" | 66 | #define MY_NAME "scsi_debug" |
| 67 | 67 | ||
| @@ -151,6 +151,7 @@ static const char *sdebug_version_date = "20200421"; · 83 unmodified lines | |||
| 151 | #define DEF_STRICT 0 | 151 | #define DEF_STRICT 0 |
| 152 | #define DEF_STATISTICS false | 152 | #define DEF_STATISTICS false |
| 153 | #define DEF_SUBMIT_QUEUES 1 | 153 | #define DEF_SUBMIT_QUEUES 1 |
| 154 | #define DEF_TUR_MS_TO_READY 0 | ||
| 154 | #define DEF_UUID_CTL 0 | 155 | #define DEF_UUID_CTL 0 |
| 155 | #define JDELAY_OVERRIDDEN -9999 | 156 | #define JDELAY_OVERRIDDEN -9999 |
| 156 | 157 | ||
| @@ -187,21 +188,8 @@ static const char *sdebug_version_date = "20200421"; · 30 unmodified lines | |||
| 187 | SDEBUG_OPT_SHORT_TRANSFER | \ | 188 | SDEBUG_OPT_SHORT_TRANSFER | \ |
| 188 | SDEBUG_OPT_HOST_BUSY | \ | 189 | SDEBUG_OPT_HOST_BUSY | \ |
| 189 | SDEBUG_OPT_CMD_ABORT) | 190 | SDEBUG_OPT_CMD_ABORT) |
| 190 | /* When "every_nth" > 0 then modulo "every_nth" commands: | 191 | #define SDEBUG_OPT_RECOV_DIF_DIX (SDEBUG_OPT_RECOVERED_ERR | \ |
| 191 | * - a missing response is simulated if SDEBUG_OPT_TIMEOUT is set | 192 | SDEBUG_OPT_DIF_ERR | SDEBUG_OPT_DIX_ERR) |
| 192 | * - a RECOVERED_ERROR is simulated on successful read and write | ||
| 193 | * commands if SDEBUG_OPT_RECOVERED_ERR is set. | ||
| 194 | * - a TRANSPORT_ERROR is simulated on successful read and write | ||
| 195 | * commands if SDEBUG_OPT_TRANSPORT_ERR is set. | ||
| 196 | * - similarly for DIF_ERR, DIX_ERR, SHORT_TRANSFER, HOST_BUSY and | ||
| 197 | * CMD_ABORT | ||
| 198 | * | ||
| 199 | * When "every_nth" < 0 then after "- every_nth" commands the selected | ||
| 200 | * error will be injected. The error will be injected on every subsequent | ||
| 201 | * command until some other action occurs; for example, the user writing | ||
| 202 | * a new value (other than -1 or 1) to every_nth: | ||
| 203 | * echo 0 > /sys/bus/pseudo/drivers/scsi_debug/every_nth | ||
| 204 | */ | ||
| 205 | 193 | ||
| 206 | /* As indicated in SAM-5 and SPC-4 Unit Attentions (UAs) are returned in | 194 | /* As indicated in SAM-5 and SPC-4 Unit Attentions (UAs) are returned in |
| 207 | * priority order. In the subset implemented here lower numbers have higher | 195 | * priority order. In the subset implemented here lower numbers have higher |
| @@ -301,7 +289,7 @@ struct sdebug_dev_info { · 93 unmodified lines | |||
| 301 | struct sdebug_host_info *sdbg_host; | 289 | struct sdebug_host_info *sdbg_host; |
| 302 | unsigned long uas_bm[1]; | 290 | unsigned long uas_bm[1]; |
| 303 | atomic_t num_in_q; | 291 | atomic_t num_in_q; |
| 304 | atomic_t stopped; | 292 | atomic_t stopped; /* 1: by SSU, 2: device start */ |
| 305 | bool used; | 293 | bool used; |
| 306 | 294 | ||
| 307 | /* For ZBC devices */ | 295 | /* For ZBC devices */ |
| @@ -314,6 +302,7 @@ struct sdebug_dev_info { · 6 unmodified lines | |||
| 314 | unsigned int nr_exp_open; | 302 | unsigned int nr_exp_open; |
| 315 | unsigned int nr_closed; | 303 | unsigned int nr_closed; |
| 316 | unsigned int max_open; | 304 | unsigned int max_open; |
| 305 | ktime_t create_ts; /* time since bootup that this device was created */ | ||
| 317 | struct sdeb_zone_state *zstate; | 306 | struct sdeb_zone_state *zstate; |
| 318 | }; | 307 | }; |
| 319 | 308 | ||
| @@ -344,6 +333,7 @@ struct sdebug_defer { · 24 unmodified lines | |||
| 344 | struct execute_work ew; | 333 | struct execute_work ew; |
| 345 | int sqa_idx; /* index of sdebug_queue array */ | 334 | int sqa_idx; /* index of sdebug_queue array */ |
| 346 | int qc_idx; /* index of sdebug_queued_cmd array within sqa_idx */ | 335 | int qc_idx; /* index of sdebug_queued_cmd array within sqa_idx */ |
| 336 | int hc_idx; /* hostwide tag index */ | ||
| 347 | int issuing_cpu; | 337 | int issuing_cpu; |
| 348 | bool init_hrt; | 338 | bool init_hrt; |
| 349 | bool init_wq; | 339 | bool init_wq; |
| @@ -357,13 +347,6 @@ struct sdebug_queued_cmd { · 7 unmodified lines | |||
| 357 | */ | 347 | */ |
| 358 | struct sdebug_defer *sd_dp; | 348 | struct sdebug_defer *sd_dp; |
| 359 | struct scsi_cmnd *a_cmnd; | 349 | struct scsi_cmnd *a_cmnd; |
| 360 | unsigned int inj_recovered:1; | ||
| 361 | unsigned int inj_transport:1; | ||
| 362 | unsigned int inj_dif:1; | ||
| 363 | unsigned int inj_dix:1; | ||
| 364 | unsigned int inj_short:1; | ||
| 365 | unsigned int inj_host_busy:1; | ||
| 366 | unsigned int inj_cmd_abort:1; | ||
| 367 | }; | 350 | }; |
| 368 | 351 | ||
| 369 | struct sdebug_queue { | 352 | struct sdebug_queue { |
| @@ -377,6 +360,7 @@ static atomic_t sdebug_cmnd_count; /* number of incoming commands */ · 7 unmodified lines | |||
| 377 | static atomic_t sdebug_completions; /* count of deferred completions */ | 360 | static atomic_t sdebug_completions; /* count of deferred completions */ |
| 378 | static atomic_t sdebug_miss_cpus; /* submission + completion cpus differ */ | 361 | static atomic_t sdebug_miss_cpus; /* submission + completion cpus differ */ |
| 379 | static atomic_t sdebug_a_tsf; /* 'almost task set full' counter */ | 362 | static atomic_t sdebug_a_tsf; /* 'almost task set full' counter */ |
| 363 | static atomic_t sdeb_inject_pending; | ||
| 380 | 364 | ||
| 381 | struct opcode_info_t { | 365 | struct opcode_info_t { |
| 382 | u8 num_attached; /* 0 if this is it (i.e. a leaf); use 0xff */ | 366 | u8 num_attached; /* 0 if this is it (i.e. a leaf); use 0xff */ |
| @@ -759,6 +743,7 @@ static int sdebug_dsense = DEF_D_SENSE; · 376 unmodified lines | |||
| 759 | static int sdebug_every_nth = DEF_EVERY_NTH; | 743 | static int sdebug_every_nth = DEF_EVERY_NTH; |
| 760 | static int sdebug_fake_rw = DEF_FAKE_RW; | 744 | static int sdebug_fake_rw = DEF_FAKE_RW; |
| 761 | static unsigned int sdebug_guard = DEF_GUARD; | 745 | static unsigned int sdebug_guard = DEF_GUARD; |
| 746 | static int sdebug_host_max_queue; /* per host */ | ||
| 762 | static int sdebug_lowest_aligned = DEF_LOWEST_ALIGNED; | 747 | static int sdebug_lowest_aligned = DEF_LOWEST_ALIGNED; |
| 763 | static int sdebug_max_luns = DEF_MAX_LUNS; | 748 | static int sdebug_max_luns = DEF_MAX_LUNS; |
| 764 | static int sdebug_max_queue = SDEBUG_CANQUEUE; /* per submit queue */ | 749 | static int sdebug_max_queue = SDEBUG_CANQUEUE; /* per submit queue */ |
| @@ -777,6 +762,7 @@ static int sdebug_opt_xferlen_exp = DEF_OPT_XFERLEN_EXP; · 12 unmodified lines | |||
| 777 | static int sdebug_ptype = DEF_PTYPE; /* SCSI peripheral device type */ | 762 | static int sdebug_ptype = DEF_PTYPE; /* SCSI peripheral device type */ |
| 778 | static int sdebug_scsi_level = DEF_SCSI_LEVEL; | 763 | static int sdebug_scsi_level = DEF_SCSI_LEVEL; |
| 779 | static int sdebug_sector_size = DEF_SECTOR_SIZE; | 764 | static int sdebug_sector_size = DEF_SECTOR_SIZE; |
| 765 | static int sdeb_tur_ms_to_ready = DEF_TUR_MS_TO_READY; | ||
| 780 | static int sdebug_virtual_gb = DEF_VIRTUAL_GB; | 766 | static int sdebug_virtual_gb = DEF_VIRTUAL_GB; |
| 781 | static int sdebug_vpd_use_hostno = DEF_VPD_USE_HOSTNO; | 767 | static int sdebug_vpd_use_hostno = DEF_VPD_USE_HOSTNO; |
| 782 | static unsigned int sdebug_lbpu = DEF_LBPU; | 768 | static unsigned int sdebug_lbpu = DEF_LBPU; |
| @@ -1729,75 +1715,68 @@ static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) · 946 unmodified lines | |||
| 1729 | return ret; | 1715 | return ret; |
| 1730 | } | 1716 | } |
| 1731 | 1717 | ||
| 1718 | /* See resp_iec_m_pg() for how this data is manipulated */ | ||
| 1732 | static unsigned char iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0, | 1719 | static unsigned char iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0, |
| 1733 | 0, 0, 0x0, 0x0}; | 1720 | 0, 0, 0x0, 0x0}; |
| 1734 | 1721 | ||
| 1735 | static int resp_requests(struct scsi_cmnd *scp, | 1722 | static int resp_requests(struct scsi_cmnd *scp, |
| 1736 | struct sdebug_dev_info *devip) | 1723 | struct sdebug_dev_info *devip) |
| 1737 | { | 1724 | { |
| 1738 | unsigned char *sbuff; | ||
| 1739 | unsigned char *cmd = scp->cmnd; | 1725 | unsigned char *cmd = scp->cmnd; |
| 1740 | unsigned char arr[SCSI_SENSE_BUFFERSIZE]; | 1726 | unsigned char arr[SCSI_SENSE_BUFFERSIZE]; /* assume >= 18 bytes */ |
| 1741 | bool dsense; | 1727 | bool dsense = !!(cmd[1] & 1); |
| 1728 | int alloc_len = cmd[4]; | ||
| 1742 | int len = 18; | 1729 | int len = 18; |
| 1730 | int stopped_state = atomic_read(&devip->stopped); | ||
| 1743 | 1731 | ||
| 1744 | memset(arr, 0, sizeof(arr)); | 1732 | memset(arr, 0, sizeof(arr)); |
| 1745 | dsense = !!(cmd[1] & 1); | 1733 | if (stopped_state > 0) { /* some "pollable" data [spc6r02: 5.12.2] */ |
| 1746 | sbuff = scp->sense_buffer; | 1734 | if (dsense) { |
| 1747 | if ((iec_m_pg[2] & 0x4) && (6 == (iec_m_pg[3] & 0xf))) { | 1735 | arr[0] = 0x72; |
| 1736 | arr[1] = NOT_READY; | ||
| 1737 | arr[2] = LOGICAL_UNIT_NOT_READY; | ||
| 1738 | arr[3] = (stopped_state == 2) ? 0x1 : 0x2; | ||
| 1739 | len = 8; | ||
| 1740 | } else { | ||
| 1741 | arr[0] = 0x70; | ||
| 1742 | arr[2] = NOT_READY; /* NO_SENSE in sense_key */ | ||
| 1743 | arr[7] = 0xa; /* 18 byte sense buffer */ | ||
| 1744 | arr[12] = LOGICAL_UNIT_NOT_READY; | ||
| 1745 | arr[13] = (stopped_state == 2) ? 0x1 : 0x2; | ||
| 1746 | } | ||
| 1747 | } else if ((iec_m_pg[2] & 0x4) && (6 == (iec_m_pg[3] & 0xf))) { | ||
| 1748 | /* Information exceptions control mode page: TEST=1, MRIE=6 */ | ||
| 1748 | if (dsense) { | 1749 | if (dsense) { |
| 1749 | arr[0] = 0x72; | 1750 | arr[0] = 0x72; |
| 1750 | arr[1] = 0x0; /* NO_SENSE in sense_key */ | 1751 | arr[1] = 0x0; /* NO_SENSE in sense_key */ |
| 1751 | arr[2] = THRESHOLD_EXCEEDED; | 1752 | arr[2] = THRESHOLD_EXCEEDED; |
| 1752 | arr[3] = 0xff; /* TEST set and MRIE==6 */ | 1753 | arr[3] = 0xff; /* Failure prediction(false) */ |
| 1753 | len = 8; | 1754 | len = 8; |
| 1754 | } else { | 1755 | } else { |
| 1755 | arr[0] = 0x70; | 1756 | arr[0] = 0x70; |
| 1756 | arr[2] = 0x0; /* NO_SENSE in sense_key */ | 1757 | arr[2] = 0x0; /* NO_SENSE in sense_key */ |
| 1757 | arr[7] = 0xa; /* 18 byte sense buffer */ | 1758 | arr[7] = 0xa; /* 18 byte sense buffer */ |
| 1758 | arr[12] = THRESHOLD_EXCEEDED; | 1759 | arr[12] = THRESHOLD_EXCEEDED; |
| 1759 | arr[13] = 0xff; /* TEST set and MRIE==6 */ | 1760 | arr[13] = 0xff; /* Failure prediction(false) */ |
| 1760 | } | 1761 | } |
| 1761 | } else { | 1762 | } else { /* nothing to report */ |
| 1762 | memcpy(arr, sbuff, SCSI_SENSE_BUFFERSIZE); | 1763 | if (dsense) { |
| 1763 | if (arr[0] >= 0x70 && dsense == sdebug_dsense) | ||
| 1764 | ; /* have sense and formats match */ | ||
| 1765 | else if (arr[0] <= 0x70) { | ||
| 1766 | if (dsense) { | ||
| 1767 | memset(arr, 0, 8); | ||
| 1768 | arr[0] = 0x72; | ||
| 1769 | len = 8; | ||
| 1770 | } else { | ||
| 1771 | memset(arr, 0, 18); | ||
| 1772 | arr[0] = 0x70; | ||
| 1773 | arr[7] = 0xa; | ||
| 1774 | } | ||
| 1775 | } else if (dsense) { | ||
| 1776 | memset(arr, 0, 8); | ||
| 1777 | arr[0] = 0x72; | ||
| 1778 | arr[1] = sbuff[2]; /* sense key */ | ||
| 1779 | arr[2] = sbuff[12]; /* asc */ | ||
| 1780 | arr[3] = sbuff[13]; /* ascq */ | ||
| 1781 | len = 8; | 1764 | len = 8; |
| 1765 | memset(arr, 0, len); | ||
| 1766 | arr[0] = 0x72; | ||
| 1782 | } else { | 1767 | } else { |
| 1783 | memset(arr, 0, 18); | 1768 | memset(arr, 0, len); |
| 1784 | arr[0] = 0x70; | 1769 | arr[0] = 0x70; |
| 1785 | arr[2] = sbuff[1]; | ||
| 1786 | arr[7] = 0xa; | 1770 | arr[7] = 0xa; |
| 1787 | arr[12] = sbuff[1]; | ||
| 1788 | arr[13] = sbuff[3]; | ||
| 1789 | } | 1771 | } |
| 1790 | |||
| 1791 | } | 1772 | } |
| 1792 | mk_sense_buffer(scp, 0, NO_ADDITIONAL_SENSE, 0); | 1773 | return fill_from_dev_buffer(scp, arr, min_t(int, len, alloc_len)); |
| 1793 | return fill_from_dev_buffer(scp, arr, len); | ||
| 1794 | } | 1774 | } |
| 1795 | 1775 | ||
| 1796 | static int resp_start_stop(struct scsi_cmnd *scp, | 1776 | static int resp_start_stop(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) |
| 1797 | struct sdebug_dev_info *devip) | ||
| 1798 | { | 1777 | { |
| 1799 | unsigned char *cmd = scp->cmnd; | 1778 | unsigned char *cmd = scp->cmnd; |
| 1800 | int power_cond, stop; | 1779 | int power_cond, want_stop, stopped_state; |
| 1801 | bool changing; | 1780 | bool changing; |
| 1802 | 1781 | ||
| 1803 | power_cond = (cmd[4] & 0xf0) >> 4; | 1782 | power_cond = (cmd[4] & 0xf0) >> 4; |
| @@ -1805,10 +1784,33 @@ static int resp_start_stop(struct scsi_cmnd *scp, · 1 unmodified line | |||
| 1805 | mk_sense_invalid_fld(scp, SDEB_IN_CDB, 4, 7); | 1784 | mk_sense_invalid_fld(scp, SDEB_IN_CDB, 4, 7); |
| 1806 | return check_condition_result; | 1785 | return check_condition_result; |
| 1807 | } | 1786 | } |
| 1808 | stop = !(cmd[4] & 1); | 1787 | want_stop = !(cmd[4] & 1); |
| 1809 | changing = atomic_read(&devip->stopped) == !stop; | 1788 | stopped_state = atomic_read(&devip->stopped); |
| 1810 | atomic_xchg(&devip->stopped, stop); | 1789 | if (stopped_state == 2) { |
| 1811 | if (!changing || cmd[1] & 0x1) /* state unchanged or IMMED set */ | 1790 | ktime_t now_ts = ktime_get_boottime(); |
| 1791 | |||
| 1792 | if (ktime_to_ns(now_ts) > ktime_to_ns(devip->create_ts)) { | ||
| 1793 | u64 diff_ns = ktime_to_ns(ktime_sub(now_ts, devip->create_ts)); | ||
| 1794 | |||
| 1795 | if (diff_ns >= ((u64)sdeb_tur_ms_to_ready * 1000000)) { | ||
| 1796 | /* tur_ms_to_ready timer extinguished */ | ||
| 1797 | atomic_set(&devip->stopped, 0); | ||
| 1798 | stopped_state = 0; | ||
| 1799 | } | ||
| 1800 | } | ||
| 1801 | if (stopped_state == 2) { | ||
| 1802 | if (want_stop) { | ||
| 1803 | stopped_state = 1; /* dummy up success */ | ||
| 1804 | } else { /* Disallow tur_ms_to_ready delay to be overridden */ | ||
| 1805 | mk_sense_invalid_fld(scp, SDEB_IN_CDB, 4, 0 /* START bit */); | ||
| 1806 | return check_condition_result; | ||
| 1807 | } | ||
| 1808 | } | ||
| 1809 | } | ||
| 1810 | changing = (stopped_state != want_stop); | ||
| 1811 | if (changing) | ||
| 1812 | atomic_xchg(&devip->stopped, want_stop); | ||
| 1813 | if (!changing || (cmd[1] & 0x1)) /* state unchanged or IMMED bit set in cdb */ | ||
| 1812 | return SDEG_RES_IMMED_MASK; | 1814 | return SDEG_RES_IMMED_MASK; |
| 1813 | else | 1815 | else |
| 1814 | return 0; | 1816 | return 0; |
| @@ -3109,7 +3111,6 @@ static int resp_read_dt0(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) · 1294 unmodified lines | |||
| 3109 | struct sdeb_store_info *sip = devip2sip(devip, true); | 3111 | struct sdeb_store_info *sip = devip2sip(devip, true); |
| 3110 | rwlock_t *macc_lckp = sip ? &sip->macc_lck : &sdeb_fake_rw_lck; | 3112 | rwlock_t *macc_lckp = sip ? &sip->macc_lck : &sdeb_fake_rw_lck; |
| 3111 | u8 *cmd = scp->cmnd; | 3113 | u8 *cmd = scp->cmnd; |
| 3112 | struct sdebug_queued_cmd *sqcp; | ||
| 3113 | 3114 | ||
| 3114 | switch (cmd[0]) { | 3115 | switch (cmd[0]) { |
| 3115 | case READ_16: | 3116 | case READ_16: |
| @@ -3162,15 +3163,11 @@ static int resp_read_dt0(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) · 46 unmodified lines | |||
| 3162 | sdev_printk(KERN_ERR, scp->device, "Unprotected RD " | 3163 | sdev_printk(KERN_ERR, scp->device, "Unprotected RD " |
| 3163 | "to DIF device\n"); | 3164 | "to DIF device\n"); |
| 3164 | } | 3165 | } |
| 3165 | if (unlikely(sdebug_any_injecting_opt)) { | 3166 | if (unlikely((sdebug_opts & SDEBUG_OPT_SHORT_TRANSFER) && |
| 3166 | sqcp = (struct sdebug_queued_cmd *)scp->host_scribble; | 3167 | atomic_read(&sdeb_inject_pending))) { |
| 3167 | 3168 | num /= 2; | |
| 3168 | if (sqcp) { | 3169 | atomic_set(&sdeb_inject_pending, 0); |
| 3169 | if (sqcp->inj_short) | 3170 | } |
| 3170 | num /= 2; | ||
| 3171 | } | ||
| 3172 | } else | ||
| 3173 | sqcp = NULL; | ||
| 3174 | 3171 | ||
| 3175 | ret = check_device_access_params(scp, lba, num, false); | 3172 | ret = check_device_access_params(scp, lba, num, false); |
| 3176 | if (ret) | 3173 | if (ret) |
| @@ -3211,21 +3208,20 @@ static int resp_read_dt0(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) · 34 unmodified lines | |||
| 3211 | 3208 | ||
| 3212 | scsi_set_resid(scp, scsi_bufflen(scp) - ret); | 3209 | scsi_set_resid(scp, scsi_bufflen(scp) - ret); |
| 3213 | 3210 | ||
| 3214 | if (unlikely(sqcp)) { | 3211 | if (unlikely((sdebug_opts & SDEBUG_OPT_RECOV_DIF_DIX) && |
| 3215 | if (sqcp->inj_recovered) { | 3212 | atomic_read(&sdeb_inject_pending))) { |
| 3216 | mk_sense_buffer(scp, RECOVERED_ERROR, | 3213 | if (sdebug_opts & SDEBUG_OPT_RECOVERED_ERR) { |
| 3217 | THRESHOLD_EXCEEDED, 0); | 3214 | mk_sense_buffer(scp, RECOVERED_ERROR, THRESHOLD_EXCEEDED, 0); |
| 3215 | atomic_set(&sdeb_inject_pending, 0); | ||
| 3218 | return check_condition_result; | 3216 | return check_condition_result; |
| 3219 | } else if (sqcp->inj_transport) { | 3217 | } else if (sdebug_opts & SDEBUG_OPT_DIF_ERR) { |
| 3220 | mk_sense_buffer(scp, ABORTED_COMMAND, | ||
| 3221 | TRANSPORT_PROBLEM, ACK_NAK_TO); | ||
| 3222 | return check_condition_result; | ||
| 3223 | } else if (sqcp->inj_dif) { | ||
| 3224 | /* Logical block guard check failed */ | 3218 | /* Logical block guard check failed */ |
| 3225 | mk_sense_buffer(scp, ABORTED_COMMAND, 0x10, 1); | 3219 | mk_sense_buffer(scp, ABORTED_COMMAND, 0x10, 1); |
| 3220 | atomic_set(&sdeb_inject_pending, 0); | ||
| 3226 | return illegal_condition_result; | 3221 | return illegal_condition_result; |
| 3227 | } else if (sqcp->inj_dix) { | 3222 | } else if (SDEBUG_OPT_DIX_ERR & sdebug_opts) { |
| 3228 | mk_sense_buffer(scp, ILLEGAL_REQUEST, 0x10, 1); | 3223 | mk_sense_buffer(scp, ILLEGAL_REQUEST, 0x10, 1); |
| 3224 | atomic_set(&sdeb_inject_pending, 0); | ||
| 3229 | return illegal_condition_result; | 3225 | return illegal_condition_result; |
| 3230 | } | 3226 | } |
| 3231 | } | 3227 | } |
| @@ -3504,23 +3500,21 @@ static int resp_write_dt0(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) · 272 unmodified lines | |||
| 3504 | "%s: write: cdb indicated=%u, IO sent=%d bytes\n", | 3500 | "%s: write: cdb indicated=%u, IO sent=%d bytes\n", |
| 3505 | my_name, num * sdebug_sector_size, ret); | 3501 | my_name, num * sdebug_sector_size, ret); |
| 3506 | 3502 | ||
| 3507 | if (unlikely(sdebug_any_injecting_opt)) { | 3503 | if (unlikely((sdebug_opts & SDEBUG_OPT_RECOV_DIF_DIX) && |
| 3508 | struct sdebug_queued_cmd *sqcp = | 3504 | atomic_read(&sdeb_inject_pending))) { |
| 3509 | (struct sdebug_queued_cmd *)scp->host_scribble; | 3505 | if (sdebug_opts & SDEBUG_OPT_RECOVERED_ERR) { |
| 3510 | 3506 | mk_sense_buffer(scp, RECOVERED_ERROR, THRESHOLD_EXCEEDED, 0); | |
| 3511 | if (sqcp) { | 3507 | atomic_set(&sdeb_inject_pending, 0); |
| 3512 | if (sqcp->inj_recovered) { | 3508 | return check_condition_result; |
| 3513 | mk_sense_buffer(scp, RECOVERED_ERROR, | 3509 | } else if (sdebug_opts & SDEBUG_OPT_DIF_ERR) { |
| 3514 | THRESHOLD_EXCEEDED, 0); | 3510 | /* Logical block guard check failed */ |
| 3515 | return check_condition_result; | 3511 | mk_sense_buffer(scp, ABORTED_COMMAND, 0x10, 1); |
| 3516 | } else if (sqcp->inj_dif) { | 3512 | atomic_set(&sdeb_inject_pending, 0); |
| 3517 | /* Logical block guard check failed */ | 3513 | return illegal_condition_result; |
| 3518 | mk_sense_buffer(scp, ABORTED_COMMAND, 0x10, 1); | 3514 | } else if (sdebug_opts & SDEBUG_OPT_DIX_ERR) { |
| 3519 | return illegal_condition_result; | 3515 | mk_sense_buffer(scp, ILLEGAL_REQUEST, 0x10, 1); |
| 3520 | } else if (sqcp->inj_dix) { | 3516 | atomic_set(&sdeb_inject_pending, 0); |
| 3521 | mk_sense_buffer(scp, ILLEGAL_REQUEST, 0x10, 1); | 3517 | return illegal_condition_result; |
| 3522 | return illegal_condition_result; | ||
| 3523 | } | ||
| 3524 | } | 3518 | } |
| 3525 | } | 3519 | } |
| 3526 | return 0; | 3520 | return 0; |
| @@ -3662,28 +3656,24 @@ static int resp_write_scat(struct scsi_cmnd *scp, · 135 unmodified lines | |||
| 3662 | "%s: write: cdb indicated=%u, IO sent=%d bytes\n", | 3656 | "%s: write: cdb indicated=%u, IO sent=%d bytes\n", |
| 3663 | my_name, num_by, ret); | 3657 | my_name, num_by, ret); |
| 3664 | 3658 | ||
| 3665 | if (unlikely(sdebug_any_injecting_opt)) { | 3659 | if (unlikely((sdebug_opts & SDEBUG_OPT_RECOV_DIF_DIX) && |
| 3666 | struct sdebug_queued_cmd *sqcp = | 3660 | atomic_read(&sdeb_inject_pending))) { |
| 3667 | (struct sdebug_queued_cmd *)scp->host_scribble; | 3661 | if (sdebug_opts & SDEBUG_OPT_RECOVERED_ERR) { |
| 3668 | 3662 | mk_sense_buffer(scp, RECOVERED_ERROR, THRESHOLD_EXCEEDED, 0); | |
| 3669 | if (sqcp) { | 3663 | atomic_set(&sdeb_inject_pending, 0); |
| 3670 | if (sqcp->inj_recovered) { | 3664 | ret = check_condition_result; |
| 3671 | mk_sense_buffer(scp, RECOVERED_ERROR, | 3665 | goto err_out_unlock; |
| 3672 | THRESHOLD_EXCEEDED, 0); | 3666 | } else if (sdebug_opts & SDEBUG_OPT_DIF_ERR) { |
| 3673 | ret = illegal_condition_result; | 3667 | /* Logical block guard check failed */ |
| 3674 | goto err_out_unlock; | 3668 | mk_sense_buffer(scp, ABORTED_COMMAND, 0x10, 1); |
| 3675 | } else if (sqcp->inj_dif) { | 3669 | atomic_set(&sdeb_inject_pending, 0); |
| 3676 | /* Logical block guard check failed */ | 3670 | ret = illegal_condition_result; |
| 3677 | mk_sense_buffer(scp, ABORTED_COMMAND, | 3671 | goto err_out_unlock; |
| 3678 | 0x10, 1); | 3672 | } else if (sdebug_opts & SDEBUG_OPT_DIX_ERR) { |
| 3679 | ret = illegal_condition_result; | 3673 | mk_sense_buffer(scp, ILLEGAL_REQUEST, 0x10, 1); |
| 3680 | goto err_out_unlock; | 3674 | atomic_set(&sdeb_inject_pending, 0); |
| 3681 | } else if (sqcp->inj_dix) { | 3675 | ret = illegal_condition_result; |
| 3682 | mk_sense_buffer(scp, ILLEGAL_REQUEST, | 3676 | goto err_out_unlock; |
| 3683 | 0x10, 1); | ||
| 3684 | ret = illegal_condition_result; | ||
| 3685 | goto err_out_unlock; | ||
| 3686 | } | ||
| 3687 | } | 3677 | } |
| 3688 | } | 3678 | } |
| 3689 | sg_off += num_by; | 3679 | sg_off += num_by; |
| @@ -4049,7 +4039,7 @@ static int resp_sync_cache(struct scsi_cmnd *scp, · 359 unmodified lines | |||
| 4049 | mk_sense_buffer(scp, ILLEGAL_REQUEST, LBA_OUT_OF_RANGE, 0); | 4039 | mk_sense_buffer(scp, ILLEGAL_REQUEST, LBA_OUT_OF_RANGE, 0); |
| 4050 | return check_condition_result; | 4040 | return check_condition_result; |
| 4051 | } | 4041 | } |
| 4052 | if (!write_since_sync || cmd[1] & 0x2) | 4042 | if (!write_since_sync || (cmd[1] & 0x2)) |
| 4053 | res = SDEG_RES_IMMED_MASK; | 4043 | res = SDEG_RES_IMMED_MASK; |
| 4054 | else /* delay if write_since_sync and IMMED clear */ | 4044 | else /* delay if write_since_sync and IMMED clear */ |
| 4055 | write_since_sync = false; | 4045 | write_since_sync = false; |
| @@ -4707,15 +4697,28 @@ fini: · 651 unmodified lines | |||
| 4707 | 4697 | ||
| 4708 | static struct sdebug_queue *get_queue(struct scsi_cmnd *cmnd) | 4698 | static struct sdebug_queue *get_queue(struct scsi_cmnd *cmnd) |
| 4709 | { | 4699 | { |
| 4710 | u32 tag = blk_mq_unique_tag(cmnd->request); | 4700 | u16 hwq; |
| 4711 | u16 hwq = blk_mq_unique_tag_to_hwq(tag); | ||
| 4712 | 4701 | ||
| 4713 | pr_debug("tag=%#x, hwq=%d\n", tag, hwq); | 4702 | if (sdebug_host_max_queue) { |
| 4714 | if (WARN_ON_ONCE(hwq >= submit_queues)) | 4703 | /* Provide a simple method to choose the hwq */ |
| 4715 | hwq = 0; | 4704 | hwq = smp_processor_id() % submit_queues; |
| 4705 | } else { | ||
| 4706 | u32 tag = blk_mq_unique_tag(cmnd->request); | ||
| 4707 | |||
| 4708 | hwq = blk_mq_unique_tag_to_hwq(tag); | ||
| 4709 | |||
| 4710 | pr_debug("tag=%#x, hwq=%d\n", tag, hwq); | ||
| 4711 | if (WARN_ON_ONCE(hwq >= submit_queues)) | ||
| 4712 | hwq = 0; | ||
| 4713 | } | ||
| 4716 | return sdebug_q_arr + hwq; | 4714 | return sdebug_q_arr + hwq; |
| 4717 | } | 4715 | } |
| 4718 | 4716 | ||
| 4717 | static u32 get_tag(struct scsi_cmnd *cmnd) | ||
| 4718 | { | ||
| 4719 | return blk_mq_unique_tag(cmnd->request); | ||
| 4720 | } | ||
| 4721 | |||
| 4719 | /* Queued (deferred) command completions converge here. */ | 4722 | /* Queued (deferred) command completions converge here. */ |
| 4720 | static void sdebug_q_cmd_complete(struct sdebug_defer *sd_dp) | 4723 | static void sdebug_q_cmd_complete(struct sdebug_defer *sd_dp) |
| 4721 | { | 4724 | { |
| @@ -4747,8 +4750,8 @@ static void sdebug_q_cmd_complete(struct sdebug_defer *sd_dp) · 25 unmodified lines | |||
| 4747 | scp = sqcp->a_cmnd; | 4750 | scp = sqcp->a_cmnd; |
| 4748 | if (unlikely(scp == NULL)) { | 4751 | if (unlikely(scp == NULL)) { |
| 4749 | spin_unlock_irqrestore(&sqp->qc_lock, iflags); | 4752 | spin_unlock_irqrestore(&sqp->qc_lock, iflags); |
| 4750 | pr_err("scp is NULL, sqa_idx=%d, qc_idx=%d\n", | 4753 | pr_err("scp is NULL, sqa_idx=%d, qc_idx=%d, hc_idx=%d\n", |
| 4751 | sd_dp->sqa_idx, qc_idx); | 4754 | sd_dp->sqa_idx, qc_idx, sd_dp->hc_idx); |
| 4752 | return; | 4755 | return; |
| 4753 | } | 4756 | } |
| 4754 | devip = (struct sdebug_dev_info *)scp->device->hostdata; | 4757 | devip = (struct sdebug_dev_info *)scp->device->hostdata; |
| @@ -4925,6 +4928,8 @@ static struct sdebug_dev_info *sdebug_device_create( · 170 unmodified lines | |||
| 4925 | devip->zmodel = BLK_ZONED_NONE; | 4928 | devip->zmodel = BLK_ZONED_NONE; |
| 4926 | } | 4929 | } |
| 4927 | devip->sdbg_host = sdbg_host; | 4930 | devip->sdbg_host = sdbg_host; |
| 4931 | devip->create_ts = ktime_get_boottime(); | ||
| 4932 | atomic_set(&devip->stopped, (sdeb_tur_ms_to_ready > 0 ? 2 : 0)); | ||
| 4928 | list_add_tail(&devip->dev_list, &sdbg_host->dev_info_list); | 4933 | list_add_tail(&devip->dev_list, &sdbg_host->dev_info_list); |
| 4929 | } | 4934 | } |
| 4930 | return devip; | 4935 | return devip; |
| @@ -5333,24 +5338,11 @@ static void clear_queue_stats(void) · 402 unmodified lines | |||
| 5333 | atomic_set(&sdebug_a_tsf, 0); | 5338 | atomic_set(&sdebug_a_tsf, 0); |
| 5334 | } | 5339 | } |
| 5335 | 5340 | ||
| 5336 | static void setup_inject(struct sdebug_queue *sqp, | 5341 | static bool inject_on_this_cmd(void) |
| 5337 | struct sdebug_queued_cmd *sqcp) | ||
| 5338 | { | 5342 | { |
| 5339 | if ((atomic_read(&sdebug_cmnd_count) % abs(sdebug_every_nth)) > 0) { | 5343 | if (sdebug_every_nth == 0) |
| 5340 | if (sdebug_every_nth > 0) | 5344 | return false; |
| 5341 | sqcp->inj_recovered = sqcp->inj_transport | 5345 | return (atomic_read(&sdebug_cmnd_count) % abs(sdebug_every_nth)) == 0; |
| 5342 | = sqcp->inj_dif | ||
| 5343 | = sqcp->inj_dix = sqcp->inj_short | ||
| 5344 | = sqcp->inj_host_busy = sqcp->inj_cmd_abort = 0; | ||
| 5345 | return; | ||
| 5346 | } | ||
| 5347 | sqcp->inj_recovered = !!(SDEBUG_OPT_RECOVERED_ERR & sdebug_opts); | ||
| 5348 | sqcp->inj_transport = !!(SDEBUG_OPT_TRANSPORT_ERR & sdebug_opts); | ||
| 5349 | sqcp->inj_dif = !!(SDEBUG_OPT_DIF_ERR & sdebug_opts); | ||
| 5350 | sqcp->inj_dix = !!(SDEBUG_OPT_DIX_ERR & sdebug_opts); | ||
| 5351 | sqcp->inj_short = !!(SDEBUG_OPT_SHORT_TRANSFER & sdebug_opts); | ||
| 5352 | sqcp->inj_host_busy = !!(SDEBUG_OPT_HOST_BUSY & sdebug_opts); | ||
| 5353 | sqcp->inj_cmd_abort = !!(SDEBUG_OPT_CMD_ABORT & sdebug_opts); | ||
| 5354 | } | 5346 | } |
| 5355 | 5347 | ||
| 5356 | #define INCLUSIVE_TIMING_MAX_NS 1000000 /* 1 millisecond */ | 5348 | #define INCLUSIVE_TIMING_MAX_NS 1000000 /* 1 millisecond */ |
| @@ -5367,7 +5359,8 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, · 10 unmodified lines | |||
| 5367 | int delta_jiff, int ndelay) | 5359 | int delta_jiff, int ndelay) |
| 5368 | { | 5360 | { |
| 5369 | bool new_sd_dp; | 5361 | bool new_sd_dp; |
| 5370 | int k, num_in_q, qdepth, inject; | 5362 | bool inject = false; |
| 5363 | int k, num_in_q, qdepth; | ||
| 5371 | unsigned long iflags; | 5364 | unsigned long iflags; |
| 5372 | u64 ns_from_boot = 0; | 5365 | u64 ns_from_boot = 0; |
| 5373 | struct sdebug_queue *sqp; | 5366 | struct sdebug_queue *sqp; |
| @@ -5393,7 +5386,6 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, · 19 unmodified lines | |||
| 5393 | } | 5386 | } |
| 5394 | num_in_q = atomic_read(&devip->num_in_q); | 5387 | num_in_q = atomic_read(&devip->num_in_q); |
| 5395 | qdepth = cmnd->device->queue_depth; | 5388 | qdepth = cmnd->device->queue_depth; |
| 5396 | inject = 0; | ||
| 5397 | if (unlikely((qdepth > 0) && (num_in_q >= qdepth))) { | 5389 | if (unlikely((qdepth > 0) && (num_in_q >= qdepth))) { |
| 5398 | if (scsi_result) { | 5390 | if (scsi_result) { |
| 5399 | spin_unlock_irqrestore(&sqp->qc_lock, iflags); | 5391 | spin_unlock_irqrestore(&sqp->qc_lock, iflags); |
| @@ -5407,7 +5399,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, · 7 unmodified lines | |||
| 5407 | (atomic_inc_return(&sdebug_a_tsf) >= | 5399 | (atomic_inc_return(&sdebug_a_tsf) >= |
| 5408 | abs(sdebug_every_nth))) { | 5400 | abs(sdebug_every_nth))) { |
| 5409 | atomic_set(&sdebug_a_tsf, 0); | 5401 | atomic_set(&sdebug_a_tsf, 0); |
| 5410 | inject = 1; | 5402 | inject = true; |
| 5411 | scsi_result = device_qfull_result; | 5403 | scsi_result = device_qfull_result; |
| 5412 | } | 5404 | } |
| 5413 | } | 5405 | } |
| @@ -5430,35 +5422,47 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, · 16 unmodified lines | |||
| 5430 | else | 5422 | else |
| 5431 | return SCSI_MLQUEUE_HOST_BUSY; | 5423 | return SCSI_MLQUEUE_HOST_BUSY; |
| 5432 | } | 5424 | } |
| 5433 | __set_bit(k, sqp->in_use_bm); | 5425 | set_bit(k, sqp->in_use_bm); |
| 5434 | atomic_inc(&devip->num_in_q); | 5426 | atomic_inc(&devip->num_in_q); |
| 5435 | sqcp = &sqp->qc_arr[k]; | 5427 | sqcp = &sqp->qc_arr[k]; |
| 5436 | sqcp->a_cmnd = cmnd; | 5428 | sqcp->a_cmnd = cmnd; |
| 5437 | cmnd->host_scribble = (unsigned char *)sqcp; | 5429 | cmnd->host_scribble = (unsigned char *)sqcp; |
| 5438 | sd_dp = sqcp->sd_dp; | 5430 | sd_dp = sqcp->sd_dp; |
| 5439 | spin_unlock_irqrestore(&sqp->qc_lock, iflags); | 5431 | spin_unlock_irqrestore(&sqp->qc_lock, iflags); |
| 5440 | if (unlikely(sdebug_every_nth && sdebug_any_injecting_opt)) | 5432 | if (!sd_dp) { |
| 5441 | setup_inject(sqp, sqcp); | ||
| 5442 | if (sd_dp == NULL) { | ||
| 5443 | sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC); | 5433 | sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC); |
| 5444 | if (sd_dp == NULL) | 5434 | if (!sd_dp) { |
| 5435 | atomic_dec(&devip->num_in_q); | ||
| 5436 | clear_bit(k, sqp->in_use_bm); | ||
| 5445 | return SCSI_MLQUEUE_HOST_BUSY; | 5437 | return SCSI_MLQUEUE_HOST_BUSY; |
| 5438 | } | ||
| 5446 | new_sd_dp = true; | 5439 | new_sd_dp = true; |
| 5447 | } else { | 5440 | } else { |
| 5448 | new_sd_dp = false; | 5441 | new_sd_dp = false; |
| 5449 | } | 5442 | } |
| 5450 | 5443 | ||
| 5444 | /* Set the hostwide tag */ | ||
| 5445 | if (sdebug_host_max_queue) | ||
| 5446 | sd_dp->hc_idx = get_tag(cmnd); | ||
| 5447 | |||
| 5451 | if (ndelay > 0 && ndelay < INCLUSIVE_TIMING_MAX_NS) | 5448 | if (ndelay > 0 && ndelay < INCLUSIVE_TIMING_MAX_NS) |
| 5452 | ns_from_boot = ktime_get_boottime_ns(); | 5449 | ns_from_boot = ktime_get_boottime_ns(); |
| 5453 | 5450 | ||
| 5454 | /* one of the resp_*() response functions is called here */ | 5451 | /* one of the resp_*() response functions is called here */ |
| 5455 | cmnd->result = pfp != NULL ? pfp(cmnd, devip) : 0; | 5452 | cmnd->result = pfp ? pfp(cmnd, devip) : 0; |
| 5456 | if (cmnd->result & SDEG_RES_IMMED_MASK) { | 5453 | if (cmnd->result & SDEG_RES_IMMED_MASK) { |
| 5457 | cmnd->result &= ~SDEG_RES_IMMED_MASK; | 5454 | cmnd->result &= ~SDEG_RES_IMMED_MASK; |
| 5458 | delta_jiff = ndelay = 0; | 5455 | delta_jiff = ndelay = 0; |
| 5459 | } | 5456 | } |
| 5460 | if (cmnd->result == 0 && scsi_result != 0) | 5457 | if (cmnd->result == 0 && scsi_result != 0) |
| 5461 | cmnd->result = scsi_result; | 5458 | cmnd->result = scsi_result; |
| 5459 | if (cmnd->result == 0 && unlikely(sdebug_opts & SDEBUG_OPT_TRANSPORT_ERR)) { | ||
| 5460 | if (atomic_read(&sdeb_inject_pending)) { | ||
| 5461 | mk_sense_buffer(cmnd, ABORTED_COMMAND, TRANSPORT_PROBLEM, ACK_NAK_TO); | ||
| 5462 | atomic_set(&sdeb_inject_pending, 0); | ||
| 5463 | cmnd->result = check_condition_result; | ||
| 5464 | } | ||
| 5465 | } | ||
| 5462 | 5466 | ||
| 5463 | if (unlikely(sdebug_verbose && cmnd->result)) | 5467 | if (unlikely(sdebug_verbose && cmnd->result)) |
| 5464 | sdev_printk(KERN_INFO, sdp, "%s: non-zero result=0x%x\n", | 5468 | sdev_printk(KERN_INFO, sdp, "%s: non-zero result=0x%x\n", |
| @@ -5524,21 +5528,20 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, · 59 unmodified lines | |||
| 5524 | if (sdebug_statistics) | 5528 | if (sdebug_statistics) |
| 5525 | sd_dp->issuing_cpu = raw_smp_processor_id(); | 5529 | sd_dp->issuing_cpu = raw_smp_processor_id(); |
| 5526 | sd_dp->defer_t = SDEB_DEFER_WQ; | 5530 | sd_dp->defer_t = SDEB_DEFER_WQ; |
| 5527 | if (unlikely(sqcp->inj_cmd_abort)) | 5531 | if (unlikely((sdebug_opts & SDEBUG_OPT_CMD_ABORT) && |
| 5532 | atomic_read(&sdeb_inject_pending))) | ||
| 5528 | sd_dp->aborted = true; | 5533 | sd_dp->aborted = true; |
| 5529 | schedule_work(&sd_dp->ew.work); | 5534 | schedule_work(&sd_dp->ew.work); |
| 5530 | if (unlikely(sqcp->inj_cmd_abort)) { | 5535 | if (unlikely((sdebug_opts & SDEBUG_OPT_CMD_ABORT) && |
| 5531 | sdev_printk(KERN_INFO, sdp, "abort request tag %d\n", | 5536 | atomic_read(&sdeb_inject_pending))) { |
| 5532 | cmnd->request->tag); | 5537 | sdev_printk(KERN_INFO, sdp, "abort request tag %d\n", cmnd->request->tag); |
| 5533 | blk_abort_request(cmnd->request); | 5538 | blk_abort_request(cmnd->request); |
| 5539 | atomic_set(&sdeb_inject_pending, 0); | ||
| 5534 | } | 5540 | } |
| 5535 | } | 5541 | } |
| 5536 | if (unlikely((SDEBUG_OPT_Q_NOISE & sdebug_opts) && | 5542 | if (unlikely((SDEBUG_OPT_Q_NOISE & sdebug_opts) && scsi_result == device_qfull_result)) |
| 5537 | (scsi_result == device_qfull_result))) | 5543 | sdev_printk(KERN_INFO, sdp, "%s: num_in_q=%d +1, %s%s\n", __func__, |
| 5538 | sdev_printk(KERN_INFO, sdp, | 5544 | num_in_q, (inject ? "<inject> " : ""), "status: TASK SET FULL"); |
| 5539 | "%s: num_in_q=%d +1, %s%s\n", __func__, | ||
| 5540 | num_in_q, (inject ? "<inject> " : ""), | ||
| 5541 | "status: TASK SET FULL"); | ||
| 5542 | return 0; | 5545 | return 0; |
| 5543 | 5546 | ||
| 5544 | respond_in_thread: /* call back to mid-layer using invocation thread */ | 5547 | respond_in_thread: /* call back to mid-layer using invocation thread */ |
| @@ -5569,6 +5572,7 @@ module_param_named(every_nth, sdebug_every_nth, int, S_IRUGO | S_IWUSR); · 24 unmodified lines | |||
| 5569 | module_param_named(fake_rw, sdebug_fake_rw, int, S_IRUGO | S_IWUSR); | 5572 | module_param_named(fake_rw, sdebug_fake_rw, int, S_IRUGO | S_IWUSR); |
| 5570 | module_param_named(guard, sdebug_guard, uint, S_IRUGO); | 5573 | module_param_named(guard, sdebug_guard, uint, S_IRUGO); |
| 5571 | module_param_named(host_lock, sdebug_host_lock, bool, S_IRUGO | S_IWUSR); | 5574 | module_param_named(host_lock, sdebug_host_lock, bool, S_IRUGO | S_IWUSR); |
| 5575 | module_param_named(host_max_queue, sdebug_host_max_queue, int, S_IRUGO); | ||
| 5572 | module_param_string(inq_product, sdebug_inq_product_id, | 5576 | module_param_string(inq_product, sdebug_inq_product_id, |
| 5573 | sizeof(sdebug_inq_product_id), S_IRUGO | S_IWUSR); | 5577 | sizeof(sdebug_inq_product_id), S_IRUGO | S_IWUSR); |
| 5574 | module_param_string(inq_rev, sdebug_inq_product_rev, | 5578 | module_param_string(inq_rev, sdebug_inq_product_rev, |
| @@ -5605,6 +5609,7 @@ module_param_named(sector_size, sdebug_sector_size, int, S_IRUGO); · 30 unmodified lines | |||
| 5605 | module_param_named(statistics, sdebug_statistics, bool, S_IRUGO | S_IWUSR); | 5609 | module_param_named(statistics, sdebug_statistics, bool, S_IRUGO | S_IWUSR); |
| 5606 | module_param_named(strict, sdebug_strict, bool, S_IRUGO | S_IWUSR); | 5610 | module_param_named(strict, sdebug_strict, bool, S_IRUGO | S_IWUSR); |
| 5607 | module_param_named(submit_queues, submit_queues, int, S_IRUGO); | 5611 | module_param_named(submit_queues, submit_queues, int, S_IRUGO); |
| 5612 | module_param_named(tur_ms_to_ready, sdeb_tur_ms_to_ready, int, S_IRUGO); | ||
| 5608 | module_param_named(unmap_alignment, sdebug_unmap_alignment, int, S_IRUGO); | 5613 | module_param_named(unmap_alignment, sdebug_unmap_alignment, int, S_IRUGO); |
| 5609 | module_param_named(unmap_granularity, sdebug_unmap_granularity, int, S_IRUGO); | 5614 | module_param_named(unmap_granularity, sdebug_unmap_granularity, int, S_IRUGO); |
| 5610 | module_param_named(unmap_max_blocks, sdebug_unmap_max_blocks, int, S_IRUGO); | 5615 | module_param_named(unmap_max_blocks, sdebug_unmap_max_blocks, int, S_IRUGO); |
| @@ -5639,6 +5644,8 @@ MODULE_PARM_DESC(every_nth, "timeout every nth command(def=0)"); · 28 unmodified lines | |||
| 5639 | MODULE_PARM_DESC(fake_rw, "fake reads/writes instead of copying (def=0)"); | 5644 | MODULE_PARM_DESC(fake_rw, "fake reads/writes instead of copying (def=0)"); |
| 5640 | MODULE_PARM_DESC(guard, "protection checksum: 0=crc, 1=ip (def=0)"); | 5645 | MODULE_PARM_DESC(guard, "protection checksum: 0=crc, 1=ip (def=0)"); |
| 5641 | MODULE_PARM_DESC(host_lock, "host_lock is ignored (def=0)"); | 5646 | MODULE_PARM_DESC(host_lock, "host_lock is ignored (def=0)"); |
| 5647 | MODULE_PARM_DESC(host_max_queue, | ||
| 5648 | "host max # of queued cmds (0 to max(def) [max_queue fixed equal for !0])"); | ||
| 5642 | MODULE_PARM_DESC(inq_product, "SCSI INQUIRY product string (def=\"scsi_debug\")"); | 5649 | MODULE_PARM_DESC(inq_product, "SCSI INQUIRY product string (def=\"scsi_debug\")"); |
| 5643 | MODULE_PARM_DESC(inq_rev, "SCSI INQUIRY revision string (def=\"" | 5650 | MODULE_PARM_DESC(inq_rev, "SCSI INQUIRY revision string (def=\"" |
| 5644 | SDEBUG_VERSION "\")"); | 5651 | SDEBUG_VERSION "\")"); |
| @@ -5671,6 +5678,7 @@ MODULE_PARM_DESC(sector_size, "logical block size in bytes (def=512)"); · 26 unmodified lines | |||
| 5671 | MODULE_PARM_DESC(statistics, "collect statistics on commands, queues (def=0)"); | 5678 | MODULE_PARM_DESC(statistics, "collect statistics on commands, queues (def=0)"); |
| 5672 | MODULE_PARM_DESC(strict, "stricter checks: reserved field in cdb (def=0)"); | 5679 | MODULE_PARM_DESC(strict, "stricter checks: reserved field in cdb (def=0)"); |
| 5673 | MODULE_PARM_DESC(submit_queues, "support for block multi-queue (def=1)"); | 5680 | MODULE_PARM_DESC(submit_queues, "support for block multi-queue (def=1)"); |
| 5681 | MODULE_PARM_DESC(tur_ms_to_ready, "TEST UNIT READY millisecs before initial good status (def=0)"); | ||
| 5674 | MODULE_PARM_DESC(unmap_alignment, "lowest aligned thin provisioning lba (def=0)"); | 5682 | MODULE_PARM_DESC(unmap_alignment, "lowest aligned thin provisioning lba (def=0)"); |
| 5675 | MODULE_PARM_DESC(unmap_granularity, "thin provisioning granularity in blocks (def=1)"); | 5683 | MODULE_PARM_DESC(unmap_granularity, "thin provisioning granularity in blocks (def=1)"); |
| 5676 | MODULE_PARM_DESC(unmap_max_blocks, "max # of blocks can be unmapped in one cmd (def=0xffffffff)"); | 5684 | MODULE_PARM_DESC(unmap_max_blocks, "max # of blocks can be unmapped in one cmd (def=0xffffffff)"); |
| @@ -6072,17 +6080,27 @@ static ssize_t every_nth_store(struct device_driver *ddp, const char *buf, · 395 unmodified lines | |||
| 6072 | size_t count) | 6080 | size_t count) |
| 6073 | { | 6081 | { |
| 6074 | int nth; | 6082 | int nth; |
| 6083 | char work[20]; | ||
| 6075 | 6084 | ||
| 6076 | if ((count > 0) && (1 == sscanf(buf, "%d", &nth))) { | 6085 | if (sscanf(buf, "%10s", work) == 1) { |
| 6077 | sdebug_every_nth = nth; | 6086 | if (strncasecmp(work, "0x", 2) == 0) { |
| 6078 | if (nth && !sdebug_statistics) { | 6087 | if (kstrtoint(work + 2, 16, &nth) == 0) |
| 6079 | pr_info("every_nth needs statistics=1, set it\n"); | 6088 | goto every_nth_done; |
| 6080 | sdebug_statistics = true; | 6089 | } else { |
| 6090 | if (kstrtoint(work, 10, &nth) == 0) | ||
| 6091 | goto every_nth_done; | ||
| 6081 | } | 6092 | } |
| 6082 | tweak_cmnd_count(); | ||
| 6083 | return count; | ||
| 6084 | } | 6093 | } |
| 6085 | return -EINVAL; | 6094 | return -EINVAL; |
| 6095 | |||
| 6096 | every_nth_done: | ||
| 6097 | sdebug_every_nth = nth; | ||
| 6098 | if (nth && !sdebug_statistics) { | ||
| 6099 | pr_info("every_nth needs statistics=1, set it\n"); | ||
| 6100 | sdebug_statistics = true; | ||
| 6101 | } | ||
| 6102 | tweak_cmnd_count(); | ||
| 6103 | return count; | ||
| 6086 | } | 6104 | } |
| 6087 | static DRIVER_ATTR_RW(every_nth); | 6105 | static DRIVER_ATTR_RW(every_nth); |
| 6088 | 6106 | ||
| @@ -6138,7 +6156,8 @@ static ssize_t max_queue_store(struct device_driver *ddp, const char *buf, · 49 unmodified lines | |||
| 6138 | struct sdebug_queue *sqp; | 6156 | struct sdebug_queue *sqp; |
| 6139 | 6157 | ||
| 6140 | if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n > 0) && | 6158 | if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n > 0) && |
| 6141 | (n <= SDEBUG_CANQUEUE)) { | 6159 | (n <= SDEBUG_CANQUEUE) && |
| 6160 | (sdebug_host_max_queue == 0)) { | ||
| 6142 | block_unblock_all_queues(true); | 6161 | block_unblock_all_queues(true); |
| 6143 | k = 0; | 6162 | k = 0; |
| 6144 | for (j = 0, sqp = sdebug_q_arr; j < submit_queues; | 6163 | for (j = 0, sqp = sdebug_q_arr; j < submit_queues; |
| @@ -6161,6 +6180,17 @@ static ssize_t max_queue_store(struct device_driver *ddp, const char *buf, · 16 unmodified lines | |||
| 6161 | } | 6180 | } |
| 6162 | static DRIVER_ATTR_RW(max_queue); | 6181 | static DRIVER_ATTR_RW(max_queue); |
| 6163 | 6182 | ||
| 6183 | static ssize_t host_max_queue_show(struct device_driver *ddp, char *buf) | ||
| 6184 | { | ||
| 6185 | return scnprintf(buf, PAGE_SIZE, "%d\n", sdebug_host_max_queue); | ||
| 6186 | } | ||
| 6187 | |||
| 6188 | /* | ||
| 6189 | * Since this is used for .can_queue, and we get the hc_idx tag from the bitmap | ||
| 6190 | * in range [0, sdebug_host_max_queue), we can't change it. | ||
| 6191 | */ | ||
| 6192 | static DRIVER_ATTR_RO(host_max_queue); | ||
| 6193 | |||
| 6164 | static ssize_t no_uld_show(struct device_driver *ddp, char *buf) | 6194 | static ssize_t no_uld_show(struct device_driver *ddp, char *buf) |
| 6165 | { | 6195 | { |
| 6166 | return scnprintf(buf, PAGE_SIZE, "%d\n", sdebug_no_uld); | 6196 | return scnprintf(buf, PAGE_SIZE, "%d\n", sdebug_no_uld); |
| @@ -6487,6 +6517,12 @@ static ssize_t zbc_show(struct device_driver *ddp, char *buf) · 320 unmodified lines | |||
| 6487 | } | 6517 | } |
| 6488 | static DRIVER_ATTR_RO(zbc); | 6518 | static DRIVER_ATTR_RO(zbc); |
| 6489 | 6519 | ||
| 6520 | static ssize_t tur_ms_to_ready_show(struct device_driver *ddp, char *buf) | ||
| 6521 | { | ||
| 6522 | return scnprintf(buf, PAGE_SIZE, "%d\n", sdeb_tur_ms_to_ready); | ||
| 6523 | } | ||
| 6524 | static DRIVER_ATTR_RO(tur_ms_to_ready); | ||
| 6525 | |||
| 6490 | /* Note: The following array creates attribute files in the | 6526 | /* Note: The following array creates attribute files in the |
| 6491 | /sys/bus/pseudo/drivers/scsi_debug directory. The advantage of these | 6527 | /sys/bus/pseudo/drivers/scsi_debug directory. The advantage of these |
| 6492 | files (over those found in the /sys/module/scsi_debug/parameters | 6528 | files (over those found in the /sys/module/scsi_debug/parameters |
| @@ -6500,6 +6536,7 @@ static struct attribute *sdebug_drv_attrs[] = { · 7 unmodified lines | |||
| 6500 | &driver_attr_ptype.attr, | 6536 | &driver_attr_ptype.attr, |
| 6501 | &driver_attr_dsense.attr, | 6537 | &driver_attr_dsense.attr, |
| 6502 | &driver_attr_fake_rw.attr, | 6538 | &driver_attr_fake_rw.attr, |
| 6539 | &driver_attr_host_max_queue.attr, | ||
| 6503 | &driver_attr_no_lun_0.attr, | 6540 | &driver_attr_no_lun_0.attr, |
| 6504 | &driver_attr_num_tgts.attr, | 6541 | &driver_attr_num_tgts.attr, |
| 6505 | &driver_attr_dev_size_mb.attr, | 6542 | &driver_attr_dev_size_mb.attr, |
| @@ -6528,6 +6565,7 @@ static struct attribute *sdebug_drv_attrs[] = { · 22 unmodified lines | |||
| 6528 | &driver_attr_strict.attr, | 6565 | &driver_attr_strict.attr, |
| 6529 | &driver_attr_uuid_ctl.attr, | 6566 | &driver_attr_uuid_ctl.attr, |
| 6530 | &driver_attr_cdb_len.attr, | 6567 | &driver_attr_cdb_len.attr, |
| 6568 | &driver_attr_tur_ms_to_ready.attr, | ||
| 6531 | &driver_attr_zbc.attr, | 6569 | &driver_attr_zbc.attr, |
| 6532 | NULL, | 6570 | NULL, |
| 6533 | }; | 6571 | }; |
| @@ -6610,6 +6648,26 @@ static int __init scsi_debug_init(void) · 76 unmodified lines | |||
| 6610 | pr_err("submit_queues must be 1 or more\n"); | 6648 | pr_err("submit_queues must be 1 or more\n"); |
| 6611 | return -EINVAL; | 6649 | return -EINVAL; |
| 6612 | } | 6650 | } |
| 6651 | |||
| 6652 | if ((sdebug_max_queue > SDEBUG_CANQUEUE) || (sdebug_max_queue < 1)) { | ||
| 6653 | pr_err("max_queue must be in range [1, %d]\n", SDEBUG_CANQUEUE); | ||
| 6654 | return -EINVAL; | ||
| 6655 | } | ||
| 6656 | |||
| 6657 | if ((sdebug_host_max_queue > SDEBUG_CANQUEUE) || | ||
| 6658 | (sdebug_host_max_queue < 0)) { | ||
| 6659 | pr_err("host_max_queue must be in range [0 %d]\n", | ||
| 6660 | SDEBUG_CANQUEUE); | ||
| 6661 | return -EINVAL; | ||
| 6662 | } | ||
| 6663 | |||
| 6664 | if (sdebug_host_max_queue && | ||
| 6665 | (sdebug_max_queue != sdebug_host_max_queue)) { | ||
| 6666 | sdebug_max_queue = sdebug_host_max_queue; | ||
| 6667 | pr_warn("fixing max submit queue depth to host max queue depth, %d\n", | ||
| 6668 | sdebug_max_queue); | ||
| 6669 | } | ||
| 6670 | |||
| 6613 | sdebug_q_arr = kcalloc(submit_queues, sizeof(struct sdebug_queue), | 6671 | sdebug_q_arr = kcalloc(submit_queues, sizeof(struct sdebug_queue), |
| 6614 | GFP_KERNEL); | 6672 | GFP_KERNEL); |
| 6615 | if (sdebug_q_arr == NULL) | 6673 | if (sdebug_q_arr == NULL) |
| @@ -7044,10 +7102,47 @@ static bool fake_timeout(struct scsi_cmnd *scp) · 428 unmodified lines | |||
| 7044 | return false; | 7102 | return false; |
| 7045 | } | 7103 | } |
| 7046 | 7104 | ||
| 7047 | static bool fake_host_busy(struct scsi_cmnd *scp) | 7105 | /* Response to TUR or media access command when device stopped */ |
| 7106 | static int resp_not_ready(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) | ||
| 7048 | { | 7107 | { |
| 7049 | return (sdebug_opts & SDEBUG_OPT_HOST_BUSY) && | 7108 | int stopped_state; |
| 7050 | (atomic_read(&sdebug_cmnd_count) % abs(sdebug_every_nth)) == 0; | 7109 | u64 diff_ns = 0; |
| 7110 | ktime_t now_ts = ktime_get_boottime(); | ||
| 7111 | struct scsi_device *sdp = scp->device; | ||
| 7112 | |||
| 7113 | stopped_state = atomic_read(&devip->stopped); | ||
| 7114 | if (stopped_state == 2) { | ||
| 7115 | if (ktime_to_ns(now_ts) > ktime_to_ns(devip->create_ts)) { | ||
| 7116 | diff_ns = ktime_to_ns(ktime_sub(now_ts, devip->create_ts)); | ||
| 7117 | if (diff_ns >= ((u64)sdeb_tur_ms_to_ready * 1000000)) { | ||
| 7118 | /* tur_ms_to_ready timer extinguished */ | ||
| 7119 | atomic_set(&devip->stopped, 0); | ||
| 7120 | return 0; | ||
| 7121 | } | ||
| 7122 | } | ||
| 7123 | mk_sense_buffer(scp, NOT_READY, LOGICAL_UNIT_NOT_READY, 0x1); | ||
| 7124 | if (sdebug_verbose) | ||
| 7125 | sdev_printk(KERN_INFO, sdp, | ||
| 7126 | "%s: Not ready: in process of becoming ready\n", my_name); | ||
| 7127 | if (scp->cmnd[0] == TEST_UNIT_READY) { | ||
| 7128 | u64 tur_nanosecs_to_ready = (u64)sdeb_tur_ms_to_ready * 1000000; | ||
| 7129 | |||
| 7130 | if (diff_ns <= tur_nanosecs_to_ready) | ||
| 7131 | diff_ns = tur_nanosecs_to_ready - diff_ns; | ||
| 7132 | else | ||
| 7133 | diff_ns = tur_nanosecs_to_ready; | ||
| 7134 | /* As per 20-061r2 approved for spc6 by T10 on 20200716 */ | ||
| 7135 | do_div(diff_ns, 1000000); /* diff_ns becomes milliseconds */ | ||
| 7136 | scsi_set_sense_information(scp->sense_buffer, SCSI_SENSE_BUFFERSIZE, | ||
| 7137 | diff_ns); | ||
| 7138 | return check_condition_result; | ||
| 7139 | } | ||
| 7140 | } | ||
| 7141 | mk_sense_buffer(scp, NOT_READY, LOGICAL_UNIT_NOT_READY, 0x2); | ||
| 7142 | if (sdebug_verbose) | ||
| 7143 | sdev_printk(KERN_INFO, sdp, "%s: Not ready: initializing command required\n", | ||
| 7144 | my_name); | ||
| 7145 | return check_condition_result; | ||
| 7051 | } | 7146 | } |
| 7052 | 7147 | ||
| 7053 | static int scsi_debug_queuecommand(struct Scsi_Host *shost, | 7148 | static int scsi_debug_queuecommand(struct Scsi_Host *shost, |
| @@ -7058,7 +7153,6 @@ static int scsi_debug_queuecommand(struct Scsi_Host *shost, · 4 unmodified lines | |||
| 7058 | const struct opcode_info_t *oip; | 7153 | const struct opcode_info_t *oip; |
| 7059 | const struct opcode_info_t *r_oip; | 7154 | const struct opcode_info_t *r_oip; |
| 7060 | struct sdebug_dev_info *devip; | 7155 | struct sdebug_dev_info *devip; |
| 7061 | |||
| 7062 | u8 *cmd = scp->cmnd; | 7156 | u8 *cmd = scp->cmnd; |
| 7063 | int (*r_pfp)(struct scsi_cmnd *, struct sdebug_dev_info *); | 7157 | int (*r_pfp)(struct scsi_cmnd *, struct sdebug_dev_info *); |
| 7064 | int (*pfp)(struct scsi_cmnd *, struct sdebug_dev_info *) = NULL; | 7158 | int (*pfp)(struct scsi_cmnd *, struct sdebug_dev_info *) = NULL; |
| @@ -7068,10 +7162,15 @@ static int scsi_debug_queuecommand(struct Scsi_Host *shost, · 3 unmodified lines | |||
| 7068 | u16 sa; | 7162 | u16 sa; |
| 7069 | u8 opcode = cmd[0]; | 7163 | u8 opcode = cmd[0]; |
| 7070 | bool has_wlun_rl; | 7164 | bool has_wlun_rl; |
| 7165 | bool inject_now; | ||
| 7071 | 7166 | ||
| 7072 | scsi_set_resid(scp, 0); | 7167 | scsi_set_resid(scp, 0); |
| 7073 | if (sdebug_statistics) | 7168 | if (sdebug_statistics) { |
| 7074 | atomic_inc(&sdebug_cmnd_count); | 7169 | atomic_inc(&sdebug_cmnd_count); |
| 7170 | inject_now = inject_on_this_cmd(); | ||
| 7171 | } else { | ||
| 7172 | inject_now = false; | ||
| 7173 | } | ||
| 7075 | if (unlikely(sdebug_verbose && | 7174 | if (unlikely(sdebug_verbose && |
| 7076 | !(SDEBUG_OPT_NO_CDB_NOISE & sdebug_opts))) { | 7175 | !(SDEBUG_OPT_NO_CDB_NOISE & sdebug_opts))) { |
| 7077 | char b[120]; | 7176 | char b[120]; |
| @@ -7089,7 +7188,7 @@ static int scsi_debug_queuecommand(struct Scsi_Host *shost, · 11 unmodified lines | |||
| 7089 | sdev_printk(KERN_INFO, sdp, "%s: tag=%#x, cmd %s\n", my_name, | 7188 | sdev_printk(KERN_INFO, sdp, "%s: tag=%#x, cmd %s\n", my_name, |
| 7090 | blk_mq_unique_tag(scp->request), b); | 7189 | blk_mq_unique_tag(scp->request), b); |
| 7091 | } | 7190 | } |
| 7092 | if (fake_host_busy(scp)) | 7191 | if (unlikely(inject_now && (sdebug_opts & SDEBUG_OPT_HOST_BUSY))) |
| 7093 | return SCSI_MLQUEUE_HOST_BUSY; | 7192 | return SCSI_MLQUEUE_HOST_BUSY; |
| 7094 | has_wlun_rl = (sdp->lun == SCSI_W_LUN_REPORT_LUNS); | 7193 | has_wlun_rl = (sdp->lun == SCSI_W_LUN_REPORT_LUNS); |
| 7095 | if (unlikely((sdp->lun >= sdebug_max_luns) && !has_wlun_rl)) | 7194 | if (unlikely((sdp->lun >= sdebug_max_luns) && !has_wlun_rl)) |
| @@ -7103,6 +7202,9 @@ static int scsi_debug_queuecommand(struct Scsi_Host *shost, · 7 unmodified lines | |||
| 7103 | if (NULL == devip) | 7202 | if (NULL == devip) |
| 7104 | goto err_out; | 7203 | goto err_out; |
| 7105 | } | 7204 | } |
| 7205 | if (unlikely(inject_now && !atomic_read(&sdeb_inject_pending))) | ||
| 7206 | atomic_set(&sdeb_inject_pending, 1); | ||
| 7207 | |||
| 7106 | na = oip->num_attached; | 7208 | na = oip->num_attached; |
| 7107 | r_pfp = oip->pfp; | 7209 | r_pfp = oip->pfp; |
| 7108 | if (na) { /* multiple commands with this opcode */ | 7210 | if (na) { /* multiple commands with this opcode */ |
| @@ -7167,14 +7269,11 @@ static int scsi_debug_queuecommand(struct Scsi_Host *shost, · 58 unmodified lines | |||
| 7167 | if (errsts) | 7269 | if (errsts) |
| 7168 | goto check_cond; | 7270 | goto check_cond; |
| 7169 | } | 7271 | } |
| 7170 | if (unlikely((F_M_ACCESS & flags) && atomic_read(&devip->stopped))) { | 7272 | if (unlikely(((F_M_ACCESS & flags) || scp->cmnd[0] == TEST_UNIT_READY) && |
| 7171 | mk_sense_buffer(scp, NOT_READY, LOGICAL_UNIT_NOT_READY, 0x2); | 7273 | atomic_read(&devip->stopped))) { |
| 7172 | if (sdebug_verbose) | 7274 | errsts = resp_not_ready(scp, devip); |
| 7173 | sdev_printk(KERN_INFO, sdp, "%s reports: Not ready: " | 7275 | if (errsts) |
| 7174 | "%s\n", my_name, "initializing command " | 7276 | goto fini; |
| 7175 | "required"); | ||
| 7176 | errsts = check_condition_result; | ||
| 7177 | goto fini; | ||
| 7178 | } | 7277 | } |
| 7179 | if (sdebug_fake_rw && (F_FAKE_RW & flags)) | 7278 | if (sdebug_fake_rw && (F_FAKE_RW & flags)) |
| 7180 | goto fini; | 7279 | goto fini; |
| @@ -7248,7 +7347,10 @@ static int sdebug_driver_probe(struct device *dev) · 67 unmodified lines | |||
| 7248 | 7347 | ||
| 7249 | sdbg_host = to_sdebug_host(dev); | 7348 | sdbg_host = to_sdebug_host(dev); |
| 7250 | 7349 | ||
| 7251 | sdebug_driver_template.can_queue = sdebug_max_queue; | 7350 | if (sdebug_host_max_queue) |
| 7351 | sdebug_driver_template.can_queue = sdebug_host_max_queue; | ||
| 7352 | else | ||
| 7353 | sdebug_driver_template.can_queue = sdebug_max_queue; | ||
| 7252 | if (!sdebug_clustering) | 7354 | if (!sdebug_clustering) |
| 7253 | sdebug_driver_template.dma_boundary = PAGE_SIZE - 1; | 7355 | sdebug_driver_template.dma_boundary = PAGE_SIZE - 1; |
| 7254 | 7356 | ||
| @@ -7263,9 +7365,13 @@ static int sdebug_driver_probe(struct device *dev) · 8 unmodified lines | |||
| 7263 | my_name, submit_queues, nr_cpu_ids); | 7365 | my_name, submit_queues, nr_cpu_ids); |
| 7264 | submit_queues = nr_cpu_ids; | 7366 | submit_queues = nr_cpu_ids; |
| 7265 | } | 7367 | } |
| 7266 | /* Decide whether to tell scsi subsystem that we want mq */ | 7368 | /* |
| 7267 | /* Following should give the same answer for each host */ | 7369 | * Decide whether to tell scsi subsystem that we want mq. The |
| 7268 | hpnt->nr_hw_queues = submit_queues; | 7370 | * following should give the same answer for each host. If the host |
| 7371 | * has a limit of hostwide max commands, then do not set. | ||
| 7372 | */ | ||
| 7373 | if (!sdebug_host_max_queue) | ||
| 7374 | hpnt->nr_hw_queues = submit_queues; | ||
| 7269 | 7375 | ||
| 7270 | sdbg_host->shost = hpnt; | 7376 | sdbg_host->shost = hpnt; |
| 7271 | *((struct sdebug_host_info **)hpnt->hostdata) = sdbg_host; | 7377 | *((struct sdebug_host_info **)hpnt->hostdata) = sdbg_host; |
| @@ -52,7 +52,6 @@ · 51 unmodified lines | |||
| 52 | #define SCSI_INLINE_SG_CNT 2 | 52 | #define SCSI_INLINE_SG_CNT 2 |
| 53 | #endif | 53 | #endif |
| 54 | 54 | ||
| 55 | static struct kmem_cache *scsi_sdb_cache; | ||
| 56 | static struct kmem_cache *scsi_sense_cache; | 55 | static struct kmem_cache *scsi_sense_cache; |
| 57 | static struct kmem_cache *scsi_sense_isadma_cache; | 56 | static struct kmem_cache *scsi_sense_isadma_cache; |
| 58 | static DEFINE_MUTEX(scsi_sense_cache_mutex); | 57 | static DEFINE_MUTEX(scsi_sense_cache_mutex); |
| @@ -390,7 +389,7 @@ static void scsi_single_lun_run(struct scsi_device *current_sdev) · 331 unmodified lines | |||
| 390 | spin_unlock_irqrestore(shost->host_lock, flags); | 389 | spin_unlock_irqrestore(shost->host_lock, flags); |
| 391 | scsi_kick_queue(sdev->request_queue); | 390 | scsi_kick_queue(sdev->request_queue); |
| 392 | spin_lock_irqsave(shost->host_lock, flags); | 391 | spin_lock_irqsave(shost->host_lock, flags); |
| 393 | 392 | ||
| 394 | scsi_device_put(sdev); | 393 | scsi_device_put(sdev); |
| 395 | } | 394 | } |
| 396 | out: | 395 | out: |
| @@ -1461,18 +1460,18 @@ static void scsi_softirq_done(struct request *rq) · 1064 unmodified lines | |||
| 1461 | scsi_log_completion(cmd, disposition); | 1460 | scsi_log_completion(cmd, disposition); |
| 1462 | 1461 | ||
| 1463 | switch (disposition) { | 1462 | switch (disposition) { |
| 1464 | case SUCCESS: | 1463 | case SUCCESS: |
| 1465 | scsi_finish_command(cmd); | 1464 | scsi_finish_command(cmd); |
| 1466 | break; | 1465 | break; |
| 1467 | case NEEDS_RETRY: | 1466 | case NEEDS_RETRY: |
| 1468 | scsi_queue_insert(cmd, SCSI_MLQUEUE_EH_RETRY); | 1467 | scsi_queue_insert(cmd, SCSI_MLQUEUE_EH_RETRY); |
| 1469 | break; | 1468 | break; |
| 1470 | case ADD_TO_MLQUEUE: | 1469 | case ADD_TO_MLQUEUE: |
| 1471 | scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY); | 1470 | scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY); |
| 1472 | break; | 1471 | break; |
| 1473 | default: | 1472 | default: |
| 1474 | scsi_eh_scmd_add(cmd); | 1473 | scsi_eh_scmd_add(cmd); |
| 1475 | break; | 1474 | break; |
| 1476 | } | 1475 | } |
| 1477 | } | 1476 | } |
| 1478 | 1477 | ||
| @@ -1953,24 +1952,10 @@ void scsi_unblock_requests(struct Scsi_Host *shost) · 474 unmodified lines | |||
| 1953 | } | 1952 | } |
| 1954 | EXPORT_SYMBOL(scsi_unblock_requests); | 1953 | EXPORT_SYMBOL(scsi_unblock_requests); |
| 1955 | 1954 | ||
| 1956 | int __init scsi_init_queue(void) | ||
| 1957 | { | ||
| 1958 | scsi_sdb_cache = kmem_cache_create("scsi_data_buffer", | ||
| 1959 | sizeof(struct scsi_data_buffer), | ||
| 1960 | 0, 0, NULL); | ||
| 1961 | if (!scsi_sdb_cache) { | ||
| 1962 | printk(KERN_ERR "SCSI: can't init scsi sdb cache\n"); | ||
| 1963 | return -ENOMEM; | ||
| 1964 | } | ||
| 1965 | |||
| 1966 | return 0; | ||
| 1967 | } | ||
| 1968 | |||
| 1969 | void scsi_exit_queue(void) | 1955 | void scsi_exit_queue(void) |
| 1970 | { | 1956 | { |
| 1971 | kmem_cache_destroy(scsi_sense_cache); | 1957 | kmem_cache_destroy(scsi_sense_cache); |
| 1972 | kmem_cache_destroy(scsi_sense_isadma_cache); | 1958 | kmem_cache_destroy(scsi_sense_isadma_cache); |
| 1973 | kmem_cache_destroy(scsi_sdb_cache); | ||
| 1974 | } | 1959 | } |
| 1975 | 1960 | ||
| 1976 | /** | 1961 | /** |
| @@ -2037,7 +2022,6 @@ scsi_mode_select(struct scsi_device *sdev, int pf, int sp, int modepage, · 60 unmodified lines | |||
| 2037 | real_buffer[1] = data->medium_type; | 2022 | real_buffer[1] = data->medium_type; |
| 2038 | real_buffer[2] = data->device_specific; | 2023 | real_buffer[2] = data->device_specific; |
| 2039 | real_buffer[3] = data->block_descriptor_length; | 2024 | real_buffer[3] = data->block_descriptor_length; |
| 2040 | |||
| 2041 | 2025 | ||
| 2042 | cmd[0] = MODE_SELECT; | 2026 | cmd[0] = MODE_SELECT; |
| 2043 | cmd[4] = len; | 2027 | cmd[4] = len; |
| @@ -2123,7 +2107,7 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, · 79 unmodified lines | |||
| 2123 | if (scsi_sense_valid(sshdr)) { | 2107 | if (scsi_sense_valid(sshdr)) { |
| 2124 | if ((sshdr->sense_key == ILLEGAL_REQUEST) && | 2108 | if ((sshdr->sense_key == ILLEGAL_REQUEST) && |
| 2125 | (sshdr->asc == 0x20) && (sshdr->ascq == 0)) { | 2109 | (sshdr->asc == 0x20) && (sshdr->ascq == 0)) { |
| 2126 | /* | 2110 | /* |
| 2127 | * Invalid command operation code | 2111 | * Invalid command operation code |
| 2128 | */ | 2112 | */ |
| 2129 | sdev->use_10_for_ms = 0; | 2113 | sdev->use_10_for_ms = 0; |
| @@ -2132,7 +2116,7 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, · 2 unmodified lines | |||
| 2132 | } | 2116 | } |
| 2133 | } | 2117 | } |
| 2134 | 2118 | ||
| 2135 | if(scsi_status_is_good(result)) { | 2119 | if (scsi_status_is_good(result)) { |
| 2136 | if (unlikely(buffer[0] == 0x86 && buffer[1] == 0x0b && | 2120 | if (unlikely(buffer[0] == 0x86 && buffer[1] == 0x0b && |
| 2137 | (modepage == 6 || modepage == 8))) { | 2121 | (modepage == 6 || modepage == 8))) { |
| 2138 | /* Initio breakage? */ | 2122 | /* Initio breakage? */ |
| @@ -2142,7 +2126,7 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, · 3 unmodified lines | |||
| 2142 | data->device_specific = 0; | 2126 | data->device_specific = 0; |
| 2143 | data->longlba = 0; | 2127 | data->longlba = 0; |
| 2144 | data->block_descriptor_length = 0; | 2128 | data->block_descriptor_length = 0; |
| 2145 | } else if(use_10_for_ms) { | 2129 | } else if (use_10_for_ms) { |
| 2146 | data->length = buffer[0]*256 + buffer[1] + 2; | 2130 | data->length = buffer[0]*256 + buffer[1] + 2; |
| 2147 | data->medium_type = buffer[2]; | 2131 | data->medium_type = buffer[2]; |
| 2148 | data->device_specific = buffer[3]; | 2132 | data->device_specific = buffer[3]; |
| @@ -2225,7 +2209,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) · 76 unmodified lines | |||
| 2225 | goto illegal; | 2209 | goto illegal; |
| 2226 | } | 2210 | } |
| 2227 | break; | 2211 | break; |
| 2228 | 2212 | ||
| 2229 | case SDEV_RUNNING: | 2213 | case SDEV_RUNNING: |
| 2230 | switch (oldstate) { | 2214 | switch (oldstate) { |
| 2231 | case SDEV_CREATED: | 2215 | case SDEV_CREATED: |
| @@ -2510,7 +2494,7 @@ EXPORT_SYMBOL_GPL(sdev_evt_send_simple); · 278 unmodified lines | |||
| 2510 | * (which must be a legal transition). When the device is in this | 2494 | * (which must be a legal transition). When the device is in this |
| 2511 | * state, only special requests will be accepted, all others will | 2495 | * state, only special requests will be accepted, all others will |
| 2512 | * be deferred. Since special requests may also be requeued requests, | 2496 | * be deferred. Since special requests may also be requeued requests, |
| 2513 | * a successful return doesn't guarantee the device will be | 2497 | * a successful return doesn't guarantee the device will be |
| 2514 | * totally quiescent. | 2498 | * totally quiescent. |
| 2515 | * | 2499 | * |
| 2516 | * Must be called with user context, may sleep. | 2500 | * Must be called with user context, may sleep. |
| @@ -2636,10 +2620,10 @@ int scsi_internal_device_block_nowait(struct scsi_device *sdev) · 119 unmodified lines | |||
| 2636 | return err; | 2620 | return err; |
| 2637 | } | 2621 | } |
| 2638 | 2622 | ||
| 2639 | /* | 2623 | /* |
| 2640 | * The device has transitioned to SDEV_BLOCK. Stop the | 2624 | * The device has transitioned to SDEV_BLOCK. Stop the |
| 2641 | * block layer from calling the midlayer with this device's | 2625 | * block layer from calling the midlayer with this device's |
| 2642 | * request queue. | 2626 | * request queue. |
| 2643 | */ | 2627 | */ |
| 2644 | blk_mq_quiesce_queue_nowait(q); | 2628 | blk_mq_quiesce_queue_nowait(q); |
| 2645 | return 0; | 2629 | return 0; |
| @@ -2674,7 +2658,7 @@ static int scsi_internal_device_block(struct scsi_device *sdev) · 28 unmodified lines | |||
| 2674 | 2658 | ||
| 2675 | return err; | 2659 | return err; |
| 2676 | } | 2660 | } |
| 2677 | 2661 | ||
| 2678 | void scsi_start_queue(struct scsi_device *sdev) | 2662 | void scsi_start_queue(struct scsi_device *sdev) |
| 2679 | { | 2663 | { |
| 2680 | struct request_queue *q = sdev->request_queue; | 2664 | struct request_queue *q = sdev->request_queue; |
| @@ -2833,8 +2817,10 @@ scsi_host_block(struct Scsi_Host *shost) · 152 unmodified lines | |||
| 2833 | mutex_lock(&sdev->state_mutex); | 2817 | mutex_lock(&sdev->state_mutex); |
| 2834 | ret = scsi_internal_device_block_nowait(sdev); | 2818 | ret = scsi_internal_device_block_nowait(sdev); |
| 2835 | mutex_unlock(&sdev->state_mutex); | 2819 | mutex_unlock(&sdev->state_mutex); |
| 2836 | if (ret) | 2820 | if (ret) { |
| 2821 | scsi_device_put(sdev); | ||
| 2837 | break; | 2822 | break; |
| 2823 | } | ||
| 2838 | } | 2824 | } |
| 2839 | 2825 | ||
| 2840 | /* | 2826 | /* |
| @@ -205,13 +205,9 @@ void scsi_print_command(struct scsi_cmnd *cmd) · 204 unmodified lines | |||
| 205 | /* Print opcode in one line and use separate lines for CDB */ | 205 | /* Print opcode in one line and use separate lines for CDB */ |
| 206 | off += scnprintf(logbuf + off, logbuf_len - off, "\n"); | 206 | off += scnprintf(logbuf + off, logbuf_len - off, "\n"); |
| 207 | dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); | 207 | dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); |
| 208 | scsi_log_release_buffer(logbuf); | ||
| 209 | for (k = 0; k < cmd->cmd_len; k += 16) { | 208 | for (k = 0; k < cmd->cmd_len; k += 16) { |
| 210 | size_t linelen = min(cmd->cmd_len - k, 16); | 209 | size_t linelen = min(cmd->cmd_len - k, 16); |
| 211 | 210 | ||
| 212 | logbuf = scsi_log_reserve_buffer(&logbuf_len); | ||
| 213 | if (!logbuf) | ||
| 214 | break; | ||
| 215 | off = sdev_format_header(logbuf, logbuf_len, | 211 | off = sdev_format_header(logbuf, logbuf_len, |
| 216 | scmd_name(cmd), | 212 | scmd_name(cmd), |
| 217 | cmd->request->tag); | 213 | cmd->request->tag); |
| @@ -224,9 +220,8 @@ void scsi_print_command(struct scsi_cmnd *cmd) · 6 unmodified lines | |||
| 224 | } | 220 | } |
| 225 | dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", | 221 | dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", |
| 226 | logbuf); | 222 | logbuf); |
| 227 | scsi_log_release_buffer(logbuf); | ||
| 228 | } | 223 | } |
| 229 | return; | 224 | goto out; |
| 230 | } | 225 | } |
| 231 | if (!WARN_ON(off > logbuf_len - 49)) { | 226 | if (!WARN_ON(off > logbuf_len - 49)) { |
| 232 | off += scnprintf(logbuf + off, logbuf_len - off, " "); | 227 | off += scnprintf(logbuf + off, logbuf_len - off, " "); |
| @@ -236,6 +231,7 @@ void scsi_print_command(struct scsi_cmnd *cmd) · 3 unmodified lines | |||
| 236 | } | 231 | } |
| 237 | out_printk: | 232 | out_printk: |
| 238 | dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); | 233 | dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf); |
| 234 | out: | ||
| 239 | scsi_log_release_buffer(logbuf); | 235 | scsi_log_release_buffer(logbuf); |
| 240 | } | 236 | } |
| 241 | EXPORT_SYMBOL(scsi_print_command); | 237 | EXPORT_SYMBOL(scsi_print_command); |
| @@ -80,10 +80,6 @@ static int scsi_dev_type_resume(struct device *dev, · 79 unmodified lines | |||
| 80 | dev_dbg(dev, "scsi resume: %d\n", err); | 80 | dev_dbg(dev, "scsi resume: %d\n", err); |
| 81 | 81 | ||
| 82 | if (err == 0) { | 82 | if (err == 0) { |
| 83 | bool was_runtime_suspended; | ||
| 84 | |||
| 85 | was_runtime_suspended = pm_runtime_suspended(dev); | ||
| 86 | |||
| 87 | pm_runtime_disable(dev); | 83 | pm_runtime_disable(dev); |
| 88 | err = pm_runtime_set_active(dev); | 84 | err = pm_runtime_set_active(dev); |
| 89 | pm_runtime_enable(dev); | 85 | pm_runtime_enable(dev); |
| @@ -97,10 +93,8 @@ static int scsi_dev_type_resume(struct device *dev, · 7 unmodified lines | |||
| 97 | */ | 93 | */ |
| 98 | if (!err && scsi_is_sdev_device(dev)) { | 94 | if (!err && scsi_is_sdev_device(dev)) { |
| 99 | struct scsi_device *sdev = to_scsi_device(dev); | 95 | struct scsi_device *sdev = to_scsi_device(dev); |
| 100 | if (was_runtime_suspended) | 96 | |
| 101 | blk_post_runtime_resume(sdev->request_queue, 0); | 97 | blk_set_runtime_active(sdev->request_queue); |
| 102 | else | ||
| 103 | blk_set_runtime_active(sdev->request_queue); | ||
| 104 | } | 98 | } |
| 105 | } | 99 | } |
| 106 | 100 | ||
| @@ -93,7 +93,6 @@ extern struct request_queue *scsi_mq_alloc_queue(struct scsi_device *sdev); · 92 unmodified lines | |||
| 93 | extern void scsi_start_queue(struct scsi_device *sdev); | 93 | extern void scsi_start_queue(struct scsi_device *sdev); |
| 94 | extern int scsi_mq_setup_tags(struct Scsi_Host *shost); | 94 | extern int scsi_mq_setup_tags(struct Scsi_Host *shost); |
| 95 | extern void scsi_mq_destroy_tags(struct Scsi_Host *shost); | 95 | extern void scsi_mq_destroy_tags(struct Scsi_Host *shost); |
| 96 | extern int scsi_init_queue(void); | ||
| 97 | extern void scsi_exit_queue(void); | 96 | extern void scsi_exit_queue(void); |
| 98 | extern void scsi_evt_thread(struct work_struct *work); | 97 | extern void scsi_evt_thread(struct work_struct *work); |
| 99 | struct request_queue; | 98 | struct request_queue; |
| @@ -1623,7 +1623,6 @@ static DEFINE_MUTEX(rx_queue_mutex); · 1622 unmodified lines | |||
| 1623 | static DEFINE_MUTEX(conn_mutex); | 1623 | static DEFINE_MUTEX(conn_mutex); |
| 1624 | 1624 | ||
| 1625 | static LIST_HEAD(sesslist); | 1625 | static LIST_HEAD(sesslist); |
| 1626 | static LIST_HEAD(sessdestroylist); | ||
| 1627 | static DEFINE_SPINLOCK(sesslock); | 1626 | static DEFINE_SPINLOCK(sesslock); |
| 1628 | static LIST_HEAD(connlist); | 1627 | static LIST_HEAD(connlist); |
| 1629 | static LIST_HEAD(connlist_err); | 1628 | static LIST_HEAD(connlist_err); |
| @@ -1978,10 +1977,11 @@ void iscsi_unblock_session(struct iscsi_cls_session *session) · 348 unmodified lines | |||
| 1978 | { | 1977 | { |
| 1979 | queue_work(iscsi_eh_timer_workq, &session->unblock_work); | 1978 | queue_work(iscsi_eh_timer_workq, &session->unblock_work); |
| 1980 | /* | 1979 | /* |
| 1981 | * make sure all the events have completed before tell the driver | 1980 | * Blocking the session can be done from any context so we only |
| 1982 | * it is safe | 1981 | * queue the block work. Make sure the unblock work has completed |
| 1982 | * because it flushes/cancels the other works and updates the state. | ||
| 1983 | */ | 1983 | */ |
| 1984 | flush_workqueue(iscsi_eh_timer_workq); | 1984 | flush_work(&session->unblock_work); |
| 1985 | } | 1985 | } |
| 1986 | EXPORT_SYMBOL_GPL(iscsi_unblock_session); | 1986 | EXPORT_SYMBOL_GPL(iscsi_unblock_session); |
| 1987 | 1987 | ||
| @@ -2036,11 +2036,11 @@ static void __iscsi_unbind_session(struct work_struct *work) · 48 unmodified lines | |||
| 2036 | spin_unlock_irqrestore(&session->lock, flags); | 2036 | spin_unlock_irqrestore(&session->lock, flags); |
| 2037 | mutex_unlock(&ihost->mutex); | 2037 | mutex_unlock(&ihost->mutex); |
| 2038 | 2038 | ||
| 2039 | scsi_remove_target(&session->dev); | ||
| 2040 | |||
| 2039 | if (session->ida_used) | 2041 | if (session->ida_used) |
| 2040 | ida_simple_remove(&iscsi_sess_ida, target_id); | 2042 | ida_simple_remove(&iscsi_sess_ida, target_id); |
| 2041 | 2043 | ||
| 2042 | scsi_remove_target(&session->dev); | ||
| 2043 | |||
| 2044 | unbind_session_exit: | 2044 | unbind_session_exit: |
| 2045 | iscsi_session_event(session, ISCSI_KEVENT_UNBIND_SESSION); | 2045 | iscsi_session_event(session, ISCSI_KEVENT_UNBIND_SESSION); |
| 2046 | ISCSI_DBG_TRANS_SESSION(session, "Completed target removal\n"); | 2046 | ISCSI_DBG_TRANS_SESSION(session, "Completed target removal\n"); |
| @@ -2202,14 +2202,13 @@ void iscsi_remove_session(struct iscsi_cls_session *session) · 155 unmodified lines | |||
| 2202 | ISCSI_DBG_TRANS_SESSION(session, "Removing session\n"); | 2202 | ISCSI_DBG_TRANS_SESSION(session, "Removing session\n"); |
| 2203 | 2203 | ||
| 2204 | spin_lock_irqsave(&sesslock, flags); | 2204 | spin_lock_irqsave(&sesslock, flags); |
| 2205 | list_del(&session->sess_list); | 2205 | if (!list_empty(&session->sess_list)) |
| 2206 | list_del(&session->sess_list); | ||
| 2206 | spin_unlock_irqrestore(&sesslock, flags); | 2207 | spin_unlock_irqrestore(&sesslock, flags); |
| 2207 | 2208 | ||
| 2208 | /* make sure there are no blocks/unblocks queued */ | 2209 | flush_work(&session->block_work); |
| 2209 | flush_workqueue(iscsi_eh_timer_workq); | 2210 | flush_work(&session->unblock_work); |
| 2210 | /* make sure the timedout callout is not running */ | 2211 | cancel_delayed_work_sync(&session->recovery_work); |
| 2211 | if (!cancel_delayed_work(&session->recovery_work)) | ||
| 2212 | flush_workqueue(iscsi_eh_timer_workq); | ||
| 2213 | /* | 2212 | /* |
| 2214 | * If we are blocked let commands flow again. The lld or iscsi | 2213 | * If we are blocked let commands flow again. The lld or iscsi |
| 2215 | * layer should set up the queuecommand to fail commands. | 2214 | * layer should set up the queuecommand to fail commands. |
| @@ -3291,7 +3290,7 @@ static int iscsi_set_flashnode_param(struct iscsi_transport *transport, · 1075 unmodified lines | |||
| 3291 | pr_err("%s could not find host no %u\n", | 3290 | pr_err("%s could not find host no %u\n", |
| 3292 | __func__, ev->u.set_flashnode.host_no); | 3291 | __func__, ev->u.set_flashnode.host_no); |
| 3293 | err = -ENODEV; | 3292 | err = -ENODEV; |
| 3294 | goto put_host; | 3293 | goto exit_set_fnode; |
| 3295 | } | 3294 | } |
| 3296 | 3295 | ||
| 3297 | idx = ev->u.set_flashnode.flashnode_idx; | 3296 | idx = ev->u.set_flashnode.flashnode_idx; |
| @@ -3679,7 +3678,7 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, uint32_t *group) · 381 unmodified lines | |||
| 3679 | 3678 | ||
| 3680 | /* Prevent this session from being found again */ | 3679 | /* Prevent this session from being found again */ |
| 3681 | spin_lock_irqsave(&sesslock, flags); | 3680 | spin_lock_irqsave(&sesslock, flags); |
| 3682 | list_move(&session->sess_list, &sessdestroylist); | 3681 | list_del_init(&session->sess_list); |
| 3683 | spin_unlock_irqrestore(&sesslock, flags); | 3682 | spin_unlock_irqrestore(&sesslock, flags); |
| 3684 | 3683 | ||
| 3685 | queue_work(iscsi_destroy_workq, &session->destroy_work); | 3684 | queue_work(iscsi_destroy_workq, &session->destroy_work); |
| @@ -4766,7 +4765,9 @@ static __init int iscsi_transport_init(void) · 1080 unmodified lines | |||
| 4766 | goto release_nls; | 4765 | goto release_nls; |
| 4767 | } | 4766 | } |
| 4768 | 4767 | ||
| 4769 | iscsi_destroy_workq = create_singlethread_workqueue("iscsi_destroy"); | 4768 | iscsi_destroy_workq = alloc_workqueue("%s", |
| 4769 | WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, | ||
| 4770 | 1, "iscsi_destroy"); | ||
| 4770 | if (!iscsi_destroy_workq) { | 4771 | if (!iscsi_destroy_workq) { |
| 4771 | err = -ENOMEM; | 4772 | err = -ENOMEM; |
| 4772 | goto destroy_wq; | 4773 | goto destroy_wq; |
| @@ -563,7 +563,7 @@ show_sas_phy_enable(struct device *dev, struct device_attribute *attr, · 562 unmodified lines | |||
| 563 | { | 563 | { |
| 564 | struct sas_phy *phy = transport_class_to_phy(dev); | 564 | struct sas_phy *phy = transport_class_to_phy(dev); |
| 565 | 565 | ||
| 566 | return snprintf(buf, 20, "%d", phy->enabled); | 566 | return snprintf(buf, 20, "%d\n", phy->enabled); |
| 567 | } | 567 | } |
| 568 | 568 | ||
| 569 | static DEVICE_ATTR(enable, S_IRUGO | S_IWUSR, show_sas_phy_enable, | 569 | static DEVICE_ATTR(enable, S_IRUGO | S_IWUSR, show_sas_phy_enable, |
| @@ -395,6 +395,10 @@ static void srp_reconnect_work(struct work_struct *work) · 394 unmodified lines | |||
| 395 | } | 395 | } |
| 396 | } | 396 | } |
| 397 | 397 | ||
| 398 | /* | ||
| 399 | * scsi_target_block() must have been called before this function is | ||
| 400 | * called to guarantee that no .queuecommand() calls are in progress. | ||
| 401 | */ | ||
| 398 | static void __rport_fail_io_fast(struct srp_rport *rport) | 402 | static void __rport_fail_io_fast(struct srp_rport *rport) |
| 399 | { | 403 | { |
| 400 | struct Scsi_Host *shost = rport_to_shost(rport); | 404 | struct Scsi_Host *shost = rport_to_shost(rport); |
| @@ -404,11 +408,7 @@ static void __rport_fail_io_fast(struct srp_rport *rport) · 3 unmodified lines | |||
| 404 | 408 | ||
| 405 | if (srp_rport_set_state(rport, SRP_RPORT_FAIL_FAST)) | 409 | if (srp_rport_set_state(rport, SRP_RPORT_FAIL_FAST)) |
| 406 | return; | 410 | return; |
| 407 | /* | 411 | |
| 408 | * Call scsi_target_block() to wait for ongoing shost->queuecommand() | ||
| 409 | * calls before invoking i->f->terminate_rport_io(). | ||
| 410 | */ | ||
| 411 | scsi_target_block(rport->dev.parent); | ||
| 412 | scsi_target_unblock(rport->dev.parent, SDEV_TRANSPORT_OFFLINE); | 412 | scsi_target_unblock(rport->dev.parent, SDEV_TRANSPORT_OFFLINE); |
| 413 | 413 | ||
| 414 | /* Involve the LLD if possible to terminate all I/O on the rport. */ | 414 | /* Involve the LLD if possible to terminate all I/O on the rport. */ |
| @@ -570,8 +570,6 @@ int srp_reconnect_rport(struct srp_rport *rport) · 155 unmodified lines | |||
| 570 | * failure timers if these had not yet been started. | 570 | * failure timers if these had not yet been started. |
| 571 | */ | 571 | */ |
| 572 | __rport_fail_io_fast(rport); | 572 | __rport_fail_io_fast(rport); |
| 573 | scsi_target_unblock(&shost->shost_gendev, | ||
| 574 | SDEV_TRANSPORT_OFFLINE); | ||
| 575 | __srp_start_tl_fail_timers(rport); | 573 | __srp_start_tl_fail_timers(rport); |
2 more lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 48 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 50 lines aren’t shown here.
This diff is large: its 33 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 1298 lines aren’t shown here.
This diff is large: its 288 lines aren’t shown here.
This diff is large: its 270 lines aren’t shown here.
This diff is large: its 25 lines aren’t shown here.
This diff is large: its 246 lines aren’t shown here.
This diff is large: its 84 lines aren’t shown here.
This diff is large: its 39 lines aren’t shown here.
This diff is large: its 63 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 24 lines aren’t shown here.
This diff is large: its 246 lines aren’t shown here.
This diff is large: its 78 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 38 lines aren’t shown here.
This diff is large: its 1063 lines aren’t shown here.
This diff is large: its 222 lines aren’t shown here.
This diff is large: its 150 lines aren’t shown here.
This diff is large: its 54 lines aren’t shown here.
This diff is large: its 43 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 69 lines aren’t shown here.
This diff is large: its 44 lines aren’t shown here.
This diff is large: its 70 lines aren’t shown here.
This diff is large: its 166 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 128 lines aren’t shown here.
This diff is large: its 77 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 665 lines aren’t shown here.
This diff is large: its 30 lines aren’t shown here.
This diff is large: its 40 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 38 lines aren’t shown here.
This diff is large: its 46 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.