Saturday, September 02, 2017

wdc(4) caps probe & print

Hi,

I was going to propose the following kludge^Wpatch...

--- sys/dev/ic/wdc.c.orig 2016-09-14 22:00:16.000000000 -0400
+++ sys/dev/ic/wdc.c 2017-09-02 18:57:21.000000000 -0400
@@ -1326,6 +1326,9 @@
at_poll) != CMD_OK)
continue;

+ (void)printf("%s: supports PIO mode %i\n",
+ drvp->drive_name, i + 3);
+
/*
* If controller's driver can't set its PIO mode,
* set the highest one the controller supports

...when my eyes fell on the following comment:

in the same file:
> void
> wdc_print_caps(struct ata_drive_datas *drvp)
> {
> /* This is actually a lie until we fix the _probe_caps
> algorithm. Don't print out lies */
> #if 0

What's the deal with this? How is the _probe_caps routine broken enough
to justify omitting the printout?

--schaafuit.

No comments:

Post a Comment