[U-Boot] [PATCH] usb_storage: do not reset SanDisk Corporation U3 Cruzer Micro USB thumb drive

From: Bryan Wu Bryan.Wu@analog.com
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 bryan.wu@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org --- common/usb_storage.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..236caf6 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,11 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151) + || + /* SanDisk Corporation U3 Cruzer Micro 1/4GB + * Flash Drive 000016244373FFB4 */ + (dev->descriptor.idVendor == 0x0781 && + dev->descriptor.idProduct == 0x5406) ) USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); else

Dear Mike Frysinger,
In message 1230623951-16497-1-git-send-email-vapier@gentoo.org you wrote:
--- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,11 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151)
||
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4 */
(dev->descriptor.idVendor == 0x0781 &&
dev->descriptor.idProduct == 0x5406)
Please fix multiline comment style.
Best regards,
Wolfgang Denk

On Wed, Dec 31, 2008 at 6:52 AM, Wolfgang Denk wd@denx.de wrote:
Dear Mike Frysinger,
In message 1230623951-16497-1-git-send-email-vapier@gentoo.org you wrote:
--- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,11 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151)
||
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4 */
(dev->descriptor.idVendor == 0x0781 &&
dev->descriptor.idProduct == 0x5406)
Please fix multiline comment style.
But if the comment is in one line, it will exceed 80 characters. The coding style of u-boot is the same as kernel?
-Bryan

On Tuesday 30 December 2008 17:52:41 Wolfgang Denk wrote:
In message 1230623951-16497-1-git-send-email-vapier@gentoo.org you wrote:
--- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,11 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151)
||
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4 */
(dev->descriptor.idVendor == 0x0781 &&
dev->descriptor.idProduct == 0x5406)
Please fix multiline comment style.
you'll have to be a little more specific as to what exactly you have issues with. comment looks fine to me. -mike

Dear Mike,
In message 200812310242.57366.vapier@gentoo.org you wrote:
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4 */
(dev->descriptor.idVendor =3D=3D 0x0781 &&
dev->descriptor.idProduct =3D=3D 0x5406)
Please fix multiline comment style.
you'll have to be a little more specific as to what exactly you have issues with. comment looks fine to me.
Maybe you should read the CodingStyle document, too?
It says:
The preferred style for long (multi-line) comments is:
/* * This is the preferred style for multi-line * comments in the Linux kernel source code. * Please use it consistently. * * Description: A column of asterisks on the left side, * with beginning and ending almost-blank lines. */
Now what exactly is unclear about this?
Happy New Year!
Best regards,
Wolfgang Denk

On Wednesday 31 December 2008 14:38:38 Wolfgang Denk wrote:
In message 200812310242.57366.vapier@gentoo.org you wrote:
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4 */
(dev->descriptor.idVendor =3D=3D 0x0781 &&
dev->descriptor.idProduct =3D=3D 0x5406)
Please fix multiline comment style.
you'll have to be a little more specific as to what exactly you have issues with. comment looks fine to me.
Maybe you should read the CodingStyle document, too?
no need to be jerkish about it. the style you quote says "preferred". it is not "required". there are a ton of multiline comments added to the tree which do not strictly fit this format. so rather than me trying to magically read your mind to figure out what you're taking issue with, it's simpler to ask. and for you to respond with something simple like "the trailing */ needs to be on its own line". but of course i'm just guessing here. -mike

From: Bryan Wu Bryan.Wu@analog.com
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 bryan.wu@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org --- v1 - tweak comment style
common/usb_storage.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..baa82e0 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,12 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151) + || + /* SanDisk Corporation U3 Cruzer Micro 1/4GB + * Flash Drive 000016244373FFB4 + */ + (dev->descriptor.idVendor == 0x0781 && + dev->descriptor.idProduct == 0x5406) ) USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); else

Dear Mike Frysinger,
In message 1230796346-17768-1-git-send-email-vapier@gentoo.org you wrote:
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
Please fix the multiline comment style as described in the CodingStyle document (substituting "preferred" by "required").
Best regards,
Wolfgang Denk

On Thursday 01 January 2009 04:01:44 Wolfgang Denk wrote:
In message 1230796346-17768-1-git-send-email-vapier@gentoo.org you wrote:
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
Please fix the multiline comment style as described in the CodingStyle document (substituting "preferred" by "required").
please describe in actual words what is wrong with the comment. it looks fine to me. then we can stop this pointless dance around literally nothing and get back to doing real work. -mike

Hello Mike,
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
To end an endless discussion: If you make it like this, everybody should be happy...
/* * SanDisk Corporation U3 Cruzer Micro 1/4GB * Flash Drive 000016244373FFB4 */
Kind Regards,
Remy

From: Bryan Wu Bryan.Wu@analog.com
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 bryan.wu@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org --- common/usb_storage.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..94124f8 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,13 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151) + || + /* + * SanDisk Corporation U3 Cruzer Micro 1/4GB + * Flash Drive 000016244373FFB4 + */ + (dev->descriptor.idVendor == 0x0781 && + dev->descriptor.idProduct == 0x5406) ) USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); else

