Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2001 22:16:50 -0800 (PST)
From:      "John L. Utz III" <john@utzweb.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/32421: patch to support ATA66 Mode (UDMA4) on SiS 630 chipset
Message-ID:  <200112010616.fB16Go932585@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         32421
>Category:       kern
>Synopsis:       patch to support ATA66 Mode (UDMA4) on SiS 630 chipset
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 22:20:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     John L. Utz III
>Release:        4.4-RELEASE
>Organization:
>Environment:
FreeBSD john.utzweb.net 4.4-RELEASE FreeBSD 4.4-RELEASE #11: Fri Nov 30 21:02:08 PST 2001     spaz@john.utzweb.net:/usr/src/sys/compile/JOHN  i386
b
>Description:
The SiS 630 integrated chipset contains an ATA66 controller that is currently recognized as an older SiS 5591 ATA33 device.

This is suboptimal because we like our disks to be read/written to as quickly as possible.
>How-To-Repeat:
boot 4.4-RELEASE kernel on a SiS630 based computer
>Fix:
following patches to ata-all.c and ata-dma.c
*** ata-all44R.c        Fri Nov 30 21:14:04 2001
--- ata-all.c   Fri Nov 30 21:15:25 2001
***************
*** 291,297 ****
        return "VIA Apollo ATA controller";
  
      case 0x55131039:
!       return "SiS 5591 ATA33 controller";
  
      case 0x06491095:
        return "CMD 649 ATA100 controller";
--- 291,298 ----
        return "VIA Apollo ATA controller";
  
      case 0x55131039:
!         if(pci_get_revid(dev)==0xd0) return "SiS 630  ATA66 controller";
!       else                         return "SiS 5591 ATA33 controller";
  
      case 0x06491095:
        return "CMD 649 ATA100 controller";

*** ata-dma44R.c        Fri Nov 30 21:14:05 2001
--- ata-dma.c   Fri Nov 30 21:15:32 2001
***************
*** 514,521 ****
        /* we could set PIO mode timings, but we assume the BIOS did that */
        break;
  
!     case 0x55131039:  /* SiS 5591 */
!       if (udmamode >= 2 && pci_get_revid(parent) > 0xc1) {
            error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
                                ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
            if (bootverbose)
--- 514,521 ----
        /* we could set PIO mode timings, but we assume the BIOS did that */
        break;
  
!     case 0x55131039:  /* SiS 5591,630 */
!         if (udmamode >= 2 && pci_get_revid(parent) > 0xc1) { /* 5591 */
            error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
                                ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
            if (bootverbose)
***************
*** 528,533 ****
--- 528,547 ----
                return;
            }
        }
          if (udmamode >= 2 && pci_get_revid(parent) >= 0xd0) { /* 630 */
            error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
                                ATA_UDMA4, ATA_C_F_SETXFER, ATA_WAIT_READY);
            if (bootverbose)
                ata_printf(scp, device,
                           "%s setting UDMA2 on SiS chip\n",
                           (error) ? "failed" : "success");
            if (!error) {
                pci_write_config(parent, 0x40   (devno << 1), 0xa301, 2);
                scp->mode[ATA_DEV(device)] = ATA_UDMA2;
                return;
            }
        }
  
        if (wdmamode >=2 && apiomode >= 4) {
            error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
                                ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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