PERFORCE change 171009 for review
Alexander Motin
mav at FreeBSD.org
Wed Nov 25 12:47:26 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=171009
Change 171009 by mav at mav_mavbook on 2009/11/25 12:47:07
Refactor SATA revision reporting. SATA revision doesn't replace ATA mode,
it is independent value, so handle it separately.
This fixes SATA PIO devices.
Affected files ...
.. //depot/projects/scottl-camlock/src/sbin/atacontrol/atacontrol.c#4 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#38 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#26 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-card.c#8 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-cbus.c#8 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-disk.c#21 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-disk.h#8 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-dma.c#16 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-isa.c#8 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-lowlevel.c#17 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-pci.c#17 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-pci.h#26 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#25 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid-ddf.h#2 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid.c#16 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid.h#8 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-sata.c#10 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-usb.c#10 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/ata_if.m#6 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cam.c#20 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.c#19 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.h#8 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-fd.c#13 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-fd.h#8 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-tape.c#13 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-tape.h#7 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-acard.c#6 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-acerlabs.c#7 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-adaptec.c#6 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ahci.c#13 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-amd.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ati.c#7 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-cenatek.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-cypress.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-cyrix.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-highpoint.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-intel.c#13 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ite.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-jmicron.c#7 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-marvell.c#17 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-micron.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-national.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-netcell.c#5 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-nvidia.c#10 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-promise.c#9 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-serverworks.c#10 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#12 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-sis.c#6 edit
.. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-via.c#7 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sbin/atacontrol/atacontrol.c#4 (text+ko) ====
@@ -42,7 +42,7 @@
static const char *
mode2str(int mode)
{
- switch (mode) {
+ switch (mode & 0xff) {
case ATA_PIO: return "BIOSPIO";
case ATA_PIO0: return "PIO0";
case ATA_PIO1: return "PIO1";
@@ -59,16 +59,23 @@
case ATA_UDMA4: return "UDMA66";
case ATA_UDMA5: return "UDMA100";
case ATA_UDMA6: return "UDMA133";
- case ATA_SA150: return "SATA150";
- case ATA_SA300: return "SATA300";
- case ATA_USB: return "USB";
- case ATA_USB1: return "USB1";
- case ATA_USB2: return "USB2";
case ATA_DMA: return "BIOSDMA";
default: return "???";
}
}
+static const char *
+satarev2str(int mode)
+{
+ switch ((mode & 0xff00) >> 8) {
+ case 0: return "";
+ case 1: return "SATA 1.5Gb/s";
+ case 2: return "SATA 3Gb/s";
+ case 3: return "SATA 6Gb/s";
+ default: return "???";
+ }
+}
+
static int
str2mode(char *str)
{
@@ -82,7 +89,9 @@
if (!strcasecmp(str, "WDMA1")) return ATA_WDMA1;
if (!strcasecmp(str, "WDMA2")) return ATA_WDMA2;
if (!strcasecmp(str, "UDMA0")) return ATA_UDMA0;
+ if (!strcasecmp(str, "UDMA16")) return ATA_UDMA0;
if (!strcasecmp(str, "UDMA1")) return ATA_UDMA1;
+ if (!strcasecmp(str, "UDMA25")) return ATA_UDMA1;
if (!strcasecmp(str, "UDMA2")) return ATA_UDMA2;
if (!strcasecmp(str, "UDMA33")) return ATA_UDMA2;
if (!strcasecmp(str, "UDMA3")) return ATA_UDMA3;
@@ -93,11 +102,6 @@
if (!strcasecmp(str, "UDMA100")) return ATA_UDMA5;
if (!strcasecmp(str, "UDMA6")) return ATA_UDMA6;
if (!strcasecmp(str, "UDMA133")) return ATA_UDMA6;
- if (!strcasecmp(str, "SATA150")) return ATA_SA150;
- if (!strcasecmp(str, "SATA300")) return ATA_SA300;
- if (!strcasecmp(str, "USB")) return ATA_USB;
- if (!strcasecmp(str, "USB1")) return ATA_USB1;
- if (!strcasecmp(str, "USB2")) return ATA_USB2;
if (!strcasecmp(str, "BIOSDMA")) return ATA_DMA;
return -1;
}
@@ -388,7 +392,8 @@
if (argc == 3 || argc == 4) {
if (ioctl(fd, IOCATAGMODE, &mode) < 0)
err(1, "ioctl(IOCATAGMODE)");
- printf("current mode = %s\n", mode2str(mode));
+ printf("current mode = %s %s\n",
+ mode2str(mode), satarev2str(mode));
}
exit(EX_OK);
}
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.c#38 (text+ko) ====
@@ -731,7 +731,8 @@
return 0;
case IOCATAGMODE:
- *mode = atadev->mode;
+ *mode = atadev->mode |
+ (ATA_GETREV(device_get_parent(dev), atadev->unit) << 8);
return 0;
case IOCATASSPINDOWN:
atadev->spindown = *mode;
@@ -1103,7 +1104,7 @@
return str;
}
-char *
+const char *
ata_mode2str(int mode)
{
switch (mode) {
@@ -1136,6 +1137,18 @@
}
}
+const char *
+ata_satarev2str(int rev)
+{
+ switch (rev) {
+ case 0: return "";
+ case 1: return "SATA 1.5Gb/s";
+ case 2: return "SATA 3Gb/s";
+ case 3: return "SATA 6Gb/s";
+ default: return "???";
+ }
+}
+
int
ata_atapi(device_t dev)
{
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#26 (text+ko) ====
@@ -620,7 +620,8 @@
void ata_modify_if_48bit(struct ata_request *request);
void ata_udelay(int interval);
char *ata_unit2str(struct ata_device *atadev);
-char *ata_mode2str(int mode);
+const char *ata_mode2str(int mode);
+const char *ata_satarev2str(int rev);
int ata_atapi(device_t dev);
int ata_pmode(struct ata_params *ap);
int ata_wmode(struct ata_params *ap);
@@ -663,6 +664,7 @@
int ata_sata_scr_write(struct ata_channel *ch, int port, int reg, uint32_t val);
int ata_sata_phy_reset(device_t dev, int port, int quick);
int ata_sata_setmode(device_t dev, int target, int mode);
+int ata_sata_getrev(device_t dev, int target);
int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis);
void ata_pm_identify(device_t dev);
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-card.c#8 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-cbus.c#8 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-disk.c#21 (text+ko) ====
@@ -533,12 +533,13 @@
strncpy(product, atadev->param.model, 40);
}
- device_printf(dev, "%juMB <%s%s %.8s> at ata%d-%s %s%s\n",
+ device_printf(dev, "%juMB <%s%s %.8s> at ata%d-%s %s%s %s\n",
adp->total_secs / (1048576 / DEV_BSIZE),
vendor, product, atadev->param.revision,
device_get_unit(ch->dev), ata_unit2str(atadev),
(adp->flags & AD_F_TAG_ENABLED) ? "tagged " : "",
- ata_mode2str(atadev->mode));
+ ata_mode2str(atadev->mode),
+ ata_satarev2str(ATA_GETREV(device_get_parent(dev), atadev->unit)));
if (bootverbose) {
device_printf(dev, "%ju sectors [%juC/%dH/%dS] "
"%d sectors/interrupt %d depth queue\n", adp->total_secs,
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-disk.h#8 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-dma.c#16 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-isa.c#8 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-lowlevel.c#17 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-pci.c#17 (text+ko) ====
@@ -711,6 +711,17 @@
return (ata_generic_setmode(dev, target, mode));
}
+static int
+ata_pcichannel_getrev(device_t dev, int target)
+{
+ struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
+
+ if (ctlr->getrev)
+ return (ctlr->getrev(dev, target));
+ else
+ return (0);
+}
+
static device_method_t ata_pcichannel_methods[] = {
/* device interface */
DEVMETHOD(device_probe, ata_pcichannel_probe),
@@ -722,6 +733,7 @@
/* ATA methods */
DEVMETHOD(ata_setmode, ata_pcichannel_setmode),
+ DEVMETHOD(ata_getrev, ata_pcichannel_getrev),
DEVMETHOD(ata_locking, ata_pcichannel_locking),
DEVMETHOD(ata_reset, ata_pcichannel_reset),
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-pci.h#26 (text+ko) ====
@@ -64,6 +64,7 @@
int (*locking)(device_t, int);
void (*reset)(device_t);
int (*setmode)(device_t, int, int);
+ int (*getrev)(device_t, int);
struct {
void (*function)(void *);
void *argument;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#25 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid-ddf.h#2 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid.c#16 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid.h#8 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-sata.c#10 (text+ko) ====
@@ -213,16 +213,17 @@
ata_sata_setmode(device_t dev, int target, int mode)
{
- /* query SATA STATUS for the speed */
-/* if (ch->r_io[ATA_SSTATUS].res &&
- ((ATA_IDX_INL(ch, ATA_SSTATUS) & ATA_SS_CONWELL_MASK) ==
- ATA_SS_CONWELL_GEN2))
- atadev->mode = ATA_SA300;
- else
- atadev->mode = ATA_SA150;
-*/
- mode = min(mode, ATA_UDMA5);
- return (mode);
+ return (min(mode, ATA_UDMA5));
+}
+
+int
+ata_sata_getrev(device_t dev, int target)
+{
+ struct ata_channel *ch = device_get_softc(dev);
+
+ if (ch->r_io[ATA_SSTATUS].res)
+ return ((ATA_IDX_INL(ch, ATA_SSTATUS) & 0x0f0) >> 4);
+ return (0);
}
int
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-usb.c#10 (text) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata_if.m#6 (text+ko) ====
@@ -71,6 +71,11 @@
int mode;
} DEFAULT ata_null_setmode;
+METHOD int getrev {
+ device_t dev;
+ int target;
+};
+
METHOD void reset {
device_t channel;
} DEFAULT ata_generic_reset;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cam.c#20 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.c#19 (text+ko) ====
@@ -1724,7 +1724,8 @@
printf("%s %dKB buffer", comma ? "," : "", cdp->cap.buf_size);
comma = 1;
}
- printf("%s %s\n", comma ? "," : "", ata_mode2str(atadev->mode));
+ printf("%s %s %s\n", comma ? "," : "", ata_mode2str(atadev->mode),
+ ata_satarev2str(ATA_GETREV(device_get_parent(dev), atadev->unit)));
device_printf(dev, "Reads:");
comma = 0;
@@ -1874,10 +1875,11 @@
"CDROM");
if (cdp->changer_info)
printf("with %d CD changer ", cdp->changer_info->slots);
- printf("<%.40s/%.8s> at ata%d-%s %s\n",
+ printf("<%.40s/%.8s> at ata%d-%s %s %s\n",
atadev->param.model, atadev->param.revision,
device_get_unit(ch->dev), ata_unit2str(atadev),
- ata_mode2str(atadev->mode) );
+ ata_mode2str(atadev->mode),
+ ata_satarev2str(ATA_GETREV(device_get_parent(dev), atadev->unit)));
}
}
==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.h#8 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-fd.c#13 (text+ko) ====
@@ -400,10 +400,11 @@
else
strcpy(sizestring, "(no media)");
- device_printf(dev, "%s <%.40s %.8s> at ata%d-%s %s\n",
+ device_printf(dev, "%s <%.40s %.8s> at ata%d-%s %s %s\n",
sizestring, atadev->param.model, atadev->param.revision,
device_get_unit(ch->dev), ata_unit2str(atadev),
- ata_mode2str(atadev->mode));
+ ata_mode2str(atadev->mode),
+ ata_satarev2str(ATA_GETREV(device_get_parent(dev), atadev->unit)));
if (bootverbose) {
device_printf(dev, "%ju sectors [%juC/%dH/%dS]\n",
fdp->mediasize / fdp->sectorsize,
==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-fd.h#8 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-tape.c#13 (text+ko) ====
@@ -673,7 +673,8 @@
printf("transfer limit %d blk%s, ",
stp->cap.ctl, (stp->cap.ctl > 1) ? "s" : "");
printf("%dKB buffer, ", (stp->cap.buffer_size * DEV_BSIZE) / 1024);
- printf("%s\n", ata_mode2str(atadev->mode));
+ printf("%s %s\n", ata_mode2str(atadev->mode),
+ ata_satarev2str(ATA_GETREV(device_get_parent(dev), atadev->unit)));
device_printf(dev, "Medium: ");
switch (stp->cap.medium_type) {
case 0x00:
@@ -704,10 +705,11 @@
printf("\n");
}
else {
- device_printf(dev, "TAPE <%.40s/%.8s> at ata%d-%s %s\n",
+ device_printf(dev, "TAPE <%.40s/%.8s> at ata%d-%s %s %s\n",
atadev->param.model, atadev->param.revision,
device_get_unit(ch->dev), ata_unit2str(atadev),
- ata_mode2str(atadev->mode));
+ ata_mode2str(atadev->mode),
+ ata_satarev2str(ATA_GETREV(device_get_parent(dev), atadev->unit)));
}
}
==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-tape.h#7 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-acard.c#6 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-acerlabs.c#7 (text+ko) ====
@@ -113,6 +113,7 @@
ctlr->ch_attach = ata_ali_sata_ch_attach;
ctlr->ch_detach = ata_pci_ch_detach;
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
/* AHCI mode is correctly supported only on the ALi 5288. */
if ((ctlr->chip->chipid == ATA_ALI_5288) &&
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-adaptec.c#6 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ahci.c#13 (text+ko) ====
@@ -194,6 +194,7 @@
ctlr->ch_suspend = ata_ahci_ch_suspend;
ctlr->ch_resume = ata_ahci_ch_resume;
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
ctlr->suspend = ata_ahci_suspend;
ctlr->resume = ata_ahci_ctlr_reset;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-amd.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ati.c#7 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-cenatek.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-cypress.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-cyrix.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-highpoint.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-intel.c#13 (text+ko) ====
@@ -57,7 +57,7 @@
static void ata_intel_reset(device_t dev);
static int ata_intel_old_setmode(device_t dev, int target, int mode);
static int ata_intel_new_setmode(device_t dev, int target, int mode);
-static int ata_intel_sata_setmode(device_t dev, int target, int mode);
+static int ata_intel_sata_getrev(device_t dev, int target);
static int ata_intel_31244_ch_attach(device_t dev);
static int ata_intel_31244_ch_detach(device_t dev);
static int ata_intel_31244_status(device_t dev);
@@ -181,6 +181,7 @@
ctlr->reset = ata_intel_31244_reset;
}
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
}
/* non SATA intel chips goes here */
@@ -214,9 +215,8 @@
ctlr->r_rid2 = PCIR_BAR(5);
if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
&ctlr->r_rid2, RF_ACTIVE)))
- ctlr->setmode = ata_intel_sata_setmode;
- else
- ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_intel_sata_getrev;
+ ctlr->setmode = ata_sata_setmode;
}
return 0;
}
@@ -360,27 +360,15 @@
}
static int
-ata_intel_sata_setmode(device_t dev, int target, int mode)
+ata_intel_sata_getrev(device_t dev, int target)
{
-#if 0
struct ata_channel *ch = device_get_softc(device_get_parent(dev));
int devno = (ch->unit << 1) + target;
/* set ATA_SSTATUS register offset */
ATA_IDX_OUTL(ch, ATA_IDX_ADDR, devno * 0x100);
-
/* query SATA STATUS for the speed */
- if ((ATA_IDX_INL(ch, ATA_IDX_DATA) & ATA_SS_CONWELL_MASK) ==
- ATA_SS_CONWELL_GEN2)
- mode = ATA_SA300;
- else
- mode = ATA_SA150;
- }
- else {
-#endif
- mode = min(mode, ATA_UDMA5);
-// }
- return (mode);
+ return ((ATA_IDX_INL(ch, ATA_IDX_DATA) & 0x0f0) >> 4);
}
static int
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-ite.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-jmicron.c#7 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-marvell.c#17 (text+ko) ====
@@ -206,6 +206,7 @@
ctlr->ch_detach = ata_marvell_edma_ch_detach;
ctlr->reset = ata_marvell_edma_reset;
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
ctlr->channels = ctlr->chip->cfg1;
/* clear host controller interrupts */
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-micron.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-national.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-netcell.c#5 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-nvidia.c#10 (text+ko) ====
@@ -231,6 +231,7 @@
}
}
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
}
else {
/* disable prefetch, postwrite */
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-promise.c#9 (text+ko) ====
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-serverworks.c#10 (text+ko) ====
@@ -147,6 +147,7 @@
ctlr->ch_attach = ata_serverworks_ch_attach;
ctlr->ch_detach = ata_serverworks_ch_detach;
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
return 0;
}
else if (ctlr->chip->cfg1 == SWKS_33) {
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#12 (text+ko) ====
@@ -145,6 +145,7 @@
ctlr->ch_detach = ata_siiprb_ch_detach;
ctlr->reset = ata_siiprb_reset;
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
ctlr->channels = (ctlr->chip->cfg2 == SII_4CH) ? 4 : 2;
/* reset controller */
@@ -193,6 +194,7 @@
if (ctlr->chip->max_dma >= ATA_SA150) {
ctlr->reset = ata_sii_reset;
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
}
else
ctlr->setmode = ata_sii_setmode;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-sis.c#6 (text+ko) ====
@@ -191,6 +191,7 @@
ctlr->reset = ata_sis_reset;
}
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
return 0;
default:
return ENXIO;
==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-via.c#7 (text+ko) ====
@@ -152,9 +152,9 @@
if (ctlr->chip->cfg2 & VIABAR) {
ctlr->channels = 3;
ctlr->setmode = ata_via_new_setmode;
- }
- else
+ } else
ctlr->setmode = ata_sata_setmode;
+ ctlr->getrev = ata_sata_getrev;
return 0;
}
@@ -299,7 +299,7 @@
piomode = mode;
pci_write_config(parent, 0xab, pio_timings[ata_mode2idx(piomode)], 1);
} else
- mode = ata_sata_setmode(dev, target, mode);
+ mode = ata_sata_setmode(dev, target, mode);
return (mode);
}
More information about the p4-projects
mailing list