[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <184D23435BECB444AB6B9D4630C8EC8303853051@XMB-RCD-303.cisco.com>
Date: Thu, 1 Mar 2012 19:23:45 -0600
From: "Christian Benvenuti (benve)" <benve@...co.com>
To: "David Miller" <davem@...emloft.net>, <dan.carpenter@...cle.com>
Cc: "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()
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:
driver | type used
----------+--------------
mlx4 | int
chelsio | unsigned int
igb | unsigned int
igbxe | unsigned int
emulex | u32
vxge | u32
Another option would have been to make all drivers use int
to match pci_enable_sriov (pci_enable_sriov->sriov_enable checks
against negative values).
(BTW, why is pci_enable_sriov prototype using int?)
Thanks
/Chris
> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Thursday, March 01, 2012 2:24 PM
> To: dan.carpenter@...cle.com
> Cc: Roopa Prabhu (roprabhu); Christian Benvenuti (benve); Neel Patel
> (neepatel); Nishank Trivedi (nistrive); netdev@...r.kernel.org;
kernel-
> janitors@...r.kernel.org
> Subject: Re: [patch] enic: fix an endian bug in enic_probe()
>
> From: Dan Carpenter <dan.carpenter@...cle.com>
> Date: Thu, 1 Mar 2012 10:19:54 +0300
>
> > "num_vfs" is a u32 but we only use the high 16 bits and the low
> 16bits
> > are left as zero. That isn't a problem for little endian systems
but
> it
> > will break on big endian ones.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists