Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Nov 2009 14:50:01 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r199831 - stable/8/sys/dev/ata
Message-ID:  <200911261450.nAQEo15R084956@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Nov 26 14:50:01 2009
New Revision: 199831
URL: http://svn.freebsd.org/changeset/base/199831

Log:
  MFC r199749:
  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:
  stable/8/sys/dev/ata/ata-disk.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ata/ata-disk.c
==============================================================================
--- stable/8/sys/dev/ata/ata-disk.c	Thu Nov 26 14:01:14 2009	(r199830)
+++ stable/8/sys/dev/ata/ata-disk.c	Thu Nov 26 14:50:01 2009	(r199831)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911261450.nAQEo15R084956>