Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: fix host device registering when nodemgr disabled
  ieee1394: video1394: DMA fix
  ieee1394: raw1394: prevent unloading of low-level driver
  ieee1394: dv1394: tidy up card removal
  ieee1394: dv1394: fix CardBus card ejection
  ieee1394: sbp2: lower block queue alignment requirement
  ieee1394: sbp2: remove bogus "emulated" host flag
  ieee1394: save one word in struct hpsb_host
  ieee1394: restore config ROM when resuming
  ieee1394: ohci1394: drop pcmcia-cs compatibility code
  ieee1394: nodemgr: check info_length in ROM header earlier
  the scheduled IEEE1394_OUI_DB removal
  the scheduled IEEE1394_EXPORT_FULL_API removal
  ieee1394: sbp2: use a better wildcard for blacklist
  Add PCI class ID for firewire OHCI controllers.
  ieee1394: modified csr1212_key_id_type_map to support lisight
  • Loading branch information
Linus Torvalds committed Feb 9, 2007
2 parents beda9f3 + 91efa46 commit 6410610
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 7,280 deletions.
16 changes: 0 additions & 16 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,6 @@ Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>

---------------------------

What: ieee1394 core's unused exports (CONFIG_IEEE1394_EXPORT_FULL_API)
When: January 2007
Why: There are no projects known to use these exported symbols, except
dfg1394 (uses one symbol whose functionality is core-internal now).
Who: Stefan Richter <stefanr@s5r6.in-berlin.de>

---------------------------

What: ieee1394's *_oui sysfs attributes (CONFIG_IEEE1394_OUI_DB)
When: January 2007
Files: drivers/ieee1394/: oui.db, oui2c.sh
Why: big size, little value
Who: Stefan Richter <stefanr@s5r6.in-berlin.de>

---------------------------

What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
When: December 2006
Why: V4L1 AP1 was replaced by V4L2 API. during migration from 2.4 to 2.6
Expand Down
1 change: 0 additions & 1 deletion drivers/ieee1394/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions drivers/ieee1394/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ config IEEE1394_VERBOSEDEBUG
Say Y if you really want or need the debugging output, everyone
else says N.

config IEEE1394_OUI_DB
bool "OUI Database built-in (deprecated)"
depends on IEEE1394
help
If you say Y here, then an OUI list (vendor unique ID's) will be
compiled into the ieee1394 module. This doesn't really do much
except being able to display the vendor of a hardware node. The
downside is that it adds about 300k to the size of the module,
or kernel (depending on whether you compile ieee1394 as a
module, or static in the kernel).

This option is not needed for userspace programs like gscanbus
to show this information.

config IEEE1394_EXTRA_CONFIG_ROMS
bool "Build in extra config rom entries for certain functionality"
depends on IEEE1394
Expand All @@ -66,13 +52,6 @@ config IEEE1394_CONFIG_ROM_IP1394
with MacOSX and WinXP IP-over-1394), enable this option and the
eth1394 option below.

config IEEE1394_EXPORT_FULL_API
bool "Export all symbols of ieee1394's API (deprecated)"
depends on IEEE1394
default n
help
This option will be removed soon. Don't worry, say N.
comment "Device Drivers"
depends on IEEE1394

Expand Down
10 changes: 0 additions & 10 deletions drivers/ieee1394/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
ieee1394-objs := ieee1394_core.o ieee1394_transactions.o hosts.o \
highlevel.o csr.o nodemgr.o dma.o iso.o \
csr1212.o config_roms.o
ifdef CONFIG_IEEE1394_OUI_DB
ieee1394-objs += oui.o
endif

obj-$(CONFIG_IEEE1394) += ieee1394.o
obj-$(CONFIG_IEEE1394_PCILYNX) += pcilynx.o
Expand All @@ -18,10 +15,3 @@ obj-$(CONFIG_IEEE1394_SBP2) += sbp2.o
obj-$(CONFIG_IEEE1394_DV1394) += dv1394.o
obj-$(CONFIG_IEEE1394_ETH1394) += eth1394.o

quiet_cmd_oui2c = OUI2C $@
cmd_oui2c = $(CONFIG_SHELL) $(srctree)/$(src)/oui2c.sh < $< > $@

