Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40caf5ea authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (56 commits)
  ieee1394: remove garbage from Kconfig
  ieee1394: more help in Kconfig
  ieee1394: ohci1394: Fix mistake in printk message.
  ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register
  ieee1394: ohci1394: fix cosmetic problem in error logging
  ieee1394: eth1394: send async streams at S100 on 1394b buses
  ieee1394: eth1394: fix error path in module_init
  ieee1394: eth1394: correct return codes in hard_start_xmit
  ieee1394: eth1394: hard_start_xmit is called in atomic context
  ieee1394: eth1394: some conditions are unlikely
  ieee1394: eth1394: clean up fragment_overlap
  ieee1394: eth1394: don't use alloc_etherdev
  ieee1394: eth1394: omit useless set_mac_address callback
  ieee1394: eth1394: CONFIG_INET is always defined
  ieee1394: eth1394: allow MTU bigger than 1500
  ieee1394: unexport highlevel_host_reset
  ieee1394: eth1394: contain host reset
  ieee1394: eth1394: shorter error messages
  ieee1394: eth1394: correct a memset argument
  ieee1394: eth1394: refactor .probe and .update
  ...
parents d6454706 bcfd09ee
Loading
Loading
Loading
Loading
+21 −31
Original line number Diff line number Diff line
# -*- shell-script -*-

menu "IEEE 1394 (FireWire) support"

config IEEE1394
	tristate "IEEE 1394 (FireWire) support"
	depends on PCI || BROKEN
	select NET
	help
	  IEEE 1394 describes a high performance serial bus, which is also
	  known as FireWire(tm) or i.Link(tm) and is used for connecting all
@@ -35,24 +32,7 @@ config IEEE1394_VERBOSEDEBUG
	  Say Y if you really want or need the debugging output, everyone
	  else says N.

config IEEE1394_EXTRA_CONFIG_ROMS
	bool "Build in extra config rom entries for certain functionality"
	depends on IEEE1394
	help
	  Some IEEE1394 functionality depends on extra config rom entries
	  being available in the host adapters CSR. These options will
	  allow you to choose which ones.

config IEEE1394_CONFIG_ROM_IP1394
	bool "IP-1394 Entry"
	depends on IEEE1394_EXTRA_CONFIG_ROMS && IEEE1394
	help
	  Adds an entry for using IP-over-1394. If you want to use your
	  IEEE1394 bus as a network for IP systems (including interacting
	  with MacOSX and WinXP IP-over-1394), enable this option and the
	  eth1394 option below.

comment "Device Drivers"
comment "Controllers"
	depends on IEEE1394

comment "Texas Instruments PCILynx requires I2C"
@@ -70,6 +50,10 @@ config IEEE1394_PCILYNX
	  To compile this driver as a module, say M here: the
	  module will be called pcilynx.

	  Only some old and now very rare PCI and CardBus cards and
	  PowerMacs G3 B&W contain the PCILynx controller.  Therefore
	  almost everybody can say N here.

config IEEE1394_OHCI1394
	tristate "OHCI-1394 support"
	depends on PCI && IEEE1394
@@ -83,7 +67,7 @@ config IEEE1394_OHCI1394
	  To compile this driver as a module, say M here: the
	  module will be called ohci1394.

comment "Protocol Drivers"
comment "Protocols"
	depends on IEEE1394

config IEEE1394_VIDEO1394
@@ -121,11 +105,15 @@ config IEEE1394_SBP2_PHYS_DMA
	  This option is buggy and currently broken on some architectures.
	  If unsure, say N.

config IEEE1394_ETH1394_ROM_ENTRY
	depends on IEEE1394
	bool
	default n

config IEEE1394_ETH1394
	tristate "Ethernet over 1394"
	tristate "IP over 1394"
	depends on IEEE1394 && EXPERIMENTAL && INET
	select IEEE1394_CONFIG_ROM_IP1394
	select IEEE1394_EXTRA_CONFIG_ROMS
	select IEEE1394_ETH1394_ROM_ENTRY
	help
	  This driver implements a functional majority of RFC 2734: IPv4 over
	  1394.  It will provide IP connectivity with implementations of RFC
@@ -134,6 +122,8 @@ config IEEE1394_ETH1394
	  This driver is still considered experimental.  It does not yet support
	  MCAP, therefore multicast support is significantly limited.

	  The module is called eth1394 although it does not emulate Ethernet.

