diff options
author | sos <sos@FreeBSD.org> | 2002-07-26 19:13:05 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-07-26 19:13:05 +0000 |
commit | df3147486486c5de42edcff7f03a1d0a97575bf2 (patch) | |
tree | c10b1301753f0d1353bdcd4647c106bf9c8eaa3b | |
parent | 170e853ce2f8dc7011ef272ff8513f42b1db2747 (diff) | |
download | FreeBSD-src-df3147486486c5de42edcff7f03a1d0a97575bf2.zip FreeBSD-src-df3147486486c5de42edcff7f03a1d0a97575bf2.tar.gz |
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>
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/atapi-fd.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/atapi-tape.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 1a3634d..d0e8c39 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -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; diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c index 751a875..e0a4c24 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -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; diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index 51a3386..b8b6455 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -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); |