24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
26 Jun, 2013
1 commit
-
With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
which is required to represent block numbers for storage devices that
exceed 2TiB (the block size usually is 512B), e.g. recent hard drives.For some obscure reason, the current U-Boot code uses lbaint_t for the
number of blocks to read (a rather optimistic estimation of how RAM
sizes will evolve), but not for the starting address. Trying to access
blocks beyond the 2TiB boundary will simply wrap around and read a
block within the 0..2TiB range.We now use lbaint_t for block start addresses, too. This required
changes to all block drivers as the signature of block_read(),
block_write() and block_erase() in block_dev_desc_t changed.Signed-off-by: Sascha Silbe
06 May, 2013
2 commits
-
Some cleanup in usb framework, nothing much on feature side.
Signed-off-by: Vikas C Sajjan
Signed-off-by: Vivek Gautam -
USB_PRINTF, USB_HUB_PRINTF, USB_STOR_PRINTF, USB_KBD_PRINTF
are nothing but conditional debug prints, depending on DEBUG.
So better remove them and use debug() simply.Signed-off-by: Vivek Gautam
02 May, 2013
1 commit
-
log2 of the device block size serves as the shift value used to calculate
the block number to read in file systems when implementing avaiable block
sizes.
It is needed quite often in file systems thus it is pre-calculated and
stored in the block device descriptor.Signed-off-by: Egbert Eich
17 Dec, 2012
1 commit
-
When a USB card reader is empty, it will return "Not Ready - medium not
present" as Key Code Qualifier. In that situation, it's useless waiting
for the full timeout since the result won't change until the user
inserts a card.Signed-off-by: Vincent Palatin
Signed-off-by: Vadim Bendebury
Signed-off-by: Simon Glass
05 Nov, 2012
1 commit
-
command.c:44:38: error: bad constant expression
dlmalloc.c:1468:2: warning: Using plain integer as NULL pointer
dlmalloc.c:1468:5: warning: Using plain integer as NULL pointer
dlmalloc.c:2176:12: warning: Using plain integer as NULL pointer
dlmalloc.c:2179:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2382:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2436:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2582:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2585:17: warning: Using plain integer as NULL pointer
dlmalloc.c:2646:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2659:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2692:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2707:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2708:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2786:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2801:12: warning: Using plain integer as NULL pointer
dlmalloc.c:2801:22: warning: Using plain integer as NULL pointer
dlmalloc.c:2926:27: warning: Using plain integer as NULL pointer
dlmalloc.c:2928:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2929:12: warning: Using plain integer as NULL pointer
dlmalloc.c:3075:14: warning: Using plain integer as NULL pointer
hush.c:292:14: warning: symbol 'last_return_code' was not declared. Should it be static?
hush.c:293:5: warning: symbol 'nesting_level' was not declared. Should it be static?
hush.c:2175:20: warning: Using plain integer as NULL pointer
hush.c:2175:34: warning: Using plain integer as NULL pointer
hush.c:2210:41: warning: Using plain integer as NULL pointer
hush.c:2216:45: warning: Using plain integer as NULL pointer
hush.c:2249:25: warning: Using plain integer as NULL pointer
hush.c:2332:13: warning: symbol 'new_pipe' was not declared. Should it be static?
hush.c:2390:5: warning: symbol 'reserved_word' was not declared. Should it be static?
hush.c:2927:5: warning: symbol 'parse_stream' was not declared. Should it be static?
hush.c:3127:6: warning: symbol 'mapset' was not declared. Should it be static?
hush.c:3133:6: warning: symbol 'update_ifs_map' was not declared. Should it be static?
hush.c:3161:5: warning: symbol 'parse_stream_outer' was not declared. Should it be static?
hush.c:3295:34: warning: Using plain integer as NULL pointer
hush.c:3631:5: warning: symbol 'do_showvar' was not declared. Should it be static
image.c:1282:29: warning: Using plain integer as NULL pointer
image.c:1315:41: warning: Using plain integer as NULL pointer
image.c:1330:25: warning: Using plain integer as NULL pointer
image.c:1706:25: warning: Using plain integer as NULL pointer
main.c:510:10: warning: symbol 'hist_num' was not declared. Should it be static?
main.c:512:5: warning: symbol 'hist_list' was not declared. Should it be static?
main.c:513:6: warning: symbol 'hist_lines' was not declared. Should it be static?
usb_storage.c:195:6: warning: symbol 'usb_show_progress' was not declared. Should it be static?
usb_storage.c:440:48: warning: Using plain integer as NULL pointer
usb_storage.c:503:5: warning: symbol 'usb_stor_BBB_comdat' was not declared. Should it be static?
usb_storage.c:551:5: warning: symbol 'usb_stor_CB_comdat' was not declared. Should it be static?
usb_storage.c:629:55: warning: Using plain integer as NULL pointer
usb_storage.c:620:5: warning: symbol 'usb_stor_CBI_get_status' was not declared. Should it be static?
usb_storage.c:675:43: warning: Using plain integer as NULL pointer
usb_storage.c:668:5: warning: symbol 'usb_stor_BBB_clear_endpt_stall' was not declared. Should it be static?
usb_storage.c:679:5: warning: symbol 'usb_stor_BBB_transport' was not declared. Should it be static?
usb_storage.c:801:5: warning: symbol 'usb_stor_CB_transport' was not declared. Sh
xyzModem.c:104:1: warning: symbol 'CYGACC_COMM_IF_GETC_TIMEOUT' was not declared. Should it be static?
xyzModem.c:122:1: warning: symbol 'CYGACC_COMM_IF_PUTC' was not declared. Should it be static?
xyzModem.c:169:1: warning: symbol 'parse_num' was not declared. Should it be statnote: hush.c's nesting_level deleted because not used.
Signed-off-by: Kim Phillips
22 Oct, 2012
1 commit
-
usb_storage wouldn't compile when the CONFIG_SYS_64BIT_LBA option is
turned on because the used fixed size data types in their exported
functions when they should have used lbaint_t for the block count
parameter. That meant that when the sizes happened to be the same, when
using a 28 bit LBA, the driver would build, but when it wasn't, a 48 bit
LBA, things broke.This change adjusts the signatures to use the right type and makes small
adjustments in the affected functions.Signed-off-by: Gabe Black
Signed-off-by: Simon Glass
Reviewed-by: Marek Vasut
16 Oct, 2012
1 commit
-
Allows to initialize more than one USB controller at once.
v2: print message when controller stop fails
Signed-off-by: Lucas Stach
Reviewed-by: Marek Vasut
01 Sep, 2012
4 commits
-
Trim down the IO times by removing uneeded
test unit reeady calls.Signed-off-by: Jim Shimer
-
There is a 5-ms delay in usb_stor_BBB_transport, which occurs every 10 kiB of
data for fragmented fatload usb, i.e. roughly 500 ms of delay per MiB. This adds
up to quite a bit of delay if you're loading a large ramdisk.The purpose of this delay should be to debounce the 5-V/100-mA USB power up.
This patch skips the delay if the device has already been queried as ready.Signed-off-by: Jim Shimer
Rework following the review:
- Rebase against the latest u-boot-usb master.
- Replace typedef with #define.
- Use the existing flags struct field instead of adding a new field.
- Remove the setter function.
- Remove the typecasts.
Signed-off-by: Benoît ThébaudeauCc: Marek Vasut
Cc: Ilya Yanok
Cc: Stefan Herbrechtsmeier
Cc: Jim Shimer -
Now that the EHCI driver allocates its qTDs from the heap, the MSC driver is
only limited by the SCSI commands it uses.Signed-off-by: Benoît Thébaudeau
Cc: Marek Vasut
Cc: Ilya Yanok
Cc: Stefan Herbrechtsmeier -
The commit 5dd95cf made the MSC driver EHCI-specific. This patch restores a
basic support of non-EHCI HCDs, like before that commit.The fallback transfer size is certainly not optimal, but at least it should work
like before.Signed-off-by: Benoît Thébaudeau
Cc: Marek Vasut
Cc: Ilya Yanok
Cc: Stefan Herbrechtsmeier
18 Jul, 2012
1 commit
-
The commit 5dd95cf93dfffa1d19a1928990852aac9f55b9d9 'usb_storage:
Fix EHCI "out of buffer pointers" with CD-ROM' introduce a bug in
usb_storage as it wrongly assumes that every transfer can use
4096 bytes per qt_buffer. This is wrong if the start address of
the data is not page aligned to 4096 bytes and leads to 'EHCI
timed out on TD' messages because of 'out of buffer pointers'
in ehci_td_buffer function.The bug appears during load of a fragmented file and
read from or write to an unaligned memory address.Cc: Marek Vasut
Signed-off-by: Stefan Herbrechtsmeier
20 May, 2012
1 commit
-
This avoids cache-alignment warnings shown in console
when a usb command is entered.Whenever X bytes of unaligned buffer is invalidated, arm core
invalidates X + Y bytes as per the cache line size and throws
these warnings.Signed-off-by: Puneet Saxena
Signed-off-by: Marek Vasut
19 Mar, 2012
1 commit
-
Common code has a mdelay() func, so use that instead of the usb-specific
wait_ms() func. This also fixes the build errors:ohci-hcd.c: In function 'submit_common_msg':
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1519:9: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1816:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1827:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1844:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1563:11: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1583:9: sorry, unimplemented: called from here
make[1]: *** [ohci-hcd.o] Error 1Signed-off-by: Mike Frysinger
Acked-by: Marek Vasut
06 Jan, 2012
1 commit
-
When performing large bulk reads from a CD or DVD using the U-Boot
usb_storage driver, it generates requests of up to 20 blocks at a time.With a standard 512-byte block size, that is 10240 bytes and within the
limit of U-Boot's EHCI driver (maximum 5 pages at 4k per page).Unfortunately CD-ROM media has a 2048-byte blocksize, resulting in a
maximum transfer size of 40960 bytes, which does not fit.Since the EHCI specification is impossibly obtuse and far beyond my
comprehension, I chose to dynamically compute the limit based on the
blocksize.Signed-off-by: Kyle Moffett
28 Oct, 2011
2 commits
-
usb_storage.c: In function ‘us_one_transfer’:
usb_storage.c:377:7: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:389:6: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:394:6: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_BBB_reset’:
usb_storage.c:442:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:448:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:454:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_CB_reset’:
usb_storage.c:482:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_CB_comdat’:
usb_storage.c:572:3: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:584:4: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_BBB_transport’:
usb_storage.c:782:3: warning: format ‘%d’ expects argument of type ‘int’, but
argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c: In function ‘usb_stor_CB_transport’:
usb_storage.c:807:2: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:830:3: warning: format ‘%X’ expects argument of type ‘unsigned
int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
usb_storage.c:857:3: warning: format ‘%d’ expects argument of type ‘int’, but
argument 2 has type ‘long unsigned int’ [-Wformat]Signed-off-by: Marek Vasut
Cc: Wolfgang Denk
Cc: Simon Glass
Cc: Mike Frysinger
Cc: Remy Bohmer -
usb_storage.c: In function ‘usb_stor_CB_reset’:
usb_storage.c:466:6: warning: variable ‘result’ set but not used
[-Wunused-but-set-variable]Signed-off-by: Marek Vasut
Cc: Wolfgang Denk
Cc: Simon Glass
Cc: Mike Frysinger
05 Oct, 2011
1 commit
-
This reverts commit 60ce53cf9f408d9ad721f8e7a87d6a564e6d5bac.
The commit causes build breakage for a number of boards. This results
from the fact that now the arguments of debug() actually get
referenced (even if there is hope that the compiler will optimize
away the debug() call). The obvious fix to that probem (change the
code to always declare the referenced variables and data structures)
increases the code size, and was this rejected. So it was decided to
revert this commit until a better solution is found.
02 Oct, 2011
1 commit
-
Fix the following gcc4.6 problems:
cmd_date.c: In function ‘do_date’:
cmd_date.c:50:6: warning: variable ‘old_bus’ set but not used
[-Wunused-but-set-variable]
asix.c: In function ‘asix_init’:
asix.c:317:6: warning: variable ‘rx_ctl’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_parse_config’:
usb.c:331:17: warning: variable ‘ch’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_hub_port_connect_change’:
usb.c:1123:29: warning: variable ‘portchange’ set but not used
[-Wunused-but-set-variable]
usb.c: In function ‘usb_hub_configure’:
usb.c:1183:25: warning: variable ‘hubsts’ set but not used
[-Wunused-but-set-variable]
usb_storage.c: In function ‘usb_stor_CB_reset’:
usb_storage.c:466:6: warning: variable ‘result’ set but not used
[-Wunused-but-set-variable]Signed-off-by: Marek Vasut
26 Jul, 2011
1 commit
-
If we don't want to build support for any partition types we can now
add #undef CONFIG_PARTITIONS in a board config file to keep this from
being compiled in. Otherwise boards assume this is compiled in by
defaultSigned-off-by: Matthew McClintock
13 Apr, 2011
1 commit
-
Signed-off-by: Loïc Minier
02 Apr, 2011
1 commit
-
The reset request in usb_stor_get_info is causing issues with some usb
sticks. Some of these sticks vendor_id/product_id have been hardcoded to
not reset but better is to remove the reset altogether. It is not needed.Signed-off-by: Erik Hansen
23 Oct, 2010
1 commit
-
Signed-off-by: Mike Frysinger
13 Oct, 2010
1 commit
-
This patch changes `usb_stor_scan' to scan all the LUNs of each mass
storage device. It also fixes the various commands to correctly set
the LUN field.Notably, it allows each LUN of GuruPlug's microSD card reader to be
accessed.Signed-off-by: Ludovic Courtès
Acked-by: Prafulla Wadaskar
25 Jul, 2010
2 commits
-
The dots printed by common/usb_storage.c as progress meter corrupt the
output for example of "fatls usb" commands like this:=> fatls usb 0
. <<
Cc: Remy Bohmer -
The device type was left uninitialized which caused later tests
against DEV_TYPE_UNKNOWN to fail. In the result, "usb part" would
attempt to print information about non-existent devices like this:=> usb part
print_part of 0Partition Map for USB device 0 -- Partition Type: DOS
Partition Start Sector Num Sectors Type
1 0 2031616 f8print_part of 1
## Unknown partition tableprint_part of 2
## Unknown partition tableprint_part of 3
## Unknown partition tableprint_part of 4
## Unknown partition table
=>By initializing the type as DEV_TYPE_UNKNOWN we avoid all the
"Unknown partition table" messages.[Note: the "print_part of ?" messages is left over debug code that
will be removed in another patch.]Signed-off-by: Wolfgang Denk
Cc: Remy Bohmer
09 Apr, 2010
2 commits
-
While debugging one ill behaving USB device I found two bugs in USB
storage probe.usb_stor_get_info() returns -1 (error), 0 (skip) or 1 (ok). First part
of this patch fixes error case.Second part fixes usb_inquiry()'s retry counter handling. Original code
had retry = -1 on error case, not retry = 0 as checked in the next line.Signed-off-by: Kim B. Heino
-
Here's another USB storage patch. Currently U-Boot handles storage
devices #0 - #4 as valid devices, even if there is none connected. This
patch fixes usb_stor_get_dev() to check detected device count instead
of MAX-define.This is very important for ill behaving devices. usb_dev_desc[] can be
partially initialized if device probe fails.After fixing get_dev() it was easy to fix "usb part" etc commands.
Previously it outputed "Unknown partition table" five times, now it's
"no USB devices available".Signed-off-by: Kim B. Heino
20 Dec, 2009
2 commits
-
This patch implements write support to usb device with raw partition.
It will be useful for filesystem write support to usb device from
u-boot in future.Tested with writing kernel image to raw usb disk & booting with usb
read command into ram.[Note: run usb part to get info about start sector & number of
sectors on a partition for usb write operation.]Signed-off-by: Mahavir Jain
-
The header files usb.h and usbdescriptors.h have the same nameed
structure definitions forusb_config_descriptor
usb_interface_descriptor
usb_endpoint_descriptor
usb_device_descriptor
usb_string_descriptorThese are out right duplicates in usb.h
usb_device_descriptor
usb_string_descriptorThis one has extra unused elements
usb_endpoint_descriptor
unsigned char bRefresh
unsigned char bSynchAddress;These in usb.h have extra elements at the end of the usb 2.0
specified descriptor and are used.usb_config_descriptor
usb_interface_descriptorThe change is to consolidate the definition of the descriptors
to usbdescriptors.h. The dublicates in usb.h are removed.
The extra element structure will have their name shorted by
removing the '_descriptor' suffix.So
usb_config_descriptor -> usb_config
usb_interface_descriptor -> usb_interfaceFor these, the common descriptor elements are accessed now
by an element 'desc'.As an example
- if (iface->bInterfaceClass != USB_CLASS_HUB)
+ if (iface->desc.bInterfaceClass != USB_CLASS_HUB)This has been compile tested on MAKEALL arm, ppc and mips.
Signed-off-by: Tom Rix
16 May, 2009
1 commit
-
Signed-off-by: Detlev Zundel
16 Feb, 2009
1 commit
-
The LUN number is not part of the Command Descriptor Block (CDB) for scsi inquiry, request sense, test unit ready, read capacity and read10 commands. This patch removes the LUN number information from the CDB.
Signed-off-by: Thomas Abraham
Signed-off-by: Remy Bohmer
29 Jan, 2009
3 commits
-
Rather than forcing people to define a custom "LITTLEENDIAN", just use the
__LITTLE_ENDIAN one from the Linux byteorder headers that every arch is
already setting up.Signed-off-by: Mike Frysinger
Signed-off-by: Remy Bohmer -
The SanDisk Corporation U3 Cruzer Micro 1/4GB Flash Drive 000016244373FFB4
does not like to be reset, so check for it.Signed-off-by: Bryan Wu
Signed-off-by: Mike Frysinger
Signed-off-by: Remy Bohmer -
Cleanup usb storage
Signed-off-by: Michael Trimarchi
Signed-off-by: Remy Bohmer
13 Aug, 2008
1 commit
-
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
14 Jul, 2008
1 commit
-
Signed-off-by: Wolfgang Denk
22 May, 2008
1 commit
-
Signed-off-by: Christian Eggers
Signed-off-by: Markus Klotzbuecher