All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Anoop P A <anoop.pa@gmail.com>
Cc: gregkh@suse.de, dbrownell@users.sourceforge.net, ust@denx.de,
	pkondeti@codeaurora.org, stern@rowland.harvard.edu,
	gadiyar@ti.com, alek.du@intel.com, jacob.jun.pan@intel.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH v3] EHCI bus glue for on-chip PMC MSP USB controller.
Date: Wed, 9 Feb 2011 09:20:37 -0800	[thread overview]
Message-ID: <20110209172037.GA30950@kroah.com> (raw)
In-Reply-To: <1297260753.29250.20.camel@paanoop1-desktop>

On Wed, Feb 09, 2011 at 07:42:33PM +0530, Anoop P A wrote:
> > > +#ifdef CONFIG_MSP_HAS_DUAL_USB
> > > +	gpio_direction_output(MSP_PIN_USB1_HOST_DEV, 1);
> > > +#endif
> > 
> > Please don't put #defines in .c files.
> You mean #ifdef ???

Yes, sorry.

> > > +static int ehci_msp_suspend(struct device *dev)
> > > +{
> > > +	struct usb_hcd *hcd = dev_get_drvdata(dev);
> > > +	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> > > +	unsigned long flags;
> > > +	int rc;
> > > +
> > > +	return 0;
> > > +	rc = 0;
> > > +
> > > +	if (time_before(jiffies, ehci->next_statechange))
> > > +		msleep(10);
> > 
> > Short sleep, why?
> I am not very sure. Person who originally wrote this driver is
> unreachable.Any potential issues??

Yes, suspend/resume time delays are not nice for some systems.  I would
verify that this really is necessary, and, as you are going to be the one
maintaining and responsible for the code, it would be good for you to
figure out exactly what it is doing, and why.


> > > +static int ehci_msp_resume(struct device *dev)
> > > +{
> > > +	struct usb_hcd *hcd = dev_get_drvdata(dev);
> > > +	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> > > +
> > > +
> > > +	/* maybe restore FLADJ */
> > 
> > Don't you know?
> Not really :)

Heh, you should.

> > > +/* may be called without controller electrically present */
> > > +/* may be called with controller, bus, and devices active */
> > > +
> > 
> > What may be called?
> may be usb_hcd_msp_remove :)

Then put it in the comment block for that function, not above it, with
an extra space between it, that just causes confusion.

thanks,

greg k-h

  reply	other threads:[~2011-02-09 17:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 11:06 [PATCH] EHCI support for on-chip PMC MSP USB controller Anoop P
2010-12-21 16:00 ` Alan Stern
2010-12-21 16:00   ` Alan Stern
2010-12-21 17:59   ` Greg KH
2010-12-22 14:34 ` [PATCH V2 0/2] " Anoop P.A
2010-12-22 14:36 ` [PATCH V2 1/2] " Anoop P.A
2010-12-22 14:58   ` Anoop P A
2010-12-24  9:44   ` Shane McDonald
2011-01-27 11:28     ` [PATCH v3] EHCI bus glue " Anoop P.A
2011-02-04 19:56       ` Greg KH
2011-02-09 14:12         ` Anoop P A
2011-02-09 17:20           ` Greg KH [this message]
2011-02-09 15:10       ` Matthieu CASTET
2011-02-09 15:44         ` Anoop P A
2011-02-15 10:43       ` [PATCH v4] " Anoop P.A
2011-02-15 17:44         ` Matthieu CASTET
2011-02-22 15:35           ` [PATCH v5] " Anoop P.A
2011-02-22 15:35             ` Anoop P.A
2011-02-22 20:04             ` Dan Carpenter
2011-02-22 20:04               ` Dan Carpenter
2011-02-23 13:22               ` Anoop P A
2011-02-23 13:22                 ` Anoop P A
2011-02-23 17:02                 ` Dan Carpenter
2011-02-23 17:02                   ` Dan Carpenter
2011-02-24 10:19                   ` Anoop P A
2011-02-24 10:19                     ` Anoop P A
2011-02-24 11:28                     ` Dan Carpenter
2011-02-24 11:28                       ` Dan Carpenter
2011-02-24 13:56                       ` [PATCH] " Anoop P.A
2011-02-24 13:56                         ` Anoop P.A
2010-12-22 14:36 ` [PATCH V2 2/2] MSP onchip root hub over current quirk Anoop P.A
2010-12-23  2:18   ` Alan Stern
2010-12-23  2:18     ` Alan Stern
2010-12-23  9:29     ` Anoop P A
2010-12-23 16:08       ` Alan Stern
2010-12-23 16:08         ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110209172037.GA30950@kroah.com \
    --to=greg@kroah.com \
    --cc=alek.du@intel.com \
    --cc=anoop.pa@gmail.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=gadiyar@ti.com \
    --cc=gregkh@suse.de \
    --cc=jacob.jun.pan@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pkondeti@codeaurora.org \
    --cc=ralf@linux-mips.org \
    --cc=stern@rowland.harvard.edu \
    --cc=ust@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.