From: Felipe Balbi <balbi@ti.com>
To: Tatyana Brokhman <tlinder@codeaurora.org>
Cc: greg@kroah.com, linux-usb@vger.kernel.org,
linux-arm-msm@vger.kernel.org, balbi@ti.com,
ablay@codeaurora.org, open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH/RFC 2/5] usb:dummy_hcd: connect/disconnect test support
Date: Thu, 16 Jun 2011 19:18:30 +0300 [thread overview]
Message-ID: <20110616161828.GW12230@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <1308231068-24038-3-git-send-email-tlinder@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
Hi,
On Thu, Jun 16, 2011 at 04:31:04PM +0300, Tatyana Brokhman wrote:
> @@ -1362,6 +1363,43 @@ static struct dummy_ep *find_endpoint (struct dummy *dum, u8 address)
> #define Ep_Request (USB_TYPE_STANDARD | USB_RECIP_ENDPOINT)
> #define Ep_InRequest (Ep_Request | USB_DIR_IN)
>
> +/**
> + * dummy_hcd_conn_disc_work() - performs a disconnect/connect sequence.
> + * @data: pointer to the sceduled work_struct
> + */
> +static void dummy_hcd_conn_disc_work(struct work_struct *data)
> +{
> + struct dummy_hcd *dum_hcd =
> + container_of(data, struct dummy_hcd, conn_disc_work);
> + int ret_val;
> +
> + if (!dum_hcd->dum->driver) {
> + dev_err(dummy_dev(dum_hcd),
> + "dummy_hcd_conn_disc_work called without connected "
> + "device\n");
> + return;
> + }
> +
> + dev_info(dummy_dev(dum_hcd), "disconnecting device...\n");
> + ret_val = dummy_pullup(&dum_hcd->dum->gadget, 0);
> + if (ret_val) {
> + dev_err(dummy_dev(dum_hcd), "dummy_hcd_conn_disc_work:"
> + " couldn't disconnect device:"
> + " ret_val=%d\n",
> + ret_val);
> + return;
> + }
> +
> + dev_info(dummy_dev(dum_hcd), "re-connecting device...\n");
> + /* We have to let the hub task to update the device disconnect state */
> + msleep_interruptible(1000);
> + ret_val = dummy_pullup(&dum_hcd->dum->gadget, 1);
> + if (ret_val)
> + dev_err(dummy_dev(dum_hcd), "dummy_hcd_conn_disc_work:"
> + " couldn't re-connect device:"
> + " ret_val=%d\n",
> + ret_val);
this print is quite ugly. How about something like:
dev_err(dummy_dev(dum_hcd), "%s: couldn't re-connect --> %d\n",
__func__, ret_val);
???
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2011-06-16 16:18 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 13:31 [PATCH/RFC 1/5] usb:tools: usb unittests framework Tatyana Brokhman
2011-06-16 13:31 ` [PATCH/RFC 2/5] usb:dummy_hcd: connect/disconnect test support Tatyana Brokhman
2011-06-16 15:06 ` Alan Stern
2011-06-16 16:16 ` Felipe Balbi
2011-06-16 17:06 ` Alan Stern
2011-06-16 17:19 ` Alan Stern
2011-06-16 15:17 ` Alan Stern
2011-06-16 16:18 ` Felipe Balbi [this message]
2011-06-16 13:31 ` [PATCH/RFC 3/5] usb:g_zero: bulk in/out unittest support Tatyana Brokhman
2011-06-16 16:25 ` Felipe Balbi
2011-06-16 13:31 ` [PATCH/RFC 4/5] usb:dummy_hcd: Disable single-request fifo in dummy hcd Tatyana Brokhman
2011-06-16 15:09 ` Alan Stern
2011-06-16 13:31 ` [PATCH/RFC 5/5] usb: Add support for streams alloc/dealloc to devio.c Tatyana Brokhman
2011-06-16 15:20 ` Alan Stern
2011-06-16 16:28 ` Felipe Balbi
2011-06-16 18:21 ` Greg KH
2011-06-17 8:55 ` ablay
2011-06-17 14:35 ` Alan Stern
2011-06-30 17:45 ` Sarah Sharp
2011-06-30 18:39 ` William Gulland
2011-06-30 18:41 ` Tanya Brokhman
2011-07-19 9:12 ` Amit Blay
2011-07-19 9:18 ` Oliver Neukum
2011-07-19 10:07 ` Amit Blay
2011-07-19 10:26 ` Oliver Neukum
2011-07-19 10:36 ` Amit Blay
2011-07-27 6:21 ` Amit Blay
2011-08-17 7:06 ` Hans Petter Selasky
2011-08-18 22:47 ` Sarah Sharp
2011-08-21 10:18 ` Amit Blay
2011-08-22 7:58 ` Hans Petter Selasky
2011-08-22 7:56 ` Hans Petter Selasky
2011-08-22 16:41 ` Sarah Sharp
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=20110616161828.GW12230@legolas.emea.dhcp.ti.com \
--to=balbi@ti.com \
--cc=ablay@codeaurora.org \
--cc=greg@kroah.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tlinder@codeaurora.org \
/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
Powered by JetHome