[also bug #10975] Re: [PATCH 21/23] pcmcia: allow for longer CIS firmware files

Dominik Brodowski linux at dominikbrodowski.net
Tue Jul 15 14:50:35 EDT 2008


Hi,

On Mon, Jul 14, 2008 at 08:25:20AM -0700, Randy Dunlap wrote:
> On Mon, 14 Jul 2008 10:14:23 +0200 Dominik Brodowski wrote:
> 
> > Don't be more zealous with memory than the firmware class core.
> > 
> > Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
> > ---
> >  drivers/pcmcia/ds.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
> > index 461b8a9..4174d96 100644
> > --- a/drivers/pcmcia/ds.c
> > +++ b/drivers/pcmcia/ds.c
> > @@ -850,7 +850,7 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
> >  {
> >  	struct pcmcia_socket *s = dev->socket;
> >  	const struct firmware *fw;
> > -	char path[20];
> > +	char path[FIRMWARE_NAME_MAX];
> >  	int ret = -ENOMEM;
> >  	int no_funcs;
> >  	int old_funcs;
> > @@ -862,7 +862,7 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
> >  
> >  	ds_dbg(1, "trying to load CIS file %s\n", filename);
> >  
> > -	if (strlen(filename) > 14) {
> > +	if (strlen(filename) > (FIRMWARE_NAME_MAX - 1)) {
> >  		printk(KERN_WARNING "pcmcia: CIS filename is too long [%s]\n",
> >  			filename);
> >  		return -EINVAL;
> > -- 
> 
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=10975
> 
> The submitter commented:
> This seems to actually make things worse...
> See http://puppylinux.com/blog/?viewDetailed=00177
> and http://puppylinux.com/blog/?viewDetailed=00178

Somehow I think that this doesn't relate to this patch, _but_: the card
in question, a "Dynacom Data/Fax PCMCIA" with manufactor id 0x13 and card
id 0x00, might simply not need this "GLOBETROTTER" CIS file. That's required
for card "Option Wireless Technology GSM/GPRS GlobeTrotter", which is a
really different card. Therefore...

@Michal, at Barry: could you send me a "lspcmcia -vvv" output, please?

Best,
	Dominik



More information about the linux-pcmcia mailing list