diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-05-12 21:23:13 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-05-12 21:23:13 -0700 |
commit | ae197a98b905a7da7872eef29dcbb0f822fa81de (patch) | |
tree | 8749bdaf86105d27506361cb673212e1ae2bc946 /core/fs/fs.c | |
parent | c6bebc44627afe5a652d4e305527ca12e90ff768 (diff) | |
download | syslinux-ae197a98b905a7da7872eef29dcbb0f822fa81de.tar.gz |
diskio: make maxtransfer per-device, cap to 127, imported from headsyslinux-4.00-pre43
Make the maxtransfer per device, as it should be; properly imported
from the head loader (in case it is patched with -s). Also enforce
capping to 127 for EBIOS and 63 for CBIOS. This is structured so that
once EDD4 is approved we can remove the capping for that particular
subcase.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/fs/fs.c')
-rw-r--r-- | core/fs/fs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fs/fs.c b/core/fs/fs.c index 6ea74bf8..792da02f 100644 --- a/core/fs/fs.c +++ b/core/fs/fs.c @@ -363,6 +363,7 @@ void fs_init(com32sys_t *regs) sector_t disk_offset = regs->ecx.l | ((sector_t)regs->ebx.l << 32); uint16_t disk_heads = regs->esi.w[0]; uint16_t disk_sectors = regs->edi.w[0]; + uint32_t maxtransfer = regs->ebp.l; int blk_shift = -1; struct device *dev = NULL; /* ops is a ptr list for several fs_ops */ @@ -387,7 +388,7 @@ void fs_init(com32sys_t *regs) } else { if (!dev) dev = device_init(disk_devno, disk_cdrom, disk_offset, - disk_heads, disk_sectors); + disk_heads, disk_sectors, maxtransfer); fs.fs_dev = dev; } /* invoke the fs-specific init code */ |