The head and sector numbers passed to the SCSI BIOS command handler are now correctly masked for the appropriate number of bits.
This commit is contained in:
@@ -320,7 +320,7 @@ typedef struct
|
||||
} BIOSCMD;
|
||||
#pragma pack(pop)
|
||||
|
||||
extern uint8_t HACommand03Handler(uint8_t last_id, uint8_t max_heads, BIOSCMD *BiosCmd);
|
||||
extern uint8_t HACommand03Handler(uint8_t last_id, BIOSCMD *BiosCmd);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1180,6 +1180,8 @@ aha_0x01:
|
||||
temp = BiosCmd->id;
|
||||
BiosCmd->id = BiosCmd->lun;
|
||||
BiosCmd->lun = temp;
|
||||
BiosCmd->head &= 0xf;
|
||||
BiosCmd->sector &= 0x1f;
|
||||
pclog("C: %04X, H: %02X, S: %02X\n", BiosCmd->cylinder, BiosCmd->head, BiosCmd->sector);
|
||||
dev->DataBuf[0] = HACommand03Handler(7, (dev->type == AHA_1640) ? 64 : 32, BiosCmd);
|
||||
pclog("BIOS Completion/Status Code %x\n", dev->DataBuf[0]);
|
||||
|
||||
@@ -1421,7 +1421,7 @@ static void BuslogicIDCheck(uint8_t id, uint8_t lun)
|
||||
}
|
||||
|
||||
/* This returns the completion code. */
|
||||
uint8_t HACommand03Handler(uint8_t last_id, uint8_t max_heads, BIOSCMD *BiosCmd)
|
||||
uint8_t HACommand03Handler(uint8_t last_id, BIOSCMD *BiosCmd)
|
||||
{
|
||||
uint32_t dma_address;
|
||||
int lba = (BiosCmd->cylinder << 9) + (BiosCmd->head << 5) + BiosCmd->sector;
|
||||
@@ -1430,11 +1430,6 @@ uint8_t HACommand03Handler(uint8_t last_id, uint8_t max_heads, BIOSCMD *BiosCmd)
|
||||
uint8_t ret = 0;
|
||||
uint8_t cdb[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
if (max_heads == 64)
|
||||
{
|
||||
lba = (BiosCmd->cylinder << 11) + (BiosCmd->head << 5) + BiosCmd->sector;
|
||||
}
|
||||
|
||||
SpecificLog("BIOS Command = 0x%02X\n", BiosCmd->command);
|
||||
|
||||
if ((BiosCmd->id > last_id) || (BiosCmd->lun > 7)) {
|
||||
@@ -1978,16 +1973,18 @@ BuslogicWrite(uint16_t Port, uint8_t Val, void *p)
|
||||
temp = BiosCmd->id;
|
||||
BiosCmd->id = BiosCmd->lun;
|
||||
BiosCmd->lun = temp;
|
||||
}
|
||||
}
|
||||
BiosCmd->head &= 0xf;
|
||||
BiosCmd->sector &= 0x1f;
|
||||
SpecificLog("C: %04X, H: %02X, S: %02X\n", BiosCmd->cylinder, BiosCmd->head, BiosCmd->sector);
|
||||
bl->DataBuf[0] = HACommand03Handler(15, (bl->chip == CHIP_BUSLOGIC_MCA) ? 64 : 32, BiosCmd);
|
||||
bl->DataBuf[0] = HACommand03Handler(15, BiosCmd);
|
||||
SpecificLog("BIOS Completion/Status Code %x\n", bl->DataBuf[0]);
|
||||
bl->DataReplyLeft = 1;
|
||||
break;
|
||||
|
||||
case 0x04:
|
||||
pclog("Inquire Board\n");
|
||||
bl->DataBuf[0] = 0x41;
|
||||
bl->DataBuf[0] = (bl->chip == CHIP_BUSLOGIC_MCA) ? 0x42 : 0x41;
|
||||
bl->DataBuf[1] = 0x41;
|
||||
bl->DataBuf[2] = (bl->chip == CHIP_BUSLOGIC_PCI) ? '5' : '2';
|
||||
bl->DataBuf[3] = (bl->chip == CHIP_BUSLOGIC_PCI) ? '0' : '2';
|
||||
|
||||
Reference in New Issue
Block a user