Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Mar 2010 19:16:34 +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: r204528 - in stable/8: . contrib/top lib/libusb sbin/atacontrol sbin/camcontrol sys/cam sys/dev/ata tools/regression/lib/msun tools/regression/usr.bin/pkill tools/tools/ath/common tools...
Message-ID:  <201003011916.o21JGYkb092322@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Mar  1 19:16:34 2010
New Revision: 204528
URL: http://svn.freebsd.org/changeset/base/204528

Log:
  MFC r204195:
  Improve output for controllers that doesn't report SATA speed.

Modified:
  stable/8/sbin/atacontrol/atacontrol.c
  stable/8/sbin/camcontrol/camcontrol.c
  stable/8/sys/cam/cam_xpt.c
  stable/8/sys/dev/ata/ata-all.c
  stable/8/sys/dev/ata/ata-pci.c
  stable/8/sys/dev/ata/ata-sata.c
Directory Properties:
  stable/8/   (props changed)
  stable/8/Makefile.inc1   (props changed)
  stable/8/ObsoleteFiles.inc   (props changed)
  stable/8/UPDATING   (props changed)
  stable/8/bin/   (props changed)
  stable/8/bin/chmod/   (props changed)
  stable/8/bin/cp/   (props changed)
  stable/8/bin/csh/   (props changed)
  stable/8/bin/getfacl/   (props changed)
  stable/8/bin/ls/   (props changed)
  stable/8/bin/mv/   (props changed)
  stable/8/bin/pax/   (props changed)
  stable/8/bin/pkill/   (props changed)
  stable/8/bin/ps/   (props changed)
  stable/8/bin/setfacl/   (props changed)
  stable/8/bin/sh/   (props changed)
  stable/8/cddl/compat/opensolaris/   (props changed)
  stable/8/cddl/contrib/opensolaris/   (props changed)
  stable/8/cddl/contrib/opensolaris/cmd/zdb/   (props changed)
  stable/8/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
  stable/8/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  stable/8/cddl/lib/libnvpair/   (props changed)
  stable/8/contrib/bind9/   (props changed)
  stable/8/contrib/bsnmp/   (props changed)
  stable/8/contrib/bzip2/   (props changed)
  stable/8/contrib/cpio/   (props changed)
  stable/8/contrib/csup/   (props changed)
  stable/8/contrib/ee/   (props changed)
  stable/8/contrib/expat/   (props changed)
  stable/8/contrib/file/   (props changed)
  stable/8/contrib/gcc/   (props changed)
  stable/8/contrib/gdb/   (props changed)
  stable/8/contrib/gdtoa/   (props changed)
  stable/8/contrib/groff/   (props changed)
  stable/8/contrib/less/   (props changed)
  stable/8/contrib/libpcap/   (props changed)
  stable/8/contrib/ncurses/   (props changed)
  stable/8/contrib/netcat/   (props changed)
  stable/8/contrib/ntp/   (props changed)
  stable/8/contrib/one-true-awk/   (props changed)
  stable/8/contrib/openbsm/   (props changed)
  stable/8/contrib/openpam/   (props changed)
  stable/8/contrib/pf/   (props changed)
  stable/8/contrib/sendmail/   (props changed)
  stable/8/contrib/tcpdump/   (props changed)
  stable/8/contrib/tcsh/   (props changed)
  stable/8/contrib/top/   (props changed)
  stable/8/contrib/top/install-sh   (props changed)
  stable/8/contrib/traceroute/   (props changed)
  stable/8/contrib/wpa/   (props changed)
  stable/8/crypto/heimdal/   (props changed)
  stable/8/crypto/openssh/   (props changed)
  stable/8/crypto/openssl/   (props changed)
  stable/8/etc/   (props changed)
  stable/8/games/factor/   (props changed)
  stable/8/games/fortune/   (props changed)
  stable/8/games/fortune/datfiles/   (props changed)
  stable/8/gnu/usr.bin/groff/   (props changed)
  stable/8/gnu/usr.bin/patch/   (props changed)
  stable/8/include/   (props changed)
  stable/8/kerberos5/lib/libgssapi_krb5/   (props changed)
  stable/8/kerberos5/lib/libgssapi_spnego/   (props changed)
  stable/8/kerberos5/usr.bin/kdestroy/   (props changed)
  stable/8/kerberos5/usr.bin/kpasswd/   (props changed)
  stable/8/lib/bind/   (props changed)
  stable/8/lib/csu/   (props changed)
  stable/8/lib/libarchive/   (props changed)
  stable/8/lib/libbluetooth/   (props changed)
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/lib/libc_r/   (props changed)
  stable/8/lib/libdevinfo/   (props changed)
  stable/8/lib/libdisk/   (props changed)
  stable/8/lib/libelf/   (props changed)
  stable/8/lib/libexpat/   (props changed)
  stable/8/lib/libfetch/   (props changed)
  stable/8/lib/libgpib/   (props changed)
  stable/8/lib/libgssapi/   (props changed)
  stable/8/lib/libjail/   (props changed)
  stable/8/lib/libkse/   (props changed)
  stable/8/lib/libkvm/   (props changed)
  stable/8/lib/libpmc/   (props changed)
  stable/8/lib/libradius/   (props changed)
  stable/8/lib/librpcsec_gss/   (props changed)
  stable/8/lib/libstand/   (props changed)
  stable/8/lib/libtacplus/   (props changed)
  stable/8/lib/libthr/   (props changed)
  stable/8/lib/libufs/   (props changed)
  stable/8/lib/libusb/   (props changed)
  stable/8/lib/libusb/usb.h   (props changed)
  stable/8/lib/libutil/   (props changed)
  stable/8/lib/msun/   (props changed)
  stable/8/libexec/rtld-elf/   (props changed)
  stable/8/release/   (props changed)
  stable/8/sbin/   (props changed)
  stable/8/sbin/atacontrol/   (props changed)
  stable/8/sbin/bsdlabel/   (props changed)
  stable/8/sbin/camcontrol/   (props changed)
  stable/8/sbin/ddb/   (props changed)
  stable/8/sbin/devfs/   (props changed)
  stable/8/sbin/dhclient/   (props changed)
  stable/8/sbin/dumpfs/   (props changed)
  stable/8/sbin/fsck/   (props changed)
  stable/8/sbin/fsck_ffs/   (props changed)
  stable/8/sbin/geom/   (props changed)
  stable/8/sbin/geom/class/stripe/   (props changed)
  stable/8/sbin/ggate/   (props changed)
  stable/8/sbin/growfs/   (props changed)
  stable/8/sbin/ifconfig/   (props changed)
  stable/8/sbin/ipfw/   (props changed)
  stable/8/sbin/mdconfig/   (props changed)
  stable/8/sbin/mksnap_ffs/   (props changed)
  stable/8/sbin/mount/   (props changed)
  stable/8/sbin/mount_cd9660/   (props changed)
  stable/8/sbin/mount_msdosfs/   (props changed)
  stable/8/sbin/mount_nfs/   (props changed)
  stable/8/sbin/natd/   (props changed)
  stable/8/sbin/newfs/   (props changed)
  stable/8/sbin/restore/   (props changed)
  stable/8/sbin/routed/   (props changed)
  stable/8/sbin/sysctl/   (props changed)
  stable/8/sbin/tunefs/   (props changed)
  stable/8/sbin/umount/   (props changed)
  stable/8/secure/usr.bin/bdes/   (props changed)
  stable/8/share/examples/   (props changed)
  stable/8/share/man/man3/   (props changed)
  stable/8/share/man/man4/   (props changed)
  stable/8/share/man/man5/   (props changed)
  stable/8/share/man/man7/   (props changed)
  stable/8/share/man/man8/   (props changed)
  stable/8/share/man/man9/   (props changed)
  stable/8/share/misc/   (props changed)
  stable/8/share/mk/   (props changed)
  stable/8/share/timedef/   (props changed)
  stable/8/share/zoneinfo/   (props changed)
  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)
  stable/8/sys/netinet/   (props changed)
  stable/8/tools/   (props changed)
  stable/8/tools/kerneldoc/subsys/   (props changed)
  stable/8/tools/regression/acltools/   (props changed)
  stable/8/tools/regression/bin/sh/   (props changed)
  stable/8/tools/regression/fifo/   (props changed)
  stable/8/tools/regression/geom/   (props changed)
  stable/8/tools/regression/lib/libc/   (props changed)
  stable/8/tools/regression/lib/msun/test-conj.t   (props changed)
  stable/8/tools/regression/poll/   (props changed)
  stable/8/tools/regression/priv/   (props changed)
  stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t   (props changed)
  stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t   (props changed)
  stable/8/tools/regression/usr.bin/pkill/pkill-_g.t   (props changed)
  stable/8/tools/tools/ath/   (props changed)
  stable/8/tools/tools/ath/common/dumpregs.h   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5210.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5211.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5212.c   (props changed)
  stable/8/tools/tools/ath/common/dumpregs_5416.c   (props changed)
  stable/8/tools/tools/termcap/termcap.pl   (props changed)
  stable/8/tools/tools/vimage/   (props changed)
  stable/8/usr.bin/awk/   (props changed)
  stable/8/usr.bin/calendar/   (props changed)
  stable/8/usr.bin/catman/   (props changed)
  stable/8/usr.bin/comm/   (props changed)
  stable/8/usr.bin/csup/   (props changed)
  stable/8/usr.bin/fetch/   (props changed)
  stable/8/usr.bin/find/   (props changed)
  stable/8/usr.bin/finger/   (props changed)
  stable/8/usr.bin/fstat/   (props changed)
  stable/8/usr.bin/gcore/   (props changed)
  stable/8/usr.bin/gzip/   (props changed)
  stable/8/usr.bin/kdump/   (props changed)
  stable/8/usr.bin/locale/   (props changed)
  stable/8/usr.bin/look/   (props changed)
  stable/8/usr.bin/makewhatis/   (props changed)
  stable/8/usr.bin/netstat/   (props changed)
  stable/8/usr.bin/perror/   (props changed)
  stable/8/usr.bin/procstat/   (props changed)
  stable/8/usr.bin/systat/   (props changed)
  stable/8/usr.bin/tftp/   (props changed)
  stable/8/usr.bin/truss/   (props changed)
  stable/8/usr.bin/unifdef/   (props changed)
  stable/8/usr.bin/uniq/   (props changed)
  stable/8/usr.bin/vmstat/   (props changed)
  stable/8/usr.bin/w/   (props changed)
  stable/8/usr.bin/whois/   (props changed)
  stable/8/usr.sbin/   (props changed)
  stable/8/usr.sbin/Makefile   (props changed)
  stable/8/usr.sbin/acpi/   (props changed)
  stable/8/usr.sbin/arp/   (props changed)
  stable/8/usr.sbin/bsnmpd/   (props changed)
  stable/8/usr.sbin/burncd/   (props changed)
  stable/8/usr.sbin/cdcontrol/   (props changed)
  stable/8/usr.sbin/cpucontrol/   (props changed)
  stable/8/usr.sbin/crashinfo/   (props changed)
  stable/8/usr.sbin/cron/   (props changed)
  stable/8/usr.sbin/diskinfo/   (props changed)
  stable/8/usr.sbin/dumpcis/cardinfo.h   (props changed)
  stable/8/usr.sbin/dumpcis/cis.h   (props changed)
  stable/8/usr.sbin/faithd/   (props changed)
  stable/8/usr.sbin/freebsd-update/   (props changed)
  stable/8/usr.sbin/inetd/   (props changed)
  stable/8/usr.sbin/iostat/   (props changed)
  stable/8/usr.sbin/jail/   (props changed)
  stable/8/usr.sbin/jls/   (props changed)
  stable/8/usr.sbin/lpr/   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  stable/8/usr.sbin/makefs/getid.c   (props changed)
  stable/8/usr.sbin/mergemaster/   (props changed)
  stable/8/usr.sbin/mfiutil/mfiutil.8   (props changed)
  stable/8/usr.sbin/mptutil/   (props changed)
  stable/8/usr.sbin/ndp/   (props changed)
  stable/8/usr.sbin/newsyslog/   (props changed)
  stable/8/usr.sbin/ntp/   (props changed)
  stable/8/usr.sbin/pmcstat/   (props changed)
  stable/8/usr.sbin/powerd/   (props changed)
  stable/8/usr.sbin/ppp/   (props changed)
  stable/8/usr.sbin/pstat/   (props changed)
  stable/8/usr.sbin/rpc.umntall/   (props changed)
  stable/8/usr.sbin/rtsold/   (props changed)
  stable/8/usr.sbin/service/   (props changed)
  stable/8/usr.sbin/sysinstall/   (props changed)
  stable/8/usr.sbin/syslogd/   (props changed)
  stable/8/usr.sbin/traceroute/   (props changed)
  stable/8/usr.sbin/traceroute6/   (props changed)
  stable/8/usr.sbin/usbconfig/   (props changed)
  stable/8/usr.sbin/wpa/   (props changed)
  stable/8/usr.sbin/ypserv/   (props changed)
  stable/8/usr.sbin/zic/   (props changed)

Modified: stable/8/sbin/atacontrol/atacontrol.c
==============================================================================
--- stable/8/sbin/atacontrol/atacontrol.c	Mon Mar  1 19:12:40 2010	(r204527)
+++ stable/8/sbin/atacontrol/atacontrol.c	Mon Mar  1 19:16:34 2010	(r204528)
@@ -72,6 +72,7 @@ satarev2str(int mode)
 	case 1: return "SATA 1.5Gb/s";
 	case 2: return "SATA 3Gb/s";
 	case 3: return "SATA 6Gb/s";
+	case 0xff: return "SATA";
 	default: return "???";
 	}
 }

Modified: stable/8/sbin/camcontrol/camcontrol.c
==============================================================================
--- stable/8/sbin/camcontrol/camcontrol.c	Mon Mar  1 19:12:40 2010	(r204527)
+++ stable/8/sbin/camcontrol/camcontrol.c	Mon Mar  1 19:16:34 2010	(r204528)
@@ -1022,6 +1022,8 @@ camxferrate(struct cam_device *device)
 		printf(" (");
 		if (sata->valid & CTS_SATA_VALID_REVISION)
 			printf("SATA %d.x, ", sata->revision);
+		else
+			printf("SATA, ");
 		if (sata->valid & CTS_SATA_VALID_MODE)
 			printf("%s, ", ata_mode2string(sata->mode));
 		if ((sata->valid & CTS_SATA_VALID_ATAPI) && sata->atapi != 0)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Mon Mar  1 19:12:40 2010	(r204527)
+++ stable/8/sys/cam/cam_xpt.c	Mon Mar  1 19:16:34 2010	(r204528)
@@ -1214,6 +1214,8 @@ xpt_announce_periph(struct cam_periph *p
 		printf(" (");
 		if (sata->valid & CTS_SATA_VALID_REVISION)
 			printf("SATA %d.x, ", sata->revision);
+		else
+			printf("SATA, ");
 		if (sata->valid & CTS_SATA_VALID_MODE)
 			printf("%s, ", ata_mode2string(sata->mode));
 		if ((sata->valid & CTS_ATA_VALID_ATAPI) && sata->atapi != 0)

Modified: stable/8/sys/dev/ata/ata-all.c
==============================================================================
--- stable/8/sys/dev/ata/ata-all.c	Mon Mar  1 19:12:40 2010	(r204527)
+++ stable/8/sys/dev/ata/ata-all.c	Mon Mar  1 19:16:34 2010	(r204528)
@@ -1160,6 +1160,7 @@ ata_satarev2str(int rev)
 	case 1: return "SATA 1.5Gb/s";
 	case 2: return "SATA 3Gb/s";
 	case 3: return "SATA 6Gb/s";
+	case 0xff: return "SATA";
 	default: return "???";
 	}
 }
@@ -1536,6 +1537,7 @@ ataaction(struct cam_sim *sim, union ccb
 		if (ch->flags & ATA_SATA) {
 			cts->transport = XPORT_SATA;
 			cts->transport_version = XPORT_VERSION_UNSPECIFIED;
+			cts->xport_specific.sata.valid = 0;
 			cts->xport_specific.sata.mode = d->mode;
 			cts->xport_specific.sata.valid |= CTS_SATA_VALID_MODE;
 			cts->xport_specific.sata.bytecount = d->bytecount;
@@ -1543,14 +1545,20 @@ ataaction(struct cam_sim *sim, union ccb
 			if (cts->type == CTS_TYPE_CURRENT_SETTINGS) {
 				cts->xport_specific.sata.revision =
 				    ATA_GETREV(dev, ccb->ccb_h.target_id);
-			} else
+				if (cts->xport_specific.sata.revision != 0xff) {
+					cts->xport_specific.sata.valid |=
+					    CTS_SATA_VALID_REVISION;
+				}
+			} else {
 				cts->xport_specific.sata.revision = d->revision;
-			cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION;
+				cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION;
+			}
 			cts->xport_specific.sata.atapi = d->atapi;
 			cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI;
 		} else {
 			cts->transport = XPORT_ATA;
 			cts->transport_version = XPORT_VERSION_UNSPECIFIED;
+			cts->xport_specific.ata.valid = 0;
 			cts->xport_specific.ata.mode = d->mode;
 			cts->xport_specific.ata.valid |= CTS_ATA_VALID_MODE;
 			cts->xport_specific.ata.bytecount = d->bytecount;

Modified: stable/8/sys/dev/ata/ata-pci.c
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.c	Mon Mar  1 19:12:40 2010	(r204527)
+++ stable/8/sys/dev/ata/ata-pci.c	Mon Mar  1 19:16:34 2010	(r204528)
@@ -714,10 +714,14 @@ static int
 ata_pcichannel_getrev(device_t dev, int target)
 {
 	struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
+	struct ata_channel *ch = device_get_softc(dev);
 
-	if (ctlr->getrev)
-		return (ctlr->getrev(dev, target));
-	else
+	if (ch->flags & ATA_SATA) {
+		if (ctlr->getrev)
+			return (ctlr->getrev(dev, target));
+		else 
+			return (0xff);
+	} else
 		return (0);
 }
 

Modified: stable/8/sys/dev/ata/ata-sata.c
==============================================================================
--- stable/8/sys/dev/ata/ata-sata.c	Mon Mar  1 19:12:40 2010	(r204527)
+++ stable/8/sys/dev/ata/ata-sata.c	Mon Mar  1 19:16:34 2010	(r204528)
@@ -223,7 +223,7 @@ ata_sata_getrev(device_t dev, int target
 
 	if (ch->r_io[ATA_SSTATUS].res)
 		return ((ATA_IDX_INL(ch, ATA_SSTATUS) & 0x0f0) >> 4);
-	return (0);
+	return (0xff);
 }
 
 int



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