svn commit: r199749 - head/sys/dev/ata
Alexander Motin
mav at FreeBSD.org
Tue Nov 24 14:06:16 UTC 2009
Author: mav
Date: Tue Nov 24 14:06:15 2009
New Revision: 199749
URL: http://svn.freebsd.org/changeset/base/199749
Log:
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.
Modified:
head/sys/dev/ata/ata-disk.c
Modified: head/sys/dev/ata/ata-disk.c
==============================================================================
--- head/sys/dev/ata/ata-disk.c Tue Nov 24 13:44:53 2009 (r199748)
+++ head/sys/dev/ata/ata-disk.c Tue Nov 24 14:06:15 2009 (r199749)
@@ -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;
More information about the svn-src-all
mailing list