From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MF4qV-0006Ss-Qq for qemu-devel@nongnu.org; Fri, 12 Jun 2009 07:22:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MF4qR-0006SE-9P for qemu-devel@nongnu.org; Fri, 12 Jun 2009 07:22:55 -0400 Received: from [199.232.76.173] (port=57244 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MF4qQ-0006SB-Ue for qemu-devel@nongnu.org; Fri, 12 Jun 2009 07:22:51 -0400 Received: from mx20.gnu.org ([199.232.41.8]:20282) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MF4qQ-0003j7-KU for qemu-devel@nongnu.org; Fri, 12 Jun 2009 07:22:50 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MF4qP-00059Y-Bc for qemu-devel@nongnu.org; Fri, 12 Jun 2009 07:22:49 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 3/4] qdev: very first cut of scsi bus support. Date: Fri, 12 Jun 2009 12:22:45 +0100 References: <1244798921-23262-1-git-send-email-kraxel@redhat.com> <1244798921-23262-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1244798921-23262-4-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906121222.46360.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann On Friday 12 June 2009, Gerd Hoffmann wrote: > + > + if (bus) { > + d = scsi_create_simple(bus, "scsi-disk"); > + } else { > + /* temporary until usb is qdev-ified */ > + d = (SCSIDevice *)qemu_mallocz(sizeof(SCSIDevice)); >+static void scsi_disk_initfn(SCSIDevice *dev) >+{ >+ /* TODO */ >+} These are both fairly good indicators that this patch is nowhere near ready for integration. The whole point of the qdev API is to abstract device creation from individual device implementation details. Your implementation has the abstraction layers completely backwards. The I2C code is an example of how a secondary bus should work. Paul