targets := oui.c
$(obj)/oui.o: $(obj)/oui.c
$(obj)/oui.c: $(src)/oui.db $(src)/oui2c.sh FORCE
$(call if_changed,oui2c)
15 changes: 9 additions & 6 deletions drivers/ieee1394/csr1212.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
#define __D (1 << CSR1212_KV_TYPE_DIRECTORY)
#define __L (1 << CSR1212_KV_TYPE_LEAF)
static const u_int8_t csr1212_key_id_type_map[0x30] = {
0, /* Reserved */
__C, /* used by Apple iSight */
__D | __L, /* Descriptor */
__I | __D | __L, /* Bus_Dependent_Info */
__I | __D | __L, /* Vendor */
__I, /* Hardware_Version */
0, 0, /* Reserved */
__D | __L, /* Module */
0, 0, 0, 0, /* Reserved */
__D | __L | __I, /* Module */
__I, 0, 0, 0, /* used by Apple iSight, Reserved */
__I, /* Node_Capabilities */
__L, /* EUI_64 */
0, 0, 0, /* Reserved */
Expand Down Expand Up @@ -1234,6 +1234,12 @@ static int csr1212_parse_bus_info_block(struct csr1212_csr *csr)
csr->private);
if (ret != CSR1212_SUCCESS)
return ret;

/* check ROM header's info_length */
if (i == 0 &&
CSR1212_BE32_TO_CPU(csr->cache_head->data[0]) >> 24 !=
bytes_to_quads(csr->bus_info_len) - 1)
return CSR1212_EINVAL;
}

bi = (struct csr1212_bus_info_block_img*)csr->cache_head->data;
Expand All @@ -1250,9 +1256,6 @@ static int csr1212_parse_bus_info_block(struct csr1212_csr *csr)
return ret;
}

if (bytes_to_quads(csr->bus_info_len - sizeof(csr1212_quad_t)) != bi->length)
return CSR1212_EINVAL;

#if 0
/* Apparently there are too many differnt wrong implementations of the
* CRC algorithm that verifying them is moot. */
Expand Down
46 changes: 17 additions & 29 deletions drivers/ieee1394/dv1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -2255,49 +2255,37 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes
return 0;
}

static void dv1394_un_init(struct video_card *video)
static void dv1394_remove_host(struct hpsb_host *host)
{
/* obviously nobody has the driver open at this point */
do_dv1394_shutdown(video, 1);
kfree(video);
}


static void dv1394_remove_host (struct hpsb_host *host)
{
struct video_card *video;
struct video_card *video, *tmp_video;
unsigned long flags;
int id = host->id;
int found_ohci_card = 0;

/* We only work with the OHCI-1394 driver */
if (strcmp(host->driver->name, OHCI1394_DRIVER_NAME))
return;

/* find the corresponding video_cards */
do {
struct video_card *tmp_vid;

video = NULL;

spin_lock_irqsave(&dv1394_cards_lock, flags);
list_for_each_entry(tmp_vid, &dv1394_cards, list) {
if ((tmp_vid->id >> 2) == id) {
list_del(&tmp_vid->list);
video = tmp_vid;
list_for_each_entry(tmp_video, &dv1394_cards, list) {
if ((tmp_video->id >> 2) == host->id) {
list_del(&tmp_video->list);
video = tmp_video;
found_ohci_card = 1;
break;
}
}
spin_unlock_irqrestore(&dv1394_cards_lock, flags);

if (video)
dv1394_un_init(video);
} while (video != NULL);
if (video) {
do_dv1394_shutdown(video, 1);
kfree(video);
}
} while (video);

class_device_destroy(hpsb_protocol_class,
MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)));
if (found_ohci_card)
class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR,
IEEE1394_MINOR_BLOCK_DV1394 * 16 + (host->id << 2)));
}

