PERFORCE change 171094 for review
Alexander Motin
mav at FreeBSD.org
Fri Nov 27 12:43:50 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=171094
Change 171094 by mav at mav_mavtest on 2009/11/27 12:43:43
Fix typos.
Deny unsupported WDMA modes for new VIA PATA chips.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-promise.c#10 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-serverworks.c#11 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#13 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-sis.c#7 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-via.c#8 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-promise.c#10 (text+ko) ====
@@ -443,7 +443,7 @@
static int
ata_promise_setmode(device_t dev, int target, int mode)
{
- device_t parent = device_get_softc(dev);
+ device_t parent = device_get_parent(dev);
struct ata_pci_controller *ctlr = device_get_softc(parent);
struct ata_channel *ch = device_get_softc(dev);
int devno = (ch->unit << 1) + target;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-serverworks.c#11 (text+ko) ====
@@ -345,7 +345,7 @@
static int
ata_serverworks_setmode(device_t dev, int target, int mode)
{
- device_t parent = device_get_softc(dev);
+ device_t parent = device_get_parent(dev);
struct ata_pci_controller *ctlr = device_get_softc(parent);
struct ata_channel *ch = device_get_softc(dev);
int devno = (ch->unit << 1) + target;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#13 (text+ko) ====
@@ -251,7 +251,7 @@
static int
ata_cmd_setmode(device_t dev, int target, int mode)
{
- device_t parent = device_get_softc(dev);
+ device_t parent = device_get_parent(dev);
struct ata_pci_controller *ctlr = device_get_softc(parent);
struct ata_channel *ch = device_get_softc(dev);
int devno = (ch->unit << 1) + target;
@@ -372,7 +372,7 @@
static int
ata_sii_setmode(device_t dev, int target, int mode)
{
- device_t parent = device_get_softc(dev);
+ device_t parent = device_get_parent(dev);
struct ata_pci_controller *ctlr = device_get_softc(parent);
struct ata_channel *ch = device_get_softc(dev);
int rego = (ch->unit << 4) + (target << 1);
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-sis.c#7 (text+ko) ====
@@ -235,7 +235,7 @@
static int
ata_sis_setmode(device_t dev, int target, int mode)
{
- device_t parent = device_get_softc(dev);
+ device_t parent = device_get_parent(dev);
struct ata_pci_controller *ctlr = device_get_softc(parent);
struct ata_channel *ch = device_get_softc(dev);
int devno = (ch->unit << 1) + target;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-via.c#8 (text+ko) ====
@@ -281,16 +281,18 @@
static int
ata_via_new_setmode(device_t dev, int target, int mode)
{
- device_t parent = device_get_softc(dev);
+ device_t parent = device_get_parent(dev);
struct ata_pci_controller *ctlr = device_get_softc(parent);
struct ata_channel *ch = device_get_softc(dev);
if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1)) {
int piomode;
- u_int8_t pio_timings[] = { 0xa8, 0x65, 0x65, 0x32, 0x20,
- 0xa8, 0x32, 0x20 };
+ u_int8_t pio_timings[] = { 0xa8, 0x65, 0x65, 0x32, 0x20 };
u_int8_t dma_timings[] = { 0xee, 0xe8, 0xe6, 0xe4, 0xe2, 0xe1, 0xe0 };
+ /* This chip can't do WDMA. */
+ if (mode >= ATA_WDMA0 && mode < ATA_UDMA0)
+ mode = ATA_PIO4;
if (mode >= ATA_UDMA0) {
pci_write_config(parent, 0xb3,
dma_timings[mode & ATA_MODE_MASK], 1);
More information about the p4-projects
mailing list