Skip to content
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

Add support for non-zero LUN #7426

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xCAT-server/lib/perl/xCAT/IPMI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ sub subcmd {
$seqincrement--; #assure seq number doesn't go beyond 7 even if it means going taboo, one enhancement would be to pick the *least* taboo instead of just giving up
}
my $rsaddr = 0x20; #figrue 13-4, rssa by old code
my @rnl = ($rsaddr, $args{netfn} << 2);
my @rnl = ($rsaddr, ($args{netfn} << 2) | $args{lun});
my @rest = ($self->{rqaddr}, $self->{seqlun}, $args{command}, @{ $args{data} });
my @payload = (@rnl, $self->checksum(@rnl), @rest, $self->checksum(@rest));
$self->{ipmicallback} = $args{callback};
Expand Down Expand Up @@ -1017,7 +1017,7 @@ sub parse_ipmi_payload {

#for now, just trash the headers, this has been validated to death anyway
#except seqlun, that one is important
unless ($payload[4] == $self->{seqlun} and $payload[1] >> 2 == $self->{expectednetfn} and $payload[5] == $self->{expectedcmd}) {
unless (($payload[4] & 0xfc) == $self->{seqlun} and $payload[1] >> 2 == $self->{expectednetfn} and $payload[5] == $self->{expectedcmd}) {

#both sequence number and arqaddr must match, because we are using rqaddr to extend the sequence number
#print "Successfully didn't get confused by stale response ".$payload[4]." and ".($self->{seqlun}-4)."\n";
Expand Down
3 changes: 2 additions & 1 deletion xCAT-server/lib/xcat/plugins/ipmi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6928,7 +6928,8 @@ sub readsensor {
return;
}
my $sensor = $sessdata->{currsdr}->sensor_number;
$sessdata->{ipmisession}->subcmd(netfn => 0x4, command => 0x2d, data => [$sensor], callback => \&sensor_was_read, callback_args => $sessdata);
my $lun = $sessdata->{currsdr}->sensor_owner_lun;
$sessdata->{ipmisession}->subcmd(netfn => 0x4, command => 0x2d, lun => $lun, data => [$sensor], callback => \&sensor_was_read, callback_args => $sessdata);
}

sub sensor_was_read {
Expand Down