Commit 9b67c27b authored by Ben Collins's avatar Ben Collins Committed by Linus Torvalds

[PATCH] Lastminute IEEE-1394 fixes

I've got a lot more changes than what's included here.  I've put this
down to the bear minimum to get things working sanely.

Mainly, I just want to get all the people hit by this a chance to use
2.6.0 without having to get our tree. Changes itemized:

 - Fix deadlock possibility in csr.c:read_maps()
 - Fix kmalloc to use ATOMIC in highlevel.c.
 - s/in_interrupt/irqs_disabled/ in ieee1394_transactions.c to fix
   warnings when transactions occured.
 - Introduce a release callback for the host driver and use it correctly.
 - Reorganize the nodemgr probe so we do an initial scan to discover
   devices, check IRM/CycleMaster, then do a final full probe when things
   are kosher. Fixes a problem where device registration and hotplug
   would cause some serious problems when a bus reset was forced in the
   middle of the probe.
parent 66e7a091
......@@ -202,6 +202,7 @@ static int read_maps(struct hpsb_host *host, int nodeid, quadlet_t *buffer,
if (csraddr < CSR_TOPOLOGY_MAP) {
if (csraddr + length > CSR_CONFIG_ROM + host->csr.rom_size) {
spin_unlock_irqrestore(&host->csr.lock, flags);
return RCODE_ADDRESS_ERROR;
}
src = ((char *)host->csr.rom) + csraddr - CSR_CONFIG_ROM;
......
......@@ -98,7 +98,7 @@ void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host,
return NULL;
}
hi = kmalloc(sizeof(*hi) + data_size, GFP_KERNEL);
hi = kmalloc(sizeof(*hi) + data_size, GFP_ATOMIC);
if (!hi)
return NULL;
......
......@@ -92,7 +92,7 @@ void hpsb_unref_host(struct hpsb_host *host)
down(&hpsb_hosts_lock);
if (atomic_dec_and_test(&host->refcount) && host->is_shutdown)
kfree(host);
device_unregister(&host->device);
up(&hpsb_hosts_lock);
}
......
......@@ -137,7 +137,7 @@ int hpsb_get_tlabel(struct hpsb_packet *packet)
tp = &packet->host->tpool[packet->node_id & NODE_MASK];
if (in_interrupt() || in_atomic()) {
if (irqs_disabled() || in_atomic()) {
if (down_trylock(&tp->count))
return 1;
} else {
......
......@@ -13,9 +13,6 @@
#include <asm/byteorder.h>
/* The great kdev_t changeover in 2.5.x */
#include <linux/kdev_t.h>
/* Transaction Label handling */
struct hpsb_tlabel_pool {
DECLARE_BITMAP(pool, 64);
......
This diff is collapsed.
......@@ -130,6 +130,7 @@ struct node_entry {
struct hpsb_host *host; /* Host this node is attached to */
nodeid_t nodeid; /* NodeID */
struct bus_options busopt; /* Bus Options */
int needs_probe;
unsigned int generation; /* Synced with hpsb generation */
/* The following is read from the config rom */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment