diff options
author | Elias Oltmanns <eo@nebensachen.de> | 2008-10-10 16:39:40 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:40 -0400 |
commit | 92f1f8fd8040e7b50a67a850a935509bb01201bb (patch) | |
tree | df27468982bc64f0a6fdc54f05153e382ca63a1b /drivers/ide/ide-tape.c | |
parent | d6e2955a6b82d2312b5ff885ce13c8ab54d59d96 (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.c | 48 |
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) \ |
2192 | ide_tape_devset_get(_name, _field) \ | 2192 | ide_tape_devset_get(_name, _field) \ |
2193 | ide_tape_devset_set(_name, _field) \ | 2193 | ide_tape_devset_set(_name, _field) \ |
2194 | __IDE_DEVSET(_name, S_RW, _min, _max, get_##_name, set_##_name, _mulf, _divf) | 2194 | IDE_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) \ |
2197 | ide_tape_devset_get(_name, _field) \ | 2197 | ide_tape_devset_get(_name, _field) \ |
2198 | __IDE_DEVSET(_name, S_READ, _min, _max, get_##_name, NULL, _mulf, _divf) | 2198 | IDE_DEVSET(_name, 0, get_##_name, NULL) |
2199 | 2199 | ||
2200 | static int mulf_tdsc(ide_drive_t *drive) { return 1000; } | 2200 | static int mulf_tdsc(ide_drive_t *drive) { return 1000; } |
2201 | static int divf_tdsc(ide_drive_t *drive) { return HZ; } | 2201 | static int divf_tdsc(ide_drive_t *drive) { return HZ; } |
2202 | static int divf_buffer(ide_drive_t *drive) { return 2; } | 2202 | static int divf_buffer(ide_drive_t *drive) { return 2; } |
2203 | static int divf_buffer_size(ide_drive_t *drive) { return 1024; } | 2203 | static int divf_buffer_size(ide_drive_t *drive) { return 1024; } |
2204 | 2204 | ||
2205 | ide_devset_rw(dsc_overlap, 0, 1, dsc_overlap); | 2205 | ide_devset_rw_field(dsc_overlap, dsc_overlap); |
2206 | 2206 | ||
2207 | ide_tape_devset_rw(debug_mask, 0, 0xffff, debug_mask, NULL, NULL); | 2207 | ide_tape_devset_rw_field(debug_mask, debug_mask); |
2208 | ide_tape_devset_rw(tdsc, IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX, | 2208 | ide_tape_devset_rw_field(tdsc, best_dsc_rw_freq); |
2209 | best_dsc_rw_freq, mulf_tdsc, divf_tdsc); | 2209 | |
2210 | 2210 | ide_tape_devset_r_field(avg_speed, avg_speed); | |
2211 | ide_tape_devset_r(avg_speed, 0, 0xffff, avg_speed, NULL, NULL); | 2211 | ide_tape_devset_r_field(speed, caps[14]); |
2212 | ide_tape_devset_r(speed, 0, 0xffff, caps[14], NULL, NULL); | 2212 | ide_tape_devset_r_field(buffer, caps[16]); |
2213 | ide_tape_devset_r(buffer, 0, 0xffff, caps[16], NULL, divf_buffer); | 2213 | ide_tape_devset_r_field(buffer_size, buffer_size); |
2214 | ide_tape_devset_r(buffer_size, 0, 0xffff, buffer_size, NULL, divf_buffer_size); | 2214 | |
2215 | 2215 | static const struct ide_proc_devset idetape_settings[] = { | |
2216 | static 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 | ||