[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120302060653.GU1003@mwanda>
Date: Fri, 2 Mar 2012 09:06:53 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: "Christian Benvenuti (benve)" <benve@...co.com>
Cc: David Miller <davem@...emloft.net>,
"Roopa Prabhu (roprabhu)" <roprabhu@...co.com>,
"Neel Patel (neepatel)" <neepatel@...co.com>,
"Nishank Trivedi (nistrive)" <nistrive@...co.com>,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] enic: fix an endian bug in enic_probe()
On Thu, Mar 01, 2012 at 07:23:45PM -0600, Christian Benvenuti (benve) wrote:
> Thanks Dan, David.
>
> Just one quick comment...
> pci_enable_sriov's 2nd input is declared as type int and we
> were using u32 instead (for a non negative 16bit value).
> With a quick check I noticed that other pci_enable_sriov callers
> do something similar and may need to be taken care too:
>
The problem was calling pci_read_config_word() not
pci_enable_sriov(). I did consider passing a temporary variable to
pci_read_config_word() and then storing that in num_vfs but it
seemed more complicated.
Looking at the other drivers now, I see that's how some of them do
it. But it makes sense for them because they have the num_vfs which
the user can configure and the number from the hardware which is the
max that are supported.
Either way would fix it, but I feel that my fix is not terribly
ugly.
regards,
dan carpenter
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists