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] [day] [month] [year] [list]
Date:	Fri, 19 Oct 2012 18:17:06 -0700
From:	Sony Chacko <sony.chacko@...gic.com>
To:	Mark Einon <mark.einon@...il.com>
CC:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Dept-NX Linux NIC Driver 
	<Dept_NX_Linux_NIC_Driver@...gic.com>
Subject: RE: [PATCH V2 15/20] qlcnic: 83xx adpater flash interface routines

 From: Mark Einon [mailto:mark.einon@...il.com]
> Sent: Friday, October 19, 2012 3:22 PM
> To: Sony Chacko
> Cc: David Miller; netdev; Dept-NX Linux NIC Driver
> 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

Thanks for the review, it is a bug. We will fix it in the next version of the patch series.
Sony


--
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