diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 258 |
1 files changed, 180 insertions, 78 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 635eeb3d6987..06f9a5b79e66 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************* | 1 | /******************************************************************* |
2 | * This file is part of the Emulex Linux Device Driver for * | 2 | * This file is part of the Emulex Linux Device Driver for * |
3 | * Fibre Channel Host Bus Adapters. * | 3 | * Fibre Channel Host Bus Adapters. * |
4 | * Copyright (C) 2004-2013 Emulex. All rights reserved. * | 4 | * Copyright (C) 2004-2014 Emulex. All rights reserved. * |
5 | * EMULEX and SLI are trademarks of Emulex. * | 5 | * EMULEX and SLI are trademarks of Emulex. * |
6 | * www.emulex.com * | 6 | * www.emulex.com * |
7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * | 7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * |
@@ -820,57 +820,153 @@ lpfc_hba_down_prep(struct lpfc_hba *phba) | |||
820 | } | 820 | } |
821 | 821 | ||
822 | /** | 822 | /** |
823 | * lpfc_hba_down_post_s3 - Perform lpfc uninitialization after HBA reset | 823 | * lpfc_sli4_free_sp_events - Cleanup sp_queue_events to free |
824 | * rspiocb which got deferred | ||
825 | * | ||
824 | * @phba: pointer to lpfc HBA data structure. | 826 | * @phba: pointer to lpfc HBA data structure. |
825 | * | 827 | * |
826 | * This routine will do uninitialization after the HBA is reset when bring | 828 | * This routine will cleanup completed slow path events after HBA is reset |
827 | * down the SLI Layer. | 829 | * when bringing down the SLI Layer. |
830 | * | ||
828 | * | 831 | * |
829 | * Return codes | 832 | * Return codes |
830 | * 0 - success. | 833 | * void. |
831 | * Any other value - error. | ||
832 | **/ | 834 | **/ |
833 | static int | 835 | static void |
834 | lpfc_hba_down_post_s3(struct lpfc_hba *phba) | 836 | lpfc_sli4_free_sp_events(struct lpfc_hba *phba) |
837 | { | ||
838 | struct lpfc_iocbq *rspiocbq; | ||
839 | struct hbq_dmabuf *dmabuf; | ||
840 | struct lpfc_cq_event *cq_event; | ||
841 | |||
842 | spin_lock_irq(&phba->hbalock); | ||
843 | phba->hba_flag &= ~HBA_SP_QUEUE_EVT; | ||
844 | spin_unlock_irq(&phba->hbalock); | ||
845 | |||
846 | while (!list_empty(&phba->sli4_hba.sp_queue_event)) { | ||
847 | /* Get the response iocb from the head of work queue */ | ||
848 | spin_lock_irq(&phba->hbalock); | ||
849 | list_remove_head(&phba->sli4_hba.sp_queue_event, | ||
850 | cq_event, struct lpfc_cq_event, list); | ||
851 | spin_unlock_irq(&phba->hbalock); | ||
852 | |||
853 | switch (bf_get(lpfc_wcqe_c_code, &cq_event->cqe.wcqe_cmpl)) { | ||
854 | case CQE_CODE_COMPL_WQE: | ||
855 | rspiocbq = container_of(cq_event, struct lpfc_iocbq, | ||
856 | cq_event); | ||
857 | lpfc_sli_release_iocbq(phba, rspiocbq); | ||
858 | break; | ||
859 | case CQE_CODE_RECEIVE: | ||
860 | case CQE_CODE_RECEIVE_V1: | ||
861 | dmabuf = container_of(cq_event, struct hbq_dmabuf, | ||
862 | cq_event); | ||
863 | lpfc_in_buf_free(phba, &dmabuf->dbuf); | ||
864 | } | ||
865 | } | ||
866 | } | ||
867 | |||
868 | /** | ||
869 | * lpfc_hba_free_post_buf - Perform lpfc uninitialization after HBA reset | ||
870 | * @phba: pointer to lpfc HBA data structure. | ||
871 | * | ||
872 | * This routine will cleanup posted ELS buffers after the HBA is reset | ||
873 | * when bringing down the SLI Layer. | ||
874 | * | ||
875 | * | ||
876 | * Return codes | ||
877 | * void. | ||
878 | **/ | ||
879 | static void | ||
880 | lpfc_hba_free_post_buf(struct lpfc_hba *phba) | ||
835 | { | 881 | { |
836 | struct lpfc_sli *psli = &phba->sli; | 882 | struct lpfc_sli *psli = &phba->sli; |
837 | struct lpfc_sli_ring *pring; | 883 | struct lpfc_sli_ring *pring; |
838 | struct lpfc_dmabuf *mp, *next_mp; | 884 | struct lpfc_dmabuf *mp, *next_mp; |
839 | LIST_HEAD(completions); | 885 | LIST_HEAD(buflist); |
840 | int i; | 886 | int count; |
841 | 887 | ||
842 | if (phba->sli3_options & LPFC_SLI3_HBQ_ENABLED) | 888 | if (phba->sli3_options & LPFC_SLI3_HBQ_ENABLED) |
843 | lpfc_sli_hbqbuf_free_all(phba); | 889 | lpfc_sli_hbqbuf_free_all(phba); |
844 | else { | 890 | else { |
845 | /* Cleanup preposted buffers on the ELS ring */ | 891 | /* Cleanup preposted buffers on the ELS ring */ |
846 | pring = &psli->ring[LPFC_ELS_RING]; | 892 | pring = &psli->ring[LPFC_ELS_RING]; |
847 | list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) { | 893 | spin_lock_irq(&phba->hbalock); |
894 | list_splice_init(&pring->postbufq, &buflist); | ||
895 | spin_unlock_irq(&phba->hbalock); | ||
896 | |||
897 | count = 0; | ||
898 | list_for_each_entry_safe(mp, next_mp, &buflist, list) { | ||
848 | list_del(&mp->list); | 899 | list_del(&mp->list); |
849 | pring->postbufq_cnt--; | 900 | count++; |
850 | lpfc_mbuf_free(phba, mp->virt, mp->phys); | 901 | lpfc_mbuf_free(phba, mp->virt, mp->phys); |
851 | kfree(mp); | 902 | kfree(mp); |
852 | } | 903 | } |
904 | |||
905 | spin_lock_irq(&phba->hbalock); | ||
906 | pring->postbufq_cnt -= count; | ||
907 | spin_unlock_irq(&phba->hbalock); | ||
853 | } | 908 | } |
909 | } | ||
910 | |||
911 | /** | ||
912 | * lpfc_hba_clean_txcmplq - Perform lpfc uninitialization after HBA reset | ||
913 | * @phba: pointer to lpfc HBA data structure. | ||
914 | * | ||
915 | * This routine will cleanup the txcmplq after the HBA is reset when bringing | ||
916 | * down the SLI Layer. | ||
917 | * | ||
918 | * Return codes | ||
919 | * void | ||
920 | **/ | ||
921 | static void | ||
922 | lpfc_hba_clean_txcmplq(struct lpfc_hba *phba) | ||
923 | { | ||
924 | struct lpfc_sli *psli = &phba->sli; | ||
925 | struct lpfc_sli_ring *pring; | ||
926 | LIST_HEAD(completions); | ||
927 | int i; | ||
854 | 928 | ||
855 | spin_lock_irq(&phba->hbalock); | ||
856 | for (i = 0; i < psli->num_rings; i++) { | 929 | for (i = 0; i < psli->num_rings; i++) { |
857 | pring = &psli->ring[i]; | 930 | pring = &psli->ring[i]; |
858 | 931 | if (phba->sli_rev >= LPFC_SLI_REV4) | |
932 | spin_lock_irq(&pring->ring_lock); | ||
933 | else | ||
934 | spin_lock_irq(&phba->hbalock); | ||
859 | /* At this point in time the HBA is either reset or DOA. Either | 935 | /* At this point in time the HBA is either reset or DOA. Either |
860 | * way, nothing should be on txcmplq as it will NEVER complete. | 936 | * way, nothing should be on txcmplq as it will NEVER complete. |
861 | */ | 937 | */ |
862 | list_splice_init(&pring->txcmplq, &completions); | 938 | list_splice_init(&pring->txcmplq, &completions); |
863 | spin_unlock_irq(&phba->hbalock); | 939 | pring->txcmplq_cnt = 0; |
940 | |||
941 | if (phba->sli_rev >= LPFC_SLI_REV4) | ||
942 | spin_unlock_irq(&pring->ring_lock); | ||
943 | else | ||
944 | spin_unlock_irq(&phba->hbalock); | ||
864 | 945 | ||
865 | /* Cancel all the IOCBs from the completions list */ | 946 | /* Cancel all the IOCBs from the completions list */ |
866 | lpfc_sli_cancel_iocbs(phba, &completions, IOSTAT_LOCAL_REJECT, | 947 | lpfc_sli_cancel_iocbs(phba, &completions, IOSTAT_LOCAL_REJECT, |
867 | IOERR_SLI_ABORTED); | 948 | IOERR_SLI_ABORTED); |
868 | |||
869 | lpfc_sli_abort_iocb_ring(phba, pring); | 949 | lpfc_sli_abort_iocb_ring(phba, pring); |
870 | spin_lock_irq(&phba->hbalock); | ||
871 | } | 950 | } |
872 | spin_unlock_irq(&phba->hbalock); | 951 | } |
873 | 952 | ||
953 | /** | ||
954 | * lpfc_hba_down_post_s3 - Perform lpfc uninitialization after HBA reset | ||
955 | int i; | ||
956 | * @phba: pointer to lpfc HBA data structure. | ||
957 | * | ||
958 | * This routine will do uninitialization after the HBA is reset when bring | ||
959 | * down the SLI Layer. | ||
960 | * | ||
961 | * Return codes | ||
962 | * 0 - success. | ||
963 | * Any other value - error. | ||
964 | **/ | ||
965 | static int | ||
966 | lpfc_hba_down_post_s3(struct lpfc_hba *phba) | ||
967 | { | ||
968 | lpfc_hba_free_post_buf(phba); | ||
969 | lpfc_hba_clean_txcmplq(phba); | ||
874 | return 0; | 970 | return 0; |
875 | } | 971 | } |
876 | 972 | ||
@@ -890,13 +986,12 @@ lpfc_hba_down_post_s4(struct lpfc_hba *phba) | |||
890 | { | 986 | { |
891 | struct lpfc_scsi_buf *psb, *psb_next; | 987 | struct lpfc_scsi_buf *psb, *psb_next; |
892 | LIST_HEAD(aborts); | 988 | LIST_HEAD(aborts); |
893 | int ret; | ||
894 | unsigned long iflag = 0; | 989 | unsigned long iflag = 0; |
895 | struct lpfc_sglq *sglq_entry = NULL; | 990 | struct lpfc_sglq *sglq_entry = NULL; |
896 | 991 | ||
897 | ret = lpfc_hba_down_post_s3(phba); | 992 | lpfc_hba_free_post_buf(phba); |
898 | if (ret) | 993 | lpfc_hba_clean_txcmplq(phba); |
899 | return ret; | 994 | |
900 | /* At this point in time the HBA is either reset or DOA. Either | 995 | /* At this point in time the HBA is either reset or DOA. Either |
901 | * way, nothing should be on lpfc_abts_els_sgl_list, it needs to be | 996 | * way, nothing should be on lpfc_abts_els_sgl_list, it needs to be |
902 | * on the lpfc_sgl_list so that it can either be freed if the | 997 | * on the lpfc_sgl_list so that it can either be freed if the |
@@ -932,6 +1027,8 @@ lpfc_hba_down_post_s4(struct lpfc_hba *phba) | |||
932 | spin_lock_irqsave(&phba->scsi_buf_list_put_lock, iflag); | 1027 | spin_lock_irqsave(&phba->scsi_buf_list_put_lock, iflag); |
933 | list_splice(&aborts, &phba->lpfc_scsi_buf_list_put); | 1028 | list_splice(&aborts, &phba->lpfc_scsi_buf_list_put); |
934 | spin_unlock_irqrestore(&phba->scsi_buf_list_put_lock, iflag); | 1029 | spin_unlock_irqrestore(&phba->scsi_buf_list_put_lock, iflag); |
1030 | |||
1031 | lpfc_sli4_free_sp_events(phba); | ||
935 | return 0; | 1032 | return 0; |
936 | } | 1033 | } |
937 | 1034 | ||
@@ -1250,7 +1347,6 @@ static void | |||
1250 | lpfc_handle_deferred_eratt(struct lpfc_hba *phba) | 1347 | lpfc_handle_deferred_eratt(struct lpfc_hba *phba) |
1251 | { | 1348 | { |
1252 | uint32_t old_host_status = phba->work_hs; | 1349 | uint32_t old_host_status = phba->work_hs; |
1253 | struct lpfc_sli_ring *pring; | ||
1254 | struct lpfc_sli *psli = &phba->sli; | 1350 | struct lpfc_sli *psli = &phba->sli; |
1255 | 1351 | ||
1256 | /* If the pci channel is offline, ignore possible errors, | 1352 | /* If the pci channel is offline, ignore possible errors, |
@@ -1279,8 +1375,7 @@ lpfc_handle_deferred_eratt(struct lpfc_hba *phba) | |||
1279 | * dropped by the firmware. Error iocb (I/O) on txcmplq and let the | 1375 | * dropped by the firmware. Error iocb (I/O) on txcmplq and let the |
1280 | * SCSI layer retry it after re-establishing link. | 1376 | * SCSI layer retry it after re-establishing link. |
1281 | */ | 1377 | */ |
1282 | pring = &psli->ring[psli->fcp_ring]; | 1378 | lpfc_sli_abort_fcp_rings(phba); |
1283 | lpfc_sli_abort_iocb_ring(phba, pring); | ||
1284 | 1379 | ||
1285 | /* | 1380 | /* |
1286 | * There was a firmware error. Take the hba offline and then | 1381 | * There was a firmware error. Take the hba offline and then |
@@ -1348,7 +1443,6 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba) | |||
1348 | { | 1443 | { |
1349 | struct lpfc_vport *vport = phba->pport; | 1444 | struct lpfc_vport *vport = phba->pport; |
1350 | struct lpfc_sli *psli = &phba->sli; | 1445 | struct lpfc_sli *psli = &phba->sli; |
1351 | struct lpfc_sli_ring *pring; | ||
1352 | uint32_t event_data; | 1446 | uint32_t event_data; |
1353 | unsigned long temperature; | 1447 | unsigned long temperature; |
1354 | struct temp_event temp_event_data; | 1448 | struct temp_event temp_event_data; |
@@ -1400,8 +1494,7 @@ lpfc_handle_eratt_s3(struct lpfc_hba *phba) | |||
1400 | * Error iocb (I/O) on txcmplq and let the SCSI layer | 1494 | * Error iocb (I/O) on txcmplq and let the SCSI layer |
1401 | * retry it after re-establishing link. | 1495 | * retry it after re-establishing link. |
1402 | */ | 1496 | */ |
1403 | pring = &psli->ring[psli->fcp_ring]; | 1497 | lpfc_sli_abort_fcp_rings(phba); |
1404 | lpfc_sli_abort_iocb_ring(phba, pring); | ||
1405 | 1498 | ||
1406 | /* | 1499 | /* |
1407 | * There was a firmware error. Take the hba offline and then | 1500 | * There was a firmware error. Take the hba offline and then |
@@ -1940,78 +2033,81 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) | |||
1940 | 2033 | ||
1941 | switch (dev_id) { | 2034 | switch (dev_id) { |
1942 | case PCI_DEVICE_ID_FIREFLY: | 2035 | case PCI_DEVICE_ID_FIREFLY: |
1943 | m = (typeof(m)){"LP6000", "PCI", "Fibre Channel Adapter"}; | 2036 | m = (typeof(m)){"LP6000", "PCI", |
2037 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
1944 | break; | 2038 | break; |
1945 | case PCI_DEVICE_ID_SUPERFLY: | 2039 | case PCI_DEVICE_ID_SUPERFLY: |
1946 | if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) | 2040 | if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) |
1947 | m = (typeof(m)){"LP7000", "PCI", | 2041 | m = (typeof(m)){"LP7000", "PCI", ""}; |
1948 | "Fibre Channel Adapter"}; | ||
1949 | else | 2042 | else |
1950 | m = (typeof(m)){"LP7000E", "PCI", | 2043 | m = (typeof(m)){"LP7000E", "PCI", ""}; |
1951 | "Fibre Channel Adapter"}; | 2044 | m.function = "Obsolete, Unsupported Fibre Channel Adapter"; |
1952 | break; | 2045 | break; |
1953 | case PCI_DEVICE_ID_DRAGONFLY: | 2046 | case PCI_DEVICE_ID_DRAGONFLY: |
1954 | m = (typeof(m)){"LP8000", "PCI", | 2047 | m = (typeof(m)){"LP8000", "PCI", |
1955 | "Fibre Channel Adapter"}; | 2048 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1956 | break; | 2049 | break; |
1957 | case PCI_DEVICE_ID_CENTAUR: | 2050 | case PCI_DEVICE_ID_CENTAUR: |
1958 | if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) | 2051 | if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) |
1959 | m = (typeof(m)){"LP9002", "PCI", | 2052 | m = (typeof(m)){"LP9002", "PCI", ""}; |
1960 | "Fibre Channel Adapter"}; | ||
1961 | else | 2053 | else |
1962 | m = (typeof(m)){"LP9000", "PCI", | 2054 | m = (typeof(m)){"LP9000", "PCI", ""}; |
1963 | "Fibre Channel Adapter"}; | 2055 | m.function = "Obsolete, Unsupported Fibre Channel Adapter"; |
1964 | break; | 2056 | break; |
1965 | case PCI_DEVICE_ID_RFLY: | 2057 | case PCI_DEVICE_ID_RFLY: |
1966 | m = (typeof(m)){"LP952", "PCI", | 2058 | m = (typeof(m)){"LP952", "PCI", |
1967 | "Fibre Channel Adapter"}; | 2059 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1968 | break; | 2060 | break; |
1969 | case PCI_DEVICE_ID_PEGASUS: | 2061 | case PCI_DEVICE_ID_PEGASUS: |
1970 | m = (typeof(m)){"LP9802", "PCI-X", | 2062 | m = (typeof(m)){"LP9802", "PCI-X", |
1971 | "Fibre Channel Adapter"}; | 2063 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1972 | break; | 2064 | break; |
1973 | case PCI_DEVICE_ID_THOR: | 2065 | case PCI_DEVICE_ID_THOR: |
1974 | m = (typeof(m)){"LP10000", "PCI-X", | 2066 | m = (typeof(m)){"LP10000", "PCI-X", |
1975 | "Fibre Channel Adapter"}; | 2067 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1976 | break; | 2068 | break; |
1977 | case PCI_DEVICE_ID_VIPER: | 2069 | case PCI_DEVICE_ID_VIPER: |
1978 | m = (typeof(m)){"LPX1000", "PCI-X", | 2070 | m = (typeof(m)){"LPX1000", "PCI-X", |
1979 | "Fibre Channel Adapter"}; | 2071 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1980 | break; | 2072 | break; |
1981 | case PCI_DEVICE_ID_PFLY: | 2073 | case PCI_DEVICE_ID_PFLY: |
1982 | m = (typeof(m)){"LP982", "PCI-X", | 2074 | m = (typeof(m)){"LP982", "PCI-X", |
1983 | "Fibre Channel Adapter"}; | 2075 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1984 | break; | 2076 | break; |
1985 | case PCI_DEVICE_ID_TFLY: | 2077 | case PCI_DEVICE_ID_TFLY: |
1986 | m = (typeof(m)){"LP1050", "PCI-X", | 2078 | m = (typeof(m)){"LP1050", "PCI-X", |
1987 | "Fibre Channel Adapter"}; | 2079 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1988 | break; | 2080 | break; |
1989 | case PCI_DEVICE_ID_HELIOS: | 2081 | case PCI_DEVICE_ID_HELIOS: |
1990 | m = (typeof(m)){"LP11000", "PCI-X2", | 2082 | m = (typeof(m)){"LP11000", "PCI-X2", |
1991 | "Fibre Channel Adapter"}; | 2083 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1992 | break; | 2084 | break; |
1993 | case PCI_DEVICE_ID_HELIOS_SCSP: | 2085 | case PCI_DEVICE_ID_HELIOS_SCSP: |
1994 | m = (typeof(m)){"LP11000-SP", "PCI-X2", | 2086 | m = (typeof(m)){"LP11000-SP", "PCI-X2", |
1995 | "Fibre Channel Adapter"}; | 2087 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
1996 | break; | 2088 | break; |
1997 | case PCI_DEVICE_ID_HELIOS_DCSP: | 2089 | case PCI_DEVICE_ID_HELIOS_DCSP: |
1998 | m = (typeof(m)){"LP11002-SP", "PCI-X2", | 2090 | m = (typeof(m)){"LP11002-SP", "PCI-X2", |
1999 | "Fibre Channel Adapter"}; | 2091 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
2000 | break; | 2092 | break; |
2001 | case PCI_DEVICE_ID_NEPTUNE: | 2093 | case PCI_DEVICE_ID_NEPTUNE: |
2002 | m = (typeof(m)){"LPe1000", "PCIe", "Fibre Channel Adapter"}; | 2094 | m = (typeof(m)){"LPe1000", "PCIe", |
2095 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2003 | break; | 2096 | break; |
2004 | case PCI_DEVICE_ID_NEPTUNE_SCSP: | 2097 | case PCI_DEVICE_ID_NEPTUNE_SCSP: |
2005 | m = (typeof(m)){"LPe1000-SP", "PCIe", "Fibre Channel Adapter"}; | 2098 | m = (typeof(m)){"LPe1000-SP", "PCIe", |
2099 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2006 | break; | 2100 | break; |
2007 | case PCI_DEVICE_ID_NEPTUNE_DCSP: | 2101 | case PCI_DEVICE_ID_NEPTUNE_DCSP: |
2008 | m = (typeof(m)){"LPe1002-SP", "PCIe", "Fibre Channel Adapter"}; | 2102 | m = (typeof(m)){"LPe1002-SP", "PCIe", |
2103 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2009 | break; | 2104 | break; |
2010 | case PCI_DEVICE_ID_BMID: | 2105 | case PCI_DEVICE_ID_BMID: |
2011 | m = (typeof(m)){"LP1150", "PCI-X2", "Fibre Channel Adapter"}; | 2106 | m = (typeof(m)){"LP1150", "PCI-X2", "Fibre Channel Adapter"}; |
2012 | break; | 2107 | break; |
2013 | case PCI_DEVICE_ID_BSMB: | 2108 | case PCI_DEVICE_ID_BSMB: |
2014 | m = (typeof(m)){"LP111", "PCI-X2", "Fibre Channel Adapter"}; | 2109 | m = (typeof(m)){"LP111", "PCI-X2", |
2110 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2015 | break; | 2111 | break; |
2016 | case PCI_DEVICE_ID_ZEPHYR: | 2112 | case PCI_DEVICE_ID_ZEPHYR: |
2017 | m = (typeof(m)){"LPe11000", "PCIe", "Fibre Channel Adapter"}; | 2113 | m = (typeof(m)){"LPe11000", "PCIe", "Fibre Channel Adapter"}; |
@@ -2030,16 +2126,20 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) | |||
2030 | m = (typeof(m)){"LPe111", "PCIe", "Fibre Channel Adapter"}; | 2126 | m = (typeof(m)){"LPe111", "PCIe", "Fibre Channel Adapter"}; |
2031 | break; | 2127 | break; |
2032 | case PCI_DEVICE_ID_LP101: | 2128 | case PCI_DEVICE_ID_LP101: |
2033 | m = (typeof(m)){"LP101", "PCI-X", "Fibre Channel Adapter"}; | 2129 | m = (typeof(m)){"LP101", "PCI-X", |
2130 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2034 | break; | 2131 | break; |
2035 | case PCI_DEVICE_ID_LP10000S: | 2132 | case PCI_DEVICE_ID_LP10000S: |
2036 | m = (typeof(m)){"LP10000-S", "PCI", "Fibre Channel Adapter"}; | 2133 | m = (typeof(m)){"LP10000-S", "PCI", |
2134 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2037 | break; | 2135 | break; |
2038 | case PCI_DEVICE_ID_LP11000S: | 2136 | case PCI_DEVICE_ID_LP11000S: |
2039 | m = (typeof(m)){"LP11000-S", "PCI-X2", "Fibre Channel Adapter"}; | 2137 | m = (typeof(m)){"LP11000-S", "PCI-X2", |
2138 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2040 | break; | 2139 | break; |
2041 | case PCI_DEVICE_ID_LPE11000S: | 2140 | case PCI_DEVICE_ID_LPE11000S: |
2042 | m = (typeof(m)){"LPe11000-S", "PCIe", "Fibre Channel Adapter"}; | 2141 | m = (typeof(m)){"LPe11000-S", "PCIe", |
2142 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2043 | break; | 2143 | break; |
2044 | case PCI_DEVICE_ID_SAT: | 2144 | case PCI_DEVICE_ID_SAT: |
2045 | m = (typeof(m)){"LPe12000", "PCIe", "Fibre Channel Adapter"}; | 2145 | m = (typeof(m)){"LPe12000", "PCIe", "Fibre Channel Adapter"}; |
@@ -2060,20 +2160,21 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) | |||
2060 | m = (typeof(m)){"LPe12000-S", "PCIe", "Fibre Channel Adapter"}; | 2160 | m = (typeof(m)){"LPe12000-S", "PCIe", "Fibre Channel Adapter"}; |
2061 | break; | 2161 | break; |
2062 | case PCI_DEVICE_ID_HORNET: | 2162 | case PCI_DEVICE_ID_HORNET: |
2063 | m = (typeof(m)){"LP21000", "PCIe", "FCoE Adapter"}; | 2163 | m = (typeof(m)){"LP21000", "PCIe", |
2164 | "Obsolete, Unsupported FCoE Adapter"}; | ||
2064 | GE = 1; | 2165 | GE = 1; |
2065 | break; | 2166 | break; |
2066 | case PCI_DEVICE_ID_PROTEUS_VF: | 2167 | case PCI_DEVICE_ID_PROTEUS_VF: |
2067 | m = (typeof(m)){"LPev12000", "PCIe IOV", | 2168 | m = (typeof(m)){"LPev12000", "PCIe IOV", |
2068 | "Fibre Channel Adapter"}; | 2169 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
2069 | break; | 2170 | break; |
2070 | case PCI_DEVICE_ID_PROTEUS_PF: | 2171 | case PCI_DEVICE_ID_PROTEUS_PF: |
2071 | m = (typeof(m)){"LPev12000", "PCIe IOV", | 2172 | m = (typeof(m)){"LPev12000", "PCIe IOV", |
2072 | "Fibre Channel Adapter"}; | 2173 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
2073 | break; | 2174 | break; |
2074 | case PCI_DEVICE_ID_PROTEUS_S: | 2175 | case PCI_DEVICE_ID_PROTEUS_S: |
2075 | m = (typeof(m)){"LPemv12002-S", "PCIe IOV", | 2176 | m = (typeof(m)){"LPemv12002-S", "PCIe IOV", |
2076 | "Fibre Channel Adapter"}; | 2177 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
2077 | break; | 2178 | break; |
2078 | case PCI_DEVICE_ID_TIGERSHARK: | 2179 | case PCI_DEVICE_ID_TIGERSHARK: |
2079 | oneConnect = 1; | 2180 | oneConnect = 1; |
@@ -2089,17 +2190,24 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) | |||
2089 | break; | 2190 | break; |
2090 | case PCI_DEVICE_ID_BALIUS: | 2191 | case PCI_DEVICE_ID_BALIUS: |
2091 | m = (typeof(m)){"LPVe12002", "PCIe Shared I/O", | 2192 | m = (typeof(m)){"LPVe12002", "PCIe Shared I/O", |
2092 | "Fibre Channel Adapter"}; | 2193 | "Obsolete, Unsupported Fibre Channel Adapter"}; |
2093 | break; | 2194 | break; |
2094 | case PCI_DEVICE_ID_LANCER_FC: | 2195 | case PCI_DEVICE_ID_LANCER_FC: |
2095 | case PCI_DEVICE_ID_LANCER_FC_VF: | ||
2096 | m = (typeof(m)){"LPe16000", "PCIe", "Fibre Channel Adapter"}; | 2196 | m = (typeof(m)){"LPe16000", "PCIe", "Fibre Channel Adapter"}; |
2097 | break; | 2197 | break; |
2198 | case PCI_DEVICE_ID_LANCER_FC_VF: | ||
2199 | m = (typeof(m)){"LPe16000", "PCIe", | ||
2200 | "Obsolete, Unsupported Fibre Channel Adapter"}; | ||
2201 | break; | ||
2098 | case PCI_DEVICE_ID_LANCER_FCOE: | 2202 | case PCI_DEVICE_ID_LANCER_FCOE: |
2099 | case PCI_DEVICE_ID_LANCER_FCOE_VF: | ||
2100 | oneConnect = 1; | 2203 | oneConnect = 1; |
2101 | m = (typeof(m)){"OCe15100", "PCIe", "FCoE"}; | 2204 | m = (typeof(m)){"OCe15100", "PCIe", "FCoE"}; |
2102 | break; | 2205 | break; |
2206 | case PCI_DEVICE_ID_LANCER_FCOE_VF: | ||
2207 | oneConnect = 1; | ||
2208 | m = (typeof(m)){"OCe15100", "PCIe", | ||
2209 | "Obsolete, Unsupported FCoE"}; | ||
2210 | break; | ||
2103 | case PCI_DEVICE_ID_SKYHAWK: | 2211 | case PCI_DEVICE_ID_SKYHAWK: |
2104 | case PCI_DEVICE_ID_SKYHAWK_VF: | 2212 | case PCI_DEVICE_ID_SKYHAWK_VF: |
2105 | oneConnect = 1; | 2213 | oneConnect = 1; |
@@ -4614,7 +4722,10 @@ lpfc_reset_hba(struct lpfc_hba *phba) | |||
4614 | phba->link_state = LPFC_HBA_ERROR; | 4722 | phba->link_state = LPFC_HBA_ERROR; |
4615 | return; | 4723 | return; |
4616 | } | 4724 | } |
4617 | lpfc_offline_prep(phba, LPFC_MBX_WAIT); | 4725 | if (phba->sli.sli_flag & LPFC_SLI_ACTIVE) |
4726 | lpfc_offline_prep(phba, LPFC_MBX_WAIT); | ||
4727 | else | ||
4728 | lpfc_offline_prep(phba, LPFC_MBX_NO_WAIT); | ||
4618 | lpfc_offline(phba); | 4729 | lpfc_offline(phba); |
4619 | lpfc_sli_brdrestart(phba); | 4730 | lpfc_sli_brdrestart(phba); |
4620 | lpfc_online(phba); | 4731 | lpfc_online(phba); |
@@ -9663,9 +9774,6 @@ lpfc_pci_resume_one_s3(struct pci_dev *pdev) | |||
9663 | static void | 9774 | static void |
9664 | lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba) | 9775 | lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba) |
9665 | { | 9776 | { |
9666 | struct lpfc_sli *psli = &phba->sli; | ||
9667 | struct lpfc_sli_ring *pring; | ||
9668 | |||
9669 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 9777 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
9670 | "2723 PCI channel I/O abort preparing for recovery\n"); | 9778 | "2723 PCI channel I/O abort preparing for recovery\n"); |
9671 | 9779 | ||
@@ -9673,8 +9781,7 @@ lpfc_sli_prep_dev_for_recover(struct lpfc_hba *phba) | |||
9673 | * There may be errored I/Os through HBA, abort all I/Os on txcmplq | 9781 | * There may be errored I/Os through HBA, abort all I/Os on txcmplq |
9674 | * and let the SCSI mid-layer to retry them to recover. | 9782 | * and let the SCSI mid-layer to retry them to recover. |
9675 | */ | 9783 | */ |
9676 | pring = &psli->ring[psli->fcp_ring]; | 9784 | lpfc_sli_abort_fcp_rings(phba); |
9677 | lpfc_sli_abort_iocb_ring(phba, pring); | ||
9678 | } | 9785 | } |
9679 | 9786 | ||
9680 | /** | 9787 | /** |
@@ -10417,17 +10524,13 @@ lpfc_pci_resume_one_s4(struct pci_dev *pdev) | |||
10417 | static void | 10524 | static void |
10418 | lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba) | 10525 | lpfc_sli4_prep_dev_for_recover(struct lpfc_hba *phba) |
10419 | { | 10526 | { |
10420 | struct lpfc_sli *psli = &phba->sli; | ||
10421 | struct lpfc_sli_ring *pring; | ||
10422 | |||
10423 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 10527 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
10424 | "2828 PCI channel I/O abort preparing for recovery\n"); | 10528 | "2828 PCI channel I/O abort preparing for recovery\n"); |
10425 | /* | 10529 | /* |
10426 | * There may be errored I/Os through HBA, abort all I/Os on txcmplq | 10530 | * There may be errored I/Os through HBA, abort all I/Os on txcmplq |
10427 | * and let the SCSI mid-layer to retry them to recover. | 10531 | * and let the SCSI mid-layer to retry them to recover. |
10428 | */ | 10532 | */ |
10429 | pring = &psli->ring[psli->fcp_ring]; | 10533 | lpfc_sli_abort_fcp_rings(phba); |
10430 | lpfc_sli_abort_iocb_ring(phba, pring); | ||
10431 | } | 10534 | } |
10432 | 10535 | ||
10433 | /** | 10536 | /** |
@@ -10898,7 +11001,7 @@ lpfc_sli4_oas_verify(struct lpfc_hba *phba) | |||
10898 | if (phba->sli4_hba.pc_sli4_params.oas_supported) { | 11001 | if (phba->sli4_hba.pc_sli4_params.oas_supported) { |
10899 | phba->cfg_fof = 1; | 11002 | phba->cfg_fof = 1; |
10900 | } else { | 11003 | } else { |
10901 | phba->cfg_EnableXLane = 0; | 11004 | phba->cfg_fof = 0; |
10902 | if (phba->device_data_mem_pool) | 11005 | if (phba->device_data_mem_pool) |
10903 | mempool_destroy(phba->device_data_mem_pool); | 11006 | mempool_destroy(phba->device_data_mem_pool); |
10904 | phba->device_data_mem_pool = NULL; | 11007 | phba->device_data_mem_pool = NULL; |
@@ -10928,7 +11031,7 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) | |||
10928 | if (rc) | 11031 | if (rc) |
10929 | return -ENOMEM; | 11032 | return -ENOMEM; |
10930 | 11033 | ||
10931 | if (phba->cfg_EnableXLane) { | 11034 | if (phba->cfg_fof) { |
10932 | 11035 | ||
10933 | rc = lpfc_cq_create(phba, phba->sli4_hba.oas_cq, | 11036 | rc = lpfc_cq_create(phba, phba->sli4_hba.oas_cq, |
10934 | phba->sli4_hba.fof_eq, LPFC_WCQ, LPFC_FCP); | 11037 | phba->sli4_hba.fof_eq, LPFC_WCQ, LPFC_FCP); |
@@ -10947,8 +11050,7 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) | |||
10947 | return 0; | 11050 | return 0; |
10948 | 11051 | ||
10949 | out_oas_wq: | 11052 | out_oas_wq: |
10950 | if (phba->cfg_EnableXLane) | 11053 | lpfc_cq_destroy(phba, phba->sli4_hba.oas_cq); |
10951 | lpfc_cq_destroy(phba, phba->sli4_hba.oas_cq); | ||
10952 | out_oas_cq: | 11054 | out_oas_cq: |
10953 | lpfc_eq_destroy(phba, phba->sli4_hba.fof_eq); | 11055 | lpfc_eq_destroy(phba, phba->sli4_hba.fof_eq); |
10954 | return rc; | 11056 | return rc; |
@@ -10982,7 +11084,7 @@ lpfc_fof_queue_create(struct lpfc_hba *phba) | |||
10982 | 11084 | ||
10983 | phba->sli4_hba.fof_eq = qdesc; | 11085 | phba->sli4_hba.fof_eq = qdesc; |
10984 | 11086 | ||
10985 | if (phba->cfg_EnableXLane) { | 11087 | if (phba->cfg_fof) { |
10986 | 11088 | ||
10987 | /* Create OAS CQ */ | 11089 | /* Create OAS CQ */ |
10988 | qdesc = lpfc_sli4_queue_alloc(phba, phba->sli4_hba.cq_esize, | 11090 | qdesc = lpfc_sli4_queue_alloc(phba, phba->sli4_hba.cq_esize, |