static void dv1394_add_host (struct hpsb_host *host)
static void dv1394_add_host(struct hpsb_host *host)
{
struct ti_ohci *ohci;
int id = host->id;
Expand Down
13 changes: 8 additions & 5 deletions drivers/ieee1394/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,19 @@ int hpsb_add_host(struct hpsb_host *host)
{
if (hpsb_default_host_entry(host))
return -ENOMEM;

hpsb_add_extra_config_roms(host);

highlevel_add_host(host);

return 0;
}

void hpsb_resume_host(struct hpsb_host *host)
{
if (host->driver->set_hw_config_rom)
host->driver->set_hw_config_rom(host,
host->csr.rom->bus_info_data);
host->driver->devctl(host, RESET_BUS, SHORT_RESET);
}

void hpsb_remove_host(struct hpsb_host *host)
{
host->is_shutdown = 1;
Expand All @@ -206,9 +211,7 @@ void hpsb_remove_host(struct hpsb_host *host)
flush_scheduled_work();

host->driver = &dummy_driver;

highlevel_remove_host(host);

hpsb_remove_extra_config_roms(host);

class_device_unregister(&host->class_dev);
Expand Down
7 changes: 4 additions & 3 deletions drivers/ieee1394/hosts.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ struct hpsb_host {
struct device device;
struct class_device class_dev;

int update_config_rom;
struct delayed_work delayed_reset;
unsigned int config_roms;
unsigned config_roms:31;
unsigned update_config_rom:1;

struct list_head addr_space;
u64 low_addr_space; /* upper bound of physical DMA area */
Expand Down Expand Up @@ -200,7 +200,8 @@ struct hpsb_host_driver {
struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
struct device *dev);
int hpsb_add_host(struct hpsb_host *host);
void hpsb_remove_host(struct hpsb_host *h);
void hpsb_resume_host(struct hpsb_host *host);
void hpsb_remove_host(struct hpsb_host *host);

/* Updates the configuration rom image of a host. rom_version must be the
* current version, otherwise it will fail with return value -1. If this
Expand Down
23 changes: 1 addition & 22 deletions drivers/ieee1394/ieee1394_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ module_exit(ieee1394_cleanup);
/** hosts.c **/
EXPORT_SYMBOL(hpsb_alloc_host);
EXPORT_SYMBOL(hpsb_add_host);
EXPORT_SYMBOL(hpsb_resume_host);
EXPORT_SYMBOL(hpsb_remove_host);
EXPORT_SYMBOL(hpsb_update_config_rom_image);

Expand All @@ -1195,10 +1196,6 @@ EXPORT_SYMBOL(hpsb_selfid_complete);
EXPORT_SYMBOL(hpsb_packet_sent);
EXPORT_SYMBOL(hpsb_packet_received);
EXPORT_SYMBOL_GPL(hpsb_disable_irm);
#ifdef CONFIG_IEEE1394_EXPORT_FULL_API
EXPORT_SYMBOL(hpsb_send_phy_config);
EXPORT_SYMBOL(hpsb_send_packet_and_wait);
#endif

/** ieee1394_transactions.c **/
EXPORT_SYMBOL(hpsb_get_tlabel);
Expand Down Expand Up @@ -1229,20 +1226,12 @@ EXPORT_SYMBOL(hpsb_set_hostinfo_key);
EXPORT_SYMBOL(hpsb_get_hostinfo_bykey);
EXPORT_SYMBOL(hpsb_set_hostinfo);
EXPORT_SYMBOL(highlevel_host_reset);
#ifdef CONFIG_IEEE1394_EXPORT_FULL_API
EXPORT_SYMBOL(highlevel_add_host);
EXPORT_SYMBOL(highlevel_remove_host);
#endif

/** nodemgr.c **/
EXPORT_SYMBOL(hpsb_node_fill_packet);
EXPORT_SYMBOL(hpsb_node_write);
EXPORT_SYMBOL(__hpsb_register_protocol);
EXPORT_SYMBOL(hpsb_unregister_protocol);
#ifdef CONFIG_IEEE1394_EXPORT_FULL_API
EXPORT_SYMBOL(ieee1394_bus_type);
EXPORT_SYMBOL(nodemgr_for_each_host);
#endif

/** csr.c **/
EXPORT_SYMBOL(hpsb_update_config_rom);
Expand Down Expand Up @@ -1287,13 +1276,3 @@ EXPORT_SYMBOL(csr1212_read);
EXPORT_SYMBOL(csr1212_parse_keyval);
EXPORT_SYMBOL(_csr1212_read_keyval);
EXPORT_SYMBOL(_csr1212_destroy_keyval);
#ifdef CONFIG_IEEE1394_EXPORT_FULL_API
EXPORT_SYMBOL(csr1212_create_csr);
EXPORT_SYMBOL(csr1212_init_local_csr);
EXPORT_SYMBOL(csr1212_new_immediate);
EXPORT_SYMBOL(csr1212_associate_keyval);
EXPORT_SYMBOL(csr1212_new_string_descriptor_leaf);
EXPORT_SYMBOL(csr1212_destroy_csr);
EXPORT_SYMBOL(csr1212_generate_csr_image);
EXPORT_SYMBOL(csr1212_parse_csr);
#endif
Loading

0 comments on commit 6410610

Please sign in to comment.