PERFORCE change 163988 for review
Alexander Motin
mav at FreeBSD.org
Wed Jun 10 13:35:39 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=163988
Change 163988 by mav at 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)
More information about the p4-projects
mailing list