lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 1 Jun 2009 09:31:00 +0100
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	Yu Zhao <yu.zhao@...el.com>
Cc:	Grant Grundler <grundler@...isc-linux.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"marc.c.dionne@...il.com" <marc.c.dionne@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: use fixed-up device class when configuring device

Yeah I should have queued this for the last pull.  I'll send another
request with this patch as soon as Linus pulls.

Jesse

On Mon, 01 Jun 2009 09:50:07 +0800
Yu Zhao <yu.zhao@...el.com> wrote:

> Hi Jesse,
> 
> Can you please take this fix for 2.6.30 RC if possible? It fixes a 
> regression introduced by the SR-IOV patch series.
> 
> Thanks,
> Yu
> 
> Grant Grundler wrote:
> > On Thu, May 28, 2009 at 12:25:05AM +0800, Yu Zhao wrote:
> >> The device class may be changed after the early fixup. Need to
> >> re-read the class value from pci_dev when configuring the device.
> >> Otherwise some devices such as JMicron SATA controller won't work.
> > 
> > I looked at pci_setup_device() and was thinking pci_fixup_device()
> > should be called before pci_cfg_space_size() and thus avoid having
> > to setup local "class" variable twice. pci_cfg_space_size() only
> > seems to care if the device is a PCI_CLASS_BRIDGE_HOST (or not).
> > 
> > But dev->class has to be set up in any case and the current order
> > makes more sense to me.
> > 
> > Reviewed-by: Grant Grundler <grundler@...isc-linux.org>
> > 
> > thanks,
> > grant
> > 
> >> Tested-by: Marc Dionne <marc.c.dionne@...il.com>
> >> Signed-off-by: Yu Zhao <yu.zhao@...el.com>
> >> ---
> >>  drivers/pci/probe.c |    2 ++
> >>  1 files changed, 2 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> >> index e3c3e08..f1ae247 100644
> >> --- a/drivers/pci/probe.c
> >> +++ b/drivers/pci/probe.c
> >> @@ -745,6 +745,8 @@ int pci_setup_device(struct pci_dev *dev)
> >>  
> >>  	/* Early fixups, before probing the BARs */
> >>  	pci_fixup_device(pci_fixup_early, dev);
> >> +	/* device class may be changed after fixup */
> >> +	class = dev->class >> 8;
> >>  
> >>  	switch (dev->hdr_type) {		    /* header
> >> type */ case PCI_HEADER_TYPE_NORMAL:		    /*
> >> standard header */ -- 
> >> 1.6.1
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe
> >> linux-pci" in the body of a message to majordomo@...r.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