Loading MAINTAINERS +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ S: Maintained F: drivers/net/hamradio/6pack.c 8169 10/100/1000 GIGABIT ETHERNET DRIVER M: Realtek linux nic maintainers <nic_swsd@realtek.com> M: Francois Romieu <romieu@fr.zoreil.com> L: netdev@vger.kernel.org S: Maintained Loading drivers/connector/connector.c +1 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ static int cn_call_callback(struct sk_buff *skb) cbq->callback(msg, nsp); kfree_skb(skb); cn_queue_release_callback(cbq); err = 0; } return err; Loading drivers/net/bna/bfa_ioc.c +18 −13 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ #define bfa_ioc_map_port(__ioc) ((__ioc)->ioc_hwif->ioc_map_port(__ioc)) #define bfa_ioc_notify_fail(__ioc) \ ((__ioc)->ioc_hwif->ioc_notify_fail(__ioc)) #define bfa_ioc_sync_start(__ioc) \ ((__ioc)->ioc_hwif->ioc_sync_start(__ioc)) #define bfa_ioc_sync_join(__ioc) \ ((__ioc)->ioc_hwif->ioc_sync_join(__ioc)) #define bfa_ioc_sync_leave(__ioc) \ Loading Loading @@ -602,7 +604,7 @@ bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event) switch (event) { case IOCPF_E_SEMLOCKED: if (bfa_ioc_firmware_lock(ioc)) { if (bfa_ioc_sync_complete(ioc)) { if (bfa_ioc_sync_start(ioc)) { iocpf->retry_count = 0; bfa_ioc_sync_join(ioc); bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); Loading Loading @@ -1313,7 +1315,7 @@ bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) * execution context (driver/bios) must match. */ static bool bfa_ioc_fwver_valid(struct bfa_ioc *ioc) bfa_ioc_fwver_valid(struct bfa_ioc *ioc, u32 boot_env) { struct bfi_ioc_image_hdr fwhdr, *drv_fwhdr; Loading @@ -1324,7 +1326,7 @@ bfa_ioc_fwver_valid(struct bfa_ioc *ioc) if (fwhdr.signature != drv_fwhdr->signature) return false; if (fwhdr.exec != drv_fwhdr->exec) if (swab32(fwhdr.param) != boot_env) return false; return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr); Loading @@ -1351,9 +1353,12 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) { enum bfi_ioc_state ioc_fwstate; bool fwvalid; u32 boot_env; ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate); boot_env = BFI_BOOT_LOADER_OS; if (force) ioc_fwstate = BFI_IOC_UNINIT; Loading @@ -1361,10 +1366,10 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) * check if firmware is valid */ fwvalid = (ioc_fwstate == BFI_IOC_UNINIT) ? false : bfa_ioc_fwver_valid(ioc); false : bfa_ioc_fwver_valid(ioc, boot_env); if (!fwvalid) { bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id); bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env); return; } Loading Loading @@ -1395,7 +1400,7 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) /** * Initialize the h/w for any other states. */ bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id); bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env); } void Loading Loading @@ -1505,7 +1510,7 @@ bfa_ioc_hb_stop(struct bfa_ioc *ioc) */ static void bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) u32 boot_env) { u32 *fwimg; u32 pgnum; Loading Loading @@ -1556,10 +1561,10 @@ bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, /* * Set boot type and boot param at the end. */ writel((swab32(swab32(boot_type))), ((ioc->ioc_regs.smem_page_start) writel(boot_type, ((ioc->ioc_regs.smem_page_start) + (BFI_BOOT_TYPE_OFF))); writel((swab32(swab32(boot_param))), ((ioc->ioc_regs.smem_page_start) + (BFI_BOOT_PARAM_OFF))); writel(boot_env, ((ioc->ioc_regs.smem_page_start) + (BFI_BOOT_LOADER_OFF))); } static void Loading Loading @@ -1719,7 +1724,7 @@ bfa_ioc_pll_init(struct bfa_ioc *ioc) * as the entry vector. */ static void bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_env) { void __iomem *rb; Loading @@ -1732,7 +1737,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) * Initialize IOC state of all functions on a chip reset. */ rb = ioc->pcidev.pci_bar_kva; if (boot_param == BFI_BOOT_TYPE_MEMTEST) { if (boot_type == BFI_BOOT_TYPE_MEMTEST) { writel(BFI_IOC_MEMTEST, (rb + BFA_IOC0_STATE_REG)); writel(BFI_IOC_MEMTEST, (rb + BFA_IOC1_STATE_REG)); } else { Loading @@ -1741,7 +1746,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) } bfa_ioc_msgflush(ioc); bfa_ioc_download_fw(ioc, boot_type, boot_param); bfa_ioc_download_fw(ioc, boot_type, boot_env); /** * Enable interrupts just before starting LPU Loading drivers/net/bna/bfa_ioc.h +1 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,7 @@ struct bfa_ioc_hwif { bool msix); void (*ioc_notify_fail) (struct bfa_ioc *ioc); void (*ioc_ownership_reset) (struct bfa_ioc *ioc); bool (*ioc_sync_start) (struct bfa_ioc *ioc); void (*ioc_sync_join) (struct bfa_ioc *ioc); void (*ioc_sync_leave) (struct bfa_ioc *ioc); void (*ioc_sync_ack) (struct bfa_ioc *ioc); Loading drivers/net/bna/bfa_ioc_ct.c +28 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ static void bfa_ioc_ct_map_port(struct bfa_ioc *ioc); static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix); static void bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc); static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc); static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc); static void bfa_ioc_ct_sync_join(struct bfa_ioc *ioc); static void bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc); static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc); Loading @@ -63,6 +64,7 @@ bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc) nw_hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set; nw_hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail; nw_hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset; nw_hwif_ct.ioc_sync_start = bfa_ioc_ct_sync_start; nw_hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join; nw_hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave; nw_hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack; Loading Loading @@ -342,6 +344,32 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc) bfa_nw_ioc_hw_sem_release(ioc); } /** * Synchronized IOC failure processing routines */ static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc) { u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync); u32 sync_reqd = bfa_ioc_ct_get_sync_reqd(r32); /* * Driver load time. If the sync required bit for this PCI fn * is set, it is due to an unclean exit by the driver for this * PCI fn in the previous incarnation. Whoever comes here first * should clean it up, no matter which PCI fn. */ if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) { writel(0, ioc->ioc_regs.ioc_fail_sync); writel(1, ioc->ioc_regs.ioc_usage_reg); writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate); writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate); return true; } return bfa_ioc_ct_sync_complete(ioc); } /** * Synchronized IOC failure processing routines */ Loading Loading
MAINTAINERS +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ S: Maintained F: drivers/net/hamradio/6pack.c 8169 10/100/1000 GIGABIT ETHERNET DRIVER M: Realtek linux nic maintainers <nic_swsd@realtek.com> M: Francois Romieu <romieu@fr.zoreil.com> L: netdev@vger.kernel.org S: Maintained Loading
drivers/connector/connector.c +1 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ static int cn_call_callback(struct sk_buff *skb) cbq->callback(msg, nsp); kfree_skb(skb); cn_queue_release_callback(cbq); err = 0; } return err; Loading
drivers/net/bna/bfa_ioc.c +18 −13 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ #define bfa_ioc_map_port(__ioc) ((__ioc)->ioc_hwif->ioc_map_port(__ioc)) #define bfa_ioc_notify_fail(__ioc) \ ((__ioc)->ioc_hwif->ioc_notify_fail(__ioc)) #define bfa_ioc_sync_start(__ioc) \ ((__ioc)->ioc_hwif->ioc_sync_start(__ioc)) #define bfa_ioc_sync_join(__ioc) \ ((__ioc)->ioc_hwif->ioc_sync_join(__ioc)) #define bfa_ioc_sync_leave(__ioc) \ Loading Loading @@ -602,7 +604,7 @@ bfa_iocpf_sm_fwcheck(struct bfa_iocpf *iocpf, enum iocpf_event event) switch (event) { case IOCPF_E_SEMLOCKED: if (bfa_ioc_firmware_lock(ioc)) { if (bfa_ioc_sync_complete(ioc)) { if (bfa_ioc_sync_start(ioc)) { iocpf->retry_count = 0; bfa_ioc_sync_join(ioc); bfa_fsm_set_state(iocpf, bfa_iocpf_sm_hwinit); Loading Loading @@ -1313,7 +1315,7 @@ bfa_nw_ioc_fwver_cmp(struct bfa_ioc *ioc, struct bfi_ioc_image_hdr *fwhdr) * execution context (driver/bios) must match. */ static bool bfa_ioc_fwver_valid(struct bfa_ioc *ioc) bfa_ioc_fwver_valid(struct bfa_ioc *ioc, u32 boot_env) { struct bfi_ioc_image_hdr fwhdr, *drv_fwhdr; Loading @@ -1324,7 +1326,7 @@ bfa_ioc_fwver_valid(struct bfa_ioc *ioc) if (fwhdr.signature != drv_fwhdr->signature) return false; if (fwhdr.exec != drv_fwhdr->exec) if (swab32(fwhdr.param) != boot_env) return false; return bfa_nw_ioc_fwver_cmp(ioc, &fwhdr); Loading @@ -1351,9 +1353,12 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) { enum bfi_ioc_state ioc_fwstate; bool fwvalid; u32 boot_env; ioc_fwstate = readl(ioc->ioc_regs.ioc_fwstate); boot_env = BFI_BOOT_LOADER_OS; if (force) ioc_fwstate = BFI_IOC_UNINIT; Loading @@ -1361,10 +1366,10 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) * check if firmware is valid */ fwvalid = (ioc_fwstate == BFI_IOC_UNINIT) ? false : bfa_ioc_fwver_valid(ioc); false : bfa_ioc_fwver_valid(ioc, boot_env); if (!fwvalid) { bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id); bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env); return; } Loading Loading @@ -1395,7 +1400,7 @@ bfa_ioc_hwinit(struct bfa_ioc *ioc, bool force) /** * Initialize the h/w for any other states. */ bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, ioc->pcidev.device_id); bfa_ioc_boot(ioc, BFI_BOOT_TYPE_NORMAL, boot_env); } void Loading Loading @@ -1505,7 +1510,7 @@ bfa_ioc_hb_stop(struct bfa_ioc *ioc) */ static void bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) u32 boot_env) { u32 *fwimg; u32 pgnum; Loading Loading @@ -1556,10 +1561,10 @@ bfa_ioc_download_fw(struct bfa_ioc *ioc, u32 boot_type, /* * Set boot type and boot param at the end. */ writel((swab32(swab32(boot_type))), ((ioc->ioc_regs.smem_page_start) writel(boot_type, ((ioc->ioc_regs.smem_page_start) + (BFI_BOOT_TYPE_OFF))); writel((swab32(swab32(boot_param))), ((ioc->ioc_regs.smem_page_start) + (BFI_BOOT_PARAM_OFF))); writel(boot_env, ((ioc->ioc_regs.smem_page_start) + (BFI_BOOT_LOADER_OFF))); } static void Loading Loading @@ -1719,7 +1724,7 @@ bfa_ioc_pll_init(struct bfa_ioc *ioc) * as the entry vector. */ static void bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_env) { void __iomem *rb; Loading @@ -1732,7 +1737,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) * Initialize IOC state of all functions on a chip reset. */ rb = ioc->pcidev.pci_bar_kva; if (boot_param == BFI_BOOT_TYPE_MEMTEST) { if (boot_type == BFI_BOOT_TYPE_MEMTEST) { writel(BFI_IOC_MEMTEST, (rb + BFA_IOC0_STATE_REG)); writel(BFI_IOC_MEMTEST, (rb + BFA_IOC1_STATE_REG)); } else { Loading @@ -1741,7 +1746,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, u32 boot_type, u32 boot_param) } bfa_ioc_msgflush(ioc); bfa_ioc_download_fw(ioc, boot_type, boot_param); bfa_ioc_download_fw(ioc, boot_type, boot_env); /** * Enable interrupts just before starting LPU Loading
drivers/net/bna/bfa_ioc.h +1 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,7 @@ struct bfa_ioc_hwif { bool msix); void (*ioc_notify_fail) (struct bfa_ioc *ioc); void (*ioc_ownership_reset) (struct bfa_ioc *ioc); bool (*ioc_sync_start) (struct bfa_ioc *ioc); void (*ioc_sync_join) (struct bfa_ioc *ioc); void (*ioc_sync_leave) (struct bfa_ioc *ioc); void (*ioc_sync_ack) (struct bfa_ioc *ioc); Loading
drivers/net/bna/bfa_ioc_ct.c +28 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ static void bfa_ioc_ct_map_port(struct bfa_ioc *ioc); static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix); static void bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc); static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc); static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc); static void bfa_ioc_ct_sync_join(struct bfa_ioc *ioc); static void bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc); static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc); Loading @@ -63,6 +64,7 @@ bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc) nw_hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set; nw_hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail; nw_hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset; nw_hwif_ct.ioc_sync_start = bfa_ioc_ct_sync_start; nw_hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join; nw_hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave; nw_hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack; Loading Loading @@ -342,6 +344,32 @@ bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc) bfa_nw_ioc_hw_sem_release(ioc); } /** * Synchronized IOC failure processing routines */ static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc) { u32 r32 = readl(ioc->ioc_regs.ioc_fail_sync); u32 sync_reqd = bfa_ioc_ct_get_sync_reqd(r32); /* * Driver load time. If the sync required bit for this PCI fn * is set, it is due to an unclean exit by the driver for this * PCI fn in the previous incarnation. Whoever comes here first * should clean it up, no matter which PCI fn. */ if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) { writel(0, ioc->ioc_regs.ioc_fail_sync); writel(1, ioc->ioc_regs.ioc_usage_reg); writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate); writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate); return true; } return bfa_ioc_ct_sync_complete(ioc); } /** * Synchronized IOC failure processing routines */ Loading