Commit 2cc924b8ba1e9493ed50f5b793974e2427a15748
Committed by
Linus Torvalds
1 parent
3363fbdd6f
Exists in
master
and in
39 other branches
[PATCH] s390: tape 3590 changes
Added some changes that where proposed by Andrew Morton. Added 3592 device type. Signed-off-by: Stefan Bader <shbader@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 2 changed files with 12 additions and 11 deletions Side-by-side Diff
drivers/s390/char/tape_3590.c
... | ... | @@ -230,14 +230,16 @@ |
230 | 230 | * These functions are used to schedule follow-up actions from within an |
231 | 231 | * interrupt context (like unsolicited interrupts). |
232 | 232 | */ |
233 | +struct work_handler_data { | |
234 | + struct tape_device *device; | |
235 | + enum tape_op op; | |
236 | + struct work_struct work; | |
237 | +}; | |
238 | + | |
233 | 239 | static void |
234 | 240 | tape_3590_work_handler(void *data) |
235 | 241 | { |
236 | - struct { | |
237 | - struct tape_device *device; | |
238 | - enum tape_op op; | |
239 | - struct work_struct work; | |
240 | - } *p = data; | |
242 | + struct work_handler_data *p = data; | |
241 | 243 | |
242 | 244 | switch (p->op) { |
243 | 245 | case TO_MSEN: |
... | ... | @@ -257,11 +259,7 @@ |
257 | 259 | static int |
258 | 260 | tape_3590_schedule_work(struct tape_device *device, enum tape_op op) |
259 | 261 | { |
260 | - struct { | |
261 | - struct tape_device *device; | |
262 | - enum tape_op op; | |
263 | - struct work_struct work; | |
264 | - } *p; | |
262 | + struct work_handler_data *p; | |
265 | 263 | |
266 | 264 | if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL) |
267 | 265 | return -ENOMEM; |
... | ... | @@ -316,7 +314,7 @@ |
316 | 314 | |
317 | 315 | rq_for_each_bio(bio, req) { |
318 | 316 | bio_for_each_segment(bv, bio, i) { |
319 | - dst = kmap(bv->bv_page) + bv->bv_offset; | |
317 | + dst = page_address(bv->bv_page) + bv->bv_offset; | |
320 | 318 | for (off = 0; off < bv->bv_len; |
321 | 319 | off += TAPEBLOCK_HSEC_SIZE) { |
322 | 320 | ccw->flags = CCW_FLAG_CC; |
... | ... | @@ -1168,6 +1166,7 @@ |
1168 | 1166 | static void |
1169 | 1167 | tape_3590_cleanup_device(struct tape_device *device) |
1170 | 1168 | { |
1169 | + flush_scheduled_work(); | |
1171 | 1170 | tape_std_unassign(device); |
1172 | 1171 | |
1173 | 1172 | kfree(device->discdata); |
... | ... | @@ -1234,6 +1233,7 @@ |
1234 | 1233 | |
1235 | 1234 | static struct ccw_device_id tape_3590_ids[] = { |
1236 | 1235 | {CCW_DEVICE_DEVTYPE(0x3590, 0, 0x3590, 0), .driver_info = tape_3590}, |
1236 | + {CCW_DEVICE_DEVTYPE(0x3592, 0, 0x3592, 0), .driver_info = tape_3592}, | |
1237 | 1237 | { /* end of list */ } |
1238 | 1238 | }; |
1239 | 1239 |