From owner-freebsd-arch@FreeBSD.ORG Wed Jul 28 18:33:59 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68CF016A4CE for ; Wed, 28 Jul 2004 18:33:59 +0000 (GMT) Received: from imf19aec.mail.bellsouth.net (imf19aec.mail.bellsouth.net [205.152.59.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCE2A43D5A for ; Wed, 28 Jul 2004 18:33:58 +0000 (GMT) (envelope-from sah@coraid.com) Received: from coraid.com ([68.19.5.244]) by imf19aec.mail.bellsouth.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with SMTP id <20040728183344.ELWU1792.imf19aec.mail.bellsouth.net@coraid.com> for ; Wed, 28 Jul 2004 14:33:44 -0400 Message-Id: <20040728183344.ELWU1792.imf19aec.mail.bellsouth.net@coraid.com> Date: Wed, 28 Jul 2004 14:33:58 -0400 From: sah@coraid.com To: undisclosed-recipients: ; X-Mailman-Approved-At: Thu, 29 Jul 2004 11:58:19 +0000 Subject: AoE & driver tips X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 18:33:59 -0000 Hello, I'm in the process of writing a AoE disk/protocol driver for freebsd. AoE (ATA over Ethernet) is used to access ATA devices attached directly to the Ethernet using the AoE registered Ethernet protocol type 0x88a2. I have already written a driver for linux 2.4 and 2.6 that makes AoE devices show up as local disks. I'm hoping to do the same for freebsd. I have some questions from my initial perusal of the code. I've been looking at the code in sys/dev/ata/ for tips on plugging into the disk device layer. It appears that what I want is disk_create && disk_destroy. How is the parameter "unit" related to device major & minor? I don't see anywhere where major and minor are related to the disk structure, though perhaps I'm just missing it. Do I need to register a device major? If a device fails or vanishes, can i just fail the outstanding bios and disk_destroy it? How does freebsd do SMART on ata? I'd like to be able to plug into this as well if the system uses it. Any other tips/comments about gluing together the disk & network would be appreciated. Cheers, Sam sah@coraid.com