Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ecc518ac
Commit
ecc518ac
authored
Oct 03, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PCI: remove usages of pcibios_find_class()
parent
7501ea7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
48 deletions
+15
-48
drivers/net/aironet4500_card.c
drivers/net/aironet4500_card.c
+13
-32
drivers/net/wan/lmc/lmc_main.c
drivers/net/wan/lmc/lmc_main.c
+2
-16
No files found.
drivers/net/aironet4500_card.c
View file @
ecc518ac
...
...
@@ -70,9 +70,6 @@ MODULE_DEVICE_TABLE(pci, aironet4500_card_pci_tbl);
MODULE_LICENSE
(
"GPL"
);
static
int
reverse_probe
;
static
int
awc_pci_init
(
struct
net_device
*
dev
,
struct
pci_dev
*
pdev
,
int
ioaddr
,
int
cis_addr
,
int
mem_addr
,
u8
pci_irq_line
)
;
...
...
@@ -80,38 +77,29 @@ static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
int
awc4500_pci_probe
(
struct
net_device
*
dev
)
{
int
cards_found
=
0
;
static
int
pci_index
;
/* Static, for multiple probe calls. */
u8
pci_irq_line
=
0
;
// int p;
unsigned
char
awc_pci_dev
,
awc_pci_bus
;
struct
pci_dev
*
pdev
=
NULL
;
if
(
!
pci_present
())
return
-
1
;
for
(;
pci_index
<
0xff
;
pci_index
++
)
{
u16
vendor
,
device
,
pci_command
,
new_command
;
while
((
pdev
=
pci_find_class
(
PCI_CLASS_NETWORK_OTHER
<<
8
,
pdev
))
)
{
u16
pci_command
,
new_command
;
u32
pci_memaddr
;
u32
pci_ioaddr
;
u32
pci_cisaddr
;
struct
pci_dev
*
pdev
;
if
(
pcibios_find_class
(
PCI_CLASS_NETWORK_OTHER
<<
8
,
reverse_probe
?
0xfe
-
pci_index
:
pci_index
,
&
awc_pci_bus
,
&
awc_pci_dev
)
!=
PCIBIOS_SUCCESSFUL
){
if
(
reverse_probe
){
continue
;
}
else
{
break
;
}
}
pdev
=
pci_find_slot
(
awc_pci_bus
,
awc_pci_dev
);
if
(
!
pdev
)
if
(
pdev
->
vendor
!=
PCI_VENDOR_ID_AIRONET
)
continue
;
if
((
pdev
->
device
!=
PCI_DEVICE_AIRONET_4800_1
)
&&
(
pdev
->
device
!=
PCI_DEVICE_AIRONET_4800
)
&&
(
pdev
->
device
!=
PCI_DEVICE_AIRONET_4500
))
continue
;
if
(
pci_enable_device
(
pdev
))
continue
;
vendor
=
pdev
->
vendor
;
device
=
pdev
->
device
;
pci_irq_line
=
pdev
->
irq
;
pci_memaddr
=
pci_resource_start
(
pdev
,
0
);
pci_cisaddr
=
pci_resource_start
(
pdev
,
1
);
...
...
@@ -120,13 +108,6 @@ int awc4500_pci_probe(struct net_device *dev)
// printk("\n pci capabilities %x and ptr %x \n",pci_caps,pci_caps_ptr);
/* Remove I/O space marker in bit 0. */
if
(
vendor
!=
PCI_VENDOR_ID_AIRONET
)
continue
;
if
(
device
!=
PCI_DEVICE_AIRONET_4800_1
&&
device
!=
PCI_DEVICE_AIRONET_4800
&&
device
!=
PCI_DEVICE_AIRONET_4500
)
continue
;
// if (check_region(pci_ioaddr, AIRONET4X00_IO_SIZE) ||
// check_region(pci_cisaddr, AIRONET4X00_CIS_SIZE) ||
// check_region(pci_memaddr, AIRONET4X00_MEM_SIZE)) {
...
...
@@ -151,7 +132,7 @@ int awc4500_pci_probe(struct net_device *dev)
udelay(1000);
*/
if
(
device
==
PCI_DEVICE_AIRONET_4800
)
if
(
pdev
->
device
==
PCI_DEVICE_AIRONET_4800
)
pci_write_config_dword
(
pdev
,
0x40
,
0x40000000
);
if
(
awc_pci_init
(
dev
,
pdev
,
pci_ioaddr
,
pci_cisaddr
,
pci_memaddr
,
pci_irq_line
)){
...
...
drivers/net/wan/lmc/lmc_main.c
View file @
ecc518ac
...
...
@@ -1045,8 +1045,8 @@ int lmc_probe (struct net_device *dev) /*fold00*/
unsigned
int
pci_irq_line
;
u16
vendor
,
subvendor
,
device
,
subdevice
;
u32
foundaddr
=
0
;
unsigned
char
pci_bus
,
pci_device_fn
;
u8
intcf
=
0
;
struct
pci_dev
*
pdev
=
NULL
;
/* The card is only available on PCI, so if we don't have a
* PCI bus, we are in trouble.
...
...
@@ -1057,21 +1057,7 @@ int lmc_probe (struct net_device *dev) /*fold00*/
return
-
1
;
}
/* Loop basically until we don't find anymore. */
while
(
pci_index
<
0xff
){
struct
pci_dev
*
pdev
;
/* The tulip is considered an ethernet class of card... */
if
(
pcibios_find_class
(
PCI_CLASS_NETWORK_ETHERNET
<<
8
,
pci_index
,
&
pci_bus
,
&
pci_device_fn
)
!=
PCIBIOS_SUCCESSFUL
)
{
/* No card found on this pass */
break
;
}
/* Read the info we need to determine if this is
* our card or not
*/
pdev
=
pci_find_slot
(
pci_bus
,
pci_device_fn
);
if
(
!
pdev
)
break
;
while
((
pdev
=
pci_find_class
(
PCI_CLASS_NETWORK_ETHERNET
<<
8
,
pdev
)))
{
if
(
pci_enable_device
(
pdev
))
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment