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
75257710
Commit
75257710
authored
Aug 31, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/jgarzik/net-drivers-2.6
into redhat.com:/spare/repo/net-drivers-2.5
parents
32dfc756
a719c93b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
drivers/net/8139cp.c
drivers/net/8139cp.c
+9
-23
No files found.
drivers/net/8139cp.c
View file @
75257710
...
...
@@ -1618,7 +1618,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
void
*
regs
;
long
pciaddr
;
unsigned
int
addr_len
,
i
,
pci_using_dac
;
u8
pci_rev
,
cache_size
;
u8
pci_rev
;
#ifndef MODULE
static
int
version_printed
;
...
...
@@ -1659,10 +1659,14 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if
(
rc
)
goto
err_out_free
;
rc
=
pci_
request_regions
(
pdev
,
DRV_NAME
);
rc
=
pci_
set_mwi
(
pdev
);
if
(
rc
)
goto
err_out_disable
;
rc
=
pci_request_regions
(
pdev
,
DRV_NAME
);
if
(
rc
)
goto
err_out_mwi
;
if
(
pdev
->
irq
<
2
)
{
rc
=
-
EIO
;
printk
(
KERN_ERR
PFX
"invalid irq (%d) for pci dev %s
\n
"
,
...
...
@@ -1759,29 +1763,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_drvdata
(
pdev
,
dev
);
/*
* Looks like this is necessary to deal with on all architectures,
* even this %$#%$# N440BX Intel based thing doesn't get it right.
* Ie. having two NICs in the machine, one will have the cache
* line set at boot time, the other will not.
*/
pci_read_config_byte
(
pdev
,
PCI_CACHE_LINE_SIZE
,
&
cache_size
);
cache_size
<<=
2
;
if
(
cache_size
!=
SMP_CACHE_BYTES
)
{
printk
(
KERN_INFO
"%s: PCI cache line size set incorrectly "
"(%i bytes) by BIOS/FW, "
,
dev
->
name
,
cache_size
);
if
(
cache_size
>
SMP_CACHE_BYTES
)
printk
(
"expecting %i
\n
"
,
SMP_CACHE_BYTES
);
else
{
printk
(
"correcting to %i
\n
"
,
SMP_CACHE_BYTES
);
pci_write_config_byte
(
pdev
,
PCI_CACHE_LINE_SIZE
,
SMP_CACHE_BYTES
>>
2
);
}
}
/* enable busmastering and memory-write-invalidate */
pci_set_master
(
pdev
);
pci_set_mwi
(
pdev
);
if
(
cp
->
wol_enabled
)
cp_set_d3_state
(
cp
);
...
...
@@ -1791,6 +1774,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
iounmap
(
regs
);
err_out_res:
pci_release_regions
(
pdev
);
err_out_mwi:
pci_clear_mwi
(
pdev
);
err_out_disable:
pci_disable_device
(
pdev
);
err_out_free:
...
...
@@ -1809,6 +1794,7 @@ static void cp_remove_one (struct pci_dev *pdev)
iounmap
(
cp
->
regs
);
if
(
cp
->
wol_enabled
)
pci_set_power_state
(
pdev
,
0
);
pci_release_regions
(
pdev
);
pci_clear_mwi
(
pdev
);
pci_disable_device
(
pdev
);
pci_set_drvdata
(
pdev
,
NULL
);
free_netdev
(
dev
);
...
...
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