]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int
authorBenjamin Li <benli@broadcom.com>
Thu, 18 Sep 2008 23:46:11 +0000 (16:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Sep 2008 23:46:11 +0000 (16:46 -0700)
commitf7c3d15e1a91c99eb1647523bd174f2048dba68a
tree98fff4be1e8c4192d902c402bfb85e282bac53e3
parent964bc31eaecb49e69febd9b83cc1b1b566915efb
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.h