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: (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
  ...
  • Loading branch information
Linus Torvalds committed Jul 9, 2007
2 parents 36b7741 + 7aa4848 commit 71780f5
Show file tree
Hide file tree
Showing 33 changed files with 745 additions and 883 deletions.
16 changes: 16 additions & 0 deletions Documentation/ABI/removed/raw1394_legacy_isochronous
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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
10 changes: 0 additions & 10 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
When: October 2007
Why: Replaced by the much better esp_scsi driver. Actual low-level
Expand Down
7 changes: 5 additions & 2 deletions drivers/firewire/fw-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,11 @@ fw_card_bm_work(struct work_struct *work)
}

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))
gap_count = gap_count_table[card->root_node->max_hops];
else
Expand Down
2 changes: 1 addition & 1 deletion drivers/firewire/fw-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static int ioctl_send_request(struct client *client, void *buffer)
request->tcode & 0x1f,
device->node->node_id,
request->generation,
device->node->max_speed,
device->max_speed,
request->offset,
response->response.data, request->length,
complete_transaction, response);
Expand Down
38 changes: 34 additions & 4 deletions drivers/firewire/fw-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,7 @@ static int read_rom(struct fw_device *device, int index, u32 * data)

offset = 0xfffff0000400ULL + index * 4;
fw_send_request(device->card, &t, TCODE_READ_QUADLET_REQUEST,
device->node_id,
device->generation, SCODE_100,
device->node_id, device->generation, device->max_speed,
offset, NULL, 4, complete_transaction, &callback_data);

wait_for_completion(&callback_data.done);
Expand All @@ -418,6 +417,8 @@ static int read_bus_info_block(struct fw_device *device)
u32 stack[16], sp, key;
int i, end, length;

device->max_speed = SCODE_100;

/* First read the bus info block. */
for (i = 0; i < 5; i++) {
if (read_rom(device, i, &rom[i]) != RCODE_COMPLETE)
Expand All @@ -434,6 +435,33 @@ static int read_bus_info_block(struct fw_device *device)
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
* directory structure so we parse it using a stack of
Expand Down Expand Up @@ -680,8 +708,10 @@ static void fw_device_init(struct work_struct *work)
FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN)
fw_device_shutdown(&device->work.work);
else
fw_notify("created new fw device %s (%d config rom retries)\n",
device->device.bus_id, device->config_rom_retries);
fw_notify("created new fw device %s "
"(%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
Expand Down
1 change: 1 addition & 0 deletions drivers/firewire/fw-device.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct fw_device {
struct fw_node *node;
int node_id;
int generation;
unsigned max_speed;
struct fw_card *card;
struct device device;
struct list_head link;
Expand Down
6 changes: 3 additions & 3 deletions drivers/firewire/fw-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1934,12 +1934,12 @@ static int pci_suspend(struct pci_dev *pdev, pm_message_t state)
free_irq(pdev->irq, ohci);
err = pci_save_state(pdev);
if (err) {
fw_error("pci_save_state failed with %d", err);
fw_error("pci_save_state failed\n");
return err;
}
err = pci_set_power_state(pdev, pci_choose_state(pdev, state));
if (err) {
fw_error("pci_set_power_state failed with %d", err);
fw_error("pci_set_power_state failed\n");
return err;
}

Expand All @@ -1955,7 +1955,7 @@ static int pci_resume(struct pci_dev *pdev)
pci_restore_state(pdev);
err = pci_enable_device(pdev);
if (err) {
fw_error("pci_enable_device failed with %d", err);
fw_error("pci_enable_device failed\n");
return err;
}

Expand Down
Loading

0 comments on commit 71780f5

Please sign in to comment.