Netdev List
 help / color / mirror / Atom feed
* [PATCH 10/25] atm: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
From: Peter Huewe @ 2010-07-15 18:49 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Chas Williams, David S. Miller, Tejun Heo, linux-atm-general,
	netdev, linux-kernel

From: Peter Huewe <peterhuewe@gmx.de>

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/atm/zatm.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 702acce..4e885d2 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -1637,10 +1637,8 @@ out_free:
 MODULE_LICENSE("GPL");
 
 static struct pci_device_id zatm_pci_tbl[] __devinitdata = {
-	{ PCI_VENDOR_ID_ZEITNET, PCI_DEVICE_ID_ZEITNET_1221,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, ZATM_COPPER },
-	{ PCI_VENDOR_ID_ZEITNET, PCI_DEVICE_ID_ZEITNET_1225,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER },
+	{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 },
 	{ 0, }
 };
 MODULE_DEVICE_TABLE(pci, zatm_pci_tbl);
-- 
1.7.1


^ permalink raw reply related

* RE: [PATCH 5/8] drivers: ixgbevf: fix unsigned underflow
From: Rose, Gregory V @ 2010-07-15 18:52 UTC (permalink / raw)
  To: Kulikov Vasiliy, kernel-janitors@vger.kernel.org
  Cc: David S. Miller, Kirsher, Jeffrey T, Eric Dumazet, Joe Perches,
	netdev@vger.kernel.org
In-Reply-To: <1279219557-12525-1-git-send-email-segooon@gmail.com>

>-----Original Message-----
>From: Kulikov Vasiliy [mailto:segooon@gmail.com]
>Sent: Thursday, July 15, 2010 11:46 AM
>To: kernel-janitors@vger.kernel.org
>Cc: David S. Miller; Kirsher, Jeffrey T; Rose, Gregory V; Eric Dumazet;
>Joe Perches; netdev@vger.kernel.org
>Subject: [PATCH 5/8] drivers: ixgbevf: fix unsigned underflow
>
>'count' is unsigned. It is initialized to zero, then it can be increased
>multiple times, and finally it is used in such a way:
>
>   >>>> count--;
>   |
>   |    /* clear timestamp and dma mappings for remaining portion of
>packet */
>   |    while (count >= 0) {
>   |            count--;
>   |            ...
>   ^
>If count is zero here (so, it was never increased), we would have a very
>long loop :)
>
>Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
>---
> drivers/net/ixgbevf/ixgbevf_main.c |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/net/ixgbevf/ixgbevf_main.c
>b/drivers/net/ixgbevf/ixgbevf_main.c
>index 73f1e75..af49135 100644
>--- a/drivers/net/ixgbevf/ixgbevf_main.c
>+++ b/drivers/net/ixgbevf/ixgbevf_main.c
>@@ -2935,7 +2935,8 @@ static int ixgbevf_tx_map(struct ixgbevf_adapter
>*adapter,
> 	struct ixgbevf_tx_buffer *tx_buffer_info;
> 	unsigned int len;
> 	unsigned int total = skb->len;
>-	unsigned int offset = 0, size, count = 0;
>+	unsigned int offset = 0, size;
>+	int count = 0;
> 	unsigned int nr_frags = skb_shinfo(skb)->nr_frags;
> 	unsigned int f;
> 	int i;
>--
>1.7.0.4

Acked By: Greg Rose <gregory.v.rose@intel.com>


^ permalink raw reply

* RE: [REGRESSION] e1000e stopped working [MANUALLY BISECTED]
From: Maxim Levitsky @ 2010-07-15 18:57 UTC (permalink / raw)
  To: Tantilov, Emil S
  Cc: Kirsher, Jeffrey T, netdev@vger.kernel.org, Allan, Bruce W,
	Pieper, Jeffrey E
In-Reply-To: <1279150380.7810.2.camel@localhost.localdomain>

On Thu, 2010-07-15 at 02:33 +0300, Maxim Levitsky wrote:
> On Wed, 2010-07-14 at 16:56 -0600, Tantilov, Emil S wrote:
> > Maxim Levitsky wrote:
> > > On Mon, 2010-07-12 at 15:23 -0600, Tantilov, Emil S wrote:
> > >> Maxim Levitsky wrote:
> > >>> On Mon, 2010-07-05 at 12:58 +0300, Maxim Levitsky wrote:
> > >>>> On Mon, 2010-07-05 at 01:13 -0700, Jeff Kirsher wrote:
> > >>>>> On Sun, Jul 4, 2010 at 15:48, Maxim Levitsky
> > >>>>> <maximlevitsky@gmail.com> wrote:
> > >>>>>> Did few guesses, and now I see that reverting the below commit
> > >>>>>> fixes the problem. 
> > >>>>>> 
> > >>>>>> "e1000e: Fix/cleanup PHY reset code for ICHx/PCHx"
> > >>>>>> e98cac447cc1cc418dff1d610a5c79c4f2bdec7f.
> > >>>>>> 
> > >>>>>> 
> > >>>>>> Best regards,
> > >>>>>>        Maxim Levitsky
> > >>>>>> 
> > >>>>>> --
> > >>>>> 
> > >>>>> Can you give us till Tuesday to respond?  I know that there are
> > >>>>> some additional e1000e patches in my queue, which may resolve the
> > >>>>> issue, but this weekend the power is down to do some
> > >>>>> infrastructure upgrades which prevents us from doing any
> > >>>>> investigation.debugging until Tuesday. 
> > >>>>> 
> > >>>> 
> > >>>> Sure.
> > >>>> 
> > >>>> Best regards,
> > >>>> 	Maxim Levitsky
> > >>>> 
> > >>> 
> > >>> Updates?
> > >> 
> > >> We are working on reproducing the issue. So far we have not seen the
> > >> problem when testing with net-next. 
> > >> 
> > >> I asked in previous email about some additional info from ethtool
> > >> (-d, -e, -S) and kernel config. That would help us to narrow it
> > >> down.  
> > >> 
> > >> Thanks,
> > >> Emil
> > > I did send -e and -d output.
> > 
> > Sorry, looks like I lost the email with the attachements. 
> > 
> > Could you provide the output of dmesg after the failure occurs?
> >  
> > > Since you probably want -S output during failure, I need to recompile
> > > kernel for that. I will do that soon.
> > > 
> > > 
> > > One question, in two weeks I hope 2.6.35 won't be released?
> > > If so, I will have enough free time then to narrow down this issue.
> > > 
> > > Other solution, is to revert this commit.
> > > (I have never seen this problem with it reverted).
> > 
> > We have been running reboot tests on 2 separate systems with recent net-next kernels 
> > using your config and so far no luck in reproducing this issue. 
> > 
> > What is the make model of your system (or MB)?
> 
> the motherboard is Intel DG965RY.
> 
> However, I am using vanilla kernel.
> net-next might contain further fixes.
> 
> I see if net-next works here.

Yep, net-next works here.


I have the problem on vanilla kernel.
Last revision of it, I tested is 2.6.35-rc4 exactly
(815c4163b6c8ebf8152f42b0a5fd015cfdcedc78)


Maybe vanilla git master works, I test it too soon.


Best regards,
	Maxim Levitsky




^ permalink raw reply

* Re: [PATCH 1/2] bnx2: allocate with GFP_KERNEL flag on RX path init
From: Mitchell Erblich @ 2010-07-15 18:57 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: netdev, Michael Chan
In-Reply-To: <20100715142537.12504.60051.send-patch@dhcp-lab-109.englab.brq.redhat.com>


On Jul 15, 2010, at 7:25 AM, Stanislaw Gruszka wrote:

> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/bnx2.c |   17 +++++++++--------
> 1 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
> index a203f39..6de4cb7 100644
> --- a/drivers/net/bnx2.c
> +++ b/drivers/net/bnx2.c
> @@ -2664,13 +2664,13 @@ bnx2_set_mac_addr(struct bnx2 *bp, u8 *mac_addr, u32 pos)
> }
> 
> static inline int
> -bnx2_alloc_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
> +bnx2_alloc_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index, gfp_t gfp)
> {
> 	dma_addr_t mapping;
> 	struct sw_pg *rx_pg = &rxr->rx_pg_ring[index];
> 	struct rx_bd *rxbd =
> 		&rxr->rx_pg_desc_ring[RX_RING(index)][RX_IDX(index)];
> -	struct page *page = alloc_page(GFP_ATOMIC);
> +	struct page *page = alloc_page(gfp);
> 
> 	if (!page)
> 		return -ENOMEM;
> @@ -2705,7 +2705,7 @@ bnx2_free_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
> }
> 
> static inline int
> -bnx2_alloc_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
> +bnx2_alloc_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index, gfp_t gfp)
> {
> 	struct sk_buff *skb;
> 	struct sw_bd *rx_buf = &rxr->rx_buf_ring[index];
> @@ -2713,7 +2713,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
> 	struct rx_bd *rxbd = &rxr->rx_desc_ring[RX_RING(index)][RX_IDX(index)];
> 	unsigned long align;
> 
> -	skb = netdev_alloc_skb(bp->dev, bp->rx_buf_size);
> +	skb = __netdev_alloc_skb(bp->dev, bp->rx_buf_size, gfp);
> 	if (skb == NULL) {
> 		return -ENOMEM;
> 	}
> @@ -2974,7 +2974,7 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, struct sk_buff *skb,
> 	int err;
> 	u16 prod = ring_idx & 0xffff;
> 
> -	err = bnx2_alloc_rx_skb(bp, rxr, prod);
> +	err = bnx2_alloc_rx_skb(bp, rxr, prod, GFP_KERNEL);
> 	if (unlikely(err)) {
> 		bnx2_reuse_rx_skb(bp, rxr, skb, (u16) (ring_idx >> 16), prod);
> 		if (hdr_len) {
> @@ -3039,7 +3039,8 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, struct sk_buff *skb,
> 			rx_pg->page = NULL;
> 
> 			err = bnx2_alloc_rx_page(bp, rxr,
> -						 RX_PG_RING_IDX(pg_prod));
> +						 RX_PG_RING_IDX(pg_prod),
> +	

> 					 GFP_ATOMIC);

Why not GFP_NOWAIT here?
This would then not use the last reserved pages of memory.
This still would remove the possibe sleep asociated with GFP_KERNEL.

Mitchell Erblich


> 			if (unlikely(err)) {
> 				rxr->rx_pg_cons = pg_cons;
> 				rxr->rx_pg_prod = pg_prod;
> @@ -5179,7 +5180,7 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
> 
> 	ring_prod = prod = rxr->rx_pg_prod;
> 	for (i = 0; i < bp->rx_pg_ring_size; i++) {
> -		if (bnx2_alloc_rx_page(bp, rxr, ring_prod) < 0) {
> +		if (bnx2_alloc_rx_page(bp, rxr, ring_prod, GFP_KERNEL) < 0) {
> 			netdev_warn(bp->dev, "init'ed rx page ring %d with %d/%d pages only\n",
> 				    ring_num, i, bp->rx_pg_ring_size);
> 			break;
> @@ -5191,7 +5192,7 @@ bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
> 
> 	ring_prod = prod = rxr->rx_prod;
> 	for (i = 0; i < bp->rx_ring_size; i++) {
> -		if (bnx2_alloc_rx_skb(bp, rxr, ring_prod) < 0) {
> +		if (bnx2_alloc_rx_skb(bp, rxr, ring_prod, GFP_KERNEL) < 0) {
> 			netdev_warn(bp->dev, "init'ed rx ring %d with %d/%d skbs only\n",
> 				    ring_num, i, bp->rx_ring_size);
> 			break;
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply

* RE: [REGRESSION] e1000e stopped working [MANUALLY BISECTED]
From: Tantilov, Emil S @ 2010-07-15 19:02 UTC (permalink / raw)
  To: Maxim Levitsky
  Cc: Kirsher, Jeffrey T, netdev@vger.kernel.org, Allan, Bruce W,
	Pieper, Jeffrey E
In-Reply-To: <1279220266.4411.2.camel@localhost.localdomain>

Maxim Levitsky wrote:
> On Thu, 2010-07-15 at 02:33 +0300, Maxim Levitsky wrote:
>> On Wed, 2010-07-14 at 16:56 -0600, Tantilov, Emil S wrote:
>>> Maxim Levitsky wrote:
>>>> On Mon, 2010-07-12 at 15:23 -0600, Tantilov, Emil S wrote:
>>>>> Maxim Levitsky wrote:
>>>>>> On Mon, 2010-07-05 at 12:58 +0300, Maxim Levitsky wrote:
>>>>>>> On Mon, 2010-07-05 at 01:13 -0700, Jeff Kirsher wrote:
>>>>>>>> On Sun, Jul 4, 2010 at 15:48, Maxim Levitsky
>>>>>>>> <maximlevitsky@gmail.com> wrote:
>>>>>>>>> Did few guesses, and now I see that reverting the below
>>>>>>>>> commit fixes the problem. 
>>>>>>>>> 
>>>>>>>>> "e1000e: Fix/cleanup PHY reset code for ICHx/PCHx"
>>>>>>>>> e98cac447cc1cc418dff1d610a5c79c4f2bdec7f.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Best regards,
>>>>>>>>>        Maxim Levitsky
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>> 
>>>>>>>> Can you give us till Tuesday to respond?  I know that there are
>>>>>>>> some additional e1000e patches in my queue, which may resolve
>>>>>>>> the issue, but this weekend the power is down to do some
>>>>>>>> infrastructure upgrades which prevents us from doing any
>>>>>>>> investigation.debugging until Tuesday.
>>>>>>>> 
>>>>>>> 
>>>>>>> Sure.
>>>>>>> 
>>>>>>> Best regards,
>>>>>>> 	Maxim Levitsky
>>>>>>> 
>>>>>> 
>>>>>> Updates?
>>>>> 
>>>>> We are working on reproducing the issue. So far we have not seen
>>>>> the problem when testing with net-next.
>>>>> 
>>>>> I asked in previous email about some additional info from ethtool
>>>>> (-d, -e, -S) and kernel config. That would help us to narrow it
>>>>> down. 
>>>>> 
>>>>> Thanks,
>>>>> Emil
>>>> I did send -e and -d output.
>>> 
>>> Sorry, looks like I lost the email with the attachements.
>>> 
>>> Could you provide the output of dmesg after the failure occurs?
>>> 
>>>> Since you probably want -S output during failure, I need to
>>>> recompile kernel for that. I will do that soon.
>>>> 
>>>> 
>>>> One question, in two weeks I hope 2.6.35 won't be released?
>>>> If so, I will have enough free time then to narrow down this issue.
>>>> 
>>>> Other solution, is to revert this commit.
>>>> (I have never seen this problem with it reverted).
>>> 
>>> We have been running reboot tests on 2 separate systems with recent
>>> net-next kernels using your config and so far no luck in
>>> reproducing this issue. 
>>> 
>>> What is the make model of your system (or MB)?
>> 
>> the motherboard is Intel DG965RY.
>> 
>> However, I am using vanilla kernel.
>> net-next might contain further fixes.
>> 
>> I see if net-next works here.
> 
> Yep, net-next works here.
> 
> 
> I have the problem on vanilla kernel.
> Last revision of it, I tested is 2.6.35-rc4 exactly
> (815c4163b6c8ebf8152f42b0a5fd015cfdcedc78)
> 
> 
> Maybe vanilla git master works, I test it too soon.

Thanks for the information! Good to know that this issue does not exist in the latest branch.

Have you by any chance tested a stable branch (2.6.34.x)?

> 
> 
> Best regards,
> 	Maxim Levitsky

Thanks,
Emil

^ permalink raw reply

* [PATCH 19/25] isdn/hardware/mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
From: Peter Huewe @ 2010-07-15 19:02 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Karsten Keil, Uwe Kleine-König, Tejun Heo, Jiri Kosina,
	netdev, linux-kernel

From: Peter Huewe <peterhuewe@gmx.de>

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/isdn/hardware/mISDN/hfcpci.c |   92 +++++++++++++++++-----------------
 1 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index 65ded05..15d323b 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -2188,52 +2188,52 @@ static const struct _hfc_map hfc_map[] =
 
 static struct pci_device_id hfc_ids[] =
 {
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_2BD0,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[0]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B000,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[1]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B006,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[2]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B007,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[3]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B008,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[4]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B009,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[5]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00A,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[6]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[7]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[8]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[9]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B700,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[10]},
-	{PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B701,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[11]},
-	{PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[12]},
-	{PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[13]},
-	{PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[14]},
-	{PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_A1T,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[15]},
-	{PCI_VENDOR_ID_ANIGMA, PCI_DEVICE_ID_ANIGMA_MC145575,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[16]},
-	{PCI_VENDOR_ID_ZOLTRIX, PCI_DEVICE_ID_ZOLTRIX_2BD0,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[17]},
-	{PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_E,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[18]},
-	{PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_E,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[19]},
-	{PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[20]},
-	{PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_A,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[21]},
-	{PCI_VENDOR_ID_SITECOM, PCI_DEVICE_ID_SITECOM_DC105V2,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &hfc_map[22]},
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_2BD0),
+		(unsigned long) &hfc_map[0] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B000),
+		(unsigned long) &hfc_map[1] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B006),
+		(unsigned long) &hfc_map[2] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B007),
+		(unsigned long) &hfc_map[3] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B008),
+		(unsigned long) &hfc_map[4] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B009),
+		(unsigned long) &hfc_map[5] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B00A),
+		(unsigned long) &hfc_map[6] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B00B),
+		(unsigned long) &hfc_map[7] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B00C),
+		(unsigned long) &hfc_map[8] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B100),
+		(unsigned long) &hfc_map[9] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B700),
+		(unsigned long) &hfc_map[10] },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_B701),
+		(unsigned long) &hfc_map[11] },
+	{ PCI_VDEVICE(ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1),
+		(unsigned long) &hfc_map[12] },
+	{ PCI_VDEVICE(ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675),
+		(unsigned long) &hfc_map[13] },
+	{ PCI_VDEVICE(BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT),
+		(unsigned long) &hfc_map[14] },
+	{ PCI_VDEVICE(BERKOM, PCI_DEVICE_ID_BERKOM_A1T),
+		(unsigned long) &hfc_map[15] },
+	{ PCI_VDEVICE(ANIGMA, PCI_DEVICE_ID_ANIGMA_MC145575),
+		(unsigned long) &hfc_map[16] },
+	{ PCI_VDEVICE(ZOLTRIX, PCI_DEVICE_ID_ZOLTRIX_2BD0),
+		(unsigned long) &hfc_map[17] },
+	{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_E),
+		(unsigned long) &hfc_map[18] },
+	{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_E),
+		(unsigned long) &hfc_map[19] },
+	{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A),
+		(unsigned long) &hfc_map[20] },
+	{ PCI_VDEVICE(DIGI, PCI_DEVICE_ID_DIGI_DF_M_A),
+		(unsigned long) &hfc_map[21] },
+	{ PCI_VDEVICE(SITECOM, PCI_DEVICE_ID_SITECOM_DC105V2),
+		(unsigned long) &hfc_map[22] },
 	{},
 };
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH 20/25] mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
From: Peter Hüwe @ 2010-07-15 19:04 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Karsten Keil, Andrew Morton, Uwe Kleine-König,
	David S. Miller, Tejun Heo, netdev, linux-kernel

From: Peter Huewe <peterhuewe@gmx.de>

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/isdn/hardware/mISDN/mISDNinfineon.c |   39 +++++++++-----------------
 1 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
index 4975976..d2dd61d 100644
--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
@@ -125,36 +125,25 @@ struct inf_hw {
 #define PCI_SUB_ID_SEDLBAUER            0x01
 
 static struct pci_device_id infineon_ids[] __devinitdata = {
-	{ PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA20,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_DIVA20},
-	{ PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA20_U,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_DIVA20U},
-	{ PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA201,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_DIVA201},
-	{ PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA202,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_DIVA202},
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20), INF_DIVA20 },
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA20_U), INF_DIVA20U },
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA201), INF_DIVA201 },
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_DIVA202), INF_DIVA202 },
 	{ PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100,
 	  PCI_SUBVENDOR_SEDLBAUER_PCI, PCI_SUB_ID_SEDLBAUER, 0, 0,
-	  INF_SPEEDWIN},
+	  INF_SPEEDWIN },
 	{ PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100,
-	  PCI_SUBVENDOR_HST_SAPHIR3, PCI_SUB_ID_SEDLBAUER, 0, 0, INF_SAPHIR3},
-	{ PCI_VENDOR_ID_ELSA, PCI_DEVICE_ID_ELSA_MICROLINK,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_QS1000},
-	{ PCI_VENDOR_ID_ELSA, PCI_DEVICE_ID_ELSA_QS3000,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_QS3000},
-	{ PCI_VENDOR_ID_SATSAGEM, PCI_DEVICE_ID_SATSAGEM_NICCY,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_NICCY},
+	  PCI_SUBVENDOR_HST_SAPHIR3, PCI_SUB_ID_SEDLBAUER, 0, 0, INF_SAPHIR3 },
+	{ PCI_VDEVICE(ELSA, PCI_DEVICE_ID_ELSA_MICROLINK), INF_QS1000 },
+	{ PCI_VDEVICE(ELSA, PCI_DEVICE_ID_ELSA_QS3000), INF_QS3000 },
+	{ PCI_VDEVICE(SATSAGEM, PCI_DEVICE_ID_SATSAGEM_NICCY), INF_NICCY },
 	{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
 	  PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO, 0, 0,
-	  INF_SCT_1},
-	{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_R685,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_GAZEL_R685},
-	{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_R753,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_GAZEL_R753},
-	{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_DJINN_ITOO,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_GAZEL_R753},
-	{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_OLITEC,
-	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, INF_GAZEL_R753},
+	  INF_SCT_1 },
+	{ PCI_VDEVICE(PLX, PCI_DEVICE_ID_PLX_R685), INF_GAZEL_R685 },
+	{ PCI_VDEVICE(PLX, PCI_DEVICE_ID_PLX_R753), INF_GAZEL_R753 },
+	{ PCI_VDEVICE(PLX, PCI_DEVICE_ID_PLX_DJINN_ITOO), INF_GAZEL_R753 },
+	{ PCI_VDEVICE(PLX, PCI_DEVICE_ID_PLX_OLITEC), INF_GAZEL_R753 },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, infineon_ids);
-- 
1.7.1

^ permalink raw reply related

* [PATCH 21/25] isdn/hardware/eicon: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
From: Peter Huewe @ 2010-07-15 19:04 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Armin Schindler, Karsten Keil, David S. Miller, Arnd Bergmann,
	netdev, linux-kernel

From: Peter Huewe <peterhuewe@gmx.de>

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/isdn/hardware/eicon/divasmain.c |   69 +++++++++++++++----------------
 1 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 16a874b..ed9c555 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -112,41 +112,40 @@ typedef struct _diva_os_thread_dpc {
   This table should be sorted by PCI device ID
   */
 static struct pci_device_id divas_pci_tbl[] = {
-/* Diva Server BRI-2M PCI 0xE010 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_MAESTRA,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_MAESTRA_PCI},
-/* Diva Server 4BRI-8M PCI 0xE012 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_MAESTRAQ,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_Q_8M_PCI},
-/* Diva Server 4BRI-8M 2.0 PCI 0xE013 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_MAESTRAQ_U,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_Q_8M_V2_PCI},
-/* Diva Server PRI-30M PCI 0xE014 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_MAESTRAP,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_P_30M_PCI},
-/* Diva Server PRI 2.0 adapter 0xE015 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_MAESTRAP_2,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_P_30M_V2_PCI},
-/* Diva Server Voice 4BRI-8M PCI 0xE016 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_4BRI_VOIP,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_VOICE_Q_8M_PCI},
-/* Diva Server Voice 4BRI-8M 2.0 PCI 0xE017 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_4BRI_2_VOIP,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_VOICE_Q_8M_V2_PCI},
-/* Diva Server BRI-2M 2.0 PCI 0xE018 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_BRI2M_2,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_B_2M_V2_PCI},
-/* Diva Server Voice PRI 2.0 PCI 0xE019 */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_MAESTRAP_2_VOIP,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-	 CARDTYPE_DIVASRV_VOICE_P_30M_V2_PCI},
-/* Diva Server 2FX 0xE01A */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_2F,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_B_2F_PCI},
-/* Diva Server Voice BRI-2M 2.0 PCI 0xE01B */
-	{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_BRI2M_2_VOIP,
-	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CARDTYPE_DIVASRV_VOICE_B_2M_V2_PCI},
-	{0,}			/* 0 terminated list. */
+	/* Diva Server BRI-2M PCI 0xE010 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRA),
+		CARDTYPE_MAESTRA_PCI },
+	/* Diva Server 4BRI-8M PCI 0xE012 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAQ),
+		CARDTYPE_DIVASRV_Q_8M_PCI },
+	/* Diva Server 4BRI-8M 2.0 PCI 0xE013 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAQ_U),
+		CARDTYPE_DIVASRV_Q_8M_V2_PCI },
+	/* Diva Server PRI-30M PCI 0xE014 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAP),
+		CARDTYPE_DIVASRV_P_30M_PCI },
+	/* Diva Server PRI 2.0 adapter 0xE015 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAP_2),
+		CARDTYPE_DIVASRV_P_30M_V2_PCI },
+	/* Diva Server Voice 4BRI-8M PCI 0xE016 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_4BRI_VOIP),
+		CARDTYPE_DIVASRV_VOICE_Q_8M_PCI },
+	/* Diva Server Voice 4BRI-8M 2.0 PCI 0xE017 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_4BRI_2_VOIP),
+		CARDTYPE_DIVASRV_VOICE_Q_8M_V2_PCI },
+	/* Diva Server BRI-2M 2.0 PCI 0xE018 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_BRI2M_2),
+		CARDTYPE_DIVASRV_B_2M_V2_PCI },
+	/* Diva Server Voice PRI 2.0 PCI 0xE019 */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRAP_2_VOIP),
+		CARDTYPE_DIVASRV_VOICE_P_30M_V2_PCI },
+	/* Diva Server 2FX 0xE01A */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_2F),
+		CARDTYPE_DIVASRV_B_2F_PCI },
+	/* Diva Server Voice BRI-2M 2.0 PCI 0xE01B */
+	{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_BRI2M_2_VOIP),
+		CARDTYPE_DIVASRV_VOICE_B_2M_V2_PCI },
+	{ 0, }			/* 0 terminated list. */
 };
 MODULE_DEVICE_TABLE(pci, divas_pci_tbl);
 
