diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/Kconfig | 118 | ||||
-rw-r--r-- | drivers/ieee1394/csr1212.c | 32 | ||||
-rw-r--r-- | drivers/ieee1394/dma.c | 2 | ||||
-rw-r--r-- | drivers/ieee1394/highlevel.c | 4 | ||||
-rw-r--r-- | drivers/ieee1394/highlevel.h | 13 | ||||
-rw-r--r-- | drivers/ieee1394/raw1394.c | 20 | ||||
-rw-r--r-- | drivers/ieee1394/sbp2.c | 42 | ||||
-rw-r--r-- | drivers/ieee1394/sbp2.h | 1 | ||||
-rw-r--r-- | drivers/ieee1394/video1394.c | 2 |
9 files changed, 148 insertions, 86 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/csr1212.c b/drivers/ieee1394/csr1212.c index e8122def164d..9f95337139e3 100644 --- a/drivers/ieee1394/csr1212.c +++ b/drivers/ieee1394/csr1212.c | |||
@@ -1049,6 +1049,24 @@ int csr1212_read(struct csr1212_csr *csr, u32 offset, void *buffer, u32 len) | |||
1049 | return -ENOENT; | 1049 | return -ENOENT; |
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | /* | ||
1053 | * Apparently there are many different wrong implementations of the CRC | ||
1054 | * algorithm. We don't fail, we just warn... approximately once per GUID. | ||
1055 | */ | ||
1056 | static void | ||
1057 | csr1212_check_crc(const u32 *buffer, size_t length, u16 crc, __be32 *guid) | ||
1058 | { | ||
1059 | static u64 last_bad_eui64; | ||
1060 | u64 eui64 = ((u64)be32_to_cpu(guid[0]) << 32) | be32_to_cpu(guid[1]); | ||
1061 | |||
1062 | if (csr1212_crc16(buffer, length) == crc || | ||
1063 | csr1212_msft_crc16(buffer, length) == crc || | ||
1064 | eui64 == last_bad_eui64) | ||
1065 | return; | ||
1066 | |||
1067 | printk(KERN_DEBUG "ieee1394: config ROM CRC error\n"); | ||
1068 | last_bad_eui64 = eui64; | ||
1069 | } | ||
1052 | 1070 | ||
1053 | /* Parse a chunk of data as a Config ROM */ | 1071 | /* Parse a chunk of data as a Config ROM */ |
1054 | 1072 | ||
@@ -1092,11 +1110,8 @@ static int csr1212_parse_bus_info_block(struct csr1212_csr *csr) | |||
1092 | return ret; | 1110 | return ret; |
1093 | } | 1111 | } |
1094 | 1112 | ||
1095 | /* Apparently there are many different wrong implementations of the CRC | 1113 | csr1212_check_crc(bi->data, bi->crc_length, bi->crc, |
1096 | * algorithm. We don't fail, we just warn. */ | 1114 | &csr->bus_info_data[3]); |
1097 | if ((csr1212_crc16(bi->data, bi->crc_length) != bi->crc) && | ||
1098 | (csr1212_msft_crc16(bi->data, bi->crc_length) != bi->crc)) | ||
1099 | printk(KERN_DEBUG "IEEE 1394 device has ROM CRC error\n"); | ||
1100 | 1115 | ||
1101 | cr = CSR1212_MALLOC(sizeof(*cr)); | 1116 | cr = CSR1212_MALLOC(sizeof(*cr)); |
1102 | if (!cr) | 1117 | if (!cr) |
@@ -1205,11 +1220,8 @@ int csr1212_parse_keyval(struct csr1212_keyval *kv, | |||
1205 | &cache->data[bytes_to_quads(kv->offset - cache->offset)]; | 1220 | &cache->data[bytes_to_quads(kv->offset - cache->offset)]; |
1206 | kvi_len = be16_to_cpu(kvi->length); | 1221 | kvi_len = be16_to_cpu(kvi->length); |
1207 | 1222 | ||
1208 | /* Apparently there are many different wrong implementations of the CRC | 1223 | /* GUID is wrong in here in case of extended ROM. We don't care. */ |
1209 | * algorithm. We don't fail, we just warn. */ | 1224 | csr1212_check_crc(kvi->data, kvi_len, kvi->crc, &cache->data[3]); |
1210 | if ((csr1212_crc16(kvi->data, kvi_len) != kvi->crc) && | ||
1211 | (csr1212_msft_crc16(kvi->data, kvi_len) != kvi->crc)) | ||
1212 | printk(KERN_DEBUG "IEEE 1394 device has ROM CRC error\n"); | ||
1213 | 1225 | ||
1214 | switch (kv->key.type) { | 1226 | switch (kv->key.type) { |
1215 | case CSR1212_KV_TYPE_DIRECTORY: | 1227 | case CSR1212_KV_TYPE_DIRECTORY: |
diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index 73685e7dc7e4..1aba8c13fe8f 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c | |||
@@ -274,7 +274,7 @@ int dma_region_mmap(struct dma_region *dma, struct file *file, | |||
274 | vma->vm_ops = &dma_region_vm_ops; | 274 | vma->vm_ops = &dma_region_vm_ops; |
275 | vma->vm_private_data = dma; | 275 | vma->vm_private_data = dma; |
276 | vma->vm_file = file; | 276 | vma->vm_file = file; |
277 | vma->vm_flags |= VM_RESERVED; | 277 | vma->vm_flags |= VM_RESERVED | VM_ALWAYSDUMP; |
278 | 278 | ||
279 | return 0; | 279 | return 0; |
280 | } | 280 | } |
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c index fa2bfec0fca2..918ffc4fc8ac 100644 --- a/drivers/ieee1394/highlevel.c +++ b/drivers/ieee1394/highlevel.c | |||
@@ -228,10 +228,8 @@ void hpsb_register_highlevel(struct hpsb_highlevel *hl) | |||
228 | { | 228 | { |
229 | unsigned long flags; | 229 | unsigned long flags; |
230 | 230 | ||
231 | hpsb_init_highlevel(hl); | ||
231 | INIT_LIST_HEAD(&hl->addr_list); | 232 | INIT_LIST_HEAD(&hl->addr_list); |
232 | INIT_LIST_HEAD(&hl->host_info_list); | ||
233 | |||
234 | rwlock_init(&hl->host_info_lock); | ||
235 | 233 | ||
236 | down_write(&hl_drivers_sem); | 234 | down_write(&hl_drivers_sem); |
237 | list_add_tail(&hl->hl_list, &hl_drivers); | 235 | list_add_tail(&hl->hl_list, &hl_drivers); |
diff --git a/drivers/ieee1394/highlevel.h b/drivers/ieee1394/highlevel.h index eb9fe321e09a..bc5d0854c17e 100644 --- a/drivers/ieee1394/highlevel.h +++ b/drivers/ieee1394/highlevel.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define IEEE1394_HIGHLEVEL_H | 2 | #define IEEE1394_HIGHLEVEL_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/spinlock_types.h> | 5 | #include <linux/spinlock.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | 7 | ||
8 | struct module; | 8 | struct module; |
@@ -103,6 +103,17 @@ int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store, | |||
103 | void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, | 103 | void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, |
104 | void *data, size_t length); | 104 | void *data, size_t length); |
105 | 105 | ||
106 | /** | ||
107 | * hpsb_init_highlevel - initialize a struct hpsb_highlevel | ||
108 | * | ||
109 | * This is only necessary if hpsb_get_hostinfo_bykey can be called | ||
110 | * before hpsb_register_highlevel. | ||
111 | */ | ||
112 | static inline void hpsb_init_highlevel(struct hpsb_highlevel *hl) | ||
113 | { | ||
114 | rwlock_init(&hl->host_info_lock); | ||
115 | INIT_LIST_HEAD(&hl->host_info_list); | ||
116 | } | ||
106 | void hpsb_register_highlevel(struct hpsb_highlevel *hl); | 117 | void hpsb_register_highlevel(struct hpsb_highlevel *hl); |
107 | void hpsb_unregister_highlevel(struct hpsb_highlevel *hl); | 118 | void hpsb_unregister_highlevel(struct hpsb_highlevel *hl); |
108 | 119 | ||
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index ec2a0adbedb2..96f2847b0405 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
@@ -2549,8 +2549,8 @@ static int raw1394_mmap(struct file *file, struct vm_area_struct *vma) | |||
2549 | } | 2549 | } |
2550 | 2550 | ||
2551 | /* ioctl is only used for rawiso operations */ | 2551 | /* ioctl is only used for rawiso operations */ |
2552 | static int raw1394_ioctl(struct inode *inode, struct file *file, | 2552 | static long do_raw1394_ioctl(struct file *file, unsigned int cmd, |
2553 | unsigned int cmd, unsigned long arg) | 2553 | unsigned long arg) |
2554 | { | 2554 | { |
2555 | struct file_info *fi = file->private_data; | 2555 | struct file_info *fi = file->private_data; |
2556 | void __user *argp = (void __user *)arg; | 2556 | void __user *argp = (void __user *)arg; |
@@ -2656,6 +2656,16 @@ static int raw1394_ioctl(struct inode *inode, struct file *file, | |||
2656 | return -EINVAL; | 2656 | return -EINVAL; |
2657 | } | 2657 | } |
2658 | 2658 | ||
2659 | static long raw1394_ioctl(struct file *file, unsigned int cmd, | ||
2660 | unsigned long arg) | ||
2661 | { | ||
2662 | long ret; | ||
2663 | lock_kernel(); | ||
2664 | ret = do_raw1394_ioctl(file, cmd, arg); | ||
2665 | unlock_kernel(); | ||
2666 | return ret; | ||
2667 | } | ||
2668 | |||
2659 | #ifdef CONFIG_COMPAT | 2669 | #ifdef CONFIG_COMPAT |
2660 | struct raw1394_iso_packets32 { | 2670 | struct raw1394_iso_packets32 { |
2661 | __u32 n_packets; | 2671 | __u32 n_packets; |
@@ -2690,7 +2700,7 @@ static long raw1394_iso_xmit_recv_packets32(struct file *file, unsigned int cmd, | |||
2690 | !copy_from_user(&infos32, &arg->infos, sizeof infos32)) { | 2700 | !copy_from_user(&infos32, &arg->infos, sizeof infos32)) { |
2691 | infos = compat_ptr(infos32); | 2701 | infos = compat_ptr(infos32); |
2692 | if (!copy_to_user(&dst->infos, &infos, sizeof infos)) | 2702 | if (!copy_to_user(&dst->infos, &infos, sizeof infos)) |
2693 | err = raw1394_ioctl(NULL, file, cmd, (unsigned long)dst); | 2703 | err = do_raw1394_ioctl(file, cmd, (unsigned long)dst); |
2694 | } | 2704 | } |
2695 | return err; | 2705 | return err; |
2696 | } | 2706 | } |
@@ -2731,7 +2741,7 @@ static long raw1394_compat_ioctl(struct file *file, | |||
2731 | case RAW1394_IOC_ISO_GET_STATUS: | 2741 | case RAW1394_IOC_ISO_GET_STATUS: |
2732 | case RAW1394_IOC_ISO_SHUTDOWN: | 2742 | case RAW1394_IOC_ISO_SHUTDOWN: |
2733 | case RAW1394_IOC_ISO_QUEUE_ACTIVITY: | 2743 | case RAW1394_IOC_ISO_QUEUE_ACTIVITY: |
2734 | err = raw1394_ioctl(NULL, file, cmd, arg); | 2744 | err = do_raw1394_ioctl(file, cmd, arg); |
2735 | break; | 2745 | break; |
2736 | /* These request have different format. */ | 2746 | /* These request have different format. */ |
2737 | case RAW1394_IOC_ISO_RECV_PACKETS32: | 2747 | case RAW1394_IOC_ISO_RECV_PACKETS32: |
@@ -2984,7 +2994,7 @@ static const struct file_operations raw1394_fops = { | |||
2984 | .read = raw1394_read, | 2994 | .read = raw1394_read, |
2985 | .write = raw1394_write, | 2995 | .write = raw1394_write, |
2986 | .mmap = raw1394_mmap, | 2996 | .mmap = raw1394_mmap, |
2987 | .ioctl = raw1394_ioctl, | 2997 | .unlocked_ioctl = raw1394_ioctl, |
2988 | #ifdef CONFIG_COMPAT | 2998 | #ifdef CONFIG_COMPAT |
2989 | .compat_ioctl = raw1394_compat_ioctl, | 2999 | .compat_ioctl = raw1394_compat_ioctl, |
2990 | #endif | 3000 | #endif |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 16b9d0ad154e..9cbf3154d243 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -186,6 +186,11 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " | |||
186 | * - delay inquiry | 186 | * - delay inquiry |
187 | * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry. | 187 | * Wait extra SBP2_INQUIRY_DELAY seconds after login before SCSI inquiry. |
188 | * | 188 | * |
189 | * - power condition | ||
190 | * Set the power condition field in the START STOP UNIT commands sent by | ||
191 | * sd_mod on suspend, resume, and shutdown (if manage_start_stop is on). | ||
192 | * Some disks need this to spin down or to resume properly. | ||
193 | * | ||
189 | * - override internal blacklist | 194 | * - override internal blacklist |
190 | * Instead of adding to the built-in blacklist, use only the workarounds | 195 | * Instead of adding to the built-in blacklist, use only the workarounds |
191 | * specified in the module load parameter. | 196 | * specified in the module load parameter. |
@@ -199,6 +204,8 @@ MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0" | |||
199 | ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8) | 204 | ", skip mode page 8 = " __stringify(SBP2_WORKAROUND_MODE_SENSE_8) |
200 | ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY) | 205 | ", fix capacity = " __stringify(SBP2_WORKAROUND_FIX_CAPACITY) |
201 | ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY) | 206 | ", delay inquiry = " __stringify(SBP2_WORKAROUND_DELAY_INQUIRY) |
207 | ", set power condition in start stop unit = " | ||
208 | __stringify(SBP2_WORKAROUND_POWER_CONDITION) | ||
202 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) | 209 | ", override internal blacklist = " __stringify(SBP2_WORKAROUND_OVERRIDE) |
203 | ", or a combination)"); | 210 | ", or a combination)"); |
204 | 211 | ||
@@ -359,18 +366,25 @@ static const struct { | |||
359 | .firmware_revision = 0x002800, | 366 | .firmware_revision = 0x002800, |
360 | .model_id = 0x001010, | 367 | .model_id = 0x001010, |
361 | .workarounds = SBP2_WORKAROUND_INQUIRY_36 | | 368 | .workarounds = SBP2_WORKAROUND_INQUIRY_36 | |
362 | SBP2_WORKAROUND_MODE_SENSE_8, | 369 | SBP2_WORKAROUND_MODE_SENSE_8 | |
370 | SBP2_WORKAROUND_POWER_CONDITION, | ||
363 | }, | 371 | }, |
364 | /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { | 372 | /* DViCO Momobay FX-3A with TSB42AA9A bridge */ { |
365 | .firmware_revision = 0x002800, | 373 | .firmware_revision = 0x002800, |
366 | .model_id = 0x000000, | 374 | .model_id = 0x000000, |
367 | .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY, | 375 | .workarounds = SBP2_WORKAROUND_DELAY_INQUIRY | |
376 | SBP2_WORKAROUND_POWER_CONDITION, | ||
368 | }, | 377 | }, |
369 | /* Initio bridges, actually only needed for some older ones */ { | 378 | /* Initio bridges, actually only needed for some older ones */ { |
370 | .firmware_revision = 0x000200, | 379 | .firmware_revision = 0x000200, |
371 | .model_id = SBP2_ROM_VALUE_WILDCARD, | 380 | .model_id = SBP2_ROM_VALUE_WILDCARD, |
372 | .workarounds = SBP2_WORKAROUND_INQUIRY_36, | 381 | .workarounds = SBP2_WORKAROUND_INQUIRY_36, |
373 | }, | 382 | }, |
383 | /* PL-3507 bridge with Prolific firmware */ { | ||
384 | .firmware_revision = 0x012800, | ||
385 | .model_id = SBP2_ROM_VALUE_WILDCARD, | ||
386 | .workarounds = SBP2_WORKAROUND_POWER_CONDITION, | ||
387 | }, | ||
374 | /* Symbios bridge */ { | 388 | /* Symbios bridge */ { |
375 | .firmware_revision = 0xa0b800, | 389 | .firmware_revision = 0xa0b800, |
376 | .model_id = SBP2_ROM_VALUE_WILDCARD, | 390 | .model_id = SBP2_ROM_VALUE_WILDCARD, |
@@ -1539,15 +1553,13 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb, | |||
1539 | 1553 | ||
1540 | static void sbp2_create_command_orb(struct sbp2_lu *lu, | 1554 | static void sbp2_create_command_orb(struct sbp2_lu *lu, |
1541 | struct sbp2_command_info *cmd, | 1555 | struct sbp2_command_info *cmd, |
1542 | unchar *scsi_cmd, | 1556 | 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 | { | 1557 | { |
1548 | struct sbp2_fwhost_info *hi = lu->hi; | 1558 | struct sbp2_fwhost_info *hi = lu->hi; |
1549 | struct sbp2_command_orb *orb = &cmd->command_orb; | 1559 | struct sbp2_command_orb *orb = &cmd->command_orb; |
1550 | u32 orb_direction; | 1560 | u32 orb_direction; |
1561 | unsigned int scsi_request_bufflen = scsi_bufflen(SCpnt); | ||
1562 | enum dma_data_direction dma_dir = SCpnt->sc_data_direction; | ||
1551 | 1563 | ||
1552 | /* | 1564 | /* |
1553 | * Set-up our command ORB. | 1565 | * Set-up our command ORB. |
@@ -1580,13 +1592,14 @@ static void sbp2_create_command_orb(struct sbp2_lu *lu, | |||
1580 | orb->data_descriptor_lo = 0x0; | 1592 | orb->data_descriptor_lo = 0x0; |
1581 | orb->misc |= ORB_SET_DIRECTION(1); | 1593 | orb->misc |= ORB_SET_DIRECTION(1); |
1582 | } else | 1594 | } else |
1583 | sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_use_sg, sg, | 1595 | sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_sg_count(SCpnt), |
1596 | scsi_sglist(SCpnt), | ||
1584 | orb_direction, dma_dir); | 1597 | orb_direction, dma_dir); |
1585 | 1598 | ||
1586 | sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb)); | 1599 | sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb)); |
1587 | 1600 | ||
1588 | memset(orb->cdb, 0, 12); | 1601 | memset(orb->cdb, 0, sizeof(orb->cdb)); |
1589 | memcpy(orb->cdb, scsi_cmd, COMMAND_SIZE(*scsi_cmd)); | 1602 | memcpy(orb->cdb, SCpnt->cmnd, SCpnt->cmd_len); |
1590 | } | 1603 | } |
1591 | 1604 | ||
1592 | static void sbp2_link_orb_command(struct sbp2_lu *lu, | 1605 | static void sbp2_link_orb_command(struct sbp2_lu *lu, |
@@ -1669,16 +1682,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, | 1682 | static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt, |
1670 | void (*done)(struct scsi_cmnd *)) | 1683 | void (*done)(struct scsi_cmnd *)) |
1671 | { | 1684 | { |
1672 | unchar *scsi_cmd = (unchar *)SCpnt->cmnd; | ||
1673 | struct sbp2_command_info *cmd; | 1685 | struct sbp2_command_info *cmd; |
1674 | 1686 | ||
1675 | cmd = sbp2util_allocate_command_orb(lu, SCpnt, done); | 1687 | cmd = sbp2util_allocate_command_orb(lu, SCpnt, done); |
1676 | if (!cmd) | 1688 | if (!cmd) |
1677 | return -EIO; | 1689 | return -EIO; |
1678 | 1690 | ||
1679 | sbp2_create_command_orb(lu, cmd, scsi_cmd, scsi_sg_count(SCpnt), | 1691 | 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); | 1692 | sbp2_link_orb_command(lu, cmd); |
1683 | 1693 | ||
1684 | return 0; | 1694 | return 0; |
@@ -1999,6 +2009,8 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev) | |||
1999 | 2009 | ||
2000 | sdev->use_10_for_rw = 1; | 2010 | sdev->use_10_for_rw = 1; |
2001 | 2011 | ||
2012 | if (sbp2_exclusive_login) | ||
2013 | sdev->manage_start_stop = 1; | ||
2002 | if (sdev->type == TYPE_ROM) | 2014 | if (sdev->type == TYPE_ROM) |
2003 | sdev->use_10_for_ms = 1; | 2015 | sdev->use_10_for_ms = 1; |
2004 | if (sdev->type == TYPE_DISK && | 2016 | if (sdev->type == TYPE_DISK && |
@@ -2006,6 +2018,8 @@ static int sbp2scsi_slave_configure(struct scsi_device *sdev) | |||
2006 | sdev->skip_ms_page_8 = 1; | 2018 | sdev->skip_ms_page_8 = 1; |
2007 | if (lu->workarounds & SBP2_WORKAROUND_FIX_CAPACITY) | 2019 | if (lu->workarounds & SBP2_WORKAROUND_FIX_CAPACITY) |
2008 | sdev->fix_capacity = 1; | 2020 | sdev->fix_capacity = 1; |
2021 | if (lu->workarounds & SBP2_WORKAROUND_POWER_CONDITION) | ||
2022 | sdev->start_stop_pwr_cond = 1; | ||
2009 | if (lu->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) | 2023 | if (lu->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS) |
2010 | blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512); | 2024 | blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512); |
2011 | return 0; | 2025 | return 0; |
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h index 80d8e097b065..875428bc8d29 100644 --- a/drivers/ieee1394/sbp2.h +++ b/drivers/ieee1394/sbp2.h | |||
@@ -345,6 +345,7 @@ enum sbp2lu_state_types { | |||
345 | #define SBP2_WORKAROUND_FIX_CAPACITY 0x8 | 345 | #define SBP2_WORKAROUND_FIX_CAPACITY 0x8 |
346 | #define SBP2_WORKAROUND_DELAY_INQUIRY 0x10 | 346 | #define SBP2_WORKAROUND_DELAY_INQUIRY 0x10 |
347 | #define SBP2_INQUIRY_DELAY 12 | 347 | #define SBP2_INQUIRY_DELAY 12 |
348 | #define SBP2_WORKAROUND_POWER_CONDITION 0x20 | ||
348 | #define SBP2_WORKAROUND_OVERRIDE 0x100 | 349 | #define SBP2_WORKAROUND_OVERRIDE 0x100 |
349 | 350 | ||
350 | #endif /* SBP2_H */ | 351 | #endif /* SBP2_H */ |
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index e24772d336e1..069b9f6bf16d 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c | |||
@@ -1503,6 +1503,8 @@ static int __init video1394_init_module (void) | |||
1503 | { | 1503 | { |
1504 | int ret; | 1504 | int ret; |
1505 | 1505 | ||
1506 | hpsb_init_highlevel(&video1394_highlevel); | ||
1507 | |||
1506 | cdev_init(&video1394_cdev, &video1394_fops); | 1508 | cdev_init(&video1394_cdev, &video1394_fops); |
1507 | video1394_cdev.owner = THIS_MODULE; | 1509 | video1394_cdev.owner = THIS_MODULE; |
1508 | ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16); | 1510 | ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16); |