Skip to content

Commit

Permalink
bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned…
Browse files Browse the repository at this point in the history
… 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Benjamin Li authored and David S. Miller committed Sep 18, 2008
1 parent add5237 commit 27ed9dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bnx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -6597,7 +6597,7 @@ struct flash_spec {

struct bnx2_irq {
irq_handler_t handler;
u16 vector;
unsigned int vector;
u8 requested;
char name[16];
};
Expand Down

0 comments on commit 27ed9dd

Please sign in to comment.