* [PATCH 9/18] drivers/net/ remove pci_find_{device, subsys}
@ 2005-02-14 5:55 Amit Gud
2005-02-14 18:46 ` [KJ] " Greg KH
2005-02-14 21:07 ` [KJ] " Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Amit Gud @ 2005-02-14 5:55 UTC (permalink / raw)
To: jgarzik, netdev; +Cc: kernel-janitors, gud
Remove deprecated pci_find_device and pci_find_subsys
AG
--
May the source be with you
Signed-off-by: Amit Gud <gud@eth.net>
diff -uprN orig/drivers/net/e1000/e1000_main.c linux-2.6.11-rc3/drivers/net/e1000/e1000_main.c
--- orig/drivers/net/e1000/e1000_main.c 2005-02-11 15:19:48.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/e1000/e1000_main.c 2005-02-14 02:02:48.000000000 +0530
@@ -2792,7 +2792,7 @@ e1000_notify_reboot(struct notifier_bloc
case SYS_DOWN:
case SYS_HALT:
case SYS_POWER_OFF:
- while((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
+ while((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
if(pci_dev_driver(pdev) == &e1000_driver)
e1000_suspend(pdev, 3);
}
diff -uprN orig/drivers/net/fc/iph5526.c linux-2.6.11-rc3/drivers/net/fc/iph5526.c
--- orig/drivers/net/fc/iph5526.c 2004-10-19 03:23:43.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/fc/iph5526.c 2005-02-14 02:02:55.000000000 +0530
@@ -3711,7 +3711,7 @@ int iph5526_detect(Scsi_Host_Template *t
fc[i] = NULL;
for (i = 0; clone_list[i].vendor_id != 0; i++)
- while ((pdev = pci_find_device(clone_list[i].vendor_id, clone_list[i].device_id, pdev))) {
+ while ((pdev = pci_get_device(clone_list[i].vendor_id, clone_list[i].device_id, pdev))) {
unsigned short pci_command;
if (pci_enable_device(pdev))
continue;
diff -uprN orig/drivers/net/gt96100eth.c linux-2.6.11-rc3/drivers/net/gt96100eth.c
--- orig/drivers/net/gt96100eth.c 2005-02-11 15:19:48.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/gt96100eth.c 2005-02-14 02:07:09.000000000 +0530
@@ -615,9 +615,9 @@ static int gt96100_init_module(void)
/*
* Stupid probe because this really isn't a PCI device
*/
- if (!(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
+ if (!(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
PCI_DEVICE_ID_MARVELL_GT96100, NULL)) &&
- !(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
+ !(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
PCI_DEVICE_ID_MARVELL_GT96100A, NULL))) {
printk(KERN_ERR __FILE__ ": GT96100 not found!\n");
return -ENODEV;
diff -uprN orig/drivers/net/ixgb/ixgb_main.c linux-2.6.11-rc3/drivers/net/ixgb/ixgb_main.c
--- orig/drivers/net/ixgb/ixgb_main.c 2005-02-11 15:19:48.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/ixgb/ixgb_main.c 2005-02-14 02:07:17.000000000 +0530
@@ -2087,7 +2087,7 @@ ixgb_notify_reboot(struct notifier_block
case SYS_DOWN:
case SYS_HALT:
case SYS_POWER_OFF:
- while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
+ while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
if (pci_dev_driver(pdev) == &ixgb_driver)
ixgb_suspend(pdev, 3);
}
diff -uprN orig/drivers/net/skfp/drvfbi.c linux-2.6.11-rc3/drivers/net/skfp/drvfbi.c
--- orig/drivers/net/skfp/drvfbi.c 2004-10-19 03:23:06.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/skfp/drvfbi.c 2005-02-14 02:07:23.000000000 +0530
@@ -1362,7 +1362,7 @@ int exist_board(struct s_smc *smc, int s
ven_id = OEMID(smc,0) + (OEMID(smc,1) << 8) ;
dev_id = OEMID(smc,2) + (OEMID(smc,3) << 8) ;
for (i = 0; i < slot; i++) {
- if (pci_find_device(i,&smc->hw.pci_handle,
+ if (pci_get_device(i,&smc->hw.pci_handle,
dev_id,ven_id) != 0) {
found = FALSE ;
diff -uprN orig/drivers/net/sunhme.c linux-2.6.11-rc3/drivers/net/sunhme.c
--- orig/drivers/net/sunhme.c 2005-02-11 15:19:50.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/sunhme.c 2005-02-14 02:07:29.000000000 +0530
@@ -3312,7 +3312,7 @@ static int __init happy_meal_pci_probe(v
struct pci_dev *pdev = NULL;
int cards = 0;
- while ((pdev = pci_find_device(PCI_VENDOR_ID_SUN,
+ while ((pdev = pci_get_device(PCI_VENDOR_ID_SUN,
PCI_DEVICE_ID_SUN_HAPPYMEAL, pdev)) != NULL) {
if (pci_enable_device(pdev))
continue;
diff -uprN orig/drivers/net/tg3.c linux-2.6.11-rc3/drivers/net/tg3.c
--- orig/drivers/net/tg3.c 2005-02-11 15:19:50.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/tg3.c 2005-02-14 02:07:54.000000000 +0530
@@ -7825,15 +7825,15 @@ static int __devinit tg3_get_invariants(
* every mailbox register write to force the writes to be
* posted to the chip in order.
*/
- if (pci_find_device(PCI_VENDOR_ID_INTEL,
+ if (pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82801AA_8, NULL) ||
- pci_find_device(PCI_VENDOR_ID_INTEL,
+ pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82801AB_8, NULL) ||
- pci_find_device(PCI_VENDOR_ID_INTEL,
+ pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82801BA_11, NULL) ||
- pci_find_device(PCI_VENDOR_ID_INTEL,
+ pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82801BA_6, NULL) ||
- pci_find_device(PCI_VENDOR_ID_AMD,
+ pci_get_device(PCI_VENDOR_ID_AMD,
PCI_DEVICE_ID_AMD_FE_GATE_700C, NULL))
tp->tg3_flags |= TG3_FLAG_MBOX_WRITE_REORDER;
diff -uprN orig/drivers/net/wan/sdladrv.c linux-2.6.11-rc3/drivers/net/wan/sdladrv.c
--- orig/drivers/net/wan/sdladrv.c 2004-10-19 03:23:43.000000000 +0530
+++ linux-2.6.11-rc3/drivers/net/wan/sdladrv.c 2005-02-14 02:08:15.000000000 +0530
@@ -2032,7 +2032,7 @@ static int find_s514_adapter(sdlahw_t* h
slot_no = hw->S514_slot_no;
- while ((pci_dev = pci_find_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
+ while ((pci_dev = pci_get_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
!= NULL) {
pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
@@ -2245,7 +2245,7 @@ static int pci_probe(sdlahw_t *hw)
slot_no = 0;
- while ((pci_dev = pci_find_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
+ while ((pci_dev = pci_get_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
!= NULL) {
pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [PATCH 9/18] drivers/net/ remove pci_find_{device, subsys}
2005-02-14 5:55 [PATCH 9/18] drivers/net/ remove pci_find_{device, subsys} Amit Gud
@ 2005-02-14 18:46 ` Greg KH
2005-02-14 21:07 ` [KJ] " Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2005-02-14 18:46 UTC (permalink / raw)
To: Amit Gud; +Cc: netdev, jgarzik, gud, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
On Mon, Feb 14, 2005 at 11:25:23AM +0530, Amit Gud wrote:
> diff -uprN orig/drivers/net/gt96100eth.c linux-2.6.11-rc3/drivers/net/gt96100eth.c
> --- orig/drivers/net/gt96100eth.c 2005-02-11 15:19:48.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/gt96100eth.c 2005-02-14 02:07:09.000000000 +0530
> @@ -615,9 +615,9 @@ static int gt96100_init_module(void)
> /*
> * Stupid probe because this really isn't a PCI device
> */
> - if (!(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
> + if (!(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
> PCI_DEVICE_ID_MARVELL_GT96100, NULL)) &&
> - !(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
> + !(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
> PCI_DEVICE_ID_MARVELL_GT96100A, NULL))) {
> printk(KERN_ERR __FILE__ ": GT96100 not found!\n");
> return -ENODEV;
This (and many other parts of this patch) are incorrect. Please do not
apply.
thanks,
greg k-h
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* [KJ] Re: [PATCH 9/18] drivers/net/ remove pci_find_{device, subsys}
2005-02-14 5:55 [PATCH 9/18] drivers/net/ remove pci_find_{device, subsys} Amit Gud
2005-02-14 18:46 ` [KJ] " Greg KH
@ 2005-02-14 21:07 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2005-02-14 21:07 UTC (permalink / raw)
To: Amit Gud; +Cc: netdev, jgarzik, gud, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 5604 bytes --]
>
> diff -uprN orig/drivers/net/e1000/e1000_main.c linux-2.6.11-rc3/drivers/net/e1000/e1000_main.c
> --- orig/drivers/net/e1000/e1000_main.c 2005-02-11 15:19:48.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/e1000/e1000_main.c 2005-02-14 02:02:48.000000000 +0530
> @@ -2792,7 +2792,7 @@ e1000_notify_reboot(struct notifier_bloc
> case SYS_DOWN:
> case SYS_HALT:
> case SYS_POWER_OFF:
> - while((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
> + while((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
> if(pci_dev_driver(pdev) == &e1000_driver)
> e1000_suspend(pdev, 3);
Wrong. The driver should implement ->shutdown instead.
> diff -uprN orig/drivers/net/fc/iph5526.c linux-2.6.11-rc3/drivers/net/fc/iph5526.c
> --- orig/drivers/net/fc/iph5526.c 2004-10-19 03:23:43.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/fc/iph5526.c 2005-02-14 02:02:55.000000000 +0530
> @@ -3711,7 +3711,7 @@ int iph5526_detect(Scsi_Host_Template *t
> fc[i] = NULL;
>
> for (i = 0; clone_list[i].vendor_id != 0; i++)
> - while ((pdev = pci_find_device(clone_list[i].vendor_id, clone_list[i].device_id, pdev))) {
> + while ((pdev = pci_get_device(clone_list[i].vendor_id, clone_list[i].device_id, pdev))) {
> unsigned short pci_command;
> if (pci_enable_device(pdev))
> continue;
this driver will go away soon.
> diff -uprN orig/drivers/net/gt96100eth.c linux-2.6.11-rc3/drivers/net/gt96100eth.c
> --- orig/drivers/net/gt96100eth.c 2005-02-11 15:19:48.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/gt96100eth.c 2005-02-14 02:07:09.000000000 +0530
> @@ -615,9 +615,9 @@ static int gt96100_init_module(void)
> /*
> * Stupid probe because this really isn't a PCI device
> */
> - if (!(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
> + if (!(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
> PCI_DEVICE_ID_MARVELL_GT96100, NULL)) &&
> - !(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
> + !(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
> PCI_DEVICE_ID_MARVELL_GT96100A, NULL))) {
> printk(KERN_ERR __FILE__ ": GT96100 not found!\n");
> return -ENODEV;
should use pci_dev_present
> diff -uprN orig/drivers/net/ixgb/ixgb_main.c linux-2.6.11-rc3/drivers/net/ixgb/ixgb_main.c
> --- orig/drivers/net/ixgb/ixgb_main.c 2005-02-11 15:19:48.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/ixgb/ixgb_main.c 2005-02-14 02:07:17.000000000 +0530
> @@ -2087,7 +2087,7 @@ ixgb_notify_reboot(struct notifier_block
> case SYS_DOWN:
> case SYS_HALT:
> case SYS_POWER_OFF:
> - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
> + while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
> if (pci_dev_driver(pdev) == &ixgb_driver)
> ixgb_suspend(pdev, 3);
> }
should implement ->shutdown
> diff -uprN orig/drivers/net/sunhme.c linux-2.6.11-rc3/drivers/net/sunhme.c
> --- orig/drivers/net/sunhme.c 2005-02-11 15:19:50.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/sunhme.c 2005-02-14 02:07:29.000000000 +0530
> @@ -3312,7 +3312,7 @@ static int __init happy_meal_pci_probe(v
> struct pci_dev *pdev = NULL;
> int cards = 0;
>
> - while ((pdev = pci_find_device(PCI_VENDOR_ID_SUN,
> + while ((pdev = pci_get_device(PCI_VENDOR_ID_SUN,
> PCI_DEVICE_ID_SUN_HAPPYMEAL, pdev)) != NULL) {
> if (pci_enable_device(pdev))
> continue;
should switch to proper hotplug-style probing.
> diff -uprN orig/drivers/net/tg3.c linux-2.6.11-rc3/drivers/net/tg3.c
> --- orig/drivers/net/tg3.c 2005-02-11 15:19:50.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/tg3.c 2005-02-14 02:07:54.000000000 +0530
> @@ -7825,15 +7825,15 @@ static int __devinit tg3_get_invariants(
> * every mailbox register write to force the writes to be
> * posted to the chip in order.
> */
> - if (pci_find_device(PCI_VENDOR_ID_INTEL,
> + if (pci_get_device(PCI_VENDOR_ID_INTEL,
> PCI_DEVICE_ID_INTEL_82801AA_8, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_INTEL,
> + pci_get_device(PCI_VENDOR_ID_INTEL,
> PCI_DEVICE_ID_INTEL_82801AB_8, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_INTEL,
> + pci_get_device(PCI_VENDOR_ID_INTEL,
> PCI_DEVICE_ID_INTEL_82801BA_11, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_INTEL,
> + pci_get_device(PCI_VENDOR_ID_INTEL,
> PCI_DEVICE_ID_INTEL_82801BA_6, NULL) ||
> - pci_find_device(PCI_VENDOR_ID_AMD,
> + pci_get_device(PCI_VENDOR_ID_AMD,
> PCI_DEVICE_ID_AMD_FE_GATE_700C, NULL))
> tp->tg3_flags |= TG3_FLAG_MBOX_WRITE_REORDER;
should use pci_dev_present.
> diff -uprN orig/drivers/net/wan/sdladrv.c linux-2.6.11-rc3/drivers/net/wan/sdladrv.c
> --- orig/drivers/net/wan/sdladrv.c 2004-10-19 03:23:43.000000000 +0530
> +++ linux-2.6.11-rc3/drivers/net/wan/sdladrv.c 2005-02-14 02:08:15.000000000 +0530
> @@ -2032,7 +2032,7 @@ static int find_s514_adapter(sdlahw_t* h
>
> slot_no = hw->S514_slot_no;
>
> - while ((pci_dev = pci_find_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
> + while ((pci_dev = pci_get_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
> != NULL) {
>
> pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
> @@ -2245,7 +2245,7 @@ static int pci_probe(sdlahw_t *hw)
>
> slot_no = 0;
>
> - while ((pci_dev = pci_find_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
> + while ((pci_dev = pci_get_device(V3_VENDOR_ID, V3_DEVICE_ID, pci_dev))
> != NULL) {
>
> pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
>
should use proper hotplug-style probing
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-14 21:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-14 5:55 [PATCH 9/18] drivers/net/ remove pci_find_{device, subsys} Amit Gud
2005-02-14 18:46 ` [KJ] " Greg KH
2005-02-14 21:07 ` [KJ] " Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).