From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 09 Mar 2016 13:55:18 +0100 Subject: [U-Boot] [PATCH] usb: Add new command to regress USB devices In-Reply-To: <56E01543.50908@redhat.com> References: <1457522546-12840-1-git-send-email-rajat.srivastava@nxp.com> <56E008F0.4070704@denx.de> <56E01543.50908@redhat.com> Message-ID: <56E01D36.8090601@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/09/2016 01:21 PM, Hans de Goede wrote: > Hi, > > On 09-03-16 12:28, Marek Vasut wrote: >> On 03/09/2016 12:22 PM, Rajat Srivastava wrote: >>> This patch adds a new 'usb regress' command, that can be used to >>> regress test a USB device. It performs the following operations: >>> >>> 1. starts the USB device >>> 2. performs read/write operations >>> 3. stops the USB device >>> 4. verifies the contents of read/write operations >>> >>> Sample Output: >>> => usb regress 81000000 82000000 32m >>> regressing USB.. >>> starting USB... >>> USB0: Register 200017f NbrPorts 2 >>> Starting the controller >>> USB XHCI 1.00 >>> scanning bus 0 for devices... 2 USB Device(s) found >>> scanning usb for storage devices... 1 Storage Device(s) found >>> USB write: device 0 block # 0, count 65536 ... 65536 blocks write: OK >>> USB read: device 0 block # 0, count 65536 ... 65536 blocks read: OK >>> stopping USB.. >>> verifying data on addresses 0x81000000 and 0x82000000 >>> Total of 65536 word(s) were the same >>> >>> Signed-off-by: Rajat Srivastava >>> Signed-off-by: Rajesh Bhagat >> >> >> Does it do anything which cannot be achieved on the command line itself >> using "usb reset" "usb write" "usb read" "cmp" commands ? > > This seems to be about a reading / writing a usb-disk / usb-storage device. That's what usb read / usb write commands are for, reading raw data from USB disk :-) > I believe this can certainly be achieved with the existing disk io > commands, > and moreover this seems quite dangerous (overwriting the partition table on > the device), so I think requiring the user to do this explicitly indeed > seems better. Yeah > Regards, > > Hans -- Best regards, Marek Vasut