Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Nov 2009 14:52:14 +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-7@freebsd.org
Subject:   svn commit: r199832 - stable/7/sys/dev/ata
Message-ID:  <200911261452.nAQEqEKX085046@svn.freebsd.org>

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

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/7/sys/dev/ata/ata-disk.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/ata/ata-disk.c
==============================================================================
--- stable/7/sys/dev/ata/ata-disk.c	Thu Nov 26 14:50:01 2009	(r199831)
+++ stable/7/sys/dev/ata/ata-disk.c	Thu Nov 26 14:52:14 2009	(r199832)
@@ -417,7 +417,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?200911261452.nAQEqEKX085046>