lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Oct 2012 23:21:59 +0100
From:	Mark Einon <mark.einon@...il.com>
To:	Sony Chacko <sony.chacko@...gic.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	Dept_NX_Linux_NIC_Driver@...gic.com
Subject: Re: [PATCH V2 15/20] qlcnic: 83xx adpater flash interface routines

On 19 October 2012 09:37, Sony Chacko <sony.chacko@...gic.com> wrote:
>
> +static int qlcnic_83xx_enable_flash_write_op(struct qlcnic_adapter *adapter)
> +{
> +       int ret;
> +       u32 cmd;
> +       cmd = adapter->ahw->fdt.write_statusreg_cmd;
> +       qlcnic_83xx_wrt_reg_indirect(adapter, QLC_83XX_FLASH_ADDR,
> +                                    (QLC_83XX_FLASH_FDT_WRITE_DEF_SIG | cmd));
> +       qlcnic_83xx_wrt_reg_indirect(adapter, QLC_83XX_FLASH_WRDATA,
> +                                    adapter->ahw->fdt.write_enable_bits);
> +       qlcnic_83xx_wrt_reg_indirect(adapter, QLC_83XX_FLASH_CONTROL,
> +                                    QLC_83XX_FLASH_SECOND_ERASE_MS_VAL);
> +       ret = qlcnic_83xx_poll_flash_status_reg(adapter);
> +       if (ret)
> +               return -EIO;
> +
> +       return 0;
> +}
> +
> +static int qlcnic_83xx_disable_flash_write_op(struct qlcnic_adapter *adapter)
> +{
> +       int ret;
> +
> +       qlcnic_83xx_wrt_reg_indirect(adapter, QLC_83XX_FLASH_ADDR,
> +                                    (QLC_83XX_FLASH_FDT_WRITE_DEF_SIG |
> +                                    adapter->ahw->fdt.write_statusreg_cmd));
> +       qlcnic_83xx_wrt_reg_indirect(adapter, QLC_83XX_FLASH_WRDATA,
> +                                    adapter->ahw->fdt.write_enable_bits);
> +       qlcnic_83xx_wrt_reg_indirect(adapter, QLC_83XX_FLASH_CONTROL,
> +                                    QLC_83XX_FLASH_SECOND_ERASE_MS_VAL);
> +       ret = qlcnic_83xx_poll_flash_status_reg(adapter);
> +       if (ret)
> +               return -EIO;
> +
> +       return 0;
> +}

The functions qlcnic_83xx_disable_flash_write_op() and
qlcnic_83xx_enable_flash_write_op() above do exactly the same thing.

This could be a bug, or at the very least one function will do.

Cheers,

Mark
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