diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/Kconfig | 118 | ||||
-rw-r--r-- | drivers/ieee1394/sbp2.c | 20 |
2 files changed, 74 insertions, 64 deletions
diff --git a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig index 545663ef820b..95f45f9b8e5e 100644 --- a/drivers/ieee1394/Kconfig +++ b/drivers/ieee1394/Kconfig | |||
@@ -4,7 +4,7 @@ menu "IEEE 1394 (FireWire) support" | |||
4 | source "drivers/firewire/Kconfig" | 4 | source "drivers/firewire/Kconfig" |
5 | 5 | ||
6 | config IEEE1394 | 6 | config IEEE1394 |
7 | tristate "IEEE 1394 (FireWire) support" | 7 | tristate "Stable FireWire stack" |
8 | depends on PCI || BROKEN | 8 | depends on PCI || BROKEN |
9 | help | 9 | help |
10 | IEEE 1394 describes a high performance serial bus, which is also | 10 | IEEE 1394 describes a high performance serial bus, which is also |
@@ -19,30 +19,45 @@ config IEEE1394 | |||
19 | To compile this driver as a module, say M here: the | 19 | To compile this driver as a module, say M here: the |
20 | module will be called ieee1394. | 20 | module will be called ieee1394. |
21 | 21 | ||
22 | comment "Subsystem Options" | 22 | config IEEE1394_OHCI1394 |
23 | depends on IEEE1394 | 23 | tristate "OHCI-1394 controllers" |
24 | 24 | depends on PCI && IEEE1394 | |
25 | config IEEE1394_VERBOSEDEBUG | ||
26 | bool "Excessive debugging output" | ||
27 | depends on IEEE1394 | ||
28 | help | 25 | help |
29 | If you say Y here, you will get very verbose debugging logs from | 26 | Enable this driver if you have an IEEE 1394 controller based on the |
30 | the subsystem which includes a dump of the header of every sent | 27 | OHCI-1394 specification. The current driver is only tested with OHCI |
31 | and received packet. This can amount to a high amount of data | 28 | chipsets made by Texas Instruments and NEC. Most third-party vendors |
32 | collected in a very short time which is usually also saved to | 29 | use one of these chipsets. It should work with any OHCI-1394 |
33 | disk by the system logging daemons. | 30 | compliant card, however. |
34 | 31 | ||
35 | Say Y if you really want or need the debugging output, everyone | 32 | To compile this driver as a module, say M here: the |
36 | else says N. | 33 | module will be called ohci1394. |
37 | 34 | ||
38 | comment "Controllers" | 35 | NOTE: |
39 | depends on IEEE1394 | ||
40 | 36 | ||
41 | comment "Texas Instruments PCILynx requires I2C" | 37 | You should only build either ohci1394 or the new firewire-ohci driver, |
38 | but not both. If you nevertheless want to install both, you should | ||
39 | configure them only as modules and blacklist the driver(s) which you | ||
40 | don't want to have auto-loaded. Add either | ||
41 | |||
42 | blacklist firewire-ohci | ||
43 | or | ||
44 | blacklist ohci1394 | ||
45 | blacklist video1394 | ||
46 | blacklist dv1394 | ||
47 | |||
48 | to /etc/modprobe.conf or /etc/modprobe.d/* and update modprobe.conf | ||
49 | depending on your distribution. The latter two modules should be | ||
50 | blacklisted together with ohci1394 because they depend on ohci1394. | ||
51 | |||
52 | If you have an old modprobe which doesn't implement the blacklist | ||
53 | directive, use "install modulename /bin/true" for the modules to be | ||
54 | blacklisted. | ||
55 | |||
56 | comment "PCILynx controller requires I2C" | ||
42 | depends on IEEE1394 && I2C=n | 57 | depends on IEEE1394 && I2C=n |
43 | 58 | ||
44 | config IEEE1394_PCILYNX | 59 | config IEEE1394_PCILYNX |
45 | tristate "Texas Instruments PCILynx support" | 60 | tristate "PCILynx controller" |
46 | depends on PCI && IEEE1394 && I2C | 61 | depends on PCI && IEEE1394 && I2C |
47 | select I2C_ALGOBIT | 62 | select I2C_ALGOBIT |
48 | help | 63 | help |
@@ -57,35 +72,11 @@ config IEEE1394_PCILYNX | |||
57 | PowerMacs G3 B&W contain the PCILynx controller. Therefore | 72 | PowerMacs G3 B&W contain the PCILynx controller. Therefore |
58 | almost everybody can say N here. | 73 | almost everybody can say N here. |
59 | 74 | ||
60 | config IEEE1394_OHCI1394 | ||
61 | tristate "OHCI-1394 support" | ||
62 | depends on PCI && IEEE1394 | ||
63 | help | ||
64 | Enable this driver if you have an IEEE 1394 controller based on the | ||
65 | OHCI-1394 specification. The current driver is only tested with OHCI | ||
66 | chipsets made by Texas Instruments and NEC. Most third-party vendors | ||
67 | use one of these chipsets. It should work with any OHCI-1394 | ||
68 | compliant card, however. | ||
69 | |||
70 | To compile this driver as a module, say M here: the | ||
71 | module will be called ohci1394. | ||
72 | |||
73 | comment "Protocols" | ||
74 | depends on IEEE1394 | ||
75 | |||
76 | config IEEE1394_VIDEO1394 | ||
77 | tristate "OHCI-1394 Video support" | ||
78 | depends on IEEE1394 && IEEE1394_OHCI1394 | ||
79 | help | ||
80 | This option enables video device usage for OHCI-1394 cards. Enable | ||
81 | this option only if you have an IEEE 1394 video device connected to | ||
82 | an OHCI-1394 card. | ||
83 | |||
84 | comment "SBP-2 support (for storage devices) requires SCSI" | 75 | comment "SBP-2 support (for storage devices) requires SCSI" |
85 | depends on IEEE1394 && SCSI=n | 76 | depends on IEEE1394 && SCSI=n |
86 | 77 | ||
87 | config IEEE1394_SBP2 | 78 | config IEEE1394_SBP2 |
88 | tristate "SBP-2 support (Harddisks etc.)" | 79 | tristate "Storage devices (SBP-2 protocol)" |
89 | depends on IEEE1394 && SCSI | 80 | depends on IEEE1394 && SCSI |
90 | help | 81 | help |
91 | This option enables you to use SBP-2 devices connected to an IEEE | 82 | This option enables you to use SBP-2 devices connected to an IEEE |
@@ -127,24 +118,47 @@ config IEEE1394_ETH1394 | |||
127 | 118 | ||
128 | The module is called eth1394 although it does not emulate Ethernet. | 119 | The module is called eth1394 although it does not emulate Ethernet. |
129 | 120 | ||
121 | config IEEE1394_RAWIO | ||
122 | tristate "raw1394 userspace interface" | ||
123 | depends on IEEE1394 | ||
124 | help | ||
125 | This option adds support for the raw1394 device file which enables | ||
126 | direct communication of user programs with IEEE 1394 devices | ||
127 | (isochronous and asynchronous). Almost all application programs | ||
128 | which access FireWire require this option. | ||
129 | |||
130 | To compile this driver as a module, say M here: the module will be | ||
131 | called raw1394. | ||
132 | |||
133 | config IEEE1394_VIDEO1394 | ||
134 | tristate "video1394 userspace interface" | ||
135 | depends on IEEE1394 && IEEE1394_OHCI1394 | ||
136 | help | ||
137 | This option adds support for the video1394 device files which enable | ||
138 | isochronous communication of user programs with IEEE 1394 devices, | ||
139 | especially video capture or export. This interface is used by all | ||
140 | libdc1394 based programs and by several other programs, in addition to | ||
141 | the raw1394 interface. It is generally not required for DV capture. | ||
142 | |||
143 | To compile this driver as a module, say M here: the module will be | ||
144 | called video1394. | ||
145 | |||
130 | config IEEE1394_DV1394 | 146 | config IEEE1394_DV1394 |
131 | tristate "OHCI-DV I/O support (deprecated)" | 147 | tristate "dv1394 userspace interface (deprecated)" |
132 | depends on IEEE1394 && IEEE1394_OHCI1394 | 148 | depends on IEEE1394 && IEEE1394_OHCI1394 |
133 | help | 149 | help |
134 | The dv1394 driver is unsupported and may be removed from Linux in a | 150 | The dv1394 driver is unsupported and may be removed from Linux in a |
135 | future release. Its functionality is now provided by raw1394 together | 151 | future release. Its functionality is now provided by raw1394 together |
136 | with libraries such as libiec61883. | 152 | with libraries such as libiec61883. |
137 | 153 | ||
138 | config IEEE1394_RAWIO | 154 | config IEEE1394_VERBOSEDEBUG |
139 | tristate "Raw IEEE1394 I/O support" | 155 | bool "Excessive debugging output" |
140 | depends on IEEE1394 | 156 | depends on IEEE1394 |
141 | help | 157 | help |
142 | This option adds support for the raw1394 device file which enables | 158 | If you say Y here, you will get very verbose debugging logs from the |
143 | direct communication of user programs with the IEEE 1394 bus and thus | 159 | ieee1394 drivers, including sent and received packet headers. This |
144 | with the attached peripherals. Almost all application programs which | 160 | will quickly result in large amounts of data sent to the system log. |
145 | access FireWire require this option. | ||
146 | 161 | ||
147 | To compile this driver as a module, say M here: the module will be | 162 | Say Y if you really need the debugging output. Everyone else says N. |
148 | called raw1394. | ||
149 | 163 | ||
150 | endmenu | 164 | endmenu |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 16b9d0ad154e..a5ceff287a28 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -1539,15 +1539,13 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb, | |||
1539 | 1539 | ||
1540 | static void sbp2_create_command_orb(struct sbp2_lu *lu, | 1540 | static void sbp2_create_command_orb(struct sbp2_lu *lu, |
1541 | struct sbp2_command_info *cmd, | 1541 | struct sbp2_command_info *cmd, |
1542 | unchar *scsi_cmd, | 1542 | struct scsi_cmnd *SCpnt) |
1543 | unsigned int scsi_use_sg, | ||
1544 | unsigned int scsi_request_bufflen, | ||
1545 | struct scatterlist *sg, | ||
1546 | enum dma_data_direction dma_dir) | ||
1547 | { | 1543 | { |
1548 | struct sbp2_fwhost_info *hi = lu->hi; | 1544 | struct sbp2_fwhost_info *hi = lu->hi; |
1549 | struct sbp2_command_orb *orb = &cmd->command_orb; | 1545 | struct sbp2_command_orb *orb = &cmd->command_orb; |
1550 | u32 orb_direction; | 1546 | u32 orb_direction; |
1547 | unsigned int scsi_request_bufflen = scsi_bufflen(SCpnt); | ||
1548 | enum dma_data_direction dma_dir = SCpnt->sc_data_direction; | ||
1551 | 1549 | ||
1552 | /* | 1550 | /* |
1553 | * Set-up our command ORB. | 1551 | * Set-up our command ORB. |
@@ -1580,13 +1578,14 @@ static void sbp2_create_command_orb(struct sbp2_lu *lu, | |||
1580 | orb->data_descriptor_lo = 0x0; | 1578 | orb->data_descriptor_lo = 0x0; |
1581 | orb->misc |= ORB_SET_DIRECTION(1); | 1579 | orb->misc |= ORB_SET_DIRECTION(1); |
1582 | } else | 1580 | } else |
1583 | sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_use_sg, sg, | 1581 | sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_sg_count(SCpnt), |
1582 | scsi_sglist(SCpnt), | ||
1584 | orb_direction, dma_dir); | 1583 | orb_direction, dma_dir); |
1585 | 1584 | ||
1586 | sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb)); | 1585 | sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb)); |
1587 | 1586 | ||
1588 | memset(orb->cdb, 0, 12); | 1587 | memset(orb->cdb, 0, sizeof(orb->cdb)); |
1589 | memcpy(orb->cdb, scsi_cmd, COMMAND_SIZE(*scsi_cmd)); | 1588 | memcpy(orb->cdb, SCpnt->cmnd, SCpnt->cmd_len); |
1590 | } | 1589 | } |
1591 | 1590 | ||
1592 | static void sbp2_link_orb_command(struct sbp2_lu *lu, | 1591 | static void sbp2_link_orb_command(struct sbp2_lu *lu, |
@@ -1669,16 +1668,13 @@ static void sbp2_link_orb_command(struct sbp2_lu *lu, | |||
1669 | static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt, | 1668 | static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt, |
1670 | void (*done)(struct scsi_cmnd *)) | 1669 | void (*done)(struct scsi_cmnd *)) |
1671 | { | 1670 | { |
1672 | unchar *scsi_cmd = (unchar *)SCpnt->cmnd; | ||
1673 | struct sbp2_command_info *cmd; | 1671 | struct sbp2_command_info *cmd; |
1674 | 1672 | ||
1675 | cmd = sbp2util_allocate_command_orb(lu, SCpnt, done); | 1673 | cmd = sbp2util_allocate_command_orb(lu, SCpnt, done); |
1676 | if (!cmd) | 1674 | if (!cmd) |
1677 | return -EIO; | 1675 | return -EIO; |
1678 | 1676 | ||
1679 | sbp2_create_command_orb(lu, cmd, scsi_cmd, scsi_sg_count(SCpnt), | 1677 | sbp2_create_command_orb(lu, cmd, SCpnt); |
1680 | scsi_bufflen(SCpnt), scsi_sglist(SCpnt), | ||
1681 | SCpnt->sc_data_direction); | ||
1682 | sbp2_link_orb_command(lu, cmd); | 1678 | sbp2_link_orb_command(lu, cmd); |
1683 | 1679 | ||
1684 | return 0; | 1680 | return 0; |