Skip to content

Commit

Permalink
Add SATA SPD detection
Browse files Browse the repository at this point in the history
HW SATA SPD Limit:
SATA SPD:
SATA SPD Limit:
  • Loading branch information
eloaders committed Aug 5, 2014
1 parent c09ee95 commit 33779f3
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 11 deletions.
17 changes: 15 additions & 2 deletions I-Nex/i-nex/.src/Disk_Drives.module
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ Public rotational As String ' rotational
Public rq_affinity As String ' rq_affinity
Public CONNECTED_PORT As String
Public Logical_Size As String

Public hw_sata_spd_limit As String
Public sata_spd As String
Public sata_spd_limit As String
Function _inits()
Dim Avail_HDD As Integer
Logs("Add Drives to ComboBox", Logger.Info)
Expand Down Expand Up @@ -348,20 +350,31 @@ Public Sub disks()
With Stat("/sys/block/" & Dir("/sys/block/", "sd*")[i])
For i2 = 0 To Split(.Link, "/").Count - 1
If Split(.Link, "/")[i2] Like "*" & Finfosys.ComboBox4.Text & "*" Then

If Split(.Link, "/")[4] Like "*ata*" Then
Try hw_sata_spd_limit = Replace(File.Load("/sys/class/ata_link/" & Replace(Split(.Link, "/")[4], "ata", "link") & "/hw_sata_spd_limit"), "\n", "")
Try sata_spd = Replace(File.Load("/sys/class/ata_link/" & Replace(Split(.Link, "/")[4], "ata", "link") & "/sata_spd"), "\n", "")
Try sata_spd_limit = Replace(File.Load("/sys/class/ata_link/" & Replace(Split(.Link, "/")[4], "ata", "link") & "/sata_spd_limit"), "\n", "")
Endif

If Split(.Link, "/")[5] Like "*host*" Then
CONNECTED_PORT = "Port:" & Space$(2) & Replace(Split(.Link, "/")[5], "host", "[S?]ATA")
CONNECTED_PORT = "Port:" & Space$(2) & Replace(Split(.Link, "/")[5], "host", "SATA")
Else If Split(.Link, "/")[4] Like "*usb*" Then
CONNECTED_PORT = "Port:" & Space$(2) & UCase(Split(.Link, "/")[4])
Else
CONNECTED_PORT = Null
Endif

Endif
Next
End With
Next
End

Function SETNULL()
hw_sata_spd_limit = Null
sata_spd = Null
sata_spd_limit = Null
CONNECTED_PORT = Null
device_model = Null
device_vendor = Null
Expand Down
5 changes: 5 additions & 0 deletions I-Nex/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,11 @@ Label134.Text = "Rq affinity: " & Disk_Drives.rq_affinity

Label16.Text = Disk_Drives.CONNECTED_PORT
Label17.Text = Disk_Drives.Logical_Size

Label251.Text = "HW SATA SPD Limit:" & Space$(2) & Disk_Drives.hw_sata_spd_limit
Label252.Text = "SATA SPD:" & Space$(2) & Disk_Drives.sata_spd
Label253.Text = "SATA SPD Limit:" & Space$(2) & Disk_Drives.sata_spd_limit

End

Public Sub ComboBox5_Click()
Expand Down
39 changes: 30 additions & 9 deletions I-Nex/i-nex/.src/Finfosys.form
Original file line number Diff line number Diff line change
Expand Up @@ -1067,31 +1067,31 @@
Border = Border.Raised
}
{ !Label46 Label
Move(308,224,161,21)
Move(308,287,161,21)
#Public = True
#Translate = False
Font = Font["8"]
Padding = 3
Border = Border.Raised
}
{ !Label51 Label
Move(161,350,308,21)
Move(161,371,147,21)
#Public = True
#Translate = False
Font = Font["8"]
Padding = 3
Border = Border.Raised
}
{ !Label54 Label
Move(161,287,308,21)
Move(161,329,308,21)
#Public = True
#Translate = False
Font = Font["8"]
Padding = 3
Border = Border.Raised
}
{ !Label56 Label
Move(161,308,308,21)
Move(161,350,147,21)
#Public = True
#Translate = False
Font = Font["8"]
Expand All @@ -1104,15 +1104,15 @@
Font = Font["Bold"]
}
{ !Label47 Label
Move(161,224,147,21)
Move(161,287,147,21)
#Public = True
#Translate = False
Font = Font["8"]
Padding = 3
Border = Border.Raised
}
{ !Label42 Label
Move(161,245,308,21)
Move(161,308,147,21)
#Public = True
#Translate = False
Font = Font["8"]
Expand All @@ -1136,7 +1136,7 @@
Border = Border.Raised
}
{ !Label50 Label
Move(161,371,308,21)
Move(308,371,161,21)
#Public = True
#Translate = False
Font = Font["8"]
Expand All @@ -1152,15 +1152,15 @@
Border = Border.Raised
}
{ !Label55 Label
Move(161,266,308,21)
Move(308,308,161,21)
#Public = True
#Translate = False
Font = Font["8"]
Padding = 3
Border = Border.Raised
}
{ !Label57 Label
Move(161,329,308,21)
Move(308,350,161,21)
#Public = True
#Translate = False
Font = Font["8"]
Expand Down Expand Up @@ -1420,6 +1420,27 @@
{ Separator2 Separator
Move(0,217,469,7)
}
{ Label251 Label
Move(161,224,231,21)
Font = Font["8"]
Padding = 3
Text = ("Label251")
Border = Border.Raised
}
{ Label252 Label
Move(161,245,231,21)
Font = Font["8"]
Padding = 3
Text = ("Label252")
Border = Border.Raised
}
{ Label253 Label
Move(161,266,231,21)
Font = Font["8"]
Padding = 3
Text = ("Label253")
Border = Border.Raised
}
Index = 5
Text = "System"
Picture = Picture["AppIcons/Finfosys/applications-system.png"]
Expand Down

0 comments on commit 33779f3

Please sign in to comment.