summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-fd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2002-07-22 18:37:33 +0000
committersos <sos@FreeBSD.org>2002-07-22 18:37:33 +0000
commite3199ef943ec1f57e6d215120917c54a713c37e1 (patch)
treec2541bf19d2a42c59e6cb93688cb8700d6c9f8d9 /sys/dev/ata/atapi-fd.c
parent9a6aed10867f57b18710016e7bd6a37214c5300e (diff)
downloadFreeBSD-src-e3199ef943ec1f57e6d215120917c54a713c37e1.zip
FreeBSD-src-e3199ef943ec1f57e6d215120917c54a713c37e1.tar.gz
Fix the transfer size calculation.
Diffstat (limited to 'sys/dev/ata/atapi-fd.c')
-rw-r--r--sys/dev/ata/atapi-fd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index 875a4c6..751a875 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -328,7 +328,7 @@ afd_start(struct ata_device *atadev)
}
lba = bp->bio_pblkno;
- count = bp->bio_bcount / fdp->cap.sector_size;
+ count = min(bp->bio_bcount, fdp->dev->si_iosize_max) / fdp->cap.sector_size;
data_ptr = bp->bio_data;
bp->bio_resid = bp->bio_bcount;
OpenPOWER on IntegriCloud