From owner-freebsd-mobile Fri Dec 31 13:55:17 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 1D6E31526C for ; Fri, 31 Dec 1999 13:55:14 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id OAA51967; Fri, 31 Dec 1999 14:55:12 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id OAA18246; Fri, 31 Dec 1999 14:55:12 -0700 (MST) Message-Id: <199912312155.OAA18246@harmony.village.org> To: Doug Ambrisko Subject: Re: [ATA/PC-Card,4-current] Patches to ata driver for PC-Card Cc: sanpei@sanpei.org (MIHIRA Sanpei Yoshiro), freebsd-mobile@FreeBSD.ORG In-reply-to: Your message of "Fri, 31 Dec 1999 10:38:18 PST." <199912311838.KAA44694@whistle.com> References: <199912311838.KAA44694@whistle.com> Date: Fri, 31 Dec 1999 14:55:12 -0700 From: Warner Losh Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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