-- 
1.7.1

^ permalink raw reply related

* [PATCH 22/25] mISDN: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
From: Peter Huewe @ 2010-07-15 19:05 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Karsten Keil, David S. Miller, Andrew Morton, Jiri Kosina,
	Roel Kluin, netdev, linux-kernel

From: Peter Huewe <peterhuewe@gmx.de>

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/isdn/hardware/mISDN/hfcmulti.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index d317195..4e3780d 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -5354,12 +5354,9 @@ static struct pci_device_id hfmultipci_ids[] __devinitdata = {
 	{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_VENDOR_ID_CCD,
 		PCI_SUBDEVICE_ID_CCD_JHSE1, 0, 0, H(25)}, /* Junghanns E1 */
 
-	{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_ANY_ID, PCI_ANY_ID,
-		0, 0, 0},
-	{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC8S, PCI_ANY_ID, PCI_ANY_ID,
-		0, 0, 0},
-	{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFCE1, PCI_ANY_ID, PCI_ANY_ID,
-		0, 0, 0},
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_HFC4S), 0 },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_HFC8S), 0 },
+	{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_HFCE1), 0 },
 	{0, }
 };
 #undef H
-- 
1.7.1


^ permalink raw reply related

* [PATCH 23/25] isdn/hisax: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
From: Peter Huewe @ 2010-07-15 19:07 UTC (permalink / raw)
  To: Kernel Janitors; +Cc: Karsten Keil, Tejun Heo, netdev, linux-kernel

From: Peter Huewe <peterhuewe@gmx.de>

This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/isdn/hisax/config.c |   84 +++++++++++++++++++++---------------------
 1 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index 544cf4b..f4ac548 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -1909,68 +1909,68 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
 
 static struct pci_device_id hisax_pci_tbl[] __devinitdata = {
 #ifdef CONFIG_HISAX_FRITZPCI
-	{PCI_VENDOR_ID_AVM,      PCI_DEVICE_ID_AVM_A1,           PCI_ANY_ID, PCI_ANY_ID},
+	{PCI_VDEVICE(AVM,      PCI_DEVICE_ID_AVM_A1)			},
 #endif
 #ifdef CONFIG_HISAX_DIEHLDIVA
-	{PCI_VENDOR_ID_EICON,    PCI_DEVICE_ID_EICON_DIVA20,     PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_EICON,    PCI_DEVICE_ID_EICON_DIVA20_U,   PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_EICON,    PCI_DEVICE_ID_EICON_DIVA201,    PCI_ANY_ID, PCI_ANY_ID},
-//#########################################################################################	
-	{PCI_VENDOR_ID_EICON,    PCI_DEVICE_ID_EICON_DIVA202,    PCI_ANY_ID, PCI_ANY_ID},
-//#########################################################################################	
+	{PCI_VDEVICE(EICON,    PCI_DEVICE_ID_EICON_DIVA20)		},
+	{PCI_VDEVICE(EICON,    PCI_DEVICE_ID_EICON_DIVA20_U)	},
+	{PCI_VDEVICE(EICON,    PCI_DEVICE_ID_EICON_DIVA201)		},
+/*##########################################################################*/
+	{PCI_VDEVICE(EICON,    PCI_DEVICE_ID_EICON_DIVA202)		},
+/*##########################################################################*/
 #endif
 #ifdef CONFIG_HISAX_ELSA
-	{PCI_VENDOR_ID_ELSA,     PCI_DEVICE_ID_ELSA_MICROLINK,   PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_ELSA,     PCI_DEVICE_ID_ELSA_QS3000,      PCI_ANY_ID, PCI_ANY_ID},
+	{PCI_VDEVICE(ELSA,     PCI_DEVICE_ID_ELSA_MICROLINK)	},
+	{PCI_VDEVICE(ELSA,     PCI_DEVICE_ID_ELSA_QS3000)		},
 #endif
 #ifdef CONFIG_HISAX_GAZEL
-	{PCI_VENDOR_ID_PLX,      PCI_DEVICE_ID_PLX_R685,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_PLX,      PCI_DEVICE_ID_PLX_R753,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_PLX,      PCI_DEVICE_ID_PLX_DJINN_ITOO,   PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_PLX,      PCI_DEVICE_ID_PLX_OLITEC,       PCI_ANY_ID, PCI_ANY_ID},
+	{PCI_VDEVICE(PLX,      PCI_DEVICE_ID_PLX_R685)			},
+	{PCI_VDEVICE(PLX,      PCI_DEVICE_ID_PLX_R753)			},
+	{PCI_VDEVICE(PLX,      PCI_DEVICE_ID_PLX_DJINN_ITOO)	},
+	{PCI_VDEVICE(PLX,      PCI_DEVICE_ID_PLX_OLITEC)		},
 #endif
 #ifdef CONFIG_HISAX_SCT_QUADRO
-	{PCI_VENDOR_ID_PLX,      PCI_DEVICE_ID_PLX_9050,         PCI_ANY_ID, PCI_ANY_ID},
+	{PCI_VDEVICE(PLX,      PCI_DEVICE_ID_PLX_9050)			},
 #endif
 #ifdef CONFIG_HISAX_NICCY
-	{PCI_VENDOR_ID_SATSAGEM, PCI_DEVICE_ID_SATSAGEM_NICCY,   PCI_ANY_ID,PCI_ANY_ID},
+	{PCI_VDEVICE(SATSAGEM, PCI_DEVICE_ID_SATSAGEM_NICCY)	},
 #endif
 #ifdef CONFIG_HISAX_SEDLBAUER
-	{PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_100,     PCI_ANY_ID,PCI_ANY_ID},
+	{PCI_VDEVICE(TIGERJET, PCI_DEVICE_ID_TIGERJET_100)		},
 #endif
 #if defined(CONFIG_HISAX_NETJET) || defined(CONFIG_HISAX_NETJET_U)
-	{PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300,     PCI_ANY_ID,PCI_ANY_ID},
+	{PCI_VDEVICE(TIGERJET, PCI_DEVICE_ID_TIGERJET_300)		},
 #endif
 #if defined(CONFIG_HISAX_TELESPCI) || defined(CONFIG_HISAX_SCT_QUADRO)
-	{PCI_VENDOR_ID_ZORAN,    PCI_DEVICE_ID_ZORAN_36120,      PCI_ANY_ID,PCI_ANY_ID},
+	{PCI_VDEVICE(ZORAN,    PCI_DEVICE_ID_ZORAN_36120)		},
 #endif
 #ifdef CONFIG_HISAX_W6692
-	{PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH,  PCI_ANY_ID,PCI_ANY_ID},
-	{PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692,    PCI_ANY_ID,PCI_ANY_ID},
+	{PCI_VDEVICE(DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH)	},
+	{PCI_VDEVICE(WINBOND2, PCI_DEVICE_ID_WINBOND2_6692)		},
 #endif
 #ifdef CONFIG_HISAX_HFC_PCI
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_2BD0,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B000,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B006,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B007,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B008,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B009,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B00A,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B00B,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B00C,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B100,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B700,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_CCD,      PCI_DEVICE_ID_CCD_B701,         PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_ABOCOM,   PCI_DEVICE_ID_ABOCOM_2BD1,      PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_ASUSTEK,  PCI_DEVICE_ID_ASUSTEK_0675,     PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_BERKOM,   PCI_DEVICE_ID_BERKOM_T_CONCEPT, PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_BERKOM,   PCI_DEVICE_ID_BERKOM_A1T,       PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_ANIGMA,   PCI_DEVICE_ID_ANIGMA_MC145575,  PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_ZOLTRIX,  PCI_DEVICE_ID_ZOLTRIX_2BD0,     PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_DIGI,     PCI_DEVICE_ID_DIGI_DF_M_IOM2_E, PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_DIGI,     PCI_DEVICE_ID_DIGI_DF_M_E,      PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_DIGI,     PCI_DEVICE_ID_DIGI_DF_M_IOM2_A, PCI_ANY_ID, PCI_ANY_ID},
-	{PCI_VENDOR_ID_DIGI,     PCI_DEVICE_ID_DIGI_DF_M_A,      PCI_ANY_ID, PCI_ANY_ID},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_2BD0)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B000)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B006)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B007)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B008)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B009)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B00A)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B00B)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B00C)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B100)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B700)			},
+	{PCI_VDEVICE(CCD,      PCI_DEVICE_ID_CCD_B701)			},
+	{PCI_VDEVICE(ABOCOM,   PCI_DEVICE_ID_ABOCOM_2BD1)		},
+	{PCI_VDEVICE(ASUSTEK,  PCI_DEVICE_ID_ASUSTEK_0675)		},
+	{PCI_VDEVICE(BERKOM,   PCI_DEVICE_ID_BERKOM_T_CONCEPT)	},
+	{PCI_VDEVICE(BERKOM,   PCI_DEVICE_ID_BERKOM_A1T)		},
+	{PCI_VDEVICE(ANIGMA,   PCI_DEVICE_ID_ANIGMA_MC145575)	},
+	{PCI_VDEVICE(ZOLTRIX,  PCI_DEVICE_ID_ZOLTRIX_2BD0)		},
+	{PCI_VDEVICE(DIGI,     PCI_DEVICE_ID_DIGI_DF_M_IOM2_E)	},
+	{PCI_VDEVICE(DIGI,     PCI_DEVICE_ID_DIGI_DF_M_E)		},
+	{PCI_VDEVICE(DIGI,     PCI_DEVICE_ID_DIGI_DF_M_IOM2_A)	},
+	{PCI_VDEVICE(DIGI,     PCI_DEVICE_ID_DIGI_DF_M_A)		},
 #endif
 	{ }				/* Terminating entry */
 };
-- 
1.7.1


^ permalink raw reply related

* RE: [REGRESSION] e1000e stopped working [MANUALLY BISECTED]
From: Maxim Levitsky @ 2010-07-15 19:09 UTC (permalink / raw)
  To: Tantilov, Emil S
  Cc: Kirsher, Jeffrey T, netdev@vger.kernel.org, Allan, Bruce W,
	Pieper, Jeffrey E
In-Reply-To: <EA929A9653AAE14F841771FB1DE5A1365FF4B860D9@rrsmsx501.amr.corp.intel.com>

