mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anoop P A <anoop.pa@gmail.com>
To: Dan Carpenter <error27@gmail.com>
Cc: "gregkh @ suse . de" <gregkh@suse.de>,
	"dbrownell @ users . sourceforge . net" 
	<dbrownell@users.sourceforge.net>,
	"stern @ rowland . harvard . edu" <stern@rowland.harvard.edu>,
	"pkondeti @ codeaurora . org" <pkondeti@codeaurora.org>,
	"jacob . jun . pan @ intel . com" <jacob.jun.pan@intel.com>,
	"linux-usb @ vger . kernel . org" <linux-usb@vger.kernel.org>,
	"alek . du @ intel . com" <alek.du@intel.com>,
	"linux-kernel @ vger . kernel . org"
	<linux-kernel@vger.kernel.org>,
	"gadiyar @ ti . com" <gadiyar@ti.com>,
	"ralf @ linux-mips . org" <ralf@linux-mips.org>,
	"linux-mips @ linux-mips . org" <linux-mips@linux-mips.org>,
	Greg KH <greg@kroah.com>
Subject: Re: [PATCH v5] EHCI bus glue for on-chip PMC MSP USB controller
Date: Thu, 24 Feb 2011 15:49:15 +0530	[thread overview]
Message-ID: <1298542755.9950.277.camel@paanoop1-desktop> (raw)
In-Reply-To: <20110223170205.GE19898@bicker>

On Wed, 2011-02-23 at 20:02 +0300, Dan Carpenter wrote:
> > > It doesn't compile so I can't test this, but I think that this will
> > > cause a sparse warning.  "base" should have an __iomem tag.  Please
> > > run sparse on this driver.
> > Looks like mips platform build has been broken on linux-next ( unable to
> > configure) . However I have tested code with linux-queue tree ( mips)
> > and didn't see any such warnings
> 
> Sparse is an external tool.  You have to install it and build with
> make C=1 drivers/usb/file.o
Ok. I found there was some issue in arch/mips/Makefile CHECKFLAGS
> 
> > > > +	temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
> > > > +	temp &= 0x0f;
> > > 
> > > companion HCs * ports per CC & 0xf?
> > > 
> > > What's the &= 0x0f for?  It's left out of the printk.
> > Code got carried forward from ehci-pci.c . Is that says ehci-pci.c is
> > uptodate? .  
> 
> My guess is that ehci-pci.c is buggy.  Anyway this is just a work around
> to handle buggy hardware.  Since the code here just prints some debug
> output and doesn't do the work arounds we might as well remove the whole
> thing?  It seems unlikely that your mips hardware will have the same
> bug.
Ok I will remove the code block

> 
> > > > +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))
> > > > +		usleep(10000);
> > > 
> > > Is there still a usleep() function?  Either way, can you send us
> > > something that compiles on linux-next?
> > Again code got carried from ehci-pci.c .(changed msleep to usleep as
> > checkpatch complained about it). I am unable to compile mips targets in
> > linux-next tree . However this patch is tested with both linux-stable
> > and linux-queue tree of l-m-o
> 
> checkpatch.pl complains because msleep() is not accurate for tiny
> amounts of time.  There is no usleep() function because trying to be
> that accurate is a lot of work and causes a lot of interrupts.  There
> is a usleep_range() function instead which lets the scheduler group
> wakeups together.  This is documented in
> Documentation/timers/timers-howto.txt
> 
> Also this is dead code.  No one will complain, if you just delete it.
You mean entire ehci_msp_suspend() ??

> 
> regards,
> dan carpenter



  reply	other threads:[~2011-02-24  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4D5ABB65.3090101@parrot.com>
2011-02-22 15:35 ` Anoop P.A
2011-02-22 20:04   ` Dan Carpenter
2011-02-23 13:22     ` Anoop P A
2011-02-23 17:02       ` Dan Carpenter
2011-02-24 10:19         ` Anoop P A [this message]
2011-02-24 11:28           ` Dan Carpenter
2011-02-24 13:56             ` [PATCH] " Anoop P.A

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=1298542755.9950.277.camel@paanoop1-desktop \
    --to=anoop.pa@gmail.com \
    --cc=alek.du@intel.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=error27@gmail.com \
    --cc=gadiyar@ti.com \
    --cc=greg@kroah.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 \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®