diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.c | 11 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_iocfc.c | 10 |
2 files changed, 18 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 2f09d17730cc..4d9a47ccffe9 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c | |||
@@ -1129,9 +1129,6 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, | |||
1129 | if (bfa_ioc_fwimg_get_size(ioc) < BFA_IOC_FWIMG_MINSZ) | 1129 | if (bfa_ioc_fwimg_get_size(ioc) < BFA_IOC_FWIMG_MINSZ) |
1130 | boot_type = BFI_BOOT_TYPE_FLASH; | 1130 | boot_type = BFI_BOOT_TYPE_FLASH; |
1131 | fwimg = bfa_ioc_fwimg_get_chunk(ioc, chunkno); | 1131 | fwimg = bfa_ioc_fwimg_get_chunk(ioc, chunkno); |
1132 | fwimg[BFI_BOOT_TYPE_OFF / sizeof(u32)] = bfa_os_swap32(boot_type); | ||
1133 | fwimg[BFI_BOOT_PARAM_OFF / sizeof(u32)] = | ||
1134 | bfa_os_swap32(boot_param); | ||
1135 | 1132 | ||
1136 | pgnum = bfa_ioc_smem_pgnum(ioc, loff); | 1133 | pgnum = bfa_ioc_smem_pgnum(ioc, loff); |
1137 | pgoff = bfa_ioc_smem_pgoff(ioc, loff); | 1134 | pgoff = bfa_ioc_smem_pgoff(ioc, loff); |
@@ -1166,6 +1163,14 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, | |||
1166 | 1163 | ||
1167 | bfa_reg_write(ioc->ioc_regs.host_page_num_fn, | 1164 | bfa_reg_write(ioc->ioc_regs.host_page_num_fn, |
1168 | bfa_ioc_smem_pgnum(ioc, 0)); | 1165 | bfa_ioc_smem_pgnum(ioc, 0)); |
1166 | |||
1167 | /* | ||
1168 | * Set boot type and boot param at the end. | ||
1169 | */ | ||
1170 | bfa_mem_write(ioc->ioc_regs.smem_page_start, BFI_BOOT_TYPE_OFF, | ||
1171 | bfa_os_swap32(boot_type)); | ||
1172 | bfa_mem_write(ioc->ioc_regs.smem_page_start, BFI_BOOT_PARAM_OFF, | ||
1173 | bfa_os_swap32(boot_param)); | ||
1169 | } | 1174 | } |
1170 | 1175 | ||
1171 | static void | 1176 | static void |
diff --git a/drivers/scsi/bfa/bfa_iocfc.c b/drivers/scsi/bfa/bfa_iocfc.c index 6677f83f2c99..a76de2669bfc 100644 --- a/drivers/scsi/bfa/bfa_iocfc.c +++ b/drivers/scsi/bfa/bfa_iocfc.c | |||
@@ -801,6 +801,11 @@ bfa_iocfc_get_stats(struct bfa_s *bfa, struct bfa_iocfc_stats_s *stats, | |||
801 | return BFA_STATUS_DEVBUSY; | 801 | return BFA_STATUS_DEVBUSY; |
802 | } | 802 | } |
803 | 803 | ||
804 | if (!bfa_iocfc_is_operational(bfa)) { | ||
805 | bfa_trc(bfa, 0); | ||
806 | return BFA_STATUS_IOC_NON_OP; | ||
807 | } | ||
808 | |||
804 | iocfc->stats_busy = BFA_TRUE; | 809 | iocfc->stats_busy = BFA_TRUE; |
805 | iocfc->stats_ret = stats; | 810 | iocfc->stats_ret = stats; |
806 | iocfc->stats_cbfn = cbfn; | 811 | iocfc->stats_cbfn = cbfn; |
@@ -821,6 +826,11 @@ bfa_iocfc_clear_stats(struct bfa_s *bfa, bfa_cb_ioc_t cbfn, void *cbarg) | |||
821 | return BFA_STATUS_DEVBUSY; | 826 | return BFA_STATUS_DEVBUSY; |
822 | } | 827 | } |
823 | 828 | ||
829 | if (!bfa_iocfc_is_operational(bfa)) { | ||
830 | bfa_trc(bfa, 0); | ||
831 | return BFA_STATUS_IOC_NON_OP; | ||
832 | } | ||
833 | |||
824 | iocfc->stats_busy = BFA_TRUE; | 834 | iocfc->stats_busy = BFA_TRUE; |
825 | iocfc->stats_cbfn = cbfn; | 835 | iocfc->stats_cbfn = cbfn; |
826 | iocfc->stats_cbarg = cbarg; | 836 | iocfc->stats_cbarg = cbarg; |