-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fixed sfputil error #3579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fixed sfputil error #3579
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
66 changes: 33 additions & 33 deletions
66
device/delta/x86_64-delta_ag9032v2a-r0/Delta-ag9032v2a/port_config.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,34 @@ | ||
| # name lanes alias index speed | ||
| Ethernet0 1,2,3,4 hundredGigE1/1 1 100000 | ||
| Ethernet4 5,6,7,8 hundredGigE1/2 2 100000 | ||
| Ethernet8 9,10,11,12 hundredGigE1/3 3 100000 | ||
| Ethernet12 13,14,15,16 hundredGigE1/4 4 100000 | ||
| Ethernet16 17,18,19,20 hundredGigE1/5 5 100000 | ||
| Ethernet20 21,22,23,24 hundredGigE1/6 6 100000 | ||
| Ethernet24 25,26,27,28 hundredGigE1/7 7 100000 | ||
| Ethernet28 29,30,31,32 hundredGigE1/8 8 100000 | ||
| Ethernet32 33,34,35,36 hundredGigE1/9 9 100000 | ||
| Ethernet36 37,38,39,40 hundredGigE1/10 10 100000 | ||
| Ethernet40 41,42,43,44 hundredGigE1/11 11 100000 | ||
| Ethernet44 45,46,47,48 hundredGigE1/12 12 100000 | ||
| Ethernet48 49,50,51,52 hundredGigE1/13 13 100000 | ||
| Ethernet52 53,54,55,56 hundredGigE1/14 14 100000 | ||
| Ethernet56 57,58,59,60 hundredGigE1/15 15 100000 | ||
| Ethernet60 61,62,63,64 hundredGigE1/16 16 100000 | ||
| Ethernet64 65,66,67,68 hundredGigE1/17 17 100000 | ||
| Ethernet68 69,70,71,72 hundredGigE1/18 18 100000 | ||
| Ethernet72 73,74,75,76 hundredGigE1/19 19 100000 | ||
| Ethernet76 77,78,79,80 hundredGigE1/20 20 100000 | ||
| Ethernet80 81,82,83,84 hundredGigE1/21 21 100000 | ||
| Ethernet84 85,86,87,88 hundredGigE1/22 22 100000 | ||
| Ethernet88 89,90,91,92 hundredGigE1/23 23 100000 | ||
| Ethernet92 93,94,95,96 hundredGigE1/24 24 100000 | ||
| Ethernet96 97,98,99,100 hundredGigE1/25 25 100000 | ||
| Ethernet100 101,102,103,104 hundredGigE1/26 26 100000 | ||
| Ethernet104 105,106,107,108 hundredGigE1/27 27 100000 | ||
| Ethernet108 109,110,111,112 hundredGigE1/28 28 100000 | ||
| Ethernet112 113,114,115,116 hundredGigE1/29 29 100000 | ||
| Ethernet116 117,118,119,120 hundredGigE1/30 30 100000 | ||
| Ethernet120 121,122,123,124 hundredGigE1/31 31 100000 | ||
| Ethernet124 125,126,127,128 hundredGigE1/32 32 100000 | ||
| Ethernet128 129 tenGigE1/33 33 10000 | ||
| Ethernet0 1,2,3,4 hundredGigE1/1 0 100000 | ||
| Ethernet4 5,6,7,8 hundredGigE1/2 1 100000 | ||
| Ethernet8 9,10,11,12 hundredGigE1/3 2 100000 | ||
| Ethernet12 13,14,15,16 hundredGigE1/4 3 100000 | ||
| Ethernet16 17,18,19,20 hundredGigE1/5 4 100000 | ||
| Ethernet20 21,22,23,24 hundredGigE1/6 5 100000 | ||
| Ethernet24 25,26,27,28 hundredGigE1/7 6 100000 | ||
| Ethernet28 29,30,31,32 hundredGigE1/8 7 100000 | ||
| Ethernet32 33,34,35,36 hundredGigE1/9 8 100000 | ||
| Ethernet36 37,38,39,40 hundredGigE1/10 9 100000 | ||
| Ethernet40 41,42,43,44 hundredGigE1/11 10 100000 | ||
| Ethernet44 45,46,47,48 hundredGigE1/12 11 100000 | ||
| Ethernet48 49,50,51,52 hundredGigE1/13 12 100000 | ||
| Ethernet52 53,54,55,56 hundredGigE1/14 13 100000 | ||
| Ethernet56 57,58,59,60 hundredGigE1/15 14 100000 | ||
| Ethernet60 61,62,63,64 hundredGigE1/16 15 100000 | ||
| Ethernet64 65,66,67,68 hundredGigE1/17 16 100000 | ||
| Ethernet68 69,70,71,72 hundredGigE1/18 17 100000 | ||
| Ethernet72 73,74,75,76 hundredGigE1/19 18 100000 | ||
| Ethernet76 77,78,79,80 hundredGigE1/20 19 100000 | ||
| Ethernet80 81,82,83,84 hundredGigE1/21 20 100000 | ||
| Ethernet84 85,86,87,88 hundredGigE1/22 21 100000 | ||
| Ethernet88 89,90,91,92 hundredGigE1/23 22 100000 | ||
| Ethernet92 93,94,95,96 hundredGigE1/24 23 100000 | ||
| Ethernet96 97,98,99,100 hundredGigE1/25 24 100000 | ||
| Ethernet100 101,102,103,104 hundredGigE1/26 25 100000 | ||
| Ethernet104 105,106,107,108 hundredGigE1/27 26 100000 | ||
| Ethernet108 109,110,111,112 hundredGigE1/28 27 100000 | ||
| Ethernet112 113,114,115,116 hundredGigE1/29 28 100000 | ||
| Ethernet116 117,118,119,120 hundredGigE1/30 29 100000 | ||
| Ethernet120 121,122,123,124 hundredGigE1/31 30 100000 | ||
| Ethernet124 125,126,127,128 hundredGigE1/32 31 100000 | ||
| Ethernet128 129 tenGigE1/33 32 10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about reading from _1 to _4 but shift the data position first and | with return value for each reading, something like below?
data = (data<<8)|((u32)(ret&0xff))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute is show all present result like 0xFFFF from port1 to port 32.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of moving ret value with different shifting value, shifting the data 8bit to the left each time before or-ing the ret value will give same shifting for each ret value. then only 8bit shifter not three different shifter (8bit, 16bit, and 24bit).
'''
data=0;
ret = i2c_smbus_read_byte_data(pdata1[swpld1].client, QSFP_PRESENCE_1);
data <<8;
data |= (u32)ret&0xff;
ret = i2c_smbus_read_byte_data(pdata1[swpld1].client, QSFP_PRESENCE_2);
data <<8;
data |= (u32)ret&0xff;
ret = i2c_smbus_read_byte_data(pdata1[swpld1].client, QSFP_PRESENCE_3);
data <<8;
data |= (u32)ret&0xff;
ret = i2c_smbus_read_byte_data(pdata1[swpld1].client, QSFP_PRESENCE_4);
data <<8;
data |= (u32)ret&0xff;
'''
you can make it more simpler with macro definition too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this is recommendation not blocking