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]
Message-ID: <46C48B2E.9040105@intel.com>
Date:	Thu, 16 Aug 2007 10:36:46 -0700
From:	"Kok, Auke" <auke-jan.h.kok@...el.com>
To:	Tejun Heo <teheo@...e.de>
CC:	Brandon Philips <bphilips@...e.de>,
	e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: Re: [E1000-devel] [patch 4/4] Update e1000 driver to use devres.

Tejun Heo wrote:
> Brandon Philips wrote:
>> -	mmio_start = pci_resource_start(pdev, BAR_0);
>>  	mmio_len = pci_resource_len(pdev, BAR_0);
> 
> You don't need mmio_len either.
> 
>> -	err = -EIO;
>> -	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
>> +	adapter->hw.hw_addr = pcim_iomap(pdev, BAR_0, mmio_len);
> 
> Passing 0 as @max_len tells pci[m]_iomap() to use pci_resource_len() of
> the BAR.
> 
>> @@ -952,16 +948,15 @@ e1000_probe(struct pci_dev *pdev,
>>  	/* setup the private structure */
>>  
>>  	if ((err = e1000_sw_init(adapter)))
>> -		goto err_sw_init;
>> +		return err;
>>  
>>  	err = -EIO;
>>  	/* Flash BAR mapping must happen after e1000_sw_init
>>  	 * because it depends on mac_type */
>>  	if ((adapter->hw.mac_type == e1000_ich8lan) &&
>>  	   (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
>> -		flash_start = pci_resource_start(pdev, 1);
>>  		flash_len = pci_resource_len(pdev, 1);
> 
> Ditto.
> 
>> -		adapter->hw.flash_address = ioremap(flash_start, flash_len);
>> +		adapter->hw.flash_address = pcim_iomap(pdev, 1, flash_len);
>>  		if (!adapter->hw.flash_address)
>>  			goto err_flashmap;
>>  	}
> 


brandon,

seeing the multiple revisions I am scared that this will produce some fallout 
and e1000 already is quite fragile. I would suggest that you instead work 
against "e1000e" which is in a branch on jgarzik's netdev tree instead. This 
driver is new and it would be much more interesting to have devres used in here 
instead.

Since this driver is in -mm as well this would give your patches some testing 
before it goes upstream.

Let's leave e1000 alone for now if we can.

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