鬼生田です。

 年末にSATA HDDを2台入れたDELL PowerEdge 830を購入し、FreeBSD 6.0
をインストールしようとしてましたが、STAT HDDを認識せず、インストール
できませんでした。

 同じように苦労されてる方もおられるようで、Googleで以下のキーワード
で検索するとパッチがヒットしました。
検索キーワード: FreeBSD "PowerEdge 830" SATA
パッチ: http://www.bsdforums.org/forums/showthread.php?t=37304

 が、上記パッチをあてても、結局SATA HDDを認識できませんでした。

検索キーワードを、同じマザーボードを持つ850に変えて検索してみると
本家の方で、パッチが出ていました。結局これでSATA HDを認識すること
ができました。

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=221243+0+archive/2005/freebsd-current/20051113.freebsd-current

 ぼくの所で実際に動いてるパッチを最後に付けます。

 同様にPowerEdge 830 | 850 のSATA HDDで苦労されている方の参考
になれば幸いです。

---
Oniuda
*** /sys/dev/ata/ata-chipset.c.ctm      Fri Dec 30 12:01:17 2005
--- /sys/dev/ata/ata-chipset.c  Fri Jan  6 17:03:22 2006
***************
*** 236,250 ****
  static int
  ata_sata_connect(struct ata_channel *ch)
  {
!     u_int32_t status;
!     int timeout;
  
      /* wait up to 1 second for "connect well" */
      for (timeout = 0; timeout < 100 ; timeout++) {
        status = ATA_IDX_INL(ch, ATA_SSTATUS);
        if ((status & ATA_SS_CONWELL_MASK) == ATA_SS_CONWELL_GEN1 ||
!           (status & ATA_SS_CONWELL_MASK) == ATA_SS_CONWELL_GEN2)
!           break;
        ata_udelay(10000);
      }
      if (timeout >= 100) {
--- 236,270 ----
  static int
  ata_sata_connect(struct ata_channel *ch)
  {
!     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) {
!               something_there = 1;
!               break;
!       }
        ata_udelay(10000);
      }
      if (timeout >= 100) {
***************
*** 267,273 ****
      }
      if (bootverbose)
        device_printf(ch->dev, "SATA connect ready time=%dms\n", timeout * 10);
!     if (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;
--- 287,293 ----
      }
      if (bootverbose)
        device_printf(ch->dev, "SATA connect ready time=%dms\n", timeout * 10);
!     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,1662 ****
--- 1677,1688 ----
            /* 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,1864 ****
      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 
*/
!     if (ctlr->chip->chipid == ATA_I82801FB_S1 ||
!       ctlr->chip->chipid == ATA_I82801FB_R1 ||
!       ctlr->chip->chipid == ATA_I82801FB_M) {
        mask = (0x0005 << ch->unit);
      }
      else {
!       /* ICH5 in compat mode has SATA ports as master/slave on 1 channel */
!       if (pci_read_config(parent, 0x90, 1) & 0x04)
!           mask = 0x0003;
        else {
!           mask = (0x0001 << ch->unit);
!           /* XXX SOS should be in intel_allocate when we grow it */
!           ch->flags |= ATA_NO_SLAVE;
        }
      }
      pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) & ~mask, 
2);
--- 1871,1903 ----
      struct ata_channel *ch = device_get_softc(dev);
      int mask, timeout;
  
!     /* ICH7 has 4 SATA300 ports as master/slave on 2 channels so deal with 
pairs */
!     if (ctlr->chip->chipid == ATA_I82801GB_S1 ||
!       ctlr->chip->chipid == ATA_I82801GB_R1 ||
!       ctlr->chip->chipid == ATA_I82801GB_M  ||
!       ctlr->chip->chipid == ATA_I82801GB_AH) {
        mask = (0x0005 << ch->unit);
      }
      else {
!       /* ICH6 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_I82801GB_S1 ||
!               ctlr->chip->chipid == ATA_I82801GB_R1 ||
!               ctlr->chip->chipid == ATA_I82801GB_M  ||
!               ctlr->chip->chipid == ATA_I82801GB_AH) {
!               mask = (0x0005 << ch->unit);
!       }
        else {
!       /* ICH5 in compat mode has SATA ports as master/slave on 1 channel */
!               if (pci_read_config(parent, 0x90, 1) & 0x04)
!                   mask = 0x0003;
!               else {
!                   mask = (0x0001 << ch->unit);
!                   /* XXX SOS should be in intel_allocate when we grow it */
!                   ch->flags |= ATA_NO_SLAVE;
!               }
        }
      }
      pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) & ~mask, 
2);

メールによる返信