config IEEE1394_DV1394
	tristate "OHCI-DV I/O support (deprecated)"
	depends on IEEE1394 && IEEE1394_OHCI1394
@@ -146,12 +136,12 @@ config IEEE1394_RAWIO
	tristate "Raw IEEE1394 I/O support"
	depends on IEEE1394
	help
	  Say Y here if you want support for the raw device. This is generally
	  a good idea, so you should say Y here. The raw device enables
	  direct communication of user programs with the IEEE 1394 bus and
	  thus with the attached peripherals.
	  This option adds support for the raw1394 device file which enables
	  direct communication of user programs with the IEEE 1394 bus and thus
	  with the attached peripherals.  Almost all application programs which
	  access FireWire require this option.

	  To compile this driver as a module, say M here: the
	  module will be called raw1394.
	  To compile this driver as a module, say M here: the module will be
	  called raw1394.

endmenu
+26 −67
Original line number Diff line number Diff line
@@ -26,12 +26,6 @@ struct hpsb_config_rom_entry {
	/* Base initialization, called at module load */
	int (*init)(void);

	/* Add entry to specified host */
	int (*add)(struct hpsb_host *host);

	/* Remove entry from specified host */
	void (*remove)(struct hpsb_host *host);

	/* Cleanup called at module exit */
	void (*cleanup)(void);

@@ -39,7 +33,7 @@ struct hpsb_config_rom_entry {
	unsigned int flag;
};


/* The default host entry. This must succeed. */
int hpsb_default_host_entry(struct hpsb_host *host)
{
	struct csr1212_keyval *root;
@@ -63,9 +57,9 @@ int hpsb_default_host_entry(struct hpsb_host *host)
		return -ENOMEM;
	}

	ret = csr1212_associate_keyval(vend_id, text);
	csr1212_associate_keyval(vend_id, text);
	csr1212_release_keyval(text);
	ret |= csr1212_attach_keyval_to_directory(root, vend_id);
	ret = csr1212_attach_keyval_to_directory(root, vend_id);
	csr1212_release_keyval(vend_id);
	if (ret != CSR1212_SUCCESS) {
		csr1212_destroy_csr(host->csr.rom);
@@ -78,7 +72,7 @@ int hpsb_default_host_entry(struct hpsb_host *host)
}


#ifdef CONFIG_IEEE1394_CONFIG_ROM_IP1394
#ifdef CONFIG_IEEE1394_ETH1394_ROM_ENTRY
#include "eth1394.h"

static struct csr1212_keyval *ip1394_ud;
@@ -103,10 +97,12 @@ static int config_rom_ip1394_init(void)
	if (!ip1394_ud || !spec_id || !spec_desc || !ver || !ver_desc)
		goto ip1394_fail;

	if (csr1212_associate_keyval(spec_id, spec_desc) == CSR1212_SUCCESS &&
	    csr1212_associate_keyval(ver, ver_desc) == CSR1212_SUCCESS &&
	    csr1212_attach_keyval_to_directory(ip1394_ud, spec_id) == CSR1212_SUCCESS &&
	    csr1212_attach_keyval_to_directory(ip1394_ud, ver) == CSR1212_SUCCESS)
	csr1212_associate_keyval(spec_id, spec_desc);
	csr1212_associate_keyval(ver, ver_desc);
	if (csr1212_attach_keyval_to_directory(ip1394_ud, spec_id)
			== CSR1212_SUCCESS &&
	    csr1212_attach_keyval_to_directory(ip1394_ud, ver)
			== CSR1212_SUCCESS)
		ret = 0;

ip1394_fail:
@@ -135,7 +131,7 @@ static void config_rom_ip1394_cleanup(void)
	}
}

static int config_rom_ip1394_add(struct hpsb_host *host)
int hpsb_config_rom_ip1394_add(struct hpsb_host *host)
{
	if (!ip1394_ud)
		return -ENODEV;
@@ -144,92 +140,55 @@ static int config_rom_ip1394_add(struct hpsb_host *host)
					       ip1394_ud) != CSR1212_SUCCESS)
		return -ENOMEM;

	host->config_roms |= HPSB_CONFIG_ROM_ENTRY_IP1394;
	host->update_config_rom = 1;
	return 0;
}
EXPORT_SYMBOL_GPL(hpsb_config_rom_ip1394_add);

