Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Dec 1999 14:55:12 -0700
From:      Warner Losh <imp@village.org>
To:        Doug Ambrisko <ambrisko@whistle.com>
Cc:        sanpei@sanpei.org (MIHIRA Sanpei Yoshiro), freebsd-mobile@FreeBSD.ORG
Subject:   Re: [ATA/PC-Card,4-current] Patches to ata driver for PC-Card 
Message-ID:  <199912312155.OAA18246@harmony.village.org>
In-Reply-To: Your message of "Fri, 31 Dec 1999 10:38:18 PST." <199912311838.KAA44694@whistle.com> 
References:  <199912311838.KAA44694@whistle.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199912311838.KAA44694@whistle.com> Doug Ambrisko writes:
: That's encouraging, Warner told me the flash card he had didn't work.
: I should have one next week to play with.  I forget in what way it 
: didn't work.

I was able to probe/attach the disk.  fdisk kinda worked.  It reported 
the last slice as the whole disk, but all the other slices were
clearly completely bogus.  This flash card had been working with a
patched wdc from before the conversion of pccard to newbus.

: BTW Warner cleaned up my initial version and I've attached it at the end.
: It had some junk in it left over from when I modified the ata driver
: to work with pccard stuff before the pccard stuff was converted to new bus.

http://www.freebsd.org/~imp/ata-patch

is what I was using.

: However, I'm glad to see it still worked for you.  If you are looking
: at how to do the attach & detach we need to look at how to probe and then
: free up devices for a controller.  I was hoping Soren might provide some
: insight.  Maybe Warner can provide some direction?  Currently how I deal
: with pccard controllers being added is to call ad_drvinit and atapi_init.

This is ugly.

: However, these are not really designed as proper interfaces to call
: since they where designed to be called via SYSINIT.  So the assumption
: is that all controllers have been probed and then later in the boot
: process the devices on all controllers are searched.

This is a problem.  There needs to be a way to initialize the
controller and then probe that one controller only.  This needs to be
in addition to the sysinit mechanisms.

: To get around this I added a "probed" flag to the
: controller softc structure.  It would be better if devices could be 
: probed as part of the controller probe.  Then maybe as the controller 
: is removed those devices could be removed.

I did a preliminary port to pccard a long time ago, but soren changed
things too much to use them.  When I did that, I broke up the massive
loop which probed all the controllers.  I made it a loop that called a 
new routine that had the guts of the loop in it and made my attach
routine call that new function.

: This also implies a complexity in how devices are named and device
: names are reclaimed.  I guess worst case the ATA_STATIC_ID option
: could be used initially.  I guess we could look to cam and see how 
: they deal with adding devices.  I hate to have device ad45 after
: swaping several cards around with different devices.

Yes.  ATA_STATIC_ID doesn't interact well wth dynamic devices.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912312155.OAA18246>