slab: upgrade kmalloc to allow DMA regions
these DMA regions are only meant to comply with certain AHCI requirements, and are not yet general purpose
This commit is contained in:
parent
20d19ed994
commit
8544efe1ab
7 changed files with 89 additions and 36 deletions
|
|
@ -143,7 +143,7 @@ bool ahci_access_sectors(struct sata_device *dev, paddr_t lba, uint16_t count, p
|
|||
memset(cmdtbl, 0, sizeof(struct hba_cmd_tbl) + (cmdheader->prdt_len - 1) * sizeof(struct hba_prdt_entry));
|
||||
|
||||
int i;
|
||||
for (i = 0; i < cmdheader->prdt_len - 1; i++) {
|
||||
for (i = 0; i < cmdheader->prdt_len; i++) {
|
||||
cmdtbl->prdt_entry[i].data_base = buf;
|
||||
cmdtbl->prdt_entry[i].byte_count = 8 * 1024 - 1;
|
||||
cmdtbl->prdt_entry[i].interrupt = 1;
|
||||
|
|
@ -151,10 +151,6 @@ bool ahci_access_sectors(struct sata_device *dev, paddr_t lba, uint16_t count, p
|
|||
count -= 16;
|
||||
}
|
||||
|
||||
cmdtbl->prdt_entry[i].data_base = buf;
|
||||
cmdtbl->prdt_entry[i].byte_count = (count << 9) - 1;
|
||||
cmdtbl->prdt_entry[i].interrupt = 1;
|
||||
|
||||
struct fis_reg_h2d *cmdfis = (struct fis_reg_h2d *)(&cmdtbl->cfis);
|
||||
cmdfis->fis_type = FIS_REG_H2D;
|
||||
cmdfis->cmd_mode = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue