Deleted Added
sdiff udiff text old ( 86322 ) new ( 87198 )
full compact
1/*-
2 * Copyright (c) 1998,1999,2000,2001 S�ren Schmidt <sos@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/ata/ata-dma.c 86322 2001-11-13 11:37:23Z sos $
29 */
30
31#include "pci.h"
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/ata.h>
35#include <sys/bio.h>
36#include <sys/malloc.h>

--- 479 unchanged lines hidden (view full) ---

516 scp->mode[ATA_DEV(device)] = ATA_WDMA2;
517 return;
518 }
519 }
520 /* we could set PIO mode timings, but we assume the BIOS did that */
521 break;
522
523 case 0x55131039: /* SiS 5591 */
524 if (udmamode >= 2 && pci_get_revid(parent) > 0xc1) {
525 error = ata_command(scp, device, ATA_C_SETFEATURES, 0,
526 ATA_UDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
527 if (bootverbose)
528 ata_printf(scp, device,
529 "%s setting UDMA2 on SiS chip\n",
530 (error) ? "failed" : "success");
531 if (!error) {
532 pci_write_config(parent, 0x40 + (devno << 1), 0xa301, 2);
533 scp->mode[ATA_DEV(device)] = ATA_UDMA2;
534 return;
535 }
536 }
537 if (wdmamode >=2 && apiomode >= 4) {
538 error = ata_command(scp, device, ATA_C_SETFEATURES, 0,
539 ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
540 if (bootverbose)
541 ata_printf(scp, device,
542 "%s setting WDMA2 on SiS chip\n",
543 (error) ? "failed" : "success");

--- 664 unchanged lines hidden ---