Always update the PnP checksum, even if the ident string is not being set.
This commit is contained in:
parent
b4e559d7e2
commit
028bc034e4
@ -88,10 +88,12 @@ sub pcipnpheaders ($$) {
|
|||||||
= pack('v', oct($pci_device_id)) if ($pci_device_id);
|
= pack('v', oct($pci_device_id)) if ($pci_device_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($pnp_hdr_offset > 0 and defined($identoffset)) {
|
if ($pnp_hdr_offset > 0) {
|
||||||
# Point to device id string at end of ROM image
|
if (defined($identoffset)) {
|
||||||
substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2)
|
# Point to device id string at end of ROM image
|
||||||
= pack('v', $identoffset);
|
substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2)
|
||||||
|
= pack('v', $identoffset);
|
||||||
|
}
|
||||||
substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = "\x00";
|
substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = "\x00";
|
||||||
my $sum = unpack('%8C*', substr($$romref, $pnp_hdr_offset,
|
my $sum = unpack('%8C*', substr($$romref, $pnp_hdr_offset,
|
||||||
PNP_HDR_SIZE));
|
PNP_HDR_SIZE));
|
||||||
|
Reference in New Issue
Block a user