Date: Sat, 6 Feb 1999 18:30:01 -0800 (PST) From: Adrian Filipi-Martin <adrian@ubergeeks.com> To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/9927: miltichannel scsi 3940 channel swapping problem Message-ID: <199902070230.SAA08667@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/9927; it has been noted by GNATS. From: Adrian Filipi-Martin <adrian@ubergeeks.com> To: "Daniel C. Sobral" <dcs@newsguy.com> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/9927: miltichannel scsi 3940 channel swapping problem Date: Sat, 6 Feb 1999 21:28:12 -0500 (EST) On Sun, 7 Feb 1999, Daniel C. Sobral wrote: > > As a result the boot disk shows up as da1. This is sort of ok > > except that the BIOS reports this device as drive 0, and not drive 1. > > This confuses the hell out of the new bootblocks. To boot I > > must have "0:da(1,a)kernel" in /boot.config. The new loader doesn't > > like the fact that da1 == BIOS 0 either. > > set root_disk_unit=1 does not help? Well, no it didn't the last time I tried. But this was actually before the new bootblocks became the default, so I decided to try the loader again. I suppose I really am using the new boot blocks, and that the loader is the first boot stage that doesn't grok my hardware configuration. I discussed the loader problem with Robert Nordier a few weeks ago, but I now see real that the problem is with ahc and not the loader. For the sake of completeness, here's what I see on my box, including trying your suggestion. scenario 1: With no /boot.config: pressed space to get "boot: " prompt. defaults to 0:da(0,a)/boot/loader pressed enter to load loader announces that btx loader is using the following bios mapping: a: -> disk0 c: -> disk1 d: -> disk2 pressed enter to load kernel loads kernel, but panics when mounting root from wrong disk. secenario 2: With no /boot.config: pressed space to get "boot: " prompt. defaults to 0:da(0,a)/boot/loader pressed enter to load loader announces that btx loader is using the following bios mapping: a: -> disk0 c: -> disk1 d: -> disk2 pressed space to get loader prompt. show currdev == loaddev == disk1s2a set root_disk_unit=1 boot -s loads kernel, but panics when mounting root from wrong disk. secenario 3: With no /boot.config: pressed space to get "boot: " prompt. entered 0:da(1,a)/boot/loader pressed enter to load loader announces that btx loader is using the following bios mapping: a: -> disk0 c: -> disk1 d: -> disk2 pressed space to get loader prompt. show currdev == loaddev == disk2s2a cannot do 'ls' or load kernel. set root_disk_unit=1 cannot do 'ls' or load kernel. unset root_disk_unit set currdev=disk1s2a ls works now, but still cannot load kernel set root_disk_unit=1 ls still works, and cannot load kernel As I mentioned above, I believe the problem is that the ahc driver isn't correctly handling the switched SCSI channels. The code in /sys/dev/aic7xxx/aic7xxx.c is not doing the right thing. It does try. See aic7xxx.c near line 987: /* * Attach secondary channel first if the user has * declared it the primary channel. */ if ((ahc->flags & AHC_CHANNEL_B_PRIMARY) != 0) { bus_id = 1; bus_id2 = 0; } else { bus_id = 0; bus_id2 = 1; } The "ahc->flags & AHC_CHANNEL_B_PRIMARY" test is never true. I tried examining some of the other flags for the correct bit, but when I did fine one that changed when I switch the primnary channel, it caused other problems, so I don't think I had it correct. thanks, Adrian -- [ adrian@ubergeeks.com -- Ubergeeks Consulting -- http://www.ubergeeks.com/ ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902070230.SAA08667>