public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int
@ 2008-09-17 18:52 Benjamin Li
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Li @ 2008-09-17 18:52 UTC (permalink / raw)
  To: Rik van Riel, Michael Chan, Andrew Morton, David Miller
  Cc: inux-kernel@vger.kernel.org

>From c455b36005a9b1b6a2b0036b7947d3f4bebb9f2d Mon Sep 17 00:00:00 2001
From: Benjamin Li <benli@broadcom.com>
Date: Tue, 16 Sep 2008 17:20:11 -0700
Subject: [PATCH] bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int

The bnx2 driver stores/uses the irq value from the pci_dev internally.
But when it stores the irq value, it has been performing an
integer demotion.  Because of the recent changes made to
arch/x86/kernel/io_apic.c, the new method in creating the irq value
(using build_irq_for_pci_dev()) has exposed this bug on x86 systems.

Because of this demotion when calling request_irq() from
bnx2_request_irq(), the driver would get a return code of -EINVAL.
This is because the kernel could not find the requested irq descriptor.
By storing the irq value properly, the kernel can find the correct
irq descriptor and the bnx2 driver can operate normally.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>

---
 drivers/net/bnx2.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index c3c579f..dfacd31 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6597,7 +6597,7 @@ struct flash_spec {
 
 struct bnx2_irq {
 	irq_handler_t	handler;
-	u16		vector;
+	unsigned int	vector;
 	u8		requested;
 	char		name[16];
 };
-- 
1.5.5.1





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

* Re: [PATCH] bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int
       [not found]   ` <1221667442-4495-2-git-send-email-benli@broadcom.com>
@ 2008-09-18 23:46     ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-09-18 23:46 UTC (permalink / raw)
  To: benli; +Cc: riel, mchan, akpm, linux-kernel

From: "Benjamin Li" <benli@broadcom.com>
Date: Wed, 17 Sep 2008 09:04:02 -0700

> The bnx2 driver stores/uses the irq value from the pci_dev internally.
> But when it stores the irq value, it has been performing an
> integer demotion.  Because of the recent changes made to
> arch/x86/kernel/io_apic.c, the new method in creating the irq value
> (using build_irq_for_pci_dev()) has exposed this bug on x86 systems.
> 
> Because of this demotion when calling request_irq() from
> bnx2_request_irq(), the driver would get a return code of -EINVAL.
> This is because the kernel could not find the requested irq descriptor.
> By storing the irq value properly, the kernel can find the correct
> irq descriptor and the bnx2 driver can operate normally.
> 
> Signed-off-by: Benjamin Li <benli@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied to net-2.6, thanks!

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

end of thread, other threads:[~2008-09-18 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 18:52 [PATCH] bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int Benjamin Li
  -- strict thread matches above, loose matches on Subject: below --
2008-09-16 23:01 2.6.27-rc5-mm1 Rik van Riel
     [not found] ` <1221667442-4495-1-git-send-email-benli@broadcom.com>
     [not found]   ` <1221667442-4495-2-git-send-email-benli@broadcom.com>
2008-09-18 23:46     ` [PATCH] bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int David Miller

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