2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

Add support for non-zero LUN

Systems are now more likely to do non-zero LUN
This commit is contained in:
Jarrod Johnson 2020-02-28 16:03:44 -05:00 committed by Markus Hilger
parent 540fbf2dfd
commit b4bda3e80f
2 changed files with 4 additions and 3 deletions

View File

@ -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};
@ -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";

View File

@ -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 {