netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How come realtek drivers are combined
@ 2008-06-26 23:16 Mario Limonciello
  2008-06-27 19:18 ` Francois Romieu
  0 siblings, 1 reply; 5+ messages in thread
From: Mario Limonciello @ 2008-06-26 23:16 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

Hi:

I'm new to the list but didn't immediately see an answer to this in
quick searches.

Realtek provides several (separated) drivers for their different
chipsets, r8169, r8168, r8101, etc. I see that they are regularly all
merged into the r8169 driver in the kernel.  How come it works this
way?  Is it just because no one ever bothered to do it differently? 
Obviously, they all share a very similar code base so its somewhat
sensible to try to produce a single driver.  I would think it would work
a lot better for everyone if Realtek and the kernel maintainers that
work on the Realtek driver were directly in sync rather than having to
play tag pulling patches from each other's drivers.

Thanks,
-- 
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: How come realtek drivers are combined
  2008-06-26 23:16 How come realtek drivers are combined Mario Limonciello
@ 2008-06-27 19:18 ` Francois Romieu
  2008-06-30 15:24   ` Mario Limonciello
  0 siblings, 1 reply; 5+ messages in thread
From: Francois Romieu @ 2008-06-27 19:18 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: netdev, edward_hsu

Mario Limonciello <mario_limonciello@dell.com> :
[...]
> Realtek provides several (separated) drivers for their different
> chipsets, r8169, r8168, r8101, etc. I see that they are regularly all
> merged into the r8169 driver in the kernel. How come it works this
> way ?

I made it this way.

> Is it just because no one ever bothered to do it differently ? 

It was suggested before but it was not strongly argumented and I have
a strong bias against it as long as it is not clearly needed.

> Obviously, they all share a very similar code base so its somewhat
> sensible to try to produce a single driver. 

It was.

I'll probably end splitting things between the old pci-only 8169 and
the newest pci-e though.

> I would think it would work a lot better for everyone if Realtek and
> the kernel maintainers that work on the Realtek driver were directly
> in sync rather than having to play tag pulling patches from each other's
> drivers.

Given that the choice of operating systems for laptops on Dell's online
shop does not include my favorite OS, "everyone" seems a bit of an
overstatement to me (sorry, could not resist :o) ).

Compare two versions of the same driver from Realtek and you should
realize that you are addressing a false problem.

-- 
Ueimor

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

* Re: How come realtek drivers are combined
  2008-06-27 19:18 ` Francois Romieu
@ 2008-06-30 15:24   ` Mario Limonciello
  2008-06-30 21:31     ` Francois Romieu
  0 siblings, 1 reply; 5+ messages in thread
From: Mario Limonciello @ 2008-06-30 15:24 UTC (permalink / raw)
  To: Francois Romieu; +Cc: netdev, edward_hsu

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

Francois:

Francois Romieu wrote:
> I made it this way.
>   
Ah.
> Given that the choice of operating systems for laptops on Dell's online
> shop does not include my favorite OS, "everyone" seems a bit of an
> overstatement to me (sorry, could not resist :o) ).
>   
You go and offer Redhat on business portables, and they want Ubuntu. 
You offer Ubuntu on consumer portables and then they want $(INSERT
DISTRO HERE) :)
Offering this to every consumer as an option with every laptop though,
that will take some time.  For now, the consumers that want it can go to
http://www.dell.com/linux
> Compare two versions of the same driver from Realtek and you should
> realize that you are addressing a false problem.
>   
This is sometimes a bit difficult to do since I didn't see historical
versioning on their website.  It was a hunch, however.


Now I did see a fair deal of patches floating in from you, so I'll clone
your netdev git tree and give this a run on some of the RTL8101's that
are having trouble.

Thanks for the thorough explanation,
-- 
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: How come realtek drivers are combined
  2008-06-30 15:24   ` Mario Limonciello
@ 2008-06-30 21:31     ` Francois Romieu
  2008-07-01 21:58       ` Francois Romieu
  0 siblings, 1 reply; 5+ messages in thread
From: Francois Romieu @ 2008-06-30 21:31 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: netdev, edward_hsu

Mario Limonciello <mario_limonciello@dell.com> :
[...]
> This is sometimes a bit difficult to do since I didn't see historical
> versioning on their website.  It was a hunch, however.

ee ftp://210.51.181.211/cn/nic/ for the previous versions. It is rather
coarse though.

> Now I did see a fair deal of patches floating in from you, so I'll clone
> your netdev git tree and give this a run on some of the RTL8101's that
> are having trouble.

Don't expect miracle: the 8101/8102 part is not floating yet.

-- 
Ueimor

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

* Re: How come realtek drivers are combined
  2008-06-30 21:31     ` Francois Romieu
@ 2008-07-01 21:58       ` Francois Romieu
  0 siblings, 0 replies; 5+ messages in thread
From: Francois Romieu @ 2008-07-01 21:58 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: netdev, edward_hsu

Francois Romieu <romieu@fr.zoreil.com> :
> Mario Limonciello <mario_limonciello@dell.com> :
[...]
> > Now I did see a fair deal of patches floating in from you, so I'll clone
> > your netdev git tree and give this a run on some of the RTL8101's that
> > are having trouble.
> 
> Don't expect miracle: the 8101/8102 part is not floating yet.

That being said, you can give a try to the version of the day at
http://userweb.kernel.org/~romieu/r8169/2.6.26-rc6/ and apply the
patch below to it:

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 8d18bb6..860a472 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2547,8 +2547,13 @@ static void rtl_hw_start_8101(struct net_device *dev)
 
 	if ((tp->mac_version == RTL_GIGA_MAC_VER_13) ||
 	    (tp->mac_version == RTL_GIGA_MAC_VER_16)) {
-		pci_write_config_word(pdev, 0x68, 0x00);
-		pci_write_config_word(pdev, 0x69, 0x08);
+		int cap;
+
+		cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
+		if (cap != 0) {
+			pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL,
+					      PCI_EXP_DEVCTL_NOSNOOP_EN);
+		}
 	}
 
 	RTL_W8(Cfg9346, Cfg9346_Unlock);

-- 
Ueimor

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

end of thread, other threads:[~2008-07-01 21:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-26 23:16 How come realtek drivers are combined Mario Limonciello
2008-06-27 19:18 ` Francois Romieu
2008-06-30 15:24   ` Mario Limonciello
2008-06-30 21:31     ` Francois Romieu
2008-07-01 21:58       ` Francois Romieu

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).