diff options
-rw-r--r-- | sys/dev/ata/atapi-fd.c | 2 |
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; |