On Thu, 2010-07-15 at 13:02 -0600, Tantilov, Emil S wrote:
> Maxim Levitsky wrote:
> > On Thu, 2010-07-15 at 02:33 +0300, Maxim Levitsky wrote:
> >> On Wed, 2010-07-14 at 16:56 -0600, Tantilov, Emil S wrote:
> >>> Maxim Levitsky wrote:
> >>>> On Mon, 2010-07-12 at 15:23 -0600, Tantilov, Emil S wrote:
> >>>>> Maxim Levitsky wrote:
> >>>>>> On Mon, 2010-07-05 at 12:58 +0300, Maxim Levitsky wrote:
> >>>>>>> On Mon, 2010-07-05 at 01:13 -0700, Jeff Kirsher wrote:
> >>>>>>>> On Sun, Jul 4, 2010 at 15:48, Maxim Levitsky
> >>>>>>>> <maximlevitsky@gmail.com> wrote:
> >>>>>>>>> Did few guesses, and now I see that reverting the below
> >>>>>>>>> commit fixes the problem. 
> >>>>>>>>> 
> >>>>>>>>> "e1000e: Fix/cleanup PHY reset code for ICHx/PCHx"
> >>>>>>>>> e98cac447cc1cc418dff1d610a5c79c4f2bdec7f.
> >>>>>>>>> 
> >>>>>>>>> 
> >>>>>>>>> Best regards,
> >>>>>>>>>        Maxim Levitsky
> >>>>>>>>> 
> >>>>>>>>> --
> >>>>>>>> 
> >>>>>>>> Can you give us till Tuesday to respond?  I know that there are
> >>>>>>>> some additional e1000e patches in my queue, which may resolve
> >>>>>>>> the issue, but this weekend the power is down to do some
> >>>>>>>> infrastructure upgrades which prevents us from doing any
> >>>>>>>> investigation.debugging until Tuesday.
> >>>>>>>> 
> >>>>>>> 
> >>>>>>> Sure.
> >>>>>>> 
> >>>>>>> Best regards,
> >>>>>>> 	Maxim Levitsky
> >>>>>>> 
> >>>>>> 
> >>>>>> Updates?
> >>>>> 
> >>>>> We are working on reproducing the issue. So far we have not seen
> >>>>> the problem when testing with net-next.
> >>>>> 
> >>>>> I asked in previous email about some additional info from ethtool
> >>>>> (-d, -e, -S) and kernel config. That would help us to narrow it
> >>>>> down. 
> >>>>> 
> >>>>> Thanks,
> >>>>> Emil
> >>>> I did send -e and -d output.
> >>> 
> >>> Sorry, looks like I lost the email with the attachements.
> >>> 
> >>> Could you provide the output of dmesg after the failure occurs?
> >>> 
> >>>> Since you probably want -S output during failure, I need to
> >>>> recompile kernel for that. I will do that soon.
> >>>> 
> >>>> 
> >>>> One question, in two weeks I hope 2.6.35 won't be released?
> >>>> If so, I will have enough free time then to narrow down this issue.
> >>>> 
> >>>> Other solution, is to revert this commit.
> >>>> (I have never seen this problem with it reverted).
> >>> 
> >>> We have been running reboot tests on 2 separate systems with recent
> >>> net-next kernels using your config and so far no luck in
> >>> reproducing this issue. 
> >>> 
> >>> What is the make model of your system (or MB)?
> >> 
> >> the motherboard is Intel DG965RY.
> >> 
> >> However, I am using vanilla kernel.
> >> net-next might contain further fixes.
> >> 
> >> I see if net-next works here.
> > 
> > Yep, net-next works here.
> > 
> > 
> > I have the problem on vanilla kernel.
> > Last revision of it, I tested is 2.6.35-rc4 exactly
> > (815c4163b6c8ebf8152f42b0a5fd015cfdcedc78)
> > 
> > 
> > Maybe vanilla git master works, I test it too soon.
> 
> Thanks for the information! Good to know that this issue does not exist in the latest branch.
> 
> Have you by any chance tested a stable branch (2.6.34.x)?

I only did test plain 2.6.34 (v2.6.34)

Also I repeat that revert of e98cac447cc1cc418dff1d610a5c79c4f2bdec7f 
(e1000e: Fix/cleanup PHY reset code for ICHx/PCHx) fixes the bug on
vanilla kernel.

Also I just pulled latest vanilla git, and I according to diffstat I see
no changes in e1000e, so its likely that bug remains there.
I will test that soon.



Best regards,
	Maxim Levitsky



^ permalink raw reply

* Re: [PATCH 7/8] net: bridge: fix sign bug
From: Stephen Hemminger @ 2010-07-15 19:21 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: kernel-janitors, David S. Miller, Herbert Xu, YOSHIFUJI Hideaki,
	Eric Dumazet, bridge, netdev
In-Reply-To: <1279219653-12791-1-git-send-email-segooon@gmail.com>

On Thu, 15 Jul 2010 22:47:33 +0400
Kulikov Vasiliy <segooon@gmail.com> wrote:

> ipv6_skip_exthdr() can return error code that is below zero.
> 'offset' is unsigned, so it makes no sense.
> ipv6_skip_exthdr() returns 'int' so we can painlessly change type of
> offset to int.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  net/bridge/br_multicast.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index 27ae946..85afcda 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1435,7 +1435,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
>  	struct icmp6hdr *icmp6h;
>  	u8 nexthdr;
>  	unsigned len;
> -	unsigned offset;
> +	int offset;
>  	int err;
>  
>  	if (!pskb_may_pull(skb, sizeof(*ip6h)))

Acked-by: Stephen Hemminger <shemminger@vyatta.com>

-- 

^ permalink raw reply

* Re: Raise initial congestion window size / speedup slow start?
From: Rick Jones @ 2010-07-15 19:51 UTC (permalink / raw)
  To: H.K. Jerry Chu
  Cc: Bill Fink, Hagen Paul Pfeifer, David Miller, lists, davidsen,
	linux-kernel, netdev
In-Reply-To: <AANLkTinbtGuMTPNyJqJtx_bqfQDPqbA1XqjhLe_pj1mX@mail.gmail.com>

I have to wonder if the only heuristic one could employ for divining the initial 
congestion window is to be either pessimistic/conservative or 
optimistic/liberal.  Or for that matter the only one one really needs here?

That's what it comes down to doesn't it?  At any one point in time, we don't 
*really* know the state of the network and whether it can handle the load we 
might wish to put upon it.  We are always reacting to it. Up until now, it has 
been felt necessary to be pessimistic/conservative at time of connection 
establishment and not rely as much on the robustness of the "control" part of 
avoidance and control.

Now, the folks at Google have lots of data to suggest we don't need to be so 
pessimistic/conservative and so we have to decide if we are willing to be more 
optimistic/liberal.  Broadly handwaving, the "netdev we" seems to be willing to 
be more optimistic/liberal in at least a few cases, and the question comes down 
to whether or not the "IETF we" will be similarly willing.

rick jones

^ permalink raw reply

* ibmveth: lost IRQ while closing/opening device leads to service loss
From: Robert Jennings @ 2010-07-15 20:21 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Santiago Leon, Brian King

The order of freeing the IRQ and freeing the device in firmware
in ibmveth_close can cause the adapter to become unusable after a
subsequent ibmveth_open.  Only a reboot of the OS will make the
network device usable again.  This is seen when cycling the adapter
up and down while there is network activity.

There is a window where an IRQ will be left unserviced (H_EOI will not
be called).  The solution is to make a VIO_IRQ_DISABLE h_call, free the
device with firmware, and then call free_irq.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>

---
 drivers/net/ibmveth.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: b/drivers/net/ibmveth.c
===================================================================
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -677,7 +677,7 @@ static int ibmveth_close(struct net_devi
 	if (!adapter->pool_config)
 		netif_stop_queue(netdev);
 
-	free_irq(netdev->irq, netdev);
+	h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE);
 
 	do {
 		lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
@@ -689,6 +689,8 @@ static int ibmveth_close(struct net_devi
 				     lpar_rc);
 	}
 
+	free_irq(netdev->irq, netdev);
+
 	adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8);
 
 	ibmveth_cleanup(adapter);


^ permalink raw reply

* Re: Raise initial congestion window size / speedup slow start?
From: Stephen Hemminger @ 2010-07-15 20:48 UTC (permalink / raw)
  To: Rick Jones
  Cc: H.K. Jerry Chu, Bill Fink, Hagen Paul Pfeifer, David Miller,
	lists, davidsen, linux-kernel, netdev
In-Reply-To: <4C3F66BA.8010002@hp.com>

On Thu, 15 Jul 2010 12:51:22 -0700
Rick Jones <rick.jones2@hp.com> wrote:

> I have to wonder if the only heuristic one could employ for divining the initial 
> congestion window is to be either pessimistic/conservative or 
> optimistic/liberal.  Or for that matter the only one one really needs here?
> 
> That's what it comes down to doesn't it?  At any one point in time, we don't 
> *really* know the state of the network and whether it can handle the load we 
> might wish to put upon it.  We are always reacting to it. Up until now, it has 
> been felt necessary to be pessimistic/conservative at time of connection 
> establishment and not rely as much on the robustness of the "control" part of 
> avoidance and control.
> 
> Now, the folks at Google have lots of data to suggest we don't need to be so 
> pessimistic/conservative and so we have to decide if we are willing to be more 
> optimistic/liberal.  Broadly handwaving, the "netdev we" seems to be willing to 
> be more optimistic/liberal in at least a few cases, and the question comes down 
> to whether or not the "IETF we" will be similarly willing.

I am not convinced that a host being aggressive with initial cwnd (Linux) would
not end up unfairly monopolizing available bandwidth compared to older more conservative
implementations (Windows). Whether fairness is important or not is another debate.

^ permalink raw reply

* Re: Question about way that NICs deliver packets to the kernel
From: Francois Romieu @ 2010-07-15 21:12 UTC (permalink / raw)
  To: Junchang Wang; +Cc: netdev
In-Reply-To: <20100715142418.GA26491@host-a-229.ustcsz.edu.cn>

Junchang Wang <junchangwang@gmail.com> :
[...]
> 2) Why does r8169 bias towards the first approach even if it support both ?

It is a simple, straightforward fix against a 8169 hardware bug.

See commit c0cd884af045338476b8e69a61fceb3f34ff22f1.

-- 
Ueimor

^ permalink raw reply

* [PATCH] Drivers: net: 8139cp: Fixed 28 style errors, and 119 warnings.
From: Joseph Kogut @ 2010-07-15 22:36 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel

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



[-- Attachment #2: 0001-Drivers-net-8139cp-Fixed-28-style-errors-and-119-war.patch --]
[-- Type: application/octet-stream, Size: 27217 bytes --]

From faa19adc0a3a71cc7b6836d6977672fcaf84a9b9 Mon Sep 17 00:00:00 2001
From: Joseph Kogut <joseph.kogut@gmail.com>
Date: Thu, 15 Jul 2010 07:48:26 -0700
Subject: [PATCH] Drivers: net: 8139cp: Fixed 28 style errors, and 119 warnings.

Fixed 28 major style issues and 119 minor style issues in the 8139c+ driver.

Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>

---
 drivers/net/8139cp.c |  306 ++++++++++++++++++++++++++------------------------
 1 files changed, 159 insertions(+), 147 deletions(-)

diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 284a5f4..6affd0d 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -6,7 +6,7 @@
 	Copyright (C) 2000, 2001 David S. Miller (davem@redhat.com) [sungem.c]
 	Copyright 2001 Manfred Spraul				    [natsemi.c]
 	Copyright 1999-2001 by Donald Becker.			    [natsemi.c]
-       	Written 1997-2001 by Donald Becker.			    [8139too.c]
+	Written 1997-2001 by Donald Becker.			    [8139too.c]
 	Copyright 1998-2001 by Jes Sorensen, <jes@trained-monkey.org>. [acenic.c]
 
 	This software may be used and distributed according to the terms of
@@ -73,18 +73,18 @@
 #include <linux/tcp.h>
 #include <linux/udp.h>
 #include <linux/cache.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/irq.h>
+#include <linux/uaccess.h>
 
 /* VLAN tagging feature enable/disable */
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 #define CP_VLAN_TAG_USED 1
-#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \
+#define CP_VLAN_TX_TAG(tx_desc, vlan_tag_value) \
 	do { (tx_desc)->opts2 = cpu_to_le32(vlan_tag_value); } while (0)
 #else
 #define CP_VLAN_TAG_USED 0
-#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \
+#define CP_VLAN_TX_TAG(tx_desc, vlan_tag_value) \
 	do { (tx_desc)->opts2 = 0; } while (0)
 #endif
 
@@ -99,16 +99,16 @@ MODULE_LICENSE("GPL");
 
 static int debug = -1;
 module_param(debug, int, 0);
-MODULE_PARM_DESC (debug, "8139cp: bitmapped message enable number");
+MODULE_PARM_DESC(debug, "8139cp: bitmapped message enable number");
 
 /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
    The RTL chips use a 64 element hash table based on the Ethernet CRC.  */
 static int multicast_filter_limit = 32;
 module_param(multicast_filter_limit, int, 0);
-MODULE_PARM_DESC (multicast_filter_limit, "8139cp: maximum number of filtered multicast addresses");
+MODULE_PARM_DESC(multicast_filter_limit, "8139cp: maximum number of filtered multicast addresses");
 
 #define CP_DEF_MSG_ENABLE	(NETIF_MSG_DRV		| \
-				 NETIF_MSG_PROBE 	| \
+				 NETIF_MSG_PROBE	| \
 				 NETIF_MSG_LINK)
 #define CP_NUM_STATS		14	/* struct cp_dma_stats, plus one */
 #define CP_STATS_SIZE		64	/* size in bytes of DMA stats block */
