Subject: Re: accessing IDE hard drive via pcmcia card
To: Manuel Bouyer <firstname.lastname@example.org>
From: Charles M. Hannum <email@example.com>
Date: 05/17/2004 23:43:29
On Monday 17 May 2004 21:28, Manuel Bouyer wrote:
> On Mon, May 17, 2004 at 05:10:36PM -0400, Steven M. Bellovin wrote:
> > In message <20040517210116.GA6013@antioche.eu.org>, Manuel Bouyer writes:
> > >On Mon, May 17, 2004 at 11:24:55AM -0400, Steve Bellovin wrote:
> > >> [...]
> > >> I can remove and reinsert the card:
> > >>
> > >> atabus2 detached
> > >> wdc2 detached
> > >> wdc2 at pcmcia0 function 0
> > >> atabus2 at wdc2 channel 0
> > >
> > >Can you try a recent current kernel ?
> > >I debugged a similar problem with a PCMCIA cdrom last week-end ...
> > >
> > >If this doesn't help, you can try breaking into ddb before inserting
> > >the adapter and typing
> > >write wdcdebug_mask 0x10
> > >c
> > >
> > >Then the kernel should print message, which hopefully will help finding
> > >why the kernel thinks there's no drive here.
> > Per my followup posting, the kernel is saying
> > wdc2:0: before reset, st0=0x80, st1=0x80
> > atabusattach: ch_drive_flags 0x0 0x0
> > This is with a kernel from yesterday's 2.0-branch source. If it will
> > help, I can build a -current kernel for that machine, but that will
> > take until tomorrow, given how slow my -current machine is.
> It will help. I suspect the register writability test fails but I don't
> know why. I added printfs for this to current last week-end.
Well, if BSY is asserted (as it is in the "before reset") message when we do
the test, the results will definitely be useless with many devices, since in
this case all registers will read the same as the status register.
I think BSY is probably asserted here because the device is still doing its
power-on reset. For removable devices, at least, we may need to do more work