Subject: Cardbus SIL3112 Sata Driver Development: Request for Help
To: None <email@example.com>
From: Phil Quinton <firstname.lastname@example.org>
Date: 09/19/2005 10:54:36
OK, looking into writing a driver for my Silicon Image 3112 Cardbus
SATA card... I'm trying to base it on the current satalink driver.
This is the first driver I've actually attempted, ever, and the first
time I've coded anything for NetBSD... so please don't assume that I
After trawling through the interfaces in the dev/cardbus directory I've
come across my first problem...
In the *_cardbus_attach() functions, the drivers tend to setup the
cardbus card... and at the end call the *_attach() function of a driver
in the dev/ic directory. This dev/ic driver usually takes one
parameter... which is the relevant softc struct. The satalink driver,
however, hasn't been written like this.
The dev/pci/satalink driver's attach() function seems very simple, it
looks like this:
satalink_attach(struct device *parent, struct device *self, void *aux)
struct pci_attach_args *pa = aux;
struct pciide_softc *sc = (struct pciide_softc *)self;
Question 1: How do I get the relavent *aux to pass to
pciide_common_attach in my cardbus driver, since the *aux that passed to
the cardbus interface is cast as cardbus_attach_args?
or am I barking up the wrong tree?
Thanks in advance,