Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2009 13:35:37 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 163988 for review
Message-ID:  <200906101335.n5ADZbxP065687@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163988

Change 163988 by mav@mav_mavbook on 2009/06/10 13:35:18

	Disable NCQ when device supports less then 32 tags. It allows to avoid
	tag collision on controller level when PM isused.
	
	Limit maximum transaction size if device does not have 48bit command
	support.

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#8 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#8 (text+ko) ====

@@ -599,7 +599,8 @@
 		softc->flags |= DA_FLAG_CAN_48BIT;
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE)
 		softc->flags |= DA_FLAG_CAN_FLUSHCACHE;
-	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ)
+	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
+	    cgd->ident_data.queue >= 31)
 		softc->flags |= DA_FLAG_CAN_NCQ;
 //	if ((cgd->inq_data.flags & SID_CmdQue) != 0)
 //		softc->flags |= DA_FLAG_TAGGED_QUEUING;
@@ -641,7 +642,10 @@
 //	softc->disk->d_dump = dadump;
 	softc->disk->d_name = "ada";
 	softc->disk->d_drv1 = periph;
-	softc->disk->d_maxsize = 256*1024;
+	if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48)
+		softc->disk->d_maxsize = MAXPHYS; /* ahci driver limit */
+	else
+		softc->disk->d_maxsize = 255 * 512; /* 28bit ATA command limit */
 	softc->disk->d_unit = periph->unit_number;
 	softc->disk->d_flags = 0;
 	if (softc->flags & DA_FLAG_CAN_FLUSHCACHE)



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