lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Jun 2013 16:21:20 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Alessandro Rubini <rubini@...dd.com>
Cc:	linux-kernel@...r.kernel.org,
	Juan David Gonzalez Cobas <juan.david.gonzalez.cobas@...n.ch>,
	"Emilio G. Cota" <cota@...ap.org>,
	Samuel Iglesias Gonsalvez <siglesias@...lia.com>,
	Rob Landley <rob@...dley.net>, linux-doc@...r.kernel.org
Subject: Re: [PATCH 2/8] FMC: add needed headers

On Wed, Jun 12, 2013 at 09:13:36AM +0200, Alessandro Rubini wrote:
> +/*
> + * The device reports all information needed to access hw.
> + *
> + * If we have eeprom_len and not contents, the core reads it.
> + * Then, parsing of identifiers is done by the core which fills fmc_fru_id..
> + * Similarly a device that must be matched based on SDB cores must
> + * fill the entry point and the core will scan the bus (FIXME: sdb match)
> + */
> +struct fmc_device {
> +	unsigned long version;
> +	unsigned long flags;
> +	struct module *owner;		/* char device must pin it */
> +	struct fmc_fru_id id;		/* for EEPROM-based match */
> +	struct fmc_operations *op;	/* carrier-provided */
> +	int irq;			/* according to host bus. 0 == none */
> +	int eeprom_len;			/* Usually 8kB, may be less */
> +	int eeprom_addr;		/* 0x50, 0x52 etc */
> +	uint8_t *eeprom;		/* Full contents or leading part */
> +	char *carrier_name;		/* "SPEC" or similar, for special use */
> +	void *carrier_data;		/* "struct spec *" or equivalent */
> +	__iomem void *fpga_base;	/* May be NULL (Etherbone) */
> +	__iomem void *slot_base;	/* Set by the driver */
> +	struct fmc_device **devarray;	/* Allocated by the bus */
> +	int slot_id;			/* Index in the slot array */
> +	int nr_slots;			/* Number of slots in this carrier */
> +	unsigned long memlen;		/* Used for the char device */
> +	struct device dev;		/* For Linux use */
> +	struct device *hwdev;		/* The underlying hardware device */
> +	unsigned long sdbfs_entry;
> +	struct sdb_array *sdb;
> +	uint32_t device_id;		/* Filled by the device */
> +	char *mezzanine_name;		/* Defaults to ``fmc'' */
> +	void *mezzanine_data;
> +};
> +#define to_fmc_device(x) container_of((x), struct fmc_device, dev)
> +
> +#define FMC_DEVICE_HAS_GOLDEN		1
> +#define FMC_DEVICE_HAS_CUSTOM		2
> +#define FMC_DEVICE_NO_MEZZANINE		4
> +#define FMC_DEVICE_MATCH_SDB		8 /* fmc-core must scan sdb in fpga */

Any way you can use MODULE_DEVICE_TABLE() for these devices to get
proper module auto-loading for your drivers?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