Date: Tue, 03 Apr 2007 13:47:47 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: Roman Divacky <rdivacky@freebsd.org> Cc: freebsd-emulation@freebsd.org Subject: Re: /dev/sga (Linux) SCSI Command Stuff Message-ID: <20070403134747.gtie10l8g04os8k0@webmail.leidinger.net> In-Reply-To: <20070402214258.GA50571@freebsd.org> References: <02e101c77557$c5a68e60$50f3ab20$@org> <20070402204557.GA49440@freebsd.org> <20070402154835.F9231@thebighonker.lerctr.org> <20070402212855.GA50351@freebsd.org> <20070402164027.I11442@thebighonker.lerctr.org> <20070402214258.GA50571@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Roman Divacky <rdivacky@freebsd.org> (from Mon, 2 Apr 2007 =20 23:42:58 +0200): > On Mon, Apr 02, 2007 at 04:41:35PM -0500, Larry Rosenman wrote: >> On Mon, 2 Apr 2007, Roman Divacky wrote: >> >> >On Mon, Apr 02, 2007 at 03:50:23PM -0500, Larry Rosenman wrote: >> >>Also, we don't (AFAIK) expose /dev/sga to the linux world through the >> >>linux-o-lator so I don't even know if what I want is possible. >> > >> >hehe.. guess what.. netbsd supports that :) at least partially. so PLEAS= E >> >test the netbsd somehow so we know that the netbsd support is sufficient >> The box is 150+ miles away stuffed in a colo. It's also my main DNS / Ma= il >> / >> Web server. >> >> Sorry, but I don't think I can do that, at least with the scsi drive. >> >> I do have a new box coming that will have Seagate SATA drives, and might = be >> able to test that..... > > I am in a good mood so I guess I'll port the stuff from netbsd =20 > tomorrow. it looks > very easy. I hope you will test :) linux_util.c rev. 1.30: ---snip--- Enhance the Linux emulation layer to make MegaRAID SAS managements =20 tool happy. Add back in a scheme to emulate old type major/minor numbers via hooks in= to stat, linprocfs to return major/minors that Linux app's expect. Currentl= y only /dev/null is always registered. Drivers can register via the Linux type shim similar to the ioctl shim but by using linux_device_register_handler/linux_device_unregister_handler functions. The structure is: struct linux_device_handler { char *bsd_driver_name; char *linux_driver_name; char *bsd_device_name; char *linux_device_name; int linux_major; int linux_minor; int linux_char_device; }; Linprocfs uses this to display the major number of the driver. The soon to be available linsysfs will use it to fill in the driver name. Linux_stat uses it to translate the major/minor into Linux type values. ---snip--- I didn't look at the implementation, but this struct looks like an =20 translation layer... Bye, Alexander. --=20 BOFH excuse #139: UBNC (user brain not connected) http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070403134747.gtie10l8g04os8k0>