public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* serial port driver 8250_pci - pci_device_id structure
@ 2005-06-14 21:05 V. ANANDA KRISHNAN
  2005-06-14 21:18 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: V. ANANDA KRISHNAN @ 2005-06-14 21:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: gregkh

Hi All,

  In ppc architecture, I am trying to find out the codes that populate
the pci_devic_id structure ( drivers/serial/8250_pci.c file) in the
following init_one function:

static int __devinit
pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)


  I have the (pci card) data hard-coded in the following tables of
8250_pci.c file:
          static struct pci_device_id serial_pci_tbl[]
          static struct pci_board pci_boards[] __devinitdata={...}


Since I could not find the data in the pci_device_id for pci card, I
went thru the drivers/pci/search.c and drivers/pci/pci-driver.c files. I
am not successful in locating those codes that populate the
pci_device_id structure for a given pci card.

Could some one let me know where I go wrong or where I have to look for
the codes?

Thanks,
V. Ananda Krishnan


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: serial port driver 8250_pci - pci_device_id structure
  2005-06-14 21:05 serial port driver 8250_pci - pci_device_id structure V. ANANDA KRISHNAN
@ 2005-06-14 21:18 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-06-14 21:18 UTC (permalink / raw)
  To: V. ANANDA KRISHNAN; +Cc: linux-kernel

On Tue, Jun 14, 2005 at 04:05:40PM -0500, V. ANANDA KRISHNAN wrote:
> Hi All,
> 
>   In ppc architecture, I am trying to find out the codes that populate
> the pci_devic_id structure ( drivers/serial/8250_pci.c file) in the
> following init_one function:
> 
> static int __devinit
> pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)

It comes from the driver itself, as you point out:

>   I have the (pci card) data hard-coded in the following tables of
> 8250_pci.c file:
>           static struct pci_device_id serial_pci_tbl[]
>           static struct pci_board pci_boards[] __devinitdata={...}

Yup, that's what the pci core sets that pointer to.

> Since I could not find the data in the pci_device_id for pci card, I
> went thru the drivers/pci/search.c and drivers/pci/pci-driver.c files. I
> am not successful in locating those codes that populate the
> pci_device_id structure for a given pci card.

drivers/pci/pci-driver.c::pci_device_probe_static() does it.  See the
latest edition of the Linux Device Drivers book for a full description
and walk-through of how a pci device get added and removed from the
driver core (it's free online if you don't want to buy it.)

Hope this helps,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-14 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-14 21:05 serial port driver 8250_pci - pci_device_id structure V. ANANDA KRISHNAN
2005-06-14 21:18 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox