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  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:	Wed, 30 May 2007 09:56:18 -0400
From:	Jeff Garzik <jgarzik@...ox.com>
To:	Stephen Hemminger <shemminger@...ux-foundation.org>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH 6/7] sky2: enable clocks before probe

Stephen Hemminger wrote:
> Some chips need to have internal clocks enabled (via PCI config)
> before the PCI space is readable.
> 
> Signed-off-by: Stephen Hemminger <shemminger@...ux-foundation.org>
> 
> ---
>  drivers/net/sky2.c |  102 ++++++++++++++++++++++++++++++++++++++---------------
>  drivers/net/sky2.h |   19 +++++++++
>  2 files changed, 92 insertions(+), 29 deletions(-)
> 
> --- a/drivers/net/sky2.c	2007-05-24 15:22:14.000000000 -0700
> +++ b/drivers/net/sky2.c	2007-05-24 15:22:33.000000000 -0700
> @@ -2524,10 +2524,6 @@ static int __devinit sky2_init(struct sk
>  		dev_warn(&hw->pdev->dev, "this driver not yet tested on this chip type\n"
>  			 "Please report success or failure to <netdev@...r.kernel.org>\n");
>  
> -	/* Make sure and enable all clocks */
> -	if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U)
> -		sky2_pci_write32(hw, PCI_DEV_REG3, 0);
> -
>  	hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4;
>  
>  	/* This rev is really old, and requires untested workarounds */
> @@ -3638,6 +3634,9 @@ static int __devinit sky2_probe(struct p
>  	if (!hw->st_le)
>  		goto err_out_iounmap;
>  
> +	/* On Yukon EC-U and EX need to force enabling all clocks */
> +	pci_write_config_dword(pdev, PCI_DEV_REG3, 0);
> +
>  	err = sky2_init(hw);
>  	if (err)
>  		goto err_out_iounmap;
> @@ -3822,8 +3821,7 @@ static int sky2_resume(struct pci_dev *p
>  	pci_enable_wake(pdev, PCI_D0, 0);
>  
>  	/* Re-enable all clocks */
> -	if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U)
> -		sky2_pci_write32(hw, PCI_DEV_REG3, 0);
> +	pci_write_config_dword(pdev, PCI_DEV_REG3, 0);


No explanation as to why the chip identity tests went away.  And in one 
of your code comments, it seems to imply that the chip tests are still 
present.

-
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