Skip to content

Commit

Permalink
Merge pull request #7426 from Obihoernchen/nonzerolun
Browse files Browse the repository at this point in the history
Add support for non-zero LUN
  • Loading branch information
Obihoernchen authored Feb 28, 2024
2 parents 5065285 + b4bda3e commit a545bed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit a545bed

Please sign in to comment.