Skip to content

Conversation

@xyan264
Copy link
Collaborator

@xyan264 xyan264 commented Nov 10, 2020

Due to a limitation in Switchtec firmware, fw-download command can only support chunk size <1024 bytes.

512 has been found to be the maximum chunk size that currently works with fw-download command.

@xyan264 xyan264 requested a review from kelvin-cao November 10, 2020 18:54
nvme.c Outdated
buf = fw_buf;
if (cfg.xfer == 0 || cfg.xfer % 4096)
cfg.xfer = 4096;
if (cfg.xfer == 0 || cfg.xfer % 512 || cfg.xfer > 512)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean for whatever cfg.xfer's value, we'll assign it to 512?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's what it does. I wanted to change it to cfg.xfer=512 but decided to keep it in case we support other size later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with cfg.xfer=512.

This is due to a limitation in Switchtec that only <1024 byte chunk size is supported. 512 is the largest number that works for this command.
Copy link
Collaborator

@kelvin-cao kelvin-cao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks.

@xyan264 xyan264 merged commit b4da9d0 into Microsemi:devel Nov 12, 2020
@xyan264 xyan264 deleted the fw-download-fix branch November 12, 2020 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants