* [PATCH 2/2] forcedeth: Addition of new device id
@ 2009-06-02 19:18 Ayaz Abdulla
2009-06-03 20:25 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Ayaz Abdulla @ 2009-06-02 19:18 UTC (permalink / raw)
To: Manfred Spraul, David S. Miller, Andrew Morton, nedev
[-- Attachment #1: Type: text/plain, Size: 122 bytes --]
This patch adds support for new ethernet device in the MCP89 chipset.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
[-- Attachment #2: patch-forcedeth-mcp89-device --]
[-- Type: text/plain, Size: 1301 bytes --]
--- old/drivers/net/forcedeth.c 2009-06-02 14:53:45.000000000 -0400
+++ new/drivers/net/forcedeth.c 2009-06-02 14:53:49.000000000 -0400
@@ -6149,7 +6149,8 @@
for (i = 0;i <= np->register_size/sizeof(u32); i++)
writel(np->saved_config_space[i], base+i*sizeof(u32));
- pci_write_config_dword(pdev, NV_MSI_PRIV_OFFSET, NV_MSI_PRIV_VALUE);
+ if (np->device_id != PCI_DEVICE_ID_NVIDIA_NVENET_40)
+ pci_write_config_dword(pdev, NV_MSI_PRIV_OFFSET, NV_MSI_PRIV_VALUE);
/* restore phy state, including autoneg */
phy_init(dev);
@@ -6353,6 +6354,10 @@
PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_39),
.driver_data = DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX_V3|DEV_HAS_STATISTICS_V3|DEV_HAS_TEST_EXTENDED|DEV_HAS_CORRECT_MACADDR|DEV_HAS_COLLISION_FIX|DEV_NEED_TX_LIMIT|DEV_HAS_GEAR_MODE,
},
+ { /* MCP89 Ethernet Controller */
+ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_40),
+ .driver_data = DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX_V3|DEV_HAS_STATISTICS_V3|DEV_HAS_TEST_EXTENDED|DEV_HAS_CORRECT_MACADDR|DEV_HAS_COLLISION_FIX|DEV_NEED_TX_LIMIT|DEV_HAS_GEAR_MODE,
+ },
{0,},
};
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] forcedeth: Addition of new device id
2009-06-02 19:18 [PATCH 2/2] forcedeth: Addition of new device id Ayaz Abdulla
@ 2009-06-03 20:25 ` Andrew Morton
2009-06-03 21:26 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2009-06-03 20:25 UTC (permalink / raw)
To: Ayaz Abdulla; +Cc: manfred, davem, netdev
On Tue, 02 Jun 2009 15:18:50 -0400
Ayaz Abdulla <aabdulla@nvidia.com> wrote:
> This patch adds support for new ethernet device in the MCP89 chipset.
>
> Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
>
It's best to combine these two patches into one, IMO.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] forcedeth: Addition of new device id
2009-06-03 20:25 ` Andrew Morton
@ 2009-06-03 21:26 ` David Miller
2009-06-03 21:52 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2009-06-03 21:26 UTC (permalink / raw)
To: akpm; +Cc: aabdulla, manfred, netdev
From: Andrew Morton <akpm@linux-foundation.org>
Date: Wed, 3 Jun 2009 13:25:09 -0700
> On Tue, 02 Jun 2009 15:18:50 -0400
> Ayaz Abdulla <aabdulla@nvidia.com> wrote:
>
>> This patch adds support for new ethernet device in the MCP89 chipset.
>>
>> Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
>>
>
> It's best to combine these two patches into one, IMO.
Andrew, we do not add new entries to pci_ids.h any more.
Just use the constant directly when using it in the driver
ID table.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] forcedeth: Addition of new device id
2009-06-03 21:26 ` David Miller
@ 2009-06-03 21:52 ` Andrew Morton
2009-06-03 21:57 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2009-06-03 21:52 UTC (permalink / raw)
To: David Miller; +Cc: aabdulla, manfred, netdev
On Wed, 03 Jun 2009 14:26:47 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Wed, 3 Jun 2009 13:25:09 -0700
>
> > On Tue, 02 Jun 2009 15:18:50 -0400
> > Ayaz Abdulla <aabdulla@nvidia.com> wrote:
> >
> >> This patch adds support for new ethernet device in the MCP89 chipset.
> >>
> >> Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
> >>
> >
> > It's best to combine these two patches into one, IMO.
>
> Andrew, we do not add new entries to pci_ids.h any more.
Lots of people are still changing it. I believe that the approach
we've been taking is: if the driver presently uses pci_ids.h and you're
adding a new ID then go for it. But new drivers should use a private
site for the IDs. And patches which switch old drivers from pci_ids
over to a private site are approved of.
> Just use the constant directly when using it in the driver
> ID table.
Well OK, but that means that forcedeth has most of its PCI IDs
enumerated in pci_ids.h, but others hardwired in forcedeth.c.
IOW, Ayaz owes us a "[patch] forcedeth: remove PCI IDs from pci_ids.h" ;)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] forcedeth: Addition of new device id
2009-06-03 21:52 ` Andrew Morton
@ 2009-06-03 21:57 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-06-03 21:57 UTC (permalink / raw)
To: akpm; +Cc: aabdulla, manfred, netdev
From: Andrew Morton <akpm@linux-foundation.org>
Date: Wed, 3 Jun 2009 14:52:38 -0700
> On Wed, 03 Jun 2009 14:26:47 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
>
>> Andrew, we do not add new entries to pci_ids.h any more.
>
> Lots of people are still changing it.
Not enough policing, that's all. Even I let one slip in recently, but
that was an oversight rather than something I did on purpose. :-)
> I believe that the approach we've been taking is: if the driver
> presently uses pci_ids.h and you're adding a new ID then go for it.
> But new drivers should use a private site for the IDs. And patches
> which switch old drivers from pci_ids over to a private site are
> approved of.
I think it's silly to let use continue even in those situations. If
it's in a header file, it's so that it can (at least potentially) be
used in multiple places. That is not the situation we are handling
here, such defines are always used in exactly one place, the driver ID
table.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-06-03 21:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02 19:18 [PATCH 2/2] forcedeth: Addition of new device id Ayaz Abdulla
2009-06-03 20:25 ` Andrew Morton
2009-06-03 21:26 ` David Miller
2009-06-03 21:52 ` Andrew Morton
2009-06-03 21:57 ` David Miller
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).