Fix the max transfer size for ATAPI devices. The spec says to
transfer at most 65534 bytes, thats 126 times DEV_BSIZE not 252 :( Pointed out by: Ian Dowse <iedowse@maths.tcd.ie>
This commit is contained in:
parent
8948a4fd3d
commit
aafa7ea069
@ -282,7 +282,7 @@ acd_make_dev(struct acd_softc *cdp)
|
||||
make_dev_alias(dev, "acd%da", cdp->lun);
|
||||
make_dev_alias(dev, "acd%dc", cdp->lun);
|
||||
dev->si_drv1 = cdp;
|
||||
dev->si_iosize_max = 252 * DEV_BSIZE;
|
||||
dev->si_iosize_max = 126 * DEV_BSIZE;
|
||||
dev->si_bsize_phys = 2048; /* XXX SOS */
|
||||
cdp->dev = dev;
|
||||
cdp->device->flags |= ATA_D_MEDIA_CHANGED;
|
||||
|
@ -112,7 +112,7 @@ afdattach(struct ata_device *atadev)
|
||||
!strncmp(atadev->param->model, "IOMEGA Clik!", 12))
|
||||
fdp->dev->si_iosize_max = 64 * DEV_BSIZE;
|
||||
else
|
||||
fdp->dev->si_iosize_max = 252 * DEV_BSIZE;
|
||||
fdp->dev->si_iosize_max = 126 * DEV_BSIZE;
|
||||
|
||||
afd_describe(fdp);
|
||||
atadev->flags |= ATA_D_MEDIA_CHANGED;
|
||||
|
@ -132,12 +132,12 @@ astattach(struct ata_device *atadev)
|
||||
dev = make_dev(&ast_cdevsw, dkmakeminor(stp->lun, 0, 0),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "ast%d", stp->lun);
|
||||
dev->si_drv1 = stp;
|
||||
dev->si_iosize_max = 252 * DEV_BSIZE;
|
||||
dev->si_iosize_max = 126 * DEV_BSIZE;
|
||||
stp->dev1 = dev;
|
||||
dev = make_dev(&ast_cdevsw, dkmakeminor(stp->lun, 0, 1),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "nast%d", stp->lun);
|
||||
dev->si_drv1 = stp;
|
||||
dev->si_iosize_max = 252 * DEV_BSIZE;
|
||||
dev->si_iosize_max = 126 * DEV_BSIZE;
|
||||
stp->dev2 = dev;
|
||||
stp->device->flags |= ATA_D_MEDIA_CHANGED;
|
||||
ast_describe(stp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user