kern/92016: SATA Disk not detected on Dell PowerEdge 850
Dominic pageau
dpageau at infodev.ca
Thu Jan 19 10:30:10 PST 2006
>Number: 92016
>Category: kern
>Synopsis: SATA Disk not detected on Dell PowerEdge 850
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 19 18:30:05 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Dominic pageau
>Release: FreeBSD 6 RELEASE
>Organization:
>Environment:
>Description:
Just filling a PR to make sure PATCH or FIX will be commited to CURRENT.
See discussion on freebsd-current list "Problems Installing to PowerEdge 850 with SATA Drive" and pfsense-support "Trouble installing to Dell PowerEdge 850"
Lynn A. Roth writes:
I have two new Dell Poweredge 850 machines. They have an Intel ICH7
chipset. When I boot FreeBSD 6 RC1, the controller is identified, but
any drives connected to the SATA ports are not detected. The drive that
is included with the system is a Seagate 7200.7 drive. I also tried a
Maxtor.
>How-To-Repeat:
Try to Install 6-RELEASE on Dell PowerEdge 850
>Fix:
Doug Ambrisko post a patch on Freebsd-current list
Here's a hack to make it work on PE850:
Index: ata-chipset.c
===================================================================
RCS file: /usr/local/cvsroot/freebsd/src/sys/dev/ata/ata-chipset.c,v
retrieving revision 1.136
diff -u -p -r1.136 ata-chipset.c
--- ata-chipset.c 12 Oct 2005 20:00:26 -0000 1.136
+++ ata-chipset.c 7 Nov 2005 18:30:22 -0000
@@ -236,15 +236,35 @@ ata_sata_setmode(device_t dev, int mode)
static int
ata_sata_connect(struct ata_channel *ch)
{
- u_int32_t status;
- int timeout;
+ u_int32_t status, error;
+ int timeout, device;
+ struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(ch->dev));
+ int something_there = 0;
+
+ if (ctlr->chip->chipid == ATA_I82801GB_S1) {
+ status = ATA_IDX_INL(ch, ATA_SSTATUS);
+ error = ATA_IDX_INL(ch, ATA_SERROR);
+ if (status == (ATA_SS_DET_DEV_PRESENT | ATA_SS_DET_PHY_OFFLINE) ||
+ status == (ATA_SS_DET_PHY_ONLINE | ATA_SS_SPD_GEN1 | ATA_SS_IPM_ACTIVE)) {
+ /* reset port */
+ device = 1 << (ch->unit + 1);
+ pci_write_config(ch->dev, 0x92,
+ pci_read_config(ch->dev, 0x92, 2) & ~device, 2);
+ pci_write_config(ch->dev, 0x92,
+ pci_read_config(ch->dev, 0x92, 2) & ~device, 2);
+ }
+ }
/* wait up to 1 second for "connect well" */
for (timeout = 0; timeout < 100 ; timeout++) {
status = ATA_IDX_INL(ch, ATA_SSTATUS);
+ error = ATA_IDX_INL(ch, ATA_SERROR);
+ ATA_IDX_OUTL(ch, ATA_SERROR, error);
if ((status & ATA_SS_CONWELL_MASK) == ATA_SS_CONWELL_GEN1 ||
- (status & ATA_SS_CONWELL_MASK) == ATA_SS_CONWELL_GEN2)
- break;
+ (status & ATA_SS_CONWELL_MASK) == ATA_SS_CONWELL_GEN2) {
+ something_there = 1;
+ break;
+ }
ata_udelay(10000);
}
if (timeout >= 100) {
@@ -267,7 +287,7 @@ ata_sata_connect(struct ata_channel *ch)
}
if (bootverbose)
device_printf(ch->dev, "SATA connect ready time=%dms\n", timeout * 10);
- if (timeout < 1000) {
+ if (something_there || timeout < 1000) {
if ((ATA_IDX_INB(ch, ATA_CYL_LSB) == ATAPI_MAGIC_LSB) &&
(ATA_IDX_INB(ch, ATA_CYL_MSB) == ATAPI_MAGIC_MSB))
ch->devices = ATA_ATAPI_MASTER;
@@ -1657,6 +1677,12 @@ ata_intel_chipinit(device_t dev)
/* force all ports active "the legacy way" */
pci_write_config(dev, 0x92, pci_read_config(dev, 0x92, 2) | 0x0f,2);
+ if (ctlr->chip->chipid == ATA_I82801GB_S1) {
+ /* enable AHCI register compat mode */
+ pci_write_config(dev, 0x94, pci_read_config(dev, 0x94, 4) | 1 << 9, 4);
+ ATA_OUTL(ctlr->r_res2, 0x0C, ATA_INL(ctlr->r_res2, 0x0C) | 0xf);
+ }
+
/* enable AHCI mode */
ATA_OUTL(ctlr->r_res2, ATA_AHCI_GHC, ATA_AHCI_GHC_AE);
@@ -1845,10 +1871,13 @@ ata_intel_reset(device_t dev)
struct ata_channel *ch = device_get_softc(dev);
int mask, timeout;
- /* ICH6 has 4 SATA ports as master/slave on 2 channels so deal with pairs */
+ /* ICH6/7 has 4 SATA ports as master/slave on 2 channels so deal with pairs */
if (ctlr->chip->chipid == ATA_I82801FB_S1 ||
ctlr->chip->chipid == ATA_I82801FB_R1 ||
- ctlr->chip->chipid == ATA_I82801FB_M) {
+ ctlr->chip->chipid == ATA_I82801FB_M ||
+ ctlr->chip->chipid == ATA_I82801GB_S1 ||
+ ctlr->chip->chipid == ATA_I82801GB_R1 ||
+ ctlr->chip->chipid == ATA_I82801GB_M) {
mask = (0x0005 << ch->unit);
}
else {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list