diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_flash.c | 2 | ||||
-rw-r--r-- | common/cmd_usb.c | 3 | ||||
-rw-r--r-- | common/usb.c | 19 | ||||
-rw-r--r-- | common/usb_storage.c | 10 |
4 files changed, 16 insertions, 18 deletions
diff --git a/common/cmd_flash.c b/common/cmd_flash.c index a0ccdb6328f..162d1ff6570 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -101,7 +101,7 @@ abbrev_spec (char *str, flash_info_t ** pinfo, int *psf, int *psl) * erase and protect commands. The range of the addresses on which * either of the commands is to operate can be given in two forms: * 1. <cmd> start end - operate on <'start', 'end') - * 2. <cmd> start +length - operate on <'start', start + length) + * 2. <cmd> start +length - operate on <'start', start + length) * If the second form is used and the end address doesn't fall on the * sector boundary, than it will be adjusted to the next sector boundary. * If it isn't in the flash, the function will fail (return -1). diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 3af86194286..0738f553033 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -455,9 +455,8 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) i = usb_init(); #ifdef CONFIG_USB_STORAGE /* try to recognize storage devices immediately */ - if (i >= 0) + if (i >= 0) usb_stor_curr_dev = usb_stor_scan(1); - #endif return 0; } diff --git a/common/usb.c b/common/usb.c index 1738d950614..03eccf8b3dd 100644 --- a/common/usb.c +++ b/common/usb.c @@ -46,8 +46,7 @@ #include <405gp_pci.h> #endif - -#undef USB_DEBUG +#undef USB_DEBUG #ifdef USB_DEBUG #define USB_PRINTF(fmt,args...) printf (fmt ,##args) @@ -342,7 +341,7 @@ int usb_clear_halt(struct usb_device *dev, int pipe) if (result < 0) return result; - /* + /* * NOTE: we do not get status and verify reset was successful * as some devices are reported to lock up upon this check.. */ @@ -517,13 +516,13 @@ int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char /* some devices are flaky */ result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, - (USB_DT_STRING << 8) + index, langid, buf, size, + (USB_DT_STRING << 8) + index, langid, buf, size, USB_CNTL_TIMEOUT); if (result > 0) break; - } - + } + return result; } @@ -572,7 +571,7 @@ static int usb_string_sub(struct usb_device *dev, unsigned int langid, } if (rc < 2) - rc = -1; + rc = -1; return rc; } @@ -721,10 +720,10 @@ int usb_new_device(struct usb_device *dev) } } dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0; - + /* find the port number we're at */ if (parent) { - + for (j = 0; j < parent->maxchild; j++) { if (parent->children[j] == dev) { port = j; @@ -958,7 +957,7 @@ static int hub_port_reset(struct usb_device *dev, int port, return -1; if (portstatus & USB_PORT_STAT_ENABLE) { - + break; } diff --git a/common/usb_storage.c b/common/usb_storage.c index 5397bb2bb49..6cf62e40dd6 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -229,7 +229,7 @@ int usb_stor_scan(int mode) } if(usb_storage_probe(dev,0,&usb_stor[usb_max_devs])) { /* ok, it is a storage devices */ /* get info and fill it in */ - if(usb_stor_get_info(dev, &usb_stor[usb_max_devs], &usb_dev_desc[usb_max_devs])) + if(usb_stor_get_info(dev, &usb_stor[usb_max_devs], &usb_dev_desc[usb_max_devs])) usb_max_devs++; } /* if storage device */ if(usb_max_devs==USB_MAX_STOR_DEV) { @@ -237,7 +237,7 @@ int usb_stor_scan(int mode) break; } } /* for */ - + usb_disable_asynch(0); /* asynch transfer allowed */ printf("%d Storage Device(s) found\n", usb_max_devs); if(usb_max_devs>0) @@ -656,7 +656,7 @@ int usb_stor_BBB_transport(ccb *srb, struct us_data *us) retry = 0; again: USB_STOR_PRINTF("STATUS phase\n"); - result = usb_bulk_msg(us->pusb_dev, pipein, &csw, UMASS_BBB_CSW_SIZE, + result = usb_bulk_msg(us->pusb_dev, pipein, &csw, UMASS_BBB_CSW_SIZE, &actlen, USB_CNTL_TIMEOUT*5); /* special handling of STALL in STATUS phase */ @@ -1134,7 +1134,7 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t dev->descriptor.idProduct == 0x2010) ) USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); - else + else ss->transport_reset(ss); pccb->pdata = usb_stor_buf; @@ -1145,7 +1145,7 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t if(usb_inquiry(pccb,ss)) return -1; - + perq = usb_stor_buf[0]; modi = usb_stor_buf[1]; if((perq & 0x1f) == 0x1f) { |