summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-11-24 14:06:15 +0000
committermav <mav@FreeBSD.org>2009-11-24 14:06:15 +0000
commit25badd29156952d79d33f97049cb04f8e587a591 (patch)
tree810b59c5b262e88a9f321edc93c9a88dd6d42e88
parent9179f1aca03f6b5d6ed983b6c81852ea6934d1df (diff)
downloadFreeBSD-src-25badd29156952d79d33f97049cb04f8e587a591.zip
FreeBSD-src-25badd29156952d79d33f97049cb04f8e587a591.tar.gz
Use only lower byte of sectors_intr IDENTIFY word as sector count.
This fixes SET_MULTI error during boot on devices supporting less then 16 sectors per interrupt.
-rw-r--r--sys/dev/ata/ata-disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 22be354..03b1065 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -397,7 +397,7 @@ ad_init(device_t dev)
/* use multiple sectors/interrupt if device supports it */
if (ad_version(atadev->param.version_major)) {
- int secsperint = max(1, min(atadev->param.sectors_intr, 16));
+ int secsperint = max(1, min(atadev->param.sectors_intr & 0xff, 16));
if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint))
atadev->max_iosize = secsperint * DEV_BSIZE;
OpenPOWER on IntegriCloud