aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorElias Oltmanns <eo@nebensachen.de>2008-10-10 16:39:40 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:40 -0400
commit92f1f8fd8040e7b50a67a850a935509bb01201bb (patch)
treedf27468982bc64f0a6fdc54f05153e382ca63a1b /drivers/ide/ide-tape.c
parentd6e2955a6b82d2312b5ff885ce13c8ab54d59d96 (diff)
ide: Remove ide_spin_wait_hwgroup() and use special requests instead
Use a special request for serialisation purposes and get rid of the awkward ide_spin_wait_hwgroup(). This also involves converting the ide_devset structure so it can be shared by the /proc and the ioctl code. Signed-off-by: Elias Oltmanns <eo@nebensachen.de> [bart: use rq->cmd[] directly] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 25190966ed39..f8c84df4a0bc 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2188,40 +2188,40 @@ static int set_##name(ide_drive_t *drive, int arg) \
2188 return 0; \ 2188 return 0; \
2189} 2189}
2190 2190
2191#define ide_tape_devset_rw(_name, _min, _max, _field, _mulf, _divf) \ 2191#define ide_tape_devset_rw_field(_name, _field) \
2192ide_tape_devset_get(_name, _field) \ 2192ide_tape_devset_get(_name, _field) \
2193ide_tape_devset_set(_name, _field) \ 2193ide_tape_devset_set(_name, _field) \
2194__IDE_DEVSET(_name, S_RW, _min, _max, get_##_name, set_##_name, _mulf, _divf) 2194IDE_DEVSET(_name, DS_SYNC, get_##_name, set_##_name)
2195 2195
2196#define ide_tape_devset_r(_name, _min, _max, _field, _mulf, _divf) \ 2196#define ide_tape_devset_r_field(_name, _field) \
2197ide_tape_devset_get(_name, _field) \ 2197ide_tape_devset_get(_name, _field) \
2198__IDE_DEVSET(_name, S_READ, _min, _max, get_##_name, NULL, _mulf, _divf) 2198IDE_DEVSET(_name, 0, get_##_name, NULL)
2199 2199
2200static int mulf_tdsc(ide_drive_t *drive) { return 1000; } 2200static int mulf_tdsc(ide_drive_t *drive) { return 1000; }
2201static int divf_tdsc(ide_drive_t *drive) { return HZ; } 2201static int divf_tdsc(ide_drive_t *drive) { return HZ; }
2202static int divf_buffer(ide_drive_t *drive) { return 2; } 2202static int divf_buffer(ide_drive_t *drive) { return 2; }
2203static int divf_buffer_size(ide_drive_t *drive) { return 1024; } 2203static int divf_buffer_size(ide_drive_t *drive) { return 1024; }
2204 2204
2205ide_devset_rw(dsc_overlap, 0, 1, dsc_overlap); 2205ide_devset_rw_field(dsc_overlap, dsc_overlap);
2206 2206
2207ide_tape_devset_rw(debug_mask, 0, 0xffff, debug_mask, NULL, NULL); 2207ide_tape_devset_rw_field(debug_mask, debug_mask);
2208ide_tape_devset_rw(tdsc, IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX, 2208ide_tape_devset_rw_field(tdsc, best_dsc_rw_freq);
2209 best_dsc_rw_freq, mulf_tdsc, divf_tdsc); 2209
2210 2210ide_tape_devset_r_field(avg_speed, avg_speed);
2211ide_tape_devset_r(avg_speed, 0, 0xffff, avg_speed, NULL, NULL); 2211ide_tape_devset_r_field(speed, caps[14]);
2212ide_tape_devset_r(speed, 0, 0xffff, caps[14], NULL, NULL); 2212ide_tape_devset_r_field(buffer, caps[16]);
2213ide_tape_devset_r(buffer, 0, 0xffff, caps[16], NULL, divf_buffer); 2213ide_tape_devset_r_field(buffer_size, buffer_size);
2214ide_tape_devset_r(buffer_size, 0, 0xffff, buffer_size, NULL, divf_buffer_size); 2214
2215 2215static const struct ide_proc_devset idetape_settings[] = {
2216static const struct ide_devset *idetape_settings[] = { 2216 __IDE_PROC_DEVSET(avg_speed, 0, 0xffff, NULL, NULL),
2217 &ide_devset_avg_speed, 2217 __IDE_PROC_DEVSET(buffer, 0, 0xffff, NULL, divf_buffer),
2218 &ide_devset_buffer, 2218 __IDE_PROC_DEVSET(buffer_size, 0, 0xffff, NULL, divf_buffer_size),
2219 &ide_devset_buffer_size, 2219 __IDE_PROC_DEVSET(debug_mask, 0, 0xffff, NULL, NULL),
2220 &ide_devset_debug_mask, 2220 __IDE_PROC_DEVSET(dsc_overlap, 0, 1, NULL, NULL),
2221 &ide_devset_dsc_overlap, 2221 __IDE_PROC_DEVSET(speed, 0, 0xffff, NULL, NULL),
2222 &ide_devset_speed, 2222 __IDE_PROC_DEVSET(tdsc, IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX,
2223 &ide_devset_tdsc, 2223 mulf_tdsc, divf_tdsc),
2224 NULL 2224 { 0 },
2225}; 2225};
2226#endif 2226#endif
2227 2227