In some drivers we use two devices to be able to boot.

So if si_iosize_max is allready set, dont mess with it..

Also just log the problem with maxphys not being set once.

designed by:	phk
tested by:	sos
This commit is contained in:
sos 1999-10-02 20:21:49 +00:00
parent 784f8a8563
commit e0a8247d1d
2 changed files with 3 additions and 1 deletions

View File

@ -178,6 +178,7 @@ minphys(bp)
if(!maxphys) {
printf("WARNING: %s maxphys = 0 ??", devtoname(bp->b_dev));
maxphys = DFLTPHYS;
bp->b_dev->si_iosize_max = DFLTPHYS;
}
if (bp->b_kvasize && (bp->b_kvasize < maxphys))
maxphys = bp->b_kvasize;

View File

@ -116,6 +116,7 @@ diskopen(dev_t dev, int oflags, int devtype, struct proc *p)
return (ENXIO);
if (!dsisopen(dp->d_slice)) {
if (!pdev->si_iosize_max)
pdev->si_iosize_max = dev->si_iosize_max;
error = dp->d_devsw->d_open(pdev, oflags, devtype, p);
}