From 50a3ecb6f9233d9dc38952e2f801bfaa6526652c Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 25 Jun 2009 20:55:07 -0700 Subject: [PATCH] AHCI - Reduce console spew --- sys/dev/disk/ahci/TODO | 17 +++++++++++++++++ sys/dev/disk/ahci/ahci.c | 19 ++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/sys/dev/disk/ahci/TODO b/sys/dev/disk/ahci/TODO index c799a86a33..aeac37cc4e 100644 --- a/sys/dev/disk/ahci/TODO +++ b/sys/dev/disk/ahci/TODO @@ -1,4 +1,9 @@ +10 second timeout in CAM + + +----- + DELAY's might tsleep, so interrupts might run. fix poll loop to detect completion via other interrupts. @@ -18,6 +23,16 @@ NOTE RACE: A transient IFS interrupt (fatal phy/protocol error) can occur when soft-resetting through a port multiplier, between the first and second FISes. We need to be able to lock access to the port. +------ serial number ----------- + +OpenBSD /etc/devtab + +name type serialnumber + naa + wwn + serno + etc + ------ Misc probe info -------- port @@ -27,6 +42,8 @@ FISes. We need to be able to lock access to the port. ahci0: AHCI 1.2 capabilities 0xe3229f05 , 6 ports, 32 tags/port, gen 1 (1.5Gbps) and 2 (3Gbps) +0xf722ff83 4 ports, 32 + Chipsets supporting FBSS (FIS-Based Switching): SB800 diff --git a/sys/dev/disk/ahci/ahci.c b/sys/dev/disk/ahci/ahci.c index 248ce683f6..b2137432f5 100644 --- a/sys/dev/disk/ahci/ahci.c +++ b/sys/dev/disk/ahci/ahci.c @@ -1581,7 +1581,8 @@ ahci_unload_prdt(struct ahci_ccb *ccb) if (ccb->ccb_xa.flags & ATA_F_NCQ) { xa->resid = 0; } else { - if (ccb->ccb_cmd_hdr->prdbc == 0) { + if (ccb->ccb_cmd_hdr->prdbc == 0 && + ccb->ccb_xa.state == ATA_S_COMPLETE) { kprintf("%s: WARNING! Unload prdbc resid " "was zero! tag=%d\n", ATANAME(ap, xa->at), ccb->ccb_slot); @@ -2128,8 +2129,14 @@ process_error: ahci_port_start(ap); need = NEED_RESTART; - kprintf("%s: TFES slot %d ci_saved = %08x\n", - PORTNAME(ap), err_slot, ci_saved); + /* + * ATAPI errors are fairly common from probing, just + * report disk errors or if bootverbose is on. + */ + if (bootverbose || ap->ap_type != ATA_PORT_T_ATAPI) { + kprintf("%s: TFES slot %d ci_saved = %08x\n", + PORTNAME(ap), err_slot, ci_saved); + } /* * If we got an error on an error CCB just complete it @@ -2175,8 +2182,10 @@ process_error: ccb_at = ccb->ccb_xa.at; memcpy(&ccb->ccb_xa.rfis, ap->ap_rfis->rfis, sizeof(struct ata_fis_d2h)); - kprintf("%s: Copying error rfis slot %d\n", - ATANAME(ap, ccb_at), err_slot); + if (bootverbose) { + kprintf("%s: Copying rfis slot %d\n", + ATANAME(ap, ccb_at), err_slot); + } } else { kprintf("%s: Cannot copy rfis, CCB slot " "%d is not on-chip (state=%d)\n", -- 2.41.0