diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/tape_3590.c | 22 | ||||
-rw-r--r-- | drivers/s390/char/tape_std.h | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index c3915f60a3aa..d71ef1adea59 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -230,14 +230,16 @@ tape_3590_read_attmsg(struct tape_device *device) | |||
230 | * These functions are used to schedule follow-up actions from within an | 230 | * These functions are used to schedule follow-up actions from within an |
231 | * interrupt context (like unsolicited interrupts). | 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 | static void | 239 | static void |
234 | tape_3590_work_handler(void *data) | 240 | tape_3590_work_handler(void *data) |
235 | { | 241 | { |
236 | struct { | 242 | struct work_handler_data *p = data; |
237 | struct tape_device *device; | ||
238 | enum tape_op op; | ||
239 | struct work_struct work; | ||
240 | } *p = data; | ||
241 | 243 | ||
242 | switch (p->op) { | 244 | switch (p->op) { |
243 | case TO_MSEN: | 245 | case TO_MSEN: |
@@ -257,11 +259,7 @@ tape_3590_work_handler(void *data) | |||
257 | static int | 259 | static int |
258 | tape_3590_schedule_work(struct tape_device *device, enum tape_op op) | 260 | tape_3590_schedule_work(struct tape_device *device, enum tape_op op) |
259 | { | 261 | { |
260 | struct { | 262 | struct work_handler_data *p; |
261 | struct tape_device *device; | ||
262 | enum tape_op op; | ||
263 | struct work_struct work; | ||
264 | } *p; | ||
265 | 263 | ||
266 | if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL) | 264 | if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL) |
267 | return -ENOMEM; | 265 | return -ENOMEM; |
@@ -316,7 +314,7 @@ tape_3590_bread(struct tape_device *device, struct request *req) | |||
316 | 314 | ||
317 | rq_for_each_bio(bio, req) { | 315 | rq_for_each_bio(bio, req) { |
318 | bio_for_each_segment(bv, bio, i) { | 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 | for (off = 0; off < bv->bv_len; | 318 | for (off = 0; off < bv->bv_len; |
321 | off += TAPEBLOCK_HSEC_SIZE) { | 319 | off += TAPEBLOCK_HSEC_SIZE) { |
322 | ccw->flags = CCW_FLAG_CC; | 320 | ccw->flags = CCW_FLAG_CC; |
@@ -1168,6 +1166,7 @@ tape_3590_setup_device(struct tape_device *device) | |||
1168 | static void | 1166 | static void |
1169 | tape_3590_cleanup_device(struct tape_device *device) | 1167 | tape_3590_cleanup_device(struct tape_device *device) |
1170 | { | 1168 | { |
1169 | flush_scheduled_work(); | ||
1171 | tape_std_unassign(device); | 1170 | tape_std_unassign(device); |
1172 | 1171 | ||
1173 | kfree(device->discdata); | 1172 | kfree(device->discdata); |
@@ -1234,6 +1233,7 @@ static struct tape_discipline tape_discipline_3590 = { | |||
1234 | 1233 | ||
1235 | static struct ccw_device_id tape_3590_ids[] = { | 1234 | static struct ccw_device_id tape_3590_ids[] = { |
1236 | {CCW_DEVICE_DEVTYPE(0x3590, 0, 0x3590, 0), .driver_info = tape_3590}, | 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 | { /* end of list */ } | 1237 | { /* end of list */ } |
1238 | }; | 1238 | }; |
1239 | 1239 | ||
diff --git a/drivers/s390/char/tape_std.h b/drivers/s390/char/tape_std.h index 2d311798edf4..1fc952359341 100644 --- a/drivers/s390/char/tape_std.h +++ b/drivers/s390/char/tape_std.h | |||
@@ -153,6 +153,7 @@ enum s390_tape_type { | |||
153 | tape_3480, | 153 | tape_3480, |
154 | tape_3490, | 154 | tape_3490, |
155 | tape_3590, | 155 | tape_3590, |
156 | tape_3592, | ||
156 | }; | 157 | }; |
157 | 158 | ||
158 | #endif // _TAPE_STD_H | 159 | #endif // _TAPE_STD_H |