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: <20110616161828.GW12230@legolas.emea.dhcp.ti.com>
Date:	Thu, 16 Jun 2011 19:18:30 +0300
From:	Felipe Balbi <balbi@...com>
To:	Tatyana Brokhman <tlinder@...eaurora.org>
Cc:	greg@...ah.com, linux-usb@...r.kernel.org,
	linux-arm-msm@...r.kernel.org, balbi@...com, ablay@...eaurora.org,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH/RFC 2/5] usb:dummy_hcd: connect/disconnect test support

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

Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