Re: Exposing ROM's though sysfs
From: Jon Smirl (jonsmirl_at_yahoo.com)
Date: 07/30/04
- Previous message: Andrew Morton: "Re: [PATCH] Improve pci_alloc_consistent wrapper on preemptive kernels"
- In reply to: Greg KH: "Re: Exposing ROM's though sysfs"
- Next in thread: Jesse Barnes: "Re: Exposing ROM's though sysfs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 13:05:57 -0700 (PDT) To: Greg KH <greg@kroah.com>, Jesse Barnes <jbarnes@engr.sgi.com>
The ROMs are definitely different sizes from 2K minimum to 128KB, maybe
even larger. Varying sizes needs to be handled.
--- Greg KH <greg@kroah.com> wrote:
> On Fri, Jul 30, 2004 at 11:49:39AM -0700, Jesse Barnes wrote:
> > +
> > + /* If the device has a ROM, map it */
> > + if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) {
> > + pci_rom_attr.size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
> > + sysfs_create_bin_file(&pdev->dev.kobj, &pci_rom_attr);
> > + }
>
> Doesn't this code cause _all_ rom sizes to be the same, as you only
> have
> 1 pci_rom_attr variable? You should create a new one for every pci
> device (making sure to clean it up when the device is removed.)
>
> thanks,
>
> greg k-h
>
=====
Jon Smirl
jonsmirl@yahoo.com
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Andrew Morton: "Re: [PATCH] Improve pci_alloc_consistent wrapper on preemptive kernels"
- In reply to: Greg KH: "Re: Exposing ROM's though sysfs"
- Next in thread: Jesse Barnes: "Re: Exposing ROM's though sysfs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]