static void config_rom_ip1394_remove(struct hpsb_host *host)
void hpsb_config_rom_ip1394_remove(struct hpsb_host *host)
{
	csr1212_detach_keyval_from_directory(host->csr.rom->root_kv, ip1394_ud);
	host->config_roms &= ~HPSB_CONFIG_ROM_ENTRY_IP1394;
	host->update_config_rom = 1;
}
EXPORT_SYMBOL_GPL(hpsb_config_rom_ip1394_remove);

static struct hpsb_config_rom_entry ip1394_entry = {
	.name		= "ip1394",
	.init		= config_rom_ip1394_init,
	.add		= config_rom_ip1394_add,
	.remove		= config_rom_ip1394_remove,
	.cleanup	= config_rom_ip1394_cleanup,
	.flag		= HPSB_CONFIG_ROM_ENTRY_IP1394,
};
#endif /* CONFIG_IEEE1394_CONFIG_ROM_IP1394 */

#endif /* CONFIG_IEEE1394_ETH1394_ROM_ENTRY */

static struct hpsb_config_rom_entry *const config_rom_entries[] = {
#ifdef CONFIG_IEEE1394_CONFIG_ROM_IP1394
#ifdef CONFIG_IEEE1394_ETH1394_ROM_ENTRY
	&ip1394_entry,
#endif
	NULL,
};


/* Initialize all config roms */
int hpsb_init_config_roms(void)
{
	int i, error = 0;

	for (i = 0; config_rom_entries[i]; i++) {
		if (!config_rom_entries[i]->init)
			continue;

	for (i = 0; i < ARRAY_SIZE(config_rom_entries); i++)
		if (config_rom_entries[i]->init()) {
			HPSB_ERR("Failed to initialize config rom entry `%s'",
				 config_rom_entries[i]->name);
			error = -1;
		} else
			HPSB_DEBUG("Initialized config rom entry `%s'",
				   config_rom_entries[i]->name);
		}

	return error;
}

/* Cleanup all config roms */
void hpsb_cleanup_config_roms(void)
{
	int i;

	for (i = 0; config_rom_entries[i]; i++) {
		if (config_rom_entries[i]->cleanup)
	for (i = 0; i < ARRAY_SIZE(config_rom_entries); i++)
		config_rom_entries[i]->cleanup();
}
}

int hpsb_add_extra_config_roms(struct hpsb_host *host)
{
	int i, error = 0;

	for (i = 0; config_rom_entries[i]; i++) {
		if (config_rom_entries[i]->add(host)) {
			HPSB_ERR("fw-host%d: Failed to attach config rom entry `%s'",
				 host->id, config_rom_entries[i]->name);
			error = -1;
		} else {
			host->config_roms |= config_rom_entries[i]->flag;
			host->update_config_rom = 1;
		}
	}

	return error;
}

void hpsb_remove_extra_config_roms(struct hpsb_host *host)
{
	int i;

	for (i = 0; config_rom_entries[i]; i++) {
		if (!(host->config_roms & config_rom_entries[i]->flag))
			continue;

		config_rom_entries[i]->remove(host);

		host->config_roms &= ~config_rom_entries[i]->flag;
		host->update_config_rom = 1;
	}
}
+6 −14
Original line number Diff line number Diff line
#ifndef _IEEE1394_CONFIG_ROMS_H
#define _IEEE1394_CONFIG_ROMS_H

#include "ieee1394_types.h"
#include "hosts.h"
struct hpsb_host;

/* The default host entry. This must succeed. */
int hpsb_default_host_entry(struct hpsb_host *host);

/* Initialize all config roms */
int hpsb_init_config_roms(void);

/* Cleanup all config roms */
void hpsb_cleanup_config_roms(void);

/* Add extra config roms to specified host */
int hpsb_add_extra_config_roms(struct hpsb_host *host);

/* Remove extra config roms from specified host */
void hpsb_remove_extra_config_roms(struct hpsb_host *host);


/* List of flags to check if a host contains a certain extra config rom
 * entry. Available in the host->config_roms member. */
#define HPSB_CONFIG_ROM_ENTRY_IP1394		0x00000001

#ifdef CONFIG_IEEE1394_ETH1394_ROM_ENTRY
int hpsb_config_rom_ip1394_add(struct hpsb_host *host);
void hpsb_config_rom_ip1394_remove(struct hpsb_host *host);
#endif

#endif /* _IEEE1394_CONFIG_ROMS_H */
+352 −518

File changed.

Preview size limit exceeded, changes collapsed.

+71 −412

File changed.

Preview size limit exceeded, changes collapsed.

Loading