From 265da99ce9e4e7581c64c704b4dd6a06607d85b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= <sos@FreeBSD.org>
Date: Fri, 13 May 2005 10:25:19 +0000
Subject: [PATCH] Cleanup comments

---
 sys/dev/ata/ata-all.c     |  4 ++--
 sys/dev/ata/ata-chipset.c | 17 +++--------------
 sys/dev/ata/ata-pci.c     |  2 +-
 sys/dev/ata/ata-pci.h     |  2 +-
 sys/dev/ata/ata-raid.c    |  8 ++++----
 5 files changed, 11 insertions(+), 22 deletions(-)

diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index fe824d4b6f5c..57534a66a64a 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -525,13 +525,13 @@ ata_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
 	break;
 
     case ATAATTACH:
-	/* SOS should enable channel HW on controller XXX */
+	/* XXX SOS should enable channel HW on controller */
 	error = ata_attach(device);
 	break;
 
     case ATADETACH:
 	error = ata_detach(device);
-	/* SOS should disable channel HW on controller XXX */
+	/* XXX SOS should disable channel HW on controller */
 	break;
 
     default:
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index de5d3e65d91d..03162fee34f3 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -162,7 +162,6 @@ ata_generic_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -537,7 +536,6 @@ ata_ahci_intr(void *data)
 
     port = ATA_INL(ctlr->r_res2, ATA_AHCI_IS);
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (port & (1 << unit)) {
 	    if ((ch = ctlr->interrupt[unit].argument)) {
@@ -606,7 +604,7 @@ ata_ahci_reset(device_t dev)
 	     cmd & ~(ATA_AHCI_P_CMD_CR | ATA_AHCI_P_CMD_FR |
 		     ATA_AHCI_P_CMD_FRE | ATA_AHCI_P_CMD_ST));
 
-    DELAY(500000);	/* XXX SOS */
+    DELAY(500000);	/* XXX SOS this is not entirely wrong */
 
     /* spin up device */
     ATA_OUTL(ctlr->r_res2, ATA_AHCI_P_CMD + offset, ATA_AHCI_P_CMD_SUD);
@@ -712,7 +710,6 @@ ata_acard_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -1148,7 +1145,7 @@ ata_cypress_setmode(device_t dev, int mode)
 
     mode = ata_limit_mode(dev, mode, ATA_WDMA2);
 
-    /* XXX missing WDMA0+1 + PIO modes */
+    /* XXX SOS missing WDMA0+1 + PIO modes */
     if (mode == ATA_WDMA2) { 
 	error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode);
 	if (bootverbose)
@@ -1249,7 +1246,6 @@ ata_highpoint_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -1470,7 +1466,6 @@ ata_intel_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -1902,7 +1897,6 @@ ata_nvidia_intr(void *data)
     u_int8_t status;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -2400,7 +2394,7 @@ ata_promise_mio_reset(device_t dev)
 		 (ATA_INL(ctlr->r_res2, 0xc0260 + (ch->unit << 7)) &
 		  ~0x00003f9f) | (ch->unit + 1));
 
-	/* softreset HOST module XXX SOS what about other outstandings */
+	/* softreset HOST module */ /* XXX SOS what about other outstandings */
 	mtx_lock(&hpktp->mtx);
 	ATA_OUTL(ctlr->r_res2, 0xc012c,
 		 (ATA_INL(ctlr->r_res2, 0xc012c) & ~0x00000f9f) | (1 << 11));
@@ -2706,7 +2700,6 @@ ata_promise_tx2_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -2733,7 +2726,6 @@ ata_promise_old_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -3186,7 +3178,6 @@ ata_sii_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -3246,7 +3237,6 @@ ata_cmd_intr(void *data)
     u_int8_t reg71;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
@@ -3275,7 +3265,6 @@ ata_cmd_old_intr(void *data)
     struct ata_channel *ch;
     int unit;
 
-    /* implement this as a toggle instead to balance load XXX */
     for (unit = 0; unit < ctlr->channels; unit++) {
 	if (!(ch = ctlr->interrupt[unit].argument))
 	    continue;
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index e19722719dfd..da02e3ac1b9e 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -558,7 +558,7 @@ ata_pcichannel_detach(device_t dev)
     if (ch->dma)
 	ch->dma->free(dev);
 
-    /* free resources for io and ctlio XXX SOS */
+    /* XXX SOS free resources for io and ctlio ?? */
 
     return 0;
 }
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index eb0cc26a3ff9..5cadc29fce8b 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -60,7 +60,7 @@ struct ata_pci_controller {
     struct {
     void                (*function)(void *);
     void                *argument;
-    } interrupt[8];     /* SOS max ch# for now XXX */
+    } interrupt[8];     /* XXX SOS max ch# for now */
 };
 
 /* structure for SATA connection update hotplug/hotswap support */
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index 3560b3469428..e2bbf3d91819 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -1082,7 +1082,7 @@ ata_raid_delete(int array)
 	    rdp->disks[disk].flags = 0;
 	}
     }
-    ata_raid_write_metadata(rdp);       /* wipe the metadata instead? XXX SOS */
+    ata_raid_write_metadata(rdp);       /* XXX SOS wipe metadata instead? */
     ata_raid_arrays[array] = NULL;
     free(rdp, M_AR);
     return 0;
@@ -1117,7 +1117,7 @@ ata_raid_addspare(int array, int spare)
 		if (ars->raid) 
 		    return EBUSY;
     
-		/* validate size etc etc XXX SOS */
+		/* XXX SOS validate size etc etc */
 		ars->raid = rdp;
 		ars->disk_number = disk;
 		rdp->disks[disk].dev = device_get_parent(subdisk);
@@ -1867,7 +1867,7 @@ device_printf(parent, "Intel calc=%08x meta=%08x\n", checksum, meta->checksum);
 	/*
 	 * update our knowledge about the array config based on generation
 	 * we only grap the first volume description (yet) since the
-	 * BIOS'n I have access to puts crap into the following XXX SOS
+	 * BIOS'n I have access to puts crap into the following ones
 	 */
 	if (!meta->generation || meta->generation > raid->generation) {
 	    struct intel_raid_mapping *map = 
@@ -2906,7 +2906,7 @@ ata_raid_via_read_meta(device_t dev, struct ar_softc **raidp)
 	    raidp[array] = NULL;
 	    goto via_out;
 	}
-	raid->magic_0 = meta->disks[0]; /* XXX SOS hackish */
+	raid->magic_0 = meta->disks[0];
 	raid->format = AR_F_VIA_RAID;
 	raid->generation = 0;
 	raid->interleave = 0x08 << (meta->stripe_layout >> VIA_L_SHIFT);