kern/103841: [fdc] fdc(4) does not work (regression)

Dmitry Pryanishnikov dmitry at atlantis.dp.ua
Thu Oct 5 14:41:38 PDT 2006


Hello!

On Fri, 6 Oct 2006, Eugene Grosbein wrote:
>>>> fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f0 irq 6 drq 2 on
>>>> acpi0
>> ----------------------------------------^^^^^^^^^^^^^^^^^
>>  Bad (no 0x3f7, 0x3f0 gets listed twice).
>
> Recent revisions of fdc(4) do not use control register at port 0x3f7.

  Are you sure? I see the following in /sys/dev/fdc/fdc.c (CURRENT version):

#define   FDCTL   7       /* Control Register (W) */

static void
fdctl_wr(struct fdc_data *fdc, u_int8_t v)
{
         fdregwr(fdc, FDCTL, v);
}

Well, in CURRENT it _may not_ be used if you've got the "Enhanced"
floppy controller:

         if (fdc->fdct == FDC_ENHANCED)
                 fddsr_wr(fdc, fd->ft->trans);
         else
                 fdctl_wr(fdc, fd->ft->trans);

while in RELENG_6 it's always

 	fdctl_wr(fdc, fd->ft->trans);

That's why version from CURRENT works for you despite the absence of 0x3f7
resource. But it's incorrect to say that "Recent revisions of fdc(4) do not 
use control register at port 0x3f7" - actually they do for non-FDC_ENHANCED 
case.

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE


More information about the freebsd-stable mailing list