Re: General ata grousing

1999-12-28 Thread Doug Rabson

On Mon, 27 Dec 1999, Warner Losh wrote:

> In message <[EMAIL PROTECTED]> Peter Wemm writes:
> : Just as a BTW, dfr and sos are exchanging patches right now (and have been
> : for quite a few days) that happen to fix the inthand_add() stuff.
> 
> This may also help the pccard code cases which I have floating around.

I'm not doing anything special with this code btw., just calling
bus_alloc_resource() carefully in the right place.

--
Doug Rabson Mail:  [EMAIL PROTECTED]
Nonlinear Systems Ltd.  Phone: +44 181 442 9037




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: General ata grousing

1999-12-27 Thread Warner Losh

In message <[EMAIL PROTECTED]> Peter Wemm writes:
: Just as a BTW, dfr and sos are exchanging patches right now (and have been
: for quite a few days) that happen to fix the inthand_add() stuff.

This may also help the pccard code cases which I have floating around.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: General ata grousing

1999-12-23 Thread Peter Wemm

Soren Schmidt wrote:
> It seems Garrett Wollman wrote:
> > < 
said:
> > 
> > > If you looked at the code, you would see that the ata driver only uses
> > > this ugly method when we are dealing with the standard primary & 
> > > secondary controller which are bound to specific addresses and interrupts
.
> > > Those are not configurable.
> > 
> > That's why the resource manager allows you to specify a specific range
> > of resources.  If you want to be sure of getting IRQ 11, specify start
> > == end == 11 and length == 1.
> 
> Right, but I think there where problems with that back when dfr did this
> code. At any rate this is currently being rewritten (again by dfr) to
> handle this better and to make ata register devices as children etc etc.

Just as a BTW, dfr and sos are exchanging patches right now (and have been
for quite a few days) that happen to fix the inthand_add() stuff.

Cheers,
-Peter



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: General ata grousing

1999-12-23 Thread Doug Rabson

On Wed, 22 Dec 1999, Soren Schmidt wrote:

> It seems Garrett Wollman wrote:
> > < said:
> > 
> > > If you looked at the code, you would see that the ata driver only uses
> > > this ugly method when we are dealing with the standard primary & 
> > > secondary controller which are bound to specific addresses and interrupts.
> > > Those are not configurable.
> > 
> > That's why the resource manager allows you to specify a specific range
> > of resources.  If you want to be sure of getting IRQ 11, specify start
> > == end == 11 and length == 1.
> 
> Right, but I think there where problems with that back when dfr did this
> code. At any rate this is currently being rewritten (again by dfr) to
> handle this better and to make ata register devices as children etc etc.

I think the original reason I didn't touch that part of the code was a
combination of the fact that I needed two interrupts (primary and
secondary controllers) and the desire to leave as much as possible of the
code undisturbed.

--
Doug Rabson Mail:  [EMAIL PROTECTED]
Nonlinear Systems Ltd.  Phone: +44 181 442 9037




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: General ata grousing

1999-12-22 Thread Soren Schmidt

It seems Garrett Wollman wrote:
> < said:
> 
> > If you looked at the code, you would see that the ata driver only uses
> > this ugly method when we are dealing with the standard primary & 
> > secondary controller which are bound to specific addresses and interrupts.
> > Those are not configurable.
> 
> That's why the resource manager allows you to specify a specific range
> of resources.  If you want to be sure of getting IRQ 11, specify start
> == end == 11 and length == 1.

Right, but I think there where problems with that back when dfr did this
code. At any rate this is currently being rewritten (again by dfr) to
handle this better and to make ata register devices as children etc etc.

-Søren


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: General ata grousing

1999-12-22 Thread Garrett Wollman

< said:

> If you looked at the code, you would see that the ata driver only uses
> this ugly method when we are dealing with the standard primary & 
> secondary controller which are bound to specific addresses and interrupts.
> Those are not configurable.

That's why the resource manager allows you to specify a specific range
of resources.  If you want to be sure of getting IRQ 11, specify start
== end == 11 and length == 1.

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
[EMAIL PROTECTED]  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: General ata grousing

1999-12-22 Thread Soren Schmidt

It seems Bill Paul wrote:
[snip snap]
 
> I don't want to sound like an ungrateful wretch, unduly criticizing
> someone else's code, especially at so late a date, but there are some 
> other things that just seem like they really shouldn't be there:

We've got used to it, on with matters... 

> - Platform dependencies. The inthand_add() thing I mentioned previously
>   appears to be an x86-specific kludge, and there's an alpha kludge to
>   go along with it. There should be some way to get rid of this.

If you looked at the code, you would see that the ata driver only uses
this ugly method when we are dealing with the standard primary & 
secondary controller which are bound to specific addresses and interrupts.
Those are not configurable. Controllers not on these adresses are attached
with bus_alloc_resource etc etc. So you should not have any problems
with an ata controller on IRQ11. 

> - Magic numbers everywhere. I see lots of places where I/O and PCI config
>   registers are being manipulated using just hard coded register offsets
>   and bitmasks. Magic numbers are bad, -kay?

Mmmm, what do you want instead?? I think I've put names on most things
but some are just numbers. But frankly I dont se the difference
between a name and a number if you are fiddling HW, unless you want
the entire chip datasheet in there as comments. 
BTW I just had a look at your if_rl driver the other day, cause I got 
a bunch of those cards here, and you have some serioius cleaning house 
to do also, -kay :)

> - Use of inb/outb instead of bus_space_read_X()/bus_space_write_X().
>   My understanding is that bus_space_read_X()/bus_space_write_X() are
>   the prefered way of doing register accesses. inb/out and friends are
>   deprecated.

Hmm, I was under the impression that it didn't matter much, I feel
strange when I see those bus_space_bla functions in IO related
stuff, but anyhow, I'm just getting old, those parts of the
ata driver was written when the bus* functions was in its infancy.
However those are easily changed with a little script, but franly
I dont see the need right now, more important things matters more.

> Anyway, I'm going to continue trying to hunt down the interrupt setup
> problem once I get home tonight (nice thing about having a laptop for
> a test box: you don't have to leave the test machine at work and frob
> it remotely). If anyone has any insights, please feel free to share
> them.

Good hunt...

-Søren


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message