diff options
Diffstat (limited to 'utils/nwztools')
-rw-r--r-- | utils/nwztools/scsitools/scsitool.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/utils/nwztools/scsitools/scsitool.c b/utils/nwztools/scsitools/scsitool.c index 024a845596..3d4b0c0a13 100644 --- a/utils/nwztools/scsitools/scsitool.c +++ b/utils/nwztools/scsitools/scsitool.c | |||
@@ -757,13 +757,13 @@ int get_dhp(int argc, char **argv) | |||
757 | return 0; | 757 | return 0; |
758 | } | 758 | } |
759 | 759 | ||
760 | int do_fw_upgrade(int argc, char **argv) | 760 | int try_fw_upgrade(unsigned flags, int argc, char **argv) |
761 | { | 761 | { |
762 | (void) argc; | 762 | (void) argc; |
763 | (void )argv; | 763 | (void) argv; |
764 | /* older devices may have used subcommand 3 instead of 4, but this is not | 764 | /* older devices may have used subcommand 3 instead of 4, but this is not |
765 | * supported by any device I have seen */ | 765 | * supported by any device I have seen */ |
766 | uint8_t cdb[12] = {0xfc, 0, 0x04, 'd', 'b', 'm', 'n', 0, 0x80, 0, 0, 0}; | 766 | uint8_t cdb[12] = {0xfc, 0, 0x04, 'd', 'b', 'm', 'n', 0, flags, 0, 0, 0}; |
767 | 767 | ||
768 | char *buffer = malloc(0x81); | 768 | char *buffer = malloc(0x81); |
769 | int buffer_size = 0x80; | 769 | int buffer_size = 0x80; |
@@ -789,6 +789,14 @@ int do_fw_upgrade(int argc, char **argv) | |||
789 | return 0; | 789 | return 0; |
790 | } | 790 | } |
791 | 791 | ||
792 | int do_fw_upgrade(int argc, char **argv) | ||
793 | { | ||
794 | if(!try_fw_upgrade(0x80, argc, argv)) | ||
795 | return 0; | ||
796 | cprintf(GREY, "Trying alternative firmware upgrade command...\n"); | ||
797 | return try_fw_upgrade(0, argc, argv); | ||
798 | } | ||
799 | |||
792 | static struct | 800 | static struct |
793 | { | 801 | { |
794 | unsigned long dest; | 802 | unsigned long dest; |