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: <1217215009.2970.7.camel@jaswinder.satnam>
Date:	Mon, 28 Jul 2008 08:46:49 +0530
From:	Jaswinder Singh <jaswinder@...radead.org>
To:	David Dillow <dave@...dillows.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, becker@...ld.com,
	davidpmclean@...oo.com, Jeff Garzik <jeff@...zik.org>,
	netdev <netdev@...r.kernel.org>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] typhoon: use request_firmware

Hello Dave,

On Sun, 2008-07-27 at 21:43 -0400, David Dillow wrote:

> >  MODULE_LICENSE("GPL");
> > +MODULE_LICENSE("3com/typhoon.bin");
> 
> Uhm, MODULE_FIRMWARE()?
> 

Sorry, Fixed. Thanks.

> > @@ -1368,8 +1371,14 @@ typhoon_download_firmware(struct typhoon *tp)
> >  	int i;
> >  	int err;
> >  
> > +	err = request_firmware(&fw, fw_name, &tp->pdev->dev);
> > +	if (err) {
> > +		printk(KERN_ERR "%s: Failed to load firmware \"%s\"\n",
> > +		       tp->name, fw_name);
> > +		return err;
> > +	}
> >  	err = -EINVAL;
> > -	fHdr = (struct typhoon_file_header *) typhoon_firmware_image;
> > +	fHdr = (struct typhoon_file_header *) fw->data;
> >  	image_data = (u8 *) fHdr;
> >  
> >  	if(memcmp(fHdr->tag, "TYPHOON", 8)) {
> > @@ -1494,6 +1503,7 @@ err_out_irq:
> >  	pci_free_consistent(pdev, PAGE_SIZE, dpage, dpage_dma);
> >  
> >  err_out:
> > +	release_firmware(fw);
> >  	return err;
> >  }
> 
> It is not quite this simple. By not loading the firmware on device
> probe, you have opened the door to a broken resume, and the driver will
> now try to sleep in an atomic context, when typhoon_tx_timeout() is
> called at the very least.
> 

I just added the request_firmware support and
replaced typhoon_firmware_image with fw->data.
I do not think this will make any difference in rest of driver.

If you like to change the driver then it should be in another patch.

David Woodhouse, any comments.

> I've said that I was thinking about doing the conversion myself, and I
> think the firmware loader makes some sense for new drivers. But the more
> I think about converting old -- fairly static -- drivers such as
> typhoon, I wonder "what's the point?" We don't save memory, we add code,
> and we add failure points that weren't there before. Where's the upside?
> 

David Woodhouse, any comments.

Thank you,

Jaswinder Singh.

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