On 19:48 Thu 01 Jan , Mike Frysinger wrote:
From: Bryan Wu Bryan.Wu@analog.com
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 bryan.wu@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org
common/usb_storage.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..94124f8 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,13 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151)
||
/*
* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
(dev->descriptor.idVendor == 0x0781 &&
dev->descriptor.idProduct == 0x5406) )
instead of add more and more if else case why not add a fixup function?
Best Regards, J.

On Friday 02 January 2009 06:26:39 Jean-Christophe PLAGNIOL-VILLARD wrote:
On 19:48 Thu 01 Jan , Mike Frysinger wrote:
From: Bryan Wu Bryan.Wu@analog.com
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 bryan.wu@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org
common/usb_storage.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..94124f8 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,13 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151)
||
/*
* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
(dev->descriptor.idVendor == 0x0781 &&
dev->descriptor.idProduct == 0x5406) )
instead of add more and more if else case why not add a fixup function?
feel free to ask/take it up with the usb maintainer. we work with what's there rather than being creative. -mike

Hi,
Mike Frysinger wrote:
On Friday 02 January 2009 06:26:39 Jean-Christophe PLAGNIOL-VILLARD wrote:
On 19:48 Thu 01 Jan , Mike Frysinger wrote:
From: Bryan Wu Bryan.Wu@analog.com
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 bryan.wu@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org
common/usb_storage.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..94124f8 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,13 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151)
||
/*
* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
(dev->descriptor.idVendor == 0x0781 &&
dev->descriptor.idProduct == 0x5406) )
instead of add more and more if else case why not add a fixup function?
feel free to ask/take it up with the usb maintainer. we work with what's there rather than being creative. -mike
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
I sent a clean-up patch for the usb_storage few weeks ago ([U-Boot] [PATCH] USB storage cleanup patch), then I can carry on the fixup function too.
Michael

Hello Michael,
instead of add more and more if else case why not add a fixup function?
feel free to ask/take it up with the usb maintainer. we work with what's there rather than being creative. -mike
I sent a clean-up patch for the usb_storage few weeks ago ([U-Boot] [PATCH] USB storage cleanup patch), then I can carry on the fixup function too.
No problems with that, but make sure it will be a separate patch...
Kind Regards,
Remy
Michael

Hello Mike,
2009/1/2 Mike Frysinger vapier@gentoo.org:
From: Bryan Wu Bryan.Wu@analog.com
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 bryan.wu@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org
common/usb_storage.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
Applied to the u-boot-usb testing branch.
Thanks.
Remy
diff --git a/common/usb_storage.c b/common/usb_storage.c index 94f659f..94124f8 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1166,6 +1166,13 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t /* SanDisk Corporation Cruzer Micro 20044318410546613953 */ (dev->descriptor.idVendor == 0x0781 && dev->descriptor.idProduct == 0x5151)
||
/*
* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
(dev->descriptor.idVendor == 0x0781 &&
dev->descriptor.idProduct == 0x5406) ) USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); else
-- 1.6.0.6
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Dear Mike Frysinger,
In message 200901010410.30775.vapier@gentoo.org you wrote:
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
Please fix the multiline comment style as described in the CodingStyle document (substituting "preferred" by "required").
please describe in actual words what is wrong with the comment. it looks fine to me. then we can stop this pointless dance around literally nothing and get back to doing real work.
I already quoted the relevant part of the Coding Style file. You would do me and yourself a favour if you just read the document and my messages instead of continuing to brawl.
In message 20081231193838.5DDF085AD247@gemini.denx.de I wrote: ...
/* * This is the preferred style for multi-line * comments in the Linux kernel source code. * Please use it consistently. * * Description: A column of asterisks on the left side, * with beginning and ending almost-blank lines. */
This is a pretty clear descriptiuon, and a clear example. If you still don't get it, I cannot help you either. I have no better explanation, and definitely not the time to continue arguing with you on such a level.
Wolfgang Denk

On Thursday 01 January 2009 08:53:05 Wolfgang Denk wrote:
In message 200901010410.30775.vapier@gentoo.org you wrote:
/* SanDisk Corporation U3 Cruzer Micro 1/4GB
* Flash Drive 000016244373FFB4
*/
Please fix the multiline comment style as described in the CodingStyle document (substituting "preferred" by "required").
please describe in actual words what is wrong with the comment. it looks fine to me. then we can stop this pointless dance around literally nothing and get back to doing real work.
I already quoted the relevant part of the Coding Style file. You would do me and yourself a favour if you just read the document and my messages instead of continuing to brawl.
ive read the document before. it's a lot easier for you to simply say what the problem is instead of me trying to guess what you're thinking and me sending a modified patch one only to have you respond with an equally useless message "read XXX document". in other words, you could have resolved this stupid issue with your very first response. -mike
participants (6)
-
Bryan Wu
-
Jean-Christophe PLAGNIOL-VILLARD
-
michael
-
Mike Frysinger
-
Remy Bohmer
-
Wolfgang Denk