Re: finding pci_dev from scsi_device
From: Herbert Rosmanith
Date: Mon Jun 26 2006 - 10:58:50 EST
> struct pci_dev *pdev = to_pci_dev(probe_ent->dev);
>
> as you can see, you can easily go from an ata_probe_ent to a pci
> device...
just for the sake of completeness:
static int ahci_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) {
struct pci_dev *pdev;
pdev=to_pci_dev(((struct ata_port *)&scsidev->host->hostdata[0])->host_set->dev);
kind regards,
h.rosmanith
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/