Commit 71780f59 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (31 commits)
  firewire: fw-sbp2: fix DMA mapping of management ORBs
  firewire: fw-sbp2: fix DMA mapping of command ORBs
  firewire: fw-sbp2: fix DMA mapping of S/G tables
  firewire: fw-sbp2: add a boundary check
  firewire: fw-sbp2: correctly align page tables
  firewire: fw-sbp2: memset wants string.h
  firewire: fw-sbp2: use correct speed in sbp2_agent_reset
  firewire: fw-sbp2: correctly dereference by container_of
  firewire: Document userspace ioctl interface.
  firewire: fw-sbp2: implement nonexclusive login
  firewire: fw-sbp2: let SCSI shutdown commands through before logout
  firewire: fw-sbp2: implement max sectors limit for some old bridges
  firewire: simplify a struct type
  firewire: support S100B...S400B and link slower than PHY
  firewire: optimize gap count with 1394b leaf nodes
  firewire: remove unused macro
  firewire: missing newline in printk
  firewire: fw-sbp2: remove unused struct member
  ieee1394: remove old isochronous ABI
  ieee1394: sbp2: change some module parameters from int to bool
  ...
parents 36b77410 7aa48481
What: legacy isochronous ABI of raw1394 (1st generation iso ABI)
Date: June 2007 (scheduled), removed in kernel v2.6.23
Contact: linux1394-devel@lists.sourceforge.net
Description:
The two request types RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN have
been deprecated for quite some time. They are very inefficient as they
come with high interrupt load and several layers of callbacks for each
packet. Because of these deficiencies, the video1394 and dv1394 drivers
and the 3rd-generation isochronous ABI in raw1394 (rawiso) were created.
Users:
libraw1394 users via the long deprecated API raw1394_iso_write,
raw1394_start_iso_write, raw1394_start_iso_rcv, raw1394_stop_iso_rcv
libdc1394, which optionally uses these old libraw1394 calls
alternatively to the more efficient video1394 ABI
...@@ -49,16 +49,6 @@ Who: Adrian Bunk <bunk@stusta.de> ...@@ -49,16 +49,6 @@ Who: Adrian Bunk <bunk@stusta.de>
--------------------------- ---------------------------
What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN
When: June 2007
Why: Deprecated in favour of the more efficient and robust rawiso interface.
Affected are applications which use the deprecated part of libraw1394
(raw1394_iso_write, raw1394_start_iso_write, raw1394_start_iso_rcv,
raw1394_stop_iso_rcv) or bypass libraw1394.
Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
---------------------------
What: old NCR53C9x driver What: old NCR53C9x driver
When: October 2007 When: October 2007
Why: Replaced by the much better esp_scsi driver. Actual low-level Why: Replaced by the much better esp_scsi driver. Actual low-level
......
...@@ -336,8 +336,11 @@ fw_card_bm_work(struct work_struct *work) ...@@ -336,8 +336,11 @@ fw_card_bm_work(struct work_struct *work)
} }
pick_me: pick_me:
/* Now figure out what gap count to set. */ /*
if (card->topology_type == FW_TOPOLOGY_A && * Pick a gap count from 1394a table E-1. The table doesn't cover
* the typically much larger 1394b beta repeater delays though.
*/
if (!card->beta_repeaters_present &&
card->root_node->max_hops < ARRAY_SIZE(gap_count_table)) card->root_node->max_hops < ARRAY_SIZE(gap_count_table))
gap_count = gap_count_table[card->root_node->max_hops]; gap_count = gap_count_table[card->root_node->max_hops];
else else
......
...@@ -397,7 +397,7 @@ static int ioctl_send_request(struct client *client, void *buffer) ...@@ -397,7 +397,7 @@ static int ioctl_send_request(struct client *client, void *buffer)
request->tcode & 0x1f, request->tcode & 0x1f,
device->node->node_id, device->node->node_id,
request->generation, request->generation,
device->node->max_speed, device->max_speed,
request->offset, request->offset,
response->response.data, request->length, response->response.data, request->length,
complete_transaction, response); complete_transaction, response);
......
...@@ -401,8 +401,7 @@ static int read_rom(struct fw_device *device, int index, u32 * data) ...@@ -401,8 +401,7 @@ static int read_rom(struct fw_device *device, int index, u32 * data)
offset = 0xfffff0000400ULL + index * 4; offset = 0xfffff0000400ULL + index * 4;
fw_send_request(device->card, &t, TCODE_READ_QUADLET_REQUEST, fw_send_request(device->card, &t, TCODE_READ_QUADLET_REQUEST,
device->node_id, device->node_id, device->generation, device->max_speed,
device->generation, SCODE_100,
offset, NULL, 4, complete_transaction, &callback_data); offset, NULL, 4, complete_transaction, &callback_data);
wait_for_completion(&callback_data.done); wait_for_completion(&callback_data.done);
...@@ -418,6 +417,8 @@ static int read_bus_info_block(struct fw_device *device) ...@@ -418,6 +417,8 @@ static int read_bus_info_block(struct fw_device *device)
u32 stack[16], sp, key; u32 stack[16], sp, key;
int i, end, length; int i, end, length;
device->max_speed = SCODE_100;
/* First read the bus info block. */ /* First read the bus info block. */
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
if (read_rom(device, i, &rom[i]) != RCODE_COMPLETE) if (read_rom(device, i, &rom[i]) != RCODE_COMPLETE)
...@@ -434,6 +435,33 @@ static int read_bus_info_block(struct fw_device *device) ...@@ -434,6 +435,33 @@ static int read_bus_info_block(struct fw_device *device)
return -1; return -1;
} }
device->max_speed = device->node->max_speed;
/*
* Determine the speed of
* - devices with link speed less than PHY speed,
* - devices with 1394b PHY (unless only connected to 1394a PHYs),
* - all devices if there are 1394b repeaters.
* Note, we cannot use the bus info block's link_spd as starting point
* because some buggy firmwares set it lower than necessary and because
* 1394-1995 nodes do not have the field.
*/
if ((rom[2] & 0x7) < device->max_speed ||
device->max_speed == SCODE_BETA ||
device->card->beta_repeaters_present) {
u32 dummy;
/* for S1600 and S3200 */
if (device->max_speed == SCODE_BETA)
device->max_speed = device->card->link_speed;
while (device->max_speed > SCODE_100) {
if (read_rom(device, 0, &dummy) == RCODE_COMPLETE)
break;
device->max_speed--;
}
}
/* /*
* Now parse the config rom. The config rom is a recursive * Now parse the config rom. The config rom is a recursive
* directory structure so we parse it using a stack of * directory structure so we parse it using a stack of
...@@ -680,8 +708,10 @@ static void fw_device_init(struct work_struct *work) ...@@ -680,8 +708,10 @@ static void fw_device_init(struct work_struct *work)
FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN)
fw_device_shutdown(&device->work.work); fw_device_shutdown(&device->work.work);
else else
fw_notify("created new fw device %s (%d config rom retries)\n", fw_notify("created new fw device %s "
device->device.bus_id, device->config_rom_retries); "(%d config rom retries, S%d00)\n",
device->device.bus_id, device->config_rom_retries,
1 << device->max_speed);
/* /*
* Reschedule the IRM work if we just finished reading the * Reschedule the IRM work if we just finished reading the
......
...@@ -40,6 +40,7 @@ struct fw_device { ...@@ -40,6 +40,7 @@ struct fw_device {
struct fw_node *node; struct fw_node *node;
int node_id; int node_id;
int generation; int generation;
unsigned max_speed;
struct fw_card *card; struct fw_card *card;
struct device device; struct device device;
struct list_head link; struct list_head link;
......
...@@ -1934,12 +1934,12 @@ static int pci_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -1934,12 +1934,12 @@ static int pci_suspend(struct pci_dev *pdev, pm_message_t state)
free_irq(pdev->irq, ohci); free_irq(pdev->irq, ohci);
err = pci_save_state(pdev); err = pci_save_state(pdev);
if (err) { if (err) {
fw_error("pci_save_state failed with %d", err); fw_error("pci_save_state failed\n");
return err; return err;
} }
err = pci_set_power_state(pdev, pci_choose_state(pdev, state)); err = pci_set_power_state(pdev, pci_choose_state(pdev, state));
if (err) { if (err) {
fw_error("pci_set_power_state failed with %d", err); fw_error("pci_set_power_state failed\n");
return err; return err;
} }
...@@ -1955,7 +1955,7 @@ static int pci_resume(struct pci_dev *pdev) ...@@ -1955,7 +1955,7 @@ static int pci_resume(struct pci_dev *pdev)
pci_restore_state(pdev); pci_restore_state(pdev);
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (err) { if (err) {
fw_error("pci_enable_device failed with %d", err); fw_error("pci_enable_device failed\n");
return err; return err;
} }
......
This diff is collapsed.
...@@ -135,17 +135,17 @@ static void update_hop_count(struct fw_node *node) ...@@ -135,17 +135,17 @@ static void update_hop_count(struct fw_node *node)
int i; int i;
for (i = 0; i < node->port_count; i++) { for (i = 0; i < node->port_count; i++) {
if (node->ports[i].node == NULL) if (node->ports[i] == NULL)
continue; continue;
if (node->ports[i].node->max_hops > max_child_hops) if (node->ports[i]->max_hops > max_child_hops)
max_child_hops = node->ports[i].node->max_hops; max_child_hops = node->ports[i]->max_hops;
if (node->ports[i].node->max_depth > depths[0]) { if (node->ports[i]->max_depth > depths[0]) {
depths[1] = depths[0]; depths[1] = depths[0];
depths[0] = node->ports[i].node->max_depth; depths[0] = node->ports[i]->max_depth;
} else if (node->ports[i].node->max_depth > depths[1]) } else if (node->ports[i]->max_depth > depths[1])
depths[1] = node->ports[i].node->max_depth; depths[1] = node->ports[i]->max_depth;
} }
node->max_depth = depths[0] + 1; node->max_depth = depths[0] + 1;
...@@ -172,7 +172,8 @@ static struct fw_node *build_tree(struct fw_card *card, ...@@ -172,7 +172,8 @@ static struct fw_node *build_tree(struct fw_card *card,
struct list_head stack, *h; struct list_head stack, *h;
u32 *next_sid, *end, q; u32 *next_sid, *end, q;
int i, port_count, child_port_count, phy_id, parent_count, stack_depth; int i, port_count, child_port_count, phy_id, parent_count, stack_depth;
int gap_count, topology_type; int gap_count;
bool beta_repeaters_present;
local_node = NULL; local_node = NULL;
node = NULL; node = NULL;
...@@ -182,7 +183,7 @@ static struct fw_node *build_tree(struct fw_card *card, ...@@ -182,7 +183,7 @@ static struct fw_node *build_tree(struct fw_card *card,
phy_id = 0; phy_id = 0;
irm_node = NULL; irm_node = NULL;
gap_count = SELF_ID_GAP_COUNT(*sid); gap_count = SELF_ID_GAP_COUNT(*sid);
topology_type = 0; beta_repeaters_present = false;
while (sid < end) { while (sid < end) {
next_sid = count_ports(sid, &port_count, &child_port_count); next_sid = count_ports(sid, &port_count, &child_port_count);
...@@ -214,7 +215,7 @@ static struct fw_node *build_tree(struct fw_card *card, ...@@ -214,7 +215,7 @@ static struct fw_node *build_tree(struct fw_card *card,
node = fw_node_create(q, port_count, card->color); node = fw_node_create(q, port_count, card->color);
if (node == NULL) { if (node == NULL) {
fw_error("Out of memory while building topology."); fw_error("Out of memory while building topology.\n");
return NULL; return NULL;
} }
...@@ -224,11 +225,6 @@ static struct fw_node *build_tree(struct fw_card *card, ...@@ -224,11 +225,6 @@ static struct fw_node *build_tree(struct fw_card *card,
if (SELF_ID_CONTENDER(q)) if (SELF_ID_CONTENDER(q))
irm_node = node; irm_node = node;
if (node->phy_speed == SCODE_BETA)
topology_type |= FW_TOPOLOGY_B;
else
topology_type |= FW_TOPOLOGY_A;
parent_count = 0; parent_count = 0;
for (i = 0; i < port_count; i++) { for (i = 0; i < port_count; i++) {
...@@ -249,12 +245,12 @@ static struct fw_node *build_tree(struct fw_card *card, ...@@ -249,12 +245,12 @@ static struct fw_node *build_tree(struct fw_card *card,
break; break;
case SELFID_PORT_CHILD: case SELFID_PORT_CHILD:
node->ports[i].node = child; node->ports[i] = child;
/* /*
* Fix up parent reference for this * Fix up parent reference for this
* child node. * child node.
*/ */
child->ports[child->color].node = node; child->ports[child->color] = node;
child->color = card->color; child->color = card->color;
child = fw_node(child->link.next); child = fw_node(child->link.next);
break; break;
...@@ -278,6 +274,10 @@ static struct fw_node *build_tree(struct fw_card *card, ...@@ -278,6 +274,10 @@ static struct fw_node *build_tree(struct fw_card *card,
list_add_tail(&node->link, &stack); list_add_tail(&node->link, &stack);
stack_depth += 1 - child_port_count; stack_depth += 1 - child_port_count;
if (node->phy_speed == SCODE_BETA &&
parent_count + child_port_count > 1)
beta_repeaters_present = true;
/* /*
* If all PHYs does not report the same gap count * If all PHYs does not report the same gap count
* setting, we fall back to 63 which will force a gap * setting, we fall back to 63 which will force a gap
...@@ -295,7 +295,7 @@ static struct fw_node *build_tree(struct fw_card *card, ...@@ -295,7 +295,7 @@ static struct fw_node *build_tree(struct fw_card *card,
card->root_node = node; card->root_node = node;
card->irm_node = irm_node; card->irm_node = irm_node;
card->gap_count = gap_count; card->gap_count = gap_count;
card->topology_type = topology_type; card->beta_repeaters_present = beta_repeaters_present;
return local_node; return local_node;
} }
...@@ -321,7 +321,7 @@ for_each_fw_node(struct fw_card *card, struct fw_node *root, ...@@ -321,7 +321,7 @@ for_each_fw_node(struct fw_card *card, struct fw_node *root,
node->color = card->color; node->color = card->color;
for (i = 0; i < node->port_count; i++) { for (i = 0; i < node->port_count; i++) {
child = node->ports[i].node; child = node->ports[i];
if (!child) if (!child)
continue; continue;
if (child->color == card->color) if (child->color == card->color)
...@@ -382,11 +382,11 @@ static void move_tree(struct fw_node *node0, struct fw_node *node1, int port) ...@@ -382,11 +382,11 @@ static void move_tree(struct fw_node *node0, struct fw_node *node1, int port)
struct fw_node *tree; struct fw_node *tree;
int i; int i;
tree = node1->ports[port].node; tree = node1->ports[port];
node0->ports[port].node = tree; node0->ports[port] = tree;
for (i = 0; i < tree->port_count; i++) { for (i = 0; i < tree->port_count; i++) {
if (tree->ports[i].node == node1) { if (tree->ports[i] == node1) {
tree->ports[i].node = node0; tree->ports[i] = node0;
break; break;
} }
} }
...@@ -437,19 +437,17 @@ update_tree(struct fw_card *card, struct fw_node *root) ...@@ -437,19 +437,17 @@ update_tree(struct fw_card *card, struct fw_node *root)
card->irm_node = node0; card->irm_node = node0;
for (i = 0; i < node0->port_count; i++) { for (i = 0; i < node0->port_count; i++) {
if (node0->ports[i].node && node1->ports[i].node) { if (node0->ports[i] && node1->ports[i]) {
/* /*
* This port didn't change, queue the * This port didn't change, queue the
* connected node for further * connected node for further
* investigation. * investigation.
*/ */
if (node0->ports[i].node->color == card->color) if (node0->ports[i]->color == card->color)
continue; continue;
list_add_tail(&node0->ports[i].node->link, list_add_tail(&node0->ports[i]->link, &list0);
&list0); list_add_tail(&node1->ports[i]->link, &list1);
list_add_tail(&node1->ports[i].node->link, } else if (node0->ports[i]) {
&list1);
} else if (node0->ports[i].node) {
/* /*
* The nodes connected here were * The nodes connected here were
* unplugged; unref the lost nodes and * unplugged; unref the lost nodes and
...@@ -457,10 +455,10 @@ update_tree(struct fw_card *card, struct fw_node *root) ...@@ -457,10 +455,10 @@ update_tree(struct fw_card *card, struct fw_node *root)
* them. * them.
*/ */
for_each_fw_node(card, node0->ports[i].node, for_each_fw_node(card, node0->ports[i],
report_lost_node); report_lost_node);
node0->ports[i].node = NULL; node0->ports[i] = NULL;
} else if (node1->ports[i].node) { } else if (node1->ports[i]) {
/* /*
* One or more node were connected to * One or more node were connected to
* this port. Move the new nodes into * this port. Move the new nodes into
...@@ -468,7 +466,7 @@ update_tree(struct fw_card *card, struct fw_node *root) ...@@ -468,7 +466,7 @@ update_tree(struct fw_card *card, struct fw_node *root)
* callbacks for them. * callbacks for them.
*/ */
move_tree(node0, node1, i); move_tree(node0, node1, i);
for_each_fw_node(card, node0->ports[i].node, for_each_fw_node(card, node0->ports[i],
report_found_node); report_found_node);
} }
} }
......
...@@ -19,12 +19,6 @@ ...@@ -19,12 +19,6 @@
#ifndef __fw_topology_h #ifndef __fw_topology_h
#define __fw_topology_h #define __fw_topology_h
enum {
FW_TOPOLOGY_A = 0x01,
FW_TOPOLOGY_B = 0x02,
FW_TOPOLOGY_MIXED = 0x03,
};
enum { enum {
FW_NODE_CREATED = 0x00, FW_NODE_CREATED = 0x00,
FW_NODE_UPDATED = 0x01, FW_NODE_UPDATED = 0x01,
...@@ -33,21 +27,16 @@ enum { ...@@ -33,21 +27,16 @@ enum {
FW_NODE_LINK_OFF = 0x04, FW_NODE_LINK_OFF = 0x04,
}; };
struct fw_port {
struct fw_node *node;
unsigned speed : 3; /* S100, S200, ... S3200 */
};
struct fw_node { struct fw_node {
u16 node_id; u16 node_id;
u8 color; u8 color;
u8 port_count; u8 port_count;
unsigned link_on : 1; u8 link_on : 1;
unsigned initiated_reset : 1; u8 initiated_reset : 1;
unsigned b_path : 1; u8 b_path : 1;
u8 phy_speed : 3; /* As in the self ID packet. */ u8 phy_speed : 2; /* As in the self ID packet. */
u8 max_speed : 5; /* Minimum of all phy-speeds and port speeds on u8 max_speed : 2; /* Minimum of all phy-speeds on the path from the
* the path from the local node to this node. */ * local node to this node. */
u8 max_depth : 4; /* Maximum depth to any leaf node */ u8 max_depth : 4; /* Maximum depth to any leaf node */
u8 max_hops : 4; /* Max hops in this sub tree */ u8 max_hops : 4; /* Max hops in this sub tree */
atomic_t ref_count; atomic_t ref_count;
...@@ -58,7 +47,7 @@ struct fw_node { ...@@ -58,7 +47,7 @@ struct fw_node {
/* Upper layer specific data. */ /* Upper layer specific data. */
void *data; void *data;
struct fw_port ports[0]; struct fw_node *ports[0];
}; };
static inline struct fw_node * static inline struct fw_node *
......
...@@ -81,7 +81,6 @@ ...@@ -81,7 +81,6 @@
#define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args)
#define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args)
#define fw_debug(s, args...) printk(KERN_DEBUG KBUILD_MODNAME ": " s, ## args)
static inline void static inline void
fw_memcpy_from_be32(void *_dst, void *_src, size_t size) fw_memcpy_from_be32(void *_dst, void *_src, size_t size)
...@@ -246,7 +245,7 @@ struct fw_card { ...@@ -246,7 +245,7 @@ struct fw_card {
struct fw_node *irm_node; struct fw_node *irm_node;
int color; int color;
int gap_count; int gap_count;
int topology_type; bool beta_repeaters_present;
int index; int index;
......
...@@ -2280,7 +2280,7 @@ static void dv1394_remove_host(struct hpsb_host *host) ...@@ -2280,7 +2280,7 @@ static void dv1394_remove_host(struct hpsb_host *host)
} while (video); } while (video);
if (found_ohci_card) if (found_ohci_card)
class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR,
IEEE1394_MINOR_BLOCK_DV1394 * 16 + (host->id << 2))); IEEE1394_MINOR_BLOCK_DV1394 * 16 + (host->id << 2)));
} }
...@@ -2295,9 +2295,9 @@ static void dv1394_add_host(struct hpsb_host *host) ...@@ -2295,9 +2295,9 @@ static void dv1394_add_host(struct hpsb_host *host)
ohci = (struct ti_ohci *)host->hostdata; ohci = (struct ti_ohci *)host->hostdata;
class_device_create(hpsb_protocol_class, NULL, MKDEV( device_create(hpsb_protocol_class, NULL, MKDEV(
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
NULL, "dv1394-%d", id); "dv1394-%d", id);
dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE);
dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT); dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT);
......
...@@ -599,9 +599,7 @@ static void ether1394_add_host(struct hpsb_host *host) ...@@ -599,9 +599,7 @@ static void ether1394_add_host(struct hpsb_host *host)
} }
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &host->device);
/* This used to be &host->device in Linux 2.6.20 and before. */
SET_NETDEV_DEV(dev, host->device.parent);
priv = netdev_priv(dev); priv = netdev_priv(dev);
INIT_LIST_HEAD(&priv->ip_node_list); INIT_LIST_HEAD(&priv->ip_node_list);
......
...@@ -483,37 +483,6 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, ...@@ -483,37 +483,6 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
return retval; return retval;
} }
/**
* hpsb_listen_channel - enable receving a certain isochronous channel
*
* Reception is handled through the @hl's iso_receive op.
*/
int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
unsigned int channel)
{
if (channel > 63) {
HPSB_ERR("%s called with invalid channel", __FUNCTION__);
return -EINVAL;
}
if (host->iso_listen_count[channel]++ == 0)
return host->driver->devctl(host, ISO_LISTEN_CHANNEL, channel);
return 0;
}
/**
* hpsb_unlisten_channel - disable receving a certain isochronous channel
*/
void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
unsigned int channel)
{
if (channel > 63) {
HPSB_ERR("%s called with invalid channel", __FUNCTION__);
return;
}
if (--host->iso_listen_count[channel] == 0)
host->driver->devctl(host, ISO_UNLISTEN_CHANNEL, channel);
}
static void init_hpsb_highlevel(struct hpsb_host *host) static void init_hpsb_highlevel(struct hpsb_host *host)
{ {
INIT_LIST_HEAD(&dummy_zero_addr.host_list); INIT_LIST_HEAD(&dummy_zero_addr.host_list);
...@@ -570,20 +539,6 @@ void highlevel_host_reset(struct hpsb_host *host) ...@@ -570,20 +539,6 @@ void highlevel_host_reset(struct hpsb_host *host)
read_unlock_irqrestore(&hl_irqs_lock, flags); read_unlock_irqrestore(&hl_irqs_lock, flags);
} }
void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length)
{
unsigned long flags;
struct hpsb_highlevel *hl;
int channel = (((quadlet_t *)data)[0] >> 8) & 0x3f;
read_lock_irqsave(&hl_irqs_lock, flags);
list_for_each_entry(hl, &hl_irqs, irq_list) {
if (hl->iso_receive)
hl->iso_receive(host, channel, data, length);
}
read_unlock_irqrestore(&hl_irqs_lock, flags);
}
void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
void *data, size_t length) void *data, size_t length)
{ {
......
...@@ -26,9 +26,7 @@ struct hpsb_address_serve { ...@@ -26,9 +26,7 @@ struct hpsb_address_serve {
struct hpsb_highlevel { struct hpsb_highlevel {
const char *name; const char *name;
/* Any of the following pointers can legally be NULL, except for /* Any of the following pointers can legally be NULL. */
* iso_receive which can only be NULL when you don't request
* channels. */
/* New host initialized. Will also be called during /* New host initialized. Will also be called during
* hpsb_register_highlevel for all hosts already installed. */ * hpsb_register_highlevel for all hosts already installed. */
...@@ -43,13 +41,6 @@ struct hpsb_highlevel { ...@@ -43,13 +41,6 @@ struct hpsb_highlevel {
* You can not expect to be able to do stock hpsb_reads. */ * You can not expect to be able to do stock hpsb_reads. */
void (*host_reset)(struct hpsb_host *host); void (*host_reset)(struct hpsb_host *host);
/* An isochronous packet was received. Channel contains the channel
* number for your convenience, it is also contained in the included
* packet header (first quadlet, CRCs are missing). You may get called
* for channel/host combinations you did not request. */
void (*iso_receive)(struct hpsb_host *host, int channel,
quadlet_t *data, size_t length);
/* A write request was received on either the FCP_COMMAND (direction = /* A write request was received on either the FCP_COMMAND (direction =
* 0) or the FCP_RESPONSE (direction = 1) register. The cts arg * 0) or the FCP_RESPONSE (direction = 1) register. The cts arg
* contains the cts field (first byte of data). */ * contains the cts field (first byte of data). */
...@@ -109,7 +100,6 @@ int highlevel_lock(struct hpsb_host *host, int nodeid, quadlet_t *store, ...@@ -109,7 +100,6 @@ int highlevel_lock(struct hpsb_host *host, int nodeid, quadlet_t *store,
int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store, int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store,
u64 addr, octlet_t data, octlet_t arg, int ext_tcode, u64 addr, octlet_t data, octlet_t arg, int ext_tcode,
u16 flags); u16 flags);
void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length);
void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
void *data, size_t length); void *data, size_t length);
...@@ -125,10 +115,6 @@ int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, ...@@ -125,10 +115,6 @@ int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
struct hpsb_address_ops *ops, u64 start, u64 end); struct hpsb_address_ops *ops, u64 start, u64 end);
int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
u64 start); u64 start);
int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
unsigned int channel);
void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
unsigned int channel);
void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host); void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host);
void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host,
......
...@@ -154,15 +154,16 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, ...@@ -154,15 +154,16 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
memcpy(&h->device, &nodemgr_dev_template_host, sizeof(h->device)); memcpy(&h->device, &nodemgr_dev_template_host, sizeof(h->device));
h->device.parent = dev; h->device.parent = dev;
set_dev_node(&h->device, dev_to_node(dev));
snprintf(h->device.bus_id, BUS_ID_SIZE, "fw-host%d", h->id); snprintf(h->device.bus_id, BUS_ID_SIZE, "fw-host%d", h->id);
h->class_dev.dev = &h->device; h->host_dev.parent = &h->device;
h->class_dev.class = &hpsb_host_class; h->host_dev.class = &hpsb_host_class;
snprintf(h->class_dev.class_id, BUS_ID_SIZE, "fw-host%d", h->id); snprintf(h->host_dev.bus_id, BUS_ID_SIZE, "fw-host%d", h->id);
if (device_register(&h->device)) if (device_register(&h->device))
goto fail; goto fail;
if (class_device_register(&h->class_dev)) { if (device_register(&h->host_dev)) {
device_unregister(&h->device); device_unregister(&h->device);
goto fail; goto fail;
} }
...@@ -202,7 +203,7 @@ void hpsb_remove_host(struct hpsb_host *host) ...@@ -202,7 +203,7 @@ void hpsb_remove_host(struct hpsb_host *host)
host->driver = &dummy_driver; host->driver = &dummy_driver;
highlevel_remove_host(host); highlevel_remove_host(host);
class_device_unregister(&host->class_dev); device_unregister(&host->host_dev);
device_unregister(&host->device); device_unregister(&host->device);
} }
......
...@@ -28,8 +28,6 @@ struct hpsb_host { ...@@ -28,8 +28,6 @@ struct hpsb_host {
struct timer_list timeout; struct timer_list timeout;
unsigned long timeout_interval; unsigned long timeout_interval;
unsigned char iso_listen_count[64];
int node_count; /* number of identified nodes on this bus */ int node_count; /* number of identified nodes on this bus */
int selfid_count; /* total number of SelfIDs received */ int selfid_count; /* total number of SelfIDs received */
int nodes_active; /* number of nodes with active link layer */ int nodes_active; /* number of nodes with active link layer */
...@@ -57,7 +55,7 @@ struct hpsb_host { ...@@ -57,7 +55,7 @@ struct hpsb_host {
struct hpsb_host_driver *driver; struct hpsb_host_driver *driver;
struct pci_dev *pdev; struct pci_dev *pdev;
struct device device; struct device device;
struct class_device class_dev; struct device host_dev;
struct delayed_work delayed_reset; struct delayed_work delayed_reset;
unsigned config_roms:31; unsigned config_roms:31;
...@@ -99,12 +97,6 @@ enum devctl_cmd { ...@@ -99,12 +97,6 @@ enum devctl_cmd {
/* Cancel all outstanding async requests without resetting the bus. /* Cancel all outstanding async requests without resetting the bus.
* Return void. */ * Return void. */
CANCEL_REQUESTS, CANCEL_REQUESTS,
/* Start or stop receiving isochronous channel in arg. Return void.
* This acts as an optimization hint, hosts are not required not to
* listen on unrequested channels. */
ISO_LISTEN_CHANNEL,
ISO_UNLISTEN_CHANNEL
}; };
enum isoctl_cmd { enum isoctl_cmd {
......
...@@ -1028,11 +1028,6 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size, ...@@ -1028,11 +1028,6 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size,
handle_incoming_packet(host, tcode, data, size, write_acked); handle_incoming_packet(host, tcode, data, size, write_acked);
break; break;
case TCODE_ISO_DATA:
highlevel_iso_receive(host, data, size);
break;
case TCODE_CYCLE_START: case TCODE_CYCLE_START:
/* simply ignore this packet if it is passed on */ /* simply ignore this packet if it is passed on */
break; break;
...@@ -1316,7 +1311,6 @@ EXPORT_SYMBOL(hpsb_make_streampacket); ...@@ -1316,7 +1311,6 @@ EXPORT_SYMBOL(hpsb_make_streampacket);
EXPORT_SYMBOL(hpsb_make_lockpacket); EXPORT_SYMBOL(hpsb_make_lockpacket);
EXPORT_SYMBOL(hpsb_make_lock64packet); EXPORT_SYMBOL(hpsb_make_lock64packet);
EXPORT_SYMBOL(hpsb_make_phypacket); EXPORT_SYMBOL(hpsb_make_phypacket);
EXPORT_SYMBOL(hpsb_make_isopacket);
EXPORT_SYMBOL(hpsb_read); EXPORT_SYMBOL(hpsb_read);
EXPORT_SYMBOL(hpsb_write); EXPORT_SYMBOL(hpsb_write);
EXPORT_SYMBOL(hpsb_packet_success); EXPORT_SYMBOL(hpsb_packet_success);
...@@ -1327,8 +1321,6 @@ EXPORT_SYMBOL(hpsb_unregister_highlevel); ...@@ -1327,8 +1321,6 @@ EXPORT_SYMBOL(hpsb_unregister_highlevel);
EXPORT_SYMBOL(hpsb_register_addrspace); EXPORT_SYMBOL(hpsb_register_addrspace);
EXPORT_SYMBOL(hpsb_unregister_addrspace); EXPORT_SYMBOL(hpsb_unregister_addrspace);
EXPORT_SYMBOL(hpsb_allocate_and_register_addrspace); EXPORT_SYMBOL(hpsb_allocate_and_register_addrspace);
EXPORT_SYMBOL(hpsb_listen_channel);
EXPORT_SYMBOL(hpsb_unlisten_channel);
EXPORT_SYMBOL(hpsb_get_hostinfo); EXPORT_SYMBOL(hpsb_get_hostinfo);
EXPORT_SYMBOL(hpsb_create_hostinfo); EXPORT_SYMBOL(hpsb_create_hostinfo);
EXPORT_SYMBOL(hpsb_destroy_hostinfo); EXPORT_SYMBOL(hpsb_destroy_hostinfo);
......
...@@ -24,9 +24,8 @@ struct hpsb_packet { ...@@ -24,9 +24,8 @@ struct hpsb_packet {
nodeid_t node_id; nodeid_t node_id;
/* Async and Iso types should be clear, raw means send-as-is, do not /* hpsb_raw = send as-is, do not CRC (but still byte-swap it) */
* CRC! Byte swapping shall still be done in this case. */ enum { hpsb_async, hpsb_raw } __attribute__((packed)) type;
enum { hpsb_async, hpsb_iso, hpsb_raw } __attribute__((packed)) type;
/* Okay, this is core internal and a no care for hosts. /* Okay, this is core internal and a no care for hosts.
* queued = queued for sending * queued = queued for sending
...@@ -37,7 +36,7 @@ struct hpsb_packet { ...@@ -37,7 +36,7 @@ struct hpsb_packet {
hpsb_unused, hpsb_queued, hpsb_pending, hpsb_complete hpsb_unused, hpsb_queued, hpsb_pending, hpsb_complete
} __attribute__((packed)) state; } __attribute__((packed)) state;
/* These are core internal. */ /* These are core-internal. */
signed char tlabel; signed char tlabel;
signed char ack_code; signed char ack_code;
unsigned char tcode; unsigned char tcode;
...@@ -62,11 +61,15 @@ struct hpsb_packet { ...@@ -62,11 +61,15 @@ struct hpsb_packet {
/* Store jiffies for implementing bus timeouts. */ /* Store jiffies for implementing bus timeouts. */
unsigned long sendtime; unsigned long sendtime;
/* Sizes are in bytes. *data can be DMA-mapped. */ /* Core-internal. */
size_t allocated_data_size; /* as allocated */ size_t allocated_data_size; /* as allocated */
/* Sizes are in bytes. To be set by caller of hpsb_alloc_packet. */
size_t data_size; /* as filled in */ size_t data_size; /* as filled in */
size_t header_size; /* as filled in, not counting the CRC */ size_t header_size; /* as filled in, not counting the CRC */
quadlet_t *data;
/* Buffers */
quadlet_t *data; /* can be DMA-mapped */
quadlet_t header[5]; quadlet_t header[5];
quadlet_t embedded_data[0]; /* keep as last member */ quadlet_t embedded_data[0]; /* keep as last member */
}; };
......
...@@ -89,18 +89,6 @@ static void fill_async_lock(struct hpsb_packet *packet, u64 addr, int extcode, ...@@ -89,18 +89,6 @@ static void fill_async_lock(struct hpsb_packet *packet, u64 addr, int extcode,
packet->expect_response = 1; packet->expect_response = 1;
} }
static void fill_iso_packet(struct hpsb_packet *packet, int length, int channel,
int tag, int sync)
{
packet->header[0] = (length << 16) | (tag << 14) | (channel << 8)
| (TCODE_ISO_DATA << 4) | sync;
packet->header_size = 4;
packet->data_size = length;
packet->type = hpsb_iso;
packet->tcode = TCODE_ISO_DATA;
}
static void fill_phy_packet(struct hpsb_packet *packet, quadlet_t data) static void fill_phy_packet(struct hpsb_packet *packet, quadlet_t data)
{ {
packet->header[0] = data; packet->header[0] = data;
...@@ -491,24 +479,6 @@ struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data) ...@@ -491,24 +479,6 @@ struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data)
return p; return p;
} }
struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host,
int length, int channel,
int tag, int sync)
{
struct hpsb_packet *p;
p = hpsb_alloc_packet(length);
if (!p)
return NULL;
p->host = host;
fill_iso_packet(p, length, channel, tag, sync);
p->generation = get_hpsb_generation(host);
return p;
}
/* /*
* FIXME - these functions should probably read from / write to user space to * FIXME - these functions should probably read from / write to user space to
* avoid in kernel buffers for user space callers * avoid in kernel buffers for user space callers
......
...@@ -19,8 +19,6 @@ struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, ...@@ -19,8 +19,6 @@ struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host,
nodeid_t node, u64 addr, int extcode, nodeid_t node, u64 addr, int extcode,
octlet_t *data, octlet_t arg); octlet_t *data, octlet_t arg);
struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data); struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host, quadlet_t data);
struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host, int length,
int channel, int tag, int sync);
struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host, struct hpsb_packet *hpsb_make_writepacket(struct hpsb_host *host,
nodeid_t node, u64 addr, nodeid_t node, u64 addr,
quadlet_t *buffer, size_t length); quadlet_t *buffer, size_t length);
......
This diff is collapsed.
...@@ -84,7 +84,7 @@ struct unit_directory { ...@@ -84,7 +84,7 @@ struct unit_directory {
int length; /* Number of quadlets */ int length; /* Number of quadlets */
struct device device; struct device device;
struct class_device class_dev; struct device unit_dev;
struct csr1212_keyval *ud_kv; struct csr1212_keyval *ud_kv;
u32 lun; /* logical unit number immediate value */ u32 lun; /* logical unit number immediate value */
...@@ -107,7 +107,7 @@ struct node_entry { ...@@ -107,7 +107,7 @@ struct node_entry {
u32 capabilities; u32 capabilities;
struct device device; struct device device;
struct class_device class_dev; struct device node_dev;
/* Means this node is not attached anymore */ /* Means this node is not attached anymore */
int in_limbo; int in_limbo;
......
This diff is collapsed.
...@@ -190,23 +190,10 @@ struct ti_ohci { ...@@ -190,23 +190,10 @@ struct ti_ohci {
unsigned long ir_multichannel_used; /* ditto */ unsigned long ir_multichannel_used; /* ditto */
spinlock_t IR_channel_lock; spinlock_t IR_channel_lock;
/* iso receive (legacy API) */
u64 ir_legacy_channels; /* note: this differs from ISO_channel_usage;
it only accounts for channels listened to
by the legacy API, so that we can know when
it is safe to free the legacy API context */
struct dma_rcv_ctx ir_legacy_context;
struct ohci1394_iso_tasklet ir_legacy_tasklet;
/* iso transmit */ /* iso transmit */
int nb_iso_xmit_ctx; int nb_iso_xmit_ctx;
unsigned long it_ctx_usage; /* use test_and_set_bit() for atomicity */ unsigned long it_ctx_usage; /* use test_and_set_bit() for atomicity */
/* iso transmit (legacy API) */
struct dma_trm_ctx it_legacy_context;
struct ohci1394_iso_tasklet it_legacy_tasklet;
u64 ISO_channel_usage; u64 ISO_channel_usage;
/* IEEE-1394 part follows */ /* IEEE-1394 part follows */
...@@ -221,7 +208,6 @@ struct ti_ohci { ...@@ -221,7 +208,6 @@ struct ti_ohci {
/* Tasklets for iso receive and transmit, used by video1394 /* Tasklets for iso receive and transmit, used by video1394
* and dv1394 */ * and dv1394 */
struct list_head iso_tasklet_list; struct list_head iso_tasklet_list;
spinlock_t iso_tasklet_list_lock; spinlock_t iso_tasklet_list_lock;
......
...@@ -477,7 +477,11 @@ static void send_next(struct ti_lynx *lynx, int what) ...@@ -477,7 +477,11 @@ static void send_next(struct ti_lynx *lynx, int what)
struct lynx_send_data *d; struct lynx_send_data *d;
struct hpsb_packet *packet; struct hpsb_packet *packet;
#if 0 /* has been removed from ieee1394 core */
d = (what == hpsb_iso ? &lynx->iso_send : &lynx->async); d = (what == hpsb_iso ? &lynx->iso_send : &lynx->async);
#else
d = &lynx->async;
#endif
if (!list_empty(&d->pcl_queue)) { if (!list_empty(&d->pcl_queue)) {
PRINT(KERN_ERR, lynx->id, "trying to queue a new packet in nonempty fifo"); PRINT(KERN_ERR, lynx->id, "trying to queue a new packet in nonempty fifo");
BUG(); BUG();
...@@ -511,9 +515,11 @@ static void send_next(struct ti_lynx *lynx, int what) ...@@ -511,9 +515,11 @@ static void send_next(struct ti_lynx *lynx, int what)
case hpsb_async: case hpsb_async:
pcl.buffer[0].control |= PCL_CMD_XMT; pcl.buffer[0].control |= PCL_CMD_XMT;
break; break;
#if 0 /* has been removed from ieee1394 core */
case hpsb_iso: case hpsb_iso:
pcl.buffer[0].control |= PCL_CMD_XMT | PCL_ISOMODE; pcl.buffer[0].control |= PCL_CMD_XMT | PCL_ISOMODE;
break; break;
#endif
case hpsb_raw: case hpsb_raw:
pcl.buffer[0].control |= PCL_CMD_UNFXMT; pcl.buffer[0].control |= PCL_CMD_UNFXMT;
break; break;
...@@ -542,9 +548,11 @@ static int lynx_transmit(struct hpsb_host *host, struct hpsb_packet *packet) ...@@ -542,9 +548,11 @@ static int lynx_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
case hpsb_raw: case hpsb_raw:
d = &lynx->async; d = &lynx->async;
break; break;
#if 0 /* has been removed from ieee1394 core */
case hpsb_iso: case hpsb_iso:
d = &lynx->iso_send; d = &lynx->iso_send;
break; break;
#endif
default: default:
PRINT(KERN_ERR, lynx->id, "invalid packet type %d", PRINT(KERN_ERR, lynx->id, "invalid packet type %d",
packet->type); packet->type);
...@@ -797,7 +805,7 @@ static int lynx_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg) ...@@ -797,7 +805,7 @@ static int lynx_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg)
} }
break; break;
#if 0 /* has been removed from ieee1394 core */
case ISO_LISTEN_CHANNEL: case ISO_LISTEN_CHANNEL:
spin_lock_irqsave(&lynx->iso_rcv.lock, flags); spin_lock_irqsave(&lynx->iso_rcv.lock, flags);
...@@ -819,7 +827,7 @@ static int lynx_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg) ...@@ -819,7 +827,7 @@ static int lynx_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg)
spin_unlock_irqrestore(&lynx->iso_rcv.lock, flags); spin_unlock_irqrestore(&lynx->iso_rcv.lock, flags);
break; break;
#endif
default: default:
PRINT(KERN_ERR, lynx->id, "unknown devctl command %d", cmd); PRINT(KERN_ERR, lynx->id, "unknown devctl command %d", cmd);
retval = -1; retval = -1;
...@@ -1009,11 +1017,11 @@ static irqreturn_t lynx_irq_handler(int irq, void *dev_id) ...@@ -1009,11 +1017,11 @@ static irqreturn_t lynx_irq_handler(int irq, void *dev_id)
pci_unmap_single(lynx->dev, lynx->iso_send.data_dma, pci_unmap_single(lynx->dev, lynx->iso_send.data_dma,
packet->data_size, PCI_DMA_TODEVICE); packet->data_size, PCI_DMA_TODEVICE);
} }
#if 0 /* has been removed from ieee1394 core */
if (!list_empty(&lynx->iso_send.queue)) { if (!list_empty(&lynx->iso_send.queue)) {
send_next(lynx, hpsb_iso); send_next(lynx, hpsb_iso);
} }
#endif
spin_unlock(&lynx->iso_send.queue_lock); spin_unlock(&lynx->iso_send.queue_lock);
if (pcl.pcl_status & DMA_CHAN_STAT_PKTCMPL) { if (pcl.pcl_status & DMA_CHAN_STAT_PKTCMPL) {
......
...@@ -36,11 +36,6 @@ struct file_info { ...@@ -36,11 +36,6 @@ struct file_info {
u8 __user *fcp_buffer; u8 __user *fcp_buffer;
/* old ISO API */
u64 listen_channels;
quadlet_t __user *iso_buffer;
size_t iso_buffer_length;
u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */ u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
/* new rawiso API */ /* new rawiso API */
......
This diff is collapsed.
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#define RAW1394_REQ_ASYNC_WRITE 101 #define RAW1394_REQ_ASYNC_WRITE 101
#define RAW1394_REQ_LOCK 102 #define RAW1394_REQ_LOCK 102
#define RAW1394_REQ_LOCK64 103 #define RAW1394_REQ_LOCK64 103
#define RAW1394_REQ_ISO_SEND 104 #define RAW1394_REQ_ISO_SEND 104 /* removed ABI, now a no-op */
#define RAW1394_REQ_ASYNC_SEND 105 #define RAW1394_REQ_ASYNC_SEND 105
#define RAW1394_REQ_ASYNC_STREAM 106 #define RAW1394_REQ_ASYNC_STREAM 106
#define RAW1394_REQ_ISO_LISTEN 200 #define RAW1394_REQ_ISO_LISTEN 200 /* removed ABI, now a no-op */
#define RAW1394_REQ_FCP_LISTEN 201 #define RAW1394_REQ_FCP_LISTEN 201
#define RAW1394_REQ_RESET_BUS 202 #define RAW1394_REQ_RESET_BUS 202
#define RAW1394_REQ_GET_ROM 203 #define RAW1394_REQ_GET_ROM 203
......
...@@ -118,14 +118,13 @@ MODULE_PARM_DESC(max_speed, "Force max speed " ...@@ -118,14 +118,13 @@ MODULE_PARM_DESC(max_speed, "Force max speed "
"(3 = 800Mb/s, 2 = 400Mb/s, 1 = 200Mb/s, 0 = 100Mb/s)"); "(3 = 800Mb/s, 2 = 400Mb/s, 1 = 200Mb/s, 0 = 100Mb/s)");
/* /*
* Set serialize_io to 1 if you'd like only one scsi command sent * Set serialize_io to 0 or N to use dynamically appended lists of command ORBs.
* down to us at a time (debugging). This might be necessary for very * This is and always has been buggy in multiple subtle ways. See above TODOs.
* badly behaved sbp2 devices.
*/ */
static int sbp2_serialize_io = 1; static int sbp2_serialize_io = 1;
module_param_named(serialize_io, sbp2_serialize_io, int, 0444); module_param_named(serialize_io, sbp2_serialize_io, bool, 0444);
MODULE_PARM_DESC(serialize_io, "Serialize I/O coming from scsi drivers " MODULE_PARM_DESC(serialize_io, "Serialize requests coming from SCSI drivers "
"(default = 1, faster = 0)"); "(default = Y, faster but buggy = N)");
/* /*
* Bump up max_sectors if you'd like to support very large sized * Bump up max_sectors if you'd like to support very large sized
...@@ -154,9 +153,9 @@ MODULE_PARM_DESC(max_sectors, "Change max sectors per I/O supported " ...@@ -154,9 +153,9 @@ MODULE_PARM_DESC(max_sectors, "Change max sectors per I/O supported "
* are possible on OXFW911 and newer Oxsemi bridges. * are possible on OXFW911 and newer Oxsemi bridges.
*/ */
static int sbp2_exclusive_login = 1; static int sbp2_exclusive_login = 1;
module_param_named(exclusive_login, sbp2_exclusive_login, int, 0644); module_param_named(exclusive_login, sbp2_exclusive_login, bool, 0644);
MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
"(default = 1)"); "(default = Y, use N for concurrent initiators)");
/* /*
* If any of the following workarounds is required for your device to work, * If any of the following workarounds is required for your device to work,
......
...@@ -67,7 +67,7 @@ struct sbp2_command_orb { ...@@ -67,7 +67,7 @@ struct sbp2_command_orb {
#define ORB_SET_LUN(v) ((v) & 0xffff) #define ORB_SET_LUN(v) ((v) & 0xffff)
#define ORB_SET_FUNCTION(v) (((v) & 0xf) << 16) #define ORB_SET_FUNCTION(v) (((v) & 0xf) << 16)
#define ORB_SET_RECONNECT(v) (((v) & 0xf) << 20) #define ORB_SET_RECONNECT(v) (((v) & 0xf) << 20)
#define ORB_SET_EXCLUSIVE(v) (((v) & 0x1) << 28) #define ORB_SET_EXCLUSIVE(v) ((v) ? 1 << 28 : 0)
#define ORB_SET_LOGIN_RESP_LENGTH(v) ((v) & 0xffff) #define ORB_SET_LOGIN_RESP_LENGTH(v) ((v) & 0xffff)
#define ORB_SET_PASSWD_LENGTH(v) (((v) & 0xffff) << 16) #define ORB_SET_PASSWD_LENGTH(v) (((v) & 0xffff) << 16)
......
...@@ -1340,9 +1340,9 @@ static void video1394_add_host (struct hpsb_host *host) ...@@ -1340,9 +1340,9 @@ static void video1394_add_host (struct hpsb_host *host)
hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id); hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id);
minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id; minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id;
class_device_create(hpsb_protocol_class, NULL, MKDEV( device_create(hpsb_protocol_class, NULL,
IEEE1394_MAJOR, minor), MKDEV(IEEE1394_MAJOR, minor),
NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
} }
...@@ -1351,8 +1351,8 @@ static void video1394_remove_host (struct hpsb_host *host) ...@@ -1351,8 +1351,8 @@ static void video1394_remove_host (struct hpsb_host *host)
struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host);
if (ohci) if (ohci)
class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR,
IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id));
return; return;
} }
......
This diff is collapsed.
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