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]
Message-Id: <1251755656.16169.52.camel@ank32.eng.vmware.com>
Date:	Mon, 31 Aug 2009 14:54:16 -0700
From:	Alok Kataria <akataria@...are.com>
To:	Rolf Eike Beer <eike-kernel@...tec.de>
Cc:	James Bottomley <James.Bottomley@...senpartnership.com>,
	Robert Love <robert.w.love@...el.com>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Mike Christie <michaelc@...wisc.edu>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dmitry Torokhov <dtor@...are.com>,
	Maxime Austruy <maustruy@...are.com>
Subject: Re: [PATCH] SCSI driver for VMware's virtual HBA.


On Mon, 2009-08-31 at 11:51 -0700, Rolf Eike Beer wrote:
> Alok Kataria wrote:
> > Hi Eike,
> 
> > > > +static int __devinit pvscsi_probe(struct pci_dev *pdev,
> > > > +				  const struct pci_device_id *id)
> > > > +{
> > > > +	struct pvscsi_adapter *adapter;
> > > > +	struct Scsi_Host *host;
> > > > +	unsigned long base, i;
> > > > +	int error;
> > > > +
> > > > +	error = -ENODEV;
> > > > +
> > > > +	if (pci_enable_device(pdev))
> > > > +		return error;
> > >
> > > As always I suggest having a look on devres (see Documentation/driver-
> > > model/devres.txt) which could simplify your error handling here and your
> > > release function a lot. You only need to make sure it doesn't hurt if all
> > > the PCI resources are freed after the scsi ones as you would end up
> > > cleaning the scsi ones by hand and afterwards devres would throw all it
> > > handles (which will probably be most of your PCI stuff) away itself.
> >
> > I took a quick look, but would prefer not to change this right now. Will
> > do this as a incremental change later. Hope that is fine.
> 
> Just a suggestion ;)
> 
> > > > +	adapter->dev  = pdev;
> > > > +	adapter->host = host;
> > > > +
> > > > +	spin_lock_init(&adapter->hw_lock);
> > > > +
> > > > +	host->max_channel = 0;
> > > > +	host->max_id      = 16;
> > > > +	host->max_lun     = 1;
> > > > +
> > > > +	pci_read_config_byte(pdev, PCI_CLASS_REVISION, &adapter->rev);
> > >
> > > That's in pdev->revision anyway, isn't it?
> >
> > Yep, though, its needed in pvscsi_info, so will keep this in adapter
> > too.
> 
> Yes, but you don't need to do pci_read_config_byte() but simply copying that 
> over from pdev->revision.

Oh..yes, will take care of that in the next revision.  

Thanks,
Alok
> 
> Eike

--
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