@@ -130,8 +130,8 @@ MODULE_PARM_DESC (multicast_filter_limit, "8139cp: maximum number of filtered mu
 #define PKT_BUF_SZ		1536	/* Size of each temporary Rx buffer.*/
 #define CP_INTERNAL_PHY		32
 
-/* The following settings are log_2(bytes)-4:  0 == 16 bytes .. 6==1024, 7==end of packet. */
-#define RX_FIFO_THRESH		5	/* Rx buffer level before first PCI xfer.  */
+/* The following settings are log_2(bytes)-4:  0 == 16 bytes .. 6 == 1024, 7 == end of packet. */
+#define RX_FIFO_THRESH		5	/* Rx buffer level before first PCI xfer. */
 #define RX_DMA_BURST		4	/* Maximum PCI burst, '4' is 256 */
 #define TX_DMA_BURST		6	/* Maximum PCI burst, '6' is 1024 */
 #define TX_EARLY_THRESH		256	/* Early Tx threshold, in bytes */
@@ -353,7 +353,7 @@ struct cp_private {
 	struct sk_buff		*tx_skb[CP_TX_RING_SIZE];
 
 	unsigned		rx_buf_sz;
-	unsigned		wol_enabled : 1; /* Is Wake-on-LAN enabled? */
+	unsigned		wol_enabled:1; /* Is Wake-on-LAN enabled? */
 
 #if CP_VLAN_TAG_USED
 	struct vlan_group	*vlgrp;
@@ -366,26 +366,26 @@ struct cp_private {
 #define cpr8(reg)	readb(cp->regs + (reg))
 #define cpr16(reg)	readw(cp->regs + (reg))
 #define cpr32(reg)	readl(cp->regs + (reg))
-#define cpw8(reg,val)	writeb((val), cp->regs + (reg))
-#define cpw16(reg,val)	writew((val), cp->regs + (reg))
-#define cpw32(reg,val)	writel((val), cp->regs + (reg))
-#define cpw8_f(reg,val) do {			\
+#define cpw8(reg, val)	writeb((val), cp->regs + (reg))
+#define cpw16(reg, val)	writew((val), cp->regs + (reg))
+#define cpw32(reg, val)	writel((val), cp->regs + (reg))
+#define cpw8_f(reg, val) do {			\
 	writeb((val), cp->regs + (reg));	\
 	readb(cp->regs + (reg));		\
 	} while (0)
-#define cpw16_f(reg,val) do {			\
+#define cpw16_f(reg, val) do {			\
 	writew((val), cp->regs + (reg));	\
 	readw(cp->regs + (reg));		\
 	} while (0)
-#define cpw32_f(reg,val) do {			\
+#define cpw32_f(reg, val) do {			\
 	writel((val), cp->regs + (reg));	\
 	readl(cp->regs + (reg));		\
 	} while (0)
 
 
-static void __cp_set_rx_mode (struct net_device *dev);
-static void cp_tx (struct cp_private *cp);
-static void cp_clean_rings (struct cp_private *cp);
+static void __cp_set_rx_mode(struct net_device *dev);
+static void cp_tx(struct cp_private *cp);
+static void cp_clean_rings(struct cp_private *cp);
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void cp_poll_controller(struct net_device *dev);
 #endif
@@ -440,7 +440,7 @@ static void cp_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
 }
 #endif /* CP_VLAN_TAG_USED */
 
-static inline void cp_set_rxbufsize (struct cp_private *cp)
+static inline void cp_set_rxbufsize(struct cp_private *cp)
 {
 	unsigned int mtu = cp->dev->mtu;
 
@@ -451,10 +451,10 @@ static inline void cp_set_rxbufsize (struct cp_private *cp)
 		cp->rx_buf_sz = PKT_BUF_SZ;
 }
 
-static inline void cp_rx_skb (struct cp_private *cp, struct sk_buff *skb,
+static inline void cp_rx_skb(struct cp_private *cp, struct sk_buff *skb,
 			      struct cp_desc *desc)
 {
-	skb->protocol = eth_type_trans (skb, cp->dev);
+	skb->protocol = eth_type_trans(skb, cp->dev);
 
 	cp->dev->stats.rx_packets++;
 	cp->dev->stats.rx_bytes += skb->len;
@@ -468,7 +468,7 @@ static inline void cp_rx_skb (struct cp_private *cp, struct sk_buff *skb,
 		netif_receive_skb(skb);
 }
 
-static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail,
+static void cp_rx_err_acct(struct cp_private *cp, unsigned rx_tail,
 			    u32 status, u32 len)
 {
 	netif_dbg(cp, rx_err, cp->dev, "rx err, slot %d status 0x%x len %d\n",
@@ -486,7 +486,7 @@ static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail,
 		cp->dev->stats.rx_fifo_errors++;
 }
 
-static inline unsigned int cp_rx_csum_ok (u32 status)
+static inline unsigned int cp_rx_csum_ok(u32 status)
 {
 	unsigned int protocol = (status >> 16) & 0x3;
 
@@ -606,7 +606,7 @@ rx_next:
 	return rx;
 }
 
-static irqreturn_t cp_interrupt (int irq, void *dev_instance)
+static irqreturn_t cp_interrupt(int irq, void *dev_instance)
 {
 	struct net_device *dev = dev_instance;
 	struct cp_private *cp;
@@ -674,7 +674,7 @@ static void cp_poll_controller(struct net_device *dev)
 }
 #endif
 
-static void cp_tx (struct cp_private *cp)
+static void cp_tx(struct cp_private *cp)
 {
 	unsigned tx_head = cp->tx_head;
 	unsigned tx_tail = cp->tx_tail;
@@ -731,7 +731,7 @@ static void cp_tx (struct cp_private *cp)
 		netif_wake_queue(cp->dev);
 }
 
-static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
+static netdev_tx_t cp_start_xmit(struct sk_buff *skb,
 					struct net_device *dev)
 {
 	struct cp_private *cp = netdev_priv(dev);
@@ -889,7 +889,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
 /* Set or clear the multicast filter for this adaptor.
    This routine is not state sensitive and need not be SMP locked. */
 
-static void __cp_set_rx_mode (struct net_device *dev)
+static void __cp_set_rx_mode(struct net_device *dev)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	u32 mc_filter[2];	/* Multicast hash filter */
@@ -923,28 +923,28 @@ static void __cp_set_rx_mode (struct net_device *dev)
 	/* We can safely update without stopping the chip. */
 	tmp = cp_rx_config | rx_mode;
 	if (cp->rx_config != tmp) {
-		cpw32_f (RxConfig, tmp);
+		cpw32_f(RxConfig, tmp);
 		cp->rx_config = tmp;
 	}
-	cpw32_f (MAR0 + 0, mc_filter[0]);
-	cpw32_f (MAR0 + 4, mc_filter[1]);
+	cpw32_f(MAR0 + 0, mc_filter[0]);
+	cpw32_f(MAR0 + 4, mc_filter[1]);
 }
 
-static void cp_set_rx_mode (struct net_device *dev)
+static void cp_set_rx_mode(struct net_device *dev)
 {
 	unsigned long flags;
 	struct cp_private *cp = netdev_priv(dev);
 
-	spin_lock_irqsave (&cp->lock, flags);
+	spin_lock_irqsave(&cp->lock, flags);
 	__cp_set_rx_mode(dev);
-	spin_unlock_irqrestore (&cp->lock, flags);
+	spin_unlock_irqrestore(&cp->lock, flags);
 }
 
 static void __cp_get_stats(struct cp_private *cp)
 {
 	/* only lower 24 bits valid; write any value to clear */
-	cp->dev->stats.rx_missed_errors += (cpr32 (RxMissed) & 0xffffff);
-	cpw32 (RxMissed, 0);
+	cp->dev->stats.rx_missed_errors += (cpr32(RxMissed) & 0xffffff);
+	cpw32(RxMissed, 0);
 }
 
 static struct net_device_stats *cp_get_stats(struct net_device *dev)
@@ -954,14 +954,14 @@ static struct net_device_stats *cp_get_stats(struct net_device *dev)
 
 	/* The chip only need report frame silently dropped. */
 	spin_lock_irqsave(&cp->lock, flags);
- 	if (netif_running(dev) && netif_device_present(dev))
- 		__cp_get_stats(cp);
+	if (netif_running(dev) && netif_device_present(dev))
+		__cp_get_stats(cp);
 	spin_unlock_irqrestore(&cp->lock, flags);
 
 	return &dev->stats;
 }
 
-static void cp_stop_hw (struct cp_private *cp)
+static void cp_stop_hw(struct cp_private *cp)
 {
 	cpw16(IntrStatus, ~(cpr16(IntrStatus)));
 	cpw16_f(IntrMask, 0);
@@ -973,7 +973,7 @@ static void cp_stop_hw (struct cp_private *cp)
 	cp->tx_head = cp->tx_tail = 0;
 }
 
-static void cp_reset_hw (struct cp_private *cp)
+static void cp_reset_hw(struct cp_private *cp)
 {
 	unsigned work = 1000;
 
@@ -989,30 +989,30 @@ static void cp_reset_hw (struct cp_private *cp)
 	netdev_err(cp->dev, "hardware reset timeout\n");
 }
 
-static inline void cp_start_hw (struct cp_private *cp)
+static inline void cp_start_hw(struct cp_private *cp)
 {
 	cpw16(CpCmd, cp->cpcmd);
 	cpw8(Cmd, RxOn | TxOn);
 }
 
-static void cp_init_hw (struct cp_private *cp)
+static void cp_init_hw(struct cp_private *cp)
 {
 	struct net_device *dev = cp->dev;
 	dma_addr_t ring_dma;
 
 	cp_reset_hw(cp);
 
-	cpw8_f (Cfg9346, Cfg9346_Unlock);
+	cpw8_f(Cfg9346, Cfg9346_Unlock);
 
 	/* Restore our idea of the MAC address. */
-	cpw32_f (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0)));
-	cpw32_f (MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4)));
+	cpw32_f(MAC0 + 0, le32_to_cpu(*(__le32 *) (dev->dev_addr + 0)));
+	cpw32_f(MAC0 + 4, le32_to_cpu(*(__le32 *) (dev->dev_addr + 4)));
 
 	cp_start_hw(cp);
 	cpw8(TxThresh, 0x06); /* XXX convert magic num to a constant */
 
 	__cp_set_rx_mode(dev);
-	cpw32_f (TxConfig, IFG | (TX_DMA_BURST << TxDMAShift));
+	cpw32_f(TxConfig, IFG | (TX_DMA_BURST << TxDMAShift));
 
 	cpw8(Config1, cpr8(Config1) | DriverLoaded | PMEnable);
 	/* Disable Wake-on-LAN. Can be turned on with ETHTOOL_SWOL */
@@ -1073,23 +1073,23 @@ err_out:
 	return -ENOMEM;
 }
 
-static void cp_init_rings_index (struct cp_private *cp)
+static void cp_init_rings_index(struct cp_private *cp)
 {
 	cp->rx_tail = 0;
 	cp->tx_head = cp->tx_tail = 0;
 }
 
-static int cp_init_rings (struct cp_private *cp)
+static int cp_init_rings(struct cp_private *cp)
 {
 	memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE);
 	cp->tx_ring[CP_TX_RING_SIZE - 1].opts1 = cpu_to_le32(RingEnd);
 
 	cp_init_rings_index(cp);
 
-	return cp_refill_rx (cp);
+	return cp_refill_rx(cp);
 }
 
-static int cp_alloc_rings (struct cp_private *cp)
+static int cp_alloc_rings(struct cp_private *cp)
 {
 	void *mem;
 
@@ -1104,7 +1104,7 @@ static int cp_alloc_rings (struct cp_private *cp)
 	return cp_init_rings(cp);
 }
 
-static void cp_clean_rings (struct cp_private *cp)
+static void cp_clean_rings(struct cp_private *cp)
 {
 	struct cp_desc *desc;
 	unsigned i;
@@ -1112,7 +1112,7 @@ static void cp_clean_rings (struct cp_private *cp)
 	for (i = 0; i < CP_RX_RING_SIZE; i++) {
 		if (cp->rx_skb[i]) {
 			desc = cp->rx_ring + i;
-			dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr),
+			dma_unmap_single(&cp->pdev->dev, le64_to_cpu(desc->addr),
 					 cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
 			dev_kfree_skb(cp->rx_skb[i]);
 		}
@@ -1123,7 +1123,7 @@ static void cp_clean_rings (struct cp_private *cp)
 			struct sk_buff *skb = cp->tx_skb[i];
 
 			desc = cp->tx_ring + i;
-			dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr),
+			dma_unmap_single(&cp->pdev->dev, le64_to_cpu(desc->addr),
 					 le32_to_cpu(desc->opts1) & 0xffff,
 					 PCI_DMA_TODEVICE);
 			if (le32_to_cpu(desc->opts1) & LastFrag)
@@ -1139,7 +1139,7 @@ static void cp_clean_rings (struct cp_private *cp)
 	memset(cp->tx_skb, 0, sizeof(struct sk_buff *) * CP_TX_RING_SIZE);
 }
 
-static void cp_free_rings (struct cp_private *cp)
+static void cp_free_rings(struct cp_private *cp)
 {
 	cp_clean_rings(cp);
 	dma_free_coherent(&cp->pdev->dev, CP_RING_BYTES, cp->rx_ring,
@@ -1148,7 +1148,7 @@ static void cp_free_rings (struct cp_private *cp)
 	cp->tx_ring = NULL;
 }
 
-static int cp_open (struct net_device *dev)
+static int cp_open(struct net_device *dev)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	int rc;
@@ -1180,7 +1180,7 @@ err_out_hw:
 	return rc;
 }
 
-static int cp_close (struct net_device *dev)
+static int cp_close(struct net_device *dev)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	unsigned long flags;
@@ -1295,32 +1295,37 @@ static void mdio_write(struct net_device *dev, int phy_id, int location,
 }
 
 /* Set the ethtool Wake-on-LAN settings */
-static int netdev_set_wol (struct cp_private *cp,
+static int netdev_set_wol(struct cp_private *cp,
 			   const struct ethtool_wolinfo *wol)
 {
 	u8 options;
 
-	options = cpr8 (Config3) & ~(LinkUp | MagicPacket);
+	options = cpr8(Config3) & ~(LinkUp | MagicPacket);
 	/* If WOL is being disabled, no need for complexity */
 	if (wol->wolopts) {
-		if (wol->wolopts & WAKE_PHY)	options |= LinkUp;
-		if (wol->wolopts & WAKE_MAGIC)	options |= MagicPacket;
+		if (wol->wolopts & WAKE_PHY)
+			options |= LinkUp;
+		if (wol->wolopts & WAKE_MAGIC)
+			options |= MagicPacket;
 	}
 
-	cpw8 (Cfg9346, Cfg9346_Unlock);
-	cpw8 (Config3, options);
-	cpw8 (Cfg9346, Cfg9346_Lock);
+	cpw8(Cfg9346, Cfg9346_Unlock);
+	cpw8(Config3, options);
+	cpw8(Cfg9346, Cfg9346_Lock);
 
 	options = 0; /* Paranoia setting */
-	options = cpr8 (Config5) & ~(UWF | MWF | BWF);
+	options = cpr8(Config5) & ~(UWF | MWF | BWF);
 	/* If WOL is being disabled, no need for complexity */
 	if (wol->wolopts) {
-		if (wol->wolopts & WAKE_UCAST)  options |= UWF;
-		if (wol->wolopts & WAKE_BCAST)	options |= BWF;
-		if (wol->wolopts & WAKE_MCAST)	options |= MWF;
+		if (wol->wolopts & WAKE_UCAST)
+			options |= UWF;
+		if (wol->wolopts & WAKE_BCAST)
+			options |= BWF;
+		if (wol->wolopts & WAKE_MCAST)
+			options |= MWF;
 	}
 
-	cpw8 (Config5, options);
+	cpw8(Config5, options);
 
 	cp->wol_enabled = (wol->wolopts) ? 1 : 0;
 
@@ -1328,35 +1333,41 @@ static int netdev_set_wol (struct cp_private *cp,
 }
 
 /* Get the ethtool Wake-on-LAN settings */
-static void netdev_get_wol (struct cp_private *cp,
-	             struct ethtool_wolinfo *wol)
+static void netdev_get_wol(struct cp_private *cp,
+			   struct ethtool_wolinfo *wol)
 {
 	u8 options;
 
 	wol->wolopts   = 0; /* Start from scratch */
-	wol->supported = WAKE_PHY   | WAKE_BCAST | WAKE_MAGIC |
-		         WAKE_MCAST | WAKE_UCAST;
+	wol->supported = WAKE_PHY   | WAKE_BCAST | WAKE_MAGIC | WAKE_MCAST | WAKE_UCAST;
+
 	/* We don't need to go on if WOL is disabled */
-	if (!cp->wol_enabled) return;
+	if (!cp->wol_enabled)
+		return;
 
-	options        = cpr8 (Config3);
-	if (options & LinkUp)        wol->wolopts |= WAKE_PHY;
-	if (options & MagicPacket)   wol->wolopts |= WAKE_MAGIC;
+	options        = cpr8(Config3);
+	if (options & LinkUp)
+		wol->wolopts |= WAKE_PHY;
+	if (options & MagicPacket)
+		wol->wolopts |= WAKE_MAGIC;
 
 	options        = 0; /* Paranoia setting */
-	options        = cpr8 (Config5);
-	if (options & UWF)           wol->wolopts |= WAKE_UCAST;
-	if (options & BWF)           wol->wolopts |= WAKE_BCAST;
-	if (options & MWF)           wol->wolopts |= WAKE_MCAST;
+	options        = cpr8(Config5);
+	if (options & UWF)
+		wol->wolopts |= WAKE_UCAST;
+	if (options & BWF)
+		wol->wolopts |= WAKE_BCAST;
+	if (options & MWF)
+		wol->wolopts |= WAKE_MCAST;
 }
 
-static void cp_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *info)
+static void cp_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
 	struct cp_private *cp = netdev_priv(dev);
 
-	strcpy (info->driver, DRV_NAME);
-	strcpy (info->version, DRV_VERSION);
-	strcpy (info->bus_info, pci_name(cp->pdev));
+	strcpy(info->driver, DRV_NAME);
+	strcpy(info->version, DRV_VERSION);
+	strcpy(info->bus_info, pci_name(cp->pdev));
 }
 
 static int cp_get_regs_len(struct net_device *dev)
@@ -1364,7 +1375,7 @@ static int cp_get_regs_len(struct net_device *dev)
 	return CP_REGS_SIZE;
 }
 
-static int cp_get_sset_count (struct net_device *dev, int sset)
+static int cp_get_sset_count(struct net_device *dev, int sset)
 {
 	switch (sset) {
 	case ETH_SS_STATS:
@@ -1449,7 +1460,7 @@ static int cp_set_rx_csum(struct net_device *dev, u32 data)
 }
 
 static void cp_get_regs(struct net_device *dev, struct ethtool_regs *regs,
-		        void *p)
+			void *p)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	unsigned long flags;
@@ -1464,30 +1475,30 @@ static void cp_get_regs(struct net_device *dev, struct ethtool_regs *regs,
 	spin_unlock_irqrestore(&cp->lock, flags);
 }
 
-static void cp_get_wol (struct net_device *dev, struct ethtool_wolinfo *wol)
+static void cp_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	unsigned long flags;
 
-	spin_lock_irqsave (&cp->lock, flags);
-	netdev_get_wol (cp, wol);
-	spin_unlock_irqrestore (&cp->lock, flags);
+	spin_lock_irqsave(&cp->lock, flags);
+	netdev_get_wol(cp, wol);
+	spin_unlock_irqrestore(&cp->lock, flags);
 }
 
-static int cp_set_wol (struct net_device *dev, struct ethtool_wolinfo *wol)
+static int cp_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	unsigned long flags;
 	int rc;
 
-	spin_lock_irqsave (&cp->lock, flags);
-	rc = netdev_set_wol (cp, wol);
-	spin_unlock_irqrestore (&cp->lock, flags);
+	spin_lock_irqsave(&cp->lock, flags);
+	rc = netdev_set_wol(cp, wol);
+	spin_unlock_irqrestore(&cp->lock, flags);
 
 	return rc;
 }
 
-static void cp_get_strings (struct net_device *dev, u32 stringset, u8 *buf)
+static void cp_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
 {
 	switch (stringset) {
 	case ETH_SS_STATS:
@@ -1499,7 +1510,7 @@ static void cp_get_strings (struct net_device *dev, u32 stringset, u8 *buf)
 	}
 }
 
-static void cp_get_ethtool_stats (struct net_device *dev,
+static void cp_get_ethtool_stats(struct net_device *dev,
 				  struct ethtool_stats *estats, u64 *tmp_stats)
 {
 	struct cp_private *cp = netdev_priv(dev);
@@ -1571,7 +1582,7 @@ static const struct ethtool_ops cp_ethtool_ops = {
 	.set_eeprom		= cp_set_eeprom,
 };
 
-static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
+static int cp_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
 	struct cp_private *cp = netdev_priv(dev);
 	int rc;
@@ -1599,8 +1610,8 @@ static int cp_set_mac_address(struct net_device *dev, void *p)
 	spin_lock_irq(&cp->lock);
 
 	cpw8_f(Cfg9346, Cfg9346_Unlock);
-	cpw32_f(MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0)));
-	cpw32_f(MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4)));
+	cpw32_f(MAC0 + 0, le32_to_cpu(*(__le32 *) (dev->dev_addr + 0)));
+	cpw32_f(MAC0 + 4, le32_to_cpu(*(__le32 *) (dev->dev_addr + 4)));
 	cpw8_f(Cfg9346, Cfg9346_Lock);
 
 	spin_unlock_irq(&cp->lock);
@@ -1640,9 +1651,9 @@ static int cp_set_mac_address(struct net_device *dev, void *p)
 
 static void eeprom_cmd_start(void __iomem *ee_addr)
 {
-	writeb (EE_ENB & ~EE_CS, ee_addr);
-	writeb (EE_ENB, ee_addr);
-	eeprom_delay ();
+	writeb(EE_ENB & ~EE_CS, ee_addr);
+	writeb(EE_ENB, ee_addr);
+	eeprom_delay();
 }
 
 static void eeprom_cmd(void __iomem *ee_addr, int cmd, int cmd_len)
@@ -1652,19 +1663,20 @@ static void eeprom_cmd(void __iomem *ee_addr, int cmd, int cmd_len)
 	/* Shift the command bits out. */
 	for (i = cmd_len - 1; i >= 0; i--) {
 		int dataval = (cmd & (1 << i)) ? EE_DATA_WRITE : 0;
-		writeb (EE_ENB | dataval, ee_addr);
-		eeprom_delay ();
-		writeb (EE_ENB | dataval | EE_SHIFT_CLK, ee_addr);
-		eeprom_delay ();
+		writeb(EE_ENB | dataval, ee_addr);
+		eeprom_delay();
+		writeb(EE_ENB | dataval | EE_SHIFT_CLK, ee_addr);
+		eeprom_delay();
 	}
-	writeb (EE_ENB, ee_addr);
-	eeprom_delay ();
+
+	writeb(EE_ENB, ee_addr);
+	eeprom_delay();
 }
 
 static void eeprom_cmd_end(void __iomem *ee_addr)
 {
-	writeb (~EE_CS, ee_addr);
-	eeprom_delay ();
+	writeb(~EE_CS, ee_addr);
+	eeprom_delay();
 }
 
 static void eeprom_extend_cmd(void __iomem *ee_addr, int extend_cmd,
@@ -1677,7 +1689,7 @@ static void eeprom_extend_cmd(void __iomem *ee_addr, int extend_cmd,
 	eeprom_cmd_end(ee_addr);
 }
 
-static u16 read_eeprom (void __iomem *ioaddr, int location, int addr_len)
+static u16 read_eeprom(void __iomem *ioaddr, int location, int addr_len)
 {
 	int i;
 	u16 retval = 0;
@@ -1688,13 +1700,13 @@ static u16 read_eeprom (void __iomem *ioaddr, int location, int addr_len)
 	eeprom_cmd(ee_addr, read_cmd, 3 + addr_len);
 
 	for (i = 16; i > 0; i--) {
-		writeb (EE_ENB | EE_SHIFT_CLK, ee_addr);
-		eeprom_delay ();
+		writeb(EE_ENB | EE_SHIFT_CLK, ee_addr);
+		eeprom_delay();
 		retval =
-		    (retval << 1) | ((readb (ee_addr) & EE_DATA_READ) ? 1 :
+		    (retval << 1) | ((readb(ee_addr) & EE_DATA_READ) ? 1 :
 				     0);
-		writeb (EE_ENB, ee_addr);
-		eeprom_delay ();
+		writeb(EE_ENB, ee_addr);
+		eeprom_delay();
 	}
 
 	eeprom_cmd_end(ee_addr);
@@ -1817,17 +1829,17 @@ static int cp_set_eeprom(struct net_device *dev,
 }
 
 /* Put the board into D3cold state and wait for WakeUp signal */
-static void cp_set_d3_state (struct cp_private *cp)
+static void cp_set_d3_state(struct cp_private *cp)
 {
-	pci_enable_wake (cp->pdev, 0, 1); /* Enable PME# generation */
-	pci_set_power_state (cp->pdev, PCI_D3hot);
+	pci_enable_wake(cp->pdev, 0, 1); /* Enable PME# generation */
+	pci_set_power_state(cp->pdev, PCI_D3hot);
 }
 
 static const struct net_device_ops cp_netdev_ops = {
 	.ndo_open		= cp_open,
 	.ndo_stop		= cp_close,
 	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_set_mac_address 	= cp_set_mac_address,
+	.ndo_set_mac_address	= cp_set_mac_address,
 	.ndo_set_multicast_list	= cp_set_rx_mode,
 	.ndo_get_stats		= cp_get_stats,
 	.ndo_do_ioctl		= cp_ioctl,
@@ -1845,7 +1857,7 @@ static const struct net_device_ops cp_netdev_ops = {
 #endif
 };
 
-static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
+static int cp_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	struct net_device *dev;
 	struct cp_private *cp;
@@ -1877,7 +1889,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 	cp->pdev = pdev;
 	cp->dev = dev;
 	cp->msg_enable = (debug < 0 ? CP_DEF_MSG_ENABLE : debug);
-	spin_lock_init (&cp->lock);
+	spin_lock_init(&cp->lock);
 	cp->mii_if.dev = dev;
 	cp->mii_if.mdio_read = mdio_read;
 	cp->mii_if.mdio_write = mdio_write;
@@ -1950,10 +1962,10 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 	cp_stop_hw(cp);
 
 	/* read MAC address from EEPROM */
-	addr_len = read_eeprom (regs, 0, 8) == 0x8129 ? 8 : 6;
+	addr_len = read_eeprom(regs, 0, 8) == 0x8129 ? 8 : 6;
 	for (i = 0; i < 3; i++)
 		((__le16 *) (dev->dev_addr))[i] =
-		    cpu_to_le16(read_eeprom (regs, i + 7, addr_len));
+		    cpu_to_le16(read_eeprom(regs, i + 7, addr_len));
 	memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 
 	dev->netdev_ops = &cp_netdev_ops;
@@ -1987,7 +1999,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 	pci_set_master(pdev);
 
 	if (cp->wol_enabled)
-		cp_set_d3_state (cp);
+		cp_set_d3_state(cp);
 
 	return 0;
 
@@ -2004,7 +2016,7 @@ err_out_free:
 	return rc;
 }
 
-static void cp_remove_one (struct pci_dev *pdev)
+static void cp_remove_one(struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct cp_private *cp = netdev_priv(dev);
@@ -2012,7 +2024,7 @@ static void cp_remove_one (struct pci_dev *pdev)
 	unregister_netdev(dev);
 	iounmap(cp->regs);
 	if (cp->wol_enabled)
-		pci_set_power_state (pdev, PCI_D0);
+		pci_set_power_state(pdev, PCI_D0);
 	pci_release_regions(pdev);
 	pci_clear_mwi(pdev);
 	pci_disable_device(pdev);
@@ -2021,7 +2033,7 @@ static void cp_remove_one (struct pci_dev *pdev)
 }
 
 #ifdef CONFIG_PM
-static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
+static int cp_suspend(struct pci_dev *pdev, pm_message_t state)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct cp_private *cp = netdev_priv(dev);
@@ -2030,16 +2042,16 @@ static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
 	if (!netif_running(dev))
 		return 0;
 
-	netif_device_detach (dev);
-	netif_stop_queue (dev);
+	netif_device_detach(dev);
+	netif_stop_queue(dev);
 
-	spin_lock_irqsave (&cp->lock, flags);
+	spin_lock_irqsave(&cp->lock, flags);
 
 	/* Disable Rx and Tx */
-	cpw16 (IntrMask, 0);
-	cpw8  (Cmd, cpr8 (Cmd) & (~RxOn | ~TxOn));
+	cpw16(IntrMask, 0);
+	cpw8(Cmd, cpr8(Cmd) & (~RxOn | ~TxOn));
 
-	spin_unlock_irqrestore (&cp->lock, flags);
+	spin_unlock_irqrestore(&cp->lock, flags);
 
 	pci_save_state(pdev);
 	pci_enable_wake(pdev, pci_choose_state(pdev, state), cp->wol_enabled);
@@ -2048,31 +2060,31 @@ static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
 	return 0;
 }
 
-static int cp_resume (struct pci_dev *pdev)
+static int cp_resume(struct pci_dev *pdev)
 {
-	struct net_device *dev = pci_get_drvdata (pdev);
+	struct net_device *dev = pci_get_drvdata(pdev);
 	struct cp_private *cp = netdev_priv(dev);
 	unsigned long flags;
 
 	if (!netif_running(dev))
 		return 0;
 
-	netif_device_attach (dev);
+	netif_device_attach(dev);
 
 	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
 	pci_enable_wake(pdev, PCI_D0, 0);
 
 	/* FIXME: sh*t may happen if the Rx ring buffer is depleted */
-	cp_init_rings_index (cp);
-	cp_init_hw (cp);
-	netif_start_queue (dev);
+	cp_init_rings_index(cp);
+	cp_init_hw(cp);
+	netif_start_queue(dev);
 
-	spin_lock_irqsave (&cp->lock, flags);
+	spin_lock_irqsave(&cp->lock, flags);
 
 	mii_check_media(&cp->mii_if, netif_msg_link(cp), false);
 
-	spin_unlock_irqrestore (&cp->lock, flags);
+	spin_unlock_irqrestore(&cp->lock, flags);
 
 	return 0;
 }
@@ -2089,7 +2101,7 @@ static struct pci_driver cp_driver = {
 #endif
 };
 
-static int __init cp_init (void)
+static int __init cp_init(void)
 {
 #ifdef MODULE
 	pr_info("%s", version);
@@ -2097,9 +2109,9 @@ static int __init cp_init (void)
 	return pci_register_driver(&cp_driver);
 }
 
-static void __exit cp_exit (void)
+static void __exit cp_exit(void)
 {
-	pci_unregister_driver (&cp_driver);
+	pci_unregister_driver(&cp_driver);
 }
 
 module_init(cp_init);
-- 
1.7.1


^ permalink raw reply related

* [iproute2] iproute2:  Fix batch-mode for mrules.
From: Ben Greear @ 2010-07-15 22:48 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

The do_multirule logic was broken in batch mode because
it expected the preferred_family to be AF_INET or AF_INET6,
but it then assigned it to RTNL_FAMILY_IPMR or RTNL_FAMILY_IP6MR.
So, the next iteration of the batch processing, it failed
the check for AF_INET or AF_INET6.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 9c8c6ef... d3b97e2... M	ip/iprule.c
 ip/iprule.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ip/iprule.c b/ip/iprule.c
index 9c8c6ef..d3b97e2 100644
--- a/ip/iprule.c
+++ b/ip/iprule.c
@@ -446,8 +446,12 @@ int do_multirule(int argc, char **argv)
 	case AF_INET6:
 		preferred_family = RTNL_FAMILY_IP6MR;
 		break;
+	case RTNL_FAMILY_IPMR:
+	case RTNL_FAMILY_IP6MR:
+		break;
 	default:
-		fprintf(stderr, "Multicast rules are only supported for IPv4/IPv6\n");
+		fprintf(stderr, "Multicast rules are only supported for IPv4/IPv6, was: %i\n",
+			preferred_family);
 		exit(-1);
 	}
 
-- 
1.6.2.5


^ permalink raw reply related

* [PATCH] cxgb4vf: fix SGE resource resource deallocation bug
From: Casey Leedom @ 2010-07-15 22:54 UTC (permalink / raw)
  To: netdev

>From 1ecf246196c43d75e75525211450a64d650f4fbc Mon Sep 17 00:00:00 2001
From: Casey Leedom <leedom@chelsio.com>
Date: Thu, 15 Jul 2010 15:50:16 -0700
Subject: [PATCH] cxgb4vf: fix SGE resource resource deallocation bug

Fix SGE resource resource deallocation bug.  Forgot to increment the RXQ and
TXQ cursors in the loop ...

Signed-off-by: Casey Leedom <leedom@chelsio.com>
---
 drivers/net/cxgb4vf/sge.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c
index f2ee9b0..eb5a1c9 100644
--- a/drivers/net/cxgb4vf/sge.c
+++ b/drivers/net/cxgb4vf/sge.c
@@ -2351,7 +2351,7 @@ void t4vf_free_sge_resources(struct adapter *adapter)
 	struct sge_rspq *intrq = &s->intrq;
 	int qs;
 
-	for (qs = 0; qs < adapter->sge.ethqsets; qs++) {
+	for (qs = 0; qs < adapter->sge.ethqsets; qs++, rxq++, txq++) {
 		if (rxq->rspq.desc)
 			free_rspq_fl(adapter, &rxq->rspq, &rxq->fl);
 		if (txq->q.desc) {
-- 
1.7.0.4


^ permalink raw reply related

* Re: Raise initial congestion window size / speedup slow start?
From: Bill Davidsen @ 2010-07-15 23:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, linux-kernel
In-Reply-To: <20100714.111553.104052157.davem@davemloft.net>

David Miller wrote:
> From: Bill Davidsen <davidsen@tmr.com>
> Date: Wed, 14 Jul 2010 11:21:15 -0400
> 
>> You may have to go into /proc/sys/net/core and crank up the
>> rmem_* settings, depending on your distribution.
> 
> You should never, ever, have to touch the various networking sysctl
> values to get good performance in any normal setup.  If you do, it's a
> bug, report it so we can fix it.
> 
> I cringe every time someone says to do this, so please do me a favor
> and don't spread this further. :-)
> 
I think transit time measured in 1/10th sec would disqualify this as a "normal 
setup."

High bandwidth and high latency don't work well because you get "send until the 
window is full then wait for ack" and poor performance. I saw this with sat feed 
to Wyoming from GE's Research Center in upstate NY in the late 80's or early 
90's. (I think this was NYserNet at that time). I did feeds from NYC area to 
California and Hawaii with SBC in the early to mid 2k years. In every case 
SunOS, Solaris, AIX and Linux all failed to hit anything like reasonable 
transfer speeds without manually tweaking, and I got the advice on increasing 
window size from network engineers at ISPs and backbone providers.

The O.P. may have other issues, and may benefit from doing other things as well, 
but raising window size is a reasonable thing to do on links with RTT in 
hundreds of ms, and it's easy to try without changing config files.

-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

^ permalink raw reply

* [ipmr] ipmr:  Don't leak memory if fib lookup fails.
From: Ben Greear @ 2010-07-15 23:22 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

This was detected using two mcast router tables.  The
pimreg for the second interface did not have a specific
mrule, so packets received by it were handled by the
default table, which had nothing configured.

This caused the ipmr_fib_lookup to fail, causing
the memory leak.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 ed2f911... f112ad8... M	net/ipv4/ipmr.c
 net/ipv4/ipmr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index ed2f911..f112ad8 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -442,8 +442,10 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
 	int err;
 
 	err = ipmr_fib_lookup(net, &fl, &mrt);
-	if (err < 0)
+	if (err < 0) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	read_lock(&mrt_lock);
 	dev->stats.tx_bytes += skb->len;
@@ -1729,8 +1731,10 @@ int ip_mr_input(struct sk_buff *skb)
 		goto dont_forward;
 
 	err = ipmr_fib_lookup(net, &skb_rtable(skb)->fl, &mrt);
-	if (err < 0)
+	if (err < 0) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	if (!local) {
 		    if (IPCB(skb)->opt.router_alert) {
-- 
1.6.2.5


^ permalink raw reply related

* Re: [PATCH RFC] act_cpu: packet distributing
From: Changli Gao @ 2010-07-15 23:30 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: hadi, David S. Miller, Patrick McHardy, Tom Herbert, netdev
In-Reply-To: <1279212897.2496.133.camel@edumazet-laptop>

On Fri, Jul 16, 2010 at 12:54 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le jeudi 15 juillet 2010 à 08:48 -0400, jamal a écrit :
>>
>> RCU maybe a little trickier here Eric. Actions could be shared i.e.
>> example, it is possible to have a policer action restricting rates for a
>> group of flows  across multiple netdevices etc. Since action stats get
>> written to by different CPUs concurrently. It could be probably done if
>> one was to implement per-cpu stats which get summed-up when user space
>> asks.
>
> It's certainly tricky, but is act_cpu useful in its current shape, based
> on an infrastructure that had to use a lock because of exact
> rates/accounting ?
>
> I dont understand how distributing packets to different cpus, if going
> through a central lock can be an improvement. Changli patches are most
> of the time not documented, and no performance data is provided.
>
The tcf_lock is per-instance, so I should not an issue here if the
corresponding NIC isn't an multiqueue NIC or the instance is
per-rx-queue. I agree
the performance data is necessary and I'll publish it in the formal
patch.

> Even if we solve this locking problem, using percpu variables, act_cpu
> hits another problem :
>
> The socket refcount, taken by the 'master' cpu, and released by the
> consumer cpu.
This is why I asked if I can assign sk to skb.

>
> RFS provides sort of a lazy flow-based distribution without central lock
> or cache line ping pongs. Why Changli dont use this, we dont know yet.
>
The fact is I don't know how to do this. I'll work on this issue later.

Thanks.


-- 
Regards,
Changli Gao(xiaosuo@gmail.com)

^ permalink raw reply

* igb:  2.6.34.1: kernel warning at igb_main.c:2080
From: Ben Greear @ 2010-07-15 23:56 UTC (permalink / raw)
  To: NetDev

We just saw this kernel warning on 2.6.34.1 + a few patches from the pending stable queue,
plus our own hacks (though none to igb).

We were running a modified version of pktgen traffic and at the same time
bounced the port.

This warning didn't seem to cause any real problems.

Please let us know if you would like any additional information.

]# lspci|grep Ethern
01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
05:00.0 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02)
05:00.1 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02)
06:00.0 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02)
06:00.1 Ethernet controller: Intel Corporation 82575EB Gigabit Network Connection (rev 02)


Jul 15 16:36:01 localhost kernel: ------------[ cut here ]------------
Jul 15 16:36:01 localhost kernel: WARNING: at /home/greearb/git/linux-2.6.dev.34.y/drivers/net/igb/igb_main.c:2080 igb_close+0x28/0x9f [igb]()
Jul 15 16:36:01 localhost kernel: Hardware name: X8STi
Jul 15 16:36:01 localhost kernel: Modules linked in: bridge arc4 michael_mic wanlink(P) 8021q garp xt_CT iptable_raw ipt_addrtype xt_DSCP xt_dscp xt_string 
xt_owner xt_NFQUEUE xt_multiport xt_mark xt_iprange xt_hashlimit xt_CONNMARK xt_connmark stp llc veth fuse macvlan bpctl_mod pktgen iscsi_tcp libiscsi_tcp 
libiscsi scsi_transport_iscsi nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 dm_multipath uinput i2c_i801 iTCO_wdt i2c_core ioatdma e1000e igb pcspkr 
iTCO_vendor_support dca ata_generic pata_acpi [last unloaded: nf_nat]
Jul 15 16:36:01 localhost kernel: Pid: 17516, comm: ip Tainted: P           2.6.34.1 #2
Jul 15 16:36:01 localhost kernel: Call Trace:
Jul 15 16:36:01 localhost kernel: [<ffffffffa002a37f>] ? igb_close+0x28/0x9f [igb]
Jul 15 16:36:01 localhost kernel: [<ffffffff81041bb6>] warn_slowpath_common+0x77/0x8f
Jul 15 16:36:01 localhost kernel: [<ffffffff81041bdd>] warn_slowpath_null+0xf/0x11
Jul 15 16:36:01 localhost kernel: [<ffffffffa002a37f>] igb_close+0x28/0x9f [igb]
Jul 15 16:36:01 localhost kernel: [<ffffffff8133c626>] __dev_close+0x73/0x86
Jul 15 16:36:01 localhost kernel: [<ffffffff8133a719>] __dev_change_flags+0xa8/0x12b
Jul 15 16:36:01 localhost kernel: [<ffffffff8133c2aa>] dev_change_flags+0x1c/0x51
Jul 15 16:36:01 localhost kernel: [<ffffffff813466bc>] do_setlink+0x273/0x482
Jul 15 16:36:01 localhost kernel: [<ffffffff810ab1bb>] ? zone_statistics+0x5e/0x63
Jul 15 16:36:01 localhost kernel: [<ffffffff8134755e>] rtnl_newlink+0x26c/0x422
Jul 15 16:36:01 localhost kernel: [<ffffffff81345a06>] ? nla_nest_start+0x1d/0x31
Jul 15 16:36:01 localhost kernel: [<ffffffff810ca997>] ? virt_to_head_page+0x9/0x2a
Jul 15 16:36:01 localhost kernel: [<ffffffff813dd1f5>] ? __mutex_lock_common+0x38e/0x3ac
Jul 15 16:36:01 localhost kernel: [<ffffffff81346ffb>] rtnetlink_rcv_msg+0x1d9/0x1f7
Jul 15 16:36:01 localhost kernel: [<ffffffff81346e22>] ? rtnetlink_rcv_msg+0x0/0x1f7
Jul 15 16:36:01 localhost kernel: [<ffffffff81356939>] netlink_rcv_skb+0x3e/0x8e
Jul 15 16:36:01 localhost kernel: [<ffffffff81346cc9>] rtnetlink_rcv+0x20/0x29
Jul 15 16:36:01 localhost kernel: [<ffffffff813567b2>] netlink_unicast+0xea/0x151
Jul 15 16:36:01 localhost kernel: [<ffffffff8133545c>] ? memcpy_fromiovec+0x42/0x73
Jul 15 16:36:01 localhost kernel: [<ffffffff81357bc8>] netlink_sendmsg+0x242/0x255
Jul 15 16:36:01 localhost kernel: [<ffffffff8132a771>] ? __sock_recvmsg_nosec+0x29/0x2b
Jul 15 16:36:01 localhost kernel: [<ffffffff8132bd02>] __sock_sendmsg+0x56/0x5f
Jul 15 16:36:01 localhost kernel: [<ffffffff8132c127>] sock_sendmsg+0xa3/0xbc
Jul 15 16:36:01 localhost kernel: [<ffffffff813351e5>] ? copy_from_user+0x28/0x30
Jul 15 16:36:01 localhost kernel: [<ffffffff8133555e>] ? verify_iovec+0x52/0x95
Jul 15 16:36:01 localhost kernel: [<ffffffff8132c368>] sys_sendmsg+0x1c6/0x22a
Jul 15 16:36:01 localhost kernel: [<ffffffff810a277f>] ? lru_cache_add_lru+0x38/0x3d
Jul 15 16:36:01 localhost kernel: [<ffffffff813de23e>] ? _raw_spin_unlock+0x2d/0x38
Jul 15 16:36:01 localhost kernel: [<ffffffff810ad802>] ? spin_unlock+0x9/0xb
Jul 15 16:36:01 localhost kernel: [<ffffffff810b0138>] ? handle_mm_fault+0x6d3/0x6f3
Jul 15 16:36:01 localhost kernel: [<ffffffff810b3a0a>] ? __vma_link_rb+0x2b/0x2d
Jul 15 16:36:01 localhost kernel: [<ffffffff810b45f7>] ? vma_link+0xcd/0xcf
Jul 15 16:36:01 localhost kernel: [<ffffffff810d9369>] ? fget_light+0x39/0x87
Jul 15 16:36:01 localhost kernel: [<ffffffff81083b91>] ? audit_syscall_entry+0xfe/0x12a
Jul 15 16:36:01 localhost kernel: [<ffffffff81009ac2>] system_call_fastpath+0x16/0x1b
Jul 15 16:36:01 localhost kernel: ---[ end trace 75242fae6dbfdf6d ]---


Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* Re: [ipmr] ipmr:  Don't leak memory if fib lookup fails.
From: Ben Greear @ 2010-07-16  0:04 UTC (permalink / raw)
  To: Ben Greear; +Cc: netdev
In-Reply-To: <1279236153-23699-1-git-send-email-greearb@candelatech.com>

On 07/15/2010 04:22 PM, Ben Greear wrote:
> This was detected using two mcast router tables.  The
> pimreg for the second interface did not have a specific
> mrule, so packets received by it were handled by the
> default table, which had nothing configured.

I just realized this should be applied against 2.6.35-pre, not 2.6.34.

Thanks,
Ben

> This caused the ipmr_fib_lookup to fail, causing
> the memory leak.
>
> Signed-off-by: Ben Greear<greearb@candelatech.com>
> ---
> :100644 100644 ed2f911... f112ad8... M	net/ipv4/ipmr.c
>   net/ipv4/ipmr.c |    8 ++++++--
>   1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
> index ed2f911..f112ad8 100644
> --- a/net/ipv4/ipmr.c
> +++ b/net/ipv4/ipmr.c
> @@ -442,8 +442,10 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
>   	int err;
>
>   	err = ipmr_fib_lookup(net,&fl,&mrt);
> -	if (err<  0)
> +	if (err<  0) {
> +		kfree_skb(skb);
>   		return err;
> +	}
>
>   	read_lock(&mrt_lock);
>   	dev->stats.tx_bytes += skb->len;
> @@ -1729,8 +1731,10 @@ int ip_mr_input(struct sk_buff *skb)
>   		goto dont_forward;
>
>   	err = ipmr_fib_lookup(net,&skb_rtable(skb)->fl,&mrt);
> -	if (err<  0)
> +	if (err<  0) {
> +		kfree_skb(skb);
>   		return err;
> +	}
>
>   	if (!local) {
>   		    if (IPCB(skb)->opt.router_alert) {


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* Re: Raise initial congestion window size / speedup slow start?
From: H.K. Jerry Chu @ 2010-07-16  0:23 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Rick Jones, Bill Fink, Hagen Paul Pfeifer, David Miller, lists,
	davidsen, linux-kernel, netdev
In-Reply-To: <20100715134857.38d519c5@nehalam>

I don't even consider a modest IW increase to 10 is aggressive. The scaling
of IW is only adequate IMO given the huge b/w growth in the past
decade. Remember there could be plenty of flows sending large cwnd
bursts at
twice the bottleneck link rate at any point of time in the network anyway so
the "fairness" question may already be ill-defined. In any case we're
trying to conduct some experiment in a private testbed to hopefully
get some insights
with real data.

Jerry

On Thu, Jul 15, 2010 at 1:48 PM, Stephen Hemminger
<shemminger@vyatta.com> wrote:
> On Thu, 15 Jul 2010 12:51:22 -0700
> Rick Jones <rick.jones2@hp.com> wrote:
>
>> I have to wonder if the only heuristic one could employ for divining the initial
>> congestion window is to be either pessimistic/conservative or
>> optimistic/liberal.  Or for that matter the only one one really needs here?
>>
>> That's what it comes down to doesn't it?  At any one point in time, we don't
>> *really* know the state of the network and whether it can handle the load we
>> might wish to put upon it.  We are always reacting to it. Up until now, it has
>> been felt necessary to be pessimistic/conservative at time of connection
>> establishment and not rely as much on the robustness of the "control" part of
>> avoidance and control.
>>
>> Now, the folks at Google have lots of data to suggest we don't need to be so
>> pessimistic/conservative and so we have to decide if we are willing to be more
>> optimistic/liberal.  Broadly handwaving, the "netdev we" seems to be willing to
>> be more optimistic/liberal in at least a few cases, and the question comes down
>> to whether or not the "IETF we" will be similarly willing.
>
> I am not convinced that a host being aggressive with initial cwnd (Linux) would
> not end up unfairly monopolizing available bandwidth compared to older more conservative
> implementations (Windows). Whether fairness is important or not is another debate.
>
>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox